:root {
  color-scheme: dark;
  --bg: #07061a;
  --bg-2: #120a2e;
  --bg-3: #1c0f3a;
  --surface: rgba(20, 13, 46, 0.62);
  --surface-strong: rgba(16, 10, 38, 0.82);
  --line: rgba(230, 192, 104, 0.22);
  --line-strong: rgba(230, 192, 104, 0.5);
  --text: #f4ecdc;
  --muted: rgba(244, 236, 220, 0.72);
  --soft: rgba(244, 236, 220, 0.5);
  --gold: #e6c068;
  --gold-bright: #f6d98a;
  --gold-deep: #b8923f;
  --violet: #b69cff;
  --teal: #7ce0d0;
  --coral: #ff8da3;
  --green: #9ad9a0;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  --serif: "Cormorant Garamond", "Gowun Batang", serif;
  --serif-ko: "Gowun Batang", "Cormorant Garamond", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 18% -8%, rgba(120, 80, 220, 0.34), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(230, 192, 104, 0.14), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(60, 30, 140, 0.4), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%, #050414);
  color: var(--text);
  font-family:
    Pretendard,
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

/* 별가루 배경 */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 28% 68%, rgba(255, 244, 214, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 47% 14%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.1px 1.1px at 63% 52%, rgba(214, 226, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 78% 30%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.2px 1.2px at 88% 76%, rgba(255, 240, 200, 0.8), transparent),
    radial-gradient(1.3px 1.3px at 36% 88%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.1px 1.1px at 7% 84%, rgba(255, 255, 255, 0.7), transparent);
  opacity: 0.5;
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.32; }
  to { opacity: 0.6; }
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 0 72px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 14px;
  margin: 0 -14px;
  border-bottom: 1px solid rgba(230, 192, 104, 0.14);
  background: linear-gradient(180deg, rgba(7, 6, 26, 0.82), rgba(7, 6, 26, 0.35));
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(230, 192, 104, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(246, 217, 138, 0.95), rgba(184, 146, 63, 0.5) 60%, transparent 72%),
    conic-gradient(from 220deg, #ff6b7a, #ffd166, #7ce0d0, #b69cff, #ff6b7a);
  box-shadow: 0 0 26px rgba(230, 192, 104, 0.45);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff6dd, #f6d98a 55%, #b8923f);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.brand small {
  color: var(--soft);
  font-size: 0.7rem;
  margin-top: 3px;
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.primary-button,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(230, 192, 104, 0.08);
}

.icon-button svg,
.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 0 22px rgba(230, 192, 104, 0.22);
}

/* 인트로 */
.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  min-height: clamp(380px, 58vh, 560px);
  padding: 56px 0 30px;
}

.intro-copy {
  max-width: 780px;
}

.eyebrow,
.panel-label,
.result-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-family: var(--serif-ko);
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  word-break: keep-all;
  background: linear-gradient(180deg, #fff7e6 10%, var(--gold-bright) 70%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-lead {
  max-width: 640px;
  margin-bottom: 0;
  color: rgba(244, 236, 220, 0.82);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.85;
  word-break: keep-all;
}

.selection-panel {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(40, 26, 80, 0.5), rgba(16, 10, 38, 0.7)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.panel-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.selection-panel strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold-bright);
}

.selected-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 62px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-chip {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--soft);
  font-size: 0.78rem;
  text-align: center;
  word-break: keep-all;
}

.preview-chip.is-filled {
  border-style: solid;
  border-color: rgba(230, 192, 104, 0.5);
  color: #fff;
  background: linear-gradient(135deg, var(--chip-a), var(--chip-b));
  box-shadow: 0 0 26px color-mix(in srgb, var(--chip-a), transparent 62%);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

.panel-hint {
  margin: 0;
  color: var(--soft);
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: keep-all;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.primary-button {
  border-color: rgba(246, 217, 138, 0.7);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #2b1c05;
  box-shadow: 0 12px 30px rgba(184, 146, 63, 0.35);
}

.primary-button:hover {
  box-shadow: 0 0 30px rgba(246, 217, 138, 0.5);
}

.secondary-button {
  background: rgba(230, 192, 104, 0.08);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
  box-shadow: none;
}

/* 섹션 헤더 */
.cards-section,
.result-section {
  padding-top: 40px;
}

.section-heading,
.result-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2,
.result-topline h2 {
  margin-bottom: 0;
  font-family: var(--serif-ko);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0;
  word-break: keep-all;
}

.section-heading::after {
  content: "✦";
  color: var(--gold);
  opacity: 0.55;
  font-size: 1rem;
  margin-bottom: 6px;
}

/* 카드 그리드 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tarot-card {
  position: relative;
  display: grid;
  align-content: space-between;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 4.2;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(230, 192, 104, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(155deg, var(--card-a), var(--card-b) 54%, var(--card-c)),
    #15102a;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    filter 200ms ease;
}

/* 카드 안쪽 금박 테두리 + 별 무늬 */
.tarot-card::before {
  position: absolute;
  inset: 6px;
  z-index: 1;
  content: "";
  border: 1px solid rgba(255, 246, 221, 0.45);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.5), transparent 22%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.32), transparent 30% 64%, rgba(255, 255, 255, 0.14));
  mix-blend-mode: soft-light;
  opacity: 0.9;
  pointer-events: none;
}

