/* Hry od babičky – main stylesheet */

/* ---------- Fonts (local, OFL – see CREDITS.md) ---------- */
@font-face { font-family: "Bitter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/bitter-latin-600.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: "Bitter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/bitter-latin-ext-600.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; }
@font-face { font-family: "Bitter"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/bitter-latin-800.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: "Bitter"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/bitter-latin-ext-800.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/nunito-latin-400.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: "Nunito"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/nunito-latin-ext-400.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/nunito-latin-600.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: "Nunito"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/nunito-latin-ext-600.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/nunito-latin-800.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: "Nunito"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/nunito-latin-ext-800.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 ---------- */
/* Default = the games' dark wooden look (index.css of Logik, Farebné veže and Kalapky: --bg, --bg-deep, --text,
   --muted, brass --accent, --panel, glow at the top), so the site matches once the games move here.
   Dark only – no light theme (decision of 29. 10. 2026). */
:root {
  --bg: #24170d;
  --bg-deep: #160d06;
  --bg-alt: #1c1209;
  --glow: rgba(168, 111, 58, 0.25);
  --surface: #1b1008;
  --surface-2: #2c1c0f;
  --text: #f5e8d0;
  --muted: #c9ae88;
  --line: rgba(240, 201, 122, 0.18);
  --accent: #f0c97a;
  --accent-hover: #f6dfa8;
  --accent-ink: #3a210c;
  --accent-soft: rgba(240, 201, 122, 0.1);
  --header-bg: rgba(36, 23, 13, 0.9);
  --wood: #b07a45;
  --wood-dark: #74471f;
  --wood-board: #5a3a1e;
  --tile: #eadcc0;
  --tile-ink: #5a3a1e;
  /* The table at Babička's, as in the games (design of Hlavolam 15 / Logik): wood, brass, paper, tablecloth */
  --wood-edge: #4a2a10;
  --brass-light: #f6dfa8;
  --brass: #d7ae62;
  --brass-dark: #9c7432;
  --ink: #3a210c;
  --paper: #fbf3e2;
  --note: #ffe58a;
  --red: #b8362f;
  --cloth-base: #efe4d0;
  --cloth-red: rgba(184, 54, 47, 0.5);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='600'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.22 0.006' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.22 0 0 0 0 0.11 0 0 0 0 0.03 1.4 0 0 0 -0.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg-deep); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: radial-gradient(ellipse 120% 900px at 50% 0%, var(--glow), transparent 70%), var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Surfaces: the table at Babička's ---------- */
/* Dark wood (the default background), the red gingham tablecloth of the games, a sheet of paper. */
.cloth {
  position: relative; isolation: isolate;
  background:
    linear-gradient(90deg, var(--cloth-red) 50%, transparent 50%) 0 0 / 48px 48px,
    linear-gradient(var(--cloth-red) 50%, transparent 50%) 0 0 / 48px 48px,
    var(--cloth-base);
}
/* Darker edges, so the cloth does not glare */
.cloth::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(36, 23, 13, 0.55)); }
.paper { background: var(--paper); color: var(--ink); border-radius: 6px; box-shadow: 0 14px 30px rgba(36, 23, 13, 0.45); }
.paper a:not(.btn) { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.4em;
  border-radius: 999px; border: 0;
  font: 800 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
/* Brass, as the buttons of the games */
.btn--solid { background: linear-gradient(var(--brass-light), var(--brass)); color: var(--accent-ink); box-shadow: 0 3px 0 var(--brass-dark), 0 8px 16px rgba(0, 0, 0, 0.3); }
.btn--solid:hover { color: var(--accent-ink); }
/* A sheet of paper */
.btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 #cdb894, 0 8px 16px rgba(0, 0, 0, 0.25); }
.btn--ghost:hover { color: var(--ink); }

/* ---------- Header: a wooden shelf ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(rgba(36, 23, 13, 0.6), rgba(36, 23, 13, 0.6)), var(--grain), var(--wood-dark);
  border-bottom: 4px solid var(--wood-edge);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand__mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.brand__name { font: 800 1.25rem/1 var(--font-head); white-space: nowrap; }

.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 800; }
.nav a:hover { background: rgba(240, 201, 122, 0.12); color: var(--text); }

/* Link to the other language ("English" on a Slovak page, "Slovensky" on an English one; assets/js/lang.js);
   always visible, also on a phone where the menu hides */
.lang { flex: none; padding: 6px 12px; border: 1px solid rgba(240, 201, 122, 0.35); border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 800; font-size: 0.9rem; line-height: 1.2; }
.lang:hover { background: rgba(240, 201, 122, 0.12); color: var(--text); }

/* Background music on / off (assets/js/main.js); always visible, also on a phone where the menu hides */
.music { display: grid; place-items: center; font: inherit; width: 42px; height: 42px; flex: none; padding: 0; border: 1px solid rgba(240, 201, 122, 0.35); border-radius: 50%; background: rgba(240, 201, 122, 0.12); color: var(--accent); cursor: pointer; transition: background-color 0.15s; }
.music:hover { background: rgba(240, 201, 122, 0.25); }
.music svg { width: 22px; height: 22px; }
.music[aria-pressed="true"] .music__off, .music[aria-pressed="false"] .music__on { display: none; }
.music[aria-pressed="false"] { color: var(--muted); }
/* Blocked by the browser until a click: the button says so and pulses gently */
.music__hint { display: none; font-weight: 800; white-space: nowrap; }
.music--waiting { display: inline-flex; gap: 6px; width: auto; padding: 0 14px 0 10px; border-radius: 999px; background: linear-gradient(var(--brass-light), var(--brass)); color: var(--accent-ink); border-color: transparent; animation: music-pulse 2s ease-in-out infinite; }
.music--waiting:hover { background: linear-gradient(var(--brass-light), var(--brass)); }
.music--waiting .music__hint { display: inline; }
@keyframes music-pulse { 50% { box-shadow: 0 0 0 6px rgba(240, 201, 122, 0.25); } }
@media (prefers-reduced-motion: reduce) { .music--waiting { animation: none; } }

@media (max-width: 720px) {
  .nav { display: none; }
}
/* A phone: logo, name, SK | EN and the music button in one row – the waiting music button stays round (it pulses) */
@media (max-width: 520px) {
  .site-header__inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand__name { font-size: 1.05rem; }
  .lang { padding: 6px 10px; }
  .music--waiting { width: 42px; padding: 0; border-radius: 50%; }
  .music--waiting .music__hint { display: none; }
}
@media (max-width: 350px) { .brand__name { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* The text is a note taped to the tablecloth */
.hero__note { position: relative; padding: clamp(24px, 4vw, 36px); transform: rotate(-1.5deg); }
.hero__note::after { content: ""; position: absolute; top: -14px; left: 50%; width: 120px; height: 30px; margin-left: -60px; background: rgba(255, 229, 138, 0.75); transform: rotate(3deg); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); }
.hero__note .eyebrow { margin-bottom: 6px; padding: 0; background: none; color: var(--red); }
.hero__note h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
/* "na stole" underlined by a brass marker */
.hero__note h1 em { font-style: normal; color: var(--red); background: linear-gradient(transparent 62%, rgba(240, 201, 122, 0.65) 62%, rgba(240, 201, 122, 0.65) 92%, transparent 92%); }
.hero__note .lead { color: #6b4a2a; margin-bottom: 0; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero__facts li { padding: 4px 12px; border-radius: 999px; background: #f3e3c3; border: 2px dashed rgba(90, 58, 30, 0.3); font-weight: 800; font-size: 0.9rem; }

/* The games on the table, in 3D. One plane (.hero__plane) is the table top tilted away from the viewer under one
   perspective, so the far games are smaller. The games lie on it (rotated only around their own axis) with a wooden
   edge and a shadow; the hovered one lifts off the table. The cup and the glasses are shaded 3D drawings that stand
   in front of the plane. */
.hero__art { position: relative; aspect-ratio: 1 / 0.82; max-width: 540px; width: 100%; justify-self: center; perspective: 1100px; perspective-origin: 50% -20%; }
.hero__plane { position: absolute; left: -4%; right: -4%; top: -6%; height: 120%; transform: rotateX(46deg); transform-origin: 50% 100%; transform-style: preserve-3d; }
.hero__piece { position: absolute; transition: transform 0.35s; filter: drop-shadow(0 3px 0 #5e3717) drop-shadow(0 3px 0 #3a210c) drop-shadow(0 22px 14px rgba(36, 23, 13, 0.5)); }
.hero__piece svg { display: block; width: 100%; height: auto; transform: rotate(var(--rz, 0deg)); }
.hero__piece:hover { transform: translateZ(46px); }
.hero__piece--logik { left: -2%; top: 2%; width: 40%; --rz: -12deg; }
.hero__piece--15 { left: 68%; top: 0; width: 30%; --rz: 14deg; }
.hero__piece--veze { left: 30%; top: 40%; width: 40%; --rz: 5deg; }
.hero__piece--kalapky { left: 67%; top: 40%; width: 36%; --rz: -9deg; }
.hero__piece--piskvorky { left: -2%; top: 52%; width: 31%; --rz: 16deg; }
.hero__cup { position: absolute; left: 41%; top: 8.5%; width: 22%; filter: drop-shadow(14px 16px 10px rgba(36, 23, 13, 0.4)); }
.hero__cup .steam path { animation: steam 3.2s ease-in-out infinite both; }
.hero__cup .steam path:nth-child(2) { animation-delay: 1.1s; }
.hero__cup .steam path:nth-child(3) { animation-delay: 2.1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px); } 35% { opacity: 0.95; } 100% { opacity: 0; transform: translateY(-22px); } }
/* With fewer animations wished (prefers-reduced-motion) the steam only fades in and out, it does not rise */
@keyframes steam-fade { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.85; } }
/* Babička's reading glasses on the paper with the Piškvorky */
.hero__glasses { position: absolute; left: 10%; bottom: -6%; width: 42%; rotate: -10deg; filter: drop-shadow(0 2px 0 #2a170a) drop-shadow(8px 12px 6px rgba(36, 23, 13, 0.45)); }
/* The table recedes: the far part of the cloth is a little darker */
.hero--table::before { background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(36, 23, 13, 0.55)), linear-gradient(rgba(36, 23, 13, 0.28), transparent 45%); }
@media (prefers-reduced-motion: reduce) {
  .hero__piece { transition: none; }
  .hero__cup .steam path { animation-name: steam-fade; }
}
/* Babička peeks in from the corner */
.hero__granny { position: absolute; right: 0; bottom: -14%; display: flex; align-items: flex-end; text-decoration: none; }
/* The games and Babička in the picture are links: a game leads to its box, Babička to her story */
.hero__granny:hover svg { animation-duration: 0.8s; }
.hero__granny svg { width: clamp(80px, 9vw, 110px); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4)); animation: peek 4s ease-in-out infinite; }
.hero__bubble { margin: 0 -6px 70px 0; max-width: 190px; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #fff; color: var(--ink); font-weight: 800; line-height: 1.3; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); }
@keyframes peek { 50% { transform: translateY(-6px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .hero__granny svg { animation: none; } }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 440px; margin-bottom: 30px; }
  .hero__bubble { max-width: 150px; margin-bottom: 64px; font-size: 0.85rem; }
  .hero__glasses { left: 2%; width: 40%; }
}
@media (max-width: 520px) { .hero__bubble { display: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
/* Jumps from the menu and from the picture stop below the sticky header */
.section, .game { scroll-margin-top: 90px; }
.section__head { max-width: 40em; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
/* The heading is a paper label */
.section__head h2 { display: inline-block; margin: 0; padding: 8px 28px 10px; background: var(--paper); color: var(--ink); border-radius: 6px; transform: rotate(-1.2deg); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35); }
.section__head p { margin: 16px 0 0; color: var(--muted); font-size: 1.1rem; }
.cloth .section__head p { display: inline-block; padding: 8px 18px; border-radius: 12px; background: rgba(36, 23, 13, 0.85); color: var(--text); }

/* ---------- Game cards: boxes of board games ---------- */
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 28px; }
.game {
  --lid: #9a5b2a;
  flex: 0 1 320px; display: flex; flex-direction: column; position: relative;
  padding: 14px 14px 20px; border-radius: var(--radius); background: var(--lid);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--lid) 60%, black), 0 20px 30px rgba(0, 0, 0, 0.45);
  transform: rotate(-1deg); transition: transform 0.25s;
}
.game:nth-child(even) { transform: rotate(1deg); }
.game:hover { transform: translateY(-6px); }
@media (prefers-reduced-motion: reduce) { .game, .game:nth-child(even), .game:hover { transform: none; } }
.game--logik { --lid: #2f6d8a; }
.game--veze { --lid: #a63a2f; }
.game--kalapky { --lid: #4f7d33; }
.game--piskvorky { --lid: #3b4f8f; }

.game__art {
  --cloth-base: #efe4d0; --cloth-check: rgba(184, 54, 47, 0.5); --cloth-edge: rgba(36, 23, 13, 0.45);
  position: relative; display: grid; place-items: center; height: 190px; padding: 10px 10px 26px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 45%, var(--cloth-edge)),
    repeating-linear-gradient(90deg, var(--cloth-check) 0 18px, transparent 18px 36px),
    repeating-linear-gradient(0deg, var(--cloth-check) 0 18px, transparent 18px 36px),
    var(--cloth-base);
}
/* Each game lies on the tablecloth of the game itself (babicka.css of the games): Hlavolam 15 red, Logik blue,
   Farebné veže chestnut, Kalapky green, Piškvorky plum */
.game--logik .game__art { --cloth-base: #eef0f3; --cloth-check: rgba(40, 85, 165, 0.45); --cloth-edge: rgba(20, 30, 55, 0.45); }
.game--veze .game__art { --cloth-base: #5b3a20; --cloth-check: rgba(25, 12, 4, 0.32); --cloth-edge: rgba(15, 8, 3, 0.55); }
.game--kalapky .game__art { --cloth-base: #f1f0e0; --cloth-check: rgba(58, 128, 64, 0.5); }
.game--piskvorky .game__art { --cloth-base: #f1e6e8; --cloth-check: rgba(112, 42, 86, 0.5); --cloth-edge: rgba(40, 14, 30, 0.5); }
.game__art > svg { display: block; width: auto; height: 100%; max-width: 100%; filter: drop-shadow(0 8px 10px rgba(36, 23, 13, 0.45)); transition: transform 0.2s ease; }
/* The picture is a link to the game too (like "Hrať …"): it lifts a little under the mouse */
.game__art:hover > svg { transform: scale(1.05) rotate(-1deg); }
@media (prefers-reduced-motion: reduce) { .game__art > svg { transition: none; } .game__art:hover > svg { transform: none; } }
/* "Novinka" is a red stamp on the corner of the box */
.game__badge {
  position: absolute; top: -16px; right: -12px; z-index: 2; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff;
  font: 800 0.8rem/1 var(--font-head); text-transform: uppercase; transform: rotate(14deg);
  box-shadow: 0 0 0 4px #fff, 0 6px 12px rgba(0, 0, 0, 0.4);
}
.game:has(.game__badge) .game__art { overflow: visible; }
.game__body { display: flex; flex-direction: column; flex: 1; padding: 0 6px; color: #fff6e4; }
.game__name { position: relative; margin: -24px auto 14px; padding: 6px 20px 8px; text-align: center; background: var(--paper); color: var(--ink); border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3); }
.game__title { margin: 0; font-size: 1.45rem; }
.game__tagline { margin: 0; color: #6b4a2a; font-weight: 800; font-size: 0.92rem; }
.game__desc { font-size: 0.98rem; }


/* "Babička radí" is a yellow sticky note */
.tip {
  position: relative; margin: 0 0 20px; padding: 10px 12px 10px 48px;
  background: var(--note); color: var(--ink); border-radius: 3px; font-size: 0.95rem; line-height: 1.45;
  transform: rotate(1deg); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}
.tip::before {
  content: ""; position: absolute; left: 12px; top: 12px; width: 26px; height: 26px;
  background: var(--ink);
  -webkit-mask: url("../img/okuliare.svg") center / contain no-repeat;
  mask: url("../img/okuliare.svg") center / contain no-repeat;
}
.tip strong { display: block; font-family: var(--font-head); }

.game__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
/* Links to the game's text pages (guide, strategy, history) above the buttons */
.game__more { margin: auto 0 14px; font-size: 0.95rem; color: #fff6e4; }
.game__more a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.game__more a:hover { color: var(--accent); }
.game__more + .game__actions { margin-top: 0; }
/* The official Google Play badge (unchanged, with its own clear space in the image) next to the play button */
.store-badge { display: block; line-height: 0; margin: -6px -5px; }
.store-badge img { width: auto; height: 54px; }

/* ---------- Daily challenges: notes pinned on a cork board ---------- */
.cork {
  padding: clamp(26px, 4vw, 38px) clamp(16px, 3vw, 28px); border: 14px solid var(--wood-dark); border-radius: 12px;
  background: radial-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.5px) 3px 4px / 9px 9px, #b98a55;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.4);
}
.daily { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 26px 18px; margin: 0; padding: 0; list-style: none; }
.daily a {
  --note-bg: var(--paper); --tilt: -2deg;
  position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; padding: 22px 14px 14px;
  background: var(--note-bg); color: var(--ink); text-align: center; text-decoration: none; border-radius: 2px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3); transform: rotate(var(--tilt)); transition: transform 0.2s;
}
.daily li:nth-child(2) a { --note-bg: var(--note); --tilt: 2deg; }
.daily li:nth-child(3) a { --tilt: -1deg; }
.daily li:nth-child(4) a { --note-bg: #d8f0c4; --tilt: 3deg; }
.daily li:nth-child(5) a { --note-bg: #ffd6cc; --tilt: -3deg; }
.daily a:hover { transform: scale(1.05); color: var(--ink); }
/* The pin */
.daily a::before { content: ""; position: absolute; top: -8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, var(--red) 60%, #6b1712); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.4); }
.daily__icon { width: 84px; height: 70px; margin-bottom: 6px; }
.daily__icon svg { width: 100%; height: 100%; }
.daily strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.daily span span { display: block; margin: 2px 0 10px; color: #6b4a2a; font-size: 0.9rem; line-height: 1.35; }
.daily em { font-style: normal; font-weight: 800; color: var(--red); }
.daily__note { width: fit-content; max-width: 100%; margin: 26px auto 0; padding: 10px 20px; border-radius: 999px; background: var(--paper); color: #6b4a2a; text-align: center; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); }
.daily__note b { color: var(--red); font-family: var(--font-head); }
.daily__note [hidden] { display: none; }
@media (max-width: 520px) {
  /* Two notes in a row: the fifth one in the middle */
  .daily li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); }
}

/* ---------- Features: brass coasters ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; text-align: center; }
.feature__icon {
  width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: radial-gradient(circle, var(--brass-light) 0 52%, var(--brass) 53% 62%, var(--brass-dark) 63%);
  box-shadow: 0 5px 0 #5e3d14, 0 12px 20px rgba(0, 0, 0, 0.4);
}
.feature__icon svg { width: 38px; height: 38px; }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.35em; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Story: Babička's letter on the tablecloth ---------- */
.story { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 48px); align-items: start; max-width: calc(980px + 2 * var(--gutter)); }
/* Portrait in an oval wooden frame */
.story__portrait {
  width: 100%; max-width: 220px; aspect-ratio: 220 / 260; border-radius: 50% / 45%; padding: 0;
  background: var(--paper); border: 12px solid var(--wood); box-shadow: inset 0 0 0 4px var(--brass), 0 14px 26px rgba(0, 0, 0, 0.45);
  display: grid; place-items: center; transform: rotate(-3deg);
}
.story__portrait svg { display: block; width: 58%; height: auto; }
.story__text { padding: clamp(22px, 4vw, 36px); font-size: 1.08rem; transform: rotate(0.8deg); }
.story__text p { text-wrap: pretty; }
.story__listen { margin: 0 0 1.2em; }
/* The play button is an old radio */
.radio {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 0; border-radius: 14px;
  background: linear-gradient(#8a5a2e, #5e3717); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 4px 0 #3a210c, 0 8px 16px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.radio:hover { transform: translateY(-2px); }
.radio:active { transform: translateY(1px); }
.radio__knob { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(var(--brass-light), var(--brass)); color: var(--ink); font-size: 1.1rem; box-shadow: 0 3px 0 var(--brass-dark); }
.radio[aria-pressed="true"] .radio__knob { box-shadow: 0 0 0 4px rgba(240, 201, 122, 0.45), 0 3px 0 var(--brass-dark); }
.radio__text b { display: block; font-weight: 800; }
.radio__text small { color: var(--muted); font-size: 0.85rem; }
.radio__grill { width: 64px; height: 34px; flex: none; border-radius: 6px; background: repeating-linear-gradient(90deg, #2a170a 0 3px, #a37a4a 3px 6px); }
.story__sign { font-family: var(--font-head); font-weight: 800; color: var(--red); font-size: 1.3rem; text-align: right; }
/* A little heart drawn after Babička's signature (home page, dakujeme/) */
.story__heart { display: inline-block; width: 1.15em; height: 1.15em; margin-left: 4px; vertical-align: -0.2em; fill: var(--red); transform: rotate(12deg); }
.story__thanks { color: #6b4a2a; font-size: 0.95rem; }
.story__thanks a { font-weight: 800; }
.story__ai { margin: 0; padding-top: 10px; border-top: 1px dashed rgba(90, 58, 30, 0.3); color: #8a6a45; font-size: 0.82rem; }
@media (max-width: 720px) {
  .story { grid-template-columns: 1fr; }
  .story__portrait { width: 150px; margin: 0 auto; }
  .radio__grill { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0; border-top: 4px solid var(--wood-edge); background: linear-gradient(rgba(36, 23, 13, 0.6), rgba(36, 23, 13, 0.6)), var(--grain), var(--wood-dark); color: var(--muted); font-size: 0.95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__legal { flex-basis: 100%; font-size: 0.8rem; opacity: 0.8; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Game art (inline SVG) ---------- */
.art-wood { fill: var(--wood); }
.art-wood-dark { fill: var(--wood-dark); }
.art-board { fill: var(--wood-board); }
.art-tile { fill: var(--tile); }
.art-num { fill: var(--tile-ink); font: 800 19px var(--font-head); }
.art-hole { fill: rgba(0, 0, 0, 0.35); }

/* ---------- Misc ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.page-404 { min-height: 100vh; display: flex; align-items: center; text-align: center; }
.page-404 .eyebrow { display: table; margin: 24px auto 14px; }
.page-404 .lead { margin: 0 auto; }
.page-404 .hero__actions { justify-content: center; }

/* ---------- Thanks page (dakujeme/): Babička thanks the testers ---------- */
.thanks-hero__grid { display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; max-width: calc(900px + 2 * var(--gutter)); }
.thanks-hero .hero__note h1 { margin-bottom: 0.35em; }
.thanks-hero .hero__note .lead { margin-bottom: 0.6em; }
.thanks-hero__listen { margin: 18px 0 16px; }
/* One pinned note per tester, as the daily challenges */
.testers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 34px 22px; margin: 0; padding: 0; list-style: none; }
.tester {
  --note-bg: var(--paper); --tilt: -2deg;
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 26px 18px 18px;
  background: var(--note-bg); color: var(--ink); text-align: center; border-radius: 2px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3); transform: rotate(var(--tilt));
}
.tester:nth-child(2) { --note-bg: #d8f0c4; --tilt: 2deg; }
.tester:nth-child(3) { --note-bg: var(--note); --tilt: -1deg; }
.tester:nth-child(4) { --note-bg: #ffd6cc; --tilt: 2.5deg; }
.tester::before { content: ""; position: absolute; top: -8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, var(--red) 60%, #6b1712); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.4); }
.tester__art { width: 120px; height: 100px; margin-bottom: 10px; }
.tester__art svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(36, 23, 13, 0.35)); }
.tester__name { margin: 0; font-size: 1.6rem; }
.tester__nick { margin: 4px 0 12px; padding: 2px 12px; border-radius: 999px; background: rgba(184, 54, 47, 0.12); color: var(--red); font-weight: 800; }
.tester__text { flex: 1; margin-bottom: 12px; color: #5a3a1e; font-size: 0.98rem; line-height: 1.45; text-wrap: pretty; }
.tester a.tester__game { color: var(--red); font-weight: 800; text-decoration: none; }
.tester a.tester__game:hover { text-decoration: underline; }
/* "Ďakujem!" is a red stamp on the corner, as "Novinka" on the game boxes; a click shows Babička's thanks */
.tester__stamp {
  position: absolute; top: -14px; right: -12px; z-index: 2; width: 74px; height: 74px; padding: 0; border: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--red); color: #fff; cursor: pointer;
  font: 800 0.72rem/1 var(--font-head); text-transform: uppercase; transform: rotate(14deg);
  box-shadow: 0 0 0 4px #fff, 0 6px 12px rgba(0, 0, 0, 0.4); transition: transform 0.2s;
}
.tester__stamp svg { width: 16px; height: 16px; fill: currentColor; }
/* The speaker only with a recording */
.tester__stamp:not([data-thanks-voice]) svg { display: none; }
.tester__stamp:hover { transform: rotate(4deg) scale(1.08); }
.tester__stamp[aria-expanded="true"] { transform: rotate(4deg) scale(1.08); box-shadow: 0 0 0 4px #fff, 0 0 0 9px rgba(240, 201, 122, 0.6), 0 6px 12px rgba(0, 0, 0, 0.4); }
/* Babička's words in a speech bubble over the top of the note, its tail pointing to the stamp */
.tester__bubble {
  position: absolute; top: 58px; left: 10px; right: 10px; z-index: 3; margin: 0; padding: 12px 14px;
  border-radius: 14px; background: #fff; color: var(--ink); text-align: left;
  font-weight: 800; font-size: 0.98rem; line-height: 1.4; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  animation: bubble-in 0.25s ease-out;
}
.tester__bubble::before { content: ""; position: absolute; top: -10px; right: 22px; border: 10px solid transparent; border-top: 0; border-bottom-color: #fff; }
.tester__bubble[hidden] { display: none; }
/* While Babička speaks the stamp pulses with a golden ring */
.tester__stamp--speaking { animation: stamp-speak 1s ease-in-out infinite; }
@keyframes stamp-speak { 50% { box-shadow: 0 0 0 4px #fff, 0 0 0 14px rgba(240, 201, 122, 0.35), 0 6px 12px rgba(0, 0, 0, 0.4); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .tester__stamp, .tester__bubble { transition: none; animation: none; } }
/* On the tablecloth each coaster stands on a dark card, so the text stays readable */
.thanks-for .feature { padding: 0 18px 20px; border-radius: 16px; background: rgba(36, 23, 13, 0.88); box-shadow: 0 10px 22px rgba(36, 23, 13, 0.4); }
.thanks-for .feature__icon { margin-top: -30px; }
.thanks-for { row-gap: 52px; padding-top: 30px; }
.thanks-for .feature p { color: var(--text); }
.thanks-letter { max-width: calc(720px + 2 * var(--gutter)); }
.thanks-letter h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.thanks-letter__back { margin: 34px 0 0; text-align: center; }
@media (max-width: 720px) {
  .thanks-hero__grid { grid-template-columns: 1fr; }
  .thanks-hero .story__portrait { width: 140px; margin: 0 auto; }
}

/* ---------- Ads (assets/js/ads.js) ---------- */
/* A place between sections, clearly labelled and away from buttons (AdSense policies); hidden while ads are off.
   Fixed standard sizes per window width (the ad unit is responsive, its size comes from here):
   ad--wide 970 × 250 (728 × 90 below 1040 px), ad--leader 728 × 90, on a phone (below 760 px) both 300 × 250. */
.ad { padding: 30px 0; text-align: center; background: var(--bg-deep); border-top: 4px solid var(--wood-edge); border-bottom: 4px solid var(--wood-edge); }
.ad[hidden] { display: none; }
.ad .wrap { display: flex; flex-direction: column; align-items: center; }
.ad__label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ad__unit { display: inline-block; width: 728px; height: 90px; }
.ad--wide .ad__unit { width: 970px; height: 250px; }
@media (max-width: 1040px) { .ad--wide .ad__unit { width: 728px; height: 90px; } }
@media (max-width: 760px) { .ad .ad__unit, .ad--wide .ad__unit { width: 300px; height: 250px; } }

/* ---------- Text pages (ochrana-sukromia/) ---------- */
.legal { padding: clamp(40px, 7vw, 80px) 0; }
.legal .wrap { max-width: calc(46em + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.legal h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-top: 1.6em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }
.legal address { font-style: normal; padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 1em; }
.legal .muted { color: var(--muted); }
.legal [hidden] { display: none; }
