/* 學習島闖關(/game):接在學習島 style.css 和展場版 expo.css 後面(按鈕、彈出視窗、搖桿、選角色沿用 expo.css) */

/* 學習島原本的說明卡、字幕、工具列都不用(expo.css 已經藏掉大部分) */
body.xp-game .caption, body.xp-game #labels, body.xp-game #card, body.xp-game .toolbar, body.xp-game #index, body.xp-game #rail, body.xp-game #dock, body.xp-game #pins { display: none !important; }
body.xp-game.g-play .brand, body.xp-game.g-bonus .brand, body.xp-game.g-tv .brand { display: none; }
body.xp-game .g-face, body.xp-game .xp-ava { --hero-img: url("/site-art/mascot-hello.webp"); }

/* ---------- 開始畫面 ---------- */
.g-title { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 26px; padding: 90px 28px 46px; pointer-events: none; }
.g-title > * { pointer-events: auto; }
.g-title-card { width: min(470px, 100%); padding: 26px 30px 22px; border-radius: 34px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); text-align: center; animation: xp-rise .45s cubic-bezier(.2, .9, .3, 1); }
.g-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 900; letter-spacing: .12em; color: #c98a14; }
.g-face { width: 34px; height: 34px; border-radius: 50%; background: #fff var(--hero-img) center / 84% no-repeat; box-shadow: var(--shadow-s); }
.g-title h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 900; letter-spacing: .06em; line-height: 1.15; }
.g-title h1 b { display: block; font-size: 1.32em; color: #e8742a; text-shadow: 0 3px 0 #ffe08a; }
.g-sub { margin: 8px 0 14px; font-size: 17px; font-weight: 800; color: var(--soft); }
.g-isles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.g-isles li { display: grid; justify-items: center; gap: 4px; }
.g-isles b { display: grid; place-items: center; width: 50px; height: 44px; clip-path: var(--hex); background: var(--c); color: #fff; font-size: 21px; font-weight: 900; }
.g-isles span { font-size: 13px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.g-big { min-height: 64px; min-width: 260px; font-size: 24px; animation: xp-bob 2.2s ease-in-out infinite; }
.g-hint { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--soft); }
.g-board-card { width: min(330px, 100%); max-height: calc(100% - 20px); overflow: auto; padding: 18px 20px; border-radius: 30px; background: rgba(255, 253, 248, .94); box-shadow: var(--shadow), var(--clay); animation: xp-rise .55s cubic-bezier(.2, .9, .3, 1); }
.g-board-card h2 { margin: 0; font-size: 22px; font-weight: 900; }
.g-board-scope { margin: 2px 0 10px; font-size: 13px; font-weight: 700; color: var(--soft); }
.g-board { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: rk; }
.g-board li { display: grid; grid-template-columns: 34px 14px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-weight: 900; }
.g-board li.g-empty { display: block; padding: 10px; background: none; box-shadow: none; color: var(--soft); font-weight: 700; text-align: center; }
.g-board .rk { font-size: 18px; text-align: center; }
.g-board .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c, #ccc); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.g-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-board .tm { font-variant-numeric: tabular-nums; color: #2f78bd; }
.g-board li.me { background: #fff6d6; box-shadow: inset 0 0 0 3px var(--yellow-d); }
.g-board li:nth-child(1) { background: #fff3c4; }

/* ---------- 闖關中的上方資訊列 ---------- */
.g-hud { position: absolute; z-index: 26; left: 12px; right: 12px; top: 12px; display: flex; align-items: flex-start; gap: 12px; pointer-events: none; }
.g-hud > * { pointer-events: auto; }
.g-lv { display: flex; align-items: flex-start; gap: 10px; min-width: 0; max-width: 420px; padding: 9px 16px 10px 10px; border-radius: 22px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); }
.g-lv-n { flex: none; display: grid; place-items: center; width: 46px; height: 41px; clip-path: var(--hex); background: var(--c, #f4b63f); color: #fff; font-size: 21px; font-weight: 900; }
.g-lv-t { min-width: 0; }
.g-lv-t p { margin: 0; }
.g-lv-k { font-size: 13px; font-weight: 900; letter-spacing: .08em; color: var(--c2, #c98a14); }
.g-lv-goal { font-size: 18px; font-weight: 900; line-height: 1.35; }
.g-prog { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.g-prog:empty { display: none; }
.g-prog i { width: 22px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 0 0 0 2.5px var(--c); }
.g-prog i.on { background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.g-prog.dots i { width: 16px; height: 16px; border-radius: 50%; }
.g-clock { margin: 0 auto; display: grid; justify-items: center; padding: 8px 22px 9px; border-radius: 22px; background: rgba(35, 48, 45, .88); color: #fff; box-shadow: var(--shadow); }
.g-clock b { font-size: 34px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.g-adj { min-height: 1.2em; margin-top: 3px; font-size: 13px; font-weight: 900; color: #ffd34d; white-space: nowrap; }
.g-side { display: flex; align-items: center; gap: 8px; }
.g-gems { display: inline-flex; align-items: baseline; gap: 3px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); font-size: 18px; font-weight: 900; }
.g-gems b { font-size: 22px; color: #1597b0; font-variant-numeric: tabular-nums; }
.g-gems small { font-size: 13px; color: var(--soft); }
.g-gems.bump { animation: g-bump .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes g-bump { 40% { transform: scale(1.25); } }
.g-icon { width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); font-size: 19px; cursor: pointer; }
.g-icon:active { transform: scale(.94); }

/* 客人的點單 */
.g-order { position: absolute; z-index: 25; left: 12px; top: 128px; max-width: 440px; padding: 10px 14px; border-radius: 18px; background: #fff; box-shadow: inset 5px 0 0 #4a97dd, var(--shadow); font-size: 16px; font-weight: 800; line-height: 1.5; }
.g-order b { color: #2f78bd; }
.g-order .g-em { font-size: 26px; vertical-align: middle; }

/* 跳字 */
.g-pops { position: absolute; inset: 0; z-index: 27; pointer-events: none; overflow: hidden; }
.g-pop { position: absolute; left: 0; top: 0; padding: 4px 12px; border-radius: 999px; font: 900 20px/1.2 var(--font); white-space: nowrap; color: #fff; background: #2e8a5f; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); will-change: transform, opacity; }
.g-pop.bad { background: #e4572e; }
.g-pop.gem { background: #1597b0; }
/* 畫面外目標的箭頭(要撿的東西每一個都有一顆) */
.g-edges { position: absolute; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
.g-edge { position: absolute; z-index: 25; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center; background: var(--c, #ffd34d); box-shadow: 0 0 0 4px #fff, var(--shadow); pointer-events: none; animation: g-pulse 1s ease-in-out infinite; }
.g-edge span { display: block; color: #fff; font-size: 26px; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@keyframes g-pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 255, 255, .7), var(--shadow); } }
.g-edge.small { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
.g-edge.small span { font-size: 20px; }
.g-line { position: absolute; z-index: 28; left: 50%; top: 104px; max-width: min(560px, calc(100% - 32px)); padding: 10px 18px; border-radius: 999px; background: rgba(35, 48, 45, .92); color: #fff; font: 900 17px/1.4 var(--font); text-align: center; transform: translate(-50%, -8px); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.g-line.show { opacity: 1; transform: translate(-50%, 0); }
.g-line.bad { background: rgba(196, 64, 30, .95); }

/* 第幾關的大標題 */
.g-banner { position: absolute; z-index: 40; left: 50%; top: 27%; min-width: min(460px, calc(100% - 32px)); padding: 20px 34px 22px; border-radius: 32px; background: var(--paper); box-shadow: 0 0 0 6px var(--c, var(--yellow)), 0 22px 54px rgba(35, 48, 45, .3); text-align: center; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; }
.g-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.g-banner p { margin: 0; }
.g-bn-k { font-size: 16px; font-weight: 900; letter-spacing: .14em; color: var(--c2, #c98a14); }
.g-bn-t { margin: 4px 0 6px !important; font-size: 36px; font-weight: 900; letter-spacing: .05em; }
.g-bn-s { font-size: 18px; font-weight: 800; color: #34433f; line-height: 1.5; }
.g-banner.clear .g-bn-t { color: #2e8a5f; }
/* 倒數 */
.g-count { position: absolute; z-index: 45; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 900 150px/1 var(--font); color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 10px 0 rgba(35, 48, 45, .25); pointer-events: none; }
.g-count.go { color: var(--yellow); }
.g-count.pop { animation: g-countpop .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes g-countpop { 0% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 40% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }

/* ---------- 點單、奇奇的三句話 ---------- */
.g-panel { position: absolute; z-index: 35; left: 50%; bottom: 20px; width: min(620px, calc(100% - 24px)); max-height: calc(100% - 150px); overflow: auto; padding: 18px 20px 16px; border-radius: 30px; background: var(--paper); box-shadow: 0 -8px 40px rgba(35, 48, 45, .25), var(--clay); transform: translateX(-50%); animation: g-up .35s cubic-bezier(.2, .9, .3, 1); }
@keyframes g-up { from { transform: translate(-50%, 30px); opacity: 0; } }
.g-panel h3 { margin: 0 0 4px; font-size: 22px; font-weight: 900; }
.g-panel .g-say { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #34433f; line-height: 1.55; }
.g-panel .g-say b { color: #2f78bd; }
.g-rowc { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.g-rowc > span { font-size: 14px; font-weight: 900; color: var(--soft); }
.g-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.g-chips button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 8px; border: 0; border-radius: 16px; background: #fff; font: 900 17px var(--font); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 2.5px var(--line), 0 3px 8px rgba(48, 78, 70, .06); }
.g-chips button .g-em { font-size: 24px; }
.g-chips button .sw { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.g-chips button.on { background: #fff6d6; box-shadow: inset 0 0 0 3.5px var(--ink); transform: translateY(-2px); }
.g-made { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; padding: 10px 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.g-made:empty { display: none; }
.g-plate { position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%; background: var(--c); display: grid; place-items: center; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 0 0 5px #fff, 0 0 0 7px var(--line); }
.g-plate .d { font-size: 40px; line-height: 1; }
.g-plate .t { position: absolute; right: -6px; top: -8px; font-size: 26px; }
.g-made p { margin: 0; font-size: 17px; font-weight: 900; line-height: 1.5; }
.g-made.ok p { color: #2e8a5f; }
.g-made.no p { color: #c2410c; }
.g-quiz { display: grid; gap: 10px; margin: 4px 0 8px; }
.g-quiz button { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 16px; border: 0; border-radius: 18px; background: #fff; font: 900 19px var(--font); color: var(--ink); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 2.5px var(--line), 0 3px 8px rgba(48, 78, 70, .06); }
.g-quiz button::before { content: "🤖"; font-size: 24px; }
.g-quiz button:disabled { opacity: .55; cursor: default; }
.g-quiz button.tried::after { content: "✔ 這句是對的"; margin-left: auto; font-size: 14px; color: #2e8a5f; }
.g-quiz button.hit { background: #e6f6ec; box-shadow: inset 0 0 0 3.5px #2e8a5f; }
.g-quiz button.hit::after { content: "🐞 抓到了!"; margin-left: auto; font-size: 15px; color: #2e8a5f; }
.g-panel .xp-row { justify-content: flex-end; }

/* ---------- 通關 ---------- */
.xp-sheet-end { width: min(560px, 100%); padding-top: 22px; }
.g-medal { font-size: 66px; line-height: 1; animation: xp-thump .7s cubic-bezier(.2, 1.5, .4, 1); }
.g-final { margin: 2px 0 0; font-size: 58px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; color: #2f78bd; }
.g-sum { margin: 8px 0 12px; padding: 10px 12px 8px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); text-align: left; }
/* 名字不要用 .g-isles(開始畫面已經有,會被套上六角形) */
.g-sum-isles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px dashed var(--line); }
.g-sum-isles span { display: grid; gap: 1px; padding: 6px 9px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 3px 0 0 var(--c); font-size: 12.5px; font-weight: 800; color: var(--soft); }
.g-sum-isles b { font-size: 17px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-calc { margin: 0; display: grid; }
.g-calc div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 4px; font-size: 15.5px; font-weight: 800; }
.g-calc div + div { border-top: 1px solid #f3ecdc; }
.g-calc dt { color: var(--soft); }
.g-calc dd { margin: 0; color: var(--ink); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-calc .good dd { color: #2e8a5f; } .g-calc .bad dd { color: #e4572e; }
.g-calc .note { font-size: 12.5px; } .g-calc .note dt { color: var(--faint, #8a9a95); }
@media (max-width: 520px) { .g-sum-isles { grid-template-columns: repeat(2, 1fr); } }
.g-rankh { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; margin: 4px 0 0; }
.g-rank { font-size: 24px; font-weight: 900; }
.g-rank b { font-size: 46px; line-height: 1; color: #e8742a; }
.g-total { margin: 4px 0 4px; font-size: 14px; font-weight: 800; color: var(--soft); }
.xp-sheet-end .g-board { margin: 0 0 12px; text-align: left; }
.g-prize { margin: 0 0 12px; padding: 12px 14px; border-radius: 18px; background: #fff3c4; font-size: 17px; font-weight: 900; line-height: 1.55; }
.g-prize p { margin: 0; }
.g-prize-k { font-size: 15px; color: #8a5a00; }
.g-code-big { display: inline-block; margin: 4px 0 6px; padding: 4px 18px !important; border-radius: 14px !important; background: #fff !important; font: 900 40px/1.15 ui-monospace, Menlo, Consolas, monospace !important; letter-spacing: .2em !important; color: var(--ink); box-shadow: inset 0 0 0 3px #f0c24a; }
.g-prize-t { font-size: 15px; line-height: 1.5; }
.g-prize small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #8a6a2a; }
/* 決賽那一行(通關畫面、首頁) */
.g-fin, .g-finbar-t { margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: #e8f3ff; color: #1f4f86; font-size: 15px; font-weight: 800; line-height: 1.5; }
.g-fin b, .g-finbar-t b { color: #e8742a; }
.g-fin.hot, .g-finbar-t.hot { background: linear-gradient(90deg, #ffe3a3, #ffd0b0); color: #6b3d00; animation: g-pulse 1.2s ease-in-out infinite; }
.g-finbar { margin: 0 0 10px; } .g-finbar p { margin: 0; }
.g-mycodes-btn { display: block; width: 100%; margin-top: 10px; min-height: 46px; font-size: 16px; }
.g-mycodes { margin: 6px 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.g-mycodes li { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; background: #fff3c4; }
.g-mycodes code { font: 900 30px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; }
.g-mycodes span { display: grid; font-size: 14px; font-weight: 800; } .g-mycodes small { font-weight: 700; color: var(--soft); }
/* 同仁選單:兌換 */
.g-redeem input { text-transform: uppercase; letter-spacing: .2em; font-weight: 900; font-size: 22px; }
.g-rres p { margin: 6px 0; font-size: 16px; font-weight: 800; }
.g-rres .ok { color: #2e8a5f; } .g-rres .no { color: #c94a2a; } .g-rres .warn { color: #b06d00; }
.g-outsw { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; font-size: 14px; font-weight: 800; color: var(--soft); }
/* 大螢幕:下一場決賽 */
.g-tv-fin { position: absolute; left: 28px; bottom: 28px; width: min(520px, 38vw); padding: 20px 24px; border-radius: 30px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); }
.g-tv-fin h3 { margin: 0; font-size: 30px; font-weight: 900; }
.g-tv-fin-t { margin: 4px 0 10px; font-size: 20px; font-weight: 800; color: var(--soft); }
.g-tv-fin-t b { color: #e8742a; font-size: 28px; font-variant-numeric: tabular-nums; }
.g-tv-fin ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.g-tv-fin li { display: grid; grid-template-columns: 34px 20px 1fr auto; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; background: #fff; font-size: 20px; font-weight: 900; }
.g-tv-fin .rk { color: #e8742a; } .g-tv-fin .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.g-tv-fin .tm { color: #2f78bd; font-variant-numeric: tabular-nums; }
.g-tv-fin li.g-empty { display: block; color: var(--soft); }
.g-tv-fin-f { margin: 10px 0 0; font-size: 15px; font-weight: 800; color: var(--soft); }
.g-prize code { padding: 2px 10px; border-radius: 8px; background: #fff; font: 900 22px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; }
.g-note { margin: 0 0 12px; font-size: 14px; color: var(--soft); }
/* 一般電腦的通關畫面:給家長的報名卡(10/29 她說原本一行藍色連結太隨便) */
.g-signup { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 12px 12px 14px; border-radius: 20px; text-align: left; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, #f3fbe8, #e4f6d6); box-shadow: inset 0 0 0 2px #c5e6a8, 0 6px 16px rgba(46, 138, 95, .12); transition: transform .15s, box-shadow .15s; }
.g-signup:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #9fd47c, 0 10px 22px rgba(46, 138, 95, .2); }
.g-signup:focus-visible { outline: 3px solid #2e8a5f; outline-offset: 3px; }
.g-signup-ic { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: #fff; font-size: 28px; box-shadow: 0 2px 6px rgba(46, 138, 95, .15); }
.g-signup-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.g-signup-t b { font-size: 17px; font-weight: 900; color: #1f6b49; }
.g-signup-t small { font-size: 13.5px; font-weight: 700; color: var(--soft); line-height: 1.4; }
.g-signup-go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: #2e8a5f; color: #fff; font-size: 16px; font-weight: 900; white-space: nowrap; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.g-signup-go i { font-style: normal; transition: transform .15s; }
.g-signup:hover .g-signup-go i { transform: translateX(3px); }
.xp-sheet-end .xp-row .xp-btn { white-space: nowrap; }
@media (max-width: 520px) {
  .g-signup { flex-wrap: wrap; gap: 10px 12px; }
  .g-signup-t { flex: 1 1 calc(100% - 66px); }
  .g-signup-go { flex: 1 1 100%; justify-content: center; padding: 11px 16px; }
}
.g-names { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 12px; }
.g-names button { min-height: 52px; border: 0; border-radius: 16px; background: #fff; font: 900 19px var(--font); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 2.5px var(--line), 0 3px 8px rgba(48, 78, 70, .06); }
.g-names button.on { background: #fff6d6; box-shadow: inset 0 0 0 3.5px var(--ink); }
.g-codes { display: grid; gap: 4px; max-height: 260px; overflow: auto; margin: 8px 0; padding: 0; list-style: none; text-align: left; }
.g-codes li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; padding: 5px 8px; border-radius: 10px; background: var(--track); font-weight: 800; }
.g-codes code { font: 900 16px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; }

/* ---------- 大螢幕 ---------- */
.g-tv { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.g-tv-board { position: absolute; right: 28px; top: 28px; bottom: 28px; width: min(560px, 44vw); display: flex; flex-direction: column; padding: 24px 28px; border-radius: 34px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); }
.g-tv-board h2 { margin: 0 0 14px; font-size: 32px; font-weight: 900; }
.g-board.big { gap: 9px; }
.g-board.big li { grid-template-columns: 52px 18px 1fr auto; padding: 10px 16px; font-size: 26px; border-radius: 18px; }
.g-board.big .rk { font-size: 28px; }
.g-board.big .dot { width: 18px; height: 18px; }
.g-tv-foot { margin: auto 0 0; padding-top: 12px; font-size: 18px; font-weight: 800; color: var(--soft); }
.g-tv-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.g-tv-page[hidden] { display: none; }
.g-tv-tabs { display: flex; gap: 8px; margin: -6px 0 16px; pointer-events: auto; }
.g-tv-tabs[hidden] { display: none; }
.g-tv-tabs button { flex: 1; padding: 9px 12px; border: 0; border-radius: 999px; background: #eef2f0; color: var(--soft); font: 900 18px/1.2 var(--font); cursor: pointer; position: relative; overflow: hidden; }
.g-tv-tabs button[aria-selected="true"] { background: var(--ink, #23302d); color: #fff; }
/* 自動切換倒數:選中的分頁底下一條線慢慢走完 */
.g-tv-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: #ffd24a; transform-origin: left; animation: g-tv-tick var(--tick, 15s) linear forwards; }
@keyframes g-tv-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.g-tv-banner { position: absolute; left: 32%; top: 45%; padding: 26px 46px; border-radius: 32px; background: #fff8e6; box-shadow: 0 0 0 6px var(--yellow), 0 20px 50px rgba(35, 48, 45, .3); font: 900 40px/1.4 var(--font); text-align: center; transform: translate(-50%, -50%) scale(.8); opacity: 0; transition: opacity .4s, transform .4s cubic-bezier(.2, 1.4, .4, 1); }
.g-tv-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.g-tv-live { position: absolute; left: 28px; top: 86px; margin: 0; max-width: calc(100% - min(560px, 44vw) - 84px); padding: 12px 22px; border-radius: 999px; background: rgba(255, 253, 248, .94); box-shadow: var(--shadow); font-size: 22px; font-weight: 900; }
.g-tv-live b { color: #e8742a; }
.g-tv-banner b { color: #d9622f; }
body.xp-game.g-tv .credit { display: none; }

@media (prefers-reduced-motion: reduce) {
  .g-big, .g-edge, .g-medal, .g-count.pop { animation: none; }
}


/* 偵探島「找不同」 */
.g-panel.wide { width: min(980px, calc(100% - 24px)); max-height: calc(100% - 110px); }
.g-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 10px; }
.g-diff figure { margin: 0; display: grid; gap: 4px; min-width: 0; }
.g-diff figcaption { font-size: 15px; font-weight: 900; color: var(--soft); }
.g-diff svg { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 0 0 3px var(--line); cursor: crosshair; touch-action: manipulation; }
.g-diff svg .hit { fill: none; stroke: #2e8a5f; stroke-width: 5; }
.g-diff svg .hint { fill: rgba(255, 211, 77, .25); stroke: #e8a522; stroke-width: 4; stroke-dasharray: 8 6; animation: g-hint .8s ease-in-out infinite; }
@keyframes g-hint { 50% { opacity: .35; } }
.g-diff svg .miss { fill: #e4572e; font: 900 28px sans-serif; }
.g-diff-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-diff-dots { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.g-diff-dots i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px #3fae7a; }
.g-diff-dots i.on { background: #3fae7a; }
.g-diff-dots b { margin-left: 6px; font-size: 17px; }
.g-diff-foot .xp-btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
.g-pic .mini-logo { height: 38px; width: auto; vertical-align: middle; }
.g-pic .mini { display: inline-grid; place-items: center; width: 44px; height: 34px; border-radius: 8px; background: #cdeefa; font-size: 22px; box-shadow: inset 0 0 0 2px var(--line); }

/* ---------- 每一關開始前的玩法說明(看完按開始才計時) ---------- */
.g-intro { position: absolute; z-index: 36; right: 16px; top: 100px; bottom: 16px; width: min(460px, calc(100% - 32px)); display: flex; flex-direction: column; border-radius: 30px; background: var(--paper);
  box-shadow: 0 0 0 5px var(--c, var(--yellow)), 0 20px 50px rgba(35, 48, 45, .28); overflow: hidden; animation: g-introin .4s cubic-bezier(.2, .9, .3, 1); }
@keyframes g-introin { from { transform: translateX(40px); opacity: 0; } }
.g-intro-head { flex: none; padding: 16px 20px 10px; background: color-mix(in srgb, var(--c) 16%, #fff); }
.g-intro-head p { margin: 0; }
.g-intro-k { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; letter-spacing: .1em; color: var(--c2); }
.g-intro-k .hexn { display: grid; place-items: center; width: 40px; height: 36px; clip-path: var(--hex); background: var(--c); color: #fff; font-size: 19px; letter-spacing: 0; }
.g-intro h2 { margin: 6px 0 0; font-size: 28px; font-weight: 900; letter-spacing: .04em; line-height: 1.2; }
.g-intro-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 6px; }
.g-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.g-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 4px 10px; align-items: start; padding: 10px 12px; border-radius: 20px; background: #fff;
  box-shadow: inset 0 0 0 2px var(--line); animation: g-stepon 6s infinite; }
.g-steps li:nth-child(2) { animation-delay: 2s; }
.g-steps li:nth-child(3) { animation-delay: 4s; }
/* 三個步驟輪流亮起來,像示範一樣一步一步帶 */
@keyframes g-stepon { 0%, 30% { box-shadow: inset 0 0 0 3px var(--c), 0 6px 16px rgba(48, 78, 70, .14); transform: translateX(-3px); } 34%, 100% { box-shadow: inset 0 0 0 2px var(--line); transform: none; } }
/* ---------- 隱藏關:水上摩托車 ---------- */
.g-bonus { position: absolute; inset: 0; z-index: 27; pointer-events: none; }
.g-bonus > * { pointer-events: auto; }
.gb-card { position: absolute; left: 12px; top: calc(12px + var(--safe-t, 0px)); min-width: 250px; padding: 10px 16px 12px; border-radius: 22px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow), var(--clay); }
.gb-k { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .08em; color: #2f78bd; }
.gb-score { margin: 2px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.gb-score b { font-size: 40px; line-height: 1; font-weight: 900; color: var(--ink); }
.gb-score small { font-size: 16px; font-weight: 900; color: var(--soft); }
.gb-bar { height: 14px; border-radius: 999px; background: #e7eef2; overflow: hidden; box-shadow: inset 0 0 0 2px #d4e2ea; }
.gb-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #36d6e7, #3f8fe0); transition: width .25s; }
.gb-bar.done i { background: linear-gradient(90deg, #7ed389, #2e9a5f); }
.gb-rule { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--soft); }
.gb-rule b { color: var(--ink); }
.gb-time { position: absolute; left: 50%; top: calc(12px + var(--safe-t, 0px)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 4px; padding: 6px 22px; border-radius: 22px; background: rgba(35, 48, 45, .88); color: #fff; }
.gb-time b { font-size: 44px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.gb-time small { font-size: 15px; font-weight: 800; opacity: .8; }
.g-bonus.hurry .gb-time { background: #e4572e; animation: g-pulse .5s ease-in-out infinite; }
.gb-gold { display: none; position: absolute; left: 50%; top: calc(86px + var(--safe-t, 0px)); transform: translateX(-50%); margin: 0; padding: 6px 18px; border-radius: 999px; background: linear-gradient(90deg, #ffd34d, #ffb13b); color: #6b3d00; font-size: 20px; font-weight: 900; box-shadow: 0 6px 18px rgba(232, 165, 34, .45); white-space: nowrap; }
.g-bonus.gold .gb-gold { display: block; animation: g-pulse .8s ease-in-out infinite; }
.gb-boost { position: absolute; right: 26px; bottom: calc(30px + var(--safe-b, 0px)); width: 122px; height: 122px; border: 0; border-radius: 50%; padding: 0; overflow: hidden; background: #dfe6ea; box-shadow: 0 0 0 6px #fff, var(--shadow); cursor: pointer; touch-action: none; font-family: inherit; }
.gb-boost i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #ff8a3d, #ffcf3a); transition: height .2s; }
.gb-boost span { position: relative; display: grid; place-items: center; height: 100%; font-size: 40px; line-height: 1; }
.gb-boost small { display: block; margin-top: 2px; font-size: 16px; font-weight: 900; color: var(--ink); }
.gb-boost.ready { animation: g-pulse .7s ease-in-out infinite; box-shadow: 0 0 0 6px #fff, 0 0 0 12px rgba(255, 207, 58, .6), var(--shadow); }
.gb-boost.on { box-shadow: 0 0 0 6px #ff8a3d, var(--shadow); }
/* 衝刺時畫面四周的速度線(只在衝刺時出現,一直有的話很快就看不出來) */
.g-speed { position: absolute; inset: -10%; z-index: 24; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .55) 0deg 1.2deg, transparent 1.2deg 9deg);
  -webkit-mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 75%); mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 75%); }
.g-speed.on { opacity: .75; animation: g-speedspin .35s linear infinite; }
@keyframes g-speedspin { to { transform: rotate(4deg) scale(1.03); } }
/* 隱藏關的邀請卡 */
.g-ask .g-ask-art { font-size: 64px; line-height: 1; margin: 0 0 4px; }
.g-ask-rules { display: grid; gap: 8px; margin: 12px 0 6px; text-align: left; }
.g-ask-rules p { margin: 0; padding: 9px 14px; border-radius: 14px; background: #f3f8fb; font-size: 16px; font-weight: 800; }
.g-ask-rules .ok { background: #e6f6ea; } .g-ask-rules .no { background: #fdecea; }
.g-ask-rules b { font-size: 18px; }
.g-bres { font-size: 18px; font-weight: 900; margin: 6px 0 0; }
.g-bres.ok { color: #2e8a5f; } .g-bres.no { color: #c94a2a; }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .gb-card { left: 8px; top: calc(8px + var(--safe-t, 0px)); min-width: 0; width: calc(50% - 12px); padding: 8px 12px 10px; }
  .gb-score b { font-size: 32px; } .gb-score small { font-size: 13px; }
  .gb-rule { font-size: 11px; }
  .gb-time { left: auto; right: 8px; transform: none; top: calc(8px + var(--safe-t, 0px)); padding: 6px 16px; }
  .gb-time b { font-size: 36px; }
  .gb-gold { top: calc(150px + var(--safe-t, 0px)); font-size: 16px; }
  .gb-boost { right: 16px; bottom: calc(64px + var(--safe-b, 0px)); width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) { .g-speed.on, .gb-boost.ready, .g-bonus.gold .gb-gold { animation: none; } }

/* ---------- 決賽:隱藏關的資訊卡改成決賽版(沒有目標分數、±5 秒) ---------- */
.g-bonus.final .gb-rule, .g-bonus.final .gb-bar, .g-bonus.final .gb-score small { display: none; }
body.xp-game.g-final .brand, body.xp-game.g-final .credit { display: none; }
/* 選手:報到、等待、結果 */
.g-fj { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(214, 240, 247, .55); }
.g-fj-card { width: min(520px, 100%); max-height: calc(100% - 24px); overflow: auto; padding: 22px 22px 18px; border-radius: 28px; background: #fffdf8; box-shadow: var(--shadow), var(--clay); text-align: center; }
.g-fj-k { margin: 0; font-size: 15px; font-weight: 900; color: #2f78bd; letter-spacing: .04em; }
.g-fj-card h2 { margin: 6px 0 14px; font-size: 26px; font-weight: 900; }
.g-fj-list { display: grid; gap: 8px; }
.g-fj-list button { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: #f3f8fb; font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 2px #e1ecf2; }
.g-fj-list button:hover { box-shadow: inset 0 0 0 3px #3f8fe0; }
.g-fj-list b { font-size: 19px; white-space: nowrap; } .g-fj-list button small { text-align: right; } .g-fj-list small { font-size: 13px; font-weight: 800; color: var(--soft); }
.g-fj .dot, .g-fh .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.g-fj-note { margin: 14px 0 0; font-size: 15px; font-weight: 800; color: var(--soft); line-height: 1.55; }
.g-fj-code { display: flex; gap: 8px; justify-content: center; }
.g-fj-code input { width: 160px; font: 900 34px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; text-align: center; border-radius: 14px; border: 3px solid #d4e2ea; padding: 6px; }
.g-fj-room, .g-fj-res { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.g-fj-room li, .g-fj-res li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: inset 4px 0 0 var(--c); font-size: 18px; font-weight: 900; }
.g-fj-room li i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.g-fj-room span { color: var(--soft); font-weight: 800; }
.g-fj-res em { margin-left: auto; font-style: normal; color: #2f78bd; }
.g-fj-pts { font-size: 48px; color: #e8742a; }
/* 大螢幕主持 */
body.g-fhost #g-tv, body.g-fhost .g-fh-btn { display: none !important; }
.g-fh-btn { position: absolute; z-index: 31; left: 28px; top: 28px; padding: 10px 18px; border: 0; border-radius: 999px; background: rgba(35, 48, 45, .78); color: #fff; font: 900 16px/1 var(--font); cursor: pointer; }
.g-fh { position: absolute; inset: 0; z-index: 32; pointer-events: none; }
.g-fh > * { pointer-events: auto; }
.g-fh-lobby { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 48px; padding: 40px; background: rgba(214, 240, 247, .6); }
.g-fh-qr { width: min(42vh, 420px); padding: 18px; border-radius: 32px; background: #fff; box-shadow: var(--shadow), var(--clay); }
.g-fh-qr svg { display: block; width: 100%; height: auto; }
.g-fh-info { width: min(640px, 48vw); padding: 28px 32px; border-radius: 34px; background: rgba(255, 253, 248, .97); box-shadow: var(--shadow), var(--clay); }
.g-fh-k { margin: 0; font-size: 22px; font-weight: 900; color: #2f78bd; }
.g-fh-info h2 { margin: 6px 0 8px; font-size: 52px; font-weight: 900; line-height: 1.15; }
.g-fh-code { margin: 0 0 6px; font-size: 26px; font-weight: 900; } .g-fh-code b { font: 900 54px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .15em; color: #e8742a; }
.g-fh-sub { margin: 0 0 16px; font-size: 18px; font-weight: 800; color: var(--soft); }
.g-fh-slots, .g-fh-podium { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.g-fh-slots li, .g-fh-podium li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 6px 0 0 var(--c); font-size: 26px; font-weight: 900; }
.g-fh-slots li i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); }
.g-fh-slots span { color: var(--soft); font-weight: 800; }
.g-fh-kick { margin-left: auto; border: 0; background: none; font-size: 22px; color: var(--soft); cursor: pointer; }
.g-fh-podium em { margin-left: auto; font-style: normal; color: #2f78bd; }
.g-fh-btns { display: flex; gap: 12px; } .g-fh-btns .g-big { flex: 1; }
.g-fh-top { position: absolute; left: 24px; right: 24px; top: 20px; display: flex; align-items: center; gap: 18px; pointer-events: none; }
.g-fh-top .g-fh-k { padding: 10px 18px; border-radius: 18px; background: rgba(255, 253, 248, .95); }
.g-fh-time { margin: 0 auto; min-width: 120px; padding: 6px 26px; border-radius: 24px; background: rgba(35, 48, 45, .88); color: #fff; font-size: 64px; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.g-fh-time.hurry { background: #e4572e; }
.g-fh-view { margin: 0; padding: 10px 18px; border-radius: 18px; background: rgba(255, 253, 248, .95); font-size: 22px; font-weight: 900; }
.g-fh-map { position: absolute; right: 24px; top: 100px; width: 240px; height: 180px; border-radius: 20px; background: rgba(255, 253, 248, .9); box-shadow: var(--shadow); }
.g-fh-count { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font: 900 200px/1 var(--font); color: #fff; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; pointer-events: none; }
.g-fh-count.pop { animation: g-countpop .7s cubic-bezier(.2, 1.4, .4, 1); }
.g-fh-cards { position: absolute; left: 24px; right: 24px; bottom: 22px; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-fh-cards li { display: grid; grid-template-columns: 56px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; padding: 12px 20px; border-radius: 24px; background: rgba(255, 253, 248, .96); box-shadow: inset 0 -8px 0 var(--c), var(--shadow); cursor: pointer; }
.g-fh-cards li.on { box-shadow: inset 0 -8px 0 var(--c), 0 0 0 6px var(--c), var(--shadow); }
.g-fh-cards .rk { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c); color: #fff; font-size: 30px; font-weight: 900; }
.g-fh-cards b { font-size: 28px; font-weight: 900; } .g-fh-cards em { grid-row: span 2; font-style: normal; font-size: 54px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-fh-cards small { font-size: 16px; font-weight: 800; color: var(--soft); }
.g-fh-pop { position: absolute; left: 0; top: 0; padding: 4px 12px; border-radius: 999px; background: var(--c); color: #fff; font-size: 26px; font-weight: 900; pointer-events: none; transform-origin: center; white-space: nowrap; }
.g-fh-pop.bad { background: #23302d; }
.g-fh-res .g-fh-info { width: min(640px, 52vw); }
.g-fh-board { width: min(400px, 30vw); padding: 22px 24px; border-radius: 30px; background: rgba(255, 253, 248, .97); box-shadow: var(--shadow), var(--clay); }
.g-fh-board h3 { margin: 0; font-size: 28px; font-weight: 900; }
.g-fh-board > p { margin: 2px 0 12px; font-size: 16px; font-weight: 800; color: var(--soft); }
.g-fh-board ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.g-fh-board li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: #f6f9fb; font-size: 20px; font-weight: 900; }
.g-fh-board li.top { background: #fff3c4; }
.g-fh-board li span { min-width: 28px; text-align: center; color: #e8742a; }
.g-fh-board li em { margin-left: auto; font-style: normal; color: #2f78bd; }
.g-fh-tie { margin: 10px 0 0; font-size: 15px; font-weight: 900; color: #c94a2a; }
.g-fj-board { margin: 10px 0 0; font-size: 18px; font-weight: 900; text-align: center; } .g-fj-board b { color: #e8742a; font-size: 24px; }

/* ---------- 兌換碼 QR、掃 QR、攤位卡片、主持的入圍名單 ---------- */
.g-code-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.g-code-qr { display: block; width: 96px; height: 96px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 3px #f0c24a; }
.g-code-qr svg { display: block; width: 100%; height: 100%; }
.g-scan { position: relative; margin: 6px auto 10px; width: min(420px, 100%); aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #23302d; }
.g-scan video { width: 100%; height: 100%; object-fit: cover; }
.g-scan-frame { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 18px; box-shadow: 0 0 0 4px #ffd34d, 0 0 0 999px rgba(0, 0, 0, .25); }
.xp-form.g-scan-type { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.g-scan-type input { min-width: 0; }
.g-scan-open { display: block; width: 100%; margin-bottom: 8px; }
.g-scan-next { margin-top: 8px; }
.g-sc { display: grid; gap: 8px; text-align: left; }
.g-sc-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 20px; }
.g-sc-who span { font-size: 14px; font-weight: 800; color: var(--soft); }
.g-sc-who .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.g-sc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: #f6f9fb; }
.g-sc-row > span { flex: 1; min-width: 140px; font-size: 16px; font-weight: 900; }
.g-sc-row em { font-style: normal; font-weight: 900; } .g-sc-row .ok { color: #2e8a5f; } .g-sc-row .no { color: #c94a2a; } .g-sc-row .warn { color: #b06d00; }
.g-scan-btn { left: 200px; }
.g-fh-list { width: min(330px, 24vw); max-height: 80vh; overflow: auto; padding: 18px 18px 14px; border-radius: 28px; background: rgba(255, 253, 248, .97); box-shadow: var(--shadow), var(--clay); }
.g-fh-list h3 { margin: 0 0 8px; font-size: 22px; font-weight: 900; }
.g-fh-list ol { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 5px; }
.g-fh-list li { display: grid; grid-template-columns: 26px 16px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: #f6f9fb; font-size: 17px; font-weight: 900; }
.g-fh-list li.wait { opacity: .7; } .g-fh-list li.in { background: #e6f6ea; }
.g-fh-list .rk { color: #e8742a; } .g-fh-list .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.g-fh-list em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--soft); }
.g-fh-list .xp-btn { width: 100%; }
.g-fh-tag { padding: 3px 10px; border-radius: 99px; background: #fff3c4; color: #8a5a00; font-size: 15px; font-weight: 900; }
.g-fh-tag.walk { background: #e3f1ff; color: #2c6aa8; }
.g-fh-tag:empty { display: none; }
.g-fh-empty { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--soft); line-height: 1.5; }
.g-fh-lobby { gap: 28px; }
.g-fh-lobby .g-fh-qr { width: min(36vh, 380px); }
.g-fh-lobby .g-fh-info { width: min(560px, 42vw); }

/* 平板、電腦:步驟可以點,點了島上那一區放大(點了之後不再自動輪流亮) */
.g-tapnote { margin: 0 0 8px; padding: 6px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, #fff); font-size: 14px; font-weight: 900; color: var(--c2); }
.g-intro.can-focus .g-steps li { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.g-intro.can-focus .g-steps li:hover { transform: translateX(-3px); box-shadow: inset 0 0 0 2px var(--c), 0 6px 16px rgba(48, 78, 70, .12); }
.g-intro.can-focus .g-steps li:focus-visible { outline: 3px solid var(--c2); outline-offset: 2px; }
.g-intro.picked .g-steps li { animation: none; }
.g-steps li.seen .g-say2::after { content: " ✓"; color: #2e8a5f; font-weight: 900; }
/* 手機:點步驟時說明卡收下去(島上那一區放大),最下面一條講這一步 */
.g-intro { transition: transform .35s cubic-bezier(.2, .9, .3, 1), opacity .3s; }
.g-intro.peek { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; }
.g-peek { position: absolute; z-index: 37; left: 10px; right: 10px; bottom: calc(14px + var(--safe-b, 0px)); display: flex; align-items: center; gap: 10px; padding: 12px 12px 15px; border-radius: 20px; background: rgba(255, 253, 248, .97); box-shadow: 0 0 0 4px var(--c, #f4b63f), 0 12px 30px rgba(35, 48, 45, .25); overflow: hidden; animation: g-up .3s cubic-bezier(.2, .9, .3, 1); }
.g-peek-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c, #f4b63f); color: #fff; font-size: 18px; font-weight: 900; }
.g-peek p { flex: 1; margin: 0; font-size: 15px; font-weight: 800; line-height: 1.45; }
.g-peek p b { color: var(--c2, #c98a14); }
.g-peek .xp-btn { flex: none; min-height: 40px; padding: 0 12px; font-size: 14px; }
.g-peek-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 5px; background: var(--c, #f4b63f); transform-origin: left; animation: g-peekbar linear forwards; }
@keyframes g-peekbar { to { transform: scaleX(0); } }
.g-intro.picked .g-steps li.on { box-shadow: inset 0 0 0 4px var(--c), 0 8px 20px rgba(48, 78, 70, .18); background: color-mix(in srgb, var(--c) 10%, #fff); transform: translateX(-4px); }
/* 島上的標籤:一個牌子 + 一條線 + 地上一圈在閃 */
.g-focus { position: absolute; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.g-fpin { --fc: var(--c, #f4b63f); position: absolute; left: 0; top: 0; pointer-events: none; }
.g-fpin.ok { --fc: #2e8a5f; } .g-fpin.no { --fc: #e4572e; } .g-fpin.you { --fc: #2f78bd; } .g-fpin.info { --fc: #c98a14; }
.g-fpin b { position: absolute; left: 0; bottom: calc(var(--h, 30px) + 2px); transform: translateX(-50%); padding: 6px 13px; border-radius: 999px; background: #fffdf8; color: #23302d; font: 900 16px/1.25 var(--font); white-space: nowrap; box-shadow: 0 0 0 3px var(--fc), 0 6px 14px rgba(35, 48, 45, .2); animation: g-fpin .35s cubic-bezier(.2, .9, .3, 1.3) both; }
.g-fpin i { position: absolute; left: -1.5px; bottom: 0; width: 3px; height: var(--h, 30px); border-radius: 2px; background: var(--fc); }
.g-fpin::after { content: ""; position: absolute; left: -17px; top: -8px; width: 34px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 3px var(--fc); animation: g-fring 1.1s ease-out infinite; }
@keyframes g-fpin { from { transform: translateX(-50%) translateY(8px) scale(.6); opacity: 0; } }
@keyframes g-fring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.g-hud.g-flash .g-lv { animation: g-hudflash 1s ease-in-out infinite; }
@keyframes g-hudflash { 50% { box-shadow: 0 0 0 5px #ffcf3a, var(--shadow), var(--clay); } }
@media (prefers-reduced-motion: reduce) { .g-fpin b, .g-fpin::after, .g-hud.g-flash .g-lv { animation: none; } }
.g-steps li::before { counter-increment: st; content: counter(st); grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-size: 18px; font-weight: 900; }
.g-pic { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; font-size: 32px; line-height: 1; }
.g-pic .ar { font-size: 22px; color: var(--soft); animation: g-nudge 1s ease-in-out infinite; }
@keyframes g-nudge { 50% { transform: translateX(5px); } }
.g-pic .ok, .g-pic .no { padding: 3px 9px; border-radius: 999px; font: 900 15px/1.3 var(--font); color: #fff; background: #2e8a5f; }
.g-pic .no { background: #e4572e; }
.g-pic .blk { display: inline-block; width: 30px; height: 26px; border-radius: 6px; background: var(--bc); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); position: relative; }
.g-pic .blk::after { content: ""; position: absolute; left: 6px; right: 6px; top: -5px; height: 6px; border-radius: 3px 3px 0 0; background: var(--bc); filter: brightness(1.08); }
.g-pic .blk.cross { opacity: .75; }
.g-pic .bp { display: inline-flex; gap: 4px; padding: 6px 8px; border-radius: 10px; background: #f6f2e6; box-shadow: inset 0 0 0 2px var(--line); }
.g-pic .bp i { width: 18px; height: 18px; border-radius: 5px; background: var(--bc); }
.g-pic .ring { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; background: color-mix(in srgb, var(--c) 25%, #fff); box-shadow: 0 0 0 4px var(--c); animation: g-ringpulse 1.4s ease-in-out infinite; }
@keyframes g-ringpulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 40%, transparent); } }
.g-pic .chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2.5px var(--ink); font: 900 15px/1.2 var(--font); }
.g-pic .chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--bc); }
.g-pic .chip .e { font-size: 20px; }
.g-pic .bug { position: relative; display: inline-block; width: 34px; height: 30px; border-radius: 50% 50% 46% 46%; background: var(--bc); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.g-pic .bug::before { content: ""; position: absolute; left: 10px; top: -7px; width: 14px; height: 11px; border-radius: 50%; background: #2b2b33; }
.g-pic .bug::after { content: ""; position: absolute; left: 8px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #2b2b33; box-shadow: 12px 2px 0 #2b2b33, 5px 10px 0 #2b2b33; }
.g-pic .bug.run { animation: g-bugrun 1.2s ease-in-out infinite; }
@keyframes g-bugrun { 50% { transform: translateX(8px) rotate(8deg); } }
.g-pic .g-bub { display: inline-grid; place-items: center; width: 64px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e7d8ff, #a983ef 70%); color: #3d2470; font: 900 11px/1.15 var(--font); text-align: center; animation: g-float 1.6s ease-in-out infinite; }
@keyframes g-float { 50% { transform: translateY(-5px); } }
.g-say2 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.55; color: var(--ink); }
.g-say2 b { color: var(--c2); }
.g-rules { margin: 10px 2px 4px; padding: 10px 12px; border-radius: 16px; background: #eefaf6; font-size: 15px; font-weight: 800; line-height: 1.6; color: #34433f; }
.g-rules p { margin: 0; }
.g-intro-foot { flex: none; padding: 10px 16px 16px; background: var(--paper); box-shadow: 0 -6px 16px rgba(48, 78, 70, .08); text-align: center; }
.g-intro-foot .xp-btn { width: 100%; min-height: 64px; font-size: 24px; animation: xp-bob 2s ease-in-out infinite; }
.g-intro-foot small { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--soft); }
/* 計時停住時(看說明、走過橋):時間變淡、前面一個暫停記號 */
.g-clock.paused b { opacity: .55; }
.g-clock.paused b::before { content: "⏸ "; font-size: .7em; }
@media (prefers-reduced-motion: reduce) { .g-steps li, .g-pic .ar, .g-pic .ring, .g-pic .bug.run, .g-pic .g-bub, .g-intro-foot .xp-btn { animation: none; } }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .g-intro { left: 8px; right: 8px; top: calc(8px + var(--safe-t, 0px)); bottom: calc(8px + var(--safe-b, 0px)); width: auto; max-height: none; border-radius: 24px; animation: g-up .35s cubic-bezier(.2, .9, .3, 1); }
  .g-intro h2 { font-size: 23px; }
  .g-intro-head { padding: 12px 16px 8px; }
  .g-intro-body { padding: 10px 12px 4px; }
  .g-steps li { padding: 8px 10px; }
  .g-pic { font-size: 26px; min-height: 36px; }
  .g-say2 { font-size: 15px; }
  .g-intro-foot .xp-btn { min-height: 56px; font-size: 21px; }
}

/* ---------- 手機、直立平板 ---------- */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  /* 10/30 她回報:手機上排行榜被擠扁、左上角標誌按不到 → 卡片不縮,放不下就整頁往下捲;
     捲動範圍從螢幕最上面開始(從標誌下面切的話,卡片往上捲時上面兩角會被切成直角),標誌浮在開始畫面上面才按得到 */
  .g-title { flex-direction: column; justify-content: flex-start; align-items: center; gap: 12px; padding: calc(78px + var(--safe-t, 0px)) 12px calc(60px + var(--safe-b, 0px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; pointer-events: auto; }
  body.xp-game.g-title .brand { z-index: 31; }
  .g-title-card { flex-shrink: 0; padding: 18px 16px 16px; border-radius: 28px; }
  .g-isles b { width: 42px; height: 37px; font-size: 18px; }
  .g-isles span { font-size: 12px; }
  .g-big { min-width: 0; width: 100%; }
  .g-hint { display: none; }
  .g-board-card { flex-shrink: 0; width: min(470px, 100%); max-height: none; overflow: visible; padding: 14px 14px; }
  .g-hud { left: 8px; right: 8px; top: calc(8px + var(--safe-t, 0px)); flex-wrap: wrap; gap: 6px; }
  .g-lv { order: 3; flex: 1 1 100%; max-width: none; padding: 7px 12px 8px 8px; border-radius: 18px; }
  .g-lv-n { width: 36px; height: 32px; font-size: 16px; }
  .g-lv-k { font-size: 11.5px; }
  .g-lv-goal { font-size: 15px; }
  .g-prog i { width: 18px; height: 18px; }
  .g-clock { margin: 0; padding: 6px 14px 6px; border-radius: 16px; }
  .g-clock b { font-size: 26px; }
  .g-adj { font-size: 11px; }
  .g-side { margin-left: auto; gap: 6px; }
  .g-gems { padding: 6px 10px; font-size: 15px; }
  .g-gems b { font-size: 18px; }
  .g-icon { width: 40px; height: 40px; font-size: 16px; }
  .g-order { top: auto; bottom: calc(176px + var(--safe-b, 0px)); left: 8px; right: 8px; max-width: none; font-size: 14.5px; }
  .g-line { top: auto; bottom: calc(180px + var(--safe-b, 0px)); font-size: 15px; }
  .g-banner { top: 30%; min-width: 0; width: calc(100% - 32px); padding: 14px 16px 16px; }
  .g-bn-t { font-size: 28px; }
  .g-bn-s { font-size: 15.5px; }
  .g-count { font-size: 110px; }
  .g-panel { bottom: calc(8px + var(--safe-b, 0px)); padding: 14px 14px 12px; border-radius: 24px; max-height: calc(100% - 120px); }
  .g-panel.wide { top: calc(8px + var(--safe-t, 0px)); max-height: none; }
  .g-diff { grid-template-columns: 1fr; gap: 8px; }
  .g-panel.wide .g-say { display: none; }   /* 手機:圖加了字標變高,說明那行拿掉(標題已經講了),按鈕才不會被擠出畫面 */
  .g-panel.wide h3 { margin-bottom: 8px; }
  .g-diff-foot .xp-btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .g-rowc { grid-template-columns: 1fr; gap: 4px; }
  .g-chips button { min-height: 46px; font-size: 15px; }
  .g-quiz button { min-height: 52px; font-size: 16.5px; }
  .xp-joy { left: 14px; bottom: calc(42px + var(--safe-b, 0px)); width: 124px; height: 124px; }
  .xp-joy-knob { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  .g-final { font-size: 46px; }
  .g-tv-board { left: 12px; right: 12px; width: auto; }
}
/* 矮的橫向螢幕(平板橫放):開始畫面兩欄縮一點 */
@media (min-width: 901px) and (max-height: 820px) {
  .g-title { padding-top: 76px; padding-bottom: 36px; }
  .g-title-card { padding: 18px 24px 16px; }
  .g-sub { margin: 4px 0 10px; }
  .g-isles { margin-bottom: 12px; }
  .g-big { min-height: 56px; font-size: 22px; }
}
