/* 球場人格 PITCH PERSONA
   視覺沿用 TechPlain：#060121 靛黑底、鋼藍光、Archivo＋台北黑體；標題一律白字，品牌色只當點綴。
   球場綠 = TechPlain 科技綠 #0FC38F（同意、A 端）；天空藍 = TechPlain 微軟藍 #2A93E4（不同意、B 端）。
   字型目前直接讀 anim\fonts（從 anim 根目錄開 server）；正式上線前要把台北黑體裁成只含用到的字。 */

@font-face { font-family: 'Archivo'; src: url('fonts/Archivo-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --bg: #060121;
  --ink: #F7F8FA;
  --ink-2: rgba(247, 248, 250, .74);
  --ink-3: rgba(247, 248, 250, .50);
  --ink-4: rgba(247, 248, 250, .30);
  --line: rgba(247, 248, 250, .10);
  --line-2: rgba(247, 248, 250, .18);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  --pitch: #0FC38F;
  --pitch-hi: #55E3B0;
  --pitch-rgb: 15, 195, 143;
  --sky: #2A93E4;
  --sky-hi: #63B6F7;
  --sky-rgb: 42, 147, 228;
  --flood: #FFE7A3;
  --f: 'Archivo', 'Taipei Sans TC', 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, .75, .2);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
img, svg { display: block; }

/* ---------- 背景：夜間球場 ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(115% 80% at 90% 102%, rgba(32, 116, 182, .55) 0%, rgba(20, 68, 118, .22) 40%, rgba(20, 68, 118, 0) 68%),
    radial-gradient(85% 65% at 4% -4%, rgba(18, 26, 84, .95) 0%, rgba(18, 26, 84, 0) 60%),
    linear-gradient(115deg, #0A0C36 0%, #060121 62%);
}
.bg-flood {
  position: absolute; top: -26vh; width: 72vw; height: 120vh;
  background: radial-gradient(46% 62% at 50% 0%, rgba(206, 226, 255, .17) 0%, rgba(206, 226, 255, .05) 45%, rgba(206, 226, 255, 0) 72%);
  transform-origin: 50% 0;
  animation: floodOn 2.2s steps(1, end) both, sway 16s ease-in-out 2.2s infinite alternate;
}
.bg-flood--l { left: -24vw; --r: -26deg; transform: rotate(var(--r)); }
.bg-flood--r { right: -24vw; --r: 26deg; transform: rotate(var(--r)); animation-delay: .25s, 2.4s; }
.bg-pitch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: #fff; stroke-width: 1.4; opacity: .13;
  transition: opacity .8s ease;
}
.bg-pitch > :not(.spot) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: chalk 2.8s var(--ease-out) .3s forwards; }
.bg-pitch .spot { fill: #fff; stroke: none; }
body:not([data-screen="landing"]) .bg-pitch { opacity: .06; }
body[data-screen="quiz"] .bg-pitch { opacity: .04; }
.bg-grain {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- 頁首 ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-left));
  max-width: 1120px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 12px; }
.brand:focus-visible { outline: 2px solid var(--pitch-hi); outline-offset: 3px; }
/* 左上角品牌：網站自己的比賽球（index.html 的 #pp-ball），進場時滾進來 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand-ball { width: 32px; height: 32px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); animation: ballRoll 1s var(--ease-out) .1s both; }
.brand:hover .brand-ball { animation: ballSpin .7s var(--ease-out); }
@keyframes ballRoll { from { opacity: 0; transform: translateX(-26px) rotate(-300deg); } to { opacity: 1; transform: none; } }
@keyframes ballSpin { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.brand-en { font-size: 9.5px; font-weight: 700; letter-spacing: .32em; color: var(--ink-3); margin-top: 3px; }
.topbar-by { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }

/* ---------- 版面 ---------- */
.stage { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 108px 16px 40px; }
.screen { display: none; }
.screen.is-active { display: block; animation: screenIn .6s var(--ease-out) both; }

/* ---------- 共用按鈕 ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 9px 9px 9px 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--bg);
  font-size: 17px; font-weight: 700; letter-spacing: .06em;
  box-shadow: 0 14px 40px rgba(var(--pitch-rgb), .18), 0 2px 0 rgba(255, 255, 255, .4) inset;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 48px rgba(var(--pitch-rgb), .30), 0 2px 0 rgba(255, 255, 255, .4) inset; }
.cta:active { transform: translateY(0) scale(.98); }
.cta:focus-visible { outline: 3px solid var(--pitch-hi); outline-offset: 4px; }
.cta-arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--pitch); transition: transform .25s var(--ease-out); }
.cta-arrow svg { width: 20px; height: 20px; fill: none; stroke: #03140E; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cta:hover .cta-arrow { transform: translateX(4px); }

.text-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--ink-2); font-size: 14px; letter-spacing: .04em;
  transition: color .2s;
}
.text-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.text-btn:hover:not(:disabled) { color: var(--ink); }
.text-btn:disabled { opacity: .28; cursor: default; }
.text-btn:focus-visible { outline: 2px solid var(--pitch-hi); outline-offset: 2px; border-radius: 6px; }

/* ---------- 首頁 ---------- */
.hero { padding: 6vh 0 8px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; letter-spacing: .18em; color: var(--ink-2); animation: rise .8s var(--ease-out) .2s both; }
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pitch); box-shadow: 0 0 0 0 rgba(var(--pitch-rgb), .6); animation: ping 2.4s ease-out 1.4s infinite; }
.hero-title { margin: 20px 0 22px; font-size: clamp(46px, 10vw, 96px); line-height: 1.08; font-weight: 700; letter-spacing: .02em; }
.hero-title .line { display: block; animation: rise 1s var(--ease-out) both; }
.hero-title .line:nth-child(1) { animation-delay: .35s; }
.hero-title .line:nth-child(2) { animation-delay: .5s; }
.r-line { text-wrap: balance; }
.nb { display: inline-block; }
.hero-lead { max-width: 30em; margin: 0; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.8; color: var(--ink-2); animation: rise 1s var(--ease-out) .65s both; }
.hero-cta { margin-top: 36px; animation: rise 1s var(--ease-out) .8s both; }
.cta-meta { margin: 14px 0 0 6px; font-size: 13px; letter-spacing: .06em; color: var(--ink-3); }
.resume { margin-top: 18px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--pitch-hi); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 64px; }
.mode {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  animation: rise .9s var(--ease-out) both;
}
.mode:nth-child(1) { animation-delay: 1s; }
.mode:nth-child(2) { animation-delay: 1.08s; }
.mode:nth-child(3) { animation-delay: 1.16s; }
.mode.is-open { border-color: rgba(var(--pitch-rgb), .45); box-shadow: 0 0 0 1px rgba(var(--pitch-rgb), .12) inset, 0 18px 40px rgba(0, 0, 0, .25); }
.mode:not(.is-open) .mode-icon, .mode:not(.is-open) .mode-body { opacity: .55; }
.mode-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .06); }
.mode-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.mode.is-open .mode-icon { background: rgba(var(--pitch-rgb), .14); }
.mode.is-open .mode-icon svg { stroke: var(--pitch-hi); }
.mode-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.mode-text { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.mode-tag { position: absolute; top: 10px; right: 12px; font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.mode-tag--open { color: var(--pitch-hi); }
.mode-tag--open::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--pitch); vertical-align: 1px; }

