:root {
  --chat-bg: #181e26;
  --chat-surface: #252c37;
  --chat-card: #212832;
  --chat-border: #354358;
  --chat-border-soft: #323a47;
  --chat-text: #e4e9f0;
  --chat-muted: #a8b5c8;
  --chat-blue: #51a4ff;
  --chat-blue-soft: #253b56;
  --chat-green: #56bf66;
}
.chat-shell {display:block;min-height:0;color:var(--chat-text);font-family:Inter,"Microsoft YaHei",system-ui,sans-serif}
.chat-shell svg {width:18px;height:18px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.chat-shell button {cursor:pointer}
.chat-shell button:disabled {cursor:not-allowed;opacity:.45}
.chat-shell button:focus-visible,.chat-shell summary:focus-visible {outline:2px solid var(--chat-blue);outline-offset:3px}
.chat-sidebar {position:fixed;inset:0 auto 0 0;z-index:5;width:172px;display:flex;flex-direction:column;padding:0 8px 16px;background:#17181d;border-right:1px solid var(--chat-border);overflow:auto}
.chat-brand {height:76px;flex:0 0 76px;display:flex;align-items:center;gap:9px;margin:0 -8px 17px;padding:0 14px;border-bottom:1px solid #2c3644;color:#eef4f8;white-space:nowrap}
.chat-brand img {width:32px;height:32px;flex:0 0 32px;object-fit:contain;background:transparent}
.chat-brand-name {display:inline-flex;align-items:baseline;font-size:14px;font-weight:800;line-height:1;letter-spacing:0}
.chat-brand-primary {color:#f1f5f8}
.chat-brand-accent {color:#00d8cc;font:inherit}
.chat-nav-label {padding:0 8px 10px;color:#aab7cb;font-size:11px;font-weight:600}
.chat-nav-label-spaced {padding-top:20px;margin-top:22px;border-top:1px solid #3b4353}
.recharge-zone-label {display:flex;align-items:center;gap:7px;padding-top:20px;margin-top:22px;border-top:1px solid #3b4353;color:#76d7d1}
.recharge-zone-label::before {content:"";width:5px;height:5px;border-radius:50%;background:#00d8cc;box-shadow:0 0 8px #00d8cc99}
.recharge-zone-nav .chat-nav-item {color:#c0ccd9}
.recharge-zone-nav .chat-nav-item svg {color:#63cfc8}
.recharge-zone-nav .chat-nav-item:hover {background:#1d3438;color:#e9fffd}
.chat-nav {display:grid;gap:4px}
.chat-nav-item {display:flex;align-items:center;gap:12px;width:100%;height:44px;padding:0 14px;border:0;border-radius:0;background:transparent;color:#b1bed0;font-size:13px;text-align:left;text-decoration:none;transition:background .15s,color .15s}
.chat-nav-item svg {width:16px;height:16px;color:#a6a8ae}
.chat-nav-item:hover {background:#222a36;color:#f0f5fb}
.chat-nav-item.active {border-radius:10px 0 0 10px;background:#222c3a;color:#62a7ff;box-shadow:inset 2px 0 #65a9ff}
.chat-nav-item.active svg {color:#62a7ff}
.service-nav-short {display:none}
body:not(.account-authenticated) .chat-nav-item[data-history-mode] {display:none}
.chat-sidebar-spacer {flex:1;min-height:30px}
.chat-sidebar-foot {display:block;padding:14px 8px 2px;border-top:1px solid #323b49;color:#718198;font-size:10px}
.chat-sidebar-branding {display:flex;flex-direction:column;gap:4px;line-height:1.35}
.chat-online-dot {width:6px;height:6px;border-radius:50%;background:#59c38b}
.chat-account-mini {margin-left:auto;border:0;background:transparent;color:#75aaff;font-size:10px}
.chat-topbar {position:fixed;top:0;left:172px;right:0;z-index:6;height:56px;display:flex;align-items:center;gap:12px;padding:0 24px;background:#191e27;border-bottom:1px solid #2e3642}
.chat-topbar-spacer {flex:1}
.chat-toolbar-menu {position:relative;display:flex;align-items:center}
.chat-appearance-button {display:flex;align-items:center;gap:7px;height:35px;padding:0 5px;border:0;border-radius:8px;background:transparent;color:#d4dae3;font-size:13px;font-weight:600}
.chat-toolbar-icon {display:grid;place-items:center;width:34px;height:36px;padding:0;border:0;border-radius:50%;background:#33363e;color:#c4c9d1}
.chat-toolbar-icon:hover,.chat-profile-button:hover {background:#414650}
.chat-appearance-button:hover {background:#2c333e}
.chat-shell svg.chat-chevron {width:12px;height:12px;color:#a3a8b2}
.chat-profile-button {display:flex;align-items:center;gap:6px;height:36px;max-width:220px;padding:0 9px 0 5px;border:0;border-radius:20px;background:#33363e;color:#d4d9e1;font-size:12px;font-weight:600}
.chat-profile-button #chatProfileName {max-width:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-profile-avatar {display:grid;place-items:center;width:24px;height:24px;flex-shrink:0;border-radius:50%;background:#8ab708;color:white;font-size:11px;font-weight:700}
.chat-toolbar-popover {position:absolute;right:0;top:calc(100% + 8px);min-width:132px;padding:7px 0;border:1px solid #424853;border-radius:7px;background:var(--chat-card);box-shadow:0 12px 35px #0005;color:var(--chat-text);font-size:13px}
.chat-toolbar-popover button {display:flex;align-items:center;gap:10px;width:100%;height:39px;padding:0 16px;border:0;background:transparent;color:inherit;font-size:13px;font-weight:600;white-space:nowrap;text-align:left}
.chat-toolbar-popover button:hover {background:#2d394b}
.chat-toolbar-popover button svg {width:15px;height:15px}
.chat-toolbar-popover>strong,.chat-toolbar-popover>p {display:block;padding:8px 15px;margin:0;white-space:nowrap}
.chat-toolbar-popover>p {font-size:12px;color:var(--chat-muted)}
.chat-main {min-height:100dvh;margin-left:172px;padding:88px 30px 22px;background:radial-gradient(ellipse at 0 0,#28323f 0,#1d242e 46%,#181d25 100%)}
.chat-main-head {display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1460px;margin:0 auto 20px}
.chat-main-head h2 {margin:0;color:#dfe6ef;font-size:23px;line-height:29px;font-weight:700}
.chat-main-head p {margin:3px 0 0;color:#a5b3c7;font-size:13px;line-height:19px}
.chat-head-actions {display:flex;align-items:center;gap:15px}
.chat-quota {color:#a9c7ee;font-size:11px;white-space:nowrap}
.chat-wallpaper-actions {position:relative;display:flex;align-items:center;gap:6px}
.chat-wallpaper-btn {display:flex;align-items:center;gap:7px;height:34px;padding:0 11px;border:1px solid #3b4656;border-radius:8px;background:#292f39;color:#cbd4df;font-size:12px;font-weight:650}
.chat-wallpaper-btn svg,.chat-wallpaper-menu svg {width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.chat-wallpaper-btn:hover {border-color:#6099df;background:#30435b;color:#eff6ff}
.wallpaper-chevron {width:12px!important;height:12px!important;margin-left:2px;transition:transform .15s}
.chat-wallpaper-btn[aria-expanded="true"] .wallpaper-chevron {transform:rotate(180deg)}
.chat-wallpaper-menu {position:absolute;z-index:20;top:calc(100% + 7px);right:0;width:154px;padding:6px;border:1px solid #41516a;border-radius:8px;background:#202a38;box-shadow:0 12px 30px #0007}
.chat-wallpaper-menu button {display:flex;align-items:center;gap:9px;width:100%;height:36px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:#cbd6e5;font-size:12px;text-align:left;cursor:pointer}
.chat-wallpaper-menu button:hover {background:#2d3c50;color:#fff}
.chat-wallpaper-menu button:disabled {color:#6f7e91;cursor:default;background:transparent}
.chat-debug-btn {display:flex;align-items:center;gap:8px;height:38px;padding:0 15px;border:0;border-radius:11px;background:#35383f;color:#e0e4ea;font-size:13px;font-weight:700}
.chat-debug-btn svg {width:15px;height:15px}
.chat-debug-btn:hover {background:#444b57}
.chat-workspace {display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:24px;max-width:1460px;margin:0 auto}
.chat-config-card,.chat-panel {border:1px solid var(--chat-border);border-radius:16px;background:var(--chat-card)}
.chat-config-card {display:flex;flex-direction:column;min-width:0;height:max(570px,calc(100dvh - 181px));padding:24px 20px 20px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#46576d transparent}
.chat-card-title {display:flex;align-items:center;gap:8px;padding-bottom:23px;font-size:13px;font-weight:700}
.chat-card-icon {color:#58a2ff}
.chat-field {display:grid;gap:9px;margin:0 0 24px;color:#dde4ed;font-size:13px;font-weight:600}
.chat-field>span {display:flex;align-items:center;gap:8px}
.chat-field>span svg {width:16px;height:16px;color:#bfc5ce}
.chat-field select,.chat-field input {width:100%;height:33px;min-width:0;border:1px solid var(--chat-border);border-radius:9px;background:var(--chat-surface);color:#e5e9ef;padding:0 11px;font-size:13px;font-weight:500;text-overflow:ellipsis}
.chat-field select:focus,.chat-field input:focus {border-color:#5f9ae8;outline:none;box-shadow:0 0 0 2px #579df41c}
.chat-field-help {margin:-15px 0 19px;color:#8d9caf;font-size:10px;line-height:1.5}
.chat-image-controls {display:flex;align-items:center;gap:7px;padding-top:0}
.chat-image-controls>.chat-toggle-row {flex:1;margin:0;padding:0}
.chat-toggle-row {position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#dbe2ec;font-size:13px;font-weight:600;cursor:pointer}
.chat-toggle-row>span:first-child {display:flex;align-items:center;gap:8px}
.chat-toggle-row svg {width:16px;height:16px;color:#c2c8d1}
.chat-toggle-row input {position:absolute;right:0;width:28px;height:22px;opacity:0;cursor:pointer}
.chat-toggle-row i {position:relative;display:block;flex-shrink:0;width:26px;height:15px;border-radius:12px;background:#3e434c;pointer-events:none}
.chat-toggle-row i::after {content:"";position:absolute;width:12px;height:12px;left:2px;top:1.5px;border-radius:50%;background:#f8fafc;transition:left .15s}
.chat-toggle-row input:checked+i {background:var(--chat-green)}
.chat-toggle-row input:checked+i::after {left:12px}
.chat-toggle-row input:focus-visible+i {outline:2px solid var(--chat-blue);outline-offset:3px}
.chat-add-image {display:grid;place-items:center;width:17px;height:17px;padding:0;border:0;border-radius:50%;background:#3b414a;color:#bec7d5;font-size:17px;line-height:1}
.chat-add-image:hover {color:#fff;background:#4a607d}
.chat-image-field {padding:0 0 22px;font-size:12px}
.chat-image-field>p {margin:9px 0 9px;color:#dce2eb;font-size:12px;line-height:1.6}
.chat-image-list {display:grid;gap:8px}
.chat-image-row {display:flex;align-items:center;gap:7px;min-width:0}
.chat-image-row input {width:100%;min-width:0;height:26px;padding:0 9px;border:1px solid var(--chat-border);border-radius:8px;background:var(--chat-surface);font-size:11px;color:var(--chat-text)}
.chat-image-row input:disabled {opacity:.35}
.chat-image-remove {display:grid;place-items:center;flex-shrink:0;width:18px;height:22px;padding:0;border:0;background:transparent;color:#8995a6;font-size:16px}
.chat-image-remove:hover {color:#ef9a9a}
.chat-stream-row {margin:0;padding:2px 0 27px}
.chat-advanced {flex-shrink:0;padding:15px 0;border-block:1px solid var(--chat-border-soft);color:#e0e6ee;font-size:12px}
.chat-advanced summary {list-style:none;cursor:pointer;font-weight:650}
.chat-advanced summary::-webkit-details-marker {display:none}
.chat-advanced summary::before {content:"";display:inline-block;width:0;height:0;margin-right:7px;border-block:4px solid transparent;border-left:5px solid #d6deea;transition:transform .15s}
.chat-advanced[open] summary::before {transform:rotate(90deg)}
.chat-advanced-fields {display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:16px;color:#aab7c9;font-size:11px}
.chat-advanced-fields label {display:grid;gap:6px;min-width:0}
.chat-advanced-fields input {width:100%;height:31px;padding:0 8px;border:1px solid var(--chat-border);border-radius:7px;background:var(--chat-surface);color:var(--chat-text);font-size:12px}
.chat-context-row {padding:18px 0 5px;font-size:12px}
.chat-system-label {display:block;margin:14px 0 7px;color:#acb9cb;font-size:11px}
.chat-advanced textarea,.chat-custom-field textarea {min-height:88px;padding:9px;border:1px solid var(--chat-border);border-radius:8px;background:var(--chat-surface);color:var(--chat-text);font-size:11px;line-height:1.7;resize:vertical}
.chat-advanced-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.chat-custom-section {flex-shrink:0;margin-top:24px;border-block:1px solid var(--chat-border-soft)}
.custom-mode-row {margin:0;padding:19px 0 20px;font-size:13px}
.chat-custom-field {padding-bottom:15px}
.chat-custom-field>label {display:block;margin-bottom:8px;color:var(--chat-muted);font-size:11px}
.chat-custom-field textarea {font-family:Consolas,monospace}
.chat-custom-field small {display:block;margin-top:7px;color:var(--chat-muted);font-size:10px}
.chat-config-bottom {margin-top:auto;padding-top:19px;flex-shrink:0}
.chat-save-line {display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:12px;font-size:12px;color:#d9e1ec}
.chat-save-line>span {white-space:nowrap;font-size:11px}
.chat-reset-config {display:grid;place-items:center;width:21px;height:21px;flex-shrink:0;padding:0;border:0;background:transparent;color:#e18254}
.chat-reset-config svg {width:14px;height:14px}
.chat-config-file-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.chat-secondary-action {display:flex;align-items:center;justify-content:center;gap:7px;height:30px;padding:0 10px;border:1px solid var(--chat-border-soft);border-radius:8px;background:transparent;color:#c4d1e2;font-size:11px;font-weight:600}
.chat-secondary-action svg {width:13px;height:13px}
.chat-secondary-action:hover {border-color:#578ada;color:#eaf1ff;background:#273346}
.chat-export-action {border-color:#2768ed;background:#2864ec;color:#fff}
.chat-export-action:hover {background:#3c79ff}
.chat-import-action {color:#54aaff}
.chat-debug {flex-shrink:0;max-height:280px;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;font:10px/1.7 Consolas,monospace;color:#b0c6e0;border:1px solid var(--chat-border);border-radius:8px;background:#1a212b;padding:10px;margin:15px 0 0}
.chat-config-card:focus {outline:2px solid var(--chat-blue);outline-offset:3px}
.chat-panel {position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;height:max(570px,calc(100dvh - 181px));overflow:hidden;background-image:linear-gradient(180deg,#11192338,#11192366),var(--chat-wallpaper,url('assets/chat-wallpaper.png?v=20261013-46'));background-size:cover;background-position:center;background-repeat:no-repeat}
.chat-ambient {position:relative;z-index:3;display:flex;align-items:center;gap:18px;width:100%;min-height:62px;flex:0 0 62px;padding:8px 20px;border-bottom:1px solid #344154;background:#111a26db;backdrop-filter:blur(8px);pointer-events:none;text-align:left;color:#f2f7ff;text-shadow:0 2px 12px #07101dcc}
.chat-ambient-weather {order:5;display:flex;align-items:center;gap:6px;min-height:23px;color:#eaf3ff;font-size:13px;font-weight:700}
.chat-weather-icon {display:inline-grid;place-items:center;width:20px;height:20px;color:#ffd778;font-size:18px;line-height:1}
.chat-ambient-weather small {color:#c9d7e8;font-size:10px;font-weight:500}
.chat-ambient-time {order:1;display:block;color:#fff;font:600 25px/1 "Segoe UI","Microsoft YaHei",sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
.chat-ambient-date {order:2;color:#d9e5f3;font-size:11px;font-weight:600;white-space:nowrap}
.chat-ambient-region {order:3;display:flex;align-items:center;gap:6px;color:#e7f1fc;font-size:11px;white-space:nowrap}
.chat-ambient-region>span {width:6px;height:6px;border-radius:50%;background:#62a8ff;box-shadow:0 0 10px #62a8ff}
.chat-ambient-region b {font-size:11px}.chat-ambient-region small {color:#afc0d3;font-size:9px;font-weight:500}
.chat-ambient-greeting {order:4;margin-left:auto;color:#d8e4f2;font-size:12px;font-weight:600;white-space:nowrap}
.chat-panel-head {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-shrink:0;height:60px;padding:0 22px;border-bottom:1px solid var(--chat-border-soft);font-size:13px}
.chat-panel-head>div {display:flex;align-items:center;gap:10px}
.chat-panel-head svg {width:16px;height:16px}
.chat-provider-label {max-width:55%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#adbbd0;font-size:11px}
.chat-messages {position:relative;z-index:2;flex:1;min-height:0;padding:20px 24px 16px;overflow-y:auto;overscroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#47566d transparent;background:transparent}
.chat-message {position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;column-gap:11px;width:100%;max-width:none;margin:0 0 24px}
.chat-message:first-child {margin-top:0}
.chat-message.user {grid-template-columns:minmax(0,1fr) 28px}
.chat-avatar {display:grid;place-items:center;width:26px;height:26px;margin-top:1px;border:1px solid #ffffff20;border-radius:7px;font-size:12px;line-height:1;color:white;box-shadow:0 3px 10px #0004}
.assistant-avatar {background:#6558cc;color:#fff;font-size:14px}
.user-avatar {background:#3b668b;color:white;font-size:11px;font-weight:700}
.chat-message.user .chat-avatar {grid-column:2;grid-row:1}
.chat-bubble {justify-self:start;max-width:min(72%,800px);padding:12px 14px;border:1px solid #ffffff17;border-radius:8px;background:#182330ed;box-shadow:0 5px 18px #04080f40;color:#edf2f7;font-size:13px;line-height:1.65;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.chat-message.assistant .chat-bubble {font-size:12px;line-height:1.6}
.chat-message.user .chat-bubble {grid-column:1;grid-row:1;justify-self:end;max-width:min(72%,800px);border-color:#52718f;background:#2b4055ed;color:#f6f9fc}
.chat-message-actions {grid-column:2;display:flex;align-items:center;gap:12px;margin-top:9px;color:#9eacbd}
.chat-message.user .chat-message-actions {grid-column:1;justify-content:flex-end}
.chat-message-actions button {display:grid;place-items:center;width:17px;height:18px;padding:0;border:0;background:transparent;color:inherit}
.chat-message-actions button:hover {color:#63a9ff}
.chat-message-actions svg {width:15px;height:15px}
.chat-prompt-actions {display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:11px;border-top:1px solid #ffffff17}
.chat-prompt-actions button {display:inline-flex;align-items:center;justify-content:center;gap:7px;height:34px;padding:0 12px;border:1px solid #4b6684;border-radius:7px;background:#243447;color:#e4eef9;font-size:11px;font-weight:650;letter-spacing:0;transition:border-color .15s,background .15s,color .15s,transform .15s}
.chat-prompt-actions button svg {width:15px;height:15px;stroke:currentColor;stroke-width:1.8}
.chat-prompt-actions button:hover {border-color:#6fb3ff;background:#2d4661;color:#fff;transform:translateY(-1px)}
.chat-prompt-actions .image-prompt-action {color:#8fc5ff}
.chat-prompt-actions .video-prompt-action {border-color:#3b7375;color:#79ddd7;background:#203c43}
.chat-prompt-actions .video-prompt-action:hover {border-color:#00d8cc;background:#285258;color:#c5fffb}
.chat-prompt-actions button span {color:inherit;line-height:1}
.chat-message-image {display:block;max-width:min(210px,100%);max-height:160px;border-radius:8px;margin:8px 0 2px;object-fit:contain}
.chat-composer {position:relative;z-index:3;flex-shrink:0;padding:0 16px 15px;background:linear-gradient(180deg,#11192326,#11192373)}
.chat-attachments {display:flex;align-items:center;gap:8px;min-height:62px;padding:8px 4px 7px;overflow-x:auto}
.chat-attachment {position:relative;width:54px;height:54px;flex:0 0 54px;margin:0;border:1px solid var(--chat-border);border-radius:8px;background:var(--chat-surface);overflow:hidden}
.chat-attachment img {width:100%;height:100%;display:block;object-fit:cover}
.chat-attachment figcaption {position:absolute;inset:auto 2px 2px;padding:2px 3px;border-radius:3px;background:#101720cc;color:#fff;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-attachment button {position:absolute;top:2px;right:2px;display:grid;place-items:center;width:17px;height:17px;padding:0;border:0;border-radius:50%;background:#111a25db;color:#fff;font-size:13px;line-height:1}
.chat-attachment button:hover {background:#d84b56}
.chat-input-bar {display:flex;align-items:center;gap:14px;min-height:59px;padding:10px 12px;border:1px solid #58708d99;border-radius:13px;background:#182434b5;backdrop-filter:blur(7px);transition:border-color .15s}
.chat-input-bar:focus-within {border-color:#6699de;box-shadow:0 0 0 2px #609ef510}
.chat-input-bar.is-dragging {border-color:#62a8ff;background:#25364b;box-shadow:0 0 0 3px #5ca0ff22}
.chat-clear-btn {display:grid;place-items:center;flex-shrink:0;width:26px;height:29px;padding:0;border:0;background:transparent;color:#8db4f4}
.chat-clear-btn svg {width:19px;height:19px}
.chat-clear-btn:hover {color:#c4d8ff}
.chat-attach-btn {display:grid;place-items:center;flex-shrink:0;width:26px;height:29px;padding:0;border:0;background:transparent;color:#a9b8cb}
.chat-attach-btn svg {width:19px;height:19px}
.chat-attach-btn:hover {color:#74adff}
.chat-composer textarea {display:block;flex:1;min-width:0;width:100%;height:30px;min-height:30px;max-height:120px;padding:5px 1px;border:0;box-shadow:none;border-radius:0;resize:none;background:transparent;color:#e6ebf4;font-size:13px;line-height:20px;outline:none}
.chat-composer textarea:focus {border:0;box-shadow:none}
.chat-composer textarea::placeholder {color:#9bA5b3}
.chat-send-btn {display:grid;place-items:center;flex-shrink:0;width:33px;height:33px;min-width:33px;padding:5px;border:0;border-radius:50%;background:#619aff;color:white;font-size:12px;font-weight:600}
.chat-send-btn svg {width:24px;height:24px;stroke-width:2}
.chat-send-btn:hover {background:#77a9ff}
.chat-send-btn:disabled {opacity:.55}
.chat-composer-foot {display:flex;align-items:center;min-height:0;margin-top:5px;padding:0 4px}
.chat-status {color:#8190a5;font-size:10px;line-height:14px}
.chat-status:empty {display:none}
.chat-retention {margin-left:auto;padding-left:10px;color:#8190a5;font-size:10px;line-height:14px;white-space:nowrap}
.chat-inline-error {margin:9px 0 0;padding:0 3px;color:#ffb6b6;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.chat-welcome {display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;padding:40px 20px;text-align:center}
.chat-welcome-mark {display:grid;place-items:center;width:58px;height:58px;margin:0 auto;border:0;background:transparent;box-shadow:none;color:#7eb3ff}
.chat-welcome-robot {will-change:transform;animation:chat-robot-bounce 1.55s ease-in-out infinite}
.chat-welcome-robot svg {width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@keyframes chat-robot-bounce {0%,100%{transform:translateY(0)}45%{transform:translateY(-11px) scale(1.04)}65%{transform:translateY(-6px) scale(1.01)}}
.chat-welcome h3 {margin:0;padding:7px 13px;border-radius:8px;background:#121b27a6;box-shadow:0 5px 18px #0003;color:#edf4ff;font-size:17px;font-weight:500;text-shadow:0 1px 5px #000}
.chat-welcome p {margin:0;color:#8d9baf;font-size:12px;line-height:1.6}
.chat-suggestions {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:23px auto 0;max-width:460px}
.chat-suggestions button {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px;border:1px solid #38485e;border-radius:8px;background:#252e3c;color:#adbdd3;text-align:left;font-size:11px}
.chat-suggestions button:hover {color:#dce9fb;border-color:#5a83ba}
.chat-suggestions button span {color:#6e9bd6}
.chat-empty {padding:70px 20px;text-align:center;color:#8897aa;font-size:12px}
.chat-typing {display:flex;align-items:center;gap:4px;padding:8px 2px}
.chat-typing i {display:block;width:5px;height:5px;border-radius:50%;background:#b2c2db;animation:chat-pulse 1.3s infinite}
.chat-typing i:nth-child(2) {animation-delay:.15s}
.chat-typing i:nth-child(3) {animation-delay:.3s}
@keyframes chat-pulse {0%,70%,100%{opacity:.3;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
body[data-page="chat"]>.app-shell>.topbar,body[data-page="chat"]>.app-shell>.workspace {display:none}
body:not([data-page="chat"]) .chat-main {display:none}
.history-panel {display:none}
body[data-page="history"] .history-panel {display:block;margin-top:0}
body[data-page="history"] .workspace>.studio-heading,
body[data-page="history"] .workspace>.model-bar,
body[data-page="history"] .workspace>.creation-grid,
body[data-page="history"] .workspace>.bottom-branding {display:none}
body:not([data-page="chat"])>.app-shell>.topbar {display:none}
body:not([data-page="chat"])>.app-shell>.workspace {width:auto;max-width:none;min-height:100dvh;margin:0 0 0 172px;padding:88px 30px 54px;background:radial-gradient(ellipse at 0 0,#28323f 0,#1d242e 46%,#181d25 100%)}
body:not([data-page="chat"])>.app-shell>.workspace>.studio-heading,
body:not([data-page="chat"])>.app-shell>.workspace>.model-bar,
body:not([data-page="chat"])>.app-shell>.workspace>.creation-grid,
body:not([data-page="chat"])>.app-shell>.workspace>.details-panel,
body:not([data-page="chat"])>.app-shell>.workspace>.bottom-branding {width:100%;max-width:1460px;margin-left:auto;margin-right:auto}
@media(max-width:1100px) {.chat-main {padding:84px 20px 20px}.chat-workspace {grid-template-columns:minmax(0,1fr);gap:20px}.chat-quota {display:none}.chat-panel {height:max(570px,calc(100dvh - 175px))}.chat-suggestions {grid-template-columns:1fr}.chat-topbar {padding-inline:20px}}
@media(max-width:900px) {.chat-workspace {grid-template-columns:minmax(0,1fr);gap:16px}.chat-main {padding-inline:16px}.chat-panel-head {padding-inline:16px}.chat-topbar {gap:10px}}
@media(max-width:760px) {
  .chat-sidebar {position:relative;inset:auto;width:100%;height:auto;padding:0 10px 10px;border-right:0;border-bottom:1px solid var(--chat-border);overflow:visible}
  .chat-brand {height:58px;flex-basis:58px;margin:0 -10px 8px;padding:0 16px}.chat-brand img {width:29px;height:29px;flex-basis:29px}.chat-brand-name {font-size:14px}.chat-nav-label,.chat-nav-label-spaced,.secondary-nav,.chat-sidebar-spacer,.chat-sidebar-foot {display:none}
  .recharge-zone-label {display:flex;margin:10px 0 0;padding:10px 4px 2px;border-top:1px solid #354052;font-size:10px}
  .recharge-zone-nav {margin-top:5px!important}
  .chat-nav {display:flex;gap:6px;margin-top:13px}.chat-nav-item {height:35px;flex:1;justify-content:center;padding:0 8px;font-size:12px}.chat-nav-item.active {border-radius:7px;box-shadow:none}
  .service-nav-full {display:none}.service-nav-short {display:inline}
  .chat-topbar {position:relative;left:auto;right:auto;top:auto;height:52px;padding:0 12px;gap:11px}.chat-toolbar-icon {width:32px;height:33px}.chat-profile-button {height:34px;max-width:185px}.chat-profile-button #chatProfileName {max-width:114px}
  .chat-main {margin-left:0;min-height:calc(100dvh - 156px);padding:22px 12px}.chat-main-head {margin-bottom:16px;gap:10px}.chat-main-head h2 {font-size:21px}.chat-main-head p {font-size:11px}.chat-debug-btn {height:34px;padding-inline:10px;font-size:12px}
  .chat-workspace {grid-template-columns:1fr;gap:16px}.chat-config-card {height:auto;max-height:none;min-height:0;padding:20px}.chat-card-title {padding-bottom:20px}.chat-config-bottom {margin-top:12px}.chat-panel {height:580px;min-height:450px;max-height:calc(100dvh - 34px)}.chat-ambient{gap:12px;min-height:58px;flex-basis:58px;padding-inline:14px}.chat-ambient-time{font-size:21px}.chat-ambient-date{font-size:10px}.chat-ambient-greeting{display:none}.chat-messages {padding:16px 14px}.chat-panel-head {padding-inline:18px}.chat-composer {padding:0 14px 13px}.chat-input-bar {gap:10px}.chat-welcome {padding:30px 15px}.chat-suggestions {grid-template-columns:1fr 1fr}.chat-save-line>span {font-size:12px}.chat-image-field>p {font-size:12px}
  body:not([data-page="chat"])>.app-shell>.workspace {width:auto;min-height:calc(100dvh - 156px);margin:0;padding:22px 12px 40px}
}
@media(max-width:400px) {.chat-topbar {gap:7px}.chat-appearance-button {gap:4px;font-size:12px}.chat-profile-button {max-width:149px}.chat-profile-button #chatProfileName {max-width:85px}.chat-suggestions {grid-template-columns:1fr}}
@media(max-width:520px) {.chat-wallpaper-btn span,.wallpaper-chevron {display:none}.chat-wallpaper-btn {width:34px;padding:0;justify-content:center}.chat-ambient {gap:9px;padding-inline:11px}.chat-ambient-date,.chat-ambient-zone,.chat-ambient-greeting,.chat-ambient-weather small {display:none}.chat-ambient-time {font-size:20px}.chat-bubble,.chat-message.user .chat-bubble {max-width:88%}.chat-prompt-actions {align-items:stretch;flex-direction:column}.chat-prompt-actions button {width:100%}}
@media(prefers-reduced-motion:reduce) {.chat-typing i,.chat-welcome-robot {animation:none}.chat-toggle-row i::after,.chat-nav-item {transition:none}}

.chat-about-version-btn{display:block;width:100%;margin:0 0 8px;padding:5px 0;border:0;background:transparent;color:#7890aa;font-size:10px;text-align:left;cursor:pointer}.chat-about-version-btn:hover{color:#79b7ff}.chat-version-modal{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:18px;background:#050910b8;backdrop-filter:blur(4px)}.chat-version-modal.hidden{display:none}.chat-version-card{width:min(440px,100%);overflow:hidden;border:1px solid #405875;border-radius:12px;background:#1d2938;color:#eaf2fb;box-shadow:0 24px 70px #000b}.chat-version-card header{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 22px 15px;border-bottom:1px solid #33475d}.chat-version-card header span{color:#78b8ff;font-size:11px}.chat-version-card h2{margin:5px 0 0;font-size:19px}.chat-version-card header button{border:0;background:transparent;color:#b7c6d6;font-size:26px;cursor:pointer}.chat-version-body{display:grid;gap:12px;padding:20px 22px}.chat-version-row{display:flex;justify-content:space-between;gap:15px;padding:10px 12px;border:1px solid #374e67;border-radius:7px;background:#192738;color:#a8bbce;font-size:12px}.chat-version-row strong{color:#dff2ff}.chat-version-row.hidden{display:none}.chat-version-body p{margin:0;color:#8ea4ba;font-size:12px;line-height:1.65}.chat-version-notes{white-space:pre-wrap;color:#cddbea;font-size:12px;line-height:1.7}.chat-version-card .primary-btn{width:100%;height:40px}.chat-version-card .primary-btn.hidden{display:none}@media(max-width:560px){.chat-version-card header,.chat-version-body{padding-left:17px;padding-right:17px}}
html[data-workbench-theme="light"] .chat-version-card{border-color:#c9d7e7;background:#fff;color:#24374e}.chat-version-card{background:#1d2938}

/* Device location is explicitly clickable, including touch and keyboard, inside the passive clock bar. */
.chat-ambient .chat-ambient-region {appearance:none;pointer-events:auto;min-width:0;max-width:45%;padding:8px 3px;border:0;border-radius:5px;background:transparent;font-family:inherit;line-height:1.4;text-align:left;text-shadow:inherit;cursor:pointer}
.chat-ambient .chat-ambient-region>span {flex:0 0 6px}
.chat-ambient .chat-ambient-region b {min-width:0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-ambient .chat-ambient-region:hover {background:rgba(100,160,240,.09)}
.chat-ambient .chat-ambient-region:focus-visible {outline:2px solid #62a8ff;outline-offset:3px}
.chat-ambient .chat-ambient-region:disabled {cursor:wait;opacity:.75}
.chat-ambient .chat-ambient-region[data-state="denied"]>span,.chat-ambient .chat-ambient-region[data-state="unavailable"]>span {background:#bdc7d4;box-shadow:none}
@media(max-width:640px){.chat-ambient .chat-ambient-region {max-width:55%;min-height:32px}.chat-ambient .chat-ambient-region b {max-width:160px}}
