/* dailyfika: "Lavender dusk". All colours and sizes live here as variables. */
@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ECE9F4;          /* soft lilac-grey */
  --panel: #F6F4FB;       /* shelves sit on this */
  --raise: #FFFFFF;       /* hover, inputs */
  --ink: #2B2742;         /* plum-navy text */
  --muted: #6B6687;
  --line: #DCD7EA;
  --accent: #5E50C9;      /* Play buttons, focus */
  --on-accent: #FFFFFF;
  --star: #E9A23B;
  --shadow: 0 1px 2px rgba(43, 39, 66, 0.05), 0 8px 24px -12px rgba(43, 39, 66, 0.18);

  /* one colour per category; tiles use a soft tint of it until played */
  --cat-word: #E4A13A;
  --cat-logic: #6F7FE8;
  --cat-mystery: #A47CE0;
  --cat-geography: #2FA98B;
  --cat-trivia: #E8705F;
  --cat-screen: #3E9FCF;
  --cat-crosswords: #4A4569;
  --tint: 24%;

  --font: "Familjen Grotesk", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-hero: clamp(2.75rem, 9vw, 6rem);
  --max: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1A2B; --panel: #242136; --raise: #2D2943; --ink: #ECE9F7; --muted: #ADA8C8;
    --line: #38334F; --accent: #A99CF5; --on-accent: #1C1A2B; --star: #F2B84F;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 28px -14px rgba(0,0,0,.6);
    --cat-crosswords: #B4AED6; --tint: 30%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1A2B; --panel: #242136; --raise: #2D2943; --ink: #ECE9F7; --muted: #ADA8C8;
  --line: #38334F; --accent: #A99CF5; --on-accent: #1C1A2B; --star: #F2B84F;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 28px -14px rgba(0,0,0,.6);
  --cat-crosswords: #B4AED6; --tint: 30%;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.55; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { padding-block: 1.1rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { text-decoration: none; font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; }
.site-nav { display: flex; gap: 1.25rem; font-size: var(--step--1); }
.site-nav a { text-decoration: none; color: var(--muted); padding-block: 0.4rem; }
.site-nav a:hover { color: var(--ink); }
.site-nav { align-items: center; }
/* Light/dark switch: shows the moon in light mode and the sun in dark mode. */
.theme-toggle { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; margin: -0.5rem -0.4rem -0.5rem 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--panel); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { grid-area: 1 / 1; width: 1.2rem; height: 1.2rem; transition: transform 0.45s cubic-bezier(.3,.7,.3,1), opacity 0.3s ease; }
.theme-toggle .icon-moon { fill: currentColor; }
.theme-toggle .icon-sun { fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle[data-mode="light"] .icon-sun, .theme-toggle[data-mode="dark"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
html.theme-fade, html.theme-fade * { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important; }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: none; } html.theme-fade, html.theme-fade * { transition: none !important; } }

