/* Base reset (the Claude artifact viewer supplied this; the real page needs it). */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* Layout: one chunky toy-like recorder card: big Record button, waveform window, voice chips, play buttons. */
:root {
  --bg: #D9F0FF;
  --panel: #FFFFFF;
  --ink: #1B2340;
  --muted: #56607E;
  --line: #C3D6E8;
  --wave: #3B4670;
  --rec: #F0432F;
  --rev: #6A3FD3;
  --on-color: #FFFFFF;
  --chip: #FFF3C4;
  --chip-on: #FFC632;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1630; --panel: #18234A; --ink: #EEF1FF; --muted: #A5AED0; --line: #2D3A6B;
    --wave: #C7CEF0; --rec: #FF6655; --rev: #A88CFF; --on-color: #10142A;
    --chip: #263266; --chip-on: #FFD25E; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1630; --panel: #18234A; --ink: #EEF1FF; --muted: #A5AED0; --line: #2D3A6B;
  --wave: #C7CEF0; --rec: #FF6655; --rev: #A88CFF; --on-color: #10142A;
  --chip: #263266; --chip-on: #FFD25E; color-scheme: dark;
}
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
.wrap {
  max-width: 620px; margin: 0 auto;
  padding-block: 32px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 18px;
}
header { text-align: center; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1; letter-spacing: -0.01em; margin: 0; }
h1 .nw { white-space: nowrap; }
h1 .bang { display: inline-block; color: var(--rec); transform: rotate(10deg); }
.lede { margin: 8px 0 0; color: var(--muted); font-size: 1.1rem; font-weight: 700; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 16px; box-shadow: 0 6px 0 var(--line); }
.readout { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--line); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pill[data-state="rec"] { color: var(--rec); border-color: var(--rec); }
.pill[data-state="rev"] { color: var(--rev); border-color: var(--rev); }
.pill[data-state="fwd"] { color: var(--ink); border-color: var(--ink); }
.window { border-radius: 14px; background: var(--bg); overflow: hidden; }
canvas { display: block; width: 100%; height: 130px; }
.clock { font-size: 1.7rem; text-align: center; margin-top: -6px; }
.btn {
  appearance: none; font: inherit; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; cursor: pointer;
  min-height: 60px; padding: 10px 16px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--panel); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 0 var(--line); transition: transform .06s ease, box-shadow .06s ease;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn:focus-visible, .link:focus-visible, .chip:focus-visible { outline: 3px solid var(--rev); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.rec { width: 100%; min-height: 72px; font-size: 1.45rem; background: var(--rec); border-color: var(--rec); color: var(--on-color); box-shadow: 0 5px 0 color-mix(in srgb, var(--rec) 60%, var(--ink)); }
.btn.rec .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--on-color); }
.btn.rec[aria-pressed="true"] .dot { border-radius: 3px; animation: blink 1s steps(2) infinite; }
.play { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn.rev { background: var(--rev); border-color: var(--rev); color: var(--on-color); box-shadow: 0 4px 0 color-mix(in srgb, var(--rev) 60%, var(--ink)); }
.btn.loud { width: 100%; min-height: 52px; font-size: 1.05rem; background: var(--chip); border-color: var(--line); }
.btn.loud[aria-pressed="true"] { background: var(--chip-on); border-color: var(--ink); color: #1B2340; }
.voices h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  appearance: none; font: inherit; cursor: pointer; border-radius: 14px; border: 2px solid transparent;
  background: var(--chip); color: var(--ink); padding: 8px 6px; min-height: 64px;
  display: grid; justify-items: center; align-content: center; gap: 0; text-align: center;
}
.chip .ico { font-size: 1.5rem; line-height: 1.2; }
.chip .name { font-weight: 800; font-size: 0.95rem; }
.chip .how { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.chip[aria-checked="true"] { background: var(--chip-on); border-color: var(--ink); color: #1B2340; }
.chip[aria-checked="true"] .how { color: #3A4260; }
.secondary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.95rem; }
.link { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--rev); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.note { margin: 0; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--rec); font-size: 0.95rem; }
.tips { color: var(--muted); font-size: 0.95rem; margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.back { justify-self: center; color: var(--rev); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
@keyframes blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .btn.rec[aria-pressed="true"] .dot { animation: none; } .btn { transition: none; } }
@media (max-width: 380px) { .chips { grid-template-columns: repeat(2, 1fr); } }
