/* 今晚別當邊緣鬼 — 活動網站樣式（依 visual-design-v2 五張稿）
   質感基準：current.puma.taipei/id —— 極重字重、實線深色框、實色位移陰影、虛線內框、大而寬的控制項、無模糊無漸層。
   受眾 20–70 歲：字 ≥ 16px、按鈕 ≥ 56px。工藝：只動 transform/opacity、強 ease-out、金色焦點環、減少動態去位移。 */
:root {
  --sky: #f7a42b;
  --moon: #ffe48a;
  --yellow: #ffd94a;
  --navy: #0e2340;
  --navy-2: #1f3a66;
  --cream: #fff6e0;
  --cream-2: #f9ecd0;
  --cream-3: #f1dfb6;
  --rope: #b8742f;
  --orange: #f26a1b;
  --teal: #2e8b8b;
  --ink: #2a1a0e;
  --ink-2: #5a4a3a;
  --muted: #7a6a5a;
  --line: #06c755;
  --ok: #2e8b57;
  --danger: #b4232c;
  --gold: #e3b341;
  --sea: #1f6fa8;
  --field: #c9b48f;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  position: relative; margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 18px; font-weight: 400; line-height: 1.55; color: var(--ink);
  background: #023c53; overflow-x: clip; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-weight: 700; line-height: 1.25; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== 場景：一個完整的海景舞台 =====
   上半部是整張繪製的天空、月亮、船與燈塔（page-top），標題壓在月亮上、每頁小鬼飄在左邊；
   海平線在頁首下方（--horizon），下面接可無限重複的深海（page-sea-tile），羊皮紙繩框浮在海上。
   海平線位置由頁首高度決定：一般頁 350px、首頁（標準字較高）382px。 */
:root { --horizon: 350px; --sea-top: #01406f; }
/* 海平線位置：一般頁首＋海景帶＝350；用標準字當大標的頁（首頁、錯誤頁）頁首較高＝382；
   沒有海景帶的頁（錯誤、報到、當天才開放）海平線直接貼在頁首底下，船與島收起來（反正被繩框擋住，只會在邊緣露一角）。 */
body.home, body:has(.brand-title) { --horizon: 382px; }
body:not(:has(.hero)) { --horizon: 212px; }
body:has(.brand-title):not(:has(.hero)) { --horizon: 244px; }
/* 固定底色：往下拉重整、捲過頭或背景圖還沒載入時露出的地方。上半是畫裡天空最上緣的紫，下半是深海色（不再用舊版天空圖）。
   頁面底色（body）設成深海色，讓瀏覽器捲過頭時露出的畫布也是海；不要在 html 上設底色，否則 body 底色會蓋住場景。 */
.sky { position: fixed; inset: 0; z-index: -3; background: linear-gradient(180deg, #53255e 0 50%, #023c53 50% 100%); }
/* 內頁背景（interior-backgrounds-v1）：
   page-top 1800×1350 以 1/3 顯示＝600×450，中間 430 寬是安全區；畫裡的海平線在 y≈348，對齊 --horizon。
   下面接 page-sea-tile（600×430，上下左右可重複）一路鋪到頁面最底；兩張交界用 70px 淡出融合。
   寬螢幕（>600px）左右露出的部分：海平線以上用天空漸層、以下用深海紋理，圖的左右邊淡出接上。 */
.scene { position: absolute; left: 0; right: 0; top: 0; height: 100%; min-height: 100dvh; z-index: -2; pointer-events: none; overflow: hidden;
  background:
    linear-gradient(180deg, #49245e 0, #e18149 calc(var(--horizon) - 180px), #d38e27 var(--horizon)) center top / 100% var(--horizon) no-repeat,
    url("/assets/page-sea-tile.webp") center top / 600px 430px repeat,
    #023c53; }
.scene-top { position: absolute; left: 50%; top: calc(var(--horizon) - 348px); width: 600px; height: 450px; margin-left: -300px;
  background: url("/assets/page-top.webp") center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 70px), transparent), linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 calc(100% - 70px), transparent), linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-composite: intersect; }
.scene.paused * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hero .ghost, .hero .shadow, .ghost.float { animation: none; }
  .stamp.pop .box img, .team-flip .card, .confetti i, .btn:active, .choice:active, .bar > i { animation: none; transform: none; }
}

.page { width: min(100%, 430px); margin: 0 auto; padding: 10px 14px 120px; position: relative; }
body.has-nav .page { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
body.wide .page { width: min(100%, 1100px); }

/* ===== 頂部：品牌卷軸、返回鈕、大標、卷軸副標 ===== */
.masthead { position: relative; text-align: center; padding-top: 6px; }
.back-btn {
  position: absolute; left: 0; top: 6px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; border: 3px solid var(--navy); box-shadow: 0 3px 0 rgba(14, 35, 64, 0.35);
}
.back-btn img { width: 24px; height: 24px; filter: invert(1); transform: rotate(180deg); }
.page-title { display: block; margin: 4px auto 0; filter: drop-shadow(0 6px 0 rgba(14, 35, 64, 0.22)); }
.page-title svg { display: block; width: 100%; height: auto; overflow: visible; }
.page-title text { font-family: var(--font); font-weight: 900; font-size: 100px; letter-spacing: 2px; text-anchor: middle; dominant-baseline: middle; paint-order: stroke fill; stroke-linejoin: round; }
.page-title .t-back { fill: var(--navy); stroke: var(--navy); stroke-width: 14px; }
.page-title .t-mid { fill: #d9531e; stroke: #d9531e; stroke-width: 14px; }
.page-title .t-main { fill: var(--yellow); stroke: var(--navy); stroke-width: 10px; }
.page-title .spark { fill: var(--yellow); stroke: var(--navy); stroke-width: 5px; stroke-linejoin: round; }
.scroll-sub {
  position: relative; display: inline-block; margin: 6px auto 0; padding: 6px 22px;
  background: var(--cream); color: #5a3410; border: 3px solid var(--navy); border-radius: 6px;
  font-weight: 700; font-size: 19px; letter-spacing: 0.06em; transform: rotate(-1.5deg); box-shadow: 0 3px 0 var(--navy);
}
.scroll-sub::before, .scroll-sub::after {
  content: ""; position: absolute; top: 4px; bottom: -6px; width: 12px; background: var(--cream-3); border: 3px solid var(--navy); border-radius: 4px; z-index: -1;
}
.scroll-sub::before { left: -12px; } .scroll-sub::after { right: -12px; }

/* 海景帶：這一頁的小鬼飄在海平線上方，底下一道水面影子。船與島在固定場景層，捲動時小鬼跟著頁首走、船留在海上。 */
.hero { position: relative; height: 150px; margin: 0 -14px; z-index: 0; }
.hero + .rope { margin-top: 26px; }
.hero + .steps { margin-top: 20px; margin-bottom: 0; }
.steps + .rope { margin-top: -10px; }
.hero .ghost { position: absolute; left: 22%; bottom: 10px; width: 126px; transform: translateX(-50%); animation: float 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(14, 35, 64, 0.16)); }
.hero .shadow { position: absolute; left: 22%; bottom: -8px; width: 76px; height: 12px; border-radius: 50%; background: rgba(14, 35, 64, 0.22); transform: translateX(-50%); animation: shade 3.2s ease-in-out infinite; }
.hero .chest { position: absolute; left: 50%; bottom: 10px; width: 150px; transform: translateX(-20%); filter: drop-shadow(0 5px 0 rgba(14, 35, 64, 0.2)); }
@keyframes float { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }
@keyframes shade { 0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; } 50% { transform: translateX(-50%) scale(0.82); opacity: 0.7; } }

/* ===== 步驟列 ===== */
.steps { display: flex; align-items: center; gap: 2px; margin: -16px 0 10px; padding: 6px; background: var(--cream); border: 2px solid #a98457; border-radius: 999px; position: relative; z-index: 3; box-shadow: 0 3px 0 rgba(14, 35, 64, 0.18); }
.steps li { list-style: none; flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; padding: 4px 4px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); background: var(--cream-2); white-space: nowrap; }
.steps li b { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #e6d3a8; color: var(--ink); font-size: 14px; }
.steps li.current { background: var(--navy); color: #fff; }
.steps li.current b { background: #fff; color: var(--navy); }
.steps li.done b { background: var(--orange); color: #fff; }
.steps .sep { flex: none; width: 12px; height: 12px; background: url("/assets/icon-chev.svg") center / contain no-repeat; opacity: 0.6; }

/* ===== 繩框面板 ===== */
.rope {
  /* 繩心距外緣 --rc、繩粗 --rt、角結尺寸 --rk：皆由素材 1200px 版依 --rs 縮放 */
  --rs: 0.33; --rc: calc(107px * var(--rs)); --rt: calc(61px * var(--rs)); --rk: calc(240px * var(--rs)); --re: calc(140px * var(--rs)); --ro: calc(40px * var(--rs));
  position: relative; margin: 14px -14px; padding: calc(var(--rc) + 32px) calc(var(--rc) + 26px) calc(var(--rc) + 30px);
  background: linear-gradient(var(--cream), var(--cream)) center / calc(100% - var(--rc) * 2) calc(100% - var(--rc) * 2) no-repeat;
}
.rope::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    url("/assets/rope-tl.png") left top / var(--rk) var(--rk) no-repeat,
    url("/assets/rope-tr.png") right top / var(--rk) var(--rk) no-repeat,
    url("/assets/rope-bl.png") left bottom / var(--rk) var(--rk) no-repeat,
    url("/assets/rope-br.png") right bottom / var(--rk) var(--rk) no-repeat,
    url("/assets/rope-edge-v.png") left var(--ro) top 0 / var(--re) auto repeat-y,
    url("/assets/rope-edge-v.png") right var(--ro) top 0 / var(--re) auto repeat-y,
    url("/assets/rope-edge-h.png") left 0 top var(--ro) / auto var(--re) repeat-x,
    url("/assets/rope-edge-h.png") left 0 bottom var(--ro) / auto var(--re) repeat-x;
  filter: drop-shadow(0 5px 0 rgba(14, 35, 64, 0.28));
}
.rope > * { position: relative; z-index: 2; }
.rope::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -16px; height: 26px; border-radius: 50%; background: rgba(6, 21, 43, 0.35); filter: blur(10px); z-index: 0; }
.rope.small { --rs: 0.26; padding-top: calc(var(--rc) + 30px); padding-bottom: calc(var(--rc) + 26px); }
@media (max-width: 400px) {
  .rope { --rs: 0.3; padding-left: calc(var(--rc) + 22px); padding-right: calc(var(--rc) + 22px); }
  .choice { grid-template-columns: 72px 1fr 40px; min-height: 100px; }
  .choice .who { width: 72px; height: 72px; }
  .choice .t { font-size: 20px; }
  .choice .s { font-size: 13px; }
  .choice .go { width: 36px; height: 36px; }
  .rope-title { font-size: 22px; }
  .rope-sub { font-size: 16px; }
  .whoami { grid-template-columns: 76px 1fr; }
  .whoami .av, .whoami .av img { width: 76px; height: 76px; }
}
/* 單色圖示：用 mask 上色，顏色跟文字走 */
.mi { display: inline-block; width: 28px; height: 28px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; vertical-align: middle; }
.rope-title { text-align: center; font-size: 24px; font-weight: 700; color: #4a2a10; white-space: nowrap; margin-top: 2px; }
.rope-title .sp { display: inline-block; width: 16px; height: 16px; margin: 0 4px; vertical-align: -1px; background: url("/assets/icon-sparkle.svg") center / contain no-repeat; }
.rope-sub { text-align: center; font-size: 17px; font-weight: 400; color: var(--ink-2); margin-top: 4px; }
.rope .peek { position: absolute; right: -22px; top: -30px; width: 76px; transform: rotate(8deg); }

/* ===== 身分卡 ===== */
.choice {
  display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 6px; min-height: 112px; padding: 8px 6px 8px 2px; margin-top: 14px;
  background: #fff9ea; border: 2px solid #3a2a1a; border-radius: 18px; text-decoration: none; box-shadow: 0 3px 0 rgba(14, 35, 64, 0.18);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.choice:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(14, 35, 64, 0.18); }
.choice .who { width: 92px; height: 92px; }
.choice .txt { display: flex; flex-direction: column; min-width: 0; }
.choice .t { font-weight: 700; font-size: 24px; line-height: 1.15; white-space: nowrap; }
.choice .s { font-size: 14px; font-weight: 500; margin-top: 4px; color: var(--ink-2); line-height: 1.35; }
.choice .go { width: 42px; height: 42px; }
.choice.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.choice.navy .t { color: var(--yellow); }
.choice.navy .s { color: rgba(255, 255, 255, 0.85); }

.row-link {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; margin-top: 14px; text-decoration: none;
  background: var(--cream); border: 2px solid #a98457; border-radius: 16px; font-weight: 700; font-size: 18px; color: #4a2a10;
}
.row-link { white-space: nowrap; font-size: 17px; font-weight: 700; }
.row-link .mi { width: 32px; height: 32px; }
.row-link .chev { margin-left: auto; width: 22px; height: 22px; }
.row-link .val { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: #e9e2d2; color: var(--muted); font-size: 13px; white-space: nowrap; }
.row-link .val + .chev { margin-left: 6px; }

.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: #8a6a3a; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 2px solid #c9a56a; }
.divider img { width: 24px; height: 24px; opacity: 0.8; }

.pill-info { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 16px; margin-top: 4px; background: var(--cream-2); border-radius: 999px; font-weight: 500; font-size: 16px; color: var(--ink-2); text-align: left; }
.pill-info .mi { width: 28px; height: 28px; color: var(--navy); }
.pill-info.plain { background: #f3e6c8; font-size: 14px; min-height: 44px; }

/* ===== 按鈕 ===== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 60px; padding: 12px 10px; margin-top: 14px;
  font: 700 19px/1.2 var(--font); border: 3px solid var(--navy); border-radius: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 5px 0 var(--navy); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), filter 150ms var(--ease);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px) scale(0.985); box-shadow: 0 1px 0 var(--navy); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 5px 0 var(--navy), inset 0 -4px 0 rgba(0, 0, 0, 0.18); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 5px 0 #06152b, inset 0 -4px 0 rgba(0, 0, 0, 0.3); }
.btn-outline { background: var(--cream); color: #4a2a10; border-color: #a98457; box-shadow: 0 3px 0 #a98457; }
.btn-line { box-shadow: 0 5px 0 #0a7a3a; border-color: #0a7a3a; }
.btn-line { background: var(--line); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--navy); min-height: 48px; font-size: 17px; }
.btn-ghost:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn img { width: 26px; height: 26px; }
.btn .arrow { width: 24px; height: 24px; transform: rotate(180deg); filter: invert(1); }
.btn-outline .arrow, .btn-ghost .arrow { filter: none; }
.link-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.link-row::before, .link-row::after { content: ""; flex: 1; border-top: 2px solid #c9a56a; }
.link-row a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--navy); text-decoration: none; }
.link-row a img { width: 18px; height: 18px; }

/* ===== 表單 ===== */
.field { margin: 12px 0; }
.field label { display: block; font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 58px; padding: 12px 16px; font: 400 18px/1.3 var(--font); color: var(--ink);
  background: #fffaf0; border: 2px solid var(--field); border-radius: 12px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder { color: #a89b86; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.field .hint { font-size: 15px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.field .error { color: var(--danger); font-weight: 700; font-size: 16px; margin-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg .opt { display: flex; align-items: center; gap: 6px; min-height: 58px; padding: 6px 8px; border: 2px solid var(--field); border-radius: 12px; background: #fffaf0; font-weight: 700; font-size: 17px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.seg .opt img.ic { width: 30px; height: 30px; flex: none; }
.seg .opt .mi { width: 28px; height: 28px; }
.seg .opt .mk { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b9a98c; flex: none; }
.seg .opt.on { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 3px 0 rgba(14, 35, 64, 0.35); }
.seg .opt.on .mk { border: 0; background: url("/assets/icon-check-circle.svg") center / 100% no-repeat; }
.check { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-size: 16px; font-weight: 500; }
.check input { width: 28px; height: 28px; margin: 0; accent-color: var(--navy); flex: none; }
.check a { color: var(--navy); }
.form-note { text-align: center; font-size: 14px; color: var(--muted); margin-top: 10px; }
.tips { list-style: none; margin: 8px 0 0; padding: 0; }
.tips li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-weight: 500; font-size: 17px; color: var(--ink-2); }
.tips li b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 14px; }

/* ===== 通行證（03） ===== */
.whoami { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.whoami .av { position: relative; width: 84px; height: 84px; }
.whoami .av img { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--sea); box-shadow: inset 0 0 0 3px #fff; object-fit: cover; background: #fff; }
.whoami .av .sp { position: absolute; right: -12px; top: -4px; width: 26px; height: 26px; background: url("/assets/icon-sparkle.svg") center / contain no-repeat; }
.whoami .nm { font-weight: 700; font-size: 24px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--cream-3); color: #5a3410; white-space: nowrap; }
.tag.orange { background: var(--orange); color: #fff; }
.tag.navy { background: var(--navy); color: #fff; }
.progress { margin-top: 14px; }
.progress .lbl { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 19px; color: #4a2a10; }
.progress .lbl b { font-size: 28px; }
.progress .lbl b em { font-style: normal; color: var(--orange); }
.bar { height: 16px; margin-top: 6px; border-radius: 999px; background: #d9d2c4; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--orange); transform-origin: left; animation: grow 700ms var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.ribbon {
  display: grid; place-items: center; width: 250px; aspect-ratio: 900 / 240; margin: 18px auto 4px; color: #fff; font-weight: 700; font-size: 22px; letter-spacing: 0.1em;
  padding-bottom: 6px; text-shadow: 1px 1px 0 rgba(14, 35, 64, 0.6); background: center / contain no-repeat;
}
.ribbon.orange { background-image: url("/assets/ribbon-orange.webp"); }
.ribbon.teal { background-image: url("/assets/ribbon-teal.webp"); }
.ribbon.navy { width: auto; aspect-ratio: auto; background: var(--navy); border-radius: 8px; padding: 8px 30px; margin: 18px auto 10px; font-size: 19px; white-space: nowrap; clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); }
.section-box { padding: 14px 12px 12px; border-radius: 16px; background: var(--cream-2); }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stamp { text-align: center; }
.stamp .box { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 10px; border: 3px dashed #b9a98c; border-radius: 14px; background: #fff9ea; }
.stamp .box img.st { width: 100%; height: 100%; object-fit: contain; opacity: 0.5; }
.stamp .badge { position: absolute; right: -8px; bottom: -8px; width: 34px; height: 34px; }
.stamp.done .box { border: 3px solid var(--cream-3); background: var(--cream); }
.stamp.done .box img.st { opacity: 1; filter: drop-shadow(0 3px 0 rgba(14, 35, 64, 0.2)); }
.stamp .name { display: block; margin-top: 10px; font-weight: 700; font-size: 16px; color: #4a2a10; }
.stamp.pop .box img.st { animation: stampIn 700ms var(--ease) both; }
@keyframes stampIn { 0% { transform: scale(2.6) rotate(-25deg); opacity: 0; } 55% { transform: scale(0.9) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }
.note-center { text-align: center; font-size: 15px; font-weight: 400; color: var(--muted); margin-top: 8px; }
.seal { position: absolute; right: -18px; top: -30px; width: 92px; transform: rotate(12deg); z-index: 2; filter: drop-shadow(0 4px 0 rgba(14, 35, 64, 0.3)); }

/* 碎紙、小鬼 */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.confetti i { position: absolute; left: 50%; top: 40%; width: 10px; height: 14px; border-radius: 2px; opacity: 0; animation: burst 900ms var(--ease) both; animation-delay: var(--d, 0ms); background: var(--c, var(--moon)); }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(540deg); opacity: 0; } }
.ghost { margin: 0 auto; filter: drop-shadow(0 6px 0 rgba(14, 35, 64, 0.2)); }
.ghost.float { animation: float2 3s ease-in-out infinite; }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ===== 任務列表 ===== */
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 2px dashed #d9c9a6; font-size: 18px; font-weight: 500; }
.tasks li:last-child { border-bottom: 0; }
.tasks .mark { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px solid #a98457; display: grid; place-items: center; background: #fff; font-weight: 700; font-size: 15px; color: #4a2a10; }
.tasks li.done .mark { background: var(--ok); color: #fff; border-color: var(--ok); }
.tasks .pts { margin-left: auto; font-weight: 700; color: var(--orange); white-space: nowrap; }
.tasks a.go { margin-left: auto; font-weight: 700; color: var(--orange); white-space: nowrap; }

/* ===== 抽獎（04） ===== */
.pill-title { display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; margin: 0 auto; padding: 8px 26px; background: var(--navy); color: #fff; border-radius: 999px; font-weight: 700; font-size: 22px; }
.pill-title .sp { width: 18px; height: 18px; background: url("/assets/icon-sparkle.svg") center / contain no-repeat; }
.info-rows { margin-top: 14px; border: 2px solid var(--cream-3); border-radius: 14px; background: #fff9ea; }
.info-rows .r { display: grid; grid-template-columns: 30px auto 2px 1fr; align-items: center; gap: 10px; padding: 12px 12px; border-bottom: 2px solid var(--cream-3); font-weight: 700; font-size: 16px; white-space: nowrap; }
.info-rows .r:last-child { border-bottom: 0; }
.info-rows .r .mi { width: 28px; height: 28px; color: #4a2a10; }
.info-rows .r .v { white-space: normal; font-weight: 500; }
.info-rows .r .vl { width: 2px; height: 28px; background: var(--cream-3); }
.info-rows .r .v { color: var(--ink-2); font-weight: 700; }
.gifts { display: grid; grid-template-columns: repeat(3, 1fr); }
.gifts .g { text-align: center; padding: 8px 4px; border-right: 2px dashed #d9c9a6; }
.gifts .g:last-child { border-right: 0; }
.gifts .g img { width: 88px; height: 88px; margin: 0 auto; }
.gifts .g span { display: block; font-weight: 700; font-size: 16px; margin-top: 4px; color: #4a2a10; }
.emph-cta { position: relative; }
.emph-cta::before, .emph-cta::after { content: ""; position: absolute; top: 50%; width: 10px; height: 4px; background: var(--navy); border-radius: 2px; }
.emph-cta::before { left: -14px; transform: rotate(-30deg); box-shadow: 0 10px 0 var(--navy); }
.emph-cta::after { right: -14px; transform: rotate(30deg); box-shadow: 0 10px 0 var(--navy); }

/* ===== 我的隊伍（05） ===== */
.myteam { display: grid; grid-template-columns: 124px 1fr; gap: 10px; align-items: center; margin-top: 4px; }
.myteam .emb { text-align: center; }
.myteam .emb img { width: 124px; height: 124px; filter: drop-shadow(0 5px 0 rgba(14, 35, 64, 0.25)); }
.myteam .emb b { display: block; font-weight: 700; font-size: 24px; margin-top: 2px; white-space: nowrap; }
.myteam .me { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.myteam .me img { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--sea); box-shadow: inset 0 0 0 3px #fff; object-fit: cover; background: #fff; }
.myteam .me .nm { font-weight: 700; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.myteam .me .role { font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.myteam.none .emb img { opacity: 0.35; filter: grayscale(1); }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-card { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 6px; align-items: center; padding: 10px 6px 10px 8px; border: 3px solid var(--tc); border-radius: 16px; background: var(--tbg); text-decoration: none; min-width: 0; }
.team-card img { width: 52px; height: 52px; }
.team-card .n { font-weight: 700; font-size: 20px; line-height: 1.1; color: #2a1a0e; white-space: nowrap; }
.team-card .s { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-top: 2px; line-height: 1.3; }
.team-card .mine { position: absolute; right: -4px; top: -12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: var(--orange); color: #fff; border-radius: 999px; font-weight: 700; font-size: 12px; border: 2px solid #fff; }
.team-card .mine img { width: 14px; height: 14px; }
.mates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mate { text-align: center; padding: 10px 6px; border: 3px dashed #b9a98c; border-radius: 14px; background: #fff9ea; }
.mate img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; border: 3px solid var(--sea); object-fit: cover; background: #fff; }
.mate.empty img { border: 0; opacity: 0.35; filter: grayscale(1); }
.mate b { display: block; margin-top: 6px; font-weight: 700; font-size: 14px; color: #4a2a10; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mate.empty b { color: var(--muted); font-weight: 700; }
.scroll-mini { position: relative; display: block; width: fit-content; margin: 18px auto 10px; padding: 6px 28px; background: var(--cream-3); border: 2px solid #a98457; border-radius: 6px; font-weight: 700; font-size: 18px; color: #4a2a10; }
.team-flip { perspective: 800px; display: inline-block; width: 130px; height: 130px; margin: 6px auto; }
.team-flip .card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flip 900ms var(--ease) 400ms both; }
.team-flip .face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; }
.team-flip .face.q { background: var(--navy); border-radius: 50%; color: var(--moon); font: 700 64px/1 var(--font); }
.team-flip .face.a { transform: rotateY(180deg); }
.team-flip .face.a img { width: 130px; height: 130px; }
@keyframes flip { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.team-name { animation: rise 500ms var(--ease) 1100ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== 底部導覽：奶油色分頁列 ===== */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 10; width: min(100%, 430px);
  display: flex; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: var(--cream); border: 2px solid #a98457; border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 0 rgba(14, 35, 64, 0.12);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; padding: 6px 2px; font-size: 14px; font-weight: 700; text-decoration: none; color: #4a2a10; position: relative; }
.bottom-nav a + a::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; border-left: 2px dashed #d9c9a6; }
.bottom-nav a .ic { width: 32px; height: 32px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.bottom-nav a.active { color: var(--orange); }
.bottom-nav a.active::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 4px; border-radius: 2px; background: var(--orange); }
.bottom-nav a:active .ic { transform: scale(0.9); }
.bottom-nav.five a { font-size: 12.5px; }

/* ===== 其他：數字卡、名單、倒數、地圖、資訊、評分、後台、大螢幕 ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; background: #fff9ea; border: 2px solid #d9c9a6; border-radius: 14px; padding: 10px 4px; }
.stat b { display: block; font-weight: 700; font-size: 32px; line-height: 1.1; }
.stat span { font-size: 14px; font-weight: 700; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 2px dashed #d9c9a6; }
.list li:last-child { border-bottom: 0; }
.list .who { flex: 1; min-width: 0; }
.list .who b { display: block; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .who small { color: var(--muted); font-size: 14px; }
.avatar { border-radius: 50%; border: 3px solid var(--sea); box-shadow: inset 0 0 0 2px #fff; background: #fff; object-fit: cover; flex: none; }
.lights { display: flex; gap: 4px; }
.light { width: 26px; height: 26px; opacity: 0.25; }
.light.on { opacity: 1; filter: invert(0.4) sepia(1) saturate(3) hue-rotate(95deg); }
.light-legend { display: flex; gap: 14px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.light-legend span { display: flex; align-items: center; gap: 4px; }
.link-box { background: #fff9ea; border: 2px solid var(--field); border-radius: 12px; padding: 10px 12px; font-size: 15px; word-break: break-all; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px auto 4px; max-width: 320px; }
.countdown div { text-align: center; background: var(--navy); color: var(--yellow); border-radius: 12px; padding: 8px 2px; }
.countdown b { display: block; font-weight: 700; font-size: 30px; line-height: 1; }
.countdown span { font-size: 13px; font-weight: 700; }
.map { position: relative; border: 2px solid #a98457; border-radius: 16px; overflow: hidden; background: #e9f3f7; aspect-ratio: 1; }
.map img.base { width: 100%; height: 100%; object-fit: cover; }
.map .pin { position: absolute; transform: translate(-50%, -100%); width: 56px; text-align: center; }
.map .pin img { width: 56px; height: 68px; }
.map .pin .pin-icon { position: absolute; left: 50%; top: 6px; width: 30px; height: 30px; transform: translateX(-50%); }
.map .pin.done { filter: saturate(0.3) opacity(0.75); }
.map .pin .lbl { display: block; font-size: 14px; font-weight: 700; background: var(--cream); border: 2px solid var(--navy); border-radius: 8px; padding: 2px 4px; white-space: nowrap; margin-top: -6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; font-size: 18px; font-weight: 500; border-bottom: 2px dashed #d9c9a6; }
.timeline li:last-child { border-bottom: 0; }
.timeline li b { font-weight: 700; color: var(--orange); }
.stars { display: flex; justify-content: space-between; gap: 6px; }
.stars label { flex: 1; }
.stars input { position: absolute; opacity: 0; }
.stars span { display: grid; place-items: center; height: 64px; border: 2px solid var(--field); border-radius: 12px; background: #fff9ea; font-size: 30px; cursor: pointer; transition: background 150ms var(--ease), transform 120ms var(--ease); }
.stars label:active span { transform: scale(0.95); }
.stars input:checked + span { background: var(--yellow); border-color: var(--navy); }
.stars input:focus-visible + span { outline: 3px solid var(--navy); }
.notice { background: #fff7e4; border: 3px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 16px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: var(--navy); color: var(--yellow); padding: 12px 20px; border-radius: 999px; font-weight: 700; opacity: 0; transition: opacity 200ms var(--ease), transform 200ms var(--ease); pointer-events: none; z-index: 20; border: 2px solid var(--gold); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 15px; }
.lead { font-size: 20px; font-weight: 700; }

body.admin { background: #f3f4f6; font-size: 15px; color: #111; }
body.admin .sky, body.admin .waves, body.admin .scene { display: none; }
body.admin .page { width: min(100%, 1200px); padding-bottom: 40px; }
.panel { background: #fff; border: 2px solid #ccc; border-radius: 12px; padding: 16px; margin: 12px 0; }
.admin-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-top nav a { margin-right: 14px; font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.toolbar input, .toolbar select { min-height: 40px; padding: 6px 10px; font-size: 15px; border: 2px solid #999; border-radius: 8px; }
.toolbar button, .toolbar a.btn-sm { min-height: 40px; padding: 6px 14px; font-weight: 700; border-radius: 8px; border: 2px solid var(--navy); background: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.grid th, table.grid td { border: 1px solid #ddd; padding: 6px 8px; text-align: left; vertical-align: middle; }
table.grid th { background: #e9ecef; position: sticky; top: 0; }
.atag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e9ecef; }
.atag.partner { background: var(--navy); color: #fff; }
.atag.guest { background: var(--moon); }
.atag.on { background: var(--ok); color: #fff; }
.qr { width: 180px; height: 180px; }
.qr-card { display: inline-block; vertical-align: top; width: 240px; margin: 8px; padding: 12px; background: #fff; border: 2px solid #ccc; border-radius: 10px; text-align: center; }
.qr-card code { display: block; font-size: 11px; word-break: break-all; margin-top: 6px; }
body.admin .field input { background: #fff; }

body.board { background: var(--navy); color: #fff; }
body.board .sky, body.board .waves, body.board .harbor { display: none; }
body.board .page { width: min(100%, 1600px); padding: 24px; }
.board-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.board-team { background: var(--cream); color: var(--ink); border: 6px solid var(--navy); border-radius: 24px; padding: 20px; text-align: center; }
.board-team .pts { font-weight: 700; font-size: 72px; line-height: 1; }
.board-team h3 { font-size: 32px; }
.board-top { background: rgba(255, 255, 255, 0.08); border-radius: 24px; padding: 20px; margin-top: 20px; }
.board-top ol { font-size: 26px; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 6px 40px; }
.board-top li { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: rgba(255, 255, 255, 0.06); border-radius: 12px; }
.board-top li .rank { font-weight: 700; font-size: 28px; color: var(--moon); min-width: 44px; }
.board-top li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-top li .pt { font-weight: 700; }

/* ===== 桌機提示層：只給手持裝置用 =====
   第一道：精細指標＋可 hover 視為桌機（手機平板是粗指標）。第二道：app.js 依觸控點與 UA 加 gate-on / gate-off。 */
/* 電腦版「請用手機或平板開啟」：插畫寬度滿版、貼齊上緣；視窗比圖高時下方用深海色補滿 */
.gate { display: none; position: fixed; inset: 0; z-index: 100; background: url("/assets/page-top.webp") center top / 100% auto no-repeat, #04344f; padding: 24px; place-items: center; }
@media (pointer: fine) and (hover: hover) { .gate { display: grid; } }
body.gate-on .gate { display: grid; }
body.gate-off .gate { display: none; }
.gate-card { width: min(100%, 420px); text-align: center; padding: 28px 24px 24px; background: var(--cream); border: 4px solid var(--navy); border-radius: 24px; box-shadow: 0 8px 0 rgba(14, 35, 64, 0.35); }
.gate-card h2 { font-size: 26px; color: #4a2a10; margin-top: 4px; }
.gate-card p { margin-top: 8px; font-size: 17px; color: var(--ink-2); }
.gate-ghost { margin: 0 auto; }
.gate-qr { width: 216px; margin: 16px auto 0; padding: 8px; background: #fff; border: 3px solid var(--navy); border-radius: 16px; }
.gate-qr img { width: 200px; height: 200px; }
.gate-url { font-size: 13px; color: var(--muted); word-break: break-all; }

/* ===== 八隊即時排名 ===== */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 34px 48px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px 8px 6px; border: 2px solid var(--tc); border-radius: 14px; background: var(--tbg); transition: transform 300ms var(--ease); }
.rank-row.mine { box-shadow: 0 0 0 3px var(--tc); }
.rank-row .rk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; }
.rank-row:nth-child(1) .rk { background: var(--orange); }
.rank-row img { width: 48px; height: 48px; }
.rank-row .nm { display: flex; flex-direction: column; min-width: 0; }
.rank-row .n { font-weight: 700; font-size: 19px; line-height: 1.1; }
.rank-row .s { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .pt { font-weight: 700; font-size: 22px; white-space: nowrap; }
.rank-row .pt small { font-size: 12px; margin-left: 2px; color: var(--ink-2); }
.rank-row.bump { animation: bump 500ms var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* ===== 通行證：關卡副標、獎品、隊長、名牌模式入口、公益加碼章 ===== */
.stamp { text-decoration: none; color: inherit; }
.stamp .sub { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.stamp { display: grid; grid-template-rows: auto 1fr auto auto; }
.stamp .name { font-size: 13px; line-height: 1.25; white-space: normal; min-height: 2.5em; margin-top: 8px; }
.stamp .reward { display: block; font-size: 11px; color: var(--orange); font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captain-line { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.badge-cta { display: grid; grid-template-columns: 32px 1fr 22px; align-items: center; column-gap: 10px; margin-top: 14px; padding: 10px 14px; border: 2px solid #a98457; border-radius: 14px; background: #fff9ea; text-decoration: none; font-weight: 700; font-size: 17px; color: #4a2a10; }
.badge-cta .muted { grid-column: 2; font-size: 12.5px; font-weight: 400; }
.badge-cta .mi { grid-row: span 2; }
.badge-cta .chev { grid-row: span 2; width: 22px; }
.bonus-row { margin-top: 10px; }
.bonus { display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; gap: 10px; padding: 8px 10px; border: 2px dashed #a98457; border-radius: 14px; background: #fff9ea; text-decoration: none; color: inherit; }
.bonus > img:first-child { width: 44px; height: 44px; opacity: 0.6; }
.bonus.done { border-style: solid; }
.bonus.done > img:first-child { opacity: 1; }
.bonus b { display: block; font-size: 15px; }
.bonus small { font-size: 12px; color: var(--muted); }
.bonus .badge { width: 28px; height: 28px; }

/* 任務說明：攤位卡 */
.booths { display: grid; gap: 10px; }
.booth { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: start; padding: 12px; border: 2px solid var(--cream-3); border-radius: 14px; background: #fff9ea; }
.booth img { width: 56px; height: 56px; }
.booth .bsub { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.booth b { display: block; font-size: 19px; margin: 2px 0 4px; }
.booth p { font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.booth .breward { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--cream-3); font-size: 13px; font-weight: 700; color: #4a2a10; }
.booth.done { border-color: var(--ok); }
.booth.done .breward { background: var(--ok); color: #fff; }
.booth.bonus-booth { border-style: dashed; }

/* 名牌模式：全螢幕大字 */
body.badge-mode .scene, body.badge-mode .waves { display: none; }
body.badge-mode .sky { background: var(--team, var(--navy)); background-image: none; }
body.badge-mode .page { padding-top: 24px; }
.badge-card { position: relative; text-align: center; padding: 22px 18px 18px; background: var(--cream); border: 6px solid var(--team); border-radius: 28px; box-shadow: 0 10px 0 rgba(14, 35, 64, 0.3); }
.badge-card::before { content: ""; position: absolute; left: 50%; top: -34px; width: 64px; height: 24px; transform: translateX(-50%); background: var(--navy); border-radius: 8px; }
.badge-top .brand { margin: 0 auto; }
.badge-emblem { width: 120px; height: 120px; margin: 12px auto 6px; }
.badge-name { font-weight: 900; font-size: clamp(40px, 13vw, 56px); line-height: 1.1; color: var(--ink); word-break: keep-all; }
.badge-role { display: inline-block; margin-top: 10px; padding: 6px 18px; border-radius: 999px; background: var(--team); color: #fff; font-weight: 700; font-size: 20px; }
.badge-team { margin-top: 10px; font-weight: 700; font-size: 20px; color: var(--team); }
.badge-org { margin-top: 4px; font-size: 17px; color: var(--ink-2); }
.badge-foot { margin-top: 16px; padding-top: 12px; border-top: 2px dashed #d9c9a6; font-size: 14px; color: var(--muted); }

/* ===== 報名費：通行證橫幅與繳費頁 ===== */
.pay-banner { display: grid; grid-template-columns: 30px 1fr 22px; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 14px; border: 2px solid; text-decoration: none; color: inherit; }
.pay-banner b { display: block; font-size: 16px; }
.pay-banner small { display: block; font-size: 12.5px; color: var(--ink-2); }
.pay-banner .mi { width: 28px; height: 28px; }
.pay-banner .chev { width: 20px; }
.pay-banner.todo { background: #fff2d6; border-color: var(--orange); }
.pay-banner.todo .mi { color: var(--orange); }
.pay-banner.wait { background: #eef4f8; border-color: var(--sea); }
.pay-banner.wait .mi { color: var(--sea); }
.pay-banner.done { background: #e4f2e8; border-color: var(--ok); grid-template-columns: 30px 1fr; }
.pay-banner.done .mi { color: var(--ok); }
.bank { margin: 14px 0 4px; padding: 14px; border: 2px dashed #a98457; border-radius: 14px; background: #fff9ea; font-size: 17px; font-weight: 500; line-height: 1.7; }
.copy-btn { display: block; width: 100%; margin-top: 10px; min-height: 48px; border: 2px solid var(--navy); border-radius: 12px; background: var(--cream); font: 700 17px var(--font); color: var(--navy); cursor: pointer; }
.pay-section { margin: 18px 0 6px; padding: 4px 0 6px; border-top: 2px dashed #d9c9a6; }
.intro { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin-top: 10px; }

/* ===== 彈窗：活動須知、個資說明 ===== */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: min(92vw, 420px); width: 100%; }
dialog.sheet::backdrop { background: rgba(14, 35, 64, 0.55); }
.sheet-body { background: var(--cream); border: 4px solid var(--navy); border-radius: 22px; padding: 22px 18px 16px; box-shadow: 0 8px 0 rgba(14, 35, 64, 0.35); max-height: 80vh; overflow: auto; }
.sheet-body h3 { font-size: 22px; text-align: center; color: #4a2a10; margin-bottom: 8px; }
.sheet-body .btn { margin-top: 12px; }

/* ===== 報名進度清單 ===== */
.srows { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; }
.srow { position: relative; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 12px 10px; border: 2px solid var(--cream-3); border-radius: 14px; background: #fff9ea; }
.srow .mark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #a98457; display: grid; place-items: center; background: #fff; font-weight: 700; font-size: 15px; color: #4a2a10; }
.srow .txt { min-width: 0; }
.srow .txt b { display: block; font-size: 16px; white-space: nowrap; }
.srow .txt small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.stag { padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.stag.done { background: var(--ok); color: #fff; }
.stag.wait { background: var(--sea); color: #fff; }
.stag.todo { background: var(--cream-3); color: #5a3410; }
.srow.done { border-color: #cfe5d6; }
.srow.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.srow.wait { border-color: #bcd5e6; }
.srow.todo { border-color: var(--orange); }
.srow-link { position: absolute; inset: 0; border-radius: 14px; }

/* ===== 活動入口頁 ===== */
.entry { margin-top: 30px; position: relative; z-index: 2; padding: 0 6px; }
.entry .countdown { margin: 0 auto; max-width: none; }
.ticket { position: relative; padding: 14px 14px 12px; background: var(--cream); border: 3px solid var(--navy); border-radius: 20px; box-shadow: 0 6px 0 var(--navy), 0 18px 24px -10px rgba(6, 21, 43, 0.45); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--sea-top); border: 3px solid var(--navy); transform: translateY(-50%); }
.ticket::before { left: -12px; } .ticket::after { right: -12px; }
.ticket-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 2px dashed #d9c9a6; font-weight: 700; font-size: 16px; color: #4a2a10; white-space: nowrap; }
.ticket-line .mi { width: 22px; height: 22px; color: var(--orange); }
.ticket-line .dot { color: #b89a63; }
.collapsed { display: none; }
.btn .arrow.down { transform: rotate(90deg); filter: none; transition: transform 200ms var(--ease); }
.btn.open .arrow.down { transform: rotate(-90deg); }
.dev-join { text-align: left; }
.info-rows .r .v b { display: block; font-weight: 700; }
.info-rows .r .v small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.intro.center { text-align: center; margin: 4px 0 2px; }
.rope .countdown { margin: 0 0 14px; }
.tips li strong { color: #4a2a10; font-weight: 700; }
.info-rows .r .v .line { display: block; font-weight: 500; }
.info-rows a.r { text-decoration: none; color: inherit; }
.info-rows a.r:active { background: var(--cream-2); }
.intro.center p { margin: 0; }
.info-rows .map-link { color: inherit; text-decoration: none; }
.info-rows .r .v.map-link { display: block; }
.info-rows .r .v.map-link b { display: inline-flex; align-items: center; gap: 4px; }
.info-rows .r .v.map-link b .ext { display: inline-block; }
.info-rows .map-link .ext { width: 16px; height: 16px; flex: none; opacity: 0.7; }
.intro .rule { margin: 6px 0 14px; font-size: 26px; font-weight: 900; color: var(--orange); letter-spacing: 0.08em; }

/* ===== 單選膠囊與下拉 ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 2px solid var(--field); border-radius: 999px; background: #fffaf0; font-size: 17px; font-weight: 500; cursor: pointer; transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.field select {
  width: 100%; min-height: 58px; padding: 12px 40px 12px 16px; font: 400 18px/1.3 var(--font); color: var(--ink);
  background: #fffaf0 url("/assets/icon-chev-down.svg") right 14px center / 20px no-repeat; border: 2px solid var(--field); border-radius: 12px;
  appearance: none; -webkit-appearance: none;
}
.field select:focus { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.field input[type="date"] { appearance: none; -webkit-appearance: none; min-height: 58px; }
[data-partner-error]:empty { display: none; }

/* 姓名＋性別同一列 */
.name-row { display: flex; gap: 8px; align-items: stretch; }
.name-row input { flex: 1; min-width: 0; }
.gender-seg { display: flex; flex: none; gap: 4px; padding: 4px; border: 2px solid var(--field); border-radius: 14px; background: #efe0bd; }
.gender-seg label { position: relative; display: flex; }
.gender-seg input { position: absolute; opacity: 0; inset: 0; }
.gender-seg span {
  display: grid; place-items: center; min-width: 50px; padding: 0 12px; border-radius: 10px;
  font-size: 18px; font-weight: 500; color: #9a8a76; cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease), transform 120ms var(--ease);
}
.gender-seg label:active span { transform: scale(0.96); }
.gender-seg input:checked + span {
  background: #fff; color: var(--orange); font-weight: 900;
  box-shadow: 0 2px 0 #b89a63, 0 0 0 1.5px #b89a63 inset;
}
.gender-seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }

/* ===== 暖身任務列 ===== */
.warmups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.warmup { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--cream-3); border-radius: 14px; background: #fff9ea; text-decoration: none; color: inherit; transition: transform 120ms var(--ease), border-color 150ms var(--ease); }
a.warmup { border-color: #e2c48d; }
a.warmup:active { transform: scale(0.98); }
.warmup .w-ic { width: 48px; height: 48px; object-fit: contain; opacity: 0.55; }
.warmup.done .w-ic { opacity: 1; }
.warmup .w-txt { min-width: 0; }
.warmup .w-txt b { display: block; font-size: 17px; font-weight: 700; color: #4a2a10; }
.warmup .w-txt small { display: block; font-size: 13px; font-weight: 700; color: var(--orange); }
.warmup.done .w-txt small { color: var(--ok); }
.warmup .w-go { display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px 6px 12px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.warmup .w-go img { width: 14px; height: 14px; filter: invert(1); }
.warmup .w-done img { width: 30px; height: 30px; }
.warmup .w-soon { font-size: 13px; color: var(--muted); white-space: nowrap; }
.warmup.done { background: #f3f8f2; border-color: #cfe5d6; }

/* 暖身任務狀態 */
.warmup .w-txt small.wait { color: var(--sea); }
.warmup.wait { border-color: #bcd5e6; background: #f2f7fb; }
.warmup .w-go.ghost { background: #fff; color: var(--sea); border: 2px solid #bcd5e6; }
.warmup .w-go.ghost img { filter: none; }
.warmup.bonus-quiz { border-style: dashed; border-color: var(--orange); background: #fff4e6; }
.warmup.bonus-quiz.done { border-style: solid; border-color: #cfe5d6; background: #f3f8f2; }
.warmup.bonus-quiz .w-ic { opacity: 1; }
.tag.ok { background: var(--ok); color: #fff; }
.tag.warn { background: #fde3c8; color: #a8430a; }

/* 測驗 */
.quiz fieldset { border: 0; margin: 0 0 16px; padding: 0; }
.quiz legend { display: block; width: 100%; margin-bottom: 10px; font-weight: 700; font-size: 20px; color: #4a2a10; text-align: center; }
.quiz .qn { display: block; font-size: 13px; color: var(--orange); margin-bottom: 4px; letter-spacing: 0.1em; }
.qopt { display: block; position: relative; margin: 8px 0; }
.qopt input { position: absolute; opacity: 0; inset: 0; }
.qopt span { display: block; padding: 14px 16px; border: 2px solid var(--field); border-radius: 14px; background: #fffaf0; font-size: 17px; font-weight: 500; cursor: pointer; transition: background 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease); }
.qopt:active span { transform: scale(0.98); }
.qopt input:checked + span { border-color: var(--orange); background: #fff2e4; color: #a8430a; font-weight: 700; }
.qopt input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.quiz.stepped .qstep { display: none; }
.quiz.stepped .qstep.on { display: block; animation: rise 300ms var(--ease) both; }
.quiz-kicker { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.quiz-result { font-size: 32px; font-weight: 900; color: var(--orange); margin: 2px 0 8px; }

/* 排行榜 */
.me-rank { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--navy); color: #fff; margin-bottom: 14px; }
.me-rank img { border-color: var(--yellow); }
.me-rank .mr-txt b { display: block; font-size: 17px; }
.me-rank .mr-txt small { font-size: 13px; opacity: 0.8; }
.me-rank .mr-num { text-align: right; }
.me-rank .mr-num b { display: block; font-size: 34px; font-weight: 900; line-height: 1; color: var(--yellow); }
.me-rank .mr-num small { font-size: 13px; opacity: 0.85; }
.leader { list-style: none; margin: 0; padding: 0; }
.leader li { display: grid; grid-template-columns: 34px 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 2px dashed #e6d4ad; }
.leader li:last-child { border-bottom: 0; }
.leader li.me { background: #fff2e4; border-radius: 12px; border-bottom-color: transparent; }
.leader li.empty { display: block; text-align: center; color: var(--muted); padding: 20px 0; }
.leader .lr-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cream-3); font-weight: 900; font-size: 15px; color: #4a2a10; }
.leader .lr-rank.top1 { background: #e3b341; color: #fff; }
.leader .lr-rank.top2 { background: #a9b4be; color: #fff; }
.leader .lr-rank.top3 { background: #c47f45; color: #fff; }
.leader img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cream-3); object-fit: cover; background: #fff; }
.leader .lr-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader .lr-pts { font-weight: 900; font-size: 18px; color: var(--orange); }
.bottom-nav.five a, .bottom-nav a { font-size: 13px; }
.warmup .w-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warmup { grid-template-columns: 38px 1fr auto; gap: 8px; padding: 10px 10px; }
.warmup .w-ic { width: 38px; height: 38px; }
.warmup .w-txt b { font-size: 16px; }
.warmup .w-go { padding: 6px 8px 6px 10px; font-size: 13px; }

/* 報名狀態提醒 */
.callout { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; margin: 4px 0 10px; padding: 12px 14px; border-radius: 14px; border: 2px solid; }
.callout .mi { width: 30px; height: 30px; }
.callout b { display: block; font-size: 17px; font-weight: 900; }
.callout small { display: block; font-size: 14px; line-height: 1.45; margin-top: 2px; }
.callout.todo { background: #fff0e0; border-color: var(--orange); color: #8a3a08; }
.callout.todo .mi { color: var(--orange); }
.callout.wait { background: #eaf3fa; border-color: #7fb0d4; color: #1f4f73; }
.callout.wait .mi { color: var(--sea); }
.callout.ok { background: #e6f4ea; border-color: #7cc196; color: #1f5c35; }
.callout.ok .mi { color: var(--ok); }
.warmup .w-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 頁首統一：右上活動名、大標、固定高度 ===== */
.masthead { padding-top: 4px; }
.masthead .brand { display: none; }
.topline { display: flex; justify-content: space-between; align-items: center; height: 46px; }
.topline .back-btn { position: static; }
.event-tag {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin-left: auto;
  background: rgba(255, 246, 224, 0.92); border: 2px solid var(--navy); border-radius: 999px;
  font-weight: 900; font-size: 14px; color: #4a2a10; letter-spacing: 0.04em; box-shadow: 0 3px 0 rgba(14, 35, 64, 0.25);
}
.page-title { margin: 2px auto 0; height: 92px; display: flex; align-items: center; }
.page-title svg { width: 100%; max-height: 92px; }
.sub-slot { height: 44px; display: flex; align-items: center; justify-content: center; }
.sub-slot .scroll-sub { margin: 0; }

/* 我揪的朋友：每位朋友一列，狀態用文字標籤 */
.guest-list { list-style: none; margin: 14px 0 0; padding: 0; }
.guest-list li { display: grid; grid-template-columns: 48px 1fr; gap: 8px 12px; align-items: center; padding: 14px 0; border-top: 2px dashed #d9c9a6; }
.guest-list .who { min-width: 0; }
.guest-list .who b { display: block; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-list .who small { color: var(--muted); font-size: 14px; }
.guest-list .tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.status-tag { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 700; background: #efe6d2; color: #7a6a52; }
.status-tag .mi { width: 14px; height: 14px; }
.status-tag.ok { background: #e6f4ea; color: #1f5c35; }
.status-tag.wait { background: #eaf3fa; color: #1f4f73; }

/* ===== v3 識別素材：標準字、頁首標籤、頁面小鬼、暖身圖示、獎牌、積分、報名完成章 ===== */
.page-title.brand-title { height: auto; display: block; padding: 6px 0 2px; }
.page-title.brand-title img { width: min(100%, 352px); height: auto; margin: 0 auto; }
.event-tag { height: 38px; padding: 0 10px; }
.event-tag img { display: block; height: 28px; width: auto; }
.warmup { grid-template-columns: 44px 1fr auto; }
.warmup .w-ic { width: 44px; height: 44px; opacity: 1; filter: drop-shadow(0 2px 0 rgba(14, 35, 64, 0.12)); }
.warmup.done .w-ic { filter: drop-shadow(0 2px 0 rgba(14, 35, 64, 0.2)); }
.leader .lr-medal { display: block; width: 34px; height: 34px; margin: 0 auto; filter: drop-shadow(0 2px 0 rgba(14, 35, 64, 0.2)); }
.leader .lr-pts { display: inline-flex; align-items: center; gap: 4px; }
.leader .lr-pts img { width: 22px; height: 22px; }
.pill-info.points { justify-content: center; }
.pill-info.points img { width: 28px; height: 28px; flex: none; }
.pill-info.points b { font-size: 20px; color: var(--orange); }
.seal { width: 112px; height: 112px; right: -10px; top: -44px; transform: rotate(10deg); filter: drop-shadow(0 5px 0 rgba(14, 35, 64, 0.28)); }

/* ---------- 活動入口：整張主視覺海報 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.home-poster { --pw: min(100vw, 520px); background: #054a6b; }
body.home-poster .scene { display: none; }
/* 首頁：底色取主視覺最上緣與最下緣的顏色；模糊海報只在比海報寬的螢幕（平板）才鋪 */
body.home-poster .sky { background: linear-gradient(180deg, #c9551c 0 50%, #054a6b 50% 100%); }
@media (max-width: 520px) { .poster-blur { display: none; } }
body.home-poster .page { width: 100%; padding: 0; }
/* 平板或很長的螢幕：海報外圍用同一張圖模糊鋪底，不留色塊 */
.poster-blur { position: fixed; inset: -40px; background: url(/assets/home-poster.webp?v2) center / cover no-repeat; filter: blur(28px) saturate(1.1); opacity: 0.85; }
.poster { position: relative; width: var(--pw); height: 100vh; height: 100svh; margin: 0 auto; overflow: hidden; }
/* 海報框：寬度滿版、比例固定；比螢幕長的部分裁掉，裁切量的 36% 從上面裁（天空）、其餘從下面裁（海面，底部選單蓋著） */
.poster-frame { position: absolute; left: 0; width: 100%; aspect-ratio: 1200 / 3000;
  top: min(0px, calc((100vh - var(--pw) * 2.5) * 0.36)); top: min(0px, calc((100svh - var(--pw) * 2.5) * 0.36)); }
.poster-art { display: block; width: 100%; height: 100%; }
.poster-cta {
  position: absolute; left: 50%; top: 52.3%; transform: translateX(-50%);
  width: 58.4%; aspect-ratio: 498 / 118; display: flex; align-items: center; justify-content: center; gap: 0.35em;
  border-radius: 999px; border: calc(var(--pw) * 0.008) solid #2a1408;
  background: linear-gradient(180deg, #ff9443 0%, #f4661c 48%, #dd4c0f 100%);
  color: #fff; font-weight: 900; font-size: calc(var(--pw) * 0.054); letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
  text-shadow: 0 2px 0 rgba(110, 35, 0, 0.5);
  box-shadow: inset 0 calc(var(--pw) * 0.006) 0 rgba(255, 255, 255, 0.45), inset 0 calc(var(--pw) * -0.008) 0 rgba(140, 35, 0, 0.35), 0 calc(var(--pw) * 0.01) 0 #2a1408, 0 calc(var(--pw) * 0.024) calc(var(--pw) * 0.04) rgba(70, 20, 0, 0.35);
  overflow: hidden; transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.poster-cta::before { content: ""; position: absolute; left: 8%; right: 8%; top: 8%; height: 34%; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)); pointer-events: none; }
.poster-cta span { position: relative; }
.poster-cta svg { position: relative; width: 1.05em; height: 1.05em; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 rgba(110, 35, 0, 0.5)); }
.poster-cta:active { transform: translateX(-50%) translateY(calc(var(--pw) * 0.008)); box-shadow: inset 0 calc(var(--pw) * 0.006) 0 rgba(255, 255, 255, 0.45), 0 calc(var(--pw) * 0.002) 0 #2a1408; }
.poster-cta:focus-visible, .poster-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.poster-link {
  position: absolute; left: 50%; top: 58.6%; transform: translateX(-50%); padding: 8px 16px; white-space: nowrap;
  color: #0e2340; font-weight: 900; font-size: calc(var(--pw) * 0.04); letter-spacing: 0.02em;
  background: rgba(255, 246, 224, 0.92); border: 2px solid #0e2340; border-radius: 999px; box-shadow: 0 3px 0 rgba(14, 35, 64, 0.35);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em;
}

/* ===== 精簡頁首（2026-10-17）：頁首＋海景帶約佔畫面 3 成，內容從約 250px 開始 =====
   頁首 146（上排 40＋標題 60＋副標 36＋上邊距 10）＋海景帶 92；海平線跟著上移，背景圖縮 0.82 倍對齊。 */
/* 海景帶高度跟螢幕高度走：讓頁首＋海景帶約為畫面 30%，最矮 64、最高 92 */
:root { --hero-h: clamp(64px, calc(30vh - 164px), 92px); --horizon: calc(162px + var(--hero-h)); --bg-scale: 0.82; }
@supports (height: 1svh) { :root { --hero-h: clamp(64px, calc(30svh - 164px), 92px); } }
body:has(.brand-title) { --horizon: calc(197px + var(--hero-h)); }
body:not(:has(.hero)) { --horizon: 174px; }
body:has(.brand-title):not(:has(.hero)) { --horizon: 209px; }
.topline { height: 38px; }
.topline .back-btn { width: 38px; height: 38px; }
.topline .back-btn img { width: 20px; height: 20px; }
.event-tag { height: 32px; padding: 0 9px; }
.event-tag img { height: 24px; }
.page-title { margin: 0 auto; height: 78px; }
.page-title svg { max-height: 78px; }
.page-title.brand-title img { width: min(100%, 300px); }
/* 插畫字標題：高度固定（跟頁首標題列同高），寬度依字數，太長時等比縮進版面寬 */
.page-title.title-art { width: 100%; }
.page-title.title-art img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; }
.sub-slot { height: 34px; }
.sub-slot .scroll-sub { font-size: 16px; padding: 3px 18px; border-width: 2.5px; }
.sub-slot .scroll-sub::before, .sub-slot .scroll-sub::after { top: 3px; bottom: -5px; width: 10px; border-width: 2.5px; }
.sub-slot .scroll-sub::before { left: -10px; } .sub-slot .scroll-sub::after { right: -10px; }
.hero { height: var(--hero-h); }
.hero + .rope { margin-top: 12px; }
.hero .ghost { width: auto; height: calc(var(--hero-h) - 6px); aspect-ratio: 1 / 1; object-fit: contain; bottom: 2px; left: 18%; }
.hero .shadow { width: 52px; height: 10px; bottom: -8px; left: 18%; }
.hero .chest { width: 110px; }
.scene-top { width: calc(600px * var(--bg-scale)); height: calc(450px * var(--bg-scale)); margin-left: calc(-300px * var(--bg-scale)); top: calc(var(--horizon) - 348px * var(--bg-scale)); }
.scene { background-size: 100% var(--horizon), calc(600px * var(--bg-scale)) calc(430px * var(--bg-scale)), auto; }

/* ===== 內容框（2026-10-17 改版）：浮在海上的羊皮紙卡片 =====
   取代 v1 的粗繩框與繩結：深木色外框（呼應海盜船）、內圈細金線、四角銅釘、水面上的柔和投影。 */
.rope {
  margin: 14px 0; padding: 26px 20px 24px; border-radius: 18px;
  background: linear-gradient(180deg, #fff9ea 0%, #fbf0d6 60%, #f6e6c3 100%);
  border: 3px solid #6b3f1d;
  box-shadow: inset 0 0 0 3px #fff9ea, inset 0 0 0 4.5px rgba(201, 154, 46, 0.75), 0 6px 0 #3e2410, 0 18px 28px rgba(2, 18, 34, 0.45);
}
.rope::before {
  inset: 9px; border-radius: 12px; filter: none;
  background:
    radial-gradient(circle at 6px 6px, #f6d47a 0 2px, #b07a24 2.6px 4.6px, transparent 5.2px) left top / 12px 12px no-repeat,
    radial-gradient(circle at 6px 6px, #f6d47a 0 2px, #b07a24 2.6px 4.6px, transparent 5.2px) right top / 12px 12px no-repeat,
    radial-gradient(circle at 6px 6px, #f6d47a 0 2px, #b07a24 2.6px 4.6px, transparent 5.2px) left bottom / 12px 12px no-repeat,
    radial-gradient(circle at 6px 6px, #f6d47a 0 2px, #b07a24 2.6px 4.6px, transparent 5.2px) right bottom / 12px 12px no-repeat;
}
.rope::after { left: 6%; right: 6%; bottom: -20px; height: 24px; background: rgba(1, 14, 28, 0.45); filter: blur(12px); }
.rope.small { padding: 22px 18px 20px; }
@media (max-width: 400px) { .rope { padding-left: 18px; padding-right: 18px; } }

/* ===== 排行榜：前三名頒獎台（畫面順序 2、1、3）＋ 4–10 名列表 ===== */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; margin: 4px 0 14px; }
.pd { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pd-av { position: relative; margin-bottom: 6px; }
.pd-av > img:first-child { display: block; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid #a9b4be; box-shadow: 0 3px 0 rgba(14, 35, 64, 0.18); }
.pd-1 .pd-av > img:first-child { width: 76px; height: 76px; border-color: #e3b341; box-shadow: 0 0 0 4px rgba(227, 179, 65, 0.25), 0 3px 0 rgba(14, 35, 64, 0.18); }
.pd-3 .pd-av > img:first-child { border-color: #c47f45; }
.pd-medal { position: absolute; right: -10px; bottom: -6px; width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(14, 35, 64, 0.25)); }
.pd-1 .pd-medal { width: 34px; height: 34px; }
.pd-name { display: block; max-width: 100%; font-size: 15px; font-weight: 700; color: #4a2a10; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-1 .pd-name { font-size: 16px; }
.pd-pts { display: inline-flex; align-items: center; gap: 3px; margin: 2px 0 6px; font-size: 16px; font-weight: 900; color: var(--orange); }
.pd-pts img { width: 18px; height: 18px; }
.pd-step { width: 100%; display: grid; place-items: center; border: 2.5px solid #6b3f1d; border-bottom: 0; border-radius: 12px 12px 0 0; color: #fff; font-weight: 900; text-shadow: 0 2px 0 rgba(14, 35, 64, 0.35); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35); }
.pd-1 .pd-step { height: 74px; font-size: 32px; background: linear-gradient(#f2cd62, #d9a432); }
.pd-2 .pd-step { height: 54px; font-size: 26px; background: linear-gradient(#c8d1d9, #9aa6b1); }
.pd-3 .pd-step { height: 42px; font-size: 24px; background: linear-gradient(#dc9a62, #b8733c); }
.pd.me .pd-name { color: var(--orange); }
.pd.empty .pd-av > img:first-child { opacity: 0.45; filter: grayscale(1); }
.pd.empty .pd-medal { opacity: 0.45; }
.pd.empty .pd-name, .pd.empty .pd-pts { color: var(--muted); font-weight: 500; }
.podium + .leader { border-top: 3px solid #6b3f1d; padding-top: 6px; }
.leader-empty { text-align: center; color: var(--muted); padding: 20px 0; margin: 0; }

/* ===== 排行榜質感（2026-10-17）===== */
/* 我的名次：深海藍卡＋金邊，名次用金色大字 */
.me-rank { position: relative; overflow: hidden; padding: 14px 16px; border-radius: 18px; margin-bottom: 18px;
  background: radial-gradient(120px 90px at 92% 0%, rgba(227, 179, 65, 0.35), rgba(227, 179, 65, 0) 70%), linear-gradient(135deg, #1d4677 0%, #0e2340 75%);
  box-shadow: inset 0 0 0 2px rgba(227, 179, 65, 0.7), inset 0 0 0 4px rgba(14, 35, 64, 0.6), 0 5px 0 #071629; }
.me-rank::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: radial-gradient(1.5px 1.5px at 18% 30%, #fff, transparent), radial-gradient(1px 1px at 46% 72%, #fff, transparent), radial-gradient(1.5px 1.5px at 64% 22%, #ffe48a, transparent), radial-gradient(1px 1px at 80% 80%, #fff, transparent); }
.me-rank > img { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #e3b341; box-shadow: 0 0 0 3px rgba(227, 179, 65, 0.25); object-fit: cover; background: #fff; }
.me-rank .mr-txt b { font-size: 18px; letter-spacing: 0.04em; }
.me-rank .mr-num b { font-size: 40px; color: #ffd94a; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.me-rank .mr-num b i { font-style: normal; font-size: 16px; margin-left: 2px; color: #ffe9a6; text-shadow: none; }
.me-rank .mr-num small { display: inline-flex; align-items: center; gap: 4px; }
.me-rank .mr-num small img { width: 16px; height: 16px; }

/* 頒獎台：1 名背後有聚光、頭像金屬環、台座有立體面，站在木板上 */
.podium { position: relative; padding: 18px 4px 12px; margin: 0 -4px 16px; }
.podium::before { content: ""; position: absolute; left: 50%; top: -6px; width: 220px; height: 220px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 214, 90, 0.55), rgba(255, 214, 90, 0.18) 55%, rgba(255, 214, 90, 0) 100%); }
.podium::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; border-radius: 4px;
  background: linear-gradient(#8f5a2b, #5c3516); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 4px 6px rgba(62, 36, 16, 0.35); }
.pd { position: relative; z-index: 1; }
.pd-av { margin-bottom: 8px; }
.pd-av::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; z-index: 0; box-shadow: 0 4px 8px rgba(14, 35, 64, 0.25);
  background: conic-gradient(from 200deg, #eef2f5, #9aa6b1, #e3e8ec, #8a96a1, #eef2f5); }
.pd-1 .pd-av::before { inset: -5px; background: conic-gradient(from 200deg, #fff1b8, #d9a432, #ffe48a, #b98318, #fff1b8); box-shadow: 0 0 18px rgba(255, 200, 60, 0.7), 0 4px 8px rgba(14, 35, 64, 0.25); }
.pd-3 .pd-av::before { background: conic-gradient(from 200deg, #f6c79c, #b8733c, #eab384, #9c5c2a, #f6c79c); }
.pd-av > img:first-child, .pd-1 .pd-av > img:first-child, .pd-3 .pd-av > img:first-child { position: relative; z-index: 1; border: 3px solid #fff9ea; box-shadow: none; }
.pd-medal { z-index: 2; }
.pd-name { font-size: 15px; }
.pd-pts { padding: 2px 10px; border-radius: 999px; background: #fff1e0; box-shadow: inset 0 0 0 1.5px #f4d2b0; margin: 4px 0 8px; font-size: 15px; }
.pd-step { position: relative; overflow: hidden; border-width: 2.5px; border-radius: 10px 10px 0 0;
  font-size: 30px; -webkit-text-stroke: 1px rgba(70, 35, 0, 0.35); }
.pd-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: rgba(255, 255, 255, 0.35); }
.pd-step::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 10%, rgba(255, 255, 255, 0) 10% 86%, rgba(0, 0, 0, 0.14) 86%); }
.pd-step span { position: relative; z-index: 1; }
.pd-1 .pd-step { height: 78px; font-size: 36px; background: linear-gradient(#f6d778, #d9a432 70%, #c28d22); }
.pd-2 .pd-step { height: 56px; background: linear-gradient(#d7dee4, #a3aeb8 70%, #8d99a4); }
.pd-3 .pd-step { height: 44px; font-size: 26px; background: linear-gradient(#e6a874, #bb773f 70%, #a5652f); }
.pd.me .pd-pts { background: #ffe2c4; }
/* 1 名頭上的星光（減少動態時只顯示不閃） */
.pd-sparks { position: absolute; left: 50%; top: -14px; width: 120px; height: 40px; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.pd-sparks i { position: absolute; width: 14px; height: 14px; background: #ffd94a; -webkit-mask: url("/assets/icon-sparkle.svg") center / contain no-repeat; mask: url("/assets/icon-sparkle.svg") center / contain no-repeat; animation: twinkle 2.4s ease-in-out infinite; }
.pd-sparks i:nth-child(1) { left: 6px; top: 18px; }
.pd-sparks i:nth-child(2) { right: 8px; top: 8px; width: 18px; height: 18px; animation-delay: 0.8s; }
.pd-sparks i:nth-child(3) { right: 26px; top: 30px; width: 10px; height: 10px; animation-delay: 1.5s; }
@media (prefers-reduced-motion: reduce) { .pd-sparks i { animation: none; } }

/* 4–10 名：每列一張小卡 */
.podium + .leader { border-top: 0; padding-top: 0; }
.leader li { grid-template-columns: 32px 40px 1fr auto; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border: 1.5px solid #ecd9b0; border-radius: 14px; background: #fffaf0; box-shadow: 0 2px 0 rgba(107, 63, 29, 0.12); }
.leader li:last-child { border-bottom: 1.5px solid #ecd9b0; margin-bottom: 4px; }
.leader li.me { border-color: var(--orange); background: #fff2e4; border-bottom-color: var(--orange); }
.leader .lr-rank { width: 30px; height: 30px; background: var(--navy); color: #fff; font-size: 14px; box-shadow: inset 0 0 0 2px rgba(227, 179, 65, 0.55); }
.leader .lr-pts { padding: 2px 10px; border-radius: 999px; background: #fff1e0; font-size: 16px; }
.leader .lr-pts img { width: 18px; height: 18px; }
.lr-me { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--orange); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; line-height: 20px; vertical-align: 2px; }
.pd-me { position: absolute; left: -8px; top: -4px; z-index: 2; padding: 0 7px; border-radius: 999px; background: var(--orange); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; line-height: 20px; box-shadow: 0 0 0 2px #fff9ea; }

/* ===== 排行榜素材版（ranking-assets-v1，2026-10-17）=====
   頒獎台是一張畫（1080×420）：三塊台面中心在 x 19.6% / 49.8% / 79.8%，台面中心高度在 31.3% / 16% / 37.5%。
   每位得主（頭像框＋名字＋分數）以台面中心為底往上疊；頭像放在框的圓孔裡（孔徑約 64%）。 */
.podium { display: block; padding: 0; margin: 4px -6px 16px; }
.podium::before, .podium::after { content: none; }
.podium-stage { position: relative; aspect-ratio: 1080 / 420; margin-top: 182px; }
.podium-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; filter: drop-shadow(0 6px 6px rgba(62, 36, 16, 0.3)); }
.podium-spot { position: absolute; left: 49.8%; top: -205px; width: 240px; height: 240px; margin-left: -120px; z-index: 0; opacity: 0.9; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 70%); mask-image: radial-gradient(closest-side, #000 30%, transparent 70%);
  animation: spot-spin 40s linear infinite; }
@keyframes spot-spin { to { rotate: 360deg; } }
.podium-stage .pd { position: absolute; z-index: 2; width: 31%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.podium-stage .pd-1 { left: 49.8%; bottom: 84%; width: 34%; }
.podium-stage .pd-2 { left: 19.6%; bottom: 68.7%; }
.podium-stage .pd-3 { left: 79.8%; bottom: 62.5%; }
.podium-stage .pd-av { position: relative; width: 84px; height: 84px; margin: 0 0 2px; }
.podium-stage .pd-1 .pd-av { width: 104px; height: 104px; }
.podium-stage .pd-av::before { content: none; }
.podium-stage .pd .pd-av > img.pd-photo { position: absolute; left: 49.8%; top: 50.5%; width: 64%; height: 64%; transform: translate(-50%, -50%); z-index: 0;
  border: 0; border-radius: 50%; box-shadow: none; object-fit: cover; background: #fff; }
.pd-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; filter: drop-shadow(0 3px 2px rgba(14, 35, 64, 0.3)); }
.pd-crown { position: absolute; top: -30px; left: 50%; width: 56px; height: auto; transform: translateX(-50%) rotate(-6deg); z-index: 3; filter: drop-shadow(0 3px 2px rgba(14, 35, 64, 0.35)); }
.podium-stage .pd-sparks { top: -40px; }
.podium-stage .pd-me { left: 2px; top: 10px; }
.podium-stage .pd-name { margin-top: 0; font-size: 15px; }
.podium-stage .pd-1 .pd-name { font-size: 16px; }
.podium-stage .pd-pts { margin: 2px 0 0; }
.pd.empty .pd-frame { opacity: 0.5; filter: grayscale(0.6); }
@media (prefers-reduced-motion: reduce) { .podium-spot { animation: none; } }

/* 我的名次卡：夜空底圖（rank-card-bg），左右各壓一層深藍讓字清楚 */
.me-rank { min-height: 92px;
  background: linear-gradient(90deg, rgba(10, 26, 52, 0.7) 0%, rgba(10, 26, 52, 0.15) 45%, rgba(10, 26, 52, 0.15) 60%, rgba(10, 26, 52, 0.7) 100%), url("/assets/rank-card-bg.webp") center / cover no-repeat, #0e2340; }
.me-rank::after { content: none; }
/* 頒獎台縮小（2026-10-17）：台座寬 80%、置中；頭像框同步縮小 */
.podium-stage { width: 80%; margin: 172px auto 0; }
.podium-stage .pd { width: 36%; }
.podium-stage .pd-1 { width: 40%; }
.podium-stage .pd-av { width: 76px; height: 76px; }
.podium-stage .pd-1 .pd-av { width: 94px; height: 94px; }
.pd-crown { top: -27px; width: 50px; }
.podium-spot { top: -196px; width: 220px; height: 220px; margin-left: -110px; }
@media (max-width: 370px) {
  .podium-stage .pd-av { width: 68px; height: 68px; }
  .podium-stage .pd-1 .pd-av { width: 86px; height: 86px; }
  .pd-crown { top: -25px; width: 46px; }
}
/* 沒有 LINE 頭像的人顯示小鬼：放大到填滿框的圓孔，邊緣被框蓋住，不再縮在中間 */
.podium-stage .pd .pd-av > img.pd-photo.is-ghost { width: 80%; height: 80%; top: 52%; border-radius: 0; background: transparent; object-fit: contain; }
/* 標題區小鬼放大（2026-10-17）：比海景帶高 20px，往上探出一點，不把內容往下推 */
.hero .ghost { height: calc(var(--hero-h) + 20px); left: 15%; bottom: 0; }
.hero .shadow { width: 64px; left: 15%; }
.masthead { z-index: 1; }

/* ===================== 後台（2026-10-17 改版）=====================
   上欄：深海藍＋金線，左 Logo、右漢堡；功能選單從右側滑出。內容用白卡片、暖米色底。 */
body.admin { background: #f5f1e8; color: #1f2430; font-size: 15px; }
body.admin .page { width: 100%; max-width: none; padding: 0; }
body.admin code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #f3ecdc; padding: 1px 6px; border-radius: 6px; color: #4a3b1f; word-break: break-all; }
.adm-ic { display: inline-block; width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* 上欄 */
.adm-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: linear-gradient(90deg, #0e2340, #1b3b66); border-bottom: 2px solid #c99a2e; box-shadow: 0 4px 14px rgba(8, 18, 36, 0.25); }
.adm-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.adm-brand img { display: block; height: 34px; width: auto; }
.adm-brand span { padding: 2px 10px; border-radius: 999px; background: rgba(201, 154, 46, 0.18); color: #f3d27a; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; box-shadow: inset 0 0 0 1px rgba(243, 210, 122, 0.45); }
.adm-burger { display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; transition: background 150ms var(--ease); }
.adm-burger i { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: #fff; }
.adm-burger:hover { background: rgba(255, 255, 255, 0.12); }
.adm-burger:focus-visible, .adm-close:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }

/* 右側選單 */
.adm-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 16, 32, 0.45); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease); }
.adm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(86vw, 340px); display: flex; flex-direction: column;
  background: #fffaf0; box-shadow: -12px 0 32px rgba(8, 16, 32, 0.28); transform: translateX(100%); visibility: hidden;
  transition: transform 240ms var(--ease), visibility 0s linear 240ms; padding-bottom: env(safe-area-inset-bottom); }
body.adm-open { overflow: hidden; }
body.adm-open .adm-menu-scrim { opacity: 1; pointer-events: auto; }
body.adm-open #adm-drawer { transform: translateX(0); visibility: visible; transition: transform 240ms var(--ease); }
.adm-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px 0 20px; background: #0e2340; color: #fff; border-bottom: 2px solid #c99a2e; }
.adm-drawer-head b { font-size: 17px; letter-spacing: 0.06em; }
.adm-close { flex: none; width: 44px; height: 44px; padding: 0; margin: 0; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer; -webkit-appearance: none; appearance: none; }
.adm-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.adm-close:hover { background: rgba(255, 255, 255, 0.12); }
.adm-menu { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.adm-group-label { margin: 16px 10px 6px; font-size: 12.5px; font-weight: 700; color: #9a8b6a; letter-spacing: 0.08em; }
.adm-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 4px; border-radius: 14px; text-decoration: none; color: #1f2430; transition: background 150ms var(--ease); }
.adm-menu a .adm-ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #f1e6cc; color: #0e2340; -webkit-mask: none; mask: none; position: relative; }
.adm-menu a .adm-ic::after { content: ""; position: absolute; inset: 9px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.adm-item-txt { display: grid; gap: 1px; min-width: 0; }
.adm-item-txt b { font-size: 16px; }
.adm-item-txt small { font-size: 12.5px; color: #8a7d62; }
.adm-menu a:hover { background: #f6eedb; }
.adm-menu a.on { background: #0e2340; color: #fff; }
.adm-menu a.on .adm-ic { background: #c99a2e; color: #fff; }
.adm-menu a.on small { color: rgba(255, 255, 255, 0.7); }
.adm-drawer-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #ecdfc3; }
.adm-drawer-foot > * { flex: 1 1 50%; min-width: 0; }
.adm-drawer-foot form { display: flex; margin: 0; }
.adm-drawer-foot .adm-btn { width: 100%; }

/* 內容 */
.adm-main { max-width: 1240px; margin: 0 auto; padding: 22px 16px 56px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-head h1 { margin: 0; font-size: 24px; font-weight: 900; color: #0e2340; letter-spacing: 0.02em; }
.adm-head-actions { display: flex; gap: 8px; }
.adm-card { background: #fff; border: 1px solid #e8dfcc; border-radius: 16px; padding: 18px; box-shadow: 0 6px 18px rgba(62, 36, 16, 0.06); }
.adm-card h2 { margin: 0 0 12px; font-size: 18px; color: #0e2340; }
.adm-muted { color: #8a7d62; }
.adm-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #fff7e4; border: 1px solid #ecd9a8; color: #5a4a2a; font-size: 14px; }
.adm-flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #e6f4ea; border: 1px solid #9fd2b2; color: #1f5c35; font-weight: 700; }

/* 按鈕 */
.adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1.5px solid #d3c6a8; background: #fff; color: #0e2340;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color 150ms var(--ease), background 150ms var(--ease); }
.adm-btn:hover { border-color: #0e2340; }
.adm-btn:active { transform: scale(0.97); }
.adm-btn:focus-visible, .adm-link:focus-visible, .adm-pill.role:focus-visible { outline: 2px solid #c99a2e; outline-offset: 2px; }
.adm-btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.adm-btn.primary:hover { background: #dc5a10; border-color: #dc5a10; }
.adm-btn.ghost { background: transparent; }
.adm-btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.adm-btn.block { width: 100%; }
.adm-link { border: 0; background: none; padding: 0 2px; color: #8a7d62; font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }

/* 統計卡 */
.adm-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.adm-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1.5px solid #e8dfcc; text-decoration: none; color: inherit; transition: border-color 150ms var(--ease); }
.adm-stat b { font-size: 28px; font-weight: 900; line-height: 1.1; color: #0e2340; font-variant-numeric: tabular-nums; }
.adm-stat span { font-size: 13px; color: #8a7d62; font-weight: 700; }
.adm-stat:hover { border-color: #0e2340; }
.adm-stat.warn { background: #fff7ef; border-color: #f4c79e; }
.adm-stat.warn b { color: #d9531e; }
.adm-stat.ok b { color: #2e8b57; }
.adm-stat.on { border-color: #0e2340; box-shadow: inset 0 0 0 1px #0e2340; }
@media (max-width: 760px) { .adm-stats { grid-template-columns: repeat(3, 1fr); } .adm-stat b { font-size: 24px; } }

/* 篩選列 */
.adm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.adm-toolbar select, .adm-search input, .adm-inline select, .adm-field input { min-height: 42px; padding: 0 12px; border: 1.5px solid #d6cbb3; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; color: #1f2430; }
.adm-toolbar select:focus, .adm-search input:focus, .adm-inline select:focus, .adm-field input:focus { outline: none; border-color: #0e2340; box-shadow: 0 0 0 3px rgba(14, 35, 64, 0.12); }
.adm-search { position: relative; flex: 1 1 240px; display: flex; }
.adm-search .adm-ic { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #9a8b6a; }
.adm-search input { width: 100%; padding-left: 38px; }

/* 表格 */
.adm-table-wrap { padding: 0; overflow: auto; }
.adm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.adm-table th { position: sticky; top: 0; z-index: 1; background: #faf5ea; color: #6b5e45; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; padding: 11px 12px; border-bottom: 1px solid #e8dfcc; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid #f1eadb; vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: #fffaf0; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table .nowrap { white-space: nowrap; }
.adm-table form { margin: 0; }
.adm-name { display: block; font-size: 15px; white-space: nowrap; }
.adm-sub { display: block; font-size: 12px; color: #8a7d62; white-space: nowrap; }
.adm-empty { text-align: center; padding: 40px 12px !important; color: #8a7d62; }
.adm-count { margin: 10px 2px 0; font-size: 13px; }
.adm-inline { display: flex; align-items: center; gap: 6px; }
.adm-inline select { min-height: 32px; padding: 0 8px; font-size: 13px; border-radius: 8px; }
.adm-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.adm-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; border: 0; background: #efe8d8; color: #6b5e45; font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.adm-pill.ok { background: #e6f4ea; color: #1f6b3e; }
.adm-pill.warn { background: #fff1e0; color: #b4560f; font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.08em; }
.adm-pill.role { cursor: pointer; }
.adm-pill.role.partner { background: #0e2340; color: #fff; }
.adm-pill.role.guest { background: #ffe9a6; color: #6b4a00; }
.adm-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12); }

/* 關卡 QR */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.adm-qr { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.adm-qr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.adm-qr-img { width: 180px; margin: 4px auto; }
.adm-qr-img svg { display: block; width: 100%; height: auto; }
.adm-qr code { font-size: 11px; text-align: left; }
.adm-qr .adm-btn { align-self: center; }

/* 設定頁 */
.adm-cols { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 960px) { .adm-cols { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.adm-status { display: grid; gap: 4px; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.adm-status b { font-size: 16px; }
.adm-status.ok { background: #e6f4ea; border: 1px solid #9fd2b2; color: #1f5c35; }
.adm-status.warn { background: #fff1e0; border: 1px solid #f4c79e; color: #8a3a08; }
.adm-field { margin-bottom: 16px; text-align: left; }
.adm-field label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: #1f2430; }
.adm-field input { width: 100%; min-height: 46px; font-size: 16px; }
.adm-hint { margin-top: 4px; font-size: 13px; color: #8a7d62; }
.adm-error { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--danger); }
.adm-steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.85; }

/* 登入頁 */
body.admin-login { background: #0e2340; }
body.admin-login .page { min-height: 100dvh; background: linear-gradient(rgba(14, 35, 64, 0.35), rgba(14, 35, 64, 0.75)), url("/assets/page-top.webp") center top / cover no-repeat; }
.adm-login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.adm-login-card { width: min(100%, 380px); padding: 28px 24px 24px; border-radius: 20px; background: #fffaf0; text-align: center; box-shadow: 0 20px 50px rgba(4, 12, 28, 0.45); border: 1px solid #ecdfc3; }
.adm-login-logo { width: 240px; height: auto; margin: 0 auto 6px; }
.adm-login-card h1 { margin: 0; font-size: 22px; color: #0e2340; }
.adm-login-card .adm-muted { margin: 4px 0 18px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .adm-drawer, .adm-scrim, body.adm-open #adm-drawer, body.adm-detail-open .adm-detail { transition: none; }
}
/* 後台：LINE 通知頁 */
.adm-select { width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid #d6cbb3; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.adm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.adm-msgs { display: grid; gap: 10px; margin-bottom: 10px; }
.adm-msg { padding: 12px 14px; border-radius: 12px; background: #faf5ea; border: 1px solid #ecdfc3; }
.adm-msg small { display: block; font-size: 12px; color: #9a8b6a; font-weight: 700; }
.adm-msg b { display: block; font-size: 16px; color: #0e2340; margin: 2px 0 4px; }
.adm-msg p { margin: 0 0 8px; font-size: 14px; white-space: pre-line; color: #4a3b1f; }
.adm-status a { color: inherit; font-weight: 700; }

/* 後台：名單精簡＋右側報名資訊抽屜 */
.adm-list .adm-row { cursor: pointer; }
.adm-list .adm-row:focus-visible { outline: 2px solid #c99a2e; outline-offset: -2px; }
.adm-list .adm-row:hover td { background: #fff6e4; }
.adm-chev { width: 24px; color: #b9a983; font-size: 22px; text-align: center; }
@media (max-width: 640px) { .adm-table .hide-sm { display: none; } }
.adm-detail { width: min(94vw, 440px); }
body.adm-detail-open { overflow: hidden; }
body.adm-detail-open .adm-detail-scrim { opacity: 1; pointer-events: auto; }
body.adm-detail-open .adm-detail { transform: translateX(0); visibility: visible; transition: transform 240ms var(--ease); }
.adm-drawer-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-detail-body { flex: 1; overflow-y: auto; padding: 16px 16px 28px; }
.adm-person { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.adm-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid #e3b341; flex: none; }
.adm-person b { display: block; font-size: 20px; color: #0e2340; }
.adm-person small { display: block; font-size: 13px; color: #8a7d62; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.adm-pill.warn-soft { background: #fff1e0; color: #b4560f; }
.adm-sec { background: #fff; border: 1px solid #ecdfc3; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.adm-sec h3 { margin: 0 0 8px; font-size: 14px; color: #9a8b6a; letter-spacing: 0.06em; }
.adm-dl { margin: 0; display: grid; gap: 0; }
.adm-dl-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px dashed #efe5cf; }
.adm-dl-row:first-child { border-top: 0; }
.adm-dl dt { font-size: 13px; color: #8a7d62; font-weight: 700; }
.adm-dl dd { margin: 0; font-size: 15px; color: #1f2430; word-break: break-all; }
.adm-dl dd a { color: #0e2340; font-weight: 700; }
.adm-mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.12em; font-size: 17px; color: #b4560f; }
.adm-sec-actions { margin-top: 10px; }
.adm-team-form { flex-wrap: wrap; }
.adm-team-form select { flex: 1; min-height: 40px; font-size: 15px; }

/* ===================== 後台按鈕系統（2026-10-17）=====================
   一個基底 .adm-btn ＋ 角色修飾：
   預設＝次要（白底細框）｜.primary＝主要（深海藍）｜.accent＝確認繳費（橘，只給錢相關的確認）
   .ghost＝輕量（純文字）｜.danger＝刪除（紅）
   尺寸：預設 40px｜.sm 32px｜.lg 48px；.block＝滿寬。 */
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-height: 0; padding: 0 16px; border-radius: 10px;
  border: 1px solid #d6c9ab; background: linear-gradient(#ffffff, #fbf7ee); color: #0e2340;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  box-shadow: 0 1px 0 rgba(62, 36, 16, 0.08), inset 0 1px 0 #ffffff;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease), color 150ms var(--ease);
}
.adm-btn:hover { border-color: #b9a67a; background: #ffffff; }
.adm-btn:active { transform: translateY(1px); box-shadow: none; }
.adm-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(201, 154, 46, 0.5); }
.adm-btn:disabled, .adm-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.adm-btn.primary { background: linear-gradient(#24497c, #0e2340); border-color: #0e2340; color: #fff; box-shadow: 0 2px 0 #06142a, inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.adm-btn.primary:hover { background: linear-gradient(#2d5791, #14305a); border-color: #14305a; }

.adm-btn.accent { background: linear-gradient(#ff8b3f, #ef6214); border-color: #d9530c; color: #fff; text-shadow: 0 1px 0 rgba(120, 40, 0, 0.35); box-shadow: 0 2px 0 #b5470b, inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.adm-btn.accent:hover { background: linear-gradient(#ff9a55, #f26f22); border-color: #d9530c; }

.adm-btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: #4a5a74; }
.adm-btn.ghost:hover { background: rgba(14, 35, 64, 0.06); border-color: transparent; color: #0e2340; }

.adm-btn.danger { background: #fff; border-color: #e7b4b4; color: #b4232c; box-shadow: none; }
.adm-btn.danger:hover { background: #b4232c; border-color: #b4232c; color: #fff; }

.adm-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.adm-btn.lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.adm-btn.block { display: flex; width: 100%; }
.adm-btn.accent:focus-visible, .adm-btn.primary:focus-visible, .adm-btn.danger:focus-visible { box-shadow: 0 0 0 3px rgba(201, 154, 46, 0.55); }

/* 表單控制項與按鈕同高 */
.adm-toolbar select, .adm-search input { height: 40px; min-height: 0; }
.adm-toolbar { align-items: center; }
.adm-inline select { height: 32px; min-height: 0; }

/* 抽屜裡的刪除區 */
.adm-sec-danger { border-color: #f0d0d0; background: #fffafa; }
.adm-sec-danger h3 { color: #b4232c; }
.adm-sec-danger .adm-hint { margin: 0 0 10px; }

/* 選單與名單抽屜分開：各自只開自己；同時存在時選單在最上層 */
.adm-menu-scrim { z-index: 62; }
#adm-drawer { z-index: 63; }
/* 表單即時檢查：沒有錯誤時錯誤區不佔空間；有錯的欄位外框變紅 */
.field .error:empty, .error[data-err-box]:empty { display: none; }
.field-consent-err { margin: 4px 0 0; }
.field input[aria-invalid="true"], .name-row input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 44, 0.12); }
.gender-seg:has(input[aria-invalid="true"]) { border-color: var(--danger); }
label.check:has(input[aria-invalid="true"]) span { color: var(--danger); }
/* 通行證：積分＋抽獎券並排 */
.points-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 12px; }
.points-pair .pp { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff7e8; border: 1.5px solid #f1dcb0; }
.points-pair .pp img, .points-pair .pp .mi { grid-row: span 2; width: 26px; height: 26px; }
.points-pair .pp.pp-candy { background: #f5effc; border-color: #ddcdf1; }
.points-pair .pp.pp-candy span:not(.mi), .points-pair .pp.pp-candy b small { color: #6f4a9a; }
.points-pair .pp.pp-candy .mi { color: #6b3fa0; }
.points-pair .pp.pp-candy b { color: #6b3fa0; }
.points-pair .pp span:not(.mi) { font-size: 13px; font-weight: 700; color: #8a6a3a; }
.points-pair .pp b { font-size: 24px; font-weight: 900; line-height: 1.1; color: var(--orange); font-variant-numeric: tabular-nums; }
.points-pair .pp b small { font-size: 13px; font-weight: 700; color: #8a6a3a; }
.points-pair .pp.pp-ticket { background: #eef5fb; border-color: #c9ddee; }
.points-pair .pp.pp-ticket .mi { color: var(--sea); }
.points-pair .pp.pp-ticket b { color: #1f5f93; }
.points-pair .pp-note { grid-column: 1 / -1; margin: 2px 2px 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
/* 後台：正式／測試官方帳號切換 */
.adm-mode-card { margin-bottom: 16px; }
.adm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.adm-mode-opt { margin: 0; display: flex; }
.adm-mode { flex: 1; display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #e2d6bb; background: #fff; font: inherit; color: #1f2430; cursor: pointer; transition: border-color 150ms var(--ease), background 150ms var(--ease); }
.adm-mode b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.adm-mode small { font-size: 13px; color: #8a7d62; }
.adm-mode:hover:not(:disabled) { border-color: #0e2340; }
.adm-mode:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(201, 154, 46, 0.5); }
.adm-mode.on { border-color: #0e2340; background: #eef3fa; box-shadow: inset 0 0 0 1px #0e2340; cursor: default; }
.adm-mode.test.on { border-color: #d9531e; background: #fff4ea; box-shadow: inset 0 0 0 1px #d9531e; }
.adm-mode:disabled:not(.on) { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 520px) { .adm-modes { grid-template-columns: 1fr; } }
.adm-account { margin: -2px 0 6px; font-size: 13px; font-weight: 700; color: #1f6b3e; }
.adm-account.bad { color: var(--danger); }
.adm-testbadge { margin-left: auto; margin-right: 10px; padding: 4px 10px; border-radius: 999px; background: #ff8b3f; color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
@media (max-width: 420px) { .adm-testbadge { font-size: 11.5px; padding: 3px 8px; } }
.adm-note-test { background: #fff4ea; border-color: #f4c79e; color: #8a3a08; }
.adm-note a { color: inherit; font-weight: 700; }

/* 派對門票：早鳥加碼（幸運糖果） */
.early-bird { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; padding: 10px 12px; border-radius: 14px; background: #f5effc; border: 1.5px dashed #c8b2e6; }
.early-bird .mi { width: 32px; height: 32px; flex: none; color: #6b3fa0; transform: rotate(-12deg); }
.early-bird p { margin: 0; font-size: 15px; line-height: 1.5; color: #4a2f6b; }
.early-bird b { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: #6b3fa0; color: #fff; font-size: 12.5px; line-height: 22px; vertical-align: 1px; }
/* 通行證：積分／抽獎券旁的問號與說明視窗 */
.points-pair .pp .pp-label { display: inline-flex; align-items: center; gap: 6px; }
.pp-help { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid currentColor; background: #fff; color: inherit; font: inherit; font-size: 13px; font-weight: 900; line-height: 1; cursor: pointer; }
.pp-help::before { content: ""; position: absolute; inset: -11px; }
.pp-help { position: relative; }
.pp-help:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.help-list { list-style: none; margin: 4px 0 10px; padding: 0; }
.help-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 2px dashed #e6d4ad; font-size: 17px; color: var(--ink); }
.help-list li:last-child { border-bottom: 0; }
.help-list li b { color: var(--orange); font-weight: 900; white-space: nowrap; }
.help-list.dots li { display: block; position: relative; padding-left: 22px; line-height: 1.5; }
.help-list.dots li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.help-note { margin: 0 0 4px; font-size: 15px; color: var(--muted); text-align: center; }
/* 彈窗永遠置中：放在繩框（.rope > *）裡時不要被改成 relative */
dialog.sheet:modal { position: fixed; inset: 0; margin: auto; height: fit-content; z-index: auto; }

/* 測驗結果：分析＋派對上的你＋技能／小心＋最合拍 */
.quiz-tagline { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--ink-2); }
.quiz-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 14px; }
.quiz-tags span { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); font-size: 15px; font-weight: 700; }
.quiz-text { text-align: left; font-size: 17px; line-height: 1.75; color: var(--ink); margin: 0 0 14px; }
.quiz-block { text-align: left; background: #fffaf0; border: 2px dashed var(--field); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.quiz-block h3 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.quiz-block ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 16px; line-height: 1.6; }
.quiz-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; text-align: left; }
.quiz-duo div { background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.quiz-duo b { font-size: 14px; color: var(--orange); }
.quiz-duo span { font-size: 15px; line-height: 1.5; color: var(--ink); }
.quiz-match { background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; text-align: left; display: grid; gap: 4px; }
.quiz-match b { color: var(--moon); font-size: 16px; }
.quiz-match span { font-size: 15px; line-height: 1.6; }

/* LINE 按鈕：白色 LINE 標誌放大一點 */
.btn-line img { width: 30px; height: 30px; }

/* ===== 才藝表演報名（2026-10-18）：選項膠囊、人數＋時間同一列 ===== */
.field .label { display: block; font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.field label small, .field .label small { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 4px; }
.pick-group { display: flex; flex-wrap: wrap; gap: 8px; }
.field .pick-group label { position: relative; display: flex; margin: 0; font-size: inherit; }
.field .pick-group input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.pick-group span {
  display: grid; place-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: #fffaf0; border: 2px solid var(--field); color: var(--ink-2); font-size: 16px; font-weight: 700; white-space: nowrap;
  transition: background 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.pick-group label:active span { transform: scale(0.96); }
.pick-group input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pick-group input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.field .other-input { margin-top: 10px; min-height: 48px; }
.field .other-input[hidden] { display: none; }
/* 人數＋預計時間同一列；人數框跟時間選項一樣高、差不多寬 */
.talent-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; }
.field .talent-line label { margin: 0; font-size: inherit; }
.num-box { position: relative; display: block; width: 100px; }
.field .num-box input { min-height: 44px; height: 44px; padding: 0 30px 0 14px; border-radius: 999px; font-size: 17px; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.num-box input::-webkit-outer-spin-button, .num-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-box i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 15px; font-weight: 700; color: var(--muted); pointer-events: none; }
.talent-hint { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }

/* ===== LINE 登入中繼（不顯示海報，登入完直接跳下一步） ===== */
body.login-continue .scene { display: none; }
body.login-continue .sky { background: linear-gradient(180deg, #49245e, #e18149 70%, #d38e27); }
.lc { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; gap: 18px; padding: 24px; text-align: center; color: #fff; }
.lc p { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: 0.06em; text-shadow: 0 2px 0 rgba(14, 35, 64, 0.35); }
.lc-retry { color: #fff6e0; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; opacity: 0; animation: lc-show 200ms var(--ease) 4s forwards; }
@keyframes lc-show { to { opacity: 1; } }


/* ===== 報名期通行證：五格蓋章（樣式取自活動當天通行證 night.css，night.css 後載入會覆蓋同名規則） ===== */
.np-sec { position: relative; margin-top: 26px; padding: 26px 8px 12px; border-radius: 16px; background: #fffaf0; border: 3px dashed #b08a55; }
.np-ribbon { position: absolute; left: 50%; top: -22px; width: 200px; height: 46px; object-fit: fill; transform: translateX(-50%); pointer-events: none; }
.np-sec h2 { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); margin: 0; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 0.1em; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.np-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pslot { display: grid; justify-items: center; gap: 2px; padding: 4px 2px 6px; border-radius: 12px; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.pslot:active { background: var(--cream-2); }
.pslot:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ps-order { font-weight: 900; font-size: 14px; color: #4a2a10; }
.ps-box { position: relative; display: grid; place-items: center; width: 100%; max-width: 104px; aspect-ratio: 1; border-radius: 14px; border: 3px solid #e2c48d; background: #fff; }
.pslot.done .ps-box { border-color: #c99a2e; background: #fff6e0; }
.pslot.hot .ps-box { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 106, 27, 0.25); }
.ps-box img { width: 78%; height: auto; }
.ps-stamp { position: absolute; right: -4px; bottom: 4px; padding: 0 6px; border: 3px solid var(--danger); border-radius: 8px; color: var(--danger); font-size: 16px; font-weight: 900; letter-spacing: 0.08em; background: rgba(255, 250, 240, 0.85); transform: rotate(-14deg); }
.ps-name { font-weight: 900; font-size: 14px; color: #4a2a10; text-align: center; line-height: 1.25; }
.ps-prog { font-size: 12px; color: var(--ink-2); }
.pslot.hot .ps-prog { color: var(--orange); font-weight: 700; }
.np-hint { text-align: center; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.pslot.stamping .ps-stamp { animation: stampdrop 650ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.pslot.stamping .ps-box img { animation: stampfade 650ms ease both; }
@keyframes stampdrop { 0% { transform: rotate(-14deg) scale(2.4); opacity: 0; } 60% { transform: rotate(-14deg) scale(0.92); opacity: 1; } 100% { transform: rotate(-14deg) scale(1); } }
@keyframes stampfade { from { filter: grayscale(1); opacity: 0.4; } to { filter: none; opacity: 1; } }
.np-grid.five { grid-template-columns: repeat(6, 1fr); row-gap: 12px; }
.np-grid.five .pslot { grid-column: span 2; }
.np-grid.five .pslot:nth-child(4) { grid-column: 2 / span 2; }
.pre-pass { margin-bottom: 18px; }
.pre-pass .ps-box img { width: 70%; }
.pre-pass .ps-prog { text-align: center; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .pslot.stamping .ps-stamp, .pslot.stamping .ps-box img { animation: none; } }

/* 後台才藝表演：工具列按鈕靠右、抽屜裡的新增表單 */
.adm-toolbar { align-items: center; }
.adm-toolbar-actions { display: flex; gap: 8px; margin-left: auto; }
.adm-form { display: grid; gap: 4px; }
.adm-field select, .adm-field textarea { width: 100%; min-height: 46px; padding: 8px 12px; border: 1.5px solid #d6cbb3; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: #1f2430; }
.adm-field textarea { min-height: 80px; resize: vertical; }
.adm-field select:focus, .adm-field textarea:focus { outline: none; border-color: #0e2340; box-shadow: 0 0 0 3px rgba(14, 35, 64, 0.12); }
.adm-checks { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.adm-checks legend { font-size: 14px; font-weight: 700; color: #1f2430; margin-bottom: 6px; }
.adm-checks label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 15px; }
.adm-checks input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: #0e2340; }
.adm-checks label { white-space: nowrap; }

.adm-narrow { max-width: 440px; }
