:root {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    color: #1d1d1f; background: #f5f5f7; font-synthesis: none;
    text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
.practice-page { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 34px; }
.practice-heading { margin: 0 0 28px; }
.eyebrow { margin: 0 0 14px; color: #6e6e73; font-size: 11px; font-weight: 650; letter-spacing: 1.4px; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 58px); line-height: 1.02; letter-spacing: -1.7px; font-weight: 650; }
.practice-heading .practice-intro { max-width: 660px; margin: 16px 0 0; color: #515154; font-size: 17px; line-height: 1.5; }
.practice-help { max-width: 660px; margin-top: 10px; }
.practice-help p { margin: 9px 0 0; color: #6e6e73; font-size: 13px; line-height: 1.6; }
.quota-note { display: inline-block; margin: -14px 0 15px; color: #6e6e73; font-size: 11px; text-decoration: none; }
.quota-note[href^="/login"] { color: #007aff; }
.setup { display: grid; gap: 16px; }
.setup label { flex: 1 1 190px; min-width: 0; color: #515154; font-size: 11px; font-weight: 600; }
select, button, textarea { font: inherit; border: 1px solid #e5e5ea; border-radius: 12px; background: #fff; color: #1d1d1f; }
select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; }
button { min-height: 42px; padding: 0 16px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; }
button.primary { border-color: transparent; background: #007aff; color: #fff; }
button.primary:hover { background: #0066d6; }
button:not(.primary):hover { background: #f5f5f7; }
button:disabled, textarea:disabled { opacity: .45; cursor: default; }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #007aff40; outline-offset: 2px; }
.conversation { margin-top: 18px; padding: 24px; border: 1px solid #fff; border-radius: 24px; background: #ffffffeb; box-shadow: 0 14px 44px #1d1d1f0b; backdrop-filter: blur(18px); }
.conversation-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.conversation-heading p { margin: 0 0 5px; color: #8e8e93; font-size: 11px; }
.conversation-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #6e6e73; font-size: 11px; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #a1a1a6; }
.conversation[data-state="recording"] .live-indicator i { background: #ff453a; }
#messages { min-height: 210px; max-height: 38vh; overflow-y: auto; padding: 22px 0 6px; scroll-behavior: smooth; }
.empty { margin: 64px 0; text-align: center; color: #aeaeb2; font-size: 13px; }
.message { max-width: 86%; margin: 0 0 10px; padding: 11px 14px; border-radius: 17px; background: #f2f2f7; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message strong { display: block; margin-bottom: 4px; color: #8e8e93; font-size: 9px; letter-spacing: .8px; }
.message.controller { margin-left: auto; background: #eaf2ff; }
.message.notice { max-width: none; background: transparent; color: #8e8e93; text-align: center; font-size: 11px; }
.voice-controls { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 410px; padding: 40px 12px 24px; }
.radio-link { display: flex; align-items: flex-start; justify-content: center; width: 100%; gap: 24px; margin: 6px 0 16px; }
.radio-endpoint { display: grid; justify-items: center; gap: 7px; min-width: 86px; color: #86868b; }
.radio-icon { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 28px; background: linear-gradient(145deg, #fff, #f0f2f7); border: 1px solid #e9ecf2; box-shadow: 0 8px 24px #1d1d1f05; transition: background .3s, color .3s, box-shadow .3s; }
.radio-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.radio-endpoint > span { margin-top: 5px; font-size: 13px; font-weight: 600; color: #515154; }
.radio-endpoint small { font-size: 10px; }
.radio-signal { display: flex; align-items: center; justify-content: center; gap: 5px; height: 92px; }
.radio-signal i { width: 3px; height: 5px; border-radius: 4px; background: #d8dee8; }
.voice-controls[data-state="speaking"] .captain-endpoint .radio-icon { color: #239780; background: #eaf8f3; box-shadow: 0 0 0 7px #2397800a, 0 12px 32px #23978012; animation: pulse 1.8s infinite; }
.voice-controls[data-state="recording"] .controller-endpoint .radio-icon { color: #007aff; background: #eaf2ff; box-shadow: 0 0 0 7px #007aff0a; animation: pulse 1.5s infinite; }
.voice-controls[data-state="speaking"] .radio-signal i, .voice-controls[data-state="recording"] .radio-signal i { background: #78aee6; animation: radio-wave .8s ease-in-out infinite alternate; }
.radio-signal i:nth-child(2), .radio-signal i:nth-child(4) { animation-delay: -.3s !important; }
.radio-signal i:nth-child(3) { animation-delay: -.6s !important; }
.voice-controls[data-state="processing"] .radio-signal i { background: #9aabc1; animation: pulse 1.5s infinite; }
@keyframes radio-wave { from { height: 5px; } to { height: 24px; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 15px #007aff0c; } }
#status { min-height: 16px; margin: 1px 0; color: #6e6e73; font-size: 11px; }
#status:empty { display: none; }
#practice-menu { display: none; }
#reset { min-height: 44px; border: 0; background: transparent; color: #86868b; font-size: 11px; font-weight: 400; }
#end { min-height: 44px; border: 0; background: transparent; color: #c34d48; font-size: 12px; }
#listen { min-width: 170px; border: 0; border-radius: 24px; background: #007aff; color: #fff; }
#listen:hover { background: #0066d6; }
#listen:disabled { opacity: .4; }
.voice-hint { margin: 0; color: #8e8e93; font-size: 10px; }
.voice-hint span { display: block; margin-top: 5px; text-align: center; }
#voice-state { margin: 0; font-size: 20px; font-weight: 600; }
#begin, #listen { min-width: 210px; min-height: 52px; border-radius: 28px; }
[hidden] { display: none !important; }
#playback:not([controls]) { display: none; }
.picker-dialog { width: min(440px, calc(100% - 32px)); max-height: 80dvh; padding: 24px; border: 0; border-radius: 26px; background: #fafafcec; box-shadow: 0 24px 80px #0002; backdrop-filter: blur(24px); }
.picker-dialog::backdrop { background: #17172540; backdrop-filter: blur(4px); }
.picker-options { display: grid; gap: 8px; }
.picker-options button { min-height: 52px; text-align: left; white-space: normal; line-height: 1.4; }
.picker-options button[aria-pressed="true"] { border-color: #007aff; color: #007aff; background: #eaf2ff; }
.picker-options button[aria-pressed="true"]::after { content: ' ✓'; }
.sheet-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 15px; }
.sheet-heading h2 { margin: 0; font-size: 20px; }
.sheet-heading button { border: 0; background: #f2f2f7; color: #007aff; }
.practice-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.selection-card { min-width: 0; padding: 15px 16px; text-align: left; white-space: normal; background: #f5f7fb; border: 1px solid #e5eaf3; border-radius: 17px; }
.selection-card:hover { border-color: #a8caff; background: #eef4ff !important; }
.selection-title { display: flex; justify-content: space-between; align-items: center; color: #007aff; font-size: 12px; font-weight: 600; }
.selection-title > span { font-size: 18px; }
.selection-value { display: block; margin-top: 6px; color: #1d1d1f; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.selection-hint { margin: 10px 0 0; text-align: center; font-size: 11px; color: #86868b; }
.transcript-panel { border-top: 1px solid #f0f0f2; margin-top: 8px; }
.transcript-panel > summary { min-height: 44px; padding: 14px 0; text-align: center; font-size: 11px; color: #86868b; }
.transcript-panel #messages { min-height: 0; max-height: 280px; padding: 8px 0 0; }
.transcript-empty { text-align: center; color: #86868b; font-size: 12px; }
.text-fallback { margin-top: 14px; padding-top: 13px; border-top: 1px solid #f0f0f2; }
summary { cursor: pointer; color: #6e6e73; font-size: 12px; }
.text-fallback form { padding-top: 12px; }
.text-fallback label { display: block; color: #6e6e73; font-size: 11px; }
textarea { width: 100%; min-height: 72px; margin: 7px 0 10px; padding: 11px 12px; resize: vertical; line-height: 1.5; }
#playback { display: block; width: 100%; margin-top: 10px; }
#playback[hidden] { display: none; }
.privacy-note { max-width: 720px; margin: 14px 2px 0; color: #8e8e93; font-size: 10px; line-height: 1.5; }
@media (max-width: 600px) {
    body .site-header.public-header { min-height: 58px; padding: 8px 18px; gap: 10px; }
    body .site-header.public-header nav { display: none; }
    body .site-header.public-header.menu-open nav { display: flex; order: 3; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 8px; }
    .public-header.menu-open nav > a, .public-header.menu-open .nav-link { min-height: 44px; padding: 12px; text-align: left; }
    #practice-menu { display: block; margin-left: auto; color: #007aff; border: 0; background: #f2f2f7; min-height: 44px; }
    .practice-page { width: calc(100% - 28px); padding-top: 20px; }
    h1 { font-size: clamp(25px, 7.5vw, 30px); letter-spacing: -.8px; }
    .practice-heading .practice-intro { font-size: 14px; margin-top: 10px; }
    .practice-heading { margin-bottom: 20px; }
    .voice-controls { min-height: 320px; padding: 24px 4px 4px; gap: 12px; }
    .radio-link { gap: 14px; margin-bottom: 12px; }
    .radio-icon { width: 80px; height: 80px; border-radius: 24px; }
    .radio-signal { height: 80px; gap: 4px; }
    #voice-state { font-size: 18px; text-align: center; }
    #begin, #listen { width: 100%; max-width: 300px; min-height: 56px; }
    #status { text-align: center; line-height: 1.5; }
    .voice-hint span { display: none; }
    .picker-dialog { width: 100%; max-width: 100%; max-height: 85dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
    .setup { gap: 9px; padding: 12px; }
    .setup label { flex-basis: 100%; }
    .setup button { flex: 1; }
    .conversation { padding: 17px; border-radius: 20px; }
    .practice-selectors { gap: 8px; }
    .selection-card { padding: 12px; }
    .selection-value { font-size: 12px; }
    #messages { max-height: 42vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto; } }
