/* ============================================================
 * 타이드퀀트 디자인 시스템
 * 토큰: 라이트(:root 기본) / 다크(media + data-theme 이중 정의)
 * ============================================================ */
:root {
  color-scheme: light;
  /* 지면 */
  --bg: #f2f6f4;
  --surface: #fdfefd;
  --surface-2: #ecf1ef;
  --surface-3: #e2eae7;
  /* 잉크 */
  --ink: #17211d;
  --ink-2: #48564f;
  --muted: #7b8781;
  /* 선 */
  --line: #d9e2dd;
  --line-soft: #e6ece9;
  /* 브랜드 */
  --accent: #0d6b70;
  --accent-hover: #0a575b;
  --accent-soft: rgba(13, 107, 112, 0.09);
  --on-accent: #ffffff;
  /* 한국 관례: 수익/매수 = 적, 손실/매도 = 청 */
  --gain: #bd3a34;
  --loss: #2b62b8;
  --gain-soft: rgba(189, 58, 52, 0.10);
  --loss-soft: rgba(43, 98, 184, 0.10);
  /* 공세/방어 모드 */
  --agg: #bd3a34;
  --def: #2b62b8;
  --agg-wash: rgba(189, 58, 52, 0.05);
  --def-wash: rgba(43, 98, 184, 0.055);
  /* 차트 시리즈 (검증 팔레트) */
  --series-1: #2a78d6;   /* 전략 라인 */
  --series-2: #eb6834;   /* 단순보유 라인 */
  --series-3: #1baf7a;   /* (예비) */
  /* 제공 전략 비교 색: 저수지=보라, 잔물결=파랑, 밀물=초록, 너울=빨강, 쓰나미=자홍 */
  --preset-reservoir: #703bb6;
  --preset-1: #2a78d6;
  --preset-2: #149a6b;
  --preset-3: #c93a33;
  --preset-4: #ad357e;
  /* 운영자 실험 프리셋(듀얼 3종) 비교 색 */
  --preset-ds1: #b8601a;
  --preset-ds2: #6d4fc4;
  --preset-ds3: #0e8a8a;
  /* 요금제 등급 색: 초보=파랑, 중수=초록, 고수=빨강 (프리셋 3색 계열, 흰 글자 대비 4.5:1 이상으로 약간 진하게) */
  --tier-free: #2570cc;
  --tier-pro: #108457;
  --tier-master: #c93a33;
  --on-tier: #ffffff;
  --chart-grid: #e3e9e6;
  --chart-axis: #8a948f;
  --chart-baseline: #c3cdc8;
  /* 상태 */
  --warn-bg: #fdf6e3;
  --warn-line: #e8d49a;
  --warn-ink: #7a5d0e;
  --good: #0c7a3c;
  --good-soft: rgba(12, 122, 60, 0.12);
  --bad: #d9403f;
  --bad-soft: rgba(217, 64, 63, 0.11);
  --shadow: 0 1px 2px rgba(23, 33, 29, 0.05), 0 6px 20px -12px rgba(23, 33, 29, 0.12);
  --shadow-pop: 0 4px 12px rgba(23, 33, 29, 0.08), 0 16px 40px -16px rgba(23, 33, 29, 0.22);
  --radius: 12px;
  --radius-s: 8px;
  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", "SF Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c1110;
    --surface: #151c1a;
    --surface-2: #1b2321;
    --surface-3: #222c29;
    --ink: #eaf1ee;
    --ink-2: #b4c0ba;
    --muted: #7f8b85;
    --line: #28322e;
    --line-soft: #1f2825;
    --accent: #3aacb1;
    --accent-hover: #5cc3c8;
    --accent-soft: rgba(58, 172, 177, 0.13);
    --on-accent: #06282a;
    --gain: #e0655e;
    --loss: #6f9ce8;
    --gain-soft: rgba(224, 101, 94, 0.14);
    --loss-soft: rgba(111, 156, 232, 0.14);
    --agg: #e0655e;
    --def: #6f9ce8;
    --agg-wash: rgba(224, 101, 94, 0.07);
    --def-wash: rgba(111, 156, 232, 0.08);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --preset-reservoir: #bc96f3;
    --preset-1: #3987e5;
    --preset-2: #2ec48e;
    --preset-3: #e0655e;
    --preset-4: #ed8bc7;
    --preset-ds1: #e6944a;
    --preset-ds2: #a596e6;
    --preset-ds3: #4fc3c3;
    --tier-free: #3987e5;
    --tier-pro: #2ec48e;
    --tier-master: #e0655e;
    --on-tier: #0c1110;
    --chart-grid: #242e2a;
    --chart-axis: #8a948f;
    --chart-baseline: #39433f;
    --warn-bg: #2c2611;
    --warn-line: #57491c;
    --warn-ink: #e8c96a;
    --good: #3dbd72;
    --good-soft: rgba(61, 189, 114, 0.16);
    --bad: #ef6b6a;
    --bad-soft: rgba(239, 107, 106, 0.15);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -14px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.4), 0 20px 48px -16px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1110;
  --surface: #151c1a;
  --surface-2: #1b2321;
  --surface-3: #222c29;
  --ink: #eaf1ee;
  --ink-2: #b4c0ba;
  --muted: #7f8b85;
  --line: #28322e;
  --line-soft: #1f2825;
  --accent: #3aacb1;
  --accent-hover: #5cc3c8;
  --accent-soft: rgba(58, 172, 177, 0.13);
  --on-accent: #06282a;
  --gain: #e0655e;
  --loss: #6f9ce8;
  --gain-soft: rgba(224, 101, 94, 0.14);
  --loss-soft: rgba(111, 156, 232, 0.14);
  --agg: #e0655e;
  --def: #6f9ce8;
  --agg-wash: rgba(224, 101, 94, 0.07);
  --def-wash: rgba(111, 156, 232, 0.08);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --preset-reservoir: #bc96f3;
  --preset-1: #3987e5;
  --preset-2: #2ec48e;
  --preset-3: #e0655e;
  --preset-4: #ed8bc7;
  --preset-ds1: #e6944a;
  --preset-ds2: #a596e6;
  --preset-ds3: #4fc3c3;
  --tier-free: #3987e5;
  --tier-pro: #2ec48e;
  --tier-master: #e0655e;
  --on-tier: #0c1110;
  --chart-grid: #242e2a;
  --chart-axis: #8a948f;
  --chart-baseline: #39433f;
  --warn-bg: #2c2611;
  --warn-line: #57491c;
  --warn-ink: #e8c96a;
  --good: #3dbd72;
  --good-soft: rgba(61, 189, 114, 0.16);
  --bad: #ef6b6a;
  --bad-soft: rgba(239, 107, 106, 0.15);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -14px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.4), 0 20px 48px -16px rgba(0, 0, 0, 0.6);
}

