@font-face{font-family:'Newsreader';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/newsreader-latin-ext-400.9d9350535f.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Newsreader';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/newsreader-latin-400.e66067814f.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Newsreader';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/newsreader-latin-ext-500.9b553af5de.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Newsreader';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/newsreader-latin-500.5613e2fc83.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Newsreader';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/newsreader-latin-ext-600.8ed127d047.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Newsreader';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/newsreader-latin-600.05c91a26d1.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibm-plex-sans-latin-ext-400.c93d2a12aa.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibm-plex-sans-latin-400.3b646991d3.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-sans-latin-ext-500.2846035d85.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-sans-latin-500.0717336fb3.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/ibm-plex-sans-latin-ext-600.b25dfd4f97.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/ibm-plex-sans-latin-600.8960851d69.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Phosphor';src:url(fonts/phosphor.0999d06eb0.woff2) format('woff2');font-weight:normal;font-style:normal;font-display:block}
.ph{font-family:'Phosphor'!important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.ph.ph-arrow-counter-clockwise:before{content:"\e038"}
.ph.ph-arrow-left:before{content:"\e058"}
.ph.ph-arrows-down-up:before{content:"\e098"}
.ph.ph-arrows-left-right:before{content:"\e0a0"}
.ph.ph-arrows-out-simple:before{content:"\e0a6"}
.ph.ph-article:before{content:"\e0a8"}
.ph.ph-caret-left:before{content:"\e138"}
.ph.ph-caret-right:before{content:"\e13a"}
.ph.ph-corners-in:before{content:"\e1ce"}
.ph.ph-corners-out:before{content:"\e1d0"}
.ph.ph-drop:before{content:"\e210"}
.ph.ph-eye:before{content:"\e220"}
.ph.ph-link-simple:before{content:"\e2e6"}
.ph.ph-minus:before{content:"\e32a"}
.ph.ph-pause:before{content:"\e39e"}
.ph.ph-play:before{content:"\e3d0"}
.ph.ph-plus:before{content:"\e3d4"}
.ph.ph-skip-back:before{content:"\e5a4"}
.ph.ph-skip-forward:before{content:"\e5a6"}
.ph.ph-subtitles:before{content:"\e1a8"}
.ph.ph-x:before{content:"\e4f6"}
@font-face{font-family:'Phosphor-Bold';src:url(fonts/phosphor-bold.6fec5fdd21.woff2) format('woff2');font-weight:normal;font-style:normal;font-display:block}
.ph-bold{font-family:'Phosphor-Bold'!important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.ph-bold.ph-arrow-counter-clockwise:before{content:"\e038"}
.ph-bold.ph-arrow-left:before{content:"\e058"}
.ph-bold.ph-arrows-down-up:before{content:"\e098"}
.ph-bold.ph-arrows-left-right:before{content:"\e0a0"}
.ph-bold.ph-arrows-out-simple:before{content:"\e0a6"}
.ph-bold.ph-article:before{content:"\e0a8"}
.ph-bold.ph-caret-left:before{content:"\e138"}
.ph-bold.ph-caret-right:before{content:"\e13a"}
.ph-bold.ph-corners-in:before{content:"\e1ce"}
.ph-bold.ph-corners-out:before{content:"\e1d0"}
.ph-bold.ph-drop:before{content:"\e210"}
.ph-bold.ph-eye:before{content:"\e220"}
.ph-bold.ph-link-simple:before{content:"\e2e6"}
.ph-bold.ph-minus:before{content:"\e32a"}
.ph-bold.ph-pause:before{content:"\e39e"}
.ph-bold.ph-play:before{content:"\e3d0"}
.ph-bold.ph-plus:before{content:"\e3d4"}
.ph-bold.ph-skip-back:before{content:"\e5a4"}
.ph-bold.ph-skip-forward:before{content:"\e5a6"}
.ph-bold.ph-subtitles:before{content:"\e1a8"}
.ph-bold.ph-x:before{content:"\e4f6"}
@font-face{font-family:'Phosphor-Fill';src:url(fonts/phosphor-fill.3a85041c7d.woff2) format('woff2');font-weight:normal;font-style:normal;font-display:block}
.ph-fill{font-family:'Phosphor-Fill'!important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.ph-fill.ph-arrow-counter-clockwise:before{content:"\e038"}
.ph-fill.ph-arrow-left:before{content:"\e058"}
.ph-fill.ph-arrows-down-up:before{content:"\e098"}
.ph-fill.ph-arrows-left-right:before{content:"\e0a0"}
.ph-fill.ph-arrows-out-simple:before{content:"\e0a6"}
.ph-fill.ph-article:before{content:"\e0a8"}
.ph-fill.ph-caret-left:before{content:"\e138"}
.ph-fill.ph-caret-right:before{content:"\e13a"}
.ph-fill.ph-corners-in:before{content:"\e1ce"}
.ph-fill.ph-corners-out:before{content:"\e1d0"}
.ph-fill.ph-drop:before{content:"\e210"}
.ph-fill.ph-eye:before{content:"\e220"}
.ph-fill.ph-link-simple:before{content:"\e2e6"}
.ph-fill.ph-minus:before{content:"\e32a"}
.ph-fill.ph-pause:before{content:"\e39e"}
.ph-fill.ph-play:before{content:"\e3d0"}
.ph-fill.ph-plus:before{content:"\e3d4"}
.ph-fill.ph-skip-back:before{content:"\e5a4"}
.ph-fill.ph-skip-forward:before{content:"\e5a6"}
.ph-fill.ph-subtitles:before{content:"\e1a8"}
.ph-fill.ph-x:before{content:"\e4f6"}
/* =====================================================================
   Galeria odnowionych fotografii — style
   Kolory pochodzą z pliku ustawienia.js (zmienne --bg, --accent …).
   Wartości poniżej są tylko domyślne.
   ===================================================================== */
:root {
  --bg: #0f1c27;
  --bg-deep: #0a141d;
  --bg-raise: #152533;
  --line: rgb(234 241 245 / 0.12);
  --line-strong: rgb(234 241 245 / 0.22);
  --text: #eaf1f5;
  --muted: #8ea3b3;
  --accent: #9cd3e4;
  --accent-deep: #4b8fb0;
  --on-accent: #0a141d;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.6rem, 6.2vw, 5.4rem);

  --radius: 6px;
  --row-h: clamp(92px, 7.2vw, 124px);
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

/* ---------- Przyciski ---------- */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: var(--text); }
.button-quiet { background: rgb(10 20 29 / 0.35); color: var(--text); border-color: var(--line-strong); }
.button-quiet:hover { border-color: var(--accent); color: var(--accent); }
.button-small { min-height: 36px; padding: 6px 14px; font-size: var(--step--1); }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
  font-size: 1.15rem;
}
.icon-button:hover, .icon-button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.icon-button-large { width: 52px; height: 52px; font-size: 1.4rem; }

.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.segmented button {
  min-height: 34px; padding: 4px 14px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: var(--step--1); cursor: pointer;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.segmented-label { padding: 0 6px 0 10px; color: var(--muted); font-size: var(--step--1); }
.segmented-small button { min-height: 30px; padding: 2px 11px; }

/* ---------- Układ strony głównej: nagłówek i galeria ---------- */
.page {
  --gx: clamp(16px, 2.6vw, 40px);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* Nagłówek */
.masthead {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr); gap: 16px clamp(28px, 4vw, 64px); align-items: end;
  padding: clamp(18px, 2.6vh, 30px) var(--gx) clamp(16px, 2.4vh, 26px);
  background: var(--bg-deep); border-bottom: 1px solid var(--line);
}
.masthead-photo { position: absolute; inset: 0; opacity: 0.3; }
.masthead-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.masthead-color { -webkit-mask-image: linear-gradient(transparent, transparent); mask-image: linear-gradient(transparent, transparent); }
.masthead::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg-deep) 8%, color-mix(in srgb, var(--bg-deep) 55%, transparent) 55%, color-mix(in srgb, var(--bg-deep) 80%, transparent) 100%);
}
.masthead > :not(.masthead-photo) { position: relative; z-index: 1; }
.site-title { display: flex; flex-direction: column; gap: 0.28em; }
.title-pre { font-family: var(--sans); font-size: clamp(0.875rem, 1vw, 1rem); font-weight: 500; color: var(--accent); }
.title-main { font-family: var(--serif); font-size: clamp(2rem, 3.1vw, 3rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.012em; }
.title-post { font-family: var(--serif); font-size: clamp(1rem, 1.3vw, 1.3rem); line-height: 1.3; color: rgb(234 241 245 / 0.92); }
.masthead-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-top: clamp(12px, 2vh, 18px); font-size: 0.9375rem; color: var(--muted); }
.masthead-author strong { color: var(--text); font-weight: 500; }
.intro-text { columns: 2 17em; column-gap: clamp(24px, 2.6vw, 40px); }
.intro-text p { font-family: var(--serif); font-size: clamp(0.97rem, 1.04vw, 1.0625rem); line-height: 1.55; color: rgb(234 241 245 / 0.9); }
.intro-text p + p { margin-top: 0.6em; }

