/* Screenshot-directed front-end shell. Homepage composition and admin stay intact. */
.monochrome-shell {
 --rail-width:72px;--history-width:264px;--sidebar-width:calc(var(--rail-width) + var(--history-width));
 --topbar-height:56px;--reading-width:820px;
 --surface:#111113;--paper:#1a1a1d;--hover:#242428;--line:#2b2b30;--line-strong:#404047;
 --ink:#e9e9ed;--text:var(--ink);--muted:#a1a1aa;--accent:#63deba;--accent-faint:color-mix(in srgb,var(--accent) 8%,transparent);
 --history-secondary:#92929e;--ref-canvas:#111113;--ref-rail:#121216;--ref-history:#17171b;--ref-control:#242428;
 --ref-selected:color-mix(in srgb,var(--accent) 11%,transparent);--ref-selected-edge:color-mix(in srgb,var(--accent) 39%,transparent);--ref-focus:var(--accent);
 grid-template-columns:var(--sidebar-width) minmax(0,1fr);background:var(--ref-canvas);
}
html[data-theme=light] .monochrome-shell {
 --surface:#fff;--paper:#f8f8fa;--hover:#eeeef1;--line:#e4e5e9;--line-strong:#c9ccd3;
 --ink:#20232a;--text:var(--ink);--muted:#626772;--accent:#087960;--accent-faint:color-mix(in srgb,var(--accent) 6%,transparent);
 --history-secondary:#6f737e;--ref-canvas:#fff;--ref-rail:#f6f7f9;--ref-history:#fafafb;--ref-control:#eceef1;
 --ref-selected:color-mix(in srgb,var(--accent) 8%,transparent);--ref-selected-edge:color-mix(in srgb,var(--accent) 27%,transparent);--ref-focus:var(--accent);
}
.monochrome-shell .workspace-sidebar {
 --nav-primary:var(--ink);--nav-secondary:var(--muted);--nav-hover:var(--hover);--nav-selected:var(--ref-selected);
 --nav-line:var(--line);--nav-focus:var(--ref-focus);--nav-radius:12px;
 display:grid;grid-template-columns:var(--rail-width) var(--history-width);padding:0;gap:0;
 width:var(--sidebar-width);height:100dvh;background:var(--ref-history);border-right:1px solid var(--line);overflow:visible;
}
html[data-theme=light] .monochrome-shell .workspace-sidebar {
 --nav-primary:var(--ink);--nav-secondary:var(--muted);--nav-hover:var(--hover);--nav-selected:var(--ref-selected);
 --nav-line:var(--line);--nav-focus:var(--ref-focus);background:var(--ref-history);
}
.monochrome-shell .workspace-rail {
 display:flex;flex-direction:column;align-items:center;min-width:0;min-height:0;padding:16px 0 12px;
 background:var(--ref-rail);border-right:1px solid var(--line);
}
.monochrome-shell .rail-brand {display:grid;place-items:center;box-sizing:border-box;flex:none;width:44px;height:44px;padding:0;margin-bottom:18px;color:var(--accent);border:0;border-radius:0;background:transparent;box-shadow:none}
.monochrome-shell .rail-brand .brand-mark {display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:0;overflow:visible;background:transparent}
.monochrome-shell .rail-brand img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;border-radius:0}
.monochrome-shell .workspace-rail .workspace-nav {display:flex;flex:1 1 0;flex-direction:column;align-items:center;gap:8px;width:100%;min-height:0;padding:0 0 12px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
.monochrome-shell .workspace-rail .workspace-nav-link,
.monochrome-shell .workspace-rail .workspace-nav-link.active,
html[data-theme=light] .monochrome-shell .workspace-rail .workspace-nav-link.active {
 position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
 width:100%;min-height:70px;padding:7px 3px;margin:0;border:0;border-radius:0;
 background:transparent;color:var(--muted);font-size:12px;line-height:18px;font-weight:400;text-align:center;
}
.monochrome-shell .workspace-rail .workspace-nav-link>svg {box-sizing:content-box;width:22px;height:22px;padding:12px;border:1px solid transparent;border-radius:15px;color:inherit;stroke-width:1.8}
.monochrome-shell .workspace-nav>.workspace-nav-link>.rail-icon {width:24px;height:24px;padding:11px;stroke-width:1.65}
.rail-icon-tone {opacity:.07}
.workspace-nav-link:hover .rail-icon-tone {opacity:.12}
.workspace-nav-link.active .rail-icon-tone {opacity:.2}
.monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link.active>.rail-icon {color:var(--accent)}
@media(max-width:760px){
 .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link {box-sizing:border-box;min-height:74px;padding:4px 3px;gap:4px;font-size:11px}
 .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link>.rail-icon {padding:9px}
}
.monochrome-shell .workspace-rail .workspace-nav-link>span {overflow:visible;white-space:nowrap}
.monochrome-shell .workspace-rail .workspace-nav-link:hover {color:var(--ink);background:transparent}
.monochrome-shell .workspace-rail .workspace-nav-link:hover>svg {background:var(--hover)}
.monochrome-shell .workspace-rail .workspace-nav-link.active {color:var(--ink);font-weight:600}
.monochrome-shell .workspace-rail .workspace-nav-link.active>svg {color:var(--accent);background:var(--ref-selected);border-color:var(--ref-selected-edge)}
.monochrome-shell .workspace-rail .workspace-nav-link.active:before {content:'';position:absolute;left:0;top:20px;width:3px;height:25px;border-radius:0 3px 3px 0;background:var(--accent)}
.monochrome-shell .rail-utilities {display:flex;flex-direction:column;align-items:center;flex:none;gap:5px;width:100%;padding-top:10px}
.monochrome-shell .rail-utilities>.workspace-nav-link {min-height:44px}
.monochrome-shell .rail-utilities>.workspace-nav-link>svg {padding:9px;border:0}
.monochrome-shell .rail-utilities>.workspace-nav-link>span {display:none}
.monochrome-shell .rail-utilities>.icon-btn {display:grid;place-items:center;width:44px;height:40px;color:var(--muted);border-radius:12px;background:transparent}
.monochrome-shell .rail-utilities>.icon-btn:hover {background:var(--hover);color:var(--ink)}
.monochrome-shell .sidebar-profile-row {position:relative;display:block;padding:6px 0 0;margin:0;width:100%}
.monochrome-shell .sidebar-avatar-trigger {display:flex;flex-direction:column;gap:5px;align-items:center;width:100%;height:64px;padding:5px 0;border-radius:0;color:var(--muted)}
.monochrome-shell .sidebar-avatar-trigger .avatar {width:34px;height:34px;border:2px solid var(--line-strong);background:var(--ref-control)}
.monochrome-shell .rail-profile-label {font-size:12px;line-height:18px}
/* Account actions float beside the rail as a quiet, compact menu. */
.monochrome-shell .sidebar-profile-row>.sidebar-user-menu {
 --account-menu-surface:var(--paper);
 position:absolute;left:calc(100% + 10px);right:auto;bottom:4px;
 width:218px;max-width:calc(100vw - var(--rail-width) - 24px);max-height:calc(100dvh - 32px);
 z-index:85;display:flex;flex-direction:column;gap:2px;padding:6px;overflow:auto;
 border:0;border-radius:16px;background:var(--account-menu-surface);
 box-shadow:0 14px 44px -12px var(--overlay),0 3px 12px -4px var(--shadow-color);
 scrollbar-width:thin;
}
html[data-theme=light] .monochrome-shell .sidebar-profile-row>.sidebar-user-menu {--account-menu-surface:var(--surface)}
.monochrome-shell .sidebar-profile-row>.sidebar-user-menu[hidden] {display:none}
.monochrome-shell .sidebar-user-menu>[role=menuitem] {
 display:flex;align-items:center;gap:12px;flex:none;width:100%;min-height:42px;
 padding:10px 12px;border:0;border-radius:10px;background:transparent;box-shadow:none;
 color:var(--ink);font:inherit;font-size:13px;font-weight:500;line-height:20px;
 text-decoration:none;text-align:left;cursor:pointer;
 transition:background-color 140ms ease,color 140ms ease;
}
.monochrome-shell .sidebar-user-menu>[role=menuitem]>svg {
 flex:none;width:18px;height:18px;stroke-width:1.6;color:var(--muted);
}
.monochrome-shell .sidebar-user-menu>[role=menuitem]>span {min-width:0;overflow-wrap:anywhere}
.monochrome-shell .sidebar-user-menu>[data-user-menu=logout] {margin-top:6px;color:var(--muted);font-weight:400}
.monochrome-shell .sidebar-user-menu>[role=menuitem]:hover {
 background:color-mix(in srgb,var(--ink) 5%,var(--account-menu-surface));color:var(--ink);
}
.monochrome-shell .sidebar-user-menu>[role=menuitem]:active {background:color-mix(in srgb,var(--ink) 9%,var(--account-menu-surface))}
.monochrome-shell .sidebar-user-menu>[role=menuitem]:is(:hover,:focus-visible)>svg {color:currentColor}
.monochrome-shell .sidebar-user-menu>[role=menuitem]:focus-visible {outline:2px solid var(--ref-focus);outline-offset:-2px}
.monochrome-shell .sidebar-user-menu>[role=menuitem]:disabled {cursor:wait;opacity:.55}
@media(pointer:coarse) {.monochrome-shell .sidebar-user-menu>[role=menuitem] {min-height:44px}}
.monochrome-shell .workspace-history-panel {display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;padding:14px 12px 12px;overflow:hidden}
.monochrome-shell .sidebar-brand-row {display:flex;align-items:center;flex:none;height:36px;min-height:36px;padding:0 4px;margin:0 0 18px;gap:6px}
.monochrome-shell .sidebar-brand .brand-name {font-family:inherit;font-size:15px;font-weight:600;letter-spacing:0;color:var(--ink)}
.monochrome-shell #history-toggle {display:grid;place-items:center;flex:none;width:32px;min-width:32px;height:32px;padding:0;border:0;border-radius:10px;color:var(--muted);background:color-mix(in srgb,var(--ink) 3%,transparent);box-shadow:none}
.monochrome-shell #history-toggle .history-toggle-icon {display:block;width:20px;height:20px;pointer-events:none}
.monochrome-shell #history-toggle .history-toggle-pane {opacity:.12}
@media(hover:hover){
 .monochrome-shell #history-toggle:hover {background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--ink)}
 .monochrome-shell #history-toggle:hover .history-toggle-pane {opacity:.2}
}
.monochrome-shell #history-toggle:active {background:color-mix(in srgb,var(--ink) 11%,transparent);color:var(--ink)}
.monochrome-shell #history-toggle:focus-visible {outline:2px solid var(--ink);outline-offset:3px}
@media(pointer:coarse){.monochrome-shell #history-toggle {width:44px;min-width:44px;height:44px}}
.monochrome-shell .sidebar-new-row {display:flex;align-items:stretch;flex:none;position:relative;min-height:44px;margin:0 0 10px;background:var(--ref-selected);border:1px solid var(--ref-selected-edge);border-radius:13px}
.monochrome-shell .sidebar-new,html[data-theme=light] .monochrome-shell .sidebar-new {display:flex;flex:1;align-items:center;justify-content:flex-start;width:auto;min-width:0;min-height:44px;padding:5px 6px;margin:0;gap:10px;border:0;border-radius:12px 0 0 12px;background:transparent;color:var(--ink);font-size:15px;font-weight:600;box-shadow:none}
.monochrome-shell .sidebar-new:hover,html[data-theme=light] .monochrome-shell .sidebar-new:hover {background:var(--accent-faint);color:var(--ink)}
.monochrome-shell .sidebar-new>svg {box-sizing:content-box;width:18px;height:18px;padding:7px;border-radius:10px;background:var(--accent);color:var(--ref-canvas);stroke-width:2}
.monochrome-shell .sidebar-new-modes {flex:none;align-self:center;position:relative;margin-right:2px;border-left:1px solid var(--ref-selected-edge)}
.monochrome-shell .sidebar-new-modes summary {display:grid;place-items:center;width:34px;height:28px;list-style:none;color:var(--muted);border-radius:6px;cursor:pointer}
.monochrome-shell .sidebar-new-modes summary::-webkit-details-marker {display:none}
.monochrome-shell .sidebar-new-modes summary:hover {color:var(--ink);background:var(--hover)}
.monochrome-shell .sidebar-new-modes>div {position:absolute;z-index:10;top:calc(100% + 10px);right:0;width:170px;border:1px solid var(--line-strong);border-radius:12px;background:var(--paper);padding:5px}
.monochrome-shell .sidebar-new-modes button {display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.monochrome-shell .sidebar-new-modes button:hover {background:var(--hover)}
.monochrome-shell .sidebar-history {display:flex;flex:1 1 0;flex-direction:column;min-height:0;margin:0;padding:0;border:0}
.monochrome-shell .history-search {height:36px;margin:0 0 8px;padding:0 10px;border:1px solid transparent;border-radius:11px;background:var(--ref-control);color:var(--muted)}
.monochrome-shell .history-search input {font-size:13px;color:var(--ink)}
.monochrome-shell .history-search:focus-within {border-color:var(--ref-focus);background:var(--ref-control)}
.monochrome-shell .history-search>kbd {font-size:10px;line-height:18px;border:1px solid var(--line-strong);padding:0 4px}
.monochrome-shell .history-filters {display:flex;flex:none;gap:8px;padding:2px 0;margin:0 0 6px;border:0;border-radius:0;background:transparent;box-shadow:none}
.monochrome-shell .history-filters button {flex:1;min-width:0;min-height:30px;padding:4px 8px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer;box-shadow:none}
.monochrome-shell .history-filters button[aria-pressed=true] {background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent);font-weight:600}
.monochrome-shell .history-filters button:not([aria-pressed=true]):hover {background:var(--accent-faint);color:var(--ink)}
.monochrome-shell .history-list {margin:0 -5px 0 -4px;padding:0 5px 8px 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.monochrome-shell .history-group-title {display:flex;align-items:center;justify-content:space-between;padding:12px 9px 6px;margin:0;color:var(--muted);font-size:12px;line-height:18px;font-variant-numeric:tabular-nums}
.monochrome-shell .workspace-sidebar .history-row.session-card {margin:0 0 3px;border:0;border-radius:12px;content-visibility:auto;contain-intrinsic-size:auto 52px}
.monochrome-shell .workspace-sidebar .session-card .session-link {display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:52px;padding:7px 9px;border-radius:12px}
.monochrome-shell .workspace-sidebar .session-card .session-model-icon {width:30px;height:30px;border-radius:9px;background:var(--ref-control);padding:0}
.monochrome-shell .session-model-icon .identity-image {border-radius:inherit;background:transparent}
.monochrome-shell .session-model-icon .identity-fallback {font-size:9px}
.monochrome-shell .workspace-sidebar .session-card .session-copy {display:flex;flex-direction:column;gap:0;min-width:0;line-height:normal}
.monochrome-shell .workspace-sidebar .session-card .session-title {font-size:13.5px;font-weight:500;line-height:17px;color:var(--ink)}
.monochrome-shell .workspace-sidebar .session-card .session-subline {display:flex;align-items:center;gap:5px;min-width:0;color:var(--history-secondary);font-size:11.5px;line-height:13px}
.monochrome-shell .workspace-sidebar .session-card .session-model {position:static;display:block;width:auto;height:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;clip-path:none;white-space:nowrap;color:var(--history-secondary);font-size:11.5px;line-height:13px}
.monochrome-shell .session-card .session-time {display:inline;flex:none;color:var(--history-secondary);font-size:11.5px;line-height:13px}
.monochrome-shell .workspace-sidebar .session-card.selected .session-link {background:var(--ref-selected)}
.monochrome-shell .workspace-sidebar .session-card:is(.selected,:hover,:focus-within) {--history-secondary:color-mix(in srgb,var(--muted) 40%,#6f737e)}
html[data-theme=dark] .monochrome-shell .workspace-sidebar .session-card:is(.selected,:hover,:focus-within) {--history-secondary:#92929e}
.monochrome-shell .workspace-sidebar .session-card.selected:before {content:'';position:absolute;z-index:1;left:0;top:16px;width:3px;height:21px;border-radius:0 3px 3px 0;background:var(--accent)}
.monochrome-shell .workspace-sidebar .session-card.selected .session-model-icon {background:color-mix(in srgb,var(--accent) 18%,var(--ref-control))}
.monochrome-shell .workspace-sidebar .session-card .session-more {width:28px;height:28px;right:5px;border-radius:8px;color:var(--muted)}
.monochrome-shell .workspace-sidebar .session-card:hover .session-link,.monochrome-shell .workspace-sidebar .session-card:focus-within .session-link {padding-right:33px}
.monochrome-shell .session-card .session-unread {background:var(--accent);color:var(--ref-canvas)}
.monochrome-shell .sidebar-footer {flex:none;margin:0;padding:10px 0 0;border-top:0}
.monochrome-shell .sidebar-membership {border-radius:14px;overflow:hidden}
.monochrome-shell .sidebar-membership .membership-mini {border-radius:14px;padding:12px;border-color:var(--ref-selected-edge);background:var(--ref-selected)}
.monochrome-shell .sidebar-footer-actions {display:flex;align-items:center;gap:8px;padding:9px 3px 0}
.monochrome-shell .sidebar-profile {min-height:28px;padding:0;flex:1;font-size:12px;color:var(--muted)}
.monochrome-shell .sidebar-subscribe {flex:none;display:grid;place-items:center;min-height:28px;padding:3px 12px;border-radius:14px;background:var(--ref-selected);color:var(--accent);font-size:12px;font-weight:600}
.monochrome-shell #workspace-logout {display:grid;place-items:center;flex:none;width:30px;height:28px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.monochrome-shell #workspace-logout:hover {background:var(--hover);color:var(--ink)}
.monochrome-shell.sidebar-collapsed {grid-template-columns:var(--rail-width) minmax(0,1fr)}
.monochrome-shell.sidebar-collapsed .workspace-sidebar {display:grid;width:var(--rail-width);grid-template-columns:var(--rail-width)}
.monochrome-shell.sidebar-collapsed .workspace-history-panel {display:none}
.monochrome-shell.sidebar-collapsed .workspace {grid-column:2}
.monochrome-shell .workspace {background:var(--ref-canvas)}
.monochrome-shell #main.model-chat-view {--reading-width:820px}
.monochrome-shell .workspace-header {height:var(--topbar-height);min-height:var(--topbar-height);padding:0 24px;border-bottom:0;background:var(--ref-canvas)}
.monochrome-shell .workspace-heading h1 {font-size:15px;font-weight:600}
.monochrome-shell .workspace-header .conversation-status {display:none}
.monochrome-shell .workspace-header .topbar-actions .icon-btn {color:var(--muted)}
.monochrome-shell .workspace-header .topbar-actions {display:flex;align-items:center;flex:none;gap:4px;margin-left:auto}
.monochrome-shell .workspace-header .topbar-actions .icon-btn {display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);box-shadow:none}
.monochrome-shell .workspace-header .topbar-actions .icon-btn:hover {background:var(--hover);color:var(--ink)}
.monochrome-shell .workspace-header .topbar-actions .icon-btn:focus-visible {outline:2px solid var(--line-strong);outline-offset:2px}
.monochrome-shell .workspace-header .topbar-actions .mobile-new-chat {display:none}
.monochrome-shell .workspace-header #toggle-sidebar {display:none}
.monochrome-shell .model-chat-view .chat-scroll {padding:24px max(24px,calc((100% - var(--reading-width))/2)) 24px;background:var(--ref-canvas)}
.monochrome-shell .model-chat-view.has-conversation-messages #model-intro-host {display:none}
.monochrome-shell .model-chat-view .message {max-width:var(--reading-width);margin:0 auto 28px;gap:12px}
.monochrome-shell .model-chat-view .message.assistant {display:block}
.monochrome-shell .model-chat-view .message.assistant>.message-avatar {display:none}
.monochrome-shell .model-chat-view .message-name {margin-bottom:9px;font-size:11px;font-weight:500;color:var(--muted)}
.monochrome-shell .model-chat-view .message .markdown {font-size:15.5px;line-height:1.85;color:var(--ink)}
.monochrome-shell .model-chat-view .message.user {margin-bottom:38px;padding:4px 0 0}
.monochrome-shell .model-chat-view .message.user .markdown {padding:10px 16px;border:1px solid var(--line);border-radius:20px;background:var(--ref-control);font-size:15px;line-height:1.7}
.monochrome-shell .model-chat-view .message.user .message-actions {opacity:0;transition:opacity .15s}
.monochrome-shell .model-chat-view .message.user:hover .message-actions,.monochrome-shell .model-chat-view .message.user:focus-within .message-actions {opacity:1}
.monochrome-shell .model-chat-view .message-actions {margin-top:12px;font-size:11.5px;color:var(--muted)}
.monochrome-shell .model-chat-view .composer-zone {max-width:calc(var(--reading-width) + 64px);padding:10px 24px 10px;background:var(--ref-canvas)}
.monochrome-shell .model-chat-view .composer {padding:14px 17px 12px;border:1px solid var(--line-strong);border-radius:28px;background:var(--ref-control);box-shadow:0 8px 24px #0002}
.monochrome-shell .model-chat-view .composer:focus-within {border-color:var(--ref-focus);box-shadow:0 8px 24px #0002}
.monochrome-shell .model-chat-view .composer textarea {min-height:42px;font-size:15px;line-height:1.7;color:var(--ink);caret-color:var(--accent)}
.monochrome-shell .model-chat-view .composer-bottom {margin-top:8px;gap:10px}
.monochrome-shell .model-chat-view :is(.attachment-add,.composer-tools>.icon-btn) {background:transparent;color:var(--muted)}
.monochrome-shell .model-chat-view .composer-model {min-height:34px;padding:5px 10px;border:0;border-radius:20px;background:color-mix(in srgb,var(--ink) 5%,var(--ref-control));font-size:12px}
.monochrome-shell .model-chat-view .send-btn {background:var(--accent);color:var(--ref-canvas)}
.monochrome-shell .model-chat-view .send-btn:hover:not(:disabled) {background:color-mix(in srgb,var(--accent) 85%,var(--ink))}
.monochrome-shell .model-chat-view .send-btn:disabled {background:var(--line-strong);color:var(--muted)}
.monochrome-shell .model-chat-view .composer-meta {justify-content:center;padding:8px 3px 0;font-size:10px}
.monochrome-shell .model-chat-view .composer-hint,.monochrome-shell .model-chat-view .composer-count {display:none}
.monochrome-shell .model-chat-view .composer-disclaimer {display:none}
.monochrome-shell ::selection {background:var(--ref-selected-edge);color:var(--ink)}
.monochrome-shell :is(a,button,summary):focus-visible {outline:2px solid var(--ref-focus);outline-offset:-2px}
.monochrome-shell .workspace-sidebar :is(a,button,summary):focus-visible {outline:2px solid var(--ref-focus);outline-offset:-2px}
@media(min-width:1600px){.monochrome-shell{--rail-width:76px;--history-width:284px;--reading-width:900px}.monochrome-shell #main.model-chat-view{--reading-width:900px}}
@media(min-width:761px) and (max-width:1100px){.monochrome-shell{--rail-width:64px;--history-width:236px;--reading-width:720px}.monochrome-shell #main.model-chat-view{--reading-width:720px}.monochrome-shell .workspace-history-panel{padding-left:10px;padding-right:10px}.monochrome-shell .model-chat-view .composer-zone{padding-left:20px;padding-right:20px}}
@media(max-width:760px){
 .monochrome-shell,.monochrome-shell.sidebar-collapsed {--rail-width:64px;--history-width:min(264px,calc(100vw - 108px));--topbar-height:52px;grid-template-columns:minmax(0,1fr)}
 .monochrome-shell .workspace,.monochrome-shell.sidebar-collapsed .workspace {grid-column:1}
 .monochrome-shell .workspace-sidebar,.monochrome-shell.sidebar-collapsed .workspace-sidebar {display:none;width:var(--sidebar-width);grid-template-columns:var(--rail-width) var(--history-width);height:100dvh}
 .monochrome-shell.menu-open .workspace-sidebar {display:grid;box-shadow:12px 0 36px #0004}
 .monochrome-shell.menu-open .workspace-history-panel {display:flex}
 .monochrome-shell .workspace-rail {padding-top:12px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
 .monochrome-shell .rail-brand {margin-bottom:8px}
 .monochrome-shell .workspace-rail .workspace-nav {gap:3px}
 .monochrome-shell .workspace-rail .workspace-nav-link {min-height:65px;gap:4px;font-size:11px}
 .monochrome-shell .workspace-rail .workspace-nav-link>svg {padding:10px}
 .monochrome-shell .workspace-history-panel {padding-top:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 .monochrome-shell .sidebar-brand-row {margin-bottom:12px}
 .monochrome-shell .history-filters button {min-height:32px}
 .monochrome-shell .history-search {height:40px}
 .monochrome-shell .history-search input {font-size:16px}
 .monochrome-shell .workspace-sidebar .session-card .session-link {min-height:56px;padding-right:33px}
 .monochrome-shell .workspace-sidebar .session-card .session-more {opacity:1;pointer-events:auto;right:1px;width:32px;height:44px}
 .monochrome-shell .session-card .session-time {display:inline}
 .monochrome-shell .sidebar-subscribe,.monochrome-shell #workspace-logout {min-height:44px}
 .monochrome-shell #workspace-logout {width:44px}
 .monochrome-shell .sidebar-footer-actions {padding-top:4px}
 .monochrome-shell .sidebar-profile-row>.sidebar-user-menu {left:calc(100% + 8px);bottom:0;width:210px}
 .monochrome-shell .workspace-header {padding:0 12px;gap:10px}
 .monochrome-shell .model-chat-view .chat-scroll {padding:16px 16px 18px}
 .monochrome-shell .model-chat-view .message {margin-bottom:24px}
 .monochrome-shell .model-chat-view .message .markdown {font-size:15px;line-height:1.8}
 .monochrome-shell .model-chat-view .message.user {margin-bottom:28px}
 .monochrome-shell .model-chat-view .message.user .message-actions {opacity:1}
 .monochrome-shell .model-chat-view .composer-zone {max-width:100%;padding:8px 10px max(8px,env(safe-area-inset-bottom))}
 .monochrome-shell .model-chat-view .composer {padding:11px 12px 9px;border-radius:23px}
 .monochrome-shell .model-chat-view .composer textarea {min-height:36px;font-size:16px}
 .monochrome-shell .model-chat-view .composer-bottom {gap:4px;flex-wrap:nowrap}
 .monochrome-shell .model-chat-view .composer-tools {gap:0}
 .monochrome-shell .model-chat-view :is(.attachment-add,.composer-tools>.icon-btn) {width:32px;min-width:32px;height:44px;min-height:44px}
 .monochrome-shell .model-chat-view .composer-model {font-size:11px;padding:4px;min-height:44px}
 .monochrome-shell .model-chat-view .composer-meta {padding-top:5px}
}
@media(max-width:380px){.monochrome-shell .model-chat-view .composer-bottom{flex-wrap:wrap}.monochrome-shell .model-chat-view .composer-tools{flex-basis:100%}.monochrome-shell .model-chat-view .composer-actions{flex-basis:100%}}
@media(max-height:650px){.monochrome-shell .workspace-rail .workspace-nav-link{min-height:56px;gap:2px}.monochrome-shell .rail-brand{margin-bottom:4px}.monochrome-shell .rail-utilities{gap:0;padding-top:0}.monochrome-shell .sidebar-brand-row{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){.monochrome-shell .model-chat-view .message.user .message-actions{transition:none}}

/* Guest entry stays legible without inheriting signed-in account action widths. */
.monochrome-shell .sidebar-guest-actions {display:grid;gap:8px;padding:10px 3px 3px}
.monochrome-shell .sidebar-guest-caption {font-size:12px;line-height:18px;color:var(--muted)}
.monochrome-shell .sidebar-guest-login {display:flex;align-items:center;justify-content:center;width:100%;min-height:40px;padding:8px 12px;border:0;border-radius:12px;background:var(--ref-selected);color:var(--ink);font:inherit;font-size:13px;font-weight:600;line-height:20px;cursor:pointer}
.monochrome-shell .sidebar-guest-login:hover {background:var(--hover)}
.monochrome-shell .sidebar-guest-login:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:760px){.monochrome-shell .sidebar-guest-login {min-height:44px}}

/* Route ownership is known before content loads, including mobile navigation. */
.monochrome-shell .workspace-history-panel[hidden]{display:none!important}
.monochrome-shell[data-history-mode=none] .workspace-sidebar{width:var(--rail-width);grid-template-columns:var(--rail-width)}