/* ---------- 베이스 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; text-wrap: balance; }
p { margin: 0 0 0.7em; }
a { color: var(--accent); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.wrap { max-width: 1760px; margin: 0 auto; padding: 0 26px 80px; }

/* ---------- 헤더 ---------- */
.app-header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 0 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-tag { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.header-side { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-member-summary {display:flex;align-items:center;flex-wrap:wrap;gap:2px;flex:0 0 320px;width:320px;min-width:0;max-width:100%;padding:3px 7px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink-2);box-sizing:border-box;position:relative}
.header-member-summary[hidden] {display:none!important}
.hms-link,.hms-refresh {flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;min-height:22px;border:0;background:transparent;color:var(--accent);font:inherit;font-size:17px;line-height:1;padding:0;cursor:pointer}
.hms-link {font-weight:700}
.hms-refresh {color:var(--muted);white-space:nowrap}
.hms-refresh:disabled {cursor:wait;opacity:.65}
.hms-link:hover,.hms-refresh:hover {text-decoration:underline}
.hms-counts {display:flex;align-items:center;gap:6px;flex:1 1 0;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;white-space:nowrap}
.hms-counts>div {display:inline-flex;align-items:baseline;gap:4px;flex:none}
.hms-counts span {font-size:10.5px;color:var(--muted);white-space:nowrap}
.hms-counts strong {font-size:12.5px;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
.hms-revenue{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 7px;flex:1 0 100%;min-width:0;padding-top:2px;border-top:1px solid var(--line);line-height:1.4}
.hms-revenue>span{font-size:10.5px;color:var(--muted);white-space:nowrap}
.hms-revenue>strong{color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.hms-revenue>strong>small{font-size:10px;margin-left:2px;font-weight:400;color:var(--muted)}
.hms-revenue-note{font-size:10px;color:var(--muted);overflow-wrap:anywhere}
@media(max-width:760px){[data-op-card="strategy-interest"] .tbl-wrap{overflow-x:auto}[data-op-card="strategy-interest"] .tbl-wrap .tbl{min-width:570px}[data-op-card="strategy-interest"] .tbl th:first-child,[data-op-card="strategy-interest"] .tbl td:first-child{white-space:nowrap}}
.hms-error {flex:none;font-size:10px;white-space:nowrap;color:var(--warn-ink)}
.hms-sr {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.telegram-notice {display:flex;align-items:baseline;gap:6px 12px;flex-wrap:wrap;font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0;overflow-wrap:anywhere}
.telegram-notice a {color:var(--accent);font-weight:700;text-underline-offset:3px}
.telegram-compact {margin:5px 0 10px;font-size:11.5px}
.threads-logo {width:1.15em;height:1.15em;vertical-align:-.18em;flex:none}
.home-beta {margin-top:14px}
.home-beta-summary {display:flex;flex-direction:column;align-items:flex-start;gap:8px;cursor:pointer;list-style:none}
.home-beta-summary::-webkit-details-marker {display:none}
.home-beta-heading {display:flex;align-items:center;min-width:0}
.home-beta-heading b {min-width:0;overflow-wrap:anywhere;line-height:1.6}
.home-beta-title-end {white-space:nowrap}
.home-beta-controls {display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;max-width:100%}
.home-beta-controls .btn {flex:none}
.home-beta-channel {color:var(--accent);font-size:12px;font-weight:700;line-height:1.6;text-underline-offset:3px}
.home-beta-channel:focus-visible {outline:2px solid var(--accent);outline-offset:4px;border-radius:2px}
.home-beta-copy {margin-top:12px;font-size:13px;color:var(--ink-2);line-height:1.7;overflow-wrap:anywhere}
.home-beta-copy p {margin:0 0 12px}
.home-beta-copy p:last-child {margin-bottom:0}
#home-beta-content>.fhint {margin:10px 0 0}
.home-feat-head b {word-break:keep-all}
.security-activity {display:grid;gap:12px;min-width:0}
.security-activity[hidden] {display:none!important}
.security-activity p,.security-activity summary {overflow-wrap:anywhere;line-height:1.6}
.sa-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.sa-heading .card-title {margin:0}
.sa-window {margin:6px 0 12px}
.sa-filters {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.sa-filter {display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);text-align:left;cursor:pointer;font:inherit}
.sa-filter span {width:100%;font-size:12px;color:var(--ink-2)}
.sa-filter strong {font-size:23px;line-height:1.25;font-variant-numeric:tabular-nums}
.sa-filter small {color:var(--muted);font-size:11px}
.sa-filter.on {border-color:var(--accent);background:var(--accent-soft)}
.sa-filter:focus-visible,.sa-event>summary:focus-visible {outline:2px solid var(--accent);outline-offset:2px}
.sa-tools {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:12px}
.sa-tools label {color:var(--ink-2)}
.sa-tools input {width:260px;max-width:100%;min-width:0;font-size:12px}
.sa-tools .fhint {margin:0 0 0 auto}
.sa-results {overflow:hidden;min-width:0}
.sa-review-tools {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.sa-review-tools .fhint {margin:0;flex:1;min-width:180px}
.sa-record {display:grid;grid-template-columns:100px minmax(0,1fr);border-bottom:1px solid var(--line-soft)}
.sa-record .sa-event {border-bottom:0}
.sa-check {display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 6px;font-size:11px;color:var(--ink-2);cursor:pointer;align-self:start;min-height:54px}
.sa-check input {width:16px;height:16px;accent-color:var(--accent);flex:none}
.sa-check span {white-space:nowrap}
.sa-reviewed .sa-check {color:var(--accent)}
.sa-reviewed .sa-event>summary {background:var(--surface-2)}
.sa-event {border-bottom:1px solid var(--line-soft);min-width:0}
.sa-event>summary {display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(145px,1.3fr) 80px 110px 14px;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;list-style:none;font-size:12px}
.sa-event>summary::-webkit-details-marker {display:none}
.sa-event>summary:hover,.sa-event[open]>summary {background:var(--surface-2)}
.sa-kind {font-weight:700;line-height:1.5;border-left:3px solid var(--muted);padding-left:8px}
.sa-kind-access {border-color:var(--def)}
.sa-kind-backtest {border-color:var(--accent)}
.sa-kind-other {border-color:var(--warn-ink)}
.sa-person {overflow-wrap:anywhere;min-width:0}
.sa-person b,.sa-person small {display:block;line-height:1.5}
.sa-person small {color:var(--muted);font-size:11px}
.sa-count {font-weight:800;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.sa-when {color:var(--muted);font-size:11px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.sa-chevron {color:var(--muted);text-align:center;transition:transform .15s}
.sa-event[open] .sa-chevron {transform:rotate(180deg)}
.sa-detail {padding:0 16px 14px 27px;border-left:3px solid var(--accent);background:var(--surface-2);font-size:13px}
.sa-detail p {margin:0;padding-top:9px}
.sa-detail .btn {margin-top:10px}
.sa-meta {font-size:11px;color:var(--muted)}
.sa-empty {padding:20px 16px;margin:0;font-size:13px;color:var(--ink-2)}
.sa-pagination {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 14px;font-size:12px;color:var(--muted)}
.sa-pagination>div {display:flex;align-items:center;gap:10px}
.sa-pagination .btn {min-height:32px}
.sa-help>summary,.admin-metrics-help>summary {cursor:pointer;font-size:12px;color:var(--ink-2)}
.sa-help p {margin:8px 0 0}
.admin-nav button {position:relative;display:inline-flex;align-items:center;gap:6px}
.admin-alert-dot {display:inline-block;flex:none;width:7px;height:7px;border-radius:50%;background:var(--bad);box-shadow:0 0 0 2px var(--surface)}
.admin-alert-dot.admin-alert-unknown {background:var(--warn-ink)}
.admin-alert-status {margin:-5px 0 12px}
.admin-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:14px}
.admin-metric {min-width:0}
.admin-metric-label {font-size:12px;color:var(--ink-2);margin-bottom:5px}
.admin-metric-value {display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.admin-metric-value strong {font-size:24px;line-height:1.25;letter-spacing:-.5px}
.admin-metric-value>span {font-size:12px}
.admin-metric-value .admin-delta {font-size:11px;font-weight:700;padding:2px 5px;border-radius:4px;white-space:nowrap}
.admin-delta-up {color:var(--good);background:var(--good-soft)}
.admin-delta-down {color:var(--bad);background:var(--bad-soft)}
.admin-delta-flat,.admin-delta-pending {color:var(--muted);background:var(--surface-2)}
.admin-metric-note {font-size:10px;color:var(--muted);margin-top:6px;line-height:1.5}
.admin-metrics-help {margin-top:13px;padding-top:10px;border-top:1px solid var(--line-soft)}
.admin-metrics-help p {margin:8px 0 0}
@media(max-width:700px){
  .admin-metrics {grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 12px}
  .admin-metric-value strong {font-size:23px}
  .sa-filters {gap:6px}
  .sa-filter {padding:9px 8px}
  .sa-filter span {font-size:11px}
  .sa-filter strong {font-size:21px}
  .sa-tools input {flex:1;width:auto}
  #sa-search-form {display:grid;grid-template-columns:auto minmax(0,1fr) auto}
  #sa-reviewed {grid-column:2 / 4;width:100%}
  #sa-search {width:100%;min-width:0}
  .sa-tools select {max-width:100%;min-height:34px}
  .sa-record {grid-template-columns:minmax(0,1fr)}
  .sa-check {justify-content:flex-start;padding:9px 12px 0;min-height:30px}
  .sa-tools .fhint {width:100%;margin:0}
  .sa-event>summary {grid-template-columns:minmax(0,1fr) 68px 14px;gap:4px 8px;padding:10px 12px}
  .sa-kind {grid-column:1;grid-row:1;font-size:11px}
  .sa-person {grid-column:1;grid-row:2;font-size:12px;padding-left:11px}
  .sa-count {grid-column:2;grid-row:1;font-size:12px}
  .sa-when {grid-column:2;grid-row:2;font-size:10px;white-space:normal}
  .sa-chevron {grid-column:3;grid-row:1 / span 2}
  .sa-detail {padding:0 12px 12px 20px}
}
.data-badge {
  font-size: 11.5px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px;
  display: inline-flex; align-items: center; gap: 7px; min-width:0;max-width:100%;box-sizing:border-box;
}
.data-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.data-badge.stale .dot { background: var(--warn-ink); }
.data-badge .db-lines { display: flex; flex-direction: column; gap: 1px; min-width:0;overflow-x:auto;overflow-y:hidden;padding-block:1px;overscroll-behavior-x:contain;scrollbar-width:thin; }
.data-badge .db-lines > span { line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-badge .db-unavailable {color:var(--muted)}

/* ---------- 내비게이션 ---------- */
.nav {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line);
  margin-bottom: 22px; overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 11px 16px 12px; font-size: 15px; font-weight: 500; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color 0.15s;
}
.nav button:hover { color: var(--ink-2); }
.nav button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.nav button .nav-label-compact { display:none; }
@media (max-width: 700px) {
  .nav {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;overflow:visible;padding-bottom:3px;}
  #nav button {min-width:0;min-height:38px;width:100%;justify-self:stretch;text-align:center;padding:5px 1px;font-size:clamp(10px,2.8vw,13px);line-height:1.2;margin-bottom:0;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;}
  #nav button .ndot {margin:0 0 3px 2px;width:5px;height:5px;}
  #nav button[data-tab="trading-legacy"] {white-space:nowrap;overflow-wrap:normal;}
  #nav button .nav-label-full {display:none;}
  #nav button .nav-label-compact {display:inline;}
  .nav button[data-tab="notices"] {grid-row:2;grid-column:1;}
  .nav button[data-tab="guide"] {grid-row:2;grid-column:2;}
  .nav button[data-tab="legal"] {grid-row:2;grid-column:3;}
  .nav button[data-tab="admin"] {grid-row:2;grid-column:4;}
}

/* ---------- 패널/카드 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.home-feat-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.home-feat-head>b { min-width:0; }
.detail-toggle { flex:none; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:var(--surface); cursor:pointer; font:inherit; font-size:18px; padding:0; }
.detail-toggle:hover,.detail-toggle[aria-expanded="true"] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.detail-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.home-feat .home-feat-summary { margin:6px 0 0; font-size:13px; line-height:1.55; color:var(--ink-2); }
.detail-panel { margin-top:10px; padding-top:10px; border-top:1px solid var(--line-soft); color:var(--muted); font-size:12.5px; line-height:1.65; overflow-wrap:anywhere; }
.detail-panel[hidden] { display:none; }
.home-feat .detail-panel { grid-column:1/-1; min-width:0; width:100%; box-sizing:border-box; word-break:keep-all; }
.account-selection-list { min-width:0; border:0; padding:0; margin:14px 0; }
.account-selection-row { display:flex; align-items:center; gap:12px; padding:14px; margin:8px 0; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.account-selection-row>input { flex:none; width:18px; height:18px; margin:0; accent-color:var(--accent); }
.account-selection-row>span { display:flex; flex-direction:column; gap:4px; min-width:0; overflow-wrap:anywhere; }
.account-selection-meta,.account-selection-row small { color:var(--muted); font-size:12px; line-height:1.5; }
.account-selection-row:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.account-selection-row.is-disabled { opacity:.6; cursor:default; }
.downgrade-selection h4 { margin:20px 0 8px; }
.downgrade-selection>p { margin:8px 0; line-height:1.6; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* ---------- 백테스트 레이아웃 ---------- */
.layout-bt { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-col { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.results-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) {
  .layout-bt { grid-template-columns: minmax(0, 1fr); }
  .settings-col { position: static; max-height: none; }
}

/* ---------- 폼 ---------- */
.fgroup { border-top: 1px solid var(--line-soft); padding: 13px 16px 15px; }
.fgroup:first-child { border-top: none; }
.fgroup-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.fgroup-title .mode-dot { width: 8px; height: 8px; border-radius: 50%; }
.frow { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; flex-wrap: wrap; }
.frow:last-child { margin-bottom: 0; }
.frow label { font-size: 13px; color: var(--ink-2); flex: 1 1 auto; min-width: 110px; white-space: nowrap; }
.frow .hint { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; white-space: normal; }
.fhint { font-size: 11.5px; color: var(--muted); }
.fhint-inline { font-size: 11px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
input[type="number"], input[type="text"], input[type="date"], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 6px 9px; min-height: 32px;
}
input[type="number"] { width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
input[type="number"].wide { width: 110px; }
select { padding-right: 26px; }
input:hover, select:hover { border-color: var(--muted); }
textarea { width: 100%; resize: vertical; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-s); padding: 3px; gap: 2px; }
.seg button {
  appearance: none; border: none; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle .tr {
  width: 36px; height: 21px; border-radius: 999px; background: var(--surface-3);
  transition: background 0.15s; flex: none;
}
.toggle .tr::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.toggle input:checked + .tr { background: var(--accent); }
.toggle input:checked + .tr::after { transform: translateX(15px); }
.toggle input:focus-visible + .tr { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 티어 가중치 에디터 */
.wgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 6px; }
.wgrid .wcell { display: flex; flex-direction: column; gap: 2px; }
.wgrid .wcell span { font-size: 10.5px; color: var(--muted); text-align: center; }
.wgrid input { width: 100%; padding: 4px 4px; font-size: 12.5px; min-height: 28px; }
.wsum { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.wsum.bad { color: var(--gain); font-weight: 600; }

/* 프리셋 칩 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  appearance: none; cursor: pointer; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px; transition: all 0.13s; white-space: nowrap;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

/* ---------- 버튼 ---------- */
.btn {
  appearance: none; cursor: pointer; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-s); padding: 8px 14px; min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.13s; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--gain); border-color: var(--gain-soft); }
.btn-danger:hover { background: var(--gain-soft); border-color: var(--gain); }
.btn-ghost { border-color: transparent; background: none; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-sm { font-size: 12.5px; padding: 5px 10px; min-height: 30px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 스탯 타일 ---------- */
.tiles { display: grid; gap: 6px; }
.tiles + .tiles { margin-top: 6px; }
.tiles-r1 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.tiles-r2 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* 행 고정 배치가 좁아지면 자동 랩으로 폴백 (글자 잘림 방지) */
@media (max-width: 1480px) {
  .tiles-r1, .tiles-r2 { grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); }
  .tiles + .tiles { margin-top: 6px; }
}
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px 7px; min-width: 0; }
.tile .tl { font-size: 10px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.tile .tv { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.tile .td { font-size: 9.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.tile .tv.gain, .gain-t { color: var(--gain); }
.tile .tv.loss, .loss-t { color: var(--loss); }
.tile.tile-hero { background: linear-gradient(135deg, var(--accent-soft), transparent 65%), var(--surface); }
.tile.tile-hero .tv { font-size: 13.5px; }

/* ---------- 차트 ---------- */
.chart-card { padding: 15px 16px 8px; }
.chart-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-head .card-title { flex: 1; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.legend .sw { width: 14px; height: 3px; border-radius: 2px; }
.legend .swb { width: 10px; height: 10px; border-radius: 3px; }
.tq-chart { position: relative; width: 100%; }
.tq-chart svg { display: block; width: 100%; height: auto; }
.tq-grid { stroke: var(--chart-grid); stroke-width: 1; }
.tq-baseline { stroke: var(--chart-baseline); stroke-width: 1; }
.tq-axis { fill: var(--chart-axis); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.tq-endlabel { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tq-crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: none; opacity: 0.55; }
.tq-dot { stroke: var(--surface); stroke-width: 2; }
.tq-band-agg { fill: var(--agg-wash); }
.tq-band-def { fill: var(--def-wash); }
.tq-bar { transition: opacity 0.1s; }
.tq-bar-gain { fill: var(--gain); }
.tq-bar-loss { fill: var(--loss); }
.tq-bar-open { fill: var(--muted); }
.tq-bar-hover { opacity: 0.75; }
.tq-bar-sel { stroke: var(--ink); stroke-width: 1.5; }
.tq-tooltip {
  display: none; position: absolute; z-index: 30; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  box-shadow: var(--shadow-pop); padding: 8px 11px; font-size: 12px; line-height: 1.5;
  min-width: 130px; color: var(--ink-2);
}
.tq-tooltip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tq-tooltip .tt-date { font-weight: 700; color: var(--ink); margin-bottom: 2px; }

/* ---------- 칩/배지 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 2.5px 9px; white-space: nowrap;
}
.chip-agg { background: var(--gain-soft); color: var(--agg); }
.chip-tsunami { background: color-mix(in srgb, var(--preset-4) 13%, var(--surface)); color: var(--preset-4); }
.chip-reservoir { background: color-mix(in srgb, var(--preset-reservoir) 12%, var(--surface)); color: var(--preset-reservoir); }
.chip-def { background: var(--loss-soft); color: var(--def); }
.chip-auto { background: var(--accent-soft); color: var(--accent); }
.chip-neutral { background: var(--surface-2); color: var(--ink-2); }
.chip-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }

/* ---------- 테이블 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: right; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td {
  text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2);
}
.tbl td b { color: var(--ink); }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .gain-t { color: var(--gain); }
.tbl .loss-t { color: var(--loss); }
.trade-history-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.trade-history-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.trade-history-table { width: max-content; min-width: 100%; }
.trade-history-table .history-strategy { text-align: left; white-space: nowrap; }
.trade-history-table .history-reason { min-width: 180px; max-width: 360px; text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 11.5px; color: var(--muted); }
.trade-history-hint,.history-strategy-note { margin: 6px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
/* 월별 수익률 매트릭스 (공개 4종, 운영자 실험 3종 · 왼쪽 테두리 = 프리셋 색) */
.mtx th, .mtx td { text-align: center; padding: 4px 4px; }
.mtx th.yr, .mtx td.yr { background: var(--surface-2); }
.mtx .mc { display: flex; flex-direction: column; gap: 2px; min-width: 52px; }
.mtx .mv { display: block; font-size: 11px; line-height: 1.4; padding: 0 4px; text-align: right; border-left: 3px solid var(--line); border-radius: 2px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.mtx .mv.preset-reservoir { border-left-color: var(--preset-reservoir); }
.mtx .mv.p1,.mtx .mv.preset-ripple { border-left-color: var(--preset-1); }
.mtx .mv.p2,.mtx .mv.preset-tide { border-left-color: var(--preset-2); }
.mtx .mv.p3,.mtx .mv.preset-swell { border-left-color: var(--preset-3); }
.mtx .mv.p4,.mtx .mv.preset-tsunami { border-left-color: var(--preset-4); }
.mtx .mv.p5,.mtx .mv.preset-ds-sub { border-left-color: var(--preset-ds1); }
.mtx .mv.p6,.mtx .mv.preset-ds-tank { border-left-color: var(--preset-ds2); }
.mtx .mv.p7,.mtx .mv.preset-ds-rocket { border-left-color: var(--preset-ds3); }
.mtx .mv.bh { border-left-color: var(--ink); }
.mtx .mv.gain-t { background: var(--gain-soft); }
.mtx .mv.loss-t { background: var(--loss-soft); }
.mtx td.yr .mv { font-weight: 700; }
/* 일별 매매 로그 */
.dlog { font-size: 11px; border-collapse: separate; border-spacing: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.dlog th, .dlog td { padding: 3px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dlog thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.dlog th.l, .dlog td.l { text-align: left; }
.dlog td.muted { color: var(--muted); }
.dlog tr.has-ev td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dlog tr.quiet td:first-child { color: var(--muted); }
.dlog .chip { font-size: 10.5px; padding: 1px 6px; }
/* Keep wide admin logs inside their card at every viewport width. */
#bt-card-log { min-width: 0; max-width: 100%; }
.dlog-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.admin-dlog-wrap { overflow: auto; max-height: 70vh; overscroll-behavior-x: contain; }
.admin-dlog-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }

/* ---------- 배너/토스트 ---------- */
.banner {
  border-radius: var(--radius-s); padding: 10px 14px; font-size: 13px;
  display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px;
}
.banner-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.banner .bicon { flex: none; margin-top: 1px; }
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(calc(100% + 40px)); pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 600;
  border-radius: 999px; padding: 10px 20px; box-shadow: var(--shadow-pop);
  transition: transform 0.25s ease; z-index: 100; max-width: min(90vw, 480px); text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- 트레이딩 ---------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.acct-card { display: flex; flex-direction: column; }
.acct-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.acct-name { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acct-body { padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.acct-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.acct-stats .k { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.acct-stats .v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-actions { display: flex; gap: 6px; padding: 0 16px 14px; flex-wrap: wrap; }
.acct-new {
  border: 1.5px dashed var(--line); border-radius: var(--radius); min-height: 170px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
  color: var(--muted); cursor: pointer; background: none; font-size: 14px; transition: all 0.15s;
}
.acct-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- 주문표 티켓 ---------- */
.order-preview { margin-top: 20px; min-width: 0; }
.order-preview-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.order-preview-heading h3 { margin: 0; color: var(--ink); font-size: 18px; }
.order-preview-heading p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.order-preview-controls { display: flex; gap: 8px; flex: none; }
.order-preview-controls .btn { min-width: 40px; min-height: 40px; font-size: 18px; }
.order-preview-disclosure { font-size: 14px; line-height: 1.7; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; color: var(--ink-2); }
.order-preview-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(720px, 65%); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 2px 0 14px; scrollbar-width: auto; scrollbar-color: var(--accent) var(--surface-2); }
.order-preview-rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.order-preview-card { position: relative; scroll-snap-align: start; overflow: hidden; min-width: 0; display: flex; flex-direction: column; box-shadow: none; }
.order-preview-card header { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-bottom: 1px dashed var(--line); }
.order-preview-index { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--accent); }
.order-preview-card h4 { margin: 0; font-size: 17px; color: var(--ink); }
.order-preview-card header p { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.order-preview-badge { margin-left: auto; white-space: nowrap; font-size: 13px; padding: 4px 8px; background: var(--surface-2); border-radius: 6px; color: var(--ink-2); }
.order-preview-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.order-preview-table caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.order-preview-table th { text-align: right; color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 1.5; background: var(--surface-2); padding: 12px 8px; }
.order-preview-table td { text-align: right; padding: 16px 8px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-preview-table th:first-child, .order-preview-table td:first-child { text-align: left; padding-left: 16px; width: 100px; }
.order-preview-table th:nth-child(2) { width: 55px; }
.order-preview-table th:nth-child(3) { width: 88px; }
.order-preview-table th:nth-child(4) { width: 165px; white-space: nowrap; }
.order-preview-table th:nth-child(5) { width: 115px; }
.trading-preview-action { display:flex;flex-wrap:wrap;gap:8px; }
.acct-readonly { border-style:dashed; }
.trial-candidates { max-height:320px;overflow:auto;display:grid;gap:8px;margin:12px 0; }
.trial-candidates label { display:flex;align-items:center;gap:8px; }
.order-preview-table th:last-child, .order-preview-table td:last-child { padding-right: 16px; }
.order-preview-type { display: inline-block; white-space: nowrap; font-family: var(--font); border-radius: 6px; padding: 5px 7px; font-size: 14px; font-weight: 700; }
.order-preview-note { margin: auto 0 0; padding: 16px 18px; font-size: 14px; line-height: 1.7; color: var(--ink-2); border-top: 1px solid var(--line-soft); }
.order-preview-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 16px; color: var(--ink-2); padding: 20px; text-align: center; }
.order-preview-empty > span { font-size: 28px; color: var(--muted); }
.order-preview-help { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin: 8px 0 0; }
.trading-preview-action { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.order-preview-modal { width: min(1100px, calc(100vw - 32px)); max-width: 1100px; }
.order-preview-modal .order-preview { margin-top: 0; }
.subscription-summary { margin: 14px 0 22px; padding: 18px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.subscription-summary h3 { margin-top: 0; }
.subscription-summary p, .subscription-summary li { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.subscription-summary strong { color: var(--ink); }
@media (max-width: 780px) {
  .order-preview-heading { gap: 8px; }
  .order-preview-heading h3 { font-size: 17px; }
  .order-preview-rail { grid-auto-columns: 100%; }
  .order-preview-card header { padding: 14px; gap: 8px; }
  .order-preview-index { font-size: 19px; }
  .order-preview-badge { font-size: 12px; padding: 4px 5px; }
  .order-preview-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .order-preview-table tbody, .order-preview-table tr { display: block; }
  .order-preview-table tr { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); padding: 12px 14px; gap: 14px 8px; border-bottom: 1px solid var(--line); }
  .order-preview-table td, .order-preview-table td:first-child, .order-preview-table td:last-child { display: block; padding: 0; width: auto; text-align: left; border: 0; }
  .order-preview-table td::before { content: attr(data-label); display: block; font: 500 14px/1.5 var(--font); color: var(--ink-2); margin-bottom: 5px; }
  .order-preview-table td:nth-child(4) { grid-column: 1 / -1; }
  .order-preview-table td:nth-child(4)::before { white-space: nowrap; }
  .order-preview-table td:last-child { grid-column: span 2; }
  .order-preview-note { padding: 14px; }
  .order-preview-modal { width: calc(100vw - 20px); }
}
.ticket { font-family: var(--mono); }
.ticket-head {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 13px 16px; border-bottom: 1px dashed var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.ticket-head .th-title { font-weight: 700; font-size: 14px; color: var(--ink); font-family: var(--font); }
.ticket-rows { padding: 6px 0; }
.ticket-rows-member { overflow-x: auto; }
.modal.member-sheet-modal { max-width: 760px; }
.ticket-rows-member .torder { display: grid; grid-template-columns: 80px 62px 92px 136px minmax(100px, 1fr); min-width: 550px; }
.ticket-rows-member .torder-head .oreason { display: block; }
.ticket-rows-member .torder .oreason { text-align: right; }
.ticket-rows-admin .torder { width: max-content; min-width: 100%; grid-template-columns: 80px 62px 92px 136px minmax(160px, max-content); }
.ticket-rows-admin .torder .oreason { white-space: nowrap; }
.ticket-rows-member.ticket-rows-netting .torder { width: 100%; min-width: 680px; grid-template-columns: 80px 62px 92px 136px minmax(220px, 1fr); align-items: start; }
.ticket-rows-netting .torder .oreason { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; text-align: left; line-height: 1.6; }
.ticket-rows-member { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.ticket-rows-member:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.member-sheet-scroll-hint { display: none; }
@media (max-width: 600px) { .member-sheet-scroll-hint { display: block; margin-top: 4px; } }
@media print { .ticket-rows-member { overflow: visible; } }
.torder {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.torder:last-child { border-bottom: none; }
.torder .oty {
  flex: none; font-family: var(--font); font-size: 11.5px; font-weight: 700;
  border-radius: 6px; padding: 3px 8px; min-width: 64px; text-align: center;
}
.oty-buy { background: var(--gain-soft); color: var(--gain); }
.oty-sell { background: var(--loss-soft); color: var(--loss); }
.oty-moc { background: var(--loss); color: var(--surface); }
.torder .oqty { min-width: 62px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.torder .oprice { min-width: 92px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.torder .opct { min-width: 104px; text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.torder .oreason { flex: 1; font-family: var(--font); font-size: 12px; color: var(--muted); text-align: right; min-width: 0; }
.torder-head { padding: 8px 16px 5px; border-bottom: 1px solid var(--line); font-family: var(--font); }
.torder-head span { font-size: 11px; font-weight: 600; color: var(--muted); }
.torder-head .oty { background: none; padding: 3px 0; }
.torder-head .opct, .torder-head .oreason { font-size: 11px; color: var(--muted); }
.ticket-note { padding: 8px 16px 12px; font-size: 12px; color: var(--muted); font-family: var(--font); }
.ticket-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-family: var(--font); font-size: 13.5px; }

/* ---------- 모달 ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(10, 16, 14, 0.5); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px 16px; overflow-y: auto;
}
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-pop); width: 100%; max-width: 560px;
}
.modal-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 16px 20px; max-height: 62vh; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line-soft); }
.modal-x {
  appearance: none; border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 20px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.modal-x:hover { background: var(--surface-2); color: var(--ink); }

/* 체결 처리 행 */
.fill-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px; flex-wrap: wrap;
}
.fill-row .fr-main { flex: 1 1 200px; min-width: 0; }
.fill-row input[type="number"] { width: 96px; }

/* ---------- 가이드 ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .guide-grid { grid-template-columns: 1fr; } }
.guide h2 { font-size: 19px; margin: 30px 0 10px; }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 15.5px; margin: 20px 0 7px; }
.guide p, .guide li { font-size: 14.5px; color: var(--ink-2); max-width: none; }
.guide ul, .guide ol { padding-left: 22px; margin: 0 0 12px; }
.guide li { margin-bottom: 4px; }
.guide .callout {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 11px 15px; margin: 12px 0;
  font-size: 13.5px; color: var(--ink-2); max-width: none;
}
.guide table { margin-bottom: 12px; }
/* 면책조항 — 중요 고지이므로 뚜렷하게 */
.disclaimer {
  margin-top: 34px; padding: 17px 20px; background: var(--gain-soft);
  border: 1.5px solid var(--gain); border-radius: var(--radius);
  font-size: 14px; color: var(--ink); line-height: 1.75;
}
.disclaimer .dc-title { font-size: 15px; font-weight: 700; color: var(--gain); margin-bottom: 8px; }
.disclaimer ul { margin: 0; padding-left: 20px; }
.disclaimer li { margin-bottom: 6px; color: var(--ink); font-size: 14px; max-width: none; }

/* ---------- 가이드 사이드바 (공지/제작자) ---------- */
.side-card { margin-bottom: 16px; }
.notice-list { display: flex; flex-direction: column; }
.notice { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.notice:last-child { border-bottom: none; padding-bottom: 2px; }
.notice-head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; margin-bottom: 3px; }
.notice-head b { font-size: 13.5px; }
.notice-date { font-size: 11px; color: var(--muted); white-space: nowrap; flex: none; }
.notice-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.creator-name { font-size: 16px; font-weight: 700; margin: 8px 0 2px; }
.creator-intro { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.creator-rows div, .creator-biz > div { font-size: 12.5px; color: var(--ink-2); padding: 3px 0; display: flex; gap: 8px; }
.creator-rows .k, .creator-biz .k { color: var(--muted); min-width: 92px; flex: none; }
.creator-biz { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.creator-biz .cb-title { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 4px; }

/* ---------- 푸터 ---------- */
.footer {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.7;
}

/* ---------- 로그 페이지네이션 ---------- */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px 0 2px; font-size: 13px; color: var(--muted); }

/* ---------- 추천 전략 카드 ---------- */
.preset-list { display: flex; flex-direction: column; gap: 9px; }
.preset-card {
  border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px 12px;
  background: var(--surface); transition: border-color 0.15s;
}
.preset-card.on { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface); }
.pc-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; flex-wrap: nowrap; }
.pc-head b { font-size: 15.5px; white-space: nowrap; }
.pc-desc { font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; }
/* 파라미터 줄: 라인마다 행잉 인덴트 — 라벨은 왼쪽 정렬, 감긴 줄은 라벨 뒤에 맞춰짐 */
.pc-params { font-size: 11px; color: var(--muted); line-height: 1.65; margin-bottom: 9px; }
.pc-line { padding-left: 34px; text-indent: -34px; }
.pc-params .pp-k {
  display: inline-block; width: 30px; font-weight: 700; color: var(--ink-2); text-indent: 0;
}
.pc-applied { font-size: 12.5px; font-weight: 700; color: var(--accent); text-align: center; padding: 5px 0 1px; }
.pc-detail-btn {
  appearance: none; border: none; background: none; cursor: pointer;
  font-size: 11.5px; color: var(--muted); padding: 2px 0 8px; text-align: left;
}
.pc-detail-btn:hover { color: var(--accent); }
.rdots { display: inline-flex; gap: 3px; margin-left: auto; align-items: center; }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.rdot-on.r1 { background: var(--def); }
.rdot-on.r2 { background: var(--accent); }
.rdot-on.r3 { background: var(--agg); }
.rdot-on.r4 { background: var(--preset-4); }
.rdots[style] .rdot-on { background: var(--risk-color); }

/* 내 전략 목록 */
.customs { display: flex; flex-direction: column; gap: 6px; }
.custom-row { display: flex; align-items: stretch; gap: 5px; }
.custom-row .custom-apply {
  appearance: none; cursor: pointer; flex: 1; text-align: left;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 8px; padding: 7px 11px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.custom-row.on .custom-apply { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.custom-row .custom-apply:hover { border-color: var(--accent); }
.custom-row .custom-del {
  appearance: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); border-radius: 8px; width: 32px; font-size: 15px;
}
.custom-row .custom-del:hover { color: var(--gain); border-color: var(--gain); }

/* ---------- 추천 전략 비교 테이블 ---------- */
.cmp-tbl td:first-child { min-width: 220px; white-space: normal; }
.cmp-tbl td.cmp-name { cursor: pointer; }
.cmp-tbl td.cmp-name:hover b { color: var(--accent); text-decoration: underline; }
/* 모바일: 핵심 컬럼(전략/총수익/CAGR/MDD/적용)만 표시 */
@media (max-width: 720px) {
  .cmp-tbl th:nth-child(5), .cmp-tbl td:nth-child(5),
  .cmp-tbl th:nth-child(6), .cmp-tbl td:nth-child(6),
  .cmp-tbl th:nth-child(7), .cmp-tbl td:nth-child(7),
  .cmp-tbl th:nth-child(8), .cmp-tbl td:nth-child(8) { display: none; }
  .cmp-tbl td:first-child { min-width: 130px; }
  .cmp-params { display: none; }
}
.cmp-tbl .sw { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.cmp-params { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
.cmp-on td { background: var(--accent-soft); }

/* ---------- 헤더 버튼 (테마 토글 · 마이페이지) ---------- */
#theme-toggle, .hbtn {
  appearance: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; width: 38px; height: 34px; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s;
}
#theme-toggle:hover, .hbtn:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 동기화 상태 · 계좌 관리/현황 · 마이페이지 ---------- */
.sync-line { font-size: 12px; color: var(--muted); margin: -6px 0 10px; text-align: right; }
.sync-line.warn { color: var(--warn-ink); }
.modal.modal-wide { max-width: 880px; }
.modal.modal-plans { max-width: 980px; }   /* [v22] 요금제 모달: 카드 3장이 넓게 — 기능 문구가 한 줄에 들어가도록 */
.modal.modal-wide .modal-body { max-height: 76vh; }
.mg-h { margin: 16px 0 8px; font-size: 14px; }
.mg-funds { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 12px; font-size: 13px; }
.mg-funds .k { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.mg-funds .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.st-sec { margin-bottom: 18px; }
.st-sec:last-child { margin-bottom: 4px; }
.st-title { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.st-grid .tile .tv { font-size: 14px; white-space: normal; }
.st-grid .tile .td { white-space: normal; }
.st-kv { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.st-kv b { color: var(--ink); }
.st-note { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.st-orders .torder { padding: 6px 0; }
.mp-sec { margin-bottom: 16px; }
.mp-title { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-rows > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; flex-wrap: wrap; }
.mp-rows .k { color: var(--muted); min-width: 92px; font-size: 12.5px; }
.mp-rows .btn { margin-left: auto; }
.mp-device-security { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.mp-device-security .mp-title .btn { margin-left: auto; }
.mp-device-status { font-size: 13px; line-height: 1.6; }
.mp-device-note, .mp-device-message, .mp-device-error { display: block; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.mp-device-error { color: var(--bad); }
.mp-device-list { padding: 0; margin: 12px 0; list-style: none; }
.mp-device-list li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; flex-wrap: wrap; }
.mp-device-list li > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mp-device-list small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; }
.mp-device-register > label { display: block; font-size: 12px; margin-bottom: 6px; }
.mp-device-register > div { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-device-register input { flex: 1; min-width: 120px; max-width: 100%; }
.mp-device-lock { margin: 12px 0; }
.mp-device-lock > label { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.65; margin-bottom: 10px; }
.mp-device-lock > label input { flex: 0 0 auto; margin-top: 4px; }
.mp-device-lock > .btn { white-space: normal; }
@media (max-width: 640px) {
  .st-grid { grid-template-columns: repeat(2, 1fr); }
  .mg-funds { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 인쇄 ---------- */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .card { box-shadow: none; }
  .wrap { padding: 0; max-width: none; }
  /* 주문표만 인쇄 */
  body.print-ticket .wrap { display: none !important; }
  body.print-ticket #toast { display: none !important; }
  body.print-ticket .modal-bg { position: static; padding: 0; background: none; display: block; overflow: visible; }
  body.print-ticket .modal { border: none; box-shadow: none; max-width: none; }
  body.print-ticket .modal-foot, body.print-ticket .modal-x { display: none !important; }
  body.print-ticket .modal-body { max-height: none; overflow: visible; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 12px 60px; }
  .card-pad { padding: 14px 14px; }
  .tiles-r1, .tiles-r2 { grid-template-columns: repeat(2, 1fr); }
  .tile .tl, .tile .td { white-space: normal; }
  .tile .td { white-space: normal; }   /* 좁은 화면에서는 줄바꿈 허용 */
  .frow label { white-space: normal; }
  .torder { flex-wrap: wrap; }
  .torder .oreason { flex-basis: 100%; text-align: left; }
  .torder .opct { min-width: 0; }
  .torder-head .oreason { display: none; }
  .wgrid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
 * 실전 사이트 추가 스타일 — 인증 · 요금제 · 잠금 · 운영자 · 이용안내 · 데모
 * ============================================================ */
.hbtn-user { appearance: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; height: 34px; padding: 0 12px; font-size: 13px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.hbtn-user:hover { border-color: var(--accent); background: var(--accent-soft); }
.hbtn-user .hu-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#auth-area { display: inline-flex; gap: 6px; align-items: center; }
.steps { display: flex; gap: 6px; margin-bottom: 12px; font-size: 12px; }
.steps span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.steps span.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.steps span.done { background: var(--accent-soft); color: var(--accent); }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 8px; text-align: center; width: 190px; }
.auth-links { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.agree { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; font-size: 13px; }
.agree label { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; cursor: pointer; }
.agree input { margin-top: 3px; }
.risk-brief { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; line-height: 1.6; margin-top: 4px; }
.demo-box { margin-top: 12px; border: 1px dashed var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.demo-box .demo-rows { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.demo-bar { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--warn-line); font-size: 12.5px; padding: 7px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
/* 등급별 색: 초보=파랑 · 중수=초록 · 고수=빨강 — 테두리·링·기본 버튼을 같은 색으로 */
.plan-card.tier-free { --tier: var(--tier-free); }
.plan-card.tier-pro { --tier: var(--tier-pro); }
.plan-card.tier-master { --tier: var(--tier-master); }
.plan-card.tier-free, .plan-card.tier-pro, .plan-card.tier-master { border-color: var(--tier); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tier) 14%, transparent); }
.plan-card .btn-primary { background: var(--tier, var(--accent)); border-color: var(--tier, var(--accent)); color: var(--on-tier); }
.plan-card .btn-primary:hover { background: var(--tier, var(--accent-hover)); border-color: var(--tier, var(--accent-hover)); filter: brightness(0.9); }
.plan-card.on { background: var(--accent-soft); background: color-mix(in srgb, var(--tier, var(--accent)) 9%, transparent); }
.plan-head { display: flex; align-items: baseline; gap: 6px; font-size: 16px; }
.plan-en { font-size: 12px; color: var(--muted); }
.plan-price { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.plan-price .plan-ym { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }   /* [v22] 연간: 둘째 줄 = 월 환산 + 할인율 */
.plan-desc { font-size: 12.5px; color: var(--ink-2); min-height: 36px; }
.plan-feat { list-style: none; padding: 0; margin: 4px 0 6px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; flex: 1; }
/* [v21] 제공/미제공 구분: ✓ 초록 배지 + ✕ 빨간 배지, 미제공·제한은 붉은 상자에 따로 묶어 눈에 띄게 */
.plan-feat li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.45; }
.plan-feat .pf-i { flex: none; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1; margin-top: 1px; }
.plan-feat .pf-ok .pf-i { background: var(--good-soft); color: var(--good); }
.plan-feat .pf-no .pf-i { background: var(--bad-soft); color: var(--bad); }
.plan-feat .pf-no { color: var(--ink); }
.pf-sep, .plan-feat li.pf-sep { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.pf-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pf-sep-ok { color: var(--good); }
.pf-sep-no { color: var(--bad); }
.pf-sep-no::after { background: color-mix(in srgb, var(--bad) 30%, transparent); }
.plan-limbox { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent); border-radius: 8px; padding: 8px 10px 9px; margin: 0 0 6px; }
.plan-limbox .plan-feat { flex: none; margin: 6px 0 0; }
.lock-card { text-align: center; padding: 34px 20px; }
.lock-card .lock-icon { font-size: 34px; margin-bottom: 8px; }
.lock-card h3 { font-size: 18px; margin-bottom: 8px; }
.lock-card p { font-size: 14px; color: var(--ink-2); max-width: 640px; margin: 0 auto 14px; line-height: 1.65; }
.lock-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.admin-nav { margin-bottom: 14px; }
.admin-nav.seg { flex-wrap: wrap; max-width: 100%; }
.admin-tbl td, .admin-tbl th { font-size: 12px; padding: 6px 7px; }
.admin-tbl select, .admin-tbl input { font-size: 12px; padding: 3px 6px; min-height: 26px; }
/* v61: customer list and customer details only. */
.admin-users-card, .admin-users-list { min-width: 0; max-width: 100%; }
.admin-users-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.admin-users-toolbar > .card-title { margin-right: auto; }
.admin-users-toolbar select, .admin-users-toolbar input { min-width: 0; font-size: 12px; min-height: 34px; }
.admin-users-approval { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; }
.admin-users-approval .fhint { display: block; font-size: 10.5px; margin-top: 2px; }
.admin-users-filter { min-width: 0; }
.admin-users-sort { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.admin-users-sort > span { white-space: nowrap; }
.admin-users-search { display: flex; min-width: 0; gap: 6px; }
.admin-users-search input { width: 185px; }
.admin-users-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.admin-users-empty { padding: 24px 0; text-align: center; color: var(--muted); }
table.admin-users-table { table-layout: fixed; width: 100%; }
.admin-users-table .customer-col-name { width: 12%; }
.admin-users-table .customer-col-email { width: 20%; }
.admin-users-table .customer-col-tier { width: 9%; }
.admin-users-table .customer-col-created { width: 10%; }
.admin-users-table .customer-col-seen { width: 11%; }
.admin-users-table .customer-col-equity { width: 12%; }
.admin-users-table .customer-col-note { width: 17%; }
.admin-users-table .customer-col-action { width: 9%; }
.admin-users-table th, .admin-users-table td { text-align: left; white-space: normal; overflow-wrap: anywhere; padding: 11px 8px; vertical-align: middle; line-height: 1.6; }
.admin-users-table th { font-size: 11px; }
.admin-users-table .customer-name strong { display: block; font-size: 12px; color: var(--ink); }
.admin-users-table .customer-email { font-size: 11.5px; }
.admin-users-table .customer-state { margin-top: 4px; }
.admin-users-table .customer-state:empty { display: none; }
.admin-users-table .chip { max-width: 100%; font-size: 10px; white-space: normal; }
.admin-users-table .customer-equity strong { display: block; font-size: 12px; color: var(--ink); }
.admin-users-table .customer-equity > .fhint, .customer-time { display: block; }
.admin-users-table .customer-note > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-wrap; }
.admin-users-table .customer-action { text-align: right; }
.admin-users-table .customer-action .btn { max-width: 100%; padding: 6px 9px; font-size: 11px; white-space: normal; }
.admin-users-table .customer-pending { background: color-mix(in srgb,var(--warn) 6%,transparent); }
.admin-users-table .customer-deleted td { color: var(--muted); }
.admin-user-modal .modal-head h3, .admin-user-detail, .admin-user-detail > * { min-width: 0; overflow-wrap: anywhere; }
.admin-user-modal .modal-foot { flex-wrap: wrap; align-items: center; }
.admin-user-foot-space { flex: 1; }
.admin-user-identity { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.admin-user-identity > div { min-width: 0; }
.admin-user-identity strong { display: block; font-size: 18px; line-height: 1.5; color: var(--ink); }
.admin-user-identity span:not(.chip) { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.admin-user-identity > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-user-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; margin: 0; padding: 15px; background: var(--surface-2); border-radius: 10px; }
.admin-user-summary > div { min-width: 0; }
.admin-user-summary dt { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.admin-user-summary dd { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.65; }
.admin-user-summary small { display: block; color: var(--muted); font-size: 11px; }
.admin-user-section { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.admin-user-section h4 { margin: 0 0 12px; font-size: 13px; color: var(--ink); }
.admin-user-section .fhint { line-height: 1.65; }
.admin-user-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 20px; }
.admin-user-form label { min-width: 0; display: block; }
.admin-user-form label > span { display: block; font-size: 12px; margin-bottom: 5px; color: var(--ink-2); }
.admin-user-form select, .admin-user-form input, .admin-user-section textarea { width: 100%; min-width: 0; max-width: 100%; font-size: 13px; }
.admin-user-form small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.admin-user-subscription { line-height: 1.7; font-size: 13px; }
.admin-user-subscription > .btn { margin-top: 8px; display: block; }
.admin-user-note-read { white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.admin-user-read-fields { font-size: 13px; line-height: 1.7; }
.admin-user-support { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; }
.admin-users-card .sr-only, .admin-user-modal .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1050px) {
  .admin-users-toolbar > .card-title { flex: 1 1 150px; }
  .admin-users-search { flex: 1 1 210px; }
  .admin-users-search input { width: 100%; }
  .admin-users-table th, .admin-users-table td { padding: 9px 6px; }
  .admin-users-table .customer-action .btn { padding: 6px; }
}
@media (max-width: 760px) {
  .admin-users-card { padding: 15px 12px; }
  .admin-users-toolbar { gap: 9px; }
  .admin-users-toolbar > .card-title { flex: 1 1 100%; }
  .admin-users-approval { flex: 1 1 100%; justify-content: space-between; }
  .admin-users-filter, .admin-users-sort { flex: 1 1 125px; }
  .admin-users-filter select { width: 100%; }
  .admin-users-sort select { flex: 1; }
  .admin-users-search { flex: 1 1 100%; }
  .admin-users-help { font-size: 11px; }
  table.admin-users-table, .admin-users-table tbody { display: block; }
  .admin-users-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .admin-users-table colgroup { display: none; }
  .admin-users-table .customer-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
  .admin-users-table td { display: block; min-width: 0; border: 0; padding: 0; text-align: left; }
  .admin-users-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10.5px; color: var(--muted); }
  .admin-users-table .customer-name, .admin-users-table .customer-email, .admin-users-table .customer-note, .admin-users-table .customer-action { grid-column: 1 / -1; }
  .admin-users-table .customer-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .admin-users-table .customer-name::before { display: none; }
  .admin-users-table .customer-name strong { font-size: 14px; }
  .admin-users-table .customer-state { margin-top: 0; }
  .admin-users-table .customer-action { text-align: right; }
  .admin-users-table .customer-action .btn { min-height: 36px; padding: 7px 14px; font-size: 12px; }
  .admin-user-modal .modal-body { padding: 15px 12px; }
  .admin-user-modal .modal-foot { padding: 12px; gap: 7px; }
  .admin-user-modal .modal-foot .btn { padding: 8px 10px; font-size: 12px; }
  .admin-user-identity { flex-direction: column; gap: 8px; }
  .admin-user-identity > div:last-child { justify-content: flex-start; }
  .admin-user-summary { padding: 12px; gap: 12px; }
  .admin-user-form { gap: 12px; }
}
@media (max-width: 380px) {
  .admin-user-summary, .admin-user-form { grid-template-columns: minmax(0,1fr); }
  .admin-user-foot-space { display: none; }
}
.legal { margin-bottom: 14px; }
.legal h2 { font-size: 19px; margin: 0 0 12px; }
.legal h3 { font-size: 14.5px; margin: 18px 0 6px; }
.legal p, .legal li { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.legal ul { padding-left: 20px; margin: 0 0 10px; }
.legal li { margin-bottom: 4px; }
.legal .lead { font-size: 14.5px; color: var(--ink); }
.legal .muted { font-size: 12.5px; color: var(--muted); }
.legal-tbl td, .legal-tbl th { white-space: normal; text-align: left; font-size: 12.5px; vertical-align: top; }
.biz-tbl th { width: 180px; color: var(--muted); font-weight: 600; }
.legal-nav {position:sticky;top:8px;z-index:20;margin-bottom:12px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);max-width:100%;box-sizing:border-box}
.legal-nav .chip-btn {max-width:100%;white-space:normal;line-height:1.5}
#tab-legal>.legal {scroll-margin-top:var(--legal-nav-offset,110px)}
@media (max-width:600px){.legal-nav{top:4px;padding:7px;gap:5px}.legal-nav .chip-btn{font-size:12px;padding:5px 8px}}
.foot-links a { color: var(--ink-2); }
.st-orders .torder { padding: 6px 0; }
@media (max-width: 640px) {
  .plan-grid { grid-template-columns: 1fr; }
  .hbtn-user .hu-name { display: none; }
  .code-input { width: 160px; font-size: 20px; letter-spacing: 6px; }
}
/* 홈(랜딩) · 상향 유도 */
.hero { background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); padding: 34px 28px; }
.hero-kicker { font-size: 12.5px; color: var(--accent); font-weight: 700; letter-spacing: 0.02em; margin-bottom: 8px; }
.hero-title { font-size: 28px; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero-sub { font-size: 14.5px; color: var(--ink-2); max-width: 720px; line-height: 1.7; margin-bottom: 16px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.home-feat .hf-icon { font-size: 24px; margin-bottom: 6px; }
.home-feat b { display: block; margin-bottom: 4px; font-size: 14.5px; }
.home-feat p { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 0; }
.upsell { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface); margin-bottom: 14px; }
.upsell-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.upsell-head .btn { margin-left: auto; }
.upsell-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 640px) { .hero { padding: 24px 18px; } .hero-title { font-size: 22px; } }
/* 성과 리포트 · 공유 카드 · 휴지통 */
.rp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rp-card { cursor: pointer; transition: border-color 0.15s; }
.rp-card:hover { border-color: var(--accent); }
.rp-card .rp-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rp-card .rp-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rp-card .rp-kpis { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.rp-card .rp-kpis b { font-size: 18px; display: block; }
.rp-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-head h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 4px; }
.rp-head .rp-meta { font-size: 13px; color: var(--muted); }
.rp-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.rp-acct { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.rp-body { font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.rp-body p { margin: 0 0 12px; }
.rp-body b { color: var(--ink); }
.rp-disc { font-size: 12px; color: var(--muted); line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 14px; }
.share-preview { text-align: center; }
.share-preview img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.rp-alias input { width: 150px; }
.trash-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; flex-wrap: wrap; }
.trash-row .btn { margin-left: auto; }
.sec-check { font-size: 13px; line-height: 1.8; color: var(--ink-2); }
/* 고수 다이얼 행: 라벨은 줄바꿈 허용, 입력칸은 항상 오른쪽 */
.dial-row { flex-wrap: nowrap; align-items: center; gap: 12px; }
.dial-row label:first-child { white-space: normal; flex: 1 1 auto; min-width: 0; }
.dial-row label:first-child .hint { white-space: normal; }
.dial-row input[type="number"] { width: 84px; flex: none; }
.dial-row select { flex: none; max-width: 180px; }
.dial-row .toggle { flex: none; }
/* 백테스트 기간 칩: 설정 패널 폭에서 한 줄에 */
.settings-col .chips { flex-wrap: nowrap; gap: 4px; }
.settings-col .chips .chip-btn { padding: 4px 8px; font-size: 12px; white-space: nowrap; }

/* ---------- 공지사항 게시판 (v13) ---------- */
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; }
.nt-list { border-top: 1px solid var(--line-soft); }
.nt-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.nt-row.pinned { background: var(--accent-soft); }
.nt-row.draft { opacity: .65; }
.nt-main { flex: 1; min-width: 0; cursor: pointer; }
.nt-main:hover .nt-title { color: var(--accent); text-decoration: underline; }
.nt-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; word-break: break-word; }
.nt-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.nt-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.nt-detail .nt-h { font-size: 20px; line-height: 1.4; margin: 12px 0 4px; }
.nt-body { margin-top: 14px; font-size: 14.5px; line-height: 1.75; color: var(--ink); max-width: 72ch; }
.nt-body p { margin: 0 0 4px; }
.nt-body ul { margin: 4px 0 8px; padding-left: 22px; }
.nt-body .nt-gap { height: 10px; }
.nt-body a { color: var(--accent); word-break: break-all; }
.nt-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.nt-ta { width: 100%; font: inherit; line-height: 1.6; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); resize: vertical; }
.nt-prev { border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 10px 12px; min-height: 120px; }
@media (max-width: 640px) { .nt-row { flex-direction: column; align-items: flex-start; } }

/* ---------- 추천 전략 비교: 시리즈 숨기기/보기 (v13) ---------- */
.cmp-tbl .cmp-act { white-space: nowrap; }
.cmp-tbl .cmp-act .btn + .btn, .cmp-tbl .cmp-act .btn + .chip, .cmp-tbl .cmp-act .chip + .btn { margin-left: 6px; }
.cmp-tbl tr.cmp-hidden td:not(.cmp-act) { opacity: .45; }
.legend .lg.off { opacity: .4; text-decoration: line-through; }
.bt-fixed { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); padding: 4px 0 2px; }
.bt-fixed b { color: var(--ink); }

/* ---------- 운영자 '등급으로 보기' (v13.1) ---------- */
.va-sel { font: inherit; font-size: 12px; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); margin-right: 6px; cursor: pointer; }
.va-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.banner-view { border-color: var(--accent); }
.banner-view .btn { vertical-align: middle; }

/* [v16] 읽지 않은 공지 표시 */
.ndot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(229, 72, 77, .22); }
.nav button .ndot { margin: 0 0 6px 5px; width: 7px; height: 7px; }
.nt-row.unread .nt-title { font-weight: 700; }

/* [v18] 백테스트 결과 카드: 접기 · 상단 이동 버튼 · 목록으로 */
.rcard .chart-head { margin-bottom: 6px; }
.rcard.folded .chart-head { margin-bottom: 0; }
.rcard.card-pad .chart-head { margin-bottom: 8px; }
.rcard > .chart-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.rcard > .chart-head > .card-title { min-width: 0; }
.rcard > .chart-head > [data-fold] { min-width: 72px; white-space: nowrap; }
.rcard .rcard-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 8px; }
.rcard .bt-card-heading { white-space: nowrap; }
.rcard .bt-cycle-note { margin: 8px 0 0; }
.bt-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.bt-jump button { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.bt-jump button:hover, .bt-jump button:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.bt-jump button.off { opacity: .55; text-decoration: line-through; }
.bt-top { position: fixed; right: 18px; bottom: 22px; z-index: 40; font: inherit; font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; }
.bt-top:hover { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Market insights: readable, compact working surface; shared site typography. */
#insights-panel {padding:4px 0 24px;min-width:0;font-size:14px}
#insights-panel [hidden] {display:none!important}
#insights-panel h1 {font-size:23px;letter-spacing:-.6px;margin:0}
#insights-panel h2 {font-size:18px;margin:0}
#insights-panel h3 {font-size:16px;margin:0 0 8px}
#insights-panel p {line-height:1.65;margin:6px 0;color:var(--ink-2);word-break:keep-all;overflow-wrap:break-word}
#insights-panel .eyebrow {font:12px var(--font);letter-spacing:.8px;color:var(--accent)}
#insights-panel .page-heading,#insights-panel .panel-heading,#insights-panel .chart-controls {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
#insights-panel .page-heading {margin:0 0 12px}
#insights-panel .page-heading>div {display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
#insights-panel .page-heading p {margin:3px 0 0;font-size:14px}
#insights-panel button {cursor:pointer;font-family:var(--font);white-space:nowrap}
#insights-panel .button,#insights-panel .small-button {border:1px solid var(--line);border-radius:7px;background:var(--surface);padding:7px 10px;color:var(--ink);font-size:14px}
#insights-panel .text-button {border:0;background:none;color:var(--accent);padding:5px 0;font-size:14px}
#insights-panel button:hover {filter:brightness(.94)}
#insights-panel :is(button,input,svg):focus-visible {outline:2px solid var(--accent);outline-offset:3px}
#insights-panel .market-overview {display:grid;grid-template-columns:minmax(310px,1.6fr) repeat(4,minmax(138px,1fr));gap:8px;margin:0 0 14px;overflow-x:auto;padding-bottom:4px}
#insights-panel .metrics-grid {display:contents}
#insights-panel .market-strip,#insights-panel .metric {background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:8px 12px;min-width:0}
#insights-panel .market-strip {display:flex;align-items:center;justify-content:space-between;gap:10px}
#insights-panel .market-strip strong {display:block;font:600 19px var(--font);font-variant-numeric:tabular-nums;white-space:nowrap}
#insights-panel .market-strip span {display:block;font-size:12px;color:var(--muted);white-space:nowrap;margin-top:4px}
#insights-panel .market-price {text-align:right}
#insights-panel .metric>span {display:block;font-size:14px;color:var(--ink-2);white-space:nowrap}
#insights-panel .metric strong {display:block;font:600 21px/1.2 var(--font);font-variant-numeric:tabular-nums;margin:2px 0}
#insights-panel .metric small {font-size:12px;color:var(--muted);white-space:nowrap}
#insights-panel .metric-info {border:0;background:none;color:var(--accent);font-size:15px;padding:0 2px}
#insights-panel .positive {color:var(--gain)}
#insights-panel .negative {color:var(--loss)}
#insights-panel .insight-layout {display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:14px;align-items:start}
#insights-panel .panel {min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
#insights-panel .panel-heading {align-items:flex-start}
#insights-panel .chart-panel>.panel-heading {flex-wrap:nowrap}
#insights-panel .chart-panel>.panel-heading>div:first-child {min-width:0;flex:1}
#insights-panel .panel-heading p,#insights-panel .matches-intro {font-size:14px}
#insights-panel .title-row {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#insights-panel .pill {border-radius:5px;background:var(--surface-2);color:var(--ink-2);padding:4px 7px;font-size:12px;white-space:nowrap}
#insights-panel .purple {color:#9676c6;background:rgba(150,118,198,.1)}
#insights-panel .chart-controls {gap:10px;margin:12px 0;font-size:14px}
#insights-panel .date-control,#insights-panel .horizon-control {display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#insights-panel input[type=date] {font:14px var(--font);padding:6px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--ink);max-width:150px}
#insights-panel .segmented {display:inline-flex;padding:3px;border-radius:6px;background:var(--surface-2);gap:2px}
#insights-panel .segmented button {border:0;background:none;color:var(--ink-2);padding:6px 10px;font-size:14px;border-radius:4px}
#insights-panel .segmented button[aria-pressed=true] {background:var(--surface);color:var(--accent);box-shadow:var(--shadow)}
#insights-panel .chart-legend {display:flex;gap:8px 14px;flex-wrap:wrap;font-size:13px;color:var(--ink-2);margin-bottom:8px}
#insights-panel .chart-legend span {display:flex;align-items:center;gap:5px;white-space:nowrap}
#insights-panel .line {display:inline-block;width:15px;border-top:2px solid #88809a}
#insights-panel .line.mint {border-color:#269f83}
#insights-panel .line.violet {border-color:#9979d1}
#insights-panel .swatch {display:inline-block;width:12px;height:8px;background:rgba(157,134,223,.25)}
#insights-panel .chart-container {position:relative;min-height:290px;min-width:0}
#insights-panel .chart-container svg {display:block;width:100%;height:auto;touch-action:pan-y;user-select:none;cursor:crosshair}
#insights-panel .chart-container svg text {font:13px var(--font);fill:var(--ink-2);font-variant-numeric:tabular-nums}
#insights-panel .chart-tooltip {position:absolute;right:8px;top:30px;width:285px;max-width:calc(100% - 16px);background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:var(--shadow);padding:12px;z-index:3;font-variant-numeric:tabular-nums}
#insights-panel .chart-tooltip.tooltip-left {left:8px;right:auto}
#insights-panel .cursor-top {display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:12px}
#insights-panel .cursor-median {display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:2px 8px;border-bottom:1px solid var(--line);padding:6px 0 9px;margin-bottom:7px}
#insights-panel .cursor-median>span {font-size:14px;font-weight:600}
#insights-panel .cursor-median strong {font-size:23px;color:#9979d1}
#insights-panel .cursor-median small {grid-column:1/-1;font-size:12px;color:var(--muted)}
#insights-panel .cursor-cases>div {display:grid;grid-template-columns:1fr auto 42px;gap:10px;align-items:center;font-size:13px;padding:3px 0}
#insights-panel .cursor-cases small {font-size:12px;text-align:right;color:var(--muted)}
#insights-panel .cursor-cases .selected {background:var(--accent-soft);border-radius:4px}
#insights-panel .chart-tooltip p {font-size:12px;margin:8px 0 0;color:var(--muted)}
#insights-panel .chart-scrubber {padding:10px 0;border-top:1px solid var(--line-soft)}
#insights-panel .chart-scrubber label {display:flex;justify-content:space-between;font-size:14px}
#insights-panel .chart-scrubber input {width:100%;accent-color:var(--accent);margin:9px 0}
#insights-panel .chart-scrubber p {font:14px/1.6 var(--font)}
#insights-panel .chart-scrubber .chart-interaction-hint {font-size:12px;color:var(--muted)}
#insights-panel .chart-footnote {display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted);padding-top:10px;border-top:1px solid var(--line-soft)}
#insights-panel .method-anchor {position:relative;flex-shrink:0}
#insights-panel .method-panel {position:absolute;top:calc(100% + 8px);right:0;width:420px;max-width:calc(100vw - 64px);z-index:6;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:10px;padding:18px;font-size:14px;max-height:65vh;overflow:auto}
#insights-panel .method-panel ul {padding-left:20px;line-height:1.7;color:var(--ink-2)}
#insights-panel .explanation-card {position:relative;margin:0 0 14px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
#insights-panel .explanation-close {float:right;margin:0 0 8px 14px}
#insights-panel .inline-note {font-size:12px;padding:8px;background:var(--accent-soft);border-radius:6px}
#insights-panel .count-badge {font:14px var(--font);background:var(--surface-2);border-radius:5px;padding:5px 7px}
#insights-panel .match-list {margin:10px 0;max-height:490px;overflow:auto}
#insights-panel .match-button {width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;border:1px solid transparent;background:none;color:var(--ink);padding:11px 7px;border-radius:7px;gap:8px}
#insights-panel .match-button[aria-pressed=true] {border-color:var(--accent);background:var(--accent-soft)}
#insights-panel .match-button strong {font:600 15px var(--font)}
#insights-panel .match-button small {display:block;font-size:12px;color:var(--muted);margin-top:3px}
#insights-panel .match-return {font:600 16px var(--font);font-variant-numeric:tabular-nums;text-align:right}
#insights-panel .match-detail {border-top:1px solid var(--line);padding-top:10px;font-size:13px}
#insights-panel .outcome-panel {display:grid;grid-template-columns:1.5fr repeat(4,1fr);align-items:center;gap:18px;margin-top:14px}
#insights-panel .outcome-heading p {font-size:13px}
#insights-panel .outcome-stat strong {display:block;font:600 22px var(--font);margin-top:5px}
#insights-panel .outcome-stat span {font-size:13px;color:var(--ink-2);word-break:keep-all}
#insights-panel .editorial-note {display:flex;align-items:center;gap:12px;padding:18px 6px}
#insights-panel .editorial-note>span {font-size:28px;color:var(--accent)}
#insights-panel .editorial-note small {display:block;font-size:13px;color:var(--muted)}
#insights-panel .editorial-note button {margin-left:auto}
#insights-panel .empty-state {padding:50px 14px;text-align:center}
#insights-panel .empty-state h3 {font-size:16px}
#insights-panel .empty-state p {font-size:14px}
.acct-review-stack {display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.acct-card .acct-head {align-items:flex-start;gap:10px}
.acct-card .acct-actions {display:grid;grid-template-columns:1.15fr 1.15fr 1fr .85fr;gap:5px}
.acct-card .acct-actions .btn {white-space:nowrap;min-width:0;padding-left:5px;padding-right:5px}
@media(max-width:1100px){
 #insights-panel .insight-layout {grid-template-columns:minmax(0,1fr)}
 #insights-panel .match-list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;gap:4px}
 #insights-panel .outcome-panel {grid-template-columns:repeat(4,1fr)}
 #insights-panel .outcome-heading {grid-column:1/-1}
}
@media(max-width:600px){
 #insights-panel h1 {font-size:21px}
 #insights-panel .page-heading>div>p {display:none}
 #insights-panel .page-heading .button {font-size:12px}
 #insights-panel .market-overview {grid-template-columns:310px repeat(4,150px)}
 #insights-panel .panel {padding:13px}
 #insights-panel .chart-container {min-height:260px}
 #insights-panel .chart-tooltip,#insights-panel .chart-tooltip.tooltip-left {position:static;width:auto;max-width:none;margin:8px 0}
 #insights-panel .cursor-cases {display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
 #insights-panel .cursor-cases>div {grid-template-columns:1fr auto;gap:6px;font-size:12px}
 #insights-panel .cursor-cases small {display:none}
 #insights-panel .match-list {grid-template-columns:repeat(2,minmax(0,1fr))}
 #insights-panel .match-button {flex-wrap:wrap}
 #insights-panel .match-return {text-align:left}
 #insights-panel .outcome-panel {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px}
 #insights-panel .editorial-note {flex-wrap:wrap}
 #insights-panel .title-row .pill {display:none}
}
/* v28: compact, consistently ordered customer views. */
.hero-sub {max-width:920px;word-break:keep-all}
#trading-panel .lock-card p {max-width:1000px;font-size:15px;line-height:1.8}
.trade-lock-sentence {display:block;word-break:keep-all}
.order-preview-rail {grid-auto-columns:minmax(472px,44%);gap:12px}
.order-preview-table th:nth-child(2) {width:48px}
.order-preview-table th:nth-child(3) {width:78px}
.order-preview-table th:nth-child(4) {width:75px}
.order-preview-table th:nth-child(5) {width:70px}
.order-preview-table th,.order-preview-table td {padding-top:10px;padding-bottom:10px}
.order-preview-card header,.order-preview-note {padding:13px 16px}
.order-preview-disclosure,.order-preview-help {font-size:13px;line-height:1.65}
.order-preview-modal {max-width:1000px}
#insights-panel .market-overview {grid-template-columns:minmax(240px,1.15fr) minmax(300px,1.5fr) minmax(190px,1fr) minmax(138px,.7fr);overflow:visible;margin-bottom:12px;padding:0}
#insights-panel .market-strip {gap:8px}
#insights-panel .market-strip>button {flex:none;font-size:19px}
#insights-panel .metric {position:relative;padding:9px 12px}
#insights-panel .metric strong {white-space:nowrap;font-size:18px;line-height:1.3}
#insights-panel .metric-values {display:flex;gap:8px;justify-content:space-between;align-items:center}
#insights-panel .metric-values>div {min-width:0}
#insights-panel .returns-metric .metric-values>div+div::before {content:'/';position:absolute;margin-left:-8px;margin-top:20px;color:var(--line)}
#insights-panel .returns-metric>span>small {float:right;font-weight:400}
#insights-panel .volatility-metric .method-panel {top:calc(100% + 8px)}
#insights-panel .insight-layout {grid-template-columns:minmax(0,1fr) 290px;gap:12px;align-items:start}
#insights-panel .panel {padding:14px}
#insights-panel .panel h2 {font-size:18px;margin:0}
#insights-panel .panel-heading {display:flex;justify-content:space-between;gap:8px;margin:0}
#insights-panel .panel-heading p {margin:4px 0 0;font-size:13px;color:var(--ink-2)}
#insights-panel .chart-controls {display:flex;justify-content:space-between;flex-wrap:wrap;margin:10px 0 8px}
#insights-panel .inline-note {margin:6px 0;padding:5px 8px}
#insights-panel .chart-container {min-height:260px}
#insights-panel .chart-footnote {padding-top:6px;line-height:1.5}
#insights-panel .chart-tooltip,#insights-panel .chart-tooltip.tooltip-left {right:8px;left:auto;top:8px;width:265px;max-height:calc(100% - 16px);overflow:auto;padding:10px}
#insights-panel .cursor-actual {display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 8px;border-bottom:1px solid var(--line);padding:6px 0;margin-bottom:5px}
#insights-panel .cursor-actual>span {font-size:14px}
#insights-panel .cursor-actual strong {color:var(--accent);font-size:21px;white-space:nowrap}
#insights-panel .cursor-actual small {font-size:12px;color:var(--ink-2)}
#insights-panel .cursor-actual>small {grid-column:1/-1}
#insights-panel .cursor-median strong {font-size:21px;white-space:nowrap}
#insights-panel .match-summary {margin:8px 0;padding:9px 10px;background:var(--surface-2);border-radius:8px}
#insights-panel .match-summary>p {margin:0 0 6px;font-size:12px;color:var(--ink-2)}
#insights-panel .match-summary-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#insights-panel .outcome-stat strong {font-size:17px;white-space:nowrap;margin-top:2px}
#insights-panel .outcome-stat span {font-size:12px}
#insights-panel .match-list {display:grid;grid-template-columns:1fr;margin:6px 0;max-height:340px;gap:0}
#insights-panel .match-button {padding:6px 5px;gap:7px;flex-wrap:nowrap}
#insights-panel .match-button strong {font-size:14px;white-space:nowrap}
#insights-panel .match-button small {font-size:12px;line-height:1.3;margin-top:2px}
#insights-panel .match-return {font-size:15px;white-space:nowrap;text-align:right}
#insights-panel .match-return small {display:none}
#insights-panel .match-detail {padding-top:7px;font-size:12px;line-height:1.5}
#insights-panel .match-detail p {margin:0}
.insight-disclaimer {font-size:13px;color:var(--ink-2);line-height:1.6;margin:10px 0}
#results-panel .cmp-act {width:140px;min-width:140px;text-align:left}
#results-panel .cmp-act>.btn:first-child {min-width:55px}
#results-panel .bt-scroll-table {max-height:300px;overflow:auto;overscroll-behavior:contain;cursor:grab}
#results-panel .bt-scroll-table:active {cursor:grabbing}
#results-panel .bt-scroll-table th,#results-panel .bt-scroll-table td {white-space:nowrap}
#results-panel .bt-scroll-table thead {position:sticky;top:0;z-index:2;background:var(--surface)}
#results-panel .bt-scroll-table tbody th {background:var(--surface);position:sticky;left:0;z-index:1}
#results-panel .yearly-comparison {min-width:700px}
#results-panel .yearly-comparison thead th {text-align:center}
#results-panel .monthly-scroll {max-height:350px}
#results-panel .bt-section-heading {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;margin:10px 0 0;padding:10px 2px;border-top:2px solid var(--accent);font-size:16px}
#results-panel .bt-section-heading span {font-size:13px;color:var(--ink-2)}
#results-panel .tiles-r1 {grid-template-columns:repeat(auto-fit,minmax(132px,1fr))}
#results-panel .tiles-r2 {grid-template-columns:repeat(auto-fit,minmax(138px,1fr))}
#results-panel .tile .tv {font-size:23px;white-space:nowrap}
#results-panel .tile-hero .tv {font-size:clamp(22px,2.1vw,29px)}
#results-panel .tile .td {font-size:12px;word-break:keep-all}
#results-panel .tile .tl {font-size:13px;word-break:keep-all}
#results-panel .metric-help {border:0;background:none;color:var(--accent);font-size:15px;cursor:pointer;padding:0 2px}
.tq-band-risk-main {fill:var(--loss);fill-opacity:.13}
.tq-band-risk-near {fill:var(--warn-ink);fill-opacity:.09}
.tq-risk-guide {stroke:var(--loss);stroke-opacity:.55;stroke-dasharray:3 4}
.tq-risk-label {fill:var(--ink);font:600 12px var(--font);paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round}
.risk-summary {display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
.risk-chip {border:1px solid var(--line);border-radius:7px;background:var(--surface-2);color:var(--ink);padding:7px 9px;cursor:pointer;text-align:left;font:13px var(--font)}
.risk-chip b {color:var(--loss);display:block}
.risk-chip span {display:block;margin-top:3px;font-size:12px;white-space:nowrap}
.cycle-summary {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.cycle-summary>div {padding:10px 12px;border:1px solid var(--line);background:var(--surface-2);border-radius:8px;min-width:0}
.cycle-summary span,.cycle-summary small {display:block;font-size:13px;color:var(--ink-2);line-height:1.5}
.cycle-summary strong {display:block;font-size:19px;margin:4px 0;font-variant-numeric:tabular-nums;white-space:nowrap}
.cycle-summary strong b {font-weight:600}
.cycle-filters {display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 12px;font-size:14px}
.cycle-filters label {display:flex;gap:6px;align-items:center}
.cycle-filters select {max-width:210px}
.cycle-log-table {min-width:710px}
.cycle-detail-summary {display:flex;flex-wrap:wrap;gap:14px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:12px}
.cycle-detail-summary strong {display:block;font-size:25px}
.cycle-detail-summary p {margin:0;font-size:14px}
.tq-tooltip b.gain-t {color:var(--gain)}
.tq-tooltip b.loss-t {color:var(--loss)}
@media(min-width:1101px){.layout-bt {grid-template-columns:330px minmax(0,1fr);gap:16px}}
@media(max-width:1020px){
 #insights-panel .market-overview {grid-template-columns:1.1fr 1.5fr}
 #insights-panel .volatility-metric .metric-values {justify-content:flex-start;gap:24px}
 #insights-panel .high-metric {display:flex;align-items:center;gap:12px}
 #insights-panel .high-metric>small {margin-left:auto}
}
@media(max-width:960px){
 #insights-panel .insight-layout {grid-template-columns:minmax(0,1fr)}
 #insights-panel .match-list {grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;gap:4px}
 #insights-panel .match-button {display:flex;flex-direction:column;align-items:flex-start}
 #insights-panel .match-summary-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
 #insights-panel .match-summary {padding:8px 10px}
}
@media(max-width:780px){
 .order-preview-rail {grid-auto-columns:100%}
 .order-preview-table td:nth-child(4) {grid-column:auto}
 .order-preview-table td:last-child {grid-column:auto}
 .order-preview-table tr {grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px;padding:10px 12px}
 .order-preview-table td::before {font-size:13px}
 .order-preview-table td:last-child {font-size:13px;line-height:1.5}
}
@media(max-width:600px){
 .trade-lock-sentence {display:block;margin-bottom:7px}
 #trading-panel .lock-card {padding:24px 16px}
 #trading-panel .lock-card p {font-size:14px;line-height:1.7}
 #insights-panel .market-overview {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:8px}
 #insights-panel .market-strip {grid-column:1/-1;padding:8px 10px}
 #insights-panel .market-strip>div:first-child {display:flex;align-items:baseline;gap:8px}
 #insights-panel .market-strip>div:first-child span {font-size:12px}
 #insights-panel .market-strip strong {font-size:18px}
 #insights-panel .market-price {margin-left:auto}
 #insights-panel .market-price span {font-size:12px}
 #insights-panel .returns-metric {grid-column:1/-1;order:1}
 #insights-panel .volatility-metric {order:2}
 #insights-panel .high-metric {order:3;display:block}
 #insights-panel .metric {padding:7px 9px}
 #insights-panel .metric-values strong {font-size:15px}
 #insights-panel .volatility-metric .metric-values {gap:8px;justify-content:space-between}
 #insights-panel .metric>span {font-size:13px}
 #insights-panel .high-metric strong {font-size:18px;margin:6px 0}
 #insights-panel .panel {padding:11px}
 #insights-panel .panel h2 {font-size:17px}
 #insights-panel .chart-controls {gap:7px;margin:8px 0}
 #insights-panel .date-control {gap:5px}
 #insights-panel input[type=date] {max-width:137px;padding:5px;font-size:14px}
 #insights-panel .chart-container {min-height:240px}
 #insights-panel .chart-legend {gap:6px 10px;font-size:12px}
 #insights-panel .chart-tooltip,#insights-panel .chart-tooltip.tooltip-left {position:static;max-height:none;max-width:none;width:auto;margin:8px 0}
 #insights-panel .cursor-cases {grid-template-columns:1fr}
 #insights-panel .cursor-cases>div {font-size:13px}
 #insights-panel .match-list {grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 6px}
 #insights-panel .match-button {flex-direction:row;align-items:center;padding:7px 2px;gap:4px}
 #insights-panel .match-button strong {font-size:13px}
 #insights-panel .match-return {font-size:14px}
 #insights-panel .match-button small {font-size:12px}
 #insights-panel .match-summary-grid {gap:5px}
 #insights-panel .outcome-stat strong {font-size:14px}
 #insights-panel .outcome-stat span {font-size:12px}
 #insights-panel .method-panel {position:fixed;left:16px;right:16px;top:18vh;width:auto;max-width:none;max-height:65vh;z-index:55}
 #insights-panel .volatility-metric .method-panel {top:18vh}
 .insight-disclaimer {font-size:12px}
 #results-panel .tiles-r1,#results-panel .tiles-r2 {grid-template-columns:repeat(2,minmax(0,1fr))}
 #results-panel .tile .tv {font-size:22px}
 #results-panel .tile-hero .tv {font-size:24px}
 #results-panel .bt-scroll-table {max-height:270px}
 #results-panel .monthly-scroll {max-height:320px}
 .cycle-summary {gap:6px}
 .cycle-summary>div {padding:9px}
 .cycle-summary strong {font-size:16px}
 .cycle-summary span,.cycle-summary small {font-size:12px}
 .cycle-filters {font-size:13px}
 .cycle-filters select {max-width:190px}
}

/* Density pass after desktop/mobile measurement. */
.app-header {padding:16px 0 10px}
.nav {margin-bottom:16px}
#insights-panel .metric>span,#insights-panel .metric small {line-height:1.3}
#insights-panel .metric strong {line-height:1.2}
#insights-panel .market-overview .metric-values small {display:block}
#insights-panel .market-strip span {line-height:1.3}
#insights-panel .outcome-stat span {display:block;line-height:1.3}
#insights-panel .outcome-stat strong {line-height:1.3}
#insights-panel .match-summary>p {line-height:1.3}
#insights-panel .panel-heading p {line-height:1.4}
#insights-panel .match-summary {padding:8px 10px}
.order-preview-rail {gap:16px}
@media(min-width:961px){
 #insights-panel .match-button>span:first-child {display:flex;align-items:center;gap:8px}
 #insights-panel .match-button strong {line-height:1.3}
 #insights-panel .match-button small {margin:0}
 #insights-panel .match-button {min-height:35px;padding:6px 5px}
 #insights-panel .match-list {max-height:300px}
}

#results-panel .tiles-r1 {grid-template-columns:repeat(6,minmax(0,1fr))}
#results-panel .tiles-r1>.tile:nth-child(-n+3) {grid-column:span 2}
#results-panel .tiles-r1>.tile:nth-child(5) .tv {font-size:15px}
#results-panel .bt-scroll-table:active {user-select:none}
@media(min-width:961px){
 #insights-panel .match-list {grid-auto-rows:32px;max-height:none}
 #insights-panel .match-button {min-height:0;padding:5px;line-height:1.3}
}
@media(max-width:600px){
 #results-panel .tiles-r1 {grid-template-columns:repeat(2,minmax(0,1fr))}
 #results-panel .tiles-r1>.tile:nth-child(-n+3) {grid-column:auto}
 #results-panel .tiles-r1>.tile:nth-child(2) .tv {font-size:19px}
 #results-panel .tiles-r1>.tile:nth-child(5) .tv {font-size:17px}
}

@media(max-width:600px){
 .app-header {gap:7px 8px;padding:12px 0 7px}
 .app-header .brand {gap:7px}
 .app-header .brand-mark {width:31px;height:31px}
 .app-header .brand-name {font-size:19px}
 .app-header .brand-tag {display:none}
 .app-header .header-side {display:contents}
 .app-header #auth-area {margin-left:auto;order:1}
 .app-header #theme-toggle {order:2}
 .app-header .data-badge {order:3;flex:1 1 100%;justify-content:flex-start;font-size:11.5px;padding:4px 8px}
 /* Keep operator controls together, including every view-as tier at 320px. */
 .app-header:has(#va-sel) {display:grid;grid-template-columns:minmax(0,1fr) 34px;column-gap:6px}
 .app-header:has(#va-sel) #auth-area {grid-row:1;grid-column:1;min-width:0;width:100%;margin:0;gap:5px;flex-wrap:nowrap}
 .app-header:has(#va-sel) #theme-toggle {grid-row:1;grid-column:2;min-width:34px;width:34px;padding:0;margin:0}
 .app-header:has(#va-sel) .brand {grid-row:2;grid-column:1/-1;margin-top:4px}
 .app-header:has(#va-sel) .data-badge {grid-row:3;grid-column:1/-1;width:100%;box-sizing:border-box}
 .app-header .header-member-summary {order:3;flex:1 1 100%;width:100%;padding:3px 6px;gap:2px}
 .app-header:has(#va-sel) .header-member-summary:not([hidden]) {grid-row:3;grid-column:1/-1}
 .app-header:has(#header-member-summary:not([hidden])) .data-badge {grid-row:4;order:4}
 .hms-link,.hms-refresh {min-height:28px;width:22px;font-size:17px}
 .hms-counts {flex:1;gap:8px}
 .hms-counts>div {gap:3px}
 .hms-counts span {font-size:10px}
 .hms-counts strong {font-size:12px}
 .app-header #va-sel {flex:1 1 0;min-width:0;max-width:none;width:0;margin:0;font-size:11px;padding:5px 4px;height:34px}
 .app-header:has(#va-sel) #auth-area .btn {flex:none;white-space:nowrap;padding-left:8px;padding-right:8px}
 .app-header:has(#va-sel) .hbtn-user {flex:none;max-width:110px;white-space:nowrap;padding:0 8px;gap:4px}
 .nav {margin-bottom:12px}
 .nav button {font-size:14px;padding:9px 12px}
 #insights-panel .market-price {display:flex;align-items:center;gap:7px}
 #insights-panel .market-price span {font-size:11px}
 #insights-panel .market-strip>div:first-child>span {display:none}
 #insights-panel .market-overview .metric-values small {line-height:1.2}
 #insights-panel .metric-values strong {margin:2px 0;line-height:1.2}
 #insights-panel .high-metric strong {margin:3px 0}
 #insights-panel .chart-panel>.panel-heading p {display:none}
 #insights-panel .chart-container {min-height:230px}
 #insights-panel .chart-controls {margin:7px 0}
 #insights-panel .horizon-control {gap:8px}
 #insights-panel .segmented {padding:2px}
 #insights-panel .segmented button {padding:4px 10px}
 #insights-panel .chart-footnote {gap:3px}
}

.order-preview-card {height:320px}
.order-preview-card header {flex:none}
.order-preview-body {min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.order-preview-note {flex:none;margin:0;line-height:1.5}
.order-preview-body:focus-visible {outline:2px solid var(--accent);outline-offset:-2px}
@media(max-width:780px){
 .order-preview-card {height:390px}
 .order-preview-card header p {font-size:13px;line-height:1.4}
 .order-preview-note {font-size:13px}
 .order-preview-heading {display:grid;grid-template-columns:minmax(0,1fr) auto}
 .order-preview-heading>div:first-child {min-width:0}
 .order-preview-heading h3 {word-break:keep-all}
}

/* v29: shared guest gates, bounded metric widths and intentional chart focus. */
.layout-bt.guest-backtest {display:block}
.layout-bt.guest-backtest>.settings-col {display:none}
#insights-panel:has(>.guest-lock) {padding-top:0}
#insights-panel .guest-lock,#results-panel .guest-lock,#trading-panel .guest-lock {text-align:center;padding:34px 20px}
#insights-panel .guest-lock h3,#results-panel .guest-lock h3,#trading-panel .guest-lock h3 {font-size:18px;margin:0 0 8px}
#insights-panel .guest-lock p,#results-panel .guest-lock p,#trading-panel .guest-lock p {font-size:15px;line-height:1.8;max-width:1000px;margin:0 auto 14px;text-align:center;word-break:keep-all;overflow-wrap:break-word}
.guest-lock .lock-availability {display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px 8px;margin:10px 0 13px;font-size:14px}
.guest-lock .lock-availability>b {padding:2px 9px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-weight:600;white-space:nowrap}
.guest-lock .lock-description {display:block}
.guest-lock .lock-launch-note {display:block;margin-top:6px;color:var(--muted);font-size:13px}
.guest-lock .lock-actions .btn {font-size:14px;min-height:38px;padding:8px 16px}
#insights-panel .insight-chart-svg { -webkit-tap-highlight-color:transparent; }
#insights-panel .insight-chart-svg:focus {outline:none}
#insights-panel .insight-chart-svg:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
.strategy-chip {color:var(--strategy-color,var(--ink-2));background:color-mix(in srgb,var(--strategy-color,var(--ink-2)) 12%,transparent);border:1px solid color-mix(in srgb,var(--strategy-color,var(--ink-2)) 24%,transparent)}
.strategy-reservoir {--strategy-color:var(--preset-reservoir)}
.strategy-ripple {--strategy-color:var(--preset-1)}
.strategy-tide {--strategy-color:var(--preset-2)}
.strategy-swell {--strategy-color:var(--preset-3)}
.strategy-tsunami {--strategy-color:var(--preset-4)}
#bt-strategy-detail {scroll-margin-top:22px}
#results-panel .cmp-detail {margin-left:5px}
@media(max-width:700px){
 #results-panel .cmp-tbl td.cmp-act,#results-panel .cmp-tbl th:last-child {display:table-cell}
}
@media(min-width:601px){
 #insights-panel .market-overview {display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;gap:8px}
 #insights-panel .market-strip {flex:0 1 244px}
 #insights-panel .returns-metric {flex:0 1 314px}
 #insights-panel .volatility-metric {flex:0 1 172px}
 #insights-panel .high-metric {flex:0 1 148px;display:block}
 #insights-panel .volatility-metric .metric-values {justify-content:space-between;gap:8px}
}
@media(max-width:780px){
 .order-preview-rail {grid-auto-columns:80%}
 .order-preview-table tr {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 #insights-panel .guest-lock,#results-panel .guest-lock,#trading-panel .guest-lock {padding:24px 16px}
 #insights-panel .guest-lock p,#results-panel .guest-lock p,#trading-panel .guest-lock p {font-size:14px;line-height:1.7}
}
/* [regime] 시장 인사이트 · 변동성 국면 카드 */
#insights-panel .regime-panel {margin:0 0 12px;padding:14px 16px}
#insights-panel .regime-panel .panel-heading {position:relative;flex-wrap:nowrap;align-items:flex-start}
#insights-panel .regime-panel .panel-heading>div:first-child {min-width:0;flex:1}
#insights-panel .regime-panel .panel-heading p {margin:4px 0 0;font-size:13px;color:var(--ink-2);line-height:1.5}
#insights-panel .regime-head {display:flex;flex-wrap:wrap;align-items:center;gap:10px 22px;margin:10px 0 10px}
#insights-panel .regime-label {font:600 22px/1.2 var(--font);white-space:nowrap}
#insights-panel .regime-label small {display:block;font:400 13px/1.4 var(--font);color:var(--ink-2);margin-top:3px;white-space:normal}
#insights-panel .regime-scale {flex:1;min-width:220px}
#insights-panel .regime-bar {position:relative;height:12px;border-radius:6px;background:linear-gradient(90deg,#4f9a7a 0 25%,#8aa356 25% 50%,#c9924a 50% 75%,#c65a4a 75% 100%)}
#insights-panel .regime-bar i {position:absolute;top:-5px;width:4px;height:22px;margin-left:-2px;border-radius:2px;background:var(--ink-2);box-shadow:0 0 0 2px var(--surface)}
#insights-panel .regime-ticks {display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:5px;white-space:nowrap}
#insights-panel .regime-take {margin:0 0 10px;padding:9px 12px;background:var(--surface-2);border-radius:8px;font-size:14px;line-height:1.6}
#insights-panel .regime-take p {margin:0}
#insights-panel .regime-take p+p {margin-top:4px}
#insights-panel .regime-grid {display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;align-items:start}
#insights-panel .regime-table {width:100%;border-collapse:collapse;font-size:13.5px}
#insights-panel .regime-table th,#insights-panel .regime-table td {padding:6px 8px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;vertical-align:top}
#insights-panel .regime-table th:first-child,#insights-panel .regime-table td:first-child {text-align:left;white-space:normal;color:var(--ink-2)}
#insights-panel .regime-table thead th {font-size:12px;color:var(--muted);font-weight:600;line-height:1.35}
#insights-panel .regime-table thead th small {font-weight:400}
#insights-panel .regime-table td.same {font-weight:600}
#insights-panel .regime-table td small {font-size:11.5px;color:var(--muted);font-weight:400}
#insights-panel .regime-table caption {text-align:left;font-size:13px;color:var(--ink-2);padding:0 0 6px;caption-side:top;font-weight:600}
#insights-panel .regime-foot {font-size:12px;color:var(--muted);margin:8px 0 0;line-height:1.5}
#insights-panel .baseline-note {margin:8px 0 0;font-size:12px;color:var(--ink-2);line-height:1.5}
#insights-panel .method-panel table {width:100%;border-collapse:collapse;font-size:12.5px;margin:6px 0}
#insights-panel .method-panel td,#insights-panel .method-panel th {padding:4px 6px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
#insights-panel .method-panel th:first-child,#insights-panel .method-panel td:first-child {text-align:left}
#insights-panel .method-panel h3+p,#insights-panel .method-panel p+p {margin-top:8px}
#insights-panel #mi-method-list .validation {color:var(--ink-2);font-weight:600}
@media (max-width:760px) {
  #insights-panel .regime-grid {grid-template-columns:minmax(0,1fr)}
  #insights-panel .regime-label {font-size:19px}
  #insights-panel .regime-table {font-size:12.5px}
  #insights-panel .regime-panel .panel-heading {flex-wrap:wrap}
}

/* v33: a single explorer, shared controls and cases, price before volatility. */
#insights-panel .panel.insights-unified {padding:26px 30px;min-width:0;overflow:visible}
#insights-panel .explorer-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}
#insights-panel .explorer-eyebrow {font-size:12px;letter-spacing:.07em;color:var(--muted);margin-bottom:5px}
#insights-panel .insights-unified h2 {font-size:25px;letter-spacing:-.04em;margin:0}
#insights-panel .explorer-quote {display:grid;grid-template-columns:auto 28px;gap:3px 9px;text-align:right;align-items:center}
#insights-panel .explorer-quote strong {font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums}
#insights-panel .explorer-quote span {font-size:11px;color:var(--muted);grid-row:2}
#insights-panel .explorer-quote button {grid-column:2;grid-row:1 / 3}
#insights-panel .explorer-controls {justify-content:space-between;align-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:10px 14px;margin:0;gap:12px;flex-wrap:wrap}
#insights-panel .explorer-controls .date-control {display:flex;gap:9px;align-items:center;flex-wrap:wrap;font-size:13px}
#insights-panel .explorer-controls input {min-width:0;min-height:36px;padding:5px 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font:13px var(--font);color-scheme:light dark}
#insights-panel .horizon-control {display:flex;align-items:center;gap:10px;font-size:13px;color:var(--ink-2)}
#insights-panel .explorer-controls .segmented button {min-height:34px;padding:5px 15px;font:13px var(--font)}
#insights-panel .explorer-notice {display:flex;gap:8px;align-items:baseline;margin:12px 0 25px;padding:10px 13px;border-left:3px solid #9c83c8;border-radius:0 6px 6px 0;background:color-mix(in srgb,#a48bd9 8%,var(--surface));color:var(--ink-2);font-size:13px;line-height:1.55;word-break:keep-all}
#insights-panel .explorer-notice strong {font-weight:500}
#insights-panel .explorer-section-heading {display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
#insights-panel .explorer-section-heading h3 {display:flex;align-items:center;gap:9px;font-size:18px;letter-spacing:-.035em;margin:0;line-height:1.5}
#insights-panel .explorer-section-heading>span {font-size:12px;color:var(--muted)}
#insights-panel .section-step {font-size:12px;font-weight:600;color:#9979d1;letter-spacing:0}
#insights-panel .insights-unified .chart-legend {display:flex;gap:7px 16px;flex-wrap:wrap;font-size:12px;margin:11px 0 14px;color:var(--ink-2)}
#insights-panel .chart-legend .history {background:#88809a;opacity:.65}
#insights-panel .insights-unified .chart-container {min-height:0}
#insights-panel .insights-unified .chart-container svg text {font-size:12px}
#insights-panel .insights-unified .chart-container svg:focus-visible {outline:2px solid #9979d1;outline-offset:3px;border-radius:6px}
#insights-panel .explorer-takeaway {display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:15px;padding:18px 20px;background:color-mix(in srgb,#a48bd9 7%,var(--surface));border-radius:10px}
#insights-panel .takeaway-caption {font-size:12px;color:var(--muted);margin:0 0 5px}
#insights-panel .explorer-takeaway h4 {font-size:20px;line-height:1.45;letter-spacing:-.04em;margin:0;word-break:keep-all}
#insights-panel .takeaway-number {font-size:30px;font-weight:650;letter-spacing:-.035em;white-space:nowrap;font-variant-numeric:tabular-nums}
#insights-panel .explorer-cases {margin:18px 0 30px}
#insights-panel .case-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px;min-height:22px}
#insights-panel .case-heading p {margin:0;font-size:12px;color:var(--muted);line-height:1.5;word-break:keep-all}
#insights-panel .case-heading button {white-space:nowrap}
#insights-panel .case-list {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}
#insights-panel .case-chip {display:flex;flex-direction:column;gap:4px;align-items:center;padding:10px 4px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:12px var(--font);cursor:pointer;min-width:0;transition:background .15s,border-color .15s}
#insights-panel .case-chip strong {font-size:14px;font-variant-numeric:tabular-nums}
#insights-panel .case-chip:hover {border-color:#a48bd9;background:color-mix(in srgb,#a48bd9 5%,var(--surface))}
#insights-panel .case-chip[aria-pressed="true"] {border-color:#d27db4;background:color-mix(in srgb,#d27db4 10%,var(--surface));box-shadow:0 0 0 1px #d27db4}
#insights-panel .vol-section {padding-top:26px;border-top:1px solid var(--line)}
#insights-panel .vol-takeaway {background:color-mix(in srgb,#269f83 6%,var(--surface))}
#insights-panel .vol-comparison {display:flex;align-items:center;gap:18px;text-align:center;white-space:nowrap}
#insights-panel .vol-comparison div {display:flex;flex-direction:column;gap:4px}
#insights-panel .vol-comparison div span {font-size:11px;color:var(--muted)}
#insights-panel .vol-comparison strong {font-size:30px;font-variant-numeric:tabular-nums;font-weight:650;letter-spacing:-.03em}
#insights-panel .comparison-arrow {font-size:22px;color:var(--muted)}
#insights-panel .explorer-footer {display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-top:20px;font-size:11px;color:var(--muted)}
#insights-panel .explorer-method {flex:1;text-align:right;min-width:120px}
#insights-panel .explorer-method summary {cursor:pointer;display:inline-block;font-size:12px;color:var(--ink-2);text-decoration:underline;text-underline-offset:3px}
#insights-panel .explorer-method[open] {flex-basis:100%}
#insights-panel .explorer-method>div {text-align:left;font-size:12px;line-height:1.7;border-top:1px solid var(--line);margin-top:12px;padding-top:6px;color:var(--ink-2)}
#insights-panel .insights-unified [hidden] {display:none!important}
#insights-panel .insights-unified .cursor-top {display:flex;justify-content:space-between;align-items:center}
#insights-panel .insights-unified .cursor-selected {display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:8px 0;color:#d27db4;font-size:12px}
#insights-panel .insights-unified .cursor-selected strong {white-space:nowrap;font-size:15px}
@media (max-width:1000px) {
  #insights-panel .case-list {grid-template-columns:repeat(4,minmax(0,1fr))}
  #insights-panel .explorer-takeaway {flex-wrap:wrap;gap:10px}
}
@media (max-width:760px) {
  #insights-panel .panel.insights-unified {padding:18px 14px}
  #insights-panel .explorer-heading {margin-bottom:17px;gap:8px}
  #insights-panel .insights-unified h2 {font-size:22px}
  #insights-panel .explorer-eyebrow {font-size:10px}
  #insights-panel .explorer-quote strong {font-size:19px}
  #insights-panel .explorer-quote span {font-size:10px}
  #insights-panel .explorer-controls {padding:9px;gap:9px}
  #insights-panel .explorer-controls .date-control {gap:6px;font-size:12px}
  #insights-panel .horizon-control {justify-content:space-between;width:100%;font-size:12px}
  #insights-panel .explorer-controls .segmented {flex:1;display:flex;margin-left:6px}
  #insights-panel .explorer-controls .segmented button {flex:1;min-height:34px;padding:4px 10px}
  #insights-panel .explorer-notice {font-size:12px;margin:11px 0 21px;padding:9px 10px}
  #insights-panel .explorer-section-heading {gap:4px}
  #insights-panel .explorer-section-heading h3 {font-size:16px;gap:7px}
  #insights-panel .explorer-section-heading>span {font-size:11px;padding-left:23px}
  #insights-panel .insights-unified .chart-legend {gap:6px 12px;font-size:11px;margin:11px 0 13px}
  #insights-panel .insights-unified .chart-container svg text {font-size:11px}
  #insights-panel .explorer-takeaway {padding:15px;gap:10px;margin-top:12px}
  #insights-panel .explorer-takeaway h4 {font-size:19px}
  #insights-panel .takeaway-caption {font-size:11px}
  #insights-panel .takeaway-number {font-size:28px}
  #insights-panel .case-chip {padding:10px 2px;font-size:10px}
  #insights-panel .case-chip strong {font-size:13px}
  #insights-panel .case-list {gap:6px}
  #insights-panel .case-heading p {font-size:11px}
  #insights-panel .explorer-cases {margin:16px 0 25px}
  #insights-panel .vol-section {padding-top:22px}
  #insights-panel .vol-comparison {gap:22px;justify-content:flex-start;margin-top:3px}
  #insights-panel .vol-comparison strong {font-size:29px}
  #insights-panel .explorer-footer {font-size:10px;gap:10px}
}

/* v35: free detail cards carry no results; seed reference matches the chart. */
.bt-detail-locked { min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 18px 12px; text-align: center; }
.bt-detail-locked b { color: var(--ink); font-size: 14px; }
.bt-detail-locked p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.bt-lock-icon { font-size: 22px; line-height: 1; }
.cmp-detail:disabled { opacity: .55; cursor: default; }
.seed-average-key { display: inline-block; width: 22px; border-top: 2px dashed; opacity: .42; vertical-align: middle; }
.bt-data-empty { color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .bt-detail-locked { min-height: 122px; padding: 16px 4px; }
  #bt-card-seed .rcard-tools > .lg { font-size: 11px; }
}

/* v35: one feature matrix for home, plan selection and usage guide. */
.plan-comparison{--pm-yes:#176c43;--pm-no:#a43030;--pm-limit:#805707;margin-top:14px}
:root[data-theme="dark"] .plan-comparison{--pm-yes:#9bdeb8;--pm-no:#f6aaaa;--pm-limit:#efd190}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .plan-comparison{--pm-yes:#9bdeb8;--pm-no:#f6aaaa;--pm-limit:#efd190}}
.plan-comparison .pm-intro{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:12px}
.plan-comparison h3{font-size:18px;line-height:1.5;margin:0 0 6px;color:var(--ink)}
.plan-comparison p{font-size:13px;line-height:1.8;margin:0;color:var(--ink-2)}
.pm-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:4px;flex-shrink:0}
.pm-scroll-hint{display:none}
.pm-scroll{max-width:100%;border:1px solid var(--line);border-radius:10px;isolation:isolate;scrollbar-width:auto;scrollbar-color:var(--accent) var(--surface-2)}
.pm-scroll:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
table.plan-matrix{width:100%;min-width:820px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:13px;line-height:1.65}
table.plan-matrix[data-plan-columns="4"]{min-width:1040px}
table.plan-matrix th,table.plan-matrix td{white-space:normal;word-break:keep-all;overflow-wrap:break-word;text-align:center;padding:15px 17px;vertical-align:middle;border:0;border-bottom:1px solid var(--line);background:var(--surface);color:var(--ink-2)}
table.plan-matrix th:first-child{width:29%;text-align:left;position:sticky;left:0;z-index:2;border-right:1px solid var(--line);background:var(--surface)}
table.plan-matrix[data-plan-columns="4"] th:first-child{width:25%}
table.plan-matrix thead th{padding:0;vertical-align:top;z-index:3}
table.plan-matrix thead th:first-child{padding:22px 20px;vertical-align:middle;z-index:4}
.pm-feature-head>span{font-size:17px;font-weight:700;display:block;color:var(--ink)}
.pm-feature-head>small{display:block;font-size:12px;color:var(--ink-2);line-height:1.8;margin-top:10px}
.plan-matrix .tier-free{--tier:var(--tier-free)}.plan-matrix .tier-pro{--tier:var(--tier-pro)}.plan-matrix .tier-master{--tier:var(--tier-master)}.plan-matrix .tier-lite{--tier:var(--accent)}
.pm-tier-name{display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;min-height:71px;padding:13px 10px;background:var(--tier,var(--accent));color:var(--on-tier)}
.pm-tier-name b{font-size:19px;line-height:1.4;color:inherit}.pm-tier-name>span{font-size:12px;line-height:1.5;font-weight:500;letter-spacing:.02em}
.pm-planbody{padding:20px 17px 18px;display:flex;flex-direction:column;gap:10px}
.pm-planbody .plan-price{font-size:23px;line-height:1.4;color:var(--ink)}
.pm-planbody .plan-ym{font-size:12px;color:var(--ink-2);line-height:1.65;margin-top:5px}
.plan-comparison .plan-desc{font-size:13px;line-height:1.7;color:var(--ink-2);font-weight:500;min-height:44px;margin:0}
.pm-action{min-height:44px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.pm-action .btn{white-space:normal;word-break:keep-all;line-height:1.55;min-height:42px;font-size:13px}
.pm-action .btn-primary{background:var(--tier,var(--accent));border-color:var(--tier,var(--accent));color:var(--on-tier)}
.pm-action .pc-applied{font-size:12px;line-height:1.7;font-weight:650;color:var(--ink)}
.plan-matrix .pm-planhead.on .pm-planbody{background:var(--surface-2);box-shadow:inset 0 -3px var(--tier,var(--accent))}
table.plan-matrix .pm-group-row th{width:auto;position:static;padding:13px 20px;background:var(--surface-3);border-right:0;border-bottom:1px solid var(--line);font-size:14px;font-weight:750;color:var(--ink);text-align:left}
.pm-group-row th>span{position:sticky;left:20px}
.pm-feature-name{display:block;font-weight:600;color:var(--ink);font-size:13px;line-height:1.7}
.pm-feature-note{display:block;font-size:12px;font-weight:400;color:var(--ink-2);line-height:1.75;margin-top:4px}
.pm-value{display:inline-flex;justify-content:center;align-items:flex-start;gap:7px;font-size:13px;line-height:1.75;font-weight:500;max-width:100%;text-align:center}
.pm-value i{font-style:normal;font-weight:750;display:inline-grid;place-items:center;width:17px;height:17px;flex:none;border:1px solid currentColor;border-radius:50%;font-size:11px;line-height:1;margin-top:3px}
.pm-yes{color:var(--pm-yes)}.pm-no{color:var(--pm-no)}.pm-limit{color:var(--pm-limit)}
.pm-benefit{font-weight:750}.pm-difference .pm-feature-name{font-weight:750}
.plan-matrix .pm-difference td{background:var(--surface-2)}
.plan-matrix tr:hover td{background:var(--surface-2)}
.plan-matrix tbody:last-child tr:last-child>*{border-bottom:0}
.plan-comparison .pm-notes{display:grid;gap:8px;margin-top:16px;padding:16px 18px;border-radius:9px;background:var(--surface-2);border:1px solid var(--line)}
.plan-comparison .pm-notes p{font-size:12px;line-height:1.9}.plan-comparison .pm-notes b{font-weight:700;color:var(--ink)}
.modal.modal-plans{max-width:1160px}.modal-plans .modal-body{padding:17px 20px 22px}
.plan-comparison caption.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:760px){
  .plan-comparison .pm-intro{display:block}.pm-legend{gap:12px;margin-top:12px}.pm-legend .pm-value{font-size:12px}.plan-comparison h3{font-size:17px}
  .plan-comparison .pm-scroll-hint{display:block;font-size:12px;line-height:1.8;margin:10px 0}.plan-comparison .pm-scroll{margin:0;max-width:100%;border-radius:8px}
  /* 125px feature + 160px plan fits together inside a 300px modal viewport. */
  table.plan-matrix{width:605px;min-width:605px}table.plan-matrix[data-plan-columns="4"]{width:765px;min-width:765px}
  table.plan-matrix[data-plan-columns="1"]{width:285px;min-width:285px}
  table.plan-matrix th:first-child,table.plan-matrix[data-plan-columns="4"] th:first-child{width:125px}
  table.plan-matrix thead th:not(:first-child){width:160px}
  table.plan-matrix th,table.plan-matrix td{padding:14px 13px}table.plan-matrix thead th{padding:0}table.plan-matrix thead th:first-child{padding:20px 15px}
  .pm-feature-head>span{font-size:15px}.pm-tier-name{min-height:68px}.pm-tier-name b{font-size:18px}.pm-planbody{padding:18px 13px}.pm-planbody .plan-price{font-size:21px}
  .plan-comparison .plan-desc{font-size:12px;min-height:42px}.pm-action .btn{font-size:12px;min-height:44px;padding:10px 8px}
  .pm-value{font-size:13px;gap:6px}.pm-value i{width:16px;height:16px}.pm-feature-name{font-size:13px}.pm-feature-note{font-size:12px}
  table.plan-matrix .pm-group-row th{width:auto;font-size:13px;padding:12px 15px}.pm-group-row th>span{left:15px}
  .plan-comparison .pm-notes{padding:13px 14px}.plan-comparison .pm-notes p{font-size:12px}.modal-plans .modal-body{padding:14px 12px 18px}.home-plans{min-width:0;overflow:hidden}
}

/* v36: quiet tier palette; expanded matrix keeps v35 layout. */
:root { --tier-free:#355ca2; --tier-pro:#0d777e; --tier-master:#8150a0; }
:root[data-theme="dark"] { --tier-free:#8daeff; --tier-pro:#57c4b8; --tier-master:#bf8fde; }
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--tier-free:#8daeff;--tier-pro:#57c4b8;--tier-master:#bf8fde}}
.pm-tier-name{background:color-mix(in srgb,var(--tier) 22%,var(--surface));color:var(--tier);border-top:3px solid var(--tier)}
.pm-collapsed .plan-matrix tbody,.pm-collapsed .pm-notes,.pm-collapsed .pm-legend{display:none}
.pm-fold-toggle{display:block;width:100%;margin-top:14px;min-height:44px}
.cycle-log-table{min-width:900px}


/* v40 reviewed UI adjustments */
:root{--chart-selection:#a3bf38}
:root[data-theme="dark"]{--chart-selection:#d4ed91}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--chart-selection:#d4ed91}}

/* v40: compact home and tier comparison; append after the existing theme rules. */
.hero{padding:20px 22px}
.hero-kicker{font-size:12px;margin-bottom:5px}
.hero-title{font-size:clamp(22px,2vw,27px);line-height:1.32;margin-bottom:9px;word-break:keep-all}
.hero-sub{max-width:none;font-size:13.5px;line-height:1.6;margin:0 0 11px;word-break:keep-all}
.hero-actions{gap:7px;align-items:center}
.hero-join-note{font-size:12px;line-height:1.5;color:var(--ink-2);word-break:keep-all}
.hero-actions .btn{min-height:36px;padding:7px 13px}
.hero-member-next{display:flex;align-items:center;gap:12px;padding-top:10px;border-top:1px solid var(--line)}
.hero-member-next p{margin:0;font-size:13px;line-height:1.5;color:var(--ink-2);word-break:keep-all}
.hero-member-next .btn{flex:none;min-height:34px;padding:6px 13px}
.home-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:10px}
.home-feat{display:grid;grid-template-columns:24px minmax(0,1fr);align-content:start;align-items:center;gap:5px 7px;padding:12px 14px}
.home-feat .hf-icon{font-size:20px;line-height:1.2;margin:0}
.home-feat b{font-size:13.5px;margin:0}
.home-feat p{grid-column:1/-1;font-size:12.5px;line-height:1.5;word-break:keep-all}
.home-plans{margin-top:10px;padding:14px 16px}
.home-plans>.card-title{margin-bottom:8px}
.plan-comparison{margin-top:9px}
.plan-comparison .pm-intro{gap:12px;align-items:center;margin-bottom:8px}
.plan-comparison h3{font-size:16px;line-height:1.4;margin-bottom:3px}
.plan-comparison p{font-size:12.5px;line-height:1.5}
.pm-legend{gap:9px;padding-top:0}
.plan-comparison .pm-scroll-hint{display:block;font-size:11.5px;line-height:1.5;margin:0 0 7px}
.pm-hint-compact{display:none}
.plan-comparison.pm-collapsed .pm-scroll-hint{display:none}
.plan-comparison .pm-scroll{max-height:min(66vh,660px);overflow:auto;overscroll-behavior-x:contain;scroll-padding-top:68px}
.plan-comparison.pm-collapsed .pm-scroll{max-height:none}
table.plan-matrix{line-height:1.45}
table.plan-matrix th,table.plan-matrix td{padding:9px 12px}
table.plan-matrix thead th{position:sticky;top:0;z-index:4;padding:0;vertical-align:middle;box-shadow:0 1px 0 var(--line)}
table.plan-matrix thead th:first-child{position:sticky;top:0;left:0;z-index:5;padding:12px 14px}
.pm-feature-head>span{font-size:14px}
.pm-tier-name{min-height:55px;padding:7px 9px;gap:1px}
.pm-tier-name b{font-size:17px;line-height:1.35}
.pm-tier-name>span{font-size:11px;line-height:1.35}
table.plan-matrix .pm-overview .pm-planhead{padding:0;vertical-align:top}
.pm-overview .pm-summary-head{font-size:12px;line-height:1.5;font-weight:500}
.pm-planbody{padding:11px 12px;gap:6px}
.pm-planbody .plan-price{font-size:21px;line-height:1.3}
.pm-planbody .plan-ym{line-height:1.4;margin-top:3px}
.plan-comparison .plan-desc{font-size:12px;line-height:1.45;min-height:35px}
.pm-action{min-height:35px;gap:4px}
.pm-action .btn{min-height:35px;font-size:12px;line-height:1.4;padding:7px 9px}
.pm-action .pc-applied{font-size:11.5px;line-height:1.5}
table.plan-matrix .pm-group-row th{font-size:13px;padding:8px 13px}
.pm-group-row th>span{left:13px}
.pm-feature-name{font-size:12.5px;line-height:1.45}
.pm-feature-note{font-size:11.5px;line-height:1.4;margin-top:3px}
.pm-value{font-size:12.5px;line-height:1.45;gap:6px}
.pm-value i{margin-top:1px;width:16px;height:16px;font-size:10px}
.plan-comparison .pm-notes{gap:6px;margin-top:10px;padding:11px 13px}
.plan-comparison .pm-notes p{font-size:11.5px;line-height:1.65}
.pm-collapsed .plan-matrix tbody.pm-overview{display:table-row-group}
table.plan-matrix .pm-fold-row td{padding:8px;background:var(--surface);text-align:left}
.pm-fold-row .pm-fold-toggle{position:sticky;left:8px;max-width:calc(100vw - 76px);margin:0;min-height:36px;font-size:12.5px}
.pm-fold-bottom{margin-top:9px;min-height:36px;font-size:12.5px}
.pm-fold-bottom[hidden]{display:none}
@media(max-width:1000px){
  .home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .hero{padding:17px 15px}
  .hero-title{font-size:21px;line-height:1.38}
  .hero-sub{font-size:12.5px;line-height:1.55}
  .hero-member-next{gap:9px;align-items:center}
  .hero-member-next p{font-size:12px;line-height:1.5}
  .hero-member-next .btn{min-height:40px;padding:8px 12px}
  .home-grid{gap:8px}
  .home-feat{padding:10px 11px;grid-template-columns:20px minmax(0,1fr);gap:5px}
  .home-feat .hf-icon{font-size:18px}
  .home-feat b{font-size:12.5px}
  .home-feat p{font-size:11.5px;line-height:1.5}
  .home-plans{padding:12px 11px}
  .plan-comparison .pm-intro{display:block}
  .pm-legend{margin-top:7px;gap:10px}
  .plan-comparison h3{font-size:15px}
  .plan-comparison .pm-scroll-hint{font-size:11.5px;margin:6px 0}
  .plan-comparison .pm-scroll{max-height:70vh;scroll-padding-top:62px}
  .plan-comparison.pm-collapsed .pm-scroll-hint{display:block}
  .pm-collapsed .pm-hint-full{display:none}
  .pm-collapsed .pm-hint-compact{display:inline}
  table.plan-matrix th,table.plan-matrix td{padding:8px 10px}
  table.plan-matrix thead th{padding:0}
  table.plan-matrix thead th:first-child{padding:10px}
  .pm-feature-head>span{font-size:13px}
  .pm-tier-name{min-height:54px;padding:7px}
  .pm-tier-name b{font-size:16px}
  .pm-planbody{padding:10px;gap:6px}
  .plan-comparison .plan-desc{font-size:11.5px;min-height:34px}
  .pm-action .btn{font-size:12px;min-height:42px;padding:8px}
  .pm-feature-name,.pm-value{font-size:12px}
  .pm-feature-note{font-size:11px}
  table.plan-matrix .pm-group-row th{font-size:12px;padding:8px 10px}
  .pm-group-row th>span{left:10px}
  .pm-fold-row .pm-fold-toggle,.pm-fold-bottom{min-height:42px}
}

/* v40 backtest controls and comparison presentation, shared with admin. */
#settings-panel .bt-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}
#settings-panel .bt-date-range input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 7px 4px;
  font-size: 12px;
  box-sizing: border-box;
}
#settings-panel .bt-period-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
#settings-panel .bt-period-chips .chip-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.5;
  padding: 3px 5px;
}
.bt-jump button.off { opacity: 1; text-decoration: none; }
.bt-heading-lock { font-size: 13px; margin-right: 2px; }
.cmp-tbl tr[data-cmpselect] { cursor: pointer; }
.cmp-tbl tr[data-cmpselect]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cmp-tbl td.cmp-name { white-space: normal; }
.cmp-feature { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12px; font-weight: 400; white-space: normal; line-height: 1.55; max-width: 340px; }
.cmp-tbl td.cmp-name:hover b { text-decoration: none; }
.cycle-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.cycle-summary > div { padding: 9px; }
.cycle-summary span, .cycle-summary small { font-size: 11px; line-height: 1.45; }
.cycle-summary strong { font-size: clamp(14px, 1.1vw, 18px); margin: 5px 0; }
@media (max-width: 720px) {
  .cmp-member th:nth-child(8), .cmp-member td:nth-child(8) { display: table-cell; }
  .cmp-tbl .cmp-feature { font-size: 11px; }
  .cycle-summary { grid-template-columns: repeat(4, minmax(145px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .cycle-summary strong { font-size: 15px; }
}

/* v40 authenticated backtest controls and preset matrix. */
.admin-settings { min-width: 0; }
.admin-settings .admin-run-bar { position: sticky; top: 0; z-index: 4; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 3px 8px rgba(0,0,0,.04); }
.admin-run-bar > span { display: block; margin-top: 4px; color: var(--muted); text-align: center; font-size: 10.5px; }
.admin-settings .fgroup { padding: 10px 12px; }
.admin-settings .fgroup-title { margin-bottom: 8px; letter-spacing: 0; }
.admin-preset-heading { flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
.admin-preset-heading .chip { font-size: 9.5px; padding: 2px 4px; }
.admin-preset-heading > button { margin-left: auto; font-size: 10px; padding: 4px 6px; min-height: 28px; }
.admin-settings .preset-list { gap: 6px; }
.admin-settings .preset-card { padding: 9px 10px; }
.admin-settings .pc-head { gap: 5px; margin-bottom: 3px; }
.admin-settings .pc-head b { font-size: 13px; }
.admin-settings .pc-head .chip { font-size: 10px; padding: 2px 4px; }
.admin-settings .pc-desc { font-size: 11px; line-height: 1.5; margin-bottom: 5px; white-space: normal; overflow-wrap: break-word; }
.admin-settings .pc-applied { padding: 2px 0; }
.admin-settings .preset-card .btn { padding: 4px 8px; min-height: 27px; font-size: 11px; }
.admin-settings .frow { display: grid; grid-template-columns: minmax(0,1fr) 118px; align-items: center; gap: 7px; margin-bottom: 7px; }
.admin-settings .frow > label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.admin-settings .frow > label.toggle { justify-self: end; overflow: visible; }
.admin-settings .frow input[type="number"], .admin-settings .frow select { width: 100%; min-width: 0; min-height: 30px; font-size: 12px; padding: 4px 7px; }
.admin-settings .frow select { padding-right: 20px; }
.admin-advanced-fields .frow .hint { display: none; }
.admin-advanced-fields .frow > label[title] { cursor: help; }
.admin-advanced-group { border-top: 1px solid var(--line-soft); }
.admin-advanced-group > summary { padding: 11px 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.admin-advanced-group[open] > summary { background: var(--surface-2); }
.admin-advanced-fields { padding: 10px 12px 12px; }
.admin-advanced-fields .fhint { display: block; line-height: 1.55; }
.admin-advanced-fields .wgrid { gap: 4px; }
.admin-advanced-fields .wcell input { width: 100%; min-width: 0; font-size: 11px; padding: 4px 2px; }
.admin-advanced-fields .chips { flex-wrap: wrap; }
.modal.modal-preset-matrix { max-width: 1520px; }
.modal-preset-matrix .modal-body { max-height: 78vh; padding: 12px 14px; }
.matrix-note { color: var(--ink-2); font-size: 12px; line-height: 1.6; margin: 0 0 9px; }
.matrix-tools { display: flex; align-items: center; gap: 18px; margin: 9px 0 12px; flex-wrap: wrap; }
.preset-matrix-scroll { max-height: 59vh; overflow: auto; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 9px; }
.preset-matrix { width: 100%; min-width: 1250px; border-collapse: separate; border-spacing: 0; }
.preset-matrix th, .preset-matrix td { border-right: 1px solid var(--line-soft); padding: 8px; font-size: 11.5px; line-height: 1.55; min-width: 130px; vertical-align: middle; }
.preset-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: center; color: var(--ink); }
.preset-matrix tr > th:first-child { position: sticky; left: 0; background: var(--surface); min-width: 180px; max-width: 220px; z-index: 1; text-align: left; white-space: normal; }
.preset-matrix thead tr > th:first-child { z-index: 3; background: var(--surface-2); }
.preset-matrix small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.preset-matrix code { display: block; color: var(--muted); font-size: 9px; font-weight: 400; overflow-wrap: anywhere; }
.preset-matrix td { text-align: center; }
.preset-matrix .matrix-unused { color: var(--muted); background: var(--surface-2); }
.preset-matrix tr[data-diff="1"] > th { box-shadow: inset 3px 0 var(--accent); }
.preset-matrix tr[hidden] { display: none; }
@media (max-width: 900px) {
  .settings-col:has(.admin-settings) { overflow: visible; }
  .admin-settings .admin-run-bar { top: 52px; }
  .admin-settings .pc-desc { font-size: 11px; }
  .modal-preset-matrix .modal-body { padding: 10px; }
  .preset-matrix tr > th:first-child { min-width: 150px; max-width: 160px; }
}
/* v41: consistent tier colors and trading confirmation controls. */
.tier-chip.tier-free{--tier:var(--tier-free)}
.tier-chip.tier-pro{--tier:var(--tier-pro)}
.tier-chip.tier-master{--tier:var(--tier-master)}
.tier-chip.tier-lite{--tier:var(--accent)}
.tier-chip,.guest-lock .lock-availability>b.tier-chip{color:var(--tier);background:color-mix(in srgb,var(--tier) 14%,var(--surface));border-color:color-mix(in srgb,var(--tier) 36%,var(--line))}
.acct-auto-toggle{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;border:0;background:transparent;color:var(--ink-2);font:600 11.5px var(--font);padding:3px 0;min-height:30px;cursor:pointer}
.acct-auto-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}
.toggle-track{width:29px;height:17px;border-radius:12px;background:var(--line);border:1px solid var(--muted);position:relative;flex:none;transition:background .15s}
.toggle-track:after{content:"";position:absolute;left:2px;top:2px;width:11px;height:11px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px #0003;transition:transform .15s}
.acct-auto-toggle[aria-checked="true"]{color:var(--tier-pro)}
.acct-auto-toggle[aria-checked="true"] .toggle-track{background:var(--tier-pro);border-color:var(--tier-pro)}
.acct-auto-toggle[aria-checked="true"] .toggle-track:after{transform:translateX(12px)}
.acct-auto-toggle:disabled{opacity:.55;cursor:wait}
.acct-valuation{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.acct-valuation>.k{font-size:12px;color:var(--muted)}
.acct-valuation>b{font-size:21px;font-variant-numeric:tabular-nums}
.acct-valuation>span:last-child{font-size:13px;font-weight:600}
.acct-capital{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.acct-capital>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.acct-capital span{font-size:11.5px;color:var(--muted)}
.acct-capital b{font-size:14px;font-weight:650;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
.acct-auto-note{font-size:11px;line-height:1.55;color:var(--muted);margin:0;word-break:keep-all}
.acct-opened{padding:0 16px;margin:0 0 7px;font-size:11.5px;color:var(--muted)}
.account-order-list{display:grid;gap:8px;margin:16px 0}
.account-order-row{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2)}
.account-order-row>b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-index{color:var(--muted);font-size:12px;width:20px;text-align:center;font-variant-numeric:tabular-nums}
.account-order-row .btn{min-width:34px;min-height:34px}
.modal.fill-modal{max-width:800px}
.fill-close-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 14px;background:var(--surface-2);border:1px solid var(--line);border-radius:9px;margin-bottom:12px}
.fill-close-summary>div{display:flex;flex-direction:column;gap:4px}
.fill-close-summary span{font-size:12px;color:var(--muted)}
.fill-close-summary b{font-size:16px;font-variant-numeric:tabular-nums}
.fill-intro{font-size:12px;line-height:1.65;color:var(--ink-2);margin:0 0 12px;word-break:keep-all}
.fill-row.fill-row-v41{display:grid;grid-template-columns:minmax(140px,1fr) 118px 222px;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.fill-row-v41 .fr-main{font-size:13px;line-height:1.6}
.fill-row-v41 .seg{display:inline-flex;flex-wrap:nowrap;align-self:center}
.fill-row-v41 .seg button{font-size:12px;padding:7px 10px;white-space:nowrap}
.fill-order-note{font-size:11.5px;color:var(--muted)}
.fill-eligibility{display:block;font-size:11px;color:var(--muted);line-height:1.45}
.fill-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0}
.fill-inputs>label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:11px;color:var(--ink-2)}
.fill-row-v41 .fill-inputs input[type="number"]{width:100%;min-width:0;height:36px;font-size:13px;font-variant-numeric:tabular-nums}
.fill-ineligible .fill-inputs input{opacity:.7}
.fill-validation{font-size:12px;line-height:1.6;color:var(--loss);margin:10px 0 0;word-break:keep-all}
.fill-validation:empty{display:none}
.fill-confirm{display:flex;align-items:flex-start;gap:8px;margin-top:14px;font-size:13px;line-height:1.6;cursor:pointer}
.fill-confirm input{flex:none;margin-top:4px}
.fill-auto-result{display:flex;flex-direction:column;gap:7px;padding:14px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);margin-bottom:14px}
.fill-auto-result small{color:var(--muted);font-size:12px;line-height:1.6}
@media(max-width:640px){
  .fill-row.fill-row-v41{grid-template-columns:112px minmax(0,1fr);gap:9px}
  .fill-row-v41 .fr-main{grid-column:1/-1}
  .fill-row-v41 .seg button{padding:7px 8px}
  .fill-close-summary{gap:8px;padding:11px}
  .fill-close-summary b{font-size:14px}
  .fill-modal .modal-foot{gap:6px;flex-wrap:wrap}
  .fill-modal .modal-foot .btn{font-size:12px;padding:8px 10px}
  .acct-grid{grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr))}
}
/* New cash-account capital reference. */
.capital-guide{border:1px solid var(--line);border-radius:12px;padding:14px;margin:12px 0;background:var(--bg)}
.capital-input-note{margin:8px 0 12px;padding:10px 12px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:8px;background:var(--accent-soft);color:var(--ink);font-size:13px;line-height:1.65;word-break:keep-all}
.capital-input-note strong{display:block;font-size:14px}
.capital-input-note span{display:block;margin-top:4px}
.capital-guide[hidden]{display:none}
.capital-guide-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.capital-guide-title strong{display:inline-block;font-size:21px;margin-left:6px}
.capital-guide .fhint{margin:8px 0;font-size:12px;line-height:1.6}
.capital-guide-status{font-size:13px;line-height:1.6;margin:8px 0}
.capital-guide summary{font-size:12px;cursor:pointer;color:var(--muted)}

/* Account financial cards: six aligned columns, scroll together on narrow screens. */
.st-grid.st-grid-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.st-grid-six .tile { min-width: 0; padding: 10px 8px; }
.st-grid-six .tile .tv { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .st-grid.st-grid-six { grid-template-columns: repeat(6, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
.account-status-modal .modal-foot { flex-wrap: wrap; }

/* Account-level sizing preference, shared by card and management modal. */
.acct-compounding{display:flex;align-items:flex-start;flex-direction:column;gap:5px;padding:9px 0;border-bottom:1px solid var(--line)}
.acct-compounding .acct-auto-toggle{min-height:32px;font-size:12px}
.acct-compounding-note{font-size:11.5px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.acct-compounding .acct-auto-toggle:disabled{cursor:not-allowed}
/* Strategy changes are queued until the current cycle is fully closed. */
.strategy-pending{display:grid;gap:5px;padding:10px 12px;margin:8px 0;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);font-family:var(--font);line-height:1.6;min-width:0}
.strategy-pending>div{display:flex;gap:7px;flex-wrap:wrap;align-items:baseline;font-size:13px}
.strategy-pending span,.strategy-pending small{color:var(--muted)}
.strategy-pending b,.strategy-pending small{overflow-wrap:anywhere}
.strategy-pending small{font-size:11.5px}
.strategy-pending.is-blocked{border-left:3px solid var(--warn-line)}
.acct-body>.strategy-pending{margin:0}
.ticket>.strategy-pending{margin:10px 16px}
.strategy-change{margin:6px 0 14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.strategy-change>.frow>b{min-width:0;overflow-wrap:anywhere}
.strategy-change-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0;flex:1}
.strategy-change-actions select{flex:1 1 170px;min-width:0;max-width:100%}
.strategy-change-actions .btn{white-space:normal}
.strategy-change-help{display:block;margin:8px 0 0;line-height:1.65;overflow-wrap:anywhere}
@media(max-width:600px){.strategy-change-row{align-items:flex-start;flex-direction:column}.strategy-change-actions{width:100%}.strategy-change-actions select{flex-basis:100%;width:100%}.strategy-change-actions .btn{min-height:40px}}
/* v53: aligned account controls, with the sizing note below the header. */
.acct-card:not(.acct-readonly)>.acct-head{display:grid;grid-template-columns:minmax(0,1fr) max-content;column-gap:12px;row-gap:0}
.acct-card>.acct-head>.acct-name{grid-column:1;grid-row:1 / span 2;padding-top:5px;overflow-wrap:anywhere}
.acct-card>.acct-head>.acct-auto-toggle{grid-column:2;grid-row:1}
.acct-head>.acct-compounding{display:contents}
.acct-head>.acct-compounding>.acct-auto-toggle{grid-column:2;grid-row:2;justify-content:flex-end;font-size:11.5px;min-height:30px}
.acct-head>.acct-compounding>.acct-compounding-note{grid-column:1 / -1;text-align:right;margin-top:5px;padding:0 0 9px;border-bottom:1px solid var(--line)}
/* v55: task guidance, explicit order states, and reviewable cash-flow changes. */
.acct-attention{padding:12px;margin-top:10px;border:1px solid var(--line);border-left:3px solid var(--warn-line);border-radius:8px;background:var(--surface-2)}
.acct-attention>b{display:block;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.acct-attention p{margin:5px 0 8px;color:var(--muted);font-size:12.5px;line-height:1.6}.acct-attention>.btn{white-space:normal;min-height:36px}
.ticket-status{padding:14px 16px;margin-bottom:14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:10px;background:var(--surface-2)}
.ticket-status b{display:block;font-size:15px;line-height:1.5}.ticket-status p{font-size:13px;line-height:1.6;color:var(--muted);margin:6px 0 0}.ticket-status-mismatch,.ticket-status-review_required,.ticket-status-result_pending,.ticket-status-data_pending{border-left-color:var(--warn)}
.selection-checks{display:grid;gap:3px;margin:5px 0}.selection-checks .condition-met{color:var(--accent)}.selection-checks .condition-unmet{color:var(--warn);font-weight:700}.account-selection-row.is-disabled .selection-checks{opacity:1}
.onboarding-guide{margin:14px 0;padding:14px 16px}.onboarding-guide>summary{cursor:pointer;font-size:14px;font-weight:700;line-height:1.6;min-height:28px}.onboarding-guide>summary span{font-size:12px;color:var(--muted);font-weight:400;margin-left:8px}.onboarding-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:14px 0}.onboarding-step{display:flex;gap:8px}.onboarding-step>span{padding-top:7px;color:var(--accent)}.onboarding-step p{font-size:12.5px;line-height:1.6;color:var(--muted);margin:3px 0}.onboarding-step.is-done>span{font-weight:700}.onboarding-step .btn{white-space:normal;text-align:left;min-height:32px}
.recovery-guide{padding:14px;border:1px solid var(--line);border-radius:10px;margin:12px 0;font-size:13px;line-height:1.7}.recovery-guide ol{padding-left:20px;margin:8px 0}.recovery-guide li+li{margin-top:7px}.recovery-guide p{color:var(--muted);margin:8px 0 0}.flow-preview-table th,.flow-preview-table td{white-space:nowrap}.flow-preview-table tbody th{text-align:left}
@media(max-width:600px){.acct-attention>.btn{min-height:42px}.trading-preview-action{gap:7px}.ticket-status{padding:12px}.ticket-status b{font-size:14px}.onboarding-guide>summary span{display:block;margin-left:0}.flow-preview-table{font-size:12px}.recovery-guide{padding:12px}.acct-opened{line-height:1.7}}

/* v55: accepted backtest conditions, chart controls and public-price context. */
.bt-result-state {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 11px 14px; margin-bottom: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--surface-2); font-size: 12px;
  color: var(--ink-2); line-height: 1.65;
}
.bt-result-state > b { color: var(--ink); }
.bt-result-state[data-dirty="true"] { border-color: var(--warn-line); background: var(--warn-bg); }
.bt-dirty-note { display: block; color: var(--warn-ink); font-size: 12px; line-height: 1.65; margin: 7px 0 0; }
.bt-result-state .bt-dirty-note { flex-basis: 100%; margin: 0; font-weight: 600; }
.bt-dirty-note[hidden] { display: none !important; }
.bt-account-action {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.bt-account-action > div { min-width: 0; }
.bt-account-action b { color: var(--ink); font-size: 14px; }
.bt-account-action p { margin: 4px 0; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.bt-account-action small { font-size: 11px; color: var(--muted); line-height: 1.6; }
.bt-account-action > .btn { flex-shrink: 0; }
.bt-comparison-period { display: grid; gap: 7px; margin: 0 0 9px; }
.bt-comparison-period > b { font-size: 12px; color: var(--ink-2); }
.bt-comparison-note, .bt-period-help, .bt-chart-help { display: block; line-height: 1.7; }
.bt-period-chips button:disabled { opacity: .5; cursor: not-allowed; }
.bt-record-period { font-size: 12px; color: var(--ink-2); margin: 0 0 8px; font-weight: 600; }
.bt-cycle-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin: 10px 0; }
.bt-cycle-nav > span { color: var(--ink-2); font-size: 12px; }
.tq-chart > svg { max-width: 100%; }
.tq-chart > svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
.tq-tooltip.tq-tooltip-interactive { pointer-events: auto; max-width: calc(100% - 8px); box-sizing: border-box; }
.tq-tooltip-close { display: block; margin: 0 0 5px auto; padding: 3px 5px; border: 0; background: transparent; color: var(--ink-2); font: inherit; cursor: pointer; }
.tq-tooltip-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 3px; }
#insights-panel .explorer-selection,
#insights-panel .explorer-baseline { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
#insights-panel .explorer-selection { margin: 0 0 22px; }
#insights-panel .explorer-baseline { margin: 24px 0 0; }
#insights-panel .explorer-selection > summary,
#insights-panel .explorer-baseline > summary { cursor: pointer; color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.7; }
#insights-panel .explorer-selection > p,
#insights-panel .explorer-baseline > p { font-size: 12px; line-height: 1.8; color: var(--ink-2); margin: 9px 0; }
#insights-panel .explorer-selection > small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 8px; }
#insights-panel .selection-features { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
#insights-panel .selection-features > div { display: flex; flex-direction: column; gap: 5px; padding: 10px; background: var(--surface); border-radius: 6px; }
#insights-panel .selection-features span { font-size: 11px; color: var(--ink-2); line-height: 1.6; }
#insights-panel .selection-features strong { font-size: 17px; font-variant-numeric: tabular-nums; }
#insights-panel .insights-baseline-table { overflow: auto; max-width: 100%; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 6px; }
#insights-panel .insights-baseline-table:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#insights-panel .insights-baseline-table table { width: 100%; border-collapse: collapse; min-width: 500px; background: var(--surface); font-size: 12px; }
#insights-panel .insights-baseline-table caption { text-align: left; padding: 9px 11px; background: var(--surface); font-size: 11px; color: var(--ink-2); }
#insights-panel .insights-baseline-table th,
#insights-panel .insights-baseline-table td { padding: 10px 11px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#insights-panel .insights-baseline-table th:first-child { text-align: left; }
#insights-panel .insights-baseline-table thead th { font-size: 11px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); }
#insights-panel .insights-baseline-table small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 3px; }
#insights-panel .baseline-difference { font-size: 13px; margin: 12px 0 5px; color: var(--ink); }
#insights-panel .baseline-difference span,
#insights-panel .baseline-note { color: var(--ink-2); font-size: 11px; line-height: 1.75; }
#insights-panel .baseline-note { margin: 0; }
@media (max-width: 640px) {
  .bt-result-state { padding: 10px 12px; gap: 3px; }
  .bt-result-state > b, .bt-result-state > span { flex-basis: 100%; }
  .bt-account-action { align-items: stretch; flex-direction: column; gap: 9px; padding: 12px; }
  .bt-account-action > .btn { width: 100%; min-height: 40px; }
  .bt-cycle-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .bt-cycle-nav > span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .bt-cycle-nav .btn { min-height: 40px; }
  .tq-tooltip-close { min-height: 30px; padding: 4px 6px; }
  #insights-panel .explorer-selection, #insights-panel .explorer-baseline { padding: 11px; }
  #insights-panel .selection-features { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  #insights-panel .selection-features > div { padding: 9px; }
  #insights-panel .baseline-difference span { display: block; margin-top: 2px; }
}

/* v55: preserve the parent form while reading policies inside a modal. */
.modal.modal-reading { width: 100%; max-width: 860px; }
.modal.modal-reading > [hidden] { display: none !important; }
.legal-reader { min-height: 0; }
.legal-reader > .legal-reader-back:first-child { position: sticky; top: 0; z-index: 2; background: var(--surface); margin-bottom: 12px; }
.legal-reader .legal-reader-document { border: 0; box-shadow: none; padding: 0; }
.legal-reader > .legal-reader-back:last-child { margin-top: 16px; }
.legal-reader h2 { margin-top: 0; }
.auth-code-guidance { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.auth-code-guidance p { margin: 0; }
.auth-code-guidance p + p { margin-top: 6px; }
.auth-code-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-request-note { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
@media (max-width: 520px) {
  .legal-reader { padding: 14px; }
  .legal-reader .tbl-wrap { max-width: 100%; }
}

/* Beginner manual — read-only product help. */
.home-manual{appearance:none;width:100%;display:flex;align-items:center;gap:16px;margin:12px 0 18px;padding:20px 24px;border:1px solid var(--accent);border-radius:var(--radius);background:var(--accent-soft);color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .16s,border-color .16s}
.home-manual:hover{background:var(--surface-3)}
.home-manual-icon{width:44px;height:44px;display:grid;place-items:center;color:var(--accent);flex:none}
.home-manual-icon svg{width:34px;height:34px}
.home-manual-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.home-manual-copy b{font-size:16px;letter-spacing:-.025em;word-break:keep-all}
.home-manual-copy>span{font-size:13px;color:var(--ink-2);word-break:keep-all;line-height:1.6}
.home-manual-open{color:var(--accent);font-size:13px;font-weight:700;white-space:nowrap}
.home-manual-open>span{padding-left:10px;font-size:21px;vertical-align:middle}
.home-manual:focus-visible,.modal-manual button:focus-visible,.modal-manual select:focus-visible,.modal-manual summary:focus-visible,.modal-manual a:focus-visible,.modal-manual input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.manual-backdrop{padding:4vh 16px;align-items:center;overscroll-behavior:contain}
.modal.modal-manual{max-width:1120px;height:min(820px,92dvh);max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.modal-manual .modal-head{padding:16px 24px;flex-shrink:0}
.modal-manual .modal-head h3{font-size:15px;letter-spacing:-.02em}
.modal-manual .modal-x{min-width:36px;min-height:36px}
.modal-manual .modal-body{padding:0;max-height:none;min-height:0;flex:1;overflow:hidden;display:flex}
.modal-manual .modal-foot{padding:14px 24px;align-items:center;flex-shrink:0;gap:12px;background:var(--surface)}
.modal-manual .modal-foot .btn{min-height:42px;font-size:13px}
.manual-page{margin:auto;color:var(--ink-2);font-family:var(--mono);font-size:12px;white-space:nowrap}
.manual-layout{display:grid;grid-template-columns:216px minmax(0,1fr);width:100%;min-height:0}
.manual-nav{padding:28px 15px 24px;border-right:1px solid var(--line);background:var(--surface-2);overflow:auto}
.manual-nav-label{color:var(--ink-2);font-size:11px;font-weight:700;letter-spacing:.04em;margin:0 12px 18px}
.manual-nav button{appearance:none;display:flex;width:100%;gap:10px;align-items:center;min-height:47px;margin:4px 0;border:1px solid transparent;border-radius:8px;padding:10px;background:transparent;color:var(--ink-2);font:inherit;font-size:12px;text-align:left;cursor:pointer;line-height:1.5}
.manual-nav button:hover{background:var(--surface)}
.manual-nav button[aria-current="step"]{color:var(--accent);border-color:var(--line);background:var(--surface);font-weight:700;box-shadow:var(--shadow)}
.manual-step-no{font-family:var(--mono);font-size:11px;opacity:.8}
.manual-nav-note{font-size:11px;line-height:1.9;color:var(--ink-2);padding:22px 12px 0;margin:18px 0 0;border-top:1px solid var(--line)}
.manual-mobile-nav{display:none}
.manual-content{padding:32px 42px 38px;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
.manual-chapter{max-width:760px;margin:0 auto;font-size:14px;line-height:1.8;color:var(--ink-2);word-break:keep-all;overflow-wrap:anywhere}
.manual-chapter[hidden],.manual-chapter [hidden]{display:none!important}
.manual-eyebrow{display:inline-block;color:var(--accent);font:600 11px/1.5 var(--mono);letter-spacing:.08em;margin-bottom:13px}
.manual-chapter h2{color:var(--ink);font-size:30px;line-height:1.35;letter-spacing:-.04em;margin:0 0 12px;font-weight:700;outline:none}
.manual-chapter h2:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:3px}
.manual-chapter h3{font-size:16px;color:var(--ink);margin:27px 0 12px;letter-spacing:-.02em}
.manual-chapter p{margin:0 0 12px}
.manual-chapter b,.manual-chapter strong{color:var(--ink);font-weight:700}
.manual-chapter .manual-lead{font-size:14px;line-height:1.8;margin-bottom:26px;color:var(--ink-2)}
.manual-route{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 22px}
.manual-route>div{padding:18px 15px 15px;background:var(--surface-2);border:1px solid var(--line);border-radius:10px}
.manual-route span{display:block;font-size:10px;color:var(--accent);font-weight:700;margin-bottom:9px}
.manual-route b{display:block;font-size:17px;letter-spacing:-.03em}
.manual-route p{font-size:12px;line-height:1.8;margin:6px 0 0}
.manual-note{border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:0 8px 8px 0;padding:15px 18px;background:var(--accent-soft);margin:19px 0}
.manual-note>b{display:block;font-size:13px;margin-bottom:5px;color:var(--ink)}
.manual-note p{font-size:13px;line-height:1.9;margin:0}
.manual-note-warn{background:var(--warn-bg);border-color:var(--warn-line);border-left-color:var(--warn-ink);color:var(--warn-ink)}
.manual-note-warn b,.manual-note-warn strong{color:inherit}
.manual-glossary{margin:0}
.manual-glossary>div{display:grid;grid-template-columns:112px 1fr;gap:15px;padding:12px 0;border-bottom:1px solid var(--line-soft);font-size:13px}
.manual-glossary dt{font-weight:700;color:var(--ink)}
.manual-glossary dd{margin:0;line-height:1.85}
.manual-steps{counter-reset:manualStep;list-style:none;margin:0;padding:0}
.manual-steps>li{counter-increment:manualStep;position:relative;padding:0 0 20px 42px;margin:0 0 6px;list-style:none}
.manual-steps>li::before{content:counter(manualStep);position:absolute;left:0;top:0;width:27px;height:27px;border:1px solid var(--line);background:var(--surface-2);border-radius:50%;display:grid;place-items:center;font:600 12px var(--mono);color:var(--accent)}
.manual-steps>li>b{display:block;font-size:14px;line-height:1.8;margin:0 0 5px}
.manual-steps>li>p{font-size:13px;line-height:1.9;margin:0}
.manual-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.manual-menu-grid>div{padding:13px 15px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);font-size:13px}
.manual-menu-grid p{font-size:12px;margin:4px 0 0}
.manual-chapter .manual-small{font-size:12px;line-height:1.9;margin:16px 0;color:var(--ink-2)}
.manual-source{font-size:11px!important;color:var(--ink-2);margin-top:14px!important}
.manual-source a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.manual-path{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:13px 16px;border:1px solid var(--line);border-radius:8px;font-size:12px;color:var(--ink);background:var(--surface-2);margin:0 0 24px}
.manual-path span{color:var(--accent)}
.manual-example{padding:20px;border:1px solid var(--line);border-radius:10px;margin:20px 0;background:var(--surface-2)}
.manual-example-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:17px}
.manual-example-head>b{font-size:14px}.manual-example-head>span{font-size:10px;color:var(--ink-2);border:1px solid var(--line);padding:2px 6px;border-radius:4px}
.manual-example-dates{font-size:12px;margin:0 0 16px}.manual-example-dates p{margin:2px 0}.manual-example-dates b{display:inline-block;min-width:72px}
.manual-order-head,.manual-order-row{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px}
.manual-order-head{font-size:11px;padding:7px 12px;border-top:1px solid var(--line)}
.manual-order-row{font-size:18px;padding:15px 12px;background:var(--surface);border-radius:6px;border:1px solid var(--line);align-items:center}
.manual-order-row b{color:var(--gain);font-size:15px}.manual-order-row strong{font-family:var(--mono);letter-spacing:-.04em}
.manual-example .manual-example-meaning{margin:15px 0 0;font-size:13px;line-height:1.8}
.manual-order-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.manual-order-types>div{border-top:2px solid var(--accent);padding:12px;background:var(--surface-2);border-radius:0 0 8px 8px}
.manual-order-types b{font-size:13px}.manual-order-types p{font-size:12px;line-height:1.8;margin:6px 0 0}
.manual-practice{padding:18px;border:1px solid var(--line);border-radius:10px;margin:22px 0;background:var(--surface-2)}
.manual-practice>b{font-size:13px;color:var(--accent)}.manual-practice>p{font-size:13px;margin:6px 0 12px}.manual-practice>div{display:flex;gap:8px;flex-wrap:wrap}
.manual-practice .btn[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.manual-practice .manual-answer{font-size:12px;line-height:1.9;margin:12px 0 0;min-height:23px}
.manual-branch{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 20px;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.manual-branch>span{font-size:12px;font-weight:700;color:var(--ink)}.manual-choice{display:flex;gap:6px}
.manual-choice .btn.on{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.manual-faq{border-bottom:1px solid var(--line);margin:0}
.manual-faq summary{padding:17px 24px 17px 0;cursor:pointer;color:var(--ink);font-size:13px;font-weight:500;line-height:1.8}
.manual-faq>div{font-size:13px;padding:0 0 16px;line-height:1.9}.manual-faq p{margin:0 0 9px}
.manual-checklist{padding:6px 18px 0;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.manual-checklist label{display:flex;gap:13px;align-items:flex-start;padding:16px 0;border-bottom:1px solid var(--line);cursor:pointer}
.manual-checklist input{width:18px;height:18px;margin-top:4px;flex:none;accent-color:var(--accent)}
.manual-checklist b{display:block;font-size:13px}.manual-checklist small{display:block;font-size:12px;line-height:1.8;margin-top:3px}
.manual-checklist>p{color:var(--accent);font-size:12px;margin:12px 0!important}
.manual-page-view{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.manual-page-head{padding:25px 30px 23px;border-bottom:1px solid var(--line)}
.manual-page-head h1{margin:0 0 7px;font-size:23px;line-height:1.4;letter-spacing:-.035em;color:var(--ink)}
.manual-page-head p{margin:0;color:var(--ink-2);font-size:13px;line-height:1.8;word-break:keep-all}
.manual-page-view .manual-layout{align-items:start;grid-template-columns:216px minmax(0,1fr)}
.manual-page-view .manual-nav{position:sticky;top:16px;max-height:calc(100vh - 100px);border-radius:0 0 0 var(--radius)}
.manual-page-view .manual-content{overflow:visible;padding:36px 42px 45px;scrollbar-gutter:auto}
.manual-page-view .manual-chapter{max-width:820px}
.manual-page-view .manual-chapter h2{scroll-margin-top:24px}
.manual-page-foot{display:flex;align-items:center;gap:12px;padding:15px 24px;border-top:1px solid var(--line);border-radius:0 0 var(--radius) var(--radius);background:var(--surface);position:sticky;bottom:0;z-index:2}
.manual-page-foot .btn{min-height:42px;font-size:13px}
.manual-page-view button:focus-visible,.manual-page-view select:focus-visible,.manual-page-view summary:focus-visible,.manual-page-view a:focus-visible,.manual-page-view input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:800px){
  .manual-layout{grid-template-columns:180px minmax(0,1fr)}.manual-nav{padding:23px 10px}.manual-nav button{font-size:11px;padding:9px 7px;gap:8px}.manual-content{padding:26px 26px 32px}.manual-chapter h2{font-size:26px}.manual-route{gap:7px}.manual-route>div{padding:14px 10px}.manual-route b{font-size:15px}
  .manual-page-view .manual-layout{grid-template-columns:180px minmax(0,1fr)}.manual-page-view .manual-content{padding:28px 26px 35px}
}
@media(max-width:600px){
  .manual-page-head{padding:21px 18px}.manual-page-head h1{font-size:21px}.manual-page-head p{font-size:12px}.manual-page-view .manual-layout{align-items:stretch}.manual-page-view .manual-mobile-nav{position:sticky;top:0;z-index:2}.manual-page-view .manual-content{padding:25px 20px 35px}.manual-page-view .manual-chapter h2{scroll-margin-top:85px}.manual-page-foot{padding:11px 12px;gap:8px}.manual-page-foot .btn{font-size:11px;padding:8px 10px}
  .home-manual{padding:16px 14px;gap:10px;flex-wrap:wrap}.home-manual-icon{width:34px}.home-manual-icon svg{width:28px}.home-manual-copy b{font-size:14px;line-height:1.6}.home-manual-copy>span{font-size:12px}.home-manual-open{font-size:12px;margin-left:44px;flex-basis:100%;line-height:1.2}.home-manual-open>span{font-size:16px}
  .manual-backdrop{padding:6px}.modal.modal-manual{height:calc(100dvh - 12px);max-height:calc(100vh - 12px);border-radius:12px}.modal-manual .modal-head{padding:10px 16px}.modal-manual .modal-head h3{font-size:14px}.modal-manual .modal-foot{padding:11px 12px;gap:8px}.modal-manual .modal-foot .btn{font-size:11px;padding:8px 10px}.manual-page{font-size:10px;margin:0 auto}.manual-layout{display:flex;flex-direction:column}.manual-nav{display:none}.manual-mobile-nav{display:flex;gap:12px;align-items:center;padding:12px 17px;background:var(--surface-2);border-bottom:1px solid var(--line);flex-shrink:0}.manual-mobile-nav label{font-size:12px;font-weight:700;color:var(--ink-2)}.manual-mobile-nav select{flex:1;width:auto;min-width:0;min-height:36px;font-size:12px;padding:7px 10px}.manual-content{padding:23px 20px 30px;flex:1}.manual-eyebrow{font-size:10px;margin-bottom:10px}.manual-chapter h2{font-size:27px}.manual-chapter .manual-lead{font-size:12px;line-height:1.85;margin-bottom:22px}.manual-chapter h3{font-size:15px}.manual-route{gap:7px}.manual-route>div{padding:13px 9px}.manual-route span{font-size:9px;line-height:1.6;margin-bottom:6px}.manual-route b{font-size:14px}.manual-route p{font-size:10px;line-height:1.85}.manual-route br{display:none}.manual-note{padding:13px 14px}.manual-note p{font-size:12px}.manual-note>b{font-size:12px}.manual-glossary>div{grid-template-columns:81px 1fr;gap:10px;font-size:12px}.manual-steps>li{padding-left:35px;padding-bottom:18px}.manual-steps>li>b{font-size:13px}.manual-steps>li>p{font-size:12px}.manual-menu-grid{gap:8px}.manual-menu-grid>div{padding:11px 12px}.manual-order-types{grid-template-columns:1fr;gap:8px}.manual-order-types>div{border-top:0;border-left:2px solid var(--accent);padding:11px 13px}.manual-order-types p{margin-top:3px}.manual-example{padding:15px}.manual-order-row{font-size:17px;padding:13px 8px}.manual-order-row b{font-size:13px}.manual-example .manual-example-meaning{font-size:12px}.manual-example-head>span{font-size:9px}.manual-branch{flex-wrap:wrap}.manual-faq summary{font-size:12px}.manual-faq>div{font-size:12px}.manual-checklist{padding:4px 13px 0}.manual-checklist label{gap:10px}.manual-checklist b{font-size:12px}.manual-checklist small{font-size:11px}
}

/* Keep example quantity and price readable on narrow screens. */
.manual-example .manual-order-row strong { white-space: nowrap; }

/* v61: entry investment notice; controls remain visible while the text scrolls. */
.modal.modal-entry-notice{max-width:660px;max-height:92dvh;display:flex;flex-direction:column;overflow:hidden}
.modal-entry-notice .modal-head,.modal-entry-notice .modal-foot{flex-shrink:0}
.modal-entry-notice .modal-body{max-height:none;min-height:0;overflow-y:auto;overscroll-behavior:contain;line-height:1.7}
.entry-notice-status{display:inline-block;margin:0 0 12px;padding:5px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface-2);font-size:12px;font-weight:700}
.entry-notice-intro{margin:0 0 16px;color:var(--ink)}
.entry-notice-points{display:grid;gap:13px}
.entry-notice-points section{padding-top:12px;border-top:1px solid var(--line-soft)}
.entry-notice-points h4{margin:0 0 4px;font-size:14px;color:var(--ink)}
.entry-notice-points p{margin:0;font-size:13px}
.entry-notice-rights{margin:16px 0 0;font-size:12px;color:var(--muted)}
.entry-notice-rights a{display:inline-block;margin-left:4px;color:var(--accent)}
.entry-notice-summary>p{margin:0 0 14px;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
.entry-notice-channel{margin:4px 0 16px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.entry-notice-channel p{margin:0 0 8px;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.entry-notice-channel a{display:inline-block;color:var(--accent);font-weight:700;line-height:1.7}
.entry-notice-channel small{display:block;margin-top:5px;font-size:11px;color:var(--muted)}
.entry-notice-summary>.entry-notice-rights{margin-bottom:0}
.entry-notice-summary .entry-notice-rights a{margin:6px 0 0}
.modal-entry-notice .modal-foot{align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.modal-entry-notice .modal-foot .btn{flex-shrink:0}
.entry-notice-hide{display:flex;align-items:flex-start;gap:8px;cursor:pointer;font-size:13px;line-height:1.5}
.entry-notice-hide input{margin-top:3px;width:16px;height:16px;flex-shrink:0}
.entry-notice-hide small{display:block;font-size:11px;color:var(--muted)}
.foot-notice-btn{border:0;background:none;color:inherit;padding:0;font:inherit;text-decoration:underline;cursor:pointer}
.foot-notice-btn:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.modal-entry-notice .modal-head{padding:14px 16px}.modal-entry-notice .modal-body{padding:14px 16px}.modal-entry-notice .modal-foot{padding:12px 16px;gap:8px}.entry-notice-hide{font-size:12px;flex-basis:100%}.modal-entry-notice .modal-foot .btn{min-width:65px}}
/* Refund dates and evidence stay readable on member and operator screens. */
.refund-policy-summary{padding:10px 14px;margin:14px 0;background:var(--surface-2);border-radius:10px;line-height:1.65;font-size:13px}
.refund-policy-summary p{margin:8px 0}
.refund-choices{display:grid;gap:10px;margin:14px 0}
.refund-choices>label{display:flex;align-items:flex-start;gap:10px;padding:13px;border:1px solid var(--line);border-radius:9px;line-height:1.6;cursor:pointer}
.refund-choices input{flex-shrink:0;margin-top:5px}
.refund-consent{align-items:flex-start;line-height:1.65}
.refund-request-status{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:10px}
.refund-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0}
.refund-summary dt{font-size:12px;color:var(--muted)}
.refund-summary dd{margin:4px 0 0;font-weight:600;overflow-wrap:anywhere}
.usage-table-scroll{max-width:100%;overflow:auto;margin:12px 0}
.usage-table{min-width:760px}
.usage-table td:last-child{text-align:left;white-space:normal;min-width:190px}
.usage-table small{display:block;color:var(--muted);font-size:11px;line-height:1.6}
.admin-refund-reason{display:grid;gap:6px;margin:12px 0;font-size:13px}
.admin-refund-reason input{width:100%;min-width:0}
.sheet-usage-note{display:block;margin:12px 0 0;line-height:1.6}
.sheet-mode-controls{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;margin:10px 0 12px;padding:0 16px}
.bulk-order-card .sheet-mode-controls{padding:0}
.sheet-mode-controls>span{font-size:12px;font-weight:600}
.sheet-mode-controls .seg{display:inline-flex;flex:none}
.sheet-mode-controls .seg button{min-height:34px;min-width:62px;font-size:12px}
.sheet-mode-controls>small{flex:1 1 180px;font-size:11px;line-height:1.5;color:var(--muted);word-break:keep-all}
.sheet-mode-note,.sheet-mode-fallback,.sheet-model-record-note{font-size:12px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.sheet-mode-note{margin:10px 0}
.sheet-mode-note p{margin:5px 0}
.sheet-mode-note details{border-left:2px solid var(--line);padding-left:10px}
.sheet-mode-note summary{cursor:pointer;color:var(--ink-2)}
.sheet-mode-fallback{padding:9px 11px;border:1px solid var(--line);border-radius:7px;background:var(--surface-2)}
.sheet-mode-note-compact{font-size:11px;line-height:1.55;margin:8px 0 0}
.sheet-model-record-note{padding:10px 12px;background:var(--surface-2);border-radius:8px}
.fill-mode-choice{padding:13px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);margin-bottom:12px;font-size:13px;line-height:1.65}
.fill-mode-choice>p{margin:7px 0 10px;color:var(--muted);font-size:12px;word-break:keep-all}
.fill-mode-choice>div{display:flex;flex-wrap:wrap;gap:8px}
.fill-mode-choice .btn{white-space:normal;font-size:12px;line-height:1.5;min-height:36px}
.fill-mode-choice [aria-pressed="true"]{border-color:var(--accent);color:var(--accent)}
.fill-modal [hidden]{display:none!important}
@media(max-width:540px){
  .sheet-mode-controls{gap:7px 10px}
  .sheet-mode-controls>small{flex-basis:100%}
  .fill-mode-choice>div>.btn{flex:1 1 100%}
}
@media(max-width:600px){.refund-summary{grid-template-columns:1fr}.refund-choices>label{padding:10px}.refund-policy-summary{padding:8px 11px}}
/* v72: feature inquiry replies and linked support context. */
.support-queue{display:grid;gap:12px;margin-top:12px}
.support-ticket{min-width:0}
.support-ticket-heading,.support-customer,.support-actions,.support-reply-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.support-ticket-heading,.support-customer{justify-content:space-between}
.support-customer{margin-top:12px}
.support-customer>div:first-child{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.support-customer span,.support-reference{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.support-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin:10px 0}
.support-ticket>.support-message{padding:12px;border:1px solid var(--line);border-radius:8px}
.support-reply-tools{margin:16px 0 10px;gap:12px}
.support-reply-tools label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.support-reply-tools select{max-width:100%}
.support-reply-label{display:grid;gap:8px;font-size:13px}
.support-reply-label textarea{width:100%;min-height:116px;resize:vertical;line-height:1.6;box-sizing:border-box}
.support-latest,.support-member-reply{border-left:3px solid var(--line);padding:3px 12px;margin-top:12px;overflow-wrap:anywhere}
.support-latest b{font-size:12px;color:var(--muted)}
.support-save-note{min-height:18px;overflow-wrap:anywhere}
.support-history{margin-top:8px}
.customer-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.customer-actions .btn{white-space:normal;overflow-wrap:anywhere}
.customer-error{border:1px solid var(--warn-line);border-radius:10px;background:var(--warn-bg);padding:16px;overflow-wrap:anywhere}
.customer-error h4{margin:0 0 8px}.customer-error p{margin:8px 0;line-height:1.65}.form-error{margin-top:16px}
.customer-learning,.customer-updates{margin-top:18px}
.customer-learning h3,.customer-updates h3{margin:0 0 8px;font-size:17px}.customer-learning p,.customer-updates p{color:var(--ink-2);line-height:1.65}
.customer-learning-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0;list-style:none;margin:16px 0}
.customer-learning-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:14px;background:var(--surface-2);border-radius:10px;min-width:0}
.customer-learning-steps b{font-size:14px}.customer-learning-steps span{font-size:12px;line-height:1.65;flex:1;color:var(--ink-2)}
.customer-learning-steps .btn{white-space:normal}.modal.customer-learning-modal{max-width:820px}.customer-learning-modal .customer-learning{margin:0;padding:0;border:0;box-shadow:none}
.customer-updates h3 small{margin-left:8px;font-size:12px;font-weight:400;color:var(--muted)}.customer-updates li{font-size:13px;line-height:1.85}
.entry-notice-details{margin:12px 0}.entry-notice-details summary,.support-compose>summary,.support-member-reply>summary{cursor:pointer;font-weight:600;line-height:1.65;padding:8px 0}
.support-updates-button[hidden],[data-support-count][hidden]{display:none!important}
[data-support-count],.support-new{display:inline-block;font-size:11px;line-height:1.4;margin-left:6px;padding:3px 6px;border-radius:999px;color:var(--accent);background:var(--accent-soft);white-space:nowrap}
.modal.support-member-modal{max-width:720px}.support-service-note{font-size:13px;line-height:1.7}.support-compose{padding:8px 0 18px;border-bottom:1px solid var(--line);margin-bottom:18px}.support-member-reply .support-message{margin-top:8px}.support-read-error:empty{display:none}.support-read-error{color:var(--bad);font-size:12px;line-height:1.7}.support-history:focus{outline:2px solid var(--accent);outline-offset:2px}
.review-modal .modal-foot{display:flex;flex-direction:column;align-items:stretch;gap:12px}
.review-help-actions,.review-result-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
.review-help-actions>span,.review-result-actions>span{flex-basis:100%;font-size:12px;color:var(--muted)}
.review-modal .modal-foot .btn{white-space:normal;overflow-wrap:anywhere;min-width:0}
@media(max-width:700px){.customer-learning-steps{grid-template-columns:1fr}.customer-learning-steps li{gap:7px}.customer-learning-steps span{flex:initial}.customer-learning-modal .modal-body{padding:14px}.customer-learning h3{font-size:16px}}
@media(max-width:600px){.review-modal .modal-foot{padding:12px}.review-help-actions,.review-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.review-help-actions>span,.review-result-actions>span{grid-column:1/-1}.review-modal .modal-foot .btn{font-size:12px;padding:10px 8px;min-height:42px}.customer-actions .btn{max-width:100%}.support-updates-button{padding:5px 7px}.support-updates-button [data-support-count]{margin:0}.customer-error{padding:12px}}
.support-linked-note{font-size:13px;color:var(--muted)}
/* customer-accounts-v76: compact counts and anchored read-only account dialog. */
.customer-accounts-v75 .customer-col-name{width:11%}.customer-accounts-v75 .customer-col-email{width:18%}.customer-accounts-v75 .customer-col-tier{width:8%}.customer-accounts-v75 .customer-col-created{width:9%}.customer-accounts-v75 .customer-col-seen{width:10%}.customer-accounts-v75 .customer-col-equity{width:11%}.customer-accounts-v75 .customer-col-accounts{width:10%}.customer-accounts-v75 .customer-col-note{width:15%}.customer-accounts-v75 .customer-col-action{width:8%}
.customer-accounts-v75 .customer-accounts-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;max-width:100%;min-height:34px;padding:5px 8px;font-size:11px;white-space:normal}.customer-accounts-toggle b{font-variant-numeric:tabular-nums}.customer-accounts-toggle[aria-expanded="true"]{background:var(--surface-2);border-color:var(--ink-2)}
.customer-account-popover{position:fixed;z-index:1300;display:flex;flex-direction:column;box-sizing:border-box;max-width:calc(100vw - 24px);overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 12px 38px rgba(0,0,0,.2)}.customer-account-popover-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 10px;border-bottom:1px solid var(--line);flex:none}.customer-account-popover-head>div{min-width:0}.customer-account-popover-head h3{margin:0;font-size:15px;line-height:1.5;overflow-wrap:anywhere}.customer-account-popover-head p{margin:3px 0 0;font-size:11px;color:var(--muted)}.customer-account-popover-head .btn{flex:none}.customer-account-popover-content{padding:12px 16px;min-height:0;overflow-y:auto;overscroll-behavior:contain}.customer-accounts-caption{margin:0 0 8px;font-size:11px;line-height:1.6;color:var(--muted)}.customer-accounts-lines{display:grid;gap:0}.customer-account-line{display:grid;grid-template-columns:42px minmax(0,1.6fr) minmax(70px,1fr) minmax(78px,.6fr);gap:10px;align-items:baseline;padding:8px 0;font-size:12px;line-height:1.65}.customer-account-line+.customer-account-line{border-top:1px solid var(--line)}.customer-account-line>span{min-width:0;overflow-wrap:anywhere}.customer-account-number{color:var(--muted)}.customer-account-name{font-weight:600;color:var(--ink)}.customer-account-value{text-align:right;font-variant-numeric:tabular-nums}.customer-accounts-error{margin:0;font-size:12px;line-height:1.7}.customer-accounts-error .btn{margin-left:6px}
@media(max-width:760px){.customer-account-popover-head{padding:11px 12px 8px}.customer-account-popover-content{padding:10px 12px}.customer-account-line{grid-template-columns:35px minmax(0,1fr) minmax(42px,.65fr) 66px;gap:6px;font-size:11px}.customer-account-value .fhint{font-size:10px}.customer-accounts-v75 .customer-accounts-toggle{min-height:36px}.customer-accounts-caption{font-size:10.5px}}
@media(max-width:600px){.support-customer{align-items:flex-start}.support-ticket-heading{align-items:flex-start}.support-ticket .support-actions{width:100%}.support-reply-tools{align-items:flex-start}.support-reply-tools label{width:100%;justify-content:space-between}.support-reply-tools select{min-width:0;max-width:70%}.support-ticket .support-actions .btn{white-space:normal}}

/* Account-separated order sheets: compact cards, persistent selection and readable figures. */
.modal.bulk-orders-modal {max-width:940px;min-width:0}
.bulk-orders-modal .modal-body {min-width:0;overscroll-behavior:contain}
.bulk-order-selection {border:1px solid var(--line);border-radius:9px;background:var(--surface-2);padding:0 12px}
.bulk-order-selection>summary {padding:10px 0;cursor:pointer;font-size:13px;font-weight:600;line-height:1.45}
#bulk-order-count {margin-left:7px;font-size:11px;font-weight:400;color:var(--muted);white-space:nowrap}
.bulk-order-selection-actions {display:flex;flex-wrap:wrap;gap:7px;margin:0 0 9px}
.bulk-order-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px;max-height:220px;overflow-y:auto;padding:0 0 12px}
.bulk-order-choices>label {display:flex;align-items:flex-start;gap:7px;min-width:0;font-size:12px;line-height:1.55;cursor:pointer}
.bulk-order-choices input {flex:none;margin:3px 0 0;width:15px;height:15px;accent-color:var(--accent)}
.bulk-order-choices span {min-width:0;overflow-wrap:anywhere}
.bulk-order-choices>p {grid-column:1/-1;margin:0;font-size:12px;color:var(--muted);line-height:1.6}
.bulk-order-toolbar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin:12px 0 8px}
.bulk-order-toolbar p {flex:1 1 240px;margin:0;font-size:12px;color:var(--muted);line-height:1.6}
.bulk-order-toolbar .btn {flex:none}
.bulk-order-receipt {margin:0 0 10px;font-size:11px;color:var(--muted);line-height:1.55;overflow-wrap:anywhere}
.bulk-order-receipt:empty {display:none}
.bulk-order-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;min-width:0}
.bulk-order-card {min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface)}
.bulk-order-card>header {display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.bulk-order-card>header>div {flex:1;min-width:0}
.bulk-order-card h4 {margin:0;font-size:13px;line-height:1.5;word-break:keep-all;overflow-wrap:anywhere}
.bulk-order-card>header span {display:block;margin-top:2px;font-size:11px;color:var(--muted);line-height:1.45;overflow-wrap:anywhere}
.bulk-order-card>header>b {flex:none;font-size:11px;font-weight:500;color:var(--ink-2);line-height:1.7;white-space:nowrap}
.bulk-order-meta {margin:7px 0 8px;font-size:11px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.bulk-order-card table {width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}
.bulk-order-card th,.bulk-order-card td {padding:6px 8px;white-space:nowrap;text-align:right;border-bottom:1px solid var(--line-soft)}
.bulk-order-card th {color:var(--muted);font-size:11px;font-weight:500;background:var(--surface-2)}
.bulk-order-card th:first-child,.bulk-order-card td:first-child {text-align:left;padding-left:6px}
.bulk-order-card th:last-child,.bulk-order-card td:last-child {padding-right:6px}
.bulk-order-card .oty-buy,.bulk-order-card .oty-sell {display:inline-block;border-radius:4px;padding:2px 5px;font-size:11px;line-height:1.5}
.bulk-order-card>.btn {margin-top:8px;font-size:11px;padding:5px 8px;min-height:30px}
.bulk-order-warning {margin:0 0 8px;padding:7px 9px;border-radius:6px;background:var(--warn-bg);color:var(--warn-ink);font-size:11px;line-height:1.55;overflow-wrap:anywhere}
.bulk-order-empty {margin:4px 0;font-size:12px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
.bulk-order-grid>.bulk-order-empty {grid-column:1/-1}
.bulk-order-card>p[role="status"] {font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.bulk-order-footnote {margin:12px 0 0;padding-top:10px;border-top:1px solid var(--line-soft);font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
#cs-message::placeholder {color:var(--muted);opacity:1}
@media(max-width:600px) {
  .bulk-orders-modal .modal-head {padding:13px 12px 10px}
  .bulk-orders-modal .modal-body {padding:12px}
  .bulk-orders-modal .modal-foot {padding:10px 12px 12px}
  .bulk-order-grid,.bulk-order-choices {grid-template-columns:minmax(0,1fr)}
  .bulk-order-grid {gap:10px}
  .bulk-order-card {padding:10px}
  .bulk-order-card>header {gap:6px}
  .bulk-order-card h4 {font-size:12px}
  .bulk-order-card>header>b {font-size:10.5px}
  .bulk-order-card th,.bulk-order-card td {padding:6px}
  .bulk-order-toolbar p {flex-basis:100%}
}
.legacy-records-modal {width:min(760px,96vw);max-width:760px;max-height:92dvh;display:flex;flex-direction:column;overflow:hidden}
.legacy-records-modal [hidden] {display:none!important}
.legacy-records-modal .modal-head {flex-shrink:0}
.legacy-records-modal .modal-x,.legacy-records-modal button,.legacy-records-section summary {min-height:44px}
.legacy-records-modal .modal-x {min-width:44px}
.legacy-records-modal .modal-body {max-height:none;min-height:0;overscroll-behavior:contain;overflow-wrap:anywhere}
.legacy-records-note {padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);margin:12px 0 18px;line-height:1.65}
.legacy-records-note p {margin:8px 0 0;font-size:13px}
.legacy-records-card {padding:16px;border:1px solid var(--line);border-radius:12px;margin:12px 0}
.legacy-records-card h4 {margin:0;font-size:16px}
.legacy-records-card>p {font-size:13px}
.legacy-records-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 10px;margin:16px 0}
.legacy-records-metrics dt,.legacy-records-row dt {font-size:12px;color:var(--muted)}
.legacy-records-metrics dd,.legacy-records-row dd {margin:5px 0 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.legacy-records-section {border-top:1px solid var(--line);margin-top:8px}
.legacy-records-section summary {cursor:pointer;padding:12px 0;font-weight:600}
.legacy-records-section summary span {font-size:12px;color:var(--muted);margin-left:6px}
.legacy-records-row {padding:12px;border:1px solid var(--line);border-radius:10px;margin:8px 0}
.legacy-records-row>dl {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:0}
.legacy-records-empty {padding:18px 0;line-height:1.7}
@media(max-width:600px){
  .legacy-records-bg {padding:8px}
  .legacy-records-modal {width:100%;max-height:calc(100dvh - 16px)}
  .legacy-records-modal .modal-head {padding:10px 12px}
  .legacy-records-modal .modal-body {padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .legacy-records-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
  .legacy-records-card {padding:12px}
  .legacy-records-card>button {width:100%}
}

/* v95: a compact four-step manual, shared by the page and home dialog. */
.quick-manual{max-width:1080px;margin:0 auto;color:var(--ink);line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.qm-heading{padding:28px 30px 22px}.qm-heading>span,.qm-kicker{color:var(--accent);font-size:12px;font-weight:800}.qm-heading h2{font-size:30px;letter-spacing:-.04em;line-height:1.3;margin:8px 0}.qm-heading p{font-size:14px;color:var(--ink-2);margin:0}
.qm-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:0 30px 22px}.qm-steps button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink-2);font-family:inherit;font-size:13px;font-weight:700;line-height:1.4;cursor:pointer;padding:9px}.qm-steps button>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--surface-3);font-family:var(--mono);flex:none}.qm-steps button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}.qm-steps button[aria-pressed=true]>span{background:var(--accent);color:var(--on-accent)}
.qm-panel{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;margin:0 30px;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface);min-height:360px;align-items:center}.qm-panel[hidden],.quick-manual [hidden]{display:none!important}.qm-copy h3{font-size:24px;letter-spacing:-.035em;line-height:1.45;margin:9px 0 14px}.qm-copy p{font-size:14px;color:var(--ink-2);margin:0 0 16px}.qm-key{display:flex;flex-direction:column;gap:7px;background:var(--accent-soft);border-left:3px solid var(--accent);border-radius:0 8px 8px 0;padding:14px 16px;margin:16px 0}.qm-key b{font-size:14px}.qm-key span{font-size:13px;color:var(--ink-2)}.qm-copy .qm-small{font-size:12px;margin-bottom:0}
.qm-visual{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:23px;text-align:center}.qm-visual-label{display:block;color:var(--ink-2);font-size:11px;font-weight:700;margin-bottom:19px}.qm-visual p{font-size:13px;color:var(--ink-2);margin:16px 0}.qm-strategies>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.qm-strategies>div>b{border:1px solid var(--qm-color);color:var(--qm-color);padding:7px 12px;border-radius:8px;font-size:15px}.qm-strategies p{line-height:1.9}.qm-visual .btn{min-height:42px;font-size:13px}.qm-seed-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:center;font:12px var(--mono);color:var(--ink-2)}.qm-seed-choice>*{padding:11px 3px;border:1px solid var(--line);border-radius:7px}.qm-seed-choice strong{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-size:13px}.qm-seed-arrow{font-size:27px;color:var(--accent);margin:5px}.qm-seed-example>b{font-size:15px}.qm-seed-example small{display:block;font-size:11px;color:var(--ink-2)}
.qm-example-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.qm-example-title b{font-size:19px}.qm-example-title span{font-size:13px;font-weight:800;color:var(--preset-1)}.qm-order-example dl{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0;text-align:left}.qm-order-example dl>div{padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:8px}.qm-order-example dt{font-size:11px;color:var(--ink-2)}.qm-order-example dd{font:800 21px/1.5 var(--mono);margin:2px 0 0}.qm-order-example .qm-buy{color:var(--gain);font-family:inherit}.qm-order-example p{margin-bottom:0;color:var(--ink);font-weight:700}.qm-checks label{display:flex;gap:10px;text-align:left;align-items:center;font-size:13px;padding:12px 0;border-bottom:1px solid var(--line);cursor:pointer}.qm-checks input{width:18px;height:18px;accent-color:var(--accent);flex:none}
.qm-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 30px}.qm-pager>span{font:12px var(--mono);color:var(--ink-2)}.qm-pager .btn{min-height:44px;font-size:13px}.qm-boundary{margin:0 30px;padding:16px 20px;display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);border-radius:10px;color:var(--ink-2)}.qm-boundary b{font-size:13px;color:var(--ink)}.qm-boundary span{font-size:12px}.qm-faq{padding:22px 30px 0}.qm-faq h3{font-size:16px;margin:0 0 8px}.qm-faq details{border-bottom:1px solid var(--line)}.qm-faq summary{padding:14px 0;font-size:13px;font-weight:700;cursor:pointer}.qm-faq details>div{padding:0 0 15px;font-size:13px;color:var(--ink-2)}.qm-faq p{margin:0 0 9px}.qm-faq a{color:var(--accent);font-size:12px}.qm-risk{padding:16px 30px 25px;margin:0;font-size:11px;color:var(--ink-2)}
.quick-manual button:focus-visible,.quick-manual summary:focus-visible,.quick-manual input:focus-visible,.quick-manual a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.modal.modal-quick-manual{max-width:1120px}.modal-quick-manual .modal-body{display:block;overflow-y:auto;overscroll-behavior:contain}.modal-quick-manual .qm-heading{padding-top:22px}
@media(max-width:720px){.qm-heading{padding:22px 18px 18px}.qm-heading h2{font-size:26px}.qm-heading p{font-size:12px}.qm-steps{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 18px 18px;gap:7px}.qm-steps button{justify-content:flex-start;font-size:12px;padding:8px 10px}.qm-panel{grid-template-columns:1fr;gap:18px;margin:0 18px;padding:20px;min-height:0}.qm-copy h3{font-size:22px}.qm-copy p{font-size:13px}.qm-visual{padding:20px}.qm-pager{padding:16px 18px}.qm-boundary{margin:0 18px;padding:14px 16px}.qm-faq{padding:22px 18px 0}.qm-risk{padding:16px 18px 24px}.qm-panel .qm-key{padding:12px 13px}.qm-panel .qm-key b{font-size:13px}.qm-pager .btn{font-size:12px;padding:9px 12px}}

/* v96: short, readable home and guide cards */
.home-feat .home-feat-summary{font-size:14px;line-height:1.85;color:var(--ink)}
.home-feat-head b{line-height:1.55}.home-feat-summary br{display:block;content:"";margin-top:8px}
.guide-simple{display:grid;gap:18px}.guide-welcome h2{font-size:27px;line-height:1.5;margin:10px 0}.guide-welcome p{font-size:16px;line-height:1.85;margin:12px 0 20px}.guide-eyebrow{font-size:13px;color:var(--muted)}
.guide-simple .guide h2{margin-top:0;font-size:21px}.guide-simple p,.guide-simple li{font-size:16px;line-height:1.9}.guide-checks{list-style:none;padding:0;margin:20px 0 0;display:grid;gap:22px}.guide-checks li{display:flex;gap:14px}.guide-checks li>span{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:var(--on-accent);font-weight:700}.guide-checks h3,.guide-terms h3{margin:0 0 4px;font-size:17px}.guide-checks p,.guide-terms p{margin:0}.guide-terms{display:grid;gap:18px}.guide-terms>div{border-left:3px solid var(--line);padding-left:14px}.guide-tiers p{display:flex;gap:15px;margin:10px 0}.guide-tiers b{min-width:104px}.guide-simple .guide-small{font-size:14px;color:var(--muted);margin-bottom:0}.guide-essential li+li{margin-top:12px}.guide-faq details{border-top:1px solid var(--line);padding:15px 0}.guide-faq summary{font-size:16px;font-weight:700;cursor:pointer;min-height:28px;line-height:1.8}.guide-faq details p{font-size:15px;margin:14px 0 0}.guide-simple .btn{min-height:44px}
@media(max-width:700px){.guide-welcome h2{font-size:24px}.guide-simple .card-pad{padding:20px}.guide-tiers p{display:block}.guide-tiers b,.guide-tiers span{display:block}.guide-tiers p+p{margin-top:18px}.home-feat .home-feat-summary{font-size:14px}.guide-simple .guide h2{font-size:20px}}
/* v96: customer favorites and a compact inquiry list. */
.customer-favorites-table .customer-col-name{width:11%}
.customer-favorites-table .customer-col-email{width:18%}
.customer-favorites-table .customer-col-tier{width:8%}
.customer-favorites-table .customer-col-created{width:9%}
.customer-favorites-table .customer-col-seen{width:10%}
.customer-favorites-table .customer-col-favorite-count{width:9%}
.customer-favorites-table .customer-col-favorite-total{width:12%}
.customer-favorites-table .customer-col-note{width:15%}
.customer-favorites-table .customer-col-action{width:8%}
.customer-favorite-count,.customer-favorite-total{font-variant-numeric:tabular-nums}
.admin-favorite-total{display:flex;flex-wrap:wrap;gap:10px 22px;margin:0 0 10px;padding:12px;background:var(--surface-2);border-radius:8px;font-size:14px}
.admin-favorite-total b{margin-left:5px;font-variant-numeric:tabular-nums}
.admin-favorite-items{margin:0;padding:0;list-style:none}
.admin-favorite-items li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.admin-favorite-items li>div{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.admin-favorite-items li span{color:var(--muted);font-size:12px}
.admin-favorite-items li>b{flex:none;font-variant-numeric:tabular-nums}
.support-ticket-compact{padding:0;overflow:hidden}
.support-queue:has(.support-ticket-compact){gap:7px}
.support-ticket-summary{display:flex;align-items:center;gap:12px;min-height:54px;padding:10px 14px;list-style:none;cursor:pointer;box-sizing:border-box}
.support-ticket-summary::-webkit-details-marker{display:none}
.support-ticket-summary::after{content:'⌄';flex:none;color:var(--muted);font-size:17px;line-height:1}
.support-ticket-detail[open]>.support-ticket-summary::after{transform:rotate(180deg)}
.support-ticket-summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.support-ticket-summary:hover{background:var(--surface-2)}
.support-ticket-summary>span,.support-ticket-summary>strong{min-width:0}
.support-status{display:inline-block;flex:none;border-radius:999px;padding:4px 9px;min-width:42px;text-align:center;font-size:12px;font-weight:650;white-space:nowrap;background:var(--surface-2);color:var(--ink-2)}
.support-status-open{background:var(--warn-bg);color:var(--warn)}
.support-status-reviewing{background:var(--accent-soft);color:var(--accent)}
.support-status-resolved{background:var(--surface-2);color:var(--muted)}
.support-summary-date{flex:0 0 132px;color:var(--muted);font-size:12px;white-space:nowrap}
.support-summary-customer{flex:0 0 104px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-summary-message{flex:1;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-summary-category{color:var(--muted);font-size:12px;margin-right:4px}
.support-summary-draft{flex:none;color:var(--accent);font-size:11px;white-space:nowrap}
.support-summary-draft[hidden]{display:none}
.support-ticket-content{border-top:1px solid var(--line);padding:18px}
.support-ticket-content>.support-message{padding:12px;background:var(--surface-2);border-radius:8px}
@media(max-width:760px){
  .support-ticket-summary{gap:8px;padding:10px;min-height:52px}
  .support-summary-date{flex-basis:108px;font-size:10px}
  .support-summary-customer{flex-basis:62px;font-size:12px}
  .support-summary-message{font-size:13px}
  .support-summary-category{display:none}
  .support-status{font-size:11px;padding:4px 6px;min-width:34px}
  .support-ticket-content{padding:13px}
}
@media(max-width:520px){
  .support-summary-date{display:none}
  .support-summary-customer{flex-basis:46px}
  .support-summary-draft{max-width:33px;overflow:hidden;text-overflow:ellipsis}
  .support-ticket-content .support-actions>.btn{flex:1 1 auto;min-height:42px}
  .admin-favorite-items li{gap:10px;font-size:13px}
}
.support-history-detail[open]>.support-ticket-summary::after{transform:rotate(180deg)}

/* Common order cards; overflow belongs to the card rail, never the page. */
/* Aggregate favorite counts and controls appear only for the real admin view. */
.co-admin-favorite-count { display:inline-flex; align-items:center; gap:3px; margin-left:5px; vertical-align:middle; color:var(--co-color); font-size:11px; font-weight:700; letter-spacing:0; white-space:nowrap; }
.co-admin-favorite-count b { font:inherit; font-variant-numeric:tabular-nums; }
.co-admin-toolbar { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:6px; margin-left:auto; }
.co-admin-toolbar button, .co-statistics-dialog button { min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.co-admin-toolbar [data-co-statistics-open] { color:var(--accent); border-color:var(--accent); }
.co-admin-toolbar button:disabled, .co-statistics-dialog button:disabled { opacity:.45; cursor:default; }
.co-admin-toolbar button:focus-visible, .co-statistics-dialog button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.co-statistics-dialog { box-sizing:border-box; width:min(760px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:90vh; max-height:90dvh; margin:auto; padding:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); font:inherit; box-shadow:0 24px 100px #0006; overflow-x:hidden; overflow-y:auto; }
.co-statistics-dialog *, .co-statistics-dialog *::before, .co-statistics-dialog *::after { box-sizing:border-box; }
.co-statistics-dialog::backdrop { background:#10202a99; backdrop-filter:blur(3px); }
.co-statistics-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; z-index:1; padding:20px 24px 16px; background:var(--surface); }
.co-statistics-head p { margin:0 0 3px; color:var(--accent); font-size:11px; font-weight:600; }
.co-statistics-head h2 { margin:0; color:var(--ink); font-size:23px; line-height:1.4; letter-spacing:-.035em; }
.co-statistics-head > button { flex:none; display:flex; align-items:center; gap:8px; }
.co-statistics-head > button span { font-size:20px; line-height:1; }
.co-statistics-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 24px; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line); background:var(--surface-2); color:var(--ink-2); font-size:11px; }
.co-statistics-content { min-width:0; padding:22px 24px; }
.co-statistics-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:25px; }
.co-statistics-summary > div { display:grid; gap:7px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.co-statistics-summary span { color:var(--ink-2); font-size:11px; line-height:1.5; word-break:keep-all; overflow-wrap:anywhere; }
.co-statistics-summary strong { color:var(--ink); font-size:25px; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.co-statistics-summary small { margin-left:4px; color:var(--muted); font-size:11px; font-weight:500; }
.co-statistics-charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px; }
.co-statistics-charts section { min-width:0; }
.co-statistics-charts h3 { margin:0 0 4px; color:var(--ink); font-size:15px; line-height:1.5; }
.co-statistics-charts section > p { margin:0 0 18px; color:var(--muted); font-size:10.5px; line-height:1.6; }
.co-statistics-bars { display:grid; gap:15px; margin:0; padding:0; list-style:none; }
.co-statistics-bars li { min-width:0; }
.co-statistics-bars li > div:first-child { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:6px; color:var(--ink-2); font-size:12px; }
.co-statistics-bars strong { flex:none; color:var(--co-stat-color,var(--accent)); font-size:13px; font-variant-numeric:tabular-nums; }
.co-statistics-bars small { margin-left:3px; color:var(--muted); font-size:10px; font-weight:500; }
.co-statistics-members { margin-left:8px; color:var(--muted); font-size:10.5px; font-weight:500; }
.co-statistics-filter { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 10px; margin:11px 0; color:var(--ink-2); font-size:11px; }
.co-statistics-filter select { max-width:100%; min-height:36px; padding:6px 28px 6px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--co-stat-color,var(--accent)); font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.co-statistics-filter select:focus-visible { outline:2px solid var(--co-stat-color,var(--accent)); outline-offset:2px; }
.co-statistics-charts section > .co-statistics-distribution-summary { color:var(--ink-2); line-height:1.8; }
.co-statistics-track { height:9px; overflow:hidden; border-radius:6px; background:var(--line-soft); }
.co-statistics-track span { display:block; height:100%; max-width:100%; border-radius:6px; background:var(--co-stat-color,var(--accent)); }
.co-statistics-footnote { margin-top:24px; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:10.5px; line-height:1.7; }
.co-statistics-footnote p { margin:3px 0; word-break:keep-all; overflow-wrap:anywhere; }
.co-statistics-message { padding:35px 5px; text-align:center; color:var(--ink-2); }
.co-statistics-message strong { font-size:14px; }
.co-statistics-message p { margin:9px 0 15px; color:var(--muted); font-size:12px; line-height:1.7; }
.co-statistics-empty { margin:0 0 24px; padding:12px; border:1px solid var(--line); border-radius:8px; color:var(--muted); font-size:12px; text-align:center; }
@media (max-width:600px) {
  .co-admin-toolbar { flex-basis:100%; }
  .co-admin-toolbar button, .co-statistics-dialog button { min-height:44px; }
  .co-statistics-filter select { min-height:44px; }
  .co-statistics-dialog { width:calc(100vw - 24px); max-width:calc(100vw - 24px); max-height:92vh; max-height:92dvh; }
  .co-statistics-head { padding:16px 15px 12px; }
  .co-statistics-head h2 { font-size:21px; }
  .co-statistics-toolbar { padding:8px 15px; }
  .co-statistics-content { padding:18px 15px; }
  .co-statistics-summary { gap:6px; margin-bottom:22px; }
  .co-statistics-summary > div { gap:6px; padding:9px 7px; }
  .co-statistics-summary span { font-size:10px; }
  .co-statistics-summary strong { font-size:22px; }
  .co-statistics-charts { grid-template-columns:minmax(0,1fr); gap:27px; }
}
.common-orders { min-width:0; max-width:100%; color:var(--ink); }
.common-orders *, .common-orders *::before, .common-orders *::after { box-sizing:border-box; }
.co-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:6px 0 14px; }
.co-eyebrow { margin:0 0 4px; color:var(--accent); font-size:12px; font-weight:700; letter-spacing:.06em; }
.co-heading h2 { margin:0; font-size:27px; line-height:1.4; letter-spacing:-.055em; font-weight:700; }
.co-intro { margin:5px 0 0; color:var(--ink-2); font-size:13px; line-height:1.6; }
.co-dates { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px 12px; flex:none; min-width:285px; padding:3px 0 3px 22px; border-left:1px solid var(--line); font-variant-numeric:tabular-nums; }
.co-dates > div { display:flex; align-items:center; gap:7px; }
.co-date-order { grid-column:1/-1; }
.co-dates span { color:var(--muted); font-size:11px; }
.co-dates strong { font-size:20px; line-height:1.3; letter-spacing:-.03em; }
.co-dates b { font-size:14px; color:var(--ink-2); font-weight:500; }
.co-archive-entry { justify-self:end; margin:0; }
.co-archive-entry button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:32px; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:10.5px; font-weight:500; white-space:nowrap; cursor:pointer; }
.co-archive-entry button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.co-strategy-nav { display:none; }
.co-favorites { display:flex; align-items:center; flex-wrap:wrap; gap:9px 18px; margin-top:10px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-s); background:var(--surface); }
.co-favorites-heading { display:flex; align-items:center; flex-wrap:wrap; flex-basis:100%; gap:5px 12px; }
.co-favorites-heading h3 { margin:0; color:var(--ink); font-size:12px; font-weight:700; }
.co-favorites-heading h3 span { margin-left:3px; color:var(--muted); font-size:10px; font-weight:500; }
.co-favorites-heading p { flex-basis:100%; margin:0; color:var(--muted); font-size:11px; line-height:1.6; word-break:keep-all; overflow-wrap:anywhere; }
.co-favorite-add { display:inline-flex; align-items:center; justify-content:center; margin-left:auto; min-height:34px; padding:5px 11px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--accent); font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.co-favorite-add:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.co-favorite-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(228px,1fr)); align-items:start; flex-basis:100%; gap:6px; min-width:0; max-height:218px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:1px; }
.co-favorite-list:empty { display:none; }
.co-favorite-item { display:flex; align-items:stretch; min-width:0; max-width:100%; border:1px solid var(--line); border-radius:7px; overflow:hidden; background:var(--surface-2); }
.co-favorite-shortcut { display:flex; align-items:center; flex:1; gap:7px; min-width:0; min-height:51px; padding:7px 9px; border:0; background:transparent; color:var(--co-color); font:inherit; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; text-align:left; cursor:pointer; }
.co-favorite-copy { display:grid; min-width:0; width:100%; gap:3px; }
.co-favorite-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 5px; min-width:0; }
.co-favorite-created { color:var(--muted); font-size:10px; font-weight:400; line-height:1.5; white-space:nowrap; }
.co-favorite-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-size:11.5px; font-weight:600; }
.co-favorite-copy small { color:var(--co-color); font-size:10px; font-weight:500; }
.co-favorite-shortcut:hover { background:color-mix(in srgb,var(--co-color) 7%,transparent); }
.co-favorite-star { font-size:11px; }
.co-favorite-lock { display:inline-flex; color:var(--muted); }
.co-favorite-lock svg { width:13px; height:13px; stroke:currentColor; stroke-width:1.7; }
.co-favorite-item.is-locked .co-favorite-shortcut { color:var(--ink-2); }
.co-favorite-edit, .co-favorite-remove { flex:none; width:30px; min-height:33px; padding:0; border:0; border-left:1px solid var(--line); background:transparent; color:var(--muted); font:inherit; font-size:10px; line-height:1; cursor:pointer; }
.co-favorite-remove { width:25px; font-size:17px; }
.co-favorite-edit:hover, .co-favorite-remove:hover { color:var(--ink); background:var(--line-soft); }
.co-favorite-edit:disabled, .co-favorite-remove:disabled { opacity:.45; cursor:default; }
.co-detail-dialog.co-favorite-editor-dialog { --co-color:var(--accent); width:min(480px,calc(100vw - 24px)); max-width:480px; }
.co-favorite-editor-form { display:grid; gap:16px; padding:20px 24px 24px; }
.co-favorite-editor-form > label { display:grid; gap:6px; color:var(--ink-2); font-size:13px; font-weight:600; }
.co-favorite-editor-form input, .co-favorite-editor-form select { box-sizing:border-box; width:100%; max-width:100%; min-width:0; min-height:44px; padding:9px 11px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font:inherit; font-size:16px; }
.co-favorite-editor-note { margin:0; color:var(--muted); font-size:11px; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; }
.co-favorite-editor-actions { display:flex; justify-content:flex-end; gap:8px; }
.co-favorite-editor-actions button { min-height:44px; padding:9px 18px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.co-favorite-editor-actions [data-co-bookmark-save] { border-color:var(--accent); background:var(--accent); color:var(--surface); }
.co-favorite-editor-actions button:disabled { opacity:.45; cursor:default; }
.co-favorites-hint { margin:0; color:var(--muted); font-size:11px; line-height:1.7; }
.co-favorite-status, .co-detail-favorite-status { display:flex; align-items:center; flex-wrap:wrap; flex-basis:100%; gap:5px 9px; color:var(--muted); font-size:10.5px; line-height:1.6; }
.co-favorite-status[hidden] { display:none; }
.co-favorite-status.has-error, .co-detail-favorite-status.has-error { color:var(--warn-ink); }
.co-favorite-retry { border:0; border-bottom:1px solid currentColor; padding:0; background:transparent; color:inherit; font:inherit; font-weight:600; cursor:pointer; }
.co-rail-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; min-height:36px; padding:5px 1px; }
.co-rail-toolbar > p { margin:0; color:var(--muted); font-size:11px; }
.co-preference-status { display:flex; align-items:center; flex-wrap:wrap; gap:5px 9px; margin:0 1px 8px; color:var(--muted); font-size:11px; line-height:1.5; }
.co-preference-status[hidden] { display:none; }
.co-preference-status.has-error { color:var(--warn-ink); background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:6px; padding:7px 9px; }
.co-preference-retry { border:0; border-bottom:1px solid currentColor; background:none; padding:0; color:inherit; font:inherit; font-weight:600; cursor:pointer; }
.co-scroll-controls { display:flex; align-items:center; gap:6px; }
.co-scroll-controls[hidden] { display:none; }
.co-scroll-controls > span { margin-right:4px; color:var(--ink-2); font-size:11px; }
.co-scroll-controls button { display:grid; place-items:center; width:28px; height:28px; padding:4px; background:var(--surface); border:1px solid var(--line); border-radius:6px; color:var(--ink-2); cursor:pointer; }
.co-scroll-controls button:disabled { opacity:.35; cursor:default; }
.co-scroll-controls svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.7; }
.co-scroll-controls [data-co-scroll="-1"] svg { transform:rotate(180deg); }
.co-rail { width:100%; max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--line) transparent; padding:2px 1px 12px; scroll-snap-type:x proximity; }
.co-rail:focus-visible { outline-offset:-2px; }
.co-grid { display:grid; grid-template-columns:repeat(5,minmax(270px,1fr)); align-items:start; gap:12px; min-width:0; }
.co-card { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-top:3px solid var(--co-color,var(--accent)); border-radius:11px; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; scroll-snap-align:start; }
.co-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px 9px; border-bottom:1px solid var(--line-soft); }
.co-card-ident { min-width:0; }
.co-card-title { display:flex; align-items:center; gap:8px; min-width:0; }
.co-strategy-index { display:inline-grid; place-items:center; width:22px; height:22px; border:1px solid var(--line); border-radius:6px; color:var(--co-color); font-family:var(--mono); font-size:10px; font-weight:600; }
.co-card h3 { margin:0; color:var(--co-color); font-size:19px; line-height:1.4; letter-spacing:-.035em; }
.co-tag { margin:2px 0 0 30px; color:var(--ink-2); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.co-card-lock { margin-left:auto; color:var(--muted); }
.co-card-lock svg { width:15px; height:15px; stroke:currentColor; stroke-width:1.6; }
.co-card-toggle { display:flex; align-items:center; justify-content:center; gap:3px; flex:none; min-height:32px; padding:5px 6px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:10.5px; cursor:pointer; }
.co-card-toggle svg { width:13px; height:13px; stroke:currentColor; stroke-width:1.7; transform:rotate(-90deg); }
.co-card-toggle[aria-expanded="false"] svg { transform:rotate(90deg); }
.co-card-toggle:disabled { opacity:.5; cursor:wait; }
.co-card-body[hidden] { display:none; }
.co-card-summary { padding:8px 12px 9px; background:var(--surface-2); border-bottom:1px solid var(--line-soft); }
.co-order-counts { display:flex; align-items:center; flex-wrap:wrap; gap:5px; padding:7px 12px; border-bottom:1px solid var(--line-soft); color:var(--ink-2); font-size:11px; line-height:1.5; }
.co-order-date-label { color:var(--co-color); font-weight:600; }
.co-order-counts b { color:var(--ink); font-size:11.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.co-order-counts i { color:var(--muted); font-style:normal; }
.co-card.is-collapsed .co-order-counts { border-bottom:0; }
.co-cycle-current { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.co-cycle-duration, .co-cycle-performance { display:grid; gap:2px; }
.co-cycle-current span { color:var(--ink-2); font-size:10.5px; line-height:1.4; }
.co-cycle-duration strong { color:var(--ink-2); font-size:13px; font-weight:600; line-height:1.6; font-variant-numeric:tabular-nums; }
.co-cycle-performance { text-align:right; }
.co-cycle-performance strong { color:var(--ink-2); font-size:19px; font-weight:600; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; }
.co-cycle-performance strong.is-positive { color:var(--gain); }
.co-cycle-performance strong.is-negative { color:var(--loss); }
.co-cycle-average { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-top:7px; color:var(--ink-2); font-size:10.5px; line-height:1.5; }
.co-cycle-average strong { color:var(--ink); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.co-cycle-start { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-top:7px; color:var(--ink-2); font-size:10.5px; line-height:1.5; }
.co-cycle-start strong { color:var(--ink); font-size:11.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.co-cycle-return-note { margin:4px 0 0; color:var(--muted); font-size:9.5px; line-height:1.5; word-break:keep-all; overflow-wrap:anywhere; }
.co-weights { margin-top:7px; }
.co-weights-labels { display:flex; justify-content:space-between; gap:8px; color:var(--ink-2); font-size:10.5px; }
.co-weights-labels b { color:var(--ink); margin-left:3px; font-variant-numeric:tabular-nums; font-size:11.5px; font-weight:600; }
.co-weight-track { height:3px; margin-top:4px; background:var(--line); overflow:hidden; border-radius:10px; }
.co-weight-track > span { display:block; height:100%; background:var(--co-color); border-radius:10px; }
.co-orders { display:grid; align-content:start; }
.co-order { min-width:0; padding:8px 12px 9px; border-bottom:1px solid var(--line-soft); }
.co-order:last-child { border-bottom:0; }
.co-order-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.co-order-kind { display:flex; align-items:center; gap:7px; }
.co-side { display:inline-block; border-radius:4px; padding:2px 6px; background:var(--surface-2); color:var(--ink); font-size:11px; font-weight:700; line-height:1.4; }
.co-order-buy .co-side { background:var(--gain-soft); color:var(--gain); }
.co-order-sell .co-side { background:var(--loss-soft); color:var(--loss); }
.co-type { padding:2px 5px; border-radius:4px; background:color-mix(in srgb,var(--co-color) 9%,var(--surface)); color:var(--co-color); font-family:var(--mono); font-size:13px; font-weight:800; line-height:1.3; }
.co-order-number { color:var(--muted); font-family:var(--mono); font-size:10px; }
.co-order-values { display:grid; grid-template-columns:minmax(75px,1fr) minmax(0,1.45fr); gap:6px; align-items:end; margin-top:4px; font-variant-numeric:tabular-nums; }
.co-order-values > div { display:grid; gap:2px; }
.co-order-values > div > span { color:var(--muted); font-size:10px; line-height:1.4; }
.co-order-price strong { font-size:20px; font-weight:600; letter-spacing:-.045em; line-height:1.3; }
.co-price-market { font-size:18px; }
.co-order-weight { text-align:right; }
.co-order-weight strong { color:var(--co-color); font-size:24px; font-weight:700; letter-spacing:-.045em; line-height:1.1; white-space:nowrap; }
.co-order-reason { margin:5px 0 6px; color:var(--co-color); font-size:13px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.co-quantity-table { width:100%; table-layout:fixed; border-collapse:collapse; text-align:center; font-variant-numeric:tabular-nums; }
.co-quantity-table caption { padding:0 0 3px; color:var(--ink-2); font-size:10.5px; font-weight:500; line-height:1.4; text-align:left; }
.co-quantity-table caption span { float:right; color:var(--muted); font-size:9px; }
.co-quantity-table th { padding:4px 0 1px; background:var(--surface-2); color:var(--ink-2); font-size:10.5px; font-weight:400; line-height:1.4; white-space:nowrap; letter-spacing:-.045em; }
.co-quantity-table td { padding:0 0 5px; background:var(--surface-2); color:var(--ink); font-size:14px; font-weight:600; line-height:1.4; white-space:nowrap; letter-spacing:-.04em; }
.co-quantity-table th:first-child { border-radius:6px 0 0 0; }
.co-quantity-table th:last-child { border-radius:0 6px 0 0; }
.co-quantity-table td:first-child { border-radius:0 0 0 6px; }
.co-quantity-table td:last-child { border-radius:0 0 6px 0; }
.co-quantity-table td.co-zero { color:var(--muted); font-weight:400; }
.co-detail-action { padding:8px 12px 10px; border-top:1px solid var(--line-soft); }
.co-detail-open { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:34px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); color:var(--co-color); font:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.co-detail-open:hover { border-color:var(--co-color); }
.co-detail-open > span { font-size:15px; line-height:1; }
.co-detail-dialog { box-sizing:border-box; width:min(1120px,90vw); max-width:90vw; max-height:90vh; max-height:90dvh; margin:auto; padding:0; border:1px solid var(--line); border-top:4px solid var(--co-color,var(--accent)); border-radius:14px; background:var(--surface); color:var(--ink); font:inherit; box-shadow:0 24px 100px #0006; overflow-x:hidden; overflow-y:auto; }
.co-detail-dialog[open] { display:flex; flex-direction:column; }
.co-detail-dialog::backdrop { background:#10202a99; backdrop-filter:blur(3px); }
.co-detail-dialog *, .co-detail-dialog *::before, .co-detail-dialog *::after { box-sizing:border-box; }
.co-detail-head { display:flex; align-items:flex-start; justify-content:space-between; flex:none; position:sticky; top:0; z-index:8; gap:16px; padding:19px 22px 15px; background:var(--surface); }
.co-detail-head p { margin:0 0 4px; color:var(--co-color); font-size:12px; font-weight:600; }
.co-detail-head h2 { margin:0 0 5px; font-size:24px; line-height:1.4; letter-spacing:-.04em; }
.co-detail-head > div > span { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.co-detail-close { display:flex; align-items:center; gap:9px; flex:none; min-height:34px; padding:6px 9px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:12px; cursor:pointer; }
.co-detail-close > span { font-size:21px; line-height:1; }
.co-detail-strategies { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); flex:none; gap:6px; padding:0 22px 14px; }
.co-detail-strategies button { display:flex; align-items:center; justify-content:center; gap:4px; min-width:0; min-height:34px; padding:6px 4px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:12px; font-weight:500; cursor:pointer; }
.co-detail-strategies button[aria-pressed="true"] { border-color:var(--co-nav-color); background:color-mix(in srgb,var(--co-nav-color) 9%,var(--surface)); color:var(--co-nav-color); font-weight:700; }
.co-detail-strategies button:disabled { opacity:.5; cursor:default; }
.co-detail-strategies span { display:inline-flex; }
.co-detail-strategies svg { width:12px; height:12px; stroke:currentColor; stroke-width:1.7; }
.co-detail-toolbar { display:flex; align-items:center; flex-wrap:wrap; flex:none; gap:8px 16px; padding:11px 22px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--surface-2); }
.co-detail-toolbar label { display:flex; align-items:center; gap:9px; color:var(--ink-2); font-size:12px; font-weight:600; }
.co-detail-select { min-width:115px; min-height:35px; border:1px solid var(--line); border-radius:6px; padding:6px 26px 6px 9px; background:var(--surface); color:var(--ink); font:inherit; font-variant-numeric:tabular-nums; cursor:pointer; }
.co-detail-selection { color:var(--co-color); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
.co-detail-favorite { display:inline-flex; align-items:center; justify-content:center; min-height:35px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--co-color); font:inherit; font-size:11px; font-weight:600; white-space:nowrap; cursor:pointer; }
.co-detail-favorite { border-color:var(--co-color); background:color-mix(in srgb,var(--co-color) 7%,var(--surface)); }
.co-detail-favorite-secondary { border-color:var(--line); background:var(--surface); color:var(--ink-2); }
.co-detail-favorite[hidden] { display:none; }
.co-detail-favorite:disabled { opacity:.5; cursor:default; }
.co-detail-bookmark { flex:none; padding:10px 22px; border-bottom:1px solid var(--line); background:var(--surface); }
.co-detail-bookmark-head { display:flex; align-items:center; justify-content:space-between; min-width:0; gap:8px; }
.co-detail-bookmark-toggle, .co-seed-summary, .co-detail-compare-action { display:none; }
.co-detail-bookmark-mode { margin:0 0 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink-2); font-size:11px; font-weight:600; }
.co-detail-bookmark-row { display:flex; align-items:flex-end; flex-wrap:wrap; gap:7px; }
.co-detail-bookmark-row label { display:flex; align-items:center; flex:1; gap:9px; min-width:190px; color:var(--muted); font-size:11px; white-space:nowrap; }
.co-detail-name { flex:1; width:100%; min-width:0; min-height:35px; padding:6px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; }
.co-detail-name:disabled { opacity:.6; }
.co-detail-bookmark .co-detail-favorite-status { margin-top:6px; }
.co-detail-seed-warning { margin:7px 0 0; color:var(--warn-ink); font-size:10.5px; line-height:1.65; word-break:keep-all; overflow-wrap:anywhere; }
.co-detail-toolbar p { margin:0 0 0 auto; color:var(--muted); font-size:10.5px; line-height:1.6; text-align:right; }
.co-detail-comparison { display:flex; flex-direction:column; flex:1 1 auto; min-height:95px; overflow:hidden; }
.co-detail-scroll-controls { display:flex; align-items:center; flex:none; gap:12px; min-width:0; padding:9px 22px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.co-detail-scroll-controls > button { display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0; border:1px solid var(--co-color); border-radius:8px; background:var(--surface); color:var(--co-color); font:inherit; font-size:22px; font-weight:700; cursor:pointer; }
.co-detail-scroll-controls > button:disabled { border-color:var(--line); color:var(--muted); opacity:.45; cursor:default; }
.co-detail-scroll-controls > button:focus-visible, .co-detail-scroll-position input:focus-visible { outline:2px solid var(--co-color); outline-offset:2px; }
.co-detail-scroll-position { display:block; flex:1; min-width:0; color:var(--ink-2); font-size:11px; font-weight:600; }
.co-detail-scroll-position > span { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.co-detail-scroll-percent { color:var(--co-color); font-variant-numeric:tabular-nums; }
.co-detail-scroll-position input { display:block; appearance:none; -webkit-appearance:none; width:100%; min-width:0; height:44px; margin:0; border:0; padding:0; border-radius:4px; background:transparent; accent-color:var(--co-color); cursor:ew-resize; }
.co-detail-scroll-position input::-webkit-slider-runnable-track { height:10px; border:1px solid color-mix(in srgb,var(--co-color) 32%,var(--line)); border-radius:10px; background:color-mix(in srgb,var(--co-color) 13%,var(--surface)); }
.co-detail-scroll-position input::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:24px; height:24px; margin-top:-8px; border:3px solid var(--surface); border-radius:50%; background:var(--co-color); box-shadow:0 0 0 1px var(--co-color); }
.co-detail-scroll-position input::-moz-range-track { height:10px; border:1px solid color-mix(in srgb,var(--co-color) 32%,var(--line)); border-radius:10px; background:color-mix(in srgb,var(--co-color) 13%,var(--surface)); }
.co-detail-scroll-position input::-moz-range-thumb { width:20px; height:20px; border:3px solid var(--surface); border-radius:50%; background:var(--co-color); box-shadow:0 0 0 1px var(--co-color); }
.co-detail-scroll-position input:disabled { opacity:.45; cursor:default; }
.co-detail-scroll { flex:1 1 auto; min-height:95px; max-height:58vh; max-height:58dvh; overflow:auto; overscroll-behavior:contain; scrollbar-width:auto; scrollbar-color:var(--co-color) var(--surface-2); }
.co-detail-scroll::-webkit-scrollbar { width:16px; height:16px; }
.co-detail-scroll::-webkit-scrollbar-track { background:var(--surface-2); }
.co-detail-scroll::-webkit-scrollbar-thumb { min-width:44px; min-height:44px; border:3px solid var(--surface-2); border-radius:10px; background:var(--co-color); }
.co-detail-scroll::-webkit-scrollbar-corner { background:var(--surface-2); }
@supports selector(::-webkit-scrollbar) { .co-detail-scroll { scrollbar-color:auto; } }
.co-detail-table { width:max-content; min-width:100%; border-spacing:0; border-collapse:separate; table-layout:fixed; font-variant-numeric:tabular-nums; }
.co-detail-table th, .co-detail-table td { width:100px; min-width:100px; padding:0; border-right:1px solid var(--line-soft); border-bottom:1px solid var(--line); background:var(--surface); text-align:center; }
.co-detail-table thead th { position:sticky; top:0; z-index:2; height:49px; background:var(--surface-2); color:var(--ink-2); font-size:12px; font-weight:600; }
.co-detail-table button { width:100%; min-height:49px; padding:12px 8px; border:0; background:transparent; color:inherit; font:inherit; white-space:nowrap; cursor:pointer; }
.co-detail-table tbody td { position:relative; height:94px; color:var(--ink); font-size:17px; font-weight:600; }
.co-detail-table tbody td button { height:100%; min-height:93px; }
.co-detail-table td.co-zero { color:var(--muted); font-weight:400; }
.co-detail-table button:hover { background:color-mix(in srgb,var(--co-color) 7%,transparent); }
.co-detail-table button:focus-visible { outline:2px solid var(--co-color); outline-offset:-6px; border-radius:7px; }
.co-detail-table .co-detail-corner, .co-detail-table .co-detail-order { position:sticky; left:0; z-index:3; width:220px; min-width:220px; max-width:220px; border-right:2px solid var(--line); padding:12px 17px; text-align:left; }
.co-detail-table .co-detail-corner { z-index:4; }
.co-detail-corner span { display:block; margin-top:2px; color:var(--muted); font-size:10px; font-weight:400; }
.co-detail-corner-line, .co-detail-empty-head { display:flex; align-items:center; justify-content:space-between; gap:7px; }
.co-detail-corner-line > b { flex:none; font-weight:600; white-space:nowrap; }
.co-detail-corner .co-detail-holding { margin:0; }
.co-detail-dialog .co-holding-summary { display:inline-flex; align-items:baseline; gap:4px; margin:0; padding:3px 6px; border:1px solid color-mix(in srgb,var(--co-color) 22%,transparent); border-radius:5px; background:color-mix(in srgb,var(--co-color) 8%,transparent); color:var(--co-color); font-size:11px; font-weight:500; line-height:1.3; white-space:nowrap; }
.co-detail-dialog .co-holding-summary .co-holding-label { display:inline; margin:0; color:inherit; font-size:11px; font-weight:500; }
.co-detail-dialog .co-holding-summary strong { margin:0; color:inherit; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; }
.co-detail-dialog .co-holding-summary small { margin-left:2px; font-size:10px; font-weight:500; }
.co-detail-dialog .co-holding-summary .co-holding-pending { display:inline; margin:0; color:inherit; font-size:11px; font-weight:500; }
.co-detail-empty-head { margin-bottom:12px; color:var(--ink-2); font-size:12px; text-align:left; }
.co-detail-order > div { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.co-detail-price { margin-left:auto; color:var(--ink); font-size:14px; font-weight:600; }
.co-detail-price .co-price-market { font-size:14px; }
.co-detail-order > b { display:block; margin:5px 0 4px; color:var(--co-color); font-size:13px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.co-detail-weight { display:flex; align-items:baseline; justify-content:space-between; gap:5px; color:var(--muted); font-size:10px; font-weight:400; }
.co-detail-weight strong { color:var(--co-color); font-size:14px; font-weight:700; }
.co-detail-table [data-co-seed].is-selected { color:var(--co-color); background:color-mix(in srgb,var(--co-color) 8%,var(--surface)); box-shadow:inset 3px 0 0 var(--co-color),inset -3px 0 0 var(--co-color); font-weight:700; }
.co-detail-table thead [data-co-seed].is-selected { background:color-mix(in srgb,var(--co-color) 10%,var(--surface)); box-shadow:inset 3px 0 0 var(--co-color),inset -3px 0 0 var(--co-color),inset 0 3px 0 var(--co-color); }
.co-detail-table tbody tr:last-child [data-co-seed].is-selected { box-shadow:inset 3px 0 0 var(--co-color),inset -3px 0 0 var(--co-color),inset 0 -3px 0 var(--co-color); }
.co-detail-foot { flex:none; padding:12px 22px; border-top:1px solid var(--line); background:var(--surface-2); }
.co-detail-foot p { margin:0; color:var(--muted); font-size:10.5px; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; }
.co-detail-foot p + p { margin-top:3px; }
.co-detail-foot .co-favorite-seed-note { color:var(--ink-2); }
.co-detail-copy-compact, .co-detail-foot-summary { display:none; }
/* Desktop quantity comparison: one native horizontal scrollbar and every order row at its natural height. */
@media (min-width:761px) {
  .co-seed-detail-dialog { width:min(1240px,calc(100vw - 48px)); max-width:calc(100vw - 48px); max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); border-radius:11px; }
  .co-seed-detail-dialog .co-detail-head { padding:10px 14px 8px; gap:12px; }
  .co-seed-detail-dialog .co-detail-head > div { display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:0 10px; }
  .co-seed-detail-dialog .co-detail-head h2 { grid-column:1; grid-row:1; margin:0; font-size:20px; line-height:1.4; }
  .co-seed-detail-dialog .co-detail-head p { grid-column:2; grid-row:1; margin:0; font-size:11px; }
  .co-seed-detail-dialog .co-detail-head > div > span { grid-column:1/-1; font-size:10.5px; line-height:1.5; }
  .co-seed-detail-dialog .co-detail-close { min-height:32px; }
  .co-seed-detail-dialog .co-detail-strategies { gap:5px; padding:0 14px 7px; }
  .co-seed-detail-dialog .co-detail-strategies button { min-height:31px; padding:4px; font-size:12px; }
  .co-seed-detail-dialog .co-detail-toolbar { padding:6px 14px; gap:6px 12px; }
  .co-seed-detail-dialog .co-detail-select { min-height:32px; padding:4px 25px 4px 8px; }
  .co-seed-detail-dialog .co-detail-selection { display:none; }
  .co-seed-detail-dialog .co-detail-toolbar p { font-size:10px; line-height:1.4; }
  .co-seed-detail-dialog .co-detail-bookmark { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 10px; padding:6px 14px; }
  .co-seed-detail-dialog .co-detail-bookmark-head { display:none; }
  .co-seed-detail-dialog .co-detail-bookmark-editor { grid-column:1/-1; }
  .co-seed-detail-dialog .co-detail-bookmark-row { gap:6px; }
  .co-seed-detail-dialog .co-detail-name, .co-seed-detail-dialog .co-detail-favorite { min-height:32px; padding-top:4px; padding-bottom:4px; }
  .co-seed-detail-dialog .co-detail-seed-warning { margin:0; font-size:10.5px; line-height:1.5; }
  .co-seed-detail-dialog .co-detail-favorite-status { margin:0; font-size:10px; }
  .co-seed-detail-dialog .co-detail-favorite-status.is-helper { display:none; }
  .co-seed-detail-dialog .co-detail-comparison { flex:none; min-height:0; overflow:visible; }
  .co-seed-detail-dialog .co-detail-scroll-controls { display:none; }
  .co-seed-detail-dialog .co-detail-scroll { flex:none; min-height:0; max-height:none; overflow:auto; }
  .co-seed-detail-dialog .co-detail-scroll:focus-visible { outline:2px solid var(--co-color); outline-offset:-2px; }
  .co-seed-detail-dialog .co-detail-table th, .co-seed-detail-dialog .co-detail-table td { width:86px; min-width:86px; }
  .co-seed-detail-dialog .co-detail-table thead th { height:36px; font-size:11.5px; }
  .co-seed-detail-dialog .co-detail-table button { min-height:35px; padding:5px 4px; }
  .co-seed-detail-dialog .co-detail-table tbody td { height:62px; font-size:15px; }
  .co-seed-detail-dialog .co-detail-table tbody td button { min-height:61px; }
  .co-seed-detail-dialog .co-detail-table .co-detail-corner, .co-seed-detail-dialog .co-detail-table .co-detail-order { width:220px; min-width:220px; max-width:220px; padding:6px 10px; }
  .co-seed-detail-dialog .co-detail-order > div { gap:5px; }
  .co-seed-detail-dialog .co-detail-order > b { display:inline-block; max-width:100%; margin:3px 6px 0 0; font-size:12px; line-height:1.4; vertical-align:baseline; }
  .co-seed-detail-dialog .co-detail-weight { display:inline-flex; gap:4px; line-height:1.4; }
  .co-seed-detail-dialog .co-detail-weight strong { font-size:12px; }
  .co-seed-detail-dialog .co-detail-copy-full { display:none; }
  .co-seed-detail-dialog .co-detail-copy-compact { display:inline; }
  .co-seed-detail-dialog .co-detail-foot { padding:6px 14px; }
  .co-seed-detail-dialog .co-detail-foot > p { display:none; }
  .co-seed-detail-dialog .co-detail-foot-summary { display:block; }
  .co-seed-detail-dialog .co-detail-foot p { font-size:10.5px; line-height:1.55; }
  .co-seed-detail-dialog .co-detail-foot p + p { margin-top:1px; }
}
.co-detail-empty { padding:40px 20px; text-align:center; }
.co-detail-empty strong { color:var(--ink-2); font-size:15px; font-weight:600; }
.co-detail-empty p { margin:9px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.co-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.co-locked { display:flex; flex-direction:column; align-items:center; padding:23px 12px 14px; min-height:224px; text-align:center; }
.co-lock-icon { display:grid; place-items:center; width:40px; height:40px; margin-bottom:10px; border:1px solid var(--line); border-radius:50%; background:var(--surface-2); color:var(--co-color); }
.co-lock-icon svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.4; }
.co-locked h4 { margin:0; color:var(--ink); font-size:14px; font-weight:600; }
.co-locked > p { margin:6px 0 16px; color:var(--muted); font-size:11.5px; line-height:1.6; }
.co-unlock { display:flex; align-items:center; justify-content:center; gap:15px; width:100%; margin-top:auto; font-size:11.5px; min-height:36px; }
.co-unlock > span { color:var(--co-color); }
.co-no-orders { padding:20px 12px; text-align:center; color:var(--ink-2); }
.co-empty-mark { display:block; color:var(--muted); font-size:24px; line-height:1.5; }
.co-no-orders h4 { margin:9px 0 6px; font-size:12px; font-weight:600; }
.co-no-orders p { margin:0; color:var(--muted); font-size:11px; line-height:1.8; }
.co-footnotes { display:grid; gap:4px; margin:5px 1px 0; padding:10px 0; border-top:1px solid var(--line); }
.co-footnotes p { margin:0; color:var(--muted); font-size:11px; line-height:1.8; word-break:keep-all; overflow-wrap:anywhere; }
.co-footnotes b { margin-right:7px; color:var(--ink-2); font-weight:600; }
.co-message { padding:48px 20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); text-align:center; }
.co-message h3, .co-message > strong { display:block; margin:8px 0; font-size:16px; font-weight:600; }
.co-message p { margin:8px 0 18px; color:var(--ink-2); font-size:13px; line-height:1.8; }
.co-message-icon { display:inline-grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--surface-2); color:var(--muted); font-family:var(--mono); font-size:19px; }
.co-message-icon svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.5; }
.co-message-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.co-loading-dot { display:block; width:18px; height:18px; margin:0 auto 15px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:co-spin .9s linear infinite; }
@keyframes co-spin { to { transform:rotate(360deg); } }
@media (max-width:760px) {
  .co-heading { align-items:flex-start; flex-direction:column; gap:12px; margin-top:6px; margin-bottom:12px; }
  .co-heading h2 { font-size:23px; }
  .co-intro { font-size:12px; }
  .co-dates { width:100%; min-width:0; border-left:0; border-top:1px solid var(--line); padding:12px 0 0; gap:7px 8px; }
  .co-dates strong { font-size:18px; }
  .co-dates b { font-size:12px; }
  .co-archive-entry button { min-height:32px; font-size:10.5px; }
  .co-favorites { align-items:flex-start; gap:8px; padding:9px 11px; }
  .co-favorites-heading { display:flex; align-items:center; flex-basis:100%; gap:5px 8px; }
  .co-favorites-heading h3 { font-size:12px; }
  .co-favorites-heading p { font-size:11px; }
  .co-favorite-add { min-height:40px; }
  .co-favorites-hint { font-size:10px; }
  .co-favorite-list { grid-template-columns:minmax(0,1fr); max-height:230px; }
  .co-favorite-shortcut { font-size:10.5px; }
  .co-favorite-edit, .co-favorite-remove { width:44px; min-height:44px; font-size:11px; }
  .co-favorite-remove { font-size:20px; }
  .co-favorite-editor-form { gap:14px; padding:16px; }
  .co-favorite-retry, .co-preference-retry { min-height:44px; padding:7px 3px; }
  .co-favorite-status, .co-detail-favorite-status { font-size:10px; }
  .co-rail-toolbar { min-height:0; margin:0; padding:0; }
  .co-rail-toolbar > p, .co-scroll-controls { display:none; }
  .co-strategy-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); position:sticky; top:env(safe-area-inset-top,0px); z-index:12; gap:4px; padding:7px 0; background:var(--surface); }
  .co-strategy-nav button { display:flex; align-items:center; justify-content:center; min-width:0; min-height:44px; gap:2px; padding:6px 2px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:11px; font-weight:600; white-space:nowrap; cursor:pointer; }
  .co-strategy-nav button[aria-pressed="true"] { border-color:var(--co-nav-color); background:color-mix(in srgb,var(--co-nav-color) 9%,var(--surface)); color:var(--co-nav-color); box-shadow:inset 0 -2px var(--co-nav-color); }
  .co-nav-lock { display:inline-flex; }
  .co-nav-lock svg { width:10px; height:10px; stroke:currentColor; stroke-width:1.8; }
  .co-grid { display:flex; gap:10px; }
  .co-card { flex:0 0 100%; max-width:100%; }
  .co-card-toggle { min-height:44px; min-width:100px; font-size:11px; }
  .co-detail-open, .co-unlock { min-height:44px; }
  .co-footnotes p { font-size:10.5px; }
  .co-detail-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); max-height:calc(var(--co-visual-height,100dvh) - 16px); margin:8px auto; padding-bottom:env(safe-area-inset-bottom,0px); border-radius:11px; overscroll-behavior-y:contain; scroll-padding-top:100px; }
  .co-detail-dialog[open] { display:block; }
  .co-detail-head { gap:8px; padding:10px 12px 9px; padding-top:max(10px,env(safe-area-inset-top,0px)); border-bottom:1px solid var(--line-soft); }
  .co-detail-head > div { min-width:0; }
  .co-detail-head p { font-size:10.5px; }
  .co-detail-head h2 { font-size:18px; margin-bottom:3px; }
  .co-detail-head > div > span { display:block; font-size:10px; line-height:1.6; }
  .co-detail-close { gap:5px; min-height:44px; min-width:66px; padding:7px 9px; font-size:12px; }
  .co-detail-strategies { gap:4px; padding:9px 12px; }
  .co-detail-strategies button { min-height:44px; gap:2px; padding:6px 2px; font-size:11px; }
  .co-detail-strategies svg { width:10px; height:10px; }
  .co-detail-toolbar { gap:5px 10px; padding:8px 12px; }
  .co-detail-toolbar label { justify-content:space-between; width:100%; gap:9px; font-size:12px; }
  .co-detail-select { flex:1; max-width:200px; min-width:115px; min-height:44px; font-size:16px; }
  .co-detail-selection, .co-detail-tap-hint { display:none; }
  .co-seed-summary { display:block; padding:10px 12px 12px; border-bottom:1px solid var(--line); }
  .co-seed-summary-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:6px; }
  .co-seed-summary-head h3 { margin:0; color:var(--ink-2); font-size:12px; font-weight:500; }
  .co-seed-summary-head h3 { white-space:nowrap; }
  .co-seed-summary-head strong { margin-left:5px; color:var(--co-color); font-size:15px; font-weight:700; }
  .co-seed-summary-head > span { color:var(--muted); font-size:10px; white-space:nowrap; }
  .co-seed-orders { display:grid; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
  .co-seed-order { min-width:0; padding:8px 9px; background:var(--surface); }
  .co-seed-order + .co-seed-order { border-top:1px solid var(--line-soft); }
  .co-seed-order-heading { display:flex; align-items:center; min-width:0; gap:6px; }
  .co-seed-order-price { color:var(--ink); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
  .co-seed-order-price .co-price-market { font-size:14px; }
  .co-seed-order-qty { margin-left:auto; color:var(--ink); font-size:19px; font-weight:700; line-height:1.25; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .co-seed-order-qty small { margin-left:3px; color:var(--ink-2); font-size:10px; font-weight:500; }
  .co-seed-order-qty.co-zero { color:var(--muted); }
  .co-seed-order-reason { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin:5px 0 0; color:var(--ink-2); font-size:10.5px; line-height:1.5; }
  .co-seed-order-reason > span:first-child { min-width:0; color:var(--co-color); font-size:13px; font-weight:700; overflow-wrap:anywhere; }
  .co-seed-order-reason > span:last-child { flex:none; white-space:nowrap; }
  .co-seed-order-reason b { color:var(--co-color); font-weight:600; }
  .co-seed-summary-empty { margin:4px 0 0; color:var(--ink-2); font-size:12px; line-height:1.7; }
  .co-detail-favorite { min-height:44px; padding:8px 10px; font-size:11.5px; }
  .co-detail-bookmark { padding:8px 12px; }
  .co-detail-bookmark-head { min-height:44px; }
  .co-detail-bookmark-mode { flex:1; margin:0; font-size:11px; }
  .co-detail-bookmark-toggle { display:inline-flex; align-items:center; flex:none; min-height:44px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--co-color); font:inherit; font-size:11px; font-weight:600; cursor:pointer; }
  .co-detail-bookmark-editor { margin-top:7px; }
  .co-detail-dialog:not(.is-bookmark-open) .co-detail-bookmark-editor { display:none; }
  .co-detail-dialog:not(.is-bookmark-open) .co-detail-favorite-status:not(.has-error) { display:none; }
  .co-detail-bookmark-row { gap:6px; }
  .co-detail-bookmark-row label { flex-basis:100%; min-width:0; gap:7px; font-size:11px; }
  .co-detail-name { min-height:44px; font-size:16px; }
  .co-detail-compare-action { display:flex; align-items:center; gap:8px; padding:8px 12px; border-bottom:1px solid var(--line); }
  .co-detail-compare-action button { flex:1; min-height:44px; padding:8px 9px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); color:var(--co-color); font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
  .co-detail-compare-action > span { flex:none; color:var(--muted); font-size:10px; }
  .co-detail-comparison { display:block; min-height:0; scroll-margin-top:100px; }
  .co-detail-dialog:not(.is-comparison-open) .co-detail-comparison { display:none; }
  .co-detail-scroll { min-height:0; max-height:55vh; max-height:55dvh; }
  .co-detail-scroll-controls { gap:9px; padding:8px 12px; }
  .co-detail-toolbar p { flex-basis:100%; margin:0; font-size:10px; text-align:left; }
  .co-detail-toolbar p br { display:none; }
  .co-detail-table th, .co-detail-table td { width:90px; min-width:90px; }
  .co-detail-table .co-detail-corner, .co-detail-table .co-detail-order { width:155px; min-width:155px; max-width:155px; padding:11px 9px; }
  .co-detail-corner-line { flex-wrap:wrap; gap:4px; }
  .co-detail-table thead th { font-size:11px; }
  .co-detail-order > div { gap:4px; }
  .co-detail-price { font-size:12px; }
  .co-detail-weight { font-size:9px; }
  .co-detail-weight strong { font-size:13px; }
  .co-detail-foot { padding:10px 13px; }
  .co-detail-foot p { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) { .co-loading-dot { animation:none; } }

/* Decorative accents: no typography, card dimensions, or financial colors change. */
:root {
  --tq-season-ink: var(--tq-season-day, #b88861);
  --tq-season-soft: var(--tq-season-day-soft, #b6a178);
  --tq-season-paper: #fffaf1;
  --tq-season-picture: var(--tq-season-picture-day);
  --tq-season-badge: var(--tq-season-badge-day);
  --tq-season-edge: var(--tq-season-edge-day);
}
:root[data-theme="dark"] {
  --tq-season-ink: var(--tq-season-night, #cda07b);
  --tq-season-soft: var(--tq-season-night-soft, #d0b893);
  --tq-season-paper: #303841;
  --tq-season-picture: var(--tq-season-picture-night);
  --tq-season-badge: var(--tq-season-badge-night);
  --tq-season-edge: var(--tq-season-edge-night);
}
.tq-season-svg { display:block; width:100%; height:100%; overflow:visible; }
#season-toggle {
  position:relative; flex:none; width:38px; min-width:38px; height:34px;
  padding:7px 9px; color:var(--muted); touch-action:manipulation;
  transition:color .15s, border-color .15s, background-color .15s;
}
#season-toggle[aria-pressed="true"] { color:var(--tq-season-ink); }
#season-toggle:hover { border-color:var(--tq-season-ink); }
#season-toggle:focus-visible { outline-offset:3px; }
#season-toggle .tq-season-toggle-icon { width:18px; height:18px; }
.tq-season-toggle-dot {
  position:absolute; right:6px; bottom:5px; width:3px; height:3px;
  border-radius:50%; background:currentColor; opacity:0;
}
#season-toggle[aria-pressed="true"] .tq-season-toggle-dot { opacity:.8; }
#season-toggle[aria-pressed="false"] .tq-season-toggle-icon { opacity:.65; }
.tq-season-brand-anchor { position:relative; }
.tq-season-logo, .tq-season-seam, .tq-season-rail {
  color:var(--tq-season-ink); pointer-events:none; user-select:none;
}
.tq-season-logo {
  position:absolute; display:block; left:16px; top:-8px; width:22px; height:22px;
  transform:rotate(16deg); transform-origin:35% 75%; opacity:.9;
}
.tq-season-logo-maple { left:16px; top:-9px; width:23px; height:23px; transform:rotate(23deg); }
.tq-season-logo-ginkgo { left:16px; top:-8px; width:23px; height:23px; transform:rotate(22deg); }
.tq-season-logo-bud { left:16px; top:-10px; transform:rotate(26deg); }
.tq-season-logo-petal { left:16px; top:-8px; width:22px; height:22px; transform:rotate(36deg); }
.tq-season-logo-wave { left:16px; top:-7px; width:22px; height:20px; transform:rotate(-10deg); }
.tq-season-logo-rain { left:21px; top:-7px; width:16px; height:21px; transform:rotate(15deg); }
.tq-season-logo-sun { left:16px; top:-10px; width:23px; height:23px; transform:rotate(0); }
.tq-season-logo-snow { left:-3px; top:-7px; width:46px; height:18px; transform:none; color:var(--tq-season-soft); opacity:.95; }
.tq-season-snowcap { display:block; width:46px; height:18px; }
.tq-season-logo-flake { position:absolute; width:12px; height:12px; top:-2px; right:-2px; color:var(--tq-season-ink); }
.tq-season-seam {
  display:block; position:relative; width:100%; height:0;
  top:calc(-1 * var(--tq-nav-gap, 16px)); overflow:visible; z-index:1;
}
.tq-season-seam-line {
  position:absolute; top:0; right:0; width:104px; height:1px;
  background:linear-gradient(90deg, transparent, var(--tq-season-soft)); opacity:.4;
}
.tq-season-perch { position:absolute; display:block; opacity:.9; }
.tq-season-perch-a { right:6px; top:-7px; width:24px; height:24px; transform:rotate(68deg); }
.tq-season-perch-b { right:34px; top:-4px; width:16px; height:16px; color:var(--tq-season-soft); transform:rotate(-28deg); opacity:.8; }
[data-tq-season="winter"] .tq-season-seam-line {
  top:-2px; right:0; width:88px; height:4px; border-radius:80% 45% 30% 40%; opacity:.65;
}
[data-tq-season="winter"] .tq-season-perch-a { width:12px; height:12px; top:-8px; right:10px; transform:none; }
[data-tq-season="winter"] .tq-season-perch-b { width:8px; height:8px; right:67px; top:-4px; transform:none; }
[data-tq-season="summer"] .tq-season-perch-a { width:21px; height:15px; top:-5px; transform:none; }
[data-tq-season="summer"] .tq-season-perch-b { width:12px; height:12px; right:35px; top:-3px; transform:none; }
.tq-season-rail {
  position:fixed; display:block; bottom:20px; z-index:2;
  overflow:hidden; contain:strict;
}
.tq-season-rail-left { left:0; }
.tq-season-rail-right { right:0; }
.tq-season-particle {
  position:absolute; display:block; left:var(--tq-p-x); top:var(--tq-p-y);
  width:var(--tq-p-size); height:var(--tq-p-size); opacity:0;
  animation:tq-season-drift var(--tq-p-duration) var(--tq-p-delay) linear infinite;
}
.tq-season-particle:nth-child(2n) { color:var(--tq-season-soft); }
.tq-season-paused .tq-season-particle { animation-play-state:paused; }
.tq-season-paused .tq-season-logo { animation-play-state:paused!important; }
@keyframes tq-season-drift {
  0% { transform:translate3d(0,-58px,0) rotate(-32deg); opacity:0; }
  10% { opacity:.72; }
  28% { transform:translate3d(var(--tq-p-drift),25px,0) rotate(var(--tq-p-turn)) scaleX(.72); opacity:.9; }
  58% { transform:translate3d(calc(-1 * var(--tq-p-drift)),calc(var(--tq-p-fall) * .55),0) rotate(calc(var(--tq-p-turn) * 1.45)); opacity:.78; }
  87% { opacity:.52; }
  100% { transform:translate3d(var(--tq-p-drift),var(--tq-p-fall),0) rotate(var(--tq-p-end)) scaleX(.8); opacity:0; }
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  [data-tq-season-motion="ambient"] .tq-season-brand-anchor:hover .tq-season-logo:not(.tq-season-logo-snow) { animation:tq-season-nod .8s ease-in-out; }
}
@keyframes tq-season-nod {
  0%,100% { translate:0 0; }
  35% { translate:0 -2px; }
  65% { translate:0 1px; }
}
/* Explicit card whitelist only. Side art lives within the border/padding strip. */
[data-tq-season] :is(#home-panel .hero, #home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome) { position:relative; }
[data-tq-season] #home-panel .hero::before,
[data-tq-season] :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after {
  content:""; position:absolute; display:block; top:24px; right:-12px; width:28px; height:54px;
  background:var(--tq-season-badge) center / contain no-repeat;
  pointer-events:none; user-select:none; z-index:1; opacity:.97; transform-origin:50% 94%;
}
[data-tq-season] #home-panel .hero::before { top:auto; bottom:12px; left:-12px; right:auto; }
[data-tq-season] #home-panel .home-feat:nth-child(4)::after { top:auto; bottom:7px; }
[data-tq-season] #mi-explorer::after { top:108px; }
[data-tq-season] :is(#home-panel .home-feat:nth-child(1), #home-panel .home-feat:nth-child(3), #common-panel .co-card:nth-child(1), #common-panel .co-card:nth-child(3), #common-panel .co-card:nth-child(5), #settings-panel) { position:relative; }
[data-tq-season] :is(#home-panel .home-feat:nth-child(1), #home-panel .home-feat:nth-child(3), #common-panel .co-card:nth-child(1), #common-panel .co-card:nth-child(3), #common-panel .co-card:nth-child(5), #settings-panel)::before {
  content:""; position:absolute; display:block; top:-4px; right:12px; width:112px; height:14px;
  background:var(--tq-season-edge) center / contain no-repeat;
  pointer-events:none; user-select:none; z-index:1; opacity:.9;
}
[data-tq-season] #common-panel .co-card::before { top:-3px; right:8px; width:94px; height:12px; }
[data-tq-season-motion="ambient"] #home-panel .hero::before,
[data-tq-season-motion="ambient"] :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after { animation:tq-season-sway 7s -2s ease-in-out infinite; }
[data-tq-season-motion="ambient"] #home-panel .home-feat:nth-child(4)::after { animation-delay:-5s; animation-duration:9s; }
@keyframes tq-season-sway {
  0%,100% { transform:rotate(-1.3deg); }
  45% { transform:rotate(1.8deg); }
  70% { transform:rotate(-.6deg); }
}
/* The home heading has ample space on wide screens; no text reflow is needed. */
@media (min-width:1280px) {
  [data-tq-season] #home-panel .hero::after {
    content:""; position:absolute; top:3px; right:18px; width:206px; height:120px;
    background:var(--tq-season-picture) center / contain no-repeat;
    pointer-events:none; user-select:none; opacity:.95;
  }
}
.tq-season-paused #home-panel .hero::before,
.tq-season-paused :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after { animation-play-state:paused; }
@media (max-width:640px) {
  [data-tq-season] #home-panel .hero::before,
  [data-tq-season] :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after { width:22px; height:43px; right:-9px; }
  [data-tq-season] #home-panel .hero::before { left:-9px; right:auto; bottom:14px; }
  [data-tq-season] :is(#home-panel .home-feat:nth-child(1), #home-panel .home-feat:nth-child(3), #common-panel .co-card:nth-child(1), #common-panel .co-card:nth-child(3), #common-panel .co-card:nth-child(5), #settings-panel)::before { width:80px; height:11px; top:-3px; }
}
@media (max-width:600px) {
  .app-header #season-toggle { order:2; width:34px; min-width:34px; padding:7px; }
  .app-header #theme-toggle { width:34px; min-width:34px; }
  .app-header:has(#va-sel) #season-toggle { grid-row:2; grid-column:2; align-self:center; justify-self:end; margin-top:4px; }
  .app-header:has(#va-sel) .brand { grid-column:1; }
  .tq-season-logo { left:12px; top:-7px; width:20px; height:20px; }
  .tq-season-logo-maple, .tq-season-logo-ginkgo { left:12px; top:-8px; width:20px; height:20px; }
  .tq-season-logo-bud { left:12px; top:-9px; }
  .tq-season-logo-rain { left:17px; width:14px; height:18px; }
  .tq-season-logo-sun { left:12px; top:-9px; }
  .tq-season-logo-snow { left:-3px; top:-6px; width:39px; height:16px; }
  .tq-season-snowcap { width:39px; height:16px; }
  .tq-season-logo-flake { width:10px; height:10px; right:4px; }
  .tq-season-perch-a { width:15px; height:15px; top:-5px; right:3px; }
  .tq-season-perch-b { width:10px; height:10px; right:20px; top:-3px; }
  .tq-season-seam-line { width:70px; }
}
@media (prefers-reduced-motion:reduce) {
  .tq-season-particle, .tq-season-logo { animation:none!important; }
  .tq-season-rail { display:none; }
  [data-tq-season] #home-panel .hero::before,
  [data-tq-season] :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after { animation:none!important; }
}
@media print {
  #season-toggle, .tq-season-logo, .tq-season-seam, .tq-season-rail { display:none!important; }
  [data-tq-season] #home-panel .hero::before,
  [data-tq-season] #home-panel .hero::after,
  [data-tq-season] :is(#home-panel .home-feat:nth-child(1), #home-panel .home-feat:nth-child(3), #common-panel .co-card:nth-child(1), #common-panel .co-card:nth-child(3), #common-panel .co-card:nth-child(5), #settings-panel)::before,
  [data-tq-season] :is(#home-panel .home-feat:nth-child(2), #home-panel .home-feat:nth-child(4), #common-panel .co-favorites, #mi-explorer, #tab-guide .guide-welcome)::after { display:none!important; }
}
