* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
a { color: inherit; }

.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 18px 24px calc(24px + env(safe-area-inset-bottom)); }
.paper { background: var(--paper); color: var(--ink); }
.ink { background: var(--ink); color: var(--paper); }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: inherit; text-decoration: none; }
.brand::before { content: ''; width: 20px; height: 20px; background: currentColor; -webkit-mask: url(/icons/mark.svg) center / contain no-repeat; mask: url(/icons/mark.svg) center / contain no-repeat; }
.title { margin: 0; font-weight: 900; font-stretch: 62%; font-size: clamp(64px, 22vw, 120px); line-height: .84; text-transform: uppercase; letter-spacing: -0.01em; }
.note { margin: 0; font: 500 11px/1.4 var(--mono); color: var(--mute); }
.ink .note { color: var(--soft); }
.link { all: unset; cursor: pointer; font: 500 13px/1 var(--mono); text-decoration: underline; text-underline-offset: 4px; padding: 6px 0; }
.link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }

.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: var(--tap); height: var(--tap); padding: 0 12px; border: 2px solid var(--line); font: 700 11px/1 var(--mono); text-transform: uppercase; -webkit-tap-highlight-color: transparent; user-select: none; }
.btn:hover { border-color: var(--soft); }
.btn:active { background: rgba(255,255,255,.12); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[aria-pressed="true"], .btn.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.solid:hover { background: var(--accent); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.paper .btn { border-color: var(--ink); }
.paper .btn:hover { background: rgba(0,0,0,.06); }

select.sel { font: 700 11px/1 var(--mono); height: var(--tap); padding: 0 10px; background: transparent; color: inherit; border: 2px solid currentColor; border-radius: 0; }
select.sel option { color: #0b0b0a; background: #fff; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: var(--tap); margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--soft); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 22px; margin-top: -10px; background: var(--paper); border: 0; border-radius: 0; }
input[type=range]::-moz-range-track { height: 2px; background: var(--soft); }
input[type=range]::-moz-range-thumb { width: 18px; height: 22px; background: var(--paper); border: 0; border-radius: 0; }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.toast { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; max-width: 560px; margin: 0 auto; padding: 12px 14px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font: 500 13px/1.45 var(--mono); }
.toast.err { background: var(--rec); color: #1a0500; border-color: #1a0500; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
