@font-face {
  font-family: "Noto UI";
  src: url("fonts/noto-ui.woff2") format("woff2");
  font-weight: 450 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Score";
  src: url("fonts/barlow-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Score";
  src: url("fonts/barlow-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Noto Marks";
  src: url("fonts/noto-marks.woff2") format("woff2");
  font-weight: 680;
  font-display: swap;
}
:root, :root[data-theme="day"] {
  color-scheme: light;
  --canvas: #f4f5f3;
  --sheet: #fff;
  --ink: #17272b;
  --secondary: #536568;
  --rule: #d8e0df;
  --quiet: #edf1f0;
  --paper-edge: #d2dada;
  --glass: rgb(252 253 251 / 91%);
  --title-ink: #121f25;
  --plate-top: #f5f9f8;
  --plate-mid: #e8f0f0;
  --plate-base: #d7e5e6;
  --plate-edge: #c2d2d4;
  --sum: #1f6462;
  --maple: #be3041;
  --focus: #276c87;
  --readable-white: #fff;
  --skin-shadow: 0 1px 1px #132a3210, 0 5px 14px -12px #1c3c4160;
  --cn: "Noto UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --numerals: "Barlow Score", "Arial Narrow", "Bahnschrift", Arial, sans-serif;
  --shell-width: 1264px;
  --gutter: clamp(12px, 3.8vw, 60px);
  --bg: var(--canvas); --text: var(--ink); --soft: var(--secondary);
  --panel: var(--sheet); --pane: var(--quiet); --line: var(--rule);
  --ice-surface: var(--sheet); --ice-ink: var(--ink); --ice-soft: var(--secondary);
  --mint: var(--sum); --ice-accent: var(--focus); --orchid: var(--focus);
}
:root[data-theme="night"] {
  color-scheme: dark;
  --canvas: #11191e;
  --sheet: #19232a;
  --ink: #eaf0f1;
  --secondary: #adbcc2;
  --rule: #364349;
  --quiet: #26343b;
  --paper-edge: #344149;
  --glass: rgb(28 39 46 / 93%);
  --title-ink: #f3f6f5;
  --plate-top: #30434a;
  --plate-mid: #26383f;
  --plate-base: #1e2d34;
  --plate-edge: #485b61;
  --sum: #b3e6d9;
  --maple: #f36570;
  --focus: #a1d9e5;
  --skin-shadow: 0 2px 9px #050c0f24;
}
.preview-home *, .preview-home *::before, .preview-home *::after { box-sizing: border-box; }
body.preview-home { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.5 var(--cn); }
.preview-home :is(h1,h2,h3,p,ol) { margin: 0; }
.preview-home a { color: inherit; text-decoration: none; }
.preview-home button { font: inherit; color: inherit; cursor: pointer; }
.preview-home :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.preview-home .skip:not(:focus), .visually-hidden, .brand-readable, .clock-readable {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.preview-home .skip:focus { position: fixed; top: 8px; left: 8px; background: var(--sheet); padding: 10px; z-index: 20; }
body header, [data-theme] body header {
  position: sticky; z-index: 8; top: 0; background: none; border: 0;
  padding: 14px var(--gutter) 8px; pointer-events: none;
}
body header::before { display: none; }
body header .mast {
  --glass-ink: var(--ink); --glass-muted: var(--secondary);
  box-sizing: border-box; display: grid; position: relative; isolation: isolate;
  grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: var(--shell-width); margin: auto; min-height: 62px; padding: 5px 16px 5px 23px;
  pointer-events: auto; background: var(--glass); color: var(--ink);
  border: 1px solid var(--paper-edge); border-radius: 17px;
  box-shadow: inset 0 1px 0 #ffffffa0, 0 2px 4px #1c313609;
}
[data-theme="night"] body header .mast { box-shadow: inset 0 1px 0 #c3dce519, 0 2px 4px #0002; }
body .mast::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; backdrop-filter: blur(10px); pointer-events: none; }
body .mast::after { display: none; }
body .mast .brand { padding: 0; justify-self: start; display: inline-flex; align-items: center; min-height: 42px; font-size: 23px; color: var(--ink); text-decoration: none; }
.wordmark { position: relative; display: inline-flex; align-items: baseline; white-space: nowrap; font: 900 1em/1 "Arial Black","Segoe UI",sans-serif; }
.wordmark .mark {
  display: inline-block; align-self: center; width: 1.04em; height: 1.10em; margin-right: .29em;
  background: var(--maple); clip-path: polygon(50% 0,60% 23%,71% 17%,68% 43%,84% 30%,86% 39%,100% 37%,94% 51%,100% 54%,76% 73%,80% 83%,55% 80%,55% 100%,46% 100%,46% 80%,20% 83%,24% 73%,0 54%,6% 50%,0 37%,14% 39%,16% 30%,32% 43%,29% 17%,40% 23%);
}
.wordmark .brand-letters { letter-spacing: -.065em; transform: skewX(-5deg); }
.wordmark .brand-digits { width: 1.70em; height: 1.08em; align-self: center; margin-left: .04em; color: var(--maple); overflow: visible; }
body .mast nav {
  --position: 0; box-sizing: border-box; position: relative; display: grid; isolation: isolate;
  grid-template-columns: repeat(4,minmax(0,1fr)); width: 374px; margin: 0; padding: 0; gap: 0;
  border: 0; border-radius: 0; box-shadow: none; background: transparent; touch-action: pan-y pinch-zoom; user-select: none;
}
body .mast nav a {
  display: grid; place-content: center; white-space: nowrap; height: 42px; min-height: 42px; padding: 0 4px;
  font: 550 14px/1.2 var(--cn); letter-spacing: 0; color: var(--secondary); border-radius: 6px; text-decoration: none;
}
body .mast nav a:is([aria-current],:hover), body .mast nav.has-lens a[data-lit] { color: var(--ink); background: transparent; font-weight: 650; }
body .mast nav.has-lens::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: auto auto 1px 0; width: 25%; height: 2px; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none;
  background: linear-gradient(90deg,transparent 32%,var(--maple) 32% 68%,transparent 68%);
  transform: translateX(calc(var(--position) * 100%)); transition: transform 170ms ease-out;
}
body .mast .theme-toggle { display: grid; place-items: center; justify-self: end; height: 44px; width: 44px; padding: 0; margin: 0; border: 0; box-shadow: none; background: transparent; color: var(--ink); cursor: pointer; }
body .theme-toggle .moon, [data-theme="day"] body .theme-toggle .sun { display: none; }
body .mast .theme-toggle { touch-action: manipulation; }
body .mast .theme-toggle svg { pointer-events: none; }
[data-theme="day"] body .theme-toggle .moon { display: block; }
body .mast a:focus-visible, body .mast button:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.mast-optics { position: absolute; pointer-events: none; }
.home-header { transform: translateY(var(--pull-distance,0px)); transition: transform 180ms ease-out; }
.home-header.mast-folded { transform: translateY(calc(-100% + var(--pull-distance,0px))); }
.home-header.mast-pulling { transition: none; }
.preview-home .mast-pull {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%); z-index: 1; pointer-events: auto;
  width: 48px; height: 26px; border: 0; background: none; padding: 0; cursor: grab; touch-action: none;
}
.preview-home .mast-pull[hidden] { display: none; }
.preview-home .mast-pull::before { content: ""; position: absolute; inset: 0 3px auto; height: 14px; background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 8px 8px; }
.preview-home .mast-pull::after { content: ""; position: absolute; width: 6px; height: 6px; top: 4px; left: 21px; border: solid var(--secondary); border-width: 0 1.5px 1.5px 0; transform: rotate(225deg); }
.preview-home .mast-folded .mast-pull::after { transform: rotate(45deg); }
.theme-curtain { position: fixed; z-index: 100; inset: 0; isolation: isolate; display: grid; place-items: center; overflow: hidden; pointer-events: all; }
.theme-curtain[hidden] { display: none; }
.drape { position: absolute; top: 0; bottom: 0; width: calc(50% + 1px); background: #1a282e; }
.drape.left { left: 0; transform: translateX(-100%); }
.drape.right { right: 0; transform: translateX(100%); }
.theme-curtain .wordmark { --maple: #f36570; font-size: clamp(29px,5vw,62px); color: #f4f7f5; opacity: 0; }
.preview-home main, .preview-home footer { width: min(var(--shell-width),calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.preview-home main { padding: clamp(13px,1.5vw,24px) 0 0; }
.preview-home #board { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "draw recent" "prediction recent"; grid-template-rows: minmax(0,1.36fr) minmax(0,1fr); gap: 14px; }
.preview-home h2 { color: var(--title-ink); font: 650 clamp(19px,1.6vw,23px)/1.25 var(--cn); letter-spacing: -.045em; }
.draw-core, .forecast, .recent-draws, .tool-case, .archive-chart { min-width: 0; border: 1px solid var(--paper-edge); border-radius: 16px; box-shadow: var(--skin-shadow); }
.draw-core {
  grid-area: draw; display: grid; position: relative; isolation: isolate; overflow: hidden;
  grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto minmax(64px,1fr) auto;
  grid-template-areas: "issue clock" "numbers numbers" "controls controls"; align-items: center; gap: 12px;
  padding: clamp(20px,2vw,30px) clamp(18px,2.25vw,34px) 12px;
  border-color: var(--plate-edge);
  background: radial-gradient(ellipse at 25% -10%, #ffffff65,transparent 53%), linear-gradient(117deg,var(--plate-top),var(--plate-mid) 53%,var(--plate-base));
  box-shadow: inset 0 1px 0 #ffffffc4, inset -1px -1px 0 #ffffff50, var(--skin-shadow);
}
.draw-core::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 57% 180% at 107% -85%, transparent 86%,#fcffff45 89%,transparent 95%);
}
[data-theme="night"] .draw-core { background: radial-gradient(ellipse at 15% -20%,#aac1cb12,transparent 59%), linear-gradient(117deg,var(--plate-top),var(--plate-mid) 53%,var(--plate-base)); box-shadow: inset 0 1px 0 #d9eeee27, var(--skin-shadow); }
[data-theme="night"] .draw-core::before { opacity: .25; }
.draw-issue { grid-area: issue; min-width: 0; line-height: 1; }
.draw-issue #issue { display: inline-flex; align-items: baseline; color: var(--secondary); font: 600 clamp(27px,2.8vw,40px)/1 var(--numerals); white-space: nowrap; font-variant-numeric: tabular-nums; }
#issue .period-word { font: 580 .49em/1 var(--cn); }
#issue .period-word:first-child { margin-inline-end: .35em; }
#issue .period-word:last-child { margin-inline-start: .38em; }
#issue-tail { padding: 0 .05em .025em 0; line-height: .98; color: #172025; font-family: var(--numerals); font-weight: 700; font-style: italic; font-size: 1.26em; letter-spacing: -.035em; }
[data-theme="night"] #issue-tail { background: #e3edeb; border-radius: .13em; margin-inline: .06em 0; padding-inline: .06em .11em; }
.next-clock { grid-area: clock; position: relative; margin-inline-start: 46px; display: grid; justify-items: end; align-content: center; gap: 4px; color: var(--secondary); font: 550 12px/1.15 var(--cn); }
.next-clock #draw-sound-toggle {
  position: absolute; top: 50%; inset-inline-end: calc(100% + 2px); transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px;
  padding: 0; color: var(--secondary); background: transparent; touch-action: manipulation;
}
#draw-sound-toggle svg { display: block; }
.next-clock #draw-sound-toggle[hidden], #draw-sound-toggle[aria-pressed="false"] .sound-waves,
#draw-sound-toggle[aria-pressed="true"] .sound-muted { display: none; }
.next-clock #draw-sound-toggle[aria-pressed="true"] { color: var(--sum); }
@media (hover: hover) { .next-clock #draw-sound-toggle:hover { color: var(--ink); } }
.next-clock output:not(.clock-readable) { font: 580 14px/1.2 var(--cn); min-height: 23px; color: var(--ink); }
.flip-clock { display: inline-flex; align-items: center; gap: 2px; font: 600 clamp(19px,1.9vw,24px)/1 var(--numerals); font-variant-numeric: tabular-nums; }
.flip-clock:empty { display: none; }
.flip-digit { position: relative; width: .81em; height: 1.16em; border-radius: 3px; box-shadow: 0 1px 1px #25343850; }
.flip-digit::after { content: ""; position: absolute; z-index: 4; top: 50%; width: 100%; height: 1px; background: #3e505527; }
.flip-value { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; color: #233338; background: linear-gradient(#e7ece7 50%, #fbfcf7 50%); }
.flip-digit > :is(.flap-top,.flap-bottom) { position: absolute; inset-inline: 0; height: 50%; overflow: hidden; color: #233338; }
.flap-top { top: 0; transform-origin: bottom; border-radius: 3px 3px 0 0; background: #e7ece7; }
.flap-bottom { bottom: 0; transform-origin: top; border-radius: 0 0 3px 3px; background: #fbfcf7; }
.flip-digit b { position: absolute; width: 100%; height: 200%; display: grid; place-items: center; font: inherit; }
.flap-top b { top: 0; } .flap-bottom b { bottom: 0; }
.flip-separator { padding-inline: 1px; color: var(--secondary); }
.turn-up { z-index: 2; animation: turn-up 75ms ease-in forwards; }
.turn-in { z-index: 3; animation: turn-in 85ms 75ms ease-out both; }
@keyframes turn-up { to { transform: scaleY(0); } }
@keyframes turn-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
#numbers { grid-area: numbers; display: flex; width: 100%; min-width: 0; align-items: center; flex-wrap: nowrap; gap: clamp(9px,1.45vw,22px); padding-block: 8px; font-variant-numeric: tabular-nums; }
.draw-balls, .draw-sum, #combo { display: inline-flex; align-items: center; flex: none; }
.draw-balls { gap: clamp(5px,.7vw,10px); }
.draw-balls b {
  position: relative; isolation: isolate; display: grid; place-items: center; width: clamp(42px,4.8vw,65px); aspect-ratio: 1;
  border-radius: 50%; color: #1d3339; font: 600 clamp(26px,2.8vw,40px)/1 var(--numerals);
  background: radial-gradient(ellipse 46% 24% at 31% 22%,#fffffff5 0%,#ffffff63 48%,transparent 100%),
              radial-gradient(circle at 36% 29%,#fffffd 1%,#f6f8f4 33%,#e1e8e5 56%,#bccbc9 76%,#9cadaa 93%,#b3c2bf 100%);
  box-shadow: inset -.5px -.7px 1px #69827d46, 0 2px 2px -1px #213e3e64, 0 7px 8px -5px #213e3e62;
  text-shadow: 0 1px 0 #ffffff95;
}
.draw-balls b { overflow: hidden; transform-origin: 50% 88%; }
.draw-balls .ball-digit { position: relative; }
.draw-balls .ball-meridian {
  position: absolute; inset: -9% 17%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse 100% 83% at 100% 50%,transparent 62%,#fbfffdd9 71%,#d1e9e5e0 81%,#78a5a18c 88%,transparent 98%);
}
.draw-sum { gap: 7px; border-left: 1px solid var(--plate-edge); padding-left: clamp(9px,1.4vw,21px); white-space: nowrap; }
#numbers .sum-label { color: var(--secondary); font: 600 clamp(14px,1.35vw,17px)/1 var(--cn); }
#numbers #total { color: var(--sum); font: 600 clamp(36px,3.6vw,50px)/1 var(--numerals); }
#combo, .record-combo { gap: 5px; }
:is(.preview-home,#stats .record-grid) [data-value] {
  --pigment: #355fa8; display: inline-grid; place-items: center; flex: none; width: 1.43em; height: 1.43em;
  border: 0; border-radius: .27em; background: var(--pigment); color: #fff;
  box-shadow: inset 0 1px 0 #ffffff35, inset 0 -1px 0 #14212c30; font: 680 15px/1 "Noto Marks",var(--cn);
}
:is(.preview-home,#stats .record-grid) [data-value="大"] { --pigment: #b83242; }
:is(.preview-home,#stats .record-grid) [data-value="小"] { --pigment: #355fa8; }
:is(.preview-home,#stats .record-grid) [data-value="单"] { --pigment: #6945a0; }
:is(.preview-home,#stats .record-grid) [data-value="双"] { --pigment: #246c50; }
.preview-home #combo [data-value] { font-size: clamp(20px,2.05vw,28px); }
.glyph { display: block; }
[data-value="大"] .glyph { transform: scaleX(1.04) translateY(.01em); }
[data-value="小"] .glyph { transform: scale(1.09,1.04); }
[data-value="单"] .glyph { transform: scale(.96,1.03); }
[data-value="双"] .glyph { transform: scaleX(1.035); }
.replay-controls { grid-area: controls; align-self: end; display: flex; align-items: center; min-height: 39px; border-top: 1px solid var(--plate-edge); padding-top: 4px; }
.replay-date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: var(--secondary); }
.replay-date time { font: 600 14px/1 var(--numerals); letter-spacing: .03em; }
.ico { display: inline-block; flex: none; width: 17px; height: 17px; }
.replay-date .ico { width: 15px; height: 15px; }
.quiet-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; }
.quiet-link:hover { color: var(--sum); }
.forecast { grid-area: prediction; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(18px,1.65vw,24px) clamp(18px,2.25vw,34px); background: var(--sheet); }
.ticket { position: relative; border: 1px solid #a7b1ae; border-radius: 9px; overflow: hidden; background: #f8f8f2; }
[data-theme="night"] .ticket { border-color: #737f7a; }
.foil-field { position: relative; isolation: isolate; display: grid; place-items: center; height: clamp(76px,7vw,101px); background: linear-gradient(112deg,#fafaf5,#ecf1ed); }
[data-theme="night"] .foil-field { background: linear-gradient(112deg,#20383c,#263f41); }
.ticket-result { display: grid; place-items: center; width: 100%; height: 100%; color: var(--sum); }
.ticket-result strong { font: 680 clamp(28px,2.8vw,40px)/1.2 "Noto Marks",var(--cn); letter-spacing: .07em; text-indent: .07em; }
.foil-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.foil-field canvas:focus-visible { outline-offset: -3px; }
.peel { position: absolute; z-index: 2; inset: auto 0 0 auto; width: 38px; height: 38px; border: 0; padding: 0; background: transparent; }
.peel::before { content: ""; position: absolute; inset: 0; clip-path: polygon(100% 0,100% 100%,0 100%); background: linear-gradient(137deg,transparent 46%,#879592 49%,#f4f6ef 57%,#d6ddd7 70%,#ccd6d1 100%); }
.peel .ico { position: absolute; right: 4px; bottom: 3px; width: 13px; height: 13px; color: #405851; }
.foil-field.has-scraper canvas { cursor: none; }
.foil-scraper { display: none; pointer-events: none; position: absolute; top: 0; left: 0; z-index: 1; filter: drop-shadow(0 2px 1px #18272150); }
.has-scraper .foil-scraper { display: block; }
.foil-scraper::before, .foil-scraper::after { content: ""; position: absolute; transform: rotate(31deg); transform-origin: 50% 100%; }
.foil-scraper::before { width: 24px; height: 16px; left: -12px; bottom: -1px; background: linear-gradient(90deg,#8d9c9a,#edf1e9 61%,#b1bcb6); clip-path: polygon(34% 0,66% 0,100% 80%,94% 100%,4% 100%,0 80%); }
.foil-scraper::after { width: 7px; height: 17px; left: 2px; bottom: 9px; border-radius: 3px; background: #455956; }
.ticket.revealed :is(canvas,.peel,.foil-scraper) { display: none; }
.recent-draws {
  --tank-face: #fafbf9;
  --tank-floor: #eef3f1;
  --tank-ambient: #c1ced0;
  --tank-cut: #a4c3b9;
  --tank-table-glare: .67;
  --tank-edge-light: #eaf6ef;
  --tank-window: rgb(255 255 252 / .97);
  --tank-sky: rgb(230 244 246 / .72);
  --tank-ghost: rgb(255 255 255 / .47);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-area: recent; grid-template-rows: auto minmax(0,1fr); min-width: 0;
  padding: clamp(17px,1.85vw,26px) clamp(13px,1.9vw,27px) 10px;
  border-radius: 8px;
  border-color: var(--tank-cut) var(--paper-edge) var(--paper-edge) var(--tank-cut);
  background: var(--tank-edge-light);
  box-shadow: 0 4px 10px -9px rgb(26 45 47 / .24);
}
[data-theme="night"] .recent-draws {
  --tank-face: #19252b;
  --tank-floor: #19272a;
  --tank-ambient: #30434a;
  --tank-cut: #466861;
  --tank-table-glare: .17;
  --tank-edge-light: #72958e;
  --tank-window: rgb(224 240 244 / .31);
  --tank-sky: rgb(164 202 218 / .13);
  --tank-ghost: rgb(220 246 246 / .25);
}
.recent-draws::before, .tank-reflection {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}
.recent-draws::before {
  inset: 1px 0 0 1px; border-radius: inherit;
  background: radial-gradient(ellipse 55% 44% at 62% -5%, var(--tank-ambient) 8%, transparent 100%),
    linear-gradient(150deg, color-mix(in srgb, var(--tank-ambient) 35%, var(--tank-face)), var(--tank-face) 44%, var(--tank-floor));
  box-shadow: inset 1px 1px var(--tank-ghost);
}
/* The front and back surfaces return slightly displaced images of the same window. */
.tank-reflection {
  inset: 1px 5px 8px 1px; overflow: hidden; border-radius: 6px 4px 3px 5px;
  mask-image:
    linear-gradient(to bottom, #000 27px, rgb(0 0 0 / .91) 42px, rgb(0 0 0 / var(--tank-table-glare)) 73px, transparent 165px),
    linear-gradient(to left, transparent 0, rgb(0 0 0 / .23) 62px, #000 122px);
  mask-composite: intersect;
}
.tank-reflection::before, .tank-reflection::after {
  content: ""; position: absolute; right: 1%; top: -30px; width: 58%; height: clamp(140px, 39%, 179px);
  transform-origin: 73% top;
  transform: translate(var(--tank-x, 0px), var(--tank-y, 0px)) perspective(620px) rotateY(-13deg) skewX(-23deg) rotate(-7deg);
  background:
    linear-gradient(95deg, transparent 0 3%, var(--tank-ghost) 3.5% 4.5%, transparent 5.5% 57%, var(--tank-ghost) 57.7% 58.3%, transparent 59.1%),
    linear-gradient(151deg, var(--tank-window) 8% 33%, var(--tank-sky) 66%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent, #000 2.6% 24%, transparent 24.5% 26.7%, #000 27.2% 57.3%,
      transparent 58% 59.7%, #000 60.4% 85%, transparent 86.2%),
    linear-gradient(180deg, #000 6% 47%, transparent 47.6% 50%, rgb(0 0 0 / .81) 50.8%,
      rgb(0 0 0 / .43) 65%, transparent 97%);
  mask-composite: intersect;
}
.tank-reflection::before { top: -27px; right: calc(1% - 4px); opacity: .43; filter: blur(.9px); }
.tank-reflection::after { filter: blur(.32px); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tank-reflection::before, .tank-reflection::after { transition: transform 150ms ease-out; }
}
@supports (animation-timeline: view()) {
  @media (hover: none) and (prefers-reduced-motion: no-preference) {
    .recent-draws { view-timeline-name: --recent-glass; }
    .tank-reflection::before, .tank-reflection::after {
      animation: recent-window-parallax auto linear both;
      animation-timeline: --recent-glass;
    }
  }
}
@keyframes recent-window-parallax {
  from { translate: 2px 5px; }
  to { translate: -2px -5px; }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .recent-draws { background: var(--sheet); box-shadow: none; border-color: var(--paper-edge); }
  .recent-draws::before, .tank-reflection { display: none; }
}
.ledger-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.preview-home .quiet-link { flex: none; color: var(--secondary); font: 550 12px/1.3 var(--cn); }
.quiet-link .ico { width: 14px; height: 14px; }
.recent-table { align-self: stretch; width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-variant-numeric: tabular-nums; }
.recent-table thead { color: var(--secondary); }
.recent-table thead th { height: 30px; border-bottom: 1px solid var(--rule); font-size: 12px; font-weight: 550; }
.recent-table th:first-child { text-align: left; width: 32%; }
.recent-table th:nth-child(2) { width: 29%; }
.recent-table th:nth-child(3) { width: 15%; }
.recent-table :is(th,td) { padding: 0 2px; }
.recent-table tr > :nth-child(4) { text-align: right; }
.recent-table tr > :nth-child(5) { text-align: left; }
.recent-table thead tr > :nth-child(4) { padding-inline-end: 3px; }
.recent-table thead tr > :nth-child(5) { padding-inline-start: 3px; }
.recent-table tbody tr > :nth-child(4) { padding-inline-end: 5px; }
.recent-table tbody tr > :nth-child(5) { padding-inline-start: 5px; }
.recent-table tbody tr { position: relative; height: 35px; }
.recent-table tbody tr:not(:last-child) { border-bottom: 1px solid var(--rule); }
.recent-table tbody tr:is(:hover,:focus-within) { background: var(--quiet); }
.recent-period { display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--secondary); font: 550 13px/1 var(--cn); }
.preview-home .recent-period { color: var(--secondary); }
.recent-period strong { color: var(--ink); font: italic 700 1.42em/1 var(--numerals); margin: 0 .13em 0 .035em; }
[data-theme="night"] .recent-period strong { padding: 0 .07em .02em .025em; border-radius: 2px; color: #142026; background: #dbe5e5; }
.recent-period::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.recent-balls { display: inline-flex; align-items: center; justify-content: center; gap: clamp(3px,.45vw,7px); }
.recent-balls i {
  display: grid; place-items: center; width: 22px; aspect-ratio: 1; border-radius: 50%; color: #25383a;
  font: 600 16px/1 var(--numerals); background: radial-gradient(circle at 34% 26%,#fff 12%,#edf2ef 49%,#d6e0db 76%,#c1cfca);
  box-shadow: 0 1px 1px #23353220;
}
.recent-table .recent-sum { font: 600 21px/1 var(--numerals); color: var(--sum); }
.recent-table [data-value] { font-size: 14px; }
.preview-home #map { margin-block: clamp(26px,3vw,42px) 0; scroll-margin-top: 94px; }
#map-heading { margin-bottom: 16px; }
.atlas { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: start; }
.tool-case {
  --case-base: #f0f6f7; --case-light: #fafcfb; --case-edge: #ccd9db; --tool-ink: #376a75; --tool-accent: #58929a;
  overflow: hidden; padding: 15px 17px 9px; border-color: var(--case-edge);
  background: linear-gradient(117deg,var(--case-light),var(--case-base));
}
.case-calendar { --case-base: #f1eee7; --case-light: #fcfaf4; --case-edge: #ddd8ca; --tool-ink: #765f47; --tool-accent: #986947; }
.case-share { --case-base: #e9edf0; --case-light: #f7f9f8; --case-edge: #cdd5d9; --tool-ink: #526679; --tool-accent: #54858a; }
.case-scan { --case-base: #eceaf0; --case-light: #f9f8fa; --case-edge: #d7d4df; --tool-ink: #625d76; --tool-accent: #8a738e; }
[data-theme="night"] .tool-case { --case-base: #202e34; --case-light: #26373c; --case-edge: #3c4c52; --tool-ink: #c1dbe0; --tool-accent: #87b1ba; }
[data-theme="night"] .case-calendar { --case-base: #302e2a; --case-light: #37352e; --case-edge: #504c41; --tool-ink: #e0d1b9; --tool-accent: #c6a17b; }
[data-theme="night"] .case-share { --case-base: #252d33; --case-light: #303940; --case-edge: #45515a; --tool-ink: #cdd9e4; --tool-accent: #94bdbf; }
[data-theme="night"] .case-scan { --case-base: #2d2932; --case-light: #35303b; --case-edge: #4e4756; --tool-ink: #d8cfe2; --tool-accent: #b79bc2; }
.case-lid { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--case-edge); padding-bottom: 10px; margin-bottom: 2px; }
.case-lid h3 { font-size: 17px; font-weight: 650; letter-spacing: -.035em; }
.tool-icon { flex: none; width: 24px; height: 24px; color: var(--tool-ink); }
.tool-icon .secondary { stroke: var(--tool-accent); }
.tool-icon .solid { stroke: none; fill: var(--tool-accent); }
.case-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; }
.case-tools a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.case-tools a { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 40px; color: var(--ink); font-size: 13px; border-radius: 4px; }
.case-tools a span { color: var(--tool-ink); font: 600 17px/1 var(--numerals); }
.case-tools a:hover { color: var(--tool-ink); text-decoration: underline; text-underline-offset: 3px; }
.archive-chart {
  --seq-line: #26645f; --seq-end: #ae2c40; --seq-field: #fafcfb; --seq-lower: #f1f6f3;
  --seq-axis: #627671; --seq-guide: #91a59d; --seq-edge: #c8d5d1; --seq-rule: #dce5e2; --seq-active: #eaf0ed;
  margin-top: 22px; border-radius: 15px; border-color: var(--seq-edge); overflow: hidden;
  background: var(--sheet); scroll-margin-top: 96px;
}
[data-theme="night"] .archive-chart {
  --seq-line: #a3dbcd; --seq-end: #ff8591; --seq-field: #1a282c; --seq-lower: #203331;
  --seq-axis: #b2c3be; --seq-guide: #718e85; --seq-edge: #40524f; --seq-rule: #35464a; --seq-active: #253934;
}
.seq-heading, .seq-heading-text, .seq-all, .seq-score, .seq-label, #seq-badges {
  display: flex; align-items: center;
}
.seq-heading { justify-content: space-between; gap: 8px; padding: 13px 22px 10px; }
.seq-heading-text { gap: 13px; }
.seq-heading #seq-title { font-size: 23px; line-height: 1.2; }
.seq-window { padding-left: 13px; border-left: 1px solid var(--seq-edge); color: var(--secondary); font-size: 14px; white-space: nowrap; }
.seq-window b { font: 600 17px/1 var(--numerals); }
.seq-all { min-height: 44px; justify-content: center; gap: 7px; padding: 0 13px; white-space: nowrap; border: 1px solid var(--seq-edge); border-radius: 8px; background: var(--seq-field); font-size: 14px; font-weight: 600; }
.seq-all .ico { width: 17px; height: 17px; }
.seq-body { display: grid; grid-template-columns: minmax(0,1fr) 161px; gap: 21px; padding: 0 22px 14px; }
.seq-graph { display: block; min-width: 0; height: 168px; padding: 15px 2px 27px 38px; border-radius: 5px; container-type: inline-size; }
.seq-field { display: block; height: 100%; position: relative; isolation: isolate; background: linear-gradient(to bottom,var(--seq-field) 50%,var(--seq-lower) 50%); border-block: 1px solid var(--seq-rule); }
.seq-field::before { content: ""; position: absolute; top: 50%; inset-inline: 0; border-top: 1px dashed var(--seq-guide); }
.seq-axis { position: absolute; right: calc(100% + 6px); transform: translateY(-50%); color: var(--seq-axis); font: 600 13px/1 var(--numerals); white-space: nowrap; }
.seq-axis.area { font: 600 11px/1 var(--cn); }
.seq-track, .seq-line { display: block; position: absolute; }
.seq-track { --label-inset: 6px; --label-gap: 6px; inset: 0 10px 0 7px; }
.seq-line { inset: 0; width: 100%; height: 100%; overflow: visible; }
.seq-line path { fill: none; stroke: var(--seq-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.seq-sample { position: absolute; inset: 0; pointer-events: none; }
.seq-sample::after { content: ""; position: absolute; left: var(--x); top: 100%; width: 1px; height: 3px; background: var(--seq-edge); }
.seq-sample i { display: block; position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); width: 8px; height: 8px; background: var(--sheet); border: 1.6px solid var(--seq-line); border-radius: 50%; }
.seq-sample.newest i { width: 14px; height: 14px; background: var(--seq-end); border: 3px solid var(--sheet); outline: 1.4px solid var(--seq-end); }
.seq-extreme {
  --label-offset: var(--label-gap);
  position: absolute; width: 2ch; text-align: center; transform: translateX(-50%);
  font: 600 17px/1 var(--numerals); font-variant-numeric: tabular-nums; color: var(--ink);
  left: clamp(calc(var(--label-inset) + 1ch), var(--x), calc(100% - var(--label-inset) - 1ch));
  top: clamp(var(--label-inset), calc(var(--y) + var(--label-offset)), calc(100% - var(--label-inset) - 1em));
}
.seq-extreme.above {
  --label-offset: calc(-1em - var(--label-gap));
}
.seq-sample.newest { --label-gap: 10px; }
.seq-times { position: absolute; top: calc(100% + 6px); inset-inline: 0; display: flex; justify-content: space-between; color: var(--secondary); font: 600 13px/1 var(--numerals); }
#seq-midnight { display: none; position: absolute; top: calc(100% + 6px); transform: translateX(-50%); font: 600 13px/1 var(--numerals); color: var(--secondary); }
#seq-midnight::before { content: ""; position: absolute; height: 6px; width: 1px; bottom: calc(100% + 1px); left: 50%; background: var(--seq-axis); }
@container (min-width: 600px) { #seq-midnight:not([hidden]) { display: inline; } }
.seq-latest { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-left: 22px; border-left: 1px solid var(--seq-rule); }
.seq-label { gap: 7px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.seq-label i { display: inline-flex; width: 10px; height: 10px; padding: 1.5px; border: 1px solid var(--seq-end); border-radius: 50%; }
.seq-label i::after { content: ""; width: 100%; background: var(--seq-end); border-radius: 50%; }
.seq-score { gap: 9px; }
#seq-total { font: 600 62px/.97 var(--numerals); font-variant-numeric: tabular-nums; }
#seq-badges { gap: 3px; font-size: 13px; }
.seq-info { display: grid; gap: 2px; margin-top: 8px; font-size: 12px; color: var(--secondary); white-space: nowrap; }
.seq-info b { color: var(--ink); font: 600 16px/1 var(--numerals); }
.seq-info time { font: 600 14px/1.5 var(--numerals); }
@media (hover: hover) {
  .seq-all:hover { background: var(--seq-active); }
  .seq-graph:hover .seq-line path { stroke-width: 3; }
  .seq-latest:hover .seq-info > span { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 650px) {
  .archive-chart { border-radius: 13px; }
  .seq-heading { padding: 7px 12px 4px; }
  .seq-heading-text { gap: 8px; }
  .seq-heading #seq-title { font-size: 21px; }
  .seq-window { padding-left: 8px; font-size: 12px; }
  .seq-window b { font-size: 14px; }
  .seq-all { gap: 4px; padding-inline: 7px; font-size: 12px; }
  .seq-all .ico { width: 14px; }
  .seq-body { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 0 12px 8px; }
  .seq-latest { grid-row: 1; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 7px; padding: 5px 0 7px; border-left: 0; border-bottom: 1px solid var(--seq-rule); }
  .seq-label { font-size: 12px; gap: 4px; }
  .seq-label i { width: 8px; height: 8px; padding: 1px; }
  .seq-score { gap: 5px; }
  #seq-total { font-size: 36px; }
  #seq-badges [data-value] { font-size: 13px; }
  .seq-info { margin: 0; text-align: right; justify-self: end; font-size: 10px; }
  .seq-info b { font-size: 14px; }
  .seq-info time { font-size: 12px; }
  .seq-graph { height: 143px; padding-left: 32px; }
  .seq-line path { stroke-width: 2.1; }
  .seq-sample i { width: 6px; height: 6px; }
  .seq-sample.newest i { width: 12px; height: 12px; border-width: 2px; }
  .seq-axis, .seq-times { font-size: 12px; }
  .seq-axis.area { font-size: 10px; }
  .seq-extreme { font-size: 15px; }
}
.preview-home footer { padding: 26px 0 30px; color: var(--secondary); font-size: 14px; }
.preview-home footer .wordmark { opacity: .85; }
body:not(.preview-home) { background: var(--canvas); color: var(--ink); }
body:not(.preview-home) .report-heading { border-radius: 15px; background: var(--sheet); }
body:not(.preview-home) .record-grid .recent-balls i { font: 600 15px/1 var(--numerals); }
@media (min-width: 1200px) {
  .atlas { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.45fr) minmax(0,1fr); }
}
@media (max-width: 799px) {
  .preview-home #board { grid-template-areas: "draw" "prediction" "recent"; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; gap: 10px; }
  .draw-core { min-height: 176px; padding: 17px 17px 6px; grid-template-rows: auto 1fr auto; gap: 5px; }
  .forecast { gap: 11px; padding: 15px 17px; }
  .foil-field { height: 77px; }
  .recent-draws { padding: 15px 17px 8px; }
  .ledger-top { margin-bottom: 6px; }
  .recent-table tbody tr { height: 33px; }
  .atlas { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .case-tools a { min-height: 44px; }
}
@media (max-width: 720px) {
  .atlas { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  body header, [data-theme] body header { padding: 6px var(--gutter) 3px; }
  body header .mast { grid-template-columns: minmax(0,1fr) auto; padding: 1px 10px 0; gap: 0 8px; border-radius: 14px; }
  body .mast .brand { font-size: 19px; }
  body .mast .theme-toggle { grid-column: 2; grid-row: 1; }
  body .mast nav { grid-column: 1/-1; grid-row: 2; width: 100%; }
  body .mast nav a { min-height: 36px; height: 36px; font-size: 13px; }
  .preview-home #map { scroll-margin-top: 96px; }
}
@media (max-width: 480px) {
  :root[data-theme] { --gutter: 10px; }
  .preview-home .draw-issue #issue { font-size: clamp(25px,6.7vw,32px); }
  #numbers { gap: clamp(8px,2.65vw,15px); }
  .draw-balls { gap: clamp(4px,1.1vw,6px); }
  .draw-balls b { width: clamp(36px,10.6vw,48px); font-size: clamp(22px,6.5vw,29px); }
  .draw-sum { gap: 4px; padding-left: clamp(7px,2.4vw,13px); }
  #numbers .sum-label { font-size: clamp(13px,3.65vw,15px); }
  #numbers #total { font-size: clamp(33px,8.8vw,40px); }
  #combo { gap: 3px; }
  .preview-home #combo [data-value] { font-size: clamp(18px,5vw,23px); }
  .tool-case { padding: 12px 12px 7px; border-radius: 12px; }
  .case-lid h3 { font-size: 16px; }
  .case-lid { gap: 4px; }
  .recent-balls i { width: 21px; font-size: 15px; }
  .recent-table :is(td,th) { padding: 0 1px; }
}
@media (max-width: 355px) {
  .draw-core { padding-inline: 11px; }
  .recent-draws { padding-inline: 9px; }
  .recent-table th:first-child { width: 33%; }
  .recent-table th:nth-child(2) { width: 28%; }
  .recent-period { font-size: 11.5px; }
  .tool-case { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-header, body .mast nav.has-lens::before { transition: none; }
  .turn-up, .turn-in { animation: none; }
  .turn-up { visibility: hidden; }
}
@media (prefers-reduced-transparency: reduce) {
  body header .mast { background: var(--sheet); }
  body .mast::before { backdrop-filter: none; }
}
@media (forced-colors: active) {
  .draw-balls b, .preview-home [data-value] { outline: 1px solid CanvasText; }
  body .mast nav a[aria-current] { text-decoration: underline; }
}
