/* ==========================================================================
   taiwanlottery.co — 樣式表
   世界：開獎直播（on-air 深色橫幅、下標字卡、白色號碼球、節目表）
   ========================================================================== */

:root {
  --ink: #0E1B2E;
  --ink-2: #172B4D;
  --ink-3: #22395F;
  --wall: #EEF1F5;
  --wall-2: #E3E8EF;
  --panel: #FFFFFF;
  --line: #D6DCE5;
  --line-2: #BFC8D4;
  --text: #0E1B2E;
  --muted: #4B5A70;
  --muted-ink: #B9C5D7;
  --onair: #E4002B;
  --onair-deep: #B80022;
  --gold: #F5B400;
  --gold-deep: #C98F00;
  --gold-ink: #3A2A00;
  --ok: #15803D;

  --g-superlotto638: #C8102E;
  --g-lotto649: #1D4ED8;
  --g-daily539: #15803D;
  --g-lotto3d: #9A3412;
  --g-lotto4d: #0E7490;
  --g-m539: #4D7C0F;
  --g-m649: #4338CA;
  --g-bingo: #BE185D;
  --g-scratch: #92400E;

  --font-cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-num: "Archivo", "Noto Sans TC", "PingFang TC", sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 16px rgba(0, 0, 0, .07);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .18);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --ball: 56px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--wall);
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li + li { margin-top: .35em; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--onair); }
strong { font-weight: 700; }
small { font-size: .875em; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
input, textarea, select { caret-color: var(--onair); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num, .tnum { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section--tight { padding-block: clamp(24px, 4vw, 40px); }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; letter-spacing: .01em; }
.section-head p { margin: 0; color: var(--muted); max-width: 40em; }
.section-head .more { font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.section-head .more svg, .more svg { width: 14px; height: 14px; flex: none; }
.grid { display: grid; gap: 20px; }
.grid > *, .grid--sidebar > *, .result-detail > * { min-width: 0; }
.grid--top { align-items: start; }
@media (min-width: 900px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}
.prose { max-width: 42em; }
.prose h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 900; margin: 2.2em 0 .7em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.8em 0 .5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose table { margin: 1em 0 1.6em; }
.prose .lead { font-size: 18px; color: var(--muted); }
.page-head { padding: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: .01em; }
.page-head .lead { margin: 12px 0 0; max-width: 44em; color: var(--muted); font-size: 17px; }
.page-head .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.page-head .crumbs a { color: var(--muted); }
.page-head .crumbs span { margin: 0 .5em; }

/* ---------- on-air header ---------- */
.onair { background: var(--ink); color: #fff; position: relative; }
.onair a { color: #fff; text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > span:not(.brand-mark) { display: inline-flex; flex-direction: column; align-items: flex-start; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 24px; font-weight: 900; letter-spacing: .04em; line-height: 1; }
.brand-sub { font-family: var(--font-num); font-size: 11px; letter-spacing: .2em; color: var(--muted-ink); margin-top: 4px; font-weight: 600; }
.clock { display: none; align-items: center; gap: 14px; padding: 6px 12px 6px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); margin-left: auto; }
.clock-label { font-size: 11px; letter-spacing: .12em; color: var(--muted-ink); line-height: 1.2; }
.clock-game { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.clock-when { font-size: 12px; color: var(--muted-ink); white-space: nowrap; }
.clock-count { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 800; letter-spacing: .02em; line-height: 1; min-width: 6.4ch; text-align: right; }
.clock-count.is-live { color: var(--gold); }
@media (min-width: 640px) { .js .clock { display: flex; } }
.clock-bar { display: none; }
@media (max-width: 639.98px) { .js .clock-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "game count" "when count"; column-gap: 14px; align-items: center; padding: 8px 0 10px; border-top: 1px solid rgba(255,255,255,.1); } .clock-bar .clock-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .clock-bar .clock-game { grid-area: game; font-size: 13px; white-space: normal; } .clock-bar .clock-game::before { content: "下次開獎 "; color: var(--muted-ink); font-weight: 500; } .clock-bar .clock-when { grid-area: when; font-size: 12px; } .clock-bar .clock-count { grid-area: count; font-size: 22px; min-width: 0; } }
.nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 8px 12px; border-radius: var(--radius); font-weight: 500; white-space: nowrap; flex: none; }
.nav-toggle svg { width: 18px; height: 18px; }
.nav { border-top: 1px solid rgba(255,255,255,.1); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.nav li { margin: 0; }
.nav a { display: block; padding: 12px 12px; font-size: 15px; font-weight: 500; color: #E8EDF5; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.35); }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
@media (max-width: 899.98px) {
  .nav { display: none; padding: 8px 0 12px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}
@media (min-width: 900px) { .nav-toggle { display: none; } .nav { display: block; } }

/* ---------- on-air hero (home) ---------- */
.hero { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; padding: clamp(24px, 4vw, 48px) 0 clamp(28px, 4vw, 44px); }
@keyframes lt-enter { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.js .hero .lt--onair { animation: lt-enter .7s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .js .hero .lt--onair { animation: none; } }
.hero h1 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; color: var(--muted-ink); margin-bottom: 18px; }
.hero h1 strong { color: #fff; font-weight: 900; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-note { margin: 18px 0 0; font-size: 13px; color: var(--muted-ink); }

/* ---------- lower-third result block ---------- */
.lt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.lt--onair { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); box-shadow: none; color: #fff; }
.lt-body { display: grid; gap: 18px; padding: 20px; }
@media (min-width: 900px) { .lt-body { grid-template-columns: 260px 1fr; gap: 28px; padding: 24px 28px; } .lt--onair .lt-body { grid-template-columns: 300px 1fr; padding: 28px 32px; } }
.slate { display: flex; flex-direction: column; gap: 6px; }
.slate .tag { align-self: flex-start; }
.lt-cta { display: flex; }
@media (min-width: 900px) { .lt-body:has(.lt-cta) { grid-template-rows: auto auto; } .lt-cta { grid-column: 1; grid-row: 2; align-self: start; margin-top: -8px; } }
.slate-term { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; margin-top: 4px; }
.slate-term .cjk { font-family: var(--font-cjk); font-weight: 700; font-size: 16px; margin-right: .2em; }
.lt--onair .slate-term { font-size: 30px; }
.slate-date { font-size: 15px; line-height: 1.5; color: var(--muted); }
.lt--onair .slate-date { color: var(--muted-ink); }
.slate-date b { color: inherit; font-weight: 700; }
.slate-meta { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.lt--onair .slate-meta { color: var(--muted-ink); }
.slate-meta .tnum { font-weight: 600; }
.lt-numbers { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; }
.lt-numbers-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 8px; }
.lt-sep { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); }
.lt--onair .lt-sep { border-left-color: rgba(255,255,255,.18); }
.lt-sep-label { font-size: 11px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.lt--onair .lt-sep-label { color: var(--muted-ink); }
.lt-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: #FAFBFC; }
.lt-foot a { font-weight: 500; }
.lt-foot .next { font-weight: 500; color: var(--text); }
@media (min-width: 900px) { .lt-foot { padding: 12px 28px; } }

/* segmented toggle */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.seg button { background: transparent; border: 0; padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lt--onair .seg { border-color: rgba(255,255,255,.22); background: transparent; }
.lt--onair .seg button { color: var(--muted-ink); }
.lt--onair .seg button + button { border-left-color: rgba(255,255,255,.22); }
.lt--onair .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- balls ---------- */
.ball {
  --s: var(--ball);
  width: var(--s); height: var(--s); flex: none;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-weight: 800; font-size: calc(var(--s) * .42); letter-spacing: -.02em; line-height: 1;
  color: #0B1220;
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, #F6F8FB 38%, #DCE2EA 78%, #C9D1DC 100%);
  box-shadow: 0 2px 3px rgba(0,0,0,.28), 0 6px 10px rgba(0,0,0,.16), inset 0 -3px 5px rgba(0,0,0,.08), inset 0 1px 1px rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.12);
  position: relative;
}
.ball--special { color: var(--gold-ink); background: radial-gradient(circle at 34% 28%, #FFF0B3 0%, #FFD24D 40%, #F5B400 72%, #C98F00 100%); border-color: rgba(120,80,0,.25); }
.ball--sm { --s: 36px; font-size: 15px; }
.ball--xs { --s: 30px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 -2px 3px rgba(0,0,0,.08); }
.ball--digit { border-radius: 10px; }
@media (max-width: 639.98px) { :root { --ball: 44px; } .ball--sm { --s: 32px; } .lt-sep { flex-direction: row; align-items: center; gap: 10px; margin-left: 0; padding-left: 0; border-left: 0; width: 100%; padding-top: 6px; } }
.reveal .ball { opacity: 0; transform: translateY(10px) scale(.86); }
.reveal.is-in .ball { opacity: 1; transform: none; transition: opacity .55s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
@media (prefers-reduced-motion: reduce) { .reveal .ball { opacity: 1; transform: none; transition: none; } }

/* ---------- tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 3px; font-size: 13px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; color: #fff; background: var(--ink); white-space: nowrap; }
.tag--lg { font-size: 15px; padding: 5px 12px; }
.tag--live { background: var(--onair); }
.tag--ghost { background: transparent; color: var(--muted); border: 1px solid var(--line-2); font-weight: 500; }
.tag[data-game="superlotto638"] { background: var(--g-superlotto638); }
.tag[data-game="lotto649"] { background: var(--g-lotto649); }
.tag[data-game="daily539"] { background: var(--g-daily539); }
.tag[data-game="lotto3d"] { background: var(--g-lotto3d); }
.tag[data-game="lotto4d"] { background: var(--g-lotto4d); }
.tag[data-game="m539"] { background: var(--g-m539); }
.tag[data-game="m649"] { background: var(--g-m649); }
.tag[data-game="bingo"] { background: var(--g-bingo); }
.tag[data-game="scratch"] { background: var(--g-scratch); }
.age-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--onair); color: var(--onair); font-family: var(--font-num); font-weight: 900; font-size: 14px; letter-spacing: -.02em; flex: none; background: #fff; }
.age-badge--ink { background: transparent; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius); font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none; border: 1px solid transparent; transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--ink:hover { background: var(--ink-3); }
.btn--onair { background: var(--onair); color: #fff; border-color: var(--onair); }
.btn--onair:hover { background: var(--onair-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.onair .btn--ghost, .hero .btn--ghost, .lt--onair .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.onair .btn--ghost:hover, .hero .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn--sm { padding: 7px 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- rundown strip ---------- */
.rundown { background: var(--panel); border-bottom: 1px solid var(--line); }
.rundown-scroll { display: flex; gap: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; -webkit-overflow-scrolling: touch; }
.rundown-scroll::-webkit-scrollbar { height: 6px; }
.rundown-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.rundown-item { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; min-width: 150px; border-right: 1px solid var(--line); text-decoration: none; color: var(--text); }
.rundown-item:first-child { padding-left: 0; }
.rundown-item:hover .rundown-name { text-decoration: underline; text-underline-offset: .2em; }
.rundown-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.rundown-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); flex: none; }
.rundown-next { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rundown-next.is-today { color: var(--onair); font-weight: 700; }

/* ---------- panels & tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.panel-body { padding: 20px; }
@media (min-width: 900px) { .panel-body { padding: 28px; } }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: 20px; font-weight: 900; }
.tbl-wrap { overflow-x: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.tbl-wrap::-webkit-scrollbar { height: 8px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.tbl { min-width: 540px; }
.matrix { min-width: 620px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.tbl th { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); white-space: nowrap; background: #F7F9FB; border-bottom: 1px solid var(--line-2); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl td.nowrap { white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #F9FAFC; }
.tbl .tnum { font-weight: 600; }
.tbl--compact th, .tbl--compact td { padding: 8px 10px; font-size: 14px; }
.tbl .balls { display: flex; flex-wrap: wrap; gap: 6px; }
.amount { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }
.amount::before { content: "NT$"; font-weight: 500; font-size: .8em; margin-right: .15em; color: var(--muted); }
.amount--none::before { content: ""; }

/* number board: every number present, drawn ones struck forward */
.board { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-width: 460px; }
.board--80 { max-width: 560px; }
.board span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--line-2); }
.board span.is-hit { background: var(--ink); color: #fff; font-weight: 800; }
.board span.is-special { background: var(--gold); color: var(--gold-ink); font-weight: 800; }
.board-label { font-size: 12.5px; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }

/* weekly matrix */
.matrix th, .matrix td { text-align: center; padding: 10px 6px; font-size: 14px; border-bottom: 1px solid var(--line); }
.matrix th:first-child, .matrix td:first-child { text-align: left; white-space: nowrap; }
.matrix td .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.matrix td .dot--special { background: var(--onair); }
.matrix td .time { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.matrix th.is-today, .matrix td.is-today { background: #FFF6E0; }

/* ---------- game cards (fixed furniture) ---------- */
.game-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.game-card-band { height: 6px; background: var(--ink); }
.game-card[data-game="superlotto638"] .game-card-band { background: var(--g-superlotto638); }
.game-card[data-game="lotto649"] .game-card-band { background: var(--g-lotto649); }
.game-card[data-game="daily539"] .game-card-band { background: var(--g-daily539); }
.game-card[data-game="lotto3d"] .game-card-band { background: var(--g-lotto3d); }
.game-card[data-game="lotto4d"] .game-card-band { background: var(--g-lotto4d); }
.game-card[data-game="m539"] .game-card-band { background: var(--g-m539); }
.game-card[data-game="m649"] .game-card-band { background: var(--g-m649); }
.game-card[data-game="bingo"] .game-card-band { background: var(--g-bingo); }
.game-card[data-game="scratch"] .game-card-band { background: var(--g-scratch); }
.game-card-body { padding: 18px 20px 6px; }
.game-card h3 { font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.game-card h3 .en { font-family: var(--font-num); font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.game-card p { color: var(--muted); font-size: 14.5px; margin: 8px 0 0; }
.facts { list-style: none; margin: 12px 0 0; padding: 0; }
.facts li { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; margin: 0; }
.facts li span:first-child { color: var(--muted); font-size: 13px; letter-spacing: .04em; padding-top: 2px; }
.facts li span:last-child { font-weight: 500; }
.game-card-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 20px 16px; margin-top: auto; font-size: 14px; }
.game-card-foot a { font-weight: 500; }

/* ---------- steps (numbered margin column) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; margin: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; padding-top: 0; }
.steps > li::before { counter-increment: step; content: counter(step, decimal-leading-zero); grid-column: 1; grid-row: 1 / span 12; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -.03em; padding-top: 2px; }
.steps > li > h3, .steps > li > p, .steps > li > ul, .steps > li > ol, .steps > li > div { grid-column: 2; }
.steps h3 { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
.steps p + p { margin-top: .5em; }
.steps ul { margin: .5em 0 0; color: var(--muted); }
@media (min-width: 900px) { .steps > li { grid-template-columns: 80px 1fr; gap: 0 24px; padding: 24px 0; } .steps > li::before { font-size: 44px; } }

/* ---------- notices ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 16px 18px; }
.notice p { margin: 0; }
.notice strong { color: #fff; }
.notice a { color: #fff; }
.notice--light { background: #FFF6E0; color: var(--text); border: 1px solid #F3D98A; }
.notice--light a, .notice--light strong { color: var(--text); }
.notice--line { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); }
.notice--line a, .notice--line strong { color: var(--text); }
.notice .age-badge { margin-top: 1px; }
.age-line { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-a { padding: 0 0 18px; color: var(--muted); max-width: 44em; }
.faq .faq-a p:last-child { margin-bottom: 0; }
.faq-group h2 { font-size: 20px; font-weight: 900; margin: 32px 0 8px; }
.faq-group:first-child h2 { margin-top: 0; }

/* ---------- news ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); margin: 0; }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-date { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.news-item h2, .news-item h3 { font-size: 20px; font-weight: 900; }
.news-item .summary { color: var(--muted); margin: 0; }
.news-item .body { margin-top: 6px; }
.news-item .body p:last-child { margin-bottom: 0; }
.news-item details summary { cursor: pointer; font-weight: 500; color: var(--ink); list-style: none; display: inline-block; }
.news-item details summary::-webkit-details-marker { display: none; }
.news-item details summary { padding-right: 20px; position: relative; }
.news-item details summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease-out); }
.news-item details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.news-item details .body { padding-top: 8px; }
.news-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(245,180,0,.35); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--onair); }
.field .error { font-size: 13px; color: var(--onair); font-weight: 500; }
.field .error:empty { display: none; }
.field textarea { min-height: 160px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--ink); flex: none; }
.form-status { padding: 12px 14px; border-radius: var(--radius); font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-ok { background: #E8F5EC; color: #14532D; border: 1px solid #BFE3CB; }
.form-status.is-err { background: #FDECEF; color: #8A0F27; border: 1px solid #F5C1CB; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- definition list (legal facts) ---------- */
.facts-table th { width: 32%; text-align: left; font-weight: 700; color: var(--muted); font-size: 14px; }
.facts-table th, .facts-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: 0; }

/* ---------- side nav / toc ---------- */
@media (min-width: 900px) { .grid--sidebar > aside { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; } }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 8px 12px; border-left: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 14.5px; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.toc-title { font-size: 12px; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px 12px; font-weight: 700; }
@media (max-width: 899.98px) { .toc { position: static; } .toc ul { display: flex; flex-wrap: wrap; gap: 6px; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: #fff; } .toc-title { display: none; } }

/* ---------- help lines ---------- */
.lines { display: grid; gap: 0; border-top: 1px solid var(--line-2); margin: 8px 0 4px; }
.line { display: grid; grid-template-columns: 96px 1fr; gap: 4px 18px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .line { grid-template-columns: 120px 1fr; } }
.line .no { grid-row: 1 / span 2; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; color: var(--ink); }
.line .no a { text-decoration: none; }
.line .name { font-weight: 700; margin-top: 2px; }
.line .desc { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #D9E1EE; margin-top: clamp(40px, 6vw, 80px); }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-main { display: grid; gap: 32px; padding: clamp(36px, 5vw, 56px) 0 32px; }
@media (min-width: 900px) { .footer-main { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; } }
.footer-h { font-size: 13px; letter-spacing: .12em; color: var(--muted-ink); font-weight: 700; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 8px; font-size: 14.5px; }
.footer-org { font-size: 14.5px; line-height: 1.8; }
.footer-org .brand { margin-bottom: 14px; }
.footer-org p { margin: 0 0 8px; }
.footer-warn { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-weight: 700; color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 28px; font-size: 13px; color: var(--muted-ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-legal p { margin: 0; }
.footer-legal button { background: none; border: 0; color: #fff; padding: 0; font-size: 13px; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- overlays: age gate & cookies ---------- */
.gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(8, 16, 30, .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gate-card { width: min(100%, 520px); background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.gate-head { background: var(--ink); color: #fff; padding: 18px 24px; display: flex; align-items: center; gap: 14px; }
.gate-head .brand-name { font-size: 20px; }
.gate-body { padding: 24px; }
.gate-body h2 { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.gate-body p { color: var(--muted); }
.gate-actions { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 480px) { .gate-actions { grid-template-columns: 1fr 1fr; } }
.gate-foot { padding: 12px 24px 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
body.is-locked { overflow: hidden; }
.blocked { padding: clamp(40px, 8vw, 96px) 0; }
.blocked .panel-body { max-width: 640px; }
.blocked h1 { font-size: 26px; font-weight: 900; margin-bottom: 12px; }

.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--ink); color: #fff; box-shadow: 0 -8px 30px rgba(0,0,0,.28); border-top: 1px solid rgba(255,255,255,.12); }
.cookie-inner { display: grid; gap: 14px; padding: 18px 0; }
@media (min-width: 900px) { .cookie-inner { grid-template-columns: 1fr auto; align-items: center; gap: 24px; } }
.cookie p { margin: 0; font-size: 14.5px; color: #D9E1EE; }
.cookie p a { color: #fff; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie .btn--ghost:hover { border-color: #fff; }
.cookie .btn--white { background: #fff; color: var(--ink); }
.cookie .btn--white:hover { background: #E8EDF5; }

.modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; background: rgba(8,16,30,.7); }
.modal-card { width: min(100%, 560px); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; font-weight: 900; }
.modal-close { background: none; border: 1px solid var(--line-2); border-radius: var(--radius); width: 34px; height: 34px; display: grid; place-items: center; }
.modal-body { padding: 8px 22px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }
.consent-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.consent-row:last-child { border-bottom: 0; }
.consent-row h3 { font-size: 15px; font-weight: 700; }
.consent-row p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.switch { position: relative; width: 46px; height: 26px; flex: none; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 13px; transition: background .2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s var(--ease-out); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { background: var(--ink); opacity: .6; }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- misc ---------- */
.stamp { font-size: 12.5px; color: var(--muted); }
.stamp .tnum { font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.js-only { display: none; }
.js .js-only { display: revert; }
.js .no-js-only { display: none; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; }
.inline-list li { margin: 0; }
.results-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.results-nav a { text-decoration: none; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.results-nav a:hover { border-color: var(--ink); }
.result-section { margin-bottom: clamp(32px, 5vw, 56px); }
.result-section > h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 900; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.result-section > h2 .en { font-family: var(--font-num); font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.result-detail { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .result-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.error-page { padding: clamp(48px, 10vw, 120px) 0; }
.error-page .code { font-family: var(--font-num); font-size: clamp(64px, 12vw, 120px); font-weight: 900; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
@media print { .onair .nav, .cookie, .gate, .footer-legal button { display: none !important; } body { background: #fff; } .lt, .panel { box-shadow: none; } }
