/* Shared Motty chat + orb styles, extracted from styles.css/wng.css. Variants override with their own CSS loaded after. */
:root{--bg:#000;--panel:#14110a;--line:#2e2a1c;--muted:#b9b09a;--text:#f6f1e3;--accent:#FFB800;--flood:#FFB800;--asphalt:#000;--slate:#14110a;--foam:#f6f1e3;--rinse:#FFB800;--danger:#ff8e84;--dark:#000;--ink-on-foam:#111}
*{box-sizing:border-box}
[hidden]{display:none!important}
.avatar{width:56px;height:56px;display:grid;place-items:center;border-radius:16px;background:var(--accent);color:#193127;font-weight:900;position:relative;font-size:18px}
.avatar-dot{position:absolute;bottom:-2px;left:-2px;width:14px;height:14px;border:3px solid var(--panel);border-radius:50%;background:#83e7a0}
.agent-name{font-size:19px;font-weight:800}
.agent-name span{color:var(--accent)}
.btn-primary{border:0;border-radius:9px;padding:14px 19px;font-weight:900;background:var(--accent);color:#12241b;min-height:49px}
.btn-primary:disabled{opacity:.5;cursor:not-allowed}
.small-button{padding:8px 11px;border:1px solid #647475;border-radius:7px;background:#364744;color:var(--text)}
.toast{position:fixed;bottom:20px;left:20px;z-index:10001;color:#172516;background:var(--accent);border-radius:9px;padding:12px 18px;font-weight:700;display:none}
.toast.show{display:block}
.small-button{min-height:44px}
@keyframes talkpulse{0%,100%{box-shadow:0 0 0 0 #ddfc7255}50%{box-shadow:0 0 0 12px #ddfc7200}}
.talk-note{margin:0;color:var(--muted);font-size:12px}
.talk-note a{color:var(--accent)}
/* ---- Motty FAB + chat sheet ---- */
.motty-ico{flex:none}
.talk-ico .motty-ico{width:34px;height:34px}
.motty-fab{position:fixed;z-index:9000;bottom:calc(16px + env(safe-area-inset-bottom));inset-inline-start:calc(16px + env(safe-area-inset-left));min-height:60px;padding:0 24px 0 20px;border:0;border-radius:999px;background:var(--accent);color:#12241b;font-weight:900;font-size:18px;display:flex;align-items:center;gap:10px;box-shadow:0 8px 28px #0009;animation:talkpulse 2.2s ease-in-out infinite}
.motty-open .motty-fab{display:none}
.motty-sheet{position:fixed;z-index:9500;inset:0;background:var(--bg);display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.motty-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--panel)}
.motty-titles{flex:1;min-width:0}
.motty-status{font-size:13px;color:var(--accent)}
.motty-sheet[data-status=error] .motty-status{color:var(--danger)}
.motty-close{width:48px;height:48px;border:1px solid var(--line);border-radius:12px;background:none;color:var(--text);font-size:28px;line-height:1}
.motty-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.motty-msg{max-width:85%;padding:10px 14px;border-radius:16px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.motty-agent{align-self:flex-start;background:var(--panel);border:1px solid var(--line)}
.motty-user{align-self:flex-end;background:var(--accent);color:#12241b}
.motty-system{align-self:center;background:none;color:var(--muted);font-size:12px;text-align:center;max-width:95%}
.motty-typing{display:flex;gap:5px;padding:14px 16px}
.motty-typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:mottydot 1.1s infinite}
.motty-typing i:nth-child(2){animation-delay:.18s}
.motty-typing i:nth-child(3){animation-delay:.36s}
@keyframes mottydot{0%,80%,100%{opacity:.25}40%{opacity:1}}
.motty-consent{margin:0 16px 8px;padding:10px 12px;border-radius:10px;background:#2e4235;font-size:12px;line-height:1.6}
.motty-controls{display:flex;gap:8px;padding:0 16px}
.motty-controls:not(:has(:not([hidden]))){display:none}
.motty-compose{display:flex;gap:8px;padding:8px 16px}
.motty-compose textarea{flex:1;resize:none;background:#101b1e;color:var(--text);border:1px solid #48585a;border-radius:12px;padding:12px;min-height:48px;max-height:120px}
.motty-send{border:0;border-radius:12px;background:var(--panel);color:var(--accent);border:1px solid var(--accent);padding:0 18px;min-height:48px;font-weight:800}
.motty-send:disabled{opacity:.5}
.motty-mic{margin:4px 16px 8px;min-height:60px;border:0;border-radius:16px;background:var(--accent);color:#12241b;font-weight:900;font-size:19px;display:flex;align-items:center;justify-content:center;gap:10px}
.motty-foot{margin:0;padding:0 16px 12px;text-align:center;font-size:12px;color:var(--muted)}
.motty-foot a{color:var(--accent)}
@media(min-width:900px){.motty-sheet{inset:auto;bottom:16px;inset-inline-end:16px;width:400px;height:min(680px,calc(100vh - 32px));border:1px solid var(--accent);border-radius:20px;box-shadow:0 16px 60px #000b;overflow:hidden}.motty-open .motty-fab{display:none}}
@media(prefers-reduced-motion:reduce){.motty-fab,.motty-typing i{animation:none}}
.text-link{background:none;border:0;color:var(--accent);font-weight:700;font-size:17px;text-decoration:underline;text-underline-offset:4px;min-height:56px;padding:0 20px}
/* ---- orb (transform/opacity only) ---- */
.orb{position:relative;width:168px;height:168px;border:0;padding:0;background:none;color:#0f2a22;display:grid;place-items:center;border-radius:50%;-webkit-tap-highlight-color:transparent}
.orb span{position:absolute;border-radius:50%;pointer-events:none}
.orb-core{inset:14%;background:radial-gradient(circle at 35% 30%,#f4ffb0,var(--accent) 45%,#2fd1b8);display:grid;place-items:center;will-change:transform;animation:orbbreath 3.6s ease-in-out infinite}
.orb-core .orb-mic{position:static;width:44px;height:44px}
.orb-glow{inset:0;background:radial-gradient(circle,#ddfc72aa,#2fd1b800 70%);opacity:.35;will-change:opacity}
.orb-ring{inset:14%;border:2px solid #ddfc72;opacity:0;animation:orbring 3.6s ease-out infinite}
.orb-ring.r2{animation-delay:1.8s}
.orb-spin{inset:6%;border:4px solid transparent;border-top-color:#2fd1b8;border-right-color:#ddfc72;opacity:0}
.orb:focus-visible{outline:3px solid #fff;outline-offset:6px}
@keyframes orbbreath{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes orbring{0%{transform:scale(1);opacity:.55}100%{transform:scale(1.55);opacity:0}}
@keyframes orbspin{to{transform:rotate(360deg)}}
.orb[data-state=connecting] .orb-spin{opacity:1;animation:orbspin 1s linear infinite}
.orb[data-state=connecting] .orb-ring,.orb[data-state=listening] .orb-ring.r2,.orb[data-state=muted] .orb-ring{display:none}
.orb[data-state=listening] .orb-core{background:radial-gradient(circle at 35% 30%,#c9fbff,#4fd8e6 50%,#2a8fb0);animation-duration:2.8s}
.orb[data-state=listening] .orb-ring{border-color:#4fd8e6;animation-duration:2.8s}
.orb[data-state=speaking] .orb-ring{animation-duration:1.4s}
.orb[data-state=speaking] .orb-ring.r2{animation-delay:.7s}
.orb[data-state=muted] .orb-core{background:radial-gradient(circle at 35% 30%,#6b7779,#3b474a);color:#d7dede;animation:none}
.orb[data-state=muted] .orb-glow{opacity:.1!important}
.orb[data-state=muted]::after{content:"";position:absolute;width:56%;height:3px;background:var(--danger);transform:rotate(-45deg);border-radius:2px}
.orb[data-state=connecting] .orb-core{animation-duration:1.6s;opacity:.85}
.orb-sheet{width:190px;height:190px}
.motty-stage{display:grid;justify-items:center;gap:10px;padding:18px 16px 8px;background:radial-gradient(ellipse at 50% 30%,#1f3a34,transparent 70%)}
.orb-label{font-weight:800;font-size:17px;min-height:26px}
.end-btn{min-width:160px;min-height:56px;border:0;border-radius:16px;background:#e5483f;color:#fff;font-weight:900;font-size:19px}
.motty-sheet.has-stage .motty-log{flex:1 1 0;min-height:90px;max-height:32vh;opacity:.92;font-size:14px}
@media(max-height:700px){.orb-sheet{width:130px;height:130px}}
@media(prefers-reduced-motion:reduce){.orb-core,.orb-ring,.orb[data-state=connecting] .orb-spin{animation:none}.orb-ring{display:none}.orb[data-state=connecting] .orb-spin{opacity:1}}
.motty-diag{align-self:center;max-width:95%;font-size:11px;color:var(--muted);user-select:text;-webkit-user-select:text;direction:ltr;text-align:left;overflow-wrap:anywhere;font-family:ui-monospace,monospace;margin-top:-6px}
.motty-quota{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:4px 16px 8px}
.motty-quota[hidden]{display:none}
.motty-quota .btn-primary{width:auto;padding:10px 16px}
.text-link{color:var(--flood);font:600 1.05rem/1.4 var(--f-body);min-height:48px;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.talk-note{margin:0;max-width:44ch;color:var(--mist);font-size:.875rem;line-height:1.55}
.talk-note a{color:var(--flood)}
/* ---- orb ---- */
.orb{width:168px;height:168px;margin:6px 0}
.orb-land{width:min(46vw,176px);height:min(46vw,176px);min-width:132px;min-height:132px}
.orb-core{inset:15%;color:#2A1B00;background:radial-gradient(circle at 35% 28%,#FFE29A,var(--flood) 52%,#E08E00);box-shadow:0 0 44px #FFB81C55,inset 0 -6px 14px #8A530033}
.orb-glow{background:radial-gradient(circle,#FFB81C80,#FFB81C00 70%);opacity:.4}
.orb-ring{border-color:var(--flood)}
.orb-spin{border-top-color:var(--rinse);border-right-color:var(--flood)}
.orb:focus-visible{outline:3px solid var(--text);outline-offset:6px}
.orb[data-state=connecting] .orb-core{background:radial-gradient(circle at 35% 28%,#D5F1FF,var(--rinse) 55%,#1F8FC7);color:#06222F;box-shadow:0 0 40px #4CC3FF55}
.orb[data-state=listening] .orb-core{background:radial-gradient(circle at 35% 28%,#DDF4FF,var(--rinse) 50%,#2A9AD0);color:#06222F;box-shadow:0 0 52px #4CC3FF66}
.orb[data-state=listening] .orb-ring,.orb[data-state=speaking] .orb-ring{border-color:var(--rinse)}
.orb[data-state=speaking] .orb-core{box-shadow:0 0 56px #FFB81C88,0 0 0 3px #4CC3FF66}
.orb[data-state=muted] .orb-core{background:radial-gradient(circle at 35% 28%,#6F7F84,#3A4A50);color:#DCE5E7;box-shadow:none}
.orb-sheet{width:176px;height:176px}
.orb-label{font:400 1.15rem/1.3 var(--f-display)}
.avatar{width:44px;height:44px;border-radius:50%;background:var(--slate);border:1px solid var(--flood);color:var(--flood);font:400 1rem/1 var(--f-display);flex:none}
.avatar-dot{background:var(--rinse);border-color:var(--asphalt);width:12px;height:12px;left:-3px;bottom:-3px}
.agent-name{font:700 1rem/1.3 var(--f-body)}
.agent-name span{color:var(--flood)}
/* ---- Motty FAB + sheet ---- */
.motty-fab{background:var(--flood);color:#2A1B00;font:700 1.05rem/1 var(--f-body);min-height:56px;border-radius:999px;box-shadow:0 10px 30px #000a,0 0 0 1px #00000040;animation:none}
.motty-fab:focus-visible{outline:3px solid var(--text);outline-offset:3px}
.motty-sheet{background:var(--asphalt);font-family:var(--f-body)}
.motty-head{background:var(--slate);border-bottom:1px solid var(--line2)}
.motty-status{color:var(--flood)}
.motty-close{border-color:var(--line2);border-radius:50%;color:var(--text)}
.motty-msg{border-radius:14px}
.motty-agent{background:var(--slate);border:1px solid var(--line2)}
.motty-user{background:var(--flood);color:#2A1B00}
.motty-stage{background:radial-gradient(ellipse at 50% 20%,#FFB81C1f,transparent 68%)}
.motty-compose textarea{background:#0A1013;border-color:#3A4D54;color:var(--text);border-radius:10px}
.motty-compose textarea:focus-visible{outline-color:var(--flood)}
.motty-send{background:transparent;border:1px solid var(--flood);color:var(--flood);border-radius:10px}
.motty-mic{background:var(--flood);color:#2A1B00;border-radius:12px;font-family:var(--f-body)}
.motty-quota{background:none}
.motty-foot,.motty-foot a{color:var(--mist)}
.motty-foot a{text-decoration:underline}
.motty-consent{background:var(--slate)}
.end-btn{background:#e5483f;color:#fff;border-radius:12px}
@media(min-width:900px){.motty-sheet{border-color:var(--flood);border-radius:14px}}
/* ---- toast + errors ---- */
.toast{background:var(--foam);color:var(--ink-on-foam);border-radius:8px;font-weight:700;inset-inline-start:16px;left:auto;right:auto;bottom:calc(88px + env(safe-area-inset-bottom));border-inline-start:4px solid var(--flood)}
.btn-primary{background:var(--flood);color:#2A1B00;border-radius:8px;min-height:48px;font-weight:800}
.small-button{background:transparent;border:1px solid #5A7078;color:var(--text);border-radius:8px;min-height:44px}
.path-sub,.talk-note{text-wrap:balance}
