:root {
  --cobalt: #1859c9;
  --cobalt-dark: #10469f;
  --cobalt-light: #eaf1ff;
  --text: #172033;
  --muted: #667085;
  --border: #d9e1ec;
  --surface: #ffffff;
  --page: #f6f8fc;
  --danger: #b42318;
  --danger-bg: #fff1f0;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--page);
  font-family: Arial, "Noto Sans KR", sans-serif;
  line-height: 1.6;
}

.app-card {
  width: min(100%, 720px);
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--cobalt);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
}

.app-header {
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1.2;
}

.intro {
  margin-bottom: 0;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-weight: 400;
}

input {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid #b7c2d2;
  border-radius: 8px;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(24, 89, 201, 0.16);
}

.input-help {
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.button-group {
  display: flex;
  gap: 10px;
}

button {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:active {
  transform: translateY(1px);
}

.primary-button {
  color: white;
  background: var(--cobalt);
  border: 1px solid var(--cobalt);
}

.primary-button:hover {
  background: var(--cobalt-dark);
}

.secondary-button {
  color: var(--cobalt-dark);
  background: white;
  border: 1px solid #9db3d8;
}

.secondary-button:hover {
  background: var(--cobalt-light);
}

.error-message {
  margin: 22px 0 0;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  border-radius: 6px;
  font-weight: 700;
}

.result-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.status-badge {
  padding: 5px 12px;
  color: var(--cobalt-dark);
  background: var(--cobalt-light);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

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

.result-item {
  padding: 16px;
  background: #f8faff;
  border: 1px solid #e1e8f5;
  border-radius: 8px;
}

.wide-item {
  grid-column: 1 / -1;
}

.result-item dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-item dd {
  margin: 3px 0 0;
  color: var(--cobalt-dark);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
}

.result-item small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.status-description {
  margin: 16px 0 0;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  body {
    padding: 18px 12px;
    place-items: start center;
  }

  .app-card {
    padding: 28px 20px;
    border-radius: 12px;
  }

  .button-group {
    flex-direction: column;
  }

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

  .wide-item {
    grid-column: auto;
  }
}
