/* Coach & Kunst - stylesheet. Written from scratch; tokens first. */
@view-transition { navigation: auto; }

:root {
  /* colour: neutral wall, ink and lines; the artwork carries the colour */
  --wall: #F4F0E8;
  --wall-2: #EBE5D9;
  --paper: #FBF9F4;
  --ink: #1F1B18;
  --muted: #655D55;
  --line: #D8D0C3;
  --accent: #9C4F36;
  --accent-ink: #7E3E29;

  /* room wall tones (kunst page) */
  --room-1: #F4F0E8;
  --room-2: #EEE8DC;
  --room-3: #F2EFE7;
  --room-4: #ECE5D8;
  --room-5: #F3EDE1;

  /* type */
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "DM Sans", "Helvetica Neue", sans-serif;
  --t-small: 0.8125rem;
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lead: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  --t-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --t-h2: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  --t-h1: clamp(3rem, 1.6rem + 6vw, 7.2rem);

  /* spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2.25rem;
  --s-7: 3.5rem;
  --s-8: 5.5rem;
  --s-9: 8rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --rail: 0px;
  --bar: 0px;
  --radius: 2px;
  --shadow-work: 0 1px 1px rgba(31, 27, 24, 0.12), 0 6px 14px rgba(31, 27, 24, 0.12), 0 22px 36px -12px rgba(31, 27, 24, 0.22);
  --shadow-soft: 0 1px 2px rgba(31, 27, 24, 0.1), 0 10px 24px -10px rgba(31, 27, 24, 0.25);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.1; }
p { margin: 0 0 var(--s-4); max-width: 60ch; }
em, .it { font-style: italic; }
.eyebrow { font-family: var(--body); font-size: var(--t-small); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-4); }
.lead { font-family: var(--display); font-size: var(--t-lead); line-height: 1.35; max-width: 34ch; color: var(--ink); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: var(--s-3) var(--s-4); z-index: 100; }
.skip:focus { left: var(--s-4); top: var(--s-4); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- wordmark ---------- */
.wordmark { font-family: var(--display); font-size: 1.7rem; line-height: 1; text-decoration: none; color: var(--ink); letter-spacing: 0.01em; font-weight: 500; display: inline-block; }
.wordmark i { font-style: italic; color: var(--accent); padding: 0 0.06em; }
.wordmark:hover { color: var(--ink); }

/* ---------- navigation ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--wall) 94%, transparent); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0.75rem var(--gutter); min-height: 4rem; }
.menu-btn { font: inherit; font-size: 0.95rem; font-weight: 500; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 0.55rem 1.1rem; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.6rem; }
.menu-btn .bars { width: 16px; height: 8px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; position: relative; }
.menu-btn[aria-expanded="true"] .bars { border-color: transparent; }
.menu-btn[aria-expanded="true"] .bars::before, .menu-btn[aria-expanded="true"] .bars::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid currentColor; }
.menu-btn[aria-expanded="true"] .bars::before { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: rotate(-45deg); }
.nav-panel { position: fixed; inset: 4rem 0 0 0; z-index: 39; background: var(--wall); padding: var(--s-7) var(--gutter) var(--s-6); display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.nav-panel[hidden] { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a { display: flex; align-items: baseline; gap: 0.8rem; font-family: var(--display); font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.15; text-decoration: none; color: var(--ink); padding: 0.45rem 0; min-height: 44px; border-bottom: 1px solid var(--line); }
.nav-list a small { font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted); width: 1.6rem; }
.nav-list a[aria-current="page"] { font-style: italic; color: var(--accent-ink); }
.nav-note { font-size: var(--t-small); color: var(--muted); margin: var(--s-6) 0 0; }

@media (min-width: 1024px) {
  :root { --rail: 232px; }
  .site-head { position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail); flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s-8); padding: var(--s-6) var(--s-5); border-bottom: 0; border-right: 1px solid var(--line); background: var(--wall); }
  .menu-btn { display: none; }
  .nav-panel { position: static; inset: auto; display: flex !important; padding: 0; background: transparent; overflow: visible; flex: 1; width: 100%; }
  .nav-panel[hidden] { display: flex; }
  .nav-list a { font-size: 1.35rem; padding: 0.3rem 0; border-bottom: 0; min-height: 40px; }
  .nav-list a small { display: none; }
  .nav-list a::before { content: ""; width: 0; height: 1px; background: var(--accent); align-self: center; transition: width 0.3s var(--ease); margin-right: 0; }
  .nav-list a:hover::before, .nav-list a[aria-current="page"]::before { width: 1.1rem; margin-right: 0.6rem; }
  .nav-note { margin-top: auto; }
  .page { margin-left: var(--rail); }
}

/* ---------- layout helpers ---------- */
.wrap { padding-inline: var(--gutter); max-width: 88rem; margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.btn { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0.7rem 1.5rem; font: inherit; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 999px; cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.25s var(--ease); }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); }
.link-arrow { font-weight: 500; }

