/* ==========================================================================
   Zalka Books · Łamigłówki — style strony.
   Identyfikacja jak na okładkach serii Sudoku: kremowy papier, szeryfowy
   tytuł (DM Serif Display), geometryczny bezszeryf (Poppins), czerwone słońce.
   Tekst bazowo 18 px — część czytelników to seniorzy.
   ========================================================================== */

:root {
  --paper: #f3ede2;
  --paper-2: #ebe3d3;
  --card: #fbf8f2;
  --ink: #151515;
  --ink-2: #45423c;
  --muted: #6e6a62;
  --line: #d9d0c0;
  --line-2: #c6bcaa;
  --red: #dd0502;
  --red-dark: #b10401;
  --navy: #1d2b5c;
  --navy-soft: #e3e9f0;
  --ok: #1f7a4d;
  --err-bg: #fbd9d6;
  --sel: #f6d27a;
  --peer: #e8dfcd;
  --same: #f3e3b3;

  --f-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --f-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(21, 21, 21, .06), 0 10px 30px -12px rgba(21, 21, 21, .22);
  --shadow-lg: 0 2px 4px rgba(21, 21, 21, .06), 0 24px 60px -20px rgba(21, 21, 21, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  font: 500 16px/1.2 var(--f-sans); text-decoration: none; text-align: center;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(243, 237, 226, .9);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(21, 21, 21, .07);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-sun {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 38% 36%, #ff3b2f, var(--red) 60%, #a80300);
}
.brand-name { font: 400 23px/1 var(--f-display); letter-spacing: -.01em; }
.brand-name em {
  font: 500 12px/1 var(--f-sans); font-style: normal; text-transform: uppercase;
  letter-spacing: .18em; color: var(--muted); margin-left: 10px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.nav-links > a:hover { background: rgba(21, 21, 21, .06); color: var(--ink); }
.nav-links > a[aria-current="page"] { color: var(--ink); background: rgba(21, 21, 21, .07); }
.langs { display: inline-flex; gap: 2px; margin-left: 10px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.langs a {
  min-width: 40px; padding: 6px 9px; border-radius: 999px; text-align: center;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-decoration: none; color: var(--muted);
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  position: relative; z-index: 2;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 19px; }
.nav-toggle span:last-child { top: 27px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }

/* ---------- typografia sekcji ---------- */
.kicker {
  font: 600 13px/1.4 var(--f-sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.serif-i { font-style: italic; color: var(--ink-2); }
h1 { font: 400 clamp(44px, 6.6vw, 82px)/1.02 var(--f-display); letter-spacing: -.02em; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font: 400 clamp(36px, 4.8vw, 58px)/1.05 var(--f-display); letter-spacing: -.015em; }
.section-head h2::after {
  content: ""; display: block; width: 54px; height: 4px; background: var(--red); margin-top: 22px;
}
.section-lead { margin-top: 22px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 640px; }
.lead { margin-top: 26px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 560px; }

.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.section-tint { background: var(--paper-2); }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(24px, 4vw, 48px); overflow: hidden; }
.hero-wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 520px; width: 100%; justify-self: center; }
.hero-art .sun { position: absolute; width: 74%; right: 0; top: 0; }
.mini-grid {
  position: absolute; left: 4%; bottom: 2%; width: 72%; aspect-ratio: 1;
  display: grid; grid-template-columns: repeat(9, 1fr);
  background: var(--card); border: 3px solid var(--ink); box-shadow: var(--shadow-lg);
  transform: rotate(-9deg);
}
.mini-grid span {
  display: grid; place-items: center; font: 400 clamp(14px, 2.2vw, 26px)/1 var(--f-sans);
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.mini-grid span:nth-child(9n) { border-right: 0; }
.mini-grid span:nth-child(9n+3), .mini-grid span:nth-child(9n+6) { border-right: 2px solid var(--ink); }
.mini-grid span:nth-child(n+19):nth-child(-n+27),
.mini-grid span:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--ink); }
.mini-grid span:nth-child(n+73) { border-bottom: 0; }

/* wachlarz okładek na stronach serii */
.fan { position: relative; height: clamp(340px, 42vw, 500px); }
.fan img {
  position: absolute; width: 58%; top: 50%; left: 50%;
  border-radius: 6px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%);
}
.fan.n2 img:nth-child(1) { transform: translate(-80%, -50%) rotate(-7deg); }
.fan.n2 img:nth-child(2) { transform: translate(-22%, -46%) rotate(5deg); }
.fan.n3 img:nth-child(1) { transform: translate(-98%, -46%) rotate(-10deg); width: 50%; }
.fan.n3 img:nth-child(2) { transform: translate(-2%, -46%) rotate(9deg); width: 50%; }
.fan.n3 img:nth-child(3) { transform: translate(-50%, -52%); width: 54%; z-index: 2; }

/* ---------- kafelki rodzajów ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.tiles.n1 { grid-template-columns: minmax(0, 560px); }
.tiles.n2, .tiles.n4 { grid-template-columns: repeat(2, 1fr); }
.tile {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile-covers {
  position: relative; height: 230px; background: var(--paper-2); overflow: hidden;
}
.tile-covers img {
  position: absolute; width: 38%; bottom: -24%; left: 50%; border-radius: 4px; box-shadow: var(--shadow);
  transform: translateX(-50%); transition: transform .45s var(--ease);
}
.tile-covers.n2 img:nth-child(1) { transform: translateX(-90%) rotate(-6deg); }
.tile-covers.n2 img:nth-child(2) { transform: translateX(-10%) rotate(5deg); }
.tile-covers.n3 img:nth-child(1) { transform: translateX(-125%) rotate(-9deg); }
.tile-covers.n3 img:nth-child(2) { transform: translateX(25%) rotate(8deg); }
.tile-covers.n3 img:nth-child(3) { transform: translateX(-50%) translateY(-6%); z-index: 2; }
.tile:hover .tile-covers img:last-child { transform: translateX(-50%) translateY(-12%); }
.tile:hover .tile-covers.n2 img:last-child { transform: translateX(-10%) translateY(-8%) rotate(5deg); }
.tile-body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-body h3 { font: 400 30px/1.1 var(--f-display); }
.tile-body p { color: var(--ink-2); font-size: 16px; }
.tile-meta { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--red); }
.arrow { display: inline-block; transition: transform .3s var(--ease); }
.tile:hover .arrow { transform: translateX(4px); }

/* ---------- karty książek ---------- */
.books { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 2.6vw, 32px); }
.books.n1 { grid-template-columns: minmax(0, 800px); }
.book {
  display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: clamp(18px, 2.4vw, 28px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(18px, 2.2vw, 26px); box-shadow: var(--shadow);
}
.book-cover {
  padding: 0; border: 0; background: none; cursor: zoom-in; align-self: start;
  border-radius: 6px; overflow: hidden; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
  transition: transform .35s var(--ease);
}
.book-cover:hover { transform: translateY(-3px) rotate(-1deg); }
.book-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.book-set { font: 600 12px/1.4 var(--f-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.book h3 { font: 400 28px/1.1 var(--f-display); }
.book-sub { font-weight: 500; font-size: 16px; color: var(--ink-2); }
.book-desc { font-size: 16px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.chips li {
  padding: 4px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy);
  font-size: 13px; font-weight: 600;
}
.facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px 14px;
  margin: 6px 0 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-size: 16px; white-space: nowrap; }
.book-sol { font-size: 14px; color: var(--muted); }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }

/* ---------- duży druk ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 24px); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 10px;
}
.stat strong { font: 400 clamp(38px, 3.6vw, 54px)/1 var(--f-display); color: var(--ink); white-space: nowrap; }
.stat span { color: var(--ink-2); font-size: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 30px); counter-reset: step; }
.step { position: relative; display: flex; flex-direction: column; gap: 16px; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: -14px; left: -10px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font: 400 24px/1 var(--f-display);
}
.step-cover { display: block; width: 62%; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-lg); transition: transform .35s var(--ease); }
.step-cover:hover { transform: translateY(-4px); }
.step p:last-child { color: var(--ink-2); font-size: 16px; }

.gift .section-head { margin-bottom: 0; }

/* ---------- zasady ---------- */
.rules-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.rules-wrap .section-head { margin-bottom: 0; }
.rules { margin: 0; padding: 0; list-style: none; counter-reset: rule; display: grid; gap: 14px; }
.rules li {
  counter-increment: rule; position: relative; padding: 18px 20px 18px 72px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 17px;
}
.rules li::before {
  content: counter(rule); position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--red); color: var(--red); font: 400 20px/1 var(--f-display);
}
.sample-wrap { display: grid; justify-items: center; }
.sample-wrap .section-head { text-align: center; }
.sample-wrap .section-head h2::after { margin-left: auto; margin-right: auto; }
.sample-page {
  padding: 0; border: 1px solid var(--line); background: #fff; cursor: zoom-in; max-width: 620px;
  border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(-1.2deg);
  transition: transform .35s var(--ease);
}
.sample-page:hover { transform: rotate(0); }

/* ---------- gra ---------- */
.play { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.play .section-head { margin-bottom: 0; position: sticky; top: 110px; }
.game { --cell: clamp(32px, 8.4vw, 52px); width: max-content; max-width: 100%; justify-self: center; }
.game-large { --cell: clamp(34px, 9.4vw, 60px); }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.game-counter { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.game-grid {
  display: grid; grid-template-columns: repeat(9, var(--cell)); grid-auto-rows: var(--cell);
  border: 3px solid var(--ink); background: var(--card); box-shadow: var(--shadow-lg);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.cell {
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  background: transparent; color: var(--navy);
  font: 500 calc(var(--cell) * .56)/1 var(--f-sans);
  transition: background .12s;
}
.cell:nth-child(9n) { border-right: 0; }
.cell:nth-child(9n+3), .cell:nth-child(9n+6) { border-right: 2px solid var(--ink); }
.cell:nth-child(n+19):nth-child(-n+27), .cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--ink); }
.cell:nth-child(n+73) { border-bottom: 0; }
.cell.given { color: var(--ink); font-weight: 600; cursor: default; }
.cell.peer { background: var(--peer); }
.cell.same { background: var(--same); }
.cell.selected { background: var(--sel); }
.cell.error { background: var(--err-bg); color: var(--red); }
.cell:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; border-radius: 0; }
.game.solved .game-grid { border-color: var(--ok); }
.game-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.game-pad button {
  min-height: 52px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
  font: 500 22px/1 var(--f-sans); cursor: pointer; transition: background .15s, border-color .15s;
}
.game-pad button:hover { border-color: var(--ink); }
.game-pad button:active { background: var(--sel); }
.game-pad .pad-erase { color: var(--muted); }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.game-msg { min-height: 1.65em; margin-top: 14px; font-weight: 600; }
.game-msg.ok { color: var(--ok); }
.game-msg.err { color: var(--red); }
.game-hint { font-size: 14px; color: var(--muted); max-width: calc(var(--cell) * 9 + 6px); }

/* ---------- darmowe sudoku ---------- */
.free { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.free .section-head { margin-bottom: 28px; }
.free-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.free-art { position: relative; height: clamp(300px, 34vw, 420px); }
.sheet {
  position: absolute; width: 62%; aspect-ratio: 8.5 / 11; background: #fff; border-radius: 4px;
  box-shadow: var(--shadow-lg); padding: 12% 10%; left: 8%; top: 4%; transform: rotate(-6deg);
}
.sheet-2 { left: 32%; top: 12%; transform: rotate(5deg); }
.sheet-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); aspect-ratio: 1; border: 2px solid var(--ink);
}
.sheet-grid span { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sheet-grid span:nth-child(9n) { border-right: 0; }
.sheet-grid span:nth-child(9n+3), .sheet-grid span:nth-child(9n+6) { border-right: 1.5px solid var(--ink); }
.sheet-grid span:nth-child(n+19):nth-child(-n+27), .sheet-grid span:nth-child(n+46):nth-child(-n+54) { border-bottom: 1.5px solid var(--ink); }
.sheet-grid span:nth-child(n+73) { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-child { border-top: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: 400 30px/1 var(--f-display); color: var(--red); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 680px; }

/* ---------- stopka ---------- */
.site-footer { background: var(--ink); color: #e9e3d8; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.footer-grid p { font-size: 15px; max-width: 360px; margin-top: 10px; }
.footer-brand { font-size: 26px; }
.footer-brand em { color: #a39d92; }
.site-footer .muted { color: #a39d92; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.footer-links a, .footer-publisher { text-decoration: none; font-size: 15px; }
.footer-links a:hover, .footer-publisher:hover { text-decoration: underline; }
.footer-publisher { display: inline-block; font-weight: 600; }
.langs-footer { margin: 18px 0 0; border-color: #4a463f; }
.langs-footer a { color: #a39d92; }
.langs-footer a[aria-current="true"] { background: #e9e3d8; color: var(--ink); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid #34312c; font-size: 13px; color: #a39d92; }

/* ---------- podgląd stron ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(15, 14, 12, .82); padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox-panel {
  width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.lightbox-top, .lightbox-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 22px;
}
.lightbox-title { font: 400 21px/1.2 var(--f-display); }
.lightbox-close {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  font-size: 30px; line-height: 1; flex: none;
}
.lightbox-close:hover { background: rgba(21, 21, 21, .08); }
.lightbox-stage { position: relative; background: var(--paper-2); display: grid; place-items: center; min-height: 0; flex: 1; overflow: hidden; }
.lightbox-stage img { max-height: calc(100vh - 190px); width: auto; background: #fff; box-shadow: var(--shadow); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(251, 248, 242, .95); box-shadow: var(--shadow); font-size: 32px; line-height: 1;
}
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-nav:disabled { opacity: .35; cursor: default; }
.lightbox-bottom { font-size: 14px; color: var(--muted); }

/* ---------- strony pomocnicze (wybór języka, 404) ---------- */
.plain-page { min-height: 100vh; display: grid; place-items: center; }
.plain { max-width: 900px; padding-top: 60px; padding-bottom: 60px; }
.plain h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 28px; }
.lang-choice { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lang-choice a {
  display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); text-decoration: none; font-weight: 600;
}
.lang-choice span { font-weight: 400; color: var(--muted); }
.big-404 { font: 400 clamp(90px, 16vw, 180px)/1 var(--f-display); color: var(--red); margin-bottom: 20px; }
.nf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.nf-grid h2 { font: 400 28px/1.1 var(--f-display); margin-bottom: 10px; }
.nf-grid p + p { margin-top: 16px; }

/* ---------- animacje przy przewijaniu ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .tile:hover, .book-cover:hover, .step-cover:hover { transform: none; }
}

/* ---------- układ wąski ---------- */
@media (max-width: 1020px) {
  .books { grid-template-columns: 1fr; max-width: 720px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .play, .rules-wrap, .faq-wrap, .free { grid-template-columns: 1fr; }
  .play .section-head { position: static; }
  .game { justify-self: start; }
}
@media (max-width: 880px) {
  /* backdrop-filter robi z nagłówka blok odniesienia dla position: fixed —
     menu na pełny ekran zmieściłoby się wtedy tylko w pasku nagłówka */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 6px;
    background: var(--paper); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links > a { font: 400 30px/1.2 var(--f-display); color: var(--ink); padding: 10px 20px; }
  .langs { margin: 22px 0 0; }
  .langs a { min-width: 56px; padding: 10px 12px; font-size: 15px; }
  body.menu-open { overflow: hidden; }
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; }
  .fan { height: clamp(300px, 70vw, 420px); }
  .tiles, .tiles.n2, .tiles.n4 { grid-template-columns: 1fr; max-width: 560px; }
  .steps { grid-template-columns: 1fr; max-width: 520px; gap: 34px; }
  .step { flex-direction: row; align-items: center; }
  .step-cover { width: 34%; flex: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .nf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand-name { font-size: 20px; }
  .brand-name em { display: none; }
  .book { grid-template-columns: 1fr; }
  .book-cover { width: 62%; justify-self: center; }
  .book-actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .lightbox { padding: 0; }
  .lightbox-panel { border-radius: 0; height: 100%; }
  .lightbox-stage img { max-height: calc(100vh - 150px); }
  .lightbox-nav { width: 44px; height: 44px; font-size: 26px; }
  .game { --cell: calc((100vw - 2 * var(--gutter) - 6px) / 9); }
  .game-large { --cell: calc((100vw - 2 * var(--gutter) - 6px) / 9); }
}