.axes-preview { margin-top: 56px; animation: rise .9s var(--ease-out) 1.25s both; }
.section-title { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: .1em; color: var(--ink-2); }
.axes-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.axp { padding: 14px 12px 15px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); text-align: center; }
.axp-name { display: block; font-size: 12px; letter-spacing: .2em; color: var(--ink-3); }
.axp-poles { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 15px; }
.axp-a, .axp-b { font-weight: 700; white-space: nowrap; }
.axp-line { flex: 0 1 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--pitch), var(--sky)); }
.axp-name small { display: block; margin-top: 2px; font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--ink-4); }
.axp-defs { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* ---------- 作答 ---------- */
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* 比分板：像轉播畫面角落那種；你對無聊，時間跟著題目從 1 分鐘跑到 90 分鐘 */
.scorebug { display: inline-flex; align-items: stretch; height: 32px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(4, 6, 32, .78); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); font-size: 13px; line-height: 1; white-space: nowrap; }
.sb-clock { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: rgba(var(--pitch-rgb), .16); border-right: 1px solid var(--line); }
.sb-half { font-size: 11px; letter-spacing: .12em; color: var(--pitch-hi); }
.sb-clock b { min-width: 3.4ch; font-family: 'Archivo', sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.sb-team { display: inline-flex; align-items: center; padding: 0 9px; font-family: 'Archivo', var(--f); font-weight: 800; letter-spacing: .08em; color: var(--ink-2); box-shadow: inset 0 -3px 0 var(--tc, transparent); }
.sb-score { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; background: rgba(255, 255, 255, .08); font-family: 'Archivo', sans-serif; font-size: 16px; font-variant-numeric: tabular-nums; }
.sb-score i { font-style: normal; color: var(--ink-3); }
.sb-num { display: inline-block; font-weight: 900; }
.sb-num.is-bump { animation: bump .8s var(--ease-out); }
.q-count { font-family: 'Archivo', sans-serif; font-size: 14px; color: var(--ink-3); min-width: 64px; text-align: right; }
.q-count b { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.q-count i { font-style: normal; margin: 0 4px; }

.progress { padding: 22px 12px 34px; }
.progress-track { --p: 0%; --rot: 0deg; position: relative; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.progress-goal { position: absolute; top: -6px; width: 3px; height: 20px; border-radius: 2px; background: var(--ink-4); }
.progress-goal--l { left: -9px; }
.progress-goal--r { right: -9px; }
.progress-mid { position: absolute; left: 50%; top: -5px; width: 1px; height: 18px; background: var(--line-2); }
.progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); border-radius: inherit;
  background: linear-gradient(90deg, var(--pitch), var(--sky-hi));
  box-shadow: 0 0 18px rgba(var(--pitch-rgb), .35);
  transition: width .6s var(--ease-out);
}
.ball {
  position: absolute; top: 50%; left: var(--p); width: 24px; height: 24px;
  transform: translate(-50%, -50%) rotate(var(--rot));
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
  transition: left .6s var(--ease-out), transform .6s var(--ease-out);
}

.qcard {
  position: relative;
  padding: clamp(26px, 5.5vw, 46px) clamp(20px, 5vw, 44px) clamp(24px, 4.5vw, 36px);
  border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 26, 78, .82), rgba(10, 10, 44, .78));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.qcard::before {
  content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}
.q-label { margin: 0; font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .22em; color: var(--pitch-hi); }
/* keep-all：中文盡量在標點換行（「那個人」不會被拆成「那／個人」）；一段太長放不下才在任意處斷 */
.q-text { margin: 12px 0 36px; min-height: 3.3em; font-size: clamp(20px, 3.3vw, 26px); line-height: 1.65; font-weight: 700; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }

