@font-face {
  font-family: "Pretendard";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/Pretendard-Regular.subset.woff2") format("woff2");
}
@font-face {
  font-family: "Pretendard";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/Pretendard-SemiBold.subset.woff2") format("woff2");
}
@font-face {
  font-family: "Pretendard";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/Pretendard-Bold.subset.woff2") format("woff2");
}

:root {
  --bg: #f6f3f7;
  --ink: #332b3a;
  --ink-soft: #45384d;
  --muted: #756b7b;
  --faint: #9a8ca3;
  --line: #ded4e5;
  --line-soft: #ece5f0;
  --card: #fff;
  --plum: #79568f;
  --plum-deep: #5c3f72;
  --plum-soft: #f4eef8;
  --chip: #fcfaff;
  --chip-ink: #614d73;
  --shadow: 0 12px 32px #34203e0d;
  --radius: 16px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "WenQuanYi Micro Hei", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--plum-deep); }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #ba86e2; outline-offset: 3px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 40;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e6dfea;
  backdrop-filter: blur(10px);
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.15; }
.brand-en { font-size: 11px; letter-spacing: 0.16em; color: #856398; font-weight: 700; }
.brand-ko { font-size: 20px; font-weight: 700; letter-spacing: -0.04em; }
.header-note { color: var(--muted); font-size: 13px; }

.page { max-width: 1120px; margin: 0 auto; padding: 36px 28px 64px; }
.discovery {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
  min-height: 560px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #856398;
}
.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.18;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.hero h1 em { font-style: normal; color: #76548e; }
.lead { font-size: 20px; line-height: 1.65; letter-spacing: -0.03em; color: var(--ink-soft); }
.desc { margin-top: 14px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.quiz-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 22px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--plum);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.quiz-cta:hover { background: var(--plum-deep); }
.quiz-cta-note { margin-top: 8px; color: var(--muted); font-size: 13px; }
.how { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.how li { display: flex; gap: 14px; align-items: baseline; }
.how span { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.how strong { display: block; font-size: 14px; }
.how p { font-size: 13px; color: var(--muted); }

.chooser {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.chooser-head { padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.chooser-head h2 { margin-top: 6px; font-size: 24px; letter-spacing: -0.03em; }
.chooser-head p, .hint, .muted { color: var(--muted); font-size: 13px; }
.group + .group { margin-top: 22px; }
.group-label, .tag-row strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}
.group-label small, .tag-row strong small { font-weight: 400; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #dfd4e8;
  background: var(--chip);
  color: var(--chip-ink);
  border-radius: 10px;
  min-height: 46px;
  padding: 10px 16px;
  font-size: 14px;
}
.chip[aria-pressed="true"], .chip[aria-checked="true"] {
  background: var(--plum);
  border-color: var(--plum);
  color: #fff;
}
.chip .order {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
}
.advanced { margin-top: 18px; }
.advanced summary { cursor: pointer; color: var(--plum-deep); font-size: 13px; font-weight: 700; }
.advanced-hint { margin: 8px 0 12px; color: var(--faint); font-size: 12px; }
.tag-row { margin-top: 14px; }
.tag-row strong { color: var(--ink); }
.chooser-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
#selection { min-height: 1.4em; color: var(--faint); font-size: 12px; }
.btn, .quiet, .outbound {
  border: 0;
  border-radius: 10px;
  min-height: 48px;
  padding: 12px 16px;
  text-decoration: none;
  text-align: center;
}
.btn-primary, #show-results {
  background: var(--plum);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover, #show-results:hover { background: var(--plum-deep); }
.btn:disabled, #show-results:disabled {
  background: #f0eaf4;
  color: #9b8ca7;
  cursor: default;
}
.btn-ghost, #preview-browse, #reset, .quiet {
  background: transparent;
  color: var(--plum-deep);
  border: 0;
  font-weight: 600;
}
.btn-tertiary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 700;
}
.btn-kakao { background: #fee500; color: #191600; font-weight: 700; }
.btn-kakao:hover { background: #f0d400; }
.btn-x { background: #161616; color: #fff; font-weight: 700; }
.btn-block { display: block; width: 100%; }

.results { margin-top: 28px; }
.results-head, .toolbar, .result-conditions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.results-head { margin-bottom: 8px; }
.results-head h2 { font-size: 28px; letter-spacing: -0.03em; }
.sample-note, .save-note, .result-note { color: var(--muted); font-size: 13px; }
.sample-note { margin: 8px 0 14px; }
.result-conditions { margin: 8px 0 12px; color: #6f5b7a; font-size: 13px; }
.result-conditions button, .toolbar button, #shuffle {
  background: transparent;
  border: 0;
  color: var(--plum-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 0;
}
.toolbar { margin-bottom: 12px; }
.browse-tabs { display: flex; gap: 8px; }
.browse-tabs button {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--chip-ink);
}
.browse-tabs button[aria-pressed="true"] { background: var(--plum); color: #fff; border-color: var(--plum); }
.result-display { display: flex; align-items: center; gap: 8px; color: var(--plum-deep); font-size: 13px; font-weight: 700; }
.result-display select { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.cards, .slots { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: #fff;
  border: 1px solid #e0d9e6;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}
.person { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: hsl(var(--hue, 280) 42% 88%);
  color: hsl(var(--hue, 280) 28% 32%);
  font-weight: 700;
  flex: none;
}
.person h3 { font-size: 18px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.platform, .tagline { color: #6f6178; }
.platform { font-size: 12px; }
.tagline { margin: 14px 0 12px; font-size: 14px; }
.tag-pills, .chips.static { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pills span, .result-page .chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eeebf2;
  color: #75677f;
  font-size: 13px;
  border: 0;
}
.tag-pills .match { background: #e9e0f1; color: #5d4570; font-weight: 700; }
.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.card-actions .quiet {
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}
.card-actions .outbound {
  background: var(--plum);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-actions .outbound:hover { background: var(--plum-deep); }
.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #b4233a;
  background: #fff5f6;
  border: 1px solid #f0c8ce;
  border-radius: 999px;
  padding: 2px 7px;
}
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e11d48; }
.empty-state { color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 16px; padding: 22px; }

.quiz-page .page, .result-page .page { max-width: 680px; }
.quiz-card, .result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px 22px;
}
.progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.progress-track { height: 4px; background: #efe8f4; border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--plum); }
.quiz-card h1, .result-card h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.04em; line-height: 1.25; margin: 8px 0 10px; }
.quiz-card .lead, .one-liner { font-size: 16px; color: var(--ink-soft); }
.quiz-card .hint { margin-bottom: 14px; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.quiz-actions .btn { flex: 1 1 140px; }
.quiz-actions .btn-ghost { flex: 0 0 auto; }
.aside { margin-top: 14px; font-size: 14px; }
.style-row { margin-top: 22px; }
.style-row p { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.loading-line { margin: 8px 0 16px; color: var(--ink-soft); font-size: 16px; }
.skeleton {
  height: 92px;
  border-radius: 14px;
  margin-top: 10px;
  background: linear-gradient(90deg, #f4eef7, #e7deee, #f4eef7);
  background-size: 200% 100%;
  animation: shine 1.2s linear infinite;
}
.skeleton.short { width: 70%; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.og-preview { display: block; width: 100%; border-radius: 18px; margin-bottom: 18px; }
.result-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.25;
  margin: 12px 0 8px;
}
.badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--plum-soft);
  color: var(--plum-deep);
}
.section { margin-top: 22px; }
.section h2 { font-size: 15px; margin-bottom: 8px; }
.blurb { color: var(--muted); margin-bottom: 12px; }
.recommend-slot.is-empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
}
.ctas { display: grid; gap: 10px; margin-top: 22px; }
.save-note { text-align: center; margin-top: 14px; }

dialog {
  border: 0;
  border-radius: 18px;
  padding: 22px;
  width: min(440px, calc(100% - 32px));
  box-shadow: 0 24px 60px #34203e33;
}
dialog::backdrop { background: #2a203366; }
dialog h3 { font-size: 22px; letter-spacing: -0.03em; }
dialog .platform { margin-top: 4px; }
dialog .tagline { margin-top: 12px; color: var(--ink); }
dialog .bio { margin-top: 8px; color: var(--ink-soft); }
.dialog-note { margin-top: 12px; color: var(--muted); font-size: 13px; }
dialog .btn { margin-top: 16px; }

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 28px 36px;
  color: var(--faint);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .discovery { grid-template-columns: 1fr; gap: 28px; min-height: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 680px) {
  .site-header { height: 64px; padding: 0 16px; }
  .header-note, .how, .desc { display: none; }
  .page { padding: 20px 16px 48px; }
  .lead { font-size: 15px; }
  .hero h1 { font-size: 32px; margin: 10px 0 12px; }
  .chooser, .quiz-card, .result-card { padding: 20px 16px; }
  .cards { grid-template-columns: 1fr; }
  .quiz-cta { width: 100%; }
  .results-head h2 { font-size: 22px; }
  .card-actions { grid-template-columns: 1fr 1fr; }
  .card-actions .outbound { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Quiz result artwork: readable badge and a larger desktop card. */
.result-page .page { max-width: 1016px; }
.result-artwork { position: relative; margin-bottom: 18px; }
.result-artwork .og-preview { margin-bottom: 0; }
.result-artwork-label {
  position: absolute; top: 27%; left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 5px 18px; border-radius: 999px;
  background: #e923aa; color: #fff; font-size: clamp(12px, 1.8vw, 18px);
  font-weight: 700; line-height: 1.5;
}
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) {
  .result-artwork-label { padding: 2px 10px; }
}
