#page-chat { height: calc(100dvh - var(--nav-h) - 40px); min-height: 520px; }
.ov-chat-shell { display:grid; grid-template-columns:260px minmax(0,1fr); height:100%; min-height:0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--bg-card); color:var(--text-1); }
.ov-chat-history { display:flex; flex-direction:column; min-width:0; min-height:0; padding:16px 10px; border-right:1px solid var(--border); background:var(--bg-card2); }
.ov-chat-history-top { display:flex; justify-content:space-between; align-items:center; padding:0 8px 14px; font-family:var(--font-head); font-size:19px; }
.ov-chat-history button, .ov-chat-header button, .ov-chat-msg-tools button, .ov-chat-composer button, .ov-chat-welcome button, .ov-chat-list button { font:inherit; cursor:pointer; }
#ov-chat-new { display:grid; place-items:center; width:30px; height:30px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--accent-g); font-size:22px; line-height:1; }
.ov-chat-search { display:flex; align-items:center; gap:6px; margin:0 5px 14px; padding:0 10px; border:1px solid var(--border); border-radius:9px; color:var(--text-3); background:var(--bg-card); }
.ov-chat-search input { flex:1; min-width:0; padding:10px 0; border:0; outline:none; color:var(--text-1); background:transparent; font:12px var(--font-body); }
.ov-chat-list { min-height:0; overflow-y:auto; display:grid; align-content:start; gap:3px; }
.ov-chat-entry { display:flex; align-items:center; gap:4px; min-width:0; border-radius:9px; padding:3px 5px; }
.ov-chat-entry.active { background:color-mix(in srgb,var(--accent-g) 12%,transparent); }
.ov-chat-entry:hover { background:color-mix(in srgb,var(--accent-b) 9%,transparent); }
.ov-chat-entry-title { flex:1; min-width:0; padding:9px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; color:var(--text-2); border:0; background:transparent; font:12px var(--font-body); }
.ov-chat-entry.active .ov-chat-entry-title { color:var(--text-1); font-weight:700; }
.ov-chat-entry-action { border:0; background:transparent; color:var(--text-3); font-size:13px; padding:5px; border-radius:5px; }
.ov-chat-entry-action:hover { color:var(--accent-g); background:var(--bg-card); }
.ov-chat-empty-list { padding:12px; font-size:12px; line-height:1.5; color:var(--text-3); }
.ov-chat-main { display:flex; position:relative; flex-direction:column; min-width:0; min-height:0; }
.ov-chat-header { display:flex; align-items:center; gap:12px; min-height:62px; padding:10px 24px; border-bottom:1px solid var(--border); }
.ov-chat-header strong { display:block; font-family:var(--font-head); font-size:18px; line-height:1.1; }
.ov-chat-header span { display:block; color:var(--text-3); font-size:11px; margin-top:2px; }
.ov-chat-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:color-mix(in srgb,var(--accent-g) 14%,transparent); color:var(--accent-g); font-size:20px; }
.ov-chat-mark img,.ov-chat-avatar img { display:block; width:100%; height:100%; object-fit:contain; }
#ov-chat-menu { display:none; border:0; color:var(--text-2); background:transparent; font-size:20px; }
.ov-chat-messages { flex:1; min-height:0; overflow-y:auto; padding:26px clamp(16px,5vw,70px); }
.ov-chat-message { display:flex; gap:12px; max-width:900px; margin:0 auto 22px; }
.ov-chat-message.user { justify-content:flex-end; }
.ov-chat-avatar { flex:0 0 28px; display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:color-mix(in srgb,var(--accent-g) 15%,transparent); color:var(--accent-g); font-size:17px; }
.ov-chat-bubble { min-width:0; max-width:min(760px,100%); color:var(--text-1); line-height:1.65; font-size:13px; }
.ov-chat-message.user .ov-chat-bubble { padding:11px 15px; border:1px solid var(--border); border-radius:15px 15px 4px 15px; background:var(--bg-card2); white-space:pre-wrap; overflow-wrap:anywhere; }
.ov-chat-message.assistant .ov-chat-bubble { padding:3px 0; }
.ov-chat-md p, .ov-chat-md ul, .ov-chat-md ol, .ov-chat-md pre, .ov-chat-md table, .ov-chat-md blockquote { margin:0 0 12px; }
.ov-chat-md p:last-child, .ov-chat-md ul:last-child, .ov-chat-md pre:last-child { margin-bottom:0; }
.ov-chat-md ul, .ov-chat-md ol { padding-left:22px; }
.ov-chat-md a { color:var(--accent-b); }
.ov-chat-md pre { overflow-x:auto; padding:15px; border:1px solid var(--border); border-radius:10px; background:var(--bg-deep); font-size:12px; }
.ov-chat-md code { font-family:Consolas,monospace; }
.ov-chat-md :not(pre)>code { padding:2px 5px; border-radius:4px; background:var(--bg-card2); }
.ov-chat-md table { display:block; overflow-x:auto; width:max-content; max-width:100%; border-collapse:collapse; }
.ov-chat-md th,.ov-chat-md td { padding:8px 10px; border:1px solid var(--border); text-align:left; }
.ov-chat-md th { background:var(--bg-card2); }
.ov-chat-msg-tools { display:flex; gap:8px; margin-top:7px; }
.ov-chat-msg-tools button { padding:3px 7px; border:0; border-radius:5px; color:var(--text-3); background:transparent; font-size:11px; }
.ov-chat-msg-tools button:hover { color:var(--accent-g); background:var(--bg-card2); }
.ov-chat-voice-stamp { display:block; margin-top:5px; color:var(--text-3); font:10px var(--font-body); }
.ov-chat-visual { width:min(100%,560px); margin:12px 0; padding:13px 15px; border:1px solid var(--border); border-radius:11px; background:var(--bg-card2); }
.ov-chat-visual>strong { display:block; margin-bottom:8px; color:var(--text-2); font-size:12px; }
.ov-chat-visual-value { color:var(--accent-g); font:700 23px var(--font-head); }
.ov-chat-visual:has(.ov-chat-season-card) { width:min(100%,760px); }
.ov-chat-season-card { margin:10px 0; padding:12px; border:1px solid var(--border); border-radius:9px; background:var(--bg-card); }
.ov-chat-season-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px; margin-bottom:10px; }
.ov-chat-season-head strong { color:var(--accent-g); font-size:13px; }
.ov-chat-season-head span { color:var(--text-3); font-size:10px; }
.ov-chat-season-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.ov-chat-season-metrics>div { min-width:0; padding:8px; border:1px solid var(--border); border-radius:7px; background:var(--bg-card2); }
.ov-chat-season-metrics span { display:block; color:var(--text-3); font-size:10px; }
.ov-chat-season-metrics b { display:block; overflow-wrap:anywhere; color:var(--text-1); font-size:13px; }
.ov-chat-season-more { margin-top:9px; }
.ov-chat-season-more summary { cursor:pointer; color:var(--accent-b); font-size:11px; }
.ov-chat-season-more .ov-chat-season-metrics { margin-top:8px; }
.ov-chat-bar-row { display:grid; grid-template-columns:minmax(90px,2fr) minmax(60px,3fr) 70px; align-items:center; gap:8px; margin:7px 0; font-size:11px; }
.ov-chat-bar-row>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ov-chat-bar-row>b { text-align:right; white-space:nowrap; font-size:11px; }
.ov-chat-bar-track { height:7px; overflow:hidden; border-radius:8px; background:var(--border); }
.ov-chat-bar-track>span { display:block; height:100%; border-radius:8px; background:var(--accent-g); }
.ov-chat-sources { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.ov-chat-source { max-width:100%; color:var(--text-3); font-size:11px; }
.ov-chat-source summary { display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; padding:5px 8px; border:1px solid var(--border); border-radius:16px; background:var(--bg-card2); }
.ov-chat-source summary:hover { border-color:var(--accent-g); color:var(--accent-g); }
.ov-chat-source-details { margin-top:6px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; color:var(--text-2); line-height:1.45; }
.ov-chat-retry { max-width:900px; margin:0 auto 18px; padding-left:40px; }
.ov-chat-processing { display:inline-flex; align-items:center; gap:7px; color:var(--text-3); font-size:12px; }
.ov-chat-processing:before { content:''; width:14px; height:14px; border:2px solid var(--border); border-top-color:var(--accent-g); border-radius:50%; animation:ov-chat-spin .8s linear infinite; }
@keyframes ov-chat-spin { to {transform:rotate(360deg)} }
.ov-chat-compose-wrap { padding:10px clamp(16px,5vw,70px) 17px; border-top:1px solid var(--border); }
.ov-chat-error { max-width:900px; margin:0 auto 8px; padding:8px 12px; border:1px solid color-mix(in srgb,var(--accent-r) 50%,transparent); border-radius:8px; color:var(--accent-r); font-size:12px; }
.ov-chat-composer { display:flex; gap:8px; max-width:900px; margin:auto; align-items:flex-end; border:1px solid var(--border); border-radius:14px; background:var(--bg-card2); padding:9px; }
.ov-chat-composer:focus-within { border-color:var(--accent-g); }
.ov-chat-composer textarea { flex:1; min-width:0; max-height:160px; min-height:31px; resize:none; border:0; outline:0; padding:7px 6px; color:var(--text-1); background:transparent; font:13px/1.5 var(--font-body); }
.ov-chat-composer-actions { display:flex; gap:5px; padding-bottom:2px; }
.ov-chat-composer-actions button { display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:9px; background:transparent; color:var(--text-2); }
#ov-chat-send,#ov-chat-stop { background:var(--accent-g); color:#05150d; font-size:20px; font-weight:700; }
#ov-chat-stop { font-size:14px; }
#ov-chat-mic.recording { color:var(--accent-r); animation:ov-chat-pulse 1s infinite; }
#ov-chat-live { color:var(--accent-g); }
#ov-chat-live svg { width:19px; height:19px; }
#ov-chat-live:hover { background:color-mix(in srgb,var(--accent-g) 12%,transparent); }
@keyframes ov-chat-pulse { 50% {opacity:.45} }
.ov-chat-composer-actions button:disabled { cursor:not-allowed; opacity:.4; }
.ov-chat-footnote { max-width:900px; margin:7px auto 0; color:var(--text-3); text-align:center; font-size:10px; }
.ov-chat-welcome { max-width:640px; margin:min(18vh,140px) auto 0; text-align:center; }
.ov-chat-welcome .ov-chat-mark { margin:0 auto 16px; width:48px; height:48px; font-size:25px; }
.ov-chat-welcome h2 { font:700 30px var(--font-head); }
.ov-chat-welcome p { color:var(--text-2); margin:6px 0 24px; line-height:1.5; font-size:13px; }
.ov-chat-suggestions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.ov-chat-suggestions button { padding:12px 14px; text-align:left; border:1px solid var(--border); border-radius:10px; background:var(--bg-card2); color:var(--text-2); font-size:12px; line-height:1.4; }
.ov-chat-suggestions button:hover { border-color:var(--accent-g); color:var(--text-1); }
.ov-chat-followups { display:flex; flex-wrap:wrap; max-width:900px; margin:16px auto 0; }
.ov-chat-followups button { flex:0 1 auto; }
@media(max-width:760px) { #page-chat { height:calc(100dvh - var(--nav-h) - 20px); min-height:400px; } .main:has(#page-chat.active) { padding:10px; } .ov-chat-shell { display:block; position:relative; } .ov-chat-history { position:absolute; z-index:5; inset:0 auto 0 0; width:min(290px,85vw); box-shadow:12px 0 35px #0005; transform:translateX(-110%); transition:transform .2s ease; } .ov-chat-shell.history-open .ov-chat-history { transform:translateX(0); } .ov-chat-main { height:100%; } #ov-chat-menu { display:block; } .ov-chat-header { padding:9px 14px; } .ov-chat-messages { padding:18px 14px; } .ov-chat-compose-wrap { padding:9px 11px 13px; } .ov-chat-suggestions { grid-template-columns:1fr; } .ov-chat-welcome { margin:8vh auto 0; } }
@media(max-width:600px) { .ov-chat-season-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) {
  .ov-chat-composer textarea { min-height:48px; }
  .ov-chat-composer-actions button { width:36px; height:36px; }
  .ov-chat-compose-wrap { padding-bottom:max(13px,env(safe-area-inset-bottom)); }
}

.ov-live-panel:not([hidden]) { position:absolute; z-index:4; inset:0; display:flex; flex-direction:column; min-height:0;
  padding:20px clamp(18px,4vw,46px); background:var(--bg-card); color:var(--text-1); }
.ov-live-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.ov-live-top strong { display:block; font:700 23px var(--font-head); }
.ov-live-top span { display:block; margin-top:4px; color:var(--text-3); font-size:12px; }
.ov-live-top time { padding:6px 10px; border:1px solid var(--border); border-radius:8px; color:var(--text-2); font:12px var(--font-body); }
.ov-live-center { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:150px; text-align:center; }
.ov-live-mascot { display:grid; place-items:center; width:clamp(88px,14vh,145px); height:clamp(88px,14vh,145px);
  border:1px solid color-mix(in srgb,var(--accent-g) 35%,var(--border)); border-radius:28px;
  background:color-mix(in srgb,var(--accent-g) 7%,var(--bg-card2)); }
.ov-live-mascot img { width:88%; height:88%; object-fit:contain; }
.ov-live-wave { display:flex; align-items:center; justify-content:center; gap:5px; height:48px; margin:13px 0 8px; }
.ov-live-wave i { display:block; width:5px; height:5px; border-radius:5px; background:var(--accent-g); transition:height 80ms ease-out; }
.ov-live-center strong { font:700 19px var(--font-head); }
.ov-live-center p { max-width:420px; margin:7px 0 0; color:var(--text-3); font-size:12px; line-height:1.5; }
.ov-live-transcripts { flex:0 1 150px; overflow-y:auto; display:grid; align-content:start; gap:8px; width:min(100%,700px);
  margin:0 auto 18px; padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--bg-card2); }
.ov-live-transcripts:empty { display:none; }
.ov-live-transcripts[hidden] { display:none; }
.ov-live-transcript { display:flex; gap:9px; align-items:flex-start; color:var(--text-2); font:12px/1.5 var(--font-body); }
.ov-live-transcript strong { flex:0 0 64px; color:var(--accent-g); }
.ov-live-transcript.user strong { color:var(--accent-b); }
.ov-live-transcript span { min-width:0; overflow-wrap:anywhere; }
.ov-live-controls { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.ov-live-controls button { min-height:42px; padding:9px 14px; border:1px solid var(--border); border-radius:10px;
  background:var(--bg-card2); color:var(--text-1); font:600 12px var(--font-body); cursor:pointer; }
.ov-live-controls button:hover { border-color:var(--accent-g); }
.ov-live-controls button[aria-pressed="false"] { color:var(--text-3); }
#ov-live-end { border-color:color-mix(in srgb,var(--accent-r) 45%,var(--border)); color:var(--accent-r); }
#ov-live-interrupt:not([hidden]) { border-color:var(--accent-g); color:var(--accent-g); }
#ov-live-end:hover { background:color-mix(in srgb,var(--accent-r) 10%,var(--bg-card2)); }
.ov-live-panel[data-state="quota"] .ov-live-wave i,.ov-live-panel[data-state="ended"] .ov-live-wave i { background:var(--text-3); }
@media(max-width:760px) { .ov-live-panel:not([hidden]) { inset:0; padding:16px 12px max(14px,env(safe-area-inset-bottom)); }
  .ov-live-top strong { font-size:20px; } .ov-live-transcripts { flex-basis:120px; margin-bottom:12px; }
  .ov-live-controls { gap:6px; } .ov-live-controls button { flex:1 1 40%; padding:8px; } }
@media(prefers-reduced-motion:reduce) { .ov-live-wave i { transition:none; } }
