:root {
  --ink: #10213b;
  --muted: #65758c;
  --line: #dfe4ec;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --huawei: #2c5fca;
  --industry: #e17a00;
  --radius: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); }
button, input, select, textarea { font: inherit; }

.topbar {
  min-height: 88px;
  width: 100%;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(20, 38, 60, .04);
}
.back { color: var(--muted); text-decoration: none; font-size: 16px; }
.back::before { content: "<"; margin-right: 12px; color: #69778d; }
.brand { font-size: 24px; font-weight: 800; color: #111d31; display: flex; align-items: center; gap: 10px; }
.bolt { color: var(--huawei); font-size: 26px; }
.admin-entry { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; }
.admin-entry:hover, .admin-entry:focus-visible { border-color: #c9dafd; background: #eaf1ff; outline: 0; box-shadow: 0 0 0 3px rgba(45,99,216,.12); }
.market-actions { display: flex; align-items: end; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.market-actions label { display: grid; gap: 6px; color: #5d6b63; font-size: 12px; font-weight: 800; }
.market-actions select { min-width: 120px; max-width: 260px; height: 42px; border: 1px solid #d7e0dc; border-radius: 8px; padding: 0 12px; background: #fff; color: #15211f; font-size: 15px; }
.export-button, .guide-button, .fx-button, .feedback-button { height: 42px; border: 1px solid #d7e0dc; border-radius: 8px; background: #fff; color: #13211d; padding: 0 18px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.guide-feedback-actions { order: 10; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.guide-button { width: 42px; min-width: 42px; padding: 0; font-size: 18px; background: #eaf1ff; border-color: #c9dafd; color: #2d63d8; }
.guide-button svg { width: 21px; height: 21px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.export-button:hover, .guide-button:hover, .fx-button:hover, .feedback-button:hover { border-color: #2d63d8; background: #f5f8ff; color: #174da9; }
.export-button:focus-visible, .guide-button:focus-visible, .fx-button:focus-visible, .feedback-button:focus-visible { outline: 3px solid rgba(45, 99, 216, .24); outline-offset: 2px; }
.export-button:active, .guide-button:active, .fx-button:active, .feedback-button:active { transform: translateY(1px); background: #eaf1ff; }
.fx-button { min-width: 58px; }
.feedback-button { position: relative; width: 42px; min-width: 42px; padding: 0; background: #eaf1ff; border-color: #c9dafd; color: #2d63d8; }
.feedback-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.feedback-badge { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #e24949; opacity: 0; }
.feedback-button.has-unread .feedback-badge { opacity: 1; animation: feedback-pulse 1.5s ease-in-out infinite; }
@keyframes feedback-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 73, 73, .35); } 50% { transform: scale(1.45); box-shadow: 0 0 0 5px rgba(226, 73, 73, 0); } }

main {
  width: 1440px;
  max-width: calc(100vw - 48px);
  margin: 0 auto;
  padding: 42px 0 28px;
}

.intro { max-width: 1040px; margin-bottom: 30px; }
.tag { display: inline-flex; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #17263b; font-size: 14px; font-weight: 700; }
h1 { margin: 19px 0 13px; font-size: 39px; line-height: 1.15; letter-spacing: 0; }
.intro p { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.55; max-width: 1030px; }
.step-guide { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.step-guide span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 7px; background: #eef2f7; color: #66758a; font-size: 14px; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.product-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; min-width: 0; }
.product-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 30px; min-height: 82px; color: #fff; }
.product-panel.huawei > header { background: var(--huawei); }
.product-panel.industry > header { background: var(--industry); }
.product-panel h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.lock-button, .save-button, .reset-button { color: #2c3c54; background: #f4f6f9; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.product-body { padding: 22px 20px 24px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 17px; }
.field { min-width: 0; display: grid; gap: 7px; }
.field > span { color: #64748b; font-size: 15px; font-weight: 650; }
.field em { font-style: normal; color: #93a0b2; font-weight: 500; }
.field i, .help-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 5px; padding: 0; border: 1px solid #aeb9c7; border-radius: 50%; background: #fff; color: #66758a; font-style: normal; font-size: 12px; line-height: 1; cursor: help; vertical-align: 1px; touch-action: manipulation; }
.help-anchor { display: inline-flex; position: relative; vertical-align: middle; }
.help-dot:hover, .help-dot:focus-visible, .help-anchor.is-open .help-dot { border-color: #2d63d8; background: #edf3ff; color: #174da9; outline: 0; }
.help-dot:focus-visible { box-shadow: 0 0 0 3px rgba(45, 99, 216, .2); }
.help-tooltip { position: fixed; z-index: 250; left: 12px; top: 12px; width: max-content; max-width: min(340px, calc(100vw - 24px)); padding: 10px 12px; border: 1px solid #cfd9e8; border-radius: 8px; background: #fff; color: #24344d; box-shadow: 0 10px 28px rgba(19, 38, 68, .18); font-size: 13px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal; overflow-wrap: anywhere; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease, visibility .12s ease; }
.help-anchor:hover .help-tooltip, .help-anchor:focus-within .help-tooltip, .help-anchor.is-open .help-tooltip { opacity: 1; visibility: visible; pointer-events: auto; }
.field input { width: 100%; height: 51px; border: 1px solid #d9dee7; border-radius: 8px; outline: 0; background: #f7f8fa; padding: 0 15px; color: #182945; font-size: 16px; }
.field select { width: 100%; height: 51px; border: 1px solid #d9dee7; border-radius: 8px; outline: 0; background: #f7f8fa; padding: 0 15px; color: #182945; font-size: 16px; }
.field input:focus { border-color: #2d63d8; box-shadow: 0 0 0 3px rgba(45,99,216,.1); background: #fff; }
.field select:focus { border-color: #2d63d8; box-shadow: 0 0 0 3px rgba(45,99,216,.1); background: #fff; }
.field input[readonly] { background: #eef2f6; color: #52627a; cursor: default; }
.field input:disabled { color: #56677f; cursor: not-allowed; background: #f1f4f7; }
.analysis-period-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.analysis-period-control select { width: 100%; height: 51px; border: 1px solid #d9dee7; border-radius: 8px; outline: 0; background: #f7f8fa; padding: 0 15px; color: #182945; font-size: 16px; }
.analysis-period-control select:focus { border-color: #2d63d8; box-shadow: 0 0 0 3px rgba(45,99,216,.1); background: #fff; }

.installed-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.product-metric { min-width: 0; padding: 10px; border: 1px solid #e2e7ee; border-radius: 7px; background: #fafbfc; }
.product-metric span { display: block; color: #77869a; font-size: 12px; }
.product-metric strong { display: block; margin-top: 4px; color: #1c2d48; font-size: 14px; overflow-wrap: anywhere; }

.advanced { margin-top: 30px; border: 1px solid #dbe0e7; border-radius: 9px; overflow: hidden; }
.advanced-toggle { width: 100%; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 0; background: #fff; color: #5c6b7f; font-weight: 750; font-size: 15px; text-align: left; cursor: pointer; }
.advanced-toggle:disabled { cursor: not-allowed; opacity: .68; }
.switch { display: inline-flex; align-items: center; gap: 7px; color: #718197; font-size: 12px; white-space: nowrap; }
.switch b { position: relative; display: block; width: 30px; height: 17px; border-radius: 999px; background: #cbd4df; }
.switch b::after { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; content: ""; transition: .15s; }
.switch.on { color: #08785c; }
.switch.on b { background: #16a77a; }
.switch.on b::after { left: 16px; }
.advanced-grid { padding: 4px 18px 18px; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.project-panel, .tariff-panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 24px; min-width: 0; }
.project-panel h2, .tariff-panel h2 { margin: 0 0 20px; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.section-icon, .result-icon, .mini-icon, .title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #eef4ff;
  color: var(--huawei);
  font-size: 15px;
  flex: 0 0 auto;
}
.mode-list { display: grid; gap: 10px; }
.mode-option { display: grid; grid-template-columns: 21px 1fr; column-gap: 10px; padding: 12px; border: 1px solid #e0e5eb; border-radius: 8px; background: #fbfcfd; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option .check { width: 18px; height: 18px; margin-top: 1px; border: 1px solid #aebaca; border-radius: 4px; background: #fff; }
.mode-option.selected { border-color: #7ba1ed; background: #f2f6ff; }
.mode-option.selected .check { background: #2d63d8; border-color: #2d63d8; }
.mode-option.selected .check::after { display: block; margin-left: 5px; color: #fff; font-size: 13px; line-height: 17px; content: "✓"; }
.mode-option strong { font-size: 15px; }
.mode-option small { grid-column: 2; color: #718197; font-size: 12px; line-height: 1.35; }
.empty-note { margin: 0; color: #718197; font-size: 13px; }
.tariff-block + .tariff-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e5e9ef; }
.tariff-block h3 { margin: 0 0 14px; color: #5c6b7f; font-size: 15px; text-transform: uppercase; }
.tariff-growth { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e5e9ef; }

.product-compare-table {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.product-compare-table > header {
  min-height: 76px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(90deg, var(--huawei), #2f6fe0 50%, var(--industry));
  color: #fff;
}
.product-compare-table h2 { margin: 0; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.mini-icon { font-size: 15px; background: rgba(255,255,255,.18); color: #fff; }
.product-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.product-table-wrap, .advanced-table-wrap { padding: 20px; }
.product-table { min-width: 860px; table-layout: fixed; }
.product-table th:first-child { width: 32%; text-align: left; }
.product-table th, .product-table td { vertical-align: middle; }
.product-table th em { display: inline; margin-left: 4px; color: #8a98aa; font-style: normal; font-size: 0.9em; font-weight: 500; }
.product-table input, .product-table select { width: 100%; height: 44px; border: 1px solid #d9dee7; border-radius: 8px; outline: 0; background: #f7f8fa; padding: 0 12px; color: #182945; font-size: 15px; }
.product-table input:focus, .product-table select:focus { border-color: #2d63d8; box-shadow: 0 0 0 3px rgba(45,99,216,.1); background: #fff; }
.product-table input:disabled { background: #eef2f6; color: #66758a; }
.model-cell-control { display: flex; align-items: center; gap: 7px; min-width: 0; }
.model-cell-control .model-select { min-width: 0; flex: 1; }
.model-icon-actions { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.model-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; padding: 0; border: 1px solid #ccd7e6; border-radius: 7px; background: #fff; color: #38506f; cursor: pointer; }
.model-icon-button:hover, .model-icon-button:focus-visible { border-color: #2d63d8; color: #1f55c1; outline: 0; box-shadow: 0 0 0 3px rgba(45,99,216,.12); }
.model-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.huawei-head { color: var(--huawei); }
.industry-head { color: var(--industry); }
.computed-row td { background: #fbfcfd; }
.computed-cell { font-weight: 760; color: #17233a; }
.advanced-switches { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 20px 20px; }
.advanced-switches .advanced-toggle {
  border: 1px solid #dbe0e7;
  border-radius: 8px;
  background: #fff;
  color: #607086;
  min-height: 48px;
  padding: 0 16px;
}
.advanced-switches .advanced-toggle.active { border-color: #2d63d8; color: #13233b; background: #f2f6ff; }
.advanced-switches .advanced-toggle .switch { margin-left: auto; }

.comparison-separator { display: flex; align-items: center; gap: 10px; margin: 36px 0 18px; padding: 13px 18px; border-left: 5px solid var(--huawei); background: #edf5ff; border-radius: 8px; box-shadow: 0 1px 2px rgba(20,38,60,.04); font-size: 20px; font-weight: 800; }
.comparison-separator span { color: var(--huawei); }
.result-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0 0 46px; }
.result-card { min-height: 198px; padding: 27px 34px 20px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 2px 3px rgba(20,38,60,.03); }
.result-card h2 { margin: 0 0 20px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.result-values { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.result-values span { display: block; color: var(--muted); font-size: 15px; }
.result-values strong { display: block; margin-top: 5px; font-size: 31px; letter-spacing: 0; white-space: nowrap; }
.huawei-value, .huawei-text { color: var(--huawei); }
.industry-value { color: var(--industry); }
.result-card p { margin: 20px 0 0; font-size: 15px; }

.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 5px; border-radius: 8px; background: #edf0f4; }
.tabs button { height: 43px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #62728a; font-size: 16px; cursor: pointer; }
.tabs button.active { border-color: #2e64d8; background: #fff; color: #142037; box-shadow: 0 1px 2px rgba(20,38,60,.06); font-weight: 700; }
.analysis-card { margin-top: 12px; padding: 33px 37px 22px; border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.analysis-card + .analysis-card { margin-top: 24px; }
.analysis-card h2 { margin: 0 0 32px; font-size: 29px; letter-spacing: 0; display: flex; align-items: center; gap: 12px; }
.title-icon { font-size: 16px; }
.table-wrap { overflow-x: auto; }
.analysis-table-wrap { overflow-x: hidden; }
table { width: 100%; border-collapse: collapse; min-width: 820px; font-size: 16px; }
th, td { padding: 17px 22px; border-bottom: 1px solid #dfe4eb; text-align: left; white-space: nowrap; }
th { color: #63738b; font-weight: 550; }
td:first-child, th:first-child { padding-left: 20px; }
td:nth-child(n+2), th:nth-child(n+2) { text-align: center; }
tbody tr:last-child td { border-bottom: 0; }
tr.emphasis td { background: #f4f5f7; color: #17233a; font-weight: 760; }
.comparison-result-table { table-layout: fixed; }
.comparison-result-table th:first-child, .comparison-result-table td:first-child { width: 40%; text-align: left; }
.comparison-result-table th:nth-child(2), .comparison-result-table td:nth-child(2),
.comparison-result-table th:nth-child(3), .comparison-result-table td:nth-child(3) { width: 20%; }
.comparison-result-table th:last-child, .comparison-result-table td:last-child { width: 20%; }
.better { text-align: center !important; white-space: nowrap; }
.better::before { display: inline-block; width: 17px; height: 17px; margin-right: 7px; border-radius: 50%; vertical-align: middle; content: ""; }
.huawei-dot::before { background: radial-gradient(circle at 30% 30%, #7fc6ff, #2862ce); }
.industry-dot::before { background: radial-gradient(circle at 30% 30%, #ffd985, #e17a00); }
@media (min-width: 761px) {
  .analysis-result-table { width: 100%; min-width: 0; table-layout: auto; font-size: 14px; }
  .analysis-result-table th, .analysis-result-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; padding: 10px 9px; }
  .analysis-result-table td:first-child, .analysis-result-table th:first-child { padding-left: 10px; }
  .analysis-result-table .better { white-space: normal; }
}
.positive { color: #009c6c; }
.negative { color: #e34343; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status.both { color: #098a55; }
.status.huawei { color: var(--huawei); }
.status.industry { color: var(--industry); }
.status.recovering { color: #3d4b60; }
.status.offline { color: #8793a4; }
.operating-status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.operating-status.operating { background: #e9f7ef; color: #1e7147; }
.operating-status.stopped { background: #eceff3; color: #535f70; }
.eol-row td { background: #f4f5f7; color: #4f5968; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(15, 28, 49, .46); }
.app-modal { width: min(520px, 100%); max-height: min(680px, calc(100svh - 48px)); overflow: auto; border: 1px solid #dfe4ec; border-radius: 12px; background: #fff; box-shadow: 0 22px 60px rgba(0, 0, 0, .28); }
.feedback-modal { position: relative; width: min(760px, calc(100vw - 48px)); min-width: 480px; min-height: 480px; display: flex; flex-direction: column; overflow: hidden; resize: none; }
.feedback-modal.has-custom-rect { position: fixed; max-height: none; margin: 0; }
.feedback-modal-header { cursor: move; touch-action: none; user-select: none; }
.feedback-modal-header .modal-close { cursor: pointer; }
.feedback-modal.is-dragging, .feedback-modal.is-resizing-history { user-select: none; }
.feedback-resize-handle { position: absolute; z-index: 4; display: block; touch-action: none; user-select: none; }
.feedback-resize-n, .feedback-resize-s { left: 12px; right: 12px; height: 10px; cursor: ns-resize; }
.feedback-resize-n { top: 0; }
.feedback-resize-s { bottom: 0; }
.feedback-resize-e, .feedback-resize-w { top: 12px; bottom: 12px; width: 10px; cursor: ew-resize; }
.feedback-resize-e { right: 0; }
.feedback-resize-w { left: 0; }
.feedback-resize-ne, .feedback-resize-nw, .feedback-resize-se, .feedback-resize-sw { width: 18px; height: 18px; }
.feedback-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
.feedback-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
.feedback-resize-se { right: 0; bottom: 0; cursor: nwse-resize; }
.feedback-resize-sw { left: 0; bottom: 0; cursor: nesw-resize; }
.feedback-modal > p { flex: 0 0 auto; }
.app-modal > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.app-modal h2 { margin: 0; font-size: 20px; }
.app-modal p { margin: 0; padding: 0 22px 16px; color: #65758c; line-height: 1.45; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 7px; background: #f1f4f8; color: #33455f; font-size: 22px; cursor: pointer; }
.modal-field { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0 22px 18px; color: #4d5d72; font-weight: 700; }
.modal-field input { min-width: 0; height: 44px; border: 1px solid #ced8e5; border-radius: 8px; padding: 0 12px; font: inherit; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 22px; border-top: 1px solid #e5eaf1; }
.modal-actions button { min-height: 40px; border-radius: 8px; padding: 0 14px; font-weight: 750; cursor: pointer; }
.modal-actions .primary { border: 1px solid #275fc8; background: #2d63d8; color: #fff; }
.modal-actions .secondary { border: 1px solid #d6dee9; background: #fff; color: #31425b; }
.feedback-form { padding-top: 2px; }
.feedback-modal .feedback-form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.feedback-modal-scroll { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; padding-top: 2px; }
.feedback-fields { min-height: 150px; flex: 1 1 var(--feedback-fields-basis, 42%); overflow: auto; padding-top: 2px; }
.feedback-modal-actions { flex: 0 0 auto; background: #fff; }
.feedback-control { grid-template-columns: 130px minmax(0, 1fr); }
.feedback-control select, .feedback-control textarea { width: 100%; border: 1px solid #ced8e5; border-radius: 8px; padding: 10px 12px; font: inherit; color: #24344d; background: #fff; }
.feedback-control textarea { resize: vertical; min-height: 110px; }
.feedback-message { align-items: start; }
.feedback-error, .feedback-success { margin: -4px 22px 12px !important; padding: 0 !important; font-size: 13px; }
.feedback-error { color: #bd3e3e !important; }
.feedback-success { color: #28764c !important; }
.feedback-history-splitter { position: relative; z-index: 2; flex: 0 0 12px; margin: 0 22px; cursor: ns-resize; touch-action: none; user-select: none; }
.feedback-history-splitter::before { position: absolute; top: 5px; right: 0; left: 0; height: 1px; background: #dce4ef; content: ""; }
.feedback-history-splitter span { position: absolute; top: 2px; left: 50%; width: 38px; height: 7px; border: 1px solid #b9c8dc; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(31, 55, 88, .08); transform: translateX(-50%); }
.feedback-history-splitter:hover span, .feedback-history-splitter:focus-visible span, .feedback-modal.is-resizing-history .feedback-history-splitter span { border-color: #2d63d8; background: #edf3ff; outline: 0; }
.feedback-history { min-height: 110px; display: flex; flex: 1 1 var(--feedback-history-basis, 58%); flex-direction: column; margin: 0 22px 16px; overflow: hidden; }
.feedback-history h3 { margin: 0 0 10px; font-size: 15px; color: #33455f; }
.feedback-history-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.feedback-history-tabs button { border: 1px solid #d6dee9; border-radius: 7px; padding: 6px 10px; background: #fff; color: #52627a; font-size: 12px; font-weight: 750; cursor: pointer; }
.feedback-history-tabs button.active { border-color: #2d63d8; background: #edf3ff; color: #174da9; }
.feedback-loading { margin: 0 !important; padding: 0 !important; font-size: 13px; }
.feedback-history-list { min-height: 0; display: grid; flex: 1 1 auto; gap: 8px; overflow: auto; }
.feedback-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 10px 12px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f8fafc; }
.feedback-record-content { min-width: 0; }
.feedback-record header { display: flex; justify-content: space-between; gap: 10px; color: #33455f; font-size: 12px; }
.feedback-record header span { color: #6a7890; }
.feedback-record p { margin: 6px 0 !important; padding: 0 !important; color: #33455f; font-size: 13px; white-space: pre-wrap; }
.feedback-record small { color: #8a96a8; font-size: 11px; }
.feedback-edit { margin-top: 7px; border: 0; padding: 0; background: transparent; color: #2d63d8; font-size: 12px; font-weight: 750; cursor: pointer; }
.feedback-record-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 0; padding-left: 8px; white-space: nowrap; }
.feedback-record-actions .feedback-edit, .feedback-record-actions .feedback-delete { margin-top: 0; }
.feedback-delete { border: 0; padding: 0; background: transparent; color: #b14b4b; font-size: 12px; font-weight: 750; cursor: pointer; }
.feedback-replies { display: grid; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #dce4ef; }
.feedback-reply { padding: 8px 10px; border-left: 3px solid #2d63d8; border-radius: 5px; background: #edf3ff; }
.feedback-reply > div { display: flex; justify-content: space-between; gap: 8px; color: #27466f; font-size: 11px; }
.feedback-reply p { margin: 5px 0 !important; }
.feedback-reply button { border: 0; padding: 0; background: transparent; color: #b14b4b; font-size: 11px; font-weight: 750; cursor: pointer; }
.feedback-reply-actions { display: flex !important; justify-content: flex-end !important; gap: 10px !important; margin-top: 7px; }
.feedback-reply-actions button:first-child { color: #245fc8; }
.feedback-reply-actions button.primary { min-height: 30px; padding: 0 10px; border: 1px solid #2d63d8; border-radius: 6px; background: #2d63d8; color: #fff; }
.feedback-reply-edit { display: grid !important; gap: 7px !important; }
.feedback-reply-edit textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid #9eb7df; border-radius: 7px; padding: 8px 9px; color: #24344d; font: inherit; line-height: 1.4; }
.feedback-reply-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 9px; }
.feedback-reply-editor textarea { min-width: 0; resize: vertical; border: 1px solid #cbd7e8; border-radius: 7px; padding: 7px 9px; color: #24344d; }
.feedback-reply-editor button { align-self: end; min-height: 34px; border: 1px solid #2d63d8; border-radius: 7px; background: #2d63d8; color: #fff; padding: 0 12px; font-weight: 750; cursor: pointer; }

.admin-modal { width: min(920px, calc(100vw - 48px)); height: min(780px, calc(100svh - 48px)); display: flex; flex-direction: column; overflow: hidden; }
.admin-panel { min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: hidden; }
.admin-panel-scroll { min-height: 0; flex: 1; overflow: auto; padding: 0 22px 18px; }
.local-test-banner { margin: 4px 0 14px; padding: 10px 12px; border: 1px solid #f1ca7c; border-radius: 8px; background: #fff8e8; color: #75500d; font-weight: 750; }
.admin-editor { display: grid; gap: 7px; margin-top: 16px; color: #33455f; font-weight: 750; }
.admin-editor textarea { width: 100%; min-height: 180px; resize: vertical; border: 1px solid #cdd7e5; border-radius: 8px; padding: 10px 12px; background: #f8fafc; color: #1f304a; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.45; tab-size: 2; }
.admin-editor textarea:focus { border-color: #2d63d8; outline: 0; box-shadow: 0 0 0 3px rgba(45,99,216,.1); background: #fff; }
.admin-modal-actions { flex: 0 0 auto; background: #fff; }
.admin-login { padding-top: 8px; }
.admin-status-bar { position: sticky; z-index: 35; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px max(18px, calc((100vw - 1440px) / 2)); border-top: 1px solid #bfd0ed; border-bottom: 1px solid #bfd0ed; background: #edf4ff; box-shadow: 0 5px 16px rgba(35, 73, 131, .1); color: #203b66; }
.admin-status-bar::after { content: "Right-click a parameter or result label; touch and hold on mobile to edit help text."; max-width: 330px; color: #526a8d; font-size: 11px; line-height: 1.35; }
.admin-status-bar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-status-bar strong { color: #174da9; }
.admin-status-bar span { font-size: 12px; }
.admin-dirty-state { padding: 4px 8px; border-radius: 999px; font-weight: 800; }
.admin-dirty-state.clean { background: #e7f5ed; color: #257149; }
.admin-dirty-state.dirty { background: #fff1d8; color: #8a5900; }
.admin-inline-message { color: #2b6b49; }
.admin-status-actions { justify-content: flex-end; }
.admin-status-actions button { min-height: 34px; border-radius: 7px; padding: 0 12px; font-weight: 750; cursor: pointer; }
.admin-status-actions .primary { border: 1px solid #275fc8; background: #2d63d8; color: #fff; }
.admin-status-actions .secondary { border: 1px solid #b9c9df; background: #fff; color: #31425b; }
.admin-status-actions button:disabled { opacity: .5; cursor: not-allowed; }
.admin-draft-label { padding: 7px 10px; border: 1px solid #bcd0ef; border-radius: 7px; background: #edf4ff; color: #24599d; font-size: 13px; font-weight: 800; }
.admin-help-dot { position: relative; border-color: #2d63d8; background: #eaf2ff; color: #174da9; cursor: pointer; box-shadow: 0 0 0 2px rgba(45, 99, 216, .08); }
.admin-help-target { cursor: context-menu; border-bottom: 1px dashed rgba(45, 99, 216, .55); -webkit-touch-callout: none; }
.admin-help-target:hover { color: #174da9; border-bottom-color: #174da9; }
.admin-help-dot::after { position: absolute; width: 7px; height: 7px; margin: -15px 0 0 15px; border-radius: 50%; background: #f08a00; content: ""; }
.admin-help-editor { padding-top: 4px; }
.admin-help-editor dl { display: grid; gap: 8px; margin: 0 22px 18px; }
.admin-help-editor dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.admin-help-editor dt { color: #66758a; font-weight: 750; }
.admin-help-editor dd { margin: 0; color: #253752; overflow-wrap: anywhere; }
.admin-help-editor code { font-size: 11px; }
.admin-help-value { display: grid; gap: 7px; margin: 0 22px 18px; color: #33455f; font-weight: 750; }
.admin-help-value textarea { width: 100%; resize: vertical; border: 1px solid #cdd7e5; border-radius: 8px; padding: 10px 12px; font: inherit; line-height: 1.45; }
.admin-review-summary ul { margin: 0 22px 18px; padding-left: 22px; color: #34455f; line-height: 1.8; }

@media (max-width: 1500px) {
  main { width: 1280px; }
}
@media (max-width: 1120px) {
  main { width: auto; max-width: none; padding: 30px 18px; }
  .compare-grid, .project-grid { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
  h1 { font-size: 33px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .market-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 800px) {
  .topbar { min-height: 0; max-height: 20svh; overflow: auto; padding: 8px 12px; gap: 7px; }
  .brand { font-size: 18px; line-height: 1.25; }
  .market-actions { display: grid; grid-template-columns: repeat(3, minmax(96px, 1fr)) auto; width: 100%; gap: 6px; }
  .market-actions label { min-width: 0; }
  .market-actions label span { font-size: 10px; }
  .market-actions select, .export-button, .guide-button, .fx-button, .feedback-button { width: 100%; height: 34px; font-size: 12px; padding: 0 8px; }
  .guide-feedback-actions { grid-column: 4; gap: 4px; }
  .guide-button, .feedback-button { width: 34px; min-width: 34px; padding: 0; font-size: 15px; }
  .export-button { grid-column: span 2; }
  .intro { margin-bottom: 26px; }
  .intro p { font-size: 16px; }
  .step-guide span { font-size: 12px; min-height: 28px; }
  h1 { font-size: 29px; }
  .product-panel > header { min-height: 74px; padding: 0 18px; }
  .product-panel h2 { font-size: 16px; }
  .lock-button, .save-button, .reset-button { font-size: 12px; padding: 6px 8px; }
  .field-grid { grid-template-columns: 1fr; }
  .analysis-period-control { gap: 9px; }
  .installed-metrics { grid-template-columns: 1fr; }
  .result-values strong { font-size: 25px; }
  .tabs { grid-template-columns: 1fr; gap: 2px; }
  .analysis-card { padding: 24px 14px 15px; }
  .analysis-card h2 { font-size: 24px; margin-bottom: 20px; }
  .result-card { min-height: 0; padding: 21px; }
  .project-panel, .tariff-panel { padding: 20px; }
  .product-compare-table > header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .product-table-wrap, .advanced-table-wrap { padding: 12px; }
  .product-table { min-width: 680px; }
  .model-cell-control { flex-wrap: wrap; }
  .model-cell-control .model-select { min-width: 150px; }
  .advanced-switches { grid-template-columns: 1fr; padding: 0 12px 12px; }
  table { min-width: 680px; font-size: 14px; }
  th, td { padding: 13px 12px; }
  .comparison-result-table th:first-child, .comparison-result-table td:first-child { width: 40%; }
  .comparison-result-table th:nth-child(2), .comparison-result-table td:nth-child(2),
  .comparison-result-table th:nth-child(3), .comparison-result-table td:nth-child(3),
  .comparison-result-table th:last-child, .comparison-result-table td:last-child { width: 20%; }
}
@media (max-width: 520px) {
  main { padding: 24px 12px; }
  .topbar { padding: 7px 10px; }
  .brand { font-size: 16px; }
  .bolt { font-size: 20px; }
  .market-actions { grid-template-columns: repeat(3, minmax(82px, 1fr)) auto; }
  .guide-feedback-actions { grid-column: 4; }
  .export-button { grid-column: span 3; }
  .market-actions select { max-width: none; }
  .product-compare-table > header { padding: 16px 14px; }
  .product-actions { width: 100%; }
  .save-button, .reset-button { width: 100%; justify-content: center; }
  .result-values { grid-template-columns: 1fr; }
  .result-values strong { white-space: normal; }
  .advanced-toggle { align-items: flex-start; flex-direction: column; }
  .advanced-switches .advanced-toggle .switch { margin-left: 0; }
  .modal-backdrop { padding: 14px; }
  .modal-field { grid-template-columns: 1fr; gap: 7px; }
  .feedback-control { grid-template-columns: 1fr; }
  .feedback-modal { width: 100%; min-width: 0; height: calc(100svh - 28px); max-height: calc(100svh - 28px); resize: none; }
  .feedback-modal-header { cursor: default; touch-action: auto; }
  .feedback-resize-handle { display: none; }
  .feedback-modal-scroll { display: block; overflow: auto; }
  .feedback-fields, .feedback-history { overflow: visible; }
  .feedback-history-splitter { display: none; }
  .feedback-history { min-height: 0; margin-top: 0; padding-top: 12px; border-top: 1px solid #e5eaf1; }
  .feedback-history-list { overflow: visible; }
  .analysis-table-wrap { overflow-x: auto; }
  .analysis-result-table { min-width: 680px; }
  .admin-modal { width: 100%; height: calc(100svh - 28px); max-height: calc(100svh - 28px); }
  .admin-status-bar { position: static; align-items: stretch; flex-direction: column; padding: 9px 12px; gap: 8px; }
  .admin-status-bar::after { max-width: none; }
  .admin-status-actions { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
  .modal-actions { flex-wrap: wrap; }
  .feedback-record { gap: 6px; padding: 9px 10px; }
  .feedback-record-actions { gap: 8px; padding-left: 4px; }
}