/* ---------- HOME hero ---------- */
.hero { position: relative; padding: clamp(2rem, 5vw, 4rem) var(--gutter) var(--s-8); overflow: hidden; }
.hero__grid { display: grid; gap: var(--s-6); max-width: 88rem; margin-inline: auto; }
.hero h1 { position: relative; z-index: 2; font-size: clamp(3.4rem, 1.2rem + 9vw, 8.6rem); line-height: 0.92; letter-spacing: -0.02em; margin: 0 0 var(--s-5); max-width: 9ch; }
.hero h1 em { color: var(--accent); }
.hero__lead { font-family: var(--display); font-size: var(--t-lead); line-height: 1.3; max-width: 28ch; color: var(--ink); margin-bottom: var(--s-4); }
.hero__sub { max-width: 40ch; color: var(--muted); margin-bottom: var(--s-6); }
.hero__text { position: relative; z-index: 2; }
.salon { position: relative; width: 100%; max-width: 620px; aspect-ratio: 5 / 6; margin-inline: auto; }
.salon::before { content: ""; position: absolute; inset: -4% -6% -2% -6%; background: var(--wall-2); z-index: 0; }
.piece { position: absolute; left: var(--x); top: var(--y); width: var(--pw); z-index: 1; margin: 0; }
.piece img { width: 100%; height: auto; box-shadow: var(--shadow-work); background: var(--paper); }
.piece { --hang: clamp(14px, 3.2vw, 36px); }
/* strings: apex at the nail (top centre), ends on the frame's top edge 17% in from each corner */
.piece::before { content: ""; position: absolute; left: 17%; right: 17%; bottom: 100%; height: var(--hang);
  background: linear-gradient(to top left, transparent calc(50% - 0.5px), rgba(31,27,24,.45) calc(50% - 0.5px), rgba(31,27,24,.45) calc(50% + 0.5px), transparent calc(50% + 0.5px)) left / 50% 100% no-repeat,
              linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(31,27,24,.45) calc(50% - 0.5px), rgba(31,27,24,.45) calc(50% + 0.5px), transparent calc(50% + 0.5px)) right / 50% 100% no-repeat; }
.piece::after { content: ""; position: absolute; left: 50%; bottom: calc(100% + var(--hang) - 2.5px); width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #8d8478; }
.piece:nth-child(n+4) { display: none; }
.piece--a { --x: 4%;  --y: 14%; --pw: 52%; }
.piece--b { --x: 60%; --y: 6%;  --pw: 32%; }
.piece--c { --x: 54%; --y: 54%; --pw: 40%; }
.piece--d { --x: 80%; --y: 40%; --pw: 17%; }
.piece--e { --x: 6%;  --y: 90%; --pw: 38%; }
.piece--f { --x: 58%; --y: 90%; --pw: 22%; }
@media (min-width: 700px) { .piece:nth-child(n+4) { display: block; } }
.pic-cap { position: absolute; left: 0; right: 0; top: 100%; margin-top: 0.4rem; font-size: 0.68rem; letter-spacing: 0.06em; color: var(--muted); line-height: 1.3; }
@media (max-width: 699px) {
  .salon { aspect-ratio: 1 / 1.08; }
  .piece--a { --x: 3%; --y: 12%; --pw: 56%; }
  .piece--b { --x: 66%; --y: 4%; --pw: 31%; }
  .piece--c { --x: 50%; --y: 60%; --pw: 46%; }
  .pic-cap { display: none; }
}
@media (min-width: 1024px) {
  .hero { padding-top: var(--s-7); }
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 0; }
  .hero h1 { margin-right: -14%; }
  .salon { margin-right: 0; }
}
@keyframes hang-in { from { clip-path: inset(0 0 100% 0); opacity: 0; transform: translateY(10px); } to { clip-path: inset(-60px -10px -10px -10px); opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.piece { animation: hang-in 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 140ms + 350ms); }
.hero h1 .l { display: block; animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 100ms); }
.hero__lead, .hero__sub, .hero .cta-row { animation: rise 0.9s var(--ease) both; animation-delay: 600ms; }
.hero .cta-row { animation-delay: 760ms; }

