/* Leon Baar: noc, krew, kość. */

@font-face { font-family: 'IM Fell English'; font-weight: 400; font-display: swap; src: url(/fonts/im-fell-english-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-latin-600-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-latin-ext-600-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 700; font-display: swap; src: url(/fonts/cormorant-latin-700-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 700; font-display: swap; src: url(/fonts/cormorant-latin-ext-700-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Spectral'; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Spectral'; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-ext-400-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Spectral'; font-weight: 600; font-display: swap; src: url(/fonts/spectral-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Spectral'; font-weight: 600; font-display: swap; src: url(/fonts/spectral-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Spectral SC'; font-weight: 500; font-display: swap; src: url(/fonts/spectral-sc-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-201E, U+2026; }
@font-face { font-family: 'Spectral SC'; font-weight: 500; font-display: swap; src: url(/fonts/spectral-sc-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }

:root {
  --noc: #0a0d14;
  --kosc: #e6dfd0;
  --kosc-2: #b3ab9c;
  --krew: #a51d1b;
  --krew-jasna: #e0493e;
  --gotyk: 'IM Fell English', 'Cormorant', Georgia, serif;
  --kursywa: 'Cormorant', Georgia, serif;
  --tekst: 'Spectral', Georgia, serif;
  --kapitalik: 'Spectral SC', 'Spectral', Georgia, serif;
  --margines: clamp(16px, 4vw, 48px);
  --wyjscie: cubic-bezier(.16, 1, .3, 1);
  --cien-tekstu: 0 1px 2px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--krew) var(--noc); scroll-behavior: smooth; }
body { margin: 0; background: var(--noc); color: var(--kosc); font: 400 1.1rem/1.6 var(--tekst); font-kerning: normal; }
::selection { background: var(--krew); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--krew-jasna); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--krew-jasna); outline-offset: 3px; border-radius: 2px; }
.pomin { position: absolute; left: -9999px; top: 8px; background: var(--krew); color: #fff; padding: 8px 14px; z-index: 50; }
.pomin:focus { left: 8px; }
[id] { scroll-margin-top: 84px; }

/* Ziarno filmowe na wierzchu, jak na obrazie. */
body::after {
  content: ''; position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: ziarno 1.2s steps(6) infinite;
}
@keyframes ziarno { 0% { transform: translate(0, 0); } 33% { transform: translate(-4%, 3%); } 66% { transform: translate(3%, -5%); } 100% { transform: translate(-2%, 2%); } }

/* ---------- góra ---------- */
.gora {
  position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--margines); background: linear-gradient(to bottom, rgba(6, 7, 11, .85), rgba(6, 7, 11, 0)); transition: background .4s;
}
.gora.przewiniete { background: rgba(6, 7, 11, .9); box-shadow: 0 1px 0 rgba(165, 29, 27, .45); }
.logo { display: flex; align-items: center; text-decoration: none; padding: 4px 0; }
.logo svg { width: 76px; height: 56px; color: var(--krew-jasna); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); transition: transform .4s var(--wyjscie); }
.logo:hover svg { transform: scale(1.06); }
.menu { display: flex; gap: clamp(16px, 2.6vw, 38px); }
.menu a { font: 600 1.4375rem/1 var(--kursywa); font-style: italic; text-decoration: none; padding: 6px 0; position: relative; text-shadow: var(--cien-tekstu); }
.menu a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--krew-jasna); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--wyjscie); }
.menu a:hover::after, .menu a.tu::after { transform: scaleX(1); }
.menu-przycisk, .menu__haslo { display: none; }

