:root {
  --bg:#101927; --panel:#192635; --pane:#263549; --line:#3b4c60;
  --ice-ink:#f1fbff; --ice-soft:#d3e4ef; --ice-accent:#8ee5d4;
  --ice-surface:#152737;
  --shell:#a9e2edaa;
}
:root[data-theme="day"] {
  color-scheme:light; --bg:#e8f1f4; --panel:#f7fbfc; --pane:#e3eff3; --line:#afc6d1;
  --text:#142e40; --soft:#385264; --orchid:#21587b; --mint:#17685e;
  --ice-ink:#102d40; --ice-soft:#203f54; --ice-accent:#14587a;
  --ice-surface:#f3f9fc;
  --shell:#9bc8d7;
}
header{background:#0e1928e8}
.theme-toggle{
  margin-left:auto;display:grid;place-items:center;flex:0 0 44px;padding:0;width:44px;height:44px;
  border:0;border-radius:0;background:transparent;
}
.theme-toggle .moon,[data-theme="day"] .theme-toggle .sun{display:none}
[data-theme="day"] .theme-toggle .moon{display:block}
[data-theme="day"] header{background:#f5fafbe8}
[data-theme="day"] nav a:is([aria-current],:hover){color:var(--text)}
[data-theme="day"] button[aria-pressed="true"]:not(.tabs button){color:#fff}
[data-theme="day"] :focus-visible{outline-color:#156492}
[data-theme="day"] :is(th,td,input,button){border-color:var(--line)}
[data-theme="day"] #feedback{color:#942943}
[data-theme="day"] .blockfield text{fill:#20364b}
.board{border-color:var(--shell);background:#1a2c3c}
.draw-core {
  position:relative;isolation:isolate;overflow:hidden;border-radius:14px;
  padding:clamp(18px,2.2vw,32px);
  background:radial-gradient(ellipse at 96% -30%,#9ad8e526,transparent 66%),var(--ice-surface);
  color:var(--ice-ink);
  box-shadow:inset 0 1px 1px #efffff80,inset 0 -1px 2px #91cdd749;
}
.draw-core::before {
  content:"";position:absolute;inset:1px;z-index:-1;pointer-events:none;border-radius:inherit;
  border:1px solid transparent;border-top-color:#eaffff35;border-right-color:#c5edff22;
  background:radial-gradient(ellipse 148px 34px at 88% -25px,transparent 77%,#dcfaff40 94%,transparent);
}
.board .draw-issue {
  display:flex;align-items:center;gap:clamp(8px,1vw,15px);margin:0;
  font-size:clamp(24px,2vw,30px);line-height:1.25;letter-spacing:0;
}
.draw-issue #issue {color:#bcbfc3;font:inherit;font-weight:650;text-decoration:none}
.draw-issue #issue-tail { display:inline-block;color:#101010;font:900 1.35em/1 "Arial Black","Segoe UI",sans-serif;transform:skewX(-9deg);letter-spacing:-.045em; }
[data-theme="day"] .draw-issue #issue { color:#606367; }
[data-theme="night"] .draw-issue #issue-tail { -webkit-text-stroke:2px #d4d7da;paint-order:stroke fill; }
.draw-core :is(.next-clock,.next-clock output,#numbers small){color:var(--ice-soft)}
[data-theme="day"] .flip-separator{color:#374d60}
[data-theme="day"] .board{background:#dbe9ef}
[data-theme="day"] .forecast{background:#e6f1f5;border-color:#b4cbd5}
[data-theme="day"] .forecast .ticket{background:#f9fcfd;border-color:#a6beca}
[data-theme="day"] .ticket-result,[data-theme="day"] .ticket-actions :is(#pred-issue,.reveal-ticket){color:#354f61}
[data-theme="day"] .ticket-result strong{color:#194d64}

@media(max-width:760px){.theme-toggle{order:1}}
.draw-core #combo {
  display:inline-flex;margin-inline-start:.08em;align-items:center;white-space:nowrap;
  font:800 clamp(28px,3.4vw,44px)/1.1 "Microsoft YaHei",sans-serif;
  color:#b4f2e4;letter-spacing:0;
}
.draw-core #combo[data-combo^="大"] {color:#ffd29d}
[data-theme="day"] .draw-core #combo {color:#075e55}
[data-theme="day"] .draw-core #combo[data-combo^="大"] {color:#81460e}
@media(max-width:360px){
  .draw-core {padding:15px 12px}
  .draw-core #numbers {gap:3px}
}
.draw-deck {display:grid;align-items:center;perspective:700px;overflow:clip}
.draw-deck > * {
  grid-area:1/1;min-width:0;transform-origin:50% 80%;
  transition:transform .32s cubic-bezier(.2,.75,.2,1),opacity .24s,visibility .32s;
}
.draw-wait {
  justify-self:start;padding:10px 20px;border:1px solid var(--line);border-radius:9px;
  color:var(--ice-ink);background:var(--ice-surface);
  box-shadow:0 3px 8px #07131e20;font-size:clamp(18px,2vw,26px);font-weight:600;
}
.draw-deck .draw-wait[aria-hidden="true"] {opacity:0;visibility:hidden;transform:translateY(50%) rotateX(-22deg)}
.draw-deck #numbers[aria-hidden="true"] {opacity:0;visibility:hidden;transform:translateY(-50%) rotateX(20deg)}
.draw-deck #numbers:not([aria-hidden="true"]), .draw-deck .draw-wait[aria-hidden="true"] {transition:none}
@media(prefers-reduced-motion:reduce){.draw-deck > *{transition:none}}

/* The mast stays translucent as page content passes behind it. */
header, [data-theme="day"] header {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 10px clamp(8px, 2.3vw, 36px);
  background: transparent;
  border: 0;
  pointer-events: none;
}
.mast-optics { position: absolute; pointer-events: none; }
/* Grazing light behind the glass gives its curvature a visible reference,
   including at the top of the page where there is no scrolling content yet. */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 160% at 21% 135%, transparent 56%, #80dadb4d 61%, #7ed5e11c 66%, transparent 72%),
    radial-gradient(ellipse 42% 175% at 79% -80%, transparent 63%, #ada8e24f 67%, #aba8e219 74%, transparent 82%);
  mask-image: linear-gradient(0deg,transparent,#000 22%,#000 82%,transparent);
}
header .mast {
  --glass-ink: #f1f8fc;
  --glass-muted: #c1d2dc;
  --glass-base: rgb(25 42 58 / .46);
  --rim: rgb(210 239 255 / .30);
  --rail: rgb(2 14 27 / .13);
  --lens: rgb(196 232 249 / .13);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 0;
  max-width: 1510px;
  padding: 7px 10px 7px 22px;
  color: var(--glass-ink);
  isolation: isolate;
  background: var(--glass-base);
  border: 1px solid var(--rim);
  border-radius: 38px;
  box-shadow: inset 1px 1px 1px #f6ffff99, inset -1px -1px 1px #c9eaff62, 0 6px 16px #00132924;
  pointer-events: auto;
}
/* Two independent samples keep a softly diffused interior and a refractive
   rim. Keep the mast itself unfiltered so both can see the page underneath. */
.mast::before, .mast::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.mast::before {
  -webkit-backdrop-filter: blur(4px) saturate(135%);
  backdrop-filter: blur(4px) saturate(135%);
}
.mast::after {
  background: linear-gradient(137deg,#f1ffff38,transparent 22%,transparent 68%,#cbefff2b);
  -webkit-backdrop-filter: blur(1px) saturate(150%);
  backdrop-filter: var(--optics, blur(1px)) saturate(150%);
  mask-image: linear-gradient(to bottom,#000 1px,#000b 4px,transparent 11px,transparent calc(100% - 11px),#000b calc(100% - 4px),#000),
              linear-gradient(to right,#000 1px,#0009 5px,transparent 18px,transparent calc(100% - 18px),#0009 calc(100% - 5px),#000);
}
[data-theme="day"] .mast {
  --glass-ink: #112e43;
  --glass-muted: #355268;
  --glass-base: rgb(241 249 255 / .55);
  --rim: rgb(98 144 173 / .36);
  --rail: rgb(95 144 169 / .12);
  --lens: rgb(255 255 255 / .31);
}
.mast .brand { justify-self: start; color: var(--glass-ink); font-size: 21px; letter-spacing: -.9px; }
.wordmark {
  --maple:#f05558;
  display:inline-flex;position:relative;align-items:baseline;white-space:nowrap;
  line-height:1;font-family:"Arial Black","Segoe UI",sans-serif;font-weight:900;
}
[data-theme="day"] .wordmark { --maple:#bf2334; }
.wordmark .mark { align-self:center;width:1.08em;height:1.15em;margin-right:.27em;background:var(--maple); }
.brand-letters { letter-spacing:-.065em;transform:skewX(-5deg); }
.brand-digits { width:1.76em;height:1.10em;align-self:center;margin-left:.025em;color:var(--maple);overflow:visible; }
.brand-readable { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
.theme-curtain {
  position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;overflow:hidden;
  isolation:isolate;touch-action:none;
}
.theme-curtain[hidden] { display:none; }
.drape {
  position:absolute;top:0;bottom:0;width:calc(50% + 1px);
  background:linear-gradient(90deg,#101925,#253144 40%,#172332 72%,#0e1723);
}
.drape.left { left:0;transform:translateX(-100%); }
.drape.right { right:0;transform:translateX(100%);background:linear-gradient(270deg,#101925,#253144 40%,#172332 72%,#0e1723); }
.theme-curtain .wordmark { --maple:#ff565c;color:#fff9f4;opacity:0;font-size:clamp(29px,6vw,70px); }
.mast nav {
  --inset: 4px;
  --position: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  width: clamp(365px,34vw,460px);
  gap: 0;
  margin: 0;
  padding: var(--inset);
  border-radius: 32px;
  background: var(--rail);
  box-shadow: inset 0 1px 3px #07172529, 0 1px 0 #e4f8ff29;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}
.mast nav a {
  display: grid;
  place-items: center;
  padding: 0 2px;
  min-height: 44px;
  border-radius: 25px;
  color: var(--glass-muted);
  white-space: nowrap;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
}
.mast nav a:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.mast nav a:is([aria-current],:hover) { color: var(--glass-ink); background: var(--lens); }
.mast nav.has-lens a:is([aria-current],:hover) { background: transparent; }
.mast nav.has-lens a[data-lit] { color: var(--glass-ink); font-weight: 650; }
.mast nav.has-lens::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: var(--inset) auto var(--inset) var(--inset);
  width: calc((100% - 2 * var(--inset)) / 4);
  box-sizing: border-box;
  border-radius: 30px;
  background: radial-gradient(ellipse at var(--shine,28%) -42%, #fffb, transparent 62%),
              linear-gradient(154deg,#e3faff1a,transparent 47%,#9ae0ff18 78%,#f3ffff40), var(--lens);
  -webkit-backdrop-filter: blur(2px) saturate(145%);
  backdrop-filter: var(--optics, blur(2px)) saturate(145%);
  border: 1px solid var(--rim);
  box-shadow: inset 1px 1px 1px #ffffffe0, inset -1px -1px 2px #c0eaff7d, 0 2px 4px #06152536;
  transform: translateX(calc(var(--position) * 100%)) scaleX(var(--stretch,1)) scaleY(var(--squash,1));
  transition: transform 210ms cubic-bezier(.22,.88,.27,1.08);
}
.mast nav.is-dragging { --stretch: 1.06; --squash: .92; cursor: grabbing; }
.mast nav.is-dragging::before { transition-duration: 42ms; }
.mast nav.is-dragging a { cursor: grabbing; }
.mast .theme-toggle {
  justify-self: end; margin: 0; color: var(--glass-ink);
  border:0;background:transparent;box-shadow:none;
}
.mast .theme-toggle:is(:hover,:focus-visible) svg { color:var(--orchid); }
.mast .theme-toggle:focus-visible { outline:2px solid currentColor;outline-offset:-3px; }
header ~ main #map, main#main { scroll-margin-top: 90px; }
@media (max-width: 760px) {
  header { padding: 5px 8px; }
  header .mast { grid-template-columns: 1fr auto; padding: 4px 6px 6px; gap: 3px 8px; border-radius: 24px; }
  .mast .brand { padding-left: 9px; font-size: 19px; }
  .mast .theme-toggle { grid-column: 2; grid-row: 1; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  header ~ main #map, main#main { scroll-margin-top: 125px; }
}
@media (prefers-reduced-motion: reduce) {
  .mast nav.has-lens::before { transition: none; }
  .mast nav.is-dragging { --stretch: 1; --squash: 1; }
}
@media (forced-colors: active) {
  .mast nav a[aria-current] { outline: 2px solid Highlight; outline-offset: -3px; }
}
@media (prefers-reduced-transparency: reduce) {
  header .mast { background: var(--panel); }
  header::before, .mast::before, .mast::after { display: none; }
  .mast nav.has-lens::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--pane); }
}

/* Keep the header's original space in the page while the home navigation folds. */
.home-header {
  transform:translateY(var(--pull-distance,0px));
  transition:transform .22s cubic-bezier(.2,.75,.25,1);
}
.home-header.mast-folded { transform:translateY(calc(-100% + var(--pull-distance,0px))); }
.home-header.mast-pulling { transition:none; }
/* Interior pages use the same mast, ice palette and content surfaces. */
.report-main {
  padding-block: clamp(14px, 2.25vw, 30px) 48px;
}
.report-main:has(> article.panel) {
  max-inline-size: calc(54rem + 2 * var(--pad));
}
.report-main:has(> #detail, > .panel > .equation) {
  max-inline-size: calc(48rem + 2 * var(--pad));
}
.report-heading {
  display: grid;
  justify-items: start;
  gap: clamp(4px, 1vw, 9px);
  margin-block-end: clamp(14px, 2.3vw, 26px);
  padding: 12px clamp(16px, 2.35vw, 30px) clamp(17px, 2.3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--ice-surface);
  box-shadow: inset 0 1px 0 rgb(200 238 250 / 13%);
  color: var(--ice-ink);
}
:root[data-theme="day"] .report-heading {
  box-shadow: inset 0 1px 0 #fff, 0 10px 23px -20px rgb(38 71 100 / 27%);
}
.report-heading h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.report-heading .trail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  margin-inline-start: -8px;
  border-radius: 11px;
  color: var(--ice-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 630;
}
.report-heading .trail::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline-start: 2px;
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(45deg);
}
.report-heading .trail:is(:hover, :focus-visible) {
  background: var(--pane);
  color: var(--ice-ink);
}
.report-heading .trail:focus-visible {
  outline: 2px solid var(--ice-accent);
  outline-offset: -2px;
}
.report-main .coverage {
  margin-block: 16px 0;
  color: var(--ice-soft);
  font-size: 13px;
}
.report-main [id^="group-"] {
  scroll-margin-top: 132px;
}

.mast-pull {
  position:absolute;left:50%;top:100%;transform:translateX(-50%);z-index:1;
  display:grid;justify-items:center;align-content:start;width:58px;height:44px;padding:0;
  border:0;background:transparent;box-shadow:none;pointer-events:auto;touch-action:none;cursor:grab;
}
.mast-pull[hidden] { display:none; }
.mast-pull::before {
  content:"";grid-area:1/1;width:46px;height:15px;border:1px solid var(--line);border-top:0;
  border-radius:0 0 10px 10px;background:var(--panel);box-shadow:0 2px 5px #07132430;
}
.mast-pull::after {
  content:"";grid-area:1/1;width:8px;height:8px;align-self:center;
  border:solid var(--soft);border-width:0 1.7px 1.7px 0;transform:translateY(2px) rotate(225deg);
}
.mast-folded .mast-pull::after { transform:translateY(-2px) rotate(45deg); }
.mast-pulling .mast-pull { cursor:grabbing; }
@media(prefers-reduced-motion:reduce){ .home-header { transition:none; } }

/* Draw, prediction and history share one reading order at every width. */
#board {
  --rim-glint: #daf8ffa6;
  --rim-shade: #30557585;
  --draw-tint: #192e40ef;
  --prediction-tint: #1a2b3a;
  --sum-ink: #a2eddf;
  --muted-ink: #bac9d3;
  --tail-surface: #d4e5ec;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "draw" "prediction" "recent";
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
}
[data-theme="day"] #board {
  --rim-glint: #ffffff;
  --rim-shade: #8db5c78c;
  --draw-tint: #e9f4f9f2;
  --prediction-tint: #edf5f7;
  --sum-ink: #106255;
  --muted-ink: #4b6170;
  --tail-surface: #d5e7ee;
}
#board .draw-core, #board .forecast {
  position: relative;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid var(--rim-shade);
  padding: clamp(15px, 2vw, 28px);
  box-shadow: inset 0 1px 1px var(--rim-glint), inset 0 -1px 3px var(--rim-shade), 0 4px 12px #0717270c;
}
#board .draw-core {
  grid-area: draw;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: "issue clock" "result result";
  align-content: center;
  align-items: center;
  row-gap: clamp(16px, 2.5vw, 32px);
  background: radial-gradient(ellipse at 97% -65%, #7dc5d754, transparent 64%), var(--draw-tint);
}
#board .draw-core::before, #board .forecast::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 0;
  border-radius: inherit;
  padding: 2px;
  background:
    radial-gradient(ellipse 32% 130% at 13% 0%, var(--rim-glint), transparent 86%),
    radial-gradient(ellipse 45% 90% at 86% 100%, #a3d0ddad, transparent 83%),
    linear-gradient(145deg, var(--rim-glint), transparent 24% 51%, #81c1d86e 72%, var(--rim-glint) 89%, transparent);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
@supports (backdrop-filter: blur(4px)) {
  #board .draw-core { backdrop-filter: blur(4px) saturate(1.1); }
}
@media (prefers-reduced-transparency: reduce) {
  #board .draw-core { background: var(--ice-surface); backdrop-filter: none; }
}
#board .draw-issue { grid-area: issue; font-size: clamp(18px, 4.6vw, 26px); white-space: nowrap; }
#board #issue { display: inline-flex; align-items: baseline; gap: .1em; font: inherit; font-weight: 650; }
#board #issue-tail, #board .recent-period strong {
  display: inline-block;
  background: var(--tail-surface);
  color: #0e1a23;
  border-radius: .18em;
  padding: .04em .14em;
  font: italic 850 1.25em/1.06 "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  -webkit-text-stroke: 0;
  transform: none;
}
#board .next-clock {
  grid-area: clock; justify-self: end;
  display: grid; justify-items: end; gap: 4px;
  min-height: 0; margin: 0; font-size: 12px; line-height: 1.2;
  color: var(--muted-ink);
}
#board .flip-clock { font-size: clamp(17px, 3.7vw, 21px); gap: 2px; }
#board .flip-digit { box-shadow: 0 1px 1px #18252d60; }
#board .draw-deck, #board .draw-core > #numbers { grid-area: result; }
#board #numbers {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: clamp(9px, 3vw, 24px); margin: 0; padding-block: 3px 5px;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.draw-balls, .draw-sum { display: inline-flex; align-items: center; gap: clamp(4px, 1vw, 9px); }
#board .draw-balls b {
  width: clamp(36px, 10.5vw, 64px);
  font-size: clamp(22px, 6.5vw, 36px);
}
#board .draw-sum { gap: 4px; padding-left: clamp(8px, 2vw, 18px); border-left: 1px solid var(--line); }
.sum-label { font: 600 clamp(12px, 3vw, 15px)/1.2 "Microsoft YaHei", sans-serif; color: var(--muted-ink); white-space: nowrap; }
#board #total { display: inline; width: auto; aspect-ratio: auto; border: 0; background: none; box-shadow: none; color: var(--sum-ink); font-size: clamp(26px, 7.5vw, 40px); }
#board #combo { display: flex; margin: 0; gap: 4px; font-size: clamp(17px, 4.5vw, 24px); }
:is(#board, #stats .record-grid) [data-value] {
  display: inline-grid; place-items: center; width: 1.36em; height: 1.36em;
  color: white; border-radius: .31em; font-weight: 750; line-height: 1;
  background: linear-gradient(var(--badge-light),var(--badge-dark));
}
:is(#board, #stats .record-grid) [data-value="大"] { --badge-light: #c94352; --badge-dark: #a52435; }
:is(#board, #stats .record-grid) [data-value="小"] { --badge-light: #426ed4; --badge-dark: #2853af; }
:is(#board, #stats .record-grid) [data-value="单"] { --badge-light: #8759c4; --badge-dark: #6536a1; }
:is(#board, #stats .record-grid) [data-value="双"] { --badge-light: #25845f; --badge-dark: #146346; }
#board .forecast {
  grid-area: prediction;
  display: grid; align-content: center; grid-template-columns: minmax(0,1fr);
  gap: 9px; background: var(--prediction-tint);
}
#board .forecast h2, .recent-draws h2 { margin: 0; font-size: 18px; line-height: 1.3; }
#board .foil-field { min-height: 80px; }
.recent-draws {
  grid-area: recent; min-width: 0; padding: clamp(12px, 1.8vw, 23px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.recent-table { margin-top: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.recent-table :is(td, th) {
  padding: 5px 2px; height: 34px; border-bottom: 1px solid var(--line);
  text-align: center; vertical-align: middle; line-height: 1.2;
}
.recent-table thead th { height: 28px; background: transparent; font-size: 12px; color: var(--muted-ink); font-weight: 600; }
.recent-table th:first-child { position: static; text-align: left; background: transparent; }
.recent-table tbody tr:last-child > * { border-bottom: 0; }
.recent-table tbody tr { position: relative; }
.recent-period {
  white-space: nowrap; font-size: clamp(12px, 3.25vw, 15px); text-decoration: none; font-weight: 600; color: var(--muted-ink);
}
.recent-period::after { content: ""; position: absolute; inset: 0; }
#board .recent-period strong { font-size: 1.15em; }
.recent-table tr:focus-within, .recent-table tbody tr:hover { background: var(--pane); }
.recent-balls { display: inline-flex; align-items: center; gap: clamp(2px, .7vw, 5px); }
.recent-balls i {
  display: grid; place-items: center; width: clamp(19px, 5.6vw, 26px); aspect-ratio: 1;
  border-radius: 50%; font: 700 clamp(13px, 3.6vw, 16px)/1 "Segoe UI", sans-serif;
  background: linear-gradient(145deg, #fafeff, #c4dce7); color: #18354a;
}
.recent-table .recent-sum { color: var(--sum-ink); font: 750 18px/1 "Segoe UI", sans-serif; }
.recent-table [data-value] { font-size: 14px; }
@media (min-width: 800px) {
  #board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "draw recent" "prediction recent";
    grid-template-rows: auto 1fr;
    gap: 14px;
  }
  #board .draw-core { min-height: 165px; container-type: inline-size; }
  #board #numbers { gap: clamp(9px, 3cqi, 24px); }
  #board .draw-balls { gap: clamp(4px, 1.2cqi, 9px); }
  #board .draw-balls b { width: clamp(38px, 12cqi, 64px); font-size: clamp(24px, 7cqi, 36px); }
  #board .draw-sum { padding-left: clamp(8px, 2cqi, 18px); }
  #board #combo { font-size: clamp(17px, 4.2cqi, 24px); }
  #board .foil-field { min-height: 104px; }
}
@media (max-width: 760px) {
  #board { margin-inline: calc(10px - var(--pad)); }
}
@media (max-width: 355px) {
  #board .draw-core { padding: 13px 11px; }
  #board #numbers { gap: 8px; }
  .recent-draws { padding: 11px 9px; }
}

/* The filter strip uses the site's glass controls. Reports stay on readable data surfaces. */
#stats {
  --statistics-edge: color-mix(in srgb, var(--line) 73%, transparent);
  --statistics-button: color-mix(in srgb, var(--pane) 63%, var(--panel));
  --statistics-selected: color-mix(in srgb, var(--ice-accent) 16%, var(--panel));
  --statistics-selected-edge: color-mix(in srgb, var(--ice-accent) 62%, var(--panel));
  --statistics-shadow: 0 10px 26px rgb(6 23 38 / 14%);
  --statistics-glint: inset 0 1px 0 rgb(220 247 255 / 10%);
  color: var(--ice-ink);
  font-variant-numeric: tabular-nums;
}
[data-theme="day"] #stats {
  --statistics-shadow: 0 8px 24px rgb(45 87 113 / 8%);
  --statistics-glint: inset 0 1px 0 rgb(255 255 255 / 74%);
}
#stats .stat-workspace {
  grid-template-columns: minmax(180px, 218px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
#stats .stat-workspace.single {
  grid-template-columns: minmax(0, 1fr);
}
#stats .scope {
  margin: 0;
  padding: 0 14px 14px;
  border: 1px solid var(--statistics-edge);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 91%, transparent);
  box-shadow: var(--statistics-glint), var(--statistics-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
#stats .scope:not([open]) {
  padding-bottom: 0;
}
#stats summary {
  list-style: none;
}
#stats summary::-webkit-details-marker {
  display: none;
}
#stats :is(.scope, #hours) > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px;
  font-weight: 650;
}
#stats :is(.scope, #hours, .daily-row) > summary::after {
  content: "";
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  margin: 0 4px 3px 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
#stats :is(.scope, #hours, .daily-row)[open] > summary::after {
  margin: 3px 4px 0 0;
  transform: rotate(225deg);
}
#stats .scope > summary {
  font-size: 16px;
}
#stats .scope #hours {
  margin: 10px 0 0;
  border-top: 1px solid var(--statistics-edge);
}
#stats #hours > summary,
#stats :is(.note, .coverage, label, small, .report-head span, .pager span) {
  color: var(--ice-soft);
}
#stats .scope .switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#stats .switch,
#stats .tabs {
  gap: 6px;
}
#stats :is(button, input) {
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--statistics-edge);
  border-radius: 12px;
  background: var(--statistics-button);
  color: var(--ice-ink);
  font-size: 14px;
  box-shadow: var(--statistics-glint);
}
#stats button[aria-pressed="true"] {
  border-color: var(--statistics-selected-edge);
  background: var(--statistics-selected);
  color: var(--ice-ink);
  font-weight: 650;
}
#stats button:enabled:hover,
#stats input:hover {
  border-color: var(--statistics-selected-edge);
}
#stats button:disabled {
  opacity: .48;
}
#stats :is(button, input, summary, a, .scroll):focus-visible {
  outline: 2px solid var(--ice-accent);
  outline-offset: 2px;
}
#stats .scroll:focus-visible {
  outline-offset: -3px;
}
#stats .inputs,
#stats #dates {
  gap: 4px 8px;
}
#stats .inputs small {
  line-height: 1.5;
}
#stats :is(.data-view, .scope) input {
  width: 100%;
}
#stats .data-view > label {
  width: min(100%, 24rem);
  margin: 0 0 12px;
  font-weight: 600;
}
#stats #feedback:empty {
  display: none;
}
#stats #report > .switch {
  margin-block: 10px;
}
#stats #report > section + section {
  margin-top: 22px;
}
#stats .section-title,
#stats .report-head {
  margin-block: 14px 10px;
}
#stats:is([data-tool="daily"], [data-tool="monthly"]) .report-head {
  justify-content: flex-start;
}
#stats:is([data-tool="daily"], [data-tool="monthly"]) .report-head h3 {
  display: none;
}
#stats .report-head h3,
#stats .section-title h2 {
  font-size: 17px;
  font-weight: 650;
}
#stats .note,
#stats .coverage {
  font-size: 13px;
  line-height: 1.55;
}
#stats #report > .note:first-child,
#stats .report-head:first-child {
  margin-top: 0;
}
#stats .scroll {
  border: 1px solid var(--statistics-edge);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ice-ink);
  box-shadow: var(--statistics-glint), var(--statistics-shadow);
}
#stats table :is(th, td) {
  border-color: var(--statistics-edge);
  padding: 10px clamp(8px, 1.45vw, 18px);
}
#stats table thead th {
  background: var(--statistics-button);
  color: var(--ice-soft);
  font-size: 13px;
  font-weight: 650;
}
#stats table tbody th:first-child {
  background: var(--panel);
}
#stats table tbody tr:focus-within > *,
#stats table tbody tr:hover > * {
  background: var(--statistics-button);
}
#stats .scroll a {
  color: var(--ice-accent);
  font-weight: 650;
  text-decoration: none;
}
#stats .scroll a:is(:hover, :focus-visible) {
  text-decoration: underline;
}
#stats .range-chart {
  margin-block: 12px;
  padding: 14px clamp(12px, 2vw, 20px) 16px;
  border: 1px solid var(--statistics-edge);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--statistics-glint), var(--statistics-shadow);
}
#stats .range-chart figcaption {
  color: var(--ice-soft);
  font-size: 13px;
  font-weight: 650;
}
#stats .range-chart > div {
  gap: clamp(2px, .6vw, 8px);
  height: 134px;
  margin-top: 10px;
  border-bottom: 1px solid var(--statistics-edge);
}
#stats .range-chart > div > div {
  border-radius: 5px 5px 0 0;
  background: color-mix(in srgb, var(--ice-accent) 72%, var(--panel));
}
#stats .range-chart small {
  right: 0;
  left: 0;
  font-size: clamp(9px, 2.25vw, 12px);
  text-align: center;
}
#stats .pager {
  gap: 10px;
  margin: 14px 0 0;
}
#stats .pager button {
  border-radius: 999px;
}
#stats .daily-cards {
  gap: 8px;
}
#stats .daily-row {
  padding-inline: 13px;
  border: 1px solid var(--statistics-edge);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--statistics-glint);
}
#stats .daily-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 49px;
}
#stats .daily-row > summary span {
  float: none;
  color: var(--ice-soft);
  font-size: 12px;
}
#stats .daily-row dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
#stats .daily-row dt {
  color: var(--ice-soft);
  font-size: 12px;
}
#stats .daily-row dd {
  color: var(--ice-ink);
  font-weight: 650;
}
@media (max-width: 760px) {
  #stats .scope {
    margin-bottom: 14px;
    padding-inline: 12px;
    border-radius: 17px;
  }
  #stats .scope .switch {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  #stats .scope .switch button {
    grid-column: span 2;
  }
  #stats .scope .switch button:nth-child(n+4) {
    grid-column: span 3;
  }
  #stats .scope :is(#dates, .inputs) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #stats .scope #dates:has(> label:only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
  #stats .scroll {
    border-radius: 15px;
  }
  #stats table :is(th, td) {
    padding-inline: 10px;
  }
  #stats .scroll:not(.record-grid):has(thead th:nth-child(6)) {
    border: 0;
    background: none;
    box-shadow: none;
  }
  #stats .scroll:not(.record-grid):has(thead th:nth-child(6)) tbody tr {
    gap: 8px 12px;
    margin: 0 0 8px;
    padding: 10px 12px 12px;
    border: 1px solid var(--statistics-edge);
    border-radius: 15px;
    background: var(--panel);
    box-shadow: var(--statistics-glint);
  }
  #stats .scroll:not(.record-grid):has(thead th:nth-child(6)) tbody tr > * {
    padding: 0;
    border: 0;
    background: transparent;
  }
  #stats .scroll:not(.record-grid):has(thead th:nth-child(6)) tbody th a {
    display: flex;
    align-items: center;
    min-height: 32px;
  }
  #stats .scroll:not(.record-grid):has(thead th:nth-child(6)) td:before {
    color: var(--ice-soft);
    font-size: 11px;
  }
}