/* ---------- hero ---------- */
.hero { padding-top: 2rem; padding-bottom: 2rem; }
.hero-date { font-size: var(--step-hero); font-weight: 650; line-height: 0.95; letter-spacing: -0.045em; margin: 0; }
.hero-date .weekday { display: block; color: var(--muted); font-weight: 500; font-size: 0.4em; letter-spacing: -0.02em; margin-bottom: 0.35em; }
.hero-intro { max-width: 34rem; margin: 1.1rem 0 0; color: var(--muted); font-size: var(--step-1); line-height: 1.4; }
.day-group { margin-top: 1.6rem; }
.day-group + .day-group { margin-top: 1.1rem; }
.day-label { margin: 0 0 0.45rem; font-size: var(--step--1); font-weight: 600; color: var(--ink); }
.day-tiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.day-tiles li { position: relative; width: 1.4rem; height: 1.4rem; border-radius: 6px; background: color-mix(in srgb, var(--c) var(--tint), var(--panel)); }
.day-tiles li.played { background: var(--c); }
.day-tile { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
/* My games row: bigger squares with the game's own icon, faded until played */
.day-tiles-mine { gap: 8px; }
.day-tiles-mine li { width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; }
.day-tiles li.has-icon .day-tile { padding: 3px; }
.day-tile img { display: block; width: 100%; height: 100%; border-radius: 0.5rem; opacity: 0.4; filter: saturate(0.25); transition: opacity 0.45s ease, filter 0.45s ease; }
.day-tiles li.played .day-tile img { opacity: 1; filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .day-tile img { opacity: 0.55; } }
:root[data-theme="dark"] .day-tile img { opacity: 0.55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .day-tiles li.played .day-tile img { opacity: 1; } }
:root[data-theme="dark"] .day-tiles li.played .day-tile img { opacity: 1; }
.day-count { margin: 0.6rem 0 0; font-size: var(--step--1); color: var(--muted); }
.count-link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.count-link:hover { text-decoration-color: currentColor; }
/* name bubble over a hero square */
.tile-tip { position: absolute; z-index: 50; transform: translate(-50%, -100%); padding: 0.35rem 0.65rem; border-radius: 0.6rem; background: var(--ink); color: var(--bg); font-size: 0.8rem; font-weight: 600; line-height: 1.25; text-align: center; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(20, 16, 40, 0.18); }
.tile-tip::after { content: ""; position: absolute; left: calc(50% + var(--arrow, 0px)); bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tile-tip span { display: block; font-weight: 400; font-size: 0.72rem; opacity: 0.75; }
/* a row you jumped to from the hero glows briefly; a row leaving the "not played" list fades */
.game.flash { animation: row-flash 1.6s ease; }
@keyframes row-flash { 0%, 30% { background: color-mix(in srgb, var(--accent) 16%, transparent); } 100% { background: transparent; } }
.shelves { scroll-margin-top: 7rem; }
.empty.empty-done { font-size: var(--step-1); color: var(--ink); text-align: center; padding-block: 3rem; }
@media (prefers-reduced-motion: no-preference) {
  .day-tiles.animate li { animation: flip 0.55s cubic-bezier(.3,.7,.3,1) both; animation-delay: calc(var(--i) * 40ms); }
  @keyframes flip { from { transform: rotateX(90deg); opacity: .4; } to { transform: rotateX(0); opacity: 1; } }
}

/* ---------- filters ---------- */
.filters { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); padding-block: 0.7rem; }
.filters .wrap { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.search { flex: 1 1 14rem; min-width: 0; font: inherit; font-size: var(--step--1); padding: 0.6rem 1rem; border: 0; border-radius: 999px; background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.search:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; flex: 1 1 100%; }
.chip { flex: none; font: inherit; font-size: var(--step--1); display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.42rem 0.85rem; border-radius: 999px; border: 0; background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; }
.chip::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 3px; background: var(--c); }
.chip[data-filter="all"]::before { display: none; }
.chip:hover { background: var(--raise); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--ink); color: var(--bg); }
.toggle { display: inline-flex; align-items: center; gap: 0.45rem; font-size: var(--step--1); color: var(--muted); cursor: pointer; }
.toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---------- shelves (home) and lists ---------- */
.shelves { display: grid; gap: 1.25rem; padding-top: 1rem; padding-bottom: 3rem; }
.shelf { background: var(--panel); border-radius: 1.75rem; padding: 1.5rem clamp(0.75rem, 3vw, 2rem) 1.25rem; }
.shelf-mine { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--star) 55%, transparent); }
.shelf-title { font-size: var(--step-2); letter-spacing: -0.025em; margin: 0 0 0.15rem; padding-inline: 0.5rem; }
.shelf-blurb { color: var(--muted); margin: 0 0 1rem; max-width: 40rem; font-size: var(--step--1); padding-inline: 0.5rem; }
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 46rem) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 70rem) { .games { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.game { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center; padding: 0.7rem 0.5rem; border-radius: 1.1rem; transition: background 0.2s, opacity 0.5s ease, transform 0.5s cubic-bezier(.3,.7,.3,1); scroll-margin-top: 9rem; }
/* a game leaving the "Not played today" list: fades and shrinks a little, then the rest glide into place (see app.js) */
.game.fading, .shelf.fading { opacity: 0; transform: scale(0.96); }
.shelf { transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.3,.7,.3,1); }
.game:hover { background: var(--raise); }
.tile { --size: 3.25rem; width: var(--size); height: var(--size); border-radius: 0.95rem; display: grid; place-items: center; flex: none; font-weight: 700; font-size: calc(var(--size) * 0.46); color: var(--ink); background: color-mix(in srgb, var(--c) var(--tint), var(--panel)); transition: background 0.45s ease, color 0.45s ease; }
.played .tile { background: var(--c); color: #FFFFFF; }
/* Marking a game played: the tile fills with colour while it lifts, then settles with a soft bounce. */
.tile.pop, .day-tiles li.pop { animation: tile-fill 0.65s cubic-bezier(.3,.7,.3,1) both; }
@keyframes tile-fill {
  0%   { background: color-mix(in srgb, var(--c) var(--tint), var(--panel)); transform: none; }
  40%  { transform: translateY(-6px) scale(1.12); }
  70%  { transform: translateY(1px) scale(0.97); }
  100% { background: var(--c); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile.pop, .day-tiles li.pop { animation-name: tile-fill-still; }
  @keyframes tile-fill-still { from { background: color-mix(in srgb, var(--c) var(--tint), var(--panel)); } to { background: var(--c); } }
}
.played .tile[style*="cat-word"] { color: #2B2742; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .played .tile[style*="cat-crosswords"] { color: #1C1A2B; } }
:root[data-theme="dark"] .played .tile[style*="cat-crosswords"] { color: #1C1A2B; }
.game-body { min-width: 0; }
.game-title { font-size: 1.15rem; font-weight: 650; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.game-title a { text-decoration: none; }
.game-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.game-line { margin: 0.15rem 0 0; font-size: var(--step--1); color: var(--muted); line-height: 1.4; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.3rem; vertical-align: 0.15em; color: var(--muted); background: var(--bg); white-space: nowrap; }
.game-actions { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 0.2rem 0.35rem; }
.game-actions .mark { grid-column: 1 / -1; }
.play { display: inline-block; font-weight: 650; font-size: var(--step--1); text-decoration: none; padding: 0.48rem 1rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); white-space: nowrap; transition: filter 0.2s; }
.play:hover { filter: brightness(1.12); }
.mark { font: inherit; font-size: 0.78rem; color: var(--muted); background: none; border: 0; padding: 0.15rem 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.mark[aria-pressed="true"] { color: var(--ink); }
.star { display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; font-size: var(--step--1); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 0.35rem; cursor: pointer; }
.star svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; transition: transform 0.2s; }
.star:hover { color: var(--ink); }
.star[aria-pressed="true"] { color: var(--ink); }
.star[aria-pressed="true"] svg { fill: var(--star); stroke: var(--star); }
@media (prefers-reduced-motion: no-preference) { .star:active svg { transform: scale(1.25); } }
.empty { padding: 2rem 0.5rem; color: var(--muted); }

/* ---------- category + game pages ---------- */
.crumbs { font-size: var(--step--1); color: var(--muted); padding-top: 0.75rem; margin: 0; }
.crumbs a { color: var(--muted); }
.section { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.section-title { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 0.4rem; }
.section-blurb { color: var(--muted); margin: 0 0 1.5rem; max-width: 40rem; }
.section .shelf { margin-top: 0.5rem; }
.game-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; padding: 1.5rem 0 1rem; }
.game-hero .tile { --size: clamp(4.5rem, 16vw, 6.5rem); border-radius: 1.5rem; }
.game-hero h1 { font-size: clamp(2.25rem, 7vw, 4rem); line-height: 1; letter-spacing: -0.045em; margin: 0; }
.game-hero .by { margin: 0.4rem 0 0; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.25rem 0 1.5rem; padding: 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; margin-bottom: 2.25rem; }
.cta .play { font-size: var(--step-0); padding: 0.8rem 1.5rem; }
.cta .star { padding-inline: 0.2rem; }
.cta .mark { font-size: var(--step--1); }
.cta-note { width: 100%; margin: 0; font-size: 0.8rem; color: var(--muted); }
.prose { max-width: 40rem; background: var(--panel); border-radius: 1.75rem; padding: 0.5rem clamp(1.1rem, 4vw, 2.25rem) 1.5rem; }
.prose h2 { font-size: var(--step-1); margin: 1.5rem 0 0.5rem; }
.prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.ad-slot { display: none; }
body.ads-on .ad-slot { display: block; min-height: 280px; margin: 2rem 0; }

/* ---------- footer ---------- */
.site-footer { padding-block: 2rem 3rem; font-size: var(--step--1); color: var(--muted); }
.site-footer p { max-width: 40rem; margin: 0 0 0.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1rem; }

/* Game icons (our own drawings of each board): a white card inside the tile; the category colour frames it, and fills the frame once played. */
.tile.has-icon { padding: 0.22rem; }
.tile.has-icon img { width: 100%; height: 100%; display: block; border-radius: 0.72rem; }
.game-hero .tile.has-icon { padding: 0.35rem; }
.game-hero .tile.has-icon img { border-radius: 1.15rem; }
/* "Not affiliated" notice, marked with a soft asterisk */
.ast { color: var(--accent); text-decoration: none; font-weight: 600; margin-left: 0.05em; }
.ast:hover { text-decoration: underline; }
.notice { margin: 0.6rem 0 0; max-width: 40rem; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
.notice span { color: var(--accent); font-weight: 600; }
.hero .notice { margin-top: 0.5rem; }

/* Links from a list to the full page ("See all NYT games…") */
.more-link { white-space: nowrap; color: var(--accent); font-weight: 600; text-decoration: none; margin-left: 0.15rem; }
.more-link::after { content: " →"; }
.more-link:hover { text-decoration: underline; }
.section-blurb a, .prose a, .game-hero .by a { color: var(--accent); }
/* "that's 09:00 where you are", filled in by js/app.js */
.reset-local { font-weight: 400; color: var(--muted); }
.after-list { padding-top: 1.5rem; }
.after-list .section-blurb { margin-bottom: 1rem; }

/* ---------- progress popup after ticking a game off ---------- */
.progress-pop { position: fixed; z-index: 40; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom, 0px)); width: min(30rem, calc(100vw - 1.5rem)); padding: 0.9rem 1.1rem 0.85rem; border-radius: 1.3rem; background: var(--raise); color: var(--ink); box-shadow: 0 14px 40px rgba(20, 16, 40, 0.22), inset 0 0 0 1px var(--line); transform: translate(-50%, calc(100% + 2rem)); opacity: 0; transition: transform 0.5s cubic-bezier(.3,.7,.3,1), opacity 0.35s ease; }
.progress-pop.show { transform: translate(-50%, 0); opacity: 1; }
.progress-pop .day-label { margin-bottom: 0.3rem; }
.progress-pop .day-count { margin-top: 0.55rem; }
.progress-pop .day-tiles:not(.day-tiles-mine) { gap: 4px; }
.progress-pop .day-tiles:not(.day-tiles-mine) li { width: 1rem; height: 1rem; border-radius: 4px; }
/* all-games progress bar: one block per category, split into milestone steps (1, 3, 5, 10 ...) */
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; max-width: 34rem; }
.see-all { font: inherit; font-size: var(--step--1); font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0.2rem 0; cursor: pointer; }
.see-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.pbar-box { position: relative; max-width: 34rem; padding-top: 1.3rem; margin-top: -0.25rem; --gap-bg: var(--bg); }
#all-bar { cursor: pointer; }
#day-tiles:not([hidden]) { margin-top: 0.9rem; }
.pbar { position: relative; height: 1.1rem; border-radius: 7px; overflow: hidden; background: color-mix(in srgb, var(--ink) 8%, var(--gap-bg)); }
.pseg { position: absolute; z-index: 1; top: 0; bottom: 0; box-sizing: border-box; border-right: 2px solid var(--gap-bg); background: var(--c); transition: left 0.7s cubic-bezier(.3,.7,.3,1), width 0.7s cubic-bezier(.3,.7,.3,1); }
.pseg.is-empty { width: 0 !important; border: 0; }
.pstep { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--gap-bg); z-index: 0; }
.pnew { position: absolute; top: 0; bottom: 0; z-index: 2; pointer-events: none; animation: slice-in 1.6s ease forwards; }
@keyframes slice-in {
  0%, 40% { background: color-mix(in srgb, var(--c) 22%, var(--gap-bg)); box-shadow: inset 0 0 0 2px var(--c); }
  100% { background: transparent; box-shadow: inset 0 0 0 2px transparent; }
}
.pplus { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.78rem; font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--ink); pointer-events: none; animation: plus-up 1.7s ease forwards; }
@keyframes plus-up { 0% { opacity: 0; transform: translate(-50%, 6px); } 18%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -5px); } }
.plabels { position: relative; height: 1.05rem; margin-top: 0.3rem; font-size: 0.72rem; color: var(--muted); }
.plabels span { position: absolute; top: 0; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.plabels span:last-child { transform: translateX(-100%); }
.plabels span.reached { color: var(--ink); font-weight: 700; }
.pmsg { margin: 0.25rem 0 0; font-size: var(--step--1); color: var(--muted); min-height: 1.3em; }
.pmsg.won { color: var(--ink); font-weight: 600; }
.progress-pop .pbar-box { --gap-bg: var(--raise); max-width: none; }
.progress-pop .pmsg { margin-top: 0.15rem; }
@media (prefers-reduced-motion: reduce) {
  .pseg { transition: none; }
  .pnew { animation-duration: 1s; }
  @keyframes plus-up { 0% { opacity: 0; } 20%, 75% { opacity: 1; } 100% { opacity: 0; } }
}
.pop-close { position: absolute; top: 0.45rem; right: 0.45rem; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.pop-close:hover { color: var(--ink); background: var(--panel); }
@media (prefers-reduced-motion: reduce) {
  .progress-pop { transform: translate(-50%, 0); transition: opacity 0.3s ease; }
  .game, .shelf { transition: opacity 0.3s ease; }
  .game.fading, .shelf.fading { transform: none; }
}

/* ---------- contact, privacy, terms ---------- */
.prose .updated { color: var(--muted); font-size: var(--step--1); margin-top: -0.5rem; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: 0.4rem; justify-items: start; padding: 1rem 1.1rem; border-radius: 1rem; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.contact-list span { color: var(--muted); }
.footer-links a { color: inherit; }
.prose a.play { color: var(--on-accent); text-decoration: none; }

/* ----- small screens and fingers ----- */
/* Nothing may push the page sideways, even on the narrowest phones (320px) or when zoomed in. */
.shelves > *, .game-hero > div { min-width: 0; }
.game-title, .game-hero h1 { overflow-wrap: anywhere; }
/* Comfortable tap sizes for the small text links. */
.site-footer nav a { display: inline-block; padding-block: 0.2rem; }
.count-link { padding-block: 0.2rem; }
.toggle { padding-block: 0.3rem; }
@media (pointer: coarse) { .mark { padding-block: 0.45rem; } .see-all { padding-block: 0.45rem; } }
