main{max-width:920px;padding-bottom:max(20px,env(safe-area-inset-bottom))}
.panel{padding:24px;margin-bottom:18px}.background-panel summary{font-size:18px;cursor:pointer;min-height:36px}.background-panel summary span{font-size:12px;color:var(--muted);margin-left:8px}.background-panel .muted{font-size:13px;margin:10px 0 12px}.background-panel textarea{min-height:115px;line-height:1.75;margin-top:12px}.upload-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.upload-row label{margin:0;font-size:13px;cursor:pointer}.upload-row .microcopy{margin:0;max-width:300px}.upload-row:focus-within .upload-button{outline:2px solid var(--blue);outline-offset:3px}.start-actions{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap}.start-actions .button{flex:1}.privacy{font-size:11px;margin-bottom:0}.microcopy,.privacy,.notice{overflow-wrap:anywhere}.microcopy:empty{display:none}
.conversation-panel{overflow:visible}.call-stage{padding:12px 0 6px}.orb{height:76px;width:76px;margin:10px auto 20px;box-shadow:0 0 0 7px #f7f8ef}.wave{transform:scale(.7)}.call-stage h2{font-size:24px;margin:8px 0}.call-stage .muted{margin-bottom:14px;font-size:14px}.call-buttons{flex-wrap:wrap}.assist-actions{margin:12px 0}.assist-actions button{font-size:12px;min-height:40px}.message-form input{min-width:0}.message-form{margin-top:16px}.message-form .button{min-height:44px}
.transcript-head{border:0;padding:0;gap:12px}.transcript-head h2{font-size:20px;margin:0}.transcript-head .text-button{font-size:12px;min-height:44px}.transcript-panel>.microcopy{margin-top:5px}.transcript{height:auto;max-height:520px;min-height:90px;font-size:15px;overflow:auto;scroll-behavior:auto}.turn{padding:14px 16px;margin:12px 32px 12px 0;line-height:1.8}.turn.user{margin:12px 0 12px 32px}.turn strong{display:flex;justify-content:space-between;font-size:10px}.turn time{font-variant-numeric:tabular-nums}.turn p{margin:4px 0 0}.turn.control{background:transparent;border:1px dashed var(--line);font-size:12px;color:var(--muted)}.empty{font-size:13px}
.summary-panel{background:var(--surface-soft)}.summary-panel[aria-busy=true]{opacity:.8}.summary-overview{font-size:16px;line-height:1.8}.summary-topics{display:flex;flex-wrap:wrap;gap:8px;padding:0;list-style:none}.summary-topics li{padding:6px 12px;border:1px solid var(--line);border-radius:20px;font-size:12px;background:var(--surface)}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.review-section{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0;overflow-wrap:anywhere}.review-section h3{font-size:16px;margin:0 0 10px}.review-section p,.review-section li{font-size:14px;line-height:1.85}.review-section ul{padding-left:20px}.review-section blockquote{border-left:3px solid var(--blue);padding-left:12px;margin:12px 0;color:var(--muted);font-size:13px;line-height:1.8;white-space:pre-wrap}.review-next{margin-top:14px}.session-history>summary{cursor:pointer;font-size:14px;min-height:36px}.history-session{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.history-session>summary{cursor:pointer;font-size:14px;min-height:36px}.history-session .transcript{max-height:360px}.close-button{min-width:44px;min-height:44px}#summary-content,#history-content{overflow-wrap:anywhere}
@media(max-width:760px){main{padding:24px 14px max(18px,env(safe-area-inset-bottom))}.intro{margin-bottom:18px}.intro h1{font-size:29px;line-height:1.3}.intro .eyebrow{font-size:10px}.subtitle{font-size:14px;line-height:1.75}.intro>.button{min-height:44px;font-size:13px;margin-top:14px}.notice{font-size:13px;margin-bottom:16px}.panel{padding:20px 16px;border-radius:14px;margin-bottom:16px}input,textarea,select{font-size:16px;min-height:48px}::placeholder{font-size:14px}label{font-size:13px}.button{min-height:48px;font-size:14px}.start-actions{gap:8px}.start-actions .button{flex:1 1 100%;justify-content:center}.upload-row .microcopy{font-size:11px}.background-panel textarea{min-height:120px}.microcopy,.privacy{font-size:12px;line-height:1.7}.call-stage h2{font-size:23px}.assist-actions{gap:6px}.assist-actions button{flex:1;min-height:44px;font-size:12px;padding:8px}.message-form{gap:6px}.message-form .button{min-height:48px;font-size:14px}.transcript{max-height:60dvh;font-size:15px}.transcript-head{align-items:flex-start}.transcript-head h2{font-size:19px;padding-top:10px}.turn{margin-right:16px;padding:12px}.turn.user{margin-left:16px}.summary-grid{grid-template-columns:1fr}.review-section{padding:16px}.summary-overview{font-size:15px}.two-fields{grid-template-columns:1fr}dialog{width:calc(100% - 24px);max-height:calc(100dvh - 32px);padding:20px 16px}.dialog-heading h2{font-size:23px}.dialog-actions .button{width:100%}footer{flex-direction:column;gap:8px;font-size:11px;line-height:1.6}.timer{font-size:12px}}
@media(max-width:370px){.intro h1{font-size:27px}.transcript-head{flex-wrap:wrap}}

.background-panel h2{margin:0 0 12px;font-size:20px}.background-panel textarea{min-height:170px;margin-top:0}.background-upload{margin-top:12px}.background-upload>summary{font-size:12px;color:var(--blue);min-height:32px}.background-upload input{margin-top:8px}.start-actions{display:grid;grid-template-columns:1fr 1fr;align-items:stretch}.start-actions .button{min-width:0;gap:6px}.conversation-panel,.summary-panel{scroll-margin-top:16px}
@media(max-width:760px){.start-actions .button{font-size:12px;padding:10px 8px;line-height:1.5}.background-panel textarea{min-height:150px}.background-upload>summary{font-size:13px}}

/* A dedicated live view keeps the speaker and conversation in one screen. */
.live-workspace{min-width:0}.chat-focused .intro,.chat-focused .background-panel,.chat-focused #notice:not(.error){display:none}.chat-focused{max-width:1000px;padding-top:12px}.chat-focused .live-workspace{display:flex;flex-direction:column;height:calc(100dvh - 112px);min-height:440px;gap:12px}.chat-focused .conversation-panel{flex:0 0 auto;margin:0;padding:10px 20px;border:0;background:transparent}.chat-focused .conversation-panel .section-label{position:absolute;right:20px;top:14px}.chat-focused .conversation-panel{position:relative}.chat-focused .section-label>span:first-child,.chat-focused .call-stage h2,.chat-focused .assist-actions,.chat-focused #mic-device{display:none}.chat-focused .call-stage{padding:2px 0}.chat-focused .call-stage .muted{font-size:12px;line-height:1.5;margin:7px 0 10px}.chat-focused #mic-monitor .microcopy{margin:5px 0;font-size:11px}.chat-focused .call-buttons .button{min-height:38px;padding:8px 18px;font-size:12px}.chat-focused .transcript-panel{flex:1;min-height:0;display:flex;flex-direction:column;margin:0;padding:16px 20px}.chat-focused .transcript-panel>.microcopy{display:none}.chat-focused .transcript{flex:1;min-height:0;max-height:none;margin:8px 0}.chat-focused .transcript-head{flex-shrink:0}.chat-focused .transcript-head h2{font-size:16px;padding:0}.chat-focused .transcript-head .text-button{min-height:32px}.chat-focused .message-form{flex-shrink:0;margin-top:8px}.chat-focused .summary-panel{margin-top:20px}.chat-focused footer{padding-top:16px}
.orb{position:relative;isolation:isolate;overflow:visible;background:radial-gradient(circle at 32% 24%,#ffffffdd 0%,#b3dfe7 24%,#8c9bd0 52%,#556ca0 80%);border:1px solid #ffffff99;box-shadow:inset -9px -9px 18px #42578966,inset 5px 5px 16px #ffffffbb,0 5px 22px #7a9fc333;transition:background .4s,box-shadow .4s,transform .4s}.orb .wave{display:none}.orb::before{content:'';position:absolute;inset:-9px;border-radius:50%;z-index:-1;background:conic-gradient(from 0deg,#6ce1dc,#8184f7,#e4a0df,#ffc998,#6ce1dc);filter:blur(12px);opacity:.2;transition:opacity .4s}.orb::after{content:'';position:absolute;inset:4px;border-radius:50%;background:radial-gradient(ellipse at 30% 23%,#fff9,transparent 43%);pointer-events:none}.orb.speaking{background:radial-gradient(circle at 30% 22%,#ffffffee,#94ebe2 22%,#9d8fe8 52%,#db9dcb 78%,#7f90bd);animation:voice-breathe 1.8s ease-in-out infinite;box-shadow:inset -8px -8px 18px #6c65a455,0 0 30px #aaa2ef66}.orb.speaking::before{opacity:.8;animation:voice-colors 5s linear infinite}.orb.listening::before{opacity:.28}.orb.listening{background:radial-gradient(circle at 30% 22%,#fff,#ace8df 27%,#80b9ca 60%,#7394b3)}.chat-focused .orb{width:68px;height:68px;margin:4px auto 12px}.orb.connecting::before{animation:voice-colors 6s linear infinite;opacity:.45}
@keyframes voice-breathe{0%,100%{transform:scale(.96)}50%{transform:scale(1.05)}}@keyframes voice-colors{to{transform:rotate(360deg)}}
@media(max-width:760px){.chat-focused{padding:8px 10px max(12px,env(safe-area-inset-bottom))}.chat-focused .live-workspace{height:calc(100dvh - 92px);min-height:400px;gap:8px}.chat-focused .conversation-panel{padding:8px 10px}.chat-focused .orb{width:60px;height:60px;margin:4px auto 10px}.chat-focused .transcript-panel{padding:12px}.chat-focused .call-buttons .button{min-height:44px;padding:8px 14px}.chat-focused .transcript-head{align-items:center;flex-wrap:nowrap}.chat-focused .transcript-head .text-button{font-size:10px}.chat-focused .turn{font-size:15px}.chat-focused .conversation-panel .section-label{right:8px;top:8px}}
@media(prefers-reduced-motion:reduce){.orb,.orb::before{animation:none!important;transition:none}.orb.speaking::before{opacity:.7}}

/* Live microphone feedback remains visible below the voice orb. */
#mic-monitor{margin:8px auto 12px;max-width:220px}#mic-level{display:block;width:100%;height:12px;border:0;border-radius:999px;overflow:hidden;appearance:none;background:var(--line)}#mic-level::-webkit-meter-bar{height:12px;background:var(--line);border:0;border-radius:999px;box-shadow:inset 0 1px 2px #0f172a10}#mic-level::-webkit-meter-optimum-value{background:linear-gradient(90deg,var(--blue),#38bdf8);border-radius:999px;transition:width 80ms linear}#mic-level::-moz-meter-bar{background:linear-gradient(90deg,var(--blue),#38bdf8);border-radius:999px}.chat-focused #mic-monitor .microcopy{margin:5px 0 0}@media(max-width:760px){#mic-monitor{max-width:180px;margin:6px auto 10px}}@media(prefers-reduced-motion:reduce){#mic-level::-webkit-meter-optimum-value{transition:none}}

.live-settings{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;max-width:400px;margin:10px auto 0;text-align:left}.live-settings label{font-size:11px;margin:0 0 4px}.live-settings select{padding:7px 10px;min-height:38px;font-size:12px}.live-settings>p{grid-column:1/-1;font-size:11px;line-height:1.5;margin:0;text-align:center;color:var(--muted)}.live-settings>p:empty{display:none}@media(max-width:760px){.live-settings{margin-top:8px;gap:5px 8px}.live-settings select{font-size:16px;min-height:44px;padding:6px}.chat-focused .orb{width:52px;height:52px}.chat-focused .call-stage .muted{margin:5px 0}.chat-focused #mic-monitor{margin:5px auto 8px}}

.practice-notice{display:grid;gap:5px;margin:12px 0 16px;padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:13px;line-height:1.75}.practice-notice strong{color:var(--ink);font-size:13px}

/* Public Speaking uses the shared MapKAI palette; audio layout stays local. */
body[data-mapkai-page="speaking"]{--green:var(--blue);color:var(--ink);background:var(--paper);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI","PingFang SC",sans-serif;line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:inherit;color:var(--ink)}h1{font-size:clamp(30px,4vw,40px);font-weight:650;letter-spacing:-.035em;line-height:1.25}h2{font-weight:600}a{color:var(--blue)}


.eyebrow,.section-label,.timer,.microcopy,.privacy,footer{color:var(--muted)}.eyebrow{font-size:11px;letter-spacing:.12em}.subtitle{font-size:15px}.intro>.button{flex-shrink:0}
.button{border-radius:8px;font-weight:550}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:var(--blue-dark);border-color:var(--blue-dark)}.secondary{background:var(--surface);border-color:var(--line);color:var(--ink)}.secondary:hover{background:var(--surface-soft)}.danger{background:var(--surface);border-color:#dc26264d;color:#c24135}.danger:hover{background:#dc26260d}
button:focus-visible,a:focus-visible{outline:2px solid var(--blue);outline-offset:4px}.panel{background:var(--surface);border-color:var(--line);border-radius:12px}.notice,.notice.ready{background:var(--surface-soft);border-color:var(--line);color:var(--muted)}.notice.error{background:#c2413510;border-color:#c2413533;color:#b84034}
label{color:var(--ink);font-size:12px}input,textarea,select,.message-form input{background:var(--surface);border-color:var(--line);color:var(--ink)}input:focus,textarea:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 3px #2563eb16}::placeholder{color:var(--muted)}.text-button{color:var(--blue)}.text-button:hover{color:var(--blue-dark)}
.assist-actions button{background:var(--surface);border-color:var(--line);color:var(--muted);border-radius:8px}.assist-actions button:hover:not(:disabled){color:var(--blue);border-color:var(--blue)}.turn{background:var(--surface-soft);border:1px solid transparent}.turn.user{background:#2563eb0d;border-color:#2563eb14}.turn strong{color:var(--muted);letter-spacing:.04em}.empty{color:var(--muted)}.orb.listening{border-color:#ffffff99}
footer{border-top:1px solid var(--line);margin-top:28px;padding-top:22px}dialog{color:var(--ink);background:var(--surface);border-radius:12px}dialog::backdrop{background:#0f172a66;backdrop-filter:blur(3px)}.close-button{color:var(--muted)}.error{color:#b84034!important}.background-upload input::file-selector-button{border:1px solid var(--line);border-radius:6px;padding:7px 10px;margin-right:10px;background:var(--surface-soft);color:var(--ink);cursor:pointer}
body[data-theme="dark"] .danger,body[data-theme="dark"] .error,body[data-theme="dark"] .notice.error{color:#fca5a5!important}body[data-theme="dark"] .turn.user{background:#2563eb20;border-color:#60a5fa22}
@media(max-width:760px){.subtitle{font-size:14px}}

