:root {
  --accent: #b3261e;
  --accent-soft: #ff6a5f;
  --ok: #5fd08a;
  --desk: #121212;
  --desk-2: #1c1c1c;
  --paper: #f2ecdc;
  --paper-2: #fbf8ef;
  --ink: #141414;
  --rule: #54524d;
  --grey: #77736b;
  --on-dark: #e8e2d0;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --type: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --news: Georgia, "Times New Roman", Times, serif;
  --stamp: 110ms;
  --peel: 100ms;
  --xfade: 140ms;
  --fall: 650ms;
  --col: 680px;
  --topbar: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; font-family: var(--ui); color: var(--ink); background: var(--desk); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, .w, .lvl { touch-action: manipulation; }

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 1; height: var(--topbar); display: flex; justify-content: space-between; align-items: center; max-width: var(--col); margin: 0 auto; padding: 0 16px; color: var(--on-dark); font-size: 15px; }
body.racing .topbar { visibility: hidden; }
.brand { font-weight: 800; letter-spacing: .14em; display: flex; align-items: center; gap: 10px; }
.mark { width: 18px; height: 18px; border: 3px solid var(--accent-soft); border-radius: 50%; display: inline-block; }

main { display: grid; max-width: var(--col); margin: 0 auto; padding: var(--topbar) 12px 32px; }
.screen { grid-area: 1 / 1; min-width: 0; align-self: start; }
body.racing #scr-race { margin-top: calc(-1 * var(--topbar)); }
.screen.enter { animation: xin var(--xfade) linear backwards; }
.screen.enter-soft { animation: xsoft var(--xfade) linear backwards; }
.screen.leave { animation: xout var(--xfade) linear forwards; pointer-events: none; }
@keyframes xin { from { opacity: 0; } }
@keyframes xout { to { opacity: 0; } }
@keyframes xsoft { from { opacity: .55; } }

.big { font-size: clamp(26px, 6vw, 36px); line-height: 1.15; margin: 8px 0 12px; color: var(--paper); }
.note { color: var(--on-dark); min-height: 1.4em; font-size: 16px; margin: 12px 4px; }

.btn {
  font: inherit; font-weight: 700; font-size: 17px; letter-spacing: .04em; border: 0; border-radius: 999px;
  min-height: 48px; padding: 12px 24px; cursor: pointer; background: var(--paper); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: transform 80ms ease-out, opacity 120ms;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.small { font-size: 14px; min-height: 44px; padding: 8px 16px; font-weight: 600; letter-spacing: 0; }
.btn.wide { width: 100%; }
.btn.big-go { min-height: 64px; font-size: 24px; letter-spacing: .16em; margin-top: 18px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.wish { background: var(--ink); color: #fff; border: 2px solid var(--paper); }
.btn[aria-disabled="true"] { opacity: .85; cursor: default; }
.lane:has(.lane-toast.show) .status { visibility: hidden; }
.btn:focus-visible, .lvl:focus-visible, .w:focus-visible, .name-input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }

.chips { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--paper); color: var(--ink); border-left: 4px solid var(--accent); border-radius: 6px; padding: 6px 10px; font-size: 14px; line-height: 1.35; font-weight: 600; max-width: 100%; }

.card { background: var(--paper); border-radius: 14px; padding: 28px 22px 24px; margin: 4vh 0 0; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.title { margin: 0 0 6px; font-size: clamp(40px, 12vw, 64px); line-height: 1; letter-spacing: .14em; font-weight: 900; color: var(--ink); }
.lobby-line { font-size: 17px; margin: 0 0 18px; color: var(--rule); }
.small-title { font-size: clamp(28px, 8vw, 40px); margin-bottom: 14px; }
.ch-greet { margin: 0 0 8px; font-size: clamp(22px, 6.4vw, 30px); line-height: 1.2; font-weight: 800; color: var(--ink); }
#ch-ai { margin-top: 10px; }

.ch-live[hidden] { display: none; }
.ch-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; font-size: 17px; font-weight: 800; color: var(--ink); }
.ch-live .live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: live-pulse 1.6s ease-in-out infinite; }
.ch-live .status { font-size: 13px; line-height: 18px; padding: 0 10px; color: var(--rule); opacity: 1; }
.ch-live .status[data-ready="yes"] { color: var(--ink); border-color: var(--ink); }
@keyframes live-pulse { 50% { opacity: .35; } }
#share-save { margin-top: 8px; text-align: center; text-decoration: none; }
.daily-btn { margin-top: 10px; }
.daily-rank { margin: 2px 2px 8px; color: var(--on-dark); font-weight: 700; font-size: 16px; }

