:root {
  --bg: #0F172A;
  --card: rgba(30, 41, 59, 0.7);
  --border: rgba(51, 65, 85, 0.5);
  --text: #F1F5F9;
  --muted: #94A3B8;
  --accent: #34D399;
  --cta-from: #F59E0B;
  --cta-to: #EA580C;
  --cta-text: #0F172A;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.15), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  display: flex;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px 24px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-self: flex-start;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FDE68A;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 24px;
}
.notice[hidden] { display: none; }

.avatar-wrap { display: flex; justify-content: center; margin-bottom: 16px; }

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #1E293B center / cover no-repeat;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(52, 211, 153, 0.6), 0 0 32px rgba(52, 211, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
}

h1 { font-size: 26px; margin: 0; letter-spacing: 0.02em; }
.en { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.title { margin: 12px 0 0; font-weight: 600; color: var(--accent); font-size: 17px; letter-spacing: 0.04em; }
.title .sep { margin: 0 0.6em; opacity: 0.5; font-weight: 400; }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 14px; text-wrap: balance; }
#company {
  margin-top: 4px;
  font-size: 16px;            /* 比標語 17px 小一級 */
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #FBBF24;             /* 琥珀色 */
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}
.nowrap { white-space: nowrap; }
.en:empty, .title:empty, .tagline:empty { display: none; }

.tags {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.tags li {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
}

.tags li.link { padding: 0; background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.7); }
.tags li.link a { display: block; padding: 4px 10px; color: var(--accent); text-decoration: none; font-weight: 600; }

.cta {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--cta-text);
  background: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
  animation: glow 2.4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.cta:active { transform: scale(0.98); }
.cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@keyframes glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(234, 88, 12, 0.30); }
  50% { box-shadow: 0 8px 36px rgba(245, 158, 11, 0.60); }
}
@media (prefers-reduced-motion: reduce) {
  .cta { animation: none; }
}

.hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

.contacts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.contacts a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  word-break: break-all;
}
.contacts a:hover { border-color: rgba(52, 211, 153, 0.5); }
.contacts .label { color: var(--muted); font-size: 12px; min-width: 40px; }

.back {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}
.back[hidden] { display: none; }

footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: #F1F5F9;
  color: #0F172A;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
