:root {
  --ink: #1a1b18;
  --muted: #6e7069;
  --soft: #989b91;
  --paper: #f4f2ec;
  --panel: #fffefa;
  --line: #deded5;
  --line-strong: #c8c9be;
  --lime: #c9f05b;
  --lime-deep: #8aaa25;
  --forest: #163e32;
  --amber: #f4b56a;
  --rose: #ee8b79;
  --blue: #8cbed3;
  --shadow: 0 16px 46px rgba(35, 37, 31, 0.07);
  --radius: 18px;
  --sidebar: 242px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button { color: inherit; }

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(201, 240, 91, 0.6);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  color: #f7f6f1;
  background: #171916;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 30px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #454940;
  border-radius: 50%;
  background: #20231f;
}

.brand-mark span { width: 3px; border-radius: 99px; background: var(--lime); }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 21px; }
.brand-mark span:nth-child(3) { height: 16px; }

.brand strong { display: block; font-size: 13px; letter-spacing: 0.14em; }
.brand small { display: block; margin-top: 3px; color: #8e9388; font-size: 10px; letter-spacing: 0.08em; }

.nav-list { display: grid; gap: 6px; }

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 0;
  border-radius: 11px;
  color: #92978d;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover { color: #f7f6f1; background: #232620; }
.nav-item.active { color: #171916; background: var(--lime); font-weight: 700; }
.nav-icon { width: 22px; display: inline-grid; place-items: center; font-size: 17px; }

.sidebar-foot { margin-top: auto; }

.model-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-top: 1px solid #30332e;
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 240, 91, 0.12);
}

.model-status strong { display: block; font-size: 11px; }
.model-status small { display: block; margin-top: 3px; color: #73786f; font-size: 10px; }

.sidebar-action {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid #343832;
  border-radius: 10px;
  color: #aeb2aa;
  background: transparent;
  cursor: pointer;
}

.sidebar-action:hover { border-color: #64695e; color: white; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); }

.topbar {
  height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 242, 236, 0.92);
  backdrop-filter: blur(14px);
}

.eyebrow, .section-kicker, .panel-kicker {
  display: block;
  color: #898c82;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.project-title-row { display: flex; align-items: center; gap: 9px; margin-top: 5px; }
.project-title-row h1 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 20px; font-weight: 500; }
.project-badge { padding: 3px 7px; border-radius: 99px; color: #6f735f; background: #e4e3d9; font-size: 10px; }

.topbar-actions, .intro-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; }

.upload-btn, .primary-btn, .ghost-btn, .icon-btn, .pwa-action {
  border-radius: 10px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.pwa-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255,255,255,.42);
  font-size: 10px;
  font-weight: 800;
}
.pwa-action:hover { border-color: #8f9388; background: #fff; }
.pwa-action.install-action { color: #173b30; border-color: #a9c662; background: rgba(201,240,91,.24); }
.pwa-action[hidden] { display: none; }

.upload-btn, .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
  font-weight: 700;
}

.upload-btn:hover, .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(25, 27, 24, 0.16); }

