/* Shared shell keeps the original Bubák linocut ink (language picker, buttons).
   Worlds are full-bleed illustrated scenes; the space map matches the planet
   renders' own background (#00061b) so the planets sit in it seamlessly. */
:root {
  --ink: #14110f;
  --ink-2: #221c18;
  --ink-3: #3a302a;
  --paper: #efe3cc;
  --paper-dim: #b8aa92;
  --pumpkin: #f26b1d;
  --space: #00061b;
  --frost: #bfe6f2;
  --gold: #f3c77a;
  --font-display: "Rubik Dirt", "Rubik", "Arial Black", system-ui, sans-serif;
  --font-ui: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { overscroll-behavior: none; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body {
  background: var(--space);
  color: var(--paper);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.screen { position: fixed; inset: 0; }
.screen[hidden] { display: none; }

/* ---------- language ---------- */
#lang {
  background: var(--ink);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .09; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.lang-title {
  margin: 0;
  font: 400 clamp(3rem, 12vmin, 6rem)/.9 var(--font-display);
  color: var(--paper);
  text-shadow: 4px 4px 0 var(--pumpkin);
}
.flags { display: flex; gap: 18px; }
.flag {
  appearance: none; cursor: pointer;
  width: clamp(64px, 16vmin, 96px); aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--ink-3);
  background: var(--ink-2);
  font-size: clamp(2rem, 9vmin, 3.4rem);
  line-height: 1;
  box-shadow: 4px 4px 0 var(--ink-3);
  transition: transform .15s ease;
}
.flag.on { border-color: var(--paper); box-shadow: 5px 5px 0 var(--pumpkin); }
.flag.on:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--pumpkin); }
.flag.soon { opacity: .35; filter: grayscale(1); cursor: default; }
.lang-name { margin: 0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--paper-dim); }

/* ---------- space map ---------- */
#map { background: radial-gradient(120% 90% at 50% 55%, #071034 0%, var(--space) 60%); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.track {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Half a screen of padding so the first and last planet can sit in the middle. */
  padding-inline: calc(50vw - var(--slot) / 2);
  --slot: min(72vmin, 560px);
  gap: calc(var(--slot) * -0.08);
  outline: none;
}
.track::-webkit-scrollbar { display: none; }
.planet {
  flex: none;
  width: var(--slot); aspect-ratio: 1;
  scroll-snap-align: center;
  position: relative;
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer;
  will-change: transform;
}
.planet .body {
  position: absolute; inset: 0;
  animation: bob 6s ease-in-out infinite;
}
.planet img {
  width: 100%; height: 100%; display: block; object-fit: contain;
  /* Fade the square render into space. */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 70%);
  pointer-events: none;
}
/* The render's near-black backdrop drops out against the lighter space gradient.
   Set on the planet itself: it is the stacking context that meets the backdrop. */
.planet:not(.locked) { mix-blend-mode: lighten; }
.planet canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.planet.locked .sphere {
  position: absolute; inset: 16%; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 50% 50%, #1b2346 0%, #0b1030 60%, #050820 100%);
  box-shadow: inset -18px -24px 50px rgba(0,0,0,.7), 0 0 60px rgba(120, 150, 255, .15);
  filter: blur(.3px);
}
.planet.locked .fog {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(170,190,255,.22), transparent 65%);
  animation: fog 9s ease-in-out infinite alternate;
}
.planet.locked .lock {
  position: absolute; left: 50%; top: 50%; width: 22%; translate: -50% -50%;
  fill: none; stroke: rgba(220, 230, 255, .75); stroke-width: 1.6; stroke-linecap: round;
}
@keyframes bob { 50% { transform: translateY(-1.6%); } }
@keyframes fog { to { transform: scale(1.08) rotate(8deg); opacity: .7; } }

.planet-name {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0; text-align: center;
  font: 600 clamp(1rem, 3.4vmin, 1.4rem)/1.2 var(--font-ui);
  letter-spacing: .06em; color: var(--frost);
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
  pointer-events: none;
}

/* ---------- room ---------- */
#room { background: #000; }
.stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.clip { position: absolute; left: var(--ox, 0); top: var(--oy, 0); width: var(--vw, 100%); height: var(--vh, 100%); object-fit: cover; }
/* Soft room behind the film where a narrow window leaves space above and below it. */
.stage::before { content: ""; position: absolute; inset: -60px; background: url("img/izba-zima.jpg") center / cover; filter: blur(30px) brightness(.4); }
.clip.layer { opacity: 0; }
.clip.layer.show { opacity: 1; }
#room.calm .hit { pointer-events: none; }
.hit { position: absolute; border-radius: 45%; cursor: pointer; }
.fx { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  animation: rise 1.1s ease-out forwards;
}
@keyframes rise { to { transform: translateY(-80px) scale(1.4); opacity: 0; } }

