#spark-root { --spark-navy:#173858; position:fixed; right:24px; bottom:max(24px,env(safe-area-inset-bottom)); z-index:9000; color:var(--spark-navy); font:14px/1.55 Inter,sans-serif; }
#spark-root *,#spark-root *::before,#spark-root *::after { box-sizing:border-box; }
#spark-root [hidden] { display:none!important; }
#spark-root button,#spark-root textarea { font:inherit; }
#spark-root button { cursor:pointer; }
#spark-root button:focus-visible,#spark-root a:focus-visible,#spark-root textarea:focus-visible { outline:3px solid #0284c7; outline-offset:3px; }
.spark-launcher { width:62px;height:62px;border:3px solid #d9f3ff;border-radius:50%;background:linear-gradient(135deg,#0284c7,#16c7dc);color:white;box-shadow:0 8px 26px #0284c74d;display:grid;place-items:center;transition:transform .18s; }
.spark-launcher:hover { transform:scale(1.04); }.spark-launcher:active { transform:scale(.97); }
.spark-symbol { width:32px;height:32px;fill:currentColor;flex-shrink:0; }
.spark-discovery { position:absolute;right:74px;bottom:4px;width:190px;padding:12px 16px;text-align:left;color:#173858;background:white;border:1px solid #cce7f5;border-radius:17px;box-shadow:0 8px 24px #17385815;animation:spark-enter .2s ease; }
.spark-discovery strong,.spark-discovery span { display:block; }.spark-discovery span { font-size:12px;color:#52748e; }
.spark-panel { width:410px;height:650px;max-height:calc(100dvh - 110px);position:absolute;right:0;bottom:78px;display:flex;flex-direction:column;overflow:hidden;background:#f4fbff;border:1px solid #cce7f5;border-radius:23px;box-shadow:0 20px 65px #17385838;animation:spark-enter .2s ease; }
.spark-header { display:flex;align-items:center;gap:10px;background:#173858;color:white;padding:15px;flex-shrink:0; }.spark-heading { flex:1;min-width:0; }.spark-heading strong { display:block;font-size:18px; }.spark-heading small { font-size:11px;display:block; }
.spark-icon-button { width:44px;height:44px;border:0;border-radius:12px;background:#ffffff16;color:inherit;flex-shrink:0; }
.spark-messages { min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px;scrollbar-width:thin; }
.spark-message { background:white;border:1px solid #deedf5;border-radius:16px;padding:13px;margin:0 0 12px;overflow-wrap:anywhere;white-space:pre-line; }.spark-message p { margin:0; }.spark-message.user { background:#0369a1;color:white;border:0;margin-left:35px; }.spark-message.safety { border:1px solid #e9a891;background:#fff5ef; }.spark-message.safety strong { display:block;color:#9b341e;margin-bottom:6px; }
.spark-actions,.spark-quick { display:flex;flex-wrap:wrap;gap:8px;margin-top:12px; }.spark-actions a,.spark-quick button,.spark-suggestions button { border:1px solid #b9ddef;border-radius:12px;background:white;color:#0369a1;padding:10px 12px;min-height:44px;text-decoration:none;font-size:12px;font-weight:600;transition:background .15s; }.spark-actions a:hover,.spark-quick button:hover { background:#e0f2fe; }.spark-quick button { flex:1 1 44%; }
.spark-suggestions { display:grid;gap:7px;margin:12px 0; }.spark-suggestions button { text-align:left;font-weight:400; }
.spark-composer { padding:12px 14px;background:white;border-top:1px solid #d9eaf3;flex-shrink:0; }.spark-input-row { display:flex;align-items:flex-end;gap:7px; }.spark-input-row textarea { min-width:0;flex:1;resize:none;max-height:110px;min-height:48px;border:1px solid #bddcec;border-radius:12px;padding:11px;color:#173858;background:#f8fcff;font-size:16px; }.spark-input-row button { background:#0284c7;color:white; }.spark-input-row button:disabled { opacity:.45;cursor:default; }.spark-status { min-height:18px;font-size:11px;color:#52748e;margin-top:5px; }.spark-note { font-size:10px;color:#52748e;display:flex;justify-content:space-between;gap:8px;align-items:center; }.spark-reset { border:0;background:none;color:#0369a1;min-height:30px; }
body.gallery-lightbox-open #spark-root { visibility:hidden;pointer-events:none; }
.spark-header .spark-reset { min-height:44px;padding:8px 12px;border:1px solid #ffffff30;border-radius:12px;color:white;background:#ffffff16;white-space:nowrap;flex-shrink:0; }
.spark-header .spark-reset:hover { background:#ffffff26; }
.spark-input-row { align-items:center; }
#spark-root .spark-input-row textarea { height:44px;min-height:44px;max-height:44px;padding:10px 11px;line-height:22px;overflow-y:auto; }
.spark-input-row .spark-icon-button { display:grid;place-items:center; }
.spark-mic[aria-pressed="true"] { background:#173858;box-shadow:0 0 0 3px #bae6fd; }
.spark-status:empty { display:none; }
/* SPARK visual refinement; interaction and response behavior stay unchanged. */
#spark-root { font-size:13px;line-height:1.65; }
.spark-panel { background:linear-gradient(145deg,#eef8fd 0%,#f7fbfe 55%,#eaf8fa 100%);border-color:#d5e8f2;box-shadow:0 24px 70px #1738582b,0 4px 14px #17385812; }
.spark-header { background:linear-gradient(115deg,#173858,#164c6b);padding:16px;box-shadow:0 3px 12px #17385812; }
.spark-header > .spark-symbol { width:36px;height:36px;padding:5px;border-radius:11px;background:#ffffff12;color:#d5f8ff; }
.spark-heading strong { font-size:17px;letter-spacing:.5px;line-height:1.3; }
.spark-heading small { color:#d5e9f3;margin-top:3px; }
#spark-root .spark-header .spark-reset { font-size:11px;font-weight:600;min-height:40px; }
.spark-messages { padding:18px 16px;scrollbar-color:#b5d5e5 transparent; }
.spark-message { font-size:13px;line-height:1.7;padding:14px;border-color:#dceaf2;box-shadow:0 3px 12px #17385805;border-radius:16px 16px 16px 5px;margin-bottom:14px; }
.spark-message.user { background:linear-gradient(120deg,#0369a1,#0783b4);border-radius:16px 16px 5px 16px;box-shadow:0 4px 12px #0284c71a;font-weight:500; }
#spark-root .spark-quick button,#spark-root .spark-suggestions button,.spark-actions a { font-size:12px;line-height:1.5;border-color:#cce2ee;box-shadow:0 2px 7px #17385804; }
#spark-root .spark-quick button { font-weight:600;min-height:46px;background:#ffffffd9; }
#spark-root .spark-suggestions button { font-weight:400;background:#ffffffa6;color:#42647d; }
.spark-quick { margin-bottom:16px; }
.spark-actions a { background:#f4faff;font-weight:600; }
.spark-composer { padding:14px;background:#ffffffed;border-color:#dceaf2;box-shadow:0 -4px 18px #17385804; }
#spark-root .spark-input-row textarea { font-size:13px;background:#f5f9fc;border-color:#d2e3ed;border-radius:13px; }
#spark-root .spark-input-row textarea:focus-visible { outline:2px solid #0ea5e9;outline-offset:2px; }
.spark-input-row .spark-mic { background:#e8f4fa;color:#0369a1;border:1px solid #d0e6f1;border-radius:13px; }
.spark-input-row .spark-send { background:linear-gradient(135deg,#0284c7,#13b9d2);border-radius:13px;font-size:20px;box-shadow:0 3px 9px #0284c71c; }
.spark-input-row .spark-mic:hover { background:#dceff8; }
.spark-input-row .spark-mic[aria-pressed="true"] { background:#173858;color:white; }
@media(max-width:600px) { #spark-root .spark-input-row textarea { font-size:16px; } .spark-header { padding:13px; } }
@keyframes spark-enter { from { opacity:0;transform:translateY(6px); } to { opacity:1;transform:translateY(0); } }
@media(max-width:600px) { #spark-root { right:14px;bottom:max(16px,env(safe-area-inset-bottom)); }.spark-launcher { width:56px;height:56px; }.spark-panel { position:fixed;right:0;bottom:0;width:100%;height:92dvh;max-height:var(--spark-viewport,92dvh);border-radius:22px 22px 0 0; }.spark-composer { padding-bottom:max(12px,env(safe-area-inset-bottom)); }.spark-discovery { right:66px;width:185px; }.spark-header { gap:7px;padding:12px; }.spark-header .spark-symbol { width:26px; }.spark-heading small { font-size:10px; } }
@media(prefers-reduced-motion:reduce) { #spark-root * { animation:none!important;transition:none!important; } }
