/* P22 Terma Sihoť — Horarium (premium video)
   Tokens → base → loader → bar/menu/rail → stage → journey chapters → steam wipe → ground → form → footer → motion states → responsive */

:root {
  --surface: oklch(0.92 0.02 75);
  --surface-2: oklch(0.88 0.025 72);
  --fg: oklch(0.26 0.03 160);
  --muted: oklch(0.45 0.03 150);
  --on-video: oklch(0.97 0.01 80);
  --on-video-muted: oklch(0.86 0.015 80);
  --accent: oklch(0.6 0.1 170);
  --accent-strong: oklch(0.47 0.085 172);
  --accent-fg: oklch(0.98 0.01 170);
  --line: oklch(0.78 0.02 75);
  --steam: oklch(0.96 0.01 80);
  --spruce-deep: oklch(0.2 0.03 160);
  --panel: oklch(0.2 0.03 160 / 0.66);
  --chapter-vh: 150vh;
  --section-y: clamp(5rem, 4rem + 5vw, 9rem);
  --gutter: clamp(1rem, 0.5rem + 2.4vw, 2.5rem);
  --display: 'Hedvig Letters Serif', 'Iowan Old Style', Georgia, serif;
  --text: 'Geologica', system-ui, sans-serif;
  --sine-out: cubic-bezier(0.39, 0.575, 0.565, 1);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --d1: clamp(2.5rem, 1.8rem + 3.6vw, 6rem);
  --d2: clamp(1.875rem, 1.4rem + 2.2vw, 3.5rem);
  --d3: clamp(1.375rem, 1.2rem + 0.9vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.motion { scroll-behavior: auto !important; }
body { margin: 0; background: var(--surface); color: var(--fg); font: 400 1.0625rem/1.65 var(--text); font-feature-settings: 'kern'; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.sprite { position: absolute; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--fg); color: var(--surface); padding: 0.75rem 1rem; border-radius: 2px; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.display-1 { font: 400 var(--d1)/1.08 var(--display); letter-spacing: -0.01em; }
.display-2 { font: 400 var(--d2)/1.1 var(--display); letter-spacing: -0.005em; }
.label { font: 500 0.75rem/1.4 var(--text); text-transform: uppercase; letter-spacing: 0.12em; }
.lead { font: 300 1.25rem/1.5 var(--text); }
.note { color: var(--on-video-muted); font-size: 0.9375rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.25rem; padding: 0.9rem 1.6rem; border: 0; border-radius: 2px; font: 500 1rem/1.2 var(--text); text-decoration: none; letter-spacing: 0.01em; transition: background-color 0.25s, color 0.25s; }
.btn-primary { background: var(--accent-strong); color: var(--accent-fg); }
.btn-primary:hover { background: oklch(0.42 0.08 172); }
.link-down { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-top: 0.5rem; }
.chip { min-height: 44px; padding: 0.55rem 1.15rem; border-radius: 999px; border: 1px solid currentColor; background: transparent; font-weight: 500; font-size: 0.9375rem; }
.chip[aria-pressed='true'] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-fg); }

/* ---------- loader (only under html.motion) ---------- */
.loader { display: none; }
html.motion .loader { display: grid; position: fixed; inset: 0; z-index: 90; place-items: center; color: var(--fg); }
html.intro-done .loader { display: none; }
.loader-layer { position: absolute; inset: 0; background: var(--surface); }
.loader-a { opacity: 0.78; }
.loader-b { opacity: 0.62; }
.loader-center { position: relative; text-align: center; display: grid; gap: 0.75rem; justify-items: center; }
.loader-clock { font: 400 clamp(4rem, 3rem + 6vw, 9rem)/1 var(--display); font-variant-numeric: tabular-nums; display: flex; align-items: flex-start; }
.loader-colon { animation: blink 1s steps(1) infinite; padding-inline: 0.04em; }
.loader-sec { font: 500 clamp(0.9rem, 0.8rem + 0.4vw, 1.25rem)/1 var(--text); font-variant-numeric: tabular-nums; margin: 0.6em 0 0 0.6em; color: var(--muted); min-width: 2ch; text-align: left; }
.loader-label { font: 500 0.75rem/1.4 var(--text); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.loader-note { letter-spacing: 0.2em; }
html.revisit .loader-center { visibility: hidden; }
@keyframes blink { 50% { opacity: 0.15; } }

/* ---------- bar: Hour clock + chip + menu ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: flex-start; padding: clamp(0.9rem, 0.6rem + 1vw, 1.6rem) var(--gutter); color: var(--on-video); transition: color 0.4s, background-color 0.4s; pointer-events: none; }
.bar > * { pointer-events: auto; }
html.tone-light .bar { color: var(--fg); }
html:not(.motion) .bar { background: oklch(0.92 0.02 75 / 0.9); color: var(--fg); padding-block: 0.7rem; }
html:not(.motion) .clock-hour { font-size: 1.25rem; }
html.on-ground .bar { background: oklch(0.92 0.02 75 / 0.9); color: var(--fg); padding-block: 0.7rem; }
.clock { display: grid; text-decoration: none; line-height: 1; gap: 0.35rem; }
.wordmark { font: 400 1.25rem/1.1 var(--display); white-space: nowrap; }
.clock-hour { font: 500 2rem/1 var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
html.on-ground .clock-hour { font-size: 1.25rem; }
.bar-right { display: flex; gap: 0.6rem; align-items: center; }
.day-chip { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.5rem 1rem; border-radius: 999px; background: var(--accent-strong); color: var(--accent-fg); font: 500 0.875rem/1.2 var(--text); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-chip[hidden] { display: none; }
.day-chip-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.day-chip.is-bump { animation: bump 0.5s var(--sine-out); }
@keyframes bump { 40% { transform: scale(1.06); } }
.menu-btn { min-height: 44px; padding: 0.5rem 1.1rem; border-radius: 999px; border: 1px solid currentColor; background: transparent; font-weight: 500; font-size: 0.9375rem; }

.menu { border: 0; padding: 0; margin: 0 0 0 auto; width: min(30rem, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; background: var(--surface); color: var(--fg); }
.menu::backdrop { background: oklch(0.2 0.03 160 / 0.45); }
.menu-inner { display: flex; flex-direction: column; gap: 2rem; height: 100%; padding: 1.25rem var(--gutter) 2rem; overflow-y: auto; }
.menu-close { align-self: flex-end; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: transparent; }
.menu-hours a { display: flex; gap: 1.25rem; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 var(--d3)/1.2 var(--display); }
.mh-t { font: 500 0.9375rem/1 var(--text); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2rem; }
.menu-hours a:hover .mh-t { color: var(--accent-strong); }
.menu-ground { display: grid; gap: 0.25rem; margin-top: 1.5rem; }
.menu-ground a { display: block; padding: 0.4rem 0; font-weight: 500; text-decoration: none; }
.menu-phone { margin-top: auto; display: inline-flex; gap: 0.6rem; align-items: center; font-weight: 500; text-decoration: none; min-height: 44px; }

/* hour rail: visual only */
.rail { display: none; }
html.motion .rail { display: block; position: fixed; z-index: 3; left: max(var(--gutter), calc(50% - 320px - 7rem)); top: 50%; height: 52vh; transform: translateY(-50%); color: var(--on-video); transition: opacity 0.5s, color 0.4s; }
html.tone-light .rail { color: var(--fg); }
html.on-ground .rail { opacity: 0; }
.rail-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: currentColor; opacity: 0.35; }
.rail-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); }
.rail-dots { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.rail-dots li { position: relative; display: flex; align-items: center; gap: 0.7rem; transform: translateX(-3.5px); font: 500 0.6875rem/1 var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; opacity: 0.6; transition: opacity 0.3s; }
.rail-dots li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; background: var(--spruce-deep); }
html.tone-light .rail-dots li::before { background: var(--steam); }
.rail-dots li.is-active { opacity: 1; }
.rail-dots li.is-active::before { background: var(--accent); border-color: var(--accent); }