.ui {
  position: absolute; top: max(12px, env(safe-area-inset-top));
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  appearance: none; cursor: pointer;
  border: 2px solid rgba(239, 227, 204, .5);
  background: rgba(20, 17, 15, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-weight: 700; font-size: 1.05rem;
}
.ui svg { width: 26px; height: 26px; fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ui.back { left: max(12px, env(safe-area-inset-left)); }

/* While Bubák sleeps, a tap anywhere wakes him; the room dims a touch. */
#room.sleeping .stage::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 4, 20, .25); pointer-events: none;
}


/* ---------- advent calendar ---------- */
/* The calendar hangs in Bubák's burrow: his room, blurred and warm, behind a board of
   little oak doors. Locked days are frosted over; today's door glows like candlelight. */
/* Ice lettering pieces (icicles, flakes, snow, sparkles), shared by every winter screen. */
:root {
  --hinge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 16'%3E%3Crect x='0' y='1' width='6' height='14' rx='2' fill='%2326211d' stroke='%235e554c' stroke-width='.8'/%3E%3Cpath d='M5 5.5H48Q56 5.5 57 8Q56 10.5 48 10.5H5Z' fill='%232c2622' stroke='%235e554c' stroke-width='.8'/%3E%3Ccircle cx='18' cy='8' r='1.4' fill='%236f655b'/%3E%3Ccircle cx='34' cy='8' r='1.4' fill='%236f655b'/%3E%3Ccircle cx='50' cy='8' r='1.4' fill='%236f655b'/%3E%3C/svg%3E");
  --flakes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23eef8ff' stroke-linecap='round'%3E%3Cpath d='M10.0 18.0L10.0 9.0M10.0 13.1L8.5 10.8M10.0 13.1L11.5 10.8M10.0 18.0L17.8 13.5M14.3 15.5L15.5 13.1M14.3 15.5L17.0 15.7M10.0 18.0L17.8 22.5M14.3 20.5L17.0 20.3M14.3 20.5L15.5 22.9M10.0 18.0L10.0 27.0M10.0 22.9L11.5 25.2M10.0 22.9L8.5 25.2M10.0 18.0L2.2 22.5M5.7 20.5L4.5 22.9M5.7 20.5L3.0 20.3M10.0 18.0L2.2 13.5M5.7 15.5L3.0 15.7M5.7 15.5L4.5 13.1' stroke-width='1.8'/%3E%3Cpath d='M88.0 14.0L88.0 7.0M88.0 10.1L86.8 8.4M88.0 10.1L89.2 8.4M88.0 14.0L94.1 10.5M91.3 12.1L92.2 10.2M91.3 12.1L93.4 12.2M88.0 14.0L94.1 17.5M91.3 15.9L93.4 15.8M91.3 15.9L92.2 17.8M88.0 14.0L88.0 21.0M88.0 17.9L89.2 19.6M88.0 17.9L86.8 19.6M88.0 14.0L81.9 17.5M84.7 15.9L83.8 17.8M84.7 15.9L82.6 15.8M88.0 14.0L81.9 10.5M84.7 12.1L82.6 12.2M84.7 12.1L83.8 10.2' stroke-width='1.4'/%3E%3Cpath d='M93.0 62.0L93.0 52.0M93.0 56.5L91.3 54.0M93.0 56.5L94.7 54.0M93.0 62.0L101.7 57.0M97.8 59.2L99.1 56.5M97.8 59.2L100.8 59.5M93.0 62.0L101.7 67.0M97.8 64.8L100.8 64.5M97.8 64.8L99.1 67.5M93.0 62.0L93.0 72.0M93.0 67.5L94.7 70.0M93.0 67.5L91.3 70.0M93.0 62.0L84.3 67.0M88.2 64.8L86.9 67.5M88.2 64.8L85.2 64.5M93.0 62.0L84.3 57.0M88.2 59.2L85.2 59.5M88.2 59.2L86.9 56.5' stroke-width='2.0'/%3E%3Cpath d='M8.0 78.0L8.0 72.0M8.0 74.7L7.0 73.2M8.0 74.7L9.0 73.2M8.0 78.0L13.2 75.0M10.9 76.3L11.6 74.7M10.9 76.3L12.7 76.5M8.0 78.0L13.2 81.0M10.9 79.7L12.7 79.5M10.9 79.7L11.6 81.3M8.0 78.0L8.0 84.0M8.0 81.3L9.0 82.8M8.0 81.3L7.0 82.8M8.0 78.0L2.8 81.0M5.1 79.7L4.4 81.3M5.1 79.7L3.3 79.5M8.0 78.0L2.8 75.0M5.1 76.3L3.3 76.5M5.1 76.3L4.4 74.7' stroke-width='1.2'/%3E%3Cpath d='M70.0 92.0L70.0 86.0M70.0 88.7L69.0 87.2M70.0 88.7L71.0 87.2M70.0 92.0L75.2 89.0M72.9 90.3L73.6 88.7M72.9 90.3L74.7 90.5M70.0 92.0L75.2 95.0M72.9 93.7L74.7 93.5M72.9 93.7L73.6 95.3M70.0 92.0L70.0 98.0M70.0 95.3L71.0 96.8M70.0 95.3L69.0 96.8M70.0 92.0L64.8 95.0M67.1 93.7L66.4 95.3M67.1 93.7L65.3 93.5M70.0 92.0L64.8 89.0M67.1 90.3L65.3 90.5M67.1 90.3L66.4 88.7' stroke-width='1.2'/%3E%3Cpath d='M30.0 6.0L30.0 1.5M30.0 3.5L29.2 2.4M30.0 3.5L30.8 2.4M30.0 6.0L33.9 3.7M32.1 4.8L32.7 3.5M32.1 4.8L33.5 4.9M30.0 6.0L33.9 8.2M32.1 7.2L33.5 7.1M32.1 7.2L32.7 8.5M30.0 6.0L30.0 10.5M30.0 8.5L30.8 9.6M30.0 8.5L29.2 9.6M30.0 6.0L26.1 8.3M27.9 7.2L27.3 8.5M27.9 7.2L26.5 7.1M30.0 6.0L26.1 3.7M27.9 4.8L26.5 4.9M27.9 4.8L27.3 3.5' stroke-width='1'/%3E%3Cpath d='M56.0 4.0L56.0 0.5M56.0 2.1L55.4 1.2M56.0 2.1L56.6 1.2M56.0 4.0L59.0 2.2M57.7 3.0L58.1 2.1M57.7 3.0L58.7 3.1M56.0 4.0L59.0 5.7M57.7 5.0L58.7 4.9M57.7 5.0L58.1 5.9M56.0 4.0L56.0 7.5M56.0 5.9L56.6 6.8M56.0 5.9L55.4 6.8M56.0 4.0L53.0 5.8M54.3 5.0L53.9 5.9M54.3 5.0L53.3 4.9M56.0 4.0L53.0 2.2M54.3 3.0L53.3 3.1M54.3 3.0L53.9 2.1' stroke-width='1'/%3E%3Cpath d='M97.0 36.0L97.0 32.0M97.0 33.8L96.3 32.8M97.0 33.8L97.7 32.8M97.0 36.0L100.5 34.0M98.9 34.9L99.4 33.8M98.9 34.9L100.1 35.0M97.0 36.0L100.5 38.0M98.9 37.1L100.1 37.0M98.9 37.1L99.4 38.2M97.0 36.0L97.0 40.0M97.0 38.2L97.7 39.2M97.0 38.2L96.3 39.2M97.0 36.0L93.5 38.0M95.1 37.1L94.6 38.2M95.1 37.1L93.9 37.0M97.0 36.0L93.5 34.0M95.1 34.9L93.9 35.0M95.1 34.9L94.6 33.8' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
  --flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23f2faff' stroke-linecap='round'%3E%3Cpath d='M20.0 20.0L20.0 3.0M20.0 10.6L17.1 6.4M20.0 10.6L22.9 6.4M20.0 20.0L34.7 11.5M28.1 15.3L30.3 10.7M28.1 15.3L33.2 15.7M20.0 20.0L34.7 28.5M28.1 24.7L33.2 24.3M28.1 24.7L30.3 29.3M20.0 20.0L20.0 37.0M20.0 29.4L22.9 33.6M20.0 29.4L17.1 33.6M20.0 20.0L5.3 28.5M11.9 24.7L9.7 29.3M11.9 24.7L6.8 24.3M20.0 20.0L5.3 11.5M11.9 15.3L6.8 15.7M11.9 15.3L9.7 10.7' stroke-width='2.6'/%3E%3C/g%3E%3C/svg%3E");
  --snowcap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 32' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23cfe6f5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url%28%23g%29' d='M0 22Q8.4 -1.8 16.9 7.5Q27.5 -2.4 38.1 6.3Q45.2 -3.9 52.3 7.0Q60.7 -5.0 69.1 7.9Q81.1 -1.3 93.1 8.6Q101.0 -2.4 108.9 9.5Q119.1 -3.2 129.2 8.7Q136.6 -3.3 144.0 8.4Q152.8 1.8 161.6 9.5Q171.4 -3.0 181.3 9.5Q192.5 -4.4 200.0 7.6L200 22Q190.2 25.6 180.4 22Q169.8 29.0 159.2 22Q153.6 23.1 148.0 22Q141.7 29.7 135.4 22Q127.8 27.0 120.2 22Q113.3 26.1 106.5 22Q99.2 24.8 91.9 22Q83.4 26.7 74.9 22Q64.5 27.5 54.0 22Q43.5 28.9 32.9 22Q21.9 27.4 11.0 22Q5.0 28.9 0.0 22Z'/%3E%3C/svg%3E");
  --sparkles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff'%3E%3Cpath d='M84 5Q84 14 93 14Q84 14 84 23Q84 14 75 14Q84 14 84 5Z'/%3E%3Cpath d='M14 24Q14 30 20 30Q14 30 14 36Q14 30 8 30Q14 30 14 24Z'/%3E%3Cpath d='M90 65Q90 70 95 70Q90 70 90 75Q90 70 85 70Q90 70 90 65Z'/%3E%3Cpath d='M22 81Q22 88 29 88Q22 88 22 95Q22 88 15 88Q22 88 22 81Z'/%3E%3C/g%3E%3C/svg%3E");
  --icicles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 30' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f6fcff'/%3E%3Cstop offset='.35' stop-color='%23cdebfb'/%3E%3Cstop offset='1' stop-color='%239fd2f0' stop-opacity='.35'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url%28%23g%29' stroke='%23ffffff' stroke-opacity='.7' stroke-width='.6' d='M0 0H200V3H196.0L193.1 15L190.7 3H188.1L185.8 12L183.9 3H181.5L179.1 19L177.2 3H176.1L172.9 12L170.4 3H168.4L165.0 9L162.2 3H157.9L155.4 19L153.4 3H149.9L146.4 9L143.5 3H140.2L137.1 19L134.6 3H133.4L129.4 23L126.0 3H123.3L119.9 23L117.2 3H113.9L110.2 12L107.2 3H103.9L100.3 29L97.3 3H95.9L92.2 9L89.1 3H85.6L82.3 11L79.6 3H75.5L72.3 17L69.7 3H67.2L64.5 15L62.2 3H58.4L55.7 23L53.4 3H50.3L46.2 17L42.8 3H40.7L36.3 12L32.8 3H29.7L27.2 29L25.1 3H23.5L20.2 9L17.5 3H12.6L10.3 29L8.3 3H6.0L3.0 17L0.6 3H0Z'/%3E%3C/svg%3E");
}
#advent {
  --oak: #6b4325; --oak-d: #3e2614; --oak-l: #9a6a3e; --cream: #f3e2c0; --glow: 255, 178, 92;
  background: #140d08;
  display: grid; grid-template-rows: auto 1fr;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow: hidden;
}
#advent::before { /* a clear winter night full of stars */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 37% 9%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 64% 22%, #fff7d8, transparent), radial-gradient(1px 1px at 83% 7%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 92% 31%, #fff, transparent), radial-gradient(1px 1px at 26% 40%, #dfeaff, transparent),
    radial-gradient(1.3px 1.3px at 55% 46%, #fff, transparent), radial-gradient(1px 1px at 74% 58%, #fff, transparent);
  background-size: 260px 260px;
  opacity: .8;
}
#advent::after { /* lantern warmth from below, night at the edges */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 45% at 50% 100%, rgba(var(--glow), .14), transparent 70%);
}
#advent { background: radial-gradient(120% 80% at 50% 0%, #17203a, #080b16 60%, #050608); grid-template-rows: 1fr; }
#advent > :not(.ui) { position: relative; z-index: 1; }
#advent > .ui { z-index: 3; }

/* ---- the calendar: one painted picture with windows cut out of it ---- */
#advent { display: grid; place-items: center; padding: 0; }
#advent[hidden] { display: none; } /* the rule above must not keep the calendar over other screens */
#advent .house { position: relative; display: block; background: url("img/advent/kalendar.jpg") center / 100% 100%; }
#advent .roof-art, #advent .lights, #advent .fence { display: none; }
#advent .roof { position: absolute; inset: 0 0 auto; height: 0; margin: 0; }
#advent .advent-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#advent .windows { position: absolute; inset: 0; display: block; padding: 0; background: none; border: 0; box-shadow: none; }
#advent .win { position: absolute; background: #160b04; box-shadow: none; border-radius: 2px; }
#advent .win::after, #advent .sash::before, #advent .sash::after, #advent .win .num { display: none; }
#advent .win .inside, #advent .win .sashes { inset: 0; }
#advent .sash { background-repeat: no-repeat; background-image: url("img/advent/kalendar.jpg"); box-shadow: none; }
#advent .win.today { box-shadow: 0 0 0 2px rgba(var(--glow), .9), 0 0 24px rgba(var(--glow), .75); }
/* Phone lying down: the calendar stays as it is, and the same snowy night carries on to both
   sides (S10). The picture's side edges melt into it. */
@media (orientation: landscape) {
  /* scaled so its fence lines up with the fence of the calendar (top at about 92 % of the height) */
  #advent { background: #070b18 url("img/advent/pozadie-sirka.jpg") center top / auto 113% no-repeat; }
  #advent::before, #advent::after { display: none; }
  #advent .house {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  }
}
/* A shutter is a real board: it has a thickness and a plain wooden back, so it never vanishes
   when it turns edge-on, and an open window's shutters lie over its neighbours. */
#advent .win.locked .sash { filter: none; } /* a filter would flatten the shutter and hide its face */
#advent .win.open, #advent .win.ajar { z-index: 2; }
#advent .win.opening { z-index: 3; }
#advent .sash { transform-style: preserve-3d; --th: clamp(4px, 1.1vmin, 7px); }
#advent .sash::before, #advent .sash::after { display: block; content: ""; position: absolute; filter: none; }
#advent .sash::after { /* the back of the shutter */
  inset: 0; width: auto; aspect-ratio: auto; border-radius: 0; translate: none;
  transform: translateZ(calc(var(--th) * -1));
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(33.3% - 1px), rgba(20, 9, 3, .6) calc(33.3% - 1px) 33.3%),
    linear-gradient(180deg, #6e4423, #4b2c15);
  box-shadow: inset 0 0 0 1px rgba(20, 9, 3, .8);
}
#advent .sash::before { /* the edge of the board */
  top: 0; bottom: 0; width: var(--th); background: linear-gradient(90deg, #5a3519, #8a5a30, #5a3519);
}
#advent .sash.l::before { left: auto; right: 0; transform-origin: 100% 50%; transform: rotateY(90deg); }
#advent .sash.r::before { right: auto; left: 0; transform-origin: 0 50%; transform: rotateY(-90deg); }