/* Archived draws and the methodology page share the site's quiet content surface. */
.report-main > .panel:has(> .equation),
.report-main #detail > .panel,
.report-main > article.panel {
  padding: clamp(18px, 3.2vw, 40px);
  margin-block: 0 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--ice-surface);
  color: var(--ice-ink);
  box-shadow: inset 0 1px 0 rgb(202 234 250 / 11%);
}

:root[data-theme="day"] .report-main > .panel:has(> .equation),
:root[data-theme="day"] .report-main #detail > .panel,
:root[data-theme="day"] .report-main > article.panel {
  box-shadow: inset 0 1px 0 #fff, 0 12px 24px -20px rgb(34 70 101 / 31%);
}

.report-main > .panel:has(> .equation),
.report-main #detail > .panel {
  max-inline-size: 48rem;
}

.report-main :is(.panel, #detail) .equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px clamp(12px, 2.4vw, 23px);
  margin-block: 15px 13px;
  color: var(--ice-accent);
  font-size: clamp(25px, 6vw, 48px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.report-main .detail-balls,
.report-main .detail-sum {
  display: inline-flex;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
}

.report-main .detail-balls b {
  display: grid;
  width: clamp(35px, 10vw, 58px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 37%);
  border-radius: 50%;
  background: #d5e9f4;
  color: #153249;
  font-size: clamp(18px, 5.7vw, 31px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 1px #fff, inset 0 -3px 6px rgb(66 118 153 / 22%), 0 3px 8px rgb(6 20 31 / 18%);
}

:root[data-theme="day"] .report-main .detail-balls b {
  border-color: #c4dce8;
  background: #e5f2f9;
  box-shadow: inset 0 1px 1px #fff, inset 0 -3px 5px rgb(66 118 153 / 17%), 0 3px 7px rgb(41 81 111 / 12%);
}

.report-main .detail-sum {
  padding-inline-start: clamp(10px, 2vw, 18px);
  border-inline-start: 1px solid var(--line);
}

.report-main .detail-sum span {
  color: var(--ice-soft);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.report-main .detail-sum strong {
  color: var(--ice-accent);
  font-weight: 800;
}

.report-main > .panel:has(> .equation) > p:last-child,
.report-main #detail > .panel > p:last-child {
  margin-block-end: 0;
  color: var(--ice-soft);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.report-main #detail > p {
  margin-block: 0 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ice-surface);
  color: var(--ice-soft);
}

.report-main > article.panel {
  max-inline-size: 54rem;
}

.report-main > article.panel > h2 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.4;
}

.report-main > article.panel > h2:not(:first-child) {
  margin-block-start: clamp(24px, 4vw, 34px);
}

.report-main > article.panel > p {
  margin: 0;
  color: var(--ice-soft);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.report-main > article.panel a {
  color: var(--ice-accent);
  text-decoration-thickness: 1px;
}

/* The archived ledger repeats the home table's compact balls and result colors. */
#stats .record-grid table :is(th, td) {
  vertical-align: middle;
}
#stats .record-grid .record-time {
  display: none;
}
#stats .record-sum {
  color: var(--sum-ink, var(--ice-accent));
  font-size: 1.12em;
}
#stats .record-combo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
#stats .bar {
  border-radius: 999px;
  background: linear-gradient(to right, var(--ice-accent) var(--p), var(--pane) var(--p));
}
.archive-chart {
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ice-ink);
}
.archive-chart .ground { stroke: var(--line); }
.archive-chart .axis { border-color: var(--line); }
.archive-chart .axis a { color: var(--ice-accent); }
.archive-chart .block .cap { fill: color-mix(in srgb, var(--ice-soft) 72%, var(--ice-accent)); }
.archive-chart .block .face { fill: color-mix(in srgb, var(--ice-accent) 56%, var(--pane)); }
.archive-chart .block .side { fill: color-mix(in srgb, var(--ice-accent) 36%, var(--panel)); }
.archive-chart .block.newest .cap { fill: color-mix(in srgb, var(--ice-accent) 65%, #fff); }
.archive-chart .block.newest .face { fill: var(--ice-accent); }
.archive-chart .block.newest .side { fill: color-mix(in srgb, var(--ice-accent) 58%, var(--bg)); }
@media (max-width: 900px) {
  #stats .record-grid table :is(th, td) {
    padding: 4px 5px;
    text-align: center;
    line-height: 1.15;
  }
  #stats .record-grid table {
    font-size: 13px;
  }
  #stats .record-grid table thead th {
    height: 38px;
    font-size: 11px;
    white-space: normal;
  }
  #stats .record-grid table :is(th, td):nth-child(2) {
    display: none;
  }
  #stats .record-grid table :is(th, td):first-child {
    text-align: left;
    padding-inline-start: 10px;
  }
  #stats .record-grid th a {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
  }
  #stats .record-grid .record-time {
    display: block;
    margin-top: 3px;
    color: var(--ice-soft);
    font-size: 10px;
    font-weight: 400;
  }
  #stats .record-grid .recent-balls i { width: 17px; font-size: 11px; }
  #stats .record-grid [data-value] { font-size: 11px; }
  #stats .record-grid td:last-child { font-size: 11px; }
}

@media (prefers-reduced-transparency: reduce) {
  #stats .scope {
    background: var(--panel);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