/* ---------- scena: obraz domu za całą stroną ---------- */
.scena { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #07080c; --mx: 50%; --my: 50%; --p: 0; }
.kadr { position: absolute; left: 50%; top: 50%; width: max(100%, calc(max(100svh, 560px) * 1300 / 731)); aspect-ratio: 1300 / 731; transform: translate(-50%, -50%); }
@media (min-width: 900px) { .kadr { width: max(116%, calc(max(100svh, 560px) * 1300 / 731)); transform: translate(-44%, -50%); } }
.warstwa { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; transform-origin: 56% 74%; }
.kadr__obraz { display: block; width: 100%; height: 100%; }
.mgla-przod { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.niebo-efekty { position: absolute; inset: 0; -webkit-mask: url(/img/niebo-maska.png) 0 0 / 100% 100% no-repeat; mask: url(/img/niebo-maska.png) 0 0 / 100% 100% no-repeat; }
.niebo-efekty svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.swiatlo { position: absolute; width: 6%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 190, 110, .75) 0, rgba(255, 110, 40, .35) 30%, transparent 68%); animation: zar 4.5s ease-in-out infinite; }
.swiatlo--oko2 { animation-delay: -1.8s; }
.swiatlo--okno { width: 5%; background: radial-gradient(circle, rgba(255, 90, 40, .6) 0, rgba(200, 40, 20, .25) 35%, transparent 70%); animation: migotanie 7s infinite; }
@keyframes zar { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.9); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } }
@keyframes migotanie { 0%, 18%, 22%, 61%, 64%, 100% { opacity: 1; } 20%, 62% { opacity: .2; } 63% { opacity: .7; } }
.scena.grzmi .kadr > .warstwa:first-child .kadr__obraz { animation: jasnieje .9s ease-out; }
@keyframes jasnieje { 0% { filter: brightness(1.7) saturate(.8); } 10% { filter: none; } 20% { filter: brightness(1.45); } 100% { filter: none; } }
.piorun { fill: none; stroke: #f3ecff; stroke-width: 2.4; opacity: 0; filter: drop-shadow(0 0 8px #b9a8ff) drop-shadow(0 0 22px #7f6bd8); }
.scena.grzmi .piorun { animation: piorun .9s steps(1) both; }
@keyframes piorun { 0% { opacity: 1; } 12% { opacity: 0; } 22% { opacity: 1; } 55% { opacity: .5; } 70%, 100% { opacity: 0; } }
.blysk { position: absolute; inset: 0; background: radial-gradient(ellipse at var(--bx, 60%) 15%, rgba(225, 220, 255, .9), rgba(160, 160, 210, .3) 55%, transparent); opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.scena.grzmi .blysk { animation: blysk .9s ease-out both; }
@keyframes blysk { 0% { opacity: .9; } 10% { opacity: .1; } 20% { opacity: .75; } 100% { opacity: 0; } }
.winieta { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 75% at 55% 50%, transparent 45%, rgba(2, 3, 6, .75) 100%); }
.winieta::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle 140px at var(--mx) var(--my), rgba(255, 175, 120, .16), rgba(255, 120, 70, .05) 50%, transparent 100%); mix-blend-mode: screen; }
/* Zasłona: im niżej, tym ciemniej. Dom zostaje widoczny, treść czytelna. */
.zaslona { position: absolute; inset: 0; pointer-events: none; opacity: var(--p);
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(8, 6, 10, .62), rgba(5, 5, 8, .86)); }

main, .koniec { position: relative; z-index: 2; }