/* ---------- stage ---------- */
.stage { display: none; }
html.motion .stage { display: block; position: fixed; inset: 0; z-index: 0; background: var(--spruce-deep); overflow: hidden; }
.stage-poster, .stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-canvas { opacity: 0; }
.stage.is-live .stage-canvas { opacity: 1; }
.stage.is-live .stage-poster { visibility: hidden; }
.stage.is-faded .stage-canvas { opacity: 0; transition: opacity 0.6s; }
.stage-scrim { position: absolute; inset: 0; background:
  linear-gradient(to bottom, oklch(0.2 0.03 160 / 0.42), transparent 22%),
  linear-gradient(to top, oklch(0.18 0.03 160 / 0.78), oklch(0.18 0.03 160 / 0.3) 46%, transparent 70%);
  transition: opacity 0.6s; }
html.tone-light .stage-scrim { opacity: 0.2; }
.grain { position: absolute; inset: 0; background: url('img/grain.svg') repeat; background-size: 180px; opacity: 0.04; mix-blend-mode: overlay; pointer-events: none; }

/* ---------- cursor ---------- */
.cursor { display: none; }
html.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; color: var(--on-video); mix-blend-mode: difference; }
html.has-cursor body { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto; }
html.has-cursor a, html.has-cursor button, html.has-cursor summary, html.has-cursor label { cursor: pointer; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: currentColor; }
.cursor-ring { width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 1px solid currentColor; display: grid; place-items: center; transition: width 0.3s, height 0.3s, margin 0.3s; }
.cursor.has-label .cursor-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.cursor-label { font: 500 0.6875rem/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; transition: opacity 0.2s; }
.cursor.has-label .cursor-label { opacity: 1; }

