:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(17, 17, 17, 0.06);
  --line-strong: rgba(17, 17, 17, 0.12);
  --text: #111111;
  --muted: #6e6e73;
  --point: #0071e3;
  --point-soft: rgba(0, 113, 227, 0.1);
  --success: #34a853;
  --hero-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.62));
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.98), transparent 30%),
    radial-gradient(circle at bottom right, rgba(0, 113, 227, 0.045), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, var(--bg-soft) 100%),
    var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Pretendard", sans-serif;
  line-height: 1.5;
  letter-spacing: -0.022em;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(24px) saturate(180%);
  background: rgba(245, 245, 247, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
}

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

.brand__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand__copy {
  display: grid;
}

.brand__copy strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand__copy span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.top-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.top-nav__link {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 600;
}

.top-nav__link.is-active {
  background: rgba(17, 17, 17, 0.92);
  color: #fff;
  border-color: rgba(17, 17, 17, 0.92);
}

.header-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.button--primary {
  background: var(--point);
  color: #fff;
}

.button--secondary {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.36);
  color: var(--text);
  border-color: var(--line);
}

.profile-pill {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.profile-pill__points {
  color: var(--point);
}

#app {
  padding: 24px 0 56px;
}

.page-shell {
  display: grid;
  gap: 20px;
}

.hero,
.panel,
.test-card,
.category-card,
.question-card,
.result-card,
.empty-state,
.progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(150%);
}

.hero {
  padding: 56px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.64fr);
  gap: 28px;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.82), transparent 34%),
    var(--hero-fill);
}

.hero__copy h1 {
  margin: 14px 0;
  max-width: 8ch;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.095em;
}

.hero__copy p,
.section-head p,
.test-card p,
.question-card__meta,
.result-card p,
.empty-state p {
  color: var(--muted);
}

.hero__copy p {
  max-width: 34rem;
  font-size: 1.05rem;
}

.hero__actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero__meta {
  display: grid;
  gap: 12px;
}

.metric {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.panel {
  padding: 18px;
}

.search-box {
  width: 100%;
  min-height: 60px;
  padding: 0 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.chip,
.badge {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge {
  background: var(--point-soft);
  color: var(--point);
}

.chip {
  background: rgba(17, 17, 17, 0.04);
  color: var(--text);
  border: 1px solid rgba(17, 17, 17, 0.04);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.section-head p {
  margin: 10px 0 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.test-grid,
.category-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.test-card,
.category-card {
  padding: 24px;
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.test-card:hover,
.category-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.06);
}

.test-card__top,
.test-card__bottom,
.category-card__top,
.category-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.test-card h3,
.category-card h3,
.question-card h2,
.result-card h1 {
  margin: 16px 0 10px;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.test-card__bottom,
.category-card__bottom {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.like-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--point);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.test-flow {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.progress-card {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.progress-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 850;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 24, 18, 0.08);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--point), var(--success));
}

.question-card,
.result-card {
  padding: 32px;
}

.answer-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.answer-button {
  width: 100%;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.answer-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.answer-button__index {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--point-soft);
  color: var(--point);
  font-size: 0.82rem;
  font-weight: 900;
}

.result-card {
  overflow: hidden;
}

.result-card__hero {
  padding: 44px 36px;
  margin: -32px -32px 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--result-color, var(--point)) 68%, white 32%), #111214);
  color: #fff;
}

.result-card__hero p {
  color: rgba(255, 255, 255, 0.88);
}

.result-grid {
  margin-top: 20px;
}

.story-capture {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1080px;
  padding: 80px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--result-color, var(--point)) 70%, white 30%), #16181b);
  color: #fff;
}

.story-capture span,
.story-capture strong,
.story-capture p {
  display: block;
}

.story-capture span {
  font-size: 30px;
  font-weight: 800;
  opacity: 0.82;
}

.story-capture strong {
  margin: 24px 0 18px;
  font-size: 86px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.story-capture p {
  font-size: 34px;
  line-height: 1.45;
  opacity: 0.92;
}

.empty-state {
  padding: 54px 28px;
  text-align: center;
}

.loading-dot {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--point), var(--success));
  animation: pulse 1s ease-in-out infinite alternate;
}

.site-footer {
  padding: 0 0 30px;
}

.site-footer__inner {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-stats {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes pulse {
  from {
    transform: scale(0.9);
    opacity: 0.7;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 42px 24px;
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .site-footer__inner,
  .page-shell {
    width: min(100% - 24px, 1120px);
  }

  #app {
    padding: 16px 0 40px;
  }

  .brand__copy span {
    letter-spacing: 0.1em;
  }

  .top-nav {
    gap: 8px;
  }

  .top-nav__link {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .hero,
  .question-card,
  .result-card,
  .panel {
    padding: 18px;
  }

  .hero__copy h1 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }

  .hero__actions .button,
  .result-actions .button {
    width: 100%;
  }

  .result-card__hero {
    margin: -18px -18px 0;
    padding: 28px 22px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}
