/* napijatekok.hu — "stage" design: a quiet white (or black) page, every game on a black
   device-like stage, big lowercase type, white pills, sound and motion.
   Game-specific styles live in css/games/<key>.css and always render inside .stage (dark). */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/schibsted-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/schibsted-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------------------------------
   Tokens. The page has a light and a dark theme; the stage is always dark.
   --------------------------------------------------------------------------------------- */
:root {
  /* Game colours (each page also sets --game from the registry) */
  --c-queens: #7b5cff;
  --c-zip: #ff7a3d;
  --c-tango: #ffb400;
  --c-sudoku: #12b5a2;
  --c-wend: #2f86ff;
  --c-cross: #ff4d7e;

  --page: #ffffff;
  --ink: #000000;
  --ink-2: #6e6e73;
  --hair: #e9e9eb;
  --wash: #f4f4f5;
  --stage-bg: #000000;
  --stage-edge: transparent;
  --lift: 0 30px 60px -22px rgba(0, 0, 0, .45), 0 10px 24px -12px rgba(0, 0, 0, .25);

  /* Shared names used by views and game stylesheets */
  --base: var(--page);
  --text: var(--ink);
  --muted: var(--ink-2);
  --line: var(--hair);
  --surface: #ffffff;
  --surface-2: rgba(0, 0, 0, .045);
  --field: var(--wash);
  --glass: var(--wash);
  --glass-strong: #ffffff;
  --glass-edge: var(--hair);
  --glass-shadow: none;
  --accent: #000000;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 0, 0, .06);
  --good: #0f9f6e;
  --good-soft: rgba(15, 159, 110, .12);
  --warn: #d4570a;
  --warn-soft: rgba(212, 87, 10, .12);
  --danger: #e0294f;
  --gold: #b07a00;
  --r-stage: 34px;
  --r-panel: 26px;
  --r-tile: 20px;
  --r-inset: 14px;
  --game: #000000;
  --font: "Schibsted Grotesk", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --display: var(--font);
  --body: var(--font);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --bg: var(--base);
  --radius: var(--r-panel);
  --radius-sm: var(--r-inset);
  --shadow: none;
  --board-ink: #000000;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #000000; --ink: #f5f5f7; --ink-2: #8e8e93; --hair: #232325; --wash: #141415;
    --stage-bg: #121213; --stage-edge: rgba(255, 255, 255, .08); --lift: 0 30px 60px -30px rgba(0, 0, 0, .8);
    --surface: #1c1c1e; --surface-2: rgba(255, 255, 255, .07); --glass-strong: #1c1c1e;
    --accent: #ffffff; --accent-ink: #000000; --accent-soft: rgba(255, 255, 255, .1);
    --good: #34d399; --good-soft: rgba(52, 211, 153, .14); --warn: #ff9f43; --warn-soft: rgba(255, 159, 67, .14);
    --danger: #ff6b8a; --gold: #ffcf5a; --board-ink: #f5f5f7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #000000; --ink: #f5f5f7; --ink-2: #8e8e93; --hair: #232325; --wash: #141415;
  --stage-bg: #121213; --stage-edge: rgba(255, 255, 255, .08); --lift: 0 30px 60px -30px rgba(0, 0, 0, .8);
  --surface: #1c1c1e; --surface-2: rgba(255, 255, 255, .07); --glass-strong: #1c1c1e;
  --accent: #ffffff; --accent-ink: #000000; --accent-soft: rgba(255, 255, 255, .1);
  --good: #34d399; --good-soft: rgba(52, 211, 153, .14); --warn: #ff9f43; --warn-soft: rgba(255, 159, 67, .14);
  --danger: #ff6b8a; --gold: #ffcf5a; --board-ink: #f5f5f7;
  color-scheme: dark;
}

