:root {
  color-scheme: light;
  --ink: #111111;
  --body: #47424f;
  --muted: #8c8c8c;
  --paper: #ffffff;
  --surface: #ffffff;
  --soft: #f5f1ff;
  --line: #e7e0fa;
  --accent: #7c48ff;
  --accent-strong: #6232da;
  --accent-deep: #3c3083;
  --lavender: #eae4fd;
  --green: #246b56;
  --coral: #7c48ff;
  --gold: #9d78ff;
  --shadow: 0 14px 36px rgba(58, 35, 128, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  /* 스크롤바 공간을 항상 예약해 페이지 이동 시 가로 덜컹거림(layout shift) 방지 */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(124, 72, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 72, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 72%);
}

a {
  color: inherit;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* 로고 이미지·텍스트는 아래 font-size 하나로 함께 스케일된다 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 1.728em;
  height: 1.728em;
  display: block;
  border: 0;
  border-radius: 8px;
  background: transparent;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
}

.hero-band {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  align-items: center;
  gap: 48px;
  padding: 34px 0 56px;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
}

h1 {
  max-width: 680px;
  font-size: 56px;
  font-weight: 700;
}

h2 {
  font-size: 32px;
  font-weight: 820;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

p {
  margin: 0;
  color: var(--body);
  font-size: 17px;
}

.hero-copy > p:not(.eyebrow),
.page-intro > p:not(.eyebrow),
.wide-text {
  max-width: 760px;
  margin-top: 18px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(39, 31, 22, 0.14);
}

.button.primary {
  background: var(--accent);
  color: var(--paper);
}

.button.secondary {
  background: var(--surface);
  color: var(--accent);
}

.button:disabled {
  border-color: var(--line);
  background: #e7e2da;
  color: var(--muted);
}

.hero-visual {
  min-height: 560px;
  display: grid;
  place-items: center;
}

.deck-preview {
  width: min(100%, 540px);
  min-height: 510px;
  position: relative;
}

.preview-card {
  position: absolute;
  width: 34%;
  aspect-ratio: 500 / 862;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.preview-card:nth-child(1) {
  left: 5%;
  top: 16%;
  transform: rotate(-12deg);
}

.preview-card:nth-child(2) {
  left: 31%;
  top: 3%;
  z-index: 2;
  transform: rotate(4deg);
}

.preview-card:nth-child(3) {
  right: 5%;
  top: 18%;
  transform: rotate(13deg);
}

.preview-card:nth-child(4) {
  left: 18%;
  bottom: 4%;
  z-index: 3;
  transform: rotate(-3deg);
}

.preview-card:nth-child(5) {
  right: 17%;
  bottom: 0;
  z-index: 4;
  transform: rotate(7deg);
}

.content-band,
.page-intro,
.reading-layout,
.result-root,
.dictionary-tools,
.card-dictionary,
.dictionary-methodology,
.deck-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-intro {
  padding: 54px 0 30px;
}

.content-band {
  padding: 72px 0;
}

.content-band.compact {
  padding: 48px 0 64px;
}

.content-band.muted {
  width: 100%;
  background: #f0eadf;
}

.content-band.muted > .section-heading,
.content-band.muted > .spread-list,
.content-band.muted > .wide-text {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.content-band.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 36px;
  align-items: start;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.info-grid,
.spread-list,
.app-feature-list,
.question-suggestions {
  display: grid;
  gap: 14px;
}

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

.info-card,
.spread-card,
.deck-card,
.dictionary-card,
.result-card,
.empty-state,
.control-panel,
.draw-surface,
.spread-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(39, 31, 22, 0.06);
}

.info-card,
.spread-card {
  padding: 22px;
}

.info-card p,
.spread-card p,
.deck-card p,
.dictionary-card p,
.result-card p,
.empty-state p {
  margin-top: 10px;
  font-size: 15px;
}

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

.spread-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.spread-positions span,
.tag,
.app-feature-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--body);
  font-size: 13px;
  font-weight: 700;
}

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

.app-feature-list span {
  min-height: 42px;
  justify-content: center;
  border-radius: 8px;
  background: #eef3ec;
  color: #244b3a;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 24px;
}

.control-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
textarea,
input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

select,
input[type="search"] {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 112px;
  padding: 12px;
}

.spread-box {
  padding: 16px;
  background: #f7f3ec;
}

.spread-box strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

.spread-box p {
  margin-top: 8px;
  font-size: 14px;
}

.draw-surface {
  min-height: 620px;
  padding: 20px;
  overflow: hidden;
}

.draw-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--body);
  font-size: 14px;
  font-weight: 700;
}

.card-fan {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 13px 10px;
  align-items: start;
}

.draw-card {
  position: relative;
  width: 100%;
  max-width: 118px;
  aspect-ratio: 500 / 862;
  justify-self: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  transform: translateY(var(--lift, 0)) rotate(var(--angle, 0deg));
  transition: transform 220ms ease, filter 220ms ease;
}

