/* Liquid Glass layer - loaded LAST on app.html and owner.html.
   Ported from the NeXa design-system conventions (blur/saturate glass for
   floating chrome only, one restrained accent glow, calm motion), mapped onto
   the canonical Mr Mhor gold tokens in app.css. This file defines no colours of
   its own beyond translucent mixes of those tokens, and never restyles chat
   (chat has exactly one implementation, in app.css). */

:root {
  --glass-blur: blur(20px) saturate(150%);
  --glass-edge: rgba(224, 189, 108, 0.14);         /* --brand-hi at low alpha: the top-edge highlight */
  --glass-glow: 0 0 0 1px rgba(201, 162, 75, 0.10), 0 8px 28px rgba(0, 0, 0, 0.45);
  --glass-chrome: rgba(27, 23, 13, 0.78);          /* --chrome, translucent */
  --glass-sheet: rgba(32, 26, 15, 0.86);           /* --glass-strong, a touch denser for legibility */
}

/* Floating chrome: header and dock are glass, with a hairline gold top edge. */
#topbar,
#bottom-nav {
  background: var(--glass-chrome);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
#topbar { box-shadow: inset 0 -1px 0 var(--border-soft), 0 1px 0 rgba(0, 0, 0, 0.35); }
#topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-edge), transparent);
}
#bottom-nav { box-shadow: inset 0 1px 0 var(--glass-edge); }

/* Repeated surfaces stay flat: a backdrop blur behind an opaque card is pure GPU
   cost once many render at once (lesson from the NeXa Shop grid). */
.card { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Sheets / overlays float above content, so they get the glass material. */
.status-drawer,
.t2-share-screen {
  background: var(--glass-sheet);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-glow);
}

/* Buttons: one restrained gold glow on the primary action, crisp focus ring everywhere. */
.btn { transition: transform 0.14s var(--ease-out, ease), filter 0.14s ease, box-shadow 0.18s ease; }
.btn:active { transform: scale(0.98); }
.btn.primary { box-shadow: 0 0 0 1px rgba(224, 189, 108, 0.25), 0 4px 16px rgba(201, 162, 75, 0.18); }
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 0 0 1px rgba(224, 189, 108, 0.35), 0 6px 22px rgba(201, 162, 75, 0.26); }
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-hi);
  outline-offset: 2px;
}

/* Pause continuous decorative loops while the tab is backgrounded (body.mm-tab-hidden
   is toggled by ui.js). Deliberately an explicit allowlist of `infinite` loops, not
   `body.mm-tab-hidden *`: a blanket pause can freeze finite fill-mode:both entrance
   animations at their invisible first frame. Add new infinite loops here; never add
   a finite entrance animation. */
body.mm-tab-hidden .loading-dots span,
body.mm-tab-hidden .chart-live-dot,
body.mm-tab-hidden .launch-shimmer::after,
body.mm-tab-hidden .entry-orbit,
body.mm-tab-hidden .boot-splash .boot-progress > span::after,
body.mm-tab-hidden .ov-live-dot,
body.mm-tab-hidden .ov-skel span,
body.mm-tab-hidden .ov-skel-line {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:active { transition: none; transform: none; }
}

/* Spacing scale (4 / 8 / 12 / 16 / 24): one rhythm between top-level blocks on
   both Home screens, instead of each block carrying its own ad-hoc margin. */
:root { --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; }
#home-view { display: flex; flex-direction: column; gap: var(--space-4); }
#home-view > :empty { display: none; }
#home-view > * { margin-block: 0; }
#home-view > * > :last-child { margin-bottom: 0; }
.ov { gap: var(--space-4); }

/* Home quick actions use the same line-icon language as the dock (SVG, currentColor) - no emoji. */
.quick-tile .qt-icon { display: inline-flex; color: var(--brand); }
.quick-tile .qt-icon svg { width: 20px; height: 20px; }
.ct-ico { display: inline-flex; color: var(--brand); }
.ct-ico svg { width: 18px; height: 18px; }

/* Page arrangement - every owner section and customer drill-down reads the same way:
   one-line intro, its action on the right, then panels on the 12/16px rhythm. Empty and
   error states are one centred block with their Retry under the message. */