.teaser-back[hidden] { display: none; }
.teaser-back { position: fixed; inset: 0; z-index: 25; background: rgba(4,6,10,.985); display: flex; align-items: center; justify-content: center; padding: 24px; animation: teaser-in 700ms ease-out both; }
.teaser { width: 100%; max-width: var(--col); text-align: center; color: var(--on-dark); }
.teaser-head { margin: 0 0 10px; font-size: 28px; line-height: 1.2; font-weight: 800; }
.teaser-text { margin: 0 0 22px; font-size: 18px; line-height: 1.45; }
.teaser-gif { display: block; width: 100%; height: auto; border-radius: 8px; margin: 0 0 18px; }
.teaser-wish:empty { display: none; }
.teaser-wish { display: flex; flex-direction: column; gap: 10px; margin: 0 0 10px; }
.teaser-wish .btn { width: 100%; }

.wish-slot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.wish-slot:empty { display: none; }
.cta-line[hidden] { display: none; }
.cta-line { margin: -4px 2px 10px; color: var(--on-dark); font-size: 14px; opacity: .8; }
@keyframes teaser-in { from { opacity: 0; } to { opacity: 1; } }

.real-stamp { display: inline-block; margin: 8px 0 0; padding: 3px 8px; border: 2px solid var(--accent); border-radius: 4px; color: #fff; background: var(--accent);
  font: 700 13px/1.4 var(--type); letter-spacing: .08em; transform: rotate(-2deg); }
.real-stamp[hidden] { display: none; }
.truth-btn { display: block; min-height: 44px; margin: 6px 0 0; padding: 0 2px; background: none; border: 0; color: var(--on-dark); opacity: .8; font: italic 15px var(--type); text-align: left; cursor: pointer; }
.truth-btn:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.truth-card { margin: 2px 0 8px; padding: 12px 14px; border-left: 3px solid var(--on-dark); color: var(--on-dark); font-size: 15px; line-height: 1.45; }
.truth-text { margin: 0 0 8px; }
.truth-source { margin: 0; font-size: .9em; opacity: .85; }
.label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--rule); margin: 14px 0 6px; font-weight: 700; }
.name-input { width: 100%; font: inherit; font-size: 20px; font-weight: 600; min-height: 52px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; }
.lvl { flex: 1 1 auto; font: inherit; font-size: 15px; font-weight: 600; min-height: 48px; padding: 8px 14px; border-radius: 10px; border: 2px solid #b9b2a0; background: #fff; color: var(--ink); cursor: pointer; }
.lvl[aria-checked="true"] { border-color: var(--accent); background: var(--ink); color: var(--paper); }
.best { font-size: 14px; color: var(--rule); margin: 10px 0 0; min-height: 1.3em; }

.paper { position: relative; background: var(--paper); border-radius: 6px; padding: 18px 22px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.5); font-family: var(--type); font-size: 15px; }
.memo { position: relative; }