.draw-card:hover:not(:disabled) {
  --lift: -8px;
  filter: brightness(1.04);
}

.draw-card.is-selected {
  --lift: -26px;
  z-index: 3;
}

.draw-card img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(39, 31, 22, 0.18);
  object-fit: cover;
}

.selection-order {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 850;
}

.draw-card.is-selected .selection-order {
  display: grid;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 54px;
}

.deck-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.deck-card.is-selected {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(37, 111, 90, 0.16);
}

.deck-card-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.deck-card-visual img {
  aspect-ratio: 500 / 862;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  object-fit: cover;
}

.deck-card-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.deck-card-body h2 {
  font-size: 22px;
}

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

.deck-actions .button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.dictionary-tools {
  padding-bottom: 18px;
}

.search-field {
  max-width: 480px;
}

.dictionary-methodology {
  margin: 0 auto 64px;
  color: var(--muted);
  font-size: 13px;
}

.dictionary-methodology summary {
  width: fit-content;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.dictionary-methodology div {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.dictionary-methodology ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.dictionary-methodology a {
  color: inherit;
  text-underline-offset: 2px;
}

.card-dictionary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 64px;
}

.dictionary-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  background: #eae4fd;
}

.dictionary-card img,
.result-card img {
  width: 100%;
  aspect-ratio: 500 / 862;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  object-fit: cover;
}

.dictionary-body {
  min-width: 0;
}

.dictionary-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.dictionary-title h2 {
  color: #361d75;
  font-size: 22px;
  font-weight: 700;
}

