:root {
  --bg0: #0b0f1a;
  --bg1: #0f1630;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted2: rgba(255, 255, 255, 0.55);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --focus: 0 0 0 3px rgba(120, 151, 255, 0.45);
  --primary: #7b6cff;
  --primary2: #5bd6ff;
  --danger: #ff4d6d;
  --good: #18e1a6;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR",
    "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(123, 108, 255, 0.4), transparent 55%),
    radial-gradient(900px 500px at 95% 10%, rgba(91, 214, 255, 0.25), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.app {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.header {
  padding: 18px 6px 8px;
}

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

.badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: var(--shadow);
  font-weight: 800;
  letter-spacing: 0.5px;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  margin: 14px 0;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.bullets {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted2);
}

.bullets li {
  margin: 6px 0;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.actions.split {
  justify-content: space-between;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn.primary {
  border-color: rgba(123, 108, 255, 0.6);
  background: linear-gradient(135deg, rgba(123, 108, 255, 0.9), rgba(91, 214, 255, 0.8));
}

.btn.ghost {
  background: transparent;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.progress {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card2), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
}

.progress__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.progress__text {
  font-weight: 700;
}

.progress__hint {
  font-size: 12px;
  color: var(--muted2);
}

.progress__bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  border-radius: 999px;
  transition: width 160ms ease;
}

.question {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.45;
}

.answers {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.option:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
}

.option input {
  width: 18px;
  height: 18px;
}

.option__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--text);
  font-weight: 650;
}

.option__sub {
  color: var(--muted2);
  font-weight: 600;
}

.error {
  min-height: 20px;
  margin: 10px 0 0;
  color: rgba(255, 120, 155, 0.95);
  font-weight: 650;
}

.result__title {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.result__desc {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.meters {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.meter {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.meter__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.meter__label {
  font-weight: 750;
}

.meter__text {
  color: var(--muted2);
  font-size: 13px;
}

.meter__bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 260ms ease;
}

.meter__fill--young {
  background: linear-gradient(90deg, var(--primary2), var(--good));
}

.meter__fill--trad {
  background: linear-gradient(90deg, rgba(255, 150, 91, 0.9), rgba(255, 77, 109, 0.95));
}

.details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.review {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.review li {
  margin: 10px 0;
}

.fineprint {
  margin: 14px 0 0;
  color: var(--muted2);
  font-size: 12.5px;
  line-height: 1.6;
}

.footer {
  padding: 10px 6px 0;
  color: var(--muted2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .option,
  .progress__fill,
  .meter__fill {
    transition: none !important;
  }
  .btn:hover,
  .option:hover {
    transform: none !important;
  }
}
