:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --faint: #94a3b8;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #00c471;
  --accent-warm: #ff6b57;
  --yellow: #ffe066;
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(215deg, rgba(0, 196, 113, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  word-break: keep-all;
}

button {
  font: inherit;
}

body.menu-open {
  overflow: hidden;
}

.app {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.mobile-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: rgba(248, 250, 252, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.menu-btn {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-content: center;
  gap: 5px;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 900;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.36);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.menu-overlay.open {
  opacity: 1;
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(82vw, 340px);
  max-width: 340px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(239, 246, 255, 0.9), rgba(240, 253, 250, 0.62) 42%, rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--border);
  box-shadow: 18px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(-104%);
  transition: transform 0.24s ease;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 16px;
}

.side-menu-brand {
  min-width: 0;
}

.side-menu-brand p {
  margin: 0;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 900;
}

.side-menu-brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.menu-close-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.menu-list {
  display: grid;
  gap: 9px;
  overflow-y: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.menu-list::-webkit-scrollbar {
  display: none;
}

.menu-item {
  width: 100%;
  min-height: 66px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.menu-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.menu-item.active {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.menu-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(239, 246, 255, 0.92);
  font-size: 1.12rem;
}

.menu-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.menu-text strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: 900;
}

.menu-text small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 700;
}

.menu-item.active .menu-icon {
  background: rgba(37, 99, 235, 0.1);
}

.menu-item.active .menu-text strong {
  color: var(--primary);
}

.menu-item:disabled {
  color: var(--muted);
  cursor: default;
}

.install-cta {
  margin-top: auto;
  padding-top: 12px;
}

.install-card {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 20px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(240, 253, 250, 0.86)),
    var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.install-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.install-card span {
  display: block;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.install-btn {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 72px 14px 34px;
}

.home {
  gap: 18px;
}

.home-hero,
.home-section {
  width: min(960px, 100%);
  margin: 0 auto;
}

.home-hero {
  min-height: min(560px, calc(100vh - 68px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 12px;
}

.brand-mark {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
  transform: rotate(-4deg);
}

.brand-mark span {
  font-size: 1.05rem;
  font-weight: 900;
  transform: rotate(4deg);
}

.fortune-mark {
  width: 68px;
  height: 68px;
  border-radius: 23px;
  background: linear-gradient(135deg, #ff8a65, #f9c74f 50%, #7dd3fc);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.2);
}

.eyebrow,
.result-kicker {
  margin: 16px 0 8px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.05rem, 8vw, 4.5rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.intro-copy {
  width: min(520px, 100%);
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.66;
}

.hero-actions {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.primary-btn {
  border: 0;
  border-radius: 14px;
  padding: 16px 44px;
  color: white;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.hero-primary {
  min-height: 54px;
  background: linear-gradient(135deg, #ff6b57, #f59e0b);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.25);
}

.hero-primary:hover {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.mbti-intro {
  min-height: 100vh;
  padding: 86px 16px 34px;
}

.mbti-intro-shell {
  width: min(560px, 100%);
  margin: 0 auto;
}

.mbti-intro-card {
  padding: 30px 20px 22px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.74)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.mbti-intro-mark {
  width: 78px;
  height: 78px;
  border-radius: 26px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.2);
}

.mbti-intro-card h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.mbti-intro-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.mbti-intro-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 20px;
}

.mbti-intro-meta span {
  min-height: 32px;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.mbti-start-btn {
  width: 100%;
  min-height: 54px;
}

.secondary-ghost-btn {
  min-height: 50px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.home-section {
  padding: 12px 0;
  text-align: left;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading .eyebrow {
  margin-top: 0;
}

.section-heading h2,
.mbti-match-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.28rem, 5vw, 1.88rem);
  line-height: 1.28;
  letter-spacing: 0;
  font-weight: 900;
}

.section-heading p,
.mbti-match-section p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.today-card-section {
  display: grid;
  gap: 18px;
  padding-top: 6px;
}

.today-card-section .eyebrow {
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 900;
}

.today-card-section h2 {
  font-size: clamp(1.72rem, 7vw, 2.65rem);
  line-height: 1.2;
  font-weight: 950;
}

.today-card-section .section-heading p {
  width: min(440px, 100%);
  margin-top: 12px;
  font-size: 0.98rem;
  line-height: 1.62;
}

.daily-card-preview {
  width: 100%;
  min-height: 148px;
  border: 0;
  border-radius: 22px;
  padding: 22px 18px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(150deg, #ff6b57, #f59e0b 52%, #38bdf8);
  box-shadow: 0 24px 54px rgba(245, 158, 11, 0.24);
  cursor: pointer;
}

.daily-card-preview span {
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0.82;
}

.daily-card-preview strong {
  font-size: 1.46rem;
  line-height: 1.25;
  font-weight: 900;
}

.daily-card-preview small {
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0.86;
}

.test-card-grid,
.popular-test-list {
  display: grid;
  gap: 12px;
}

.home-test-card,
.popular-test-card,
.mbti-match-section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.home-test-card {
  width: 100%;
  padding: 17px 16px;
  text-align: left;
  cursor: pointer;
}

.home-test-card span,
.popular-test-card span {
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
}

.home-test-card h3 {
  margin: 7px 0 6px;
  font-size: 1.06rem;
  line-height: 1.35;
}

.home-test-card p {
  display: -webkit-box;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-test-card em {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #eff6ff;
  color: var(--primary);
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 900;
}

.mbti-match-section {
  padding: 22px;
  display: grid;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(236, 253, 245, 0.78)),
    rgba(255, 255, 255, 0.88);
}

.match-placeholder {
  min-height: 82px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.match-placeholder span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.match-placeholder strong {
  color: var(--text);
  font-size: 1rem;
}

.match-placeholder em {
  color: var(--accent-warm);
  font-style: normal;
  font-weight: 900;
}

.match-btn {
  width: 100%;
  min-height: 50px;
}

.popular-test-card {
  width: 100%;
  min-height: 104px;
  padding: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.popular-test-card strong {
  display: block;
  margin: 6px 0;
  font-size: 1.04rem;
  line-height: 1.34;
}

.popular-test-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.primary-btn:active,
.link-btn:active,
.choice:active {
  transform: translateY(1px);
}

.test {
  min-height: 100vh;
  padding: 88px 16px 44px;
}

.progress {
  position: fixed;
  inset: 60px 0 auto 0;
  height: 5px;
  background: rgba(37, 99, 235, 0.13);
  z-index: 5;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s ease;
}

.question-pages {
  width: min(760px, 100%);
  margin: 0 auto;
}

.page {
  display: grid;
  gap: 16px;
}

.question-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.q-number {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.question-card h2 {
  margin: 0 0 22px;
  font-size: 1.16rem;
  line-height: 1.62;
  letter-spacing: 0;
}

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

.choice {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  line-height: 1.55;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.choice:hover,
.choice.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.choice.selected {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.result {
  min-height: 100vh;
  padding: 60px 16px 36px;
}

.result-header {
  position: sticky;
  top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin: 0 -16px 28px;
  padding: 16px 20px;
  background: rgba(248, 250, 252, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.result-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.result-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 22px 0 30px;
  text-align: center;
}

.result-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.nickname {
  margin: 4px 0 0;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  color: var(--text);
  font-weight: 900;
  line-height: 1.25;
}

.mbti-seal {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.42rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.2);
}

.axis-bars {
  display: grid;
  gap: 12px;
  text-align: left;
  margin: 0 0 16px;
}

.analysis-card {
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.analysis-card h3 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1.02rem;
  line-height: 1.35;
}

.analysis-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.72;
}

.mbti-result-hero {
  margin-bottom: 16px;
  padding: 26px 20px 22px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(240, 253, 250, 0.78)),
    var(--surface);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
}

.mbti-code {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 11vw, 3.4rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.mbti-short-summary {
  margin: 14px auto 20px;
  max-width: 420px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

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

.compact-btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 14px;
  font-size: 0.96rem;
}

.result-action-row .secondary-btn,
.result-bottom-actions .secondary-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.overview-list,
.match-result-groups {
  display: grid;
  gap: 12px;
}

.overview-list div,
.match-result-groups div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.overview-list span,
.match-result-groups span {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.overview-list p,
.match-result-groups p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--text);
  font-weight: 800;
}

.mini-chip,
.match-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.mbti-analysis-card.collapsed #analysisText {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.analysis-toggle {
  margin-top: 12px;
  padding: 0;
}

.axis {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.axis-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.axis-head strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
}

.axis-head span,
.axis-lean {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.axis-lean {
  margin: 0 0 10px;
  line-height: 1.5;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.axis-track {
  height: 18px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.axis-a {
  background: var(--primary);
}

.axis-b {
  background: var(--accent-warm);
}

.axis-intensity {
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.78rem;
}

.saved-at {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 0.8rem;
}

.mbti-match-card .primary-btn {
  width: 100%;
  margin-top: 14px;
}

.result-bottom-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.result-bottom-actions .primary-btn,
.result-bottom-actions .secondary-btn {
  width: 100%;
  min-height: 52px;
  margin: 0;
}

.fortune {
  min-height: 100vh;
  padding: 92px 16px 36px;
}

.fortune-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  text-align: center;
}

.fortune-shell h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.fortune-copy {
  margin: 16px auto 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.fortune-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 28px;
}

.fortune-card {
  width: 100%;
  min-height: 148px;
  border: 0;
  border-radius: 20px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(150deg, var(--primary), #14b8a6 56%, var(--accent));
  box-shadow: 0 24px 56px rgba(37, 99, 235, 0.24);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.fortune-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 64px rgba(37, 99, 235, 0.28);
}

.fortune-card.drawn {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(150deg, #0f172a, var(--primary) 52%, var(--accent-warm));
  transform: translateY(-3px);
}

.fortune-card.dimmed {
  opacity: 0.42;
  box-shadow: none;
  cursor: default;
}

.fortune-card-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.78;
}

.fortune-card strong {
  font-size: 1.32rem;
  line-height: 1.2;
}

.fortune-card span:last-child {
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0.86;
}

.fortune-result {
  display: grid;
  gap: 16px;
  text-align: left;
}

.fortune-share-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(145deg, rgba(255, 246, 238, 0.96), rgba(239, 246, 255, 0.9) 54%, rgba(236, 253, 245, 0.9)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.11);
}

.fortune-result-head {
  text-align: center;
}

.fortune-result-head p {
  margin: 0 0 8px;
  color: var(--accent-warm);
  font-size: 0.82rem;
  font-weight: 900;
}

.fortune-result-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.32rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.fortune-message,
.fortune-detail,
.lucky-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.fortune-message {
  padding: 26px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
}

.fortune-message p,
.lucky-item span {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.fortune-message strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.48;
  letter-spacing: 0;
}

.fortune-detail-grid {
  display: grid;
  gap: 14px;
}

.fortune-detail {
  padding: 20px;
}

.fortune-detail h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fortune-detail h2 span {
  color: var(--accent-warm);
  font-size: 0.88rem;
  white-space: nowrap;
}

.fortune-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

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

.lucky-item {
  padding: 16px;
}

.lucky-item strong {
  display: block;
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.35;
}

.fortune-advice {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  line-height: 1.72;
  text-align: center;
}

.life-path {
  min-height: 100vh;
  padding: 92px 16px 36px;
}

.life-path-shell {
  width: min(640px, 100%);
  margin: 0 auto;
}

.life-path-header {
  text-align: center;
  margin-bottom: 24px;
}

.life-path-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.life-path-header p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.life-path-input-card,
.life-path-result,
.life-path-section-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.life-path-input-card {
  padding: 22px 20px;
}

.life-path-input-card h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.35;
}

.life-path-input-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.68;
}

.life-path-date-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.life-path-date-group legend {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.life-path-date-fields {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 8px;
}

.life-path-date-fields label {
  display: grid;
  gap: 6px;
}

.life-path-date-fields span {
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 900;
}

.life-path-select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 10px;
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.life-path-error {
  min-height: 22px;
  margin: 8px 0 12px;
  color: var(--accent-warm);
  font-size: 0.88rem;
  font-weight: 800;
}

.life-path-input-card .primary-btn {
  width: 100%;
  min-height: 52px;
}

.life-path-input-card small {
  display: block;
  margin-top: 14px;
  color: var(--faint);
  line-height: 1.55;
  text-align: center;
}

.life-path-result {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 24px 20px;
  text-align: center;
}

.life-path-number {
  width: 118px;
  height: 118px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.22);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
}

.life-path-result h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.62rem;
  line-height: 1.3;
}

.life-path-result > strong {
  display: block;
  color: var(--accent-warm);
  line-height: 1.6;
}

.life-path-section-card {
  padding: 18px;
  text-align: left;
}

.life-path-section-card h3 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 1rem;
}

.life-path-section-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.life-path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.life-path-tags span {
  border-radius: 999px;
  padding: 8px 12px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 900;
}

.life-path-advice {
  text-align: left;
}

.life-path-share-text {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.82);
  color: var(--text);
  font-weight: 900;
  line-height: 1.55;
}

.life-path-actions {
  display: grid;
  gap: 10px;
}

.life-path-actions .primary-btn,
.life-path-actions .secondary-ghost-btn {
  width: 100%;
  min-height: 50px;
}

.result-action-row {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 0 2px;
}

.result-action-row p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: center;
}

.result-action-row .primary-btn,
.result-action-row .secondary-ghost-btn {
  width: 100%;
  min-height: 50px;
}

.result-action-row .link-btn {
  min-height: 42px;
}

.psychology {
  min-height: 100vh;
  padding: 92px 16px 36px;
}

.psychology-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  text-align: center;
}

.psychology-shell h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.95rem, 7vw, 3.1rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.psychology-copy {
  margin: 16px auto 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.psychology-list-header {
  width: min(620px, 100%);
  margin: 0 auto 24px;
}

.psychology-featured-section,
.psychology-all-section {
  text-align: left;
}

.psychology-featured-section {
  margin-bottom: 22px;
}

.psychology-featured-section h2,
.psychology-section-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.35;
}

.psychology-featured-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.psychology-featured-list .psychology-test-card {
  padding: 16px 18px;
}

.psychology-category-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -16px 22px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.psychology-category-tabs::-webkit-scrollbar {
  display: none;
}

.psychology-tab {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.psychology-tab.active {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: var(--primary);
}

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

.psychology-section-title span {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 900;
}

.psychology-test-list {
  display: grid;
  gap: 10px;
}

.psychology-test-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 17px 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.psychology-test-card span,
.back-btn {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.psychology-test-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 900;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  margin: 0 0 14px;
  padding: 0 12px;
  background: #eff6ff;
  cursor: pointer;
}

.psychology-options {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.psychology-choice {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font-weight: 900;
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.psychology-choice:hover,
.psychology-choice.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.psychology-choice.selected {
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.psychology-result {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.psychology-result p:first-child {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.psychology-result h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1.28;
}

.psychology-result strong {
  display: block;
  margin-bottom: 14px;
  color: var(--accent-warm);
  font-size: 0.92rem;
  line-height: 1.5;
}

.psychology-result p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.psychology-extra {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.psychology-extra h3 {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 1.02rem;
}

.psychology-extra h3:first-child {
  margin-top: 0;
}

.psychology-extra p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.island-order {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: island;
}

.island-order li {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 800;
  text-align: left;
}

.island-order li::before {
  counter-increment: island;
  content: counter(island) "순위";
  min-width: 46px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.island-order li.filled {
  color: var(--text);
  background: #eff6ff;
}

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

.island-item {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.island-item:disabled {
  color: var(--faint);
  background: var(--surface-soft);
  box-shadow: none;
  cursor: default;
}

.secondary-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  margin: 0 0 18px;
  background: var(--text);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.rank-meaning,
.first-meaning,
.flow-meaning,
.last-meaning,
.summary-meaning {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.rank-meaning h3,
.first-meaning h3,
.flow-meaning h3,
.last-meaning h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.08rem;
}

.rank-meaning,
.flow-meaning {
  display: grid;
  gap: 10px;
}

.first-meaning strong,
.last-meaning strong {
  margin-bottom: 10px;
}

.rank-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.8);
}

.rank-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
}

.rank-card strong {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.02rem;
}

.rank-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.first-meaning p,
.flow-meaning p,
.last-meaning p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.summary-meaning h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.08rem;
}

.summary-meaning p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.advice-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
}

.advice-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.advice-card strong {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

@media (min-width: 760px) {
  .intro {
    padding-inline: 28px;
  }

  .home-hero {
    min-height: 540px;
  }

  .today-card-section {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    align-items: center;
  }

  .recommended-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mbti-match-section {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
    align-items: center;
  }

  .match-btn {
    grid-column: 1 / -1;
    width: fit-content;
    min-width: 220px;
  }

  .popular-test-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .psychology-featured-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .psychology-test-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fortune-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lucky-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .intro {
    align-items: center;
    text-align: center;
  }

  .home-section,
  .mbti-match-section {
    text-align: left;
  }

  .brand-mark {
    width: 78px;
    height: 78px;
    border-radius: 24px;
  }

  .primary-btn {
    width: 100%;
  }

  .question-card {
    padding: 20px;
  }

  .choice {
    padding: 15px;
  }
}
