/* Desktop website layout, retaining Orlon's black-and-white app branding. */
:root { --sidebar-w: clamp(270px, 22vw, 380px); --chat-width: 960px; }
.sidebar { padding: 8px 8px 12px; }
.sidebar-head { gap: 8px; padding: 0 6px 24px; }
.brand-wrap { flex: 1; min-width: 0; }
.brand-copy strong { font-size: 22px; font-weight: 500; letter-spacing: -.025em; }
.brand-copy .logo { width: 24px; height: 24px; }
.brand-button { gap: 8px; border-radius: 8px; }
.sidebar-head .icon-button { flex-shrink: 0; width: 30px; height: 34px; color: #b4b4b4; border-radius: 6px; }
.side-rows { margin: 0 0 4px; }
.side-row, .tab, #tab-agi { height: 44px; padding: 0 12px; gap: 12px; font-size: 15px; font-weight: 400; border-radius: 9px; color: #c4c4c4; }
#new-chat { background: transparent; color: var(--t1); }
#new-chat:hover { background: #191919; }
.side-row svg, .tab svg { width: 20px; height: 20px; }
.tabs { gap: 2px; margin: 0 0 8px; }
#tab-agi { display: flex; }
.tab.active, .tab[aria-selected="true"] { background: #191919; }
.sidebar-label-row { padding: 0 8px 14px; }
.sidebar-label { padding: 0; color: #a9a9a9; font-size: 13px; font-weight: 500; }
.conversation-list { padding: 0; gap: 2px; }
.conversation-open { padding: 10px 8px; }
.conversation-item strong { font-size: 14px; }
.conversation-item { border-radius: 7px; }
.conversation-item:focus-within .conversation-delete { opacity: 1; }
.sidebar-footer { margin-top: 10px; padding-top: 12px; }
.profile-row { padding: 6px 8px; gap: 10px; border-radius: 8px; }
.avatar { width: 30px; height: 30px; border: 0; box-shadow: none; font-size: 13px; color: #fff; background: #267daf; }
.who strong { font-size: 14px; font-weight: 400; }
.who small { margin-top: 3px; font: 12px var(--sans); }
#profile-settings { width: 32px; height: 32px; }

.workspace { position: relative; }
.topbar { position: relative; flex-shrink: 0; min-height: 58px; padding: 6px 18px; border: 0; }
.topbar h1 { font-size: 13px; }
.topbar-actions { margin-left: auto; gap: 6px; }
.topbar .icon-button { width: 34px; height: 34px; padding: 8px; background: transparent; border: 0; color: #bdbdbd; }
.topbar .icon-button:hover { background: #191919; }
.pill-button { height: 36px; padding: 0 16px; font-size: 13px; border: 0; background: transparent; }
.pill-button:hover { background: #191919; }
.pill-button.solid { color: #111; background: #f2f2f2; }
.pill-button.solid:hover { background: #dedede; }
.run-status { font-size: 12px; }
.topbar .run-status { display: none; }
.auth-buttons { gap: 8px; }
#signup-open { border: 1px solid #454545; }
.sidebar-footer { position: relative; }
.sidebar-login { padding: 4px 12px 0; }
.sidebar-login h2 { margin: 0 32px 4px 0; font-size: 14px; font-weight: 500; line-height: 1.5; }
.sidebar-login p { margin: 0 0 10px; color: var(--t2); font-size: 13px; line-height: 1.5; }
.sidebar-login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-login-actions button { width: 100%; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 999px; background: #222; color: var(--t1); font: 500 14px var(--sans); transition: background .18s ease; }
.sidebar-login-actions button:hover { background: #303030; }
.sidebar-login-actions #sidebar-signup-open { color: #080808; background: #f2f2f2; border-color: #f2f2f2; }
.sidebar-login-actions #sidebar-signup-open:hover { background: #ffffff; }
.sidebar-footer:has(.sidebar-login:not([hidden])) .profile-bar { position: absolute; top: 10px; right: 4px; }

.chat-main { padding: 0 40px 14px; }
.message-list { padding: 28px max(0px, calc((100% - var(--chat-width)) / 2)) 28px; }
.message.assistant .message-body { font-family: var(--sans); font-size: 16px; line-height: 1.8; }
.message.user { border-radius: 22px; margin-right: 0; padding: 11px 18px; }
.message.user::after { display: none; }
.composer, .pending-region { max-width: var(--chat-width); }
.composer { display: flex; align-items: flex-end; gap: 12px; padding: 9px 10px 9px 12px; border-radius: 32px; background: #080808; box-shadow: inset 0 0 0 1px #292929; }
.composer:focus-within { background: #080808; box-shadow: inset 0 0 0 1px #4b4b4b; }
.composer textarea { flex: 1; min-width: 0; min-height: 40px; padding: 9px 0; font-size: 16px; line-height: 1.5; }
.composer textarea:focus-visible { outline: none !important; }
.composer .round-button { width: 38px; height: 40px; color: #c4c4c4; background: transparent; }
.send-button { width: 40px; height: 40px; background: #f2f2f2; }
.send-button:disabled { opacity: .35; transform: none; }
.model-chip { flex-shrink: 0; gap: 6px; min-height: 40px; padding: 6px 8px; font-size: 13px; font-weight: 400; color: #b4b4b4; background: transparent; border: 0; border-radius: 20px; }
.model-chip:hover { background: #303030; }
.model-chip-logo { display: block; flex-shrink: 0; width: 20px; height: 20px; object-fit: contain; }
#model-chip-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-note { margin-top: 12px; text-align: center; font-size: 11px; color: var(--t3); }
.empty-state { padding: 0; }
.empty-state h2 { font: 400 34px/1.35 var(--serif); letter-spacing: -.025em; animation: none; }
#panel-chat.is-empty .chat-main { justify-content: flex-start; overflow-y: auto; padding-top: max(32px, calc((100dvh - 58px) * .29)); padding-bottom: 36px; }
#panel-chat.is-empty .message-list { flex: 0 0 auto; padding: 0 0 38px; overflow: visible; }
#panel-chat.is-empty .composer { margin: 0 auto; }
#panel-chat.is-empty .composer-note { display: none; }
.gallery-space { padding-top: 20px; }
.agi-nav { padding-top: 12px; }
@media (min-width: 1200px) {
  body.show-details .chat-workspace { flex-direction: row; }
  body.show-details .activity-column { width: 300px; max-height: none; padding: 20px; border-top: 0; border-left: 1px solid var(--line); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --sidebar-w: 260px; }
  .topbar-title { display: none; }
  .chat-main { padding-right: 28px; padding-left: 28px; }
  .auth-buttons { margin-right: 0; }
}
@media (max-width: 760px) {
  .sidebar-head { padding-bottom: 20px; }
  .topbar { min-height: 60px; padding: 8px 10px; }
  .topbar-title, .auth-buttons { display: none !important; }
  .topbar .icon-button { width: 30px; height: 30px; padding: 6px; }
  .chat-main { padding: 0 16px max(12px, env(safe-area-inset-bottom)); }
  .message-list { padding: 20px 0; }
  .empty-state h2 { font-size: 26px; }
  #panel-chat.is-empty .chat-main { padding-top: max(40px, calc((100dvh - 60px) * .27)); }
  .composer { flex-wrap: wrap; gap: 6px; border-radius: 26px; }
  .composer textarea { font-size: 16px; }
  .model-chip { font-size: 11px; padding: 6px; }
  #model-chip-name { max-width: 90px; }
  .composer .round-button, .send-button { width: 32px; height: 40px; }
  .composer-note { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Chat projects and the AGI workspace have separate sidebar navigation. */
.projects-space { width: 100%; max-width: 980px; margin: 0 auto; padding: 40px 40px 64px; }
.projects-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.projects-head h2 { font: 500 28px/1.3 var(--sans); letter-spacing: -.035em; }
.projects-head p { max-width: 460px; color: var(--t2); font-size: 13px; line-height: 1.6; margin-top: 8px; }
.projects-storage { font-size: 12px; color: var(--t3); margin-top: 14px; }
.project-list { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.projects-empty { display: grid; justify-items: center; gap: 10px; max-width: 380px; margin: 64px auto 0; padding: 24px 12px; text-align: center; color: var(--t2); background: transparent; border-radius: 0; }
.projects-empty strong { color: var(--t1); font-size: 18px; font-weight: 500; }
.projects-empty p { font-size: 14px; line-height: 1.55; margin: 0 0 6px; }
.projects-empty-icon, .project-card-icon, .project-detail-icon { display: grid; place-items: center; flex: none; color: var(--t2); background: var(--s3); border-radius: 12px; }
.projects-empty-icon { width: 60px; height: 60px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--field); }
.projects-empty-icon svg, .project-detail-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.5; }
.project-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; color: var(--t1); background: var(--s1); border: 1px solid var(--line); border-radius: 16px; }
.project-card:hover { background: var(--s2); border-color: var(--line-strong); transform: translateY(-1px); }
.project-card-icon { width: 42px; height: 42px; }
.project-card-icon svg, .project-chat svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.5; }
.project-card-body, .project-chat-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.project-card-body strong, .project-chat-body strong { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.project-card-body small, .project-chat-body small { font-size: 12px; color: var(--t3); }
.project-card-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--t2); }
.project-card-arrow { flex: none; color: var(--t3); font-size: 16px; transition: transform .16s, color .16s; }
.project-card:hover .project-card-arrow, .project-chat:hover .project-card-arrow { color: var(--t1); transform: translateX(2px); }
.project-back { margin-bottom: 14px; }
.project-detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding: 22px; background: var(--s1); border: 1px solid var(--line); border-radius: 18px; }
.project-detail-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.project-detail-icon { width: 48px; height: 48px; }
.project-title { margin: 0; font-size: 23px; font-weight: 500; overflow-wrap: anywhere; }
.project-detail-count { margin: 4px 0 0; font-size: 13px; color: var(--t3); }
.project-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-button.danger { color: #ff9b9b; border-color: color-mix(in srgb, #ff6b6b 35%, var(--line)); }
.pill-button.danger:hover { background: color-mix(in srgb, #ff6b6b 14%, transparent); border-color: #ff6b6b; }
.project-instructions-card { margin-top: 14px; padding: 16px 18px; background: var(--s1); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; }
.project-section-title { margin: 26px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.project-chat { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 8px; padding: 14px 16px; text-align: left; color: var(--t1); background: var(--s1); border: 1px solid var(--line); border-radius: 13px; }
.project-chat:hover { background: var(--s2); border-color: var(--line-strong); }
.project-chat > svg { flex: none; color: var(--t3); }
.project-chat-body small { color: var(--t3); }
.project-chats-empty { padding: 22px; text-align: center; color: var(--t2); background: var(--s1); border: 1px dashed var(--line); border-radius: 14px; }
.project-chats-empty p { margin: 0; font-size: 14px; }
.project-chats-empty p + p { margin-top: 4px; }
.project-list > .link-button { align-self: flex-start; }
.project-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 14px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; }
.project-add label { flex-basis: 100%; font-size: 12px; color: var(--t3); }
.project-add select { flex: 1; max-width: 440px; min-width: 0; font-size: 14px; padding: 10px; }
#project-form { display: grid; gap: 12px; margin-top: 24px; }
#project-form label { font-size: 13px; color: var(--t2); }
#project-name { width: 100%; padding: 12px; background: var(--s1); color: var(--t1); border: 1px solid var(--line-strong); border-radius: 10px; }
@media (max-width: 760px) { .projects-space { padding: 24px 20px 48px; } .projects-head { align-items: flex-start; } .projects-head h2 { font-size: 24px; } .project-detail-head { align-items: flex-start; } .project-detail-actions { width: 100%; } .project-detail-actions .pill-button { flex: 1; } .project-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px), (max-height: 640px) { .sidebar { overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(12px, env(safe-area-inset-bottom)); } .conversation-list { overflow: visible; } .sidebar-footer { flex: none; margin-top: 16px; } }

/* Desktop model browser: categories and settings beside a searchable list. */
.model-sheet.is-desktop { width: min(820px, calc(100vw - 64px)); height: min(650px, calc(100dvh - 80px)); max-height: none; padding: 0; overflow: hidden; border-radius: 24px; background: var(--s1); }
.model-sheet.is-desktop .sheet-bar { height: 62px; padding: 0 22px; margin: 0; border-bottom: 1px solid var(--line-strong); }
.model-sheet.is-desktop .sheet-bar h2 { padding: 0; text-align: left; font-size: 17px; }
.model-sheet.is-desktop .sheet-bar .sheet-close.inline { width: 30px; height: 30px; border: 0; border-radius: 6px; font-size: 23px; }
.model-sheet.is-desktop #model-body { height: calc(100% - 62px); }
.model-desktop { display: grid; grid-template-columns: 200px minmax(0, 1fr); height: 100%; }
.model-navigation { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 16px 12px; border-right: 1px solid var(--line-strong); background: #0b0b0b; }
.model-categories { display: grid; gap: 4px; }
.model-category { padding: 11px 12px; font-size: 13px; text-align: left; color: var(--t2); background: transparent; border: 0; border-radius: 10px; }
.model-category:hover { background: #1c1c1c; }
.model-category[aria-pressed="true"] { color: #fff; background: #262626; }
.model-settings { display: grid; gap: 14px; margin-top: 28px; padding: 0 6px; }
.model-settings h3 { margin: 0; font-size: 11px; color: var(--t3); }
.model-setting { display: grid; gap: 7px; font-size: 12px; color: var(--t2); }
.model-setting select { max-width: none; width: 100%; padding: 8px; background: #191919; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12px; }
.model-usage { font-size: 11px; line-height: 1.6; color: var(--t3); }
.model-browser { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.model-search { flex-shrink: 0; margin: 18px 18px 12px; }
.model-search input { width: 100%; padding: 10px 12px; color: var(--t1); font-size: 13px; background: #1c1c1c; border: 1px solid var(--line-strong); border-radius: 7px; }
.model-results { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 16px; }
.model-sheet.is-desktop .m-list { gap: 2px; }
.model-sheet.is-desktop .m-item { min-height: 64px; padding: 12px; gap: 12px; border-radius: 12px; }
.model-sheet.is-desktop .m-item-text strong { font-size: 13px; }
.model-sheet.is-desktop .m-item-text small { margin-top: 4px; font-size: 11px; }
.model-sheet.is-desktop .m-logo { width: 26px; height: 26px; }
.model-sheet.is-desktop .m-item > svg { width: 16px; height: 16px; }
.model-sheet.is-desktop .m-note, .model-sheet.is-desktop .m-empty { font-size: 12px; padding: 8px; }

/* In-chat files, image results, and voice controls. */
.attachment-preview, .composer-mode { width: 100%; max-width: var(--chat-width); margin: 10px auto; display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.attachment-chip { display: flex; align-items: center; gap: 9px; max-width: 260px; padding: 8px 10px; background: var(--s3); border: 1px solid var(--line-strong); border-radius: 10px; font-size: 12px; }
.attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }
.attachment-chip button, .composer-mode button { color: var(--t2); background: transparent; border: 0; padding: 4px 8px; border-radius: 5px; }
.composer-mode { justify-content: space-between; font-size: 12px; color: var(--t2); }
.message-attachment { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 12px; }
.message-attachment img { max-width: 100%; max-height: 400px; object-fit: contain; border-radius: 7px; }
.generated-image { width: min(100%, 420px); margin: 12px 0; }
.generated-image > img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; object-position: left center; border-radius: 14px; }
.image-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.image-actions a { text-decoration: none; }
.image-creating > p { color: var(--t2); font-size: 14px; margin-bottom: 12px; }
.image-shimmer { width: min(100%, 460px); aspect-ratio: 1; border-radius: 14px; background: radial-gradient(#777 1px, transparent 2px) 0 0 / 18px 18px, #101010; animation: image-pulse 2s ease-in-out infinite alternate; }
@keyframes image-pulse { to { opacity: .35; } }
#voice-record[aria-pressed="true"] { color: #ff9f9f; background: #4a2020; }
.voice-panel { text-align: center; }
.voice-panel .sheet-sub { margin-top: 20px; }
.voice-orb { min-width: 160px; height: 80px; margin: 24px auto; color: #111; background: #eee; border: 0; border-radius: 999px; font-size: 15px; }
.feature-status { font-size: 13px; color: var(--t2); margin: 12px 0; overflow-wrap: anywhere; }
.feature-form { display: grid; gap: 10px; margin: 20px 0; }
.feature-form label { font-size: 12px; color: var(--t2); }
.feature-form input, .feature-form textarea, .feature-inline input, #project-instructions { min-width: 0; padding: 10px 12px; color: var(--t1); background: var(--s1); border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
.feature-form input[type="color"] { width: 70px; height: 40px; padding: 3px; }
.feature-form input[type="file"] { max-width: 100%; font-size: 12px; }
.feature-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.feature-inline input { flex: 1; }
.project-instructions-preview { color: var(--t2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
#project-instructions { resize: vertical; }
.desktop-settings { width: min(720px, calc(100vw - 32px)); padding: 0; border-radius: 14px; }
.desktop-dialog-head { position: relative; padding: 20px 24px; border-bottom: 1px solid var(--line-strong); }
.desktop-dialog-head h2 { font-size: 18px; }
.settings-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 330px; }
.settings-layout > nav { padding: 16px 10px; border-right: 1px solid var(--line-strong); }
.settings-layout > nav button { display: block; width: 100%; padding: 10px 12px; color: var(--t2); background: transparent; border: 0; text-align: left; border-radius: 6px; font-size: 13px; }
.settings-layout > nav button[aria-pressed="true"] { background: var(--s3); color: var(--t1); }
.settings-content { padding: 24px; min-width: 0; }
.settings-content h3 { margin: 0 0 16px; font-size: 15px; color: var(--t1); }
.settings-content p { font-size: 12px; color: var(--t2); margin-bottom: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 13px; }
.settings-row select { max-width: 150px; min-width: 100px; font-size: 12px; }
.settings-content textarea { width: 100%; resize: vertical; padding: 12px; font-size: 13px; color: var(--t1); background: var(--s1); border: 1px solid var(--line-strong); border-radius: 8px; }
.settings-footer { padding: 14px 24px; border-top: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 12px; color: var(--t2); }
body[data-text-size="small"] .message-body { font-size: 14px; }
body[data-text-size="large"] .message-body { font-size: 19px; }
body[data-theme="light"] { --bg: #fff; --s1: #f8f8f8; --s2: #f1f1f1; --s3: #e7e7e7; --line: #e0e0e0; --line-strong: #ccc; --t1: #202020; --t2: #555; --t3: #666; --on: #222; --on-ink: #fff; }
body[data-theme="light"] .sidebar, body[data-theme="light"] .composer { background: var(--s2); }
body[data-theme="light"] #new-chat, body[data-theme="light"] .tab.active { background: var(--s3); color: var(--t1); }
body[data-theme="light"] .logo, body[data-theme="light"] .model-chip-logo { filter: invert(1); }
body[data-theme="light"] .model-chip, body[data-theme="light"] .side-row, body[data-theme="light"] .tab { color: var(--t1); }
@media (max-width: 760px) { .settings-layout { grid-template-columns: 1fr; } .settings-layout > nav { display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line-strong); } .settings-layout > nav button { width: auto; } .settings-content { padding: 20px; } .composer .model-chip { max-width: 132px; } }

/* Motion stays short and tied to a change the user can see. */
.welcome-greeting { min-height: 1.35em; }
.brand-menu { transform-origin: top left; animation: menu-reveal .16s ease-out both; }
.tools-menu { transform-origin: bottom left; animation: menu-reveal .16s ease-out both; }
.attachment-chip, .composer-mode { animation: item-reveal .22s cubic-bezier(.2,.8,.2,1) both; }
.generated-image > img { animation: image-reveal .45s ease-out both; }
.project-card, .project-chat { transition: background .16s, border-color .16s, transform .16s; }
.project-card:hover { transform: translateY(-2px); }
.feature-form input, .settings-content textarea, .model-search input, #project-instructions { transition: border-color .18s, box-shadow .18s; }
.settings-layout > nav button, .model-category { transition: background .16s, color .16s; }
.voice-orb { transition: transform .2s, background .2s; }
.voice-orb:hover { transform: scale(1.03); }
#voice-record[aria-pressed="true"] svg { animation: recording-pulse 1.2s ease-in-out infinite; }
@keyframes item-reveal { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes menu-reveal { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes image-reveal { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: blur(0); } }
@keyframes recording-pulse { 50% { opacity: .45; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.tools-menu { width: min(260px, calc(100vw - 48px)); padding: 6px; border-radius: 16px; background: var(--s2); overflow-y: auto; overscroll-behavior: contain; }
.tools-menu .tools-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: 10px; }
.tools-item svg { width: 19px; height: 19px; color: var(--t2); }
.tools-menu .tools-item:focus-visible { outline: 1px solid var(--t3) !important; outline-offset: -1px; }
@media (max-width: 760px) { .welcome-greeting { min-height: 2.7em; display: grid; place-items: center; } }
.avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
body[data-text-size="small"] .message.assistant .message-body { font-size: 14px; }
body[data-text-size="large"] .message.assistant .message-body { font-size: 19px; }
body[data-theme="light"] .model-chip-logo { filter: none; }
body[data-theme="light"] .model-chip-logo.orlon-mark { filter: invert(1); }
body[data-theme="light"] .send-button, body[data-theme="light"] .pill-button.solid { background: var(--on); color: var(--on-ink); }
body[data-theme="light"] .model-sheet.is-desktop, body[data-theme="light"] .model-navigation { background: var(--s1); }
body[data-theme="light"] .model-category[aria-pressed="true"], body[data-theme="light"] .model-category:hover { background: var(--s3); color: var(--t1); }
body[data-theme="light"] .model-search input, body[data-theme="light"] .model-setting select { background: var(--s2); color: var(--t1); }

/* The app's black surfaces, rounded controls, and quiet outlines on every dialog. */
.sheet { background: var(--s1); border-color: var(--line-strong); border-radius: 22px; overflow-y: auto; }
.sheet:not(.desktop-settings):not(.model-sheet) { padding: 28px; }
.sheet h2 { font-family: var(--sans); font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.sheet > h2, #account-out > h2 { padding-right: 36px; }
.sheet .sheet-sub { font-size: 13px; line-height: 1.6; margin-top: 10px; }
.sheet .sheet-close, .model-sheet.is-desktop .sheet-bar .sheet-close.inline { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; }
.sheet .sheet-close:hover { background: var(--hover); }
.sheet input:not([type="checkbox"]):not([type="color"]):not([type="file"]), .sheet textarea, .sheet select { border-radius: 12px; background: var(--bg); border-color: var(--line-strong); font-size: 13px; }
.sheet input:not([type="checkbox"]):not([type="color"]):not([type="file"]) { min-height: 42px; }
.sheet .primary-pill { width: 100%; height: 44px; font-size: 14px; margin-top: 12px; }
.sheet .sheet-actions button { height: 40px; font-size: 13px; }
.sheet .sheet-actions .confirm-accept { color: var(--on-ink); background: var(--on); border-color: transparent; }
.confirm-dialog { width: min(420px, calc(100vw - 32px)); }
.confirm-dialog .sheet-actions { margin-top: 24px; }
.settings-row { margin: 6px 0; padding: 12px; border-radius: 12px; background: var(--s2); }
.settings-content .switch-row { padding: 12px; border-radius: 12px; background: var(--s2); }
.settings-content h3 { color: var(--t2); font-weight: 500; }
.model-navigation { background: var(--s1); }
.model-sheet.is-desktop .m-item { border-radius: 12px; }
.model-chip { border: 1px solid var(--line); background: var(--s1); border-radius: 999px; }
.composer .round-button { border-radius: 50%; }
.composer .round-button:hover { background: var(--s3); }
@media (max-width: 760px) { .empty-state h2 { font-size: 28px; } .sheet:not(.desktop-settings):not(.model-sheet) { padding: 24px; } }

.sheet :focus-visible { outline: 2px solid var(--t2) !important; outline-offset: 2px; }
.profile-sheet:has(#account-in:not([hidden])) { width: min(400px, calc(100vw - 32px)); }
#account-in > h2 { padding-right: 34px; }
#account-in .profile-head { gap: 16px; margin: 20px 0; }
.profile-photo-preview { flex-shrink: 0; cursor: pointer; border-radius: 50%; }
.profile-photo-preview:hover { opacity: .8; }
.profile-head .avatar.big { width: 64px; height: 64px; font-size: 24px; }
#profile-user { font-size: 16px; font-weight: 500; }
#account-in #profile-plan { margin: 2px 0 6px; font: 12px var(--sans); }
#account-photo-open { padding: 0; font-size: 12px; color: var(--t1); text-decoration: underline; text-underline-offset: 3px; }
#account-profile-form { margin: 0; gap: 8px; }
#account-profile-form input { width: 100%; }
#account-extra-status:empty { display: none; }
.profile-account-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; }
.profile-account-footer p { margin: 0; color: var(--t3); font-size: 11px; line-height: 1.5; }
.profile-account-footer button { flex-shrink: 0; margin-left: auto; font-size: 12px; color: var(--t2); }

/* Only the open view owns a highlight: a saved chat is not a second selected tab. */
body:not([data-view="chat"]) .conversation-item.active { background: transparent; color: var(--t2); }
body:not([data-view="chat"]) .conversation-item.active:hover { background: var(--s2); color: var(--t1); }

/* The search field is a chat-list tool: hidden until the search icon opens it. */
.chat-search[hidden] { display: none; }
.chat-search { margin: 0 4px 10px; }

/* Small, quiet improvements that preserve the black-and-white layout. */
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 14px; color: var(--t1); background: var(--s3); border: 1px solid var(--line-strong); border-radius: 10px; }
.skip-link:focus { top: 12px; }
.offline-banner { display: flex; align-items: center; gap: 9px; padding: 8px 26px; font-size: 12px; color: #e3c99a; background: #241f16; border-bottom: 1px solid #4a3d22; }
.offline-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #d5a95e; }
.chat-search-empty { padding: 10px 14px; }
#main-content:focus { outline: none; }
@media (max-width: 760px) {
  .offline-banner { padding: 8px 16px; }
}
@media (hover: none) {
  .conversation-delete { opacity: 1; }
  .conversation-open { padding-right: 42px; }
}
.gallery-picture.missing { display: grid; place-items: center; color: var(--t3); font-size: 12px; }
.gallery-picture.missing img { display: none; }

/* Let the brand menu escape the sidebar instead of being cut off at its edge. */
@media (min-width: 761px) {
  .sidebar { position: relative; overflow: visible; }
}
/* Drag the sidebar edge to widen or narrow the navigation. */
.sidebar-resizer { display: none; }
@media (min-width: 761px) {
  .sidebar-resizer { position: absolute; top: 0; right: -4px; bottom: 0; z-index: 30; display: block; width: 8px; cursor: col-resize; touch-action: none; }
  .sidebar-resizer::after { content: ""; position: absolute; top: 0; right: 3px; bottom: 0; width: 1px; background: transparent; transition: background .15s; }
  .sidebar-resizer:hover::after, .sidebar-resizer:focus-visible::after, body.resizing .sidebar-resizer::after { background: var(--line-strong); }
  body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
  body.resizing .app-shell { transition: none; }
}

/* The current-model chip belongs to the composer surface, not a black card. */
.composer .model-chip { background: transparent; border-color: transparent; }
.composer .model-chip:hover, .composer .model-chip[aria-expanded="true"] { background: var(--s3); border-color: var(--line); }

/* ===================== Verified checkmarks and Pro finish ===================== */
.creator-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  color: var(--t1);
  vertical-align: middle;
}
.creator-verified svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.creator-verified svg path:last-child {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gallery-meta .creator-verified { margin-left: -3px; width: 13px; height: 13px; }
.viewer-meta .creator-verified { width: 14px; height: 14px; margin-left: 4px; }
.who .creator-verified { width: 14px; height: 14px; margin-left: 1px; }
#profile-user { display: flex; align-items: center; gap: 5px; min-width: 0; }
#profile-user .name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profile-user .creator-verified { width: 15px; height: 15px; margin-left: 1px; }

/* A Pro plan gets a quiet chrome finish. It is static on purpose: no slow
   sheen on load, only the metallic fill and ring. */
body[data-plan="pro"] .profile-row .avatar,
body[data-plan="pro"] #profile-avatar-big {
  color: #050505;
  background: linear-gradient(120deg, #fafafa 0%, #9a9a9a 26%, #4a4a4a 45%, #ededed 60%, #7d7d7d 82%, #ffffff 100%);
  box-shadow: 0 0 0 2px var(--s1), 0 0 0 3px rgba(255, 255, 255, .55), 0 0 18px rgba(255, 255, 255, .14);
}
body[data-plan="pro"] .profile-row .who small {
  color: #d9d9d9;
  text-shadow: 0 0 12px rgba(255, 255, 255, .22);
}
#account-in .profile-head > div {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 0;
}
body[data-plan="pro"] #account-in #profile-plan {
  display: flex;
  width: fit-content;
  margin: 2px 0;
  padding: 2px 9px;
  color: #080808;
  background: linear-gradient(120deg, #ffffff, #bdbdbd 40%, #ffffff 70%, #9a9a9a);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .02em;
}
#account-in #account-photo-open { margin-top: 1px; }
body[data-plan="pro"] .creator-verified {
  color: #ffffff;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .45));
}

/* ===================== Private chat ===================== */
.private-note { margin: 8px 0 0; font-size: 13px; color: var(--t3); }
#private-chat-row[aria-pressed="true"] {
  color: var(--t1);
  background: var(--s3);
}
html[data-private="true"] .composer-note { font-size: 0; }
html[data-private="true"] .composer-note::before { content: "This chat won\2019t be saved or remembered"; font-size: 12px; color: var(--t3); }

/* ---- AGI area: one column, one set of edges ---- */
:root { --agi-col: 880px; --agi-gutter: 28px; }
#panel-memory, #panel-mind { background: transparent; }
.agi-nav { gap: 12px; padding: 10px var(--agi-gutter) 16px; }
.agi-tag { padding: 4px 9px; font: 500 10px var(--mono); letter-spacing: .18em; color: var(--t3); border-color: var(--line); }
.agi-nav .pills { padding: 3px; background: transparent; border-color: var(--line); }
.agi-nav .pills button { padding: 6px 16px; font-size: 13px; font-weight: 500; }
.agi-nav .pills button:hover { color: var(--t1); }
#panel-memory .net-region { margin: 0 var(--agi-gutter) var(--agi-gutter); border-radius: 20px; }

#panel-mind .mind-space { padding: 6px var(--agi-gutter) 64px; }
#panel-mind .friendly-head { max-width: var(--agi-col); padding: 14px 0 26px; }
#panel-mind .friendly-head h2 { font: 500 34px/1.15 var(--serif); letter-spacing: -.015em; }
#panel-mind .friendly-head p { display: block; max-width: 520px; margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--t2); }
#panel-mind .mind-page { max-width: var(--agi-col); padding: 0; gap: 14px; }

.up-tiles { gap: 14px; }
.up-tile { gap: 6px; padding: 22px 24px; border-radius: 20px; background: linear-gradient(180deg, #121212, #0c0c0c); }
.up-tile strong { font: 500 44px/1 var(--serif); letter-spacing: -.02em; }
.up-tile span { font-size: 14px; color: var(--t2); }
.up-card { padding: 24px 26px; border-radius: 20px; }
.up-card h3 { margin: 0 0 16px; font-size: 17px; letter-spacing: -.015em; }
.up-row { padding: 14px 0; }
.up-row:first-child { padding-top: 0; }
.up-row-text { font-size: 15px; line-height: 1.5; color: var(--t1); }
.up-goal .button, .up-goal button { height: 32px; padding: 0 14px; font-size: 13px; color: var(--t2); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; }
.up-goal button:hover { color: var(--t1); background: var(--s3); }
.up-empty { padding: 4px 0 2px; font-size: 15px; line-height: 1.5; }
.up-add { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.up-add input { height: 44px; padding: 0 18px; border: 1px solid var(--line); background: var(--s1); }
.up-add input:focus-visible { border-color: var(--line-strong); outline: 0; }
.up-add .button { height: 44px; padding: 0 22px; font-weight: 500; color: var(--on-ink, #111); background: var(--on, #f2f2f2); border: 0; }
.up-add .button:hover { background: #fff; }
.up-foot { padding: 14px 0 0; }
#panel-mind .how-details { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  :root { --agi-gutter: 16px; }
  #panel-mind .friendly-head h2 { font-size: 28px; }
  .up-tile { padding: 16px; } .up-tile strong { font-size: 34px; } .up-card { padding: 18px; }
}

/* Secondary pages share the interface typography. */
.projects-head h2, .gallery-space h2, .gallery-head h2 { font: 500 28px/1.3 var(--sans); letter-spacing: -.035em; }
.projects-head p { font-size: 13px; max-width: 460px; line-height: 1.6; }
.projects-empty { background: transparent; border: 0; }
.projects-storage { margin-top: 12px; }

/* ---- Settings: wider, with Usage, Data & privacy and Account ---- */
.desktop-settings { width: min(860px, calc(100vw - 32px)); border-radius: 20px; }
.desktop-dialog-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.settings-layout { grid-template-columns: 210px minmax(0, 1fr); height: min(560px, calc(100vh - 190px)); min-height: 380px; }
.settings-layout > nav { padding: 14px 12px; overflow-y: auto; }
.settings-layout > nav button { padding: 11px 14px; font-size: 14px; border-radius: 10px; }
.settings-content { padding: 26px 30px; overflow-y: auto; }
.settings-content h3 { margin: 22px 0 10px; font-size: 13px; letter-spacing: .02em; }
.settings-content h3:first-child { margin-top: 0; }
.settings-content p { font-size: 13px; line-height: 1.55; }
.settings-row { font-size: 14px; }
.settings-row input[type="text"] { width: 220px; max-width: 55%; height: 36px; padding: 0 12px; color: var(--t1); background: var(--s1); border: 1px solid var(--line-strong); border-radius: 10px; font-size: 13px; }
.settings-row input[type="text"]:focus-visible { outline: 0; border-color: var(--t3); }
.settings-empty { display: grid; justify-items: start; gap: 12px; padding: 22px; background: var(--s1); border: 1px dashed var(--line-strong); border-radius: 16px; }
.settings-empty p { margin: 0; }
.settings-link { padding: 0; color: var(--t2); background: transparent; border: 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.settings-link:hover { color: var(--t1); }

.usage-plan { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font: 500 22px var(--serif); letter-spacing: -.01em; }
.usage-plan .settings-link { font: 400 13px var(--sans); }
.usage-card { margin-bottom: 12px; padding: 18px 20px; background: var(--s2); border: 1px solid var(--line); border-radius: 16px; }
.usage-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usage-line strong { font-size: 15px; font-weight: 500; }
.usage-text { font-size: 13px; color: var(--t2); }
.usage-meter { height: 8px; margin: 12px 0 10px; overflow: hidden; background: var(--s3); border-radius: 999px; }
.usage-meter i { display: block; width: 0; height: 100%; background: var(--t1); border-radius: 999px; transition: width .35s var(--ease, ease); }
.usage-meter i.full { background: #e0a3a3; }
.usage-reset { margin: 0 !important; font-size: 12px !important; color: var(--t3) !important; }
.usage-banked .usage-line { margin-bottom: 6px; }
.usage-count { font: 500 30px/1 var(--serif); letter-spacing: -.02em; }
.usage-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.usage-actions .button { height: 38px; padding: 0 18px; }
.usage-actions span { font-size: 13px; color: var(--t2); }
.usage-banked .usage-reset { max-width: 520px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { display: grid; gap: 4px; padding: 16px 16px 14px; background: var(--s2); border: 1px solid var(--line); border-radius: 16px; }
.stat strong { font: 500 26px/1.1 var(--serif); letter-spacing: -.015em; overflow-wrap: anywhere; }
.stat span { font-size: 12px; color: var(--t2); }

.settings-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; padding: 16px 18px; background: var(--s2); border: 1px solid var(--line); border-radius: 16px; }
.settings-action strong { font-size: 14px; font-weight: 500; }
.settings-action p { margin: 4px 0 0; font-size: 12.5px; }
.settings-action .button { flex: none; height: 36px; padding: 0 16px; }
.button.danger { color: #f0b4b4; border-color: #4a2a2a; }
.button.danger:hover { background: #2a1717; }
#data-status { min-height: 18px; margin-top: 8px; color: var(--t2); }
body[data-text-size="xlarge"] .message-body, body[data-text-size="xlarge"] .message.assistant .message-body { font-size: 21px; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .settings-content { padding: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-action { flex-direction: column; align-items: flex-start; }
}

/* ---- Settings, put together: one grouped list, Orlon's own controls ---- */
.desktop-settings { width: min(880px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: 24px; background: var(--s1); overflow: hidden; }
.desktop-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 20px; border-bottom: 1px solid var(--line); }
.desktop-dialog-head h2 { font: 500 26px/1.1 var(--serif); letter-spacing: -.015em; }
.desktop-dialog-head .sheet-close { position: static; width: 40px; height: 40px; margin: 0; }
.settings-layout { grid-template-columns: 232px minmax(0, 1fr); height: min(580px, calc(100vh - 200px)); }
.settings-layout > nav { display: flex; flex-direction: column; gap: 2px; padding: 16px 14px; border-right: 1px solid var(--line); }
.settings-layout > nav button { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 44px; font-size: 15px; font-weight: 500; color: var(--t2); border-radius: 12px; }
.settings-layout > nav button svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.settings-layout > nav button:hover { color: var(--t1); background: var(--s2); }
.settings-layout > nav button[aria-pressed="true"] { color: var(--t1); background: var(--s3); }
.settings-content { padding: 30px 36px 36px; }
.settings-content h3 { margin: 28px 2px 10px; font: 500 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.settings-content h3:first-child { margin-top: 0; }
.shint { margin: 10px 4px 0; font-size: 13px; line-height: 1.55; color: var(--t3); }

.sgroup { display: block; overflow: hidden; background: var(--s2); border: 1px solid var(--line); border-radius: 18px; }
.sgroup > .srow, .sgroup > .switch-row { margin: 0; padding: 16px 20px; border-radius: 0; background: transparent; }
.sgroup > * + * { border-top: 1px solid var(--line); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; }
.srow-text { display: grid; gap: 3px; min-width: 0; }
.srow-text strong { font-size: 15px; font-weight: 500; color: var(--t1); }
.srow-text span { font-size: 13px; line-height: 1.4; color: var(--t3); }
.sgroup-text { padding: 4px; }
.sgroup-text textarea { display: block; width: 100%; padding: 14px 16px; color: var(--t1); background: transparent; border: 0; border-radius: 14px; font: 15px/1.55 var(--sans); resize: vertical; }
.sgroup-text textarea:focus-visible { outline: 0; background: #ffffff06; }
.switch-row { cursor: pointer; }
.settings-content .switch-row { flex-direction: row; }

/* Orlon's dropdown */
.osel { position: relative; flex: none; }
.osel-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 150px; height: 40px; padding: 0 12px 0 16px; font-size: 14px; color: var(--t1); background: var(--s1); border: 1px solid var(--line-strong); border-radius: 12px; text-align: left; }
.osel-button:hover, .osel-button[aria-expanded="true"] { background: var(--s3); }
.osel-button svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--t3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s var(--ease, ease); }
.osel-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.osel-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); min-width: 100%; width: max-content; max-width: 280px; padding: 6px; background: var(--s3); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 16px 44px #000c; }
.osel.up .osel-menu { top: auto; bottom: calc(100% + 6px); }
.osel-menu[hidden] { display: none; }
.osel-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; height: 40px; padding: 0 12px; font-size: 14px; color: var(--t1); background: transparent; border: 0; border-radius: 10px; text-align: left; }
.osel-item:hover, .osel-item:focus-visible { background: #ffffff0f; outline: 0; }
.osel-item svg { width: 16px; height: 16px; fill: none; stroke: var(--t1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.osel-item[aria-selected="true"] svg { opacity: 1; }

/* Usage, data and account inside the same system */
.usage-plan { margin: 0 2px 16px; font-size: 26px; }
.usage-card, .stat, .settings-action { background: var(--s2); border-color: var(--line); }
.usage-card { padding: 20px 22px; border-radius: 18px; }
.usage-meter { height: 6px; margin: 14px 0 12px; }
.settings-action { padding: 18px 20px; border-radius: 18px; }
.settings-empty { border-radius: 18px; }
.stat-grid { gap: 12px; }
.stat { padding: 18px 18px 16px; border-radius: 18px; }
.settings-footer { padding: 16px 28px; border-top: 1px solid var(--line); background: var(--s1); }
.settings-footer[hidden] { display: none; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; height: calc(100vh - 160px); }
  .settings-layout > nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .settings-layout > nav button { flex: none; }
  .settings-content { padding: 22px 18px 28px; }
  .srow { gap: 14px; }
  .osel-button { min-width: 120px; }
}
.sgroup { overflow: visible; }
.sgroup > :first-child { border-radius: 18px 18px 0 0; }
.sgroup > :last-child { border-radius: 0 0 18px 18px; }
.sgroup > :only-child { border-radius: 18px; }
.osel-menu .osel-item:focus-visible { outline: 0; box-shadow: none; background: #ffffff12; }
.osel-menu .osel-item:focus-visible { outline: 0 !important; }

/* ---- Voice: the same bars as the app ---- */
.voice-panel { width: min(440px, calc(100vw - 32px)); padding: 36px 32px 30px; border-radius: 28px; }
.voice-panel h2 { font: 500 28px/1.15 var(--serif); letter-spacing: -.015em; }
.voice-panel .feature-status { min-height: 22px; margin-top: 10px; color: var(--t2); font-size: 14px; }
.voice-panel .voice-orb { display: grid; place-items: center; width: 210px; height: 210px; min-width: 0; margin: 26px auto 10px; padding: 0; color: var(--t1); background: radial-gradient(circle at 50% 38%, #151515, #070707 72%); border: 1px solid var(--line-strong); border-radius: 50%; }
.voice-panel .voice-orb:hover { transform: none; background: radial-gradient(circle at 50% 38%, #1b1b1b, #0a0a0a 72%); }
.voice-panel .voice-orb:focus-visible { outline: 2px solid var(--t3); outline-offset: 4px; }
.voice-label { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--t1); }
.voice-wave { display: flex; align-items: center; justify-content: center; gap: 10px; width: 130px; height: 110px; color: var(--t1); }
.voice-wave i { --shape: .35; display: block; flex: none; width: 13px; height: calc(10px + var(--shape) * 24px); border-radius: 999px; background: currentColor; opacity: .6; transition: height 100ms linear, opacity 180ms ease; }
.voice-wave i:nth-child(2), .voice-wave i:nth-child(4) { --shape: .7; }
.voice-wave i:nth-child(3) { --shape: 1; }
#voice-panel[data-state="listening"] .voice-wave i { height: calc(16px + var(--shape) * (24px + var(--level, 0) * 70px)); opacity: 1; }
#voice-panel[data-state="speaking"] .voice-wave i { height: calc(36px + var(--shape) * 50px); opacity: 1; animation: orlon-voice-bar 680ms ease-in-out infinite alternate; }
#voice-panel[data-state="speaking"] .voice-wave i:nth-child(2) { animation-delay: -260ms; }
#voice-panel[data-state="speaking"] .voice-wave i:nth-child(3) { animation-delay: -480ms; }
#voice-panel[data-state="speaking"] .voice-wave i:nth-child(4) { animation-delay: -140ms; }
#voice-panel[data-state="speaking"] .voice-wave i:nth-child(5) { animation-delay: -380ms; }
#voice-panel[data-state="thinking"] .voice-wave i { height: 32px; opacity: .85; animation: orlon-voice-think 1.4s ease-in-out infinite; }
#voice-panel[data-state="thinking"] .voice-wave i:nth-child(2) { animation-delay: .12s; }
#voice-panel[data-state="thinking"] .voice-wave i:nth-child(3) { animation-delay: .24s; }
#voice-panel[data-state="thinking"] .voice-wave i:nth-child(4) { animation-delay: .36s; }
#voice-panel[data-state="thinking"] .voice-wave i:nth-child(5) { animation-delay: .48s; }
@keyframes orlon-voice-bar { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@keyframes orlon-voice-think { 0%, 100% { transform: scaleY(.6); opacity: .5; } 50% { transform: scaleY(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .voice-wave i { animation: none !important; } }

/* Live bars in the text bar while dictating */
.composer-wave { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 3px; height: 40px; padding: 0 6px; }
.composer-wave[hidden] { display: none; }
.composer-wave i { display: block; flex: 1 1 0; max-width: 5px; height: 4px; min-height: 4px; background: var(--t1); border-radius: 999px; opacity: .85; transition: height 80ms linear; }
.composer.is-dictating #message-input, .composer.is-dictating .model-chip, .composer.is-dictating #composer-hint { display: none; }
.composer.is-dictating #voice-record { color: var(--on-ink, #111); background: var(--on, #f2f2f2); }

/* Search slides over the top of the sidebar while it's open; the header never changes height, so nothing below it jumps. */
.sidebar-head { position: relative; }
.sidebar-head > :not(.head-search) { transition: opacity .18s ease; }
.head-search { position: absolute; inset: 0 6px auto 6px; z-index: 2; display: flex; align-items: center; gap: 6px; height: 44px; min-width: 0; padding: 0 4px 0 14px; background: var(--s2); border: 1px solid var(--line); border-radius: 14px; opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1), border-color .18s; }
.head-search[hidden] { display: flex !important; opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(14px) scale(.97); transform-origin: right center; transition: opacity .16s ease, transform .2s ease, visibility 0s .2s; }
.head-search:focus-within { border-color: var(--line-strong); }
.head-search > svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--t3); stroke-width: 1.8; stroke-linecap: round; }
.head-search input { flex: 1; min-width: 0; height: 100%; padding: 0 4px; color: var(--t1); background: transparent; border: 0; font: 15px var(--sans); outline: 0; }
.head-search input::-webkit-search-cancel-button { display: none; }
.head-search .icon-button { flex: none; width: 34px; height: 34px; padding: 8px; color: var(--t2); background: transparent; border: 0; border-radius: 10px; }
.head-search .icon-button:hover { color: var(--t1); background: var(--s3); }
.head-search .icon-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sidebar-head:has(.head-search:not([hidden])) > :not(.head-search) { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .head-search, .head-search[hidden], .sidebar-head > :not(.head-search) { transition: none; } }
.head-search input:focus, .head-search input:focus-visible { outline: none !important; box-shadow: none !important; }
.head-search input::placeholder { color: var(--t3); }
.head-search:focus-within { border-color: var(--t3); }
.head-search { border-radius: 999px; padding-left: 16px; }

/* Model logos: the app's rounded tiles, one look for every maker */
.m-logo { background: var(--s3); border-radius: 10px; }
.m-logo img { border-radius: inherit; }
.m-logo.small { width: 26px; height: 26px; border-radius: 8px; border-width: 2px; }
.m-logo.letter { color: var(--t1); background: var(--s3); font-weight: 600; }
.m-logo:has(img.auto) { background: var(--s3); }
.m-logo img.auto { padding: 5px; }
.model-chip-logo { border-radius: 6px; object-fit: cover; }
.model-chip-logo.orlon-mark { object-fit: contain; border-radius: 0; }

/* ---- Reply actions: icons under a reply, shown only while the pointer is over the message ---- */
.reply-actions { display: flex; align-items: center; gap: 2px; margin: 10px 0 0 -8px; opacity: 0; visibility: hidden; transition: opacity .14s ease, visibility .14s; }
.message.assistant:last-child .reply-actions { opacity: 1; visibility: visible; }
.message.assistant:hover .reply-actions, .message.assistant:focus-within .reply-actions { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: none) { .reply-actions { opacity: 1; visibility: visible; transform: none; } }
.reply-action { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--t3); background: transparent; border: 0; border-radius: 10px; }
.reply-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reply-action:hover { color: var(--t1); background: var(--s3); }
.reply-action[aria-pressed="true"] { color: var(--t1); }
.reply-action[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .18; }

/* Reply action motion: icons rise in one after another, a press shrinks, a rating pops, a copy becomes a tick. */
.reply-action { transition: background .16s ease, color .16s ease, transform .14s cubic-bezier(.2,.8,.2,1), opacity .18s ease; }
.reply-actions .reply-action { opacity: 1; transform: none; }
.message.assistant:hover .reply-actions .reply-action, .message.assistant:focus-within .reply-actions .reply-action { opacity: 1; transform: none; }
.reply-actions .reply-action:nth-child(2) { transition-delay: 0s, 0s, 30ms, 30ms; }
.reply-actions .reply-action:nth-child(3) { transition-delay: 0s, 0s, 60ms, 60ms; }
.reply-actions .reply-action:nth-child(4) { transition-delay: 0s, 0s, 90ms, 90ms; }
.reply-actions .reply-action:nth-child(5) { transition-delay: 0s, 0s, 120ms, 120ms; }
.reply-action:active { transform: scale(.86) !important; }
.reply-action.done { color: var(--t1); }
.reply-action.done svg, .reply-action[aria-pressed="true"] svg { animation: reply-pop .36s cubic-bezier(.2,1.4,.4,1); }
.reply-action[aria-label="Read aloud"][aria-pressed="true"] { color: var(--t1); animation: reply-pulse 1.2s ease-in-out infinite; }
.reply-action[aria-label="Read aloud"][aria-pressed="true"] svg { fill: none; }
@keyframes reply-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes reply-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (hover: none) { .reply-actions .reply-action { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reply-action, .reply-action svg { animation: none !important; transition: none; } }

.settings-linkrow { text-decoration: none; color: inherit; }
.settings-linkrow > svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--t3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-linkrow:hover { background: var(--s3); }
.settings-linkrow[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Model sheet sidebar: Orlon's own dropdowns and usage bars */
.model-setting { display: grid; gap: 8px; font-size: 12px; color: var(--t2); }
.model-setting .osel, .model-setting .osel-button { width: 100%; }
.model-setting .osel-button { min-width: 0; height: 38px; font-size: 13px; }
.model-setting .osel-menu { left: 0; right: 0; width: auto; max-width: none; }
.model-usage { display: grid; gap: 12px; width: 100%; padding: 14px 6px 0; margin-top: 4px; text-align: left; color: inherit; background: transparent; border: 0; border-top: 1px solid var(--line); }
.model-usage:hover h3 { color: var(--t1); }
.usage-mini { display: grid; gap: 6px; }
.usage-mini-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--t2); }
.usage-mini-top span:last-child { color: var(--t3); }
.usage-mini-track { display: block; height: 5px; overflow: hidden; background: var(--s3); border-radius: 999px; }
.usage-mini-track i { display: block; height: 100%; background: var(--t1); border-radius: 999px; transition: width .35s ease; }
.usage-mini-track i.full { background: #e0a3a3; }

/* Settings stays in the workspace, with a stable desktop navigation column. */
.desktop-settings { width: min(940px, calc(100vw - 64px)); max-width: none; height: min(650px, calc(100dvh - 64px)); max-height: none; margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 24px; }
.desktop-settings[open] { display: flex; flex-direction: column; }
.desktop-settings .desktop-dialog-head { flex: none; padding: 20px 24px; }
.desktop-settings .desktop-dialog-head h2 { font: 500 20px/1.4 var(--sans); }
.desktop-settings .settings-layout { flex: 1; min-height: 0; height: auto; grid-template-columns: 210px minmax(0, 1fr); }
.desktop-settings .settings-layout > nav { padding: 16px 12px; background: var(--field); }
.desktop-settings .settings-layout > nav button { height: 42px; padding: 0 12px; font-size: 14px; font-weight: 400; border-radius: 10px; }
.desktop-settings .settings-content { padding: 28px 30px 36px; }
.desktop-settings .settings-content > section { max-width: 660px; margin: 0 auto; }
.settings-section-head { margin-bottom: 26px; }
.settings-section-head h2 { font: 500 23px/1.3 var(--sans); letter-spacing: -.025em; }
.settings-section-head p { margin: 7px 0 0; font-size: 13px; line-height: 1.5; color: var(--t2); }
.desktop-settings .settings-footer { flex: none; padding: 14px 24px; }
.settings-content h3 { color: var(--t2); text-transform: none; letter-spacing: 0; font-size: 13px; margin-bottom: 12px; }
.settings-content .sgroup { border-radius: 16px; background: var(--field); }
.settings-content .sgroup > .srow { padding: 16px; }
.settings-content .srow-text strong { font-size: 14px; }
.settings-content .srow-text span { font-size: 12px; }
.settings-content .usage-plan, .settings-content .stat strong { font-family: var(--sans); }
@media (max-width: 760px) {
  .desktop-settings { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .desktop-settings .desktop-dialog-head { padding: 16px 20px; }
  .desktop-settings .settings-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .desktop-settings .settings-layout > nav { padding: 10px 12px; }
  .desktop-settings .settings-content { padding: 24px 18px 40px; }
  .desktop-settings .settings-footer { padding: 14px 18px; }
  .settings-section-head { margin-bottom: 22px; }
}

/* ---- One set of colours for both themes ---- */
:root { --hover: #191919; --hover-2: #303030; --ink-soft: #c4c4c4; --ink-faint: #b4b4b4; --field: #080808; --field-line: #292929; --field-line-focus: #4b4b4b; --pop-shadow: 0 16px 44px #000c; --tint: #ffffff10; --danger: #f0b4b4; --danger-fill: #2a1717; --danger-line: #4a2a2a; --meter-full: #e0a3a3; --tile-a: #121212; --tile-b: #0c0c0c; --orb-a: #151515; --orb-b: #070707; --warn-ink: #e3c99a; --warn-bg: #241f16; --warn-line: #4a3d22; --nav-bg: #000; }
body[data-theme="light"] { --hover: #eaeaea; --hover-2: #dedede; --ink-soft: #3a3a3a; --ink-faint: #555; --field: #fff; --field-line: #d4d4d4; --field-line-focus: #9a9a9a; --pop-shadow: 0 14px 40px #00000026; --tint: #00000009; --danger: #a8322c; --danger-fill: #fbeceb; --danger-line: #e6c4c1; --meter-full: #c0615b; --tile-a: #fbfbfb; --tile-b: #f1f1f1; --orb-a: #fafafa; --orb-b: #e9e9e9; --warn-ink: #7a5a1c; --warn-bg: #fbf3df; --warn-line: #ecd9a3; --nav-bg: #f6f6f6; }
.sidebar-head .icon-button { color: var(--ink-faint); }
.side-row, .tab, #tab-agi { color: var(--ink-soft); }
#new-chat:hover, .tab.active, .tab[aria-selected="true"], .topbar .icon-button:hover, .pill-button:hover { background: var(--hover); }
.sidebar-label { color: var(--t3); }
.topbar .icon-button { color: var(--ink-faint); }
.pill-button.solid, .sidebar-login-actions #sidebar-signup-open { color: var(--on-ink); background: var(--on); border-color: var(--on); }
.pill-button.solid:hover, .sidebar-login-actions #sidebar-signup-open:hover { background: var(--on); filter: brightness(1.12); }
#signup-open { border-color: var(--line-strong); }
.sidebar-login-actions button { background: var(--s3); }
.sidebar-login-actions button:hover { background: var(--hover-2); }
.composer { background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line); }
.composer:focus-within { background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line-focus); }
.composer .round-button { color: var(--ink-soft); }
.send-button { background: var(--on); }
.send-button svg { stroke: var(--on-ink); }
.model-chip { color: var(--ink-faint); }
.model-chip:hover { background: var(--hover-2); }
.model-navigation { background: var(--nav-bg); }
.model-category:hover { background: var(--hover); }
.model-category[aria-pressed="true"] { color: var(--t1); background: var(--s3); }
.model-search input { background: var(--s2); }
.up-tile { background: linear-gradient(180deg, var(--tile-a), var(--tile-b)); }
.up-add .button:hover { background: var(--on); filter: brightness(1.12); }
.usage-meter i.full, .usage-mini-track i.full { background: var(--meter-full); }
.button.danger { color: var(--danger); border-color: var(--danger-line); }
.button.danger:hover { background: var(--danger-fill); }
.pill-button.danger { color: var(--danger); }
.sgroup-text textarea:focus-visible { background: var(--tint); }
.osel-item:hover, .osel-item:focus-visible, .osel-menu .osel-item:focus-visible, .reply-menu-item:hover { background: var(--tint); }
.osel-menu, .brand-menu, .reply-menu { box-shadow: var(--pop-shadow); }
.voice-panel .voice-orb { background: radial-gradient(circle at 50% 38%, var(--orb-a), var(--orb-b) 72%); }
.voice-panel .voice-orb:hover { background: radial-gradient(circle at 50% 38%, var(--orb-a), var(--orb-b) 60%); }
#voice-record[aria-pressed="true"] { color: var(--danger); background: var(--danger-fill); }
.offline-banner { color: var(--warn-ink); background: var(--warn-bg); border-bottom-color: var(--warn-line); }
.settings-linkrow:hover, .m-item:hover { background: var(--hover); }
body[data-theme="light"] .head-search { background: var(--s2); }
body[data-theme="light"] .model-chip-logo:not(.orlon-mark) { filter: none; }
body[data-theme="light"] .m-logo img.auto, body[data-theme="light"] .brand-item .logo { filter: invert(1); }
body[data-theme="light"] .image-shimmer { background: radial-gradient(#bbb 1px, transparent 2px) 0 0 / 18px 18px, #eee; }
/* The older colour names follow the theme too, so nothing keeps a dark value in light mode. */
body[data-theme="light"] { --surface: #f8f8f8; --surface-2: #f1f1f1; --surface-3: #e7e7e7; --border: #e0e0e0; --border-strong: #ccc; --text: #202020; --muted: #555; --muted-2: #666; --accent: #202020; --accent-ink: #fff; }
body { background: var(--bg); color: var(--t1); }
.who small { color: var(--t3); }

/* The model selector is AMOLED black like the rest. */
.model-sheet, .model-sheet.is-desktop { background: var(--bg); }
.model-navigation { background: var(--bg); border-right-color: var(--line); }
.model-sheet .m-tier, .model-sheet .m-auto, .model-sheet .m-row { background: var(--bg); border-color: var(--line); }
.model-sheet .m-tier:hover, .model-sheet .m-auto:hover, .model-sheet .m-row:hover { background: var(--hover); }
.model-search input { background: var(--bg); border-color: var(--line); }
.model-search input:focus-visible { outline: 0; border-color: var(--line-strong); }
.model-category[aria-pressed="true"] { background: var(--hover); }
.model-sheet .m-logo.small { border-color: var(--bg); }
.model-sheet .m-item:hover, .model-sheet .m-item.on { background: var(--hover); }

/* Voice mode is the round white button until something is typed; then Send pops in. */
.voice-mode-button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; background: var(--on); border: 0; border-radius: 50%; transition: transform .14s cubic-bezier(.2,.8,.2,1), filter .16s ease; }
.voice-mode-button svg { width: 20px; height: 20px; fill: none; stroke: var(--on-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.voice-mode-button:hover { filter: brightness(1.12); }
.voice-mode-button:active { transform: scale(.92); }
.composer:not(.has-text) #send-button { display: none; }
.composer.has-text #voice-mode { display: none; }
.composer.has-text #send-button { animation: send-pop .3s cubic-bezier(.2,1.3,.4,1); }
.composer:not(.has-text) #voice-mode { animation: send-pop .3s cubic-bezier(.2,1.3,.4,1); }
.composer.is-dictating #voice-mode { display: none; }
.composer.is-dictating #send-button { display: none; }
@keyframes send-pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .composer.has-text #send-button, .composer:not(.has-text) #voice-mode { animation: none; } }

/* Profile picture colour: the same six colours as the Orlon app */
.profile-swatches { display: flex; gap: 10px; margin: 6px 0 14px; }
.profile-swatch { width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; box-shadow: inset 0 0 0 1px #00000040; transition: transform .14s ease, border-color .14s ease; }
.profile-swatch:hover { transform: scale(1.1); }
.profile-swatch[aria-pressed="true"] { border-color: var(--t1); box-shadow: 0 0 0 2px var(--bg) inset; }
#profile-color-label { display: block; margin-top: 14px; font-size: 13px; color: var(--t2); }

/* ---- Community on a desktop: a wide grid, and the prompt bar docked below it instead of floating over the pictures ---- */
@media (min-width: 761px) {
  .gallery-space { padding: 8px 40px 28px; }
  .gallery-head, .gallery-grid, .gallery-note { max-width: 1560px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 20px; }
  .gallery-tile { cursor: pointer; }
  .gallery-picture { border-radius: 14px; }
  .gallery-prompt-bar { position: static; flex: none; width: min(960px, calc(100% - 80px)); margin: 0 auto 22px; transform: none; box-shadow: none; background: var(--field); border-color: var(--field-line); }
  .gallery-prompt-bar:focus-within { border-color: var(--field-line-focus); }
}

/* Pages that carry their own title don't need a bar repeating it (it stays when it holds Log in / Sign up). */
@media (min-width: 761px) {
  body:not([data-view="chat"]) #topbar-heading, body:not([data-view="chat"]) #topbar-kicker { display: none; }
  body:not([data-view="chat"]) .topbar:not(:has(#auth-buttons:not([hidden]))) { display: none; }
}
.gallery-head h2 { font: 500 28px/1.3 var(--sans); letter-spacing: -.035em; }
.gallery-head { padding: 8px 0 14px; }
.gallery-head .pills button { padding: 5px 14px; font-size: 13px; }

/* ---- Familiar chat-site touches ---- */
:root { --sidebar-w: clamp(250px, 19vw, 300px); }
/* Starter chips, like the empty screens of ChatGPT and Claude: below the box, only before the first message */
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 0; max-width: 760px; }
#panel-chat:not(.is-empty) .starters, html[data-private="true"] .starters { display: none; }
#panel-chat:not(.is-empty) .starters { display: none; }
.starters button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 13px; font-size: 14px; color: var(--ink-soft); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; transition: background .15s ease, color .15s ease, transform .12s ease; }
.starters button:hover { color: var(--t1); background: var(--hover); }
.starters button:active { transform: scale(.97); }
.starters svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* The chat's own title at the top, as in both of them */
@media (min-width: 761px) {
  body[data-view="chat"][data-titled="true"] .topbar-title { display: block; flex: 1; min-width: 0; margin: 0 12px 0 6px; }
  body[data-view="chat"][data-titled="true"] #topbar-heading { margin: 0; font-size: 15px; font-weight: 500; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---- The chat's own menu from its title ---- */

/* ---- Your own messages: copy and edit, on hover ---- */
.user-actions { display: flex; justify-content: flex-end; gap: 2px; margin: 4px 0 0; opacity: 0; visibility: hidden; transition: opacity .14s ease, visibility 0s .14s; }
.message.user:hover .user-actions, .message.user:focus-within .user-actions { opacity: 1; visibility: visible; transition-delay: 0s; }
@media (hover: none) { .user-actions { opacity: 1; visibility: visible; } }
.message-editor { display: grid; gap: 10px; width: min(640px, 100%); margin-left: auto; padding: 12px; background: var(--s2); border: 1px solid var(--line-strong); border-radius: 18px; }
.message-editor textarea { width: 100%; resize: vertical; padding: 4px 6px; color: var(--t1); background: transparent; border: 0; font: 15px/1.55 var(--sans); outline: 0; }
.message-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.message-editor-actions button { height: 34px; padding: 0 16px; font-size: 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--t1); background: transparent; }
.message-editor-actions .editor-send { color: var(--on-ink); background: var(--on); border-color: var(--on); }
.message-editor-actions button:disabled { opacity: .5; }

/* Community feed: artwork first, with quiet creator details. */
#panel-gallery .gallery-space { padding: 32px 32px 40px; }
.gallery-head { align-items: center; padding: 0 0 22px; }
.gallery-heading p { margin: 8px 0 0; color: var(--t2); font-size: 13px; line-height: 1.5; }
#panel-gallery .gallery-prompt-bar { position: static; width: 100%; max-width: 1560px; margin: 0 auto 26px; transform: none; padding: 8px 8px 8px 18px; border-radius: 18px; background: var(--field); box-shadow: none; }
#panel-gallery .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px 16px; }
.gallery-tile { display: block; min-width: 0; }
.gallery-open { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; color: #fff; background: transparent; border: 0; border-radius: 16px; text-align: left; }
.gallery-open .gallery-picture { border: 0; border-radius: 16px; }
.gallery-open .gallery-picture img { transition: opacity .4s ease, transform .35s ease; }
.gallery-open:hover .gallery-picture, .gallery-tile:hover .gallery-picture { transform: none; }
.gallery-open:hover img { transform: scale(1.035); }
.gallery-open .gallery-title { position: absolute; inset: auto 0 0; display: block; padding: 42px 16px 16px; font-size: 14px; font-weight: 500; line-height: 1.4; background: linear-gradient(transparent, #000b); text-shadow: 0 1px 5px #0008; }
.gallery-tile .gallery-meta { padding: 10px 2px 0; font-size: 12px; }
.gallery-tile .gallery-avatar { width: 22px; height: 22px; }
.gallery-tile .gallery-time { font-size: 11px; }
#gallery-viewer { width: min(1040px, calc(100vw - 48px)); padding: 16px; }
#gallery-viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; }
#gallery-viewer img { max-height: calc(100dvh - 100px); border-radius: 14px; }
#gallery-viewer .viewer-meta { padding: 36px 16px 24px 0; gap: 12px; align-self: start; }
#gallery-viewer .viewer-meta strong { font-size: 20px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
#gallery-viewer .viewer-meta > span { font-size: 13px; }
@media (max-width: 760px) {
  #panel-gallery .gallery-space { padding: 22px 16px 32px; }
  .gallery-head { align-items: flex-start; gap: 16px; }
  .gallery-head h2 { font-size: 24px; }
  #panel-gallery .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .gallery-open, .gallery-open .gallery-picture { border-radius: 12px; }
  .gallery-open .gallery-title { padding: 28px 10px 10px; font-size: 12px; }
  .gallery-tile .gallery-time { display: none; }
  .gallery-tile .gallery-meta { gap: 5px; font-size: 11px; }
  #gallery-viewer { width: calc(100% - 24px); }
  #gallery-viewer[open] { display: block; }
  #gallery-viewer img { max-height: 62dvh; }
  #gallery-viewer .viewer-meta { padding: 16px 4px 4px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-open:hover img { transform: none; } }

/* ---- Share link sheet ---- */
.link-dialog { width: min(460px, calc(100vw - 32px)); }
.link-row { display: flex; gap: 8px; margin: 16px 0 14px; }
.link-row input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; color: var(--t1); background: var(--s1); border: 1px solid var(--line-strong); border-radius: 12px; font: 13px var(--sans); }
.link-copy, .link-done, .link-stop { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--t1); background: transparent; }
.link-copy { flex: none; min-width: 96px; }
.link-done { color: var(--on-ink); background: var(--on); border-color: var(--on); }
.link-stop { color: var(--danger); border-color: var(--danger-line); }
.link-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* the actions hang below the bubble, not inside it */
.message.user { position: relative; margin-bottom: 30px; }
.message.user .user-actions { position: absolute; right: 0; top: 100%; margin: 4px 0 0; }

/* ---- Sidebar chats: a "..." on hover with Share, Rename, Delete ---- */
.conversation-more { display: grid; place-items: center; width: 30px; height: 30px; margin-right: 4px; padding: 0; color: var(--t2); background: transparent; border: 0; border-radius: 8px; opacity: 0; transition: opacity .12s ease, background .12s ease; }
.conversation-more svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.conversation-item:hover .conversation-more, .conversation-item:focus-within .conversation-more, .conversation-item.menu-open .conversation-more { opacity: 1; }
.conversation-more:hover { color: var(--t1); background: var(--tint); }
.conversation-item.menu-open { background: var(--hover); }
@media (hover: none) { .conversation-more { opacity: 1; } }
.row-rename { flex: 1; min-width: 0; width: 100%; height: 30px; padding: 0 8px; color: var(--t1); background: var(--s2); border: 1px solid var(--line-strong); border-radius: 8px; font: 14px var(--sans); outline: 0; }
.chat-menu { position: fixed; z-index: 60; min-width: 190px; padding: 6px; background: var(--s3); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--pop-shadow); }
.chat-menu[hidden] { display: none; }
.chat-menu button { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; font-size: 14px; color: var(--t1); background: transparent; border: 0; border-radius: 10px; text-align: left; }
.chat-menu button[hidden] { display: none; }
.chat-menu button:hover { background: var(--tint); }
.chat-menu button.danger { color: var(--danger); }
.chat-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Contrast and grouping in the message box ---- */
:root { --field-line: #3d3d3d; --field-line-focus: #6e6e6e; --chip-fill: #ffffff0d; --chip-fill-hover: #ffffff1f; --chip-line: #444; }
body[data-theme="light"] { --field-line: #c2c2c2; --field-line-focus: #858585; --chip-fill: #0000000a; --chip-fill-hover: #00000016; --chip-line: #c8c8c8; }
.composer textarea::placeholder, #message-input::placeholder { color: var(--t2); opacity: 1; }
.composer .model-chip { color: var(--ink-soft); }
/* starter chips have a soft fill, and a clearer one under the pointer */
.starters button { color: var(--t1); background: var(--chip-fill); border-color: var(--chip-line); }
.starters button:hover, .starters button:focus-visible { background: var(--chip-fill-hover); }
/* the menu button is a full-size target on narrow screens */
@media (max-width: 760px) {
  .menu-button, .sidebar-close { width: 44px; height: 44px; }
  .menu-button svg, .sidebar-close svg { width: 22px; height: 22px; }
}
.menu-button { width: 40px; height: 40px; }
.menu-button svg { width: 21px; height: 21px; }
:root { --chat-width: 768px; }

/* ---- Sidebar: clearer blocks ---- */
.sidebar { border-right: 1px solid #262626; }
body[data-theme="light"] .sidebar { border-right-color: #dcdcdc; }
.sidebar-label-row { padding: 6px 8px 8px; margin-top: 0; }
.sidebar-label { color: var(--t2); font-size: 13px; font-weight: 500; }
.sidebar-head { gap: 6px; }
.sidebar-head .icon-button { width: 36px; height: 36px; padding: 8px; border-radius: 9px; }
.sidebar-head .icon-button svg { width: 20px; height: 20px; }
/* the account row is one button: it opens a small menu, so there is no chevron or second gear next to it */
.profile-row { flex: 1; min-width: 0; }
.profile-row:hover, .profile-row[aria-expanded="true"] { background: var(--hover); }
.profile-menu { position: fixed; z-index: 60; min-width: 220px; padding: 6px; background: var(--s3); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--pop-shadow); }
.profile-menu[hidden] { display: none; }
.profile-menu button { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; font-size: 14px; color: var(--t1); background: transparent; border: 0; border-radius: 10px; text-align: left; }
.profile-menu button:hover { background: var(--tint); }
.profile-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Popups follow the theme's page colour (AMOLED black in dark, white in light), outlined so they read as raised. */
.osel-menu, .brand-menu, .chat-menu, .profile-menu, .tools-menu { padding: 6px; background: var(--s1); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--pop-shadow); }
.tools-menu .tools-item:hover, .brand-item:hover, .osel-item:hover, .chat-menu button:hover, .profile-menu button:hover { background: var(--hover); }
body:not([data-theme="light"]) .osel-menu, body:not([data-theme="light"]) .brand-menu, body:not([data-theme="light"]) .chat-menu, body:not([data-theme="light"]) .profile-menu, body:not([data-theme="light"]) .tools-menu { border-color: #333; }

/* The greeting appears once we know who is here, with a short fade. */
.empty-state { transition: opacity .25s ease; }
body[data-greet="wait"] #messages .empty-state { opacity: 0; }

/* The model selector scrolls without showing scroll bars. */
.model-sheet, .model-sheet * { scrollbar-width: none; -ms-overflow-style: none; }
.model-sheet::-webkit-scrollbar, .model-sheet *::-webkit-scrollbar { display: none; width: 0; height: 0; }
.model-sheet .m-item { transition: background .14s ease; }
.model-sheet .m-item:hover { background: var(--tint); }
.model-sheet .m-item.on { background: var(--hover); }
.conversation-open { display: flex; align-items: center; gap: 8px; }
.conversation-open strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-pin { display: grid; flex: none; color: var(--t3); }
.conversation-pin svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.conversation-item:hover .conversation-pin, .conversation-item.menu-open .conversation-pin { display: none; }

/* ---- Hearts ---- */
.gallery-heart { display: inline-flex; align-items: center; gap: 5px; flex: none; margin-left: 8px; padding: 2px 6px; color: var(--t3); border-radius: 999px; cursor: pointer; font-size: 12.5px; transition: color .14s ease, background .14s ease, transform .12s ease; }
.gallery-heart svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill .14s ease; }
.gallery-heart:hover { color: var(--t1); background: var(--tint); }
.gallery-heart.on { color: #e5798f; }
.gallery-heart.on svg { fill: currentColor; animation: reply-pop .32s cubic-bezier(.2,1.4,.4,1); }
.gallery-heart:active { transform: scale(.92); }
#gallery-viewer-heart { justify-self: start; margin-top: 4px; }
#gallery-viewer-heart .gallery-heart { margin-left: -6px; font-size: 14px; }


#setting-job { width: 220px; height: 36px; padding: 0 12px; color: var(--t1); background: var(--field, var(--s1)); border: 1px solid var(--line-strong); border-radius: 10px; font: 14px var(--sans); outline: 0; }
#setting-job:focus-visible { border-color: var(--t3); }
.sgroup-text textarea { min-height: 84px; max-height: 160px; }

/* ---- Settings buttons: one pill style, filled for the main action ---- */
.settings-content .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 18px; color: var(--t1); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; font: 500 13.5px var(--sans); cursor: pointer; transition: background .15s, border-color .15s, transform .12s; }
.settings-content .button:hover { background: var(--hover); border-color: var(--t3); }
.settings-content .button:active { transform: scale(.97); }
.settings-content .button:focus-visible { outline: 2px solid var(--t3); outline-offset: 2px; }
.settings-content .button.primary { color: var(--on-ink, #111); background: var(--on, #f2f2f2); border-color: transparent; }
.settings-content .button.primary:hover { background: var(--on, #f2f2f2); filter: brightness(1.12); }
.settings-content .button.danger { color: var(--danger); border-color: var(--danger-line); }
.settings-content .button.danger:hover { background: var(--danger-fill); border-color: var(--danger-line); }
.settings-content .settings-link { padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.settings-content .settings-link:hover { background: var(--hover); }
.settings-empty { justify-items: start; }

/* ---- Phones ---- */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
@media (max-width: 760px) {
  /* Message box on its own row, controls underneath */
  .composer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 12px 12px 10px 16px; border-radius: 24px; }
  .composer textarea { order: -1; flex: 1 0 100%; padding: 2px 4px 8px 0; font-size: 16px; }
  .composer .composer-hint { flex: 1; min-width: 0; }
  .composer .round-button, .composer .send-button { flex: none; width: 40px; height: 40px; }
  .composer .model-chip { max-width: 150px; min-height: 40px; font-size: 13px; }
  .composer-note { margin-top: 8px; }
  .starters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -16px; padding: 4px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .starters::-webkit-scrollbar { display: none; }
  .starters button { flex: none; }
  /* Settings: tabs become one swipeable strip */
  .desktop-settings .settings-layout > nav { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
  .desktop-settings .settings-layout > nav::-webkit-scrollbar { display: none; }
  .desktop-settings .settings-layout > nav button { flex: none; width: auto; height: 40px; white-space: nowrap; }
  .settings-content { overflow-x: hidden; }
  .srow { gap: 12px; }
  .srow-text span { overflow-wrap: anywhere; }
  .settings-content .button { min-height: 40px; }
  #setting-job { width: 150px; }
  /* Touch targets and iOS zoom */
  input, textarea, select { font-size: 16px; }
  .side-row, .conversation-list a, .conversation-list button { min-height: 44px; }
  .topbar .icon-button { width: 40px; height: 40px; }
  /* Long content scrolls inside itself, never the page */
  .message pre, .message table, .message .table-wrap { max-width: 100%; overflow-x: auto; }
  .message img, .message video { max-width: 100%; height: auto; }
  .message-list { overflow-wrap: anywhere; }
  .chat-main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 380px) { .empty-state h2 { font-size: 24px; } }
@media (max-width: 760px) { .composer .model-chip { margin-left: auto; } }
@media (max-width: 760px) { .starters { flex-wrap: wrap; justify-content: center; overflow: visible; margin-inline: 0; padding: 4px 0; } }
@media (max-width: 760px) { .starters { display: none; } }
@media (max-width: 760px) { .composer #model-chip-name { max-width: 120px; } }

/* No scroll bars inside the model selector or its drop-downs, on any browser. */
#model-sheet, #model-sheet *, .osel-menu, .tools-menu { scrollbar-width: none !important; scrollbar-color: transparent transparent; -ms-overflow-style: none; }
#model-sheet::-webkit-scrollbar, #model-sheet *::-webkit-scrollbar, .osel-menu::-webkit-scrollbar, .tools-menu::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* ---- Model selector on phones: a compact sheet from the bottom ---- */
@media (max-width: 760px) {
  #model-sheet:not(.is-desktop) { width: 100%; max-width: none; margin: auto 0 0; max-height: min(74dvh, 560px); padding: 6px 14px max(16px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0; }
  #model-sheet:not(.is-desktop)[open] { animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
  #model-sheet:not(.is-desktop)::before { content: ""; display: block; width: 36px; height: 4px; margin: 4px auto 2px; border-radius: 2px; background: var(--line-strong); }
  #model-sheet:not(.is-desktop) .sheet-bar { min-height: 44px; margin: 0 0 6px; }
  #model-sheet:not(.is-desktop) .sheet-bar h2 { font-size: 16px; }
  #model-sheet:not(.is-desktop) .m-auto { padding: 10px 14px; border-radius: 16px; }
  #model-sheet:not(.is-desktop) .m-auto small, #model-sheet:not(.is-desktop) .m-auto p { font-size: 12.5px; }
  #model-sheet:not(.is-desktop) .m-tiers { gap: 8px; grid-template-columns: 1fr 1fr; }
  #model-sheet:not(.is-desktop) .m-tier { gap: 4px; padding: 12px 14px; border-radius: 16px; }
  #model-sheet:not(.is-desktop) .m-tier strong.serif { font-size: 18px; }
  #model-sheet:not(.is-desktop) .m-tier-desc { display: none; }
  #model-sheet:not(.is-desktop) .m-tier-foot { margin-top: 2px; font-size: 12px; }
  #model-sheet:not(.is-desktop) .m-row { padding: 13px 16px; border-radius: 14px; }
  #model-sheet:not(.is-desktop) .m-row-title { font-size: 15px; }
  #model-sheet:not(.is-desktop) .m-row-value { font-size: 14px; }
  #model-sheet:not(.is-desktop) .m-item { padding: 10px 8px; border-radius: 12px; }
  #model-sheet:not(.is-desktop) .m-item-text strong { font-size: 15px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #model-sheet[open] { animation: none !important; } }
@media (max-width: 760px) { #model-sheet:not(.is-desktop) .m-tier-foot { flex-direction: column; align-items: flex-start; gap: 6px; } #model-sheet:not(.is-desktop) .m-tier-foot > span { white-space: nowrap; } }
@media (hover: none), (max-width: 760px) {
  .conversation-delete, #profile-settings, .gallery-tabs button, #gallery-popular, #gallery-latest, #model-close { min-width: 40px; min-height: 40px; }
  #gallery-popular, #gallery-latest { padding-inline: 16px; }
}
.m-tier-all { width: 100%; margin-top: 10px; }
.m-item.locked { opacity: .8; }
.m-item.locked .m-item-text strong { color: var(--t2); }
@media (max-width: 760px) { #model-sheet:not(.is-desktop) .m-tier-all { margin-top: 8px; } #model-sheet:not(.is-desktop) .m-tier-all .m-tier-desc { display: block; font-size: 13px; } }

/* ---- Model selector: search, All / Free / Paid, one list ---- */
.model-bar { display: flex; align-items: center; gap: 10px; }
.model-bar .model-search { flex: 1; min-width: 0; margin: 0; }
.model-filter { display: inline-flex; flex: none; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--field, var(--s1)); }
.model-chip-filter { height: 30px; padding: 0 14px; color: var(--t2); background: transparent; border: 0; border-radius: 999px; font: 500 13px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.model-chip-filter:hover { color: var(--t1); }
.model-chip-filter[aria-pressed="true"] { color: var(--t1); background: var(--hover-2, var(--tint)); }
.m-settings { display: flex; gap: 8px; padding-top: 10px; }
.m-setting { flex: 1; display: grid; gap: 2px; min-width: 0; padding: 9px 12px; text-align: left; color: var(--t1); background: transparent; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.m-setting small { font-size: 11px; color: var(--t3); }
.m-setting strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-setting:hover { background: var(--hover); }
.model-browser .model-bar { padding: 14px 10px 10px; }
@media (max-width: 760px) {
  #model-sheet:not(.is-desktop)[open] { display: flex; flex-direction: column; height: min(78dvh, 640px); }
  #model-sheet:not(.is-desktop) #model-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #model-sheet:not(.is-desktop) .m-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #model-sheet:not(.is-desktop) .model-browser { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #model-sheet:not(.is-desktop) .model-bar { flex-wrap: wrap; padding: 0 0 8px; }
  #model-sheet:not(.is-desktop) .model-bar .model-search { flex: 1 0 100%; }
  #model-sheet:not(.is-desktop) .model-filter { width: 100%; }
  #model-sheet:not(.is-desktop) .model-chip-filter { flex: 1; height: 34px; }
  #model-sheet:not(.is-desktop) .model-results { flex: 1; min-height: 0; overflow: auto; padding: 0; }
  #model-sheet:not(.is-desktop) .m-settings { flex: none; padding-top: 8px; }
}
.model-navigation { padding-top: 14px; }
.model-settings { margin-top: 0; }

/* Waiting for a reply: three quiet dots, like the phone app */
.thinking { gap: 0; min-height: 24px; }
.typing-dots { display: inline-flex; align-items: center; gap: 6px; padding: 9px 2px; color: var(--t2); }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; animation: orlon-typing 1.2s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes orlon-typing { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none !important; opacity: .65; } }

/* ---- Model menu beside the chip ---- */
.m-pop { position: fixed; z-index: 60; display: flex; flex-direction: column; padding: 6px; background: var(--s2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--pop-shadow); animation: pop-in .14s ease-out; }
.m-pop[hidden] { display: none; }
.m-pop-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.m-pop-list::-webkit-scrollbar { display: none; }
.m-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; color: var(--t1); text-align: left; background: transparent; border: 0; border-radius: 10px; font: 14px var(--sans); cursor: pointer; }
.m-pop-item:hover, .m-pop-item:focus-visible { background: var(--hover); outline: 0; }
.m-pop-item.on { background: var(--tint); }
.m-pop-item.locked { color: var(--t2); }
.m-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-pop-item > svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--t3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-pop-item.on > svg { stroke: var(--t1); }
.m-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 12px; }
.m-pop-head strong { font-size: 13px; font-weight: 500; }
.m-pop-context { font-size: 11px; color: var(--t3); }
.m-pop-search { display: block; padding: 0 6px 8px; }
.m-pop-search input { width: 100%; height: 38px; padding: 0 12px; color: var(--t1); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; font: 13px var(--sans); }
.m-pop-search input:focus-visible { outline: 1px solid var(--t3) !important; outline-offset: 0; }
.m-pop-list .m-pop-item { min-height: 56px; padding: 9px 10px; gap: 12px; }
.m-pop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.m-pop-text .m-pop-name { flex: none; font-size: 13px; }
.m-pop-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--t3); }
.m-pop-auto { margin-bottom: 6px; }
.m-pop-list .m-pop-item:focus-visible { outline: 1px solid var(--t3) !important; outline-offset: -1px; }
.m-pop-empty { margin: 0; padding: 24px 12px; text-align: center; color: var(--t3); font-size: 13px; }
.model-private-note { margin: 0 0 20px; padding: 12px; border-radius: 10px; background: var(--s2); color: var(--t2); font-size: 12px; line-height: 1.6; }
.m-logo.tiny { width: 20px; height: 20px; flex: none; border-radius: 6px; }
.m-logo.tiny img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.m-pop-more { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; margin-top: 4px; padding: 6px 10px; color: var(--t2); background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font: 13px var(--sans); cursor: pointer; }
.m-pop-more:hover { color: var(--t1); background: var(--hover); }
.m-pop-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .m-pop { animation: none; } }
.m-logo.tiny img.auto { width: 100%; height: 100%; padding: 3px; box-sizing: border-box; }

/* Maker logos sit on a white tile so dark marks (OpenAI, Prism, Z.ai) read on a dark page */
.m-logo:not(.letter):not(:has(img.auto)) { background: #fff; box-shadow: inset 0 0 0 1px #0000001f; }
.m-logo:not(.letter) img:not(.auto) { object-fit: cover; }
.model-chip-logo:not(.orlon-mark) { background: #fff; border-radius: 6px; box-shadow: inset 0 0 0 1px #0000001f; }
.m-pop-item .m-logo.tiny:has(img.auto), .m-item .m-logo:has(img.auto) { background: transparent; box-shadow: none; }
.m-logo.tiny img.auto { padding: 2px; object-fit: contain; }

/* ---- Closed sidebar: a slim icon rail ---- */
@media (min-width: 761px) {
  .app-shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
  .app-shell.collapsed .sidebar { width: 64px; opacity: 1; transform: none; pointer-events: auto; padding-inline: 8px; align-items: center; overflow: hidden; }
  .app-shell.collapsed .sidebar-resizer { display: none; }
  .app-shell.collapsed .menu-button { display: none; }
  .app-shell.collapsed .sidebar-head { padding: 6px 0 14px; justify-content: center; }
  .app-shell.collapsed .brand-button { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .app-shell.collapsed .brand-button strong, .app-shell.collapsed .brand-button .chev-down, .app-shell.collapsed .sidebar-search, .app-shell.collapsed .head-search { display: none !important; }
  .app-shell.collapsed .side-rows, .app-shell.collapsed .tabs { width: 100%; display: grid; gap: 4px; justify-items: center; }
  .app-shell.collapsed .side-row, .app-shell.collapsed .tab { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }
  .app-shell.collapsed .side-row span, .app-shell.collapsed .tab span { display: none; }
  .app-shell.collapsed .side-row svg, .app-shell.collapsed .tab svg { margin: 0; }
  .app-shell.collapsed .conversation-section, .app-shell.collapsed .sidebar-login, .app-shell.collapsed .profile-row .who, .app-shell.collapsed #profile-settings { display: none; }
  .app-shell.collapsed .sidebar-footer { width: 100%; margin-top: auto; padding: 0; display: grid; justify-items: center; gap: 8px; }
  .app-shell.collapsed .profile-bar { justify-content: center; }
  .app-shell.collapsed .profile-row { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .app-shell.collapsed .sidebar-collapse { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); display: inline-flex; }
}
@media (min-width: 761px) {
  .app-shell.collapsed .sidebar { position: relative; }
  .app-shell.collapsed .sidebar-footer .profile-bar { position: static; display: flex; }
}
.rail-login { display: none; }
@media (min-width: 761px) {
  .app-shell.collapsed .sidebar-head { position: static; }
  .app-shell.collapsed .sidebar-footer:has(.sidebar-login:not([hidden])) .rail-login { display: grid; place-items: center; width: 44px; height: 44px; color: var(--t2); background: transparent; border: 0; border-radius: 12px; cursor: pointer; }
  .app-shell.collapsed .rail-login:hover { color: var(--t1); background: var(--hover); }
  .app-shell.collapsed .rail-login svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
}
@media (min-width: 761px) {
  .app-shell.collapsed .sidebar-head { width: 100%; display: flex; justify-content: center; padding-inline: 0; }
  .app-shell.collapsed .brand-wrap { flex: none; width: 44px; margin: 0; display: flex; justify-content: center; }
  .app-shell.collapsed .brand-button { flex: none; width: 44px !important; height: 44px; margin: 0; padding: 0; justify-content: center; gap: 0; }
}
:root { --sidebar-w: clamp(248px, 20vw, 280px); }
.sidebar-login h2 { font-size: 13px; white-space: nowrap; margin-right: 28px; }

/* Starter buttons: a gentle lift, and each icon has its own little animation on hover */
.starters button { transition: transform .18s cubic-bezier(.2, .8, .2, 1), background .18s, border-color .18s, box-shadow .18s; }
.starters button svg { transform-origin: 50% 60%; }
@media (hover: hover) {
  .starters button:hover { transform: translateY(-1px); background: var(--hover); border-color: var(--t3); box-shadow: 0 4px 12px #0005; }
  .starters button:active { transform: scale(.97); box-shadow: none; }
  .starters button:nth-child(1):hover svg { animation: icon-write .7s ease-in-out; }
  .starters button:nth-child(2):hover svg { animation: icon-learn .65s cubic-bezier(.3, 1.4, .5, 1); }
  .starters button:nth-child(3):hover svg { animation: icon-code .6s cubic-bezier(.3, 1.4, .5, 1); }
  .starters button:nth-child(4):hover svg { animation: icon-image .7s ease-in-out; }
}
.starters button:focus-visible { transform: translateY(-1px); border-color: var(--t3); outline: 0; }
@keyframes icon-write { 0%, 100% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(-2px, 1px) rotate(-12deg); } 40% { transform: translate(2px, -1px) rotate(8deg); } 60% { transform: translate(-1px, 1px) rotate(-8deg); } 80% { transform: translate(1px, 0) rotate(4deg); } }
@keyframes icon-learn { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-4px) rotate(-10deg); } 65% { transform: translateY(0) rotate(6deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes icon-code { 0% { transform: scaleX(1); } 40% { transform: scaleX(1.28); } 70% { transform: scaleX(.92); } 100% { transform: scaleX(1); } }
@keyframes icon-image { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-9deg) scale(1.12); } 50% { transform: rotate(7deg) scale(1.12); } 75% { transform: rotate(-3deg) scale(1.05); } }
@keyframes starter-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.starters button { animation: starter-in .4s cubic-bezier(.2, .8, .2, 1) backwards; }
.starters button:nth-child(2) { animation-delay: .05s; }
.starters button:nth-child(3) { animation-delay: .1s; }
.starters button:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .starters button, .starters button svg { transition: none; animation: none !important; } .starters button:hover { transform: none; } }

/* Desktop workspace: the draft gets a full row, with tools on a separate rail. */
:root { --chat-width: 780px; }
.welcome-mark { display: block; width: 64px; height: 64px; margin: 0 auto 20px; opacity: .95; }
.empty-state h2 { font-size: clamp(30px, 3vw, 40px); font-weight: 400; letter-spacing: -.035em; }
.welcome-regular { display: flex; align-items: flex-end; justify-content: center; gap: 14px; min-height: 138px; }
.welcome-regular .welcome-mark { flex: none; width: 46px; height: 46px; margin: 0 0 4px; }
.welcome-regular h2 { max-width: calc(100% - 60px); font-size: clamp(28px, 2.7vw, 36px); text-wrap: balance; }
#panel-chat.is-empty .chat-main { padding-top: max(40px, calc((100dvh - 58px) * .18)); }
#panel-chat.is-empty .message-list { padding-bottom: 32px; }
#composer { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 40px 40px; gap: 8px; padding: 12px; border-radius: 24px; background: var(--field, var(--s1)); box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .2s ease; }
#composer:focus-within { box-shadow: inset 0 0 0 1px var(--t3); }
#composer textarea { grid-column: 1 / -1; grid-row: 1; width: 100%; min-height: 44px; padding: 6px 8px; margin: 0; font-size: 16px; line-height: 1.5; }
#tools-open { grid-column: 1; grid-row: 2; }
#composer .composer-hint { grid-column: 2; grid-row: 2; }
#model-open { grid-column: 3; grid-row: 2; min-height: 38px; align-self: center; padding: 6px 10px; color: var(--t2); border: 0; background: transparent; }
#voice-record { grid-column: 4; grid-row: 2; }
#send-button, #voice-mode { grid-column: 5; grid-row: 2; }
#composer .round-button, #composer .send-button { width: 40px; height: 40px; margin: 0; }
#composer .composer-wave { grid-column: 1 / -1; grid-row: 1; min-height: 44px; }
#model-chip-name { max-width: 150px; }
.starters { gap: 8px; margin-top: 18px; }
.starters button { height: 38px; padding-inline: 13px; font-size: 13px; background: transparent; border-color: transparent; border-radius: 10px; box-shadow: none; color: var(--t2); }
.starters button:hover { color: var(--t1); background: var(--s2); border-color: transparent; box-shadow: none; }
.sidebar-head { padding-bottom: 16px; }
.side-row, .tab { height: 42px; font-size: 14px; border-radius: 10px; color: var(--t2); }
.side-row:hover, .tab:hover { color: var(--t1); }
#new-chat { margin-bottom: 4px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
#new-chat:hover { background: var(--s3); }
.sidebar-head .brand-button { padding-block: 8px; }
.sidebar-label { color: var(--t3); font-size: 12px; letter-spacing: 0; }
.conversation-open { min-height: 40px; padding-block: 9px; border-radius: 9px; }
.conversation-item strong { font-size: 14px; font-weight: 400; }
.conversation-item:has(.conversation-open[aria-current="true"]) { background: var(--s2); }
.profile-bar { gap: 2px; padding: 3px 0; }
.profile-row { min-width: 0; }
.profile-row .avatar { width: 34px; height: 34px; }
#profile-settings { flex: none; width: 36px; height: 36px; border-radius: 10px; }
#profile-settings svg { width: 20px; height: 20px; stroke-width: 1.6; }
.message.assistant .message-body { line-height: 1.7; }
.message.assistant .message-body > * + * { margin-top: 18px; }
.message.assistant .message-body h1, .message.assistant .message-body h2 { font: 600 21px/1.4 var(--sans); margin-top: 28px; letter-spacing: -.02em; }
.message.assistant .message-body h3 { font: 600 18px/1.4 var(--sans); margin-top: 24px; }
.message.assistant .message-body > :first-child { margin-top: 0; }
.message-body li + li { margin-top: 8px; }
.message-body ul, .message-body ol { padding-left: 24px; }
.message-body p { line-height: inherit; }
.message.user .message-body { font-size: 15px; line-height: 1.6; }
.message.assistant:has(.generated-image) .message-body:empty { display: none; }
.message.assistant:has(.generated-image) .generated-image { margin-top: 0; }
.message.user { max-width: min(78%, 600px); border-radius: 22px; padding: 11px 18px; background: var(--s2); }
.message-body pre { border: 1px solid var(--line); border-radius: 14px; }
.project-card { border-radius: 16px; transition: border-color .18s ease, background .18s ease; }
.project-card:hover { transform: none; border-color: var(--t3); }
.generated-image { overflow: hidden; border-radius: 18px; }
.generated-image > img { border-radius: 18px; }
.image-actions { padding: 6px 0 0; gap: 2px; margin-top: 0; }
.image-actions .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; padding: 8px 9px; font: 400 12px var(--sans); color: var(--t2); background: transparent; border: 0; border-radius: 8px; transition: color .15s, background .15s; }
.image-actions .button svg { width: 18px; height: 18px; stroke-width: 1.6; }
.image-actions .button:hover { color: var(--t1); background: var(--hover); }
.image-actions .button:focus-visible { outline: 2px solid var(--t2); outline-offset: 2px; }
.image-actions .button:disabled { cursor: default; opacity: .55; }
@media (pointer: coarse) { .image-actions .button { min-width: 42px; height: 42px; } }
body[data-theme="light"] .welcome-mark:not(.private-mark) { filter: invert(1); }
@media (max-width: 760px) {
  .welcome-mark { width: 48px; height: 48px; margin-bottom: 16px; }
  .welcome-regular { min-height: 118px; gap: 10px; }
  .welcome-regular .welcome-mark { width: 36px; height: 36px; }
  .welcome-regular h2 { max-width: calc(100% - 46px); font-size: 28px; }
  #composer { grid-template-columns: 36px minmax(0, 1fr) auto 36px 36px; gap: 4px; padding: 10px; border-radius: 22px; }
  #composer .round-button, #composer .send-button { width: 36px; height: 36px; }
  #composer .model-chip { max-width: 148px; min-height: 36px; padding-inline: 8px; }
  #model-chip-name { max-width: 96px; }
  .starters { gap: 4px; }
  .starters button { padding-inline: 10px; }
}

/* Image generation preview shared with the installed Orlon app. */
.message.assistant.image-job-card{width:min(100%,420px);box-sizing:border-box;padding:0;border:0;background:none}
.image-job-status{display:block;margin:0 0 14px;color:var(--t2);font:500 14px/1.5 var(--sans)}
.image-job-visual{position:relative;aspect-ratio:1;width:100%;isolation:isolate}
.image-job-field{position:absolute;inset:0;overflow:hidden;-webkit-mask-image:radial-gradient(ellipse at center,#000 35%,transparent 78%);mask-image:radial-gradient(ellipse at center,#000 35%,transparent 78%)}
.image-job-field::before,.image-job-glow{position:absolute;inset:0;background-image:radial-gradient(circle,var(--t1) 1.15px,transparent 1.65px);background-size:13px 13px;background-position:center}
.image-job-field::before{content:'';opacity:.13}
.image-job-glow{opacity:.85;-webkit-mask-image:radial-gradient(ellipse 35% 25% at 25% 25%,#000,transparent),radial-gradient(ellipse 30% 30% at 75% 70%,#000,transparent);mask-image:radial-gradient(ellipse 35% 25% at 25% 25%,#000,transparent),radial-gradient(ellipse 30% 30% at 75% 70%,#000,transparent);-webkit-mask-size:160% 160%;mask-size:160% 160%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:orlon-image-dots 6s ease-in-out infinite alternate}
.image-job-percent{position:absolute;right:6px;bottom:6px;padding:7px 13px;min-width:56px;box-sizing:border-box;border-radius:999px;background:var(--s3);color:var(--t2);text-align:center;font:500 12px/1.5 var(--sans);font-variant-numeric:tabular-nums}
@keyframes orlon-image-dots{from{-webkit-mask-position:0% 0%,100% 100%;mask-position:0% 0%,100% 100%;opacity:.65}to{-webkit-mask-position:100% 70%,0% 20%;mask-position:100% 70%,0% 20%;opacity:1}}
@media(prefers-reduced-motion:reduce){.image-job-glow{animation:none}}

/* Shared welcome geometry keeps private and regular chat aligned. */
html[data-private="true"] #panel-chat.is-empty .message-list { padding-bottom: 52px; }
.empty-state { position: relative; }
.empty-state .private-note { position: absolute; top: 100%; left: 0; right: 0; margin: 8px 0 0; color: var(--t2); font-size: 14px; line-height: 1.5; }
.private-mark { display: grid; place-items: center; color: var(--t1); background: none; border: 0; border-radius: 0; }
.private-mark svg { width: 48px; height: 48px; stroke-width: 1.5; }
.empty-state h2 { min-height: 54px; display: grid; align-items: center; }
html[data-private="true"] .empty-state h2 { font-family: var(--sans); font-size: 32px; font-weight: 500; letter-spacing: -.035em; }
@media (max-width: 760px) { html[data-private="true"] .empty-state h2 { font-size: 28px; } .empty-state .private-note { font-size: 13px; } }

/* Useful outputs stay attached to their reply; previews open beside the conversation. */
.chat-sources { margin-top: 14px; color: var(--t2); font-size: 13px; }
.chat-sources summary { width: fit-content; cursor: pointer; padding: 6px 0; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.source-card { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; min-width: 0; }
.source-card:hover { background: var(--field); border-color: var(--line-strong); }
.source-number { color: var(--t3); font-size: 12px; }
.source-text { display: grid; gap: 4px; min-width: 0; }
.source-text strong { color: var(--t1); font-size: 13px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-text small { color: var(--t3); font-size: 11px; }
.artifact-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.artifact-head > strong { font-size: 14px; font-weight: 500; }
.artifact-close { flex: none; margin-left: auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--t2); font-size: 24px; }
.artifact-close:hover { background: var(--hover); }
.image-comparison { width: min(1000px, calc(100vw - 32px)); }
.image-comparison .artifact-head { padding: 0 0 14px; }
.image-comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 18px; }
.image-comparison figure { margin: 0; min-width: 0; }
.image-comparison img { display: block; width: 100%; max-height: 65dvh; object-fit: contain; border-radius: 12px; }
.image-comparison figcaption { padding: 10px 0 0; font-size: 13px; color: var(--t2); }
@media (max-width: 760px) { .source-list { grid-template-columns: 1fr; } .image-comparison-grid { gap: 10px; } .image-actions { flex-wrap: wrap; } }
:root { --sidebar-w: clamp(216px, 16vw, 236px); }

/* Streaming replies and web sources */
.thinking-status { margin-left: 10px; color: var(--t3); font-size: 13px; animation: status-fade 1.4s ease-in-out infinite; }
@keyframes status-fade { 50% { opacity: .45; } }
.message.assistant.streaming .message-body > :last-child::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--t2); vertical-align: middle; animation: status-fade 1s ease-in-out infinite; }
.message-body a.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin: 0 2px; padding: 0 5px; color: var(--t2); background: var(--tint); border-radius: 99px; font: 500 11px var(--sans); text-decoration: none; vertical-align: 2px; transition: background .15s, color .15s; }
.message-body a.cite:hover { color: var(--t1); background: var(--hover-2, var(--hover)); }
@media (prefers-reduced-motion: reduce) { .thinking-status, .message.assistant.streaming .message-body > :last-child::after { animation: none; } }

/* Creator profile popup */
.gallery-person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 2px 6px 2px 0; color: inherit; background: transparent; border: 0; border-radius: 99px; cursor: pointer; transition: color .15s; }
.gallery-person:hover .gallery-author { color: var(--t1); text-decoration: underline; text-underline-offset: 3px; }
.gallery-by-link { padding: 0; color: var(--t2); background: transparent; border: 0; font: inherit; cursor: pointer; }
.gallery-by-link:hover { color: var(--t1); text-decoration: underline; text-underline-offset: 3px; }
.creator-sheet { width: min(760px, calc(100vw - 32px)); max-height: min(86dvh, 820px); padding: 28px 28px 24px; overflow-y: auto; scrollbar-width: none; }
.creator-sheet::-webkit-scrollbar { display: none; }
.creator-head { display: flex; align-items: center; gap: 16px; padding-right: 44px; }
.creator-avatar { display: grid; place-items: center; flex: none; width: 64px; height: 64px; overflow: hidden; color: var(--t2); background: var(--s3); border-radius: 50%; font: 600 26px var(--sans); }
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-id { display: grid; gap: 2px; min-width: 0; }
.creator-id strong { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.creator-id span { color: var(--t3); font-size: 14px; }
.creator-bio { margin: 16px 0 0; color: var(--t2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.creator-count { margin: 14px 0 16px; color: var(--t3); font-size: 13px; }
.creator-grid { padding: 0; }
@media (max-width: 760px) { .creator-sheet { padding: 22px 18px 20px; } .creator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.creator-grid .gallery-person { display: none; } .creator-grid .gallery-meta { justify-content: space-between; }
/* Plans in Usage settings (Ko-fi memberships) */
.usage-plans { display: grid; gap: 10px; }
.usage-plans .plan-card { margin-bottom: 0; }
.usage-plans .plan-card[data-current="true"] { border-color: var(--line-strong, var(--t3)); }
.usage-plans .plan-perks { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.usage-plans .plan-perks li { position: relative; padding-left: 22px; color: var(--t2); font-size: 14px; line-height: 1.4; }
.usage-plans .plan-perks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--t2); border-bottom: 2px solid var(--t2); transform: rotate(-45deg); }
.usage-plans .button { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 14px; text-decoration: none; }
.usage-plans .plan-price { margin-left: 8px; margin-right: auto; }
/* Orlon's new brand: the wordmark replaces the plain "Orlon" text in the header (the text stays for screen readers) */
#brand-name{display:inline-block;width:68px;height:14px;font-size:0;background:var(--t1,#f2f2f2);-webkit-mask:url(/static/brand/orlon-wordmark.svg) left center/contain no-repeat;mask:url(/static/brand/orlon-wordmark.svg) left center/contain no-repeat;overflow:hidden;white-space:nowrap}
.brand-copy{gap:10px}
.sidebar-head:hover .logo{transform:none}
body[data-theme="light"] #brand-name{background:#0a0a0a}

/* Polish pass: one sans family, a calmer empty state, quieter chrome, one set of icon weights. No new features. */
.empty-state h2, .welcome-regular h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(26px, 2.2vw, 32px); letter-spacing: -.025em; line-height: 1.25; }
#panel-chat.is-empty .chat-main { padding-top: max(28px, calc((100dvh - 58px) * .14)); }
#panel-chat.is-empty .message-list { padding-bottom: 22px; }
.empty-state h2 { min-height: 40px; }
/* The empty composer is one line tall and grows as you type */
#composer { padding: 8px 10px 8px 12px; gap: 6px 8px; border-radius: 22px; }
#composer textarea { min-height: 36px; padding: 6px 6px 2px; }
#composer .round-button, #composer .send-button { width: 36px; height: 36px; }
#model-open { min-height: 34px; padding: 4px 8px; font-size: 13px; }
/* Voice is a side action: quiet outline until it is the thing you want */
.voice-mode-button { width: 36px; height: 36px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.voice-mode-button svg { width: 18px; height: 18px; stroke: var(--ink-soft); stroke-width: 1.7; }
.voice-mode-button:hover { filter: none; background: var(--s3); }
#send-button { background: var(--on); }
/* Suggested actions: small outlined chips, clearly tappable, tied to the composer */
.starters { gap: 8px; margin-top: 14px; }
.starters button { height: 34px; padding: 0 14px 0 11px; gap: 7px; font-size: 13px; color: var(--t2); background: transparent; border: 1px solid var(--line-strong); border-radius: 9px; box-shadow: none; animation: none; transform: none; }
.starters button:hover, .starters button:focus-visible { color: var(--t1); background: var(--s2); border-color: var(--t3); box-shadow: none; transform: none; }
.starters button:hover svg { animation: none !important; }
.starters svg { width: 16px; height: 16px; stroke-width: 1.7; }
/* Sidebar: New chat is a normal row, with a tinted hover only */
#new-chat { margin-bottom: 0; background: transparent; box-shadow: none; }
#new-chat:hover { background: var(--s2); }
.side-row svg, .tab svg { width: 18px; height: 18px; stroke-width: 1.7; }
/* Signed out: the top bar carries Log in / Sign up, so the sidebar note is just a line of text */
.sidebar-login { padding: 8px 12px 6px; }
.sidebar-login h2 { margin: 0 32px 2px 0; font-size: 13px; font-weight: 500; color: var(--t1); }
.sidebar-login p { margin: 0; font-size: 12.5px; color: var(--t3); }
@media (min-width: 761px) { .sidebar-login-actions { display: none; } }
@media (max-width: 760px) {
  .sidebar-login-actions button { min-height: 34px; border-radius: 9px; font-size: 13px; }
  .sidebar-login p { margin-bottom: 10px; }
  #composer { border-radius: 20px; padding: 8px 10px; }
  #panel-chat.is-empty .chat-main { padding-top: max(28px, calc((100dvh - 60px) * .12)); }
  .starters { display: flex !important; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; }
  .starters button { flex: none; }
}

/* Orlons dialog, active-Orlon chip */
#panel-orlons { overflow-y: auto; }
.orlons-space { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 28px 72px; }
.orlons-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.orlons-head h2 { font: 500 28px/1.3 var(--sans); letter-spacing: -.035em; }
.orlons-head p { max-width: 460px; margin-top: 8px; color: var(--t2); font-size: 13px; line-height: 1.6; }
@media (max-width: 760px) { .orlons-space { padding: 24px 16px 56px; } }
.orlons-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 12px; }
.orlons-tabs { display: flex; gap: 4px; }
.orlons-tabs button { height: 34px; padding: 0 14px; font-size: 14px; color: var(--t2); background: transparent; border: 0; border-radius: 9px; }
.orlons-tabs button[aria-selected="true"] { color: var(--t1); background: var(--s3); }
.orlons-search { width: 100%; margin-bottom: 12px; }
.orlons-list { display: grid; gap: 8px; }
.orlon-card { display: grid; gap: 2px; width: 100%; padding: 12px 14px; text-align: left; color: var(--t1); background: transparent; border: 1px solid var(--line-strong); border-radius: 12px; }
.orlon-card:hover { background: var(--s2); }
.orlon-card span { color: var(--t2); font-size: 14px; }
.orlon-card small, .orlons-by { color: var(--t3); font-size: 12.5px; }
.orlons-more { margin-top: 10px; }
.orlons-back { margin-bottom: 12px; padding: 4px 0; color: var(--t2); background: transparent; border: 0; font-size: 14px; }
.orlons-name { margin: 0; font: 500 20px/1.3 var(--sans); }
.orlons-desc { margin: 8px 0 0; color: var(--t2); }
.orlons-starters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.orlon-starter { padding: 8px 12px; font-size: 13px; color: var(--t2); background: transparent; border: 1px solid var(--line-strong); border-radius: 9px; text-align: left; }
.orlon-starter:hover { color: var(--t1); background: var(--s2); }
.orlons-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.orlons-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.orlons-status { min-height: 1.4em; margin: 12px 0 0; color: var(--t3); font-size: 13px; }
form.orlons-view label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--t2); }
form.orlons-view input:not([type=checkbox]), form.orlons-view textarea { width: 100%; }
.orlon-active { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: var(--chat-width, 760px); margin: 0 auto 8px; padding: 4px 6px 4px 10px; font-size: 13px; color: var(--t1); border: 1px solid var(--line-strong); border-radius: 9px; }
.orlon-active small { color: var(--t3); }
.orlon-active button { width: 22px; height: 22px; padding: 0; color: var(--t2); background: transparent; border: 0; border-radius: 6px; }
.orlon-active button:hover { background: var(--s3); }
#tool-web[aria-pressed="false"] { color: var(--t3); }
.orlons-search { display: block; margin: 4px 0 12px; }
.orlons-space input:not([type=checkbox]), .orlons-space textarea { box-sizing: border-box; padding: 10px 14px; font: 400 15px/1.5 var(--sans); color: var(--t1); background: var(--field, #080808); border: 1px solid var(--line-strong); border-radius: 12px; outline: 0; }
.orlons-space input:not([type=checkbox]):focus, .orlons-space textarea:focus { border-color: var(--t3); }
.orlons-space input::placeholder, .orlons-space textarea::placeholder { color: var(--t3); }
.orlons-actions button { height: 40px; padding: 0 18px; font: 500 14px var(--sans); border-radius: 10px; }
.orlons-actions .button { color: var(--t1); background: transparent; border: 1px solid var(--line-strong); }
.orlons-actions .button:hover { background: var(--s2); }
.orlons-actions .primary-pill { color: var(--on-ink, #080808); background: var(--on, #f2f2f2); border: 0; }
.orlons-more { width: 100%; height: 40px; color: var(--t2); background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; }
.orlons-actions { align-items: center; } .orlons-actions button { margin: 0; }

/* "More" keeps Orlons and Community Images one tap away without crowding the sidebar */
.more-toggle .more-chev { margin-left: auto; width: 18px; height: 18px; transition: transform .18s ease; }
.more-toggle[aria-expanded="true"] .more-chev { transform: rotate(180deg); }
.more-toggle:hover { background: var(--s2); }
.more-group { display: grid; gap: 0; }
.more-group[hidden] { display: none; }

/* Usage heads-up, delete account */
.usage-heads-up { display: flex; align-items: center; gap: 12px; width: 100%; max-width: var(--chat-width, 760px); margin: 0 auto 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 13px; }
.usage-heads-up[hidden] { display: none; }
.usage-heads-up .uh-text { flex: 1; display: grid; gap: 1px; color: var(--t1); }
.usage-heads-up small { color: var(--t3); font-size: 12px; }
.usage-heads-up .uh-plans { height: 30px; padding: 0 12px; color: var(--t1); background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; }
.usage-heads-up .uh-plans:hover { background: var(--s2); }
.usage-heads-up .uh-close { width: 28px; height: 28px; padding: 5px; color: var(--t3); background: transparent; border: 0; border-radius: 7px; }
.usage-heads-up .uh-close svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.delete-account-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px; }
.delete-account-form input { flex: 1 1 220px; padding: 9px 12px; color: var(--t1); background: var(--field, #080808); border: 1px solid var(--line-strong); border-radius: 10px; }
.delete-account-form .shint { flex: 1 0 100%; margin: 0; }
.reply-action[data-key="retry"] { display: none; } .message-list > .message.assistant:last-child .reply-action[data-key="retry"] { display: grid; }
/* Collapsed rail: icons only, so More has no label to open; its pages just show as icons */
.app-shell.collapsed .more-toggle { display: none !important; }
.app-shell.collapsed .more-group[hidden] { display: grid !important; gap: 4px; justify-items: center; }

/* Settings polish: same layout, calmer and more even */
.desktop-settings { border-radius: 20px; }
.desktop-settings .settings-layout > nav { padding: 14px 12px; background: transparent; border-right: 1px solid var(--line); }
.settings-layout > nav button { height: 40px; font-size: 14px; font-weight: 400; border-radius: 10px; }
.settings-layout > nav button svg { width: 18px; height: 18px; stroke-width: 1.7; }
.settings-layout > nav button[aria-pressed="true"] { background: var(--s2); color: var(--t1); font-weight: 500; }
.settings-layout > div, .settings-layout > section { scroll-behavior: smooth; }
.settings-section-head { margin-bottom: 22px; }
.settings-section-head h2 { font: 500 22px/1.3 var(--sans); letter-spacing: -.02em; }
.settings-section-head p { margin-top: 4px; font-size: 13.5px; color: var(--t3); }
[data-settings-panel] > h3 { margin: 26px 2px 10px; font: 500 12px/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--t3); }
[data-settings-panel] > h3:first-of-type { margin-top: 0; }
.sgroup { border-radius: 14px; background: var(--s1, #080808); border-color: var(--line); }
.sgroup > .srow, .sgroup > .switch-row, .sgroup > .settings-action { padding: 14px 18px; }
.sgroup > .settings-action { margin: 0; border: 0; border-radius: 0; background: transparent; }
.srow:hover { background: #ffffff05; }
.srow-text strong { font-size: 14.5px; }
.srow-text span, .settings-action p { font-size: 12.5px; color: var(--t3); }
.settings-action > div { min-width: 0; }
.settings-action strong { display: block; font-size: 14.5px; }
.settings-action .button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; }
.stat-grid { gap: 10px; }
.stat { padding: 16px; border-radius: 14px; background: var(--s1, #080808); }
.stat strong { font: 500 22px/1.15 var(--sans); letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--t3); }
.sgroup select, .srow select { height: 36px; min-width: 128px; padding: 0 12px; font-size: 14px; border-radius: 9px; background-color: var(--field, #080808); border: 1px solid var(--line-strong); }
.settings-empty { padding: 20px; border-radius: 14px; }
#settings-close:focus, #settings-close:focus-visible { outline: 0; box-shadow: none; }
.desktop-settings .sheet-close, #settings-close { border-color: transparent; background: transparent; }
.desktop-settings .sheet-close:hover, #settings-close:hover { background: var(--s2); }
@media (max-width: 760px) { [data-settings-panel] > h3 { margin-top: 22px; } .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#settings-close:focus, #settings-close:focus-visible { outline: 0 !important; box-shadow: none !important; }

/* Chat screen like the app: logo over the greeting, outlined round controls, no ghost */
.welcome-regular { flex-direction: column; align-items: center; gap: 22px; min-height: 0; }
.welcome-regular .welcome-mark { width: 60px; height: 60px; margin: 0; }
.welcome-regular h2, .empty-state h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3vw, 42px); letter-spacing: -.02em; max-width: none; text-align: center; }
#panel-chat.is-empty .chat-main { padding-top: max(36px, calc((100dvh - 58px) * .2)); }
#composer #tools-open, #composer #voice-record, #composer .voice-mode-button { border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); background: transparent; }
#composer #send-button { border-radius: 50%; }
#composer #model-open { border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); padding: 4px 12px; }
#composer #tools-open:hover, #composer #voice-record:hover, #composer #model-open:hover { background: var(--s2); }
.menu-button { border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (max-width: 760px) {
  .starters { display: none !important; }
  #panel-chat.is-empty .chat-main { padding: 0 16px 14px; justify-content: space-between; overflow: hidden; }
  #panel-chat.is-empty .message-list { flex: 1 1 auto; display: grid; place-items: center; padding: 0; }
  #panel-chat.is-empty .composer { margin: 0 auto; }
  .welcome-regular { gap: 18px; }
  .welcome-regular h2, .empty-state h2 { font-size: 32px; }
}

/* Desktop scaling: the empty chat grows with the window instead of staying phone-sized */
@media (min-width: 761px) {
  #panel-chat.is-empty .chat-main { padding-top: max(40px, calc((100dvh - 58px) * .24)); }
  #panel-chat.is-empty .composer, #panel-chat.is-empty .starters { max-width: clamp(680px, 46vw, 900px); }
  .welcome-regular { gap: clamp(18px, 1.6vw, 28px); }
  .welcome-regular .welcome-mark { width: clamp(60px, 4.2vw, 84px); height: clamp(60px, 4.2vw, 84px); }
  .welcome-regular h2, .empty-state h2 { font-size: clamp(36px, 3.1vw, 56px); }
  #panel-chat.is-empty .message-list { padding-bottom: clamp(28px, 3vw, 48px); }
  #panel-chat.is-empty #composer { padding: 12px 14px 12px 18px; border-radius: 28px; }
  #panel-chat.is-empty #composer textarea { min-height: 48px; font-size: clamp(16px, 1.1vw, 18px); }
  #panel-chat.is-empty #composer .round-button, #panel-chat.is-empty #composer .send-button { width: 40px; height: 40px; }
  #panel-chat.is-empty #model-open { min-height: 40px; font-size: 14px; }
  #panel-chat.is-empty .starters { margin-top: 18px; }
  #panel-chat.is-empty .starters button { height: 38px; font-size: 14px; padding: 0 16px 0 13px; }
}

/* Settings is one scrolling page, like the app: General, Personalisation, About, Delete account. Usage opens from the model picker. */
.desktop-settings .settings-layout { grid-template-columns: 1fr; }
.desktop-settings .settings-content { padding: 8px clamp(20px, 5vw, 56px) 40px; max-width: 720px; width: 100%; margin: 0 auto; }
[data-settings-panel="voice"], [data-settings-panel="data"] { display: none !important; }
[data-settings-panel="personalization"] > h3:first-of-type, [data-settings-panel="personalization"] > .sgroup:first-of-type { display: none; }
[data-settings-panel="account"] > .settings-section-head, [data-settings-panel="account"] > h3, #account-signedout, .stat-grid, #account-body > h3 { display: none !important; }
[data-settings-panel="general"] > h3, [data-settings-panel="general"] > .settings-section-head p, [data-settings-panel="personalization"] > .settings-section-head p, [data-settings-panel="about"] > .settings-section-head p, [data-settings-panel="about"] > h3 { display: none; }
.is-page [data-settings-panel] { margin-top: 28px; }
.is-page [data-settings-panel]:first-of-type, .is-page [data-settings-panel="general"] { margin-top: 12px; }
.is-page .settings-section-head { margin-bottom: 12px; }
.is-page .settings-section-head h2 { font: 500 13px/1.2 var(--sans); letter-spacing: .02em; color: var(--t3); }
#delete-account-open { color: #f0a0a0; }
.desktop-settings .settings-content { display: flex; flex-direction: column; gap: 26px; }
.desktop-settings .settings-content > [data-settings-panel] { margin: 0 !important; }
.desktop-settings .settings-content > [data-settings-panel="general"] { order: 1; }
.desktop-settings .settings-content > [data-settings-panel="personalization"] { order: 2; }
.desktop-settings .settings-content > [data-settings-panel="about"] { order: 3; }
.desktop-settings .settings-content > [data-settings-panel="account"] { order: 4; }
.desktop-settings .settings-content > [data-settings-panel="usage"] { order: 5; }
.is-page [data-settings-panel="personalization"] > h3 { display: none; }
.is-page [data-settings-panel] > .settings-section-head { margin: 0 0 10px 2px; }

/* + menu like the app's Tools sheet: values and switches on the right, no disclaimer under the box */
.tool-trail { margin-left: auto; color: var(--t3); font-size: 13px; }
.tools-item { width: 100%; }
.tool-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .15s ease; }
.tool-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--t3); transition: transform .15s ease, background .15s ease; }
.tool-switch[data-on="true"] { background: var(--on, #f2f2f2); }
.tool-switch[data-on="true"]::after { transform: translateX(16px); background: var(--on-ink, #080808); }
.tools-item[role="menuitemradio"][aria-checked="true"]::after { content: ""; margin-left: auto; width: 8px; height: 14px; border: solid var(--t1); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); }
.tools-back { color: var(--t2); }
.composer-note { display: none !important; }

/* The logo is the open control in the rail: same spot, a quiet crossfade on hover, no extra button */
.brand-expand { display: none; }
@media (min-width: 761px) {
  .app-shell.collapsed .sidebar-collapse { display: none !important; }
  .app-shell.collapsed .brand-button { position: relative; cursor: pointer; }
  .app-shell.collapsed .brand-button .logo, .app-shell.collapsed .brand-button .brand-expand { position: absolute; inset: 0; margin: auto !important; transform: none !important; transition: opacity .16s ease; }
  .app-shell.collapsed .brand-button .brand-expand { display: block; width: 22px; height: 22px; fill: none; stroke: var(--t1); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
  .app-shell.collapsed .brand-button:hover .logo, .app-shell.collapsed .brand-button:focus-visible .logo { opacity: 0; }
  .app-shell.collapsed .brand-button:hover .brand-expand, .app-shell.collapsed .brand-button:focus-visible .brand-expand { opacity: 1; }
  .app-shell.collapsed .brand-button:hover { background: var(--s2); }
}
@media (prefers-reduced-motion: reduce) { .brand-button .logo, .brand-expand { transition: none !important; } }

/* Recents grouped by date; drop-to-attach overlay */
.conversation-group { margin: 16px 12px 4px; font: 500 12px/1.2 var(--sans); color: var(--t3); }
.conversation-group:first-child { margin-top: 4px; }
.conversation-group[hidden] { display: none; }
#panel-chat { position: relative; }
.drop-overlay { position: absolute; inset: 12px; z-index: 30; display: grid; place-content: center; gap: 4px; text-align: center; background: #000000d9; border: 1px dashed var(--line-strong); border-radius: 20px; pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay strong { font: 500 18px var(--sans); color: var(--t1); }
.drop-overlay span { font-size: 13px; color: var(--t3); }

/* Balance pass: quieter banner, one heading style in Recents, clear sign-up hierarchy, even top spacing, single focus ring on fields */
.announcement { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; padding: 8px 48px; font-size: 13px; color: var(--t2) !important; }
.announcement[data-level="warn"] { color: #e6cf9b !important; }
.sidebar-label-row { display: none; }
.conversation-group { margin: 14px 0 4px 8px; }
.conversation-group:first-child { margin-top: 2px; }
.message-list { padding-top: 28px; }
#signup-open { border-color: transparent; }
#login-open { color: var(--t1); background: transparent; border: 1px solid var(--line-strong); }
:where(input, textarea, select):focus-visible { outline: 0 !important; border-color: var(--t3) !important; box-shadow: none !important; }
.auth-buttons { gap: 8px; }
@media (max-width: 760px) { .message-list { padding-top: 20px; } }

/* Streaming: words fade in; thinking is one quiet shimmering word */
.rv { animation: rv 380ms ease-out both; }
@keyframes rv { from { opacity: 0; } to { opacity: 1; } }
.message.thinking .typing-dots { display: none; }
.message.thinking .thinking-text { position: static; width: auto; height: auto; margin: 0; clip: auto; clip-path: none; overflow: visible; font-size: 15px; color: transparent; background: linear-gradient(90deg, #5a5a5a 0%, #5a5a5a 38%, #f2f2f2 50%, #5a5a5a 62%, #5a5a5a 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shimmer 1.9s linear infinite; }
.message.thinking .thinking-status { margin-left: 10px; color: var(--t3); font-size: 13px; }
body[data-theme="light"] .message.thinking .thinking-text { background-image: linear-gradient(90deg, #aaa 0%, #aaa 38%, #111 50%, #aaa 62%, #aaa 100%); }
@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) { .rv { animation: none; } .message.thinking .thinking-text { animation: none; color: var(--t3); background: none; } }

/* Closed sidebar: guests get no profile mark at all (Log in is already in the top bar); signed-in people see their avatar */
@media (min-width: 761px) { .app-shell.collapsed .rail-login { display: none !important; } }

/* Closed sidebar, guest: no stray expand button (the logo is the control), but keep Settings within reach */
@media (min-width: 761px) {
  html .app-shell.collapsed .sidebar-collapse { display: none !important; }
  html body[data-gated="true"] .app-shell.collapsed #profile-settings { display: grid !important; place-items: center; width: 44px; height: 44px; margin: 0 auto; }
  html body[data-gated="true"] .app-shell.collapsed .sidebar-footer { border-top: 0; }
  html body[data-gated="true"] .app-shell.collapsed .profile-bar { position: static; display: flex; justify-content: center; }
}

/* Guest drawer on phones: same hierarchy as the top bar, Sign up filled and Log in outlined */
html .sidebar-login-actions #sidebar-signup-open { color: var(--orlon-bg, #000); background: var(--orlon-ink, #f2f2f2); border: 1px solid var(--orlon-ink, #f2f2f2); }
html .sidebar-login-actions #sidebar-signup-open:hover { background: #fff; border-color: #fff; }
html .sidebar-login-actions #sidebar-login-open { color: var(--t1); background: transparent; border: 1px solid var(--line-strong); }
html .sidebar-login-actions #sidebar-login-open:hover { background: var(--s2); }

/* Phones: sheets fit their content, one focus style on fields, no hover highlight stuck after a tap */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0 !important; border-color: var(--t3) !important; box-shadow: none !important; }
#message-input:focus-visible, #landing-prompt:focus-visible { border-color: transparent !important; }
@media (hover: none) { .srow:hover, .conversation-item:hover, .tools-item:hover { background: transparent; } }
@media (max-width: 760px) {
  #profile-panel { height: fit-content !important; max-height: calc(100dvh - 24px); }
}

html body dialog input:focus-visible, html body dialog textarea:focus-visible, html body dialog select:focus-visible,
html body dialog input:focus, html body dialog textarea:focus { outline: 0 !important; outline-offset: 0 !important; border-color: var(--t3) !important; box-shadow: none !important; }

/* One palette. Black, white and grays everywhere; the only color left is one muted red, and only on things that delete. */
:root, body { --danger: #e3a3a3; --danger-line: #3a2828; --danger-fill: #1a1212; --warn-ink: var(--t2); --warn-bg: transparent; --warn-line: var(--line); }
body[data-theme="light"] { --danger: #a33a3a; --danger-line: #e6c8c8; --danger-fill: #fbeeee; }
.button.danger, .pill-button.danger, .settings-content .button.danger, .chat-menu button.danger, #delete-account-open, #data-delete-all { color: var(--danger) !important; border-color: var(--danger-line) !important; background: transparent !important; }
.button.danger:hover, .pill-button.danger:hover, .settings-content .button.danger:hover { background: var(--danger-fill) !important; }
.avatar { background: #262626; color: #f2f2f2; }
body[data-theme="light"] .avatar { background: #e6e6e6; color: #111; }
.offline-banner { color: var(--t2) !important; background: transparent !important; border-bottom: 1px solid var(--line) !important; }
.offline-dot { background: var(--t2) !important; }
.announcement[data-level="warn"] { color: var(--t1) !important; }
.message-body a { color: var(--t1); text-decoration-color: var(--t3); }
.message-body a:hover { text-decoration-color: var(--t1); }
.gallery-heart.on, .gallery-hearts { color: var(--t1) !important; }
.trust-chip.ok, .trust-chip.info { color: var(--t2) !important; background: var(--s2) !important; }
.switch-row input { accent-color: var(--t1); }
.pulse-dot { background: var(--t2) !important; }
.up-pulse[data-state="awake"], .up-bar i { background: var(--t1) !important; box-shadow: none !important; }
.up-good { color: var(--t2) !important; }
.net-card.t-semantic, .net-card.t-episodic { border-left-color: var(--line-strong) !important; }
.net-wire.lit { stroke: var(--t2) !important; }
/* Segmented switches use the same corners as buttons */
.pills, .gallery-head .pills { border-radius: 12px !important; }
.pills button, #acct-mode-login, #acct-mode-signup, #gallery-popular, #gallery-latest { border-radius: 9px !important; }

/* Phones: small pop-ups (confirmations, project, profile, creator) size to their content instead of filling the screen */
@media (max-width: 760px) {
  #confirm-dialog, #project-dialog, #creator-dialog, #profile-panel, #agi-settings-panel { height: fit-content !important; max-height: calc(100dvh - 24px); margin-block: auto; }
}
.confirm-dialog button, .confirm-actions button { border-radius: 12px !important; }

/* Tables, quotes and dividers in replies */
.message-body .table-wrap { max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.message-body table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.message-body th, .message-body td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); white-space: nowrap; }
.message-body td { white-space: normal; min-width: 96px; }
.message-body th { font-weight: 500; color: var(--t1); background: var(--s1, #080808); }
.message-body tr:last-child td { border-bottom: 0; }
.message-body blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--line-strong); color: var(--t2); }
.message-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.message-body pre { max-width: 100%; overflow-x: auto; }
.message-body { overflow-wrap: anywhere; }

/* While a reply streams, Send becomes Stop: a small square in the same white circle */
#composer.is-streaming #send-button { display: grid !important; place-items: center; }
#composer.is-streaming #voice-mode { display: none !important; }
#composer.is-streaming #send-button svg { display: none; }
#composer.is-streaming #send-button::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: currentColor; }

/* The announcement sits in the empty middle of the top bar, so it never pushes the chat down when it loads */
.workspace { position: relative; }
html .announcement { position: absolute !important; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; height: 56px; max-width: min(620px, calc(100% - 540px)); display: flex; align-items: center; gap: 8px; padding: 0 30px 0 8px !important; border: 0 !important; background: transparent !important; white-space: nowrap; }
html .announcement[hidden] { display: none !important; }
html .announcement #announcement-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html .announcement .announcement-close { right: 0; }
@media (max-width: 760px) {
  html .announcement { max-width: calc(100% - 128px); height: 60px; white-space: normal; font-size: 12px; line-height: 1.35; text-align: center; }
  html .announcement #announcement-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* Tablets and phones in landscape: too little room in the top bar, so the announcement takes its own quiet row */
@media (min-width: 761px) and (max-width: 999px) {
  html .announcement { position: relative !important; left: auto; top: auto; transform: none; max-width: none; height: auto; padding: 8px 44px !important; justify-content: center; border-bottom: 1px solid var(--line) !important; white-space: normal; }
}
/* Orlon builder: the app's sections (Identity, Instructions, starters, Sharing) as cards, a count, and a switch */
.orlon-form-title { margin: 4px 0 0; font: 500 22px/1.3 var(--sans); color: var(--t1); }
.orlon-form-sub { margin: 6px 0 4px; color: var(--t2); font-size: 14px; }
.ob-section { margin-top: 20px; }
.ob-section h4 { margin: 0 0 8px 2px; font: 500 13px/1.4 var(--sans); color: var(--t2); }
.ob-card { padding: 4px 18px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--s1, transparent); }
form.orlon-builder .ob-card > label, form.orlon-builder .ob-head label { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 0 8px; font: 500 14px/1.4 var(--sans); color: var(--t1); }
.ob-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ob-head label { flex: 1; }
.ob-optional, .orlons-count { font: 400 12px/1.4 var(--sans); color: var(--t3); font-variant-numeric: tabular-nums; }
.ob-hint { margin: -2px 0 10px; color: var(--t3); font-size: 13px; }
#orlon-instr { field-sizing: content; min-height: 168px; max-height: 52vh; overflow-y: auto; resize: vertical; }
form.orlon-builder .ob-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0 0; padding: 0; background: transparent; }
.ob-switch span { display: grid; gap: 4px; }
.ob-switch strong { font: 500 14px/1.4 var(--sans); color: var(--t1); }
.ob-switch small { font-size: 13px; line-height: 1.5; color: var(--t3); }
form.orlon-builder .orlons-actions { margin-top: 24px; }
form.orlon-builder .ob-switch input { align-self: center; margin: 0; }
form.orlon-builder .ob-card:has(.ob-switch) { padding-bottom: 16px; }
/* Custom Orlon logos: the Orlon mark, or the creator's square logo, on cards, the detail view and the creator */
.orlon-logo { flex: none; display: block; width: 40px; height: 40px; border-radius: 22%; background: url("/static/brand/orlon-mark.png") center / contain no-repeat; }
.orlon-logo.has-logo { background-color: transparent; background-size: cover; background-position: center; }
:root[data-theme="light"] .orlon-logo:not(.has-logo) { filter: brightness(0); }
.orlon-card { display: flex; align-items: center; gap: 14px; }
.orlon-card-text { display: grid; gap: 2px; min-width: 0; }
.orlon-card-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orlon-card-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.orlons-detail-logo { width: 64px; height: 64px; margin-bottom: 14px; }
.ob-logo { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ob-logo .orlon-logo { width: 44px; height: 44px; }
.ob-logo-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ob-logo-copy strong { font: 500 14px/1.4 var(--sans); color: var(--t1); }
.ob-logo-copy small { font-size: 12px; color: var(--t3); }
.ob-logo .button { height: 36px; padding: 0 14px; font: 500 13px var(--sans); border-radius: 10px; }
.ob-improve { display: inline-flex; align-items: center; gap: 8px; height: 36px; margin-top: 10px; padding: 0 14px; font: 500 13px var(--sans); border-radius: 10px; }
.ob-improve svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#orlon-instr[aria-busy="true"] { opacity: .6; }
/* Explore: a grid of cards on wide screens, a friendly empty state, and the Orlon's logo in the chip above the composer */
.orlons-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.orlons-list .orlon-card { min-height: 84px; padding: 14px 16px; }
.orlons-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; }
.orlons-empty strong { font: 500 16px/1.4 var(--sans); color: var(--t1); }
.orlons-empty p { margin: 0 0 8px; max-width: 360px; color: var(--t2); font-size: 14px; }
.orlon-chip-logo { width: 18px; height: 18px; border-radius: 5px; }
/* Model picker: section labels and a small New tag, like the app */
.m-section { margin: 10px 4px 4px; font: 500 12px/1.4 var(--sans); color: var(--t3); }
.m-section:first-child { margin-top: 2px; }
.m-new { display: inline-block; margin-left: 4px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--t2); font: 500 11px/1.6 var(--sans); vertical-align: 1px; }
.m-list > .m-section { grid-column: 1 / -1; }
/* Answer versions: ‹ 1/2 › and the model that wrote the shown answer, at the start of the reply's actions */
.reply-versions { display: inline-flex; align-items: center; margin-right: 2px; }
.reply-versions button { display: inline-grid; place-items: center; min-width: 26px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--t2); }
.reply-versions button:hover:not(:disabled) { background: var(--s2); color: var(--t1); }
.reply-version-step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reply-version-step:disabled { opacity: .3; }
.reply-version-label { padding: 0 4px !important; font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; }
.reply-version-model { margin: 0 8px 0 2px; color: var(--t3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
/* Compare answers, in the chat: side by side on a computer, swipe between them on a phone */
article.message.is-comparing > .message-body, article.message.is-comparing > .reply-actions { display: none; }
@keyframes compare-in { from { opacity: 0; transform: translateY(4px); } }
.compare-inline { margin: 4px 0 8px; animation: compare-in .2s ease both; }
.compare-inline-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.compare-inline-top strong { font: 500 14px/1.4 var(--sans); color: var(--t2); }
.compare-inline-done { height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--t1); font: 500 13px var(--sans); }
.compare-inline .compare-columns { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.compare-inline .compare-column { flex: 1 0 300px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--s1, transparent); scroll-snap-align: start; }
.compare-column-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.compare-column-head strong { color: var(--t1); font: 500 14px/1.4 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-column-head small { flex: none; color: var(--t3); font-size: 12px; }
.compare-body { flex: 1; max-height: 60vh; overflow-y: auto; padding: 12px 16px; font-size: 15px; line-height: 1.6; }
.compare-body > :first-child { margin-top: 0; }
.compare-use { margin: 0 12px 12px; height: 40px; border: 1px solid var(--on); border-radius: 12px; background: var(--on); color: var(--on-ink); font: 500 14px var(--sans); }
.compare-use:disabled { background: transparent; color: var(--t3); border-color: var(--line); }
@media (max-width: 760px) { .compare-inline .compare-column { flex: 0 0 86%; } .reply-version-model { max-width: 110px; } }
.m-today { color: var(--t1); }
/* Today's free model: a larger card pinned above the list with a fine silver edge, like the app. No glow, sparkle or animation */
.m-featured { display: grid; gap: 12px; width: 100%; margin: 0 0 12px; padding: 16px 18px; text-align: left; color: var(--t1); border: 1px solid transparent; border-radius: 18px; cursor: pointer;
  background: linear-gradient(var(--s1, #0b0b0b), var(--s1, #0b0b0b)) padding-box, linear-gradient(160deg, #5a5a5a, #262626 45%, #3a3a3a) border-box; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.m-featured:hover { background: linear-gradient(var(--s2, #111), var(--s2, #111)) padding-box, linear-gradient(160deg, #6a6a6a, #2e2e2e 45%, #444) border-box; }
.m-featured-top { display: flex; align-items: center; justify-content: space-between; }
.m-featured-top > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.m-featured-label { color: var(--t2); font: 500 13px/1.3 var(--sans); }
.m-featured-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.model-results .m-featured .m-featured-main .m-logo { flex: none; width: 48px; height: 48px; min-width: 48px; border-radius: 14px; }
.model-results .m-featured .m-featured-main .m-logo img { width: 30px; height: 30px; }
.m-featured-text { display: grid; gap: 3px; min-width: 0; }
.m-featured-text strong { font: 600 19px/1.25 var(--sans); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-featured-text span { color: var(--t2); font-size: 14px; line-height: 1.45; }
.m-featured-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font: 500 13px/1.4 var(--sans); }
.m-featured-foot span:last-child { color: var(--t3); font-weight: 400; }
:root[data-theme="light"] .m-featured { background: linear-gradient(var(--s1, #fafafa), var(--s1, #fafafa)) padding-box, linear-gradient(160deg, #a8a8ae, #dcdce0 45%, #bdbdc2) border-box; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
/* Loading is a small orbit: one dot circling a fine ring around a faint centre, instead of bouncing dots */
.typing-dots { position: relative; display: inline-block; width: 22px; height: 22px; margin: 8px 2px; padding: 0; gap: 0; border: 1px solid color-mix(in srgb, currentColor 24%, transparent); border-radius: 50%; color: var(--t2); }
.typing-dots::after { content: ""; position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; opacity: .45; }
.typing-dots i { display: none; animation: none; }
.typing-dots i:first-child { display: block; position: absolute; top: -3.5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--t1); opacity: 1; transform-origin: 3px 14.5px; animation: orlon-orbit 1.6s linear infinite; }
@keyframes orlon-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .typing-dots i:first-child { animation: orlon-orbit-pulse 1.6s ease-in-out infinite; } @keyframes orlon-orbit-pulse { 50% { opacity: .35; } } }
.message.thinking .typing-dots { display: inline-block; width: 16px; height: 16px; margin: 0 10px 0 0; vertical-align: -3px; }
.message.thinking .typing-dots i:first-child { top: -2.5px; width: 5px; height: 5px; margin-left: -2.5px; transform-origin: 2.5px 10.5px; }
.message.thinking .typing-dots::after { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; }
/* Today's free model: the orbit art sits behind the card's top-right corner; everything else on the card stays plain */
.m-featured { position: relative; overflow: hidden; isolation: isolate; }
.m-featured > :not(.featured-orbit) { position: relative; z-index: 1; }
.featured-orbit { position: absolute; z-index: 0; top: -14px; right: -18px; width: 210px; height: 140px; color: var(--t1); pointer-events: none; }
@media (max-width: 760px) { .featured-orbit { width: 170px; height: 113px; right: -24px; } }
.featured-orbit, .featured-orbit * { stroke-linecap: round; }
