:root {
  --night: #140d2b;
  --night-deep: #0b0719;
  --panel: rgb(255 255 255 / 0.055);
  --line: rgb(247 201 85 / 0.24);
  --snow: #f6f3ff;
  --muted: #b9aed6;
  --raspberry: #c92f62;
  --gold: #f7c955;
  --display: 'Fraunces', Georgia, serif;
  --text: 'Figtree', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--night-deep); }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--snow);
  font: 400 1.0625rem/1.65 var(--text);
  background:
    radial-gradient(60rem 40rem at 50% 38rem, rgb(46 128 112 / 0.22), transparent 70%),
    radial-gradient(70rem 36rem at 50% -8rem, rgb(124 68 168 / 0.5), transparent 70%),
    linear-gradient(var(--night), var(--night-deep));
}

/* hvězdná obloha */
body::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 23px 41px, #fff, transparent),
    radial-gradient(1px 1px at 131px 187px, #fff9, transparent),
    radial-gradient(1px 1px at 211px 73px, #ffe9a3, transparent),
    radial-gradient(1.5px 1.5px at 307px 269px, #fff7, transparent);
  background-size: 337px 311px;
  opacity: 0.55;
}

#snow, #fireworks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.still #fireworks { display: none; }

a { color: var(--gold); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, .logo, .footer-name { font-family: var(--display); line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 6vw, 4rem); margin: 0 0 1rem; letter-spacing: -0.015em; text-wrap: balance; }

/* ---------- hlavička ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(16 10 36 / 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.7rem 1rem;
}

.logo { display: flex; align-items: center; gap: 0.6rem; color: var(--snow); font-size: 1.45rem; text-decoration: none; }

nav { display: flex; flex-wrap: wrap; gap: 0.1rem 0.2rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

nav a:hover { color: var(--snow); border-color: var(--line); }
nav a[aria-current='page'] { color: #2a1a05; background: linear-gradient(135deg, #ffe9a3, #eab13a); }

.lightstring {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  height: 14px;
  overflow: hidden;
  gap: 1.6rem;
  padding: 0 0.5rem;
  pointer-events: none;
}

.lightstring i {
  flex: none;
  width: 6px;
  height: 9px;
  margin-top: -1px;
  border-radius: 40% 40% 50% 50%;
  background: #ffd45c;
  box-shadow: 0 0 10px 3px rgb(255 212 92 / 0.55);
  animation: twinkle 2.8s ease-in-out infinite;
}

.lightstring i:nth-child(3n) { background: #ff7da0; box-shadow: 0 0 10px 3px rgb(255 125 160 / 0.5); }
.lightstring i:nth-child(3n + 1) { background: #86d6ff; box-shadow: 0 0 10px 3px rgb(134 214 255 / 0.5); }

main { max-width: 72rem; margin: 0 auto; padding: 3rem 1rem 3rem; }
.page { animation: arrive 0.5s ease both; }

footer { text-align: center; padding: 2.5rem 1rem 3rem; border-top: 1px solid var(--line); color: var(--muted); }
footer p { margin: 0 0 0.35rem; }
.footer-name { font-size: 1.5rem; color: var(--snow); }

/* ---------- úvod kalendáře ---------- */

.intro { text-align: center; max-width: 42rem; margin: 0 auto; }
.intro p { margin: 0 0 0.75rem; }
.intro h1 + p { color: var(--muted); font-size: 1.15rem; }
.progress { font-weight: 600; color: var(--gold); margin-top: 1.5rem; }

.meter { width: min(16rem, 70%); height: 6px; margin: 0 auto 1.5rem; border-radius: 6px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #eab13a, #ffe9a3); transition: width 0.8s ease; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

.button {
  display: inline-block;
  font: 700 1rem var(--text);
  color: #fff;
  background: linear-gradient(160deg, #e5487a, #a81f4d);
  border: 1px solid #ff8fae66;
  border-radius: 2rem;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 24px -10px #e5487a;
  transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 28px -12px #e5487a; }
.button-quiet { background: var(--panel); border-color: var(--line); box-shadow: none; color: var(--snow); }
.button-quiet:hover:not(:disabled) { box-shadow: 0 10px 24px -14px var(--gold); }
.button:disabled { opacity: 0.4; cursor: default; }

/* ---------- stromek ---------- */

.tree {
  --gap: clamp(0.4rem, 1.4vw, 1.1rem);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 5vw, 3.5rem);
  max-width: 64rem;
  margin: 1rem auto 0;
  padding: 9rem 0 13rem;
  isolation: isolate;
}

.tree-art { position: absolute; inset: 0; z-index: -1; overflow: visible; }

.twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.sway { transform-origin: 0 0; animation: sway 4s ease-in-out infinite; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 0.55s ease-in-out infinite; }
.halo { transform-box: fill-box; transform-origin: center; animation: breathe 2.2s ease-in-out infinite; }
.rays { animation: spin 40s linear infinite; }

.row { display: flex; justify-content: center; gap: var(--gap); }

.window {
  /* šířka okýnka vychází z nejširší řady, po stranách zůstane místo na větve a svíčky */
  width: min(9.5rem, calc((100% - 13% - (var(--columns) - 1) * var(--gap)) / var(--columns)));
  aspect-ratio: 5 / 4.3;
  position: relative;
  flex: none;
  perspective: 500px;
  color: #2a1a05;
  text-decoration: none;
  border-radius: 0.6rem;
  background: #1b0f08;
  box-shadow: 0 0 0 3px #e7b13f, 0 0 0 4px #7a5208, 0 10px 18px rgb(0 0 0 / 0.5);
  transition: transform 0.25s, box-shadow 0.25s;
}

.window:hover { transform: translateY(-3px) scale(1.04); z-index: 2; box-shadow: 0 0 0 3px #ffdc7a, 0 0 22px 6px rgb(255 201 85 / 0.55); }

.inside {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
  /* teplé světlo za dvířky */
  background: radial-gradient(circle, #fff6cf, #f2a93b 55%, #8a3d10);
}

.is-open .inside { background: #fffaf0; }
.inside img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1b0f08; }

.caption {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 0.1rem 0.25rem;
  min-height: 0;
  line-height: 1.15;
  font-size: clamp(0.62rem, 1.9vw, 0.75rem);
}

.caption strong { flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* dvoukřídlá dvířka */
.leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  backface-visibility: hidden;
  background: var(--door);
  transition: transform 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) 0.45s, opacity 0.9s ease 2.4s, visibility 0s linear 3.3s;
}

.leaf::before {
  content: '';
  position: absolute;
  inset: 7px 5px;
  border: 1px solid rgb(255 233 163 / 0.65);
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgb(0 0 0 / 0.12), inset 0 0 10px rgb(0 0 0 / 0.25);
}

.leaf-left { left: 0; transform-origin: left center; border-radius: 0.6rem 0 0 0.6rem; border-right: 1px solid rgb(0 0 0 / 0.4); }
.leaf-right { right: 0; transform-origin: right center; border-radius: 0 0.6rem 0.6rem 0; border-left: 1px solid rgb(255 255 255 / 0.2); }

.tone-0 { --door: linear-gradient(160deg, #d93a6c, #85163d); }
.tone-1 { --door: linear-gradient(160deg, #b8702f, #6b3410); }
.tone-2 { --door: linear-gradient(160deg, #5a3a9e, #2c1a5c); }

/* zákusek uprostřed dvířek, na světlém papírovém podložení */
.seal {
  position: absolute;
  inset: 3%;
  display: grid;
  place-items: center;
  min-height: 0;
  background: radial-gradient(closest-side, rgb(255 250 240 / 0.5), rgb(255 250 240 / 0.22) 70%, transparent 100%);
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s ease 0.15s;
}

.seal svg { width: 100%; height: 100%; min-height: 0; overflow: visible; filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.45)); }
.seal text { font: 800 19px var(--display); fill: #3a1d07; }

.window:not(.is-open):hover .leaf { transition-delay: 0s; }
.window:not(.is-open):hover .leaf-left { transform: rotateY(-24deg); }
.window:not(.is-open):hover .leaf-right { transform: rotateY(24deg); }

.is-open .leaf { opacity: 0; visibility: hidden; }
.is-open .leaf-left { transform: rotateY(-135deg); }
.is-open .leaf-right { transform: rotateY(135deg); }
.is-open .seal { opacity: 0; transform: scale(1.7) rotate(25deg); pointer-events: none; }

/* otevírání: okýnko se zvolna přiblíží, kolem se roztočí paprsky a rozzáří se */
.window.is-opening {
  z-index: 6;
  animation: shine 4s ease-in-out;
}

.is-opening .inside img { animation: reveal 3.6s ease-out both; }

.is-opening::before,
.is-opening::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.is-opening::before {
  inset: -95%;
  z-index: -1;
  background: repeating-conic-gradient(rgb(255 224 130 / 0.75) 0deg 7deg, transparent 7deg 22deg);
  mask-image: radial-gradient(closest-side, #000 35%, transparent 98%);
  animation: sunburst 4s ease-in-out both;
}

.is-opening::after {
  inset: -45%;
  background: radial-gradient(closest-side, rgb(255 244 195 / 0.95), rgb(255 205 90 / 0.45) 55%, transparent);
  mix-blend-mode: screen;
  animation: flash 4s ease-in-out both;
}

.spark {
  position: absolute;
  z-index: 8;
  width: 11px;
  height: 11px;
  background: currentcolor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  pointer-events: none;
}

/* ---------- textové stránky ---------- */

.prose { max-width: 42rem; margin: 0 auto; }
.prose h2 { margin-top: 3rem; font-size: 1.75rem; }
.prose h3 { font-size: 1.5rem; color: var(--gold); }
.lead { margin-top: 0; color: var(--muted); }

.profile { display: grid; grid-template-columns: 15rem minmax(0, 40rem); gap: 3.5rem; justify-content: center; align-items: start; }
.profile .prose { margin: 0; }

.portrait { margin: 0; text-align: center; }

/* obloukový rám jako okno do jeviště */
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 10rem 10rem 1rem 1rem;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 10px rgb(247 201 85 / 0.12), 0 0 60px rgb(247 201 85 / 0.25);
}

.portrait figcaption { margin-top: 1.1rem; font-size: 0.8rem; color: var(--muted); }

.timeline { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.75rem; }

.timeline a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--snow);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.timeline a:hover { transform: translateX(6px); border-color: var(--gold); }
.timeline img { width: clamp(6rem, 28%, 10rem); height: auto; border-radius: 0.5rem; }
.timeline a > span { display: flex; flex-direction: column; line-height: 1.4; }
.timeline strong { font: 700 1.15rem var(--display); }
.timeline a > span > span { font-size: 0.9rem; color: var(--muted); }

.guests { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }

.guests > li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.guests > li:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 18px 36px -18px rgb(247 201 85 / 0.5); }
.guests img { display: block; width: 100%; height: auto; }
.guests h2 { margin: 0.9rem 1.1rem 0.4rem; font-size: 1.35rem; }
.guests ul { list-style: none; margin: 0; padding: 0 1.1rem 1.1rem; }

/* ---------- přehrávač ---------- */

dialog {
  width: min(64rem, 94vw);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #1d1238;
  color: var(--snow);
  box-shadow: 0 0 80px rgb(247 201 85 / 0.2);
}

dialog[open] { animation: arrive 0.35s ease both; }
dialog::backdrop { background: rgb(8 4 18 / 0.88); }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 0.9rem 1rem; }
.player-bar h2 { flex: 1 1 20rem; margin: 0; font-size: 1.1rem; }

/* ---------- animace ---------- */

@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) skewX(0); }
  25% { transform: scale(0.75, 1.4) skewX(10deg); }
  50% { transform: scale(1.18, 0.82) skewX(-3deg); }
  75% { transform: scale(0.88, 1.22) skewX(-11deg); }
}
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: 0; translate: 0 14px; } }
@keyframes shine {
  0%, 100% { box-shadow: 0 0 0 3px #e7b13f, 0 0 0 4px #7a5208, 0 10px 18px rgb(0 0 0 / 0.5); }
  28%, 70% { box-shadow: 0 0 0 4px #fff3bd, 0 0 28px 12px rgb(255 214 100 / 0.95), 0 0 80px 36px rgb(255 180 60 / 0.55); }
}
@keyframes sunburst {
  0% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  30%, 65% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.15) rotate(95deg); }
}
@keyframes reveal { 0%, 20% { transform: scale(1.35); filter: brightness(1.9) saturate(1.3); } 100% { transform: scale(1); filter: brightness(1) saturate(1); } }
@keyframes flash { 0% { opacity: 0; scale: 0.5; } 32% { opacity: 0.5; scale: 1; } 70% { opacity: 0.18; } 100% { opacity: 0; scale: 1.35; } }

.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }

/* ---------- menší displeje ---------- */

@media (max-width: 48rem) {
  .site-header { position: relative; }
  .header-inner { justify-content: center; }
  nav { justify-content: center; }
  main { padding-top: 2rem; }
  .profile { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { width: min(15rem, 75%); margin: 0 auto; }
}

@media (max-width: 30rem) {
  .window { aspect-ratio: 5 / 5.4; }
  main { padding-inline: 0.6rem; }
}

/* ---------- zámek ---------- */

.locked body > :not(.gate) { display: none !important; }

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 100vh;
  padding: 1.5rem;
  text-align: center;
}

.gate h1 { margin: 0; }

.gate input {
  width: min(18rem, 100%);
  font: 1.1rem var(--text);
  text-align: center;
  color: var(--snow);
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 2rem;
  padding: 0.65rem 1rem;
}

.gate-error { min-height: 1.6em; margin: 0; color: #ff9db8; }

/* ---------- návštěvy: zvířátka, sněhulák, Santa ---------- */

.creatures { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.creature { position: absolute; top: 0; left: 0; }
.creature .face, .creature .turn, .creature svg { display: block; width: 100%; height: 100%; overflow: visible; }
.creature svg { filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.4)); }
.still .creatures { display: none; }

.creature .tail { transform-box: fill-box; transform-origin: 100% 100%; animation: wag 1.8s ease-in-out infinite; }
.creature .tail-cat { transform-origin: 0 100%; animation-duration: 2.6s; }
.creature .tail-dog { transform-origin: 0 100%; animation: wag 0.35s ease-in-out infinite; }
.creature .tail-mouse { animation-duration: 0.5s; }
.creature .blink { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
.creature .wave { transform-origin: 68px 66px; animation: wag 1.4s ease-in-out infinite; }
.creature .wave-santa { transform-origin: 70px 74px; animation-duration: 0.9s; }
.creature .ear { transform-box: fill-box; transform-origin: 50% 0; animation: wag 2.2s ease-in-out infinite; }
.creature .tongue { transform-box: fill-box; transform-origin: 50% 0; animation: pant 0.5s ease-in-out infinite; }

.creature.walking .turn { animation: waddle 0.45s ease-in-out infinite; }
.creature.walking .feet { animation: scurry 0.18s linear infinite; }
.creature.flying .wing { transform-box: fill-box; transform-origin: 50% 20%; animation: flap 0.28s ease-in-out infinite; }
.creature-sleigh .turn { animation: waddle 1.2s ease-in-out infinite; }

.bubble {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% -4px;
  white-space: nowrap;
  padding: 0.2rem 0.65rem;
  border-radius: 1rem;
  background: #fffaf0;
  color: #2a1a05;
  font: 700 0.85rem var(--display);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.4);
  animation: arrive 0.3s ease both;
}

@keyframes wag { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(13deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes pant { 50% { transform: scaleY(0.55); } }
@keyframes scurry { 50% { transform: translateX(3px); } }
@keyframes waddle { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes flap { 0%, 100% { transform: scaleY(1) rotate(0); } 50% { transform: scaleY(-1.2) rotate(-12deg); } }

/* ---------- prskavky ---------- */

.fizz { animation: fizz 0.45s linear infinite; }
@keyframes fizz {
  0% { transform: scale(0.35) rotate(0deg); opacity: 1; }
  70% { opacity: 0.9; }
  100% { transform: scale(1.25) rotate(14deg); opacity: 0; }
}

/* ---------- vypínač hudby ---------- */

.music {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 9;
  font: 600 0.875rem var(--text);
  color: var(--snow);
  background: rgb(16 10 36 / 0.88);
  border: 1px solid var(--gold);
  border-radius: 2rem;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
}


/* ---------- chaloupka: vše na jednu obrazovku ---------- */

.house-area { display: flex; }

.one-screen body { min-height: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.one-screen main { max-width: 100rem; height: calc(100vh - var(--header, 4.5rem)); height: calc(100dvh - var(--header, 4.5rem)); padding: 1.1rem 1rem 0.5rem; }
.one-screen .header-inner { max-width: 100rem; }
.one-screen footer { padding: 0; border: 0; }
.one-screen footer p { display: none; }

.one-screen #kalendar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: 'intro tree' 'house tree';
  column-gap: 1.5rem;
  height: 100%;
}

.one-screen .intro { grid-area: intro; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.2rem 1rem; max-width: none; margin: 0; }
.one-screen .intro h1 { width: 100%; margin: 0; font-size: clamp(1.25rem, 3.4vh, 2.1rem); }
.one-screen .intro h1 + p { display: none; }
.one-screen .intro .progress { margin: 0; font-size: 0.95rem; }
.one-screen .meter { display: none; }
.one-screen .actions { gap: 0.5rem; }
.one-screen .actions .button { font-size: 0.875rem; padding: 0.4rem 0.9rem; }

.one-screen .house-area { grid-area: house; min-height: 0; align-items: flex-end; justify-content: center; padding: 0.5rem 0 2.6rem; }

.one-screen .tree-area { grid-area: tree; position: relative; min-width: 0; min-height: 0; }
.one-screen .tree-area .tree { position: absolute; left: 50%; bottom: 0; max-width: none; margin: 0; transform-origin: 50% 100%; }
.tree .ghost { height: 44px; visibility: hidden; }

/* pohádková roubenka */
.home { position: relative; max-width: 100%; padding-top: var(--roof, 80px); }

/* šindelová střecha */
.roof {
  position: absolute;
  top: 0;
  left: -6%;
  right: -6%;
  height: calc(var(--roof, 80px) + 8px);
  z-index: 1;
  background:
    radial-gradient(circle at 50% 0, #7d4a2a 0 8px, #3a1d0e 9px 10px, transparent 10.5px) 0 0 / 18px 22px,
    radial-gradient(circle at 50% 0, #6a3b20 0 8px, #33190b 9px 10px, transparent 10.5px) 9px 11px / 18px 22px,
    #4a2814;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* sněhová peřina na hřebeni */
.roof::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20200%20100%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20fill%3D%27%23f6f9ff%27%20d%3D%27M100%200L200%20100H186Q183%2086%20174%2090Q171%2077%20160%2079Q156%2065%20144%2067Q140%2052%20128%2053Q123%2039%20114%2040Q108%2027%20100%2031Q92%2027%2086%2040Q77%2039%2072%2053Q60%2052%2056%2067Q44%2065%2040%2079Q29%2077%2026%2090Q17%2086%2014%20100H0Z%27/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

/* rampouchy pod okapem */
.roof::after { content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 20px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2772%27%20height%3D%2720%27%3E%3Cpath%20fill%3D%27%23eef6ff%27%20d%3D%27M0%200H72V5Q68%208%2066%206L63%2017L60%206Q55%2010%2050%206L47%2012L44%206Q38%209%2033%206L29%2020L25%206Q20%2010%2017%206L14%2011L11%206Q5%209%200%205Z%27/%3E%3C/svg%3E") repeat-x; }
.roof { clip-path: polygon(50% 0, 100% calc(100% - 3px), 100% calc(100% + 14px), 0 calc(100% + 14px), 0 calc(100% - 3px)); }
.roof { background-clip: border-box; }

/* kulaté okénko ve štítu, za kterým se svítí */
.gable {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(var(--roof, 80px) * 0.4);
  height: calc(var(--roof, 80px) * 0.48);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  border: 3px solid #d9a966;
  background:
    linear-gradient(#5a2f13, #5a2f13) center / 3px 100% no-repeat,
    linear-gradient(#5a2f13, #5a2f13) center / 100% 3px no-repeat,
    radial-gradient(circle, #fff3b8, #ffb93f 60%, #c9661a);
  box-shadow: 0 0 0 2px #3a1d0e, 0 0 22px 7px rgb(255 190 70 / 0.55);
  animation: hearth 3.4s ease-in-out infinite;
}
@keyframes hearth { 0%, 100% { filter: brightness(1); } 40% { filter: brightness(1.18); } 55% { filter: brightness(0.94); } 70% { filter: brightness(1.1); } }

/* kamenný komín */
.chimney {
  position: absolute;
  right: 15%;
  top: calc(var(--roof, 80px) * 0.08);
  width: 8%;
  max-width: 2.8rem;
  height: calc(var(--roof, 80px) * 0.85);
  background:
    radial-gradient(ellipse, #a9a2a0 0 55%, transparent 62%) 0 0 / 16px 11px,
    radial-gradient(ellipse, #8d8583 0 55%, transparent 62%) 8px 6px / 16px 11px,
    #5d5655;
  border-top: 8px solid #f6f9ff;
  border-radius: 6px 6px 0 0;
}
.smoke { position: absolute; left: 25%; bottom: 100%; width: 18px; height: 18px; border-radius: 50%; background: rgb(236 240 255 / 0.55); opacity: 0; animation: smoke 4.8s ease-out infinite; }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(0.5); } 20% { opacity: 0.8; } 100% { opacity: 0; transform: translate(26px, -60px) scale(2.2); } }

/* stěny z klád se světlým spárováním */
.walls {
  position: relative;
  display: grid;
  justify-content: center;
  background:
    repeating-linear-gradient(91deg, transparent 0 41px, rgb(40 16 4 / 0.13) 41px 43px, transparent 43px 67px, rgb(255 220 170 / 0.07) 67px 70px),
    repeating-linear-gradient(180deg, #4a2610 0, #8a5128 6px, #a66a35 12px, #7b451f 22px, #42200c 29px, #e6d6b4 29px, #c4b08a 34px);
  border-inline: 4px solid #3d1e0a;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.5), 0 0 70px rgb(255 190 80 / 0.22);
}

/* zhlaví klád na nárožích */
.walls::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14px;
  right: -14px;
  pointer-events: none;
  --end: radial-gradient(circle at 50% 15px, #d8a766 0 3px, #9a6330 4px 5px, #c8935320 6px, #c89353 6px 8px, #8a5527 9px 10px, #3d1e0a 11px 13px, transparent 13.5px);
  background:
    var(--end) left top / 24px 34px repeat-y,
    var(--end) right top / 24px 34px repeat-y;
}

/* kamenná podezdívka a závěj před ní */
.plinth {
  position: relative;
  height: 16px;
  margin-inline: -6px;
  background:
    radial-gradient(ellipse, #9d9694 0 60%, transparent 68%) 0 0 / 31px 16px,
    #4f4847;
  border-radius: 3px 3px 8px 8px;
}
.plinth::after { content: ''; position: absolute; left: -6%; right: -6%; top: 11px; height: 18px; border-radius: 50%; background: #e8efff; opacity: 0.92; }

.walls .window { width: var(--tile, 5rem); aspect-ratio: auto; height: calc(var(--tile, 5rem) * var(--ratio, 0.86)); }

/* dřevěné malované okenice s kovanými panty */
.walls .window { border-radius: 4px; box-shadow: 0 0 0 2px #e0b372, 0 0 0 5px #4a2410, 0 7px 12px rgb(0 0 0 / 0.5); }
.walls .window:hover { box-shadow: 0 0 0 2px #ffe1a0, 0 0 0 5px #6a3815, 0 0 22px 8px rgb(255 201 85 / 0.55); }
.walls.small .window { box-shadow: 0 0 0 1px #e0b372, 0 0 0 3px #4a2410, 0 4px 8px rgb(0 0 0 / 0.5); }
.walls .leaf { border-radius: 3px; }
.walls .tone-0 { --door: repeating-linear-gradient(90deg, transparent 0 31%, rgb(0 0 0 / 0.26) 31% 34%), linear-gradient(165deg, #b4432f, #6f1d14); }
.walls .tone-1 { --door: repeating-linear-gradient(90deg, transparent 0 31%, rgb(0 0 0 / 0.26) 31% 34%), linear-gradient(165deg, #b9813f, #6e4116); }
.walls .tone-2 { --door: repeating-linear-gradient(90deg, transparent 0 31%, rgb(0 0 0 / 0.26) 31% 34%), linear-gradient(165deg, #3f7a52, #1c442c); }
.walls .leaf::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 55%;
  --strap: linear-gradient(#2a201c, #2a201c);
}
.walls .leaf-left::after { left: 0; background: var(--strap) left 17% / 100% 3px no-repeat, var(--strap) left 83% / 100% 3px no-repeat; }
.walls .leaf-right::after { right: 0; background: var(--strap) right 17% / 100% 3px no-repeat, var(--strap) right 83% / 100% 3px no-repeat; }

/* v malých okýnkách zůstane jen náhled a jméno hosta */
.walls.small .caption { font-size: 0.6rem; line-height: 1.1; padding: 0 1px; }

/* na jméno i datum není místo naráz, proto se na stejném řádku pomalu prolínají (přechod 2 s) */
.walls.small .caption { display: grid; align-content: center; align-items: center; }
.walls.small .caption > * { grid-area: 1 / 1; min-width: 0; }
.walls.small .caption > strong { animation: caption-name 10s ease-in-out infinite; }
.walls.small .caption > span { opacity: 0; animation: caption-date 10s ease-in-out infinite; }
.walls .caption .part { display: none; }
@keyframes caption-name { 0%, 30%, 100% { opacity: 1; } 50%, 80% { opacity: 0; } }
@keyframes caption-date { 0%, 30%, 100% { opacity: 0; } 50%, 80% { opacity: 1; } }

.house-door {
  position: relative;
  justify-self: stretch;
  align-self: stretch;
}

/* oblouková prkenná vrata */
.door-leaf {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: min(100%, var(--tile, 5rem) * 0.86);
  translate: -50% 0;
  border-radius: 50% 50% 3px 3px / 36% 36% 3px 3px;
  background:
    linear-gradient(#241a16, #241a16) left 56% / 62% 4px no-repeat,
    linear-gradient(#241a16, #241a16) left 84% / 62% 4px no-repeat,
    repeating-linear-gradient(90deg, #7a431c 0 19%, #3d1e0a 19% 21%);
  border: 4px solid #d9a966;
  box-shadow: 0 0 0 3px #3d1e0a;
}
.door-leaf::after { content: ''; position: absolute; right: 12%; top: 64%; width: 9%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--gold); }

.wreath { position: absolute; left: 50%; top: 16%; width: 52%; max-width: 3rem; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; border: 0.4rem dotted #3d9a61; background: radial-gradient(circle, transparent 52%, #1f6b40 54% 70%, transparent 72%); }
.walls.small .wreath { border-width: 3px; }
.wreath::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 13px; height: 10px; translate: -50% 0; background: #d3194a; clip-path: polygon(0 0, 50% 35%, 100% 0, 100% 100%, 50% 65%, 0 100%); }

/* lucerny po stranách vrat, jen když je na ně místo */
.lantern { position: absolute; top: 28%; width: calc(var(--tile, 5rem) * 0.15); height: calc(var(--tile, 5rem) * 0.24); border-radius: 3px; border: 2px solid #241a16; border-top-width: 5px; background: radial-gradient(circle, #fff3b8, #ffb93f 70%, #c9661a); box-shadow: 0 0 18px 7px rgb(255 185 70 / 0.5); animation: hearth 2.6s ease-in-out infinite; }
.lantern-left { left: 8%; }
.lantern-right { right: 8%; animation-delay: -1.1s; }

/* mobil na výšku: chaloupka nahoře, stromek se zvířátky pod ní */
@media (max-width: 48rem) {
  .header-inner { gap: 0.35rem 0.75rem; }
  .house nav, nav { max-width: 100%; }
  .one-screen .header-inner { padding: 0.4rem 0.6rem; justify-content: space-between; }
  .one-screen .logo { font-size: 1.15rem; }
  .one-screen .logo img { width: 26px; height: 26px; }
  .one-screen nav { order: 3; width: 100%; justify-content: center; gap: 0; }
  .one-screen nav a { white-space: nowrap; font-size: 0.8rem; padding: 0.1rem 0.5rem; }
  .one-screen main { padding: 0.8rem 0.5rem 0.25rem; }
  .one-screen #kalendar { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 3.2fr) minmax(0, 1fr); grid-template-areas: 'intro' 'house' 'tree'; }
  .one-screen .intro { gap: 0.25rem 0.5rem; }
  .one-screen .intro h1 { display: none; }
  .one-screen .intro .progress { width: 100%; font-size: 0.85rem; }
  .one-screen .actions .button { font-size: 0.75rem; padding: 0.25rem 0.7rem; }
  .one-screen .house-area { padding: 0.3rem 0 0.8rem; }
  .one-screen .tree-area { margin-bottom: 1.9rem; }
  .one-screen .tree-area .tree { padding: 6rem 0 8.5rem; gap: 2.2rem; }
  .one-screen .music { font-size: 0.7rem; padding: 0.3rem 0.6rem; bottom: 0.4rem; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* telefon na šířku */
@media (max-height: 32rem) and (min-width: 36rem) {
  .one-screen .site-header { position: relative; }
  .one-screen .header-inner { padding-block: 0.2rem; }
  .one-screen nav a { font-size: 0.8rem; padding: 0.15rem 0.5rem; }
  .one-screen .logo img { width: 22px; height: 22px; }
  .one-screen main { padding-top: 0.5rem; }
  .one-screen .intro h1 { display: none; }
  .one-screen .house-area { padding-bottom: 0.6rem; }
}

/* ---------- rukou kreslený vzhled chaloupky ---------- */

.house {
  --display: 'Caveat', cursive;
  --text: 'Patrick Hand', cursive;
  --ink: #2c2350;
  --paper: #fbeedb;
  --wobble-a: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-b: 18px 225px 18px 255px / 255px 18px 225px 18px;
}

.house .logo { font-size: 1.9rem; }
.house .button, .house .music, .house nav a { font-family: var(--text); font-weight: 400; border-radius: var(--wobble-a); }
.house .button, .house .music { color: var(--ink); background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--paper), 2px 4px 0 2px rgb(0 0 0 / 0.35); opacity: 1; }
.house .button + .button { border-radius: var(--wobble-b); transform: rotate(0.9deg); }
.house .button:disabled { opacity: 0.55; }
.house nav a { font-size: 1.1rem; }
.house .intro .progress { font-size: 1.2rem; }
.house.one-screen .intro h1 { font-size: clamp(1.7rem, 4.6vh, 2.8rem); }
.house.one-screen .actions .button { font-size: 1rem; }

/* střecha, štít, komín a podezdívka */
.house .roof { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20200%20100%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20d%3D%27M100%202L198%2094Q100%2099%202%2094Z%27%20fill%3D%27%23d98c86%27%20stroke%3D%27%232c2350%27%20stroke-width%3D%273%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linejoin%3D%27round%27/%3E%3Cpath%20d%3D%27M56.0%2048%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%27%20stroke-width%3D%271.3%27%20fill%3D%27none%27%20stroke%3D%27%232c2350%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linecap%3D%27round%27/%3E%3Cpath%20d%3D%27M41.4%2062%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%27%20stroke-width%3D%271.3%27%20fill%3D%27none%27%20stroke%3D%27%232c2350%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linecap%3D%27round%27/%3E%3Cpath%20d%3D%27M26.9%2076%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%27%20stroke-width%3D%271.3%27%20fill%3D%27none%27%20stroke%3D%27%232c2350%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linecap%3D%27round%27/%3E%3Cpath%20d%3D%27M13.3%2089%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%20q4.5%206%209%200%27%20stroke-width%3D%271.3%27%20fill%3D%27none%27%20stroke%3D%27%232c2350%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linecap%3D%27round%27/%3E%3Cpath%20d%3D%27M100%202L156%2054Q148%2059%20142%2050Q134%2056%20127%2043Q118%2048%20112%2036Q104%2042%20100%2032Q94%2042%2087%2036Q82%2048%2073%2043Q66%2056%2058%2050Q52%2059%2044%2054Z%27%20fill%3D%27%23fdf7f4%27%20stroke%3D%27%232c2350%27%20stroke-width%3D%272%27%20vector-effect%3D%27non-scaling-stroke%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E") center / 100% 100% no-repeat; clip-path: none; filter: url(#sketch-big); }
.house .roof::before { content: none; }
.house .roof::after { bottom: -10px; }
.house .gable { border: 3px solid var(--ink); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink), 0 0 22px 9px rgb(255 190 70 / 0.5); filter: url(#sketch); animation: none; background: linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, #ffd97a; }
.house .chimney { background: linear-gradient(90deg, transparent 46%, var(--ink) 46% 54%, transparent 54%) 0 0 / 18px 22px, linear-gradient(var(--ink) 2px, transparent 2px) 0 0 / 100% 11px, #c98d78; border: 2px solid var(--ink); border-top: 9px solid #fdf7f4; box-shadow: 0 -2px 0 var(--ink); filter: url(#sketch); }
.house .plinth { background: radial-gradient(ellipse, #cfc6da 0 55%, var(--ink) 58% 66%, transparent 68%) 0 0 / 31px 16px, #a99fbd; border: 2px solid var(--ink); filter: url(#sketch); }
.house .plinth::after { background: #f3f1fb; border: 2px solid var(--ink); }

/* prkenné stěny, kreslené zvlášť pod okýnky, aby se náhledy nevlnily */
.house .walls { background: none; border: 0; box-shadow: none; isolation: isolate; }
.house .walls::before { content: none; }
.house .walls::after { content: ''; position: absolute; z-index: -1; inset: -2px 0; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27120%27%20height%3D%2736%27%3E%3Cpath%20d%3D%27M0%2034Q30%2032%2060%2034T120%2034%27%20stroke%3D%27%232c2350%27%20stroke-width%3D%271.6%27%20fill%3D%27none%27/%3E%3Cpath%20d%3D%27M12%2012q14-3%2030%200M70%2022q18%203%2036-1M52%207h12%27%20stroke%3D%27%232c2350%27%20stroke-width%3D%27.8%27%20opacity%3D%27.45%27%20fill%3D%27none%27/%3E%3C/svg%3E"), #e9bd8c; border: 3px solid var(--ink); border-radius: 6px 10px 7px 12px; filter: url(#sketch-big); }

/* okýnka s okenicemi */
.house .walls .window, .house .walls.small .window { border-radius: 7px 3px 9px 4px / 4px 9px 3px 8px; background: #ffd97a; box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--paper), 0 0 0 8px var(--ink), 3px 6px 0 7px rgb(44 35 80 / 0.25); }
.house .walls.small .window { box-shadow: 0 0 0 1px var(--ink), 0 0 0 3px var(--paper), 0 0 0 4px var(--ink); }
.house .walls .window:hover { box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px #ffe39a, 0 0 0 8px var(--ink), 0 0 22px 12px rgb(255 201 85 / 0.55); }
.house .walls .tone-0 { --door: #ee9aa6; }
.house .walls .tone-1 { --door: #9db9dd; }
.house .walls .tone-2 { --door: #a9cba4; }
.house .walls .leaf { background: repeating-linear-gradient(93deg, transparent 0 13px, rgb(44 35 80 / 0.28) 13px 14px, transparent 14px 23px), repeating-linear-gradient(58deg, rgb(255 255 255 / 0.16) 0 2px, transparent 2px 5px), var(--door); border: 1px solid var(--ink); }
.house .walls .leaf::before { inset: 4px 3px; border: 2px solid var(--ink); box-shadow: none; filter: url(#sketch); }
.house .walls .leaf::after { --strap: linear-gradient(#2c2350, #2c2350); }
.house .is-open .inside { background: var(--paper); }
.house .inside img { box-sizing: border-box; border: solid var(--paper); border-width: 3px 3px 0; }
.house .walls .caption { font-family: var(--text); font-size: 0.9rem; color: var(--ink); }
.house .walls.small .caption { font-size: 0.85rem; line-height: 1; }
.house .caption strong { font-weight: 400; }

/* zákusky a čísla roztřesenou linkou */
.house .seal { background: none; }
.house .seal svg { filter: url(#sketch) drop-shadow(1px 2px 0 rgb(44 35 80 / 0.55)); rotate: -4deg; }
.house .window:nth-of-type(3n) .seal svg { rotate: 5deg; }
.house .window:nth-of-type(3n+1) .seal svg { rotate: 1deg; }
.house .seal text { font: 700 31px var(--display); fill: var(--ink); }
.house .seal circle:last-of-type { r: 18px; stroke: var(--ink); }

/* vrata a lucerny */
.house .door-leaf { background: repeating-linear-gradient(90deg, #c8915f 0 19%, var(--ink) 19% 20.5%); border: 3px solid var(--ink); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink); filter: url(#sketch); }
.house .door-leaf::after { background: #f2c75c; border-color: var(--ink); }
.house .lantern { border-color: var(--ink); filter: url(#sketch); animation: none; background: #ffd97a; }

/* stromek: ploché pastelové barvy a obrysy (filtr jen na nehybných tvarech) */
.house .tree-art path[fill="url(#pine)"] { fill: #6fae93; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; filter: url(#sketch-big); }
.house .tree-art rect[fill="url(#bark)"] { fill: #b9805a; stroke: var(--ink); stroke-width: 3; }
.house .tree-art rect:not([fill="url(#wax)"]) { stroke: var(--ink); stroke-width: 2; }
.house .tree-art rect[fill="url(#wax)"] { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.house .tree-art circle[fill^="url(#ball"] { stroke: var(--ink); stroke-width: 1.8; }
.house .tree-art polygon { fill: #ffd45c; stroke: var(--ink); stroke-width: 2.5; }

@media (max-width: 48rem) {
  .house nav a { font-size: 0.9rem; }
  .house.one-screen .actions .button { font-size: 0.85rem; }
}

/* ---------- návštěvy u chaloupky, světýlka pod střechou ---------- */

.house-area { position: relative; }
.house .gable { animation: hearth 3.4s ease-in-out infinite; }
.house .lantern { animation: hearth 2.6s ease-in-out infinite; }
.house .lantern-right { animation-delay: -1.1s; }

.eaves { position: absolute; z-index: 2; left: -3%; right: -3%; top: calc(var(--roof, 80px) + 6px); display: flex; justify-content: space-between; border-top: 2px solid var(--ink); pointer-events: none; }
.eaves i { width: 9px; height: 12px; margin-top: 1px; border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%; border: 1.5px solid var(--ink); background: var(--c, #ffd45c); box-shadow: 0 0 12px 3px var(--c, #ffd45c); animation: twinkle 2.4s ease-in-out infinite; }
.eaves i:nth-child(4n+2) { --c: #ff6f7f; animation-delay: -0.6s; }
.eaves i:nth-child(4n+3) { --c: #6dffa3; animation-delay: -1.2s; }
.eaves i:nth-child(4n) { --c: #6cc4ff; animation-delay: -1.8s; }

/* ---------- překvapení za vraty ---------- */

.door-button { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.door-inside, .door-leaf { pointer-events: none; }
.door-inside {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: min(100%, var(--tile, 5rem) * 0.86);
  translate: -50% 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 50% 50% 3px 3px / 36% 36% 3px 3px;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 50% 60%, #fff6cf, #ffc04d 60%, #b8611c);
  visibility: hidden;
}
.door-inside svg { width: 92%; height: 85%; }
.house .door-leaf { transform-origin: left center; transition: transform 0.8s ease; }
.house-door.open .door-inside { visibility: visible; }
.house-door.open .door-leaf { transform: rotateY(-108deg); }
.house-door.open .door-inside svg { animation: arrive 0.5s ease 0.35s both; }
.house-door.knocked .door-leaf, .door-button:hover .door-leaf { animation: knock 0.45s ease 2; }
.house-door.open .door-leaf { animation: none; }
@keyframes knock { 25% { transform: rotateY(-9deg); } 60% { transform: rotateY(0deg); } 80% { transform: rotateY(-4deg); } }

.door-note {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 0;
  width: max-content;
  max-width: 15rem;
  padding: 0.35rem 0.8rem;
  text-align: center;
  line-height: 1.2;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-a);
  box-shadow: 2px 4px 0 rgb(0 0 0 / 0.35);
  pointer-events: none;
}
.door-note:empty { display: none; }

.treat { position: fixed; top: 0; z-index: 8; width: 3.2rem; height: 3.2rem; pointer-events: none; }
.treat svg { width: 100%; height: 100%; overflow: visible; }

.player-fallback { position: relative; display: grid; place-items: center; height: 100%; }
.player-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-fallback .button { position: relative; }


.player-fallback { align-content: center; gap: 0.75rem; }
.player-fallback small { position: relative; max-width: 90%; padding: 0.25rem 0.75rem; text-align: center; color: #fff; background: rgb(8 4 18 / 0.8); border-radius: 0.5rem; }

/* ---------- velká karta při otevření okýnka ---------- */

.zoom { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; background: radial-gradient(closest-side, rgb(255 224 130 / 0.35), rgb(8 4 18 / 0.55)); animation: veil 0.8s ease both; }
@keyframes veil { from { opacity: 0; } }

.zoom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* celá karta se vejde i na nízkou obrazovku */
  width: min(880px, 77vw, 85vh);
  padding: 0.8rem 0.8rem 0.6rem;
  text-align: center;
  line-height: 1.15;
  color: var(--ink);
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 22px 8px 26px 12px / 10px 24px 9px 20px;
  box-shadow: 0 0 0 7px var(--paper), 0 0 0 10px var(--ink), 0 0 60px 24px rgb(255 201 85 / 0.55);
}
.zoom-card strong { margin-top: 0.4rem; font-weight: 400; font-size: clamp(1.1rem, 3.4vw, 2.6rem); }
.zoom-card > span { font-size: clamp(0.9rem, 2vw, 1.5rem); }

.zoom-photo { position: relative; width: 100%; aspect-ratio: 16 / 9; perspective: 1400px; }
.zoom-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.zoom-leaf { position: absolute; top: 0; bottom: 0; width: 50%; border: 3px solid var(--ink); background: repeating-linear-gradient(93deg, transparent 0 40px, rgb(44 35 80 / 0.28) 40px 43px, transparent 43px 70px), var(--door); backface-visibility: hidden; animation: swing 1.7s cubic-bezier(.45,.05,.25,1) 0.7s both; }
.zoom-leaf-left { left: 0; transform-origin: left center; }
.zoom-leaf-right { right: 0; transform-origin: right center; --turn: 130deg; }
.zoom-card.tone-0 { --door: #ee9aa6; }
.zoom-card.tone-1 { --door: #9db9dd; }
.zoom-card.tone-2 { --door: #a9cba4; }
@keyframes swing { 70% { opacity: 1; } 100% { transform: rotateY(var(--turn, -130deg)); opacity: 0; } }