/* Sposoby oglądania (nad galerią) */
.ways { padding: 16px 0 14px; border-bottom: 1px solid var(--line); }
.ways-text p { font-family: var(--serif); font-size: clamp(1rem, 1.1vw, 1.125rem); line-height: 1.5; color: rgb(234 241 245 / 0.88); max-width: 62em; }
.ways-text:empty { display: none; }
/* Tekst i przełącznik miniatur w pierwszym wierszu, przyciski z podglądami pod spodem */
.ways { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; align-items: start; }
.ways-row { display: contents; }
.ways-text { grid-column: 1; grid-row: 1; }
.ways .segmented { grid-column: 2; grid-row: 1; justify-self: end; }
.ways-buttons { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.way {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--text);
  font-size: 0.9375rem; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.way:hover { border-color: var(--accent); background: var(--bg-raise); }
.way:hover .way-name { color: var(--accent); }

/* Animowane podglądy sposobów oglądania (to samo zdjęcie, różny sposób pokazania).
   Wszystkie wymiary w procentach, więc podgląd skaluje się samą zmienną --pv-w (proporcje 17:11). */
.way-preview {
  --pv-w: 68px;
  position: relative; flex: 0 0 auto; width: var(--pv-w); height: calc(var(--pv-w) * 11 / 17);
  border-radius: 6px; overflow: hidden; background: var(--bg-raise);
}
.way-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 4px rgb(0 0 0 / .6); }
.pv-suwak .pv-color { clip-path: inset(0 0 0 50%); animation: pv-clip 4.8s ease-in-out infinite; }
.pv-suwak .pv-line { animation: pv-line 4.8s ease-in-out infinite; }
@keyframes pv-clip { 0%, 100% { clip-path: inset(0 0 0 50%); } 30% { clip-path: inset(0 0 0 10%); } 70% { clip-path: inset(0 0 0 90%); } }
@keyframes pv-line { 0%, 100% { left: 50%; } 30% { left: 10%; } 70% { left: 90%; } }