/* ---------- paths ---------- */
.paths { display: grid; gap: var(--s-7); }
.path { display: grid; gap: var(--s-5); align-content: start; }
.path__img { overflow: hidden; background: var(--wall-2); box-shadow: var(--shadow-soft); }
.path__img img { width: 100%; height: 100%; object-fit: cover; }
.path h2 { font-size: var(--t-h2); }
.path p { color: var(--muted); }
@media (min-width: 860px) {
  .paths { grid-template-columns: 1.25fr 0.9fr; gap: var(--s-8); align-items: start; }
  .path--kunst .path__img { aspect-ratio: 4 / 3; max-width: 600px; }
  .path--therapie { margin-top: var(--s-9); }
  .path--therapie .path__img { aspect-ratio: 3 / 4; max-width: 420px; }
}
.path--kunst .path__img { aspect-ratio: 4 / 3; max-width: 600px; }
.path--therapie .path__img { aspect-ratio: 3 / 4; max-width: 420px; }

/* ---------- teaser / split ---------- */
.split { display: grid; gap: var(--s-6); align-items: center; }
.split__img { width: min(100%, 360px); box-shadow: var(--shadow-soft); }
.split__img img { width: 100%; height: auto; }
.band { background: var(--wall-2); }
@media (min-width: 860px) { .split { grid-template-columns: auto 1fr; gap: var(--s-8); } .split--rev { grid-template-columns: 1fr auto; } .split--rev .split__img { order: 2; } }
.split h2 { margin-bottom: var(--s-5); }