.owner-page-heading { margin: 0 0 var(--space-4); }
.owner-page-heading p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.owner-page-heading + .btn.small { display: flex; margin: calc(-1 * var(--space-2)) 0 var(--space-4) auto; }
.card, .owner-data-panel { margin: 0 0 var(--space-3); }
.owner-data-panel > header { padding-bottom: var(--space-2); margin-bottom: var(--space-2); }
.owner-empty { padding: var(--space-6) var(--space-4) var(--space-3); text-align: center; color: var(--text-dim); line-height: 1.5; }
.owner-empty + .btn.small { display: flex; margin: 0 auto var(--space-4); }

/* Icons stand on their own, as in the NeXa menus: a plain 20px line icon in the
   brand colour beside its label - no tinted bubble, no tile around it. */
.t2-menu-icon, .mn-icon, .pf-ico, .sr-icon, .su-lock {
  width: 22px; height: 22px; min-width: 22px; display: inline-grid; place-items: center;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--brand); font-size: inherit;
}
.t2-menu-icon svg, .mn-icon svg, .pf-ico svg, .sr-icon svg { width: 20px; height: 20px; }
.su-lock svg, .trades-empty-icon svg { width: 28px; height: 28px; }
.trades-empty-icon { color: var(--brand); opacity: 0.85; }
/* Home shortcuts: one plain row of icon + label between hairlines, not four small boxes. */
.quick-grid { gap: var(--space-1); padding: var(--space-2) 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.quick-tile, body.app-body:not(.owner-body) .quick-tile { background: none; border: 0; box-shadow: none; padding: 6px 2px; gap: 6px; }

/* Boxes: one lighter card - hairline border, 12px radius, 12/14px padding, no shadow,
   and never a box drawn inside another box. */
.card, .owner-data-panel, .t2-card, .mn-card, .se-card, .an-pair, .rev-card { border-radius: 12px; box-shadow: none; border-color: var(--border-soft); }
.card, .owner-data-panel { padding: var(--space-3) 14px; }
.owner-data-panel .owner-data-panel, .owner-data-panel .card, .card .card { border: 0; background: transparent; padding: 0; margin: 0 0 var(--space-2); }

/* One toolbar row per section: Expand all on the left, Refresh on the right. */
.owner-section-actions { justify-content: space-between; margin: 0 0 var(--space-3); }
.owner-section-actions > :only-child { margin-left: auto; }
.owner-section-actions .cx-all { margin: 0; }
.owner-section-actions { flex-wrap: nowrap; }
.owner-section-actions > :not(.btn):not(.cx-all):not(.info-tip) { flex: 1; min-width: 0; font-size: 12px; color: var(--text-dim); }

/* Owner pages say less: explanations sit behind a "?" (infotip.js); the page intro's "?" sits beside the header title. */
#topbar-subtitle .info-tip { margin-left: 6px; vertical-align: 2px; }
.owner-page-heading:not(:has(> :not(span):not(h1):not([data-tip-text]))) { display: none; }   /* nothing left to show */

/* Compact numbers: key-figure strips and revenue tiles read as a tight grid, not big boxes. */
.owner-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.owner-status-strip > span { padding: 8px 10px; }
.owner-status-strip > span strong { font-size: 14px; }
.rev-metrics > article { padding: 10px 12px; }
.rev-metrics > article strong { font-size: 18px; }

/* Member card: avatar, name and ID, status pill; three key facts; details folded away. */
.cu-card { display: grid; gap: var(--space-3); }
.cu-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; border: 0; padding: 0; margin: 0; }
.cu-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-solid); color: var(--brand-hi); font: 700 15px var(--font-display); box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.35); }
.cu-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cu-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-who small { color: var(--text-faint); font: 500 11px var(--font-mono); }
.cu-status { flex: none; padding: 3px 9px; border-radius: 999px; font: 700 10px var(--font-ui); letter-spacing: 0.06em; border: 1px solid currentColor; }
.cu-ok { color: var(--accent); } .cu-warn { color: var(--warn); } .cu-bad { color: var(--danger); } .cu-dim { color: var(--text-dim); }
.cu-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border-soft); border-radius: 10px; overflow: hidden; }
.cu-facts > span { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: var(--surface); min-width: 0; }
.cu-facts small { color: var(--text-faint); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.cu-facts b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-more > summary { cursor: pointer; color: var(--brand-hi); font: 600 12.5px var(--font-ui); list-style: none; padding: 2px 0; }
.cu-more > summary::-webkit-details-marker { display: none; }
.cu-more > summary::after { content: " \203A"; }
.cu-more[open] > summary { margin-bottom: var(--space-2); }
.rev-metrics > article { min-height: 0; }

/* Fewer boxes: a panel that only says "nothing here" is a plain titled line, not a framed card. */
.owner-data-panel:has(> header + .owner-empty:last-child) { background: none; border: 0; padding: var(--space-2) 2px; }
.owner-data-panel:has(> header + .owner-empty:last-child) > header { border: 0; margin: 0; padding: 0; }
.owner-data-panel:has(> header + .owner-empty:last-child) > .owner-empty { padding: 4px 0 0; text-align: left; color: var(--text-faint); font-size: 12.5px; }
/* Detail rows: label left, value right, one hairline between rows (none under the panel title). */
.owner-data-row { padding: 9px 0; gap: var(--space-3); }
.owner-data-panel > header + .owner-data-row { border-top: 0; }
.owner-data-row > strong { text-align: right; font-weight: 600; }

/* Owner Menu (design spec v1.0, 5.3-5.4): brand header, shortcuts row, grouped rows 52-64px with a one-line description. */
.t2-menu-brand { margin: var(--space-1) 2px var(--space-3); font: 800 12px/1.2 var(--font-display); letter-spacing: 0.18em; color: var(--brand); }
.t2-menu-brand span { color: var(--text-faint); }
.t2-menu-shortcuts { margin: var(--space-3) 0 var(--space-1); }
.owner-body .t2-menu-row { min-height: 56px; }
.t2-menu-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 12.5px; }
/* AI welcome: MR MHOR AI with its one-line promise underneath. */
.welcome-sub { display: block; margin-top: 6px; font: 500 14px/1.4 var(--font-ui); color: var(--text-dim); letter-spacing: 0; }

