/* theme a */
/* ==========================================================
   A — ARCADE POP (街機糖果)
   Tokens carried over from the source design system
   (DESIGN_SYSTEM.md + css/arcade-pop.css in the brief's zip):
   bg #100D1D · surfaces #21192E/#231B33/#1a1230/#251b36
   text #FFF9F2 · muted #A8A1B9 · line #39304c
   orange #FF7358 (hover #ff9873) · peach #FF8A64 · butter #FFDC78
   lime status dot #d5fd78 · masthead gradient 110deg #ff8a64→#f0756e→#d66093
   thick-bottom buttons, tilted sticker logo, dot-print texture.
   Signature here: the hero sticker stack + the high-score board.
   ========================================================== */
:root {
  --bg: #100d1d;
  --s1: #1a1230;
  --s2: #21192e;
  --s3: #251b36;
  --ink: #fff9f2;
  --mute: #a8a1b9;
  --line: #39304c;
  --orange: #ff7358;
  --orange-hi: #ff9873;
  --peach: #ff8a64;
  --butter: #ffdc78;
  --lime: #d5fd78;
  --rose: #d66093;
  --plum: #77304a;
  --plum-ink: #461130;
  --mast: linear-gradient(110deg, #ff8a64, #f0756e 52%, #d66093);
  --r: 20px;
  --r-lg: 29px;
  --wrap: 1320px;
  --gut: clamp(16px, 3.2vw, 44px);
  --f: "DM Sans", "Noto Sans TC", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--f);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 10px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 1em; height: 1em; flex: none; }

/* ---------- buttons: chunky "thick-bottom" ---------- */
.btn {
  --shadow: var(--plum);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 16px;
  font: 900 16px/1 var(--f); letter-spacing: -.01em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 0 var(--shadow);
  transform: translateY(0);
  transition: transform .12s, box-shadow .12s, background .15s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--shadow); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--shadow); }