.invite { text-align: left; }
.invite h2 { max-width: 14ch; margin-bottom: var(--s-5); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: var(--s-6) var(--gutter) calc(var(--s-6) + var(--bar)); font-size: var(--t-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; }
.site-foot p { margin: 0; max-width: none; }
.site-foot a { color: var(--muted); }

/* ---------- reveals ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- page heads (therapie, over) ---------- */
.page-head { padding: clamp(3rem, 8vw, 7rem) var(--gutter) var(--s-7); max-width: 88rem; margin-inline: auto; }
.page-head h1 { font-size: clamp(2.8rem, 1.4rem + 5.4vw, 6.4rem); max-width: 14ch; line-height: 0.96; margin-bottom: var(--s-6); }
.page-head h1 em { color: var(--accent); }
.prose h2 { font-size: var(--t-h3); margin-bottom: var(--s-4); }
.prose p { color: #2d2823; }
.two-col { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-8); align-items: start; } }
.blocks > * + * { margin-top: var(--s-8); }
.checks { list-style: none; margin: 0; padding: 0; max-width: 46ch; }
.checks li { padding: var(--s-4) 0; border-top: 1px solid var(--line); font-family: var(--display); font-size: 1.5rem; line-height: 1.25; }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.facts { display: grid; gap: 0; border-top: 1px solid var(--ink); margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: var(--s-4); align-items: baseline; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.facts b { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); line-height: 1; color: var(--accent-ink); }
.facts span { color: #2d2823; max-width: 38ch; }
.pull { font-family: var(--display); font-style: italic; font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.12; max-width: 20ch; margin: 0; color: var(--ink); }
.pull cite { display: block; font-family: var(--body); font-style: normal; font-size: var(--t-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: var(--s-4); }
.accent-img { margin: 0; width: min(100%, 360px); box-shadow: var(--shadow-soft); }
.accent-img img { width: 100%; height: auto; }
.accent-img figcaption { font-size: var(--t-small); color: var(--muted); padding-top: var(--s-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: var(--s-4) 0 var(--s-4) var(--s-5); border-left: 1px solid var(--line); position: relative; max-width: 54ch; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 1.45rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- form ---------- */
.contact { background: var(--paper); border-top: 1px solid var(--line); }
.contact__grid { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-8); } }
.contact h2 { margin-bottom: var(--s-5); }
.direct { list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.direct li { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.direct span { display: block; font-size: var(--t-small); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.direct a { font-family: var(--display); font-size: 1.7rem; text-decoration: none; color: var(--ink); }
.form { display: grid; gap: var(--s-5); }
.form .row { display: grid; gap: var(--s-5); }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: var(--t-small); font-weight: 500; letter-spacing: 0.04em; margin-bottom: var(--s-2); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--wall); border: 1px solid #9d9488; border-radius: var(--radius); padding: 0.8rem 0.9rem; min-height: 48px; }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #a12a1a; }
.hint { font-size: var(--t-small); color: var(--muted); margin: var(--s-2) 0 0; }

/* ---------- KUNST: entrance ---------- */
.entrance { padding: clamp(3rem, 8vw, 6rem) var(--gutter) var(--s-7); max-width: 88rem; margin-inline: auto; display: grid; gap: var(--s-6); }
.entrance h1 { font-size: clamp(3rem, 1.4rem + 7vw, 7.4rem); line-height: 0.94; max-width: 11ch; }
.entrance h1 em { color: var(--accent); }
.entrance__side { max-width: 42ch; align-self: end; }
.entrance__side p { color: var(--muted); }
@media (min-width: 900px) { .entrance { grid-template-columns: 1.4fr 1fr; align-items: end; gap: var(--s-8); } }
.filter { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-5); }
.filter button { font: inherit; font-size: 0.9rem; min-height: 44px; padding: 0.5rem 1.1rem; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery-noscript { padding: var(--s-6) var(--gutter); }

/* ---------- KUNST: rooms (vertical default) ---------- */
.room { position: relative; background: var(--room-bg, var(--wall)); }
.room[hidden] { display: none; }
.room__stage { padding: var(--s-8) var(--gutter) var(--s-8); }
.room__track { display: flex; flex-direction: column; gap: clamp(5rem, 14vw, 8rem); }
.chapter { padding-bottom: var(--s-2); }
.chapter__no { font-family: var(--display); font-style: italic; font-size: clamp(3.5rem, 12vw, 6rem); line-height: 0.9; color: var(--accent); display: block; }
.chapter h2 { font-size: clamp(2.2rem, 8vw, 3.4rem); margin-top: var(--s-2); }
.chapter p { font-size: var(--t-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: var(--s-3) 0 0; }
.work { margin: 0; flex: none; }
.work__frame { --hang: 2.6rem; position: relative; display: block; width: max-content; max-width: 100%; margin-top: 3rem; transition: transform 0.45s var(--ease); }
/* the whole frame (strings and nail included) lifts together on hover, so the strings stay attached */
.work__frame:has(.work__btn:hover), .work__frame:has(.work__btn:focus-visible) { transform: translateY(-4px); }
.work__frame::before { content: ""; position: absolute; left: 17%; right: 17%; bottom: 100%; height: var(--hang);
  background: linear-gradient(to top left, transparent calc(50% - 0.5px), rgba(31,27,24,.4) calc(50% - 0.5px), rgba(31,27,24,.4) calc(50% + 0.5px), transparent calc(50% + 0.5px)) left / 50% 100% no-repeat,
              linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(31,27,24,.4) calc(50% - 0.5px), rgba(31,27,24,.4) calc(50% + 0.5px), transparent calc(50% + 0.5px)) right / 50% 100% no-repeat; pointer-events: none; }
.work__frame::after { content: ""; position: absolute; left: 50%; bottom: calc(100% + var(--hang) - 2.5px); width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #8d8478; pointer-events: none; }
.work__btn { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; transition: box-shadow 0.45s var(--ease); box-shadow: var(--shadow-work); }
.work__btn img { width: var(--w, 260px); height: auto; background: var(--paper); }
.work__btn:hover { box-shadow: 0 1px 1px rgba(31,27,24,.12), 0 10px 20px rgba(31,27,24,.14), 0 30px 44px -14px rgba(31,27,24,.28); }
.work figcaption { margin-top: var(--s-4); font-size: 0.8rem; line-height: 1.45; color: var(--muted); width: var(--w, 260px); max-width: 100%; }
.work figcaption .no { font-variant-numeric: tabular-nums; letter-spacing: 0.1em; display: block; margin-bottom: 0.2rem; }
.work figcaption cite { display: block; font-family: var(--display); font-style: italic; font-size: 1.25rem; line-height: 1.15; color: var(--ink); }
.work .sold { display: inline-block; margin-top: 0.35rem; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); border: 1px solid var(--accent-ink); padding: 0.1rem 0.5rem; border-radius: 999px; }
html:not(.pin) .work:nth-child(odd) { align-self: flex-start; }
html:not(.pin) .work:nth-child(even) { align-self: flex-end; }

/* pinned (desktop, normal scrolling drives a sticky stage) */
html.pin .room__stage { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 0; overflow: hidden; display: flex; align-items: center; }
html.pin .room__track { flex-direction: row; align-items: center; gap: clamp(4rem, 7vw, 8rem); padding: 0 8vw 4rem; width: max-content; will-change: transform; }
html.pin .chapter { flex: none; width: min(26rem, 32vw); padding-right: 3vw; }
html.pin .work { transform: translateY(var(--dy, 0)); }
html.pin .work:nth-child(odd), html.pin .work:nth-child(even) { align-self: center; }

/* ---------- minimap ---------- */
.minimap { position: fixed; z-index: 30; left: var(--rail); right: 0; bottom: 0; background: color-mix(in srgb, var(--wall) 94%, transparent); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--s-4); padding: 0.5rem var(--gutter); min-height: 60px; }
.minimap[hidden] { display: none; }
.mm-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }
.mm-btn:hover { border-color: var(--ink); }
.mm-info { flex: none; min-width: 7.5rem; line-height: 1.2; }
.mm-room { display: block; font-family: var(--display); font-style: italic; font-size: 1.15rem; }
.mm-count { display: block; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.mm-marks { display: flex; align-items: flex-end; gap: 3px; flex: 1; min-width: 0; height: 40px; overflow: hidden; }
.mm-gap { width: 14px; flex: none; }
.mm-mark { flex: 1 1 0; max-width: 9px; min-width: 4px; height: 16px; border: 0; padding: 0; background: #b9b0a3; cursor: pointer; border-radius: 1px; position: relative; transition: height 0.25s var(--ease), background 0.25s; }
.mm-mark::after { content: ""; position: absolute; inset: -12px -2px; }
.mm-mark:hover { background: var(--ink); }
.mm-mark[aria-current="true"] { height: 34px; background: var(--accent); }
@media (max-width: 640px) { .mm-info { min-width: 0; } .mm-count { display: none; } .mm-btn { width: 40px; height: 40px; } .minimap { gap: var(--s-3); } .mm-mark { min-width: 3px; } }
@media (max-width: 420px) { .mm-room { font-size: 1rem; } }

/* ---------- viewer ---------- */
.viewer { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: color-mix(in srgb, var(--wall) 97%, transparent); color: var(--ink); }
.viewer::backdrop { background: rgba(31, 27, 24, 0.55); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; animation: fade 0.35s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer__top { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) var(--gutter); font-size: var(--t-small); letter-spacing: 0.12em; color: var(--muted); }
.viewer__top button { font: inherit; background: transparent; border: 1px solid var(--ink); color: var(--ink); min-height: 44px; padding: 0.4rem 1.1rem; border-radius: 999px; cursor: pointer; }
.viewer__stage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4); padding: 0 var(--s-4); min-height: 0; }
.viewer__img { min-height: 0; display: grid; place-items: center; }
.viewer__img img { max-width: 100%; max-height: min(66vh, 100%); width: auto; height: auto; box-shadow: var(--shadow-work); background: var(--paper); }
.viewer__cap { padding: var(--s-4) var(--gutter) var(--s-6); text-align: center; display: grid; gap: 0.2rem; justify-items: center; }
.viewer__cap cite { font-family: var(--display); font-style: italic; font-size: 1.8rem; line-height: 1.1; }
.viewer__cap span { color: var(--muted); font-size: 0.9rem; }
.viewer__cap a { margin-top: var(--s-3); font-weight: 500; }
@media (max-width: 640px) { .viewer__stage { grid-template-columns: 1fr; } .viewer__stage .mm-btn { display: none; } .viewer__cap { padding-bottom: var(--s-5); } }
.viewer__swipe { display: none; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 640px) { .viewer__swipe { display: block; } }

/* ---------- view transitions ---------- */
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(root) { animation: vt-out 0.25s ease both; }
::view-transition-new(root) { animation: vt-in 0.4s var(--ease) both; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- utilities and stagger indices ---------- */
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-9 { margin-top: var(--s-9); }
.row-end { align-items: flex-end; }
.hero h1 .l:nth-child(1) { --i: 0; }
.hero h1 .l:nth-child(2) { --i: 1; }
.hero h1 .l:nth-child(3) { --i: 2; }
.piece--a { --i: 0; }
.piece--b { --i: 1; }
.piece--c { --i: 2; }
.piece--d { --i: 3; }
.piece--e { --i: 4; }
.piece--f { --i: 5; }
.room__track { position: relative; }
.room--1 { --room-bg: var(--room-1); }
.room--2 { --room-bg: var(--room-2); }
.room--3 { --room-bg: var(--room-3); }
.room--4 { --room-bg: var(--room-4); }
.room--5 { --room-bg: var(--room-5); }
.viewer__stage { touch-action: pan-y; }

/* first work of each room: centred in the vertical (below 1024px / reduced-motion) layout */
html:not(.pin) .chapter + .work { align-self: center; }