.dictionary-title span {
  color: rgba(54, 29, 117, 0.4);
  font-size: 14px;
  font-weight: 700;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.dictionary-summary {
  font-weight: 800;
}

.orientation-block {
  margin-top: 12px;
}

.orientation-block strong {
  display: block;
  color: var(--accent-strong);
  font-size: 15px;
}

.orientation-block.reversed strong {
  color: var(--coral);
}

.orientation-block p {
  margin-top: 4px;
  font-size: 14px;
}

.dictionary-card .tag {
  color: rgba(54, 29, 117, 0.85);
}

.dictionary-card .orientation-block p {
  color: rgba(54, 29, 117, 0.85);
  letter-spacing: -0.5px;
}

.result-root {
  display: grid;
  gap: 18px;
  padding-bottom: 28px;
}

.result-summary,
.result-cards {
  display: grid;
  gap: 18px;
}

.result-summary {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
}

.result-summary-question-only {
  grid-template-columns: 1fr;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 22px;
}

.summary-box p {
  margin-top: 10px;
}

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

.result-cards-1 {
  grid-template-columns: minmax(0, 360px);
}

.result-card {
  padding: 16px;
}

.result-card img.is-reversed {
  transform: rotate(180deg);
}

.result-card h2 {
  margin-top: 14px;
  font-size: 22px;
}

.is-one-card-result .page-intro {
  width: min(720px, calc(100% - 32px));
  padding-bottom: 18px;
  text-align: center;
}

.is-one-card-result .result-root {
  width: min(720px, calc(100% - 32px));
  justify-items: center;
  gap: 24px;
}

.is-one-card-result .result-summary,
.is-one-card-result .result-cards-1 {
  width: 100%;
}

.is-one-card-result .summary-box {
  text-align: center;
}

.is-one-card-result .summary-box .spread-positions,
.is-one-card-result .result-meta,
.is-one-card-result .keyword-list,
.is-one-card-result .result-root > .button-row {
  justify-content: center;
}

.is-one-card-result .result-cards-1 {
  grid-template-columns: 1fr;
}

.is-one-card-result .result-card {
  display: grid;
  justify-items: center;
  padding: clamp(20px, 4vw, 36px);
  text-align: left;
}

.is-one-card-result .result-card img {
  width: min(280px, 100%);
}

.is-one-card-result .result-card-heading {
  width: 100%;
  margin-top: 16px;
  text-align: center;
}

.is-one-card-result .result-card-heading h2 {
  margin: 0;
  font-size: 24px;
}

.is-one-card-result .result-card-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.is-one-card-result .keyword-list {
  width: 100%;
  margin-top: 14px;
}

.is-one-card-result .reading-copy {
  width: min(100%, 580px);
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.is-one-card-result .context-reading,
.is-one-card-result .result-advice {
  padding: 0;
}

.is-one-card-result .context-reading {
  margin-top: 0;
  border: 0;
  border-top: 0;
  border-left: 0;
  background: transparent;
  color: var(--body);
  font-weight: 400;
}

.is-one-card-result .result-advice {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.is-one-card-result .reading-copy h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.is-one-card-result .reading-copy p {
  margin: 0;
  color: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.is-one-card-result .result-card > p {
  max-width: 580px;
}

@media (max-width: 680px) {
  .is-one-card-result .result-card {
    padding: 20px 16px 24px;
  }

  .is-one-card-result .reading-copy p {
    font-size: 15px;
    line-height: 1.7;
  }
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.empty-state {
  padding: 28px;
}

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

.question-chip {
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--body);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

/* 링크 3개가 1줄, 카피라이트가 2줄에 오도록 좌측 정렬 */
.site-footer {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  order: 1;
  color: var(--body);
  font-weight: 600;
  text-decoration: none;
}

.site-footer > span {
  order: 2;
  margin-left: auto;
}

/* 좁은 화면에서는 링크(1줄) / 카피라이트(2줄)로 분리 */
@media (max-width: 680px) {
  .site-footer {
    /* stretch(기본값)면 min-height 만큼 두 줄이 벌어지므로 center 로 고정 */
    align-content: center;
    justify-content: center;
    row-gap: 4px;
  }

  .site-footer > span {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

.home-menu {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 152px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 0 auto;
  padding: 52px 0;
}

.app-promo {
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 auto 32px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 105, 255, 0.2), transparent 34%),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(21, 8, 55, 0.18);
  color: #ffffff;
}

.app-promo-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(21, 8, 55, 0.24);
}

.app-promo-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.app-promo-copy strong {
  font-size: 18px;
  line-height: 1.35;
}

.app-promo-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.app-promo-button {
  min-width: 148px;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #ffffff;
  color: #281253;
  line-height: 1.05;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-promo-play-logo {
  width: 28px;
  height: 28px;
}

.app-promo-button-copy {
  display: grid;
  gap: 1px;
}

.app-promo-button small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-promo-button strong {
  font-size: 17px;
}

.app-promo-button:hover,
.app-promo-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(21, 8, 55, 0.28);
}

.menu-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f5f1ff);
  box-shadow: 0 16px 48px rgba(15, 7, 40, 0.25);
  color: var(--ink);
  padding: 24px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 28px 64px rgba(15, 7, 40, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  .menu-card {
    transition: box-shadow 0.25s ease;
  }

  .menu-card:hover,
  .menu-card:focus-visible,
  .app-promo-button:hover,
  .app-promo-button:focus-visible {
    transform: none;
  }
}

.menu-card span {
  position: relative;
  z-index: 2;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.menu-card img {
  position: absolute;
  width: min(72%, 260px);
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
}

.main-illustration {
  position: absolute;
  inset: 0 0 58px;
  background: #5923C4;
  overflow: hidden;
}

.menu-card .main-illustration img {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: cover;
  object-position: center 62%;
  transform: none;
}

.one-card-menu {
  container-type: inline-size;
  background: #5923C4;
  color: #ffffff;
}

.one-card-menu .main-illustration {
  inset: 0;
}

.one-card-menu::after {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  content: "";
  background: linear-gradient(
    transparent,
    rgba(89, 35, 196, 0.38) 30%,
    rgba(89, 35, 196, 0.9) 68%,
    #5923C4 90%
  );
}

@container (min-width: 480px) {
  .one-card-menu .main-illustration img {
    object-position: center 44%;
  }
}

.three-card-menu {
  background: #5923C4;
  color: #ffffff;
}

/* 카드 사전: 오른쪽으로 갈수록 어두워지는 책장 겹침 효과 */
.meaning-menu {
  --page-step: 14px;
  background: #211247;
  color: #ffffff;
}

.meaning-menu::before,
.meaning-menu::after,
.meaning-menu .book-face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}

.meaning-menu::before {
  right: var(--page-step);
  z-index: 1;
  background: #361D75;
}

.meaning-menu::after {
  right: calc(var(--page-step) * 2);
  z-index: 2;
  background: #4B1EA6;
}

.meaning-menu .book-face {
  right: calc(var(--page-step) * 3);
  z-index: 3;
  background: #5923C4;
}

.meaning-menu > span {
  z-index: 4;
}

.meaning-menu strong {
  position: absolute;
  z-index: 4;
  top: 32px;
  right: calc(28px + var(--page-step) * 3);
  color: rgba(255, 255, 255, 0.16);
  font-size: 132px;
  line-height: 1;
}

.menu-card-fan {
  position: absolute;
  inset: 24px 8px 92px;
}

.menu-card-fan .preview-card {
  width: 38%;
}

.menu-card-fan .preview-card:nth-child(n + 4) {
  display: none;
}

@media (max-width: 980px) {
  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-band,
  .reading-layout,
  .content-band.split,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
    padding-top: 28px;
  }

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

  .deck-preview {
    min-height: 420px;
  }

  .info-grid,
  .spread-list,
  .deck-grid,
  .card-dictionary,
  .question-suggestions,
  .home-menu {
    grid-template-columns: 1fr 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: min(100% - 24px, 1180px);
    min-height: 66px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    min-height: 36px;
    padding: 0 10px;
    font-size: 14px;
  }

  .hero-band,
  .content-band,
  .page-intro,
  .reading-layout,
  .result-root,
  .dictionary-tools,
  .card-dictionary,
  .dictionary-methodology,
  .deck-grid,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .hero-band {
    gap: 24px;
    padding-bottom: 34px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 25px;
  }

  p {
    font-size: 16px;
  }

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

  .deck-preview {
    min-height: 360px;
  }

  .content-band,
  .content-band.compact {
    padding: 44px 0;
  }

  .info-grid,
  .spread-list,
  .deck-grid,
  .card-dictionary,
  .result-cards,
  .question-suggestions,
  .app-feature-list,
  .home-menu {
    grid-template-columns: 1fr;
  }

  .home-menu {
    min-height: auto;
    padding: 24px 0;
  }

  .app-promo {
    width: min(100% - 24px, 1180px);
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0 auto 24px;
    padding: 14px;
  }

  .app-promo-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
  }

  .app-promo-copy strong {
    font-size: 16px;
  }

  .app-promo-copy span {
    font-size: 12px;
    line-height: 1.45;
  }

  .app-promo-button {
    min-height: 44px;
    grid-column: 1 / -1;
    grid-template-columns: 24px auto;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .app-promo-play-logo {
    width: 24px;
    height: 24px;
  }

  .app-promo-button strong {
    font-size: 15px;
  }

  .menu-card {
    min-height: 220px;
  }

  .menu-card .main-illustration img {
    object-position: center 66%;
  }

  .menu-card span {
    font-size: 30px;
  }

  .deck-card,
  .dictionary-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }

  .draw-surface {
    min-height: 540px;
    padding: 14px;
  }

  .card-fan {
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
    gap: 12px 8px;
  }

  .draw-card {
    max-width: 88px;
  }
}

/* Compact free draw */
.reading-layout.three-card-layout {
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: 1fr;
  gap: 6px;
  padding-top: 10px;
}

.three-card-layout .free-question-panel {
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1.28fr);
  gap: 26px;
  align-items: center;
  padding: 4px 0 12px;
}