/* Accessibility baseline (spec 4.2, 21): 16px inputs (no iOS zoom), 44px touch targets for primary actions,
   tabular figures for every price and amount. */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
.btn.primary, .t2-menu-row, .t2-profile, #bottom-nav button { min-height: 44px; }
.btn.small { min-height: 36px; }
code, .mono, strong, b, .cu-facts b, .owner-status-strip strong, .rev-metrics strong { font-variant-numeric: tabular-nums; }
.t2-menu, .t2-menu > *, .t2-menu-row, .t2-menu-copy { min-width: 0; max-width: 100%; }

/* Command (design spec 7): status line, Mr Mhor insight, engines. */
.ov-status { display: flex; align-items: center; gap: var(--space-2); font: 700 17px/1.2 var(--font-display); }
.ov-status b { font-weight: 700; }
.ov-insight { display: grid; gap: var(--space-2); padding: var(--space-3) 14px; border: 1px solid rgba(201, 162, 75, 0.28); border-radius: 12px;
  background: linear-gradient(180deg, rgba(201, 162, 75, 0.07), transparent 70%), var(--surface); }
.ov-insight-head { display: flex; align-items: center; gap: var(--space-2); color: var(--brand-hi); font: 700 12px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.ov-insight-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18); }
.ov-insight p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.ov-insight .btn { justify-self: start; }
/* AI answers: a quiet Copy beside the time. */
.msg-copy { margin-left: auto; padding: 2px 6px; border: 0; background: none; color: var(--text-faint); font: 600 11px var(--font-ui); cursor: pointer; }
.msg-copy:hover, .msg-copy:focus-visible { color: var(--brand-hi); }
.bubble.error ~ .msg-meta .msg-copy { display: none; }