/* ---------- journey ---------- */
main { position: relative; z-index: 1; }
.journey { position: relative; }
html.motion .journey { height: calc(6 * var(--chapter-vh) + 100vh); }
html.motion .journey-sticky { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: clip; }
.chapter { position: relative; color: var(--on-video); }
html.motion .chapter { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.7s var(--ease); }
html.motion .chapter.is-active { opacity: 1; pointer-events: auto; }
html.motion .chapter-media { display: none; }
.chapter-ui { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 100svh; padding: 7rem var(--gutter) clamp(2.5rem, 7vh, 5rem); }
html.motion .chapter-ui { height: 100%; }
.chapter-ui > * { width: min(640px, 100%); }

/* static chapters (no JS, reduced motion, save-data, CDN down) */
html:not(.motion) .chapter { min-height: 100svh; overflow: hidden; background: var(--spruce-deep); }
html:not(.motion) .chapter-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html:not(.motion) .chapter::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, oklch(0.18 0.03 160 / 0.78), oklch(0.18 0.03 160 / 0.25) 55%, oklch(0.18 0.03 160 / 0.35)); pointer-events: none; }

/* hero */
.chapter--hero .chapter-ui { text-align: center; padding-bottom: clamp(3rem, 11vh, 7.5rem); }
.chapter--hero .chapter-ui > * { width: auto; max-width: 100%; }
.hero-title { font-size: clamp(2.25rem, 1.4rem + 2.9vw, 4.5rem); max-width: 24ch; margin: 1.1rem auto 2rem; text-wrap: balance; }
.hero-quiet { display: block; color: var(--on-video-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: center; }

/* panels over video */
.panel { position: relative; background: var(--panel); border: 1px solid oklch(0.97 0.01 80 / 0.14); border-radius: 2px; padding: clamp(1.25rem, 0.8rem + 1.6vw, 2.25rem); }
.panel .display-2, .ticho-head .display-2 { margin: 0.6rem 0 0.4rem; }
.panel .label { color: var(--on-video-muted); }

.horarium { margin-top: 1.25rem; border-top: 1px solid oklch(0.97 0.01 80 / 0.22); }
.hrow { width: 100%; display: grid; grid-template-columns: 3.4rem 1fr 4.2rem 3.4rem 1.4rem; gap: 0.75rem; align-items: center; min-height: 52px; padding: 0.55rem 0.5rem; background: transparent; border: 0; border-bottom: 1px solid oklch(0.97 0.01 80 / 0.22); border-radius: 2px; text-align: left; color: var(--on-video); transition: background-color 0.25s; position: relative; }
.hrow:hover { background: oklch(0.97 0.01 80 / 0.07); }
.hrow-t, .hrow-d, .hrow-p { font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.hrow-t, .hrow-d { color: var(--on-video-muted); }
.hrow-p { text-align: right; font-weight: 500; }
.hrow-n { font: 400 1.375rem/1.2 var(--display); }
.hrow-i { justify-self: end; transition: transform 0.35s var(--ease); }
.hrow[aria-pressed='true'] { background: oklch(0.6 0.1 170 / 0.22); }
.hrow[aria-pressed='true']::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 2px; background: var(--accent); }
.hrow[aria-pressed='true'] .hrow-i { transform: rotate(45deg); }

.menu-day, .steps { margin-top: 1.25rem; border-top: 1px solid oklch(0.97 0.01 80 / 0.22); }
.menu-day li, .steps li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid oklch(0.97 0.01 80 / 0.22); }
.md-k, .st-t { font: 500 0.8125rem/1.3 var(--text); text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-video-muted); }
.st-t { font-size: 1rem; letter-spacing: 0; font-variant-numeric: tabular-nums; text-transform: none; color: var(--on-video); }
.md-n, .st-n { font: 400 1.375rem/1.25 var(--display); }
.steps + .note { margin-top: 0.9rem; }

