:root {
  color-scheme: dark;
  --canvas: #000000;
  --surface: #1c1c1e;
  --raised: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #303033;
  --danger: #e36565;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }
button, input, select, summary { touch-action: manipulation; }
button { min-height: 52px; padding: 14px 22px; border: 0; border-radius: 28px; font-weight: 550; cursor: pointer; transition: background 160ms, transform 160ms, opacity 160ms; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .42; cursor: not-allowed; }
:where(button, input, select, summary, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
h1:focus { outline: none; }
input:not([type=checkbox]), select { width: 100%; min-width: 0; min-height: 56px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); color: var(--ink); }
input::placeholder { color: var(--muted); opacity: 1; }
label { display: block; font-size: 15px; margin-bottom: 10px; }
form > .primary { width: 100%; margin-top: 16px; }
.primary { background: var(--ink); color: var(--canvas); }
.primary:hover:not(:disabled) { background: #dcdce0; }
.secondary { background: var(--surface); color: var(--ink); }
.secondary:hover:not(:disabled) { background: var(--raised); }
.danger { background: #a92e37; color: #ffffff; }
.text-button { background: transparent; color: var(--muted); padding: 12px 0; text-align: left; min-height: 44px; font-size: 14px; font-weight: 400; }
.text-button:hover:not(:disabled) { color: var(--ink); }
.destructive { color: var(--danger); }
.masthead { max-width: 1080px; margin: auto; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-size: 30px; font-weight: 550; letter-spacing: -1.8px; line-height: 44px; text-decoration: none; }
.beta { font-size: 12px; color: var(--muted); }
main { width: 100%; max-width: 464px; margin: 34px auto 48px; padding: 0 24px; min-height: calc(100svh - 240px); }
h1 { font-size: clamp(32px, 8vw, 40px); font-weight: 450; letter-spacing: -1.6px; line-height: 1.13; margin: 0 0 12px; }
h2 { font-size: 23px; font-weight: 500; letter-spacing: -.6px; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 17px; font-weight: 500; margin: 0 0 12px; }
p { margin: 0 0 20px; color: var(--muted); }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 550; }
.greeting { font-size: 14px; margin-bottom: 14px; }
.intro { margin-bottom: 26px; }
#journey-subtitle { font-size: 15px; }
.fine, .hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.hint { margin: 10px 0 16px; }
.fine { margin-top: 14px; }
.steps { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0 0 28px; }
.steps li { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.steps span { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 11px; }
.steps [aria-current=step] { color: var(--ink); }
.steps [aria-current=step] span { color: var(--canvas); background: var(--ink); }
.steps .complete span { box-shadow: inset 0 0 0 1px var(--muted); }
.consent-copy { margin: 24px 0 16px; font-size: 14px; }
.consent-copy p { margin-bottom: 8px; }
.consent-copy details { border: 0; padding: 0; margin: 0; }
.consent-copy summary { font-size: 13px; min-height: 44px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 14px; line-height: 1.5; margin: 0; padding: 6px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.inset { background: var(--surface); border-radius: 20px; padding: 22px; margin: 24px 0; }
.inset h2 { font-size: 21px; }
.inset p { font-size: 14px; }
.code-panel { text-align: center; padding: 12px 0 24px; }
.code-panel > p:first-child { font-size: 14px; margin-bottom: 14px; }
#pair-code { display: block; font-size: clamp(32px, 9vw, 42px); font-weight: 450; line-height: 1.2; letter-spacing: 4px; font-variant-numeric: tabular-nums; margin: 0 0 24px; white-space: nowrap; }
#copy-code { min-width: 180px; }
#code-expiry { font-size: 12px; }
.instructions { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.instructions li { padding-left: 7px; margin-bottom: 12px; }
.pair-help { margin-top: 12px; }
details { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 6px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; min-height: 48px; font-size: 14px; color: var(--muted); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 19px; font-weight: 300; flex: none; }
details[open] > summary::after { content: '−'; }
details > p { font-size: 14px; margin: 10px 0 16px; }
details label { margin-top: 12px; }
.back { margin: -14px 0 14px; }
.back::before { content: '‹'; display: inline-block; margin-right: 10px; font-size: 20px; vertical-align: -1px; }
#connection-review > .primary { width: 100%; }
.screen-note { margin-top: 26px; font-size: 12px; }
.screen-note > p { margin-bottom: 0; }
.screen-note details { margin: 0; padding: 0; border: 0; }
.screen-note summary { font-size: 12px; min-height: 44px; }
.account { margin-top: 8px; }
.account button { display: block; }
.notice { padding: 18px 20px; margin-bottom: 28px; background: var(--surface); border-left: 2px solid var(--danger); border-radius: 0 14px 14px 0; font-size: 14px; overflow-wrap: anywhere; }
.notice[data-tone=info] { border-color: var(--muted); }
.phone-symbol { width: 82px; height: 82px; margin: 18px auto 34px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.phone-symbol svg { width: 34px; height: 34px; }
.handset { width: 22px; height: 22px; flex: none; }
#call-form { text-align: center; }
#call-form > label { font-size: 20px; font-weight: 400; letter-spacing: -.4px; }
#recipient { text-align: center; font-size: 17px; }
#recipient-hint { text-align: center; font-size: 12px; }
.call-button { display: flex; justify-content: center; align-items: center; gap: 14px; }
.quiet-caption { font-size: 12px; margin-top: 16px; }
.call-surface { text-align: center; padding: 12px 0 8px; }
.call-status { font-size: 14px; margin-bottom: 12px; }
.peer { font-size: 36px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 400; overflow-wrap: anywhere; }
.caller-symbol { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); margin: 36px auto 48px; position: relative; }
.caller-symbol::before { content: ''; position: absolute; left: 47px; top: 27px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--muted); }
.caller-symbol::after { content: ''; position: absolute; left: 31px; top: 69px; width: 66px; height: 31px; border: 1.5px solid var(--muted); border-radius: 36px 36px 12px 12px; }
.button-row { display: flex; gap: 14px; }
.button-row > * { flex: 1; min-width: 0; }
.call-controls button { min-height: 72px; border-radius: 24px; padding: 16px 12px; font-size: 14px; }
#mute[aria-pressed=true] { background: var(--ink); color: var(--canvas); }
#retest { width: 100%; }
.sound-symbol { height: 94px; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 18px 0 24px; }
.sound-symbol span { width: 5px; height: 26px; background: var(--ink); border-radius: 5px; }
.sound-symbol span:nth-child(2), .sound-symbol span:nth-child(4) { height: 48px; }
.sound-symbol span:nth-child(3) { height: 72px; }
#sound-description { text-align: center; font-size: 15px; }
#member[data-audio=test] .sound-symbol { height: 56px; margin: 12px 0 20px; }
#member[data-audio=test] #sound-description { display: none; }
#play-recovery { margin: 0 0 18px; padding: 16px; border-radius: 18px; background: var(--surface); }
#play-recovery p { margin: 0; }
#play-recovery:not([hidden]) + #heard:disabled { display: none; }
#test-start, #heard, #test-stop { width: 100%; }
#test-stop { margin-top: 12px; }
.test-prompt { text-align: center; font-size: 20px; color: var(--ink); }
.transport { margin-top: 22px; }
#transport-state { font-size: 13px; }
#play-audio { width: 100%; margin-top: 10px; }
.flow { list-style: none; padding: 0; margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.flow li { padding: 4px 0; overflow-wrap: anywhere; }
.flow li[data-ok=true] { color: var(--ink); }
.list-heading { font-size: 20px; margin: 34px 0 4px; }
.person { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--line); }
.person > div { min-width: 0; }
.person strong, .person p { overflow-wrap: anywhere; }
.person p { font-size: 13px; margin-top: 6px; }
.person button { min-height: 44px; font-size: 13px; padding: 10px 16px; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#invite-url { font-size: 13px; }
#copy-invite { margin-top: 12px; }
footer { max-width: 464px; padding: 0 24px max(28px, env(safe-area-inset-bottom)); margin: auto; color: var(--muted); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body:not([data-view=call]) #greeting { display: none; }
body[data-view=call] .intro { margin-bottom: 18px; }
body[data-view=incoming] .intro, body[data-view=active] .intro { display: none; }
body[data-view=incoming] main, body[data-view=active] main { margin-top: 24px; }
@media (max-width: 480px) {
  .masthead { padding: 18px 24px; }
  main { margin-top: 22px; }
  .intro { margin-bottom: 24px; }
}
@media (max-width: 374px) {
  .masthead { padding-right: 20px; padding-left: 20px; }
  main, footer { padding-right: 20px; padding-left: 20px; }
  .steps { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