.scale { display: flex; align-items: center; justify-content: space-between; max-width: 470px; margin: 0 auto; }
.dot {
  --c: 255, 255, 255;
  position: relative; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 2px solid rgba(var(--c), .9); background: transparent;
  cursor: pointer; padding: 0;
  transition: transform .2s var(--ease-out), background-color .2s, box-shadow .25s;
}
.dot--a2, .dot--a1 { --c: var(--pitch-rgb); }
.dot--b1, .dot--b2 { --c: var(--sky-rgb); }
.dot--m { --c: 247, 248, 250; border-color: rgba(var(--c), .38); }
.dot--a2, .dot--b2 { width: 62px; height: 62px; }
.dot--a1, .dot--b1 { width: 48px; height: 48px; }
.dot--m { width: 36px; height: 36px; }
.dot svg { width: 48%; height: 48%; fill: none; stroke: #04091F; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: opacity .18s, transform .3s var(--ease-out); }
.dot:hover { background: rgba(var(--c), .16); transform: scale(1.07); }
.dot:focus-visible { outline: 3px solid rgba(var(--c), .7); outline-offset: 4px; }
.dot.is-selected { background: rgb(var(--c)); box-shadow: 0 0 0 7px rgba(var(--c), .16), 0 0 30px rgba(var(--c), .5); }
.dot--m.is-selected { background: #E9EBF0; }
.dot.is-selected svg { opacity: 1; transform: scale(1); }
.dot::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgb(var(--c)); opacity: 0; pointer-events: none; }
.dot.is-pop::after { animation: ring .6s var(--ease-out); }
.dot.is-pop { animation: pop .35s var(--ease-out); }

.scale-legend { display: flex; justify-content: space-between; align-items: baseline; max-width: 500px; margin: 16px auto 0; font-size: 13px; letter-spacing: .06em; }
.lg--a { color: var(--pitch-hi); }
.lg--m { color: var(--ink-3); }
.lg--b { color: var(--sky-hi); }
.kbd-hint { margin: 22px 0 0; text-align: center; font-size: 12px; letter-spacing: .06em; color: var(--ink-4); }

/* ---------- 場上事件：每 3～4 題跳一次（進球、黃牌、越位、VAR…） ---------- */
.event { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(4, 2, 26, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; }
.event[hidden] { display: none; }
.event-card {
  --c: var(--pitch-rgb);
  position: relative; width: min(400px, 100%); padding: 26px 22px 24px; text-align: center;
  border-radius: 26px; border: 1px solid rgba(var(--c), .5);
  background: radial-gradient(120% 80% at 50% 0%, rgba(var(--c), .26), rgba(var(--c), 0) 62%), linear-gradient(180deg, rgba(22, 26, 78, .96), rgba(8, 8, 38, .96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55), 0 0 70px rgba(var(--c), .22);
}
.event-card[data-kind="yellow"] { --c: 255, 212, 59; }
.event-card[data-kind="red"] { --c: 255, 77, 87; }
.event-card[data-kind="offside"] { --c: 255, 168, 76; }
.event-card[data-kind="var"], .event-card[data-kind="save"], .event-card[data-kind="post"] { --c: var(--sky-rgb); }
.event-card[data-kind="concede"] { --c: 247, 248, 250; }
.event-art { display: flex; align-items: center; justify-content: center; height: 116px; margin-bottom: 10px; }
.event-art svg { flex: none; width: auto; height: 116px; overflow: visible; }
.event-en { margin: 0; font-family: 'Archivo', sans-serif; font-size: clamp(36px, 10vw, 54px); font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .01em; color: rgb(var(--c)); text-shadow: 0 0 28px rgba(var(--c), .45); }
.event-en.is-long { font-size: clamp(30px, 8.4vw, 42px); }
.event-zh { margin: 12px 0 0; font-size: 17px; font-weight: 700; line-height: 1.6; letter-spacing: .04em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.event-fact { margin: 12px auto 0; max-width: 24em; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--ink-2); text-align: left; }
.event-fact::before { content: '真實名場面'; display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #F2C94C; }
.event-fact[hidden] { display: none; }
.event-score { margin: 12px 0 0; font-size: 13px; letter-spacing: .14em; color: var(--ink-3); }
.event-score b { margin: 0 8px; font-family: 'Archivo', sans-serif; font-size: 22px; font-weight: 900; letter-spacing: 0; color: var(--ink); vertical-align: -2px; }
.event-skip { margin: 18px 0 0; font-size: 12px; letter-spacing: .1em; color: var(--ink-4); }

/* 事件插圖（SVG）：球門、黃紅牌、越位旗、VAR 螢幕、門將手套、補時牌 */
.ev-frame { fill: none; stroke: #F7F8FA; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.ev-net { fill: none; stroke: rgba(247, 248, 250, .26); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: netHit .55s .45s ease-out both; }
.ev-shot { transform-box: fill-box; transform-origin: center; animation: shot .55s cubic-bezier(.2, .75, .3, 1) both; }
.ev-ball { transform-box: fill-box; transform-origin: center; animation: spin .6s linear both; }
.ev-bounce { transform-box: fill-box; transform-origin: center; animation: bounceOff 1s cubic-bezier(.3, .7, .4, 1) both; }
.ev-spark path, .ev-lines path { fill: none; stroke: rgb(var(--c)); stroke-width: 3; stroke-linecap: round; }
.ev-spark { opacity: 0; transform-box: fill-box; transform-origin: center; animation: spark .5s .4s ease-out both; }
.ev-lines { opacity: 0; transform-box: fill-box; transform-origin: center; animation: spark .7s .35s ease-out both; }
.ev-card rect { fill: rgb(var(--c)); }
.ev-card .ev-card-hi { fill: rgba(255, 255, 255, .32); }
.ev-card { transform-box: fill-box; transform-origin: 50% 100%; animation: cardUp .6s var(--ease-out) both; }
.ev-pole { stroke: #F7F8FA; stroke-width: 5; stroke-linecap: round; }
.ev-flag { transform-box: fill-box; transform-origin: 0% 100%; animation: flagUp .5s var(--ease-out) both; }
.ev-cloth { transform-box: fill-box; transform-origin: 0% 50%; animation: wave .4s ease-in-out .45s infinite alternate; }
.ev-tv { fill: rgba(var(--c), .12); stroke: #F7F8FA; stroke-width: 3; }
.ev-scan { fill: rgba(var(--c), .55); animation: scan 1.1s linear infinite; }
.ev-var { font-family: 'Archivo', sans-serif; font-size: 28px; font-weight: 900; letter-spacing: 3px; fill: #F7F8FA; }
.ev-stand { fill: none; stroke: #F7F8FA; stroke-width: 3; stroke-linejoin: round; }
.ev-glove rect { fill: #F7F8FA; }
.ev-glove .ev-cuff { fill: rgb(var(--c)); }
.ev-glove { transform-box: fill-box; transform-origin: 50% 100%; animation: glove .45s .2s var(--ease-out) both; }
.ev-deflect { transform-box: fill-box; transform-origin: center; animation: deflect .9s cubic-bezier(.2, .7, .3, 1) both; }
.ev-led { fill: #070A26; stroke: #F7F8FA; stroke-width: 3; }
.ev-plus { font-family: 'Archivo', sans-serif; font-size: 38px; font-weight: 900; fill: #5BFFA6; animation: led .9s steps(2, end) infinite; }
.ev-handle { stroke: #F7F8FA; stroke-width: 4; stroke-linecap: round; }

/* ---------- 中場、終場 ---------- */
.interlude { padding-top: 6vh; text-align: center; }
.whistle { width: 64px; height: 64px; margin: 0 auto 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; transform-origin: 40% 60%; animation: toot 1.4s ease-in-out .2s both; }
.il-en { margin: 0; font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .5em; color: var(--pitch-hi); animation: rise .7s var(--ease-out) .1s both; }
.il-title { margin: 10px 0 30px; font-size: clamp(44px, 9vw, 76px); line-height: 1.1; font-weight: 700; letter-spacing: .04em; animation: rise .8s var(--ease-out) .2s both; }
.board {
  display: inline-flex; align-items: center; gap: 20px; padding: 18px 30px;
  border-radius: 20px; background: rgba(0, 0, 0, .32); border: 1px solid var(--line);
  font-family: 'Archivo', sans-serif; animation: rise .8s var(--ease-out) .35s both;
}
.board-cell { display: flex; flex-direction: column; align-items: center; }
.board-num { font-size: 58px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.board-cell:first-child .board-num { color: var(--pitch-hi); }
.board-lbl { margin-top: 6px; font-family: var(--f); font-size: 12px; letter-spacing: .14em; color: var(--ink-3); }
.board-sep { font-size: 40px; font-weight: 800; color: var(--ink-3); animation: blink 1.2s steps(1, end) infinite; }
.il-text { max-width: 26em; margin: 26px auto 30px; font-size: 16px; line-height: 1.8; color: var(--ink-2); animation: rise .8s var(--ease-out) .45s both; }
.board--ft { margin-top: -6px; }
.ft-verdict { margin: 18px 0 -8px; font-size: 18px; font-weight: 700; letter-spacing: .08em; color: var(--pitch-hi); animation: rise .8s var(--ease-out) .5s both; }
.screen--halftime .cta { animation: rise .8s var(--ease-out) .6s both; }
.roulette { margin: 0; min-height: 1.3em; font-family: 'Archivo', sans-serif; font-size: clamp(30px, 6.5vw, 52px); line-height: 1.2; font-weight: 900; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
.roulette.is-final { animation: land .7s var(--ease-out) both; text-shadow: 0 0 34px rgba(var(--pitch-rgb), .55); }

/* ---------- 結果 ---------- */
.r-kicker { margin: 0 0 18px; text-align: center; font-size: 14px; letter-spacing: .3em; color: var(--ink-2); }
/* 十六型（暫時的樣式，等新版面定案再換） */
.r-type { margin: -6px auto 22px; text-align: center; }
.r-type-fam { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .3em; color: var(--pitch-hi); }
.r-type-fam small, .r-type-name small { margin-left: 8px; font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: .2em; }
.r-type-name { margin: 6px 0 0; font-size: clamp(30px, 6vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: .06em; }
.r-type-name small { display: block; margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.r-type-desc { max-width: 28em; margin: 10px auto 0; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.card-wrap { display: flex; justify-content: center; perspective: 1400px; }
.pcard {
  position: relative; width: min(360px, 100%); aspect-ratio: 360 / 510; border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(70% 46% at 50% 44%, rgba(var(--sky-rgb), .38) 0%, rgba(var(--sky-rgb), 0) 70%),
    radial-gradient(90% 50% at 50% 104%, rgba(var(--pitch-rgb), .32) 0%, rgba(var(--pitch-rgb), 0) 70%),
    linear-gradient(180deg, #11185A 0%, #080B33 52%, #050221 100%);
  box-shadow: 0 50px 110px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transform-style: preserve-3d;
}
.pcard::before {
  content: ''; position: absolute; inset: 0; z-index: 6; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(150deg, rgba(var(--pitch-rgb), .95), rgba(255, 255, 255, .10) 32%, rgba(255, 255, 255, .05) 66%, rgba(var(--sky-rgb), .95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pcard-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.4; }
.pcard-lines .spot { fill: rgba(255, 255, 255, .25); stroke: none; }
.pcard-glow { position: absolute; left: 15%; right: 15%; top: 22%; height: 46%; border-radius: 50%; background: radial-gradient(closest-side, rgba(206, 226, 255, .30), rgba(206, 226, 255, 0)); filter: blur(10px); }
.pcard-top { position: absolute; z-index: 4; top: 18px; left: 20px; right: 18px; display: flex; align-items: flex-start; justify-content: space-between; }
.sim { font-family: 'Archivo', sans-serif; line-height: .9; }
.sim-num { font-size: 56px; font-weight: 900; letter-spacing: -.03em; }
.sim-pct { font-size: 22px; font-weight: 800; vertical-align: top; margin-left: 2px; color: var(--pitch-hi); }
.sim-lbl { display: block; margin-top: 7px; font-family: var(--f); font-size: 11px; letter-spacing: .26em; color: var(--ink-2); }
.pcard-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pcard-meta span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }
/* 人像用全身或大半身的去背照（像海報那樣）：頭在卡片上半部，腿延伸到名字後面，被漸層蓋住 */
.pcard-photo { position: absolute; z-index: 2; left: 4%; right: 4%; top: 7%; bottom: 0; display: flex; align-items: flex-end; justify-content: center; }
.pcard-photo img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .5)); }
.pcard-photo img.fit-half { flex: none; width: auto; height: 90%; max-width: none; }
.pcard-photo img.fit-wide { flex: none; width: auto; height: 76%; max-width: none; }
.pcard-photo img.fit-bust { flex: none; width: auto; height: 72%; max-width: 100%; }
.pcard-photo .ph { height: 84%; width: auto; max-width: 94%; margin-bottom: 14%; }
.ph-ini { font-family: 'Archivo', sans-serif; font-size: 118px; font-weight: 900; letter-spacing: -.04em; fill: rgba(255, 255, 255, .07); }
.pcard-name {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 104px 20px 20px; text-align: center;
  background: linear-gradient(180deg, rgba(5, 2, 33, 0) 0%, rgba(5, 2, 33, .70) 30%, rgba(5, 2, 33, .94) 56%, rgba(5, 2, 33, .98) 100%);
}
/* 名字只用英文：名字小字在上、姓氏大字在下（球員卡的排法）；姓氏太長時 app.js 會自動縮字 */
.pcard-first { margin: 0 0 4px; padding-left: .34em; font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-2); }
.pcard-first:empty { display: none; }
.pcard-last { margin: 0 0 14px; font-family: 'Archivo', sans-serif; font-size: 42px; line-height: 1; font-weight: 900; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.pcard-sides { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pcard-sides li { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.pcard-sides li.is-same { border-color: rgba(var(--pitch-rgb), .7); color: var(--ink); background: rgba(var(--pitch-rgb), .12); }
.pcard-sheen { position: absolute; inset: -20%; z-index: 5; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%); transform: translateX(-100%); }

.pcard.is-in { animation: cardIn 1.1s var(--ease-out) both; }
.pcard.is-in .pcard-photo { animation: photoUp 1.2s var(--ease-out) .3s both; }
.pcard.is-in .pcard-glow { animation: glowOn 1.6s ease-out .2s both; }
.pcard.is-in .pcard-first, .pcard.is-in .pcard-last { animation: rise .8s var(--ease-out) .7s both; }
.pcard.is-in .pcard-sides li { animation: chipIn .5s var(--ease-out) both; animation-delay: calc(1s + var(--i) * .08s); }
.pcard.is-in .pcard-sheen { animation: sheen 6s ease-in-out 1.6s infinite; }

.r-line { max-width: 30em; margin: 30px auto 6px; text-align: center; font-size: 18px; line-height: 1.85; animation: rise .8s var(--ease-out) 1.2s both; }
.r-match { margin: 0; text-align: center; font-size: 13px; letter-spacing: .08em; color: var(--pitch-hi); animation: rise .8s var(--ease-out) 1.3s both; }

.panel { margin-top: 24px; padding: 22px clamp(16px, 4vw, 26px); border-radius: 22px; background: var(--glass); border: 1px solid var(--line); animation: rise .8s var(--ease-out) 1.4s both; }
.panel + .panel { animation-delay: 1.5s; }
.panel-title { margin: 0 0 18px; font-size: 15px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2); }
.yrow + .yrow { margin-top: 16px; }
.yrow-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.yrow-name { font-size: 13px; letter-spacing: .2em; color: var(--ink-3); }
.yrow-name small, .yrow-val small { margin-left: 6px; font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .14em; opacity: .75; }
.yrow-def { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.yrow-val { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.yrow-val--a { color: var(--pitch-hi); }
.yrow-val--b { color: var(--sky-hi); }
.ybar { display: grid; grid-template-columns: 3.2em 1fr 3.2em; align-items: center; gap: 10px; }
.ypole { font-size: 13px; color: var(--ink-3); transition: color .4s; }
.ypole--a { text-align: right; }
.ypole.is-win { color: var(--ink); font-weight: 700; }
.ytrack { --a: 50%; position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.yfill { position: absolute; top: 0; bottom: 0; width: 50%; transition: width 1.1s var(--ease-out); }
.yfill--a { left: 0; border-radius: 999px 0 0 999px; background: linear-gradient(90deg, rgba(var(--pitch-rgb), .35), var(--pitch)); }
.yfill--b { right: 0; border-radius: 0 999px 999px 0; background: linear-gradient(270deg, rgba(var(--sky-rgb), .35), var(--sky)); }
.ymark { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 10px rgba(255, 255, 255, .6); transition: left 1.1s var(--ease-out); }
.ytrack.is-on .yfill--a { width: var(--a); }
.ytrack.is-on .yfill--b { width: calc(100% - var(--a)); }
.ytrack.is-on .ymark { left: var(--a); }

.ru { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ru-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ru-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 30%, rgba(var(--sky-rgb), .45), rgba(255, 255, 255, .04)); font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 900; letter-spacing: -.02em; color: var(--ink-2); }
.ru-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.pcard-meta .comp-chip { background: rgba(255, 231, 163, .14); border-color: rgba(255, 231, 163, .45); color: var(--flood); }
.ru-names { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ru-names b { font-family: 'Archivo', sans-serif; font-size: 16px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-names small { margin-top: 2px; font-size: 12px; letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-sim { font-family: 'Archivo', sans-serif; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.ru-sim i { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink-3); margin-left: 1px; }

.r-notice { margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(255, 231, 163, .07); border: 1px solid rgba(255, 231, 163, .25); color: var(--flood); font-size: 14px; text-align: center; }
.r-actions { margin-top: 34px; text-align: center; animation: rise .8s var(--ease-out) 1.6s both; }
.soon { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.soon-item { padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line-2); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.r-credit { margin: 26px 0 0; text-align: center; font-size: 11px; line-height: 1.7; color: var(--ink-3); }
.r-credit a, .credits a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.credits { max-width: 560px; margin: 14px auto 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.credits summary { cursor: pointer; text-align: center; list-style: none; color: var(--ink-3); }
.credits summary::-webkit-details-marker { display: none; }
.credits summary::after { content: ' ▾'; }
.credits[open] summary::after { content: ' ▴'; }
.credits ul { margin: 12px 0 0; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); list-style: none; columns: 2; column-gap: 24px; }
.credits li { break-inside: avoid; margin-bottom: 4px; }
.credits li b { color: var(--ink-2); font-weight: 700; }
.credits-note { margin: 10px 0 0; font-size: 11px; color: var(--ink-4); }
@media (max-width: 680px) { .credits ul { columns: 1; } }

/* 第二像、第三像的小頭像：用去背全身照的上半部（臉） */
.ru-face { display: block; width: 100%; height: 100%; background-repeat: no-repeat; background-size: 260% auto; background-position: 50% 4%; }

/* ---------- 頁尾 ---------- */
.foot { position: relative; z-index: 1; padding: 8px 16px 40px; text-align: center; font-size: 12px; line-height: 1.8; color: var(--ink-4); }
.foot p { margin: 0; }
.foot-by { margin-top: 4px !important; letter-spacing: .06em; }
.foot-dev { margin-top: 10px !important; }
.foot-dev a { color: var(--ink-2); }
body[data-screen="quiz"] .foot, body[data-screen="halftime"] .foot, body[data-screen="fulltime"] .foot { display: none; }

/* ---------- 動畫 ---------- */
@keyframes chalk { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dotIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--pitch-rgb), .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--pitch-rgb), 0); } }
@keyframes floodOn { 0% { opacity: 0; } 12% { opacity: .7; } 16% { opacity: .1; } 26% { opacity: .9; } 30% { opacity: .35; } 42%, 100% { opacity: 1; } }
@keyframes sway { from { transform: rotate(var(--r)); } to { transform: rotate(calc(var(--r) * .86)); } }
@keyframes ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.75); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes toot { 0% { opacity: 0; transform: scale(.6) rotate(-14deg); } 55% { opacity: 1; transform: scale(1.06) rotate(6deg); } 70% { transform: rotate(-4deg); } 85% { transform: rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes land { 0% { transform: scale(1.25); opacity: 0; } 60% { transform: scale(.96); opacity: 1; } 100% { transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(54px) rotateX(18deg) scale(.93); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes photoUp { from { opacity: 0; transform: translateY(36px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes glowOn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sheen { 0% { transform: translateX(-100%); } 28%, 100% { transform: translateX(100%); } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.7); color: var(--pitch-hi); } 100% { transform: scale(1); } }
@keyframes shot { from { transform: translate(-80px, 70px) scale(1.7); opacity: 0; } 15% { opacity: 1; } to { transform: none; } }
@keyframes netHit { 0% { transform: none; } 35% { transform: scale(1.05, 1.09) translateY(2px); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(540deg); } }
@keyframes bounceOff { 0% { transform: translate(44px, 60px) scale(1.6); opacity: 0; } 10% { opacity: 1; } 45% { transform: none; opacity: 1; } 100% { transform: translate(-36px, 30px) scale(1.15); opacity: 0; } }
@keyframes spark { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes cardUp { 0% { transform: translateY(60px) rotate(-28deg); opacity: 0; } 60% { transform: translateY(-6px) rotate(8deg); opacity: 1; } 100% { transform: rotate(-4deg); } }
@keyframes flagUp { from { transform: translateY(40px) rotate(-24deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wave { from { transform: skewY(-7deg) scaleX(.92); } to { transform: skewY(6deg) scaleX(1); } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(56px); } }
@keyframes glove { from { transform: scale(.4) translateY(30px); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } to { transform: none; } }
@keyframes deflect { 0% { transform: translate(-70px, 60px) scale(1.8); opacity: 0; } 12% { opacity: 1; } 42% { transform: none; opacity: 1; } 100% { transform: translate(50px, -44px) scale(.7); opacity: 0; } }
@keyframes led { 50% { opacity: .35; } }

/* 五個面向的預覽：端點改成三個字、又加了定義，五欄放不下，一律一列一個（10-05 深夜） */
.axes-list { grid-template-columns: 1fr; gap: 8px; }
.axp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 16px; text-align: left; }
.axp-poles { margin-top: 0; flex-shrink: 0; }
.axp-defs { flex: 1 0 100%; flex-direction: row; justify-content: space-between; gap: 12px; }
.axp-defs span:last-child { text-align: right; }
.axp-defs b { margin-right: 6px; font-weight: 700; color: var(--ink-2); }
.axp-defs span:first-child b { color: var(--pitch-hi); }
.axp-defs span:last-child b { color: var(--sky-hi); }

/* ---------- 手機 ---------- */
@media (max-width: 680px) {
  .topbar-by { display: none; }
  .stage { padding-top: 92px; }
  .hero { padding-top: 3vh; }
  .modes { grid-template-columns: 1fr; margin-top: 48px; }
  .progress { padding: 18px 12px 26px; }
  .q-text { margin-bottom: 30px; min-height: 4.95em; }
  .scorebug { height: 30px; font-size: 12px; }
  .sb-half { display: none; }
  .sb-clock { padding: 0 8px; }
  .sb-team { padding: 0 7px; }
  .sb-score { padding: 0 8px; font-size: 15px; }
  .event-art { height: 96px; }
  .event-art svg { height: 96px; }
  .dot--a2, .dot--b2 { width: 54px; height: 54px; }
  .dot--a1, .dot--b1 { width: 42px; height: 42px; }
  .dot--m { width: 32px; height: 32px; }
  .kbd-hint { display: none; }
  .ru { grid-template-columns: 1fr; }
  .board { gap: 14px; padding: 14px 22px; }
  .board-num { font-size: 46px; }
}
@media (hover: none) { .kbd-hint { display: none; } .dot:hover { transform: none; background: transparent; } .dot.is-selected:hover { background: rgb(var(--c)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bg-pitch > :not(.spot) { stroke-dashoffset: 0; }
}

/* ---------- 結果頁：比賽日海報（10-06 取代舊的球員卡） ----------
   參考 William 給的 England「MATCH DAY」海報：超粗窄斜體、字有立體厚度、字裡有淺色斜紋，球員疊在大字前面。
   前層字不准加描邊：中文和可變字型的筆畫是好幾塊重疊拼成的，描邊會把接縫畫出來（10-05 退件）。 */
.poster-wrap { display: flex; justify-content: center; }
.poster {
  --po-en: 'Archivo';                 /* 英文型名字體：字體實驗室的 A，要換就改這裡 */
  --skew: -9deg; --extrude: #0B1446;
  position: relative; width: min(420px, 100%); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 24px; isolation: isolate;
  background:
    radial-gradient(80% 60% at 70% 30%, rgba(var(--sky-rgb), .35), rgba(var(--sky-rgb), 0) 70%),
    radial-gradient(90% 40% at 40% 104%, rgba(var(--pitch-rgb), .22), rgba(var(--pitch-rgb), 0) 70%),
    linear-gradient(160deg, #18227a 0%, #0b1446 48%, #050221 100%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.poster::after {
  content: ''; position: absolute; inset: 0; z-index: 6; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(150deg, rgba(var(--pitch-rgb), .9), rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, .04) 66%, rgba(var(--sky-rgb), .9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.po-rays { position: absolute; inset: -20%; z-index: -1; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 28px, rgba(255, 255, 255, 0) 28px 90px); transform: rotate(-4deg); }
.po-fam { position: absolute; left: 6%; top: 5.5%; z-index: 4; margin: 0; font: 800 12px/1 'Archivo', sans-serif; letter-spacing: .32em; color: var(--pitch-hi); }
.po-fam span { margin-left: 8px; font-family: var(--f); font-weight: 700; letter-spacing: .2em; color: var(--ink-2); }
.po-sim { position: absolute; right: 6%; top: 4%; z-index: 4; text-align: right; }
.po-sim .sim-num { font-size: 40px; }
.po-sim .sim-pct { font-size: 17px; }
.po-sim .sim-lbl { margin-top: 5px; font-size: 10px; }

.po-word { position: absolute; left: 0; right: 0; z-index: 1; margin: 0; display: flex; justify-content: center; white-space: nowrap; transform: skewX(var(--skew)); font-weight: 900; line-height: .86; }
.po-en { top: 15%; font-family: var(--po-en), sans-serif; font-style: italic; font-stretch: 62%; text-transform: uppercase; letter-spacing: .01em; }
.po-zh { top: auto; bottom: 20%; left: auto; right: 5%; z-index: 3; justify-content: flex-end; font-family: 'Noto Sans TC', 'Taipei Sans TC', var(--f); letter-spacing: .02em; }
.po-word .stack { position: relative; display: inline-block; }
.po-word .back, .po-word .front { display: block; }
/* 「減少動態效果」會把全站 transition-duration 壓成 .01ms，字級一改，量寬度讀到的還是舊字級，縮字就失效。量字寬的元素不准有 transition */
.po-word, .po-word *, .po-last { transition: none !important; }
.po-word .back { color: var(--extrude); text-shadow:
    1px 1px 0 var(--extrude), 2px 2px 0 var(--extrude), 3px 3px 0 var(--extrude), 4px 4px 0 var(--extrude), 5px 5px 0 var(--extrude),
    6px 6px 0 var(--extrude), 7px 7px 0 var(--extrude), 8px 8px 0 var(--extrude), 9px 9px 0 var(--extrude), 10px 10px 0 var(--extrude),
    16px 18px 26px rgba(0, 0, 0, .55); }
.po-word .front { position: absolute; left: 0; top: 0; color: transparent; }
.po-word .ch { display: inline-block; }
/* 英文每個字母自己做斜紋填色：字母有動畫（transform）時，父層的 background-clip: text 包不到它們 */
.po-en .front .ch { color: transparent; background: repeating-linear-gradient(135deg, #ffffff 0 7px, #dfe5ef 7px 13px), #fff; -webkit-background-clip: text; background-clip: text; }
/* 中文筆畫多，斜紋會切得很碎：乾淨的白色、上亮下微灰 */
.po-zh .front { background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #d9dfea 100%); -webkit-background-clip: text; background-clip: text; }

.po-flash { position: absolute; left: 20%; bottom: 26%; z-index: 1; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 65%); opacity: 0; pointer-events: none; }
.po-photo { position: absolute; z-index: 2; left: -2%; right: 12%; top: 24%; bottom: 0; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.po-photo img { flex: none; height: 100%; width: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); }
.po-photo img.fit-tall { max-width: 100%; }
.po-photo img.fit-half { height: 92%; }
.po-photo img.fit-wide { height: 92%; }   /* 橫的半身照（三笘薰、德羅巴、戈登）：跟半身照一樣高，兩邊超出卡片就裁掉，臉才不會掉到中文型名後面（10-06） */
.po-photo img.fit-bust { height: 72%; }
.po-photo .ph { height: 84%; width: auto; max-width: 94%; margin-bottom: 14%; }

.po-plate { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
  padding: 44px 6% 16px; background: linear-gradient(180deg, rgba(5, 2, 33, 0), rgba(5, 2, 33, .92) 58%); }
.po-name { flex: 1; min-width: 0; }
.po-name .pcard-first { padding-left: 0; font-size: 11px; letter-spacing: .3em; }
.po-last { margin: 0; overflow: hidden; font: italic 900 30px/1 'Archivo', sans-serif; font-stretch: 75%; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.po-heat { flex: none; margin: 0; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-align: center; }
.po-heat small { display: block; font-family: 'Archivo', sans-serif; font-size: 9px; font-weight: 800; letter-spacing: .24em; color: var(--ink-3); }

.po-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; margin: 14px 0 0; animation: rise .8s var(--ease-out) 1.6s both; }
.r-type-desc { animation: rise .8s var(--ease-out) 1.7s both; }
.po-sides { margin: 14px auto 0; max-width: 30em; animation: rise .8s var(--ease-out) 1.9s both; }

/* 進場：海報浮上來 → 英文字母一個一個砸下來 → 中文從右邊滑進 → 球員往上彈、背後閃光 → 角落資訊淡入 */
.poster.go { animation: poIn .7s var(--ease-out) both; }
.poster.go .po-en .ch { animation: poSlam .55s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(.25s + var(--i) * 55ms); }
.poster.go .po-zh .stack { animation: poSlide .6s cubic-bezier(.2, 1, .3, 1) .8s both; }
.poster.go .po-photo { animation: poPop .8s cubic-bezier(.2, 1.25, .35, 1) 1s both; }
.poster.go .po-flash { animation: poFlash .9s ease-out 1.05s both; }
.poster.go .po-fam, .poster.go .po-sim, .poster.go .po-plate { animation: poFade .5s ease-out 1.4s both; }
@keyframes poIn { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes poSlam { 0% { opacity: 0; transform: translateY(-40%) scale(1.9); filter: blur(6px); } 60% { opacity: 1; filter: none; } 100% { opacity: 1; transform: none; } }
@keyframes poSlide { from { opacity: 0; transform: translateX(40%); } to { opacity: 1; transform: none; } }
@keyframes poPop { 0% { opacity: 0; transform: translateY(22%) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes poFlash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes poFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 680px) {
  .po-sim .sim-num { font-size: 34px; }
  .po-last { font-size: 26px; }
}

/* ---------- 賽前：選主隊、抽對手（10-06） ---------- */
.kit { display: block; width: 40px; height: 40px; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.kit--lg { width: 96px; height: 96px; }
.tm, .draw { padding-top: 2vh; }
.tm-title { margin: 16px 0 8px; font-size: clamp(32px, 6vw, 48px); line-height: 1.2; font-weight: 700; letter-spacing: .03em; }
.tm-lead { margin: 0 0 22px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.tm-leagues { display: flex; gap: 8px; margin: 0 -16px 16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.tm-leagues::-webkit-scrollbar { display: none; }
.tm-league { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); cursor: pointer; font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.tm-league small { font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--ink-4); }
.tm-league.is-on { color: var(--ink); border-color: rgba(var(--pitch-rgb), .6); background: rgba(var(--pitch-rgb), .14); }
.tm-league.is-on small { color: var(--pitch-hi); }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
.tm-team { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; text-align: left; animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 18ms); transition: transform .2s var(--ease-out), border-color .2s, background-color .2s; }
.tm-team:hover { transform: translateY(-2px); border-color: var(--line-2); background-color: rgba(255, 255, 255, .06); }
.tm-team.is-on { border-color: rgba(var(--pitch-rgb), .7); box-shadow: 0 0 0 1px rgba(var(--pitch-rgb), .3) inset; }
.tm-team:focus-visible, .tm-league:focus-visible { outline: 2px solid var(--pitch-hi); outline-offset: 2px; }
.tm-name { display: flex; flex-direction: column; min-width: 0; }
.tm-name b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.tm-name small { font-family: 'Archivo', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-random { margin-top: 16px; }

.draw { text-align: center; }
.draw .kicker { justify-content: center; }
.draw-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 28px 0 10px; }
.draw-side { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 230px; padding: 22px 10px 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--glass); }
.draw-side--away { border-color: rgba(var(--sky-rgb), .35); }
.draw-side.is-hop .kit { animation: hop .26s cubic-bezier(.3, 1.6, .5, 1); }
.draw-side.is-final { border-color: rgba(var(--pitch-rgb), .8); box-shadow: 0 0 0 1px rgba(var(--pitch-rgb), .35) inset, 0 0 46px rgba(var(--pitch-rgb), .28); animation: land .7s var(--ease-out); }
.draw-side.is-final .kit { animation: hopBig .8s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hop { 0% { transform: translateY(0) scale(.9); } 45% { transform: translateY(-16px) scale(1.04); } 100% { transform: none; } }
@keyframes hopBig { 0% { transform: translateY(0) scale(.8); } 40% { transform: translateY(-34px) scale(1.12) rotate(-6deg); } 70% { transform: translateY(0) scale(.96); } 85% { transform: translateY(-8px); } 100% { transform: none; } }
.ds-name { margin-top: 6px; font-size: clamp(18px, 4.4vw, 24px); font-weight: 700; line-height: 1.3; }
.ds-en { font-family: 'Archivo', var(--f); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); }
.ds-tag { position: absolute; top: 10px; left: 12px; font-size: 11px; letter-spacing: .14em; color: var(--ink-4); }
.draw-slot { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; border: 2px dashed var(--line-2); font-family: 'Archivo', sans-serif; font-size: 44px; font-weight: 900; color: var(--ink-3); }
.draw-vs { font-family: 'Archivo', sans-serif; font-size: clamp(24px, 6vw, 40px); font-weight: 900; font-style: italic; color: var(--ink-3); }
.draw-hint { margin: 14px 0 22px; font-size: 14px; color: var(--ink-2); }
.draw-actions { display: flex; justify-content: center; }
.draw-more { display: flex; justify-content: center; gap: 18px; margin-top: 14px; }
.draw-more [hidden], .draw-actions [hidden] { display: none; }

/* 中場、終場的名場面小字 */
.il-fact { max-width: 28em; margin: 14px auto 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.il-fact::before { content: '真實名場面'; display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #F2C94C; }
.il-fact[hidden] { display: none; }

/* ---------- 分享（10-06） ---------- */
.share { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 28px 0 0; }
.cta--share { background: linear-gradient(100deg, #F9CE34, #EE2A7B 55%, #6228D7); color: #fff; box-shadow: 0 14px 40px rgba(238, 42, 123, .28), 0 2px 0 rgba(255, 255, 255, .3) inset; }
.cta--share .cta-arrow { background: rgba(255, 255, 255, .22); }
.cta--share .cta-arrow svg { stroke: #fff; }
.share-save { color: var(--ink-2); }
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 2, 26, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet[hidden] { display: none; }
.sheet-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(420px, 100%); max-height: 100%; padding: 18px; border-radius: 24px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(22, 26, 78, .96), rgba(8, 8, 38, .96)); overflow: auto; }
.sheet-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.sheet-img { width: auto; max-width: 100%; max-height: 58vh; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); -webkit-touch-callout: default; user-select: auto; }
.sheet-hint { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); text-align: center; }
.sheet-actions { display: flex; align-items: center; gap: 16px; }
.sheet-actions .cta { text-decoration: none; }
@media (max-width: 680px) {
  .tm-grid { grid-template-columns: repeat(2, 1fr); }
  .draw-side { min-height: 200px; padding: 18px 6px 14px; }
  .kit--lg { width: 76px; height: 76px; }
  .draw-slot { width: 76px; height: 76px; font-size: 36px; }
}

/* ---------- 首頁模式卡：可以點的按鈕（10-06） ---------- */
button.mode { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .2s var(--ease-out), border-color .2s, background-color .2s; }
button.mode:hover { transform: translateY(-2px); background-color: rgba(var(--pitch-rgb), .08); }
button.mode:focus-visible { outline: 2px solid var(--pitch-hi); outline-offset: 3px; }
.mode-body, .mode-title, .mode-text { display: block; }
.modes { grid-template-columns: repeat(3, 1fr); }
.modes .mode:nth-child(4) { animation-delay: 1.24s; }
.modes .mode:nth-child(5) { animation-delay: 1.32s; }
@media (max-width: 680px) { .modes { grid-template-columns: 1fr; } }
.r-match[hidden], .po-sim[hidden] { display: none; }

/* ---------- 快速模式 ---------- */
.qk-head { display: flex; align-items: center; justify-content: space-between; }
.qk-bar { height: 6px; margin: 18px 0 26px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.qk-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pitch), var(--sky-hi)); transition: width .5s var(--ease-out); }
.qk-text { margin-bottom: 24px; }
.qk-opts { display: grid; gap: 12px; }
.qk-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font: inherit; font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink); text-align: left; cursor: pointer; animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); transition: transform .2s var(--ease-out), border-color .2s, background-color .2s; }
.qk-opt:hover { transform: translateX(4px); border-color: rgba(var(--pitch-rgb), .6); background: rgba(var(--pitch-rgb), .1); }
.qk-opt:focus-visible { outline: 2px solid var(--pitch-hi); outline-offset: 2px; }
.qk-opt.is-picked { border-color: var(--pitch); background: rgba(var(--pitch-rgb), .22); box-shadow: 0 0 0 4px rgba(var(--pitch-rgb), .14), 0 0 30px rgba(var(--pitch-rgb), .3); }
.qk-key { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 900; color: var(--pitch-hi); }
.qk-opt.is-picked .qk-key { background: var(--pitch); color: #03140E; }
#fulltime.is-quick .whistle, #fulltime.is-quick .il-en, #fulltime.is-quick .il-title, #fulltime.is-quick .board, #fulltime.is-quick .ft-verdict { display: none; }

/* ---------- 抽卡模式：卡背是網站的比賽球，翻過來是球員海報 ---------- */
.gc { text-align: center; }
.gc .kicker { justify-content: center; }
.gc-stage { display: flex; justify-content: center; margin: 26px 0 18px; perspective: 1600px; }
.gc-card { position: relative; width: min(340px, 86vw); aspect-ratio: 4 / 5; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1); }
.gc-card.is-flipped { transform: rotateY(180deg); }
.gc-card.is-shake { animation: gcShake .9s ease-in-out; }
@keyframes gcShake { 0%, 100% { transform: none; } 15% { transform: rotate(-4deg) scale(1.02); } 30% { transform: rotate(4deg) scale(1.04); } 45% { transform: rotate(-5deg) scale(1.05); } 60% { transform: rotate(5deg) scale(1.06); } 80% { transform: translateY(-14px) scale(1.08); } }
.gc-face { position: absolute; inset: 0; border-radius: 24px; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.gc-back { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; border: 2px solid rgba(242, 201, 76, .55);
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 22px, rgba(255, 255, 255, 0) 22px 64px), radial-gradient(70% 55% at 50% 45%, rgba(var(--sky-rgb), .45), rgba(var(--sky-rgb), 0) 70%), linear-gradient(160deg, #18227a, #0b1446 50%, #050221);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 0 6px rgba(6, 1, 33, .6), inset 0 0 0 7px rgba(242, 201, 76, .35); }
.gc-ball { width: 44%; height: auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); animation: gcFloat 3s ease-in-out infinite; }
@keyframes gcFloat { 50% { transform: translateY(-8px) rotate(12deg); } }
.gc-brand { font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .4em; color: #F2C94C; }
.gc-front { transform: rotateY(180deg); }
.gc-poster { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 24px; text-align: left; }   /* 抽卡頁整頁置中，卡片裡的名牌要靠左 */
.gc-card.is-legend .gc-front { box-shadow: 0 0 0 2px #F2C94C, 0 0 60px rgba(242, 201, 76, .45); }
.gc-card.is-now .gc-front { box-shadow: 0 0 0 2px var(--pitch), 0 0 60px rgba(var(--pitch-rgb), .4); }
.gc-rarity { position: absolute; right: 6%; top: 5%; z-index: 4; margin: 0; padding: 5px 10px; border-radius: 999px; font: 900 11px/1 'Archivo', sans-serif; letter-spacing: .2em; }
.gc-rarity span { margin-left: 6px; font-family: var(--f); font-weight: 700; letter-spacing: .1em; }
.gc-rarity--legend { color: #1a1300; background: linear-gradient(90deg, #F2C94C, #FFE9A3); }
.gc-rarity--now { color: #03140E; background: linear-gradient(90deg, var(--pitch), var(--pitch-hi)); }
.gc-poster .po-last { font-size: 26px; }
.gc-line { max-width: 26em; margin: 0 auto 20px; font-size: 15px; line-height: 1.8; color: var(--ink-2); animation: rise .6s var(--ease-out) both; }
.gc-line[hidden], #gcMore[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .gc-card { transition: none; } .gc-ball { animation: none; } }