.pv-obok { display: flex; gap: 2px; background: var(--bg-deep); }
.pv-pane { position: relative; flex: 1; overflow: hidden; }
.pv-obok img { transform-origin: 55% 45%; animation: pv-zoom 5s ease-in-out infinite; }
@keyframes pv-zoom { 0%, 12%, 100% { transform: scale(1); } 45%, 62% { transform: scale(2.1); } }

.pv-przenikanie .pv-color { opacity: 0; animation: pv-fade 4.4s ease-in-out infinite; }
@keyframes pv-fade { 0%, 10%, 100% { opacity: 0; } 45%, 62% { opacity: 1; } }

/* Lupa: koło o średnicy 38,2% szerokości podglądu, w środku obraz powiększony 2× */
.pv-lens {
  position: absolute; left: 7.353%; top: 4.545%; width: 38.235%; height: 59.091%; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--accent), 0 2px 6px rgb(0 0 0 / .55); animation: pv-lens 6s ease-in-out infinite;
}
.pv-lens img { inset: auto; left: -88.46%; top: -65.38%; width: 523.08%; height: 338.46%; max-width: none; animation: pv-lens-img 6s ease-in-out infinite; }
@keyframes pv-lens {
  0%, 100% { left: 7.353%; top: 4.545%; } 25% { left: 54.412%; top: 4.545%; }
  50% { left: 54.412%; top: 36.364%; } 75% { left: 7.353%; top: 36.364%; }
}
@keyframes pv-lens-img {
  0%, 100% { left: -88.46%; top: -65.38%; } 25% { left: -334.62%; top: -65.38%; }
  50% { left: -334.62%; top: -173.08%; } 75% { left: -88.46%; top: -173.08%; }
}