/* ---- the little wooden house (drawn version, kept as fallback) ---- */
.house { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.roof { position: relative; height: clamp(100px, 27vmin, 160px); margin: 0 -10px -4px; z-index: 2; }
.roof-art { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.advent-title {
  position: absolute; left: 0; right: 0; top: 34%; margin: 0; text-align: center;
  font-size: clamp(2.2rem, 10vmin, 4rem); line-height: 1;
}
.lights { position: absolute; left: 8%; right: 8%; bottom: 2px; height: 22px; pointer-events: none; }
.lights::before { /* the wire */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px;
  border-bottom: 1.5px solid #1c1208; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.lights i {
  position: absolute; top: calc(var(--y) * 15px - 1px); width: 6px; height: 8px; margin-left: -3px; border-radius: 45% 45% 50% 50%;
  background: radial-gradient(circle at 50% 40%, #fff6d6, #ffc35e 55%, #e08a2a);
  box-shadow: 0 0 6px 2px rgba(255, 190, 90, .85), 0 0 16px 4px rgba(255, 170, 70, .35);
  animation: twinkle 3s ease-in-out infinite;
}
.lights i:nth-child(3n) { animation-delay: -1s; }
.lights i:nth-child(3n + 1) { animation-delay: -2s; }
@keyframes twinkle { 50% { opacity: .7; } }

.windows {
  align-self: stretch; justify-self: stretch; min-height: 0;
  display: grid; gap: clamp(6px, 1.2vmin, 10px);
  grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(6, 1fr);
  padding: clamp(10px, 2vmin, 16px) clamp(8px, 1.6vmin, 14px) clamp(8px, 1.4vmin, 12px);
  /* the house wall: warm horizontal boards between two corner posts */
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .28) 0 1.5px, transparent 1.5px 22px),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, #6a3f1d, #4d2c13);
  border-left: clamp(5px, 1.2vmin, 9px) solid #3e2410; border-right: clamp(5px, 1.2vmin, 9px) solid #3e2410;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .6);
}
.windows.standing { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(12, 1fr); }

.fence {
  height: clamp(22px, 4.6vmin, 40px); margin: -6px -12px 0; position: relative;
  background:
    no-repeat top / 100% 10px var(--snowcap),
    repeating-linear-gradient(90deg, transparent 0 4px, #6e4524 4px 16px, #4a2c15 16px 18px, transparent 18px 26px) 0 6px / 100% 100% no-repeat,
    linear-gradient(transparent 45%, #3d2410 45% 58%, transparent 58%);
}

/* One window: a dark frame, two plank shutters on iron strap hinges, a knob on each,
   and a little heap of snow on top. The day's painting waits behind. */
.win {
  --fw: clamp(3px, 4.5cqmin, 6px); /* frame width */
  position: relative; appearance: none; border: 0; padding: 0; cursor: pointer; min-width: 0; min-height: 0;
  container-type: size; border-radius: 3px;
  background: #24130a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 210, 150, .12), 0 4px 8px rgba(0, 0, 0, .55);
  transition: scale .2s ease;
}
.win::after { /* snow sitting on the top of the frame */
  content: ""; position: absolute; left: -3px; right: -3px; top: calc(clamp(8px, 13cqmin, 18px) * -.5); height: clamp(8px, 13cqmin, 18px); z-index: 3; pointer-events: none;
  background: no-repeat top / 100% 100% var(--snowcap);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}
.win .inside, .win .sashes { position: absolute; inset: var(--fw); border-radius: 2px; }
.win .inside { overflow: hidden; background: radial-gradient(circle at 50% 40%, #5a391d, #1a0e06); box-shadow: inset 0 3px 10px rgba(0, 0, 0, .8); }
.win .inside img { width: 100%; height: 100%; object-fit: cover; display: block; }
.win .sashes { perspective: 420px; }
.sash {
  position: absolute; top: 0; bottom: 0; width: 50%;
  /* vertical planks of warm, lantern-lit wood */
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(33.3% - 1px), rgba(30, 14, 4, .55) calc(33.3% - 1px) 33.3%),
    repeating-linear-gradient(92deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 6px, rgba(255, 225, 180, .05) 6px 7px, transparent 7px 12px),
    linear-gradient(180deg, #b27a43, #8d5b30 55%, #6c4322);
  box-shadow: inset 0 0 0 1px rgba(30, 14, 4, .75), inset 0 1px 0 1px rgba(255, 220, 170, .14);
  transition: transform .8s cubic-bezier(.3, 1.25, .5, 1);
}
.sash.l { left: 0; transform-origin: 0 50%; }
.sash.r { right: 0; transform-origin: 100% 50%; }
.sash::before { /* two iron strap hinges on the outer edge */
  content: ""; position: absolute; top: 11%; bottom: 11%; width: min(62%, 46cqmin); left: -1px;
  background: no-repeat left top / 100% auto var(--hinge), no-repeat left bottom / 100% auto var(--hinge);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.sash.r::before { left: auto; right: -1px; transform: scaleX(-1); }
.sash::after { /* the knob */
  content: ""; position: absolute; top: 50%; width: clamp(3px, 6cqmin, 8px); aspect-ratio: 1; translate: 0 -50%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8a7e70, #3a322b 60%, #1c1714);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.sash.l::after { right: 9%; }
.sash.r::after { left: 9%; }
.win .num {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2;
  transition: opacity .25s ease, scale .4s ease;
}
.win .num b { font-size: clamp(14px, 44cqmin, 6rem); }
.win.open .sash.l { transform: rotateY(-112deg); }
.win.open .sash.r { transform: rotateY(112deg); }
.win.open .num { opacity: 0; scale: 1.3; }
.win.ajar .sash.l { transform: rotateY(-38deg); }
.win.ajar .sash.r { transform: rotateY(38deg); }
.win.ajar .num { opacity: .35; }
/* today: candlelight leaks through the gap between the shutters */
.win.today { box-shadow: 0 0 0 2px rgba(var(--glow), .9), 0 0 24px rgba(var(--glow), .75); animation: glow 2.4s ease-in-out infinite; }
.win.today .sashes::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; translate: -50% 0; z-index: 1;
  background: #ffd38a; box-shadow: 0 0 10px 3px rgba(var(--glow), .85);
}
.win.locked .sash { filter: brightness(.82); }
.win.done::before { /* the day is lived: a small gold star */
  content: ""; position: absolute; right: -5px; top: -7px; width: clamp(14px, 22cqmin, 22px); aspect-ratio: 1; z-index: 4;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23f3c77a' stroke='%233e2614' stroke-width='1.2' d='M12 2.5l2.7 6.1 6.6.6-5 4.4 1.5 6.5L12 16.7 6.2 20.1l1.5-6.5-5-4.4 6.6-.6z'/></svg>");
}
.win:active { scale: .97; }
@keyframes glow { 50% { box-shadow: 0 0 0 2px rgba(var(--glow), 1), 0 0 40px rgba(var(--glow), 1); } }

/* Lettering made of ice: frosted white-blue fill, a cold glow, icicles hanging under the letters. */
.ice {
  position: relative; display: inline-block; line-height: 1;
  font-family: var(--font-display); font-weight: 400;
  color: #e9f7ff;
  background: linear-gradient(180deg, #ffffff 0%, #e6f6ff 38%, #a9d8f3 62%, #e2f4ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .02em rgba(255, 255, 255, .55);
  filter: drop-shadow(0 1px 0 rgba(20, 40, 60, .9)) drop-shadow(0 0 .1em rgba(170, 220, 255, .9)) drop-shadow(0 0 .3em rgba(110, 180, 245, .55));
}
.ice::after {
  content: ""; position: absolute; left: 4%; right: 4%; top: 84%; height: .42em;
  background: no-repeat top / 100% 100% var(--icicles);
}
.ice.alt::after { transform: scaleX(-1); }
.ice.plain::after, .ice.plain::before { content: none; }


/* The windows' numbers are not all frozen the same way. */
.ice.snih::before { /* a heap of snow sitting on top */
  content: ""; position: absolute; left: -6%; right: -6%; top: -.24em; height: .4em;
  background: no-repeat top / 100% 100% var(--snowcap);
}
.ice.snih::after { height: .24em; }
.ice.vlocky::after { /* snowflakes drifting round the number instead of icicles */
  left: -.32em; right: -.32em; top: -.22em; bottom: -.2em; height: auto;
  background: no-repeat center / 100% 100% var(--flakes); opacity: .9;
}
.ice.ladovec { /* clear blue glacier ice that glints */
  background: linear-gradient(165deg, #e6f7ff 0%, #7cc4ef 26%, #2f86c8 52%, #8fd0f5 74%, #dff4ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .025em rgba(235, 250, 255, .9);
}
.ice.ladovec::after {
  left: -.2em; right: -.2em; top: -.15em; bottom: -.1em; height: auto;
  background: no-repeat center / 100% 100% var(--sparkles);
  animation: glint 3.2s ease-in-out infinite;
}
.ice.inovat { /* hoarfrost: white, grainy, one big flake on the corner */
  background:
    radial-gradient(circle, rgba(170, 210, 235, .9) 0 .6px, transparent 1px) 0 0 / 4px 4px,
    linear-gradient(180deg, #ffffff, #e8f4fb);
  -webkit-background-clip: text; background-clip: text;
}
.ice.inovat::after {
  left: auto; right: -.28em; top: -.2em; width: .42em; height: .42em;
  background: no-repeat center / contain var(--flake);
}
.ice.inovat.alt::after { right: auto; left: -.28em; }
@keyframes glint { 50% { opacity: .25; } }

/* Placeholder for a painting that is not drawn yet. */
.ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #6b4423 0%, #2a170b 60%, #140b05 100%);
  color: var(--paper); text-align: center;
}
.ph small { font-size: clamp(1.4rem, 6vmin, 3.4rem); line-height: 1.1; margin: 0 8%; }
.win .ph { background: transparent; }

/* The painting flies out of the window to the middle of the screen and carries the child into the room. */
.flyer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.painting { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(40, 24, 12, .55), rgba(8, 5, 3, .88)); }
.painting .art {
  position: absolute; transform-origin: 0 0;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .15), 0 24px 50px rgba(0, 0, 0, .65), 0 0 60px rgba(var(--glow, 255, 178, 92), .18);
}
.painting .art > img, .painting .art > .ph { width: 100%; height: 100%; object-fit: contain; display: block; }
.painting .cap {
  position: absolute; left: 0; right: 0; text-align: center; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.6rem, 6.4vmin, 3.4rem); line-height: 1.1; padding: 0 64px; text-wrap: balance;
  opacity: 0; transition: opacity .6s ease .1s;
}
.painting.shown .cap { opacity: 1; }
.snowburst { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* ---------- room: liquid glass bubbles around Bubák ---------- */
.bubbles { position: absolute; inset: 0; pointer-events: none; transition: opacity .35s ease; }
#room.calm .bubbles { opacity: 0; }
#room.calm .bubbles .glass { pointer-events: none; }
.glass {
  position: absolute; left: 0; top: 0; width: 80px; height: 80px; margin: -40px 0 0 -40px;
  border-radius: 50%; appearance: none; cursor: pointer; pointer-events: auto;
  display: grid; place-items: center; font-size: 38px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, .5);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 45%, rgba(255, 255, 255, .02) 70%),
    radial-gradient(90% 90% at 70% 90%, rgba(191, 230, 242, .22), transparent 60%);
  backdrop-filter: blur(12px) saturate(170%) brightness(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(170%) brightness(1.08);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, .85),
    inset 0 -10px 18px rgba(255, 255, 255, .1),
    inset 0 0 0 .5px rgba(255, 255, 255, .25),
    0 12px 28px rgba(0, 0, 0, .38);
  animation: float 5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transition: scale .18s ease;
}
.glass::before { /* specular highlight */
  content: ""; position: absolute; left: 16%; top: 9%; width: 46%; height: 26%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  filter: blur(1px); pointer-events: none;
}
.glass svg {
  position: relative; width: 46px; height: 46px;
  fill: none; stroke: var(--gold); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1.5px 1.5px rgba(20, 12, 6, .7));
}
.glass svg .fill { fill: var(--gold); stroke: none; }
.glass:active { scale: .92; }
.glass.done::after {
  content: "✓"; position: absolute; right: -2px; top: -2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 700 15px/1 var(--font-ui);
  background: var(--gold); color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.glass.picked { scale: 1.15; box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, .9), 0 0 0 3px rgba(243, 199, 122, .8), 0 0 30px rgba(243, 199, 122, .6); }
@keyframes float { 50% { translate: 0 -6px; } }

/* ---------- demo: cards for what is not produced yet ---------- */
.demo-notes { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 60;
  width: min(92vw, 560px); display: grid; gap: 6px; pointer-events: none; }
.demo-note { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px 12px; border-radius: 10px;
  border: 1.5px dashed rgba(239, 227, 204, .7); background: rgba(20, 17, 15, .82); color: var(--paper);
  font: 500 13.5px/1.35 var(--font-ui); animation: noteIn .25s ease-out both; }
.demo-note b { font: 700 10px/1.6 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: var(--paper); color: var(--ink); }
.demo-note.hlas b { background: #f3c77a; } .demo-note.klip b { background: #9fd2f0; } .demo-note.zvuk b { background: #c9e4b4; }
@keyframes noteIn { from { opacity: 0; translate: 0 8px; } }
.ph-card { display: grid; align-content: center; gap: 6px; min-height: 110px; padding: 12px; border-radius: 10px; text-align: center;
  border: 2px dashed rgba(239, 227, 204, .65); background: repeating-linear-gradient(135deg, rgba(239, 227, 204, .06) 0 10px, transparent 10px 20px), rgba(30, 22, 16, .75);
  color: var(--paper); font: 500 13px/1.35 var(--font-ui); }
.ph-card b { font: 700 10px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.ph-card.wide { min-height: 170px; } .ph-card.mini { min-height: 0; padding: 6px; font-size: 11px; }

/* ---------- demo: overlay sheets ---------- */
.sheet { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 70px 16px 120px;
  background: rgba(12, 8, 5, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: noteIn .2s ease-out both; }
.sheet > .close { left: auto; right: max(12px, env(safe-area-inset-right)); }
.sheet-body { width: min(100%, 560px); display: grid; gap: 14px; justify-items: center; max-height: 100%; overflow: auto; }
.demo-src { margin: 0; color: rgba(239, 227, 204, .75); font: 500 13px/1.4 var(--font-ui); text-align: center; }
.row { display: flex; gap: 10px; justify-content: center; } .row.wrap { flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 26px; cursor: pointer;
  border: 2px solid rgba(243, 199, 122, .7); background: rgba(20, 17, 15, .6); color: var(--paper); font: 600 15px var(--font-ui); }
.pill svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pill.ok { border-color: #9fd38a; }
.pick-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.pick.on .ph-card { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 199, 122, .5); }

/* hra: Bubák beží domov (S31). Full screen; big thumb buttons in the bottom corners (at least 84 px). */
.sheet.runner-sheet { background: #0b1f4f; }
.sheet.runner-sheet .sheet-body { width: 100%; max-height: none; height: 100%; overflow: hidden; padding: 0; }
.runner { position: relative; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.run-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.run-count { position: absolute; top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 8px; border-radius: 999px; background: rgba(10, 24, 60, .45); border: 1.5px solid rgba(243, 199, 122, .6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font: 700 28px/1 var(--font-ui); }
.run-count img { width: 36px; height: 41px; filter: drop-shadow(0 0 6px rgba(255, 240, 200, .8)); }
.run-btn { position: absolute; width: clamp(84px, 15vh, 120px); aspect-ratio: 1; border-radius: 50%; padding: 0; cursor: pointer; touch-action: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), rgba(160, 200, 255, .12) 60%, rgba(20, 40, 90, .25));
  border: 2px solid rgba(243, 199, 122, .75); box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .08s ease, background .08s ease; }
.run-btn svg { width: 52%; height: 52%; fill: none; stroke: #ffe3a8; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.run-btn.on { transform: scale(.92); background: radial-gradient(circle at 35% 30%, rgba(255, 240, 200, .55), rgba(243, 199, 122, .25) 60%, rgba(20, 40, 90, .3)); }
.run-jump { left: max(22px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom)); width: clamp(100px, 19vh, 140px); }
.run-pad { position: absolute; right: max(22px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: flex; gap: 18px; }
.run-pad .run-btn { position: static; }
.run-again { left: 50%; top: 50%; translate: -50% -50%; width: 120px; }
.run-again[hidden], .run-pad[hidden], .run-btn[hidden] { display: none; }

/* hra: Chyť vločku */
.sheet.game { padding: 0; place-items: stretch; background: linear-gradient(#0e1a33, #1d2f52 70%, #e9f2fa 70%, #fff); }
.snow-game { position: relative; overflow: hidden; }
.flake { position: absolute; top: -60px; width: 64px; height: 64px; margin-left: -32px; padding: 0; border: 0; background: none; cursor: pointer;
  animation: fall linear forwards; touch-action: manipulation; }
.flake svg { width: 100%; height: 100%; fill: none; stroke: #f4f8ff; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(190, 225, 255, .9)); }
@keyframes fall { to { transform: translateY(calc(100vh + 80px)) rotate(200deg); } }
.snowman { position: absolute; left: 50%; bottom: 6%; translate: -50% 0; display: grid; justify-items: center; scale: calc(.25 + var(--n) * .75); transform-origin: bottom; transition: scale .4s ease; }
.snowman i { display: block; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #dfe9f2); box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.snowman i:nth-child(1) { width: 60px; height: 60px; } .snowman i:nth-child(2) { width: 90px; height: 90px; margin-top: -10px; } .snowman i:nth-child(3) { width: 120px; height: 120px; margin-top: -14px; }
.snowman.done i:nth-child(1) { background: radial-gradient(circle at 70% 55%, #f26b1d 0 5px, transparent 6px), radial-gradient(circle at 35% 30%, #fff, #dfe9f2); }

/* prianie, fúkanie, nedeľa, list, zúbky */
.thought { width: min(100%, 360px); }
.thought .ph-card { border-radius: 40px; }
.frost { display: grid; gap: 12px; justify-items: center; color: var(--paper); font: 500 14px var(--font-ui); }
.glass-pane { width: min(80vw, 320px); aspect-ratio: 1; border-radius: 50%; border: 10px solid #5c391d; touch-action: none;
  background: radial-gradient(circle, rgba(235, 248, 255, calc(.95 - var(--clear, 0) * .95)) 0 60%, rgba(210, 236, 250, calc(.9 - var(--clear, 0) * .9))),
    linear-gradient(#0e1a33, #2a4672); }
.wreath { display: flex; gap: 22px; padding: 26px 30px 18px; border-radius: 50%; background: radial-gradient(ellipse, #2f5a2a 0 55%, #1c3a19 56% 70%, transparent 71%); }
.candle { position: relative; width: 26px; height: 74px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: linear-gradient(90deg, #e8dcc2, #fff8ea, #d9c9a8); }
.candle i { position: absolute; left: 50%; top: -22px; width: 14px; height: 20px; margin-left: -7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: transparent; }
.candle.lit i { background: radial-gradient(circle at 50% 70%, #fff6d6, #ffc35e 50%, #e0702a); box-shadow: 0 0 18px 6px rgba(255, 178, 92, .7); }
.letter { width: min(100%, 420px); padding: 18px 20px; border-radius: 4px; background: var(--paper); color: var(--ink); font: italic 15px/1.5 var(--font-ui); box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); }
.letter p { margin: 0 0 6px; }
.teeth { position: relative; width: 150px; height: 150px; }
.ring { width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke: rgba(239, 227, 204, .2); stroke-width: 7; }
.ring .go { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 276; }
.clock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--paper); font: 700 30px var(--font-ui); }

/* album, rodičovská brána, nastavenia */
.album-title { margin: 0; font-size: clamp(1.6rem, 6vmin, 2.4rem); }
.album { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.page { min-height: 92px; padding: 6px; border-radius: 6px; background: rgba(239, 227, 204, .08); border: 1px solid rgba(239, 227, 204, .2); color: rgba(239, 227, 204, .55); font: 600 11px var(--font-ui); display: grid; gap: 4px; align-content: start; }
.page.has { background: var(--paper); color: var(--ink); }
.gate, .settings { width: 100%; color: var(--paper); font: 500 15px/1.5 var(--font-ui); display: grid; gap: 12px; }
.gate p { text-align: center; font-size: 18px; margin: 0; }
.settings h2 { margin: 6px 0 0; font: 700 16px var(--font-ui); color: var(--gold); }
.settings label { display: flex; align-items: center; gap: 8px; }
.settings select { font: 600 15px var(--font-ui); padding: 6px 8px; border-radius: 8px; }
.settings .hint { margin: 0; font-size: 13px; opacity: .75; }

/* veci v izbe a podnos s jedlom a oblečením */
.room-things { position: absolute; inset: 0; pointer-events: none; }
.spot { position: absolute; translate: -50% -50%; pointer-events: auto; cursor: pointer; padding: 4px 10px; border-radius: 14px;
  border: 1.5px dashed rgba(239, 227, 204, .8); background: rgba(20, 17, 15, .55); color: var(--paper); font: 600 11px var(--font-ui);
  box-shadow: 0 0 0 0 rgba(243, 199, 122, .6); animation: spot 2.4s ease-in-out infinite; }
@keyframes spot { 50% { box-shadow: 0 0 0 8px rgba(243, 199, 122, 0); } }
.room-things .keep { position: absolute; translate: -50% -50%; width: 120px; }
.room-things .keep.new { animation: arrive 1.2s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes arrive { from { transform: translateY(-40px) scale(0); opacity: 0; } }
.tray { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(90px, calc(env(safe-area-inset-bottom) + 80px)); display: grid; gap: 10px; z-index: 5; }
.tray .glass { position: static; margin: 0; width: 64px; height: 64px; animation: none; touch-action: none; }
.glass.dragging { position: fixed; z-index: 70; margin: -32px 0 0 -32px; width: 64px; height: 64px; pointer-events: none; animation: none; scale: 1.15; }
.ui.gear-btn { left: auto; right: max(12px, env(safe-area-inset-right)); }
.ui.album-btn { left: auto; right: max(74px, calc(env(safe-area-inset-right) + 62px)); }
.ui.album-btn svg, .ui.gear-btn svg { width: 30px; height: 30px; stroke: var(--gold); stroke-width: 2.3; }
.ui.album-btn svg .fill, .ui.gear-btn svg .fill { fill: var(--gold); stroke: none; }

@media (prefers-reduced-motion: reduce) {
  .planet .body, .planet.locked .fog, .glass, .win.today, .ice.ladovec::after, .lights i, .spot, .flake { animation: none; }
  .sash { transition-duration: .01s; }
}

/* ===== 8. 11.: titulky, centrovanie, noc, police, rozprávka ===== */
/* Every text in the app is centred (Peter, 8. 11.). */
.sheet, .sheet p, .sheet h2, .settings label, .letter, .demo-note, .ph-card, .page, .gate p { text-align: center; }
.settings label { justify-content: center; flex-wrap: wrap; }
.demo-note { grid-template-columns: 1fr; justify-items: center; }
/* DEMO cards move to the top: the bottom belongs to the subtitles. */
.demo-notes { bottom: auto; top: max(76px, calc(env(safe-area-inset-top) + 66px)); }

.subs { position: fixed; left: 50%; bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px)); translate: -50% 0; z-index: 65;
  width: min(92vw, 720px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  color: #fffaf0; font: 600 clamp(17px, 2.6vmin, 22px)/1.35 var(--font-ui); text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .75); }
.subs.on { opacity: 1; }
.subs.on:not(:empty) { padding: 8px 16px; border-radius: 14px; background: rgba(14, 11, 9, .45); }
#room.sleeping ~ .subs { opacity: 0; }

.clip.quiet { opacity: 0; transition: opacity .12s linear; }
.clip.quiet.show { opacity: 1; }

/* night bubble opens into three */
.glass.open { scale: 1.08; box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, .9), 0 0 0 3px rgba(243, 199, 122, .7), 0 0 30px rgba(243, 199, 122, .5); }
.glass.sub { width: 66px; height: 66px; margin: -33px 0 0 -33px; animation: subIn .35s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes subIn { from { opacity: 0; scale: .3; } }
.glass.sub svg { width: 36px; height: 36px; }

/* shelves with 24 treats and 24 clothes */
.shelf { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; touch-action: none; }
.slot { position: relative; min-height: 84px; padding: 18px 6px 8px; border-radius: 12px; cursor: grab; touch-action: none;
  border: 1.5px dashed rgba(239, 227, 204, .6); background: rgba(20, 17, 15, .55); color: var(--paper);
  display: grid; place-items: center; font: 600 12px/1.25 var(--font-ui); text-align: center; }
.slot .day { position: absolute; top: 4px; left: 0; right: 0; font-size: 10px; opacity: .6; }
.slot.locked { opacity: .45; cursor: default; }
.slot.locked svg { width: 26px; height: 26px; fill: none; stroke: var(--paper); stroke-width: 2.4; }
.slot.worn { border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(243, 199, 122, .35); }
.slot.blocked { opacity: .55; }
.slot.dragging { position: fixed; z-index: 70; width: 96px; translate: -50% -50%; pointer-events: none; scale: 1.08; background: rgba(20, 17, 15, .9); }
#room.giving .hit { outline: 2px dashed rgba(243, 199, 122, .7); outline-offset: 6px; border-radius: 40%; }

/* boot polishing game */
.boot-game { display: grid; gap: 12px; justify-items: center; color: var(--paper); font: 500 14px var(--font-ui); }
.boot { width: min(70vw, 260px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; touch-action: none;
  background: radial-gradient(circle, rgba(243, 199, 122, calc(var(--shine) * .45)), transparent 70%); }
.boot svg { width: 75%; height: 75%; fill: color-mix(in srgb, #3a2414, #c47a3c calc(var(--shine) * 100%)); stroke: var(--gold); stroke-width: 1.4;
  filter: drop-shadow(0 0 calc(var(--shine) * 14px) rgba(255, 230, 170, .9)); }
.boot.done { animation: arrive .8s cubic-bezier(.2, 1.6, .4, 1); }

/* teeth: five parts of the mouth, one a minute */
.mouth { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 140px; }
.mouth i { height: 22px; border-radius: 8px; border: 1.5px solid rgba(239, 227, 204, .5); }
.mouth i.q4 { grid-column: 1 / -1; }
.mouth i.on { background: var(--gold); border-color: var(--gold); }
.mouth i.ok { background: rgba(159, 211, 138, .6); }

.candle.next { outline: 2px dashed var(--gold); outline-offset: 6px; animation: spot 2.4s ease-in-out infinite; }
.pick-grid.n2 { grid-template-columns: 1fr 1fr; max-width: 420px; }
.spot.still { cursor: default; animation: none; }
.room-things .keep { width: auto; max-width: 150px; padding: 4px 10px; border-radius: 12px; border: 1.5px dashed rgba(239, 227, 204, .8);
  background: rgba(20, 17, 15, .6); color: var(--paper); font: 600 11px/1.25 var(--font-ui); text-align: center; }

/* tale controls: back ten seconds, pause, end */
.story-ctl { position: absolute; left: 50%; translate: -50% 0; bottom: max(96px, calc(env(safe-area-inset-bottom) + 86px)); z-index: 8;
  display: flex; gap: 14px; }
.story-ctl .glass { position: static; margin: 0; width: 60px; height: 60px; animation: none; }
.story-ctl .glass svg { width: 30px; height: 30px; }

/* teeth: the room stays visible, so Bubák brushing is the main thing; timer and mouth map float on top */
.sheet.teeth-sheet { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; place-items: start center; padding-top: max(70px, calc(env(safe-area-inset-top) + 60px)); pointer-events: none; }
.sheet.teeth-sheet .sheet-body { grid-auto-flow: column; align-items: center; gap: 16px; width: auto; padding: 8px 14px; border-radius: 20px; background: rgba(14, 11, 9, .5); pointer-events: auto; }
.sheet.teeth-sheet .teeth { width: 74px; height: 74px; }
.sheet.teeth-sheet .clock { font-size: 18px; }
.sheet.teeth-sheet .mouth { width: 74px; }
.sheet.teeth-sheet .mouth i { height: 16px; }
.sheet.teeth-sheet > .close { pointer-events: auto; }

/* generated pictures (8. 11.) */
.pic { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); user-select: none; -webkit-user-drag: none; }
.pic.wide { max-height: 46vh; width: auto; max-width: 100%; margin: 0 auto; }
.pick .pic { aspect-ratio: 1; object-fit: cover; }
.pick.on .pic { outline: 3px solid var(--gold); outline-offset: 3px; }
.thought .pic { border-radius: 30px; }
.page .pic.mini { border-radius: 4px; box-shadow: none; }
.slot { padding: 16px 4px 4px; }
.slot .pic.item { width: 76px; height: 76px; border-radius: 10px; box-shadow: none; pointer-events: none; }
.slot.dragging .pic.item { width: 64px; height: 64px; }

/* ---------- 8. 11. (2): treats and clothes rail, things on Bubák, fire, wreath, boot, album photo ---------- */
.tray .glass.open { scale: 1.08; box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, .85), 0 0 0 3px rgba(243, 199, 122, .55), 0 12px 28px rgba(0, 0, 0, .38); }
.rail { position: absolute; z-index: 6; right: 0; translate: 0 -50%; display: flex; gap: 10px; padding: 10px 16px 10px 4px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: none;
  scrollbar-width: none; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.rail::-webkit-scrollbar { display: none; }
.rail.on { opacity: 1; pointer-events: auto; }
.rail .bead { position: relative; flex: 0 0 72px; margin: 0; width: 72px; height: 72px; padding: 5px; scroll-snap-align: start;
  animation: bead-in .32s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(min(var(--i), 8) * 28ms); touch-action: none; }
.rail .bead img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; user-select: none; }
.rail .bead svg { width: 26px; height: 26px; fill: none; stroke: var(--paper); stroke-width: 2.4; }
.rail .bead .day { position: absolute; bottom: -2px; left: 50%; translate: -50% 0; padding: 0 5px; border-radius: 8px;
  background: rgba(20, 17, 15, .75); color: var(--paper); font: 700 10px var(--font-ui); }
.rail .bead.locked { opacity: .5; cursor: default; }
@keyframes bead-in { from { opacity: 0; translate: -24px 0; scale: .6; } }
.bead.dragging { position: fixed; z-index: 70; margin: -36px 0 0 -36px; pointer-events: none; animation: none; scale: 1.15; }
.bead.dragging .day { display: none; }

.on-bubak { position: absolute; inset: 0; pointer-events: none; }
.on-bubak [data-on] { position: absolute; translate: -50% -50%; height: auto; pointer-events: none; user-select: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); transition: opacity .25s ease; }
.on-bubak .held { animation: held 3.3s ease-in-out both; }
.on-bubak .held.square { border-radius: 14px; }
/* appears in his hands, lifted to his mouth for three bites, then gone */
@keyframes held {
  0% { opacity: 0; scale: .7; } 8% { opacity: 1; scale: 1; }
  25% { transform: translateY(0); }
  35% { transform: translateY(-55%); scale: 1; } 42% { transform: translateY(-50%); scale: .82; }
  55% { transform: translateY(-55%); scale: .82; } 62% { transform: translateY(-50%); scale: .62; }
  75% { transform: translateY(-55%); scale: .62; } 82% { transform: translateY(-50%); scale: .38; }
  100% { transform: translateY(-50%); scale: 0; opacity: 0; }
}
#room.calm .on-bubak, #room.sleeping .on-bubak { opacity: 0; }
.crumb, .spark, .dust, .star { position: absolute; z-index: 8; pointer-events: none; }
.crumb { width: 5px; height: 5px; border-radius: 2px; background: #b9864f; animation: fly .8s ease-in forwards; }
.spark { width: 6px; height: 6px; border-radius: 50%; background: #fff0c0; box-shadow: 0 0 8px 3px rgba(255, 150, 60, .9);
  animation: fly var(--t) cubic-bezier(.2, .6, .4, 1) forwards; }
.dust { position: absolute; z-index: 61; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(170, 140, 105, .75), rgba(150, 120, 90, 0) 70%); filter: blur(1.5px); }
.crumb-dirt { position: absolute; z-index: 61; pointer-events: none; border-radius: 40% 60% 45% 55%; box-shadow: inset -1px -1px 0 rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) { .crumb-dirt, .dust { display: none; } }
.star { translate: -50% -50%; clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  filter: drop-shadow(0 0 4px rgba(255, 240, 200, .9)); animation: burst var(--t) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes fly { to { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; } }
@keyframes burst { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 70% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); opacity: 0; } }

/* the fire itself is the hit area: invisible, sparks on tap */
.spot.fire { width: 13vmin; height: 15vmin; min-width: 70px; min-height: 80px; padding: 0; border: 0; background: none;
  box-shadow: none; animation: none; border-radius: 40%; }

/* boot game: the boot floats in the room, no panel behind it */
.sheet.boot-sheet { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; place-items: center start; padding-left: max(16px, 7vw); }
.boot-sheet .boot { position: relative; width: min(42vw, 44vh, 320px); background: none; display: block; cursor: grab;
  animation: levitate 3.2s ease-in-out infinite; filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .5)); }
.boot-sheet .boot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .45s ease;
  pointer-events: none; user-select: none; }
.boot-sheet .boot img.on { opacity: 1; }
.boot-sheet .boot.done { animation: levitate 3.2s ease-in-out infinite, boot-shine .9s ease-out; }
@keyframes levitate { 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes boot-shine { 40% { filter: drop-shadow(0 0 30px rgba(255, 230, 170, .95)); scale: 1.08; } }

/* album photo on the whole screen */
.page.has .pic { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 0; border: 0; cursor: zoom-out;
  background: #0a0806; animation: lb-in .22s ease-out both; }
.lightbox img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; object-fit: contain; }
.lightbox.out { animation: lb-in .2s ease-in reverse both; }
@keyframes lb-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot-sheet .boot, .rail .bead, .on-bubak .held { animation-duration: .01s; }
}
.boot-sheet .sheet-body { width: auto; overflow: visible; }

/* No subtitles over the advent calendar (Peter, 8. 11.); they come back in the room. */
body:has(#advent:not([hidden])) .subs { display: none; }

/* Portrait: the date on one line and the day's theme under it (Peter, 8. 11.). */
@media (max-aspect-ratio: 1/1) { .painting .cap .sep { display: block; height: 0; overflow: hidden; } }

/* ===== 8. 11.: Truhlica zabudnutých príbehov ===== */
.chest { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.chest .fact { position: relative; width: 132px; height: 132px; margin: 0; animation: none; display: grid; place-items: center; align-content: center; gap: 6px;
  padding: 10px; color: #fff6e6; font: 600 15px/1.2 var(--font-ui); text-align: center; text-wrap: balance; }
.chest .fact-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #2a1a0c;
  background: radial-gradient(circle at 35% 30%, #ffe9b0, #e0a84a); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.chest .fact.seen .fact-n { background: radial-gradient(circle at 35% 30%, #fff8e6, #cfc2a6); }
.chest .fact.on { outline: 3px solid var(--gold); outline-offset: 3px; scale: 1.06; transition: scale .2s ease; }
.adults { width: min(100%, 520px); color: #f3e8d6; font: 400 14px/1.45 var(--font-ui); text-align: left; background: rgba(14, 11, 9, .55);
  border-radius: 16px; padding: 10px 14px; }
.adults summary { cursor: pointer; font-weight: 600; text-align: center; min-height: 32px; }
.adults .adult-fact { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); text-align: left; }
.adults .adult-fact p { margin: 4px 0; }
.adults small, .adults .adult-note { opacity: .75; }
@media (max-width: 420px) { .chest .fact { width: 104px; height: 104px; font-size: 13px; } }

/* ===== 8. 11.: days before and after the calendar, Liquid Glass bubbles at the sides ===== */
#advent .extra-days { position: absolute; top: 50%; translate: 0 -50%; z-index: 5; display: flex; flex-direction: column; flex-wrap: wrap;
  gap: clamp(8px, 1.6vh, 16px); max-height: calc(100% - 140px); align-content: center; pointer-events: none; }
.extra-days.left { left: max(10px, env(safe-area-inset-left)); }
.extra-days.right { right: max(10px, env(safe-area-inset-right)); flex-wrap: wrap-reverse; }
#advent .extra-days .glass.extra { position: relative; flex: none; margin: 0; left: auto; top: auto; width: clamp(48px, 7.4vmin, 76px); height: clamp(48px, 7.4vmin, 76px);
  display: grid; place-items: center; align-content: center; gap: 0; color: #f4f8ff; pointer-events: auto;
  font-family: var(--font-ui); text-shadow: 0 1px 2px rgba(10, 20, 40, .7); }
.extra .n { font-size: clamp(17px, 2.9vmin, 28px); font-weight: 700; line-height: 1; color: #eaf6ff;
  text-shadow: 0 0 8px rgba(160, 210, 255, .9), 0 1px 2px rgba(10, 20, 40, .8); }
.extra .m { font-size: clamp(9px, 1.3vmin, 12px); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.extra.locked { opacity: .45; filter: saturate(.5); }
.extra.seen::after { content: ""; position: absolute; right: 10%; bottom: 10%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 6px rgba(243, 199, 122, .9); }
@media (max-aspect-ratio: 1/1) {
  #advent .extra-days { gap: 6px; max-height: none; flex-wrap: nowrap; }
  #advent .extra-days.left { left: 4px; } #advent .extra-days.right { right: 4px; }
  #advent .extra-days .glass.extra { width: 42px; height: 42px; }
  .extra .n { font-size: 16px; } .extra .m { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .extra-days .glass.extra { animation: none; } }

/* ===== 8. 11.: landscape only. Upright, a full screen asks to turn the device. =====
   13. 11. (Peter): until the app is downloaded (after 29. 11.) the entry screens (language, welcome, map, Predbránie)
   also work upright; only the calendar and the room (body.landscape-only) still ask to turn the phone. */
#rotate { display: none; }
@media (orientation: portrait) {
  body.landscape-only #rotate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; align-content: center; gap: 18px;
    background: radial-gradient(120% 80% at 50% 30%, #17203a, #080b16 60%, #050608); color: #f3e8d6;
    font: 600 clamp(16px, 4.6vw, 22px)/1.35 var(--font-ui); text-align: center; padding: 24px; }
  #rotate .rot-phone { width: min(46vw, 200px); height: auto; animation: rot-turn 2.6s ease-in-out infinite; transform-origin: 50% 50%; }
  #rotate .body { fill: rgba(255, 255, 255, .08); stroke: var(--gold); stroke-width: 3; }
  #rotate .dot { fill: var(--gold); }
  #rotate .arrow { fill: none; stroke: #bfe6f2; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  #rotate p { margin: 0; max-width: 18em; text-wrap: balance; }
  body.landscape-only > :not(#rotate) { visibility: hidden; }
}
@keyframes rot-turn { 0%, 25% { rotate: 0deg; } 55%, 85% { rotate: -90deg; } 100% { rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { #rotate .rot-phone { animation: none; rotate: -90deg; } }

/* ===== 8. 11.: bubbles scale with the screen height, so nothing sticks out of a small landscape phone ===== */
#room .bubbles .glass:not(.sub) { --bs: clamp(52px, 17vh, 80px); width: var(--bs); height: var(--bs); margin: calc(var(--bs) / -2) 0 0 calc(var(--bs) / -2); }
#room .bubbles .glass:not(.sub) svg { width: calc(var(--bs) * .57); height: calc(var(--bs) * .57); }
#room .bubbles .glass.sub { --bs: clamp(46px, 14vh, 66px); width: var(--bs); height: var(--bs); margin: calc(var(--bs) / -2) 0 0 calc(var(--bs) / -2); }
#room .bubbles .glass.sub svg { width: calc(var(--bs) * .55); height: calc(var(--bs) * .55); }
#room .tray .glass { width: clamp(48px, 15vh, 64px); height: clamp(48px, 15vh, 64px); }
#advent .extra-days { max-height: calc(100% - 80px); gap: clamp(6px, 1.4vh, 14px); }
#advent .extra-days .glass.extra { width: clamp(38px, 11vh, 76px); height: clamp(38px, 11vh, 76px); }
#advent .extra .n { font-size: clamp(14px, 4vh, 28px); }
#advent .extra .m { font-size: clamp(7px, 1.8vh, 12px); }

/* 8. 11. (Peter): curiosities centred, the whole name fits inside the bubble, no sources shown */
.chest .fact { width: clamp(118px, 24vh, 160px); height: clamp(118px, 24vh, 160px); padding: 0 16%; font-size: clamp(12px, 2.4vh, 15px);
  line-height: 1.15; overflow-wrap: anywhere; hyphens: manual; }
.chest .fact-from { display: block; max-width: 100%; text-align: center; }
.adults, .adults .adult-fact, .adults summary { text-align: center; }
.adults .adult-fact b { display: block; text-align: center; }
.adults .adult-fact p { text-align: center; text-wrap: pretty; }
.chest .fact-n { width: 32px; height: 32px; font-size: 17px; }
.chest .fact-from { overflow-wrap: normal; }
/* small landscape phones: the three bubbles stay in one row, DEMO cards hide while a sheet is open */
.chest { flex-wrap: nowrap; }
.chest .fact { width: clamp(84px, 24vh, 160px); height: clamp(84px, 24vh, 160px); flex: none; }
body:has(#room .sheet) .demo-notes { display: none; }
@media (max-height: 500px) { .sheet.chest-sheet { padding-top: 56px; } }
.chest .fact { box-sizing: border-box; padding: 0 12px; aspect-ratio: 1; justify-items: center; }
.chest .fact::before { left: 16%; }
.chest .fact { width: clamp(96px, 30vh, 160px); height: clamp(96px, 30vh, 160px); }

/* 9. 11. (Peter): a picked bubble grows and gets a gold ring; the scrolling sheet must not cut it off. */
.sheet-body { padding: 14px; }
.chest { padding: 12px 8px; }
.rail { padding-top: 14px; padding-bottom: 14px; }
.chest-sheet .sheet-body { width: min(100%, 780px); } /* four bubbles in a row fit on a tablet */

/* 11. 11.: the right column of day bubbles is a grid with 7 rows, so its second column (January) always
   fits on screen. A wrapping flex column does not widen in Safari and pushed it past the edge (Peter). */
#advent .extra-days.right { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); justify-content: end; max-height: none; }
#advent .extra-days .glass.extra { width: clamp(30px, min(11vh, calc((100vh - 140px) / 7)), 76px); height: clamp(30px, min(11vh, calc((100vh - 140px) / 7)), 76px); }

/* 11. 11.: one fence only (Peter). The background's fence, cut out of the same picture with the sky
   between the pickets made clear (img/advent/plot-predok.png), lies in front of the house at exactly
   the same place, so the house stands behind one continuous fence. */
@media (orientation: landscape) {
  #advent::after { display: block; content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: url("img/advent/plot-predok.png") center top / auto 113% no-repeat; }
}

/* 11. 11.: rewards are cut-outs that sit in the room picture (S16), not dashed labels. */
.room-things .keep-img { position: absolute; translate: -50% -50%; pointer-events: none; object-fit: fill;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.room-things .keep-img.new { animation: arrive 1.2s cubic-bezier(.2, 1.6, .4, 1) both; }
/* The window and the wreath are visible in the picture, so their tap spots carry no text (11. 11.). */
.room-things .spot span { opacity: 0; }
.room-things .spot:not(.fire) { border-color: transparent; background: none; box-shadow: none; animation: none; min-width: 70px; min-height: 60px; }

/* No subtitles anywhere in the app (Peter, 11. 11.): Bubák is only heard. */
.subs { display: none !important; }

/* The treat on its way to Bubák: the cut-out, no bubble or background around it (Peter, 11. 11.). */
.treat-drag { position: fixed; z-index: 70; width: 88px; height: 88px; object-fit: contain; translate: -50% -55%; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)); }
.treat-drag.square { width: 64px; height: 64px; border-radius: 50%; }

/* ---------- 29. 11.: the wreath overlay, the candle game frame and the letter (S18, S19, Peter 11. 11.) ---------- */
.room-things .ven-img { position: absolute; pointer-events: none; z-index: 0; }
.tv { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(10, 8, 6, .55), rgba(10, 8, 6, .82)); }
.tv-box { position: relative; width: min(88vw, calc((100vh - 120px) * 1.377)); aspect-ratio: 1800 / 1307; }
.tv-screen { position: absolute; left: 17.4%; top: 17.6%; width: 65.6%; height: 58.3%; overflow: hidden; border-radius: 6% / 9%; background: #120d0a; }
.tv-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s linear; }
.tv-v.on { opacity: 1; }
.tv-ram { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }
.tv-meter { position: absolute; left: 30%; right: 30%; bottom: 13.5%; height: 8px; border-radius: 99px; background: rgba(20, 17, 15, .6); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); overflow: hidden; }
.tv-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f3c77a, #ffe9b8); box-shadow: 0 0 12px #f3c77a; transition: width .1s linear; }
.tv-blow { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; width: clamp(64px, 16vh, 92px); height: clamp(64px, 16vh, 92px); touch-action: none; }
.tv-blow svg { width: 56%; height: 56%; }
.tv-blow:active { scale: .94; box-shadow: 0 0 26px rgba(243, 199, 122, .7); }
.tv-close { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); width: 52px; height: 52px; }
.tv-close svg { width: 55%; height: 55%; }

.letter-ov { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(10, 8, 6, .62); touch-action: none; }
.letter-paper { position: relative; height: min(74vh, 84vw * 1.05); aspect-ratio: 1333 / 1400; }
.letter-paper .paper { width: 100%; height: 100%; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .55)); }
.letter-paper .lslot { position: absolute; top: 40%; width: 25%; aspect-ratio: 1; border: 2px dashed rgba(110, 72, 40, .55); border-radius: 12px; display: grid; place-items: center; }
.letter-paper .lslot[data-i="0"] { left: 8%; } .letter-paper .lslot[data-i="1"] { left: 37.5%; } .letter-paper .lslot[data-i="2"] { left: 67%; }
.letter-paper .lslot.full { border-color: transparent; }
.letter-paper .stuck { width: 108%; height: 108%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(60, 35, 15, .35)); }
.stickers { display: flex; gap: clamp(14px, 4vw, 34px); }
.stickers .sticker { width: clamp(52px, 13vh, 78px); height: clamp(52px, 13vh, 78px); object-fit: contain; cursor: grab; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); transition: opacity .2s, scale .2s; }
.stickers .sticker.lifted { opacity: .25; }
.stickers .sticker.used { opacity: 0; pointer-events: none; scale: .6; }
.sticker-drag { position: fixed; z-index: 90; translate: -50% -50%; pointer-events: none; scale: 1.25; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.flake { position: fixed; z-index: 91; width: var(--s); height: var(--s); pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 35%, rgba(220, 238, 255, .85) 36% 55%, transparent 56%), conic-gradient(from 0deg, transparent 0 10deg, #fff 10deg 14deg, transparent 14deg 70deg, #fff 70deg 74deg, transparent 74deg 130deg, #fff 130deg 134deg, transparent 134deg 190deg, #fff 190deg 194deg, transparent 194deg 250deg, #fff 250deg 254deg, transparent 254deg 310deg, #fff 310deg 314deg, transparent 314deg);
  filter: drop-shadow(0 0 4px rgba(200, 230, 255, .9)); }
/* The glass buttons of the frame keep their own place (no floating like the room bubbles). */
.tv .glass { animation: none; margin: 0; }
.tv .tv-blow { top: auto; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; }
.tv .tv-close { left: auto; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); translate: none; }

/* ---------- kvíz pre dospelých v truhlici (Peter, 11. 11.) ---------- */
.quiz-row { display: flex; justify-content: center; margin: 6px 0 2px; }
.quiz-q { width: 62px; height: 62px; border-radius: 50%; font: 700 30px/1 Rubik, sans-serif; color: #f3c77a; position: relative; }
.quiz-q.done::after { content: "✓"; position: absolute; right: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; background: #f3c77a; color: #14110f; font-size: 14px; display: grid; place-items: center; }
.quiz { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 10px; text-align: center; }
.quiz-n { margin: 0; font: 600 13px/1 Rubik, sans-serif; letter-spacing: .08em; color: rgba(239, 227, 204, .7); }
.quiz-text { margin: 0; max-width: 34em; font: 600 clamp(17px, 2.6vw, 22px)/1.35 Rubik, sans-serif; color: #efe3cc; }
.quiz-answers { display: flex; flex-direction: column; gap: 10px; width: min(100%, 460px); }
.quiz-a { width: 100%; min-height: 52px; height: auto; border-radius: 26px; padding: 10px 22px; font: 600 17px/1.25 Rubik, sans-serif; color: #efe3cc; text-align: center; animation: none; transition: background .25s, opacity .25s, box-shadow .25s; }
.quiz-a.ok { background: linear-gradient(180deg, rgba(243, 199, 122, .95), rgba(214, 160, 70, .95)); color: #14110f; box-shadow: 0 0 24px rgba(243, 199, 122, .65); }
.quiz-a.no { opacity: .35; }
.quiz .glass, .quiz-row .glass { position: relative; top: auto; left: auto; translate: none; margin: 0; animation: none; }

/* 12. 11. (Peter): the days before and after the calendar are stars scattered in the sky between the
   calendar and the screen edge (placed by layoutStars in app.js), uneven gaps, no straight column. */
#advent .extra-days, #advent .extra-days.right, #advent .extra-days.left { position: absolute; inset: 0; translate: none; display: block;
  max-height: none; left: 0; right: 0; z-index: 5; pointer-events: none; }
#advent .extra-days .day-star.extra { --ss: 72px; position: absolute; width: calc(var(--ss) * var(--k, 1)); height: calc(var(--ss) * var(--k, 1));
  translate: -50% -50%; margin: 0; padding: calc(var(--ss) * .08) 0 0; border: 0; background: none; display: grid; place-items: center;
  align-content: center; gap: 0; pointer-events: auto; cursor: pointer; font-family: var(--font-ui); -webkit-tap-highlight-color: transparent;
  animation: star-twinkle 5.2s ease-in-out var(--d, 0s) infinite; }
/* Liquid Glass body: frosted sky behind, cut to the star by a mask */
#advent .day-star.extra .g, #advent .day-star.extra svg { position: absolute; inset: 0; rotate: var(--rot, 0deg); }
#advent .day-star.extra .g { background: linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(170, 205, 255, .12) 55%, rgba(255, 255, 255, .22));
  -webkit-backdrop-filter: blur(10px) saturate(1.7) brightness(1.15); backdrop-filter: blur(10px) saturate(1.7) brightness(1.15);
  -webkit-mask: var(--star-mask) center / 100% 100% no-repeat; mask: var(--star-mask) center / 100% 100% no-repeat; }
/* rim and shine on top of the glass */
#advent .day-star.extra svg { width: 100%; height: 100%; overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 calc(var(--ss) * .09) rgba(190, 225, 255, .75)) drop-shadow(0 3px 5px rgba(0, 8, 30, .55)); }
#advent .day-star.extra svg path { stroke: rgba(255, 255, 255, .92); stroke-width: 3.2; stroke-linejoin: round; }
#advent .day-star.extra .n, #advent .day-star.extra .m { position: relative; color: #fff; font-weight: 800; line-height: 1;
  text-shadow: 0 0 2px rgba(0, 18, 50, .9), 0 1px 3px rgba(0, 18, 50, .95), 0 0 10px rgba(0, 30, 80, .7); }
#advent .day-star.extra .n { font-size: calc(var(--ss) * .23); letter-spacing: -.02em; }
#advent .day-star.extra .m { font-size: calc(var(--ss) * .11); letter-spacing: .06em; text-transform: uppercase; margin-top: calc(var(--ss) * .015); }
#advent .day-star.extra:active { scale: .9; }
#advent .day-star.extra.locked { opacity: .5; filter: saturate(.4); }
#advent .day-star.extra.seen::after { content: ""; position: absolute; right: 16%; bottom: 16%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 6px rgba(243, 199, 122, .95); }
@keyframes star-twinkle { 0%, 100% { scale: 1; filter: brightness(1); } 50% { scale: 1.06; filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { #advent .day-star.extra { animation: none; } }

/* 12. 11. (Peter): the curiosities are Christmas baubles (S20). The name is written on the bauble's
   paper tag; no numbers. The picked one sways and glows instead of a ring. */
.chest { gap: clamp(10px, 3vw, 34px); align-items: flex-start; }
.chest .fact.bauble { width: max(96px, min(30vh, 190px, calc((min(100vw, 780px) - 70px) / var(--n, 3) - 30px))); height: auto; aspect-ratio: auto; padding: 0; margin: 0; border: 0; background: none;
  box-shadow: none; outline: none; display: block; position: relative; transform-origin: 50% 0; cursor: pointer;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); transition: filter .25s ease, scale .25s ease; -webkit-tap-highlight-color: transparent; }
.chest .fact.bauble::before, .chest .fact.bauble::after { display: none; }
.chest .fact.bauble img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.chest .fact.bauble .fact-from { position: absolute; left: var(--tl); top: var(--tt); width: var(--tw); height: var(--th); max-width: none;
  display: grid; place-items: center; overflow: hidden; color: #3b2612; font: 700 clamp(10px, 2.3vh, 16px)/1.08 var(--font-ui);
  text-align: center; text-wrap: balance; overflow-wrap: normal; hyphens: manual; text-shadow: 0 1px 0 rgba(255, 250, 235, .6); }
.chest .fact.bauble:active { scale: .96; }
.chest .fact.bauble.on { scale: 1.06; filter: drop-shadow(0 0 18px rgba(255, 214, 140, .75)) drop-shadow(0 10px 14px rgba(0, 0, 0, .5));
  animation: bauble-sway 1.6s ease-in-out infinite; outline: none; }
.chest .fact.bauble.seen::after { display: grid; content: "✓"; position: absolute; right: 10%; top: 20%; width: 24px; height: 24px; border-radius: 50%;
  place-items: center; font: 700 14px/1 var(--font-ui); background: var(--gold); color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); left: auto; }
@keyframes bauble-sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@media (prefers-reduced-motion: reduce) { .chest .fact.bauble.on { animation: none; } }
/* short landscape phones: bigger baubles so the tag text stays readable; the sheet scrolls */
@media (max-height: 500px) { .chest .fact.bauble { width: max(90px, min(37vh, 190px, calc((min(100vw, 780px) - 70px) / var(--n, 3) - 24px))); }
  .chest .fact.bauble .fact-from { font-size: 12px; } }
@media (max-height: 500px) { .sheet.chest-sheet { padding-bottom: 12px; } }

/* Welcome screen: the greeting clip fills the landscape frame, the blurred room covers the sides. */
#hello { background: #00061b; }
#hello .hello-bg { position: absolute; inset: -60px; background: url("img/izba-zima.jpg") center / cover; filter: blur(30px) brightness(.4); }
#hello .hello-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#hello .hello-skip { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); min-width: 64px; min-height: 48px; padding: 0 22px;
  font: 600 16px/1 Rubik, sans-serif; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 24px; backdrop-filter: blur(10px); cursor: pointer; opacity: 0; animation: helloSkip .5s 1.6s forwards; }
@keyframes helloSkip { to { opacity: 1; } }

/* ============ Predbránie: the frozen gate before 29. 11. (game look: Rubik, paper text, gold pills, dark glass) ============ */
#predbranie { background: #00061b; overflow: hidden; }
#predbranie .pb-pic { position: absolute; inset: 0; background: url("img/prolog/1.jpg") 28% 55% / cover no-repeat; cursor: pointer; }
#predbranie .pb-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 28% 55%; }
@keyframes pbBreath { from { transform: scale(1); } to { transform: scale(1.035); } }
#predbranie::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,6,27,0) 38%, rgba(0,6,27,.55) 100%); }
#predbranie .pb-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#predbranie .back { z-index: 5; }
.pb-panel { position: absolute; z-index: 3; right: max(18px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%);
  width: min(400px, 44vw); max-height: calc(100% - 28px); overflow: hidden; padding: clamp(14px, 3.2vh, 26px) clamp(16px, 2.4vw, 26px); color: var(--paper); text-align: center;
  background: rgba(12, 8, 5, .66); border: 1px solid rgba(243, 199, 122, .4); border-radius: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.pb-panel h1 { margin: 0 0 6px; font: 700 clamp(1.3rem, 5vh, 1.9rem)/1.15 var(--font-ui); color: var(--paper); text-wrap: balance; }
.pb-sub { margin: 0 0 10px; font: 500 clamp(.9rem, 2.8vh, 1.05rem)/1.35 var(--font-ui); text-wrap: balance; }
.pb-count { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin: 0 0 8px; font: 700 clamp(1.5rem, 6vh, 2.4rem)/1 var(--font-ui); color: var(--paper); }
.pb-count i { font: 500 clamp(.7rem, 2.2vh, .85rem)/1 var(--font-ui); font-style: normal; margin-right: 8px; color: var(--paper-dim); }
.pb-free { margin: 0 0 12px; font: 600 clamp(.85rem, 2.6vh, 1rem)/1.3 var(--font-ui); color: var(--gold); }
.pb-btns { display: grid; gap: 10px; }
.pb-btn, .pb-card .opt, .pb-card .go, .pb-card .x { min-height: 52px; padding: 0 22px; border-radius: 26px; cursor: pointer; font: 700 clamp(.95rem, 2.8vh, 1.05rem)/1 var(--font-ui);
  color: var(--paper); background: rgba(20, 17, 15, .6); border: 2px solid rgba(243, 199, 122, .7); }
.pb-btn.gold, .pb-card .go { color: #2b1707; background: linear-gradient(180deg, #ffe29c, #e8b04e); border-color: #b9842c; box-shadow: 0 4px 0 #b9842c, 0 10px 22px rgba(0,0,0,.3); }
.pb-btn:active, .pb-card button:active { transform: translateY(2px); }
.pb-link { margin-top: 4px; min-height: 40px; padding: 0 8px; background: none; border: 0; color: var(--paper-dim); font: 500 .8rem/1.2 var(--font-ui); text-decoration: underline; cursor: pointer; }
.pb-paid { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(159, 211, 138, .2); font: 600 .95rem/1.35 var(--font-ui); }
.pb-sheet { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(12, 8, 5, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 14px; animation: noteIn .2s ease-out both; }
.pb-sheet[hidden] { display: none; }
.pb-card { width: min(540px, 94vw); max-height: 94%; overflow: auto; padding: 8px 10px; display: grid; gap: 12px; justify-items: center; text-align: center; color: var(--paper); font: 500 1rem/1.45 var(--font-ui); }
.pb-card h2 { margin: 0; font: 700 clamp(1.3rem, 5vh, 1.7rem)/1.15 var(--font-ui); color: var(--gold); }
.pb-card p { margin: 0; text-wrap: balance; }
.pb-card .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pb-card input[type=email] { width: 100%; min-height: 52px; padding: 0 18px; font: 500 1rem var(--font-ui); text-align: center; color: var(--paper); background: rgba(20, 17, 15, .6); border: 2px solid rgba(243, 199, 122, .7); border-radius: 26px; }
.pb-card input[type=email]::placeholder { color: var(--paper-dim); }
/* Focus glow drawn inside the card's padding so the scrolling card never cuts it off at the sides. */
.pb-card input[type=email]:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 199, 122, .55); }
.pb-card input[type=email]:-webkit-autofill { -webkit-text-fill-color: var(--paper); -webkit-box-shadow: 0 0 0 40px #1a140f inset; caret-color: var(--paper); }
.pb-card input[type=email]:-webkit-autofill:focus-visible { -webkit-box-shadow: 0 0 0 40px #1a140f inset, 0 0 0 3px rgba(243, 199, 122, .55); }
.pb-card label.ck { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: .85rem; color: var(--paper-dim); }
.pb-card label.ck input { width: 24px; height: 24px; flex: none; accent-color: #e8b04e; }
.pb-card .err { color: #ffb4a8; font-weight: 600; min-height: 1.2em; }
.pb-card .small { font-size: .8rem; color: var(--paper-dim); }
.pb-card a { color: var(--gold); }

/* ===== 13. 11.: upright phone for the entry screens ===== */
@media (orientation: portrait) {
  #hello .hello-clip { object-fit: cover; object-position: 52% 50%; }
  .track { --slot: min(84vw, 560px); }
  /* Predbránie upright: the gate and Bubák on top, the panel below, never over him. */
  #predbranie .pb-pic { inset: 0 0 auto 0; height: 56%; background-position: 34% 60%; }
  #predbranie .pb-vid { object-position: 34% 60%; }
  /* Upright: picture and panel stack as a column, so the panel never scrolls and never covers Bubák. */
  #predbranie:not([hidden]) { display: flex; flex-direction: column; }   /* :not([hidden]) or the id beats .screen[hidden] */
  #predbranie .pb-pic { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; height: auto; }
  .pb-panel { position: relative; left: auto; right: auto; top: auto; bottom: auto; transform: none; flex: none;
    width: auto; max-height: none; margin: -24px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .pb-panel h1 { font-size: clamp(1.3rem, 6.4vw, 1.8rem); }
  .pb-count { font-size: clamp(1.6rem, 8.5vw, 2.3rem); }
  .pb-count i { font-size: .8rem; }
  .pb-sub, .pb-btn { font-size: 1rem; }
}

/* Predbránie: small social icons at the bottom of the panel (Instagram, Facebook, YouTube) */
.pb-socials { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.pb-soc { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--paper-dim); transition: color .15s, background .15s; }
.pb-soc svg { width: 20px; height: 20px; }
.pb-soc:hover, .pb-soc:focus-visible { color: var(--gold); background: rgba(243, 199, 122, .12); }
@media (max-height: 420px) { .pb-panel h1 { margin-bottom: 2px; } .pb-sub { margin-bottom: 4px; } .pb-count { margin-bottom: 6px; } .pb-btns { gap: 6px; } .pb-btn { min-height: 44px; } .pb-socials { margin-top: 0; } .pb-soc { width: 40px; height: 40px; } }
