:root {
  color-scheme: light;
  --bg: #f2f6f3;
  --panel: #ffffff;
  --ink: #17212a;
  --muted: #63717b;
  --line: #d3ded8;
  --navy: #15324a;
  --teal: #0f8f86;
  --green: #33845d;
  --coral: #c84d3f;
  --amber: #b97917;
  --soft-teal: #e8f6f4;
  --soft-amber: #fff5df;
  --soft-coral: #fff0ee;
  --shadow: 0 18px 48px rgba(27, 51, 60, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 246, 243, 0.96)),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.test-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 54px;
}

.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin-bottom: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-link span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.brand-link strong {
  font-size: 14px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.start-view,
.question-panel,
.result-view,
.ad-slot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.start-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 5vw, 44px);
}

.hero-visual {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #17354e;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 650px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.lead {
  max-width: 700px;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
}

.start-actions,
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.kakao-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.kakao-button {
  border: 1px solid #f2d744;
  background: #fee500;
  color: #191600;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.meta-strip span,
.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ad-slot {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  background: #fbfcfa;
  box-shadow: none;
}

.ad-slot span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: var(--soft-amber);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.ad-slot p {
  color: var(--muted);
  font-size: 13px;
}

.ad-slot.compact {
  margin-top: 0;
}

.ad-slot.is-live-ad {
  display: block;
  min-height: 96px;
  padding: 12px;
}

.ad-slot.is-live-ad .adsbygoogle {
  min-height: 72px;
}

.question-view {
  display: grid;
  gap: 14px;
}

.progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.progress-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e4;
}

.progress-track div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green), var(--amber));
  transition: width 160ms ease;
}

.question-panel {
  padding: clamp(20px, 5vw, 42px);
}

.question-kicker {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.question-panel h2 {
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.16;
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.option-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.option-button:hover {
  border-color: rgba(15, 143, 134, 0.55);
  box-shadow: 0 10px 22px rgba(32, 48, 58, 0.08);
  transform: translateY(-1px);
}

.option-button b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--soft-teal);
  color: var(--teal);
}

.option-button span {
  min-width: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.result-view {
  padding: clamp(22px, 5vw, 48px);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
}

.result-badge {
  margin-bottom: 12px;
  background: var(--soft-coral);
  color: var(--coral);
  border-color: #f2c2bb;
}

.result-view h2 {
  max-width: 760px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.06;
}

.result-label {
  margin-top: 10px;
  color: var(--amber);
  font-size: 18px;
  font-weight: 900;
}

.result-image-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #bfd7d3;
  border-radius: var(--radius);
  background: #f8fbf8;
}

.result-image-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.result-image-card figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}

.score-panel,
.prompt-panel,
.share-panel,
.related-tests {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfa;
  padding: 16px;
}

.score-panel h3,
.prompt-panel h3,
.share-panel h3,
.related-tests h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.18fr) minmax(0, 1fr) minmax(72px, 0.18fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.score-row span:last-child {
  text-align: right;
}

.score-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebe7;
}

.score-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  background: var(--teal);
}

.score-fill.right {
  left: auto;
  right: 50%;
  background: var(--coral);
}

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

.result-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.result-grid h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.result-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.result-grid p,
.prompt-panel p {
  color: var(--muted);
}

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

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.related-item b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.related-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .test-shell {
    width: min(100% - 18px, 980px);
    padding-top: 10px;
  }

  .start-view,
  .result-hero,
  .result-grid,
  .related-list {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 190px;
  }

  .progress-row {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .kakao-button {
    width: 100%;
  }

  .option-button {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .option-button b {
    width: 36px;
    height: 36px;
  }
}