.three-card-layout .reading-panel-head h1 {
  font-size: 28px;
}

.three-card-layout .panel-description {
  margin-top: 5px;
  font-size: 13px;
}

.reading-layout.three-card-layout .question-field {
  min-height: 128px;
  padding: 18px 22px;
  box-shadow: 0 15px 24px rgba(0, 0, 0, 0.2);
}

.reading-layout.three-card-layout .question-field textarea {
  min-height: 58px;
  resize: none;
}

.reading-layout.three-card-layout .draw-surface {
  min-height: 430px;
  grid-template-rows: auto minmax(250px, 1fr) auto;
  padding: 12px 0 0;
}

.draw-heading {
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-self: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0 4px 12px;
}

.draw-heading strong {
  font-size: 20px;
  font-weight: 600;
}

.draw-heading span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.three-card-layout .card-fan {
  width: 100%;
  min-height: 250px;
  align-items: center;
  padding: 24px 8px 28px;
}

.three-card-layout .draw-card {
  flex-basis: clamp(88px, 11vw, 116px);
  margin-left: -24px;
}

.three-card-layout .draw-card:first-child {
  margin-left: 0;
}

.three-card-layout .app-action-bar {
  width: min(100%, 520px);
  padding-top: 4px;
}

.three-card-layout .app-action-bar .button {
  min-height: 60px;
}

@media (max-width: 760px) {
  .three-card-layout .free-question-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .three-card-layout .reading-panel-head h1 {
    font-size: 25px;
  }

  .reading-layout.three-card-layout .draw-surface {
    min-height: 390px;
    grid-template-rows: auto minmax(220px, 1fr) auto;
  }

  .draw-heading strong {
    font-size: 17px;
  }

  .three-card-layout .card-fan {
    min-height: 220px;
    padding: 18px 4px 22px;
  }

  .three-card-layout .draw-card {
    flex-basis: 92px;
    margin-left: -20px;
  }
}

/* Reading modes and deck picker */
.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.nav-links {
  justify-self: end;
}

.deck-menu {
  position: relative;
  z-index: 20;
}

.deck-menu summary {
  min-width: 132px;
  height: 44px;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

.deck-menu summary::-webkit-details-marker {
  display: none;
}

.deck-menu summary img,
.deck-menu-popover button img {
  width: 19px;
  aspect-ratio: 500 / 862;
  border-radius: 3px;
  object-fit: cover;
}

.deck-menu-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
}

.deck-menu-chevron svg {
  display: block;
}

.deck-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 248px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(30, 18, 66, 0.24);
  padding: 8px;
}