.tarot-card::after {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 1;
  content: "✦";
  transform: translateX(-50%);
  color: rgba(255, 250, 235, 0.78);
  font-size: 0.7rem;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.tarot-card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  border-color: rgba(246, 217, 138, 0.7);
  filter: saturate(1.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(230, 192, 104, 0.25);
}

.tarot-card.is-selected {
  border-color: var(--gold-bright);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(246, 217, 138, 0.5),
    0 0 40px color-mix(in srgb, var(--card-a), transparent 40%);
  transform: translateY(-4px);
}

.tarot-card:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.recommend-item:focus-visible {
  outline: 3px solid rgba(246, 217, 138, 0.8);
  outline-offset: 3px;
}

.card-index,
.selection-order {
  position: relative;
  z-index: 2;
  width: fit-content;
  min-width: 30px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 246, 221, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 250, 235, 0.85);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.selection-order {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #2b1c05;
}

.tarot-card.is-selected .selection-order {
  display: inline-flex;
}

.card-foot {
  position: relative;
  z-index: 2;
}

.card-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.8vw, 1.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  word-break: keep-all;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.card-title-ko {
  display: block;
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 250, 235, 0.82);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  word-break: keep-all;
}

/* 결과 */
.result-section {
  margin-top: 48px;
  scroll-margin-top: 86px;
}

.group-badge {
  align-self: center;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(230, 192, 104, 0.12);
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(230, 192, 104, 0.18);
}

.result-hero,
.result-block,
.combo-section,
.timeline-section,
.score-section,
.insight-section,
.analysis-section,
.recommend-section,
.affirm-card,
.caution-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(40, 26, 80, 0.35), rgba(16, 10, 38, 0.62)),
    var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border-color: var(--line-strong);
}

.core-reading {
  margin-bottom: 0;
  font-family: var(--serif-ko);
  font-size: clamp(1.4rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  word-break: keep-all;
  color: #fdf6e6;
}

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

.result-mini-card {
  display: grid;
  align-content: end;
  min-height: 172px;
  padding: 12px;
  border: 1px solid rgba(255, 246, 221, 0.32);
  border-radius: 12px;
  background: linear-gradient(155deg, var(--card-a), var(--card-b) 55%, var(--card-c));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.result-mini-card span {
  margin-bottom: 6px;
  color: rgba(255, 250, 235, 0.82);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.result-mini-card strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.1;
  word-break: keep-all;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.result-mini-card small {
  margin-top: 2px;
  font-size: 0.66rem;
  color: rgba(255, 250, 235, 0.78);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

/* 블록 라벨 (아이콘 + 제목) */
.block-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.block-label > i {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(230, 192, 104, 0.1);
  color: var(--gold);
}

.block-label > i svg {
  width: 18px;
  height: 18px;
}

.block-label h3 {
  margin-bottom: 0;
  font-family: var(--serif-ko);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* 조합 해석 */
.combo-section {
  margin-top: 14px;
  padding: 26px;
}

.combo-reading {
  margin: 0;
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  line-height: 1.85;
  color: rgba(244, 236, 220, 0.88);
  word-break: keep-all;
}

/* 타임라인 */
.timeline-section {
  margin-top: 14px;
  padding: 26px;
}

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

.timeline-step {
  position: relative;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(230, 192, 104, 0.05);
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%) rotate(45deg);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--bg-3);
}

.timeline-list .timeline-step:last-child::before {
  display: none;
}

.timeline-phase {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(230, 192, 104, 0.16);
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.timeline-step strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fdf6e6;
}

.timeline-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  word-break: keep-all;
}

/* 광고 */
.ad-slot {
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  text-align: center;
}

.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
}

.ad-slot-mid {
  max-width: 728px;
}

/* 점수 */
.score-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 14px 0;
  padding: 26px;
}

.score-head h3 {
  margin-bottom: 10px;
  font-family: var(--serif-ko);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

.score-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  word-break: keep-all;
}

.score-list {
  display: grid;
  gap: 16px;
}

