/* The local runtime controls follow the existing graphite / cyan design. */
.local-engine-settings{padding:14px;background:#071a23;border:1px solid #274958;border-radius:12px;display:grid;gap:10px;grid-column:1/-1}
.local-engine-settings p{font-size:12px;color:#a9bfcd;line-height:1.65;margin:0}
.local-engine-settings select{width:100%;min-width:0}
.local-check{display:flex!important;gap:10px;align-items:center}.local-check input{width:auto!important}
.local-actions{display:flex;gap:10px;flex-wrap:wrap}
.local-actions button,.pc-loading button,#pcServiceNote button{border:1px solid #315767;border-radius:8px;background:#0b202a;color:#c7f6ff;padding:8px 12px;cursor:pointer}
.pc-loading{padding:10px 0;display:grid;gap:9px;border-top:1px solid #1e3740}.pc-loading[hidden]{display:none}
.pc-loading span{font-size:11px;color:#ade3ef;line-height:1.5;overflow-wrap:anywhere}
.pc-loading progress{width:100%;height:5px;accent-color:#53daf7}
#pcLast{max-height:180px;overflow:auto;white-space:pre-wrap;overscroll-behavior:contain}
#pcLoading+ #pcServiceNote{font-size:11px;line-height:1.55}
.pocket-companion-panel{max-width:calc(100vw - 20px);overflow-y:auto;overscroll-behavior:contain}
.ai-console-status[data-connection="loading"]{color:#f0cf86}.ai-console-status[data-connection="connected"]{color:#61f2b6}
#pocketCompanion[data-state="thinking"] .pc-dots b{animation-duration:.65s}
#pocketCompanion[data-state="listening"] .pc-screen{box-shadow:inset 0 0 16px #31d9ff30}
#pocketCompanion[data-state="speaking"] .pc-light{animation:local-breathe .8s ease-in-out infinite}
@keyframes local-breathe{50%{box-shadow:0 0 18px #62f4ff;opacity:.55}}
@media(prefers-reduced-motion:reduce){#pocketCompanion[data-state="speaking"] .pc-light{animation:none}}
#pocketCompanionPanel #pcLast{max-height:180px;overflow:auto;white-space:pre-wrap;overscroll-behavior:contain}
/* Model preparation only: the marketing layout, graphics and media controller are untouched. */
.pocket-preload{position:fixed!important;left:18px;bottom:18px;width:min(345px,calc(100vw - 36px));z-index:9998;box-sizing:border-box;padding:14px 16px;border:1px solid #294957;border-radius:14px;background:#07151ff5;box-shadow:0 8px 30px #0005;color:#c4d9e4;font:12px/1.55 system-ui,sans-serif;transform:none!important;backdrop-filter:blur(12px)}
.pocket-preload[hidden]{display:none!important}.preload-heading{display:flex;align-items:center;gap:8px}.preload-heading strong{font-size:10px;letter-spacing:.07em}.preload-dot{width:6px;height:6px;border-radius:50%;background:#53daf7;box-shadow:0 0 8px #53daf7}.preload-heading button{margin-left:auto}
.pocket-preload p{font-size:12px;margin:10px 0;line-height:1.55;overflow-wrap:anywhere;max-height:6.2em;overflow-y:auto}
.pocket-preload progress{width:100%;height:5px;accent-color:#64dbf6;display:block;margin:12px 0}
.pocket-preload button{background:#0b202a;color:#bbddea;border:1px solid #294958;border-radius:6px;cursor:pointer;font:11px/1.4 system-ui;padding:6px 8px}
.pocket-preload button:hover{border-color:#69d8ee;color:#fff}.pocket-preload button:focus-visible{outline:2px solid #55def5;outline-offset:2px}
#localHardwareHint{color:#a7c4d0;font-size:12px}.ai-msg.partial:after{content:'Interrupted / length-limited';font:10px/1.5 system-ui;color:#ceba8b}
@media(max-width:600px){.pocket-preload{bottom:10px;left:10px;width:calc(100vw - 95px);padding:11px}.preload-heading strong{font-size:9px}.preload-heading{gap:6px}.pocket-preload p{max-height:4.7em}}

/* Reliability update: small additions within existing settings. */
.voice-check-inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap;grid-column:1/-1;font:12px/1.6 system-ui,sans-serif}
.voice-check-inline button{border:1px solid #315767;background:#0b202a;color:#c7f6ff;border-radius:8px;padding:9px 12px;cursor:pointer}
.voice-check-inline a{color:#74ddeb;text-decoration:underline}.voice-check-inline span{flex-basis:100%;color:#a9bfcd}
img[src$="nvidia-logo-white.svg"]{object-fit:contain;aspect-ratio:164/30;height:auto}
#preloadRetry[hidden]{display:none!important}

/* Give generation priority without touching video playback or companion interaction. */
html.pocket-inference-busy main .reveal::before,
html.pocket-inference-busy main .reveal::after,
html.pocket-inference-busy main .section .section-reactor *,
html.pocket-inference-busy main .section .fx-orbit,
html.pocket-inference-busy main .section .ai-core-ring,
html.pocket-inference-busy main .section .ai-core-radar,
html.pocket-inference-busy main .section .ai-node { animation-play-state: paused !important; }
.ai-answer[data-waiting="true"]::before { content: "Preparing a reply…"; opacity: .72; font-size: .9em; }

/* 9.5: visible mini-chat progress, independent of full console scroll position. */
#pcQuestion{font-size:11px;color:#aac2cf;border-left:2px solid #51d9ed;padding:6px 10px;margin:0 0 8px;max-height:64px;overflow:auto;white-space:pre-wrap}
#pcLast{min-height:72px;overflow-anchor:none;scroll-behavior:auto;line-height:1.65}
#pcLast[data-pending="true"]{color:#a8c4cd}
#pcLast[data-pending="true"]::after{content:"";display:inline-block;width:5px;height:5px;margin-left:7px;border-radius:50%;background:#58dfff;animation:pocket-pending 1s ease-in-out infinite alternate}
@keyframes pocket-pending{from{opacity:.3}to{opacity:1}}
.pc-reply-kind,.reply-source-label{font:9px/1.5 monospace;letter-spacing:.08em;color:#7bd4df;text-transform:uppercase;display:block;margin:4px 0 6px}
#pcMiniSend:disabled{opacity:.5;cursor:wait}
.voice-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:12px}
.voice-choice-grid label{min-width:0}.voice-choice-grid p{grid-column:1/-1;font-size:11px;color:#a0b6c4}
.voice-choice-grid select{max-width:100%}
@media(max-width:600px){.voice-choice-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#pcLast[data-pending="true"]::after{animation:none}}

/* Linked document evidence in the floating companion; bounded, scrollable. */
.pc-document-sources { max-height: 74px; overflow:auto; margin:6px 0; }
.pc-document-sources[hidden] { display:none; }
.pc-document-sources .mind-citations { margin:0; gap:5px; }
.pc-document-sources .mind-citations a { font-size:10px; }