.deck-menu-popover > p {
  color: var(--muted);
  padding: 5px 8px 7px;
  font-size: 12px;
  font-weight: 700;
}

.deck-menu-popover button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--body);
  padding: 5px 8px;
  text-align: left;
}

.deck-menu-popover button:hover,
.deck-menu-popover button.is-active {
  background: var(--soft);
  color: var(--accent-deep);
}

.deck-menu-popover button strong {
  color: var(--accent);
  text-align: center;
}

.panel-description {
  max-width: 560px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.three-card-layout {
  width: min(820px, calc(100% - 24px));
  grid-template-columns: 1fr;
  gap: 12px;
}

.free-question-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: 24px;
  align-items: end;
  padding: 6px 0;
}

.free-question-panel .reading-panel-head {
  display: block;
}

.free-question-panel .question-field {
  min-height: 132px;
}

.free-question-panel .question-field textarea {
  min-height: 78px;
}

.three-card-layout .draw-surface {
  min-height: 610px;
}

.question-glass {
  align-content: center;
  gap: 6px;
}

.question-glass-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.spread-legend {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-self: center;
  gap: 6px;
  margin: 0 0 8px;
}

.spread-legend span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}

.one-card-topics .reading-panel-head {
  display: block;
}

.one-card-topics .question-list {
  max-height: 378px;
}

.topic-tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.context-reading {
  margin-top: 14px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  padding: 12px 14px;
  color: var(--accent-deep);
  font-weight: 700;
}

body.is-three-card-result {
  min-height: 100vh;
  background: #24212b;
  color: #ffffff;
}

body.is-three-card-result::before {
  display: none;
}

body.is-three-card-result .site-header,
body.is-three-card-result .site-footer {
  color: #ffffff;
}

body.is-three-card-result .brand,
body.is-three-card-result .nav-links a,
body.is-three-card-result .site-footer a,
body.is-three-card-result .site-footer span {
  color: #ffffff;
}

body.is-three-card-result .site-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
}

body.is-three-card-result .page-intro {
  display: none;
}

body.is-three-card-result .result-root {
  width: min(980px, calc(100% - 32px));
  min-height: calc(100vh - 152px);
  align-content: center;
  padding: 34px 0 56px;
}

.three-result-table {
  display: grid;
  justify-items: center;
  gap: 30px;
}

.three-result-table > header {
  max-width: 720px;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.three-result-table > header .eyebrow {
  color: #cdbfff;
  margin: 0;
}

.three-result-table > header h1 {
  color: #ffffff;
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.35;
}

.three-result-guide {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.three-result-table > header > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 750;
}

.three-result-cards {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 30px);
  align-items: start;
}

.three-result-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin: 0;
}

.three-result-card img {
  width: 100%;
  aspect-ratio: 500 / 862;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  object-fit: cover;
}

.three-result-card img.is-reversed {
  transform: rotate(180deg);
}

.three-result-card figcaption {
  display: flex;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 13px;
}

.three-result-card figcaption strong {
  color: #ffffff;
}

.three-result-actions {
  justify-content: center;
}

.three-result-actions .button {
  min-width: 136px;
}

.three-result-actions .primary {
  background: #ffffff;
  color: var(--accent-deep);
}

.three-result-actions .secondary {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #ffffff;
}

.three-result-action-status {
  min-height: 20px;
  margin-top: -18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-align: center;
}

.three-result-action-status.is-error {
  color: #ffb7d5;
}

.three-result-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: -18px;
}

.three-result-links a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .free-question-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .deck-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .deck-menu summary {
    min-width: 112px;
    max-width: 148px;
  }

  .free-question-panel {
    gap: 14px;
  }

  .free-question-panel .question-field {
    min-height: 128px;
  }

  .one-card-topics .question-list {
    max-height: 260px;
  }

  body.is-three-card-result .result-root {
    width: min(100% - 24px, 980px);
    min-height: calc(100vh - 180px);
    padding-top: 24px;
  }

  .three-result-table {
    gap: 24px;
  }

  .three-result-table > header h1 {
    font-size: 25px;
  }

  .three-result-cards {
    gap: 9px;
  }

  .three-result-card {
    gap: 8px;
  }

  .three-result-card figcaption {
    display: grid;
    gap: 0;
    font-size: 11px;
  }

  .three-result-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .three-result-actions .button {
    min-width: 0;
  }

  .three-result-actions .primary {
    grid-column: 1 / -1;
  }
}