.pv-wywolywanie .pv-color {
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 71%); mask-image: radial-gradient(circle, #000 52%, transparent 71%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 50% 50%; mask-position: 50% 50%;
  -webkit-mask-size: 1px 1px; mask-size: 1px 1px;
  animation: pv-drop 5s ease-out infinite;
}
.pv-wywolywanie::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 20.6%; height: 31.8%; border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / .9); opacity: 0; transform: translate(-50%, -50%); animation: pv-tap 5s ease-out infinite;
}
@keyframes pv-tap {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 4% { opacity: 1; transform: translate(-50%, -50%) scale(.6); }
  16% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}
@keyframes pv-drop {
  0%, 10% { -webkit-mask-size: 1px 1px; mask-size: 1px 1px; opacity: 1; }
  70% { -webkit-mask-size: 260% 260%; mask-size: 260% 260%; opacity: 1; }
  88% { -webkit-mask-size: 260% 260%; mask-size: 260% 260%; opacity: 1; }
  100% { -webkit-mask-size: 260% 260%; mask-size: 260% 260%; opacity: 0; }
}

.pv-cam { position: absolute; inset: 0; animation: pv-kb 6s linear infinite; }
.pv-seans .pv-color { opacity: 0; animation: pv-seans-fade 6s ease-in-out infinite; }
.pv-seans::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0; animation: pv-veil 6s linear infinite; }
@keyframes pv-kb { 0% { transform: scale(1.04) translate(2%, 1%); } 100% { transform: scale(1.32) translate(-3%, -2%); } }
@keyframes pv-seans-fade { 0%, 30% { opacity: 0; } 62%, 100% { opacity: 1; } }
@keyframes pv-veil { 0% { opacity: 1; } 10%, 88% { opacity: 0; } 100% { opacity: 1; } }

/* Gdy otwarte jest studio lub seans, podglądy na stronie głównej (pod spodem) stoją */
body.locked .ways .way-preview *, body.locked .ways .way-preview::after { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .way-preview *, .way-preview::after { animation: none !important; }
  .pv-przenikanie .pv-color { opacity: .55; }
  .pv-wywolywanie .pv-color { -webkit-mask-size: 110% 110%; mask-size: 110% 110%; }
  .pv-seans .pv-color { opacity: 1; }
  .pv-lens { left: 30.882%; top: 20.455%; }
  .pv-lens img { left: -211.54%; top: -119.23%; }
}

/* Galeria */
.gallery { flex: 1; min-width: 0; padding: 0 var(--gx) 32px; }
.chapter { padding-top: 14px; scroll-margin-top: 60px; }
.chapter-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin-bottom: 8px; }
.chapter-title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.chapter-period { font-size: 0.8125rem; color: var(--muted); }
.chapter-desc { font-family: var(--serif); font-size: 0.95rem; color: rgb(234 241 245 / 0.72); }

