:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --font: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.header h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.title-or {
  margin: 0 0.15em;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text-muted);
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.input-card {
  margin-bottom: 1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-wrap input {
  flex: 1;
  border: none;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
}

#salary {
  letter-spacing: 0.02em;
}

.input-wrap .unit {
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: #f9fafb;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

.range {
  width: 100%;
  margin-top: 0.75rem;
  accent-color: var(--accent);
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hint-sub {
  margin-top: 0.25rem;
}

.hint-sub strong {
  color: var(--accent);
  font-weight: 600;
}

.hint strong {
  color: var(--accent);
  font-weight: 600;
}

.btn-primary,
.btn-secondary {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.btn-primary {
  width: 100%;
  padding: 0.95rem;
  color: #fff;
  background: var(--accent);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem;
  color: var(--text);
  background: #f3f4f6;
}

.hidden {
  display: none !important;
}

.loading-card {
  text-align: center;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-title {
  margin: 0 0 0.25rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result-code {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-item {
  padding: 0.85rem 1rem;
  background: #f9fafb;
  border-radius: 10px;
}

.stat-item.full {
  grid-column: 1 / -1;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
}

.mapping-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.mapping-box h3 {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.mapping-box ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mapping-box li + li {
  margin-top: 0.35rem;
}

.disclaimer {
  margin: 1.25rem 0 0;
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.5;
}

.footer {
  margin-top: 2rem;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.7rem;
  color: #9ca3af;
  line-height: 1.5;
}

@media (min-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }
}
