/* Biblické hrátky – úvodní stránka a obal her.
   Barvy z malované krajiny: hluboká modř nebe a písma, olivová zahrada, slunce, moře, růže. */
:root {
  --ink: #233044; --muted: #5a6474; --paper: #FBF6EA; --card: #ffffff; --line: #E6DCC5;
  --olive: #5E8A3A; --sun: #F2B33D; --sea: #3E86A8; --rose: #D9636C;
  --display: 'Baloo 2', system-ui, sans-serif; --body: 'Nunito', system-ui, sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ground-color, #B6D47F); }
body { margin: 0; position: relative; overflow-x: hidden; background: linear-gradient(180deg, var(--sky-top, #9FD8F3) 0, var(--sky-bot, #D1ECF8) 700px, var(--sky-bot, #D1ECF8) 100%); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
/* Styl samolepky: bílý obrys kolem tvaru a posunutý šedý stín, jako by byl nalepený na papíře. */
.sticker { filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
  drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff) drop-shadow(5px 6px 0 rgba(35,48,68,.16)); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

.sky { position: absolute; inset: 0 0 auto; height: 1100px; z-index: 0; pointer-events: none; overflow: hidden; }
.sun { position: absolute; top: 0; left: 0; width: 210px; }
.moon { position: absolute; top: 0; left: 0; width: 130px; opacity: 0; filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(5px 6px 0 rgba(0,0,0,.25)); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.sky-ready .sun, .sky-ready .moon { transition: transform 2s ease, opacity 2s; } .sky-ready .stars { transition: opacity 2s; }
.cloud { filter: brightness(calc(1 - var(--dark, 0) * 0.45)); opacity: calc(1 - var(--dark, 0) * 0.35); }
.land-art { filter: brightness(calc(1 - var(--dark, 0) * 0.45)); }
.late { position: fixed; z-index: 20; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); max-width: 360px; display: flex; gap: 12px; align-items: center; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; padding: 12px 40px 12px 14px; box-shadow: 0 0 0 5px #fff, 6px 8px 0 5px rgba(0,0,0,.2); font-size: 15px; line-height: 1.4; }
.late b { font-family: var(--display); font-size: 18px; display: block; }
.late-moon { width: 52px; flex: 0 0 auto; }
.late button { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
.cloud, .bird { position: absolute; top: 0; left: 0; will-change: transform; }
.bird { transition: opacity .6s; }
.land { position: relative; z-index: 0; margin-top: clamp(-160px, -9vw, -60px); width: 100%; pointer-events: none; }
.land-art { width: 100%; height: auto; }
.land::after { content: ''; position: absolute; inset: auto 0 0; height: 20%; background: linear-gradient(transparent, var(--ground-color, #B6D47F)); }
.season-weather { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.season-weather.leaves { position: absolute; z-index: 1; }
.season-weather[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .season-weather { display: none; } html { scroll-behavior: auto; } }
main, .top { position: relative; z-index: 1; }
h2.label { display: inline-block; margin-bottom: 0; background: #fff; color: var(--c); padding: 4px 22px 6px; border-radius: 99px; border: 3px solid var(--ink); box-shadow: 0 0 0 5px #fff, 6px 8px 0 5px rgba(35,48,68,.14); transform: rotate(-1.5deg); }
.top, main, .foot { max-width: 1120px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; padding-block: 8px; padding-inline: 14px 10px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 0 0 6px #fff, 8px 10px 0 6px rgba(35,48,68,.14); }
body { padding-top: 164px; }
.top { max-width: 1084px; } @media (max-width: 1130px) { .top { margin-inline: 18px; } }
.top + main { margin-top: 26px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 24px; }
.brand b { color: var(--olive); font-weight: 800; }
.brand small { font-size: 17px; font-weight: 700; color: var(--sea); }
.foot .why { max-width: 70ch; margin: 0 auto 10px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.top nav { display: flex; gap: 6px; }
.top nav a { text-decoration: none; font-weight: 700; padding: 6px 14px; border-radius: 99px; }
.top nav a:hover { background: #EAF4FB; }

/* Hero: malovaný Eden, text v klidné části nebe, Noe zve ke hře. */
.hero { position: relative; border-radius: 32px; overflow: hidden; min-height: 460px; display: flex; align-items: flex-start; border: 7px solid #fff; box-shadow: 8px 10px 0 rgba(35,48,68,.14); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero-text { position: relative; z-index: 1; max-width: 470px; margin: 32px; padding: 24px 28px 28px; background: rgba(251,246,234,.93); border-radius: 26px; box-shadow: 0 6px 24px rgba(35,48,68,.12); }
.kicker { margin: 0 0 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--sea); }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5.5vw, 56px); line-height: 1.05; text-wrap: balance; }
.lead { font-size: 19px; max-width: 46ch; margin: 14px 0 22px; }
.btn { display: inline-block; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 20px; padding: 12px 26px; border-radius: 99px; background: var(--sun); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 0 0 0 5px #fff, 6px 8px 0 5px rgba(35,48,68,.16); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 0 0 0 5px #fff, 8px 11px 0 5px rgba(35,48,68,.16); }
.btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 5px #fff, 3px 4px 0 5px rgba(35,48,68,.16); }
.games-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.noe { position: relative; margin: 0 20px -34px 0; width: 120px; z-index: 3; flex: 0 0 auto; }

.bubble { position: absolute; top: 4px; right: 112px; white-space: nowrap; background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 6px 14px; box-shadow: 0 0 0 5px #fff, 5px 7px 0 5px rgba(35,48,68,.16); font-family: var(--display); font-weight: 600; font-size: 18px; animation: wave 3s ease-in-out infinite; }
.bubble::after { content: ''; position: absolute; right: -12px; top: 18px; border: 8px solid transparent; border-left-color: var(--ink); }
@keyframes wave { 50% { transform: translateY(-4px) rotate(-2deg); } }

h2 { font-family: var(--display); font-weight: 700; font-size: 34px; margin: 56px 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 34px; padding-top: 14px; }
.game { position: relative; background: var(--card); border: 3px solid var(--ink); border-radius: var(--r); display: flex; flex-direction: column; box-shadow: 0 0 0 7px #fff, 9px 11px 0 7px rgba(35,48,68,.14); min-width: 0; }
.game .badge { position: absolute; top: -34px; right: 10px; width: 104px; z-index: 2; transform: rotate(8deg); }
.cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 3px solid var(--ink); border-radius: calc(var(--r) - 3px) calc(var(--r) - 3px) 0 0; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game:hover .cover img { transform: scale(1.04); }
.game .body { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game h3 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--c); }
.game .tag { margin: 0; font-weight: 800; color: var(--muted); }
.game p { margin: 0; }
.chips { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--paper); border: 2px solid var(--line); border-radius: 99px; padding: 2px 12px; font-weight: 700; font-size: 14px; }
.game .btn { align-self: flex-start; margin-top: auto; font-size: 18px; }
.game.soon { border-style: dashed; box-shadow: none; background: transparent; }
.game.soon img { width: 96px; height: auto; }
.game.soon .body { align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.game.soon h3 { color: var(--ink); font-size: 24px; }

.parents ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.parents li { background: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: 6px 8px 0 rgba(35,48,68,.1); }
.parents li img { width: 84px; height: 84px; object-fit: contain; display: block; margin-bottom: 8px; }
.parents b { display: block; font-family: var(--display); font-weight: 600; font-size: 19px; }

.foot { position: relative; z-index: 1; max-width: none; margin-top: -1px; padding-block: 4px 30px; background: var(--ground-color, #B6D47F); color: var(--footer-ink, var(--ink)); font-size: 14px; text-align: center; font-weight: 700; }
.foot p { margin: 4px 0; }

@media (max-width: 700px) {
  .hero { min-height: 540px; }
  .hero-text { margin: 14px; padding: 20px 20px 24px; }
  .hero { align-items: flex-start; }
  .noe { width: 110px; right: 12px; }
  .bubble { right: 80px; font-size: 16px; }
  h2 { font-size: 28px; margin-top: 44px; }
  .sun { width: 120px; } .moon { width: 84px; } body { padding-top: 110px; } .top { margin-inline: 12px; } .noe { width: 86px; margin-right: 4px; } .bubble { right: 80px; }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } .btn, .cover img { transition: none; } }

/* Obal hry: lišta s návratem a hra přes celou zbylou plochu. */
body.play { padding-top: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--ink); }
.playbar { display: flex; align-items: center; gap: 12px; padding: 6px max(12px, env(safe-area-inset-left)); background: var(--ink); color: #fff; }
.playbar a { text-decoration: none; font-weight: 800; padding: 6px 14px; border-radius: 99px; background: rgba(255,255,255,.12); }
.playbar a:hover { background: rgba(255,255,255,.22); }
.playbar span { font-family: var(--display); font-weight: 600; font-size: 20px; }
.playbar button { margin-left: auto; font: inherit; font-weight: 800; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
body.play iframe { flex: 1; width: 100%; border: 0; background: #000; }

/* Game catalog: category pills and a compact, keyboard-accessible pager. */
.game-catalog{margin:32px 0 36px;padding:18px 20px 14px;background:#fff9edee;border:2px solid #fff;border-radius:24px;box-shadow:0 5px 0 #23304415;scroll-margin-top:20px}
.category-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-family:var(--display);font-size:22px;font-weight:700}.catalog-note{font-family:var(--body);font-size:13px;color:var(--muted);font-weight:600}
.game-categories{display:flex;flex-wrap:wrap;gap:10px}.game-categories button,.game-pagination button{font:800 15px var(--body);color:var(--ink);min-height:46px;padding:9px 15px;border:2px solid #c6d5d7;background:white;border-radius:99px;cursor:pointer;box-shadow:0 3px 0 #23304416;transition:background .15s,transform .15s}
.game-categories button{display:flex;align-items:center;gap:8px}.category-icon{font-size:22px;line-height:1;color:#558291}.category-count{display:inline-grid;place-items:center;min-width:25px;height:25px;border-radius:50%;background:#edf2ed;font-size:12px}
.game-categories button[aria-pressed=true]{background:#3e7187;border-color:#304e60;color:white}.game-categories button[aria-pressed=true] .category-icon{color:#ffe1a0}.game-categories button[aria-pressed=true] .category-count{background:#ffffff25;color:white}
.game-categories button:hover,.game-pagination button:not(:disabled):hover{transform:translateY(-2px);border-color:#3e7187}.game-results{margin:14px 0 0;font-size:14px;color:#526775;font-weight:700;scroll-margin-top:20px}
#game-grid{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:44px}.game[hidden],.game-catalog[hidden],.game-pagination[hidden]{display:none!important}
.game-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px;margin:34px 0 14px;padding:12px}.game-pagination .page-number{min-width:46px;padding-inline:12px}.game-pagination [aria-current=page]{background:#f2b33d;border-color:#8b6328;box-shadow:0 0 0 3px white,0 4px 0 3px #23304420}.game-pagination button:disabled{opacity:.5;cursor:default;box-shadow:none}
@media(max-width:1020px){#game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){#game-grid{grid-template-columns:1fr}.game-catalog{padding:15px 12px;margin-top:38px}.category-heading{font-size:19px}.catalog-note{display:none}.game-categories{gap:8px}.game-categories button{padding:8px 11px;font-size:13px;gap:6px}.category-icon{font-size:18px}.game-pagination{gap:8px;padding:8px 0}.game-pagination button{font-size:13px;padding:9px 12px}}
@media(prefers-reduced-motion:reduce){.game-categories button,.game-pagination button{transition:none}.game-categories button:hover,.game-pagination button:not(:disabled):hover{transform:none}}
.game-categories button[hidden]{display:none!important}
/* Let the game iframe shrink to the viewport on small landscape displays. */
body.play iframe { min-height: 0; min-width: 0; }
.playbar span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .playbar { gap: 6px; padding: 4px 6px; }
  .playbar span { font-size: 14px; flex: 1; }
  .playbar a, .playbar button { padding: 6px 8px; font-size: 12px; flex-shrink: 0; }
}