/* ---------- powitanie ---------- */
.powitanie {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; text-align: center;
  padding: max(110px, 14vh) var(--margines) 0; position: relative;
}
@media (min-width: 900px) {
  .powitanie { align-items: flex-start; text-align: left; justify-content: center; padding: 0 0 8vh max(var(--margines), 6vw); }
  .powitanie__linki { justify-content: flex-start; }
}
.powitanie--404 { justify-content: center; align-items: center; text-align: center; padding: 0 var(--margines); }
.powitanie--404 .powitanie__imie { font-size: clamp(3rem, 7vw, 5.4rem); }
.powitanie__imie { margin: 0 0 .5em; font: 400 clamp(3.6rem, 9vw, 7.4rem)/.95 var(--gotyk); letter-spacing: -.015em; text-shadow: 0 0 40px rgba(0, 0, 0, .95), 0 4px 12px #050508; }
.powitanie__imie span { display: inline-block; animation: wylania 2.4s var(--wyjscie) both; animation-delay: calc(var(--i) * 110ms + 200ms); }
@keyframes wylania { from { opacity: 0; filter: blur(18px); transform: translateY(14px) scale(1.08); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes wylania-czysto { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.powitanie__linki { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 0; animation: wylania-czysto 1.1s 1.7s var(--wyjscie) both; }
.powitanie__linki a, .kup {
  display: inline-block; font: 700 1.2rem/1 var(--kursywa); font-style: italic; text-decoration: none; color: #fff; background: var(--krew); padding: 13px 26px 14px;
  clip-path: polygon(1% 8%, 22% 0, 51% 6%, 78% 1%, 100% 9%, 98% 52%, 100% 92%, 74% 100%, 46% 94%, 19% 100%, 0 93%, 2% 48%);
  transition: background .3s, transform .3s var(--wyjscie);
}
.powitanie__linki a { font-size: clamp(1.35rem, 1.9vw, 1.65rem); padding: 19px 38px 20px; }
.powitanie__linki a + a { background: rgba(10, 13, 20, .6); box-shadow: inset 0 0 0 1px rgba(230, 223, 208, .5); clip-path: none; }
.powitanie__linki a:hover, .kup:hover { background: #c4271f; color: #fff; transform: translateY(-2px); }
.powitanie__linki a + a:hover { background: rgba(10, 13, 20, .85); }
.przewin { position: absolute; left: 50%; bottom: 26px; width: 44px; height: 110px; margin-left: -22px; }
.przewin svg { width: 100%; height: 100%; overflow: visible; opacity: .85; filter: drop-shadow(0 0 3px rgba(40, 4, 4, .6)); }
/* Krwawa nitka spływa, kropla nabrzmiewa i odrywa się: podpowiedź „przewiń”, bez przycisku. */
.przewin__nitka { stroke-dasharray: 90; stroke-dashoffset: 90; animation: nitka 2.8s ease-in infinite; }
.przewin__kropla { transform-box: fill-box; transform-origin: 50% 0; opacity: 0; animation: kropla 2.8s ease-in infinite; }
@keyframes nitka { 0% { stroke-dashoffset: 90; opacity: 1; } 45% { stroke-dashoffset: 0; } 85% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes kropla { 0%, 40% { opacity: 0; transform: scale(.3, .2); } 55% { opacity: 1; transform: scale(1, .9); } 70% { transform: scale(.92, 1.08) translateY(2px); } 100% { opacity: 0; transform: scale(.85, 1.15) translateY(26px); } }
@keyframes kapie { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- plansza: trzy sekcje jedna pod drugą (kup, publikacje, o autorze) ---------- */
.plansza {
  max-width: 1100px; margin: 0 auto; padding: clamp(80px, 11vh, 130px) var(--margines) clamp(56px, 8vh, 96px);
  display: flex; flex-direction: column; gap: clamp(96px, 13vh, 150px);
  text-shadow: var(--cien-tekstu);
}
.plansza__pole { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
/* Kup i O autorze: obraz po lewej, treść po prawej, nagłówek nad całością. */
@media (min-width: 861px) {
  .plansza__kup, .plansza__autor { display: grid; column-gap: clamp(48px, 6vw, 96px); align-items: center; justify-items: center; }
  .plansza__kup { grid-template-columns: clamp(260px, 28vw, 340px) minmax(0, 1fr); }
  .plansza__autor { grid-template-columns: clamp(240px, 24vw, 300px) minmax(0, 1fr); }
  .plansza__autor > .autor-foto { width: 100%; margin: 0; }
  .plansza__autor > .autor__tekst { width: 100%; max-width: 34ch; }
  .plansza__kup > .naglowek, .plansza__autor > .naglowek { grid-column: 1 / -1; }
  .plansza__kup > .tom-scena, .plansza__autor > .autor-foto { grid-column: 1; grid-row: 2 / span 6; align-self: center; }
  .plansza__kup > :not(.naglowek):not(.tom-scena), .plansza__autor > .autor__tekst { grid-column: 2; }
}

.naglowek { margin: 0 0 clamp(36px, 5vh, 56px); font: 700 clamp(2.8rem, 5vw, 4.2rem)/1 var(--kursywa); font-style: italic; letter-spacing: -.01em; color: var(--kosc); text-align: center; }
.naglowek svg { width: 240px; height: 14px; margin: 10px auto 0; color: var(--krew); }

/* Oś czasu: stacje na pionowej nitce, kropla krwi nad każdą. */
.os { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 680px; }
.stacja { position: relative; padding: 26px 0 30px; }
.stacja::before { content: ''; display: block; width: 11px; height: 15px; margin: 0 auto 12px; background: var(--krew-jasna); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; clip-path: polygon(50% 0, 100% 62%, 92% 88%, 50% 100%, 8% 88%, 0 62%); box-shadow: 0 0 12px rgba(224, 73, 62, .7); }
.stacja + .stacja::after, .stacja:first-child::after { content: ''; position: absolute; left: 50%; top: -6px; height: 26px; width: 1px; background: linear-gradient(transparent, rgba(224, 73, 62, .7)); }
.stacja:first-child::after { display: none; }
.stacja__kiedy { margin: 0 0 6px; font: 500 1rem/1.2 var(--kapitalik); letter-spacing: .14em; color: var(--krew-jasna); text-transform: lowercase; }
.stacja__tytul { margin: 0 0 8px; font: 700 clamp(1.9rem, 3vw, 2.4rem)/1.12 var(--kursywa); font-style: italic; }
.stacja__tytul a { text-decoration: none; background: linear-gradient(var(--krew-jasna), var(--krew-jasna)) 0 100% / 100% 1px no-repeat; }
.stacja__gdzie { margin: 0; font-size: 1.25rem; }
.stacja__gdzie span { color: var(--kosc-2); }
.stacja__uwagi { margin: 8px 0 0; font: italic 400 1.15rem/1.5 var(--tekst); color: var(--kosc-2); }
.starsze { width: 100%; max-width: 680px; }
.starsze summary { cursor: pointer; list-style: none; font: 600 1.45rem/1 var(--kursywa); font-style: italic; padding: 14px; text-decoration: underline; text-decoration-color: var(--krew-jasna); text-underline-offset: .25em; }
.starsze summary::-webkit-details-marker { display: none; }

/* Książka: obracany tom, tytuł, cennik w wierszach. */
.tom-scena { perspective: 1200px; margin: 0 0 22px; position: relative; }
.tom-scena::before { content: ''; position: absolute; inset: 10% 5% 15%; background: radial-gradient(closest-side, rgba(200, 35, 30, .55), transparent); filter: blur(30px); z-index: -1; }
.tom { --g: 34px; position: relative; display: block; width: clamp(220px, 24vw, 290px); aspect-ratio: 520 / 800; transform-style: preserve-3d; transform: rotateY(var(--ry, -24deg)) rotateX(var(--rx, 4deg)); transition: transform .9s var(--wyjscie); }
.tom:hover, .tom:focus-visible { --ry: -10deg; --rx: 2deg; }
.tom > * { position: absolute; }
.tom__front { inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--g) / 2)); border-radius: 2px 5px 5px 2px; filter: contrast(1.06); }
.tom::after { content: ''; position: absolute; inset: 0; transform: translateZ(calc(var(--g) / 2 + 1px)); background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .14) 45%, transparent 60%); border-radius: 2px 5px 5px 2px; pointer-events: none; }
.tom__grzbiet { top: 0; width: var(--g); height: 100%; background: linear-gradient(to right, #12151d, #262b38 45%, #151821); transform: rotateY(-90deg) translateZ(calc(var(--g) / 2)); left: calc(var(--g) / -2); }
.tom__kartki { top: 3px; right: calc(var(--g) / -2 + 3px); width: calc(var(--g) - 4px); height: calc(100% - 6px); background: repeating-linear-gradient(to right, #e9e2d2 0 1px, #cfc6b3 1px 2px); transform: rotateY(90deg); }
.tom__tyl { inset: 0; background: #1b1f2a; transform: translateZ(calc(var(--g) / -2)); box-shadow: 30px 40px 60px rgba(0, 0, 0, .7); }
.ksiazka__tytul { margin: 0; font: 700 clamp(2.4rem, 4vw, 3.2rem)/1.05 var(--kursywa); font-style: italic; }
.ksiazka__podtytul { margin: 10px 0 18px; font: 500 1rem/1.3 var(--kapitalik); letter-spacing: .12em; color: var(--krew-jasna); }
.ksiazka__cytat { margin: 0 0 28px; font: 600 clamp(1.4rem, 2vw, 1.65rem)/1.3 var(--kursywa); font-style: italic; max-width: 30ch; }
.ceny { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 520px; text-align: left; }
.cena { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid rgba(230, 223, 208, .14); }
.cena__nazwa { font: 700 1.6rem/1.1 var(--kursywa); font-style: italic; }
.cena__nazwa small { display: block; margin-top: 5px; font: 400 1rem/1.35 var(--tekst); font-style: normal; color: var(--kosc-2); }
.cena__kwota { font: 700 1.7rem/1 var(--kursywa); font-style: italic; white-space: nowrap; }
.cena .kup { padding: 12px 24px 13px; font-size: 1.35rem; }
.cena--komplet { border-top: 1px solid var(--krew-jasna); border-bottom: 1px solid var(--krew-jasna); margin-top: 8px; padding: 18px 16px; background: rgba(120, 18, 16, .35); }
.drobne { margin: 18px 0 0; font-size: 1.05rem; color: var(--kosc-2); }

/* Autor: zdjęcie w ramce z krwawą linią, krótki tekst. */
.autor-foto { margin: 0 0 28px; position: relative; width: min(100%, 360px); }
.autor-foto img { width: 100%; height: auto; filter: contrast(1.05); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.autor-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(165, 29, 27, .28), transparent 45%, rgba(10, 13, 22, .55)); mix-blend-mode: multiply; pointer-events: none; }
.autor-foto::before { content: ''; position: absolute; inset: -10px 10px 10px -10px; border: 1px solid rgba(224, 73, 62, .55); z-index: -1; }
.autor__tekst { max-width: 34ch; font-size: clamp(1.25rem, 1.7vw, 1.45rem); line-height: 1.6; }
.autor__tekst p { margin: 0 0 .8em; }

/* ---------- koniec: kontakt i stopka ---------- */
.koniec { text-align: center; padding: clamp(48px, 8vh, 96px) var(--margines) 28px; text-shadow: var(--cien-tekstu);
  background: linear-gradient(to bottom, transparent, rgba(5, 5, 8, .75) 40%); }
.koniec__mail { margin: 0; font: 700 clamp(1.6rem, 3.2vw, 2.4rem)/1.2 var(--kursywa); font-style: italic; }
.koniec__drobne { margin: 10px 0 0; color: var(--kosc-2); font-size: 1rem; }
.koniec__dol { max-width: 1320px; margin: clamp(48px, 8vh, 80px) auto 0; padding-top: 20px; border-top: 1px solid rgba(224, 73, 62, .35);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: .85rem; color: var(--kosc-2); }
.koniec__dol p { margin: 0; }
.koniec__imker { display: flex; align-items: center; gap: 10px; color: var(--kosc-2); text-decoration: none; }
.koniec__imker img { width: 74px; height: auto; filter: brightness(0) invert(.75); }

/* ---------- wejście sekcji ---------- */
.js .plansza__pole, .js .panel { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--wyjscie), transform 1.1s var(--wyjscie); }
.js .widac { opacity: 1; transform: none; }

/* ---------- tablet i telefon ---------- */
@media (max-width: 1000px) {
  .plansza { max-width: 640px; gap: 88px; }
}
@media (max-width: 760px) {
  .menu-przycisk {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 12px; cursor: pointer;
    background: rgba(10, 13, 20, .55); border: 1px solid rgba(230, 223, 208, .3); border-radius: 2px;
    font: 600 1.15rem/1 var(--kursywa); font-style: italic; color: var(--kosc); position: relative; z-index: 2;
  }
  .menu-przycisk__kreski { position: relative; width: 22px; height: 14px; flex: none; }
  .menu-przycisk__kreski i { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 1px; transition: transform .4s var(--wyjscie), opacity .2s, top .4s var(--wyjscie); }
  .menu-przycisk__kreski i:nth-child(1) { top: 0; }
  .menu-przycisk__kreski i:nth-child(2) { top: 6px; width: 70%; background: var(--krew-jasna); }
  .menu-przycisk__kreski i:nth-child(3) { top: 12px; }
  .menu-przycisk[aria-expanded="true"] .menu-przycisk__kreski i:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .menu-przycisk[aria-expanded="true"] .menu-przycisk__kreski i:nth-child(2) { opacity: 0; }
  .menu-przycisk[aria-expanded="true"] .menu-przycisk__kreski i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
  .logo { position: relative; z-index: 2; }
  .menu {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 90px var(--margines) 40px;
    background: radial-gradient(ellipse 90% 50% at 50% 100%, rgba(150, 24, 22, .45), transparent 70%), #08090e;
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .55s var(--wyjscie), visibility 0s .55s;
  }
  .menu.otwarte { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--wyjscie), visibility 0s; }
  .menu a { font: 700 clamp(2rem, 9vw, 2.6rem)/1.1 var(--kursywa); font-style: italic; padding: 12px 0; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .5s var(--wyjscie); }
  .menu.otwarte a { opacity: 1; transform: none; }
  .menu.otwarte a:nth-child(2) { transition-delay: .06s; }
  .menu.otwarte a:nth-child(3) { transition-delay: .12s; }
  .menu.otwarte a:nth-child(4) { transition-delay: .18s; }
  .menu a::after { left: 20%; right: 20%; bottom: 6px; }
  .menu__haslo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 36px 0 0; font: 600 1.1rem/1.2 var(--kursywa); font-style: italic; color: var(--kosc-2); }
  .menu__haslo svg { width: 46px; height: 29px; color: var(--krew-jasna); }
  .menu-otwarte, .menu-otwarte body { overflow: hidden; }
  .menu-otwarte .gora { background: transparent; box-shadow: none; }
  .koniec__dol { flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .przewin { display: none; }
  .js .plansza__pole, .js .panel { opacity: 1; transform: none; }
}

/* ---------- główna: dom + panele w lewym rogu ---------- */
.dom__start { position: relative; }
.panel { text-shadow: var(--cien-tekstu); }
.kontakt__mail { margin: 0; font: 700 clamp(1.7rem, 2.6vw, 2.3rem)/1.2 var(--kursywa); font-style: italic; }
.kontakt__drobne { margin: 10px 0 0; color: var(--kosc-2); }
.kontakt__kup { margin: 28px 0 0; font: 600 1.35rem/1.2 var(--kursywa); font-style: italic; }
.nic { margin: 0; font-size: 1.2rem; text-shadow: var(--cien-tekstu); }
.sklep { max-width: 1100px; margin: 0 auto; padding: clamp(110px, 14vh, 150px) var(--margines) clamp(56px, 8vh, 96px); text-shadow: var(--cien-tekstu); }
.strona-sklep .zaslona, .strona-404 .zaslona { opacity: .8; }

@media (min-width: 1001px) {
  .strona-dom, .strona-404 { overflow: hidden; height: 100vh; height: 100svh; }
  .dom__lewa {
    position: fixed; z-index: 3; left: max(var(--margines), 6vw); top: 100px; bottom: 72px; width: min(780px, 52vw);
    display: flex; flex-direction: column; justify-content: center;
  }
  .dom__start { transform-origin: 0 0; }
  .dom__start .powitanie__imie { margin: 0; }
  .dom.otwarty .powitanie__imie { font-size: clamp(2.6rem, 4vw, 3.4rem); }
  .dom .przewin { display: none; }
  .panele { min-height: 0; display: flex; flex-direction: column; }
  .panel { display: none; min-height: 0; overflow-y: auto; margin-top: 28px; padding: 0 18px 8px 0; text-align: left;
    scrollbar-width: thin; scrollbar-color: var(--krew) transparent; }
  .panel.aktywny { display: block; animation: panel .7s var(--wyjscie) both; }
  @keyframes panel { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  .js .panel { opacity: 1; transform: none; transition: none; }
  .panel .naglowek { text-align: left; font-size: clamp(2.2rem, 3vw, 2.8rem); margin-bottom: 26px; }
  .panel .naglowek svg { margin-left: 0; width: 200px; }
  /* Oś czasu w rogu: nitka po lewej, tekst przy niej. */
  .panel .os { max-width: none; }
  .panel .stacja { padding: 0 0 26px 30px; text-align: left; }
  .panel .stacja::before { position: absolute; left: 0; top: 4px; margin: 0; }
  .panel .stacja::after { display: block !important; left: 5px; top: 22px; bottom: 2px; height: auto; background: linear-gradient(rgba(224, 73, 62, .6), rgba(224, 73, 62, .1)); }
  .panel .stacja:last-child::after { display: none !important; }
  .panel .stacja__tytul { font-size: 1.7rem; }
  .panel .stacja__gdzie { font-size: 1.1rem; }
  .panel .stacja__uwagi { font-size: 1rem; }
  .panel .starsze summary { padding-left: 30px; }
  #o-autorze.aktywny { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 30px; align-items: start; }
  #o-autorze .naglowek { grid-column: 1 / -1; }
  .panel .autor-foto { width: 100%; margin: 6px 0 0 10px; }
  .panel .autor__tekst { max-width: none; font-size: 1.2rem; }
  /* Kup w rogu: mała okładka obok tytułu, cennik pod spodem. */
  #kup.aktywny { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 30px; align-items: start; }
  #kup .naglowek, #kup .ceny, #kup .drobne { grid-column: 1 / -1; }
  #kup .tom-scena { grid-row: 2 / span 3; margin: 4px 0 0 14px; }
  #kup .tom { --g: 20px; width: 128px; }
  #kup .ksiazka__tytul { font-size: 2rem; }
  #kup .ksiazka__podtytul { margin: 6px 0 12px; font-size: .85rem; }
  #kup .ksiazka__cytat { font-size: 1.2rem; margin: 0 0 18px; max-width: 44ch; }
  #kup .ceny { max-width: none; margin-top: 8px; }
  #kup .ksiazka__opis { grid-column: 1 / -1; max-width: none; font-size: 1.05rem; }
  #kup .cena { padding: 10px 0; gap: 14px; }
  #kup .cena__nazwa { font-size: 1.3rem; }
  #kup .cena__nazwa small { font-size: .85rem; }
  #kup .cena__kwota { font-size: 1.35rem; }
  #kup .cena .kup { padding: 9px 18px 10px; font-size: 1.1rem; }
  #kup .cena--komplet { padding: 12px 12px; }
  #kup .drobne { font-size: .9rem; margin-top: 10px; }
  /* Gdy panel otwarty, lewa strona obrazu ciemnieje, prawa zostaje. */
  .strona-dom .zaslona { background: linear-gradient(90deg, rgba(5, 5, 8, .9) 0, rgba(5, 5, 8, .78) 40%, rgba(5, 5, 8, .2) 66%, transparent 80%); }
  .strona-dom .koniec, .strona-404 .koniec { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 var(--margines) 16px; background: none; z-index: 3; }
  .strona-dom .koniec__dol, .strona-404 .koniec__dol { margin: 0; max-width: none; border: 0; padding: 0; }
}
@media (max-width: 1000px) {
  .dom__start { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(110px, 14vh) var(--margines) 0; text-align: center; }
  .panele { max-width: 640px; margin: 0 auto; padding: 24px var(--margines) 40px; display: flex; flex-direction: column; gap: 96px; }
  .panel { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .kontakt__kup a { display: inline-block; }
}

/* Opis książki pod cennikiem: najpierw zakup, potem lektura. */
.ksiazka__opis { margin: 34px 0 0; max-width: 60ch; text-align: left; }
.ksiazka__opis h4 { margin: 0 0 12px; font: 700 1.5rem/1.1 var(--kursywa); font-style: italic; color: var(--kosc); }
.ksiazka__opis p { margin: 0 0 .9em; line-height: 1.65; }
.ksiazka__opis p:last-child { color: var(--kosc-2); font-style: italic; }
@media (max-width: 1000px) { .ksiazka__opis { text-align: left; } }
@media (min-width: 861px) { .sklep .plansza__kup > .ksiazka__opis { grid-column: 1 / -1; justify-self: center; margin-top: 56px; } }
