/* 風格 A：喜氣紅金（主題 token 集中在 :root，之後新增風格只需另一份 token） */
:root {
  --bg: #8C1C13;
  --bg-deep: #6B140D;
  --gold: #F4C542;
  --cream: #FFF4DC;
  --text-on-cream: #5A1010;
  --muted-on-cream: #8A6A40;
  --muted-on-red: #F2D9B0;
  --danger: #C8102E;
  --ok: #1E8449;
  --radius-card: 22px;
  --radius-btn: 18px;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
h1, h2 { font-family: var(--font-serif); font-weight: 900; margin: 0; line-height: 1.15; }
.frame { min-height: 100vh; min-height: 100dvh; border: 4px solid var(--gold); padding: 28px 20px 24px; display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--gold); letter-spacing: 3px; }
.card { background: var(--cream); color: var(--text-on-cream); border-radius: var(--radius-card); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.card label, .card .label { font-size: 17px; font-weight: 900; }
.hint { font-size: 14px; color: var(--muted-on-cream); }
.hint-red { font-size: 13px; text-align: center; color: var(--muted-on-red); }
.err { font-size: 15px; font-weight: 700; color: var(--danger); min-height: 1.4em; }
input[type="text"], input[type="tel"], input[type="number"], input[inputmode] {
  height: 52px; width: 100%; border: 3px solid var(--bg); border-radius: 14px; padding: 0 16px;
  font: 700 22px var(--font-sans); color: var(--text-on-cream); background: #fff;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 4px solid #1F5FBF; outline-offset: 2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 60px; border: 0; border-radius: var(--radius-btn); background: var(--gold); color: var(--text-on-cream);
  font: 900 24px var(--font-sans); cursor: pointer; padding: 0 24px; width: 100%;
}
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--cream); border: 3px solid var(--gold); }
.btn-small { min-height: 48px; font-size: 18px; width: auto; }
.spacer { margin-top: auto; }
.wy-avatar { border-radius: 50%; overflow: hidden; flex: none; display: inline-block; }
.wy-avatar svg { display: block; width: 100%; height: 100%; }
.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); margin-right: 8px; }
.status-dot.off { background: #999; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; justify-items: center; }
.avatar-btn { width: 72px; height: 72px; padding: 0; border: 0; background: transparent; border-radius: 50%; cursor: pointer; }
.avatar-btn[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px var(--bg); }
.row { display: flex; align-items: center; gap: 14px; }
.big-code { font-family: var(--font-serif); font-weight: 900; letter-spacing: 6px; }
.copyline { word-break: break-all; font-size: 15px; background: #fff; border: 2px dashed var(--bg); border-radius: 12px; padding: 10px 12px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== 電腦版（RWD）：手機版維持單欄，寬螢幕才展開 ===== */
@media (min-width: 900px) {
  .frame.wide { max-width: 1160px; padding: 44px 56px 32px; gap: 22px; }
  .frame.read { max-width: 860px; padding: 44px 56px 32px; gap: 20px; font-size: 18px; }
  .frame.mid { max-width: 700px; padding: 44px 48px 32px; }
  .frame.wide.home > div:first-child h1, .frame.wide.gp > div:first-child h1 { font-size: 52px !important; }
  .frame.wide .lead-p { font-size: 21px !important; max-width: 780px; }
  .card { padding: 22px 24px 20px; }
  .btn:hover { filter: brightness(1.05); }
  a:hover { text-decoration: underline; }
  .btn:hover, .btn-small:hover { text-decoration: none; }
}
@media (min-width: 1400px) {
  .frame.wide { max-width: 1280px; }
}
