/* Plunkday portal: tokens, layout and the pieces every game shares. Game-specific styles live in their own file. */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --wall: #e8ebf2;
  --paper: #fbfcfe;
  --ink: #1f2038;
  --muted: #565b77;
  --line: #ccd2df;
  --sun: #ffc531;
  --coral: #ff6f61;
  --sky: #3d8bff;
  --ok: #1d7a4c;
  --danger: #c02a3c;
  --shadow: 0 1px 0 rgba(31, 32, 56, .06), 0 10px 30px -18px rgba(31, 32, 56, .45);
  --display: "Bricolage", "Avenir Next", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall: #16172a; --paper: #20223a; --ink: #eceef7; --muted: #a9afc9; --line: #393c5a; --ok: #5fd19a; --danger: #ff7b87;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .9); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --wall: #16172a; --paper: #20223a; --ink: #eceef7; --muted: #a9afc9; --line: #393c5a; --ok: #5fd19a; --danger: #ff7b87;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .9); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--wall); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 42rem; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.012em; font-weight: 750; }
p { margin: 0 0 1em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico .fill { fill: currentColor; stroke: none; }

/* ---------- header ---------- */
.top { padding: 14px 0 10px; }
.top .wrap { display: flex; align-items: center; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 1.5rem/1 var(--display); letter-spacing: -.035em; }
.logo .mark { width: 30px; height: 30px; overflow: visible; }
.mark-slot { fill: var(--ink); }
.mark-ball { fill: var(--sun); stroke: var(--wall); stroke-width: 2.4; }
.logo.small { font-size: 1.2rem; }
.logo.small .mark { width: 24px; height: 24px; }
.is-home .top .mark-ball { animation: plunk .9s .15s var(--ease-out) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes plunk {
  0% { transform: translateY(-26px); opacity: 0; }
  45% { transform: translateY(0) scale(1.08, .86); opacity: 1; }
  65% { transform: translateY(-4px) scale(.96, 1.05); }
  100% { transform: none; }
}
.top-nav { display: none; gap: 4px; margin-left: 18px; }
.top-nav a { text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; color: var(--muted); }
.top-nav a:hover { color: var(--ink); background: var(--paper); }
.top-nav a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
@media (min-width: 760px) { .top-nav { display: flex; } }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.streak { display: inline-flex; align-items: center; gap: 6px; font: 700 .98rem/1 var(--text); padding: 7px 12px 7px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted); text-decoration: none; min-height: 38px; font-variant-numeric: tabular-nums; }
.streak-mark { width: 18px; height: 18px; }
.streak-mark rect { fill: none; stroke: currentColor; stroke-width: 1.8; }
.streak-mark circle { fill: none; stroke: currentColor; stroke-width: 1.8; }
.streak.lit { color: var(--ink); border-color: var(--ink); }
.streak.lit .streak-mark rect { fill: var(--ink); stroke: var(--ink); }
.streak.lit .streak-mark circle { fill: var(--sun); stroke: var(--wall); }
.streak.bump { animation: bump .6s var(--spring); }
@keyframes bump { 30% { transform: scale(1.18); } }
.lang { font: 700 .92rem/1 var(--text); padding: 0 12px; min-height: 38px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; border: 1.5px solid var(--line); }
.lang:hover, .streak:hover { border-color: var(--ink); }

.lang-hint { background: var(--ink); color: var(--paper); font-size: .96rem; }
.lang-hint .wrap { display: flex; gap: 12px; align-items: center; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.lang-hint a { font-weight: 700; }
.lang-hint button { margin-left: auto; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 6px; }

/* ---------- buttons & bits ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 1.05rem/1 var(--text); text-decoration: none; cursor: pointer; transition: transform .12s, background-color .2s, color .2s, border-color .2s; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover:not(:disabled) { background: var(--paper); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--danger); }
.btn.wide { width: 100%; }
.btn .ico { width: 20px; height: 20px; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--wall); font: 700 .86rem/1.1 var(--text); color: var(--muted); }
.tool { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; cursor: pointer; color: var(--ink); transition: border-color .2s, background-color .2s, transform .12s; }
.tool:hover { border-color: var(--ink); background: var(--paper); }
.tool:active { transform: scale(.93); }
.sec-h { font-size: clamp(1.35rem, 3.4vw, 1.75rem); }

/* ---------- dialogs: bottom sheet on phones, card on larger screens ---------- */
dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); max-width: min(34rem, calc(100vw - 32px)); border-radius: 26px; box-shadow: 0 30px 80px -30px rgba(10, 10, 30, .55); }
dialog::backdrop { background: rgba(16, 17, 34, .55); backdrop-filter: blur(2px); }
dialog[open] { animation: pop-in .28s var(--ease-out); }
dialog.closing { animation: pop-out .18s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 599px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 26px 26px 0 0; }
  dialog.sheet[open] { animation: sheet-in .34s var(--ease-out); }
  dialog.sheet.closing { animation: sheet-out .2s ease-in forwards; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.dlg { padding: 26px 22px 24px; display: grid; gap: 14px; position: relative; }
.dlg h2 { font-size: 1.65rem; margin: 0; padding-right: 48px; }
.dlg h2:focus { outline: none; }
.dlg p { margin: 0; }
.dlg-x { position: absolute; right: 14px; top: 14px; }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 70; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 16px; font-weight: 700; font-size: .98rem; box-shadow: var(--shadow); animation: toast-in .3s var(--spring); text-align: center; }
.toast.out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- home ---------- */
.home-hero { padding: 20px 0 34px; }
.today-date { font: 800 clamp(2.7rem, 11.5vw, 6.2rem)/.92 var(--display); letter-spacing: -.045em; margin: 0 0 18px; font-variation-settings: "opsz" 96; }
.home-hero h1 { font-size: clamp(1.3rem, 3.6vw, 1.9rem); font-weight: 700; max-width: 26ch; margin-bottom: 10px; }
.home-p { max-width: 40rem; color: var(--muted); font-size: 1.1rem; margin-bottom: 22px; }
.today-line { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; font-weight: 700; }
.today-progress { display: inline-flex; gap: 10px; align-items: center; }
.pips { display: inline-flex; gap: 5px; }
.pip { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.pip.done { background: var(--sun); }
.today-next { color: var(--muted); font-weight: 400; }
.today-next b { color: var(--ink); font-variant-numeric: tabular-nums; }

.games { padding-bottom: 44px; }
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.game-card { border-radius: 28px; position: relative; min-height: 100%; }
.game-card.live { background: var(--paper); box-shadow: var(--shadow); }
.card-link { display: grid; text-decoration: none; height: 100%; border-radius: 28px; }
.card-art { display: block; margin: 10px 10px 0; border-radius: 20px; aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.card-body { display: grid; gap: 10px; padding: 16px 20px 20px; align-content: start; }
.card-top { display: flex; align-items: baseline; gap: 10px; }
.card-name { font: 800 1.75rem/1 var(--display); letter-spacing: -.03em; }
.card-no { color: var(--muted); font-weight: 700; }
.card-pitch { color: var(--muted); }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.card-state { font-weight: 700; font-size: .98rem; }
.card-state.solved { color: var(--ok); }
.card-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 12px 18px; font-weight: 700; transition: gap .2s var(--ease-out); }
.card-cta .ico { width: 18px; height: 18px; }
.card-link:hover .card-cta { gap: 12px; }
.card-link:focus-visible { outline-offset: 4px; }

/* Drop card art: a small bowl, today's colour on the left */
.drop-art { background: color-mix(in srgb, var(--today, #6aa84f) 22%, var(--wall)); }
.mini-bowl { position: absolute; left: 50%; top: 54%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 0 0 5px var(--paper), 0 18px 30px -16px rgba(0, 0, 0, .5); }
.mini-bowl .t { background: var(--today, #6aa84f); }
.mini-bowl .m { background: repeating-linear-gradient(135deg, var(--paper) 0 6px, var(--line) 6px 7.5px); transition: background .6s; }
.game-card.done .mini-bowl .m { background: var(--mine, var(--today)); }
.mini-drop { position: absolute; width: 16px; height: 21px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; top: 10%; }
.mini-drop::before { content: ""; position: absolute; left: 50%; top: -8px; margin-left: -5px; border: 5px solid transparent; border-bottom: 9px solid; border-bottom-color: inherit; }
.mini-drop.d1 { left: 16%; background: #0a5ec7; border-color: #0a5ec7; transform: rotate(-14deg); }
.mini-drop.d2 { left: 78%; top: 18%; background: #f7c815; border-color: #f7c815; transform: rotate(12deg) scale(.8); }
.card-link:hover .mini-drop.d1 { animation: hop 1s var(--ease-out); }
.card-link:hover .mini-drop.d2 { animation: hop 1s .12s var(--ease-out); }
@keyframes hop { 40% { translate: 0 -8px; } }

/* Marble card art: a tiny board with three paddles, three slots and the marbles */
.marble-art { background: color-mix(in srgb, var(--sun) 22%, var(--wall)); }
.mini-pad { position: absolute; width: 17%; height: 5.5%; border-radius: 99px; background: var(--ink); transition: rotate .3s var(--spring); }
.mini-pad::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--sun); }
.mini-pad.a { left: 41.5%; top: 30%; rotate: -26deg; }
.mini-pad.b { left: 30.5%; top: 50%; rotate: 26deg; }
.mini-pad.c { left: 52.5%; top: 50%; rotate: -26deg; }
.mini-slot { position: absolute; bottom: 10%; width: 14%; height: 14%; border-radius: 9px; background: var(--ink); }
.mini-slot.s1 { left: 24%; } .mini-slot.s2 { left: 43%; } .mini-slot.s3 { left: 62%; }
.mini-marble { position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 3px var(--paper); }
.mini-marble.m1 { background: #ffc531; left: 27%; bottom: 20.5%; }
.mini-marble.m2 { background: #ff5d4f; left: 65%; bottom: 20.5%; }
.mini-marble.m3 { background: #3d8bff; left: 46%; top: 9%; }
.card-link:hover .mini-marble.m3 { animation: mini-roll 1.2s var(--ease-out); }
.card-link:hover .mini-pad.a { rotate: 26deg; transition-delay: .25s; }
@keyframes mini-roll { 25% { translate: 0 120%; } 55% { translate: 90% 300%; } 100% { translate: 0 0; } }

/* Floe card art: a tiny ice floe with two rocks, a spot and a penguin sliding onto it */
.floe-art { background: color-mix(in srgb, var(--sky) 22%, var(--wall)); }
.mini-floe { position: absolute; left: 50%; top: 52%; width: 60%; aspect-ratio: 1.6; transform: translate(-50%, -50%); border-radius: 18px;
  background: linear-gradient(160deg, #f6fcff, #cfe5f4); box-shadow: 0 0 0 5px #ffffff, 0 6px 0 3px #c6d9e8, 0 22px 30px -18px rgba(16, 48, 92, .7); }
.mini-rock { position: absolute; width: 16%; aspect-ratio: 1.15; border-radius: 48% 52% 40% 40%; background: #7d8da2; box-shadow: inset 0 5px 0 #f3f8fc; }
.mini-rock.k1 { right: 6%; top: 18%; } .mini-rock.k2 { left: 30%; bottom: 8%; }
.mini-spot { position: absolute; right: 23%; top: 30%; width: 18%; aspect-ratio: 1.6; border-radius: 50%; border: 3px solid #ffc531; background: rgba(255, 197, 49, .3); }
.mini-peng { position: absolute; width: 15%; height: auto; overflow: visible; transition: left .75s cubic-bezier(.3, .05, .25, 1); filter: drop-shadow(0 3px 2px rgba(20, 48, 86, .25)); }
.mini-peng.p1 { left: 6%; top: 4%; }
.mini-peng.p2 { left: 44%; top: 44%; }
.mini-spot { top: 23%; }
.card-link:hover .mini-peng.p1 { left: 60.5%; }

.side-cards { display: grid; gap: 16px; align-content: start; }
.game-card.soon { border: 2px dashed var(--line); display: grid; align-content: start; }
.soon-art { display: block; margin: 10px 10px 0; border-radius: 20px; aspect-ratio: 16 / 10; position: relative; }
.soon-slot { position: absolute; left: 50%; bottom: 22%; width: 38%; height: 30%; transform: translateX(-50%); border: 3px dashed var(--line); border-radius: 18px; }
.soon-ball { position: absolute; left: 50%; top: 18%; width: 15%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 3px dashed var(--line); animation: wait 2.6s ease-in-out infinite; }
@keyframes wait { 50% { transform: translate(-50%, 8px); } }
.game-card.soon .card-name { font-size: 1.3rem; color: var(--muted); }
.idea-ball { position: absolute; left: 50%; top: 14%; width: 17%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--ink); display: grid; place-items: center; font: 800 1.3rem/1 var(--display); color: var(--ink); animation: wait 2.6s ease-in-out infinite; }
.game-card.idea .card-name { color: var(--ink); }
.idea-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 2px; }
.idea-link .ico { width: 18px; height: 18px; }
/* the next game and the idea card are compact, side by side with their art */
.game-card.soon { grid-template-columns: 96px 1fr; align-items: center; }
.game-card.soon .soon-art { margin: 12px 0 12px 12px; aspect-ratio: 1; }
.game-card.soon .soon-slot { width: 64%; height: 34%; bottom: 16%; border-radius: 12px; }
.game-card.soon .soon-ball, .game-card.soon .idea-ball { width: 30%; top: 16%; }
.game-card.soon .idea-ball { width: 34%; font-size: 1.05rem; }
.game-card.soon .card-body { padding: 14px 16px 14px 6px; gap: 6px; }
.game-card.soon .card-name { font-size: 1.12rem; line-height: 1.15; }
.game-card.soon .card-pitch { font-size: .95rem; }

.week { display: grid; gap: 18px; padding: 26px 0 44px; align-items: center; }
@media (min-width: 860px) { .week { grid-template-columns: 1fr 1.2fr; } }
.week-text p { color: var(--muted); margin-bottom: 8px; max-width: 30rem; }
.week-text a { font-weight: 700; }
.week-strip { list-style: none; margin: 0; padding: 18px; background: var(--paper); border-radius: 24px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; box-shadow: var(--shadow); }
.week-strip li { display: grid; justify-items: center; gap: 8px; font-weight: 700; font-size: .88rem; color: var(--muted); }
.piece { position: relative; width: 100%; max-width: 46px; aspect-ratio: 1 / 1.05; }
.piece::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 52%; border-radius: 10px; border: 2px solid var(--line); }
.piece::after { content: ""; position: absolute; left: 50%; top: 4%; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 2px dashed var(--line); }
.week-strip li.played .piece::before { background: var(--ink); border-color: var(--ink); }
.week-strip li.played .piece::after { background: var(--sun); border: 2.5px solid var(--paper); top: 14%; }
.week-strip li.today { color: var(--ink); }
.week-strip li.today .piece::before { border-color: var(--ink); }
.week-strip li.future .piece::before { border-style: dashed; }

.how { padding: 10px 0 56px; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .how-list { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.how-list li { padding: 20px; border-radius: 22px; background: color-mix(in srgb, var(--paper) 55%, transparent); }
.how-list h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.how-list h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px var(--ink); flex: none; }
.how-list li:nth-child(2) h3::before { background: var(--coral); }
.how-list li:nth-child(3) h3::before { background: var(--sky); }
.how-list p { color: var(--muted); margin: 0; }

/* ---------- stats (shared by the stats page and game result dialogs) ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; text-align: center; }
.stats-row div { display: grid; }
.stats-row dd { margin: 0; font: 800 1.7rem/1.1 var(--display); order: -1; font-variant-numeric: tabular-nums; }
.stats-row dt { font-size: .86rem; color: var(--muted); }
.dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.dist li { display: flex; align-items: center; gap: 8px; }
.dist .k { width: 1.2ch; font-weight: 700; }
.dist .bar { background: var(--line); color: var(--ink); font: 700 .86rem/24px var(--text); padding: 0 8px; border-radius: 7px; text-align: right; min-width: 26px; width: var(--w, 8%); transition: width .7s var(--ease-out); }
.dist .bar.zero { width: 26px; }
.dist .bar.mine { background: var(--ink); color: var(--paper); }

.stats-hero { padding: 22px 0 30px; }
.stats-hero h1 { font-size: clamp(2.4rem, 9vw, 4.2rem); letter-spacing: -.04em; font-weight: 800; margin-bottom: .2em; }
.stats-hero > p { color: var(--muted); }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 0; max-width: 40rem; }
.big-stats div { background: var(--paper); border-radius: 22px; padding: 16px 14px; display: grid; box-shadow: var(--shadow); }
.big-stats dd { margin: 0; order: -1; font: 800 clamp(2rem, 8vw, 3.2rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.big-stats dt { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.big-stats .hot { background: var(--ink); color: var(--paper); }
.big-stats .hot dt { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.empty-state { margin-top: 22px; background: var(--paper); border-radius: 22px; padding: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; max-width: 40rem; }
.empty-state p { margin: 0; }
.cal { padding: 16px 0 30px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 30rem; }
.cal-h { text-align: center; font-size: .82rem; color: var(--muted); font-weight: 700; }
.cal-d { aspect-ratio: 1; border-radius: 10px; background: color-mix(in srgb, var(--paper) 70%, transparent); display: grid; place-items: center; font-size: .82rem; color: var(--muted); position: relative; }
.cal-d.played { background: var(--ink); color: var(--paper); }
.cal-d.played::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font-weight: 700; }
.cal-d.played.today { color: var(--paper); box-shadow: inset 0 0 0 2px var(--sun); }
.cal-d.future { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.cal-legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-top: 12px; }
.lg { width: 14px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--paper) 70%, transparent); border: 1px solid var(--line); margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg.played { background: var(--ink); border-color: var(--ink); }
.bygame { padding: 10px 0 30px; display: grid; gap: 14px; }
.gstat { background: var(--paper); border-radius: 24px; padding: 20px; display: grid; gap: 14px; max-width: 40rem; box-shadow: var(--shadow); }
.gstat h3 { font-size: 1.5rem; margin: 0; }
.gstat h3 a { text-decoration: none; }
.gstat h4 { font-size: 1rem; margin: 0; font-family: var(--text); }
.data { padding: 10px 0 56px; }
.data p { color: var(--muted); max-width: 36rem; }

/* ---------- prose pages ---------- */
.prose { padding: 20px 0 56px; }
.prose h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; }
.prose h2 { font-size: 1.35rem; margin-top: 1.7em; }
.prose p, .prose li { max-width: 38rem; }
.prose .lede { font-size: 1.2rem; color: var(--muted); }
.nf-art { position: relative; height: 130px; width: 200px; margin-bottom: 10px; }
.nf-art .soon-slot { width: 60%; height: 42%; bottom: 0; }
.nf-ball { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--ink); right: 0; top: 10px; animation: roll 3s ease-in-out infinite; }
@keyframes roll { 50% { transform: translateX(-16px) rotate(-40deg); } }

/* ---------- footer ---------- */
.foot { padding: 30px 0 calc(34px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .96rem; border-top: 1.5px solid var(--line); margin-top: 20px; }
.foot .wrap { display: grid; gap: 12px; }
.foot .logo { color: var(--ink); }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 10px 20px; flex-wrap: wrap; }
@media (min-width: 760px) { .foot .wrap { grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px; } .foot nav { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
