:root{--bg:#f4f5f9;--surface:#fff;--surface-2:#f0f1f6;--ink:#12131b;--muted:#666a7a;--line:#dfe1e9;--violet:#6755ef;--violet-2:#8b79ff;--mint:#42d7ad;--shadow:0 22px 70px rgba(30,27,65,.12);--stage:#0b0b12}
html[data-theme=dark]{--bg:#080910;--surface:#10121c;--surface-2:#171a27;--ink:#f7f7fb;--muted:#9ca1b5;--line:#252938;--violet:#8170ff;--violet-2:#9b8cff;--mint:#56e0b7;--shadow:0 28px 80px rgba(0,0,0,.38);--stage:#05060a}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI",system-ui,sans-serif;min-height:100vh;transition:background .25s,color .25s}button,textarea,select{font:inherit}button{color:inherit}.hidden{display:none!important}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(900px 500px at 85% -10%,rgba(103,85,239,.15),transparent 65%),radial-gradient(700px 400px at -5% 20%,rgba(66,215,173,.06),transparent 68%);z-index:-1}
.topbar{height:86px;max-width:1460px;margin:auto;padding:0 42px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:13px;color:var(--ink);text-decoration:none;font-size:20px;font-weight:780;letter-spacing:-.03em}.brand em{font-style:normal;font-size:10px;padding:4px 7px;border:1px solid var(--line);border-radius:999px;color:var(--violet-2);letter-spacing:.08em}.brand-mark{width:35px;height:35px;display:inline-block;flex:0 0 35px;background:transparent url("/static/zaavle-logo.png") center/contain no-repeat}.brand-mark i{display:none}.brand-mark.small{width:24px;height:24px;flex-basis:24px}.top-actions{display:flex;align-items:center;gap:12px}.library-pill{height:40px;padding:0 14px;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:12px;color:var(--muted)}.library-pill span{width:8px;height:8px;border-radius:50%;background:var(--mint);box-shadow:0 0 0 5px color-mix(in srgb,var(--mint) 12%,transparent)}.library-pill b{color:var(--ink);font-weight:650}.icon-button{width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;position:relative}.sun,.moon{position:absolute;inset:8px;transition:.2s}.moon{opacity:0;transform:rotate(-30deg)}html[data-theme=dark] .sun{opacity:0;transform:rotate(30deg)}html[data-theme=dark] .moon{opacity:1;transform:none}
main{max-width:1380px;margin:auto;padding:0 42px 90px}.hero{max-width:1120px;margin:68px auto 58px}.eyebrow{display:flex;align-items:center;gap:10px;color:var(--violet-2);font-size:11px;font-weight:800;letter-spacing:.19em}.eyebrow span{width:26px;height:2px;background:currentColor}.eyebrow.light{color:#bcb3ff}.hero h1{font-size:clamp(48px,6.4vw,88px);line-height:.99;letter-spacing:-.065em;margin:24px 0 25px;font-weight:720}.hero h1 strong{font-weight:720;color:var(--muted)}.hero-copy{font-size:19px;line-height:1.65;max-width:760px;color:var(--muted);margin-bottom:28px}.composer{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:var(--shadow)}.composer>label{display:block;font-size:12px;font-weight:750;color:var(--muted);margin:3px 4px 11px}.question-row{display:grid;grid-template-columns:1fr auto;gap:12px}.question-row textarea{min-height:86px;resize:none;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);color:var(--ink);padding:18px 20px;font-size:18px;line-height:1.45;outline:none}.question-row textarea:focus{border-color:var(--violet);box-shadow:0 0 0 4px color-mix(in srgb,var(--violet) 13%,transparent)}.generate-button{border:0;border-radius:14px;background:linear-gradient(135deg,var(--violet),var(--violet-deep,#5744d9));color:#fff;padding:0 24px;min-width:190px;font-weight:750;cursor:pointer;display:flex;justify-content:center;align-items:center;gap:14px;box-shadow:0 12px 30px var(--violet-glow,rgba(103,85,239,.25))}.generate-button:hover{filter:brightness(1.07)}.generate-button b{font-size:20px}.composer-tools{display:flex;align-items:center;gap:22px;padding:17px 4px 1px}.quiet-button{border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:9px 13px;cursor:pointer;font-size:12px;font-weight:700}.option-group{display:flex;align-items:center;gap:13px;margin-left:auto;font-size:12px}.option-group>span,.clip-count{color:var(--muted);font-weight:650}.option-group label{display:flex;align-items:center;gap:6px;cursor:pointer}.option-group input{position:absolute;opacity:0}.option-group i{width:14px;height:14px;border-radius:50%;border:1px solid var(--muted);position:relative}.option-group input:checked+i{border-color:var(--violet)}.option-group input:checked+i:after{content:"";position:absolute;inset:3px;background:var(--violet);border-radius:50%}.clip-count{display:flex;align-items:center;gap:8px;font-size:12px}.clip-count select{border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:8px;padding:6px 8px}
.generation-panel{max-width:1120px;margin:0 auto 80px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:28px 30px;box-shadow:var(--shadow)}.generation-head{display:flex;justify-content:space-between;align-items:flex-end}.generation-head h2{margin:10px 0 0;font-size:24px}.generation-head>b{font-size:28px;color:var(--violet-2)}.progress-track{height:7px;background:var(--surface-2);border-radius:99px;overflow:hidden;margin:25px 0}.progress-track div{width:0;height:100%;background:linear-gradient(90deg,var(--violet),var(--mint));transition:width .45s ease}.stage-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;list-style:none;padding:0;margin:0;counter-reset:stage}.stage-list li{color:var(--muted);font-size:11px;font-weight:700;padding-top:28px;position:relative}.stage-list li:before{counter-increment:stage;content:counter(stage);position:absolute;top:0;left:0;width:20px;height:20px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;font-size:9px}.stage-list li.done,.stage-list li.active{color:var(--ink)}.stage-list li.done:before{content:"✓";background:var(--mint);border-color:var(--mint);color:#06291f}.stage-list li.active:before{border-color:var(--violet);color:var(--violet-2);box-shadow:0 0 0 5px color-mix(in srgb,var(--violet) 12%,transparent)}
.episode-shell{animation:reveal .5s ease}.episode-heading{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:28px}.episode-heading h2{font-size:clamp(32px,4vw,54px);letter-spacing:-.045em;margin:14px 0 9px;max-width:900px}.episode-heading p{color:var(--muted);max-width:790px;line-height:1.55;margin:0}.episode-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(320px,.75fr);gap:20px;align-items:start}.player-card,.timeline-card{border:1px solid var(--line);background:var(--surface);border-radius:20px;overflow:hidden;box-shadow:var(--shadow)}.stage{aspect-ratio:16/9;background:var(--stage);position:relative;overflow:hidden}.stage iframe,.stage video{position:absolute;inset:0;width:100%;height:100%;border:0;display:none;background:#000}.narration-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:8%;background:radial-gradient(circle at 75% 20%,#2a2360 0,transparent 38%),linear-gradient(135deg,#0a0b13,#17172b 60%,#10111c);color:#fff}.narration-copy{position:relative;z-index:2;max-width:760px;text-align:center}.narration-copy h3{font-size:clamp(20px,3vw,34px);margin:15px 0 14px}.narration-copy p{font-size:clamp(17px,2.1vw,26px);line-height:1.4;margin:0;font-weight:540}.narration-copy small{display:block;margin-top:18px;color:#aaa5c7;font-size:10px;letter-spacing:.14em}.narration-orbit{position:absolute;width:480px;height:480px;opacity:.16}.narration-orbit span{position:absolute;border:1px solid #a69bff;border-radius:50%;inset:0;animation:orbit 18s linear infinite}.narration-orbit span:nth-child(2){inset:55px;animation-direction:reverse;animation-duration:13s}.narration-orbit span:nth-child(3){inset:118px;animation-duration:9s}.stage-badge{position:absolute;left:16px;top:16px;padding:7px 10px;border-radius:8px;background:rgba(4,5,10,.75);color:#fff;font-size:9px;font-weight:800;letter-spacing:.14em;z-index:6;backdrop-filter:blur(10px)}.episode-progress{height:5px;background:var(--surface-2)}.episode-progress div{height:100%;width:0;background:linear-gradient(90deg,var(--violet),var(--mint));transition:width .2s}.now-playing{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line)}.now-playing span,.timeline-head span,.section-head span,.dialog-head span{font-size:9px;font-weight:850;letter-spacing:.16em;color:var(--violet-2)}.now-playing h3{font-size:16px;margin:5px 0 3px}.now-playing p{color:var(--muted);font-size:11px;margin:0}.now-playing time{font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px}.controls{height:72px;display:flex;align-items:center;justify-content:center;gap:9px;padding:10px 20px}.controls button{border:0;background:transparent;min-width:38px;height:38px;border-radius:50%;cursor:pointer}.controls button:hover{background:var(--surface-2)}.controls .play-button{width:48px;height:48px;background:var(--ink);color:var(--surface)}.control-divider{width:1px;height:23px;background:var(--line);margin-left:auto}.controls .text-control{font-size:11px;font-weight:850;border-radius:8px}.controls .text-control.active{color:var(--violet-2);background:color-mix(in srgb,var(--violet) 10%,transparent)}
.timeline-card{max-height:720px;display:flex;flex-direction:column}.timeline-head{padding:23px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-end}.timeline-head h3{margin:6px 0 0}.timeline-head time{font-size:11px;color:var(--muted)}.timeline{overflow:auto;padding:9px 0}.timeline-item{display:grid;grid-template-columns:34px 1fr auto;gap:10px;padding:15px 18px;border-left:2px solid transparent;cursor:pointer;transition:.18s}.timeline-item:hover{background:var(--surface-2)}.timeline-item.active{background:color-mix(in srgb,var(--violet) 10%,transparent);border-left-color:var(--violet)}.timeline-icon{width:28px;height:28px;border:1px solid var(--line);border-radius:9px;display:grid;place-items:center;font-size:10px;color:var(--violet-2)}.timeline-item h4{font-size:12px;line-height:1.35;margin:0 0 5px}.timeline-item p{font-size:10px;color:var(--muted);margin:0}.timeline-item time{font-size:9px;color:var(--muted)}
.sources-section{margin-top:70px}.section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:20px}.section-head h2{font-size:30px;margin:8px 0 0}.section-head p{color:var(--muted);font-size:13px}.source-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.source-card{display:grid;grid-template-columns:94px 1fr;gap:16px;background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:13px}.source-thumb{height:72px;border-radius:10px;background:var(--surface-2) center/cover;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800}.source-card h3{font-size:13px;line-height:1.35;margin:2px 0 5px}.source-meta{font-size:10px;color:var(--violet-2);font-weight:750}.source-card details{grid-column:1/-1;border-top:1px solid var(--line);padding-top:9px}.source-card summary{cursor:pointer;font-size:10px;color:var(--muted)}.source-card blockquote{font-size:11px;line-height:1.55;color:var(--muted);margin:10px 0 2px}.source-card blockquote p{margin:0 0 8px}.source-card blockquote p:last-child{margin-bottom:0}.source-card a{color:var(--violet-2);text-decoration:none;font-size:10px}
.option-tag{display:inline-block;padding:5px 12px;border-radius:999px;background:color-mix(in srgb,var(--violet) 12%,transparent);color:var(--violet-2);font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;margin-bottom:14px}.section-head .option-tag{margin-bottom:8px}.option-divider{max-width:640px;margin:32px auto 30px;display:flex;align-items:center;gap:16px}.option-divider:before,.option-divider:after{content:"";flex:1;height:1px;background:var(--line);opacity:.6}.option-divider span{color:var(--violet-2);font-size:30px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.composer-section{margin-top:0}
.chat-section{margin-top:0;max-width:1120px;margin-left:auto;margin-right:auto}.chat-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,.75fr);gap:20px;align-items:start}.chat-card{border:1px solid var(--line);background:var(--surface);border-radius:20px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:0}.chat-thread{max-height:520px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px;display:flex;flex-direction:column;gap:16px}.chat-empty{padding:26px 20px;text-align:center;margin:auto 0;display:grid;gap:7px}.chat-empty strong{color:var(--ink);font-size:16px;font-weight:700}.chat-empty small{color:var(--muted);font-size:12px;line-height:1.5;max-width:360px;margin:0 auto}.chat-benefits-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}.chat-benefits-list li{position:relative;padding-left:20px;color:var(--muted);font-size:12.5px;line-height:1.5}.chat-benefits-list li:before{content:"";position:absolute;left:0;top:6px;width:7px;height:7px;border-radius:50%;background:var(--violet-2)}.chat-message{display:flex}.chat-message.user{justify-content:flex-end}.chat-message.assistant{justify-content:flex-start}.chat-bubble{max-width:86%;border-radius:14px;padding:13px 16px;font-size:13px;line-height:1.55}.chat-message.user .chat-bubble{background:var(--violet);color:#fff;border-bottom-right-radius:4px}.chat-message.assistant .chat-bubble{background:var(--surface-2);color:var(--ink);border-bottom-left-radius:4px}.chat-sources{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}.chat-source-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface);color:var(--violet-2);border-radius:999px;padding:6px 11px;font-size:10px;font-weight:700;cursor:pointer;text-align:left}.chat-source-pill:hover{border-color:var(--violet)}.chat-pending{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;font-style:italic;margin:0}.chat-spinner{flex:none;width:16px;height:16px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--violet);animation:chat-spin .8s linear infinite}@keyframes chat-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.chat-spinner{animation-duration:2.4s}}.chat-input-row{display:flex;gap:10px;padding:16px 20px;border-top:1px solid var(--line);flex:none}.chat-input-row input{flex:1;border:1.5px solid color-mix(in srgb,var(--violet) 22%,var(--line));border-radius:12px;background:var(--surface-2);color:var(--ink);padding:0 18px;height:50px;font-size:14px;outline:none}.chat-input-row input::placeholder{color:var(--muted)}.chat-input-row input:focus{border-color:var(--violet);box-shadow:0 0 0 4px color-mix(in srgb,var(--violet) 13%,transparent)}.chat-input-row button{width:50px;height:50px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--violet),var(--violet-deep,#5744d9));color:#fff;font-size:17px;cursor:pointer;flex:none}.chat-input-row button:disabled{opacity:.55;cursor:not-allowed}.chat-actions-card{border:1px solid var(--line);background:var(--surface);border-radius:20px;padding:22px;box-shadow:var(--shadow)}.chat-actions-card h3{margin:0 0 6px;font-size:17px}.chat-actions-card>p{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.5}.chat-action-button{display:flex;align-items:center;gap:9px;width:100%;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:12px;padding:13px 15px;font-size:12px;font-weight:750;cursor:pointer;margin-bottom:10px}.chat-action-button.primary{background:linear-gradient(135deg,var(--violet),var(--violet-deep,#5744d9));color:#fff;border:0}.chat-action-button:disabled{opacity:.5;cursor:not-allowed}
.chat-source-modal{position:relative;width:min(760px,calc(100% - 32px));overflow:visible}.chat-source-modal::backdrop{background:rgba(7,8,17,.68);backdrop-filter:blur(7px) saturate(.75)}.chat-source-modal-close{position:absolute;top:14px;right:14px;z-index:2;width:36px;height:36px;border:0;border-radius:10px;background:rgba(4,5,10,.55);color:#fff;font-size:20px;line-height:1;cursor:pointer}.chat-source-modal-close:hover{background:rgba(4,5,10,.8)}.chat-source-modal-stage{position:relative;aspect-ratio:16/9;background:var(--stage);border-radius:20px 20px 0 0;overflow:hidden}.chat-source-modal-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.chat-source-modal-info{padding:18px 22px 20px}.chat-source-modal-info h3{margin:0 0 6px;font-size:16px;line-height:1.35}.chat-source-modal-info p{margin:0 0 10px;color:var(--muted);font-size:12px}.chat-source-modal-info a{color:var(--violet-2);text-decoration:none;font-size:11px;font-weight:750}.chat-source-modal-error{margin:0;padding:0 22px 18px;color:#c92f61;font-size:12px}
.history-section{max-width:1120px;margin:76px auto 0}.history-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.history-card{min-width:0;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);padding:14px;cursor:pointer;transition:.18s}.history-card:hover{border-color:var(--violet);transform:translateY(-2px)}.history-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center;color:var(--muted);font-size:10px}.history-card strong{display:block;margin:14px 0 7px;font-size:13px;line-height:1.3}.history-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.history-rating{color:var(--violet-2);white-space:nowrap}.history-rating small{font-size:9px;color:var(--muted)}.history-open{display:block;margin-top:14px;color:var(--violet-2);font-size:10px;font-weight:750}
footer{max-width:1460px;margin:auto;padding:28px 42px;border-top:1px solid var(--line);display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px}.footer-brand{display:inline-flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.footer-brand:hover,.footer-brand:focus-visible{color:var(--ink)}.footer-brand:focus-visible{outline:2px solid var(--violet);outline-offset:5px;border-radius:4px}footer p:last-child{margin-left:auto}dialog{width:min(900px,calc(100% - 32px));max-height:80vh;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);padding:0;box-shadow:var(--shadow)}dialog::backdrop{background:rgba(4,5,10,.72);backdrop-filter:blur(5px)}.dialog-head{padding:22px 25px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.dialog-head h2{margin:5px 0 0}.dialog-head button{border:0;background:transparent;font-size:28px;cursor:pointer}.topic-tabs{display:flex;gap:7px;overflow:auto;padding:15px 20px;border-bottom:1px solid var(--line)}.topic-tabs button{white-space:nowrap;border:1px solid var(--line);background:var(--surface-2);border-radius:99px;padding:7px 10px;font-size:10px;cursor:pointer}.topic-tabs button.active{background:var(--violet);border-color:var(--violet);color:#fff}.question-list{padding:16px 20px 24px;display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:auto}.question-list button{text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:12px;color:var(--ink);font-size:11px;line-height:1.4;cursor:pointer}.question-list button:hover{border-color:var(--violet)}.toast{position:fixed;right:24px;bottom:24px;max-width:420px;background:#3b1e2b;color:#ffdce8;border:1px solid #6d334a;padding:14px 18px;border-radius:12px;z-index:20;font-size:13px;box-shadow:var(--shadow)}
.password-gate{width:min(420px,calc(100% - 32px));overflow:visible}.password-gate::backdrop{background:rgba(7,8,17,.68);backdrop-filter:blur(7px) saturate(.75)}.password-gate form,.password-gate-body{display:flex;flex-direction:column;padding:30px}.password-gate-mark{color:var(--violet-2);font-size:13px;font-weight:900;letter-spacing:.08em}.password-gate h2{font-size:27px;letter-spacing:-.035em;margin:13px 0 8px}.password-gate>form>p:not(.password-gate-error){color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 23px}.password-gate-body>p{color:var(--muted);font-size:13px;line-height:1.5;margin:0}.password-gate label{font-size:11px;font-weight:750;color:var(--muted);margin-bottom:8px}.password-gate input{width:100%;height:48px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--ink);padding:0 14px;font:inherit;outline:none}.password-gate input:focus{border-color:var(--violet);box-shadow:0 0 0 4px color-mix(in srgb,var(--violet) 13%,transparent)}.password-gate button{height:48px;margin-top:12px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--violet),var(--violet-deep,#5744d9));color:#fff;font-weight:750;cursor:pointer}.password-gate button:disabled,.password-gate input:disabled{cursor:not-allowed;opacity:.58}.password-gate-error{min-height:19px;margin:13px 0 0;color:#c92f61;font-size:12px;line-height:1.45}.password-gate-error:empty{margin-top:0;min-height:0}
@keyframes reveal{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:none}}@keyframes orbit{to{transform:rotate(360deg)}}
@media(max-width:950px){.episode-grid{grid-template-columns:1fr;align-items:start}.timeline-column{height:auto}.timeline-column .timeline-card{height:auto}.timeline-card{max-height:none}.timeline{max-height:450px}.source-grid{grid-template-columns:1fr}.hero{margin-top:70px}.stage-list{grid-template-columns:1fr}.stage-list li{padding:3px 0 3px 30px}.stage-list li:before{top:0}.question-row{grid-template-columns:1fr}.generate-button{height:56px}.composer-tools{flex-wrap:wrap}.option-group{margin-left:0}.episode-heading,.section-head{align-items:flex-start;flex-direction:column;gap:16px}}
@media(max-width:620px){.topbar,main,footer{padding-left:18px;padding-right:18px}.topbar{height:72px}.library-pill{display:none}.hero{margin:55px auto}.hero h1{font-size:45px}.hero-copy{font-size:16px}.composer{padding:13px}.composer-tools{gap:13px}.clip-count{width:100%}.episode-heading h2{font-size:36px}.now-playing{align-items:flex-start}.now-playing time{display:none}.question-list{grid-template-columns:1fr}.source-card{grid-template-columns:72px 1fr}.source-thumb{height:60px}footer{flex-wrap:wrap}footer p:last-child{margin-left:0;width:100%}}
@media(max-width:950px){.history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.history-grid{grid-template-columns:1fr}}
@media(max-width:950px){.chat-grid{grid-template-columns:1fr}}
@media(max-width:620px){.chat-thread{max-height:420px;padding:16px}.chat-bubble{max-width:96%}.chat-actions-card{padding:16px}.chat-source-modal{width:calc(100% - 20px)}.chat-source-modal-info{padding:14px 16px 16px}.chat-source-modal-close{top:10px;right:10px;width:32px;height:32px;font-size:18px}}

.scripture-references{padding:8px 14px;border-bottom:1px solid #8883;color:inherit}
.scripture-references[hidden]{display:none}
.scripture-bubbles{display:flex;flex-wrap:wrap;gap:6px}
.scripture-bubbles button{border:1px solid #8885;border-radius:20px;padding:5px 12px;background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer}
.scripture-panel{position:relative;margin-top:8px;padding:12px;border:1px solid #8884;border-radius:10px}
.scripture-panel>div{max-height:220px;overflow:auto;font-size:14px;line-height:1.55}
.scripture-panel p{margin:8px 0}
.scripture-panel mark{background:#ffe58a;color:#252015;border-radius:3px}
.scripture-close{float:right;background:transparent;border:0;color:inherit;font-size:22px;cursor:pointer}

.scripture-references{padding:12px 18px;border-bottom:1px solid var(--line)}
.scripture-bubbles button{display:inline-flex;align-items:center;padding:6px 13px;font-size:12px;font-weight:650;border-color:var(--line);background:var(--surface-2);color:var(--violet)}
.scripture-panel>strong{display:block;margin-right:28px;margin-bottom:8px;font-size:13px}
.scripture-panel>div{white-space:pre-line}
.scripture-panel>a{display:inline-block;margin-top:10px;font-size:12px;color:var(--violet)}

.reference-retry{border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer;padding:2px 0}

.scripture-panel blockquote{margin:8px 0 12px;padding-left:12px;border-left:2px solid var(--violet);color:var(--muted)}

.reference-copy{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--line);border-radius:7px;background:var(--surface-2);color:var(--muted);cursor:pointer}
.reference-copy:hover{color:var(--violet)}
.reference-copy:disabled{opacity:.4;cursor:default}
.scripture-panel>strong{margin-right:28px}
.scripture-panel:has(.reference-copy){padding-bottom:52px}

.video-pdf-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:0 18px 10px}
.video-pdf-actions[hidden]{display:none}
#videoPdfStatus{font-size:12px;color:var(--muted)}

.scripture-bubbles{justify-content:flex-start;align-items:flex-start;column-gap:10px;row-gap:16px}
.reference-bubble-entry{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.reference-bubble-time{padding-left:5px;color:#000;font-size:11px;font-weight:600;line-height:1.2;text-align:left;font-variant-numeric:tabular-nums}

.hero-message-custom{display:block;max-width:min(520px,90%);max-height:110px;margin:0 auto;object-fit:contain}
.brand-mark.custom-logo{background-color:transparent!important}

.episode-loading{position:fixed;left:50%;top:22px;z-index:60;display:flex;align-items:center;gap:10px;padding:11px 18px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;box-shadow:var(--shadow);transform:translate(-50%,-140%);opacity:0;transition:transform .2s ease,opacity .2s ease;pointer-events:none}.episode-loading.visible{transform:translate(-50%,0);opacity:1}

/* Related links (auto-created): Newer take / Background bubbles and panel */
.scripture-bubbles button.related-bubble{font-weight:700}
.scripture-bubbles button.related-newer{color:#1f7a4d;border-color:#1f7a4d80}
.scripture-bubbles button.related-background{color:#8a5a00;border-color:#8a5a0080}
.related-panel>div{white-space:normal;max-height:320px}
.related-link-title{display:block;background:none;border:0;padding:0;color:var(--violet,inherit);font:inherit;font-weight:700;text-align:left;cursor:pointer;text-decoration:underline}
.related-link>small{display:block;color:var(--muted,#888);font-size:12px;margin:2px 0 6px}
.related-link ul{list-style:none;margin:0;padding:0}
.related-link li{margin:8px 0;padding:6px 8px;border-left:3px solid #8884}
.related-row{display:grid;grid-template-columns:96px 64px 1fr;gap:6px;align-items:baseline;font-size:13px;line-height:1.45}
.related-key{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#888)}
.related-time{font-family:ui-monospace,monospace;font-size:12px;color:var(--muted,#888)}
button.related-jump{background:none;border:0;padding:0;color:var(--violet,#2557c7);text-decoration:underline;cursor:pointer;text-align:left}
.related-row small{display:block;color:var(--muted,#888);font-size:12px}
@media (max-width:560px){.related-row{grid-template-columns:1fr;gap:2px}}
@media (prefers-color-scheme:dark){.scripture-bubbles button.related-newer{color:#4fc38a;border-color:#4fc38a80}.scripture-bubbles button.related-background{color:#e0a83a;border-color:#e0a83a80}}

/* Reference map (button under Download PDF + full-screen dialog) */
.mindmap-actions{padding-top:0}
.mindmap-button{display:inline-flex;align-items:center;gap:6px;color:var(--violet)}
.mindmap-dialog{width:min(1200px,96vw);height:min(860px,92vh);max-width:none;max-height:none;padding:0;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);overflow:hidden;display:none;flex-direction:column}
.mindmap-dialog[open]{display:flex}
.mindmap-dialog::backdrop{background:rgba(10,10,20,.55)}
.mindmap-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 20px 0}
.mindmap-head small{font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--violet)}
.mindmap-head h2{margin:4px 0 0;font-size:18px;line-height:1.3}
.mindmap-close{background:transparent;border:0;color:inherit;font-size:28px;line-height:1;cursor:pointer}
.mindmap-help{margin:6px 20px 8px;font-size:13px;color:var(--muted)}
.mindmap-canvas{flex:1;min-height:0;overflow:auto;padding:0 12px 12px;color:var(--muted);font-size:14px}
.mindmap-canvas svg{display:block;width:100%;height:100%;min-width:640px}
.mm-edge{stroke:var(--line);stroke-width:2}
.mm-leaf-edge{stroke-dasharray:4 3}
.mm-newer.mm-edge{stroke:#1f7a4d}.mm-background.mm-edge{stroke:#b07a10}.mm-scripture.mm-edge,.mm-footnote.mm-edge{stroke:var(--violet)}
.mm-branch rect{fill:var(--surface-2);stroke:var(--violet);stroke-width:1.5}
.mm-branch.mm-newer rect{stroke:#1f7a4d}.mm-branch.mm-background rect{stroke:#b07a10}
.mm-label{font-size:12px;font-weight:700;fill:var(--ink)}
.mm-sub{font-size:11px;fill:var(--muted)}
.mm-leaf circle{fill:var(--violet)}.mm-leaf.mm-newer circle{fill:#1f7a4d}.mm-leaf.mm-background circle{fill:#b07a10}
.mm-leaf-text{font-size:11px;fill:var(--ink)}
.mm-centre rect{fill:var(--violet)}
.mm-centre-kicker{font-size:10px;letter-spacing:.12em;fill:#fff;opacity:.75}
.mm-centre-title{font-size:13px;font-weight:700;fill:#fff}
.mm-click{cursor:pointer;outline:none}
.mm-click:hover rect,.mm-click:focus rect{stroke-width:3}
.mm-click:hover text,.mm-click:focus text{text-decoration:underline}
@media (max-width:640px){.mindmap-dialog{width:100vw;height:100vh;border-radius:0}}
.mm-clip.mm-edge{stroke:var(--muted)}
.mm-branch.mm-clip rect{stroke:var(--ink);stroke-width:1.5}

/* Channel video description: collapsed under the title/time, above the controls */
.video-description{margin:0 18px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.video-description[hidden]{display:none}
.video-description>summary{cursor:pointer;padding:8px 12px;font-size:12px;font-weight:700;color:var(--muted);list-style:none;display:flex;align-items:center;gap:6px}
.video-description>summary::-webkit-details-marker{display:none}
.video-description>summary::before{content:"▸";transition:transform .15s}
.video-description[open]>summary::before{transform:rotate(90deg)}
.video-description>div{padding:0 12px 12px;font-size:13px;line-height:1.55;color:var(--muted);white-space:pre-line;overflow-wrap:anywhere;max-height:260px;overflow:auto}

/* One row under the seek bar: reference buttons on the left, Download PDF and Map on the right */
.player-tools{display:flex;align-items:flex-start;gap:12px;padding:0 18px;border-bottom:1px solid var(--line)}
.player-tools>.scripture-references{flex:1;min-width:0;padding:10px 0;border:0}
.player-tools-actions{display:flex;align-items:center;gap:8px;margin-left:auto;padding:10px 0}
.player-tools-actions:not(:has(>:not([hidden]))){display:none}
.player-tools-actions>.video-pdf-actions{padding:0}
.reference-bubble-time{color:var(--ink);opacity:.75}
@media (max-width:620px){.player-tools{flex-direction:column-reverse;gap:0}.player-tools-actions{margin-left:0;padding-bottom:0}}
.player-tools:has(>.scripture-references[hidden]):not(:has(.player-tools-actions>:not([hidden]))){display:none}

/* Reference map: drag to move, wheel/pinch/buttons to zoom */
.mindmap-canvas{overflow:hidden;padding:0 12px 12px}
.mm-stage{position:relative;width:100%;height:100%;border:1px solid var(--line);border-radius:12px;background:var(--bg);overflow:hidden}
.mindmap-canvas .mm-stage svg.mm-svg{display:block;width:100%;height:100%;min-width:0;cursor:grab;touch-action:none;user-select:none}
.mm-stage svg.mm-dragging{cursor:grabbing}
.mm-controls{position:absolute;right:12px;bottom:12px;display:flex;gap:6px}
.mm-controls button{min-width:36px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;font-weight:700;cursor:pointer;box-shadow:var(--shadow)}
.mm-controls button:hover{border-color:var(--violet)}
.video-description>div{white-space:normal}
.video-description>div p{margin:0 0 6px}
.video-description>div p.description-bullet{position:relative;padding-left:16px}
.video-description>div p.description-bullet::before{content:"•";position:absolute;left:3px;color:var(--violet)}
.video-description strong{color:var(--ink);font-weight:700}
.description-time{background:none;border:0;padding:0;margin-right:4px;color:var(--violet);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer;text-decoration:underline}
.video-description a{color:var(--violet);overflow-wrap:anywhere}

/* Description sits right under the title/time (no divider between them); the divider moves below it,
   with a small gap before the play controls. */
.now-playing:has(+ .video-description:not([hidden])){border-bottom:0;padding-bottom:8px}
.video-description:not([hidden]){margin:0 18px 6px}
.video-description:not([hidden]) + .controls{border-top:1px solid var(--line);margin-top:0;height:auto;padding-top:6px;padding-bottom:10px}
/* Knowledge base: passage bubbles, panel source line, and the bottom-left source credit on the player */
.kb-panel-source{font-size:12px;opacity:.8;font-style:italic}
.kb-sources{position:absolute;left:10px;bottom:10px;z-index:40;max-width:min(70%,520px);display:flex;gap:6px;align-items:flex-start;padding:6px 10px;border-radius:10px;background:#000000b3;color:#fff;font-size:12px;line-height:1.35;pointer-events:auto}
.kb-sources span{font-weight:700;white-space:nowrap}
.kb-sources ul{list-style:none;margin:0;padding:0;display:grid;gap:2px;min-width:0}
.kb-sources a{color:#fff;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.chat-source-modal-stage>.kb-sources{bottom:52px} /* clear the YouTube control bar */
@media (max-width:620px){.kb-sources{font-size:11px;max-width:85%;padding:4px 8px}}

/* ---- Player info area, tidied (2026-10-15) --------------------------------------------------
   One 22px gutter for every row under the video (references, title, description, controls), so
   everything lines up on the same left edge. References are single pills with their time inside;
   the description is part of the title block (a quiet toggle, not a separate boxed card). */
.player-card{--gutter:22px}
.player-tools{padding:0 var(--gutter);gap:16px;align-items:center}
.player-tools>.scripture-references{padding:12px 0}
.player-tools-actions{padding:12px 0}
.scripture-bubbles{align-items:center;column-gap:8px;row-gap:8px}
.reference-bubble-entry{flex-direction:row;align-items:stretch;gap:0;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:var(--surface)}
.reference-bubble-entry:hover,.reference-bubble-entry:focus-within{border-color:color-mix(in srgb,var(--violet) 45%,var(--line))}
.reference-bubble-time{display:inline-flex;align-items:center;padding:0 9px 0 12px;border-right:1px solid var(--line);background:var(--surface-2);color:var(--muted);opacity:1;font-size:11px;font-weight:650;line-height:1}
.scripture-bubbles .reference-bubble-entry>button{border:0!important;border-radius:0!important;margin:0;background:transparent;padding:6px 13px}
.scripture-bubbles button.kb-bubble{font-weight:700;color:#2f6fdb;border-color:#2f6fdb66}
html[data-theme=dark] .scripture-bubbles button.kb-bubble{color:#8db8ff;border-color:#8db8ff59}
html[data-theme=dark] .scripture-bubbles button.related-newer{color:#4fc38a;border-color:#4fc38a80}
html[data-theme=dark] .scripture-bubbles button.related-background{color:#e0a83a;border-color:#e0a83a80}

.now-playing{padding:18px var(--gutter) 16px;align-items:flex-start;gap:16px}
.now-playing>div{min-width:0}
.now-playing h3{margin:6px 0 4px;line-height:1.3}
.now-playing time{flex:none;margin-top:19px;font-size:12px}
.now-playing:has(+ .video-description:not([hidden])){border-bottom:0;padding-bottom:6px}

.video-description,.video-description:not([hidden]){margin:0 var(--gutter);padding:0 0 14px;border:0;border-radius:0;background:none}
.video-description>summary{display:inline-flex;align-items:center;gap:6px;padding:4px 0;font-size:12px;font-weight:650;color:var(--muted);border-radius:6px}
.video-description>summary:hover,.video-description>summary:focus-visible{color:var(--ink)}
.video-description>summary::before{content:"";width:6px;height:6px;border:0;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);margin:0 3px 0 0;transition:transform .15s}
.video-description[open]>summary::before{transform:rotate(135deg)}
.video-description>summary::after{content:"Show";margin-left:2px;font-weight:500;opacity:.7}
.video-description[open]>summary::after{content:"Hide"}
.video-description>div{margin-top:8px;padding:12px 4px 4px 14px;border-left:2px solid var(--line);max-height:240px;overflow:auto;font-size:13px;line-height:1.6;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.video-description>div::-webkit-scrollbar{width:6px}
.video-description>div::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
.video-description>div::-webkit-scrollbar-track{background:transparent}
.video-description>div p:last-child{margin-bottom:0}
.video-description:not([hidden]) + .controls{border-top:1px solid var(--line);padding-top:10px;padding-bottom:12px}

/* Knowledge-base source credit: a small × closes it for the rest of what is playing */
.kb-sources{padding:6px 10px 6px 6px;gap:6px;align-items:center}
.kb-sources-close{flex:none;box-sizing:border-box;width:18px;height:18px;display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:0;border-radius:50%;background:#ffffff26;color:#fff;line-height:0;cursor:pointer;pointer-events:auto;touch-action:manipulation}
.kb-sources-close svg{display:block;pointer-events:none}
.kb-sources-close:hover,.kb-sources-close:focus-visible{background:#ffffff4d}
@media (max-width:620px){.player-card{--gutter:16px}.reference-bubble-time{padding:0 7px 0 9px}}
.kb-sources{max-width:min(calc(100% - 20px),560px)}
.kb-sources ul{flex:1 1 auto;min-width:0}
.kb-sources li{min-width:0;overflow-wrap:anywhere}

/* Map hover card: the full wording of any map item (labels on the map are shortened to fit) */
.mm-tip{position:absolute;z-index:5;max-width:min(380px,calc(100% - 16px));padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:13px;line-height:1.45;pointer-events:none}
.mm-tip[hidden]{display:none}
.mm-tip strong{display:block;font-weight:700}
.mm-tip p{margin:4px 0 0;color:var(--muted);font-size:12.5px}
.mm-branch.mm-kb rect{stroke:#2f6fdb}.mm-edge.mm-kb{stroke:#2f6fdb}.mm-leaf.mm-kb circle{fill:#2f6fdb}
html[data-theme=dark] .mm-branch.mm-kb rect{stroke:#8db8ff}html[data-theme=dark] .mm-edge.mm-kb{stroke:#8db8ff}html[data-theme=dark] .mm-leaf.mm-kb circle{fill:#8db8ff}
/* Topic map (Explore): a node shows its full wording while hovered or focused, above its neighbours */
.topic-map-app .react-flow__node:hover,.topic-map-app .react-flow__node:focus-within{z-index:1000!important}
.topic-map-app .map-browse-node:hover strong,.topic-map-app .map-browse-node:focus-visible strong,.topic-map-app .map-focus-node:hover strong{display:block;-webkit-line-clamp:unset;overflow:visible}
.topic-map-app .map-browse-node:hover small,.topic-map-app .map-browse-node:focus-visible small{white-space:normal;overflow:visible}
/* Video modal and reference panels: same slim scrollbar as the video description. */
#chatSourceModal,#chatSourceModal *,.scripture-panel,.scripture-panel *,.markdown-preview-body{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
#chatSourceModal ::-webkit-scrollbar,.scripture-panel ::-webkit-scrollbar,.scripture-panel::-webkit-scrollbar,.markdown-preview-body::-webkit-scrollbar{width:6px;height:6px}
#chatSourceModal ::-webkit-scrollbar-thumb,.scripture-panel ::-webkit-scrollbar-thumb,.scripture-panel::-webkit-scrollbar-thumb,.markdown-preview-body::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
#chatSourceModal ::-webkit-scrollbar-track,.scripture-panel ::-webkit-scrollbar-track,.scripture-panel::-webkit-scrollbar-track,.markdown-preview-body::-webkit-scrollbar-track{background:transparent}
#chatSourceModal ::-webkit-scrollbar-button,.scripture-panel ::-webkit-scrollbar-button,.scripture-panel::-webkit-scrollbar-button{display:none;height:0}
/* Download PDF / Map stay pinned top-right of the tools row, whatever opens beside them. */
.player-tools{align-items:flex-start}
.player-tools-actions{align-self:flex-start}
/* Background / Newer take pop-up in the player's bottom-left (7 s, one at a time). */
.ref-toast{position:absolute;left:10px;bottom:10px;z-index:41;width:min(calc(100% - 20px),420px);display:grid;gap:4px;padding:10px 34px 11px 12px;border-radius:12px;background:#000000cc;color:#fff;font-size:12.5px;line-height:1.4;pointer-events:auto;box-shadow:0 8px 24px #0006;animation:ref-toast-in .22s ease-out}
.ref-toast .ref-toast-close{position:absolute;top:8px;right:8px}
.ref-toast-kind{font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#f5b84b}
.ref-toast-newer .ref-toast-kind{color:#5dd39e}
.ref-toast-title{justify-self:start;padding:0;border:0;background:none;color:#fff;font:inherit;font-weight:700;text-align:left;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.ref-toast-body{display:grid;gap:5px}
.ref-toast-here{margin:0;color:#ffffffb3}
.ref-toast-jump{display:grid;gap:2px;justify-items:start;padding:6px 8px;border:0;border-radius:8px;background:#ffffff1f;color:#fff;font:inherit;text-align:left;cursor:pointer}
.ref-toast-jump:hover,.ref-toast-jump:focus-visible{background:#ffffff33}
.ref-toast-jump span{font-size:11px;font-weight:700;color:#c7bfff}
.ref-toast-jump b{font-weight:600}
@keyframes ref-toast-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-width:620px){.ref-toast{font-size:11.5px;padding:8px 30px 9px 10px}}
.chat-source-title-actions{display:flex;align-items:center;gap:14px;flex:none}
.chat-source-make-primary{font-weight:700}
.related-panel .related-link+.related-link{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.ref-toast-count{margin-left:8px;font-weight:600;letter-spacing:0;text-transform:none;color:#ffffff99}
.ref-toast-jump small{color:#ffffffb3;font-size:11.5px;line-height:1.35}