@media (min-width: 560px) and (max-width: 760px) {
  .site-header {
    min-height: 72px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    padding: 8px 0;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .nav-links {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 0;
  }

  .site-header .nav-links a {
    min-height: 36px;
    padding-inline: 7px;
    font-size: 13px;
  }

  .site-header .deck-menu {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 430px) {
  .deck-card,
  .dictionary-card {
    grid-template-columns: 1fr;
  }

  .deck-card-visual {
    max-width: 180px;
  }

  .dictionary-card img {
    width: 112px;
  }

  .button {
    width: 100%;
  }

  .button-row .button {
    flex: 1 1 140px;
  }
}

/* App-inspired reading surface */
body[data-page="reading"],
body[data-page="one-card"] {
  background: #361D75;
}

body[data-page="reading"]::before,
body[data-page="one-card"]::before {
  display: none;
}

body[data-page="reading"] .site-header,
body[data-page="reading"] .site-footer,
body[data-page="one-card"] .site-header,
body[data-page="one-card"] .site-footer {
  color: #ffffff;
}

body[data-page="reading"] .brand,
body[data-page="reading"] .nav-links a,
body[data-page="reading"] .site-footer a,
body[data-page="reading"] .site-footer span,
body[data-page="one-card"] .brand,
body[data-page="one-card"] .nav-links a,
body[data-page="one-card"] .site-footer a,
body[data-page="one-card"] .site-footer span {
  color: #ffffff;
}

body[data-page="reading"] .brand-mark,
body[data-page="one-card"] .brand-mark {
  border: 0;
  background: transparent;
}

body[data-page="reading"] .site-footer,
body[data-page="one-card"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.16);
}

body[data-page="reading"] .content-band,
body[data-page="one-card"] .content-band {
  width: 100%;
  background: #ffffff;
}

body[data-page="reading"] .content-band > .section-heading,
body[data-page="reading"] .content-band > .info-grid,
body[data-page="one-card"] .content-band > .section-heading,
body[data-page="one-card"] .content-band > .info-grid {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

body[data-page="reading"] .content-band > .info-grid,
body[data-page="one-card"] .content-band > .info-grid {
  margin-top: 22px;
}

.reading-layout {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(310px, 0.46fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px 0 44px;
}

.reading-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.reading-background::before,
.reading-background::after {
  display: none;
}

.reading-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 156px);
  gap: 12px;
  align-items: start;
}

.reading-panel-head h1 {
  color: #ffffff;
  font-size: 27px;
}

.reading-panel-head .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.deck-field select {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  font-weight: 800;
}

.control-panel {
  position: relative;
  top: auto;
  z-index: 1;
  align-self: start;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.topic-tabs-wrap {
  position: relative;
  min-width: 0;
  margin-top: 4px;
}

.topic-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  padding-right: 28px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 28px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 calc(100% - 28px),
    transparent 100%
  );
}

.topic-tabs::-webkit-scrollbar {
  display: none;
}

.topic-tabs.is-expanded {
  flex-wrap: wrap;
  overflow: visible;
  padding-right: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

.topic-tabs-toggle {
  display: block;
  margin: 6px 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 4px 2px;
}

.topic-tab {
  flex: 0 0 auto;
  min-height: 33px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #361d75;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.topic-tab.is-active {
  background: #ffffff;
}

.question-list {
  max-height: 214px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.question-option {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #ffffff;
  padding: 10px 14px;
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.question-option:last-child {
  border-bottom: 0;
}

.question-option:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.58);
  outline-offset: -2px;
}

.question-option:focus-visible:not(.is-active) {
  background: rgba(255, 255, 255, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .question-option:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.1);
  }
}

.question-option.is-active {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.question-field {
  min-height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px 22px;
  border: 1px solid rgba(234, 228, 253, 0.58);
  border-radius: 8px;
  background: rgba(204, 213, 255, 0.15);
  box-shadow: 0 15px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  text-align: center;
}

.question-field span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.question-field textarea {
  min-height: 92px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.question-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.spread-box {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: #ffffff;
}

.spread-box .label,
.spread-box p {
  color: rgba(255, 255, 255, 0.76);
}

.draw-surface {
  position: relative;
  z-index: 1;
  min-height: 642px;
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr) auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 18px 0 0;
}

.question-glass {
  width: min(100%, 520px);
  min-height: 128px;
  display: grid;
  place-items: center;
  justify-self: center;
  margin-top: 2px;
  padding: 18px 22px;
  border: 1px solid rgba(234, 228, 253, 0.58);
  border-radius: 8px;
  background: rgba(204, 213, 255, 0.15);
  box-shadow: 0 15px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.question-glass p {
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
}

.draw-copy {
  display: grid;
  gap: 2px;
  justify-items: center;
  margin: 24px 0 12px;
  color: #ffffff;
  text-align: center;
}

.draw-copy span {
  font-size: 20px;
  line-height: 1.5;
}

.draw-copy strong {
  font-size: 24px;
  line-height: 1.45;
  font-weight: 600;
}

.draw-status {
  width: min(100%, 520px);
  justify-self: center;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.76);
  padding: 0 4px;
}

/* 주제별 타로(1장 선택)에서는 선택 카운터 숨김.
   draw-surface grid 트랙 매핑이 어긋나지 않도록 flow는 유지한 채 0높이로 접는다. */
.one-card-layout .draw-status {
  visibility: hidden;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* 문구 ↔ 선택한 질문 ↔ 카드 사이 간격 균등화(40px) */
.one-card-layout .draw-copy {
  margin-bottom: 40px;
}

.one-card-layout .question-glass {
  margin-top: 0;
  margin-bottom: 40px;
}

.card-fan {
  position: relative;
  display: flex;
  align-items: end;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 34px 34px 34px;
  scrollbar-width: none;
}

.card-fan::-webkit-scrollbar {
  display: none;
}

.card-fan.is-scrollable {
  cursor: grab;
}

.card-fan.has-scroll-right:not(.has-scroll-left) {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - clamp(48px, 8vw, 84px)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - clamp(48px, 8vw, 84px)),
    transparent 100%
  );
}