.rows { display: flex; flex-wrap: wrap; gap: 12px 10px; }
.rows::after { content: ''; flex: 9999 1 0; }
.tile { margin: 0; min-width: 0; }
.tile-photo {
  position: relative; overflow: hidden; background: var(--bg-raise); border-radius: 3px;
  cursor: zoom-in; user-select: none; -webkit-user-select: none;
  transition: box-shadow .2s;
}
.tile-photo:hover, .tile-photo:focus-visible { box-shadow: 0 0 0 2px var(--accent); outline: none; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile-color { clip-path: inset(0 0 0 50%); transition: opacity .6s ease; }
.tile-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 8px rgb(0 0 0 / 0.5); pointer-events: none; transition: opacity .3s; }
.view-bw .tile-color { opacity: 0; }
.view-color .tile-color { clip-path: none !important; opacity: 1; }
.view-bw .tile-line, .view-color .tile-line { opacity: 0; }
.tile-open {
  position: absolute; left: 7px; bottom: 7px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 6px; border-radius: 999px; background: rgb(10 20 29 / 0.82); color: var(--text);
  font-size: 0.6875rem; font-weight: 500; line-height: 1.5; pointer-events: none; transition: background-color .2s, color .2s;
}
.tile-open i { font-size: 0.8rem; }
.tile-open { white-space: nowrap; }
.tile-photo { container-type: inline-size; }
@container (max-width: 150px) {
  .tile-photo .tile-open .long { display: none; }
  .tile-photo .tile-open .short { display: inline; }
}
.tile-open .short { display: none; }
.tile-photo:hover .tile-open, .tile-photo:focus-visible .tile-open { background: var(--accent); color: var(--on-accent); }
.tile figcaption { padding-top: 5px; min-width: 0; }
.tile-title {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font-family: var(--serif); font-size: 0.92rem; line-height: 1.3; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-title:hover { color: var(--accent); }
.tile-meta { display: block; font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { padding: 80px 0; text-align: center; }
.empty h2 { font-family: var(--serif); font-size: var(--step-3); margin-bottom: 8px; }
.empty p { color: var(--muted); }

/* Stopka (na końcu galerii) */
.site-footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: 0.875rem; color: var(--muted);
}
.footer-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.footer-privacy { font-size: 0.8125rem; }

/* ---------- Komunikat ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px);
  padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg-deep);
  font-size: 0.9375rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   STUDIO PORÓWNANIA
   ===================================================================== */
.studio {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--bg-deep); height: 100dvh;
}
.studio-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
}
.studio-heading { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 260px; }
.studio-counter { flex-shrink: 0; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.studio-heading-text { min-width: 0; }
.studio-heading h2 { font-family: var(--serif); font-size: var(--step-1); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-heading p { font-size: var(--step--1); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-modes { display: flex; gap: 4px; }
.studio-modes button {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 4px 5px 3px;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted);
  font-size: 0.75rem; line-height: 1.25; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.studio-modes .way-preview { --pv-w: 54px; }
.studio-modes button:hover { color: var(--text); border-color: var(--line-strong); }
.studio-modes button[aria-pressed="true"] { color: var(--accent); font-weight: 500; border-color: var(--accent); background: var(--bg-raise); }
.studio-modes button[data-action="seans"] { margin-left: 6px; }
.studio-actions { display: flex; align-items: center; gap: 8px; }

.studio-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  min-height: 50px; padding: 6px 16px; border-bottom: 1px solid var(--line); font-size: var(--step--1);
}
.mode-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.control-label { color: var(--muted); }
.control-text { color: var(--muted); }
.zoom-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.zoom-controls .icon-button { width: 34px; height: 34px; font-size: 0.95rem; }
.zoom-value { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; color: var(--accent); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 160px; height: 4px; border-radius: 999px; background: var(--line-strong); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-deep); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-deep); cursor: pointer; }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.studio-body { flex: 1; min-height: 0; display: flex; position: relative; }
.stage { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 20px 64px; }
.stage-nav {
  position: absolute; top: 50%; z-index: 5; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgb(10 20 29 / 0.7); border: 1px solid var(--line-strong); color: var(--text); cursor: pointer; font-size: 1.2rem;
}
.stage-nav:hover { border-color: var(--accent); color: var(--accent); }
.stage-prev { left: 12px; }
.stage-next { right: 12px; }
.single { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.zoom-wrap { position: relative; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-select: none; }
.layer-base { max-width: 100%; max-height: var(--stage-h, 70vh); width: auto; height: auto; pointer-events: none; }
.layer-top { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.single.is-curtain { cursor: ew-resize; }
.single.is-curtain.axis-horizontal { cursor: ns-resize; }
.single.is-zoomed { cursor: grab; }
.single.is-develop { cursor: crosshair; }
.curtain-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 12px rgb(0 0 0 / 0.55); pointer-events: none; }
.curtain-line.horizontal { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 2px; margin: -1px 0 0 0; }
.curtain-handle {
  position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--bg-deep); border: 2px solid var(--accent); color: var(--accent); font-size: 1.05rem;
}
.lens {
  position: absolute; z-index: 3; border-radius: 50%; overflow: hidden; pointer-events: none;
  border: 2px solid var(--accent); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4), 0 12px 40px rgb(0 0 0 / 0.6);
}
.lens img { position: absolute; max-width: none; pointer-events: none; }
.badge {
  position: absolute; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px;
  background: rgb(10 20 29 / 0.72); color: var(--text); font-size: 0.75rem; pointer-events: none;
}
.badge-left { left: 12px; }
.badge-right { right: 12px; color: var(--accent); }
.sync { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sync-view { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / 0.2); border-radius: 4px; touch-action: none; cursor: grab; }
.sync-view img { max-width: 100%; max-height: 100%; transform-origin: center center; will-change: transform; pointer-events: none; }
.crosshair { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; }
.sync-view .crosshair.on { opacity: 1; }
.stage-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgb(10 20 29 / 0.75); color: var(--text); font-size: var(--step--1); pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.stage-hint.show { opacity: 1; }

