/* Interaction and responsive fixes retain the original chapter choreography. */
:root { --error: #E58F78; --focus: var(--aqua); --control-size: 44px; }
html { scroll-padding-top: 104px; scrollbar-color: var(--muted) var(--bg2); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 14px 20px; background: var(--accent); color: #141310; border-radius: 12px; }
.skip-link:focus { top: 20px; }
.nav { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.hero .giant { margin: 0; }
.hero { height: 100svh; }
.sticky { height: 100svh; }
#slimeLayer .slime-fallback { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); width: 170px; height: 180px; border-radius: 55% 55% 42% 42%; background: radial-gradient(circle at 30% 20%, #DFF6FB, var(--aqua) 45%, #2E7E9D); box-shadow: inset 0 3px 8px #fff8, 0 25px 45px #0002; }
.slime-fallback::before { content: '•  •'; display: block; text-align: center; margin-top: 55px; font: 48px 'Mona'; color: #1D1F24; }
.slime-fallback::after { content: 'ᴗ'; display: block; text-align: center; font: 22px 'Mona'; color: #1D1F24; }
#slimeLayer.no-webgl { position: absolute; height: 100svh; }
.hero .chip.tl { max-width: calc(100% - 40px); }
.giant .row { font-size: clamp(38px, 9.6vw, 210px); }
.spec .ctl { position: relative; z-index: 1; }
.seg button { min-height: var(--control-size); }
.dots button { min-height: 36px; width: 36px; }
.dots button.on { outline: 2px solid var(--ink); outline-offset: 3px; }
input[type=range] { appearance: none; background: transparent; height: var(--control-size); max-width: 100%; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--range-progress, 50%), var(--line) var(--range-progress, 50%)); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); margin-top: -6px; box-shadow: 0 0 0 1px var(--line); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--line); }
input[type=range]::-moz-range-thumb { height: 16px; width: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
#c3 { --ink: #F3EEE4; --muted: #9A948A; color: var(--ink); }
.island { color: #F3EEE4; --muted: #ABA69B; }
.beta-card { background: linear-gradient(160deg, var(--bg2), var(--bg) 70%); }
.field select { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m5 7 4 4 4-4' fill='none' stroke='%2380A0A0' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field select option { color: var(--ink); background: var(--card); }
.field input[aria-invalid=true] { border-color: var(--error); }
.check input { appearance: none; width: 18px; height: 18px; flex-shrink: 0; margin: 0; border: 1px solid var(--muted); border-radius: 4px; background: var(--bg2); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: '✓'; font: 700 13px 'Mona'; color: #141310; }
.check { min-height: var(--control-size); line-height: 1.5; }
.form-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.botcheck { display: none !important; }
.err { color: var(--error); line-height: 1.5; }
html[data-theme=paper] { --error: #AD3421; }
html[data-theme=paper] .bubble { color: #F3EEE4; }
html[data-theme=paper] .step .tile .ok { background: #50794A; }
button:disabled { cursor: wait; opacity: .65; }
.success:focus { outline: none; }
.rec-pause { margin-top: 20px; font-size: 12px; min-height: var(--control-size); }
.rec-status { font-size: 13px; color: var(--muted); line-height: 1.6; min-height: 42px; max-width: 400px; }
.column { --rec-gap: 14px; }
.column .track { gap: var(--rec-gap); padding-bottom: 4px; }
.column:hover .track, .column:focus-within .track { animation-play-state: paused; }
.column.paused, html[data-motion=reduced] .column { overflow-y: auto; mask-image: none; scroll-behavior: auto; }
.column.paused .track, html[data-motion=reduced] .column .track { animation: none; }
.column.paused [data-clone], html[data-motion=reduced] [data-clone] { display: none; }
.rec { min-height: 178px; }
.rec .acts { flex-wrap: wrap; }
.rec .acts button { min-height: 40px; }
.rec .undo { display: none; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 600 12px 'Mona'; border-radius: 99px; padding: 10px 16px; margin-top: 12px; min-height: 40px; cursor: pointer; }
.rec.ok .undo, .rec.no .undo, .rec.no .done { display: inline-block; }
.rec.no { opacity: 1; }
.rec.no .acts { display: none; }
.rec .done { line-height: 1.6; color: var(--ink); font-size: 12px; }
.icons div { cursor: default; }
.modal { width: 100%; height: 100%; max-width: none; max-height: none; border: 0; margin: 0; color: var(--ink); background: transparent; }
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(8,8,7,.94); }
.modal video { max-height: calc(100svh - 140px); background: #000; }
.modal .x { color: #F3EEE4; border-color: #F3EEE450; min-height: var(--control-size); }
html[data-motion=reduced] { scroll-behavior: auto; }
html[data-motion=reduced] *, html[data-motion=reduced] *::before, html[data-motion=reduced] *::after { animation: none !important; transition: none !important; }
html[data-motion=reduced] .giant .ch, html[data-motion=reduced] [data-reveal], html[data-motion=reduced] .icons div { opacity: 1; transform: none; }
html[data-motion=reduced] .pin { height: auto !important; }
html[data-motion=reduced] .sticky { position: relative; height: max(720px, 90svh); }
@media (max-width: 900px) {
  .rec-grid > [data-reveal] { position: relative !important; top: auto !important; }
  .rec-grid { gap: 24px; }
  .column { height: 550px; }
  .beta-card { gap: 32px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 100px; }
  .hero { min-height: 600px; }
  .hero .giant { top: 24vh; }
  .hero .chip.tl { top: 100px; left: 20px; font-size: 11px; gap: 8px; }
  .hero .chip.bl { bottom: 30px; left: 22px; }
  .hero .giant .row { font-size: 9.4vw; }
  .hero .giant .row.s { font-size: 12vw; }
  #c2 .sticky { gap: 30px; padding: 85px 16px 30px; }
  #c2 .h2 { font-size: clamp(34px, 8vw, 50px); }
  .steps { width: 100%; justify-content: center; gap: 10px; }
  .step .tile { width: clamp(62px, 18vw, 100px); }
  .step small { font-size: clamp(9px, 2.5vw, 12px); }
  .step .tile .ok { width: 22px; height: 22px; font-size: 13px; right: 5px; top: 5px; }
  .arrow { font-size: 20px; }
  .toast { font-size: 12px; line-height: 1.5; padding: 13px 18px; border-radius: 18px; max-width: 100%; }
  .kicker { font-size: 10px; letter-spacing: .12em; }
  #c3 .q { top: 18vh; padding: 0 15px; font-size: clamp(24px, 6.6vw, 38px); }
  .doc { padding: 20px; }
  .doc .top { font-size: 9px; }
  .doc .ln { height: 8px; margin: 12px 0; }
  .bubble { font-size: 12px; padding: 11px 14px; max-width: 80vw; white-space: normal; }
  .island { top: 105px; }
  .island.open { width: calc(100% - 28px); height: 132px; border-radius: 28px; }
  .island .msg { left: 90px; right: 18px; top: 23px; }
  .island .msg small { font-size: 9px; }
  .island .msg p { font-size: 14px; line-height: 1.45; }
  .island .home { left: 14px; }
  #c4 .copy { bottom: 12vh; left: 22px; right: 22px; }
  #c4 .h2 { font-size: clamp(32px, 8.5vw, 54px); }
  #c5 .copy { top: 16vh; padding: 0 20px; }
  #c5 .copy .h2 { font-size: 29px !important; line-height: 1.07; }
  .stack { width: 72vw; height: 43vh; max-height: 400px; margin-top: 25vh !important; }
  .win .tb { font-size: 10px; padding: 0 12px; gap: 3px; height: 33px; }
  .win .tb em { font-size: 6px; padding: 4px 5px; }
  .win .bd { padding: 17px; }
  .win .bd > div[style*="height:180px"] { height: 100px !important; margin-top: 20px !important; gap: 9px !important; }
  .win .typed { margin-top: 35px !important; font-size: 11px; padding: 10px; line-height: 1.5; }
  .win .tg { font-size: 11px; }
  .sw { transform: scale(.75); transform-origin: right; }
  .custom, .recs, .beta { padding-block: 85px; }
  .spec { padding: 23px; }
  .ctl label { font-size: 11px; }
  .seg button { padding: 9px 12px; font-size: 11px; }
  .dots button { padding: 0; }
  .icons { grid-template-columns: repeat(5, 1fr); }
  .rec { grid-template-columns: 32px 1fr; padding: 17px; gap: 12px; }
  .rec .av { width: 32px; height: 32px; }
  .rec .av::before, .rec .av::after { top: 12px; height: 6px; width: 4px; }
  .rec .av::before { left: 9px; } .rec .av::after { right: 9px; }
  .rec p { font-size: 15px; }
  .rec small { font-size: 9px; }
  .rec .acts button { font-size: 12px; padding: 9px 12px; }
  .beta-card { padding: 28px 22px; }
  .field span { font-size: 10px; letter-spacing: .08em; }
  .field input, .field select { font-size: 16px; }
  .check { font-size: 12px; align-items: flex-start; padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion=calm]):not([data-motion=fluid]) { scroll-behavior: auto; }
}