.card-fan.has-scroll-left.has-scroll-right {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 clamp(48px, 8vw, 84px),
    #000 calc(100% - clamp(48px, 8vw, 84px)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 clamp(48px, 8vw, 84px),
    #000 calc(100% - clamp(48px, 8vw, 84px)),
    transparent 100%
  );
}

.card-fan.has-scroll-left:not(.has-scroll-right) {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 clamp(48px, 8vw, 84px),
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 clamp(48px, 8vw, 84px),
    #000 100%
  );
}

.card-fan.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.draw-card {
  flex: 0 0 clamp(82px, 11vw, 116px);
  max-width: 116px;
  margin-left: -38px;
  transform: translateY(var(--lift, 0));
}

.draw-card:first-child {
  margin-left: 0;
}

.draw-card:hover:not(:disabled) {
  --lift: -10px;
}

.draw-card.is-selected {
  --lift: -24px;
}

.draw-card img {
  border-radius: 8px;
  box-shadow: -3px 4px 12px rgba(0, 0, 0, 0.26);
}

@media (min-width: 600px) {
  .three-card-layout .card-fan {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 14px 0;
    align-items: start;
    overflow: visible;
    padding: 24px 12px 28px;
  }

  .three-card-layout .draw-card,
  .three-card-layout .draw-card:first-child {
    width: calc(100% + 16px);
    max-width: 82px;
    margin-left: 0;
    justify-self: center;
  }

  .three-card-layout .draw-card:hover:not(:disabled) {
    z-index: 2;
  }
}

.app-action-bar {
  width: min(100%, 520px);
  justify-self: center;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0 0;
}

.app-action-bar .button {
  min-height: 60px;
  border-color: transparent;
  border-radius: 8px;
  font-size: 20px;
}

.app-action-bar .primary {
  background: #ffffff;
  color: var(--accent);
}

.app-action-bar .button.primary:disabled {
  border-color: transparent;
  background: #d9d9d9;
  color: rgba(55, 42, 83, 0.58);
  cursor: not-allowed;
}

.app-action-bar .secondary {
  background: #ffffff;
  color: var(--accent);
}

.question-reading-guide {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
}

.question-reading-guide summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.question-reading-guide summary::-webkit-details-marker {
  display: none;
}

.question-reading-guide summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.52);
  font-size: 15px;
  line-height: 1;
  transform: translateY(-2px);
  transition: transform 160ms ease;
}

.question-reading-guide[open] summary::after {
  transform: translateY(2px) rotate(180deg);
}

.question-reading-guide-body {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 14px 15px;
}

.question-reading-guide-body h2 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
}

.question-reading-guide-body p,
.question-reading-guide-body li {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.65;
}

.question-reading-guide-body p {
  margin-top: 8px;
}

.question-reading-guide-body .reading-guide-disclaimer {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  word-break: keep-all;
}

.question-reading-guide-body ul {
  display: grid;
  gap: 4px;
  margin: 9px 0 0;
  padding-left: 18px;
}

.icon-button {
  width: 60px;
  padding: 0;
  font-size: 25px;
}

@media (max-width: 980px) {
  .reading-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .control-panel {
    width: min(640px, 100%);
    justify-self: center;
  }

  .draw-surface {
    min-height: 560px;
  }
}

