:root {
  --bg: #faf9f4;
  --bg-2: #f2f0e8;
  --panel: #ffffff;
  --line: rgba(30, 40, 20, 0.08);
  --text: #2c2e22;
  --muted: #8a8d78;
  --soft: #4a4d3c;
  --primary: #b8d943;
  --primary-2: #3ba9c4;
  --warning: #e8a838;
  --danger: #d4593c;
  --success: #7cb342;
  --shadow: 0 8px 32px rgba(30, 40, 20, 0.07);
  --shadow-sm: 0 4px 16px rgba(30, 40, 20, 0.05);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --pink: #f0b8c8;
  --blue: #3ba9c4;
  --lavender: #b8a4d4;
  --cream: #f8f7f0;
  --lemon-glow: #eef5b8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(184, 217, 67, 0.12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(59, 169, 196, 0.08), transparent 28%),
    radial-gradient(circle at 50% 90%, rgba(232, 168, 56, 0.06), transparent 30%),
    var(--bg);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 18px 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--lemon-glow));
  color: #4a4d3c;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(184, 217, 67, 0.35);
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(184, 217, 67, 0.3);
  background: rgba(184, 217, 67, 0.08);
  border-radius: 999px;
  color: #7a9a1e;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero {
  margin-bottom: 20px;
}

.hero-copy {
  padding: 24px 0 6px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: #7a9a1e;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
}

.headline-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.8vw, 1.05rem);
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.calculator-panel {
  padding: 22px 20px 24px;
}

.panel-header {
  padding-bottom: 14px;
}

.panel-header h2,
.section-headline-row h3,
.card-title-row h2,
.card-title-row h3 {
  margin: 0;
}

.panel-header h2 {
  margin-top: 4px;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  letter-spacing: -0.03em;
}

.section-block + .section-block {
  margin-top: 22px;
}

.section-headline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-headline-row h3 {
  font-size: 1.04rem;
  color: var(--text);
}

.section-headline-row span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  color: var(--text);
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color-scheme: light;
  font-weight: 600;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 217, 67, 0.18);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field select option {
  background: #fff;
  color: var(--text);
}

.value-box {
  min-height: 90px;
  justify-content: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(184, 217, 67, 0.06), rgba(59, 169, 196, 0.06));
  border: 1.5px solid rgba(184, 217, 67, 0.22);
}

.value-box strong {
  margin-top: 2px;
  font-size: 1.14rem;
  color: var(--text);
}

.result-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm);
}

.hero-result {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none;
  color: #fff;
  text-align: center;
}

.hero-result .result-label {
  color: rgba(255, 255, 255, 0.75);
}

.hero-result .big-number {
  color: #fff;
}

.hero-result .sub-copy {
  color: rgba(255, 255, 255, 0.85);
}

.result-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.big-number {
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-top: 8px;
  color: var(--text);
}

.sub-copy {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.score-value {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  line-height: 1;
  font-weight: 900;
  color: var(--primary-2);
  letter-spacing: -0.04em;
}

.score-unit {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
}

.rating-success {
  background: rgba(124, 179, 66, 0.12);
  border: 1.5px solid rgba(124, 179, 66, 0.3);
  color: #5a8e2e;
}

.rating-primary {
  background: rgba(59, 169, 196, 0.12);
  border: 1.5px solid rgba(59, 169, 196, 0.3);
  color: #2d8aa8;
}

.rating-warning {
  background: rgba(232, 168, 56, 0.12);
  border: 1.5px solid rgba(232, 168, 56, 0.3);
  color: #b8821e;
}

.rating-danger {
  background: rgba(212, 89, 60, 0.12);
  border: 1.5px solid rgba(212, 89, 60, 0.3);
  color: #b84a32;
}

.rating-neutral {
  background: rgba(138, 125, 110, 0.1);
  border: 1.5px solid rgba(138, 125, 110, 0.2);
  color: var(--muted);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title-row h3 {
  font-size: 0.96rem;
  color: var(--text);
}

#runwayLabel {
  color: var(--primary-2);
  font-size: 0.76rem;
  font-weight: 700;
}

.runway-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.runway-segment {
  height: 26px;
  min-width: 10px;
  flex: 1 1 10px;
  border-radius: 7px;
  border: none;
  background: rgba(40, 30, 20, 0.06);
}

.runway-segment.filled {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 12px rgba(184, 217, 67, 0.25);
}

.scenario-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scenario-btn {
  border: 1.5px solid var(--line);
  background: var(--cream);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.86rem;
}

.scenario-btn.active {
  background: linear-gradient(135deg, rgba(184, 217, 67, 0.12), rgba(59, 169, 196, 0.1));
  border-color: var(--primary);
  color: #7a9a1e;
  box-shadow: 0 0 0 3px rgba(184, 217, 67, 0.1);
}

.scenario-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.scenario-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.scenario-stat strong {
  color: var(--text);
  font-size: 0.96rem;
}

.hidden {
  display: none !important;
}

.toggle-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--cream);
  border: 1.5px solid var(--line);
}

