:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-muted: #fbfcfb;
  --line: #e3e9e6;
  --line-strong: #d5ddda;
  --text: #1f3132;
  --muted: #7d8e8f;
  --accent: #245e5d;
  --accent-strong: #1e504f;
  --shadow: 0 12px 30px rgba(24, 41, 43, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  background:
    linear-gradient(180deg, #fafcfb 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.app-shell {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.hero-note {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #708283;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.panel h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.field {
  display: block;
}

.field span {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field input:focus {
  border-color: rgba(36, 94, 93, 0.42);
  box-shadow: 0 0 0 4px rgba(36, 94, 93, 0.08);
}

.result-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-muted);
}

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.result-label {
  font-size: 13px;
  color: var(--muted);
}

.result-head strong {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

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

.metric {
  min-height: 126px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.metric-main {
  background: #fdfefe;
}

.metric span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: #7f9393;
}

.metric strong {
  display: block;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

@media (max-width: 920px) {
  .app {
    width: min(100% - 20px, 760px);
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .app-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .hero {
    align-items: flex-start;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app {
    width: calc(100% - 16px);
    padding-top: 8px;
    padding-bottom: 16px;
  }

  .app-shell {
    padding: 12px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-note {
    font-size: 13px;
  }

  .panel {
    padding: 14px;
    border-radius: 18px;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .field input {
    height: 52px;
    border-radius: 14px;
  }

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

  .result-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .metric {
    min-height: 112px;
    padding: 16px 14px;
  }

  .metric strong {
    font-size: 2rem;
  }
}
