*{box-sizing:border-box} :root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#183235;background:#f6f8f7;font-size:14px;--accent:#087b74;--line:#dbe5e2;--muted:#647977}body{margin:0}button,input,textarea,select{font:inherit}button{border:1px solid transparent;background:var(--accent);color:#fff;border-radius:9px;padding:11px 16px;font-weight:600;cursor:pointer}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:white;color:#225956;border-color:#c6d9d4}button.text-button{background:transparent;color:var(--accent);padding:7px 2px;font-weight:500}.wide{width:100%}input,textarea,select{width:100%;border:1px solid #c6d6d2;border-radius:8px;background:#fff;color:#183235;padding:10px;outline-offset:3px}textarea{resize:vertical;line-height:1.55}input[type=checkbox]{width:auto;accent-color:var(--accent)}input[type=number]{max-width:72px}label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600}small,.muted{color:var(--muted);font-size:12px;line-height:1.5}.preview{padding:9px 24px;background:#163c3b;color:#d5e9e5;font-size:10px;letter-spacing:1.5px;font-weight:700}.preview span{font-weight:400;letter-spacing:.3px;margin-left:14px}#status{padding:8px 24px;min-height:35px;background:#eaf3ef;font-size:12px;color:#2b625b}#status.error{background:#fff0e9;color:#9b3d22}.entry{max-width:520px;margin:7vh auto;padding:24px;text-align:center}.brandmark{display:inline-grid;place-items:center;width:52px;height:52px;background:#0b746e;color:#fff;border-radius:16px;font-size:29px;font-weight:650}.brandmark.small{width:38px;height:38px;font-size:24px;border-radius:12px}.eyebrow{font-size:10px;color:var(--muted);font-weight:700;letter-spacing:1.7px;margin:20px 0 10px}h1{font-size:32px;font-weight:600;letter-spacing:-1px;margin:12px 0}h2{font-size:20px;font-weight:600;letter-spacing:-.5px}.intro{color:var(--muted);font-size:16px;line-height:1.7}.auth-card{background:white;border:1px solid var(--line);border-radius:16px;padding:20px 24px;margin-top:28px;text-align:left;box-shadow:0 6px 24px #163c3b05}.auth-card .row{margin-top:18px}.entry-note{font-size:12px;color:var(--muted);margin-top:28px;line-height:1.6}.row{display:flex;gap:10px;align-items:center}.wrap{flex-wrap:wrap}.spread{justify-content:space-between}.workspace{display:grid;grid-template-columns:220px minmax(300px,1fr) 320px;min-height:calc(100vh - 68px)}.sidebar{padding:26px 18px;background:#edf2ef;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:12px}.wordmark{display:flex;gap:10px;align-items:center;font-weight:650;font-size:19px;margin-bottom:17px}.wordmark small{display:block;font-size:11px;font-weight:400;margin-top:3px}.sidebar nav{max-height:60vh;overflow:auto}.sidebar nav button{display:block;width:100%;text-align:left;font-size:12px;font-weight:400;background:transparent;color:#526b66;border-radius:7px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar nav button[aria-current=true]{background:#dce9e3;color:#174d44;font-weight:600}.account{margin-top:auto;padding-top:22px;border-top:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;gap:5px}.account span{font-size:12px;overflow-wrap:anywhere}.chat{min-width:0;background:#fff;display:flex;flex-direction:column;padding:26px clamp(18px,3vw,48px) 14px}.chat-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:22px;border-bottom:1px solid #edf1ef;gap:18px}.chat-header .eyebrow{margin:0 0 6px}.chat-header h1{font-size:24px;margin:0}.language-label{font-weight:400;margin:0;font-size:11px;color:var(--muted);max-width:190px}.language-label select{margin-top:5px;font-size:12px;padding:8px}.messages{flex:1;min-height:270px;max-height:55vh;overflow:auto;padding:24px 2px 18px;scrollbar-width:thin}.welcome{text-align:center;max-width:420px;margin:35px auto;color:var(--muted);line-height:1.6}.welcome .brandmark{width:43px;height:43px;font-size:26px;background:#e1efe9;color:var(--accent)}.welcome h2{color:#264c45}.message{margin:0 0 26px}.message .author{font-size:11px;font-weight:700;color:#51736d;margin-bottom:9px}.message.user .text{background:#edf5f0;border-radius:12px;padding:13px 16px}.message .text,.result-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;font-size:14px}.message[dir=rtl] .text{text-align:right}.message .actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:9px}.message .actions button{font-size:12px;padding:4px 0}.sources{border-left:2px solid #c7ddd4;padding-left:12px;margin-top:14px;font-size:12px;color:var(--muted)}.sources a{color:var(--accent);text-decoration:none}.sources p{margin:8px 0;line-height:1.6}.composer{background:#fafcfb;border:1px solid #d3e1db;border-radius:15px;padding:16px;margin-top:10px;box-shadow:0 6px 20px #1a574606}.composer>label{margin-top:0}.composer textarea{background:#fff;border-color:#d9e3df;min-height:86px}.composer>.row{margin-top:10px}.composer .check{font-size:12px;line-height:1.4}.check{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:400}.check small{display:block;font-size:10px}.composer-note{font-size:10px;color:var(--muted);margin:12px 0 0}.work-controls{display:flex;align-items:center;gap:10px;min-height:48px}.tools{padding:22px 18px;border-left:1px solid var(--line);background:#f8faf8;overflow-wrap:anywhere}.tools>h2{margin:5px 0 20px;font-size:17px}.tools details{border-top:1px solid var(--line);padding:15px 0}.tools summary{font-weight:600;font-size:13px;cursor:pointer;list-style-position:outside;margin-left:13px}.tools details p{font-size:12px;line-height:1.6}.tools form{padding-top:5px}.tools button{font-size:12px}.tools select,.tools input,.tools textarea{font-size:12px}.tools .upload{background:white;padding:12px;border:1px dashed #97b9ad;border-radius:10px;color:#256659}.upload input{border:0;background:none;font-size:11px;padding:8px 0 0}.file-row{padding:9px 0;border-bottom:1px solid #e3eae6;font-size:12px}.file-row label{display:flex;gap:8px;align-items:flex-start;font-size:12px;margin:3px 0;font-weight:500}.file-row small{font-size:10px}.file-list:empty::after{content:'No files added yet.';display:block;color:var(--muted);font-size:12px;margin:16px 0}.tools fieldset{border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin:12px 0;display:flex;flex-wrap:wrap;gap:7px 12px}.tools fieldset label{font-size:11px;margin:0;display:flex;gap:4px;align-items:center;font-weight:400}.tools legend{font-size:11px;color:var(--muted)}.tools-foot{font-size:10px;color:var(--muted);line-height:1.6}.task-button{width:100%;border:0;border-bottom:1px solid var(--line);background:none;color:#365d53;text-align:left;font-weight:400;padding:10px 0;font-size:12px}.task-button small{display:block;font-size:10px}.memory-note{border-left:2px solid #b5d1c2;padding-left:9px;font-size:12px;white-space:pre-wrap}dialog{border:1px solid var(--line);border-radius:16px;padding:24px;max-width:740px;width:90vw;max-height:85vh;color:#183235;box-shadow:0 20px 60px #13342d26}dialog::backdrop{background:#102d2c55}dialog header{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:16px}dialog h2{margin:0}audio{width:100%;height:40px;margin-top:12px}.downloads{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.downloads a{color:var(--accent);background:#edf6f0;padding:10px 15px;border-radius:8px;text-decoration:none;font-size:12px}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #62ac91;outline-offset:3px}[hidden]{display:none!important}
@media(min-width:1600px){.workspace{grid-template-columns:245px minmax(300px,1fr) 365px}.chat{padding-left:6vw;padding-right:6vw}}@media(max-width:1120px){.workspace{grid-template-columns:185px minmax(300px,1fr)}.tools{grid-column:1/-1;border-top:1px solid var(--line);display:block;padding:20px 6vw}.tools details{max-width:750px;margin:auto}.tools>h2,.tools-foot{max-width:750px;margin:15px auto}.chat{padding:24px}.messages{max-height:56vh}}@media(max-width:640px){.workspace{display:block}.sidebar{padding:16px;display:grid;grid-template-columns:1fr 1fr;border-right:0}.wordmark{margin:0}.sidebar>.eyebrow{display:none}.sidebar nav{grid-column:1/-1;max-height:105px}.account{margin:0;padding:8px 0 0;grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}.chat{padding:20px 16px}.chat-header{gap:8px}.language-label{max-width:155px}.messages{max-height:52vh}.composer>.spread{flex-wrap:wrap}.preview{padding:9px 16px;font-size:9px}#status{padding:8px 16px}.entry{margin:3vh auto}.tools{padding:20px 16px}}

.audio-import{font-size:11px;color:var(--muted);margin-top:10px}.audio-import summary{cursor:pointer}.audio-import input{font-size:11px}.chat-header>div{min-width:0}.chat-header h1{font-size:20px;line-height:1.35;overflow-wrap:anywhere}.language-label{flex-shrink:0}

/* Shared Visenious website palette, from its supplied globals.css.
   Keep the existing chat layout; all assets and fonts remain local. */
:root {
  color-scheme: dark;
  --ink: #030a1c;
  --field: #071432;
  --near: #0c1d45;
  --royal: #0050d8;
  --royal-hi: #2a6ff5;
  --cyan: #00f0f8;
  --mist: #eaf1ff;
  --haze: #8fa3cc;
  --line: #bfd4ff1f;
  --accent: var(--cyan);
  --muted: #a6b7d8;
  color: var(--mist);
  background: var(--ink);
}
body { background: var(--ink); color: var(--mist); }
button {
  color: #fff;
  background: linear-gradient(180deg, var(--royal-hi), var(--royal));
  border-color: #689bff42;
  box-shadow: inset 0 1px 0 #ffffff20, 0 5px 22px #0050d822;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { box-shadow: none; }
button.secondary { background: #10244a; color: var(--mist); border-color: #bfd4ff33; }
button.text-button { background: transparent; color: var(--cyan); box-shadow: none; border-color: transparent; }
input, textarea, select, .composer textarea { background: #071432; color: var(--mist); border-color: #bfd4ff38; }
input::placeholder, textarea::placeholder { color: #97acd1; opacity: 1; }
input[type=checkbox] { accent-color: var(--royal-hi); }
select option { background: var(--field); color: var(--mist); }
.preview { background: #071432; color: #c6dbff; border-bottom: 1px solid var(--line); }
.preview span { color: #a6b7d8; }
#status { background: #0a1934; color: #a6d5f4; }
#status.error { background: #321824; color: #ffb4a9; }
.entry { background: radial-gradient(ellipse at top, #0050d826, transparent 70%); }
.brandmark, .brandmark.small { background: linear-gradient(145deg, #2a6ff5, #002860); color: #fff; box-shadow: inset 0 1px 0 #ffffff30, 0 5px 24px #0050d833; }
.eyebrow { color: #8fa3cc; }
.auth-card { background: linear-gradient(145deg, #10244a, #071432); box-shadow: 0 12px 40px #00071459; }
.sidebar { background: linear-gradient(180deg, #09152c, #050e21); }
.sidebar nav button { background: transparent; color: #b3c4e3; box-shadow: none; border-color: transparent; }
.sidebar nav button:hover { background: #10244a; }
.sidebar nav button[aria-current=true] { background: #142c55; color: #eaf1ff; border-color: #2a6ff550; }
.chat {
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 80% 0%, #0050d81c, transparent 60%), linear-gradient(#bfd4ff06 1px, transparent 1px), linear-gradient(90deg, #bfd4ff06 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}
.chat-header { border-color: var(--line); }
.welcome .brandmark { background: #10244a; color: var(--cyan); }
.welcome h2 { color: var(--mist); }
.messages { scrollbar-color: #24416c transparent; }
.message .author { color: #8cb4f7; }
.message.user .text { background: #0e2242; border: 1px solid #bfd4ff14; }
.sources { border-color: #2a6ff577; }
.composer { background: linear-gradient(145deg, #102242f5, #09162ff5); border-color: #bfd4ff33; box-shadow: 0 12px 40px #00071459, inset 0 1px 0 #eaf1ff0d; }
.composer:focus-within { border-color: #00f0f880; }
.tools { background: linear-gradient(180deg, #08162f, #050e21); }
.tools .upload { background: #0c1d3b; border-color: #5988bd; color: #c6dbff; }
.upload input { background: none; }
.file-row { border-color: var(--line); }
.task-button { background: none; border-color: var(--line); color: #b6c9e9; box-shadow: none; }
.memory-note { border-color: #2a6ff577; }
dialog { background: #091831; color: var(--mist); box-shadow: 0 20px 60px #000714aa; }
dialog::backdrop { background: #000714b8; }
.downloads a { background: #10244a; color: var(--cyan); }
audio { color-scheme: dark; }
.microphone-button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
button.microphone-button.secondary { border-color: #00f0f866; color: #b9faff; background: #0b2945; }
.microphone-button svg { flex: none; color: var(--cyan); }
a { color: var(--cyan); }
::selection { background: var(--royal); color: var(--mist); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media(min-width:1121px){.workspace{height:calc(100dvh - 68px);min-height:0}.sidebar,.chat,.tools{min-height:0}.sidebar nav{flex:1;min-height:0;max-height:none}.tools{overflow-y:auto}.chat{padding-top:20px}.messages{min-height:100px;max-height:none}.chat-header{padding-bottom:14px}.composer{padding:12px}.composer textarea{min-height:72px}.work-controls{min-height:38px}}

/* Visenious.ai: quiet, fixed artwork. UI and company profile retain their theme. */
body[data-site="visenious_ai"] { isolation: isolate; background: var(--ink); }
.genie-backdrop {
  position: fixed;
  inset: 68px 0 0;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  /* Fit by height, never cover: leave room above the turban on wide screens. */
  background: url('/assets/genie-background-v1.png') right bottom / auto 85% no-repeat;
  opacity: .24;
}
body[data-site="visenious_ai"] .chat { background: transparent; }
body[data-site="visenious_ai"] .auth-card { background: linear-gradient(145deg, #10244af5, #071432f5); }
@media (min-width:1121px) {
  body[data-site="visenious_ai"]:has(#app:not([hidden])) .genie-backdrop {
    left: 220px;
    right: 320px;
  }
}
@media (max-width:1120px) {
  .genie-backdrop { opacity: .18; }
}
@media (max-width:640px) {
  /* The dark artwork needs more presence on small screens. Keep the whole
     head inside the viewport and above the sign-in/composer panels. */
  .genie-backdrop {
    opacity: .46;
    filter: brightness(1.15);
    background-position: right top;
  }
}
@media (min-width:1600px) {
  body[data-site="visenious_ai"]:has(#app:not([hidden])) .genie-backdrop { left: 245px; right: 365px; }
}
@media (prefers-contrast: more), (forced-colors: active), print {
  .genie-backdrop { display: none; }
}

/* Readable code on desktop and phones; source indentation is preserved. */
.code-block { display:block; min-width:0; max-width:100%; margin:14px 0; border:1px solid #38537b; border-radius:12px; overflow:hidden; background:#081226; color:#e3edff; white-space:normal; direction:ltr; text-align:left; unicode-bidi:isolate; }
.code-header { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; padding:8px 12px; background:#13223e; border-bottom:1px solid #38537b; font:500 12px/1.5 system-ui,sans-serif; }
.code-language { margin-right:auto; color:#c1d4f4; overflow-wrap:anywhere; }
.code-feedback { color:#a5e5bd; font-size:12px; }
.code-copy { min-height:36px; padding:6px 12px; border:1px solid #6682ac; border-radius:7px; background:#1d3456; color:#eef5ff; font:500 12px/1.5 system-ui,sans-serif; cursor:pointer; }
.code-copy:hover { background:#294972; }
.code-block pre { margin:0; padding:16px; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; white-space:pre; overflow-wrap:normal; word-break:normal; tab-size:4; text-align:left; direction:ltr; unicode-bidi:isolate; scrollbar-color:#52739e #081226; }
.code-block pre:focus-visible { outline:2px solid #8ebaff; outline-offset:-3px; }
.code-block code { font:13px/1.65 Consolas,'Cascadia Code','Liberation Mono',monospace; white-space:pre; overflow-wrap:normal; word-break:normal; background:none; color:inherit; }
.inline-code { padding:2px 5px; border-radius:4px; background:#193355; color:#d5edff; font-family:Consolas,'Cascadia Code',monospace; font-size:.93em; }
.code-block .hljs-comment,.code-block .hljs-quote { color:#a6b5cd; font-style:italic; }
.code-block .hljs-keyword,.code-block .hljs-selector-tag,.code-block .hljs-literal { color:#d8adff; }
.code-block .hljs-string,.code-block .hljs-regexp,.code-block .hljs-doctag { color:#a5e5bd; }
.code-block .hljs-number,.code-block .hljs-symbol,.code-block .hljs-bullet,.code-block .hljs-variable { color:#ffc48a; }
.code-block .hljs-title,.code-block .hljs-section,.code-block .hljs-selector-id,.code-block .hljs-selector-class { color:#8ecbff; }
.code-block .hljs-built_in,.code-block .hljs-type,.code-block .hljs-attr,.code-block .hljs-attribute { color:#7fdfeb; }
.code-block .hljs-meta,.code-block .hljs-name,.code-block .hljs-tag { color:#ffabba; }
.code-block .hljs-addition { color:#a5e5bd; background:#14332b; }
.code-block .hljs-deletion { color:#ffabba; background:#3c1e2a; }
.code-block .hljs-emphasis { font-style:italic; }
.code-block .hljs-strong { font-weight:700; }
@media(max-width:640px) { .code-header { padding:6px 10px; } .code-copy { min-height:44px; min-width:88px; } .code-block pre { padding:12px; } }
@media(forced-colors:active) { .code-block,.code-header,.code-copy { border-color:CanvasText; } .code-block code,.code-block code span { color:CanvasText; } }

/* Scoped to the AI installation controls; the existing chat layout is retained. */
.preview { display:flex; align-items:center; gap:12px; height:33px; padding-top:2px; padding-bottom:2px; white-space:nowrap; }
.preview .install-help { margin-left:auto; flex-shrink:0; min-height:28px; padding:3px 10px; border:1px solid #2a6ff5; border-radius:7px; background:#102447; color:#eaf1ff; font-family:inherit; font-size:11px; font-weight:600; line-height:1.4; letter-spacing:0; cursor:pointer; }
#install-dialog { box-sizing:border-box; width:min(540px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:24px; overflow:auto; border:1px solid #36517b; border-radius:20px; background:#071432; color:#eaf1ff; box-shadow:0 24px 90px #0009; }
#install-dialog::backdrop { background:#030a1cc9; }
#install-dialog .install-heading { display:flex; align-items:center; gap:12px; padding:8px 0; position:sticky; top:-24px; z-index:1; background:#071432; }
#install-dialog .install-heading>div { flex:1; min-width:0; }
#install-dialog .install-heading img { width:44px; height:44px; border-radius:12px; flex-shrink:0; }
#install-dialog h2 { margin:0; font-size:21px; line-height:1.25; }
#install-dialog h2:focus { outline:none; }
#install-dialog .install-domain { margin:4px 0 0; font-size:13px; color:#a9bddc; }
#install-dialog .install-lead { margin:20px 0 12px; line-height:1.6; }
#install-dialog #install-status { font-size:13px; color:#a9bddc; line-height:1.6; }
#install-dialog #install-app { margin:0 0 12px; width:100%; min-height:44px; }
#install-dialog details { border-top:1px solid #2b4061; padding:16px 0; margin:0; }
#install-dialog summary { color:#eaf1ff; font-size:15px; cursor:pointer; }
#install-dialog ol { padding-left:23px; margin:12px 0 0; color:#c9d7ef; line-height:1.65; font-size:14px; }
#install-dialog li + li { margin-top:8px; }
#install-dialog .install-note { background:#102447; padding:12px 14px; border-radius:10px; color:#c9d7ef; font-size:13px; line-height:1.6; margin:8px 0 18px; }
#install-dialog #close-install { min-height:44px; width:100%; }
#install-dialog #install-dismiss { width:44px; height:44px; padding:0; font-size:25px; flex-shrink:0; line-height:1; }
#install-dialog [hidden] { display:none !important; }
#install-dialog .install-selectors { display:grid; grid-template-columns:1fr 1.35fr; gap:10px; margin-bottom:12px; }
#install-dialog .install-selectors label { min-width:0; font-size:12px; color:#a9bddc; display:grid; gap:5px; }
#install-dialog .install-selectors select { width:100%; min-width:0; min-height:44px; font:inherit; font-size:13px; color:#eaf1ff; background:#102447; border:1px solid #36517b; border-radius:8px; padding:8px; }
#install-dialog .install-step { padding:14px 0; border-top:1px solid #2b4061; }
#install-dialog h3 { margin:0; font-size:16px; line-height:1.4; color:#eaf1ff; }
#install-dialog .install-step p, #install-dialog section>p, #install-dialog details p { margin:7px 0 0; color:#bccde7; font-size:14px; line-height:1.5; }
#install-dialog .share-example { margin:12px 0 0; }
#install-dialog figcaption { color:#a9bddc; font-size:11px; margin-bottom:6px; }
#install-dialog .share-example svg { display:block; width:100%; max-width:330px; color:#a9bddc; }
#install-dialog .toolbar-bg { fill:#152740; stroke:#36517b; }
#install-dialog .share-highlight { fill:#123e5b; stroke:#00f0f8; }
#install-dialog .share-symbol { stroke:#4ff8ff; stroke-width:2.6; }
#install-dialog .install-step .share-caption { font-size:11px; line-height:1.45; color:#8fa6c8; }
#install-dialog button:focus-visible, .preview .install-help:focus-visible { outline:2px solid #00f0f8; outline-offset:3px; }
@media(max-width:640px) {
 .preview { gap:6px; }
 .preview span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
 #install-dialog { padding:16px; width:calc(100vw - 20px); max-height:calc(100dvh - 24px); }
 #install-dialog .install-heading { top:-16px; }
 #install-dialog h2 { font-size:19px; }
 #install-dialog .install-lead { margin:10px 0 14px; font-size:14px; }
}

/* Direction is local to the guide; switching back restores left-to-right. */
#install-dialog { text-align:start; }
#install-dialog .install-domain, #install-dialog #install-device { direction:ltr; unicode-bidi:isolate; }
#install-dialog .share-example svg { margin-inline-start:0; margin-inline-end:auto; direction:ltr; }
#install-dialog[dir="rtl"] ol { padding-left:0; padding-inline-start:23px; }

/* AI-only stylesheet. Desktop chat keeps its established layout. */
.mobile-navigation { display:none; }
.voice-controls { display:contents; }
.voice-controls>.row { margin-top:10px; }
body[data-site="visenious_ai"] { --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px); --safe-left:env(safe-area-inset-left,0px); --safe-right:env(safe-area-inset-right,0px); }
@media(max-width:900px) {
 html:has(body[data-site="visenious_ai"]) { font-size:100%; }
 body[data-site="visenious_ai"] { font-size:1rem; padding-bottom:var(--safe-bottom); }
 body[data-site="visenious_ai"] .preview { height:auto; min-height:56px; padding:calc(4px + var(--safe-top)) max(12px,var(--safe-right)) 4px max(12px,var(--safe-left)); gap:8px; letter-spacing:.7px; }
 body[data-site="visenious_ai"] .preview span { font-size:.6875rem; margin-left:0; overflow:hidden; text-overflow:ellipsis; }
 body[data-site="visenious_ai"] .preview .install-help { min-height:48px; min-width:48px; font-size:.75rem; padding:10px 12px; }
 body[data-site="visenious_ai"] #status { padding:8px max(16px,var(--safe-right)) 8px max(16px,var(--safe-left)); font-size:.8125rem; line-height:1.5; overflow-wrap:anywhere; }
 body[data-site="visenious_ai"] .genie-backdrop { inset:calc(92px + var(--safe-top)) 0 0; background-position:right top; background-size:auto 80%; opacity:.38; }
 body[data-site="visenious_ai"] .entry { width:100%; margin:12px auto; padding:20px max(16px,var(--safe-right)) 20px max(16px,var(--safe-left)); }
 body[data-site="visenious_ai"] .entry h1 { font-size:1.875rem; line-height:1.2; }
 body[data-site="visenious_ai"] .auth-card { padding:18px; }
 body[data-site="visenious_ai"] .auth-card .row { flex-wrap:wrap; }
 body[data-site="visenious_ai"] .auth-card button { flex:1 1 120px; }
 body[data-site="visenious_ai"] :is(button,select,input:not([type=checkbox]),summary) { min-height:48px; }
 body[data-site="visenious_ai"] :is(input,textarea,select) { font-size:1rem; min-width:0; max-width:100%; }
 body[data-site="visenious_ai"] :is(button,a,summary,label) { -webkit-tap-highlight-color:#2a6ff54d; }
 body[data-site="visenious_ai"] :is(input,textarea,select,button,summary) { scroll-margin-block:20px 100px; }
 body[data-site="visenious_ai"] textarea { line-height:1.55; }
 body[data-site="visenious_ai"] .workspace { display:block; height:auto; min-height:0; }
 body.mobile-ready { padding-bottom:calc(5.5rem + var(--safe-bottom)); }
 body.mobile-ready[data-mobile-panel="chat"] :is(.sidebar,.tools),
 body.mobile-ready[data-mobile-panel="history"] :is(.chat,.tools),
 body.mobile-ready[data-mobile-panel="tools"] :is(.chat,.sidebar) { display:none; }
 body[data-site="visenious_ai"] :is(.sidebar,.chat,.tools) { min-width:0; border:0; padding:16px max(16px,var(--safe-right)) 20px max(16px,var(--safe-left)); }
 body[data-site="visenious_ai"] .sidebar { display:flex; gap:16px; min-height:calc(100svh - 176px); }
 body[data-site="visenious_ai"] .sidebar .wordmark { margin:0; }
 body[data-site="visenious_ai"] .sidebar>.eyebrow { display:block; margin:12px 0 0; }
 body[data-site="visenious_ai"] .sidebar nav { max-height:none; overflow:visible; }
 body[data-site="visenious_ai"] .sidebar nav button { font-size:.9375rem; white-space:normal; overflow-wrap:anywhere; line-height:1.5; text-overflow:clip; padding:12px; margin:0 0 8px; }
 body[data-site="visenious_ai"] .account { display:flex; flex-direction:column; align-items:stretch; margin-top:auto; padding-top:16px; gap:8px; }
 body[data-site="visenious_ai"] .account span { font-size:.875rem; }
 body[data-site="visenious_ai"] .chat { gap:12px; }
 body[data-site="visenious_ai"] .chat-header { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); padding-bottom:12px; align-items:start; gap:12px; }
 body[data-site="visenious_ai"] .chat-header h1 { font-size:1.25rem; line-height:1.35; margin:0; }
 body[data-site="visenious_ai"] .chat-header .eyebrow { font-size:.625rem; }
 body[data-site="visenious_ai"] .language-label { min-width:0; width:100%; max-width:none; font-size:.75rem; }
 body[data-site="visenious_ai"] .language-label select { font-size:1rem; padding:10px 8px; }
 body[data-site="visenious_ai"] .messages { flex:none; height:clamp(160px,calc(var(--phone-height,100svh) - 600px),600px); min-height:160px; max-height:none; padding:8px 2px 16px; overscroll-behavior-y:contain; scrollbar-gutter:stable; background:linear-gradient(90deg,#030a1c80,#030a1c33); border-radius:12px; }
 body[data-site="visenious_ai"] .message { margin-bottom:22px; }
 body[data-site="visenious_ai"] :is(.message .text,.result-text) { font-size:1rem; line-height:1.7; unicode-bidi:plaintext; text-align:start; }
 body[data-site="visenious_ai"] .message .author { font-size:.75rem; direction:ltr; }
 body[data-site="visenious_ai"] .message.user .text { padding:12px 14px; }
 body[data-site="visenious_ai"] .message .actions { gap:8px; }
 body[data-site="visenious_ai"] .message .actions button { padding:10px 12px; font-size:.875rem; border:1px solid #00f0f84a; border-radius:10px; }
 body[data-site="visenious_ai"] .sources { font-size:.875rem; direction:ltr; }
 body[data-site="visenious_ai"] .sources a { display:inline-block; padding-block:10px; line-height:1.7; overflow-wrap:anywhere; }
 body[data-site="visenious_ai"] .composer { padding:12px; margin:0; }
 body[data-site="visenious_ai"] .composer>label { font-size:.875rem; }
 body[data-site="visenious_ai"] .composer textarea { min-height:4.75rem; height:4.75rem; }
 body[data-site="visenious_ai"] .composer .row { flex-wrap:wrap; gap:8px; }
 body[data-site="visenious_ai"] :is(#record,#finish-record,#discard-record) { font-size:.875rem; }
 body[data-site="visenious_ai"] #record-state { flex:1 1 160px; font-size:.75rem; }
 body[data-site="visenious_ai"] #record-state:empty { display:none; }
 body[data-site="visenious_ai"] .voice-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap:8px; margin-top:10px; }
 body[data-site="visenious_ai"] .voice-controls>.row { margin:0; align-content:start; }
 body[data-site="visenious_ai"] .voice-controls #record { width:100%; padding:10px; justify-content:center; }
 body[data-site="visenious_ai"] #record span { white-space:nowrap; font-size:.8125rem; }
 body[data-site="visenious_ai"] .voice-controls .audio-import { margin:0; }
 body[data-site="visenious_ai"] .voice-controls audio { grid-column:1/-1; margin:0; }
 body[data-site="visenious_ai"] .voice-controls:has(.audio-import[open]),
 body[data-site="visenious_ai"] .voice-controls:has(#finish-record:not([hidden])) { display:block; }
 body[data-site="visenious_ai"] .audio-import { font-size:.8125rem; }
 body[data-site="visenious_ai"] .audio-import summary { display:flex; align-items:center; line-height:1.5; cursor:pointer; }
 body[data-site="visenious_ai"] .audio-import summary::before { content:'\25B8'; margin-right:8px; }
 body[data-site="visenious_ai"] .audio-import[open] summary::before { content:'\25BE'; }
 body[data-site="visenious_ai"] .composer .check { margin:0; font-size:.875rem; flex:1 1 150px; }
 body[data-site="visenious_ai"] .composer .check small { display:none; }
 body[data-site="visenious_ai"] #send { flex:0 1 auto; padding:12px 16px; font-size:.9375rem; }
 body[data-site="visenious_ai"] .composer-note { font-size:.75rem; line-height:1.5; margin:10px 0 0; }
 body[data-site="visenious_ai"] .work-controls { flex-wrap:wrap; gap:8px; min-height:0; font-size:.8125rem; }
 body[data-site="visenious_ai"] .work-controls:has(#retry[hidden]):has(#task-state:empty):has(#task-spinner[hidden]) { display:none; }
 body[data-site="visenious_ai"] .tools>h2 { font-size:1.375rem; margin:0 0 16px; }
 body[data-site="visenious_ai"] .tools details { border:1px solid #bfd4ff29; border-radius:12px; background:#091831eb; margin:0 0 12px; padding:8px 14px; max-width:none; }
 body[data-site="visenious_ai"] .tools summary { display:list-item; align-content:center; font-size:1rem; line-height:1.5; padding-block:12px; margin-left:14px; }
 body[data-site="visenious_ai"] :is(.tools button,.tools label,.tools details p) { font-size:.875rem; line-height:1.6; }
 body[data-site="visenious_ai"] .tools .row { flex-wrap:wrap; }
 body[data-site="visenious_ai"] .tools .row select { flex:1 1 180px; }
 body[data-site="visenious_ai"] .tools fieldset { gap:8px; min-width:0; }
 body[data-site="visenious_ai"] :is(.check,.file-row label,.tools fieldset label) { min-height:48px; padding:8px 4px; align-items:center; cursor:pointer; }
 body[data-site="visenious_ai"] input[type=checkbox] { flex:none; width:22px; height:22px; margin:0 4px 0 0; }
 body[data-site="visenious_ai"] .file-row label { overflow-wrap:anywhere; }
 body[data-site="visenious_ai"] .tools small { font-size:.75rem; }
 body[data-site="visenious_ai"] .upload input { width:100%; white-space:normal; font-size:.875rem; }
 body[data-site="visenious_ai"] input::file-selector-button { min-height:44px; max-width:100%; margin-right:8px; border:1px solid #bfd4ff38; border-radius:8px; color:#eaf1ff; background:#10244a; padding:8px 12px; }
 body[data-site="visenious_ai"] .task-button { padding:12px 4px; }
 body[data-site="visenious_ai"] .downloads a { min-height:48px; display:flex; align-items:center; padding:12px; overflow-wrap:anywhere; max-width:100%; font-size:.875rem; }
 body[data-site="visenious_ai"] audio { min-height:48px; }
 body[data-site="visenious_ai"] dialog { max-width:calc(100vw - 24px); max-height:calc(var(--phone-height,100dvh) - 24px - var(--safe-top) - var(--safe-bottom)); padding:18px; overflow:auto; overscroll-behavior:contain; }
 body[data-site="visenious_ai"] dialog .row { flex-wrap:wrap; }
 body[data-site="visenious_ai"] dialog h2 { font-size:1.3125rem; overflow-wrap:anywhere; }
 body[data-site="visenious_ai"] #install-dialog { max-width:calc(100vw - 24px - var(--safe-left) - var(--safe-right)); max-height:calc(var(--phone-height,100dvh) - 24px - var(--safe-top) - var(--safe-bottom)); }
 body[data-site="visenious_ai"] #install-dialog summary { padding-block:12px; }
 body.mobile-ready .mobile-navigation { position:fixed; z-index:10; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:8px max(12px,var(--safe-right)) calc(8px + var(--safe-bottom)) max(12px,var(--safe-left)); background:#071432f5; border-top:1px solid #bfd4ff33; box-shadow:0 -6px 24px #030a1c88; }
 .mobile-navigation button { min-width:0; min-height:3.25rem; padding:6px 4px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; font-size:.75rem; background:transparent; border:1px solid transparent; color:#b3c4e3; box-shadow:none; }
 .mobile-navigation button[aria-pressed=true] { background:#142c55; color:#b9faff; border-color:#2a6ff566; }
 .mobile-navigation svg { width:20px; height:20px; flex:none; }
 .mobile-navigation span { max-width:100%; overflow-wrap:anywhere; }
 /* Let the page scroll naturally above the keyboard; never pin the input under it. */
 body.mobile-ready:has(input:focus,textarea:focus,select:focus) .mobile-navigation { display:none; }
}
@media(max-width:360px) {
 body[data-site="visenious_ai"] .preview span { display:none; }
 body[data-site="visenious_ai"] #send { flex:1 1 100%; }
}
@media(prefers-reduced-motion:reduce) { body[data-site="visenious_ai"] * { scroll-behavior:auto; } }

/* Compact input: one surface, with dictation and submission at bottom right. */
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
body[data-site="visenious_ai"] .compact-composer { border-radius:24px; padding:12px 14px 10px; }
body[data-site="visenious_ai"] .compact-composer textarea { display:block; border:0; border-radius:10px; background:transparent; box-shadow:none; padding:8px 4px; min-height:64px; height:76px; max-height:240px; resize:vertical; }
body[data-site="visenious_ai"] .compact-composer textarea:focus-visible { outline-offset:0; }
.composer-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-top:4px; }
.composer-options { display:flex; flex-wrap:wrap; align-items:center; gap:0 18px; min-width:0; flex:1; }
body[data-site="visenious_ai"] .compact-composer .audio-import { margin:0; font-size:11px; }
body[data-site="visenious_ai"] .compact-composer .audio-import summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
body[data-site="visenious_ai"] .compact-composer .audio-import summary::before { content:'▸'; margin-right:6px; }
body[data-site="visenious_ai"] .compact-composer .audio-import[open] summary::before { content:'▾'; }
.compact-composer .audio-import[open] { flex-basis:100%; }
body[data-site="visenious_ai"] .compact-composer .check { flex:0 1 auto; margin:0; min-height:44px; font-size:11px; padding:0; }
.composer-actions { display:flex; flex:none; gap:4px; align-items:center; direction:ltr; }
body[data-site="visenious_ai"] .compact-composer :is(#record,#send) { display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; min-width:44px; min-height:44px; padding:0; border-radius:50%; box-shadow:none; }
body[data-site="visenious_ai"] .compact-composer #record { color:var(--mist); background:transparent; border-color:transparent; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
body[data-site="visenious_ai"] .compact-composer #record:hover { background:#ffffff12; }
body[data-site="visenious_ai"] .compact-composer #record[aria-pressed="true"] { background:#792c40; color:#fff; border-color:#ff859a; }
body[data-site="visenious_ai"] .compact-composer #send { position:relative; background:transparent; color:var(--ink); border-color:transparent; }
body[data-site="visenious_ai"] .compact-composer #send::before { content:''; position:absolute; width:24px; height:24px; border-radius:50%; background:var(--mist); }
body[data-site="visenious_ai"] .compact-composer #send svg { position:relative; width:16px; height:16px; }
body[data-site="visenious_ai"] .compact-composer #send:disabled { opacity:.65; }
.compact-composer svg { flex:none; pointer-events:none; }
.dictation-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; }
.dictation-feedback:has(#record-state:empty):has(#retry-transcription[hidden]):has(#save-recording[hidden]) { display:none; }
.dictation-feedback a { font-size:12px; padding-block:10px; }
body[data-site="visenious_ai"] .compact-composer #record-state { flex:1 1 200px; font-size:12px; }
body[data-site="visenious_ai"] .compact-composer .composer-note { margin:4px 0 0; font-size:10px; line-height:1.5; }
@media(max-width:600px) {
 body[data-site="visenious_ai"] .compact-composer { padding:10px 12px; }
 .composer-toolbar { gap:6px; }
 .composer-options { display:block; }
 body[data-site="visenious_ai"] .compact-composer :is(#record,#send) { width:48px; height:48px; min-width:48px; min-height:48px; }
 body[data-site="visenious_ai"] .compact-composer .composer-note { font-size:11px; }
}

/* One conversation composer, with explicit per-message attachment chips. */
body[data-site="visenious_ai"] .composer-options { display:flex; flex-direction:row; align-items:center; gap:8px; flex-wrap:wrap; }
body[data-site="visenious_ai"] .composer-attach { width:44px; height:44px; min-width:44px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:0; color:var(--mist); border-radius:50%; }
body[data-site="visenious_ai"] .composer-attach:hover { background:rgba(255,255,255,.08); }
body[data-site="visenious_ai"] .prompt-attachments { display:flex; flex-wrap:wrap; gap:6px; padding:4px 0 8px; }
body[data-site="visenious_ai"] .attachment-chip { display:flex; align-items:center; max-width:100%; gap:6px; border:1px solid var(--line); border-radius:12px; padding:0 0 0 10px; background:rgba(255,255,255,.04); font-size:12px; }
body[data-site="visenious_ai"] .attachment-chip>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body[data-site="visenious_ai"] .attachment-remove { flex-shrink:0; min-width:44px; min-height:44px; padding:0; background:transparent; color:var(--mist); border:0; font-size:20px; }
body[data-site="visenious_ai"] .message-attachments { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
body[data-site="visenious_ai"] .attachment-name { border:1px solid var(--line); border-radius:8px; padding:4px 8px; font-size:12px; overflow-wrap:anywhere; }
@media (max-width:760px) { body[data-site="visenious_ai"] .composer-attach { width:48px; height:48px; min-width:48px; } }

/* Recording actions and task feedback stay compact, with full touch targets. */
body[data-site="visenious_ai"] .recording-row { display:flex; align-items:center; gap:6px; margin-top:8px; min-width:0; }
body[data-site="visenious_ai"] .recording-row audio { flex:1 1 0; min-width:0; width:0; margin:0; }
body[data-site="visenious_ai"] .recording-discard { display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; min-height:44px; padding:0; background:transparent; color:var(--mist); border:0; border-radius:50%; }
body[data-site="visenious_ai"] .recording-discard:hover { color:#ffb4bc; background:#ff859a18; }
body[data-site="visenious_ai"] #send:has(.submit-stop:not([hidden]))::before { background:#e8edf5; }
body[data-site="visenious_ai"] .task-spinner { width:13px; height:13px; flex:none; border:2px solid #bfd4ff40; border-top-color:var(--cyan,#00f0f8); border-radius:50%; animation:genius-busy .8s linear infinite; }
body[data-site="visenious_ai"] .work-controls:has(#retry[hidden]):has(#task-state:empty):has(#task-spinner[hidden]) { display:none; }
@keyframes genius-busy { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { body[data-site="visenious_ai"] .task-spinner { animation:none; } }
@media (max-width:900px) { body[data-site="visenious_ai"] .recording-discard { width:48px; height:48px; min-height:48px; } }

/* Dismiss only the current information notice. New messages are shown by say(). */
body[data-site="visenious_ai"] #status { position:relative; padding-right:60px; }
body[data-site="visenious_ai"] #status-dismiss { position:absolute; right:12px; top:50%; transform:translateY(-50%); display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; min-height:28px; margin:0; padding:0; border:0; border-radius:8px; background:transparent; color:inherit; box-shadow:none; font-size:22px; line-height:1; }
body[data-site="visenious_ai"] #status-dismiss:hover { background:#809ec52b; }
#mobile-language-bar { display:none; }
@media(min-width:1121px) {
 body[data-site="visenious_ai"] .workspace { height:calc(100dvh - var(--app-top-height,68px)); }
}
@media(max-width:900px) {
 body[data-site="visenious_ai"] #status { min-height:48px; display:flex; align-items:center; }
 body[data-site="visenious_ai"] #status-dismiss { width:44px; height:44px; min-height:44px; right:8px; }
 body.mobile-ready #mobile-language-bar:not([hidden]) { display:block; position:sticky; top:var(--mobile-header-height,56px); z-index:11; padding:4px max(16px,var(--safe-right)) 4px max(16px,var(--safe-left)); background:var(--ink,#030a1c); border-bottom:1px solid var(--line); }
 body.mobile-ready #mobile-language-bar .language-label { display:flex; align-items:center; gap:12px; margin:0; width:100%; max-width:none; }
 body.mobile-ready #mobile-language-bar .language-label>span { flex:0 1 auto; }
 body.mobile-ready #mobile-language-bar select { flex:1 1 130px; width:0; max-width:260px; margin:0 0 0 auto; }
}

/* Phone chat fills the available screen; only replies and expanded inputs scroll. */
@media(max-width:900px) {
 body.mobile-ready[data-mobile-panel="chat"] { padding-bottom:calc(var(--mobile-navigation-height,69px) + 6px); }
 body.mobile-ready .chat { height:calc(var(--phone-height,100dvh) - var(--app-top-height,114px) - var(--mobile-navigation-height,69px) - 6px); min-height:0; padding-bottom:0; overflow:hidden; }
 body.mobile-ready .chat-header { flex:none; order:0; }
 body.mobile-ready .messages { flex:1 1 0; height:auto; min-height:0; max-height:none; order:1; }
 body.mobile-ready .work-controls { flex:none; order:2; }
 body.mobile-ready .composer { flex:0 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; order:3; }
}

/* Keep phone history in one screen, with actions beside each conversation. */
.phone-composer-copy { display:none; }
@media(max-width:900px) {
 body.mobile-ready:not([data-mobile-panel="chat"]) #mobile-language-bar { display:none!important; }
 body.mobile-ready[data-mobile-panel="history"] { padding-bottom:calc(var(--mobile-navigation-height,69px) + 6px); }
 body.mobile-ready[data-mobile-panel="history"] #mobile-history {
  height:calc(var(--phone-height,100dvh) - var(--app-top-height,114px) - var(--mobile-navigation-height,69px) - 6px);
  min-height:300px; padding:12px max(16px,var(--safe-right)) 8px max(16px,var(--safe-left)); gap:10px;
 }
 body.mobile-ready #mobile-history .wordmark { display:none; }
 body.mobile-ready #mobile-history>.eyebrow { margin:8px 0 0; }
 body.mobile-ready #mobile-history #conversations { flex:1 1 0; min-height:80px; overflow-y:auto; overscroll-behavior:contain; }
 body.mobile-ready #mobile-history .conversation-row { min-height:52px; margin-bottom:4px; }
 body.mobile-ready #mobile-history .conversation-open { padding:10px 12px; }
 body.mobile-ready #mobile-history .account-controls { flex:none; margin-top:0; padding-top:8px; gap:2px; }
 body.mobile-ready #mobile-history .connected-apps-button { margin-bottom:0; }
 body.mobile-ready #mobile-history .legal-link { min-height:44px; padding:8px 0; }
 body.mobile-ready #chat-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:18px; line-height:1.35; }
 body.mobile-ready .desktop-composer-copy { display:none; }
 body.mobile-ready .phone-composer-copy { display:inline; }
 body.mobile-ready .compact-composer textarea { height:64px; min-height:64px; }
 body.mobile-ready .composer-toolbar:has(.audio-import[open]) { flex-wrap:wrap; }
 body.mobile-ready .composer-options:has(.audio-import[open]) { flex-basis:100%; }
 body.mobile-ready .composer-actions { margin-left:auto; }
}

.pwa-notice{position:relative;z-index:12;display:flex;align-items:center;gap:16px;justify-content:space-between;padding:12px max(16px,env(safe-area-inset-left,0px));border-bottom:1px solid #33557c;background:#10213c;color:#eaf1ff;font-size:.9rem;line-height:1.5}
.pwa-notice[hidden]{display:none}.pwa-notice p{margin:0;max-width:65rem}.pwa-actions{display:flex;gap:8px;flex-shrink:0}.pwa-notice button{min-height:48px;padding:10px 16px}.pwa-notice button:disabled{opacity:.6;cursor:default}#connection-notice{background:#30213a}#pwa-update-reason{display:block;color:#b9cee9;font-size:.85rem}
@media(max-width:650px){.pwa-notice{align-items:stretch;flex-direction:column;gap:8px}.pwa-actions{flex-wrap:wrap}.pwa-actions button{flex:1}}

/* Account controls and preferences are exclusive to the Genius .ai shell. */
.registration-agreement { display:flex; align-items:flex-start; gap:10px; margin-top:18px; text-align:start; }
.auth-card .registration-agreement input { width:20px; height:20px; flex:none; margin:2px 0 0; padding:0; accent-color:var(--royal); cursor:pointer; }
.auth-card .registration-agreement label { margin:0; font-size:13px; line-height:1.6; font-weight:400; cursor:pointer; }
.registration-agreement a { color:var(--cyan); text-decoration:underline; text-underline-offset:3px; }
#legal-agreement-help { display:block; margin:8px 0 14px; line-height:1.5; }
.mobile-settings-toggle,.settings-legal-open { display:none; }
html[data-genius-font="14"] { --reply-size:14px; }
html[data-genius-font="16"] { --reply-size:16px; }
html[data-genius-font="18"] { --reply-size:18px; }
html[data-genius-font="20"] { --reply-size:20px; }
html[data-genius-font="24"] { --reply-size:24px; }
body[data-site="visenious_ai"] #messages .message.assistant .text { font-size:var(--reply-size,16px); }
body[data-site="visenious_ai"] #messages .message.assistant .code-block code { font-size:1em; }
body[data-site="visenious_ai"] #messages .message.assistant .sources { font-size:max(12px,calc(var(--reply-size,16px) - 2px)); }
body[data-site="visenious_ai"] #messages .message.assistant .sources small { font-size:inherit; }
body[data-site="visenious_ai"] .account-controls { display:flex; flex-direction:column; align-items:stretch; gap:6px; }
.account-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
body[data-site="visenious_ai"] .account-avatar { display:inline-grid; place-items:center; width:40px; height:40px; flex:none; border-radius:50%; background:#1b365e; color:#eaf1ff; font-size:14px; font-weight:650; letter-spacing:.5px; }
body[data-site="visenious_ai"] .account-settings { display:inline-grid; place-items:center; width:44px; height:44px; padding:0; border-radius:50%; background:transparent; color:var(--mist); border:1px solid transparent; box-shadow:none; }
body[data-site="visenious_ai"] .account-settings:hover { background:#ffffff12; border-color:var(--line); }
body[data-site="visenious_ai"] .legal-link { align-self:flex-start; background:transparent; color:var(--muted); border:0; border-radius:0; box-shadow:none; padding:8px 0; min-height:36px; font-size:12px; font-weight:400; text-align:start; }
.legal-link:hover { text-decoration:underline; }
#account-menu { position:fixed; inset:auto; margin:0; width:300px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:16px; border:1px solid #36517b; border-radius:16px; background:#0b1931; color:var(--mist); box-shadow:0 16px 50px #0008; }
#account-menu::backdrop { background:transparent; }
.settings-heading { display:flex; align-items:center; gap:8px; padding-bottom:10px; border-bottom:1px solid var(--line); }
#account-menu #account-name { flex:1; min-width:0; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
#account-menu #settings-close { flex:none; width:36px; height:36px; min-height:36px; padding:0; font-size:24px; color:var(--muted); }
#account-menu label { margin:16px 0 7px; font-size:13px; }
#account-menu select { min-height:44px; font-size:16px; }
.theme-options { display:flex; gap:8px; margin:16px 0 8px; padding:0; border:0; }
.theme-options legend { margin-bottom:9px; font-size:13px; font-weight:600; }
#account-menu .theme-options button { display:flex; flex:1; flex-direction:column; align-items:center; gap:5px; min-height:58px; padding:8px; color:var(--muted); background:transparent; border:1px solid var(--line); box-shadow:none; font-size:11px; }
#account-menu .theme-options button[aria-pressed="true"] { border-color:var(--cyan); color:var(--mist); background:#17365a; }
#settings-note { margin:10px 0; font-size:11px; }
#account-menu .private-setting { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin:10px 0 0; cursor:pointer; }
#private-state { display:inline-block; margin-left:6px; color:var(--muted); font-size:11px; font-weight:400; }
#account-menu #private-help { margin:0 0 12px; font-size:12px; line-height:1.55; }
#account-menu #private-mode { position:absolute; right:0; width:44px; height:44px; margin:0; opacity:0; z-index:1; cursor:pointer; }
.switch-track { position:relative; display:block; width:38px; height:22px; flex:none; border-radius:20px; background:#53647d; transition:background .15s; }
.switch-track::after { content:''; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:white; transition:transform .15s; }
#private-mode:checked + .switch-track { background:#18afe6; }
#private-mode:checked + .switch-track::after { transform:translateX(16px); }
#private-mode:focus-visible + .switch-track { outline:2px solid var(--mist); outline-offset:4px; }
#private-mode:disabled + .switch-track { opacity:.45; }
#settings-retry { min-height:44px; margin-bottom:8px; }
@media(prefers-reduced-motion:reduce) { .switch-track,.switch-track::after { transition:none; } }
#account-menu .settings-logout { display:block; width:100%; border-top:1px solid var(--line); border-radius:0; text-align:start; padding:12px 0 0; min-height:44px; }
#legal-dialog { padding:0; width:min(1120px,calc(100vw - 24px)); max-width:none; height:min(820px,calc(100dvh - 32px)); max-height:calc(100dvh - 32px); overflow:hidden; }
#legal-dialog[open] { display:flex; flex-direction:column; }
#legal-dialog .legal-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; margin:0; flex:none; }
#legal-dialog h2 { font-size:18px; }
#legal-close { min-width:44px; min-height:44px; padding:0; font-size:25px; }
#legal-load-status { padding:12px 20px; }
#legal-retry { align-self:flex-start; margin:0 20px 16px; }
#legal-content { flex:1; min-height:0; }
@media(max-width:900px) {
 body.mobile-ready .preview { position:sticky; top:0; z-index:12; }
 body.mobile-ready .preview>span { display:none; }
 body.mobile-ready .mobile-settings-toggle:not([hidden]) { display:inline-flex; align-items:center; justify-content:center; flex:0 0 48px; width:48px; height:48px; margin:0; padding:10px; border-radius:12px; border:1px solid var(--line); background:#ffffff0b; color:inherit; box-shadow:none; }
 .mobile-settings-toggle:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
 #account-menu .settings-legal-open { display:block; min-height:44px; width:100%; text-align:start; padding:8px 0; }
 body[data-site="visenious_ai"] .account-settings { width:48px; height:48px; }
 body[data-site="visenious_ai"] .legal-link { min-height:44px; }
 #legal-dialog { width:calc(100vw - 16px); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); }
}
/* A complete light palette, including controls that previously used fixed colors. */
html[data-genius-theme="light"] { color-scheme:light; --ink:#f6f8fc; --field:#fff; --near:#e6eefc; --mist:#152744; --haze:#506280; --line:#ced8e7; --cyan:#006879; --accent:#006879; --muted:#526580; background:var(--ink); color:var(--mist); }
html[data-genius-theme="light"] body { color-scheme:light; }
html[data-genius-theme="light"] :is(.sidebar,.tools) { background:#edf2f9; }
html[data-genius-theme="light"] :is(input,textarea,select,.composer textarea) { background:#fff; color:#152744; border-color:#aebdd3; }
html[data-genius-theme="light"] :is(input,textarea)::placeholder { color:#62738b; }
html[data-genius-theme="light"] :is(button.secondary,.downloads a) { background:#e4ecf8; color:#18365e; border-color:#bac9df; }
html[data-genius-theme="light"] .preview { background:#e6eef9; color:#244771; }
html[data-genius-theme="light"] .preview span { color:#4a6284; }
html[data-genius-theme="light"] #status { background:#eaf3fa; color:#315475; }
html[data-genius-theme="light"] #status.error { background:#fff0ed; color:#a12d25; }
html[data-genius-theme="light"] .eyebrow { color:#506887; }
html[data-genius-theme="light"] :is(.auth-card,.composer) { background:#fffffff2; box-shadow:0 8px 30px #18365e0c; border-color:#c3d0e3; }
html[data-genius-theme="light"] .sidebar nav button { color:#344f72; }
html[data-genius-theme="light"] .sidebar nav button:hover { background:#e1e9f6; }
html[data-genius-theme="light"] .sidebar nav button[aria-current=true] { background:#d9e6fa; color:#133e75; border-color:#a8c1e6; }
html[data-genius-theme="light"] .welcome .brandmark { background:#dbe8fa; }
html[data-genius-theme="light"] .message .author { color:#37629b; }
html[data-genius-theme="light"] .message.user .text { background:#e4edfc; border-color:#d5e1f3; }
html[data-genius-theme="light"] .messages { scrollbar-color:#a1b6d4 transparent; background:transparent; }
html[data-genius-theme="light"] .genie-backdrop { opacity:.075; filter:none; }
html[data-genius-theme="light"] .task-button { color:#345273; }
html[data-genius-theme="light"] .attachment-chip { background:#e8eff9; }
html[data-genius-theme="light"] .tools details { background:transparent; border-color:#c3d0e3; }
html[data-genius-theme="light"] :is(dialog,#account-menu,#install-dialog) { background:#f9fbff; color:#152744; border-color:#b3c4df; }
html[data-genius-theme="light"] #account-menu { box-shadow:0 16px 50px #18365e30; }
html[data-genius-theme="light"] .account-avatar { background:#d5e4fc; color:#153e75; }
html[data-genius-theme="light"] #account-menu .theme-options button[aria-pressed="true"] { background:#dceaf9; border-color:#006879; }
html[data-genius-theme="light"] .compact-composer #send { color:#fff; }
html[data-genius-theme="light"] .compact-composer #send::before { background:#263e61; }
html[data-genius-theme="light"] .compact-composer #send:has(.submit-stop:not([hidden])) { color:#263e61; }
html[data-genius-theme="light"] .recording-discard:hover { background:#ffe4e6; color:#9b2335; }
html[data-genius-theme="light"] audio { color-scheme:light; }
html[data-genius-theme="light"] .code-block { background:#f6f8fd; color:#24374d; border-color:#becde1; }
html[data-genius-theme="light"] .code-header { background:#e7eef9; border-color:#becde1; }
html[data-genius-theme="light"] .code-language { color:#335473; }
html[data-genius-theme="light"] .code-copy { background:#fff; color:#244364; border-color:#9aafca; }
html[data-genius-theme="light"] .inline-code { background:#e4edf8; color:#25456a; }
html[data-genius-theme="light"] .code-feedback { color:#216343; }
html[data-genius-theme="light"] :is(.hljs-comment,.hljs-quote) { color:#5a6d82; }
html[data-genius-theme="light"] :is(.hljs-keyword,.hljs-selector-tag,.hljs-literal) { color:#7036a2; }
html[data-genius-theme="light"] :is(.hljs-string,.hljs-regexp,.hljs-doctag,.hljs-addition) { color:#24653e; }
html[data-genius-theme="light"] :is(.hljs-number,.hljs-symbol,.hljs-bullet,.hljs-variable) { color:#955019; }
html[data-genius-theme="light"] :is(.hljs-title,.hljs-section,.hljs-selector-id,.hljs-selector-class) { color:#195d99; }
html[data-genius-theme="light"] :is(.hljs-built_in,.hljs-type,.hljs-attr,.hljs-attribute) { color:#146774; }
html[data-genius-theme="light"] :is(.hljs-meta,.hljs-name,.hljs-tag,.hljs-deletion) { color:#a52949; }
html[data-genius-theme="light"] .hljs-addition { background:#e2f3e6; }
html[data-genius-theme="light"] .hljs-deletion { background:#ffe5e8; }
html[data-genius-theme="light"] :is(.pwa-notice,.mobile-navigation) { background:#e6eef9; color:#244771; border-color:#bbcae0; }
html[data-genius-theme="light"] :is(#pwa-update-reason,#connection-text) { color:#355473; }
html[data-genius-theme="light"] .mobile-navigation button { background:transparent; color:#526580; }
html[data-genius-theme="light"] .mobile-navigation button[aria-pressed="true"] { color:#123d75; background:#d5e4fa; }
html[data-genius-theme="light"] :is(.preview .install-help,#install-dialog .install-heading,#install-dialog .install-note,#install-dialog .install-selectors select) { background:#e6eef9; color:#244771; }
html[data-genius-theme="light"] #install-dialog :is(p,summary,label,figcaption,.install-domain,#install-status,.install-step .share-caption) { color:#405c7c; }
html[data-genius-theme="light"] #install-dialog .toolbar-bg { fill:#edf3fc; stroke:#6a88b0; }
html[data-genius-theme="light"] #install-dialog .share-highlight { fill:#d2edf2; stroke:#006879; }
html[data-genius-theme="light"] #install-dialog .share-symbol { stroke:#006879; }
@media print {
 body:has(#legal-dialog[open]) > :not(#legal-dialog) { display:none!important; }
 #legal-dialog[open] { position:static; display:block; width:100%; height:auto; max-height:none; overflow:visible; border:0; box-shadow:none; }
 #legal-dialog[open] .legal-dialog-heading { display:none; }
 #legal-content { height:auto; overflow:visible; }
}

/* History actions share the existing account theme. */
#conversations .conversation-row { display:flex; align-items:center; width:100%; min-width:0; border:1px solid transparent; border-radius:8px; }
#conversations .conversation-row[data-current="true"] { background:#152d52; border-color:#255395; }
#conversations .conversation-row button { margin:0; background:transparent; border:0; box-shadow:none; border-radius:7px; }
#conversations .conversation-open { flex:1; min-width:0; width:auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#conversations .conversation-more { flex:0 0 44px; width:44px; min-height:44px; padding:0; font-size:24px; text-align:center; }
#conversations .conversation-row button:hover { background:#ffffff12; }
.conversation-menu { position:fixed; inset:auto; margin:0; width:190px; max-width:calc(100vw - 16px); padding:6px; border:1px solid var(--line); border-radius:12px; background:#0b1931; color:var(--mist); box-shadow:0 12px 40px #0006; }
.conversation-menu::backdrop { background:transparent; }
.conversation-menu button { display:block; width:100%; min-height:44px; text-align:start; padding:10px 12px; background:transparent; border:0; box-shadow:none; color:inherit; }
.conversation-menu button:hover { background:#ffffff12; }
.conversation-menu .conversation-delete { color:#ffb0b0; }
.conversation-confirm { width:460px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; padding:24px; border:1px solid var(--line); border-radius:16px; background:#0b1931; color:var(--mist); }
.conversation-confirm h2 { margin-top:0; font-size:21px; }
.conversation-confirm p { overflow-wrap:anywhere; line-height:1.6; }
.conversation-delete-name { font-weight:600; }
.conversation-dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.conversation-dialog-actions button { min-height:44px; }
.conversation-delete-confirm { background:#a32130; border-color:#c63646; color:white; }
.conversation-action-error { color:#ffb0b0; }
.conversation-print { width:900px; max-width:calc(100vw - 24px); height:calc(100dvh - 32px); max-height:none; padding:0; overflow:auto; background:white; color:#152033; color-scheme:light; border:1px solid #94a3b8; border-radius:12px; }
.conversation-print-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 20px; border-bottom:1px solid #cbd5e1; background:#eff4fa; }
.conversation-print-toolbar p { flex:1; min-width:150px; }
#conversation-print-sheet { padding:28px; overflow-wrap:anywhere; font-size:12pt; line-height:1.6; text-align:start; }
#conversation-print-sheet h1 { font-size:21pt; line-height:1.25; }
#conversation-print-sheet h2 { font-size:12pt; margin:0 0 8px; color:#324764; }
.print-brand,.print-file { color:#475569; font-size:10pt; }
.print-message { margin:24px 0; padding-top:18px; border-top:1px solid #d5dde6; }
.print-message-text { white-space:pre-wrap; }
#conversation-print-sheet pre { white-space:pre-wrap; overflow:visible; overflow-wrap:anywhere; }
#conversation-print-sheet .code-block,#conversation-print-sheet pre,#conversation-print-sheet code,#conversation-print-sheet .code-header { background:#f3f5f7; color:#162234; }
#conversation-print-sheet pre span { color:inherit; }
#conversation-print-sheet .sources { color:#334155; }
#conversation-print-sheet a { color:#1555a0; overflow-wrap:anywhere; }
html[data-genius-theme="light"] .conversation-menu,html[data-genius-theme="light"] .conversation-confirm { background:#f8fbff; color:#152b47; }
html[data-genius-theme="light"] #conversations .conversation-row[data-current="true"] { background:#dceafd; border-color:#8baee0; }
html[data-genius-theme="light"] .conversation-delete,html[data-genius-theme="light"] .conversation-action-error { color:#a32130; }
@media(max-width:900px) { #conversations .conversation-more { flex-basis:48px; width:48px; min-height:48px; } .conversation-confirm { padding:18px; } #conversation-print-sheet { padding:18px; } }
@media print {
 @page { margin:16mm; }
 html:has(body.printing-conversation),body.printing-conversation { height:auto!important; min-height:0!important; overflow:visible!important; background:white!important; padding:0!important; margin:0!important; color:black!important; }
 body.printing-conversation > :not(#conversation-print) { display:none!important; }
 body.printing-conversation #conversation-print { display:block!important; position:static!important; inset:auto!important; margin:0!important; width:auto!important; max-width:none!important; height:auto!important; max-height:none!important; overflow:visible!important; border:0!important; border-radius:0!important; box-shadow:none!important; padding:0!important; }
 #conversation-print::backdrop { display:none; }
 .conversation-print-toolbar { display:none!important; }
 #conversation-print-sheet { padding:0; }
 #conversation-print-sheet h1,#conversation-print-sheet h2 { break-after:avoid; }
 #conversation-print-sheet a[href]::after { content:' (' attr(href) ')'; font-size:9pt; }
 #conversation-print-sheet pre,#conversation-print-sheet .code-block { max-height:none; overflow:visible; break-inside:auto; }
 #conversation-print-sheet * { box-shadow:none!important; text-shadow:none!important; }
}

.connected-apps-button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 4px;margin:0 0 7px;background:transparent;color:var(--mist);border:1px solid transparent;box-shadow:none;text-align:start;font-size:13px;font-weight:500}.connected-apps-button:hover{background:#ffffff0b;border-color:var(--line)}.connections-chevron{margin-left:auto;color:var(--muted);font-size:22px}.connected-apps-button:focus-visible,.connection-entry:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
#connections-menu{position:fixed;margin:0;padding:18px;width:310px;max-width:calc(100vw - 24px);border:1px solid var(--line);border-radius:16px;background:var(--ink);color:var(--mist);box-shadow:0 18px 60px #0008;overflow:auto}#connections-menu::backdrop{background:#030a1c77}.connections-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 8px}.connections-heading h2{margin:0;font-size:18px}.connections-heading .eyebrow{margin:0 0 5px}.connections-close{display:grid;place-items:center;flex:none;width:38px;height:38px;padding:0;background:transparent;border:1px solid transparent;box-shadow:none;color:var(--mist);font-size:24px}.connections-close:hover{background:#ffffff0c;border-color:var(--line)}.connections-intro,.connections-footnote{font-size:12px;line-height:1.6;color:var(--muted);margin:4px 0 16px}.connections-footnote{border-top:1px solid var(--line);padding-top:14px;margin:12px 0 0}.connection-entry{display:flex;align-items:center;gap:12px;width:100%;min-height:65px;padding:12px 8px;text-align:start;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--mist);box-shadow:none}.connection-entry:hover:not(:disabled){border-color:var(--line);background:#ffffff0b}.connection-entry:disabled{opacity:.6;cursor:default}.connection-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;color:white;font-weight:700;font-size:18px}.telegram-icon{background:#168bc7}.whatsapp-icon{background:#238d59}.messenger-icon{background:#6356cc}.connection-label{display:flex;flex:1;flex-direction:column;gap:5px}.connection-label strong{font-size:14px;font-weight:600}.connection-label small{font-size:11px;font-weight:400;color:var(--muted)}
#telegram-dialog{width:min(660px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--ink);color:var(--mist);overflow:auto}#telegram-dialog::backdrop{background:#030a1cbb}#telegram-dialog section{margin:18px 0}#telegram-dialog label{display:block;margin-bottom:8px}#telegram-body{box-sizing:border-box;width:100%;resize:vertical;min-height:110px;font:15px/1.6 system-ui}#telegram-preview{white-space:pre-wrap;overflow-wrap:anywhere;text-align:start;background:var(--field);border:1px solid var(--line);border-radius:12px;padding:16px;font:15px/1.6 system-ui;max-height:280px;overflow:auto}#telegram-dialog .muted,.connection-hint{font-size:12px;line-height:1.6;color:var(--muted)}#telegram-link{display:inline-block;color:var(--cyan);padding:10px 0}#telegram-status{border-left:2px solid var(--cyan);padding-left:12px;font-size:14px;line-height:1.6}.connection-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.connection-actions .text-button{min-height:44px}#telegram-dialog [hidden],#connections-menu [hidden]{display:none!important}#connections-settings{display:none}
@media(max-width:900px){#connections-settings{display:block;min-height:44px;width:100%;text-align:start}#telegram-dialog{padding:18px}#connections-menu{width:min(330px,calc(100vw - 24px))}}
html[data-genius-theme="light"] :is(#connections-menu,#telegram-dialog){background:#f9fbff;color:#152744;box-shadow:0 16px 50px #18365e30}html[data-genius-theme="light"] :is(.connected-apps-button,.connection-entry):hover:not(:disabled){background:#e4ecf8}
.telegram-chat-link{display:inline-flex;align-items:center;min-height:44px;padding:10px 18px;margin:8px 0;border-radius:10px;background:#1769df;color:#fff;font-weight:600;text-decoration:none}.telegram-chat-link:hover{background:#247bf2}.telegram-chat-link:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}#telegram-tools{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}#telegram-tools>summary{font-size:13px;cursor:pointer;color:var(--muted);padding:8px 0}#telegram-chat-info{line-height:1.6}