.studio-info {
  width: 340px; flex-shrink: 0; overflow-y: auto; padding: 22px 22px 28px;
  border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px;
}
.studio.info-closed .studio-info { display: none; }
.info-chapter { font-size: var(--step--1); color: var(--accent); }
.studio-info h3 { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.9375rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }
.info-notes p { font-family: var(--serif); font-size: var(--step-1); line-height: 1.55; color: rgb(234 241 245 / 0.88); }
.info-notes p + p { margin-top: .7em; }
.info-hold { align-self: flex-start; margin-top: 4px; }
.info-hold:active { background: var(--accent); color: var(--on-accent); }
.info-keys { margin-top: auto; font-size: 0.75rem; color: var(--muted); line-height: 1.6; }

.strip { display: flex; gap: 8px; padding: 10px 16px 12px; overflow-x: auto; border-top: 1px solid var(--line); overscroll-behavior-x: contain; scrollbar-width: thin; }
.strip button {
  flex: 0 0 auto; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; background: var(--bg-raise);
  overflow: hidden; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s;
}
.strip button img { height: 100%; width: auto; }
.strip button:hover { opacity: 1; }
.strip button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.strip-sep { flex: 0 0 1px; background: var(--line-strong); margin: 4px 4px; }

/* =====================================================================
   SEANS
   ===================================================================== */