.toggle-field > span {
  font-size: 0.78rem;
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 999px;
  background: rgba(40, 30, 20, 0.12);
  transition: 0.25s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: 0.25s ease;
}

.switch input:checked + .switch-slider {
  background: var(--primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateY(-50%) translateX(20px);
}

.take-home-box {
  border-color: rgba(59, 169, 196, 0.25);
  background: linear-gradient(135deg, rgba(59, 169, 196, 0.06), rgba(184, 217, 67, 0.04));
}

.formula-strip {
  margin-top: 22px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(184, 217, 67, 0.08), rgba(59, 169, 196, 0.06));
  border: 1.5px dashed rgba(184, 217, 67, 0.35);
}

.formula-label {
  color: #7a9a1e;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}

.formula-text {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.5;
}

.formula-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.mini-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding: 8px 6px;
}

.summary-chip {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 66px;
  padding: 10px 10px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.summary-chip span {
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.summary-chip strong {
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
}

.summary-divider {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 700;
  justify-self: center;
}

.summary-chip.highlight {
  background: linear-gradient(135deg, rgba(184, 217, 67, 0.08), rgba(59, 169, 196, 0.06));
  border-color: rgba(184, 217, 67, 0.22);
}

.cta-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.primary-cta {
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--lemon-glow));
  color: #4a4d3c;
  font-weight: 800;
  font-size: 0.94rem;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(184, 217, 67, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(184, 217, 67, 0.4);
}

.secondary-cta {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-cta:hover {
  border-color: rgba(40, 30, 20, 0.15);
  color: var(--text);
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1.5px solid rgba(184, 217, 67, 0.3);
  border-radius: 14px;
  background: rgba(184, 217, 67, 0.06);
  color: #7a9a1e;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  border-color: var(--primary);
  background: rgba(184, 217, 67, 0.12);
  transform: translateY(-1px);
}

.share-icon {
  font-size: 1rem;
  font-weight: 900;
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 14px;
  background: var(--text);
  border: none;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(40, 30, 20, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.validation-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(212, 89, 60, 0.06);
  border: 1.5px solid rgba(212, 89, 60, 0.2);
  display: grid;
  gap: 6px;
}

.validation-item {
  font-size: 0.78rem;
  color: var(--danger);
  line-height: 1.4;
  font-weight: 500;
}

.mobile-cta-bar {
  display: none;
}

.score-breakdown {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-runway {
  background: var(--primary-2);
}

.dot-assets {
  background: var(--primary);
}

.breakdown-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.breakdown-value strong {
  font-size: 0.84rem;
  color: var(--text);
}

.breakdown-max {
  font-size: 0.66rem;
  color: var(--muted);
}

.breakdown-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(40, 30, 20, 0.06);
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.fill-runway {
  background: linear-gradient(90deg, var(--primary-2), rgba(59, 169, 196, 0.5));
}

.fill-assets {
  background: linear-gradient(90deg, var(--primary), rgba(184, 217, 67, 0.5));
}

.breakdown-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.breakdown-total .breakdown-label {
  font-weight: 600;
  color: var(--text);
}

.breakdown-total .breakdown-value strong {
  font-size: 1.06rem;
  color: var(--primary-2);
}

.advice-card {
  transition: border-color 0.3s ease, background 0.3s ease;
}

.advice-success {
  border-color: rgba(124, 179, 66, 0.25);
  background: linear-gradient(135deg, rgba(124, 179, 66, 0.05), #fff);
}

.advice-primary {
  border-color: rgba(59, 169, 196, 0.25);
  background: linear-gradient(135deg, rgba(59, 169, 196, 0.05), #fff);
}

.advice-warning {
  border-color: rgba(232, 168, 56, 0.25);
  background: linear-gradient(135deg, rgba(232, 168, 56, 0.05), #fff);
}

.advice-danger {
  border-color: rgba(212, 89, 60, 0.25);
  background: linear-gradient(135deg, rgba(212, 89, 60, 0.05), #fff);
}

.advice-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.advice-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--soft);
}

.advice-tips li::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary-2);
  flex-shrink: 0;
}

.advice-danger .advice-tips li::before {
  background: var(--danger);
}

.advice-warning .advice-tips li::before {
  background: var(--warning);
}

.advice-success .advice-tips li::before {
  background: var(--success);
}

.advice-primary .advice-tips li::before {
  background: var(--primary-2);
}

.advice-desc {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.advice-ladder {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.ladder-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  text-align: center;
  transition: all 0.25s ease;
  opacity: 0.55;
}

.ladder-step.active {
  opacity: 1;
  transform: translateY(-2px);
}

.ladder-step.active.ladder-danger {
  background: rgba(212, 89, 60, 0.08);
  border-color: rgba(212, 89, 60, 0.4);
  box-shadow: 0 4px 14px rgba(212, 89, 60, 0.1);
}

.ladder-step.active.ladder-warning {
  background: rgba(232, 168, 56, 0.08);
  border-color: rgba(232, 168, 56, 0.4);
  box-shadow: 0 4px 14px rgba(232, 168, 56, 0.1);
}

.ladder-step.active.ladder-primary {
  background: rgba(59, 169, 196, 0.08);
  border-color: rgba(59, 169, 196, 0.4);
  box-shadow: 0 4px 14px rgba(59, 169, 196, 0.1);
}

.ladder-step.active.ladder-success {
  background: rgba(124, 179, 66, 0.08);
  border-color: rgba(124, 179, 66, 0.4);
  box-shadow: 0 4px 14px rgba(124, 179, 66, 0.1);
}

.ladder-range {
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}

.ladder-step.active .ladder-range {
  color: var(--text);
}

.ladder-title {
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
}

.ladder-step.active .ladder-title {
  color: var(--text);
  font-weight: 700;
}

.micro-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.micro-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.micro-note strong {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 12px 100px;
  }

  .hero-copy {
    padding: 14px 0 4px;
  }

  .hero-copy h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .headline-subtitle {
    font-size: 0.82rem;
  }

  .topbar {
    margin-bottom: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
  }

  .badge {
    display: none;
  }

  .panel {
    border-radius: 18px;
  }

  .calculator-panel {
    padding: 16px 14px 18px;
  }

  .panel-header h2 {
    font-size: 1.16rem;
  }

  .section-block + .section-block {
    margin-top: 18px;
  }

  .section-headline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 10px;
  }

  .section-headline-row h3 {
    font-size: 0.98rem;
  }

  .section-headline-row span {
    font-size: 0.62rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .field input,
  .field select {
    padding: 13px 14px;
    font-size: 16px;
    border-radius: 12px;
  }

  .field select {
    padding-right: 36px;
  }

  .value-box {
    min-height: auto;
    padding: 12px 14px;
  }

  .value-box strong {
    font-size: 1.06rem;
  }

  .toggle-field {
    padding: 12px 14px;
  }

  .toggle-field > span {
    font-size: 0.82rem;
  }

  .switch {
    width: 48px;
    height: 28px;
  }

  .switch-slider::before {
    width: 22px;
    height: 22px;
  }

  .switch input:checked + .switch-slider::before {
    transform: translateY(-50%) translateX(20px);
  }

  .formula-strip {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
  }

  .formula-text {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .formula-hint {
    font-size: 0.72rem;
  }

  .cta-row {
    display: none;
  }

  .mini-summary {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 4px;
  }

  .summary-chip {
    min-height: auto;
    padding: 8px 8px;
    white-space: normal;
  }

  .summary-chip span {
    font-size: 0.6rem;
  }

  .summary-chip strong {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-all;
  }

  .summary-divider {
    display: none;
  }

  .summary-chip.highlight {
    grid-column: 1 / -1;
  }

  .result-panel {
    gap: 12px;
    padding: 12px;
  }

  .result-card {
    padding: 14px 14px 12px;
    border-radius: 16px;
  }

  .big-number {
    font-size: clamp(2.6rem, 13vw, 3.6rem);
  }

  .sub-copy {
    font-size: 0.82rem;
  }

  .score-value {
    font-size: 2.2rem;
  }

  .breakdown-label {
    font-size: 0.7rem;
  }

  .breakdown-value strong {
    font-size: 0.8rem;
  }

  .breakdown-total .breakdown-value strong {
    font-size: 0.98rem;
  }

  .card-title-row {
    margin-bottom: 8px;
  }

  .card-title-row h3 {
    font-size: 0.92rem;
  }

  .runway-segment {
    height: 22px;
    min-width: 8px;
    flex: 1 1 8px;
    border-radius: 6px;
  }

  .scenario-btn {
    padding: 12px 6px;
    font-size: 0.84rem;
  }

  .scenario-stat {
    padding: 10px 10px;
  }

  .scenario-stat strong {
    font-size: 0.92rem;
  }

  .advice-desc {
    font-size: 0.76rem;
    margin-bottom: 10px;
  }

  .advice-ladder {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
  }

  .ladder-step {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    text-align: left;
  }

  .ladder-range {
    font-size: 0.68rem;
    min-width: 64px;
    text-align: left;
  }

  .ladder-title {
    font-size: 0.72rem;
  }

  .ladder-step.active {
    transform: none;
  }

  .advice-tips li {
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .share-btn {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  .toast {
    bottom: 90px;
    left: 16px;
    right: 16px;
    transform: translateY(20px);
    text-align: center;
  }

  .toast-visible {
    transform: translateY(0);
  }

  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 249, 244, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    z-index: 1000;
  }

  .mobile-calculate-btn {
    width: 100%;
    padding: 15px 22px;
    font-size: 1rem;
    border-radius: 14px;
  }

  .validation-box {
    margin-bottom: 8px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    padding: 12px 8px 100px;
  }

  .hero-copy h1 {
    font-size: 1.5rem;
  }

  .field input,
  .field select {
    font-size: 16px;
  }

  .mini-summary {
    grid-template-columns: 1fr;
  }

  .summary-chip.highlight {
    grid-column: auto;
  }

  .big-number {
    font-size: 2.4rem;
  }

  .score-value {
    font-size: 1.8rem;
  }
}