.score-item {
  display: grid;
  gap: 8px;
}

.score-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.score-item strong {
  font-size: 0.95rem;
}

.score-item span {
  color: var(--gold-bright);
  font-size: 0.92rem;
  font-weight: 800;
}

.score-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(230, 192, 104, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.score-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--gold-bright), var(--coral));
  box-shadow: 0 0 22px rgba(246, 217, 138, 0.4);
}

/* 01·02·03 블록 */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.result-block {
  padding: 24px;
}

.result-number {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.result-block h3 {
  margin-bottom: 12px;
  font-family: var(--serif-ko);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0;
}

.result-block p {
  margin-bottom: 0;
  color: rgba(244, 236, 220, 0.82);
  line-height: 1.85;
  word-break: keep-all;
}

/* 인사이트/분석/추천 공통 */
.insight-section,
.analysis-section,
.recommend-section {
  margin-top: 14px;
  padding: 26px;
}

.chip-list,
.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.action-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(230, 192, 104, 0.07);
  color: var(--text);
}

.chip {
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
}

.action-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
}

.action-item svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.analysis-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.analysis-card {
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(230, 192, 104, 0.05);
}

.analysis-card svg {
  width: 19px;
  height: 19px;
  margin-bottom: 12px;
  color: var(--gold);
}

.analysis-card h4 {
  margin: 0 0 8px;
  font-family: var(--serif-ko);
  font-size: 1rem;
  font-weight: 700;
}

.analysis-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
  word-break: keep-all;
}

/* 확언 / 주의 신호 듀오 */
.duo-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.affirm-card,
.caution-card {
  padding: 26px;
}

.affirm-card {
  border-color: rgba(246, 217, 138, 0.4);
  background: linear-gradient(180deg, rgba(230, 192, 104, 0.14), rgba(16, 10, 38, 0.6));
}

.affirm-card > i,
.caution-card > i {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 14px;
}

.affirm-card > i {
  color: var(--gold-bright);
}

.caution-card > i {
  color: var(--coral);
}

.affirm-card > i svg,
.caution-card > i svg {
  width: 24px;
  height: 24px;
}

.affirm-text {
  margin: 0;
  font-family: var(--serif-ko);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.6;
  color: #fdf6e6;
  word-break: keep-all;
}

.caution-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.8;
  color: rgba(244, 236, 220, 0.85);
  word-break: keep-all;
}

/* 추천 */
.recommend-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.recommend-item {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(230, 192, 104, 0.05);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.recommend-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(230, 192, 104, 0.1);
  box-shadow: 0 0 24px rgba(230, 192, 104, 0.18);
}

.recommend-item strong {
  font-family: var(--serif-ko);
  font-size: 1.02rem;
  font-weight: 700;
}

.recommend-item span {
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.6;
  word-break: keep-all;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* 토스트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(16, 10, 38, 0.96);
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

/* 반응형 */
@media (max-width: 980px) {
  .intro-section,
  .result-hero,
  .score-section {
    grid-template-columns: 1fr;
  }

  .intro-section {
    align-items: start;
    min-height: auto;
    padding-top: 40px;
  }

  .selection-panel {
    max-width: none;
  }

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

  .result-grid,
  .timeline-list {
    grid-template-columns: 1fr;
  }

  .timeline-step::before {
    top: auto;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%) rotate(135deg);
  }

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

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 22px);
    padding-bottom: 48px;
  }

  .site-header {
    min-height: 58px;
  }

  .brand small {
    display: none;
  }

  .intro-section {
    gap: 20px;
    padding: 28px 0 18px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .intro-lead {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .section-heading,
  .result-topline {
    display: block;
  }

  .result-topline .group-badge {
    margin-top: 12px;
    display: inline-block;
  }

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

  .result-cards,
  .analysis-list,
  .recommend-list,
  .duo-section {
    grid-template-columns: 1fr;
  }

  .result-mini-card {
    min-height: 112px;
  }

  .block-label > i {
    width: 34px;
    height: 34px;
  }


  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ===== 선택 패널: 데스크탑에서 오른쪽 세로중앙 스티키 ===== */
@media (min-width: 981px) {
  main {
    padding-right: 360px;
  }
  .intro-section {
    grid-template-columns: 1fr;
  }
  .selection-panel {
    position: fixed;
    top: 50%;
    right: max(16px, calc((100vw - 1180px) / 2 + 16px));
    transform: translateY(-50%);
    width: 320px;
    max-height: 88vh;
    overflow: auto;
    z-index: 50;
  }
  main:has(#resultSection:not([hidden])) {
    padding-right: 0;
  }
  main:has(#resultSection:not([hidden])) .selection-panel {
    display: none;
  }
}
