/* Hooyar / Flutter visual parity — shared design system for all site surfaces.
   Styles only: no API, session, pricing, wallet or permission changes. */
html[data-theme="dark"] {
  --bg: #101012;
  --bg-alt: #111113;
  --surface: #19191c;
  --surface-2: #202023;
  --surface-3: #28282c;
  --surface-soft: rgba(255,255,255,.035);
  --line: #2c2c32;
  --line-hover: #424249;
  --text: #f4f4f6;
  --text-2: #b5b5bc;
  --muted: #87878f;
  --shadow: 0 12px 32px rgba(0,0,0,.18);
  --shadow-soft: 0 4px 14px rgba(0,0,0,.10);
  --input: #161619;
  --glass: #19191c;
  --code: #0e0e11;
}
html[data-theme="light"] {
  --bg: #f7f7f8;
  --bg-alt: #f4f4f6;
  --surface: #fff;
  --surface-2: #f4f4f6;
  --surface-3: #eaeaf0;
  --surface-soft: rgba(0,0,0,.025);
  --line: #e2e2e8;
  --line-hover: #c9c9d2;
  --text: #17171b;
  --text-2: #565660;
  --muted: #888893;
  --shadow: 0 10px 26px rgba(20,20,30,.07);
  --shadow-soft: 0 4px 12px rgba(20,20,30,.04);
  --input: #fff;
  --glass: #fff;
}
:root {
  --sidebar: 300px;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 16px;
  --motion-fast: 130ms;
  --motion: 160ms;
  --content-max: 1500px;
}
html { font-size: 14px; }
body, body.public-body, body.auth-body {background:var(--bg); color:var(--text);}
body::before, body.auth-body::after, .workspace-canvas::before, .auth-showcase:before {display:none!important;}
::selection {background:rgba(var(--brand-rgb),.34); color:var(--text);}
:where(a, button, input, textarea, select, summary):focus-visible {outline:2px solid var(--brand); outline-offset:2px;}
:where(button, input, textarea, select) {font-family:var(--font);}
:where(button, a) { -webkit-tap-highlight-color: transparent; }
:where(button, a).btn:active {transform:translateY(0)}
:where(.btn,.ws-new-chat,.auth-primary,.send-btn,.ws-auth-cta) {background:var(--brand);color:#fff;border-radius:12px;box-shadow:none;}
:where(.btn,.ws-new-chat,.auth-primary,.send-btn):hover {filter:brightness(1.08);transform:none;}
:where(.btn.secondary,.btn.ghost) {box-shadow:none;}
:where(.card,.auth-card,.stat,.table-wrap,.content-panel,.field-card,.panel-form,.studio-card,.workspace-panel,.workspace-canvas) {box-shadow:none;}
:where(.card,.auth-card,.stat,.table-wrap,.content-panel,.field-card,.studio-card) {border-radius:14px;}
:where(.card,.table-wrap,.field-card,.studio-card) {background:var(--surface);border-color:var(--line);}
:where(.card.hoverable):hover {transform:none;}
:where(input:not([type=checkbox]):not([type=radio]),select,textarea) {accent-color:var(--brand);}
:where(input:not([type=checkbox]):not([type=radio]),select,textarea):focus {outline:none;border-color:var(--brand);}
:where(.topbar,.public-nav,.workspace-topbar) {backdrop-filter:none;}

/* App-equivalent workspace: full-height fixed sidebar and flat chat canvas. */
.workspace-body {overflow:hidden;}
.workspace-sidebar {
  top:0;right:0;bottom:0;width:300px;
  border-radius:0;border:0;border-inline-end:1px solid var(--line);
  background:var(--bg-alt);box-shadow:none;backdrop-filter:none;
  padding:16px 13px 0;gap:0;
}
.ws-brand-row {padding:0 7px 14px; min-height:68px;gap:8px;}
.ws-brand {gap:10px;flex:1;}
.ws-logo {width:39px;height:39px;flex-basis:39px;border-radius:12px;}
.ws-brand strong {font-size:15px;line-height:1.3;font-weight:750;}
.ws-brand small {font-size:10px;letter-spacing:.06em;color:var(--muted);direction:ltr;text-align:right;}
.ws-top-settings {width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:10px;color:var(--text);flex:none;}
.ws-top-settings:hover {background:var(--surface-2);}
.ws-new-chat {height:56px;flex:none;min-height:56px;border:0;background:var(--brand);border-radius:12px;padding:0 16px;margin:5px 0 11px;gap:9px;font-size:14px;font-weight:750;}
.ws-new-chat:hover {background:var(--brand);filter:brightness(1.06);}
.ws-new-chat svg {order:2;margin-inline-start:auto;}
.ws-new-chat span {order:1;}
.ws-new-chat kbd {display:none;}
.ws-app-nav {display:grid;gap:2px;padding:0 0 6px;flex:none;}
.ws-app-link {width:100%;min-width:0;min-height:45px;padding:0 11px;border:0;border-radius:12px;background:transparent;display:flex;align-items:center;gap:13px;direction:rtl;text-align:right;color:var(--text-2);font-weight:600;font-size:13px;font-family:var(--font);transition:background .14s,color .14s;}
.ws-app-link svg {flex:none;opacity:.85;}
.ws-app-link:hover,.ws-app-link.selected {background:var(--surface-2);color:var(--text);}
.ws-app-link.selected {font-weight:700;}
.ws-search {margin:3px 2px 10px;min-height:36px;height:36px;border-radius:10px;flex:none;background:var(--surface);border:1px solid var(--line);}
.ws-search input {font-size:11px;}
.ws-account-card {display:flex;align-items:center;gap:9px;padding:10px 12px;min-height:74px;flex:none;border:1px solid var(--line);border-radius:14px;margin:0 1px 9px;color:var(--text);transition:border-color .13s,background .13s;}
.ws-account-card:hover {border-color:var(--line-hover);background:var(--surface);}
.ws-account-card>svg:first-child {flex:none;color:var(--text);}
.ws-account-card>span {display:grid;gap:4px;min-width:0;flex:1;}
.ws-account-card strong {display:block;font-size:12px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.ws-account-card small {font-size:10px;color:var(--muted);line-height:1.5;}
.ws-account-card>svg:last-child {color:var(--muted);flex:none;transform:rotate(90deg);}
.ws-side-scroll {min-height:90px;padding:3px 1px 4px;scrollbar-color:var(--surface-3) transparent;}
.ws-section-head {padding:0 7px;height:33px;font-size:10px;color:var(--muted);}
.ws-conversation,.ws-project {min-height:39px;border-radius:10px;background:transparent;color:var(--text-2);font-size:11px;}
.ws-conversation:hover,.ws-project:hover {background:var(--surface-2);color:var(--text);}
.ws-side-footer {display:flex;flex-direction:column;gap:0;border-top:1px solid var(--line);padding:8px 3px 10px;flex:none;}
.ws-more-links {position:relative;min-height:34px;}
.ws-more-links>summary {list-style:none;display:flex;align-items:center;gap:9px;min-height:34px;padding:0 9px;color:var(--muted);font-size:11px;cursor:pointer;border-radius:9px;}
.ws-more-links>summary::-webkit-details-marker {display:none;}
.ws-more-links>summary svg:last-child {margin-inline-start:auto;transform:rotate(90deg);}
.ws-more-links[open]>summary svg:last-child {transform:rotate(-90deg);}
.ws-more-links>summary:hover {background:var(--surface-2);color:var(--text);}
.ws-more-content {max-height:180px;overflow:auto;padding:5px;border:1px solid var(--line);background:var(--surface);border-radius:11px;margin:4px 2px 8px;display:grid;grid-template-columns:1fr 1fr;gap:2px;}
.ws-more-content .ws-footer-link {min-width:0;min-height:34px;height:auto;padding:7px 8px;font-size:10px;}
.ws-account-settings {display:flex;align-items:center;gap:9px;min-height:45px;padding:0 9px;border-radius:10px;font-size:12px;font-weight:700;color:var(--text);}
.ws-account-settings:hover {background:var(--surface-2);}
.ws-account-settings svg:last-child {margin-inline-start:auto;color:var(--muted);transform:rotate(90deg);}
.workspace-main {margin-right:300px;padding:0;height:100dvh;overflow:hidden;background:var(--bg);}
.workspace-topbar {max-width:none;margin:0;padding:0 21px;height:64px;border-bottom:1px solid var(--line);background:var(--bg);}
.ws-context span {font-size:12px;color:var(--text);}
.ws-context small {color:var(--muted);}
.mode-switch {border:1px solid var(--line);background:var(--surface);box-shadow:none;}
.mode-btn.active {box-shadow:none;background:var(--surface-3);}
.ws-wallet {border-color:var(--line);background:var(--surface);font-size:11px;}
.ws-auth-cta {height:37px;padding:0 14px;}
.workspace-canvas {height:calc(100dvh - 64px);max-width:none;border:0;border-radius:0;box-shadow:none;background:var(--bg);}
.workspace-empty {max-width:min(100%,750px);}
.workspace-mark {box-shadow:none;}
.workspace-kicker {color:var(--muted);}
.workspace-empty h1 {font-weight:750;}
.quick-prompts button {background:var(--surface);border-color:var(--line);border-radius:11px;}
.composer-dock {background:transparent;}
.composer-shell {border-radius:15px;border-color:var(--line-hover);background:var(--surface);box-shadow:none;}
.composer-shell:focus-within {border-color:rgba(var(--brand-rgb),.55);box-shadow:0 0 0 2px rgba(var(--brand-rgb),.08);}
.composer-shell textarea {background:transparent;}
.composer-note {color:var(--muted);}
.message-content {color:var(--text);}
.workspace-panel {background:var(--surface);border-color:var(--line);border-radius:15px 0 0 15px;}

/* Standard user/admin pages — full-height sidebar, inset-free panes. */
.sidebar {top:0;right:0;bottom:0;width:var(--sidebar);border:0;border-inline-end:1px solid var(--line);border-radius:0;box-shadow:none;backdrop-filter:none;background:var(--bg-alt);padding:17px 12px;}
.sidebar .brand {padding:7px 9px 16px;min-height:69px;}
.sidebar .brand-logo {width:40px;height:40px;flex:0 0 40px;border-radius:12px;}
.sidebar .brand strong {font-size:15px;}
.sidebar .brand span {font-size:10px;}
.nav-top-settings {margin-inline-start:auto;flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;color:var(--text-2);}
.nav-top-settings:hover {background:var(--surface-2);color:var(--text);}
.sidebar .nav {gap:3px;}
.sidebar .nav-link {min-height:43px;border:0;border-radius:11px;padding:8px 11px;font-size:12px;gap:11px;}
.sidebar .nav-link:hover {border-color:transparent;}
.sidebar .nav-link.active {background:var(--surface-2);border:0;color:var(--text);}
.sidebar .nav-link.active::before {display:none;}
.sidebar .nav-link.active .icon {color:var(--text-2);}
.sidebar-footer {display:grid;gap:5px;border-top:1px solid var(--line);margin-top:auto;padding-top:12px;}
.sidebar-footer .nav-signout {color:var(--muted);}
.sidebar-footer .nav-account {border:1px solid var(--line);background:var(--surface);display:flex;align-items:center;gap:10px;padding:11px 10px;border-radius:13px;}
.nav-account>span {min-width:0;flex:1;display:grid;gap:3px;}
.nav-account strong {font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.nav-account small {font-size:10px;color:var(--muted);}
.nav-account>svg:last-child {color:var(--muted);transform:rotate(90deg);}
.main {margin-right:var(--sidebar);padding:0 23px 34px;min-height:100dvh;}
.topbar {position:sticky;top:0;z-index:25;max-width:none;height:72px;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0 4px;background:var(--bg);box-shadow:none;}
.topbar h1 {font-size:16px;}
.topbar p {color:var(--muted);}
.content {padding:22px 0 40px;}
.icon-btn {border-radius:11px;background:var(--surface);border-color:var(--line);box-shadow:none;}
.balance-chip {background:var(--surface);border-color:var(--line);border-radius:11px;}
.avatar {box-shadow:none;background:var(--surface);}
.card {padding:19px;}
.page-intro h2 {font-size:22px;}
.stat b {font-size:22px;}
.section-head h2 {font-size:16px;}
.table-wrap {box-shadow:none;}
.table-wrap th {background:var(--surface-2);}
input, select, textarea {color-scheme:dark;}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea {color-scheme:light;}

/* Login & registration: account panel consistent with the desktop app. */
.auth-body {min-height:100dvh;padding:28px 18px;}
.auth-shell {width:min(980px,100%);gap:34px;padding:28px 0;}
.auth-brand {margin-bottom:12px;}
.auth-brand .brand-logo {width:44px;height:44px;border-radius:12px;}
.auth-brand strong {font-size:18px;}
.auth-showcase {min-height:380px;padding:20px 32px;}
.auth-showcase img {height:225px;width:250px;filter:none;}
.auth-showcase h2 {font-size:24px;}
.auth-showcase p {color:var(--text-2);}
.auth-showcase-ring {display:none;}
.showcase-pill {background:var(--surface);border:1px solid var(--line);border-radius:10px;}
.auth-card,.auth-card-v4 {padding:28px;border-radius:16px;background:var(--surface);border-color:var(--line);backdrop-filter:none;box-shadow:none;}
.auth-kicker {font-size:11px;color:var(--brand);}
.auth-card h1 {font-size:23px;}
.auth-card input {border:1px solid var(--line);background:var(--input);border-radius:11px;}
.auth-card button.auth-primary {min-height:46px;}
.auth-trust {color:var(--muted);}
.auth-links a:hover {color:var(--brand);}
.auth-lang {border-radius:11px;background:var(--surface);}

/* Guest, landing, docs, academy, download, and marketing pages. */
.public-body {background:var(--bg);}
.public-nav {width:min(1260px,calc(100% - 32px));margin:0 auto;padding:0 15px;height:72px;top:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--bg);box-shadow:none;}
.public-nav .brand-logo {width:40px;height:40px;}
.public-main {padding-top:22px;}
.public-footer {border-top:1px solid var(--line);}
.hero-visual,.hero-logo-card,.public-hero-card {box-shadow:none;}
.floating-chip,.showcase-pill {backdrop-filter:none;}
.hero h1,.page-intro h2 {letter-spacing:-.025em;}
.hero h1 {font-weight:800;}
:is(.hero,.landing-section,.article-page,.docs-layout,.downloads-page) :where(.card,.feature-card,.model-card,.download-card) {border-color:var(--line);background:var(--surface);}

/* Installation is a standalone page with an inline legacy theme. */
body.hooyar-installer {background:var(--bg);color:var(--text);}
.hooyar-installer .card {background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:none;}
.hooyar-installer input {background:var(--input);border:1px solid var(--line);border-radius:11px;color:var(--text);}
.hooyar-installer label {color:var(--text-2);}
.hooyar-installer p,.hooyar-installer .hint {color:var(--muted);}
.hooyar-installer button,.hooyar-installer a.btn {background:var(--brand);border-radius:11px;}
.hooyar-installer .brand img {border-radius:12px;}

@media (max-width: 900px) {
  .workspace-sidebar {width:min(320px,calc(100vw - 35px));right:0;top:0;bottom:0;border-radius:0;border-inline-end:1px solid var(--line);transform:translateX(105%);}
  .workspace-sidebar.open {transform:translateX(0);}
  .workspace-main {margin-right:0;padding:0;}
  .workspace-topbar {height:60px;padding:0 12px;}
  .workspace-canvas {height:calc(100dvh - 60px);border-radius:0;}
  .sidebar {right:0;top:0;bottom:0;width:min(310px,calc(100vw - 26px));border-radius:0;transform:translateX(110%);}
  .sidebar.open {transform:translateX(0);}
  .main {margin-right:0;padding:0 16px 26px;}
  .topbar {height:66px;}
  .ws-top-settings {display:grid;}
}
@media (max-width: 720px) {
  .workspace-topbar {padding:0 7px;height:54px;gap:4px;}
  .workspace-canvas {height:calc(100dvh - 54px);}
  .ws-auth-cta {font-size:10px;padding:0 7px;}
  .ws-account-card {min-height:70px;}
  .workspace-empty {padding-inline:17px;}
  .auth-shell {width:min(450px,100%);display:flex;flex-direction:column;gap:7px;padding-top:24px;}
  .auth-showcase {display:none;}
  .auth-card {width:100%;padding:24px 19px;}
  .public-nav {width:100%;height:60px;margin:0;padding-inline:12px;}
  .public-main {width:calc(100% - 24px);}
  .hero {padding-top:22px;}
  .hero h1 {font-size:29px;}
  .grid-2,.grid-3,.grid-4,.form-grid {grid-template-columns:1fr;}
  .form-grid .full {grid-column:auto;}
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}
}
/* Match the workspace JavaScript's 1023px mobile-sidebar breakpoint. */
@media (min-width:901px) and (max-width:1023px) {
 .workspace-sidebar {width:min(320px,calc(100vw - 35px));right:0;top:0;bottom:0;border-radius:0;transform:translateX(105%);}
 .workspace-sidebar.open {transform:translateX(0);}
 .workspace-main {margin-right:0;padding:0;}
 .workspace-topbar {height:60px;padding:0 12px;}
 .workspace-canvas {height:calc(100dvh - 60px);border-radius:0;}
}

/* Shared identity entry: one account control, no duplicate guest card. */
.ws-side-footer .ws-account-settings { display:flex; align-items:center; gap:12px; padding:13px 14px; margin:8px 8px 5px; border-radius:14px; background:#202124; border:1px solid #34363c; text-decoration:none; }
.ws-account-settings>span { display:flex; flex-direction:column; gap:3px; flex:1; line-height:1.5; }
.ws-account-settings strong { font-weight:700; font-size:13px; color:#f7f7fa; }
.ws-account-settings small { color:#9699a3; font-size:11px; }
.settings-profile .profile-orb { background:linear-gradient(145deg,#1976ff,#6858e8); box-shadow:0 8px 28px #176bff33; }
.settings-section:target { border-color:#176bff6b; }
@media(max-width:620px){.settings-section .device-row{flex-wrap:wrap;gap:9px}.settings-section .device-row form{width:100%;text-align:end}}


/* Unified modal / bottom-sheet geometry follows the Flutter adaptive surface. */
body.ho-modal-open{overflow:hidden!important}
.workspace-panel-backdrop:not([hidden]){display:block!important;position:fixed;inset:0;z-index:1700;background:rgba(0,0,0,.70);backdrop-filter:blur(7px)}
.workspace-panel{position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;width:min(680px,calc(100vw - 36px))!important;max-width:none!important;height:auto!important;max-height:min(760px,calc(100dvh - 60px))!important;transform:translate(-50%,-45%) scale(.985)!important;z-index:1701!important;opacity:0!important;pointer-events:none!important;overflow-y:auto!important;border:1px solid var(--line-hover)!important;border-radius:22px!important;box-shadow:0 24px 85px rgba(0,0,0,.48)!important;transition:transform .18s ease,opacity .18s ease!important}
.workspace-panel.open{opacity:1!important;transform:translate(-50%,-50%) scale(1)!important;pointer-events:auto!important}
.workspace-panel:not(.open){visibility:hidden!important}
.workspace-panel .panel-list{max-height:210px;overflow:auto}
.workspace-panel .panel-form textarea{min-height:115px;max-height:220px}
@media(max-width:700px){.workspace-panel{top:auto!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;max-height:90dvh!important;border-radius:22px 22px 0 0!important;transform:translateY(110%)!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}.workspace-panel.open{transform:translateY(0)!important}}
.ho-space-switch,.ho-global-space{display:flex;align-items:center;gap:6px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px;margin:12px 0}
.ho-space-switch a,.ho-global-space a{display:flex;flex:1;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 9px;color:var(--text-2);border-radius:10px;font-size:11px;text-decoration:none;font-weight:650}
.ho-space-switch a.active,.ho-global-space a.active{background:rgba(var(--brand-rgb),.13);color:var(--brand);box-shadow:inset 0 0 0 1px rgba(var(--brand-rgb),.24)}
.ho-global-space{max-width:700px;margin:0 0 22px}.ho-global-space small{font-size:10px;color:var(--muted);flex:1;text-align:center}
.ho-nav-divider{font-size:10px;color:var(--brand);padding:18px 13px 8px;border-top:1px solid var(--line);margin-top:9px}
.ho-remember{display:flex;gap:9px;align-items:center;color:var(--text-2);font-size:12px;padding:2px 0 10px;cursor:pointer}.ho-remember input{width:16px;height:16px;accent-color:var(--brand)}
.ho-api-intro{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px;margin-bottom:16px}.ho-api-intro-label{font-weight:700;font-size:13px;color:var(--brand)}.ho-api-intro nav{display:flex;flex-wrap:wrap;gap:8px}
.api-hero{min-height:180px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;flex-wrap:wrap!important;background:linear-gradient(110deg,rgba(var(--brand-rgb),.11),var(--surface) 65%)!important;border:1px solid var(--line)!important}.api-hero>div:first-child{flex:1;min-width:210px}.api-hero h2{font-size:clamp(19px,2.3vw,27px);line-height:1.5;margin:8px 0}.api-hero p{max-width:690px}.api-credit{flex:0 0 168px;border:1px solid rgba(var(--brand-rgb),.25)!important;border-radius:16px!important;background:var(--surface-2)!important;text-align:center;padding:18px!important}.api-credit b{font-size:28px!important;color:var(--text)!important}
.ho-api-grid{align-items:start!important}.ho-api-grid>.card{min-width:0}.api-key-form select[multiple]{min-height:120px;max-height:165px;overflow:auto}.ho-api-empty,.ho-api-note{padding:16px;border:1px dashed var(--line-hover);border-radius:12px;color:var(--muted);font-size:12px;line-height:1.9}
.ho-section-intro{margin-bottom:20px}.ho-section-intro h1{font-size:24px;margin:8px 0}.ho-section-intro p{color:var(--muted);line-height:1.9}.ho-model-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}.ho-model-item{display:flex;gap:14px;min-height:148px}.ho-model-item h3{margin:0 0 8px}.ho-model-item code{display:block;color:var(--brand);font-size:11px}.ho-model-item p{font-size:12px;line-height:1.8;color:var(--muted)}
@media(max-width:760px){.ho-global-space{flex-wrap:wrap}.ho-global-space small{flex:1 1 100%}.api-credit{flex:1 1 100%}.ho-api-intro nav{width:100%}}

.ho-tools-grid{align-items:start!important}.ho-form-stacked{display:grid;gap:12px;margin:15px 0}.ho-tools-items{display:grid;gap:9px;margin-top:18px}.ho-tool-row{padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);display:grid;gap:9px;overflow-wrap:anywhere}.ho-tool-row summary{display:flex;gap:12px;justify-content:space-between;cursor:pointer}.ho-tool-row small{color:var(--muted)}.ho-tool-actions{display:flex;gap:8px;flex-wrap:wrap}.ho-mcp-results{padding:12px;margin-top:14px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px}.ho-mcp-output{max-height:300px;overflow:auto;white-space:pre-wrap;direction:ltr;text-align:left;background:var(--code);padding:12px;border-radius:10px}

/* Shared adaptive web modal/bottom-sheet for create and connect actions. */
.ho-tools-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.ho-tools-head h2{margin:0;font-size:17px}
.ho-sheet-dialog{position:fixed;inset:0;box-sizing:border-box;direction:rtl;margin:auto;padding:0;width:min(570px,calc(100vw - 28px));max-width:none;max-height:min(780px,calc(100dvh - 38px));border:1px solid var(--line-hover);border-radius:22px;background:var(--surface);color:var(--text);box-shadow:0 24px 90px #0009;overflow:auto}
.ho-sheet-dialog::backdrop{background:#000b;backdrop-filter:blur(6px)}
.ho-sheet-body{padding:26px;min-width:0}
.ho-sheet-body>header{display:flex;align-items:center;justify-content:space-between;padding-bottom:15px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.ho-sheet-body>header h3{margin:0;font-size:20px}
.ho-sheet-close{font-size:25px;font-weight:300;display:grid;place-content:center;width:42px;height:42px;border:1px solid var(--line);border-radius:13px;color:var(--text);background:var(--surface-2);cursor:pointer}
.ho-sheet-dialog .ho-form-stacked{margin-bottom:0}
@media(max-width:700px){.ho-sheet-dialog{inset:auto 0 0!important;bottom:0!important;width:100%!important;max-height:90dvh!important;margin:0!important;border-radius:23px 23px 0 0;padding-bottom:env(safe-area-inset-bottom)}.ho-sheet-body{padding:20px 18px}}

/* 0.0.1: readable and responsive wallet summary; same accent as the app. */
.wallet-v4 .wallet-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:initial;gap:14px;padding:clamp(18px,3vw,28px);min-height:170px;background:linear-gradient(135deg,#153c8a,var(--brand));isolation:isolate}
.wallet-v4 .wallet-summary>div{position:relative;z-index:1;min-width:0;display:grid;justify-items:start;gap:6px}
.wallet-v4 .wallet-summary span,.wallet-v4 .wallet-summary small{display:block;position:static;line-height:1.75;overflow-wrap:anywhere;max-width:100%}
.wallet-v4 .wallet-summary b{display:block;font-size:clamp(30px,4vw,43px);line-height:1.25;font-variant-numeric:tabular-nums;margin:0;white-space:normal}
.wallet-v4 .wallet-summary>svg{position:relative;top:auto;right:auto;left:auto;justify-self:end;align-self:start;z-index:1;width:30px;height:30px}
.wallet-v4 .wallet-summary:before{pointer-events:none;z-index:0}
@media(max-width:560px){.wallet-v4 .wallet-summary{min-height:154px;grid-template-columns:minmax(0,1fr) 28px}.wallet-v4 .wallet-summary b{font-size:30px}}
/* Avoid creating huge layout costs from offscreen chat cards. */
.ws-message,.chat-message,.ws-conversation{content-visibility:auto;contain-intrinsic-size:auto 140px}
/* Self-hosted code styling; never fetch a remote highlighter. */
pre code[class*="language-"],code[class*="language-"]{direction:ltr;text-align:left;unicode-bidi:plaintext}

/* Shared site-wide code block toolbar, including articles, dashboards, API and chat. */
.ho-code-frame{border:1px solid var(--line-hover);border-radius:14px;margin:14px 0;overflow:hidden;background:var(--code);min-width:0;direction:ltr;text-align:left;position:relative}
.ho-code-frame>pre{margin:0!important;border:none!important;border-radius:0!important;background:transparent!important;max-height:min(72vh,820px);overflow:auto!important;padding:15px 17px!important;white-space:pre!important;tab-size:2;line-height:1.75}
.ho-code-frame>pre code{background:transparent!important;border:0!important;box-shadow:none!important;white-space:inherit!important;direction:ltr!important;text-align:left!important;font-family:ui-monospace,SFMono-Regular,Consolas,Monaco,monospace!important;font-size:12px!important;line-height:1.75!important;color:#dce7fa}
.ho-code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 11px;border-bottom:1px solid rgba(255,255,255,.10);direction:ltr;background:rgba(160,190,255,.055);color:#a9b9d4;font-size:11px;font-family:var(--font)}
.ho-code-copy{display:inline-flex;gap:6px;align-items:center;justify-content:center;min-height:29px;border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:3px 11px;color:#dbeafe;background:rgba(255,255,255,.06);font:inherit;cursor:pointer}
.ho-code-copy:hover,.ho-code-copy:focus-visible{background:rgba(31,108,255,.24);border-color:rgba(31,108,255,.5)}
.ho-code-copy:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.ho-code-frame code .token.comment{color:#8897ae}.ho-code-frame code .token.string{color:#a7e5b4}.ho-code-frame code .token.keyword{color:#a9b7ff}.ho-code-frame code .token.function{color:#8cdcff}.ho-code-frame code .token.number{color:#fbc890}
@media(max-width:600px){.ho-code-frame{margin:10px 0}.ho-code-frame>pre{padding:12px!important}.ho-code-toolbar{padding:6px 8px}}

/* Private free-Gemini image output in chat. */
.ho-generated-image{display:block!important;width:min(100%,560px)!important;max-width:100%;overflow:hidden;border-radius:16px}.ho-generated-image img{display:block;width:100%!important;max-width:100%;height:auto!important;max-height:620px;object-fit:contain!important}
