:root,
[data-theme="night"] {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111722;
  --panel-2: #151d2b;
  --text: #f6f8fb;
  --muted: #99a4b5;
  --line: rgba(255,255,255,.08);
  --red: #ff4d5e;
  --green: #2bd67b;
  --gold: #f8c66d;
  --blue: #75a7ff;
  --body-bg: radial-gradient(circle at top, #172033 0, var(--bg) 42%);
  --topbar-bg: linear-gradient(180deg, rgba(9,11,16,.98), rgba(9,11,16,.76));
  --sticky-bg: linear-gradient(180deg, rgba(9,11,16,.94), rgba(9,11,16,.7));
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  --item-bg: rgba(17,23,34,.86);
  --filter-bg: rgba(17,23,34,.9);
  --nav-bg: rgba(15,20,30,.92);
  --soft-bg: rgba(255,255,255,.05);
  --input-bg: rgba(255,255,255,.06);
  --risk-bg: rgba(255,77,94,.12);
  --risk-text: #ffd7dc;
  --warning-text: #ffe7b0;
  --list-text: #dfe6f3;
  --link: #9fc0ff;
  --badge-bg: rgba(117,167,255,.12);
  --badge-text: #bdd3ff;
  --badge-red-bg: rgba(255,77,94,.13);
  --badge-red-text: #ffc7cf;
  --badge-green-bg: rgba(43,214,123,.13);
  --badge-green-text: #b8ffd7;
  --badge-gold-bg: rgba(248,198,109,.14);
  --badge-gold-text: #ffe2a2;
  --ghost-bg: rgba(255,255,255,.08);
  --ghost-text: #f6f8fb;
  --logout-text: #ffe2a2;
  --theme-segment-bg: rgba(255,255,255,.06);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

[data-theme="day"] {
  color-scheme: light;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #eef3fb;
  --text: #172033;
  --muted: #5c6676;
  --line: rgba(23,32,51,.11);
  --red: #df3045;
  --green: #138a4f;
  --gold: #aa6b00;
  --blue: #2368d8;
  --body-bg: radial-gradient(circle at 10% 0%, rgba(117,167,255,.26) 0, transparent 32%), linear-gradient(180deg, #f9fbff 0%, #edf3fb 100%);
  --topbar-bg: linear-gradient(180deg, rgba(249,251,255,.96), rgba(249,251,255,.78));
  --sticky-bg: linear-gradient(180deg, rgba(249,251,255,.94), rgba(249,251,255,.76));
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.84));
  --item-bg: rgba(255,255,255,.92);
  --filter-bg: rgba(255,255,255,.94);
  --nav-bg: rgba(255,255,255,.94);
  --soft-bg: rgba(35,104,216,.06);
  --input-bg: rgba(255,255,255,.9);
  --risk-bg: rgba(223,48,69,.08);
  --risk-text: #9f1f2f;
  --warning-text: #71500a;
  --list-text: #273244;
  --link: #1d5fc7;
  --badge-bg: rgba(35,104,216,.12);
  --badge-text: #174a9f;
  --badge-red-bg: rgba(223,48,69,.11);
  --badge-red-text: #a42031;
  --badge-green-bg: rgba(19,138,79,.12);
  --badge-green-text: #0f6f42;
  --badge-gold-bg: rgba(170,107,0,.13);
  --badge-gold-text: #7c4f00;
  --ghost-bg: rgba(23,32,51,.06);
  --ghost-text: #253149;
  --logout-text: #8a5a00;
  --theme-segment-bg: rgba(23,32,51,.06);
  --shadow: 0 18px 50px rgba(21,41,78,.13);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--body-bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif; }
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); transition: background .18s ease, color .18s ease; }
body.login-body { background: radial-gradient(circle at 20% 0%, rgba(255, 213, 102, .35), transparent 34%), radial-gradient(circle at 80% 12%, rgba(255, 153, 0, .26), transparent 30%), linear-gradient(160deg, #080703 0%, #171009 46%, #2a1b08 100%); }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }

.app-shell { width: 100%; max-width: 720px; margin: 0 auto; min-height: 100vh; padding: 14px 14px 96px; }
.theme-segment { display: inline-flex; align-items: center; gap: 3px; height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--theme-segment-bg); box-shadow: var(--shadow); }
.theme-toggle-btn { min-width: 42px; height: 32px; padding: 0 8px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .02em; }
.theme-toggle-btn.active { color: white; background: linear-gradient(135deg, var(--red), var(--blue)); box-shadow: 0 10px 22px rgba(117,167,255,.18); }
[data-theme="day"] .theme-toggle-btn.active { color: white; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 2px 10px; background: var(--topbar-bg); backdrop-filter: blur(14px); transform: translateY(0); transition: transform .22s ease, opacity .18s ease; will-change: transform; }
.topbar.topbar-hidden { transform: translateY(calc(-100% - 16px)); opacity: 0; pointer-events: none; }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo-frame { width: 48px; height: 48px; aspect-ratio: 1 / 1; flex: 0 0 48px; display: grid; place-items: center; text-align: center; border-radius: 14px; color: #231604; background: linear-gradient(135deg, #fff3ad 0%, #ffd15c 48%, #d88808 100%); border: 1px solid rgba(255,237,169,.75); box-shadow: 0 12px 26px rgba(248,198,109,.22), inset 0 1px 0 rgba(255,255,255,.45); overflow: hidden; }
.brand-logo-frame span { display: block; line-height: 1; font-size: 24px; font-weight: 950; letter-spacing: 0; }
.brand-kicker { margin: 0 0 1px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
h3 { margin: 0 0 12px; font-size: 17px; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.muted { color: var(--muted); line-height: 1.6; }

.icon-btn { width: 42px; height: 42px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.logout-btn { width: auto; padding: 0 12px; color: var(--logout-text); font-size: 12px; font-weight: 800; }
.primary { border-radius: 14px; padding: 11px 14px; background: linear-gradient(135deg, var(--red), #ff7b54); color: white; font-weight: 700; box-shadow: 0 12px 30px rgba(255,77,94,.22); }
.primary.gold-primary { color: #231604; background: linear-gradient(135deg, #fff1a8 0%, #ffd15c 44%, #f39b19 100%); box-shadow: 0 18px 44px rgba(248,198,109,.28); }
.primary.ghost { background: var(--ghost-bg); color: var(--ghost-text); box-shadow: none; border: 1px solid var(--line); }
.primary.full { width: 100%; }

.page { display: none; animation: pageIn .22s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero-card, .card, .warning-card { border: 1px solid var(--line); border-radius: 24px; background: var(--card-bg); box-shadow: var(--shadow); }
.hero-card { position: relative; overflow: hidden; padding: 22px; margin: 6px 0 14px; }
.hero-card::after { content: ""; position: absolute; inset: auto -20% -60% 20%; height: 160px; background: radial-gradient(circle, rgba(255,77,94,.22), transparent 62%); }
.red-edge { border-left: 4px solid var(--red); }
.risk-pill { display: inline-flex; margin-top: 12px; padding: 8px 11px; border-radius: 999px; background: var(--risk-bg); color: var(--risk-text); }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.card { padding: 18px; margin: 12px 0; }
.warning-card { padding: 14px 16px; margin: 12px 0; color: var(--warning-text); background: linear-gradient(135deg, rgba(248,198,109,.16), rgba(255,255,255,.04)); }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.summary-card { padding: 15px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.summary-card strong { display: block; font-size: 28px; color: var(--text); }
.summary-card span { color: var(--muted); font-size: 13px; }

.check-list, .rule-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.check-list li, .rule-list li { padding: 12px; border-radius: 16px; background: var(--soft-bg); color: var(--list-text); line-height: 1.55; }
.check-list li::before { content: "▸ "; color: var(--red); }
.rule-list li::before { content: "◇ "; color: var(--green); }
.analysis-card { border-left: 4px solid var(--blue); }
.tomorrow-plan-card { border-left-color: rgba(248,198,109,.86); }
.tomorrow-plan-card .item-top { align-items: flex-start; }
.tomorrow-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tomorrow-plan-section { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft-bg); }
.tomorrow-plan-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--gold); }
.tomorrow-plan-section .mini-list { font-size: 13px; }
.logic-list { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.logic-list li { padding: 12px 12px 12px 6px; color: var(--list-text); line-height: 1.6; border-bottom: 1px solid var(--line); }
.stock-ocr-panel { display: grid; gap: 10px; padding: 12px; border-left: 4px solid rgba(248,198,109,.72); }
.pool-mode-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-left: 4px solid rgba(117,167,255,.78); }
.pool-mode-banner.deep-mode { border-left-color: rgba(248,198,109,.95); background: linear-gradient(135deg, rgba(248,198,109,.12), var(--card-bg)); }
.pool-mode-banner.quick-mode { border-left-color: rgba(117,167,255,.78); }
.pool-mode-banner h3 { margin: 0; }
.stock-source-badge { margin-left: 6px; vertical-align: middle; }
.stock-card-detail.deep-source { border-color: rgba(248,198,109,.72); box-shadow: inset 4px 0 0 rgba(248,198,109,.72); }
.stock-card-detail.quick-source { box-shadow: inset 4px 0 0 rgba(117,167,255,.36); }
.stock-result-panel { display: grid; gap: 12px; border-left: 4px solid rgba(117,167,255,.55); }
.stock-result-panel.deep-result-panel { border-left-color: rgba(248,198,109,.9); background: linear-gradient(135deg, rgba(248,198,109,.08), var(--card-bg)); }
.stock-result-panel .result-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.stock-result-panel h3 { margin: 0; }
.stock-result-panel .stack { gap: 10px; }
.stock-result-panel .stock-card-detail > summary { padding: 12px; }
.ocr-selection-logic { padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, rgba(117,167,255,.10), var(--soft-bg)); }
.ocr-selection-logic h4 { margin: 0 0 7px; color: var(--gold); font-size: 13px; }
.ocr-selection-logic ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--list-text); font-size: 12px; line-height: 1.55; }
.ocr-selection-logic b { color: var(--text); }
.stock-result-panel .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ocr-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ocr-head h3 { margin-bottom: 0; font-size: 15px; }
.ocr-bucket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ocr-bucket { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft-bg); }
.ocr-bucket h4 { margin: 0 0 5px; color: var(--text); font-size: 12px; line-height: 1.1; }
.ocr-lines { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; color: var(--list-text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.35; }
.ocr-combined .ocr-lines { line-height: 1.28; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; max-width: 100%; }
.section-head > div:first-child { min-width: 0; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.button-row .primary { white-space: nowrap; }
.sticky-section-head { position: sticky; top: 70px; z-index: 10; padding: 10px 12px 12px; background: var(--sticky-bg); backdrop-filter: blur(12px); }
.stock-page-head { align-items: flex-start; margin-bottom: 8px; }
.stock-action-drawer { display: grid; gap: 10px; padding: 12px; margin: 0 0 12px; overflow: hidden; }
.stock-action-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.stock-action-head strong { font-weight: 900; }
.stock-action-head small { color: var(--muted); font-size: 12px; font-weight: 700; }
.stock-action-drawer .button-row { margin: 0; }
.stack { display: grid; gap: 12px; }
.item-card { border: 1px solid var(--line); border-radius: 22px; padding: 16px; background: var(--item-bg); }
.timeline-intel-list { position: relative; padding-left: 14px; }
.timeline-intel-list::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgba(245,184,76,.65), rgba(117,167,255,.15)); }
.intel-timeline-card { position: relative; overflow: visible; }
.intel-timeline-dot { position: absolute; left: -20px; top: 22px; width: 11px; height: 11px; border: 2px solid rgba(117,167,255,.9); border-radius: 999px; background: var(--bg); box-shadow: 0 0 0 4px rgba(117,167,255,.12); }
.raw-info-block, .interpretation-block { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft-bg); }
.raw-info-block h4, .interpretation-block h4 { margin: 0 0 8px; font-size: 13px; color: var(--text); }
.raw-info-block p, .interpretation-block p { margin: 0; line-height: 1.58; color: var(--muted); }
.interpretation-block { border-left: 3px solid rgba(245,184,76,.75); }
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item-title { margin: 0; font-size: 17px; }
.code { color: var(--muted); font-size: 12px; margin-top: 3px; }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: var(--badge-bg); color: var(--badge-text); font-size: 12px; font-weight: 700; }
.badge.red { background: var(--badge-red-bg); color: var(--badge-red-text); }
.badge.green { background: var(--badge-green-bg); color: var(--badge-green-text); }
.badge.gold { background: var(--badge-gold-bg); color: var(--badge-gold-text); }
.meta-grid { display: grid; gap: 8px; margin-top: 10px; }
.meta-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.meta-grid b { color: var(--text); }
.pnl-red { color: var(--red); }
.pnl-green { color: var(--green); }
.snapshot-box { display: grid; gap: 10px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.snapshot-grid span { padding: 10px; border-radius: 14px; background: var(--soft-bg); color: var(--muted); }
.snapshot-grid b { color: var(--text); }
.mini-list { margin: 0; padding-left: 18px; color: var(--list-text); line-height: 1.65; }
.mini-list li { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.error-box, .loading-inline { min-width: 0; padding: 12px 14px; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.error-box { display: grid; gap: 4px; border: 1px solid rgba(255, 130, 105, .34); background: rgba(255, 90, 64, .12); color: #ffd4ca; }
.error-box b { color: #ffb4a6; }
.error-box span { min-width: 0; }
.loading-inline { border: 1px dashed var(--line); background: var(--soft-bg); color: var(--muted); }
.compact { margin: 4px 0 0; font-size: 12px; }
.stock-filter-panel { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; padding: 12px; margin: -2px 0 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--filter-bg); backdrop-filter: blur(12px); }
.stock-filter-panel .compact { grid-column: 1 / -1; }
.metric-glossary-card { padding: 0; overflow: hidden; border-left: 4px solid rgba(248,198,109,.72); }
.metric-glossary-card > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; list-style: none; font-weight: 900; }
.metric-glossary-card > summary::-webkit-details-marker { display: none; }
.metric-glossary-card > summary::after { content: '展开'; flex: 0 0 auto; align-self: flex-start; padding: 5px 9px; border-radius: 999px; background: var(--soft-bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.metric-glossary-card[open] > summary::after { content: '收起'; }
.metric-glossary-card summary small { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }
.metric-glossary-list { display: grid; gap: 8px; margin: 0; padding: 0 16px 16px 34px; color: var(--list-text); line-height: 1.6; }
.metric-glossary-list b { color: var(--text); }
.stock-card-detail { padding: 0; overflow: hidden; }
.stock-card-detail > summary { cursor: pointer; list-style: none; padding: 16px; }
.stock-card-detail > summary::-webkit-details-marker { display: none; }
.stock-card-summary { position: relative; }
.stock-card-summary::after { content: '点开看选入逻辑'; display: inline-flex; margin-top: 10px; padding: 6px 10px; border-radius: 999px; background: var(--badge-gold-bg); color: var(--badge-gold-text); font-size: 12px; font-weight: 900; }
.stock-card-detail[open] .stock-card-summary::after { content: '已展开'; }
.stock-card-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.stock-detail-title { display: none; }
.stock-summary-score { margin-bottom: 0; }
.stock-explain-card { margin-top: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft-bg); }
.stock-explain-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.stock-explain-card h5 { margin: 10px 0 6px; font-size: 13px; color: var(--gold); }
.stock-explain-summary { margin: 0 0 10px; color: var(--list-text); line-height: 1.6; font-weight: 800; }
.stock-reason-list { padding-left: 20px; }
.stock-chip-logic { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.stock-metric-inline { border-left: 4px solid rgba(117,167,255,.68); }
.intel-filter-panel { position: static; grid-template-columns: 1fr; }
.intel-method-card { border-left: 4px solid var(--blue); }
.intel-card { border-left: 4px solid rgba(117,167,255,.55); }
.cognition-card { border-left: 4px solid rgba(248,198,109,.72); }
.cognition-actions { margin-top: 12px; }
.cognition-link { display: inline-flex; align-items: center; justify-content: center; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.score-grid span { padding: 9px; border-radius: 14px; background: var(--soft-bg); color: var(--muted); font-size: 12px; }
.score-grid b { display: block; color: var(--text); font-size: 16px; margin-top: 2px; }
.exposure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.exposure-row, .discipline-rule, .state-machine-card { padding: 12px; border-radius: 16px; background: var(--soft-bg); border: 1px solid var(--line); }
.portfolio-env-section { margin: 12px 0; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(220, 170, 90, 0.10), var(--soft-bg)); }
.portfolio-env-section h4, .portfolio-env-section h5 { margin: 0 0 8px; color: var(--gold); }
.portfolio-env-section .mini-list { font-size: 12px; }
.muted-panel { background: var(--soft-bg); }
.exposure-row-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; }
.exposure-bar { height: 8px; margin: 8px 0; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.exposure-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), var(--gold)); }
.exposure-card, .discipline-card, .drawdown-monitor-card, .review-attribution-card, .state-machine-card { border-left: 4px solid rgba(248,198,109,.72); }
.discipline-rule b, .discipline-rule span { display: block; }
.discipline-rule span { color: var(--gold); font-size: 20px; font-weight: 900; }
.discipline-rule p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; font-size: 12px; }
.strategy-analyzer-form { display: grid; gap: 12px; margin-top: 14px; }
.strategy-suggestion-block { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft-bg); }
.strategy-suggestion-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 13px; font-weight: 900; }
.strategy-suggestion-head small { color: var(--muted); font-size: 11px; font-weight: 700; }
.strategy-suggestion-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.strategy-query-chip { max-width: 100%; min-width: 0; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--ghost-bg); color: var(--ghost-text); font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strategy-query-chip.history { border-color: rgba(248,198,109,.42); color: var(--badge-gold-text); background: var(--badge-gold-bg); }
.strategy-query-chip.recommended { border-color: rgba(117,167,255,.38); color: var(--badge-text); background: var(--badge-bg); }
.strategy-analysis-result { margin-top: 14px; }
.crowding-analysis-card { border-left: 4px solid rgba(248,198,109,.75); }
.crowding-analysis-result { display: grid; gap: 12px; margin-top: 12px; max-width: 100%; min-width: 0; overflow: hidden; }
.crowding-result-card { display: grid; gap: 12px; max-width: 100%; min-width: 0; overflow: hidden; border-left: 4px solid var(--gold); }
.crowding-batch-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; max-width: 100%; min-width: 0; }
.crowding-batch-head > * { max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.crowding-result-card .item-top { flex-wrap: wrap; max-width: 100%; min-width: 0; }
.crowding-result-card .item-top > div { flex: 1 1 180px; max-width: 100%; min-width: 0; }
.crowding-result-card h4,
.crowding-result-card p,
.crowding-result-card .muted,
.crowding-result-card .score-grid span,
.crowding-result-card .score-grid b { max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.crowding-result-card .badge { flex: 0 1 auto; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.crowding-analysis-result .stack { max-width: 100%; min-width: 0; overflow: hidden; }
.support-zone-analysis-card,
.support-zone-analysis-result,
.support-zone-result-card,
.volume-pulse-analysis-card,
.volume-pulse-analysis-result,
.volume-pulse-result-card,
.shrink-days-analysis-card,
.shrink-days-analysis-result,
.shrink-days-result-card,
.market-volume-analysis-card,
.market-volume-analysis-result,
.market-volume-result-card,
.market-perception-card,
.market-perception-result,
.market-perception-result-card,
.uptrend-monitor-card,
.uptrend-monitor-result,
.uptrend-result-card,
.entry-point-analysis-card,
.entry-point-analysis-result,
.entry-point-result-card { max-width: 100%; min-width: 0; }
.support-zone-analysis-result,
.crowding-analysis-result,
.volume-pulse-analysis-result,
.shrink-days-analysis-result,
.market-volume-analysis-result,
.market-perception-result,
.uptrend-monitor-result,
.entry-point-analysis-result { display: grid; gap: 12px; margin-top: 12px; overflow: hidden; }
.support-zone-result-card,
.crowding-result-card,
.volume-pulse-result-card,
.shrink-days-result-card,
.market-volume-result-card,
.market-perception-result-card,
.uptrend-result-card,
.entry-point-result-card { overflow: hidden; }
.support-zone-result-head { flex-wrap: wrap; }
.support-zone-title-block { min-width: 0; flex: 1 1 220px; }
.support-zone-title-block h4,
.support-zone-title-block p,
.support-zone-source-line,
.shrink-days-source-line,
.entry-point-source-line,
.support-zone-structure-detail,
.support-zone-node-list li,
.support-zone-structure-note-list li,
.support-zone-rule-list li,
.support-zone-note-list li,
.shrink-days-rule-block p,
.entry-point-tranche-list li,
.entry-point-gate-list li,
.entry-point-event-list li { overflow-wrap: anywhere; word-break: break-word; }
.pill { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; padding: 6px 9px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-text); font-size: 12px; font-weight: 800; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.pill.red { background: var(--badge-red-bg); color: var(--badge-red-text); }
.pill.green { background: var(--badge-green-bg); color: var(--badge-green-text); }
.pill.gold { background: var(--badge-gold-bg); color: var(--badge-gold-text); }
.support-zone-module-id { flex: 0 1 auto; }
.support-zone-structure-detail { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft-bg); }
.support-zone-structure-detail h4 { margin: 0 0 6px; }
.support-zone-node-list,
.support-zone-structure-note-list { margin-top: 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.metric-grid > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.metric-grid small,
.metric-grid b,
.metric-grid span { display: block; min-width: 0; overflow-wrap: anywhere; }
.metric-grid small { color: var(--muted); font-size: 11px; }
.metric-grid b { margin-top: 4px; color: var(--text); font-size: 15px; line-height: 1.35; }
.metric-grid span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.support-zone-rule-list small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.volume-pulse-analysis-card { border-left-color: rgba(117,167,255,.78); }
.shrink-days-analysis-card { border-left-color: rgba(43,214,123,.72); }
.market-volume-analysis-card { border-left-color: rgba(248,198,109,.82); }
.market-perception-card { border-left: 4px solid rgba(117,167,255,.78); }
.market-perception-section { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.market-perception-section h4 { margin: 0 0 8px; color: var(--gold); }
.market-perception-source-line,
.market-perception-summary p,
.market-perception-signal p,
.market-perception-section li { overflow-wrap: anywhere; word-break: break-word; }
.uptrend-monitor-card { border-left: 4px solid rgba(248,198,109,.82); }
.entry-point-analysis-card { border-left-color: rgba(248,198,109,.82); }
.volume-pulse-result-card,
.shrink-days-result-card,
.market-volume-result-card,
.market-perception-result-card,
.uptrend-result-card,
.entry-point-result-card { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: var(--soft-bg); }
.market-volume-row,
.market-perception-signal,
.uptrend-stock-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.uptrend-stock-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.uptrend-stock-row p { grid-column: 1 / -1; }
.uptrend-score-pill { min-width: 48px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(248,198,109,.35); background: var(--badge-gold-bg); color: var(--badge-gold-text); text-align: center; font-weight: 900; }
.uptrend-sector-list { display: grid; gap: 8px; }
.uptrend-sector-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.uptrend-sector-row small { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
.uptrend-warning-list,
.uptrend-source-line,
.uptrend-backtest-kind li { overflow-wrap: anywhere; }
.market-volume-result-head,
.uptrend-result-head,
.shrink-days-result-head,
.entry-point-result-head { align-items: flex-start; }
.market-volume-summary p { min-width: 0; overflow-wrap: anywhere; }
.shrink-days-rule-block { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.shrink-days-rule-block h4 { margin: 0 0 6px; }
.shrink-days-rule-block p { margin: 6px 0 0; line-height: 1.55; }
.entry-point-tranche-list small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.entry-point-tranche-block { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.volume-pulse-meter { position: relative; height: 10px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, rgba(43,214,123,.18), rgba(248,198,109,.18), rgba(255,92,122,.18)); border: 1px solid var(--line); }
.volume-pulse-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); max-width: 100%; }
.volume-pulse-result-card .meta-grid p,
.shrink-days-result-card .meta-grid p,
.entry-point-result-card .meta-grid p,
.volume-pulse-result-card .warning-list li,
.shrink-days-result-card .warning-list li,
.entry-point-result-card .warning-list li { overflow-wrap: anywhere; word-break: break-word; }
.crowding-batch-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; max-width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft-bg); }
.crowding-analysis-card textarea { min-height: 96px; }
.strategy-result-card { border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: var(--soft-bg); }
.strategy-verdict-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.verdict-card { padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.verdict-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.verdict-card strong { display: block; color: var(--text); font-size: 16px; line-height: 1.35; }
.verdict-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; font-size: 12px; }
.p2-opportunity-card { border-left-color: rgba(248,198,109,.86); }
.p2-comparison-result { margin-top: 12px; }
.p2-verdict-grid .verdict-card.green { border-color: rgba(43,214,123,.46); background: var(--badge-green-bg); }
.p2-verdict-grid .verdict-card.gold { border-color: rgba(248,198,109,.48); background: var(--badge-gold-bg); }
.p2-verdict-grid .verdict-card.red { border-color: rgba(255,92,122,.45); background: var(--badge-red-bg); }
.p2-mini-card strong { font-size: 15px; }
.strategy-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strategy-visual-debug { margin-top: 14px; }
.strategy-visual-grid { display: grid; gap: 10px; }
.strategy-visual-lane { padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.strategy-rule-card { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.strategy-rule-card h3 { margin: 0 0 10px; }
.strategy-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.strategy-rule-block { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.strategy-rule-block h4 { margin: 0 0 8px; }
.strategy-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.invalidation-card { border-top-color: rgba(255,77,94,.38); }
.invalidation-trigger-list { display: grid; gap: 8px; padding-left: 0; list-style: none; }
.invalidation-trigger-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.invalidation-trigger-list li small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.invalidation-trigger-list .risk-on { border-left: 4px solid var(--red); }
.invalidation-trigger-list .risk-off { border-left: 4px solid var(--green); opacity: .82; }
.strategy-visual-lane.red { border-left: 4px solid var(--red); }
.strategy-visual-lane.gold { border-left: 4px solid var(--gold); }
.strategy-visual-lane.green { border-left: 4px solid var(--green); }
.strategy-lane-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.strategy-lane-head strong { display: block; color: var(--text); }
.strategy-lane-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.strategy-progress-track { position: relative; height: 14px; margin: 12px 0 7px; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg, rgba(255,77,94,.42) 0 33.3%, rgba(248,198,109,.42) 33.3% 66.6%, rgba(43,214,123,.42) 66.6% 100%); border: 1px solid var(--line); }
.strategy-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.55)); }
.strategy-progress-marker { position: absolute; top: -4px; width: 3px; height: 22px; border-radius: 999px; background: var(--text); box-shadow: 0 0 0 3px rgba(117,167,255,.18); transform: translateX(-50%); }
.strategy-progress-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.strategy-progress-labels span:nth-child(2) { text-align: center; }
.strategy-progress-labels span:nth-child(3) { text-align: right; }
.legacy-strategy-card summary { cursor: pointer; font-weight: 800; color: var(--text); }
.legacy-strategy-form { margin-top: 14px; }
.sector-live-result { position: relative; overflow: hidden; border-left: 4px solid var(--gold); }
.sector-live-result--loading { border-color: rgba(248,198,109,.62); }
.sector-live-empty { padding: 10px 0; color: var(--muted); line-height: 1.6; }
.sector-live-head, .sector-loading-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sector-live-head h3, .sector-loading-line h3 { margin: 0; }
.sector-time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.sector-time-grid span { display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: var(--soft-bg); color: var(--muted); font-size: 11px; line-height: 1.35; }
.sector-time-grid b { color: var(--text); font-size: 12px; line-height: 1.45; }
.sector-live-brief { padding: 12px; border-radius: 16px; background: var(--soft-bg); }
.sector-live-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.sector-live-groups section { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.sector-live-groups h4 { margin: 0 0 8px; font-size: 13px; }
.sector-live-groups ul { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.sector-live-groups li { display: grid; gap: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.sector-live-groups strong { color: var(--text); }
.sector-live-top-grid { margin-top: 12px; }
.sector-slot-archive { margin: 12px 0; }
.sector-slot-archive > summary { cursor: pointer; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--filter-bg); color: var(--text); font-weight: 900; }
.sector-slot-archive-body { margin-top: 12px; }
.sector-spinner { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 999px; border: 3px solid rgba(248,198,109,.24); border-top-color: var(--gold); animation: sectorSpin .8s linear infinite; }
.sector-loading-skeleton { height: 120px; margin-top: 14px; border-radius: 18px; background: linear-gradient(90deg, var(--soft-bg), rgba(248,198,109,.16), var(--soft-bg)); background-size: 220% 100%; animation: sectorShimmer 1.1s ease-in-out infinite; }
.sector-error { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; color: var(--badge-red-text); background: var(--badge-red-bg); }
.primary.is-loading { position: relative; opacity: .82; }
.primary.is-loading::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border-radius: 999px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; vertical-align: -2px; animation: sectorSpin .8s linear infinite; }
@keyframes sectorSpin { to { transform: rotate(360deg); } }
@keyframes sectorShimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

.midday-screen-card { border-left: 4px solid var(--red); overflow: hidden; scroll-margin-top: 74px; }
.midday-screen-head { align-items: flex-start; }
.midday-screen-head > div { min-width: 0; }
.midday-screen-head h2 { margin: 0 0 6px; }
.midday-screen-actions { align-items: center; }
.midday-screen-result { display: grid; gap: 12px; margin-top: 14px; min-width: 0; overflow: hidden; }
.midday-screen-result.empty { padding: 12px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); background: var(--soft-bg); }
.midday-screen-summary { padding: 13px; border: 1px solid rgba(255,92,122,.28); border-radius: 18px; background: linear-gradient(135deg, rgba(255,92,122,.09), var(--soft-bg)); min-width: 0; }
.midday-screen-summary p { overflow-wrap: anywhere; }
.midday-screen-candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.midday-screen-candidate { display: grid; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.midday-screen-candidate h4 { margin: 4px 0 0; overflow-wrap: anywhere; }
.midday-screen-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.midday-screen-metrics span { display: grid; gap: 3px; min-width: 0; padding: 8px; border-radius: 12px; color: var(--muted); background: var(--soft-bg); font-size: 11px; }
.midday-screen-metrics b { color: var(--text); overflow-wrap: anywhere; }
.midday-screen-checks { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.midday-screen-check { max-width: 100%; padding: 6px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.midday-screen-check.pass { color: var(--badge-red-text); background: var(--badge-red-bg); }
.midday-screen-check.fail { color: var(--badge-green-text); background: var(--badge-green-bg); }
.midday-screen-check.unknown { color: var(--badge-gold-text); background: var(--badge-gold-bg); }
.midday-screen-plan { padding: 10px 11px; border-left: 3px solid var(--red); border-radius: 12px; color: var(--text); background: var(--badge-red-bg); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }

.panic-rebound-card { border-left: 4px solid rgba(248,198,109,.82); scroll-margin-top: 74px; }
.tenbagger-card { border-left: 4px solid var(--red); scroll-margin-top: 74px; }
.panic-rebound-result,
.tenbagger-result { display: grid; gap: 12px; margin-top: 14px; max-width: 100%; min-width: 0; overflow: hidden; }
.tenbagger-result.empty { padding: 12px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); background: var(--soft-bg); }
.panic-rebound-result-card,
.tenbagger-result-card { display: grid; gap: 12px; max-width: 100%; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--soft-bg); overflow: hidden; }
.panic-rebound-verdict { margin: 0; padding: 12px; border-left: 4px solid var(--gold); border-radius: 14px; background: var(--badge-gold-bg); overflow-wrap: anywhere; }
.panic-rebound-threshold-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.panic-rebound-threshold,
.tenbagger-candidate { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.panic-rebound-threshold h4,
.tenbagger-candidate h4 { margin: 0; overflow-wrap: anywhere; }
.panic-rebound-horizons { display: grid; gap: 7px; }
.panic-rebound-horizon { display: grid; gap: 3px; min-width: 0; padding: 8px; border-radius: 12px; background: var(--soft-bg); font-size: 11px; line-height: 1.4; }
.panic-rebound-horizon span,
.panic-rebound-review li,
.tenbagger-funnel li,
.tenbagger-manual li { overflow-wrap: anywhere; word-break: break-word; }
.panic-rebound-review,
.tenbagger-funnel,
.tenbagger-manual { padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.panic-rebound-review h4,
.tenbagger-funnel h4,
.tenbagger-manual h4 { margin: 0 0 8px; color: var(--gold); }
.tenbagger-candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tenbagger-checks { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tenbagger-check { max-width: 100%; padding: 6px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.tenbagger-check.pass { color: var(--badge-red-text); background: var(--badge-red-bg); }
.tenbagger-check.fail { color: var(--badge-green-text); background: var(--badge-green-bg); }
.tenbagger-check.unknown { color: var(--badge-gold-text); background: var(--badge-gold-bg); }
.tenbagger-result details { max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tenbagger-result summary { cursor: pointer; font-weight: 800; overflow-wrap: anywhere; }

.form-card { display: grid; gap: 12px; }
.hidden { display: none !important; }
.form-grid { display: grid; gap: 10px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.position-detail-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft-bg); }
.position-actions { margin-top: 12px; }
.inline-position-edit { display: grid; gap: 10px; margin-top: 12px; }
.ocr-review-card { display: grid; gap: 12px; border-left: 4px solid var(--gold); scroll-margin-top: 78px; }
.ocr-review-card textarea { min-height: 96px; font-size: 12px; }
.ocr-row, .ocr-result-row, .ocr-empty-state { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--soft-bg); border: 1px solid var(--line); }
.ocr-result-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ocr-result-main strong { min-width: 0; overflow-wrap: anywhere; }
.ocr-result-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ocr-result-metrics span { display: grid; gap: 3px; min-width: 0; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 12px; }
.ocr-result-metrics strong { color: var(--text); overflow-wrap: anywhere; }
.ocr-empty-state strong { color: var(--text); }
.ocr-review-card .primary:disabled { opacity: .52; cursor: not-allowed; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input, textarea, select { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--input-bg); color: var(--text); padding: 12px; outline: none; }
textarea { min-height: 74px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(117,167,255,.7); box-shadow: 0 0 0 3px rgba(117,167,255,.12); }

.bottom-nav { position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; width: min(720px, calc(100vw - 16px)); padding: 8px; border: 1px solid var(--line); border-radius: 24px; background: var(--nav-bg); box-shadow: var(--shadow); backdrop-filter: blur(18px); transition: width .22s ease, padding .22s ease, border-radius .22s ease, transform .22s ease, background .2s ease; }
.nav-btn { min-height: 42px; border-radius: 16px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; transition: min-height .22s ease, border-radius .22s ease, background .18s ease, color .18s ease, transform .18s ease; }
.nav-label, .nav-short { display: inline-flex; align-items: center; justify-content: center; transition: opacity .18s ease, transform .18s ease; }
.nav-short { display: none; font-size: 13px; font-weight: 900; letter-spacing: 0; }
.nav-btn.active { color: white; background: linear-gradient(135deg, rgba(255,77,94,.95), rgba(117,167,255,.75)); }
.nav-compact-toggle { position: absolute; right: 10px; top: -34px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--nav-bg); box-shadow: 0 10px 24px rgba(0,0,0,.18); font-size: 11px; font-weight: 800; backdrop-filter: blur(16px); transition: transform .18s ease, background .18s ease, color .18s ease; }
.bottom-nav--compact { width: min(410px, calc(100vw - 56px)); padding: 5px 6px; border-radius: 999px; }
.bottom-nav--compact .nav-btn { min-height: 30px; padding: 0; border-radius: 999px; }
.bottom-nav--compact .nav-label { display: none; opacity: 0; transform: translateY(4px) scale(.88); }
.bottom-nav--compact .nav-short { display: inline-flex; opacity: 1; transform: translateY(0) scale(1); }
.bottom-nav--compact .nav-compact-toggle { transform: translateY(2px); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(12px); z-index: 60; min-width: 220px; max-width: calc(100vw - 36px); padding: 12px 16px; border-radius: 16px; background: rgba(246,248,251,.94); color: #111722; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; text-align: center; font-weight: 700; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tap-feedback { animation: tapPulse .28s ease; }
@keyframes tapPulse { 0% { transform: scale(1); filter: brightness(1); } 45% { transform: scale(.96); filter: brightness(1.35); } 100% { transform: scale(1); filter: brightness(1); } }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.login-card { width: min(440px, 100%); position: relative; overflow: hidden; padding: 30px 22px 22px; border: 1px solid rgba(255, 214, 104, .28); border-radius: 30px; background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045)); box-shadow: 0 26px 80px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.16); backdrop-filter: blur(18px); }
.login-card::before { content: ""; position: absolute; inset: -35% -22% auto 40%; height: 220px; background: radial-gradient(circle, rgba(255,213,102,.46), transparent 65%); pointer-events: none; }
.login-card h1 { position: relative; margin: 4px 0 10px; font-size: 28px; }
.login-brand-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 20px; color: #2a1900; font-size: 26px; font-weight: 900; background: linear-gradient(135deg, #fff4b5, #ffc145 50%, #d98300); box-shadow: 0 16px 42px rgba(248,198,109,.28); }
.login-brand-logo-frame { position: relative; width: 96px; height: 96px; aspect-ratio: 1 / 1; display: grid; place-items: center; text-align: center; margin: 0 0 14px; border-radius: 24px; color: #231604; background: linear-gradient(135deg, #fff3ad 0%, #ffd15c 48%, #d88808 100%); border: 1px solid rgba(255,237,169,.75); box-shadow: 0 18px 38px rgba(248,198,109,.24), inset 0 1px 0 rgba(255,255,255,.45); overflow: hidden; }
.login-brand-logo-frame span { display: block; line-height: 1; font-size: 46px; font-weight: 950; letter-spacing: 0; }
.gold-text { color: #ffd66a; }
.login-subtitle { margin: 0 0 22px; color: #f5ddb2; line-height: 1.65; }
.login-form { position: relative; display: grid; gap: 14px; }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; padding: 5px; border: 1px solid rgba(255, 214, 104, .18); border-radius: 16px; background: rgba(11, 10, 7, .34); }
.auth-tab { border-radius: 12px; padding: 10px 12px; background: transparent; color: #f5ddb2; font-weight: 800; }
.auth-tab.active { color: #231604; background: linear-gradient(135deg, #fff1a8 0%, #ffd15c 55%, #f39b19 100%); }
.auth-panel { display: none; }
.auth-panel.active { display: grid; }
.login-form input { border-color: rgba(255, 214, 104, .2); background: rgba(11, 10, 7, .46); }
.login-form input:focus { border-color: rgba(255, 209, 92, .82); box-shadow: 0 0 0 3px rgba(255, 209, 92, .14); }
.login-error { min-height: 20px; margin: 0; color: #ffb4a6; font-size: 13px; }
.login-footnote { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.login-footnote span { padding: 7px 10px; border-radius: 999px; background: rgba(248,198,109,.13); color: #ffe5a7; font-size: 12px; }

.stock-diagnosis-result-card { display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(255, 214, 104, .16); border-radius: 22px; background: rgba(15, 14, 10, .42); }
.stock-diagnosis-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.diagnosis-section { display: grid; gap: 8px; }
.diagnosis-section h4 { margin: 0; color: #ffe1a3; }
.diagnosis-dimension-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.035); }
.diagnosis-dimension-row div { min-width: 0; display: grid; gap: 3px; }
.diagnosis-dimension-row small { color: #b8ab8d; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.score-pill { flex: 0 0 auto; min-width: 44px; padding: 6px 9px; border-radius: 999px; text-align: center; font-weight: 800; color: #231604; background: linear-gradient(135deg, #fff1a8, #f3b83f); }
.compact-stack { gap: 8px; }
.compact-meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stock-diagnosis-source-line { overflow-wrap: anywhere; }
.capital-intent-card { padding: 12px; border: 1px solid rgba(247, 194, 96, .18); border-radius: 18px; background: linear-gradient(135deg, rgba(247, 194, 96, .10), rgba(255,255,255,.03)); }
.capital-intent-card .compact-head { align-items: flex-start; gap: 10px; }
.capital-intent-card .badge { overflow-wrap: anywhere; }
.tomorrow-playbook-card { padding: 12px; border: 1px solid rgba(132, 206, 255, .18); border-radius: 18px; background: linear-gradient(135deg, rgba(132, 206, 255, .08), rgba(255,255,255,.03)); }
.tomorrow-playbook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tomorrow-playbook-branch { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.035); min-width: 0; }
.tomorrow-playbook-branch h5 { margin: 0; color: #d4ecff; overflow-wrap: anywhere; }

@media (max-width: 430px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .topbar { gap: 8px; }
  .topbar-actions { gap: 6px; }
  .theme-segment { height: 38px; padding: 3px; border-radius: 14px; }
  .theme-toggle-btn { min-width: 34px; height: 30px; padding: 0 6px; font-size: 11px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 14px; }
  .logout-btn { padding: 0 9px; }
  .section-head { align-items: stretch; flex-direction: column; }
  .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .button-row .primary { width: 100%; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .stock-ocr-panel { gap: 8px; padding: 10px; }
  .ocr-head { display: block; }
  .ocr-head .compact { display: none; }
  .ocr-bucket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ocr-bucket { padding: 7px; border-radius: 12px; }
  .ocr-lines { font-size: 10.5px; line-height: 1.28; }
  .hero-card { padding: 18px; border-radius: 22px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .stock-filter-panel { position: static; grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exposure-grid { grid-template-columns: 1fr; }
  .strategy-verdict-grid { grid-template-columns: 1fr; }
  .tomorrow-plan-grid { grid-template-columns: 1fr; }
  .strategy-rule-grid { grid-template-columns: 1fr; }
  .strategy-metrics, .strategy-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crowding-analysis-card .button-row { grid-template-columns: 1fr; }
  .crowding-result-card .item-top { display: grid; grid-template-columns: 1fr; }
  .crowding-result-card .badge { justify-self: start; }
  .support-zone-result-card { padding: 12px; border-radius: 18px; }
  .support-zone-result-head { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .support-zone-title-block { flex-basis: auto; }
  .support-zone-module-id { justify-self: start; }
  .support-zone-metric-grid,
  .volume-pulse-metric-grid,
  .tomorrow-playbook-grid,
  .shrink-days-metric-grid,
  .entry-point-metric-grid,
  .stock-diagnosis-metric-grid,
  .compact-meta-grid { grid-template-columns: 1fr; }
  .support-zone-signal-row { gap: 5px; }
  .support-zone-signal-row .pill { flex: 1 1 calc(50% - 5px); justify-content: center; text-align: center; padding-left: 7px; padding-right: 7px; }
  .support-zone-rule-list,
  .support-zone-note-list { padding-left: 16px; }
  .sector-live-head, .sector-loading-line { align-items: stretch; flex-direction: column; }
  .sector-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector-time-grid span:nth-child(2), .sector-time-grid span:nth-child(6) { grid-column: 1 / -1; }
  .sector-live-groups, .sector-live-top-grid { grid-template-columns: 1fr; }
  .midday-screen-head { align-items: stretch; flex-direction: column; }
  .midday-screen-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .midday-screen-actions .primary { width: 100%; min-width: 0; }
  .midday-screen-candidate-list { grid-template-columns: 1fr; }
  .midday-screen-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .midday-screen-check { flex: 1 1 calc(50% - 6px); text-align: center; }
  .panic-rebound-threshold-list,
  .tenbagger-candidate-list { grid-template-columns: 1fr; }
  .panic-rebound-result-card,
  .tenbagger-result-card { padding: 12px; border-radius: 18px; }
  .tenbagger-check { flex: 1 1 calc(50% - 6px); text-align: center; }
  .sector-slot-archive > summary { position: sticky; top: 72px; z-index: 8; }
  .bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 22px; }
  .bottom-nav.bottom-nav--compact { grid-template-columns: repeat(8, minmax(0, 1fr)); width: min(340px, calc(100vw - 40px)); }
  .nav-btn { min-height: 38px; }
}

.cc-page { padding: 0; overflow: visible; }
.cc-quant-frame { display: block; width: 100%; height: 720px; min-height: 0; border: 0; border-radius: 18px; background: var(--bg); overflow: hidden; }

@media (max-width: 760px) {
  .cc-page { margin: 0 -2px; }
  .cc-quant-frame { height: 640px; border-radius: 0; background: transparent; }
}