.doc-badge { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; font: 700 12px/18px var(--ui); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; }
.doc-badge[hidden] { display: none; }
.doc-badge[data-group="mail"]      { color: #1e4f9a; background: #dde8f8; }
.doc-badge[data-group="message"]   { color: #1d6b3a; background: #dcf1e2; }
.doc-badge[data-group="record"]    { color: #94480c; background: #fbe6d3; }
.doc-badge[data-group="money"]     { color: #5b2d8e; background: #ebe0f6; }
.doc-badge[data-group="staff"]     { color: #7a5a00; background: #f7edc8; }
.doc-badge[data-group="statement"] { color: #0e6466; background: #d7efef; }
.doc-badge[data-group="admin"]     { color: #4a4a4a; background: #e6e3dc; }
.memo-head { border-collapse: collapse; margin: 0 0 6px; font-size: 14px; width: 100%; border-bottom: 1px solid var(--rule); }
.memo-head th { text-align: left; width: 64px; color: var(--rule); font-weight: 400; padding: 2px 0; vertical-align: top; }
.memo-head td { padding: 2px 0 6px; }
.memo-head:empty { display: none; }
.ln { margin: 0; }

.w {
  position: relative; display: inline-block; min-height: 44px; line-height: 1.4; padding: calc((45px - 1.4em) / 2) 2px; margin: 0;   border-radius: 3px;
  cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; vertical-align: top;
}

.w::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: 10px; bottom: 10px; background: #000; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-5px) rotate(-2.5deg) scale(1.03, 1.2); pointer-events: none;
  transition: transform var(--peel) ease-out, opacity var(--peel) linear;
}
.w.on::before { opacity: 1; transform: none; animation: land var(--stamp) cubic-bezier(.2,.9,.3,1) both; }
@keyframes land { 0% { opacity: 0; transform: scale(1.25, 1.7); } 55% { opacity: 1; transform: scale(.98, .8); } 100% { opacity: 1; transform: none; } }
.w.on.fall::before { animation: none; opacity: 0; transform: translateY(30px) rotate(var(--rot, -6deg)); transition: transform var(--fall) cubic-bezier(.5,0,.9,.5) var(--d, 0ms), opacity var(--fall) ease-in var(--d, 0ms); }
.w::after { position: absolute; top: 5px; right: -3px; font-family: var(--ui); font-size: 12px; line-height: 1; font-weight: 800; pointer-events: none; }
.w.s-right { font-weight: 800; }
.w.s-right::after { content: "\2713"; color: var(--ink); }
.w.s-missed { color: var(--accent); background: rgba(179,38,30,.13); }
.w.s-missed::after { content: "\2717"; color: var(--accent); }
.w.s-over { color: var(--grey); text-decoration: line-through; }
.w.s-over::after { content: "\25CB"; color: var(--grey); }

.w.s-free { color: inherit; font-weight: inherit; text-decoration: none; background: none; }
.w.s-free::after { content: none; }

.dot { position: absolute; left: -15px; top: 0; width: 9px; height: 9px; margin-top: 12px; border-radius: 50%; background: var(--accent); transition: transform 280ms ease-out; pointer-events: none; }
.tick { position: absolute; right: -17px; width: 14px; margin-top: 6px; font: 800 13px/1 var(--ui); letter-spacing: -1px; color: var(--accent); pointer-events: none; text-align: center; }

.frost { position: absolute; inset: 0; z-index: 2; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; background: rgba(242,236,220,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity 240ms ease-in 120ms; padding: 22px 14px 0; }
.frost.gone { opacity: 0; pointer-events: none; }

.flash { text-align: center; color: var(--ink); font-family: var(--ui); font-weight: 800; font-size: clamp(22px, 6.6vw, 30px); line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; transform-origin: 50% 0; transition: transform 240ms cubic-bezier(.5,0,.8,.4), opacity 240ms ease-in; max-width: 100%; overflow-wrap: anywhere; }
.fl-row + .fl-row { margin-top: 8px; }
.fl-row b { color: var(--accent); }
.frost.gone .flash { transform: translateY(-96px) scale(.3); opacity: 0; }
.count { font-family: var(--ui); font-weight: 800; font-size: 80px; color: var(--accent); line-height: 1; margin-top: 4px; min-height: 80px; }

.count.pop { animation: pop 320ms cubic-bezier(.2,.9,.3,1) both; }
@keyframes pop { 0% { transform: scale(1.7); opacity: 0; } 45% { transform: scale(.93); opacity: 1; } 100% { transform: none; opacity: 1; } }
.count.go { animation: go-slam 240ms cubic-bezier(.2,.9,.3,1) both; transform-origin: 50% 60%; }
@keyframes go-slam { 0% { transform: scale(2.6) rotate(-8deg); opacity: 0; } 55% { transform: scale(.92) rotate(-3deg); opacity: 1; } 100% { transform: rotate(-3deg); opacity: 1; } }

.racehead { position: sticky; top: 0; z-index: 5; background: var(--desk); margin: 0 -12px 8px; padding: 4px 12px; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.rulecard { display: flex; align-items: center; gap: 4px; background: var(--paper); color: var(--ink); border-left: 5px solid var(--accent); border-radius: 6px; padding: 3px 0 3px 8px; margin-bottom: 3px; }
.rule-line { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 16px; font-weight: 600; overflow-wrap: anywhere; }
.rule-line b { font-weight: 800; color: var(--accent); }.rulecard .info { flex: none; width: 44px; height: 44px; margin: -3px 0; border: 0; background: none; color: var(--rule); font: inherit; font-size: 18px; cursor: pointer; border-radius: 6px; }
.rulecard .info:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: -3px; }
.lane { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; height: 38px; color: var(--on-dark); font-size: 13px; }
.lane[hidden] { display: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--paper); color: var(--ink); }
.lane.rival .avatar { background: var(--ink); color: var(--paper); border: 2px solid var(--accent); }
.lane-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lane-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; line-height: 16px; }
.lane-name { font-weight: 700; white-space: nowrap; }
.status { position: relative; font-size: 11px; line-height: 14px; padding: 0 8px; border: 1px solid currentColor; border-radius: 8px; white-space: nowrap; opacity: .85; }
.status.hot { color: var(--accent-soft); opacity: 1; }

.status.swap { animation: chip-in 220ms ease-out backwards; }
.status.swap::after { content: attr(data-prev); position: absolute; left: 8px; top: 0; pointer-events: none; animation: chip-out 220ms ease-out forwards; }
@keyframes chip-in { from { opacity: 0; } }
@keyframes chip-out { from { opacity: 1; } to { opacity: 0; } }
.track { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.fill { display: block; height: 100%; background: var(--on-dark); transform-origin: left center; transform: scaleX(0); transition: transform 360ms cubic-bezier(.25,.8,.25,1); will-change: transform; }
.lane.rival .fill { background: var(--accent-soft); }
.lane-count { font-family: var(--type); font-size: 12px; min-width: 78px; text-align: right; opacity: .9; white-space: nowrap; }
.lane-count .n { font-weight: 800; display: inline-block; }
.lane-count .n.pop { animation: numpop 150ms cubic-bezier(.2,.9,.3,1) backwards; }
@keyframes numpop { 0% { transform: scale(1.55); } 100% { transform: none; } }
.lane-count.over .n { color: var(--accent-soft); }
.lane.stopped .status { opacity: .55; }

.lane-stamp {
  position: absolute; right: 84px; top: 50%; margin-top: -15px; padding: 0 9px; line-height: 26px; font-family: var(--ui); font-weight: 900; font-size: 19px; letter-spacing: .12em;
  border: 3px solid currentColor; border-radius: 4px; background: var(--desk); opacity: 0; transform: rotate(-5deg); pointer-events: none; -webkit-user-select: none; user-select: none; white-space: nowrap;
}
.lane-stamp.ok { color: var(--ok); font-size: 16px; letter-spacing: .08em; }
.lane-stamp.show { animation: slam 260ms cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes slam { from { opacity: 0; transform: scale(1.9) rotate(-5deg); } to { opacity: 1; transform: rotate(-5deg); } }

.lane-toast { position: absolute; left: 36px; right: 78px; top: 0; height: 19px; display: none; align-items: center; background: var(--desk); color: #fff; font-size: 12.5px; line-height: 15px; font-weight: 600; white-space: nowrap; }
.lane.stamped .lane-toast { right: 178px; }
.lane-toast.show { display: flex; animation: toast-in 240ms ease-out both; }
.lane-toast.rival-t { color: var(--accent-soft); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.shake-lite { animation: shake-lite 240ms ease-in-out; }
@keyframes shake-lite { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

#scr-race { padding-bottom: 96px; }
.submitbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0 auto; max-width: var(--col);
  display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.45);
}
.clock { font-family: var(--type); font-size: 16px; font-weight: 700; min-width: 56px; }
.submitbar .btn { margin-left: auto; min-width: 96px; padding: 12px 16px; }
.freeze { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 10px 10px 0 0; white-space: nowrap; }
.freeze:empty { display: none; }
.submitbar .btn.shake { animation: shake 320ms ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: var(--col); background: var(--paper); border-radius: 16px 16px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet-in 200ms ease-out both; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet-title { margin: 0 0 10px; font-size: 18px; letter-spacing: .06em; }
.sheet-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.sheet-list li { border-left: 4px solid var(--accent); padding: 4px 10px; font-size: 15px; line-height: 1.4; background: var(--paper-2); border-radius: 4px; }
.sheet-list b { display: block; }
.sheet-help { margin: 0 0 14px; font-size: 14px; color: var(--rule); }

.result { margin: 6px 0 16px; }
.frontpage { background: var(--paper-2); color: #111; border-radius: 4px; padding: 14px 16px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.5); font-family: var(--news); }
.frontpage.stamped { animation: press 360ms cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes press { 0% { transform: scale(.86); opacity: 0; } 70% { transform: scale(1.0); opacity: 1; } 85% { transform: scale(.985); } }
.masthead { margin: 0 0 10px; padding: 4px 0; border-top: 3px double #111; border-bottom: 3px double #111; font-weight: 700; font-size: 18px; letter-spacing: .14em; display: flex; justify-content: space-between; align-items: baseline; }
.masthead span { font-size: 12px; letter-spacing: .04em; font-weight: 400; font-style: italic; }
.photo { display: inline-block; margin: 0 0 8px; padding: 3px 8px; background: var(--accent); color: #fff; font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: .12em; }
.hl-roll { overflow: hidden; margin: 0 0 10px; padding-bottom: 2px; }
.hl-main { font-size: clamp(26px, 7.4vw, 44px); line-height: 1.04; margin: 0; font-weight: 900; letter-spacing: -.01em; overflow-wrap: break-word; }
.hl-sub { margin: 0; font-size: 16px; line-height: 1.35; font-style: italic; }
.frontpage.stamped .hl-main { animation: roll 380ms cubic-bezier(.2,.8,.2,1) 140ms backwards; }
.frontpage.stamped .hl-sub { animation: fade-up 260ms ease-out 440ms backwards; }
@keyframes roll { from { transform: translateY(105%); opacity: 0; } 50% { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
.outcome { font-variant-numeric: tabular-nums; }
.outcome { color: var(--paper); font-size: 18px; font-weight: 700; margin: 14px 2px 4px; }
.outcome.lose { color: var(--accent-soft); }
.squares { font-size: 24px; letter-spacing: 2px; margin: 0 2px; line-height: 1.3; overflow-wrap: anywhere; }
.namerow { display: flex; align-items: center; gap: 8px; margin: 6px 2px 0; color: var(--on-dark); font-weight: 700; }
.namerow .btn.small { min-width: 44px; padding: 8px 12px; }
.namerow .name-input { min-height: 44px; font-size: 17px; max-width: 240px; }
.suggest { margin: 0 0 10px; }
.readyrow { color: var(--on-dark); font-size: 15px; font-weight: 700; margin: 0 2px 10px; display: flex; align-items: center; gap: 8px; }
.readyrow .status { font-size: 13px; line-height: 18px; padding: 0 10px; }
.readyrow .status[data-ready="yes"] { color: var(--ok); opacity: 1; }

.ggrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 2px 10px; }
.ggrow:not(:has(> :not([hidden]))) { display: none; }
.gg-btn { min-width: 64px; font-weight: 800; letter-spacing: .08em; }
.gg-btn:disabled { opacity: .6; }
.gg-stamp { margin: 0; color: var(--accent-soft); border: 3px solid currentColor; border-radius: 6px; padding: 4px 12px; font-weight: 900; font-size: 18px; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-4deg); animation: press 360ms cubic-bezier(.2,.9,.3,1.15) both; }
@media (prefers-reduced-motion: reduce) { .gg-stamp { animation: none; } }
.res-levels { margin: 0 0 8px; }
.share-status { color: var(--on-dark); font-size: 14px; min-height: 1.2em; margin: 4px 2px; }
.share-fallback { width: 100%; font: 15px var(--type); padding: 8px; border-radius: 8px; border: 1px solid #b9c1c9; }
.rulelines { list-style: none; margin: 12px 0 0; padding: 12px 14px; background: var(--paper); border-radius: 6px; font-size: 15px; line-height: 1.5; }
.rulelines li::before { font-weight: 800; margin-right: 6px; }
.rulelines li.missed { color: var(--accent); }
.rulelines li.missed::before { content: "\2717"; }
.rulelines li.over { color: var(--grey); }
.rulelines li.over::before { content: "\25CB"; }
.endline { color: var(--on-dark); font-style: italic; text-align: center; margin: 22px 0 0; font-size: 15px; opacity: .8; }

[hidden] { display: none !important; }

body.still *, body.still *::before, body.still *::after { animation: none !important; transition: none !important; }
body.still .lane-stamp.show { opacity: 1; }
body.still .status.swap::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .shake-lite { animation: none !important; }
  .lane-stamp.show { opacity: 1; }
  .status.swap::after { animation: none !important; opacity: 0; }
}
@media (max-width: 420px) {
  .paper { padding: 14px 20px 12px; }
  .masthead { font-size: 15px; letter-spacing: .08em; }
}
@media (min-width: 700px) {
  main { padding: var(--topbar) 16px 40px; }
  .racehead { margin: 0 0 12px; border-radius: 0 0 10px 10px; }
  .paper { padding: 24px 32px 20px; font-size: 17px; }
  .dot { left: -22px; } .tick { right: -26px; }
}
@media (min-width: 1100px) {
  :root { --col: 780px; }
  body { background: radial-gradient(ellipse 70% 80% at 50% 28%, #232220 0%, #151514 55%, #0d0d0d 100%) fixed, var(--desk); }
  .paper { font-size: 18px; padding: 26px 36px 22px; }
  .card { margin-top: 8vh; }
}