/* Trades (design spec 10): one card per trade - head line, four key figures, tap for every recorded field. */
.tr-list { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.tr-card { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
.tr-card > summary { list-style: none; cursor: pointer; display: grid; gap: var(--space-2); padding: var(--space-3) 14px; }
.tr-card > summary::-webkit-details-marker { display: none; }
.tr-head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.tr-head > b { font: 700 15px var(--font-display); }
.tr-side { padding: 2px 7px; border-radius: 6px; font: 700 10.5px var(--font-ui); letter-spacing: 0.06em; }
.tr-side.buy { color: var(--accent); background: rgba(111, 167, 126, 0.12); }
.tr-side.sell { color: var(--danger); background: rgba(199, 106, 92, 0.12); }
.tr-state { color: var(--text-dim); font-size: 11.5px; text-transform: capitalize; }
.tr-pnl { margin-left: auto; font-size: 14px; } .tr-pnl.pos { color: var(--accent); } .tr-pnl.neg { color: var(--danger); }
.tr-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.tr-facts span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-facts small { color: var(--text-faint); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.tr-facts b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.tr-more { padding: 0 14px var(--space-2); }
/* Customers status filter. */
.cu-filter { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: 0 0 var(--space-3); }
.cu-filter .t2-shortcut.active { border-color: var(--brand); color: var(--brand-hi); }

/* Motion (design spec 20): a short, calm entrance when a page opens; nothing for reduced-motion users. */
@keyframes mm-view-in { from { opacity: 0; } to { opacity: 1; } }   /* opacity only: a transform would re-anchor fixed children (the chat composer) */
.view.active { animation: mm-view-in 180ms var(--ease-out, ease-out); }
@media (prefers-reduced-motion: reduce) { .view.active { animation: none; } }
/* The status line gets its own full-width row above the live clock, so neither is ever squeezed out. */
.ov-head { flex-wrap: wrap; justify-content: flex-end; row-gap: var(--space-2); }
.ov-status { flex: 1 0 100%; min-width: 0; }
.ov-status b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-live { flex: none; }

/* AI answer types (design spec 8.4): a quiet label above the answer, and market status rows from status_cards. */
.ans-kind { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border-radius: 999px; font: 700 10.5px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-hi); background: rgba(201, 162, 75, 0.10); }
.ans-kind.ans-system { color: var(--accent); background: rgba(111, 167, 126, 0.12); }
.ans-kind.ans-unavailable { color: var(--warn); background: rgba(207, 139, 62, 0.12); }
.ans-kind.ans-rule { color: var(--text); background: var(--surface-solid); }
.ans-status { display: grid; gap: 6px; margin-top: var(--space-2); }
.ans-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); }
.ans-card .ans-label { color: var(--text-dim); font-size: 12.5px; }
.ans-card .ans-price { margin-left: auto; }
.ans-card small { flex-basis: 100%; color: var(--text-faint); font-size: 11px; }

/* Page areas (design spec 12-14): one segmented tab row; only the chosen area's blocks show. */
.pg-tabs { display: flex; gap: 4px; margin: 0 0 var(--space-3); padding: 3px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface);
  overflow-x: auto; scrollbar-width: none; }
.pg-tabs::-webkit-scrollbar { display: none; }
.pg-tabs button { flex: 1 0 auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--text-dim); font: 600 12.5px var(--font-ui); white-space: nowrap; cursor: pointer; }
.pg-tabs button[aria-selected="true"] { background: var(--surface-solid); color: var(--brand-hi); box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.35); }
.pg-off { display: none !important; }
.pg-tabs[hidden], .pg-tabs button[hidden] { display: none; }