.ghost-btn {
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-weight: 700;
}
.ghost-btn:hover { border-color: var(--ink); background: #fff; }

.icon-btn {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 18px;
}
.icon-btn:hover { background: #fff; }

.scenario-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 38px;
  border-bottom: 1px solid var(--line);
  background: #eeece5;
}

.scenario-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.info-dot { width: 17px; height: 17px; padding: 0; border: 1px solid #a8aa9f; border-radius: 50%; color: #777a71; background: transparent; font-size: 10px; cursor: help; }

.scenario-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #e4e2da;
}

.scenario-switch button {
  min-width: 74px;
  padding: 7px 13px;
  border: 0;
  border-radius: 7px;
  color: #777a72;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.scenario-switch button.active { color: var(--ink); background: var(--panel); box-shadow: 0 3px 12px rgba(30, 31, 27, 0.08); font-weight: 800; }
.scenario-summary { margin-left: auto; color: #7b7e75; font-size: 11px; }
.scenario-summary strong { margin: 0 4px; color: var(--ink); }

.view { display: none; padding: 34px 38px 54px; animation: fade-in 220ms ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.page-intro.compact { align-items: center; }
.page-intro h2 { margin: 7px 0 5px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(28px, 3vw, 39px); font-weight: 500; line-height: 1.18; letter-spacing: -0.02em; }
.page-intro p { margin: 0; color: var(--muted); }

.metric-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.metric-card.hero-metric { color: #f8f9f2; border-color: var(--forest); background: var(--forest); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.hero-metric .metric-top { color: #aebdb5; }
.metric-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }
.hero-metric .metric-icon { border-color: #46675c; color: var(--lime); }
.metric-card > strong { display: block; margin: 13px 0 10px; font-family: Georgia, serif; font-size: clamp(25px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.metric-foot { min-height: 15px; display: flex; align-items: center; gap: 6px; color: #8c8f86; font-size: 10px; line-height: 1.4; }
.hero-metric .metric-foot { color: #aebdb5; }
.signal { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr); gap: 16px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.cash-panel, .revenue-panel, .verdict-panel, .milestone-panel, .map-panel, .station-panel, .persona-panel, .competition-panel { padding: 23px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-header h3, .audit-index h3 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; font-weight: 500; }

.legend { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 10px; }
.legend > span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 17px; height: 2px; background: var(--forest); }
.legend-line.dividend { background: var(--lime-deep); }

.chart-wrap { position: relative; min-height: 300px; margin-top: 10px; }
#cashChart { width: 100%; height: 300px; overflow: visible; }
.chart-grid { stroke: #e8e7df; stroke-width: 1; }
.chart-axis { fill: #999c93; font-size: 9px; }
.chart-path-cash { fill: none; stroke: var(--forest); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-path-dividend { fill: none; stroke: var(--lime-deep); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.chart-area { fill: url(#cashGradient); }
.chart-hover-line { stroke: #9d9f96; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tooltip { position: absolute; z-index: 2; display: none; pointer-events: none; min-width: 140px; padding: 10px 11px; border: 1px solid #d4d5cb; border-radius: 9px; color: #f7f7f2; background: rgba(23, 25, 22, 0.92); font-size: 10px; line-height: 1.7; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.chart-tooltip strong { display: block; font-size: 11px; }

.score-ring { width: 44px; height: 44px; display: grid; place-items: center; border: 4px solid var(--lime); border-radius: 50%; font-family: Georgia, serif; font-size: 16px; }
.verdict-copy { padding: 24px 0 18px; border-bottom: 1px solid var(--line); }
.verdict-copy strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.verdict-copy p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.check-list { display: grid; gap: 14px; padding-top: 18px; }
.check-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; font-size: 11px; }
.check-item i { width: 7px; height: 7px; border-radius: 50%; }
.check-item.good i { background: #84b332; }
.check-item.warn i { background: var(--amber); }
.check-item.bad i { background: var(--rose); }
.check-item span { color: var(--muted); }
.check-item strong { font-size: 11px; }

.unit-economics { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 23px; padding-top: 22px; }
.donut-wrap { display: grid; place-items: center; }
.donut { width: 142px; height: 142px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lime) 0 30%, #e5e5dc 30% 100%); }
.donut::before { content: ""; position: absolute; width: 102px; height: 102px; border-radius: 50%; background: var(--panel); }
.donut > div { position: relative; z-index: 1; text-align: center; }
.donut strong { display: block; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.donut span { color: var(--muted); font-size: 9px; }
.economics-list { display: grid; gap: 12px; }
.economics-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding-bottom: 9px; border-bottom: 1px solid #ecebe4; }
.economics-row:last-child { border: 0; }
.economics-row span { color: var(--muted); font-size: 11px; }
.economics-row strong { font-size: 12px; }
.text-btn { padding: 0; border: 0; color: #777b70; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }

.timeline { position: relative; display: grid; gap: 16px; margin-top: 23px; }
.timeline::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 12px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 25px 1fr; gap: 11px; }
.timeline-dot { z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); font-size: 9px; font-weight: 800; }
.timeline-item.reached .timeline-dot { border-color: var(--forest); color: white; background: var(--forest); }
.timeline-copy strong { display: block; font-size: 11px; }
.timeline-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.location-search { padding: 19px 21px; margin-bottom: 16px; }
.search-fields { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 14px; align-items: end; }
.google-key-field { grid-column: 1 / -1; }
.input-with-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.coordinate-row { display: grid; grid-template-columns: 155px 155px auto 1fr; gap: 10px; align-items: end; margin-top: 13px; }
.coordinate-row > span { align-self: center; color: var(--muted); font-size: 9px; line-height: 1.5; }
.data-provenance { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.data-provenance::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.market-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 16px; }
.data-chip { padding: 5px 8px; border-radius: 99px; color: #777a6f; background: #eeeee6; font-size: 9px; font-weight: 700; }
.external-map-wrap { margin-top: 18px; overflow: hidden; border: 1px solid #e0e1d8; border-radius: 13px; background: #ebeae2; }
.external-map-wrap iframe { display: block; width: 100%; height: 330px; border: 0; background: #ebeae2; }
.external-map-actions { display: flex; gap: 1px; border-top: 1px solid #dddcd4; background: #dddcd4; }
.external-map-actions a { flex: 1; padding: 11px 14px; color: var(--ink); background: #f7f6f0; font-size: 10px; font-weight: 800; text-align: center; text-decoration: none; }
.external-map-actions a:hover { background: white; }
.radar-details { margin-top: 13px; }
.radar-details summary { color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.radar-map { position: relative; height: 375px; margin-top: 18px; overflow: hidden; border: 1px solid #e0e1d8; border-radius: 13px; background-color: #ebeae2; background-image: linear-gradient(#deded5 1px, transparent 1px), linear-gradient(90deg, #deded5 1px, transparent 1px); background-size: 36px 36px; }
.map-ring { position: absolute; left: 50%; top: 50%; border: 1px dashed rgba(54, 70, 58, .28); border-radius: 50%; transform: translate(-50%, -50%); }
.map-ring.r1 { width: 120px; height: 120px; }
.map-ring.r2 { width: 240px; height: 240px; }
.map-ring.r3 { width: 360px; height: 360px; }
.map-axis { position: absolute; color: #9b9e94; font-size: 8px; }
.map-axis.north { top: 8px; left: 50%; }
.map-axis.radius { right: 12px; bottom: 10px; }
.map-point { position: absolute; width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid #f6f4ed; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 4px 10px rgba(30,33,28,.2); font-size: 9px; font-weight: 800; cursor: help; }
.map-point.store { z-index: 4; width: 34px; height: 34px; color: white; background: var(--forest); }
.map-point.station { color: var(--ink); background: var(--lime); }
.map-point.gym { color: white; background: #df7c68; }
.map-point-label { position: absolute; top: 29px; left: 50%; min-width: 84px; padding: 3px 5px; border-radius: 4px; color: var(--ink); background: rgba(255,254,250,.82); font-size: 8px; text-align: center; transform: translateX(-50%); backdrop-filter: blur(3px); }
.map-legend { display: flex; gap: 15px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.pin { width: 7px; height: 7px; border-radius: 50%; }
.pin.store { background: var(--forest); }.pin.station { background: var(--lime-deep); }.pin.gym { background: #df7c68; }

.station-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 24px 0 18px; border-bottom: 1px solid var(--line); }
.station-hero > div > strong { display: block; font-family: Georgia, "Noto Serif SC", serif; font-size: 22px; font-weight: 500; }
.station-hero span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.footfall-number { text-align: right; }
.footfall-number strong { font-size: 24px !important; }
.population-card { display: flex; justify-content: space-between; gap: 18px; padding: 14px 15px; margin-top: 14px; border: 1px solid #dfe2d4; border-radius: 11px; background: #f0f3e8; }
.population-card > div:last-child { text-align: right; }
.population-card span, .population-card small { display: block; color: var(--muted); font-size: 9px; }
.population-card strong { display: block; margin-top: 4px; color: var(--forest); font-family: Georgia, "Noto Serif SC", serif; font-size: 20px; font-weight: 500; }
.population-card small { margin-top: 4px; max-width: 210px; line-height: 1.4; }
.hourly-chart { height: 92px; display: flex; align-items: end; gap: 4px; padding-top: 18px; }
.hour-bar { position: relative; flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; background: #dfe0d6; }
.hour-bar.peak { background: var(--lime-deep); }
.hour-bar span { position: absolute; bottom: -16px; left: 50%; color: #989b92; font-size: 7px; transform: translateX(-50%); }
.station-list { display: grid; gap: 8px; margin-top: 31px; }
.station-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid #ecebe4; font-size: 10px; }
.station-row span { color: var(--muted); }

.persona-hero { display: flex; gap: 13px; align-items: center; padding: 22px 0; }
.persona-avatar { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); font-family: Georgia, serif; font-size: 20px; }
.persona-hero strong { font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.persona-hero p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.persona-bars { display: grid; gap: 11px; }
.persona-bar-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.persona-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: #e7e7df; }
.persona-fill { height: 100%; border-radius: inherit; background: var(--lime-deep); }
.persona-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.persona-tags span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; color: #696c63; font-size: 9px; }

.competition-list { display: grid; gap: 0; margin-top: 16px; }
.competition-row { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #ecebe4; }
.competition-rank { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #7b7e74; background: #eeeee7; font-size: 9px; }
.competition-row strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.competition-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.competition-distance { font-weight: 700; }

.assumption-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 16px; }
.assumption-nav { position: sticky; top: 16px; display: grid; padding: 9px; }
.assumption-nav button { padding: 12px 13px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.assumption-nav button.active { color: var(--ink); background: #edede5; font-weight: 800; }
.assumption-content { min-width: 0; }
.input-section { padding: 25px; }
.input-section.hidden { display: none; }
.input-section-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.input-section-head > div { display: flex; align-items: center; gap: 11px; }
.input-section-head > div > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 9px; font-weight: 800; }
.input-section-head h3 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 20px; font-weight: 500; }
.input-section-head p { max-width: 390px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: right; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; padding-top: 23px; }

.field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.field > span { color: #5f625a; font-size: 10px; font-weight: 700; }
.field small { color: #9a9d94; font-size: 8px; line-height: 1.45; }
.field input, .field select {
  min-width: 0;
  width: 100%;
  height: 41px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fbfaf6;
}
.field input:hover, .field select:hover { border-color: #aeb0a5; }
.field input:focus, .field select:focus { border-color: #7d8f45; background: white; outline: none; box-shadow: 0 0 0 3px rgba(201, 240, 91, .25); }
.field input[readonly] { color: #6e7168; border-style: dashed; background: #efeee8; cursor: not-allowed; }
.input-prefix, .input-suffix { position: relative; }
.input-prefix input { padding-left: 32px; }
.input-prefix i { position: absolute; top: 50%; left: 12px; color: #90938a; font-size: 11px; font-style: normal; transform: translateY(-50%); }
.input-suffix input { padding-right: 40px; }
.input-suffix i { position: absolute; top: 50%; right: 12px; color: #90938a; font-size: 10px; font-style: normal; transform: translateY(-50%); }
.calculated-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.calculated-strip > div { padding: 14px; background: #f0efe8; }
.calculated-strip span { display: block; color: var(--muted); font-size: 9px; }
.calculated-strip strong { display: block; margin-top: 5px; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }

.scenario-table-wrap { margin-top: 22px; overflow-x: auto; }
.scenario-table { width: 100%; border-collapse: collapse; }
.scenario-table th, .scenario-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 10px; text-align: right; }
.scenario-table th:first-child, .scenario-table td:first-child { text-align: left; }
.scenario-table th { color: var(--muted); font-size: 9px; }
.scenario-table input { width: 84px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fbfaf6; text-align: right; }
.scenario-table .active-col { background: rgba(201, 240, 91, .12); }

.ownership-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ownership-summary .metric-card { min-height: 142px; }
.ownership-summary .metric-card > strong { font-size: 27px; }
.warning-card { border-color: #d8aa58; box-shadow: inset 0 0 0 1px rgba(216,170,88,.22); }
.ownership-policy, .shareholder-editor, .shareholder-returns { padding: 24px; margin-bottom: 16px; }
.ownership-policy-grid { display: grid; grid-template-columns: 190px 190px minmax(280px, 1fr); gap: 14px; align-items: stretch; margin-top: 20px; }
.policy-formula { display: grid; align-content: center; gap: 5px; padding: 12px 15px; border-radius: 10px; color: #274438; background: #eff1e8; }
.policy-formula span, .policy-formula small { color: #74786e; font-size: 8px; }
.policy-formula strong { font-family: Consolas, monospace; font-size: 10px; font-weight: 600; }
.shareholder-table-wrap { margin-top: 18px; overflow-x: auto; }
.shareholder-table { width: 100%; min-width: 1050px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.shareholder-table th, .shareholder-table td { padding: 10px 9px; border-bottom: 1px solid #e9e8e1; color: #5f625a; font-size: 9px; text-align: right; white-space: nowrap; }
.shareholder-table th { color: #85887f; background: #f2f1eb; font-size: 8px; }
.shareholder-table th:first-child, .shareholder-table td:first-child { text-align: left; }
.shareholder-table tbody tr:hover td { background: rgba(201,240,91,.07); }
.shareholder-table td strong { color: var(--ink); }
.shareholder-table td small { display: block; margin-top: 3px; color: var(--muted); }
.shareholder-table input { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fbfaf6; font-size: 9px; text-align: right; }
.shareholder-table input:focus { border-color: #7d8f45; outline: none; box-shadow: 0 0 0 3px rgba(201,240,91,.2); }
.shareholder-name-input { width: 82px; text-align: left !important; font-weight: 800; }
.table-number-input { width: 64px; }
.table-money-input { position: relative; }
.table-money-input span { position: absolute; top: 50%; left: 8px; color: #96998f; transform: translateY(-50%); }
.table-money-input input { width: 116px; padding-left: 20px; }
.table-money-input.service-input input { width: 104px; }
.row-delete { width: 28px; height: 28px; border: 1px solid #e0c8c3; border-radius: 50%; color: #a3584c; background: #fff7f5; cursor: pointer; }
.row-delete:hover { color: white; background: #a3584c; }
.shareholder-note { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.return-table td { padding-top: 13px; padding-bottom: 13px; }

.forecast-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.forecast-tabs button, .year-filter button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; }
.forecast-tabs button.active, .year-filter button.active { color: white; border-color: var(--ink); background: var(--ink); font-weight: 700; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; margin-bottom: 10px; border-radius: 12px; }
.year-filter { display: flex; gap: 4px; }
.year-filter button { padding: 5px 9px; }
.table-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.forecast-table-wrap { max-height: 66vh; overflow: auto; border-radius: 14px; }
.forecast-table { min-width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.forecast-table th, .forecast-table td { min-width: 104px; padding: 10px 12px; border-right: 1px solid #e9e8e1; border-bottom: 1px solid #e9e8e1; font-size: 9px; text-align: right; white-space: nowrap; }
.forecast-table thead th { position: sticky; top: 0; z-index: 3; color: #6e7168; background: #efeee8; font-size: 9px; }
.forecast-table th:first-child, .forecast-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 190px; text-align: left; background: var(--panel); }
.forecast-table thead th:first-child { z-index: 4; background: #efeee8; }
.forecast-table .subtotal td { color: var(--ink); background: #f5f4ee; font-weight: 800; }
.forecast-table .subtotal td:first-child { background: #f5f4ee; }
.forecast-table .highlight td { color: #123b2f; background: rgba(201, 240, 91, .12); font-weight: 800; }
.forecast-table .highlight td:first-child { background: #edf4d9; }
.forecast-table .negative { color: #c05242; }

.audit-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.audit-index { position: sticky; top: 16px; padding: 22px; }
.audit-index #auditNav { display: grid; gap: 4px; margin-top: 19px; }
.audit-index button { padding: 9px 10px; border: 0; border-left: 2px solid transparent; color: var(--muted); background: transparent; font-size: 10px; text-align: left; cursor: pointer; }
.audit-index button:hover { color: var(--ink); border-color: var(--lime-deep); }
.audit-content { display: grid; gap: 14px; }
.formula-card { padding: 24px; scroll-margin-top: 20px; }
.formula-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.formula-card h3 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; font-weight: 500; }
.formula-tag { padding: 4px 7px; border-radius: 99px; color: #66704c; background: #edf4d9; font-size: 8px; font-weight: 800; }
.formula-box { margin: 17px 0 14px; padding: 14px 16px; overflow-x: auto; border: 1px solid #dedfd5; border-radius: 10px; color: #234238; background: #f0f2e9; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.7; white-space: nowrap; }
.formula-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.formula-example { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.formula-example div { padding: 10px; border-radius: 8px; background: #f5f4ee; }
.formula-example span { display: block; color: var(--muted); font-size: 8px; }
.formula-example strong { display: block; margin-top: 4px; font-size: 10px; }
.limitations-panel { display: grid; grid-template-columns: 230px 1fr; gap: 30px; padding: 25px; margin-top: 16px; border-left: 4px solid var(--amber); }
.limitations-panel h3 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.limitations-panel ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.8; }

.metric-dialog { width: min(540px, calc(100% - 32px)); padding: 27px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--panel); box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.metric-dialog::backdrop { background: rgba(19, 22, 18, .5); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.metric-dialog h3 { margin: 8px 0 17px; font-family: Georgia, "Noto Serif SC", serif; font-size: 24px; font-weight: 500; }
.dialog-formula { padding: 13px; border-radius: 9px; color: #274438; background: #eff1e8; font-family: Consolas, monospace; font-size: 10px; line-height: 1.7; }
.dialog-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dialog-values div { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.dialog-values span { display: block; color: var(--muted); font-size: 8px; }
.dialog-values strong { display: block; margin-top: 4px; font-size: 11px; }
.dialog-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.share-dialog { width: min(680px, calc(100% - 32px)); }
.share-dialog textarea { width: 100%; min-height: 88px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #f6f5ef; font-family: Consolas, monospace; font-size: 10px; line-height: 1.5; }
.share-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pdf-report { display: none; }

.toast { position: fixed; z-index: 100; right: 26px; bottom: 26px; max-width: 360px; padding: 12px 15px; border-radius: 10px; color: white; background: #1c201b; box-shadow: 0 14px 34px rgba(0,0,0,.22); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: 200ms ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #8a362b; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-card.hero-metric { grid-row: span 1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .ownership-summary { grid-template-columns: repeat(2, 1fr); }
  .ownership-policy-grid { grid-template-columns: 1fr 1fr; }
  .policy-formula { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 242px; transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .mobile-menu { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: transparent; }
  .topbar { height: 76px; padding: 0 20px; }
  .project-meta { margin-right: auto; margin-left: 12px; }
  .topbar-actions .icon-btn { display: none; }
  .upload-btn { padding: 9px 11px; font-size: 0; }
  .upload-btn span { font-size: 17px; }
  .pwa-action { width: 38px; height: 38px; padding: 0; font-size: 0; }
  .pwa-action span { font-size: 16px; }
  .scenario-bar { flex-wrap: wrap; padding: 10px 20px; }
  .scenario-summary { width: 100%; margin: 0; }
  .view { padding: 26px 20px 44px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card.hero-metric { grid-column: 1 / -1; }
  .assumption-layout, .audit-grid { grid-template-columns: 1fr; }
  .assumption-nav, .audit-index { position: static; display: flex; overflow-x: auto; }
  .assumption-nav button, .audit-index button { white-space: nowrap; }
  .audit-index { display: block; }
  .audit-index #auditNav { display: flex; overflow-x: auto; }
  .limitations-panel { grid-template-columns: 1fr; }
  .coordinate-row { grid-template-columns: 1fr 1fr; }
  .coordinate-row > span { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .project-title-row h1 { max-width: 150px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .project-badge { display: none; }
  .scenario-label { display: none; }
  .scenario-switch { width: 100%; }
  .scenario-switch button { flex: 1; min-width: 0; }
  .page-intro h2 { font-size: 29px; }
  .intro-actions { width: 100%; }
  .intro-actions button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 16px; }
  .metric-card > strong { font-size: 24px; }
  .cash-panel, .revenue-panel, .verdict-panel, .milestone-panel, .map-panel, .station-panel, .persona-panel, .competition-panel { padding: 18px; }
  .legend { display: none; }
  .unit-economics { grid-template-columns: 1fr; }
  .search-fields { grid-template-columns: 1fr; }
  .input-with-action { grid-template-columns: 1fr; }
  .coordinate-row { grid-template-columns: 1fr; }
  .coordinate-row > span { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .input-section-head { display: block; }
  .input-section-head p { margin-top: 12px; text-align: left; }
  .calculated-strip { grid-template-columns: 1fr; }
  .formula-example { grid-template-columns: 1fr; }
  .table-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .radar-map { height: 310px; }
  .external-map-wrap iframe { height: 285px; }
  .ownership-summary { grid-template-columns: 1fr 1fr; }
  .ownership-policy-grid { grid-template-columns: 1fr; }
  .policy-formula { grid-column: auto; }
}

@media print {
  .sidebar, .topbar, .scenario-bar, .intro-actions, .audit-index { display: none !important; }
  .main-content { margin: 0; }
  .view { display: none !important; padding: 0; }
  #view-audit { display: block !important; }
  .audit-grid { grid-template-columns: 1fr; }
  .panel { break-inside: avoid; box-shadow: none; }
  body { background: white; }
  body.printing-report .app-shell { display: none !important; }
  body.printing-report .pdf-report { display: block !important; color: #171916; background: white; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
  .pdf-report .pdf-cover { padding: 12mm 10mm 8mm; border-bottom: 3px solid #163e32; }
  .pdf-report .pdf-kicker { color: #637052; font-size: 8pt; font-weight: 800; letter-spacing: .12em; }
  .pdf-report h1 { margin: 4mm 0 2mm; font-family: Georgia, "Noto Serif SC", serif; font-size: 25pt; font-weight: 500; }
  .pdf-report .pdf-meta { color: #666b63; font-size: 9pt; }
  .pdf-report .pdf-section { padding: 8mm 10mm 0; break-inside: avoid; }
  .pdf-report h2 { margin: 0 0 4mm; color: #163e32; font-size: 13pt; }
  .pdf-report .pdf-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .pdf-report .pdf-kpi { padding: 4mm; border: 1px solid #d9ddd1; border-radius: 2mm; }
  .pdf-report .pdf-kpi span { display: block; color: #6e7069; font-size: 7.5pt; }
  .pdf-report .pdf-kpi strong { display: block; margin-top: 2mm; font-size: 13pt; }
  .pdf-report table { width: 100%; border-collapse: collapse; font-size: 7.5pt; font-variant-numeric: tabular-nums; }
  .pdf-report th, .pdf-report td { padding: 2.3mm 2mm; border: 1px solid #dfe1d8; text-align: right; }
  .pdf-report th:first-child, .pdf-report td:first-child { text-align: left; }
  .pdf-report th { color: #31483e; background: #eef1e8; }
  .pdf-report .pdf-note { padding: 6mm 10mm 0; color: #73766f; font-size: 7pt; line-height: 1.5; }
  .pdf-report .pdf-page-break { break-before: page; }
  @page { size: A4 landscape; margin: 8mm; }
}