@media (max-width: 680px) {
  body[data-page="reading"] .site-header,
  body[data-page="one-card"] .site-header {
    width: min(100% - 24px, 1180px);
  }

  .reading-layout {
    width: min(100% - 24px, 1180px);
    min-height: auto;
    padding-top: 8px;
  }

  .reading-panel-head {
    grid-template-columns: 1fr;
  }

  .reading-panel-head h1 {
    font-size: 25px;
  }

  .question-list {
    max-height: 168px;
  }

  .draw-surface {
    min-height: 520px;
    padding: 4px 0 0;
  }

  .question-glass {
    min-height: 112px;
  }

  .draw-copy {
    margin-top: 18px;
  }

  .draw-copy span {
    font-size: 18px;
  }

  .draw-copy strong {
    font-size: 22px;
  }

  .card-fan {
    padding: 28px 18px 30px;
  }

  .draw-card {
    flex-basis: 86px;
    max-width: 86px;
    margin-left: -31px;
  }

  .app-action-bar {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .app-action-bar .button {
    width: auto;
  }
}

/* Shared app background */
html {
  background: #361D75;
}

body,
body.is-three-card-result {
  min-height: 100vh;
  background: #361D75;
  background-attachment: fixed;
}

body::before,
body.is-three-card-result::before {
  display: none;
}

.site-header,
.site-footer,
.brand,
.nav-links a,
.site-footer a,
.site-footer span {
  color: #ffffff;
}

/* 현재 페이지 표시: hover와 동일한 포인트 컬러로 고정
   (body[data-page] .nav-links a 보다 특이성이 높아야 항상 이긴다) */
.site-header .nav-links a[aria-current="page"] {
  color: #ff69ff;
}

/* 상단 메뉴 hover: 포인트 컬러로 전환 */
.nav-links a {
  transition: color 0.2s ease;
}

/* body[data-page=...] 규칙보다 특이성이 높아야 모든 페이지에서 적용된다 */
.site-header .nav-links a:hover,
.site-header .nav-links a:focus-visible {
  color: #ff69ff;
}

.site-footer {
  border-top-color: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 300;
}

.site-footer,
.site-footer a,
.site-footer span {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a {
  font-weight: 400;
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffffff;
}

.page-intro,
.page-intro h1,
.page-intro h2 {
  color: #ffffff;
}

.page-intro > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

.page-intro .eyebrow {
  color: #d8ceff;
}

.dictionary-tools .field > span {
  color: rgba(255, 255, 255, 0.78);
}

/* Responsive home artwork */
.three-card-menu::after {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 34%;
  content: "";
  background: linear-gradient(
    transparent,
    rgba(74, 41, 169, 0.78) 50%,
    #5226bc 82%
  );
  pointer-events: none;
}

.three-card-menu > span {
  z-index: 3;
}

.three-card-menu .main-illustration {
  inset: 0;
  background: transparent;
}

/* 타로 뽑기 배경만 크롭 위치를 아래로 (주제별 타로 일러스트와 분리) */
.three-card-menu .main-illustration img {
  object-position: center 50%;
}

.menu-card-fan {
  inset: 20px 2px 84px;
  transform: translateY(23.3%) scale(0.7);
  transform-origin: center top;
}

.menu-card-fan .preview-card {
  width: 48%;
  border: 1px solid #5923c4;
  box-shadow: 0 16px 32px rgba(20, 10, 55, 0.34);
}

/* 네온 덱 원본의 밝은 외곽선은 작은 홈 미리보기에서만 과하게 도드라져 살짝 잘라낸다. */
.menu-card-fan[data-deck-id="neon-city"] .preview-card {
  border: 0;
  clip-path: inset(3px round 6px);
}

.menu-card-fan .preview-card:nth-child(1) {
  left: 1%;
  top: 17%;
  transform: rotate(-11deg);
}

.menu-card-fan .preview-card:nth-child(2) {
  left: 26%;
  top: 1%;
  z-index: 2;
  transform: rotate(2deg);
}

.menu-card-fan .preview-card:nth-child(3) {
  /* .menu-card img 의 left:50% 를 해제해야 right 정렬이 먹는다 */
  left: auto;
  right: 1%;
  top: 17%;
  transform: rotate(11deg);
}

@media (max-width: 680px) {
  .menu-card .main-illustration img {
    object-position: center 42%;
  }

  .menu-card-fan {
    inset: 8px 0 64px;
  }

  .menu-card-fan .preview-card {
    width: 34%;
  }

  .menu-card-fan .preview-card:nth-child(1) {
    left: 10%;
    top: 10%;
  }

  .menu-card-fan .preview-card:nth-child(2) {
    left: 33%;
    top: 0;
  }

  .menu-card-fan .preview-card:nth-child(3) {
    right: 10%;
    top: 10%;
  }
}

/* Centered free-question flow */
.reading-layout.three-card-layout .free-question-panel {
  /* '나의 질문' 박스를 주제별 타로 '선택한 질문' 박스(520px)와 동일 너비로 */
  width: min(520px, 100%);
  grid-template-columns: 1fr;
  justify-self: center;
  gap: 14px;
  padding: 12px 0 18px;
}

.reading-layout.three-card-layout .reading-panel-head {
  text-align: center;
}

.reading-layout.three-card-layout .panel-description {
  margin-inline: auto;
}

.reading-layout.three-card-layout .question-field {
  width: 100%;
  text-align: left;
}