.btn svg { font-size: 1.15em; }
.btn-butter { background: var(--butter); color: #2a1424; --shadow: #b9822f; }
.btn-orange { background: var(--orange); color: #fff9f2; --shadow: #9b3442; }
.btn-orange:hover { background: var(--orange-hi); }
.btn-dark { background: #1c1229; color: var(--butter); --shadow: #000; }
.btn-ghost { background: rgba(26, 18, 48, .55); color: var(--ink); box-shadow: inset 0 0 0 2px rgba(255, 249, 242, .55), 0 6px 0 rgba(70, 17, 48, .55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 rgba(70, 17, 48, .55); }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 19px; border-radius: 18px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; box-shadow: 0 4px 0 var(--shadow); }
.btn-sm:hover { box-shadow: 0 2px 0 var(--shadow); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(16, 13, 29, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.logo {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 8px 14px 9px; border-radius: 12px;
  background: var(--butter); color: #2a1424; text-decoration: none;
  font: 1000 21px/1 var(--f); letter-spacing: -.05em;
  transform: rotate(-3deg); box-shadow: 5px 5px 0 #ff704e;
}
.logo b { background: #2a1424; color: var(--butter); padding: 3px 6px 4px; border-radius: 7px; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { padding: 10px 12px; border-radius: 12px; color: var(--mute); text-decoration: none; font-weight: 700; font-size: 15px; }
.top-nav a:hover { color: var(--ink); background: var(--s2); }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 19px; }
.search input {
  width: 100%; height: 46px; padding: 0 16px 0 46px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--s1);
  color: var(--ink); font: 600 15px var(--f);
}
.search input::placeholder { color: #8a829c; }
.search input:focus { outline: none; border-color: var(--butter); }
.chips { display: flex; gap: 8px; padding-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line);
  background: transparent; color: var(--ink); font: 700 14px var(--f); cursor: pointer; text-decoration: none;
}
.chip:hover { border-color: var(--peach); }
.chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); }
.chip small { color: var(--mute); font-weight: 700; margin-left: 4px; }
.chip[aria-pressed="true"] small { color: #ffe3d6; }

/* ---------- hero masthead ---------- */
.hero { padding-top: 28px; }
.mast {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  min-height: 520px; padding: 56px 56px 56px 60px;
  border: 2px solid #ab5b71; border-radius: var(--r-lg);
  background: var(--mast);
}
.mast::before { /* dot-print texture */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background: radial-gradient(var(--plum-ink) 1.2px, transparent 1.2px) 0 0 / 17px 17px;
  -webkit-mask: linear-gradient(100deg, transparent 30%, #000 75%); mask: linear-gradient(100deg, transparent 30%, #000 75%);
}
.status {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px;
  padding: 8px 14px 8px 12px; border-radius: 999px; background: #25152b; color: var(--ink);
  font-weight: 800; font-size: 14px;
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(213, 253, 120, .18); }
.mast h1 {
  margin: 0; font-weight: 1000; font-size: clamp(46px, 6.4vw, 96px); line-height: .9; letter-spacing: -.065em;
  text-transform: uppercase; text-shadow: 4px 5px 0 #6f345b; color: #fff9f2;
}
.lede { max-width: 30ch; margin: 18px 0 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.4; font-weight: 600; color: #fff3ea; }
.by { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-weight: 700; font-size: 15px; color: #ffe8dc; }
.ava { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #25152b; color: var(--butter); font: 900 13px var(--f); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: 30px; }
.mast-art { position: relative; height: 440px; }
.stack {
  position: absolute; top: 50%; left: 50%; width: 220px; aspect-ratio: 9/16;
  border-radius: var(--r); overflow: hidden; border: 4px solid #fff9f2;
  box-shadow: 10px 12px 0 rgba(70, 17, 48, .55);
  transition: transform .25s;
}
.stack img, .stack .gg-fallback { width: 100%; height: 100%; object-fit: cover; }
.stack.s1 { transform: translate(-112%, -46%) rotate(-11deg); }
.stack.s2 { transform: translate(14%, -44%) rotate(9deg); }
.stack.s3 { width: 248px; transform: translate(-50%, -52%) rotate(-2deg); z-index: 2; }
.stack.s1:hover { transform: translate(-116%, -50%) rotate(-13deg); }
.stack.s2:hover { transform: translate(18%, -48%) rotate(11deg); }
.stack.s3:hover { transform: translate(-50%, -55%) rotate(0); }
.star { position: absolute; right: -6px; top: -26px; font: 1000 150px/1 var(--f); color: var(--butter); transform: rotate(14deg); z-index: 3; pointer-events: none; text-shadow: 5px 5px 0 #9b3442; }
.sticker {
  position: absolute; z-index: 4; left: 4%; bottom: 6px;
  padding: 10px 14px; border-radius: 12px; background: var(--lime); color: #1c1229;
  font: 900 14px/1 var(--f); transform: rotate(-6deg); box-shadow: 4px 4px 0 #1c1229;
}

/* ---------- sections ---------- */
.sec { padding-top: 64px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sec-head h2 { margin: 0; font-weight: 1000; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; letter-spacing: -.05em; }
.sec-head p { margin: 6px 0 0; color: var(--mute); font-weight: 600; }
.sec-head .tag { display: inline-block; margin-left: 10px; padding: 6px 10px; border-radius: 10px; background: var(--butter); color: #2a1424; font: 900 13px/1 var(--f); letter-spacing: 0; vertical-align: middle; transform: rotate(-3deg); }
.more { flex: none; color: var(--peach); font-weight: 800; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.more:hover { color: var(--butter); }

/* cards */
.row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.card { display: block; text-decoration: none; color: inherit; }
.card-art { position: relative; aspect-ratio: 9/16; border-radius: var(--r); overflow: hidden; background: var(--s2); border: 2px solid var(--line); transition: transform .18s, border-color .18s, box-shadow .18s; }
.card-art img, .card-art .gg-fallback { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-art { transform: translateY(-4px) rotate(-1.2deg); border-color: var(--peach); box-shadow: 6px 8px 0 #2b1a3a; }
.badge { position: absolute; left: 10px; top: 10px; padding: 6px 9px; border-radius: 9px; background: var(--butter); color: #2a1424; font: 900 12px/1 var(--f); transform: rotate(-4deg); }
.badge.new { background: var(--lime); }
.card-meta { padding: 12px 2px 0; }
.card-meta b { display: block; font-weight: 900; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta small { display: block; margin-top: 3px; color: var(--mute); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* high-score board (Trending) */
.board { border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--s1); padding: 10px 26px 18px; }
.board-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.board-legend { display: grid; grid-template-columns: 56px 1fr 80px; padding: 12px 8px; color: var(--mute); font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px dashed var(--line); }
.board-legend span:last-child { text-align: right; }
.board ol { list-style: none; margin: 0; padding: 0; }
.board li a { display: grid; grid-template-columns: 56px 44px minmax(0, 1fr) 80px; gap: 14px; align-items: center; padding: 10px 8px; border-radius: 14px; text-decoration: none; }
.board li a:hover { background: var(--s3); }
.rank { font: 700 24px/1 var(--mono); color: var(--mute); }
.board li:nth-child(-n+3) .rank { color: var(--butter); }
.board-cols > div + div li .rank { color: var(--mute); }
.thumb { width: 44px; aspect-ratio: 9/16; border-radius: 9px; overflow: hidden; }
.thumb img, .thumb .gg-fallback { width: 100%; height: 100%; object-fit: cover; }
.bt b { display: block; font-weight: 900; font-size: 17px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt small { display: block; color: var(--mute); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { text-align: right; font: 700 20px/1 var(--mono); color: var(--ink); }
.score small { display: block; margin-top: 4px; font-size: 10px; color: var(--mute); letter-spacing: .06em; }

/* categories */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cat {
  --c: var(--orange); --t: #fff9f2;
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px; padding: 20px 22px; border: 0; border-radius: var(--r);
  background: var(--c); color: var(--t); text-align: left; cursor: pointer;
  font-family: var(--f); box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
  transition: transform .15s;
}
.cat:hover { transform: translateY(-3px) rotate(-.6deg); }
.cat[aria-pressed="true"] { outline: 4px solid var(--ink); outline-offset: 3px; }
.cat b { position: relative; z-index: 2; font-weight: 1000; font-size: 30px; line-height: 1; letter-spacing: -.05em; }
.cat small { position: relative; z-index: 2; font-weight: 800; font-size: 14px; opacity: .85; }
.cat .peek { position: absolute; right: 14px; top: 16px; width: 74px; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .9); transform: rotate(8deg); box-shadow: 4px 4px 0 rgba(0, 0, 0, .25); }
.cat .peek + .peek { right: 70px; top: 34px; transform: rotate(-7deg); }
.cat .peek img, .cat .peek .gg-fallback { width: 100%; height: 100%; object-fit: cover; }
.cat:nth-child(6n+1) { --c: var(--orange); }
.cat:nth-child(6n+2) { --c: var(--butter); --t: #2a1424; }
.cat:nth-child(6n+3) { --c: var(--rose); }
.cat:nth-child(6n+4) { --c: var(--lime); --t: #1c1229; }
.cat:nth-child(6n+5) { --c: #6c4ad6; }
.cat:nth-child(6n+6) { --c: var(--peach); --t: #2a1424; }
.cat-results { margin-top: 24px; }
.cat-results[hidden] { display: none; }
.cat-results h3 { margin: 0 0 14px; font-weight: 900; font-size: 20px; letter-spacing: -.03em; }

/* face band */
.face { margin-top: 72px; background: var(--butter); color: #2a1424; position: relative; overflow: hidden; }
.face::before { content: ""; position: absolute; inset: 0; background: radial-gradient(#e7b85a 1.3px, transparent 1.3px) 0 0 / 18px 18px; opacity: .7; }
.face-in { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.kicker { display: inline-block; margin: 0 0 14px; padding: 7px 12px; border-radius: 10px; background: #2a1424; color: var(--butter); font: 900 13px/1 var(--f); transform: rotate(-3deg); }
.face h2 { margin: 0; font-weight: 1000; font-size: clamp(40px, 5vw, 76px); line-height: .9; letter-spacing: -.065em; text-transform: uppercase; text-shadow: 4px 4px 0 #ff8a64; }
.face p.lead { max-width: 34ch; margin: 18px 0 26px; font-weight: 700; font-size: 18px; }
.face .note { display: block; margin-top: 14px; font-weight: 700; font-size: 13px; opacity: .7; }
.fan { display: flex; justify-content: center; align-items: flex-end; height: 380px; }
.fan a { width: 170px; flex: none; aspect-ratio: 9/16; margin: 0 -18px; border-radius: 18px; overflow: hidden; border: 4px solid #2a1424; box-shadow: 6px 8px 0 #2a1424; transition: transform .2s; }
.fan a img, .fan a .gg-fallback { width: 100%; height: 100%; object-fit: cover; }
.fan a:nth-child(1) { transform: rotate(-12deg) translateY(26px); }
.fan a:nth-child(2) { transform: rotate(-6deg) translateY(6px); }
.fan a:nth-child(3) { transform: rotate(0) translateY(-6px); z-index: 2; }
.fan a:nth-child(4) { transform: rotate(6deg) translateY(6px); }
.fan a:nth-child(5) { transform: rotate(12deg) translateY(26px); }
.fan a:hover { transform: translateY(-18px) rotate(0); z-index: 3; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 0; }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 32px; align-items: center; padding-top: 34px; padding-bottom: 40px; }
.foot p { margin: 0; color: var(--mute); font-weight: 600; font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.foot nav a:hover { color: var(--butter); text-decoration: underline; }
.foot .fine { grid-column: 1 / -1; font-size: 12px; }
.foot .logo { justify-self: start; }

/* ==========================================================
   GAME PAGE
   ========================================================== */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; color: var(--mute); font-weight: 700; font-size: 14px; }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.play-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 36px; align-items: start; padding-top: 18px; }
.cab { border-radius: var(--r-lg); background: var(--s1); border: 2px solid var(--line); overflow: hidden; }
.cab-marquee { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--mast); color: #fff9f2; font-weight: 900; }
.cab-marquee span { padding: 5px 9px; border-radius: 8px; background: #25152b; font-size: 12px; }
.cab-marquee b { font-weight: 1000; letter-spacing: -.03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-stage { position: relative; display: grid; place-items: center; height: 720px; padding: 32px; overflow: hidden; background: #0b0816; }
.cab-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.3); opacity: .5; }
.cab-stage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(var(--plum-ink) 1.2px, transparent 1.2px) 0 0 / 17px 17px; opacity: .35; pointer-events: none; }
.phone {
  position: relative; z-index: 2; height: 100%; aspect-ratio: 9/16; max-width: 100%;
  border-radius: 34px; overflow: hidden; background: #000;
  border: 10px solid #1c1229; box-shadow: 0 0 0 2px #3c2a52, 12px 14px 0 rgba(0, 0, 0, .45);
}
.phone > img, .phone > .gg-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-ui, .load-ui, .ready-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding: 26px; text-align: center; }
.cover-ui { background: linear-gradient(180deg, transparent 45%, rgba(16, 13, 29, .9)); }
.cover-ui small { color: #ffe8dc; font-weight: 700; font-size: 13px; }
.load-ui, .ready-ui { display: none; justify-content: center; background: rgba(16, 13, 29, .86); backdrop-filter: blur(6px); font-weight: 800; }
.is-loading .load-ui, .is-ready .ready-ui { display: flex; }
.is-loading .cover-ui, .is-ready .cover-ui { display: none; }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 5px solid rgba(255, 220, 120, .25); border-top-color: var(--butter); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ready-ui b { font-size: 22px; font-weight: 1000; letter-spacing: -.03em; }
.ready-ui p { max-width: 26ch; margin: 0; color: var(--mute); font-weight: 600; font-size: 14px; }
.ready-ui a { color: var(--butter); font-weight: 900; }
.cab-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-top: 2px solid var(--line); }
.ctl { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--s2); color: var(--ink); font: 800 14px var(--f); cursor: pointer; text-decoration: none; }
.ctl:hover { border-color: var(--peach); }
.ctl svg { font-size: 18px; }
.cab-controls .hint { margin-left: auto; color: var(--mute); font: 700 12px var(--mono); letter-spacing: .04em; }

.info-wrap { position: sticky; top: 100px; }
.info .cat-tag { display: inline-block; padding: 7px 11px; border-radius: 10px; background: var(--butter); color: #2a1424; font: 900 13px/1 var(--f); transform: rotate(-3deg); text-decoration: none; }
.info h1 { margin: 16px 0 0; font-weight: 1000; font-size: clamp(38px, 4.2vw, 64px); line-height: .92; letter-spacing: -.06em; text-transform: uppercase; text-shadow: 3px 4px 0 #6f345b; overflow-wrap: anywhere; }
.info .by { color: var(--mute); margin-top: 16px; }
.info .by b { color: var(--ink); }
.info .desc { margin: 16px 0 0; font-size: 18px; font-weight: 600; line-height: 1.45; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.stat { padding: 8px 12px; border-radius: 10px; background: var(--s2); border: 2px solid var(--line); font: 700 13px var(--mono); color: var(--mute); }
.stat b { color: var(--ink); }
.cta-box { margin-top: 26px; padding: 22px; border-radius: var(--r); background: var(--s2); border: 2px solid var(--line); }
.cta-box h2 { margin: 0 0 4px; font-weight: 1000; font-size: 20px; letter-spacing: -.03em; }
.cta-box p { margin: 0 0 18px; color: var(--mute); font-weight: 600; font-size: 14px; }
.cta-box .btn { width: 100%; }
.cta-box .btn + .btn { margin-top: 16px; }
.cta-box small { display: block; margin-top: 14px; color: var(--mute); font-size: 12px; font-weight: 600; }
.info-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1200px) {
  .top-nav { display: none; }
  .row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .row > :nth-child(n+5) { display: none; }
  .row.all > :nth-child(n+5) { display: block; }
  .play-layout { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 26px; }
  .cab-stage { height: 640px; }
}
@media (max-width: 1024px) {
  .mast { padding: 44px 36px; min-height: 460px; }
  .mast-art { height: 380px; }
  .stack { width: 180px; }
  .stack.s3 { width: 206px; }
  .star { font-size: 110px; }
  .board-cols { grid-template-columns: 1fr; }
  .board-cols > div + div .board-legend { display: none; }
  .face-in { grid-template-columns: 1fr; gap: 24px; }
  .fan { height: 320px; }
  .fan a { width: 148px; }
  .play-layout { grid-template-columns: 1fr; }
  .info-wrap { position: static; }
  .cab-stage { height: 700px; }
  .info-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .info-wrap .cta-box { margin-top: 0; }
}
@media (max-width: 860px) {
  .mast { grid-template-columns: 1fr; padding: 34px 26px 26px; }
  .mast-art { height: 340px; order: -1; margin: -8px 0 0; }
  .row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row > :nth-child(n+4) { display: none; }
  .row.all > :nth-child(n+4) { display: block; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .foot-in { grid-template-columns: 1fr; }
  .info-wrap { grid-template-columns: 1fr; }
  .info-wrap .cta-box { margin-top: 24px; }
}
@media (max-width: 640px) {
  .top-in { gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 12px; }
  .logo { font-size: 18px; }
  .top .make { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .search input { height: 44px; }
  .chips { padding-top: 12px; }
  .hero { padding-top: 18px; }
  .mast { padding: 22px 18px 24px; border-radius: 24px; gap: 8px; }
  .mast-art { height: 300px; }
  .stack { width: 138px; border-width: 3px; }
  .stack.s3 { width: 160px; }
  .stack.s1 { transform: translate(-108%, -46%) rotate(-11deg); }
  .star { font-size: 84px; right: 0; top: -14px; }
  .sticker { font-size: 12px; left: 0; bottom: 0; }
  .mast h1 { font-size: 46px; text-shadow: 3px 4px 0 #6f345b; }
  .actions { margin-top: 22px; }
  .actions .btn { flex: 1 1 100%; }
  .sec { padding-top: 48px; }
  .sec-head { margin-bottom: 16px; }
  .sec-head .tag { display: none; }
  /* rows become swipe strips */
  .row, .row.all { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gut) * -1); padding: 4px var(--gut) 10px; scrollbar-width: none; }
  .row::-webkit-scrollbar { display: none; }
  .row > *, .row > :nth-child(n) { display: block; flex: 0 0 42%; scroll-snap-align: start; }
  .board { padding: 6px 12px 12px; border-radius: 22px; }
  .board-legend { grid-template-columns: 40px 1fr 60px; }
  .board li a { grid-template-columns: 34px 38px minmax(0, 1fr) 54px; gap: 10px; padding: 9px 4px; }
  .rank { font-size: 18px; }
  .thumb { width: 38px; }
  .score { font-size: 16px; }
  .bt b { font-size: 15px; }
  .cats { gap: 12px; }
  .cat { min-height: 124px; padding: 16px; }
  .cat b { font-size: 24px; }
  .cat .peek { width: 54px; right: 10px; top: 12px; }
  .cat .peek + .peek { display: none; }
  .face { margin-top: 56px; }
  .face-in { padding-top: 44px; padding-bottom: 40px; }
  .face .btn { width: 100%; }
  .fan { height: 250px; }
  .fan a { width: 86px; margin: 0 -12px; border-width: 3px; border-radius: 14px; box-shadow: 4px 5px 0 #2a1424; }
  .crumbs { padding-top: 14px; }
  .cab { margin: 0 calc(var(--gut) * -1); border-radius: 0; border-left: 0; border-right: 0; }
  .cab-stage { height: auto; padding: 18px; }
  .phone { height: auto; width: min(100%, 340px); border-width: 8px; border-radius: 28px; }
  .cab-controls .hint { display: none; }
  .cab-controls .ctl { flex: 1; justify-content: center; }
  .info h1 { font-size: 42px; }
}

/* common */
/* 共用元件樣式（從設計稿 common.js 複製，拿掉設計稿切換列） */
#gg-toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:90;padding:12px 18px;border-radius:999px;background:#111;color:#fff;font:600 14px/1 -apple-system,sans-serif;transition:.25s;box-shadow:0 10px 30px rgba(0,0,0,.35)}
#gg-toast.on{opacity:1;transform:translate(-50%,0)}
#gg-report{border:0;border-radius:18px;padding:0;max-width:420px;width:calc(100% - 32px);background:#fff;color:#16161b;box-shadow:0 30px 80px rgba(0,0,0,.45)}
#gg-report::backdrop{background:rgba(0,0,0,.55)}
.gg-report-form{padding:22px;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.gg-report-form h2{margin:0 0 4px;font-size:20px}
.gg-report-game{margin:0 0 14px;color:#5e5e66}
.gg-report-form fieldset{border:0;padding:0;margin:0 0 12px;display:grid;gap:8px}
.gg-report-form legend{font-weight:700;margin-bottom:6px}
.gg-report-form label{display:flex;gap:8px;align-items:center;padding:10px 12px;border:1px solid #e4e4e8;border-radius:10px;cursor:pointer}
.gg-report-note{font-size:13px;color:#7a7a84;margin:0 0 14px}
.gg-report-actions{display:flex;gap:8px;justify-content:flex-end}
.gg-report-actions button{font:700 14px/1 inherit;padding:12px 16px;border-radius:999px;border:1px solid #d6d6dc;background:#fff;cursor:pointer}
.gg-report-actions .gg-r-send{background:#16161b;color:#fff;border-color:#16161b}
.gg-search-results{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:70;display:none;padding:6px;border-radius:16px;background:#fff;color:#16161b;box-shadow:0 20px 50px rgba(0,0,0,.35);text-align:left}
.gg-search-results.on{display:grid;gap:2px}
.gg-search-results a{display:flex;gap:10px;align-items:center;padding:6px;border-radius:10px;color:inherit;text-decoration:none}
.gg-search-results a:hover,.gg-search-results a:focus{background:#f1f1f4}
.gg-search-results b{display:block;font-size:14px}
.gg-search-results small{color:#6c6c75;font-size:12px}
.gg-sr-img{width:32px;height:56px;object-fit:cover;border-radius:6px;flex:none}
.gg-sr-empty{margin:0;padding:10px;font-size:14px;color:#5e5e66}
.gg-fallback{display:flex;align-items:flex-end;padding:12px;background:linear-gradient(160deg,#ff8a64,#6a3dff);color:#fff;font:800 16px/1.1 sans-serif}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

:root{--gg-bg:#100d1d;--gg-card:#1a1230;--gg-ink:#fff9f2;--gg-mute:#a8a1b9;--gg-line:#39304c;--gg-acc:#ffdc78;--gg-acc-ink:#100d1d}
/* portal */
/* portal.css — 三版共用的「正式站」補充樣式（設計稿沒有的：播放中、全螢幕、第三方卡、搜尋頁、404、語言鈕…）
   顏色一律吃 build 注入的 --gg-* 變數（每版不同）。 */
html, body { overflow-x: hidden; }
img { max-width: 100%; }
.gg-skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 14px; background: var(--gg-acc); color: var(--gg-acc-ink); font-weight: 700; border-radius: 0 0 10px 0; }
.gg-skip:focus { left: 0; }

/* ---------- 播放器狀態 ---------- */
.ready-ui { display: none !important; }
[data-player] .load-ui { display: none; }
[data-player].is-loading .load-ui { display: flex; }
.is-playing .cover-ui, .is-playing .load-ui, .is-playing .scrim, .is-playing [data-frame-host] > img, .is-playing .gg-tp-cover { display: none !important; }
[data-frame-host] { position: relative; }
.gg-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; background: #000; display: block; }
[data-click-anywhere] [data-frame-host] { cursor: pointer; }
.is-playing [data-frame-host] { cursor: auto; }
/* 封面上的 PLAY 圖案在下方 ~15%：真按鈕往上抬，別蓋住它（三版都套） */
[data-player] .cover-ui { padding-bottom: 30%; }

/* 偽全螢幕（iOS Safari 等不給 requestFullscreen 時） */
.gg-pseudo-fs { position: fixed !important; inset: 0 !important; z-index: 9999 !important; margin: 0 !important; width: 100vw !important; height: 100vh !important; max-width: none !important; border-radius: 0 !important; background: #000 !important; padding: 0 !important; display: block !important; }
.gg-pseudo-fs [data-frame-host] { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; border: 0 !important; aspect-ratio: auto !important; }
.gg-pseudo-fs .gg-fs-bar { display: flex; }
.gg-noscroll { overflow: hidden !important; }
.gg-fs-bar { display: none; position: absolute; top: 10px; right: 10px; z-index: 10; }
.gg-fs-bar button { font: 700 13px/1 sans-serif; padding: 10px 14px; border-radius: 999px; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; }
:fullscreen [data-frame-host] { max-height: 100vh; }

/* ---------- 橫式（529、562）大框 ---------- */
.gg-land-page .play-layout, .gg-land-page .play { grid-template-columns: minmax(0, 1fr) !important; }
.gg-land-page .info-wrap { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gg-land-page .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); position: static; }
.gg-land .cab-stage { height: auto; padding: 24px; }
.gg-land .phone, .gg-land .screen { height: auto !important; width: 100% !important; max-width: 100% !important; max-height: none !important; aspect-ratio: 16 / 9 !important; border-radius: 18px; }
.gg-land .phone > img, .gg-land .screen > img { object-fit: contain; background: #000; }
.gg-land .cover-ui { padding-bottom: 7%; }
.gg-land.stage { flex-direction: column; align-items: stretch; }
.gg-land .side-rail, .gg-land .rail { position: static !important; display: flex !important; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 4px 0 0 !important; }
.gg-land .rail .rb { color: var(--gg-ink); text-shadow: none; }

/* ---------- 語言鈕、DEV 徽章 ---------- */
.gg-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--gg-line); background: transparent; color: var(--gg-ink); font: 700 13px/1 inherit; cursor: pointer; white-space: nowrap; flex: none; }
.gg-lang:hover { border-color: var(--gg-ink); }
.gg-dev { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #ff3b30; color: #fff; font: 800 11px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .06em; vertical-align: middle; }

/* ---------- 區塊標頭（共用頁：分類、搜尋、第三方） ---------- */
.gg-page { padding-bottom: 24px; min-width: 0; }
.gg-cat-head { padding: 26px 0 6px; }
.gg-cat-head h1 { margin: 0; font-size: clamp(32px, 5vw, 60px); line-height: 1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.gg-cat-head p { margin: 10px 0 0; color: var(--gg-mute); font-size: 16px; max-width: 60ch; }
.gg-sec-h { margin: 30px 0 14px; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gg-sec-h small { font-size: 14px; color: var(--gg-mute); font-weight: 500; }
.gg-empty { margin: 18px 0; color: var(--gg-mute); text-align: center; font-size: 15px; }
.gg-more-wrap { display: grid; justify-items: center; margin: 22px 0 8px; }
.gg-more-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--gg-ink); background: transparent; color: var(--gg-ink); font: 700 15px/1 inherit; cursor: pointer; }
.gg-more-btn:hover { background: var(--gg-ink); color: var(--gg-bg); }
.gg-more-btn[disabled] { opacity: .6; cursor: progress; }
.gg-more-sub { margin: 4px 0 0; color: var(--gg-mute); font-size: 14px; }

/* GG 小卡格（分類、搜尋、第三方頁的 GG 區） */
.gg-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.gg-scard { display: grid; gap: 6px; color: var(--gg-ink); text-decoration: none; min-width: 0; }
.gg-scard-art { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--gg-card); }
.gg-scard-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gg-scard:hover .gg-scard-art img { transform: scale(1.04); }
.gg-scard b { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-scard small { color: var(--gg-mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-scard .gg-badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: var(--gg-acc); color: var(--gg-acc-ink); font-size: 11px; font-weight: 800; }

/* 第三方卡格 */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.tp-card { display: grid; gap: 5px; align-content: start; color: var(--gg-ink); text-decoration: none; min-width: 0; }
.tp-art { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--gg-card); border: 1px solid var(--gg-line); }
.tp-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tp-card:hover .tp-art img { transform: scale(1.05); }
.tp-card b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tp-card small { color: var(--gg-mute); font-size: 12px; }

/* 分類頁上方的分類跳轉 */
.gg-catnav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 8px; }
.gg-catnav::-webkit-scrollbar { display: none; }
.gg-catnav a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--gg-line); color: var(--gg-ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.gg-catnav a[aria-current] { background: var(--gg-ink); color: var(--gg-bg); border-color: var(--gg-ink); }

/* ---------- 第三方遊戲頁 ---------- */
.gg-tp { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 28px; align-items: start; padding-top: 18px; }
.gg-tp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; font-size: 14px; color: var(--gg-mute); }
.gg-tp-crumbs a { color: var(--gg-mute); text-decoration: none; font-weight: 600; }
.gg-tp-crumbs a:hover { color: var(--gg-ink); }
.gg-tp-stage { position: relative; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--gg-line); }
.gg-tp-stage [data-frame-host] { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; }
.gg-tp-cover { position: absolute; inset: 0; display: block; overflow: hidden; }
.gg-tp-cover .bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); max-width: none; object-fit: cover; filter: blur(24px) saturate(1.2); opacity: .55; }
.gg-tp-cover .fg { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(46%, 384px); height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.gg-tp-stage .cover-ui { position: absolute; left: 0; right: 0; bottom: 0; top: auto; z-index: 3; display: grid; justify-items: center; gap: 8px; padding: 16px !important; text-align: center; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.gg-tp-stage .cover-ui small { color: #e8e8ee; font-size: 12px; font-weight: 600; }
.gg-tp-stage .load-ui { position: absolute; inset: 0; z-index: 3; align-items: center; justify-content: center; background: rgba(0,0,0,.7); color: #fff; }
.gg-tp-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: var(--gg-card); border-top: 1px solid var(--gg-line); }
.gg-tp-bar button, .gg-tp-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--gg-line); background: transparent; color: var(--gg-ink); font: 600 14px/1 inherit; cursor: pointer; text-decoration: none; }
.gg-tp-bar svg { width: 18px; height: 18px; }
.gg-tp-ext { display: grid; grid-template-columns: minmax(0, 192px) minmax(0, 1fr); gap: 22px; align-items: center; padding: 24px; border-radius: 20px; background: var(--gg-card); border: 1px solid var(--gg-line); }
.gg-tp-ext img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.gg-tp-ext p { margin: 10px 0 0; color: var(--gg-mute); font-size: 13px; }
.gg-tp-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 28px; border-radius: 16px; background: var(--gg-acc); color: var(--gg-acc-ink); font: 800 18px/1.15 inherit; text-decoration: none; text-align: center; box-shadow: 0 8px 22px -10px var(--gg-acc); }
.gg-tp-go:hover { filter: brightness(1.06); }
.gg-tp-go svg { width: 20px; height: 20px; flex: none; }
.gg-tp-go span small { display: block; font-size: 13px; font-weight: 600; opacity: .8; }
.gg-tp-info h1 { margin: 10px 0 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.02; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gg-tp-info .gg-tp-cat { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gg-line); color: var(--gg-ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.gg-tp-info .gg-tp-desc { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--gg-ink); overflow-wrap: anywhere; }
.gg-tp-info .gg-tp-owner { margin: 14px 0 0; font-size: 13px; color: var(--gg-mute); }
.gg-tp-info .gg-tp-owner button { padding: 0; border: 0; background: none; color: var(--gg-ink); font: inherit; text-decoration: underline; cursor: pointer; }
.gg-tp-cta { margin-top: 22px; padding: 22px; border-radius: 20px; background: var(--gg-card); border: 1px solid var(--gg-line); }
.gg-tp-cta h2 { margin: 0; font-size: 22px; }
.gg-tp-cta p { margin: 8px 0 16px; color: var(--gg-mute); font-size: 15px; }
.gg-tp-cta a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--gg-ink); color: var(--gg-bg); font: 700 15px/1 inherit; text-decoration: none; }
.gg-tp-cta a svg { width: 18px; height: 18px; }
.gg-tp-cta small { display: block; margin-top: 10px; color: var(--gg-mute); font-size: 12px; }
.gg-tp-cover-sm { display: none; }

/* ---------- 404 ---------- */
.gg-nf { padding: 40px 0 10px; text-align: center; }
.gg-nf b.gg-nf-code { display: block; font-size: clamp(80px, 16vw, 160px); line-height: .9; letter-spacing: -.05em; color: var(--gg-acc); -webkit-text-stroke: 2px var(--gg-ink); }
.gg-nf h1 { margin: 12px 0 0; font-size: clamp(26px, 4vw, 42px); }
.gg-nf p { margin: 10px auto 18px; max-width: 46ch; color: var(--gg-mute); }
.gg-nf a.gg-nf-home { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--gg-ink); color: var(--gg-bg); font-weight: 700; text-decoration: none; }

/* 壞圖退回 */
img.gg-img-fallback { object-fit: cover; }

@media (max-width: 900px) {
  .gg-tp { grid-template-columns: minmax(0, 1fr); }
  .gg-land-page .info-wrap, .gg-land-page .panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .gg-sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .gg-tp-ext { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .gg-tp-ext img { max-width: 240px; }
  .gg-tp-go { width: 100%; }
  .gg-tp-cover .fg { width: 60%; }
  .gg-sec-h { font-size: 19px; }
}

/* fixes */
/* A 版修正（建站加的，設計稿沒有） */
.cab-stage .phone .cover-ui { padding-bottom: 30%; }
.gg-land .cab-stage .phone .cover-ui { padding-bottom: 7%; }
.top-in .search { min-width: 0; }