/* Owner conversation browser: native modal focus/escape handling; mobile sheet. */
.chat-history-open { min-height: 44px; padding: 6px 10px; color: var(--brand-hi); background: none; border: 1px solid var(--border-soft); border-radius: 10px; cursor: pointer; }
.chat-history-dialog { box-sizing: border-box; width: min(520px, calc(100% - 24px)); max-height: 80dvh; padding: 20px; border: 1px solid var(--border-soft); border-radius: 16px; color: var(--text); background: var(--surface-solid, #15120c); }
.chat-history-dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); }
.chat-history-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.chat-history-dialog h2 { margin: 0; font-size: 18px; }
.chat-history-dialog label { display: grid; gap: 8px; color: var(--text-dim); font-size: 13px; }
.chat-history-dialog input { width: 100%; box-sizing: border-box; min-height: 44px; }
.history-room { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; gap: 12px; padding: 14px 4px; min-height: 56px; border: 0; border-bottom: 1px solid var(--border-soft); background: none; color: var(--text); cursor: pointer; }
.history-room span:first-child { display: grid; gap: 4px; min-width: 0; }
.history-room b { overflow-wrap: anywhere; }
.history-room small { color: var(--text-dim); }
.history-room[aria-current] { color: var(--brand-hi); }
.msg-copy { min-width: 44px; min-height: 44px; }
.pg-tabs button { min-height: 44px; }
@media (max-width: 480px) { .chat-room-picker { display: none; } .chat-status { display: none; } }
.chat-history-dialog input { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.chat-history-dialog input::placeholder { color: var(--text-faint); }
@media (max-width: 480px) {
  .owner-body .chat-context .chat-status, .owner-body .chat-context .chat-room-picker { display: none; }
  .owner-body .chat-context > div { flex: 1; min-width: 0; }
  .owner-body .chat-context .chat-history-open { flex: none; }
}
/* Markets: one instrument workspace; one chart and explicit data states. */
#markets-list { gap: 16px; }
#markets-list > .wins-strip-slot { display: none; }
.market-workspace-heading { grid-column: 1 / -1; padding: 0 0 12px; margin: 0; align-items: center; }
.market-select-label { display: grid; gap: 5px; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
#markets-symbol-select { min-height: 44px; max-width: 100%; padding: 8px 34px 8px 12px; border: 1px solid var(--border-soft); border-radius: 10px; color: var(--text); background: var(--surface); font-size: 16px; text-transform: none; letter-spacing: 0; }
.market-browser { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); padding: 12px; }
.market-browser summary { cursor: pointer; min-height: 44px; color: var(--brand-hi); font-size: 14px; font-weight: 600; }
.market-browser summary span { display: block; margin: 6px 0; color: var(--text-faint); font-size: 11px; font-weight: 400; }
.market-search-label { display: block; margin: 8px 0; }
#markets-search { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px; border-radius: 9px; border: 1px solid var(--border-soft); color: var(--text); background: var(--bg); }
.market-browser .category-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.market-browser .category-tab { padding: 7px 10px; min-height: 36px; flex: none; font-size: 12px; }
.market-browser .markets-list-rows { display: grid; grid-template-columns: 1fr; overflow: visible; padding: 4px 0 0; gap: 4px; }
.market-browser .market-row { width: 100%; min-height: 60px; border-radius: 9px; border: 1px solid transparent; background: transparent; }
.market-browser .market-row.selected { border-color: var(--brand); background: var(--brand-soft); }
.market-browser .mr-name { font-size: 14px; }
.market-browser .mr-sub { font-size: 11px; }
.market-browser .market-quote-value { font-size: 13px; }
#markets-detail { min-width: 0; margin: 0; padding: 14px; }
.markets-detail-head > div { display: grid; gap: 4px; }
.markets-detail-head .chart-instrument { color: var(--text); font-size: 20px; font-weight: 750; }
#markets-detail .chart-canvas-wrap { height: clamp(300px, 52dvh, 640px); }
#markets-detail .chart-timeframes { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 14px; }
#markets-detail .chart-tf { min-height: 44px; }
#markets-detail .btn-row { display: flex; justify-content: flex-end; }
#markets-list #mk-setups { grid-column: 1 / -1; margin: 0; }
.market-chart-focus #markets-detail { position: fixed; inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); z-index: 200; display: flex; flex-direction: column; background: var(--bg); overflow: auto; }
.market-chart-focus #markets-detail-chart { flex: 1; min-height: 0; }
.market-chart-focus #markets-detail .chart-canvas-wrap { height: calc(100dvh - 230px); min-height: 180px; }
@media (min-width: 900px) { #markets-list { grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; } .market-browser { grid-column: 1; grid-row: 2; } #markets-detail { grid-column: 2; grid-row: 2; } #markets-list #mk-setups { grid-row: 3; } }
@media (max-width: 899px) { #markets-list { display: flex; flex-direction: column; gap: 12px; } #markets-detail .chart-canvas-wrap { height: clamp(260px, 44dvh, 440px); } .market-browser summary { min-height: 36px; } }
/* Conversation: the shared pinned app header is the only header. */
.chat-context, .chat-context.chat-hero, .chat-context.chat-utility { display: none; }
.chat-header-actions { display: none; align-items: center; gap: 6px; }
body[data-view="chat"] .chat-header-actions { display: flex; }
body[data-view="chat"] #mode-badge, body[data-view="chat"] #profile-btn, body[data-view="chat"] #notif-btn { display: none; }
.chat-header-actions .chat-new { flex: none; width: 40px; height: 40px; min-height: 40px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); color: var(--brand-hi); }
.chat-header-actions .chat-history-open { min-height: 40px; font-size: 12px; }
#chat-view .welcome-screen { max-width: 540px; width: 100%; margin-inline: auto; padding: 28px 16px; }
#chat-view .welcome-title { font-size: clamp(22px, 4vw, 30px); text-transform: none; letter-spacing: -.03em; line-height: 1.2; }
#chat-view .welcome-sub { font-size: 14px; line-height: 1.6; margin-top: 12px; }
#chat-view .welcome-chips { gap: 8px; }
#chat-view .welcome-chips .chip { min-height: 52px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; font-weight: 500; }
#chat-view .bubble { font-size: 15px; line-height: 1.65; border-radius: 14px; box-shadow: none; }
#chat-view .msg.user .bubble, #chat-view .message.user .bubble, #chat-view .bubble.user { background: var(--surface-2); border-color: rgba(255,255,255,.08); color: var(--text); }
#chat-view .msg.assistant .bubble { background: var(--surface); border: 1px solid var(--border-soft); }
#chat-view #chat-input-bar { border-radius: 16px; border: 1px solid var(--border-soft); background: var(--surface); margin: 8px 12px 12px; padding: 8px; }
#chat-view #chat-text { border: 0; border-radius: 10px; background: transparent; font-size: 16px; line-height: 1.5; padding: 10px; }
#chat-view .send-btn { border-radius: 12px; }
#chat-view .msg-row.assistant .bubble { background: var(--surface); border: 1px solid var(--border-soft); padding: 12px 16px; }
#chat-view .msg-row.user .bubble { background: var(--surface-2); border: 1px solid rgba(255,255,255,.08); color: var(--text); padding: 10px 16px; }
#chat-view .msg-avatar img { border-radius: 9px; }
#chat-view .msg-meta { font-size: 11px; gap: 8px; }
#chat-view .msg-row { margin-block: 16px; }
.market-setup-title { margin: 16px 0 6px; font-size: 13px; color: var(--brand-hi); text-transform: uppercase; letter-spacing: .08em; }
#markets-detail .market-scan-line { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
#markets-detail .chart-state-inner { padding: 16px; }
#markets-detail .lwc-mount { min-height: 0; height: 100%; }
#markets-detail .btn-row { flex-wrap: wrap; gap: 8px; }
body[data-view="chat"] #topbar .brand-wordmark { display: none; }
body[data-view="chat"] #topbar .brand-tagline { font-size: 15px; color: var(--text); }

/* Owner-approved solid material, using the existing Mr Mhor palette unchanged. */
:root { --glass-blur:none; --glass-chrome:var(--chrome); --glass-sheet:var(--surface-solid); --panel-shadow:0 3px 12px rgba(0,0,0,.18); }
#topbar,#bottom-nav,.public-header { background:var(--chrome); backdrop-filter:none; -webkit-backdrop-filter:none; }
#topbar::after { display:none; }
.card,.owner-data-panel,.t2-panel,.t2-card,.mn-card,.se-card,.an-pair,.rev-card,.cu-card,.tr-card,.market-browser,#markets-detail,.su-card,.t2-profile,.t2-menu-list,.public-feature-card,.public-flow-card,.install-device-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:var(--panel-shadow); backdrop-filter:none; -webkit-backdrop-filter:none; }
.owner-data-panel .owner-data-panel,.owner-data-panel .card,.card .card { background:transparent; border:0; box-shadow:none; }
.btn.primary,.public-btn-gold,.topbar-subscribe { background:var(--brand); color:var(--on-brand); box-shadow:0 2px 5px rgba(0,0,0,.2); border-radius:8px; }
.btn.primary:hover { box-shadow:0 3px 8px rgba(0,0,0,.25); }
.ov-insight,.su-featured,.su-locked { background:var(--surface-2); box-shadow:var(--panel-shadow); }
.ov-insight-mark,.su-status i { box-shadow:none; }
.pg-tabs,.market-mode-tabs { background:var(--surface); border:1px solid var(--border); border-radius:9px; padding:4px; }
.market-mode-tabs { display:flex; position:sticky; top:0; z-index:8; margin:0 0 14px; gap:4px; }
.market-mode-tabs button { flex:1; border:0; border-radius:6px; min-height:44px; color:var(--text-dim); background:transparent; font:650 14px var(--font-ui); cursor:pointer; }
.market-mode-tabs button[aria-selected=true],.pg-tabs button[aria-selected=true] { color:var(--text); background:var(--surface-solid); box-shadow:0 1px 3px rgba(0,0,0,.22); }
#markets-list { display:block; }
.markets-chart-workspace { display:grid; grid-template-columns:250px minmax(0,1fr); gap:14px; }
.markets-chart-workspace > .market-workspace-heading { grid-column:1/-1; }
.markets-chart-workspace > .market-browser { grid-column:1; grid-row:2; }
.markets-chart-workspace > #markets-detail { grid-column:2; grid-row:2; }
.markets-chart-workspace[hidden],#markets-pane-setups[hidden] { display:none; }
#markets-pane-setups { min-width:0; }
.setup-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.setup-toolbar label:first-child { flex:1 1 150px; min-width:0; }
.setup-toolbar label:last-child { flex:0 0 150px; }
.setup-toolbar input,.setup-toolbar select { width:100%; box-sizing:border-box; min-height:44px; padding:8px 10px; background:var(--surface); border:1px solid var(--border); border-radius:8px; color:var(--text); }
.setup-note,.setup-count { color:var(--text-dim); font-size:13px; line-height:1.6; margin:8px 0 12px; }
.setup-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.setup-record { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px; box-shadow:var(--panel-shadow); min-width:0; }
.setup-record summary { cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:8px; list-style:none; min-height:44px; }
.setup-record summary::-webkit-details-marker { display:none; }
.setup-record summary b { font-size:16px; }
.setup-record summary small { display:block; margin-top:5px; color:var(--text-dim); font-size:12px; }
.setup-levels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:14px; font-size:12px; }
.setup-levels b { display:block; font-size:13px; font-variant-numeric:tabular-nums; }
.setup-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:16px 0; color:var(--text-dim); font-size:13px; }
.chart-style-label { display:flex; align-items:center; justify-content:flex-end; gap:8px; color:var(--text-dim); font-size:12px; }
.chart-style-select { min-height:44px; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:7px; padding:6px 8px; }
body[data-screen=secondary] #topbar .brand-wordmark { display:none; }
body[data-screen=secondary] #topbar .brand-tagline { white-space:normal; line-height:1.2; font-size:13px; }
.owner-section-actions { padding:8px 0; gap:8px; }
.owner-data-row { min-height:40px; align-items:start; }
.owner-inline-form { gap:12px; }
.owner-inline-form input,.owner-inline-form select { min-height:44px; border-radius:7px; }
.status-drawer,.t2-share-screen,.chat-history-dialog,.analysis-panel .ap-body { background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:var(--panel-shadow); }
.chat-history-dialog::backdrop { backdrop-filter:none; }
.public-page:not(.public-landing) { max-width:1040px; margin-inline:auto; }
.public-page p,.public-page li { line-height:1.75; }
.public-auth-card,.login-card,.public-card,.access-card,.auth-card,#passkey-dialog { background:var(--surface); border:1px solid var(--border); box-shadow:var(--panel-shadow); backdrop-filter:none; -webkit-backdrop-filter:none; border-radius:10px; }
.public-body input,.public-body select,.public-body textarea { min-height:46px; border-radius:8px; }
.category-tabs .category-tab,.rev-tabs .rev-tab,.quick-action-row .chip { background:var(--surface-2); border:1px solid var(--border-soft); border-radius:7px; box-shadow:none; }
.category-tabs .category-tab.active,.rev-tabs .rev-tab.active { background:var(--surface-solid); color:var(--brand-hi); border-color:var(--line-gold); }
.page-section-index { display:flex; align-items:center; gap:12px; margin:0 0 16px; color:var(--text-dim); font-size:12px; }
.page-section-index select { flex:1; min-width:0; min-height:44px; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:8px; padding:8px; }
.list-page-hidden { display:none!important; }
@media(max-width:899px) { .markets-chart-workspace { display:flex; flex-direction:column; gap:12px; } .markets-chart-workspace > .market-browser { display:none; } }
@media(max-width:650px) { .setup-results,.owner-data-grid { grid-template-columns:minmax(0,1fr); } .owner-section-actions { flex-wrap:wrap; } }
