@font-face { font-family: Golos; src: url('/golos-text.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #101518;
  --surface: #172023;
  --line: #344447;
  --text: #f0f6f4;
  --muted: #a4b5b6;
  --accent: #68e6cf;
  --focus: #aef5e6;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: Golos, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100svh; display: flex; flex-direction: column; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
a { color: inherit; text-underline-offset: .25em; }
a, button { -webkit-tap-highlight-color: transparent; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shell { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.top { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 26px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font-size: 1.25rem; font-weight: 780; text-decoration: none; }
.brand img { width: 31px; height: 31px; }
nav { align-self: stretch; display: flex; gap: clamp(18px, 3.3vw, 37px); }
nav a { display: flex; align-items: center; padding-top: 2px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .9rem; white-space: nowrap; }
nav a:hover, nav a[aria-current] { color: var(--text); }
nav a[aria-current] { border-color: var(--accent); }
.header-actions { justify-self: end; display: flex; align-items: center; justify-content: end; gap: 12px; min-width: 0; max-width: 100%; }
.language { min-width: 31px; }
.account { min-width: 0; max-width: 100%; white-space: nowrap; }
.account span { overflow: hidden; text-overflow: ellipsis; }
.outline, .primary, .close { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; min-height: 42px; padding: 8px 14px; font-weight: 650; }
.outline, .close { border: 1px solid var(--line); background: transparent; color: var(--text); font-size: .85rem; }
.outline:hover, .outline[aria-pressed=true], .close:hover { background: var(--surface); border-color: #557073; }
.primary { background: var(--accent); color: #0b2220; border: 1px solid #8cf4de; }
.primary:hover:enabled { background: #92f3e0; }
.primary:active:enabled { background: #5cd4bd; }
.primary:disabled { color: var(--muted); background: var(--surface); border-color: var(--line); }
.quiet { border: 0; background: transparent; color: var(--muted); padding: 7px 0; font-size: .88rem; }
.quiet:hover, .text-link:hover { color: var(--accent); }
.text-link { color: var(--accent); font-size: .88rem; text-decoration: none; }
main.shell { flex: 1; }
.play { width: min(100%, 690px); margin-inline: auto; text-align: center; padding: clamp(47px, 9vh, 103px) 0 45px; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #121b1e; }
.segmented button { border: 0; padding: 7px 13px; border-radius: 5px; background: transparent; color: var(--muted); min-height: 34px; font-size: .88rem; font-weight: 630; white-space: nowrap; }
.segmented button:hover, .segmented button[aria-pressed=true] { color: var(--text); }
.segmented button[aria-pressed=true] { background: #253436; }
h1, h2 { letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 5.4vw, 3.25rem); font-weight: 770; }
h2 { font-size: 1.13rem; font-weight: 720; }
.play h1 { margin: 21px 0 9px; }
.round-meta { display: inline-flex; align-items: center; min-height: 24px; gap: 13px; font-size: .86rem; color: var(--muted); }
#daily-clock { border-left: 1px solid var(--line); padding-left: 13px; color: #c6d9d6; font: .85rem var(--mono); }
.round-meta time:empty { display: none; }
.digits { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(5px, 1.25vw, 12px); margin: 34px 0 25px; }
.digits > span { position: relative; display: grid; place-items: center; height: clamp(57px, 12vw, 105px); overflow: hidden; color: #73898a; border: 1px solid var(--line); border-top-color: #4c5c60; border-bottom-color: #263135; border-radius: 10px; background: linear-gradient(#253034 0%, #192125 49%, #151c1f 50%, #1e282c 100%); }
.digits b { font: 680 clamp(1.75rem, 7.7vw, 4.45rem)/1 var(--mono); letter-spacing: -.04em; transform: translateX(-.02em); }
.digits.has-number > span { color: var(--text); }
.digits.has-number > span.lock { border-bottom-color: #4ba797; }
.digits .settle { animation: settle .48s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes settle { from { transform: translate(-.02em, -44%); opacity: .3; filter: blur(4px); } to { transform: translate(-.02em, 0); opacity: 1; filter: none; } }
.action > .primary { min-width: min(214px,100%); min-height: 54px; padding-inline: 20px; font-size: 1rem; }
.action > .primary svg { width: 17px; height: 17px; }
.action #cancel-mine { margin-left: 12px; }
.status { min-height: 1.4em; margin: 10px 0 0; font-size: .86rem; line-height: 1.45; color: var(--muted); }
.status:empty { display: none; }
.result-meta { display: flex; gap: 10px 14px; justify-content: center; align-items: baseline; flex-wrap: wrap; margin-top: 3px; color: var(--muted); font-size: .89rem; }
.result-meta strong { color: var(--accent); font: 650 1.12rem var(--mono); }
.result-meta .tier { color: var(--text); font-weight: 650; }
.result-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; list-style: none; padding: 0; margin: 17px 0 8px; }
.achievement { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; font-size: .81rem; }
.achievement.new { color: #dbfaf1; border-color: #4e877e; }
.achievement:hover, .achievement[aria-expanded=true] { border-color: var(--accent); }
.achievement .badge-points { color: var(--accent); font: .79rem var(--mono); }
.badge-detail { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 13px; font-size: .88rem; color: var(--muted); margin-top: 12px; }
.badge-detail span:last-child { color: var(--accent); white-space: nowrap; }
.achievement svg, .catalog svg { width: 16px; height: 16px; color: var(--accent); }
.result-links { margin-top: 12px; display: flex; justify-content: center; gap: 19px; }
.result-links a, .result-links button { color: var(--muted); font-size: .88rem; padding: 7px 0; }
.result-links a:hover, .result-links button:hover { color: var(--accent); }
.leaders { margin-top: 41px; text-align: left; }
.section-head, .heading-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head { margin-bottom: 9px; }
.page { padding: 58px 0 45px; }
.page.narrow { width: min(100%,700px); margin-inline: auto; }
.page h1 { margin-bottom: 24px; }
.count { font: .95rem var(--mono); color: var(--accent); white-space: nowrap; }
.filters, .input-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
input { width: min(100%,300px); min-width: 0; border-radius: 8px; border: 1px solid #526467; background: #111b1e; padding: 10px 12px; min-height: 43px; caret-color: var(--accent); }
input::placeholder { color: var(--muted); }
.input-line input { flex: 1; width: auto; }
.catalog { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 26px; }
.catalog li { border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 10px; padding: 13px 0; align-items: baseline; }
.catalog li > svg { grid-row: 1 / 3; align-self: center; color: var(--muted); }
.catalog li.unlocked > svg { color: var(--accent); }
.catalog li > strong { font-weight: 670; font-size: .91rem; }
.catalog small, .field-note { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.catalog small { grid-column: 2; }
.catalog .probability { color: var(--accent); font-size: .83rem; }
.data-list { margin: 14px 0 20px; }
.data-row { min-height: 50px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto; align-items: center; gap: 10px 16px; border-top: 1px solid var(--line); font-size: .9rem; padding: 8px 0; }
.data-row:last-child { border-bottom: 1px solid var(--line); }
.data-row strong { overflow-wrap: anywhere; }
.data-row .numeral { font-family: var(--mono); }
.data-row .secondary, .empty { color: var(--muted); }
.data-row.history { grid-template-columns: minmax(75px,1fr) 1fr auto; }
.data-row.friend { grid-template-columns: minmax(85px,1fr) auto auto; }
.friend-group { margin: 17px 0 5px; }
.empty { margin: 16px 0; font-size: .94rem; line-height: 1.45; }
.proof-output { overflow-wrap: anywhere; color: var(--muted); line-height: 1.55; }
.proof-output strong, .proof-output code { color: var(--text); }
.proof-output dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; }
.proof-output dd { margin: 0; }
.rules { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); line-height: 1.6; font-size: .9rem; }
.rules summary { color: var(--text); cursor: pointer; }
.footer { display: flex; min-height: 65px; align-items: center; justify-content: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }
dialog { width: min(430px, calc(100% - 30px)); padding: 25px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 13px; }
dialog::backdrop { background: #030909b8; }
dialog h2 { font-size: 1.4rem; margin-bottom: 20px; }
dialog .close { position: absolute; top: 16px; right: 16px; padding: 5px; min-height: 35px; width: 35px; }
dialog label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: .88rem; }
dialog input { width: 100%; }
dialog .primary { margin-top: 15px; width: 100%; }
dialog .handle { font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .shell { width: calc(100% - 36px); }
  .catalog { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
}
@media (max-width: 620px) {
  .top { min-height: 52px; grid-template-columns: 1fr 1fr; padding-top: 12px; column-gap: 10px; }
  .header-actions { gap: 7px; }
  .top nav { order: 3; grid-column: 1 / -1; gap: 0; justify-content: space-between; min-height: 46px; }
  nav a { font-size: .88rem; }
  .play { padding-top: 48px; }
  .page { padding-top: 34px; }
  .digits { margin-top: 25px; }
  .digits > span { border-radius: 7px; }
  .digits b { font-size: clamp(1.55rem, 8vw, 3.3rem); }
}
@media (max-width: 435px) {
  .catalog { grid-template-columns: 1fr; }
  .play h1 { margin-top: 17px; }
  .play { padding-top: 37px; }
  .data-row { gap: 7px; grid-template-columns: 21px minmax(0,1fr) auto auto; }
}
@media (prefers-reduced-motion: reduce) { .digits .settle { animation: none; } }

.digits.has-number > span.highlight { background: #1e4541; color: #f3fff9; border-color: var(--accent); }
.badge-detail code { font-family: var(--mono); color: var(--text); }
.roll-analysis, .inspect { width: min(100%, 470px); margin: 12px auto 0; color: var(--muted); font-size: .88rem; }
.roll-analysis summary, .inspect summary { cursor: pointer; display: inline list-item; padding: 6px 0; }
.roll-analysis dl { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; margin: 14px 0 6px; text-align: left; }
.roll-analysis dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
.inspect .input-line { justify-content: center; margin-top: 11px; }
.inspect input { max-width: 180px; }
#save-next { margin-top: 3px; }
