:root { --c: #ffe7d5; --r: #c4161f; --d: #8f0e17; --k: #1a0204; --pad: 28px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--r); color: var(--c); font: 500 18px/1.3 "Sofia Sans Semi Condensed", "Arial Narrow", sans-serif; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; }
button, input { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; } button { cursor: pointer; } a { color: inherit; }
:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
canvas { display: block; } [hidden] { display: none !important; }
.mb { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, .num, .fname, .buy b, .word, .lung, .how b { font-family: "League Gothic", "Arial Narrow", sans-serif; font-weight: 400; font-stretch: 75%; text-transform: uppercase; }

/* ---- the slab ---- */
.slab { position: relative; height: 100vh; height: 100svh; min-height: 720px; overflow: hidden; background: var(--r); isolation: isolate; }
.meat { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.wave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.tag { position: absolute; top: 24px; background: var(--c); color: var(--k); font-weight: 700; font-size: 18px; padding: 8px 14px; z-index: 4; }
.brand { left: var(--pad); } .nomed { right: var(--pad); background: var(--k); color: var(--c); }
h1 { position: absolute; right: var(--pad); top: 92px; width: 43vw; max-width: 700px; font-size: clamp(72px, 12.2vw, 196px); line-height: .84; letter-spacing: -.005em; z-index: 2; text-shadow: 1px 1px 0 var(--k), 2px 2px 0 var(--k), 3px 3px 0 var(--k), 4px 4px 0 var(--k), 5px 5px 0 var(--k), 6px 6px 0 var(--k); }
.num { position: absolute; left: 0; bottom: 150px; top: 74px; width: 56vw; text-align: left; padding: 0 0 0 calc(var(--pad) - 6px); z-index: 2; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.num span { position: absolute; left: calc(var(--pad) - 8px); bottom: -.118em; font-size: min(calc(var(--h, 660px) * 1.325), 84vw); line-height: 1; letter-spacing: -.012em; transform-origin: 0 86.7%; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 var(--k), 4px 4px 0 var(--k), 6px 6px 0 var(--k), 8px 8px 0 var(--k), 10px 10px 0 var(--k), 12px 12px 0 var(--k); }
.num.long span { font-size: min(calc(var(--h, 660px) * 1.325), 60vw); }
.num.idle span { color: var(--k); -webkit-text-stroke: .016em var(--c); text-shadow: none; }
.num:focus-visible { outline-offset: -8px; }
.num.beat span { transform: scale(1.028, 1.045); }
.num span { transition: transform .34s cubic-bezier(.2,.9,.3,1); } .num.beat span { transition: transform .05s linear; }
.line { position: absolute; left: 0; right: 0; height: 44px; margin-top: -22px; z-index: 3; pointer-events: none; }
.line::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 6px; background: var(--k); }
.line b { position: absolute; right: var(--pad); top: 3px; background: var(--k); color: var(--c); padding: 7px 14px; font-size: 18px; font-weight: 700; white-space: nowrap; pointer-events: auto; cursor: ns-resize; touch-action: none; -webkit-user-select: none; user-select: none; }
.line b::before { content: ""; display: inline-block; width: 16px; height: 5px; border-top: 3px solid; border-bottom: 3px solid; margin-right: 10px; vertical-align: 3px; box-sizing: content-box; }
.line b:hover, .line:focus-visible b { background: var(--c); color: var(--k); }
.line:focus-visible { outline: none; }
body[data-st=shut] .line b, body[data-st=check] .line b { cursor: not-allowed; }
.desk { position: absolute; right: var(--pad); bottom: 176px; width: 41vw; max-width: 640px; z-index: 4; display: grid; gap: 12px; }
.say { background: var(--k); color: var(--c); padding: 12px 16px; font-size: 21px; font-weight: 700; justify-self: start; }
.modes { display: flex; gap: 8px; }
.modes button { background: var(--k); color: var(--c); padding: 13px 18px; font-weight: 700; font-size: 19px; min-height: 50px; }
.modes button[aria-pressed=true] { background: var(--c); color: var(--k); }
.modes button:hover { outline: 3px solid var(--c); outline-offset: -3px; }
.cam { display: flex; gap: 12px; align-items: end; } .cam canvas { width: 84px; height: 112px; image-rendering: pixelated; background: var(--k); border: 4px solid var(--k); } .cam p { background: var(--k); padding: 10px 14px; font-size: 17px; max-width: 30ch; }
.set { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--k); padding: 8px 8px 8px 16px; justify-self: start; font-weight: 700; }
.set button { background: var(--c); color: var(--k); padding: 8px 14px; font-weight: 700; min-height: 42px; min-width: 78px; } .set label { margin-left: 10px; }
.set input { width: 190px; height: 42px; padding: 0 12px; background: #3d060b; color: var(--c); font-size: 16px; } .set input::placeholder { color: #d8a79b; opacity: 1; }
.door { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 5; background: var(--k); overflow: hidden; }
.buy { position: absolute; inset: 0; display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); text-decoration: none; color: #d8a79b; cursor: not-allowed; transition: background .14s; }
.buy b { font-size: 124px; line-height: .9; padding-top: .06em; white-space: nowrap; } .buy span { font-size: 21px; font-weight: 700; max-width: 26ch; }
.buy:focus-visible { outline-offset: -8px; }
body[data-st=open] .buy { background: var(--c); color: var(--k); cursor: pointer; } body[data-st=open] .buy:hover { background: #fff; }
body[data-st=shut] .buy b, body[data-st=check] .buy b { color: #ff4a53; }
@keyframes no { 20%, 60% { transform: translateX(-12px) } 40%, 80% { transform: translateX(12px) } }
.door.no .buy { animation: no .28s linear; }
body[data-st=shut] h1, body[data-st=shut] .num span { color: #ff4a53; }

/* ---- log ---- */
.log { background: var(--d); }
.logh { display: flex; gap: 24px; align-items: end; padding: 56px var(--pad) 24px; flex-wrap: wrap; }
h2 { font-size: clamp(72px, 11vw, 176px); line-height: .84; }
.lead { font-size: 22px; max-width: 34ch; font-weight: 700; padding-bottom: 8px; }
.key { display: inline-flex; align-items: center; background: var(--k); color: var(--c); padding: 13px 20px; font-weight: 700; min-height: 50px; text-decoration: none; }
.key:hover { background: var(--c); color: var(--k); }
.logh .key { margin-left: auto; }
.log canvas { width: 100%; height: 400px; }

/* ---- air ---- */
.air { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: var(--r); isolation: isolate; }
.air h2 { position: absolute; left: var(--pad); top: 48px; z-index: 2; text-shadow: 1px 1px 0 var(--k), 2px 2px 0 var(--k), 3px 3px 0 var(--k), 4px 4px 0 var(--k), 5px 5px 0 var(--k); }
.lung { position: absolute; inset: 0; display: block; overflow: hidden; }
.lung span { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: min(96svh, 120vw); line-height: 1; transform-origin: 50% 86.7%; transform: scale(.82, .46); text-shadow: 2px 2px 0 var(--k), 4px 4px 0 var(--k), 6px 6px 0 var(--k), 8px 8px 0 var(--k), 10px 10px 0 var(--k); margin-bottom: calc(-.1325em + 26px); white-space: nowrap; }
.lung:focus-visible { outline-offset: -10px; }
.air .lead { position: absolute; right: var(--pad); top: 58px; background: var(--k); padding: 12px 16px; z-index: 2; pointer-events: none; }

/* ---- how ---- */
.how ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--k); }
.how li { min-width: 0; } .how svg { width: 100%; display: block; aspect-ratio: 1.06; }
.how p { padding: 20px var(--pad) 36px; font-size: 20px; } .how b { display: block; font-size: clamp(56px, 6.4vw, 104px); line-height: .9; }

/* ---- foot ---- */
.foot { background: var(--k); padding: 48px var(--pad) 56px; display: grid; gap: 14px; border-top: 8px solid var(--r); }
.fname { font-size: clamp(150px, 31vw, 520px); line-height: .78; margin: 0 0 .06em -.02em; color: var(--r); overflow-wrap: anywhere; }
.warn { font-size: 26px; font-weight: 700; } .fk { display: flex; gap: 10px; flex-wrap: wrap; } .foot .key { background: var(--c); color: var(--k); } .foot .key:hover { background: #fff; }
.fine { font-size: 16px; color: #d8a79b; max-width: 76ch; }

@media (max-width: 860px) {
  :root { --pad: 16px; }
  .mb { display: inline; }
  .slab { height: auto; min-height: 100svh; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: 50px auto minmax(250px, 1fr) auto 112px; }
  .tag { top: 12px; font-size: 16px; padding: 6px 11px; }
  h1 { position: relative; right: auto; top: auto; width: auto; max-width: none; padding: 6px var(--pad) 0; font-size: clamp(76px, 24vw, 104px); line-height: .82; grid-row: 2; text-shadow: 1px 1px 0 var(--k), 2px 2px 0 var(--k), 3px 3px 0 var(--k); }
  .num { position: relative; left: 0; top: 0; bottom: auto; width: 100%; grid-row: 3; min-height: 250px; }
  .num span { left: 10px; bottom: -.122em; font-size: min(calc(var(--h, 330px) * 1.28), 146vw); text-shadow: 1px 1px 0 var(--k), 2px 2px 0 var(--k), 3px 3px 0 var(--k), 4px 4px 0 var(--k), 5px 5px 0 var(--k), 6px 6px 0 var(--k); }
  .num.long span { font-size: min(calc(var(--h, 330px) * 1.28), 106vw); }
  .line b { font-size: 16px; padding: 7px 10px; }
  .desk { position: relative; right: auto; bottom: auto; width: auto; min-width: 0; max-width: none; grid-template-columns: minmax(0,1fr); padding: 14px var(--pad) 10px; gap: 8px; grid-row: 4; background: var(--k); }
  .say { padding: 0; font-size: 18px; min-height: 24px; } .modes button { flex: 1; padding: 10px 6px; font-size: 17px; background: #3d060b; } .modes button[aria-pressed=true] { background: var(--c); } .modes button:first-child { flex: .6; } .modes button:last-child { flex: .6; }
  .set { padding: 0; gap: 8px; font-size: 16px; flex-wrap: nowrap; width: 100%; } .set input { flex: 1; min-width: 0; width: auto; } .set label { margin-left: 4px; } .set button { min-width: 66px; padding: 8px 10px; }
  .cam canvas { width: 84px; height: 112px; } .cam p { padding: 0; font-size: 16px; }
  .door { position: relative; height: 112px; grid-row: 5; border-top: 3px solid var(--r); } .buy { gap: 14px; } .buy b { font-size: 82px; } .buy span { font-size: 16px; line-height: 1.15; }
  .logh { padding: 44px var(--pad) 16px; gap: 10px; } .logh .key { margin-left: 0; } h2 { font-size: 78px; } .lead { font-size: 19px; } .log canvas { height: 320px; }
  .air h2 { top: 40px; } .air .lead { right: auto; left: var(--pad); top: 196px; } .lung span { font-size: min(72svh, 132vw); }
  .how ol { grid-template-columns: minmax(0,1fr); } .how svg { aspect-ratio: 1.12; } .how p { padding: 14px var(--pad) 30px; }
  .warn { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .num span, .num.beat span { transition: none; transform: none; } .door.no .buy { animation: none; } }