/* The stage (and the black home cards) are always dark, in both page themes. */
.stage, .game-card, .dark {
  --text: #ffffff;
  --ink: #ffffff;
  --muted: #a1a1a6;
  --ink-2: #a1a1a6;
  --line: rgba(255, 255, 255, .12);
  --hair: rgba(255, 255, 255, .12);
  --surface: #1c1c1e;
  --surface-2: rgba(255, 255, 255, .08);
  --surface-3: #2c2c2e;
  --field: rgba(255, 255, 255, .08);
  --wash: rgba(255, 255, 255, .08);
  --glass: rgba(255, 255, 255, .06);
  --glass-strong: #1c1c1e;
  --glass-edge: rgba(255, 255, 255, .1);
  --glass-shadow: none;
  --accent: color-mix(in srgb, var(--game) 70%, white);
  --accent-ink: #000000;
  --accent-soft: color-mix(in srgb, var(--game) 28%, transparent);
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, .16);
  --warn: #ffb054;
  --warn-soft: rgba(255, 176, 84, .16);
  --danger: #ff6b81;
  --gold: #ffd166;
  --board-ink: #ffffff;
  color: var(--text);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out);
}
/* The page's slowly drifting, colour-shifting light (layout: .bg-fx) */
@property --blob { syntax: "<color>"; inherits: false; initial-value: #7b5cff; }
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx i {
  position: absolute; width: 70vmax; aspect-ratio: 1; border-radius: 50%; opacity: var(--blob-opacity, .22);
  background: radial-gradient(closest-side, var(--blob), transparent);
  animation: blob-drift 34s ease-in-out infinite alternate, blob-hue 48s linear infinite;
}
.bg-fx i:nth-child(1) { left: -25vmax; top: -30vmax; }
.bg-fx i:nth-child(2) { right: -30vmax; top: 10vh; animation-duration: 41s, 48s; animation-delay: -12s, -16s; }
.bg-fx i:nth-child(3) { left: 10vw; bottom: -40vmax; animation-duration: 29s, 48s; animation-delay: -6s, -32s; }
@keyframes blob-drift { 0% { translate: 0 0; scale: 1; } 50% { translate: 12vw 8vh; scale: 1.15; } 100% { translate: -6vw 16vh; scale: .9; } }
@keyframes blob-hue {
  0%, 100% { --blob: #7b5cff; } 17% { --blob: #ff7a3d; } 33% { --blob: #ffb400; }
  50% { --blob: #12b5a2; } 67% { --blob: #2f86ff; } 83% { --blob: #ff4d7e; }
}
/* Site themes (Levels::THEMES): the drifting background's colours and a tinted accent. */
.coin-balance { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--wash); color: var(--ink); font-weight: 600; font-size: .86rem; text-decoration: none; }
/* Too narrow for the balance next to the menu: it moves into the menu (layout.php). */
.dropdown .dropdown-coins { display: none; }
@media (max-width: 360px) { .user-area > .coin-balance { display: none; } .dropdown .dropdown-coins { display: block; } }
@keyframes blob-ocean { 0%, 100% { --blob: #2f86ff; } 33% { --blob: #12b5a2; } 66% { --blob: #00c2ff; } }
@keyframes blob-forest { 0%, 100% { --blob: #16a34a; } 33% { --blob: #84cc16; } 66% { --blob: #0f766e; } }
@keyframes blob-sunset { 0%, 100% { --blob: #ff7a3d; } 33% { --blob: #ff4d7e; } 66% { --blob: #ffb400; } }
@keyframes blob-neon { 0%, 100% { --blob: #ff2bd6; } 50% { --blob: #00e5ff; } }
@keyframes blob-gold { 0%, 100% { --blob: #f5b014; } 50% { --blob: #b45309; } }
:root[data-skin="ocean"] .bg-fx i { animation-name: blob-drift, blob-ocean; }
:root[data-skin="forest"] .bg-fx i { animation-name: blob-drift, blob-forest; }
:root[data-skin="sunset"] .bg-fx i { animation-name: blob-drift, blob-sunset; }
:root[data-skin="neon"] .bg-fx i { animation-name: blob-drift, blob-neon; }
:root[data-skin="gold"] .bg-fx i { animation-name: blob-drift, blob-gold; }
:root[data-skin="neon"] .bg-fx { --blob-opacity: .3; }
:root[data-theme="dark"] .bg-fx { --blob-opacity: .16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bg-fx { --blob-opacity: .16; } }

::selection { background: color-mix(in srgb, var(--game) 35%, transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* --- Typography ------------------------------------------------------------------------- */
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); letter-spacing: -0.05em; }
h2 { font-size: 1.25rem; letter-spacing: -0.025em; }
h3 { font-size: 1.02rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }

.display { font-family: var(--font); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* --- Header / footer -------------------------------------------------------------------- */
.aurora { display: none; }
.site-header {
  position: sticky; top: 0; z-index: 30; padding: 0 20px;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
}
.header-inner { max-width: 1120px; margin: 0 auto; height: 72px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.08rem; letter-spacing: -0.04em; flex: none; }
.logo small { display: none; }
.logo-mark { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 22px; height: 22px; transition: transform .6s var(--ease-spring); }
.logo-mark span { border-radius: 3px 3px 3px 7px; background: var(--ink); transition: transform .5s var(--ease-spring); }
.logo-mark span:nth-child(2) { border-radius: 3px 3px 7px 3px; }
.logo-mark span:nth-child(3) { border-radius: 3px 7px 3px 3px; }
.logo-mark span:nth-child(4) { border-radius: 7px 3px 3px 3px; background: var(--c-queens); animation: mark-cycle 18s infinite; }
.in-game .logo-mark span:nth-child(4) { animation: none; background: var(--game); transition: background-color .6s var(--ease-out); }
@keyframes mark-cycle {
  0%, 14% { background-color: #7b5cff; } 17%, 31% { background-color: #ff7a3d; } 34%, 48% { background-color: #ffb400; }
  51%, 65% { background-color: #12b5a2; } 68%, 82% { background-color: #2f86ff; } 85%, 97% { background-color: #ff4d7e; } 100% { background-color: #7b5cff; }
}
.logo:hover .logo-mark { transform: rotate(90deg); }
.main-nav { display: flex; gap: 22px; flex: 1; }
.main-nav a {
  position: relative; color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 450; letter-spacing: -0.01em;
  padding: 6px 0; transition: color .2s;
}
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after { transform: scaleX(1); }
.user-area { display: flex; align-items: center; gap: 6px; }
.badge-dot { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: #ff375f; color: #fff; font-size: .68rem; font-weight: 700; margin-left: 5px; vertical-align: 1px; }
.chrome-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 0; padding: 0;
  background: none; color: var(--ink-2); cursor: pointer; transition: color .2s, background-color .2s, transform .3s var(--ease-spring);
}
.chrome-btn:hover { color: var(--ink); background: var(--surface-2); }
.chrome-btn:active { transform: scale(.9); }
.chrome-btn svg { width: 19px; height: 19px; }
.chrome-btn .when-off, .chrome-btn[aria-pressed="false"] .when-on { display: none; }
.chrome-btn[aria-pressed="false"] .when-off { display: block; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: .93rem; transition: background-color .2s; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] summary, .user-menu summary:hover { background: var(--surface-2); }
.user-menu .avatar { width: 32px; height: 32px; border-radius: 50%; font-size: .74rem; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 6px; border-radius: 20px;
  background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--lift);
  animation: drop .35s var(--ease-out);
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.nav-toggle, .nav-mobile-only { display: none; }
@media (max-width: 820px) {
  .site-header { padding: 0 12px; }
  .header-inner { height: auto; min-height: 60px; flex-wrap: wrap; gap: 4px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; flex: none; flex-direction: column; gap: 0; padding: 4px 0 10px; display: none; }
  .site-header.nav-open .main-nav { display: flex; animation: drop .35s var(--ease-out); }
  .main-nav a { padding: 12px 4px; font-size: 1.6rem; font-weight: 550; letter-spacing: -0.04em; color: var(--ink); border-bottom: 1px solid var(--hair); }
  .main-nav a::after { display: none; }
  .nav-mobile-only { display: block; }
  .user-area .nav-desktop-only { display: none; }
  .user-area { margin-left: auto; }
  .user-menu summary .user-name { display: none; }
  .user-menu summary { padding: 3px; }
  .nav-toggle {
    display: grid; place-content: center; gap: 5px; width: 40px; height: 40px; flex: none;
    border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease-out), opacity .2s; }
  .nav-toggle span:nth-child(2) { display: none; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(3.3px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-3.3px) rotate(-45deg); }
}
@media (max-width: 820px) and (min-width: 481px) {
  .user-area .btn-primary.nav-desktop-only { display: inline-flex; }
}
@media (max-width: 420px) {
  .chrome-btn { width: 34px; height: 34px; }
  .user-area .btn-sm { padding-inline: 13px; }
}

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 80px; }
@media (max-width: 560px) { main { padding: 16px 12px 64px; } }
.site-footer { color: var(--ink-2); font-size: .8rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 24px 20px 32px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.footer-inner a { color: var(--ink-2); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* --- Building blocks ----------------------------------------------------------------- */
.card { border-radius: var(--r-panel); padding: 26px; background: var(--wash); }
.card + .card { margin-top: 16px; }
.grid > .card, .game-grid > .card { margin-top: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-tight { padding: 20px; border-radius: var(--r-tile); }
.glass { background: var(--wash); }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Pills. Page: black primary, grey secondary. On dark: white primary, translucent secondary. */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 550; font-size: .95rem; line-height: 1.2; letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--surface-2); color: var(--text);
  transition: transform .35s var(--ease-spring), background-color .2s, color .2s, box-shadow .3s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.btn:active { transform: scale(.95); transition-duration: .08s; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--text); color: var(--base); }
.btn-primary:hover { background: var(--text); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--text) 60%, transparent); transform: translateY(-1px); }
.btn-game { background: var(--game); color: #fff; }
.btn-game:hover { background: var(--game); box-shadow: 0 10px 24px -10px var(--game); transform: translateY(-1px); }
.stage .btn-primary, .stage .btn-game, .game-card .btn-game, .dark .btn-game, .dark .btn-primary { background: #fff; color: #000; }
.stage .btn-primary:hover, .stage .btn-game:hover, .game-card .btn-game:hover, .dark .btn-game:hover { background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--game) 55%, transparent); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.btn-sm { padding: 8px 15px; font-size: .86rem; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 0;
  background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; font-size: 1.1rem; font-weight: 500;
  transition: transform .3s var(--ease-spring), background-color .2s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.icon-btn:active { transform: scale(.88); }
.icon-btn[aria-disabled="true"] { opacity: .25; pointer-events: none; }

/* Signature: a white circle with a spinning ring in the game's colour (start, daily). */
.ring-btn {
  --size: 76px;
  position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none;
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: #000; background: #fff; isolation: isolate;
  transition: transform .45s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.ring-btn::before {
  content: ""; position: absolute; inset: -5px; z-index: -1; border-radius: 50%;
  background: conic-gradient(from var(--spin, 0deg), var(--game), color-mix(in srgb, var(--game) 30%, #fff), #ff5f9e, var(--game), #57c7ff, var(--game));
  animation: ring-spin 3.2s linear infinite;
}
.ring-btn::after { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 50%; background: var(--stage-bg, #000); }
.ring-btn > * { position: relative; z-index: 1; }
.ring-btn .ring-face { display: grid; place-items: center; width: calc(var(--size) - 10px); height: calc(var(--size) - 10px); border-radius: 50%; background: #fff; }
.ring-btn svg { width: 30px; height: 30px; }
.ring-btn:hover { transform: scale(1.06); }
.ring-btn:active { transform: scale(.92); transition-duration: .1s; }
.ring-btn:disabled { cursor: progress; }
.ring-btn:disabled::before { animation-duration: .7s; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ring-spin { to { --spin: 360deg; } }
@media (prefers-reduced-motion: reduce) { .ring-btn::before { animation: none; } }

/* Round white icon buttons on the stage (toolbar, modes). */
.round-btn {
  display: inline-grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 0; padding: 0;
  background: #fff; color: #000; cursor: pointer; text-decoration: none;
  transition: transform .4s var(--ease-spring), box-shadow .3s, opacity .2s;
}
.round-btn svg { width: 24px; height: 24px; }
.round-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--game) 45%, transparent); }
.round-btn:active { transform: scale(.9); transition-duration: .08s; }

.form-field { margin-bottom: 16px; }
label, .label { display: block; font-size: .86rem; font-weight: 550; margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--field);
  border: 1px solid transparent; border-radius: var(--r-inset); padding: 13px 15px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.card input[type=text], .card input[type=email], .card input[type=password], .card select, .card textarea { background: var(--page); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.help { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field-error { font-size: .82rem; color: var(--danger); margin-top: 6px; font-weight: 550; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 450; font-size: .93rem; }
.check input { width: 20px; height: 20px; accent-color: var(--text); flex: none; }

.alert { padding: 14px 20px; border-radius: 18px; margin-bottom: 18px; font-weight: 500; background: var(--wash); animation: drop .5s var(--ease-out); }
.alert-success { background: var(--good-soft); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 550; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-good { background: var(--good-soft); color: var(--good); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-accent { background: var(--accent-soft); color: var(--text); }
.pill-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 650; font-size: .78rem; flex: none; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.9rem; letter-spacing: -0.04em; }
/* Level look (avatar_html): a frame the level allows and the level number on the corner. */
.avatar { position: relative; }
.avatar[data-lv]::after {
  content: attr(data-lv); position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: var(--ink); color: var(--page); font-size: .6rem; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--page);
}
.avatar.frame-bronze { box-shadow: 0 0 0 2px #b0703a; }
.avatar.frame-silver { box-shadow: 0 0 0 2px #c0c6cf; }
.avatar.frame-gold { box-shadow: 0 0 0 2px #f5b014, 0 0 10px -2px #f5b014; }
.avatar.frame-rainbow::before {
  content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 50%;
  background: conic-gradient(#ff4d7e, #ffb400, #12b5a2, #2f86ff, #7b5cff, #ff4d7e); animation: spin 6s linear infinite;
}
.lb .avatar[data-lv]::after { min-width: 14px; height: 14px; line-height: 14px; font-size: .55rem; }

/* App icon: the game's colour as a squircle with a white line glyph. */
.game-icon {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 30%;
  background: var(--game); color: #fff; font-size: 1.5rem; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -8px 16px -8px rgba(0, 0, 0, .25);
}
.game-icon svg { width: 52%; height: 52%; }
.game-icon.sm { width: 34px; height: 34px; }
.game-icon.xs { width: 24px; height: 24px; border-radius: 28%; box-shadow: none; }

/* Segmented control */
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); }
.tabs a, .tabs button { padding: 7px 15px; border-radius: 999px; font: inherit; font-weight: 500; font-size: .86rem; color: var(--muted); text-decoration: none; border: 0; background: none; cursor: pointer; white-space: nowrap; transition: color .2s, background-color .25s; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .active, .tabs .active:hover { background: var(--text); color: var(--base); }
.stage .tabs .active { background: #fff; color: #000; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tr.me td { background: var(--accent-soft); }
.table-wrap { overflow-x: auto; }

.empty { text-align: center; color: var(--muted); padding: 22px 8px; font-size: .93rem; }

/* Leaderboard: a plain, typographic list. */
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 6px; border-radius: 14px; animation: lb-in .5s var(--ease-out) both; animation-delay: calc(min(var(--n, 0), 12) * 35ms); transition: background-color .2s; }
.lb li:hover { background: var(--surface-2); }
@keyframes lb-in { from { opacity: 0; transform: translateY(6px); } }
.lb .rank { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 600; font-size: .8rem; color: var(--muted); }
.medal { color: #3b2a00 !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 8px -3px rgba(0, 0, 0, .35); }
.medal.m1 { background: linear-gradient(150deg, #ffe48a, #f5b014); }
.medal.m2 { background: linear-gradient(150deg, #f1f3f6, #b4bcc8); color: #2c333d !important; }
.medal.m3 { background: linear-gradient(150deg, #f6c79c, #cd7f3a); color: #3d1e05 !important; }
.lb .avatar { width: 30px; height: 30px; font-size: .68rem; }
.lb .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); text-decoration: none; }
.lb .who:hover { text-decoration: underline; }
.lb .who-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb .who-col .who { flex: none; }
/* A play's own numbers (PlayStats): "3 hiba · 1 tipp" under the name. */
.lb-facts { color: var(--muted); font-size: .76rem; line-height: 1.3; }
.podium .lb-facts { font-size: .72rem; margin: -8px 0 10px; }
.lb .when { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.lb .time { font-weight: 600; font-size: .92rem; letter-spacing: -0.01em; white-space: nowrap; }
.lb li.me { background: color-mix(in srgb, var(--game, var(--accent)) 16%, transparent); }

/* --- Home ------------------------------------------------------------------------------- */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; margin: 18px 0 36px; }
.hero > div { min-width: 0; max-width: 100%; }
.hero-day { font-weight: 600; font-size: clamp(2.8rem, 9vw, 5.4rem); line-height: .92; letter-spacing: -0.06em; margin: 0; text-transform: lowercase; }
.hero-day .soft { color: var(--ink-2); }
.hero-date { font-size: 1.05rem; color: var(--ink-2); margin: 14px 0 0; letter-spacing: -0.01em; }
.hero h1:not(.hero-day) { margin: 0; text-transform: lowercase; }
main > h1, main > div > h1:first-child, .page-title { text-transform: lowercase; }
.hero .muted { margin-top: 14px; font-size: 1.05rem; }
.game-pick b { font-weight: 550; }
.hero .date { color: var(--ink-2); margin-top: 6px; }
.hero-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; font-size: .95rem; color: var(--ink-2); }
.hero-progress b { color: var(--ink); font-weight: 600; }
.hero-progress .dots { display: flex; flex-wrap: wrap; gap: 5px; }
.hero-progress .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hair); transition: transform .4s var(--ease-spring); }
.hero-progress .dot.done { background: var(--g); animation: dot-in .6s var(--ease-spring) both; }
@keyframes dot-in { from { transform: scale(0); } }
.streak { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 12px; border-radius: 999px; background: var(--wash); }
.streak .flame { font-size: 1.6rem; line-height: 1; display: inline-block; animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.08); } }
.streak b { display: block; font-size: 1.25rem; line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.streak small { font-size: .82rem; color: var(--ink-2); }
.streak a { color: var(--ink); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 56px 0 18px; }
.section-title h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.045em; text-transform: lowercase; }
.section-title .count { color: var(--ink-2); font-size: .95rem; }
.hero + .section-title { margin-top: 8px; }

/* Home: what's left today (a strip of game chips), folding categories, and today's finished games. */
.todo-strip { display: flex; align-items: center; gap: 12px; margin: -14px 0 24px; min-width: 0; }
.todo-label { font-size: .9rem; color: var(--ink-2); white-space: nowrap; flex: none; }
.todo-label b { color: var(--ink); font-weight: 600; }
/* One row that scrolls sideways (fading out at the edge), however many games are left. */
.todo-chips {
  display: flex; gap: 6px; overflow-x: auto; min-width: 0; padding: 2px 24px 2px 2px; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.todo-chips::-webkit-scrollbar { display: none; }
.todo-chip { flex: none; white-space: nowrap; }
.todo-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--wash); color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 500;
  transition: background-color .2s, transform .3s var(--ease-spring);
}
.todo-chip:hover { background: color-mix(in srgb, var(--game) 18%, var(--wash)); transform: translateY(-1px); }
.todo-chip .game-icon.xs { width: 26px; height: 26px; border-radius: 50%; }
.todo-chip.playing { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--game) 70%, transparent); }

details.cat > summary { list-style: none; cursor: pointer; align-items: center; user-select: none; -webkit-user-select: none; }
details.cat > summary::-webkit-details-marker { display: none; }
details.cat > summary h2 { flex: 1; }
details.cat > summary .count { white-space: nowrap; }
.cat-chevron { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--wash); position: relative; transition: transform .35s var(--ease-spring), background-color .2s; }
.cat-chevron::before { content: ""; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }
details.cat[open] > summary .cat-chevron { transform: rotate(180deg); }
details.cat > summary:hover .cat-chevron { background: var(--hair); }
details.cat:not([open]) > summary { margin-bottom: 0; }
details.cat:not([open]) + details.cat > summary { margin-top: 22px; }
.cat-empty { color: var(--ink-2); margin: 0 0 8px; }

.done-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.done-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--game) 10%, var(--wash)); transition: background-color .2s, transform .3s var(--ease-spring);
}
.done-tile:hover { background: color-mix(in srgb, var(--game) 20%, var(--wash)); transform: translateY(-2px); }
.done-tile .game-icon.xs { width: 36px; height: 36px; flex: none; }
.done-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.done-main b { font-weight: 600; text-transform: lowercase; letter-spacing: -0.02em; }
.done-main small, .done-result small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }
.done-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-result { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.done-result b { font-weight: 600; font-size: .95rem; }
.done-tile.failed .done-result b { color: var(--ink-2); font-weight: 500; }

.game-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

/* The game card: the game's own colour, a slow sheen of light, icon, lowercase name, and the
   tilted, gently moving board preview. --on is the text colour that reads on the colour. */
.game-card {
  --on: #fff; --on-soft: color-mix(in srgb, var(--on) 78%, transparent);
  position: relative; display: flex; flex-direction: column; gap: 0; min-height: 400px; padding: 30px 30px 0;
  border-radius: var(--r-panel); overflow: hidden; isolation: isolate; margin: 0; color: var(--on);
  background:
    radial-gradient(90% 70% at 100% 100%, color-mix(in srgb, var(--game) 62%, black), transparent 70%),
    linear-gradient(150deg, color-mix(in srgb, var(--game) 80%, white) 0%, var(--game) 42%, color-mix(in srgb, var(--game) 84%, black) 100%);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--game) 75%, black), 0 10px 24px -14px rgba(0, 0, 0, .3);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.game-card.ink-dark { --on: #17171a; }
.game-card::before { /* a soft light drifting across the card */
  content: ""; position: absolute; z-index: -1; width: 80%; aspect-ratio: 1; left: -20%; top: -40%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .38), transparent);
  animation: sheen 14s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -1.7s);
}
@keyframes sheen { 0% { translate: 0 0; opacity: .55; } 50% { opacity: .9; } 100% { translate: 70% 45%; opacity: .45; } }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -30px color-mix(in srgb, var(--game) 85%, black), 0 14px 28px -14px rgba(0, 0, 0, .3); }
.game-card .card-top { display: flex; align-items: center; gap: 14px; }
.game-card .card-top .game-icon { background: color-mix(in srgb, var(--on) 20%, transparent); color: var(--on); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.game-card .info h2 { font-size: 2rem; font-weight: 600; margin: 0; letter-spacing: -0.05em; text-transform: lowercase; color: var(--on); }
.game-card .tagline { color: var(--on-soft); font-size: .98rem; margin: 14px 0 0; line-height: 1.4; max-width: 28ch; }
.game-card .status { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .82rem; color: var(--on-soft); margin-top: 10px; min-height: 22px; }
.game-card .status .pill { background: color-mix(in srgb, var(--on) 16%, transparent); color: var(--on); }
.game-card .status .pill-good { background: #fff; color: #0a7a3a; }
.game-card .status .pill-warn { background: #fff; color: #a15c00; }
.game-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; position: relative; z-index: 2; }
.game-card .actions .btn { padding: 11px 20px; }
.game-card .actions .btn-game { background: var(--on); color: color-mix(in srgb, var(--game) 45%, black); }
.game-card.ink-dark .actions .btn-game { color: #fff; }
.game-card .actions .btn:not(.btn-game) { background: color-mix(in srgb, var(--on) 16%, transparent); color: var(--on); }
.game-card .actions .btn:not(.btn-game):hover { background: color-mix(in srgb, var(--on) 26%, transparent); }
.game-card .art-wrap {
  position: relative; margin: auto -30px 0 0; padding: 26px 0 0 30%; pointer-events: none; height: 170px; min-height: 0;
}
.game-card .art-wrap .art {
  width: 100%; max-width: 300px; margin-left: auto; transform: translate(4%, 12%) rotate(-7deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--game) 70%, white), color-mix(in srgb, var(--game) 88%, black));
  transition: transform .7s var(--ease-spring);
  box-shadow: 0 30px 50px -18px color-mix(in srgb, var(--game) 50%, black), inset 0 1px 0 rgba(255, 255, 255, .45);
  animation: art-float 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.9s);
}
@keyframes art-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.game-card:hover .art-wrap .art { transform: translate(0, 8%) rotate(-3deg) scale(1.03); }
.game-card.soon { filter: saturate(.6); }
.game-card.soon .art-wrap .art { opacity: .6; }
.game-card.done { filter: saturate(.75); }
.game-card.done:hover { filter: none; }
/* The boards come alive: cells pop in a wave, drawn lines trace themselves (see home.js). */
.game-card .mini > i { animation: cell-pop 6s var(--ease-out) infinite; animation-delay: calc(var(--n, 0) * 70ms + var(--i, 0) * -.45s); }
@keyframes cell-pop { 0%, 12%, 100% { scale: 1; filter: none; } 5% { scale: 1.16; filter: brightness(1.12); } }
.game-card .art .draw { stroke-dasharray: 1; animation: draw 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.6s); }
@keyframes draw { 0% { stroke-dashoffset: 1; } 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
.game-card .art .bob { animation: bob 3.2s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -.4s); transform-box: fill-box; transform-origin: center; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.game-card:not(.in-view), .game-card:not(.in-view) *, .game-card:not(.in-view)::before { animation-play-state: paused !important; }
.game-card .card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.game-card .card-link:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.solved-badge {
  position: absolute; top: 26px; right: 26px; z-index: 2; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; color: color-mix(in srgb, var(--game) 45%, black); background: #fff;
  animation: badge-in .7s var(--ease-spring) .2s both;
}
.solved-badge svg { width: 16px; height: 16px; }
@keyframes badge-in { from { transform: scale(0) rotate(-90deg); } }
.soon-badge { position: absolute; top: 28px; right: 28px; z-index: 2; padding: 4px 11px; border-radius: 999px; font-weight: 550; font-size: .76rem; color: #000; background: #fff; }

/* Featured: today's next game, wide. */
.game-card.featured { grid-column: 1 / -1; min-height: 380px; padding: 52px 52px 52px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 24px; }
.game-card.featured .game-icon { width: 64px; height: 64px; }
.game-card.featured .info h2 { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.game-card.featured .tagline { font-size: 1.1rem; max-width: 30ch; }
.game-card.featured .art-wrap { margin: -52px -52px -52px 0; padding: 0; height: auto; align-self: stretch; display: grid; place-items: center; }
.game-card.featured .art-wrap .art { max-width: 400px; width: 82%; transform: translate(4%, 0) rotate(-6deg); }
.game-card.featured:hover .art-wrap .art { transform: translate(0, -2%) rotate(-2deg) scale(1.04); }
.game-card.featured .eyebrow { color: var(--on-soft); font-size: .95rem; margin-bottom: 18px; }
@media (max-width: 760px) {
  .game-card.featured { display: flex; padding: 30px 30px 0; min-height: 420px; }
  .game-card.featured .art-wrap { margin: auto -30px 0 0; padding: 26px 0 0 20%; height: 190px; display: block; }
  .game-card.featured .art-wrap .art { transform: translate(4%, 18%) rotate(-7deg); }
}

/* Page-load: cards rise in once, in order. */
.reveal { animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } }

.home-extra { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 56px; }
.home-extra .card { padding: 30px; }
.home-extra h2 { font-size: 1.6rem; letter-spacing: -0.045em; }

/* --- Leaderboards ---------------------------------------------------------------------------- */
.lb-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.lb-card { --on: #fff; border-radius: var(--r-panel); overflow: hidden; background: var(--wash); display: flex; flex-direction: column; }
.lb-card.ink-dark, .lb-hero.ink-dark { --on: #17171a; }
.lb-card-head {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 22px 22px 20px; color: var(--on); text-decoration: none; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, color-mix(in srgb, var(--game) 80%, white), var(--game) 55%, color-mix(in srgb, var(--game) 86%, black));
}
.lb-card-head::before { content: ""; position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; left: -15%; top: -120%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .4), transparent); animation: sheen 12s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -1.3s); }
.lb-card-head .game-icon { width: 46px; height: 46px; background: color-mix(in srgb, var(--on) 20%, transparent); color: var(--on); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.lb-card-head h2 { margin: 0; font-size: 1.45rem; text-transform: lowercase; letter-spacing: -0.045em; }
.lb-card-head small { color: color-mix(in srgb, var(--on) 78%, transparent); font-size: .85rem; }
.lb-card-head .go { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--on) 16%, transparent); transition: transform .4s var(--ease-spring), background-color .2s; }
.lb-card-head:hover .go { transform: translateX(4px); background: color-mix(in srgb, var(--on) 26%, transparent); }
.lb-card-body { padding: 12px 12px 14px; flex: 1; }
.lb-card-body .empty { padding: 26px 8px 14px; }

.lb-hero {
  --on: #fff; position: relative; overflow: hidden; isolation: isolate; color: var(--on); border-radius: var(--r-stage); padding: 30px 34px 0; margin: 10px 0 28px;
  background:
    radial-gradient(80% 90% at 100% 100%, color-mix(in srgb, var(--game) 60%, black), transparent 70%),
    linear-gradient(150deg, color-mix(in srgb, var(--game) 78%, white) 0%, var(--game) 45%, color-mix(in srgb, var(--game) 84%, black) 100%);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--game) 75%, black);
}
.lb-hero::before { content: ""; position: absolute; z-index: -1; width: 55%; aspect-ratio: 1; left: -10%; top: -60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .38), transparent); animation: sheen 16s ease-in-out infinite alternate; }
.lb-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lb-hero-title { display: flex; align-items: center; gap: 16px; color: var(--on); text-decoration: none; min-width: 0; }
.lb-hero-title .game-icon { width: 60px; height: 60px; background: color-mix(in srgb, var(--on) 20%, transparent); color: var(--on); }
.lb-hero h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 3.6rem); text-transform: lowercase; color: var(--on); }
.lb-hero .lb-play { background: var(--on); color: color-mix(in srgb, var(--game) 45%, black); gap: 6px; }
.lb-hero.ink-dark .lb-play { color: #fff; }
.lb-hero .lb-play svg { width: 16px; height: 16px; }
.lb-hero-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; font-size: .92rem; }
.lb-hero-bar .date-nav .icon-btn { background: color-mix(in srgb, var(--on) 16%, transparent); color: var(--on); }
.lb-hero-bar .lb-count { color: color-mix(in srgb, var(--on) 78%, transparent); }
.lb-hero-bar .tabs { margin-left: auto; background: color-mix(in srgb, var(--on) 14%, transparent); }
.lb-hero-bar .tabs a { color: color-mix(in srgb, var(--on) 78%, transparent); }
.lb-hero-bar .tabs .active { background: var(--on); color: color-mix(in srgb, var(--game) 45%, black); }
.lb-hero.ink-dark .lb-hero-bar .tabs .active { color: #fff; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; max-width: 620px; margin: 26px auto 0; }
.podium .step { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; animation: podium-in .9s var(--ease-spring) both; animation-delay: calc(var(--n) * 140ms + 150ms); }
@keyframes podium-in { from { opacity: 0; transform: translateY(40px); } }
.podium .who { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--on); text-decoration: none; min-width: 0; max-width: 100%; }
.podium .who b { font-weight: 600; font-size: .98rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .avatar { width: 56px; height: 56px; font-size: 1.1rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--on) 70%, transparent), 0 10px 20px -8px rgba(0, 0, 0, .4); }
.podium .s1 .avatar { width: 72px; height: 72px; font-size: 1.35rem; box-shadow: 0 0 0 3px #f5b014, 0 12px 24px -8px rgba(0, 0, 0, .45); }
.podium .avatar.ghost { background: color-mix(in srgb, var(--on) 16%, transparent); box-shadow: none; color: var(--on); }
.podium .time { margin: 4px 0 10px; font-weight: 650; font-size: 1.05rem; letter-spacing: -0.02em; }
.podium .me .who b { text-decoration: underline; text-underline-offset: 4px; }
.podium .block { width: 100%; display: grid; place-items: start center; padding-top: 12px; border-radius: 18px 18px 0 0; font-weight: 700; font-size: 1.6rem; color: var(--on);
  background: linear-gradient(180deg, color-mix(in srgb, var(--on) 26%, transparent), color-mix(in srgb, var(--on) 8%, transparent)); }
.podium .s1 .block { height: 120px; } .podium .s2 .block { height: 86px; } .podium .s3 .block { height: 64px; }
.podium .block span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font-size: 1.1rem; }
.podium .s1 .block span { background: linear-gradient(150deg, #ffe48a, #f5b014); color: #3b2a00; }
.podium .s2 .block span { background: linear-gradient(150deg, #f1f3f6, #b4bcc8); color: #2c333d; }
.podium .s3 .block span { background: linear-gradient(150deg, #f6c79c, #cd7f3a); color: #3d1e05; }

.lb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 940px) { .lb-layout { grid-template-columns: minmax(0, 1fr); } }
.lb-panel { border-radius: var(--r-panel); background: var(--wash); padding: 18px 16px; }
.lb-panel h2 { text-transform: lowercase; padding: 6px 8px 0; margin-bottom: 4px; }
.lb-panel > p { padding: 0 8px; }
@media (max-width: 560px) {
  .lb-hero { padding: 22px 18px 0; border-radius: 28px; }
  .lb-hero-bar .tabs { margin-left: 0; }
  .podium .avatar { width: 44px; height: 44px; font-size: .9rem; }
  .podium .s1 .avatar { width: 56px; height: 56px; }
}

.streak-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; line-height: 1.3; font-size: .76rem; font-weight: 650; padding: 2px 8px 2px 6px; border-radius: 999px; background: color-mix(in srgb, #ff7a1a 16%, transparent); color: #d9520b; white-space: nowrap; }
:root[data-theme="dark"] .streak-chip { color: #ff9a4d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .streak-chip { color: #ff9a4d; } }
.podium .streak-chip { margin-top: 4px; background: color-mix(in srgb, var(--on) 18%, transparent); color: var(--on); }
.streak-board { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-panel); padding: 28px; margin-bottom: 8px; color: #fff;
  background: radial-gradient(70% 90% at 100% 100%, #b4290b, transparent 70%), linear-gradient(150deg, #ffb347 0%, #ff7a1a 45%, #e8430f 100%);
  box-shadow: 0 30px 60px -30px #a32a06; }
.streak-board::before { content: ""; position: absolute; z-index: -1; width: 50%; aspect-ratio: 1; left: -10%; top: -70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .4), transparent); animation: sheen 14s ease-in-out infinite alternate; }
.streak-board-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.streak-board-head .flame { font-size: 2.6rem; line-height: 1; display: inline-block; animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.streak-board-head h2 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.045em; }
.streak-board-head p { margin: 4px 0 0; color: rgba(255, 255, 255, .85); font-size: .93rem; }
.streak-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.streak-cols > div { background: var(--page); color: var(--text); border-radius: var(--r-tile); padding: 14px 10px 10px; }
.streak-cols h3 { margin: 2px 8px 8px; font-size: 1rem; color: var(--muted); font-weight: 550; }

/* --- Analytics consent banner --------------------------------------------------------------------- */
.consent {
  position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 16px 18px; border-radius: 22px;
  background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--lift); font-size: .9rem;
  animation: consent-in .6s var(--ease-spring) both;
}
.consent p { flex: 1 1 280px; margin: 0; color: var(--muted); line-height: 1.45; }
.consent p b { color: var(--text); font-weight: 600; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
.consent.leaving { animation: consent-out .3s var(--ease-out) both; }
@keyframes consent-in { from { opacity: 0; transform: translate(-50%, 30px); } }
@keyframes consent-out { to { opacity: 0; transform: translate(-50%, 20px); } }

/* --- Friends ----------------------------------------------------------------------------------- */
.friend-add { display: flex; gap: 8px; width: min(100%, 420px); }
.friend-add.wide { margin: 22px auto 14px; }
.friend-add .suggest { flex: 1; min-width: 0; }
.friend-add input { width: 100%; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--hair); background: var(--page); color: var(--text); font: inherit; }
.friend-add input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.friend-add .btn { height: 44px; }
.friend-requests { border-radius: var(--r-panel); padding: 22px 24px; margin-bottom: 24px; color: #fff;
  background: radial-gradient(70% 90% at 100% 100%, #3c1fb0, transparent 70%), linear-gradient(150deg, #a48bff, #7b5cff 50%, #5a3ee0); box-shadow: 0 30px 60px -30px #3c1fb0; }
.friend-requests h2 { margin-bottom: 12px; text-transform: lowercase; }
.request-list { display: grid; gap: 8px; }
.request { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .14); animation: lb-in .5s var(--ease-out) both; }
.request .name { flex: 1; min-width: 0; }
.request .name a { color: #fff; font-weight: 600; text-decoration: none; }
.request .name small { display: block; color: rgba(255, 255, 255, .78); }
.request .request-yes { background: #fff; color: #3c1fb0; }
.request .request-no { background: rgba(255, 255, 255, .16); color: #fff; }

.friends-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 940px) { .friends-layout { grid-template-columns: minmax(0, 1fr); } }
.duel-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.duel {
  --on: #fff; position: relative; display: block; border-radius: var(--r-tile); overflow: hidden; color: var(--on); text-decoration: none; padding: 16px 14px 12px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--game) 80%, white), var(--game) 50%, color-mix(in srgb, var(--game) 84%, black));
  box-shadow: 0 20px 40px -26px color-mix(in srgb, var(--game) 80%, black); transition: transform .5s var(--ease-spring);
}
.duel.ink-dark { --on: #17171a; }
.duel:hover { transform: translateY(-3px) rotate(-.4deg); }
.duel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.duel-head .game-icon { width: 32px; height: 32px; background: color-mix(in srgb, var(--on) 20%, transparent); color: var(--on); box-shadow: none; }
.duel-head b { flex: 1; min-width: 0; font-weight: 600; text-transform: lowercase; letter-spacing: -0.03em; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-head small { color: color-mix(in srgb, var(--on) 75%, transparent); font-size: .78rem; }
.duel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.duel li { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border-radius: 12px; background: color-mix(in srgb, var(--on) 10%, transparent); font-size: .9rem; }
.duel li.me { background: var(--on); color: color-mix(in srgb, var(--game) 45%, black); font-weight: 600; }
.duel.ink-dark li.me { color: #fff; }
.duel li.todo { background: none; border: 1.5px dashed color-mix(in srgb, var(--on) 40%, transparent); color: color-mix(in srgb, var(--on) 85%, transparent); }
.duel .rank { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: .72rem; font-weight: 700; }
.duel .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel .time { font-weight: 650; white-space: nowrap; }

.friend-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.friend { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 16px; animation: lb-in .5s var(--ease-out) both; animation-delay: calc(min(var(--n, 0), 12) * 35ms); transition: background-color .2s; }
.friend:hover { background: var(--surface-2); }
.friend .avatar { width: 42px; height: 42px; font-size: .85rem; }
.friend .name { flex: 1; min-width: 0; }
.friend .name a { font-weight: 600; color: var(--text); text-decoration: none; }
.friend .name a:hover { text-decoration: underline; }
.friend .name .streak-chip { margin-left: 6px; vertical-align: 1px; }
.friend .name small { display: block; color: var(--muted); font-size: .82rem; }
.friend .name small b.good { color: var(--good); } .friend .name small b.bad { color: var(--danger); }
.today-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.today-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--g); animation: dot-in .6s var(--ease-spring) both; }
.friend-menu { position: relative; }
.friend:has(.friend-menu[open]) { position: relative; z-index: 5; animation: none; }
.friend-menu summary { list-style: none; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 1.2rem; }
.friend-menu summary::-webkit-details-marker { display: none; }
.friend-menu summary:hover, .friend-menu[open] summary { background: var(--surface-2); color: var(--text); }
.friend-menu .dropdown { right: 0; left: auto; min-width: 180px; }

.friends-empty { max-width: 560px; margin: 10px auto 40px; text-align: center; padding: 40px 28px; border-radius: var(--r-panel); background: var(--wash); }
.friends-empty-art { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; }
.friends-empty-art .avatar { width: 72px; height: 72px; font-size: 1.3rem; animation: bob 3s ease-in-out infinite; }
.friends-empty-art .avatar:last-child { animation-delay: -1.5s; }
.friends-empty-art .vs { font-weight: 700; color: var(--muted); }
.friends-empty h2 { font-size: 1.8rem; letter-spacing: -0.045em; }
.friends-empty p { color: var(--muted); }
.friends-empty .friend-add { margin-inline: auto; }

/* --- Game "art": small previews of each board ------------------------------------------ */
.art {
  position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--game) 92%, white), color-mix(in srgb, var(--game) 80%, black));
}
.art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 38%); }
.art .mini { display: grid; gap: 3px; width: 44%; aspect-ratio: 1; transform: rotate(-6deg); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .25)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.art .mini > i { border-radius: 4px; display: grid; place-items: center; font-style: normal; }
.art svg.mini-svg { width: 50%; overflow: visible; transform: rotate(-6deg); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .25)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.art-queens .mini { grid-template-columns: repeat(5, 1fr); }
.art-queens .mini i { background: var(--q); }
.art-queens .mini i.k::after { content: ""; width: 64%; height: 64%; background: #1c1847;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7.5l4.5 3.5L12 4l4.5 7L21 7.5 19 18H5L3 7.5zM5 19.5h14V21H5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7.5l4.5 3.5L12 4l4.5 7L21 7.5 19 18H5L3 7.5zM5 19.5h14V21H5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.art-tango .mini { grid-template-columns: repeat(4, 1fr); width: 42%; }
.art-tango .mini i { background: rgba(255, 255, 255, .94); font-size: clamp(.7rem, 2vw, 1rem); }
.art-sudoku .mini { grid-template-columns: repeat(3, 1fr); aspect-ratio: 3 / 2; width: 48%; gap: 4px; }
.art-sudoku .mini i { background: rgba(255, 255, 255, .94); font-weight: 700; color: #0d6e63; font-size: clamp(.8rem, 2.4vw, 1.15rem); }
.art-sudoku .mini i.e { background: rgba(255, 255, 255, .45); }
.art-crossword .mini { grid-template-columns: repeat(5, 1fr); width: 42%; gap: 2px; }
.art-crossword .mini i { background: rgba(255, 255, 255, .95); font-weight: 700; font-size: clamp(.5rem, 1.6vw, .78rem); color: #8a1d3d; }
.art-crossword .mini i.b { background: rgba(60, 10, 30, .55); }

/* New games' previews */
.art .mini.nono { grid-template-columns: repeat(6, 1fr); width: 46%; gap: 2px; }
.art .mini.nono i { background: rgba(255, 255, 255, .9); }
.art .mini.nono i.f { background: #5b0f63; }
.art .mini.nono i.cl { background: transparent; color: #fff; font-weight: 700; font-size: clamp(.45rem, 1.3vw, .62rem); white-space: nowrap; }
.art .mini.ak { grid-template-columns: repeat(4, 1fr); width: 42%; gap: 3px; }
.art .mini.ak i { background: rgba(255, 255, 255, .9); font-size: clamp(.6rem, 1.8vw, .9rem); }
.art .mini.ak i.l, .art .mini.ak i.b { background: #fff3b0; }
.art .mini.ak i.w { background: #1f3b10; color: #fff; font-weight: 700; font-size: clamp(.6rem, 1.8vw, .85rem); }
.art .mini.calc { grid-template-columns: repeat(3, 1fr); width: 40%; gap: 3px; }
.art .mini.calc i { position: relative; background: rgba(255, 255, 255, .94); font-weight: 700; color: #8a2c06; font-size: clamp(.8rem, 2.4vw, 1.1rem); }
.art .mini.calc small { position: absolute; top: 2px; left: 4px; font-size: .5em; color: #1c1847; }
.art .mini.mn { grid-template-columns: repeat(4, 1fr); width: 42%; gap: 3px; }
.art .mini.mn i { background: rgba(255, 255, 255, .9); font-weight: 700; color: #2563eb; font-size: clamp(.6rem, 1.8vw, .9rem); }
.art .mini.mn i.h { background: linear-gradient(160deg, #cbd5e1, #94a3b8); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.art .mini.wd { grid-template-columns: repeat(5, 1fr); width: 52%; aspect-ratio: 5 / 2; gap: 3px; }
.art .mini.wd i { color: #fff; font-weight: 800; font-size: clamp(.6rem, 1.8vw, .9rem); background: #94a3b8; }
.art .mini.wd i.m1 { background: #e3b008; }
.art .mini.wd i.m2 { background: #0f7a35; }
.art .mini.cg { grid-template-columns: repeat(8, 1fr); width: 56%; aspect-ratio: 8 / 1.6; gap: 3px; }
.art .mini.cg i { display: flex; flex-direction: column; justify-content: flex-end; background: rgba(255, 255, 255, .94); font-weight: 800; color: #9d174d; font-size: clamp(.55rem, 1.6vw, .85rem); padding-bottom: 2px; }
.art .mini.cg i.sp { background: transparent; }
.art .mini.cg small { font-size: .6em; color: #64748b; border-top: 1.5px solid #f9a8d4; width: 70%; text-align: center; }
.art .mini.cn { grid-template-columns: repeat(4, 1fr); width: 64%; aspect-ratio: 4 / 2.4; gap: 3px; }
.art .mini.cn b { grid-column: 1 / -1; display: grid; place-items: center; border-radius: 4px; background: #c4b5fd; color: #1c1847; font-size: clamp(.5rem, 1.5vw, .75rem); }
.art .mini.cn i { background: rgba(255, 255, 255, .94); color: #312e81; font-weight: 800; font-size: clamp(.4rem, 1.2vw, .6rem); }
.art .mini.pp { grid-template-columns: 1fr auto 1fr; align-items: center; width: 66%; aspect-ratio: 3 / 1.5; gap: 4px; }
.art .mini.pp i { height: 100%; flex-direction: column; gap: 2px; background: rgba(255, 255, 255, .94); border: 2px solid transparent; border-radius: 8px; display: flex; justify-content: center; align-items: center; }
.art .mini.pp i.w { border-color: #10b981; background: #ecfdf5; }
.art .mini.pp b { font-weight: 800; color: #0e4f60; font-size: clamp(.5rem, 1.6vw, .8rem); }
.art .mini.pp small { font-weight: 700; color: #64748b; font-size: clamp(.4rem, 1.2vw, .6rem); }
.art .mini.pp i.w small { color: #047857; }
.art .mini.pp span { color: #fff; font-weight: 800; font-size: clamp(.4rem, 1.2vw, .6rem); }

/* --- Play page: the stage ------------------------------------------------------------------ */
.play-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 26px; }
.play-head h1 { margin: 0; font-size: clamp(1.8rem, 4.4vw, 2.6rem); text-transform: lowercase; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.play-layout.centered { max-width: 1040px; margin: 0 auto; }
@media (max-width: 940px) { .play-layout { grid-template-columns: 1fr; gap: 36px; } }

.stage, .play-main {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0;
  padding: 26px 26px 30px; border-radius: var(--r-stage);
  background: var(--stage-bg); border: 1px solid var(--stage-edge); box-shadow: var(--lift);
  color: var(--text); isolation: isolate;
  animation: stage-in .9s var(--ease-out) both;
}
.stage::before { /* soft light of the game colour behind the board */
  content: ""; position: absolute; z-index: -1; inset: auto 8% -8% 8%; height: 46%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--game) 30%, transparent), transparent);
  opacity: .5; transition: opacity 1s var(--ease-out);
}
.stage.is-solved::before { opacity: 1; animation: glow 2.4s var(--ease-out); }
@keyframes glow { 0% { opacity: .5; transform: scale(.9); } 30% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes stage-in { from { opacity: 0; transform: translateY(30px) scale(.98); } }
@media (max-width: 560px) {
  .stage, .play-main { padding: 18px 12px 22px; border-radius: 28px; margin-inline: -4px; }
}

.stage-head, .play-bar { width: 100%; max-width: 600px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-title { display: flex; align-items: center; gap: 11px; min-width: 0; color: #fff; text-decoration: none; }
.stage-title .game-icon { width: 36px; height: 36px; border-radius: 30%; }
.stage-title h1 { margin: 0; line-height: 1.2; }
.stage-title b, .stage-title h1 { font-weight: 550; font-size: 1.2rem; letter-spacing: -0.04em; text-transform: lowercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-sub { width: 100%; max-width: 600px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: -6px; font-size: .88rem; color: var(--muted); }
.stage-modes { display: flex; gap: 16px; }
.stage-modes a { position: relative; color: var(--muted); text-decoration: none; padding: 2px 0; transition: color .2s; }
.stage-modes a:hover, .stage-modes a.active { color: #fff; }
.stage-modes a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; border-radius: 2px; background: #fff; }
.date-nav { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.date-nav .icon-btn { width: 28px; height: 28px; font-size: 1rem; }

.timer {
  font-size: 1.55rem; font-weight: 550; letter-spacing: -0.04em; line-height: 1;
  color: #fff; min-width: 90px; text-align: right; white-space: nowrap; transition: color .4s;
}
.page .timer, .play-bar .timer { color: var(--text); }
.timer.done { color: var(--good); animation: timer-pop .7s var(--ease-spring); }
@keyframes timer-pop { 40% { transform: scale(1.18); } }
.timer .dg { display: inline-block; width: .6em; text-align: center; }
.timer .penalty { font-size: .72rem; font-weight: 600; color: var(--warn); margin-left: 6px; letter-spacing: 0; vertical-align: middle; }
.timer .penalty.bump { animation: bump .6s var(--ease-spring); display: inline-block; }
@keyframes bump { 30% { transform: scale(1.5); } }

.game-root { position: relative; width: 100%; container-type: inline-size; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.game-root > .game-root { animation: board-in .7s var(--ease-out) both; }
@keyframes board-in { from { opacity: 0; transform: scale(.96); filter: blur(6px); } }

/* Toolbar: translucent pills with a line icon. */
.toolbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.toolbar .btn { padding: 10px 17px 10px 14px; font-size: .9rem; background: rgba(255, 255, 255, .1); color: #fff; }
.toolbar .btn:hover { background: rgba(255, 255, 255, .17); }
.toolbar .btn svg { width: 17px; height: 17px; }

/* Start screen: dialed-style title card inside the stage. */
.start-screen {
  position: relative; width: 100%; max-width: 600px; min-height: min(560px, 120cqw); display: flex; flex-direction: column;
  padding: 18px 8px 4px; text-align: left; isolation: isolate;
}
.start-screen .start-title {
  margin: 0; font-size: clamp(3.2rem, 15cqw, 6rem); font-weight: 600; line-height: .9; letter-spacing: -0.065em; text-transform: lowercase; color: #fff;
  animation: title-in 1s var(--ease-out) both;
}
.start-screen .start-lede { margin: 26px 0 0; font-size: clamp(1.15rem, 3.6cqw, 1.45rem); line-height: 1.28; letter-spacing: -0.025em; color: #c7c7cc; max-width: 22em; font-weight: 450; animation: title-in 1s var(--ease-out) .08s both; }
.start-screen .start-note { margin: 16px 0 0; font-size: 1rem; line-height: 1.45; color: var(--muted); max-width: 30em; animation: title-in 1s var(--ease-out) .14s both; }
.start-screen .start-art { position: absolute; right: -10px; top: 0; width: min(170px, 30cqw); pointer-events: none; z-index: -1; opacity: .95; }
.start-screen .start-art .art { transform: rotate(8deg); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .9); animation: float 6s ease-in-out infinite; }
.start-screen .start-title { padding-right: min(170px, 30cqw); }
.start-screen .start-lede { padding-right: min(120px, 20cqw); }
@keyframes float { 50% { transform: rotate(5deg) translateY(-8px); } }
@keyframes title-in { from { opacity: 0; transform: translateY(18px); } }
/* First time with a game: rules, then a practice round. */
.intro-screen { min-height: 0; }
.intro-screen .intro-eyebrow { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #000; background: var(--game); width: fit-content; animation: title-in .8s var(--ease-out) both; }
.intro-screen .start-title { font-size: clamp(2.6rem, 12cqw, 4.6rem); }
.intro-rules { list-style: none; counter-reset: r; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; max-width: 34em; }
.intro-rules li { position: relative; padding: 12px 14px 12px 48px; border-radius: 16px; background: rgba(255, 255, 255, .06); color: #e5e5ea; line-height: 1.42; font-size: .98rem;
  animation: title-in .8s var(--ease-out) both; animation-delay: calc(.16s + var(--i) * 90ms); }
.intro-rules li::before { counter-increment: r; content: counter(r); position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: #000; background: var(--game); }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; animation: title-in .8s var(--ease-out) .4s both; }
.intro-actions .btn { padding: 13px 22px; gap: 8px; }
.intro-actions .btn svg { width: 16px; height: 16px; }
.intro-actions .intro-skip { background: rgba(255, 255, 255, .1); color: #fff; }
.intro-actions .intro-skip:hover { background: rgba(255, 255, 255, .18); }
.practice-banner { width: 100%; max-width: 600px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--game) 22%, transparent); color: #fff; font-size: .9rem; animation: title-in .6s var(--ease-out) both; }
.practice-banner b { font-weight: 650; }
.practice-banner .btn { background: rgba(255, 255, 255, .14); color: #fff; flex: none; }
.practice-done .actions .btn svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .start-screen .start-title, .start-screen .start-lede { padding-right: 0; }
  .start-screen .start-art { width: 110px; top: -6px; opacity: .55; }
}

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 80px 20px; font-weight: 500; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--game); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint-panel {
  width: 100%; max-width: 600px; padding: 16px 20px; border-radius: var(--r-tile);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  animation: drop .45s var(--ease-out);
}
.hint-panel.warn { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.hint-panel .hint-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.hint-panel .hint-head b { font-weight: 600; }
.hint-panel p { margin: 6px 0 12px; color: #d1d1d6; }
.hint-panel p:last-child { margin-bottom: 0; }

/* Result: big number, quiet facts, white pill. */
.result-card {
  position: relative; width: 100%; max-width: 600px; text-align: center; padding: 18px 8px 8px;
  background: none; animation: result-in .8s var(--ease-out) both;
}
.result-card .result-head { color: var(--muted); font-size: 1rem; }
.result-card .result-time {
  font-size: clamp(3.4rem, 15cqw, 5.6rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1;
  margin: 10px 0 18px; color: #fff; animation: pop .9s var(--ease-spring) both;
}
.result-card .result-time.word { font-size: clamp(2.2rem, 9cqw, 3.2rem); letter-spacing: -0.04em; }
@keyframes pop { from { transform: scale(.5); opacity: 0; filter: blur(8px); } }
@keyframes result-in { from { opacity: 0; transform: translateY(14px); } }
.result-card .facts:empty { display: none; }
.result-card .facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 22px; }
.result-card .facts .pill { animation: lb-in .6s var(--ease-out) both; }
.result-card .facts .pill:nth-child(2) { animation-delay: .08s; } .result-card .facts .pill:nth-child(3) { animation-delay: .16s; } .result-card .facts .pill:nth-child(4) { animation-delay: .24s; }
.result-card .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.result-card .actions .btn:not(.btn-game):not(.btn-primary) { background: rgba(255, 255, 255, .1); color: #fff; }
.result-card .next-line { margin: 18px 0 0; font-size: .86rem; color: var(--muted); }
.result-card .new-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; font-size: .86rem; color: var(--muted); }
.result-card .new-pick .tabs { background: rgba(255, 255, 255, .1); }
.result-card .new-pick .tabs a { color: rgba(255, 255, 255, .75); }
.result-card .new-pick .tabs .active { color: #000; }

/* Aside next to the stage: plain typography, no boxes. */
.play-aside > * + * { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--hair); }
.play-aside h2 { font-size: 1.15rem; margin-bottom: 12px; }
.play-aside .aside-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.play-aside .aside-head h2 { margin: 0; }
.play-aside .tabs { font-size: .8rem; }
.play-aside .tabs button { padding: 5px 12px; font-size: .8rem; }
.play-aside .card { padding: 0; background: none; border-radius: 0; }
.play-aside form .btn-game { margin-top: 4px; }
.play-aside .link { color: var(--ink); font-size: .9rem; }

/* Confetti (play.js / room.js add it on solve): soft paper squares and rounds. */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 12px; border-radius: 2px; animation: fall var(--d, 1.6s) cubic-bezier(.2, .6, .35, 1) forwards; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x, 0), 105vh) rotate(var(--r, 720deg)); opacity: .9; }
}
/* Burst: rings that expand from a point (solve moment on the stage). */
.burst { position: absolute; z-index: 6; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--game); animation: burst .9s var(--ease-out) forwards; }
@keyframes burst { to { transform: scale(40); opacity: 0; border-width: .2px; } }

/* --- Game hub (views/partials/game-hub.php): a daily's page before playing --------------------
   Hero, today's card (on a stage), four tiles, opening panels, recent days. The board's
   .play-layout stays hidden until the game starts full screen. */
body:not(.focus) .game-hub ~ .play-layout { display: none; }
.focus .game-hub { display: none; }
.game-hub { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.hub-hero { position: relative; padding: 6px 0 4px; min-height: 120px; }
.hub-title { display: flex; align-items: center; gap: 14px; }
.hub-title .game-icon { width: 54px; height: 54px; border-radius: 30%; flex: none; }
.hub-title h1 { margin: 0; font-size: clamp(2.4rem, 9vw, 3.6rem); text-transform: lowercase; letter-spacing: -0.055em; }
.hub-lede { margin: 12px 0 0; max-width: 24em; padding-right: 120px; color: var(--ink-2); font-size: 1.08rem; line-height: 1.4; }
.hub-art { position: absolute; right: 0; top: -6px; width: 128px; pointer-events: none; }
.hub-art .art { transform: rotate(8deg); animation: float 6s ease-in-out infinite; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .55); }

.hub-today { align-items: stretch; gap: 0; padding: 20px 22px 18px; }
.hub-today-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .9rem; }
.hub-kicker { margin: 18px 0 0; color: var(--muted); font-size: .95rem; font-weight: 550; }
.hub-big { margin: 4px 0 0; color: #fff; font-size: clamp(2.8rem, 12vw, 4.2rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1; }
.hub-big.word { font-size: clamp(1.9rem, 8vw, 2.6rem); letter-spacing: -0.045em; }
.hub-note { margin: 10px 0 0; color: var(--muted); font-size: .95rem; max-width: 30em; }
.hub-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.hub-facts:empty { display: none; }
.hub-actions { display: flex; align-items: center; gap: 14px; margin: 20px 0 4px; }
.hub-actions .btn { gap: 8px; padding: 13px 20px; }
.hub-actions .btn svg { width: 16px; height: 16px; }
.hub-start-label { color: #fff; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em; }
.hub-foot { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); color: var(--muted); font-size: .86rem; }
.hub-foot b { color: #fff; font-weight: 600; }

.hub-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hub-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 14px 13px; border: 0; border-radius: 22px;
  background: var(--wash); color: var(--ink); text-decoration: none; font: inherit; text-align: left; cursor: pointer;
  transition: transform .35s var(--ease-spring), background-color .2s;
}
.hub-tile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--game) 12%, var(--wash)); }
.hub-tile:active { transform: scale(.97); }
.hub-tile svg { width: 34px; height: 34px; padding: 7px; margin-bottom: 8px; border-radius: 50%; background: var(--game); color: #fff; }
.hub-tile b { font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; }
.hub-tile small { color: var(--ink-2); font-size: .8rem; }
.hub-tile[aria-expanded="true"] { background: color-mix(in srgb, var(--game) 18%, var(--wash)); box-shadow: inset 0 0 0 1.5px var(--game); }
.hub-panel { padding: 18px 18px 16px; border-radius: 22px; background: var(--wash); animation: drop .35s var(--ease-out); }
.hub-panel .rules { color: var(--ink); }
.hub-sub { margin: 18px 0 8px; font-size: .95rem; }
.hub-more { margin: 12px 0 0; }

.hub-days h2 { font-size: 1.05rem; margin: 6px 0 10px; text-transform: lowercase; }
.hub-day-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.hub-day {
  flex: 1 1 0; min-width: 40px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px 6px; border-radius: 16px;
  background: var(--wash); color: var(--ink); text-decoration: none; transition: background-color .2s;
}
.hub-day small { color: var(--ink-2); font-size: .72rem; }
.hub-day b { font-size: 1.15rem; font-weight: 600; }
.hub-day i { font-style: normal; height: 1.1em; font-size: .78rem; color: var(--good, #1f9d55); font-weight: 700; }
.hub-day.solved { background: color-mix(in srgb, #22c55e 14%, var(--wash)); }
.hub-day.current { box-shadow: inset 0 0 0 1.5px var(--game); }
.hub-day:hover { background: color-mix(in srgb, var(--game) 12%, var(--wash)); }
.game-hub ~ .game-about { margin-top: 48px; }
/* Hub pages: "back to the game page" in the full-screen menu */
.focus-slot .focus-back { width: 100%; justify-content: center; background: rgba(255, 255, 255, .1); color: #fff; }
@media (max-width: 560px) {
  .game-hub { gap: 14px; }
  .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hub-art { width: 96px; top: 0; }
  .hub-lede { padding-right: 90px; font-size: 1rem; }
  .hub-today { padding: 18px 18px 16px; }
}

/* --- Focus mode (core/focus.js): a running game fills the screen ---------------------------
   No header, footer or page scroll; the stage is the whole (visual) viewport. Everything else on
   the page lives in the slide-in menu (.focus-sheet, views/layout.php). fitHeight() narrows the
   board so the column — result, board, toolbar, hint — always fits without scrolling. */
/* A game is tapped, not read: no text selection, magnifier, callout or double-tap zoom on the
   stage (core/focus.js backs this up for iOS). Text fields keep selecting. */
.play-main, .play-main * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.play-main input, .play-main textarea, .play-main [contenteditable] { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
.play-main { touch-action: manipulation; }
.result-host, .hint-host { width: 100%; display: flex; justify-content: center; }
.result-host:empty, .hint-host:empty { display: none; }
.focus-menu-btn, .focus-sheet, .focus-backdrop { display: none; }

html:has(body.focus) { overflow: hidden; overscroll-behavior: none; }
body.focus { overflow: hidden; overscroll-behavior: none; }
.focus .site-header, .focus .site-footer, .focus .bg-fx, .focus main > .alert { display: none; }
.focus .stage.play-main {
  position: fixed; z-index: 40; left: 0; right: 0; top: var(--app-top, 0px); height: var(--app-h, 100dvh);
  margin: 0; border: 0; border-radius: 0; box-shadow: none; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.focus .stage-head { flex: none; gap: 10px; }
.focus .stage-title { flex: 1; }
.focus .stage-title .game-icon { width: 30px; height: 30px; }
.focus .stage-head .timer { font-size: 1.35rem; min-width: 0; }
.focus .stage > .game-root { flex: 1 1 0; min-height: 0; gap: 12px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.focus .stage > .game-root::-webkit-scrollbar { display: none; }
/* Centre the column, but never push its top out of reach when it overflows. */
.focus .stage > .game-root { justify-content: flex-start; justify-content: safe center; }
.focus .stage > .game-root > .game-root { flex: none; max-width: 100%; }
.focus .practice-banner { padding: 6px 6px 6px 14px; font-size: .84rem; }
.focus .result-card { padding: 2px 4px 0; }
.focus .result-card .result-head { font-size: .92rem; }
.focus .result-card .result-time { font-size: clamp(2.4rem, 11cqw, 4rem); margin: 4px 0 10px; }
.focus .result-card .result-time.word { font-size: clamp(1.8rem, 8cqw, 2.6rem); }
.focus .result-card .facts { margin-bottom: 12px; }
.focus .result-card .next-line { margin-top: 10px; }
.focus .result-card .new-pick { margin-top: 12px; }
.focus .hint-panel { padding: 12px 16px; }
.focus .hint-panel p { margin: 4px 0 8px; font-size: .94rem; line-height: 1.4; }
/* A game with a growing list ([data-fill]: found words, guesses, clues): the board host takes all
   the height left and the list fills what the rest leaves, scrolling inside. */
.focus .stage > .game-root > .game-root:has([data-fill]) { flex: 1 1 0; min-height: 0; overflow: hidden; justify-content: flex-start; }
.focus .stage > .game-root > .game-root:has([data-fill]) > * { flex: 1 1 0; min-height: 0; }
.focus .stage > .game-root > .game-root:has([data-fill]) > * > :not([data-fill]) { flex-shrink: 0; } /* only the list gives */
.focus [data-fill] {
  flex: 1 1 0; min-height: 72px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
/* The game is over and its result shows: everything at natural size, the column scrolls. */
.focus .stage > .game-root.fit-free > .game-root:has([data-fill]),
.focus .stage > .game-root.fit-free > .game-root:has([data-fill]) > * { flex: none; overflow: visible; }
.focus .fit-free [data-fill] { flex: none; min-height: 0; overflow: visible; }
.focus .fit-free .okb.okb-off { display: none; } /* a finished game's keyboard; a crossword played on keeps its own */
/* Narrow phones: the toolbar stays on one line. */
@media (max-width: 400px) {
  .focus .toolbar { gap: 6px; flex-wrap: nowrap; }
  .focus .toolbar .btn { padding: 8px 12px 8px 10px; font-size: .84rem; gap: 5px; }
  .focus .toolbar .btn svg { width: 15px; height: 15px; }
}
@media (min-width: 700px) {
  .focus .stage.play-main { padding: 18px 28px 24px; gap: 14px; }
  .focus .stage-head { max-width: 760px; }
}
@media (max-height: 640px) {
  .focus .stage.play-main { gap: 6px; }
  .focus .stage > .game-root { gap: 8px; }
  .focus .toolbar .btn { padding: 8px 14px 8px 12px; }
}

/* A phone held sideways where the game can't fit: suggest turning it (the column scrolls meanwhile). */
@media (orientation: landscape) and (max-height: 520px) {
  .focus .stage:has(> .fit-overflow)::after {
    content: "Álló helyzetben kényelmesebb — fordítsd el a telefont!"; position: absolute; z-index: 8; left: 50%; bottom: max(12px, env(safe-area-inset-bottom));
    translate: -50% 0; padding: 9px 16px; border-radius: 999px; background: #fff; color: #000; font-size: .85rem; font-weight: 550; white-space: nowrap;
    pointer-events: none; animation: rotate-tip 5s var(--ease-out) .6s both;
  }
}
@keyframes rotate-tip { 0% { opacity: 0; transform: translateY(10px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Hamburger in the stage head */
.focus .focus-menu-btn {
  flex: none; display: grid; place-content: center; gap: 5px; width: 40px; height: 40px; margin-left: -4px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  transition: background-color .2s, transform .3s var(--ease-spring);
}
.focus-menu-btn span { display: block; width: 16px; height: 1.6px; border-radius: 2px; background: currentColor; }
.focus-menu-btn:hover { background: rgba(255, 255, 255, .18); }
.focus-menu-btn:active { transform: scale(.9); }

/* The menu: slides in from the left over the stage. Always dark, like the stage. */
.focus .focus-backdrop {
  display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-out);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.focus.sheet-open .focus-backdrop { opacity: 1; pointer-events: auto; }
.focus .focus-sheet {
  display: block; position: fixed; z-index: 71; left: 0; top: 0; bottom: 0; width: min(440px, 90vw);
  overflow-y: auto; overscroll-behavior: contain; background: #111113; border-right: 1px solid var(--hair);
  padding: max(12px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  transform: translateX(-102%); visibility: hidden;
  transition: transform .45s var(--ease-out), visibility 0s .45s;
}
.focus.sheet-open .focus-sheet { transform: none; visibility: visible; transition: transform .45s var(--ease-out); box-shadow: 30px 0 80px -20px rgba(0, 0, 0, .8); }
.focus-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.focus-sheet .logo { color: #fff; }
.focus-sheet .chrome-btn { color: #fff; }
.focus-sheet .focus-close { font-size: 1rem; }
.focus-nav { display: flex; flex-direction: column; margin: 10px 0 0; }
.focus-nav a { padding: 7px 2px; font-size: 1.3rem; font-weight: 550; letter-spacing: -0.04em; color: #fff; text-decoration: none; border-bottom: 1px solid var(--hair); }
.focus-nav a:hover { color: color-mix(in srgb, var(--game) 55%, white); }
.focus-slot > * { margin: 0; }
.focus-slot > * + * { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--hair); }
.focus-slot > :first-child { margin-top: 22px; }
.focus-slot .stage-sub { max-width: none; font-size: .95rem; color: var(--muted); }
.focus-slot .play-aside { display: flex; flex-direction: column; gap: 26px; }
.focus-slot .play-aside > * { margin: 0; padding: 0; border: 0; }
.focus-slot .aside-rules { order: -1; } /* in the menu the rules come first: that's the help… */
.focus-slot .aside-new { order: -2; } /* …except free play's settings, which are what that menu is opened for */
.focus-slot .game-about { display: block; max-width: none; }
.focus-slot .game-about > * + * { margin-top: 26px; }
.focus-slot .stack { display: grid; gap: 12px; }

.share-box { display: flex; gap: 6px; }
.share-box input { font-size: .85rem; padding: 10px 13px; }
/* What the game is, Q&A and links to the other games — below the board, mostly for search engines */
.game-about { max-width: 1040px; margin: 72px auto 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px 56px; }
.game-about h2 { text-transform: lowercase; }
.game-about p { margin: 0 0 1em; color: color-mix(in srgb, var(--text) 82%, var(--muted)); line-height: 1.6; }
.game-about details { border-top: 1px solid var(--line); padding: 14px 0; }
.game-about details:last-child { border-bottom: 1px solid var(--line); }
.game-about summary { cursor: pointer; font-weight: 550; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.game-about summary::-webkit-details-marker { display: none; }
.game-about summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform .2s; }
.game-about details[open] summary::after { transform: rotate(45deg); }
.game-about details p { margin: 10px 0 0; font-size: .95rem; }
.game-about-more { grid-column: 1 / -1; }
.game-about-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.game-about-more a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .92rem; transition: background .2s; }
.game-about-more a:hover { background: color-mix(in srgb, var(--game) 18%, var(--surface-2)); }
.game-about-more .game-icon { width: 26px; height: 26px; border-radius: 30%; box-shadow: none; }
@media (max-width: 940px) { .game-about { grid-template-columns: 1fr; margin-top: 48px; } }

.rules { margin: 0; padding-left: 0; list-style: none; color: var(--muted); font-size: .93rem; display: flex; flex-direction: column; gap: 10px; }
.rules li { position: relative; padding-left: 20px; }
.rules li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--game); }
ol.rules { counter-reset: r; }
ol.rules li { padding-left: 30px; }
ol.rules li::before { counter-increment: r; content: counter(r); width: 21px; height: 21px; left: 0; top: .05em; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.code-chip { font-weight: 550; font-size: .82rem; background: var(--surface-2); border-radius: 8px; padding: 2px 8px; color: var(--text); }

/* Shared board look: games put .board-frame around their grid. */
.board-frame { position: relative; width: min(600px, 100cqw); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.board-overlay {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, .86); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: drop .4s var(--ease-out);
}
.board-overlay .big { font-size: 4.4rem; font-weight: 600; line-height: 1; letter-spacing: -0.05em; animation: pop .6s var(--ease-spring); }
.solved-shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  background-size: 250% 100%; background-repeat: no-repeat;
  animation: shine 1.3s var(--ease-out) 1 forwards, shine-out .3s 1.1s forwards;
}
@keyframes shine-out { to { opacity: 0; } }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }
/* Generic per-cell feedback any game can use. */
.fx-pop { animation: fx-pop .35s var(--ease-spring); }
@keyframes fx-pop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
.fx-shake { animation: fx-shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes fx-shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-6px); } }
.fx-wave { animation: fx-wave .7s var(--ease-spring) both; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes fx-wave { 40% { transform: scale(1.12) translateY(-3px); filter: brightness(1.25); } }

/* --- Auth / forms -------------------------------------------------------------------------- */
.auth-wrap { max-width: 420px; margin: 24px auto; }
.auth-wrap .card { padding: 34px 32px; border-radius: var(--r-stage); background: var(--wash); animation: rise .8s var(--ease-out) both; }
.auth-wrap h1 { font-size: 2.6rem; text-transform: lowercase; margin-bottom: 22px; }
.btn-google { display: flex; justify-content: center; gap: 10px; padding: 13px 18px; background: var(--page); color: var(--text); border: 1px solid var(--hair); font-weight: 550; }
.btn-google:hover { background: var(--surface-2); }
.captcha-field { min-height: 65px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.auth-alt { text-align: center; margin-top: 18px; font-size: .93rem; color: var(--muted); }

/* --- Profile ------------------------------------------------------------------------------- */
.profile-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 12px 0 30px; }
.profile-head h1 { margin: 0 0 4px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat { padding: 22px 22px; border-radius: var(--r-tile); background: var(--wash); }
.stat .value { font-size: 2.6rem; font-weight: 600; line-height: 1; letter-spacing: -0.05em; }
.stat .label { color: var(--muted); font-size: .86rem; font-weight: 450; margin: 8px 0 0; }
.game-stat { position: relative; overflow: hidden; }
.game-stat dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 14px 0 0; font-size: .9rem; }
.game-stat dt { color: var(--muted); }
.game-stat dd { margin: 0; font-weight: 550; text-align: right; }
.game-stat h2, .game-stat h3 { display: flex; align-items: center; gap: 10px; text-transform: lowercase; letter-spacing: -0.035em; }

.person { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .name { flex: 1; min-width: 0; }
.person .name a { font-weight: 550; color: var(--text); text-decoration: none; }
.person .name small { display: block; color: var(--muted); }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; border-radius: 16px; padding: 4px; background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--lift); }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; color: var(--text); border-radius: 12px; cursor: pointer; }
.suggest-list button:hover { background: var(--surface-2); }

/* --- Versus ------------------------------------------------------------------------------------ */
.players { list-style: none; margin: 0; padding: 0; }
.players li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); animation: lb-in .5s var(--ease-out) both; }
.players li:last-child { border-bottom: 0; }
.players .name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.game-pick {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px 9px 9px; border-radius: 18px; cursor: pointer; margin: 0;
  font-weight: 550; font-size: .92rem; background: var(--page); border: 1.5px solid transparent;
  transition: transform .35s var(--ease-spring), border-color .2s, box-shadow .3s;
}
.game-pick:hover { transform: translateY(-2px); }
.game-pick:has(input:checked) { border-color: var(--game); box-shadow: 0 0 0 4px color-mix(in srgb, var(--game) 20%, transparent); }
.game-pick input { position: absolute; opacity: 0; pointer-events: none; }
.game-pick .game-icon { width: 36px; height: 36px; font-size: 1.05rem; }
/* Párbaj: create page and lobby */
.room-join { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -8px 0 22px; padding: 12px 12px 12px 18px; border-radius: 22px; background: var(--wash); }
.room-join label { font-weight: 600; }
.room-join .share-box { flex: 1; min-width: min(100%, 260px); }
.room-join input { text-transform: uppercase; letter-spacing: .08em; }
.room-join input::placeholder { text-transform: none; letter-spacing: 0; }
.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.room-as { margin: 4px 0 16px; color: var(--muted); }
.room-as b { color: var(--ink); }
.room-more { margin: 0 0 16px; }
.room-more summary { cursor: pointer; color: var(--muted); font-size: .92rem; font-weight: 550; padding: 4px 0; }
.room-more[open] summary { margin-bottom: 10px; }
@media (max-width: 560px) {
  /* Phones: a compact icon grid instead of 28 rows */
  .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pick-grid .game-pick { flex-direction: column; justify-content: flex-start; gap: 5px; padding: 8px 2px 7px; border-radius: 16px; text-align: center; }
  .pick-grid .game-pick b { font-size: .68rem; line-height: 1.15; font-weight: 550; overflow-wrap: anywhere; hyphens: auto; }
  .pick-grid .game-pick .game-icon { width: 38px; height: 38px; }
  .pick-grid .game-pick:hover { transform: none; }
}

/* The room code: big, easy to read out loud, one tap to share */
.room-code-card { text-align: center; }
.room-code-card .room-code-label { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.room-code { display: inline-flex; gap: 6px; margin: 2px 0 14px; font-weight: 650; font-size: clamp(2rem, 9vw, 2.6rem); letter-spacing: 0; line-height: 1; }
.room-code span { display: grid; place-items: center; width: 1.25em; height: 1.45em; border-radius: 12px; background: var(--surface-2); }
.room-code-card .row { justify-content: center; }
.room-lobby > aside { order: 0; }
@media (max-width: 940px) { .room-lobby > aside { order: -1; } } /* phones: code, start and players before the rules */
.stage-title small { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; text-transform: none; }

/* Versus round: the players on the stage, live (room.js stripHtml). */
.vs-strip { width: 100%; max-width: 600px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; flex: none; }
.vs-strip:empty { display: none; }
.vs-chips { flex: 1; min-width: 0; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.vs-chips::-webkit-scrollbar { display: none; }
.vs-chip { flex: none; display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .8rem; line-height: 1.2; white-space: nowrap; }
.vs-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; margin-left: 3px; }
.vs-name { font-weight: 600; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.vs-me .vs-name { color: color-mix(in srgb, var(--game) 55%, white); }
.vs-st { color: var(--muted); }
.vs-busy::before { animation: vs-pulse 1.2s ease-in-out infinite; }
@keyframes vs-pulse { 50% { opacity: .25; } }
.vs-done { background: color-mix(in srgb, var(--good) 18%, transparent); animation: pop .5s var(--ease-spring); }
.vs-done::before { background: var(--good); }
.vs-done .vs-st { color: var(--good); font-weight: 600; }
.vs-failed::before { background: var(--warn); }
.vs-failed .vs-st { color: var(--warn); }
.vs-next { flex: 1 0 100%; justify-content: center; animation: pop .5s var(--ease-spring); } /* everyone done: its own row */

.countdown { font-size: clamp(6rem, 30cqw, 11rem); font-weight: 600; letter-spacing: -0.07em; line-height: 1; color: #fff; animation: count .9s var(--ease-out) both; }
@keyframes count { from { transform: scale(1.8); opacity: 0; filter: blur(10px); } 60% { transform: scale(1); opacity: 1; filter: none; } }
.winner { text-align: center; }
.winner .trophy { font-size: 4rem; line-height: 1; animation: float 4s ease-in-out infinite; display: inline-block; }
.winner .winner-name { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 600; letter-spacing: -0.055em; }
td.best { color: var(--good); font-weight: 650; }

#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translateX(-50%) translateY(24px) scale(.96);
  background: var(--ink); color: var(--page); padding: 13px 22px; border-radius: 999px; font-weight: 500; font-size: .95rem;
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .5s var(--ease-spring); max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

.prose { max-width: 720px; }
.prose h1 { text-transform: lowercase; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin: 6px 0; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.page-narrow { max-width: 760px; margin: 0 auto; }

/* --- Map of Hungary (core/hu-map.js: Településtippelő, Hol van?). Always on the dark stage. --- */
.hm-theme {
  --hm-land: #2a2a2d;
  --hm-land-edge: color-mix(in srgb, var(--game) 65%, #ffffff);
  --hm-county: rgba(255, 255, 255, .12);
  --hm-water: #2f6fae;
  --hm-river: #4b8fd1;
  --hm-hl: color-mix(in srgb, var(--game) 30%, transparent);
  --hm-label: #f5f5f7;
  --hm-halo: rgba(0, 0, 0, .85);
  --hm-pin: #ff5c7a;
}
.hm-card {
  position: relative;
  padding: 10px 10px 8px; border-radius: 22px;
  background: #1c1c1e; border: 1px solid rgba(255, 255, 255, .06);
  background-image: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--game) 14%, transparent), transparent 60%);
}
.hm-wrap { position: relative; aspect-ratio: 478 / 301; }
.hm-map { display: block; width: 100%; height: 100%; overflow: visible; }
.hm-loading {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-weight: 650; font-size: .92rem;
  border-radius: 16px; background: var(--surface-2);
  animation: hm-breathe 1.4s ease-in-out infinite alternate;
}
.hm-retry { font: inherit; font-weight: 750; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; }
@keyframes hm-breathe { from { opacity: .55; } to { opacity: 1; } }

.hm-land { fill: var(--hm-land); }
.hm-land-shadow { fill: color-mix(in srgb, var(--game) 22%, transparent); }
.hm-outline { fill: none; stroke: var(--hm-land-edge); stroke-width: calc(1.4px * var(--k, 1)); stroke-linejoin: round; }
.hm-counties path { fill: transparent; stroke: var(--hm-county); stroke-width: .8; stroke-linejoin: round; transition: fill .5s; }
.hm-counties path.hm-hl { fill: var(--hm-hl); stroke: color-mix(in srgb, var(--game) 60%, transparent); stroke-width: 1.2; }
.hm-rivers path { fill: none; stroke: var(--hm-river); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.hm-lake { fill: var(--hm-water); }
.hm-capital { transform-origin: var(--x) var(--y); transform: scale(var(--k, 1)); }
.hm-capital rect { fill: var(--hm-label); opacity: .55; }
.hm-capital text {
  font: 700 8.5px var(--body); fill: var(--hm-label); opacity: .5; letter-spacing: .02em;
  paint-order: stroke; stroke: var(--hm-halo); stroke-width: 2.5px;
}

.hm-pin { transform-origin: var(--x) var(--y); animation: hm-pin .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.hm-pin path { fill: var(--hm-pin); stroke: #fff; stroke-width: 1.4; }
.hm-pin circle { fill: #fff; }
@keyframes hm-pin { from { transform: translateY(-14px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Versus wait / countdown screens inside the stage */
.start-screen.wait-screen { min-height: min(420px, 90cqw); justify-content: center; }
.start-screen.wait-screen .start-title { font-size: clamp(2.4rem, 10cqw, 4.2rem); padding-right: 0; }
.start-screen.center { align-items: center; text-align: center; }
.start-screen.center .start-lede { padding-right: 0; margin: 0 0 6px; }

/* Page transitions (same-origin, supporting browsers): a home card grows into its game's stage. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.stage[style*="view-transition-name"] { animation: none; }

/* Profile: level line, XP bar, and the Kinézet choices (settings). */
.level-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.level-bar { width: 140px; height: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.level-bar i { display: block; height: 100%; width: var(--p); background: var(--ink); border-radius: inherit; }
.look-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.look-grid { margin-bottom: 4px; }
label.look-opt { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 13px; border-radius: 999px; background: var(--page); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; font-size: .88rem; font-weight: 500; }
label.look-opt:has(input:checked) { background: var(--ink); color: var(--page); }
#kinezet h3 { margin: 18px 0 8px; }
.look-opt input { margin: 0; }
label.look-opt.locked { opacity: .45; cursor: not-allowed; }

/* Play page: daily hint choice (time or coins), XP under the result, the level-up card. */
.hint-choice { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; animation: fx-pop .3s var(--ease-spring); }
.hint-choice small { opacity: .7; font-weight: 500; }
.xp-strip { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -8px 0 16px; font-size: .9rem; color: var(--muted); }
.xp-strip b { color: #fff; }
.xp-strip.guest { color: var(--gold); text-decoration: none; }
.xp-strip .level-bar { width: 90px; height: 6px; background: rgba(255, 255, 255, .12); }
.xp-strip .level-bar i { background: var(--good); }
.level-up { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); animation: fade-in .3s; }
.level-up-card { max-width: 360px; width: 100%; padding: 28px 24px; border-radius: 28px; background: #141415; color: #fff; text-align: center; animation: fx-pop .5s var(--ease-spring); }
.level-up-num { width: 84px; height: 84px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; font-size: 2.4rem; font-weight: 700; background: conic-gradient(#ff4d7e, #ffb400, #12b5a2, #2f86ff, #7b5cff, #ff4d7e); }
.level-up-title { color: var(--gold); font-weight: 600; margin: 4px 0 12px; }
.level-up ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.level-up .actions { display: flex; gap: 8px; justify-content: center; }
@keyframes fade-in { from { opacity: 0; } }
.level-up .btn:not(.btn-game) { background: rgba(255, 255, 255, .12); color: #fff; }

/* Profile: where the XP came from, largest first — one row per source with a thin bar. */
.xp-breakdown { margin-top: 20px; }
.xp-breakdown h3 { margin: 0 0 12px; }
.xp-breakdown ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 680px; }
.xp-breakdown li { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; align-items: center; gap: 14px; }
.xp-from-label { font-size: .92rem; }
.xp-from-bar { height: 8px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.xp-from-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink); }
.xp-from-value { font-weight: 600; font-size: .92rem; white-space: nowrap; min-width: 4.5em; text-align: right; }
@media (max-width: 480px) { .xp-breakdown li { grid-template-columns: 1fr auto; } .xp-from-bar { grid-column: 1 / -1; grid-row: 2; } }

/* The on-screen Hungarian keyboard (core/keyboard.js): games that take typed letters, on touch screens. */
.okb { width: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; flex: none;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.okb-row { display: flex; justify-content: center; gap: 4px; }
.okb-row:nth-child(1)::before, .okb-row:nth-child(1)::after,
.okb-row:nth-child(3)::before, .okb-row:nth-child(3)::after { content: ''; flex: .5 1 0; }
.okb-key {
  flex: 1 1 0; min-width: 0; height: 44px; padding: 0; border: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #4a4a4e; color: #fff; font: 600 1.02rem var(--font); cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4); transition: transform .12s, filter .15s;
}
.okb-wide { flex: 1.5 1 0; font-size: .78rem; }
.okb-key:active { transform: scale(.94); }
.okb-key.okb-press { animation: okb-press .16s ease-out; }
@keyframes okb-press { 0% { transform: scale(.9); filter: brightness(1.3); } }
.okb-row:nth-child(5) .okb-key { flex: 1 1 0; }
.okb-row:nth-child(5) .okb-space { flex: 7 1 0; font-size: .78rem; }
.okb.okb-off { opacity: .5; pointer-events: none; }
@media (max-height: 640px) { .okb-key { height: 38px; font-size: .94rem; } .okb-wide { font-size: .66rem; } .okb { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .okb-key.okb-press { animation: none; } }

/* Játékok page: the favourite star on a tile (top right, where the daily page has its badges). */
.fav-btn {
  position: absolute; top: 22px; right: 22px; z-index: 3; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--on); background: color-mix(in srgb, var(--on) 16%, transparent);
  transition: transform .3s var(--ease-spring), background-color .2s;
}
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav-btn:hover { background: color-mix(in srgb, var(--on) 26%, transparent); }
.fav-btn:active { transform: scale(.88); }
.fav-btn[aria-pressed="true"] { color: #facc15; background: rgba(0, 0, 0, .28); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; stroke: #a16207; animation: fav-pop .45s var(--ease-spring); }
@keyframes fav-pop { 40% { transform: scale(1.35) rotate(-12deg); } }
.games-favs .section-title { margin-top: 8px; }
.fav-slot { display: none; }
@media (prefers-reduced-motion: reduce) { .fav-btn[aria-pressed="true"] svg { animation: none; } }