.seans { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; overflow: hidden; }
.seans.hide-cursor { cursor: none; }
.seans-stage { position: absolute; inset: 0; overflow: hidden; }
.seans-camera { position: absolute; inset: 0; will-change: transform; }
.seans-camera img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.seans.fill .seans-camera img { object-fit: cover; }
.seans-veil { position: absolute; inset: 0; background: #000; pointer-events: none; }
.seans-titlecard {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .4em;
  padding: 0 8vw; text-align: center; background: var(--bg-deep);
}
.seans-tc-pre { font-family: var(--sans); font-size: clamp(1rem, 1.8vw, 1.3rem); color: var(--accent); }
.seans-tc-main { font-family: var(--serif); font-size: clamp(2.8rem, 7vw, 6rem); line-height: 1.05; }
.seans-tc-post { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 2rem); color: rgb(234 241 245 / 0.85); max-width: 26em; }
.seans-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 6vw 112px;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0)); pointer-events: none;
  transition: opacity .8s;
}
.seans.no-captions .seans-caption { opacity: 0 !important; }
.seans-chapter { font-size: var(--step--1); color: var(--accent); }
.seans-title { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.15; max-width: 24em; margin-top: 4px; }
.seans-meta { margin-top: 6px; font-size: var(--step-0); color: rgb(255 255 255 / 0.78); }
.seans-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 6vw 22px; transition: opacity .4s; }
.seans.ui-hidden .seans-ui { opacity: 0; }
.seans-progress { height: 2px; background: rgb(255 255 255 / 0.18); margin-bottom: 14px; }
.seans-progress-fill { height: 100%; width: 0; background: var(--accent); }
.seans-buttons { display: flex; align-items: center; gap: 10px; }
.seans-counter { margin-right: auto; font-size: var(--step--1); color: rgb(255 255 255 / 0.7); font-variant-numeric: tabular-nums; }
.seans .icon-button { border-color: rgb(255 255 255 / 0.3); color: #fff; }
.seans .icon-button:hover, .seans .icon-button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.seans .button-quiet { color: #fff; border-color: rgb(255 255 255 / 0.3); }

/* =====================================================================
   EKRANY WĄSKIE
   ===================================================================== */
@media (max-width: 1000px) {
  .masthead { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  /* Mniej miejsca w pasku: same podglądy, nazwy zostają w podpowiedzi i dla czytników ekranu */
  .studio-modes .way-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .studio-modes button { min-width: 0; padding: 3px; }
  .studio-modes .way-preview { --pv-w: 50px; }
}
@media (max-width: 900px) {
  .studio-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 6; width: min(360px, 88vw); background: var(--bg-deep); box-shadow: -16px 0 40px rgb(0 0 0 / 0.5); }
  /* Sposoby oglądania dostają własny wiersz pod tytułem */
  .studio-modes { order: 3; width: 100%; justify-content: center; }
  .studio-modes .way-name { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (max-width: 640px) {
  .intro-text { columns: 1; }
  .ways { display: block; }
  .ways-row { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 12px; }
  .ways-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; margin-top: 0; }
  .way { flex-direction: column; gap: 5px; padding: 6px 4px 5px; font-size: 0.8125rem; }
  .rows { gap: 12px 10px; }
  .rows .tile { flex: 1 1 calc(50% - 5px) !important; max-width: calc(50% - 5px) !important; }
  .rows .tile-photo { aspect-ratio: 4 / 3 !important; padding-top: 0 !important; }
  .tile-open .long { display: none; }
  .tile-open .short { display: inline; }
  .segmented-label { display: none; }
  .studio-top { padding: 8px 10px; gap: 8px; }
  .studio-heading { flex: 1 1 calc(100% - 100px); gap: 10px; }
  .studio-actions { gap: 6px; }
  .studio-actions .icon-button { width: 38px; height: 38px; }
  #btnCloseStudio { width: 38px; height: 38px; min-height: 0; padding: 0; justify-content: center; }
  #btnCloseStudio .close-label { display: none; }
  #btnFullscreen { display: none; }
  .control-label, .control-text, .zoom-controls, .mode-controls[data-for="suwak"] input[type="range"] { display: none; }
  .mode-controls[data-for="obok"] { display: none; }
  .studio-controls { min-height: 0; padding: 6px 10px; }
  .studio-controls:not(:has(.mode-controls:not([hidden]):not([data-for="obok"]))) { display: none; }
  .studio-modes { order: 3; width: 100%; justify-content: space-between; gap: 2px; }
  .studio-modes .way-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .studio-modes button { flex: 1 1 0; min-width: 0; padding: 3px 0; }
  .studio-modes button[data-action="seans"] { margin-left: 0; }
  .studio-modes .way-preview { --pv-w: min(50px, 13vw); }
  .studio-actions #btnShare { display: none; }
  .studio-controls { padding: 6px 10px; }
  .stage { padding: 10px; }
  .stage-nav { width: 38px; height: 38px; margin-top: -19px; }
  .stage-prev { left: 4px; }
  .stage-next { right: 4px; }
  .sync { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .zoom-controls .button { display: none; }
  input[type="range"] { width: 120px; }
  .seans-caption { padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-color, .toast, .seans-caption, .seans-ui { transition: none; }
}

/* Starsze przeglądarki bez właściwości inset (Safari < 14.1) */
@supports not (inset: 0) {
  .studio, .seans, .seans-stage, .seans-camera, .seans-veil, .seans-titlecard, .masthead-photo, .masthead-photo img, .masthead::after, .layer-top, .tile-photo img { top: 0; right: 0; bottom: 0; left: 0; }
}