.chapter--noc .chapter-ui { text-align: center; padding-bottom: clamp(3rem, 12vh, 8rem); }
.noc-title { font-size: clamp(2.25rem, 1.5rem + 3vw, 4.75rem); margin: 1rem auto 1.75rem; max-width: 18ch; text-wrap: balance; }

/* ---------- 15:00 steam wipe ---------- */
.fog-wrap { position: absolute; inset: 0; z-index: 1; }
.fog { position: absolute; inset: 0; width: 100%; height: 100%; display: none; touch-action: none; opacity: 0.92; }
html.motion .fog { display: block; }
.fog-windows { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.fog-windows span { border: 1px solid transparent; transition: border-color 0.4s; }
.fog-windows span.is-picked { border-color: var(--accent); }
.fog-windows span + span { border-left-color: oklch(0.26 0.03 160 / 0.12); }
.fog-windows span.is-picked + span { border-left-color: var(--accent); }
.pools { position: absolute; left: 0; right: 0; bottom: clamp(6.5rem, 15vh, 9rem); display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.pool { justify-self: center; display: grid; gap: 0.2rem; text-align: center; padding: 0.75rem 1.1rem; background: var(--surface); color: var(--fg); border-radius: 2px; max-width: calc(100% - 1rem); }
html.motion .pool { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--sine-out), transform 0.8s var(--sine-out); }
html.motion .pool.is-picked { opacity: 1; transform: none; }
.pool-name { font: 400 1.5rem/1.15 var(--display); }
.pool-meta { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pool.is-picked { box-shadow: inset 0 0 0 1px var(--accent); }
.chapter-ui--ticho { justify-content: space-between; pointer-events: none; padding-top: clamp(6.5rem, 14vh, 9rem); }
.chapter-ui--ticho > * { pointer-events: auto; }
.ticho-head { text-align: center; color: var(--fg); text-wrap: balance; }
.ticho-head .label { color: var(--muted); }
html:not(.motion) .ticho-head { color: var(--on-video); }
html:not(.motion) .ticho-head .label { color: var(--on-video-muted); }
.pool-btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; color: var(--fg); }
html:not(.motion) .pool-btns { color: var(--on-video); }
.pool-btns .chip { background: oklch(0.96 0.01 80 / 0.7); }
html:not(.motion) .pool-btns .chip { background: oklch(0.2 0.03 160 / 0.5); }
.pool-btns .chip[aria-pressed='true'] { background: var(--accent-strong); }
html.motion .chapter--ticho .chapter-ui { z-index: 2; }

/* ---------- ground ---------- */
.ground { position: relative; z-index: 2; background: var(--surface); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-2); }
.wrap { width: min(1280px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap > .label, .wrap > .display-2, .wrap > .lead { max-width: 44rem; }
.wrap > .display-2 { margin: 0.75rem 0 1rem; }
.wrap > .label, .pramen .label, .form-intro .label { color: var(--muted); }
.lead { color: var(--muted); }
.sub { font: 500 0.75rem/1.4 var(--text); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 3.5rem 0 0; text-align: left; }

.rows { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.sub + .rows { margin-top: 1rem; }
.row { display: grid; grid-template-columns: minmax(8rem, 1.3fr) 5rem 1.6fr 9rem auto; gap: 1.25rem; align-items: center; padding: 1.1rem 0.25rem; border-bottom: 1px solid var(--line); transition: background-color 0.25s; }
.stays .row { grid-template-columns: minmax(8rem, 1.3fr) 6.6fr 9rem auto; }
.row:hover { background: oklch(0.88 0.025 72 / 0.6); }
.row.is-lit { background: oklch(0.6 0.1 170 / 0.12); }
.row-name { font: 400 var(--d3)/1.15 var(--display); }
.row-m, .row-p { font-variant-numeric: tabular-nums; }
.row-d { color: var(--muted); }
.row-p b { font-weight: 500; font-size: 1.125rem; }
.row-btn { display: inline-flex; gap: 0.5rem; align-items: center; min-height: 44px; padding: 0.4rem 0.2rem; background: none; border: 0; border-bottom: 1px solid currentColor; font-weight: 500; font-size: 0.9375rem; white-space: nowrap; color: var(--accent-strong); }

.pramen { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: start; }
.pramen-media { grid-column: 1 / 6; }
.pramen-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; }
.pramen-text { grid-column: 7 / 13; }
.pramen-text .display-2 { margin: 0.75rem 0 2rem; }
.facts > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { border-top: 1px solid var(--line); }
.facts dt { font-weight: 500; }
.facts dd { color: var(--muted); font-variant-numeric: tabular-nums; }
.access { width: 100%; border-collapse: collapse; margin-top: 2.5rem; }
.access caption { margin: 0 0 0.75rem; }
.access th, .access td { text-align: left; padding: 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.access th { width: 10rem; font-weight: 500; padding-right: 1rem; }
.access td { color: var(--muted); }
.access tr:first-child > * { border-top: 1px solid var(--line); }

.faq { margin-top: 2.5rem; max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.15rem 0; min-height: 44px; font: 400 1.375rem/1.25 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 300 1.5rem/1 var(--text); color: var(--accent-strong); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.25rem; color: var(--muted); max-width: 42rem; }

/* ---------- form ---------- */
.form-wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }
.form-intro { grid-column: 1 / 5; }
.form-intro .display-2 { margin: 0.75rem 0 1rem; }
.form { grid-column: 6 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 500; font-size: 0.9375rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 0.5rem; padding: 0; }
input:not([type='radio']):not([type='checkbox']), select, textarea { width: 100%; min-height: 48px; padding: 0.7rem 0.85rem; border: 1px solid oklch(0.62 0.02 75); border-radius: 2px; background: oklch(0.96 0.012 78); color: var(--fg); }
textarea { resize: vertical; min-height: 6rem; }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: oklch(0.5 0.16 30); }
.err { color: oklch(0.45 0.15 30); font-size: 0.875rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-r { position: relative; }
.chip-r input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chip-r span { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.1rem; border-radius: 999px; border: 1px solid oklch(0.62 0.02 75); font-weight: 500; font-size: 0.9375rem; }
.chip-r input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-fg); }
.chip-r input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--accent-strong); flex: none; }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.form-pool { color: var(--muted); font-size: 0.9375rem; }
.form-ok { grid-column: 1 / -1; display: flex; gap: 0.75rem; align-items: center; padding: 1rem 1.25rem; background: oklch(0.6 0.1 170 / 0.14); border-left: 2px solid var(--accent-strong); border-radius: 2px; }
.form-ok[hidden] { display: none; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; background: var(--spruce-deep); color: var(--on-video-muted); padding-block: 4rem 3rem; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-mark { font: 400 var(--d3)/1.1 var(--display); color: var(--on-video); }
.footer a { text-decoration-color: oklch(0.86 0.015 80 / 0.4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.footer .demo { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid oklch(0.86 0.015 80 / 0.2); font-size: 0.8125rem; }

/* ---------- motion states: steam dissolve ---------- */
html.motion .steam-in { opacity: 0; transform: translateY(10px) scale(1.02); transition: opacity 1.6s var(--sine-out), transform 1.6s var(--sine-out); }
html.motion .chapter.is-entered .steam-in { opacity: 1; transform: none; }
html.motion .steam-in::after { content: ''; position: absolute; left: -6%; right: -6%; top: 10%; height: 70%; background: linear-gradient(to bottom, transparent, var(--steam) 50%, transparent); opacity: 0; pointer-events: none; }
html.motion .chapter.is-entered .steam-in::after { animation: steam-band 1.2s var(--sine-out) both; }
@keyframes steam-band { from { opacity: 0.35; transform: translateY(0); } to { opacity: 0; transform: translateY(-40px); } }
.ticho-head, .chapter--noc .steam-in { position: relative; }
html.motion [data-treatments] li { opacity: 0; transform: translateY(10px); transition: opacity 0.9s var(--sine-out), transform 0.9s var(--sine-out); }
html.motion [data-treatments] li.is-in { opacity: 1; transform: none; }
html.motion [data-enter] { opacity: 0; }
html.motion.intro-done [data-enter] { opacity: 1; }
html.motion .hero-title:not(.is-ready) { visibility: hidden; }
html.motion.intro-done .hero-title { visibility: visible; }
html.motion .chapter.is-leaving .chapter-ui > * { opacity: 0; transform: translateY(-12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  html.motion .rail { display: none; }
}
@media (max-width: 900px) {
  .pramen-media, .pramen-text, .form-intro, .form { grid-column: 1 / -1; }
  .pramen-media img { aspect-ratio: 4 / 3; }
  .row { grid-template-columns: 1fr auto; gap: 0.35rem 1rem; }
  .stays .row { grid-template-columns: 1fr auto; }
  .row-name { grid-column: 1; }
  .row-m, .row-d { grid-column: 1; font-size: 0.9375rem; }
  .row-p { grid-column: 2; grid-row: 1; text-align: right; }
  .row-btn { grid-column: 2; grid-row: 2 / span 2; justify-self: end; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-mark { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .clock-hour { font-size: 1.5rem; }
  .wordmark { font-size: 1.0625rem; }
  .day-chip { padding: 0.45rem 0.8rem; font-size: 0.8125rem; }
  .menu-btn { padding-inline: 0.9rem; }
  .chapter-ui { padding-bottom: 1.5rem; }
  .panel { padding: 1.1rem 1rem 1.25rem; }
  .hrow { grid-template-columns: 3rem 1fr auto 1.2rem; grid-template-areas: 't n p i' 't d p i'; row-gap: 0; min-height: 56px; }
  .hrow-t { grid-area: t; } .hrow-n { grid-area: n; font-size: 1.1875rem; } .hrow-d { grid-area: d; font-size: 0.8125rem; } .hrow-p { grid-area: p; } .hrow-i { grid-area: i; }
  .menu-day li, .steps li { grid-template-columns: 5rem 1fr; }
  .md-n, .st-n { font-size: 1.1875rem; }
  html.motion .fog-wrap { inset: 27vh 0 auto; height: 58vh; }
  .bar-right { flex-direction: column-reverse; align-items: flex-end; gap: 0.4rem; }
  .chapter-ui--ticho { padding-top: 7.75rem; }
  html.on-ground .day-chip { display: none; }
  .pools { bottom: 1rem; }
  .pool { padding: 0.5rem 0.4rem; }
  .pool-name { font-size: 1.125rem; }
  .pool-meta { font-size: 0.75rem; }
  html:not(.motion) .pools { position: static; grid-template-columns: 1fr; gap: 0.5rem; padding: 0 var(--gutter); }
  html:not(.motion) .fog-wrap { position: relative; z-index: 2; padding-top: 1rem; }
  .facts > div, .access th { grid-template-columns: 7rem 1fr; }
  .access th { width: 6.5rem; }
  .form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
.dc-short { display: none; }
@media (max-width: 520px) {
  .dc-long { display: none; }
  .dc-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
