:root {
  color-scheme: light;
  --ink: #182822;
  --muted: #6d7b75;
  --line: #dfe7e1;
  --canvas: #f4f7f4;
  --paper: #ffffff;
  --green: #27755a;
  --green-dark: #1c5942;
  --green-soft: #e5f1ea;
  --coral: #bb5d4d;
  --coral-soft: #faece8;
  --gold: #a87822;
  --gold-soft: #f7f1df;
  --cyan: #327886;
  --cyan-soft: #e6f1f3;
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; width: 232px; flex-direction: column;
  padding: 25px 16px 15px; border-right: 1px solid var(--line); background: #fbfcfb;
}
.brand { display: flex; height: 44px; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 7px; background: var(--green); color: white; font-size: 15px; font-weight: 700; }
.brand-name { display: flex; align-items: baseline; gap: 7px; font-size: 15px; font-weight: 700; }
.brand-name small { color: #8a9891; font-size: 9px; font-weight: 700; }
.side-label { margin: 43px 8px 12px; color: #87938d; font-size: 11px; font-weight: 650; }
.main-nav { display: grid; gap: 4px; }
.nav-item { display: flex; height: 39px; align-items: center; gap: 11px; padding: 0 10px; border-radius: 5px; color: #64716b; font-size: 13px; }
.nav-item:hover { background: #f1f5f2; color: var(--ink); }
.nav-item.active { background: var(--green-soft); color: var(--green-dark); font-weight: 650; }
.nav-dot { width: 8px; height: 8px; border: 1.5px solid #8c9a93; border-radius: 2px; }
.active .nav-dot { border-color: var(--green); background: var(--green); }
.report-dot { border-radius: 50%; }
.history-dot { border-radius: 50% 50% 2px 2px; }
.sales-dot { transform: rotate(45deg); }
.construction-dot { border-radius: 1px; }
.restaurant-dot { border-radius: 50% 50% 2px 2px; }
.sidebar-bottom { margin-top: auto; padding: 14px 9px 0; border-top: 1px solid var(--line); }
.plan-label { margin-bottom: 12px; color: #8a9791; font-size: 10px; font-weight: 700; }
.plan-row { display: flex; justify-content: space-between; padding: 5px 0; color: #66746d; font-size: 11px; }
.plan-row strong { color: #27372f; font-size: 12px; }
.per-month { color: #738078; font-size: 10px; font-weight: 400; }
.plan-note { margin-top: 6px; color: #98a39d; font-size: 10px; }
.account-row { display: flex; align-items: center; gap: 8px; margin: 19px -1px 0; padding-top: 13px; border-top: 1px solid #e9eeea; }
.avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #d7e9df; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.account-name { color: #44534b; font-size: 11px; }
.account-status { margin-left: auto; color: #8b9791; font-size: 10px; }

.main-content { min-height: 100vh; margin-left: 232px; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; height: 57px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgb(250 252 250 / 96%); backdrop-filter: blur(8px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #89958e; font-size: 11px; }
.breadcrumbs strong { color: #4b5a52; font-weight: 600; }
.crumb-separator { color: #b1bbb5; }
.topbar-actions { display: flex; align-items: center; gap: 19px; }
.mode-badge { display: inline-flex; align-items: center; gap: 6px; color: #5a7a66; font-size: 10px; }
.mode-badge i, .live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #3b9a68; }
.mode-badge.demo i { background: var(--gold); }
.text-button, .subtle-button { padding: 0; border: 0; background: none; color: #69776f; font-size: 11px; }
.text-button:hover, .subtle-button:hover { color: var(--green-dark); }
.page-wrap { width: min(1220px, 100%); margin: 0 auto; padding: 27px 42px 18px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 21px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 10px; font-weight: 700; }
.eyebrow-line { width: 13px; height: 2px; background: var(--green); }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin: 8px 0 4px; font-size: 25px; line-height: 1.25; letter-spacing: 0; }
.page-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.heading-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 3px; color: #718078; font-size: 10px; }
.price-tag b { color: var(--ink); font-size: 14px; }
.heading-divider { width: 1px; height: 14px; background: #d8e0da; }
.privacy-tag { color: var(--green); }

.tool-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tool-option { display: flex; min-width: 0; min-height: 54px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #58675e; text-align: left; }
.tool-option:hover { border-color: #aabfb0; background: #fbfdfb; }
.tool-option.active { border-color: #8caf98; background: #f0f7f2; color: var(--green-dark); }
.tool-option-index { display: grid; width: 23px; height: 23px; flex: none; place-items: center; border-radius: 4px; background: #f0f4f1; color: #718178; font-size: 9px; font-weight: 700; }
.tool-option.active .tool-option-index { background: #dcecdf; color: var(--green-dark); }
.tool-option-copy { display: grid; min-width: 0; gap: 3px; }
.tool-option-copy strong { overflow: hidden; color: inherit; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tool-option-copy small { color: #8a9790; font-size: 9px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(230px, .8fr); align-items: stretch; gap: 15px; }
.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.input-panel { padding: 18px 20px 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.panel-heading > div { display: flex; align-items: center; gap: 9px; }
.step-number { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 5px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 750; }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 650; }
.input-limit { color: #929d96; font-size: 10px; }
.field-row label, .feedback-form label { display: block; margin-bottom: 6px; color: #45534b; font-size: 11px; font-weight: 600; }
.field-row label span, .feedback-form label span { margin-left: 4px; color: #98a39c; font-size: 10px; font-weight: 400; }
.field-row input { width: 100%; height: 35px; padding: 0 10px; border: 1px solid #e0e7e2; border-radius: 4px; outline: none; background: #fff; color: var(--ink); font-size: 11px; }
.field-row input:focus, textarea:focus { border-color: #78aa90; box-shadow: 0 0 0 2px rgb(39 117 90 / 9%); }
.field-row input::placeholder, textarea::placeholder { color: #adb7b1; }
.input-tabs { display: flex; gap: 16px; margin-top: 14px; border-bottom: 1px solid #e5ebe7; }
.input-tab { position: relative; padding: 0 1px 9px; border: 0; background: transparent; color: #7f8b84; font-size: 11px; }
.input-tab.active { color: var(--green-dark); font-weight: 650; }
.input-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.input-source { padding-top: 10px; }
.input-source textarea { display: block; width: 100%; height: 168px; resize: vertical; padding: 10px 11px; border: 1px solid #e0e7e2; border-radius: 4px; outline: none; color: #34443b; font-size: 11px; line-height: 1.7; }
.textarea-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; color: #8a9790; font-size: 10px; }
.subtle-button { color: var(--green); font-size: 10px; }
.file-source { min-height: 218px; }
.drop-zone { display: flex; width: 100%; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #b9c9bf; border-radius: 4px; background: #f9fbf9; color: inherit; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: #f3f8f4; }
.upload-mark { display: grid; width: 36px; height: 28px; place-items: center; margin-bottom: 8px; border: 1px solid #d5e3da; border-radius: 4px; background: #edf5ef; color: var(--green); font-size: 9px; font-weight: 700; }
.drop-title { color: #33443a; font-size: 11px; font-weight: 600; }
.drop-subtitle, .file-name { margin-top: 4px; color: #95a098; font-size: 10px; }
.file-name { color: var(--green); }
.field-hint { margin: 8px 0 0; color: #8c9991; font-size: 10px; }
.consent-note { display: flex; gap: 7px; margin-top: 12px; padding: 8px 9px; border-radius: 4px; background: #f5f8f6; color: #6f7d75; font-size: 10px; line-height: 1.5; }
.consent-mark { display: grid; width: 14px; height: 14px; flex: none; place-items: center; border: 1px solid #9daf9f; border-radius: 50%; color: #688975; font-size: 9px; font-weight: 700; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.input-hint { color: #8a9790; font-size: 10px; }
.primary-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 17px; padding: 0 13px; border: 1px solid var(--green); border-radius: 4px; background: var(--green); color: #fff; font-size: 11px; font-weight: 650; }
.primary-button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.primary-button b { font-size: 15px; font-weight: 400; }
.error-message { margin-top: 10px; padding: 8px 10px; border: 1px solid #ebc7bf; border-radius: 4px; background: #fff8f6; color: #9d4637; font-size: 11px; }

.side-insight { display: flex; min-height: 100%; flex-direction: column; padding: 17px 17px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfb; }
.insight-head { display: flex; align-items: center; justify-content: space-between; color: #47564e; font-size: 11px; font-weight: 650; }
.live-indicator { display: flex; align-items: center; gap: 5px; color: #6d8877; font-size: 9px; font-weight: 500; }
.live-indicator i { width: 5px; height: 5px; }
.insight-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 25px 8px; text-align: center; }
.empty-orbit { display: flex; width: 54px; height: 46px; align-items: end; justify-content: center; gap: 4px; margin-bottom: 13px; border-bottom: 1px solid #dfe8e2; }
.empty-orbit span { width: 7px; height: 15px; border-radius: 2px 2px 0 0; background: #c9dfd1; }
.empty-orbit span:nth-child(2) { height: 29px; background: #78a98d; }
.empty-orbit span:nth-child(3) { height: 22px; background: #e4c984; }
.insight-empty strong { color: #53625a; font-size: 12px; font-weight: 600; }
.insight-empty p { max-width: 190px; margin: 6px 0 0; color: #8e9a93; font-size: 10px; line-height: 1.6; }
.insight-content { padding: 18px 0 14px; }
.insight-stat { display: flex; align-items: baseline; justify-content: space-between; padding: 7px 1px; border-bottom: 1px solid #edf1ee; color: #76837b; font-size: 10px; }
.insight-stat strong { color: var(--ink); font-size: 19px; font-weight: 650; }
.side-bars { display: grid; gap: 10px; padding: 15px 0; }
.side-bar-row { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 7px; color: #66756c; font-size: 9px; }
.side-bar-track { height: 5px; overflow: hidden; border-radius: 5px; background: #e8eeea; }
.side-bar-fill { height: 100%; border-radius: inherit; background: var(--green); }
.side-bar-fill.negative { background: var(--coral); }
.side-bar-fill.positive { background: #6ba885; }
.side-bar-fill.mixed { background: #c49b48; }
.side-bar-row b { color: #65746b; font-size: 9px; text-align: right; }
.outline-button { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 12px; padding: 0 10px; border: 1px solid #d5e0d9; border-radius: 4px; background: white; color: #4b6355; font-size: 10px; }
.outline-button:hover { border-color: #8eae9b; background: #f6faf7; }
.insight-content .outline-button { width: 100%; }
.outline-button span { color: var(--green); font-size: 14px; }
.insight-foot { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 10px; border-top: 1px solid #e9efeb; color: #839087; font-size: 9px; }
.insight-foot strong { color: #4e6255; font-size: 10px; }
.foot-sep { margin: 0 3px; color: #bdc7c0; }

.result-section { margin-top: 30px; scroll-margin-top: 70px; }
.result-heading, .history-heading, .themes-heading { display: flex; align-items: end; justify-content: space-between; }
.result-heading { margin-bottom: 13px; }
.result-heading h2 { margin: 5px 0 0; font-size: 20px; }
.result-actions { display: flex; align-items: center; gap: 12px; }
.result-mode { color: #5a8168; font-size: 10px; }
.result-mode.demo { color: var(--gold); }
.summary-strip { display: grid; grid-template-columns: 83px 1fr; gap: 3px 13px; padding: 13px 15px; border: 1px solid #dce8df; border-left: 3px solid var(--green); border-radius: 5px; background: #f9fcfa; }
.summary-label { grid-row: span 2; padding-top: 2px; color: #5a7765; font-size: 10px; font-weight: 700; }
.summary-strip p { margin: 0; color: #34463b; font-size: 12px; line-height: 1.65; }
.quality-notes { display: flex; flex-wrap: wrap; gap: 5px 12px; padding-top: 4px; }
.quality-notes span { color: #87938b; font-size: 9px; }
.quality-notes span::before { margin-right: 5px; color: var(--gold); content: "!"; font-weight: 700; }
.result-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin: 12px 0 23px; }
.result-metrics.four { grid-template-columns: repeat(4, 1fr); }
.metric { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.metric span { color: #78857d; font-size: 10px; }
.metric strong { color: var(--ink); font-size: 20px; font-weight: 650; }
.metric.negative strong { color: var(--coral); }
.metric.positive strong { color: var(--green); }
.metric.mixed strong { color: var(--gold); }
.metric.neutral strong { color: var(--cyan); }
.themes-heading { margin-bottom: 10px; }
.themes-heading h3 { margin: 0 0 3px; font-size: 14px; }
.themes-heading div span { color: #8a9690; font-size: 9px; }
.theme-count { color: #809087; font-size: 10px; }
.themes-list { display: grid; gap: 9px; }
.theme-card { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: white; }
.theme-top { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid #edf1ee; }
.theme-index { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 4px; background: #eef4ef; color: var(--green); font-size: 9px; font-weight: 700; }
.theme-card.negative .theme-index { background: var(--coral-soft); color: var(--coral); }
.theme-card.positive .theme-index { background: var(--green-soft); color: var(--green); }
.theme-card.mixed .theme-index { background: var(--gold-soft); color: var(--gold); }
.theme-name { color: #2a3b31; font-size: 12px; font-weight: 650; }
.sentiment-badge, .priority-badge { padding: 3px 6px; border-radius: 3px; background: #eef3ef; color: #65786c; font-size: 9px; }
.sentiment-badge.negative { background: var(--coral-soft); color: #a95042; }
.sentiment-badge.positive { background: var(--green-soft); color: #397856; }
.sentiment-badge.mixed { background: var(--gold-soft); color: #946a21; }
.sentiment-badge.neutral { background: var(--cyan-soft); color: #3a7180; }
.priority-badge.high { background: #fbe8e3; color: #ac4d3f; }
.priority-badge.medium { background: #f8f0dc; color: #8c6927; }
.priority-badge.low { background: #edf2ee; color: #718078; }
.theme-count-label { margin-left: auto; color: #69776f; font-size: 10px; }
.theme-count-label strong { color: var(--ink); font-size: 13px; }
.theme-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); }
.theme-evidence, .theme-actions { padding: 12px 13px; }
.theme-evidence { border-right: 1px solid #edf1ee; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #6c7a72; font-size: 9px; font-weight: 700; }
.section-label small { color: #a0aaa4; font-size: 9px; font-weight: 400; }
.evidence-list { display: grid; gap: 6px; }
.evidence-item { display: grid; grid-template-columns: 22px 1fr; gap: 5px; color: #4b5b51; font-size: 10px; line-height: 1.55; }
.evidence-item > span:first-child { color: #98a39c; font-size: 9px; }
.root-cause { margin-top: 9px; padding: 7px 8px; border-left: 2px solid #c6d8cc; background: #f7faf8; color: #64736a; font-size: 9px; line-height: 1.55; }
.root-cause strong { margin-right: 5px; color: #587060; font-weight: 650; }
.action-list { display: grid; gap: 7px; margin: 0 0 11px; padding-left: 15px; color: #4c5d52; font-size: 10px; line-height: 1.5; }
.action-list li::marker { color: var(--green); font-weight: 700; }
.action-list li.empty-action { color: #8b9790; list-style: none; }
.action-list li.empty-action::marker { content: ""; }
.reply-label { display: block; margin-bottom: 5px; color: #75837a; font-size: 9px; }
.reply-area { display: grid; grid-template-columns: 1fr auto; gap: 5px; }
.reply-area textarea { min-height: 57px; resize: vertical; padding: 7px; border: 1px solid #e0e7e2; border-radius: 4px; outline: none; color: #47574d; font-size: 9px; line-height: 1.5; }
.action-meta { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 3px; color: #86938b; font-size: 9px; }
.overall-draft { margin-top: 10px; padding: 13px; border: 1px solid #dce6df; border-radius: 5px; background: #fbfdfb; }
.draft-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.draft-heading > div { display: grid; gap: 3px; }
.draft-heading strong { color: #3e5546; font-size: 11px; }
.draft-heading span { color: #8a9790; font-size: 9px; }
.overall-draft textarea { display: block; width: 100%; min-height: 145px; resize: vertical; padding: 9px; border: 1px solid #e0e7e2; border-radius: 4px; outline: none; background: white; color: #46574d; font-size: 10px; line-height: 1.65; }
.copy-reply { align-self: start; padding: 6px 7px; border: 1px solid #dce5de; border-radius: 4px; background: white; color: #5f7567; font-size: 9px; }
.copy-reply:hover { border-color: #94b19e; color: var(--green-dark); }
.feedback-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfb; }
.feedback-strip > div:first-child { display: grid; gap: 4px; }
.feedback-strip strong { color: #3e5146; font-size: 11px; }
.feedback-strip span { color: #87948c; font-size: 9px; }
.feedback-actions { display: flex; gap: 6px; }
.feedback-actions button { padding: 6px 9px; border: 1px solid #dce5df; border-radius: 4px; background: white; color: #63746a; font-size: 9px; }
.feedback-actions button.selected { border-color: #76a189; background: var(--green-soft); color: var(--green-dark); }
.feedback-form { margin-top: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.feedback-form > div { display: flex; align-items: stretch; gap: 8px; }
.feedback-form textarea { min-height: 43px; flex: 1; resize: vertical; padding: 7px; border: 1px solid #e0e7e2; border-radius: 4px; outline: none; font-size: 10px; }
.feedback-state { display: block; padding-top: 6px; color: var(--green); font-size: 9px; }

.history-section { margin-top: 29px; padding-top: 15px; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.history-heading h2 { display: inline; margin: 0 7px 0 0; font-size: 13px; }
.history-heading div span, .history-count { color: #8c9991; font-size: 9px; }
.history-empty { padding: 14px 0; color: #9aa59e; font-size: 10px; }
.history-list { display: grid; }
.history-row { display: grid; grid-template-columns: 1fr 100px 80px; align-items: center; gap: 10px; padding: 10px 2px; border: 0; border-bottom: 1px solid #e7ede8; background: transparent; text-align: left; }
.history-row strong { overflow: hidden; color: #46574c; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.history-row span { color: #829087; font-size: 9px; }
.history-row:hover strong { color: var(--green); }
.page-footer { display: flex; align-items: center; gap: 15px; margin-top: 27px; padding-top: 12px; border-top: 1px solid #e5ebe6; color: #9aa59e; font-size: 9px; }
.page-footer a { margin-left: auto; color: #6c8776; }
.page-footer a:hover { color: var(--green-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.help-dialog { width: min(440px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 18px 60px rgb(27 48 37 / 18%); }
.help-dialog::backdrop { background: rgb(25 42 33 / 28%); }
.help-dialog form { padding: 18px 20px 20px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; color: #829087; font-size: 10px; }
.dialog-top button { width: 25px; height: 25px; border: 0; background: transparent; color: #728077; font-size: 21px; }
.help-dialog h2 { margin: 13px 0 8px; font-size: 17px; }
.help-dialog p, .help-dialog li { color: #68776e; font-size: 11px; line-height: 1.7; }
.help-dialog ul { padding-left: 18px; }
.dialog-close { width: 100%; margin-top: 8px; }

@media (min-width: 1450px) {
  .page-wrap { padding-right: 55px; padding-left: 55px; }
}

@media (max-width: 1050px) {
  .sidebar { width: 205px; }
  .main-content { margin-left: 205px; }
  .topbar { padding-right: 27px; padding-left: 27px; }
  .page-wrap { padding-right: 27px; padding-left: 27px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.4fr) minmax(210px, .8fr); }
  .tool-option { gap: 7px; padding: 7px; }
  .theme-body { grid-template-columns: 1fr; }
  .theme-evidence { border-right: 0; border-bottom: 1px solid #edf1ee; }
}

@media (max-width: 760px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 9px 14px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { height: 32px; padding: 0 2px; }
  .brand-mark { width: 27px; height: 27px; }
  .side-label, .sidebar-bottom { display: none; }
  .main-nav { display: flex; justify-content: space-between; gap: 5px; margin-top: 8px; overflow: visible; }
  .main-nav .nav-item[data-tool] { display: none; }
  .nav-item { height: 31px; flex: none; gap: 7px; padding: 0 9px; font-size: 10px; }
  .nav-dot { width: 6px; height: 6px; }
  .main-content { margin-left: 0; }
  .topbar { position: static; height: 45px; padding: 0 16px; }
  .breadcrumbs { gap: 7px; font-size: 9px; }
  .topbar-actions { gap: 10px; }
  .text-button { font-size: 10px; }
  .page-wrap { padding: 20px 15px 18px; }
  .page-heading { align-items: start; gap: 12px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { max-width: 250px; font-size: 10px; line-height: 1.5; }
  .tool-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 9px; }
  .tool-option { min-height: 43px; gap: 7px; padding: 6px 8px; }
  .tool-option-index { width: 20px; height: 20px; font-size: 8px; }
  .tool-option-copy strong { font-size: 9px; }
  .tool-option-copy small { font-size: 8px; }
  .heading-meta { flex-direction: column; align-items: end; gap: 4px; white-space: nowrap; font-size: 9px; }
  .heading-divider { display: none; }
  .price-tag b { font-size: 12px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .input-panel, .side-insight { min-width: 0; }
  .input-panel { padding: 15px 13px 13px; }
  .input-source textarea { height: 158px; }
  .side-insight { min-height: 100px; padding: 12px 13px 9px; }
  .insight-empty { min-height: 90px; padding: 12px 5px; }
  .empty-orbit { width: 42px; height: 35px; margin-bottom: 7px; }
  .empty-orbit span:nth-child(2) { height: 21px; }
  .empty-orbit span:nth-child(3) { height: 16px; }
  .insight-empty p { max-width: 250px; }
  .insight-content { padding: 9px 0; }
  .side-bars { gap: 8px; }
  .insight-foot { padding-top: 8px; }
  .result-section { margin-top: 24px; }
  .result-heading { align-items: end; }
  .result-heading h2 { font-size: 18px; }
  .result-actions { gap: 7px; }
  .result-actions .outline-button { min-height: 29px; padding: 0 7px; font-size: 9px; }
  .summary-strip { grid-template-columns: 1fr; gap: 5px; padding: 11px; }
  .summary-label { grid-row: auto; }
  .summary-strip p { font-size: 11px; }
  .result-metrics { grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 9px 0 19px; }
  .metric { min-height: 53px; padding: 8px 9px; }
  .metric strong { font-size: 17px; }
  .theme-top { flex-wrap: wrap; gap: 6px; padding: 9px; }
  .theme-count-label { margin-left: auto; }
  .theme-evidence, .theme-actions { padding: 10px; }
  .evidence-item { font-size: 9px; }
  .action-list { font-size: 9px; }
  .feedback-strip { align-items: start; flex-direction: column; padding: 10px; }
  .feedback-form > div { flex-direction: column; }
  .history-row { grid-template-columns: 1fr auto; }
  .history-row span:nth-child(2) { display: none; }
  .page-footer { flex-wrap: wrap; gap: 7px 12px; line-height: 1.5; }
  .page-footer a { margin-left: 0; }
}

@media (max-width: 390px) {
  .heading-meta { font-size: 8px; }
  .page-heading { gap: 7px; }
  .page-heading h1 { font-size: 20px; }
  .input-hint { max-width: 128px; line-height: 1.4; }
  .form-footer { align-items: end; }
  .primary-button { gap: 9px; padding: 0 9px; font-size: 10px; }
  .breadcrumbs span:first-child { display: none; }
  .breadcrumbs .crumb-separator { display: none; }
}

.promotion-dot { background: #b67745; }
.sidebar-buy { width: 100%; min-height: 30px; margin: 7px 0 10px; border: 1px solid #d7e2da; border-radius: 4px; background: #fff; color: #496754; font-size: 10px; font-weight: 600; }
.sidebar-buy:hover { border-color: #8da997; background: #f6faf7; }
.membership-button { min-height: 29px; padding: 0 10px; border: 1px solid #cbd9cf; border-radius: 4px; background: #f5faf6; color: #3d674d; font-size: 10px; font-weight: 650; white-space: nowrap; }
.membership-button:hover { background: #eaf3ed; }
.payment-dialog { width: min(480px, calc(100vw - 28px)); max-height: min(90vh, 740px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 18px 60px rgb(27 48 37 / 20%); }
.payment-dialog::backdrop { background: rgb(25 42 33 / 38%); }
.payment-shell { padding: 20px; }
.payment-shell h2 { margin: 15px 0 7px; color: #293a30; font-size: 19px; }
.payment-description { margin: 0 0 15px; color: #758279; font-size: 11px; line-height: 1.65; }
.payment-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.payment-plan { display: grid; min-height: 100px; align-content: start; gap: 5px; padding: 11px; border: 1px solid #dce6df; border-radius: 5px; background: #fff; color: #506258; text-align: left; }
.payment-plan:hover:not(:disabled) { border-color: #85a792; background: #f8fbf8; }
.payment-plan:disabled { opacity: .48; cursor: not-allowed; }
.payment-plan span { font-size: 10px; font-weight: 650; }
.payment-plan strong { color: #293a30; font-size: 21px; }
.payment-plan small { color: #87938b; font-size: 9px; line-height: 1.5; }
.payment-message { min-height: 36px; padding: 11px 0 6px; color: #697970; font-size: 10px; line-height: 1.6; }
.payment-qr { display: grid; justify-items: center; gap: 7px; padding: 10px 0 13px; color: #43554a; font-size: 10px; }
.payment-qr img { width: 184px; height: 184px; border: 1px solid #e2e9e4; background: #fff; image-rendering: pixelated; }
.payment-qr span { color: #919c95; font-size: 9px; overflow-wrap: anywhere; text-align: center; }
.payment-qr .outline-button { margin-top: 2px; }
.payment-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 30px; border-top: 1px solid #edf1ee; color: #79877e; font-size: 9px; }
.payment-footer .text-button { padding: 5px 0; }

@media (max-width: 760px) {
  .membership-button { min-height: 27px; padding: 0 7px; font-size: 9px; }
  .payment-shell { padding: 15px; }
  .payment-qr img { width: 168px; height: 168px; }
}
