/* Ink, antique gold and jade share one quiet reading surface. */
:root {
  --night: #191919;
  --obsidian: #191919;
  --panel: #242424;
  --panel2: #303030;
  --gold: #c7b582;
  --goldBright: #e7d5a1;
  --cream: #f1f0e9;
  --jade: #a9c2b3;
  --line: #454545;
  --dim: #bdbdb8;
  --action: #dbc58e;
  --action-ink: #191919;
  --serif: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --reading-title: "Gowun Batang", Georgia, serif;
}
.surface-light {
  --night: #191919;
  --panel: #191919;
  --panel2: #292929;
  --cream: #f1f0e9;
  --gold: #dbc58e;
  --goldBright: #e7d5a1;
  --line: #454545;
  --dim: #bdbdb8;
  --jade: #a9c2b3;
}
body {
  font-family: var(--serif);
  line-height: 1.6;
}
button,
input,
select,
textarea {
  letter-spacing: 0;
  touch-action: manipulation;
}
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.btn:hover {
  transform: none;
}
.btn {
  min-height: 44px;
}
select {
  color-scheme: dark;
}
.surface-light select {
  color-scheme: dark;
}
select option {
  background: var(--panel);
  color: var(--cream);
}
.orb {
  background: url("/assets/prophecy-orb.webp") center / contain no-repeat;
  animation: none;
  box-shadow: none;
}
.orb-image {
  display: inline-block;
  object-fit: contain;
  flex: none;
  vertical-align: middle;
}
.ui-icon {
  display: inline-block;
  width: 21px;
  height: 21px;
  flex: none;
  background: currentColor;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-header .orb-balance {
  border-color: var(--line) !important;
  background: var(--panel2) !important;
  border-radius: 6px !important;
  gap: 5px !important;
  font-variant-numeric: tabular-nums;
}
.site-header .header-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  width: 44px;
}
.bottom-navigation button {
  position: relative;
  min-width: 76px;
  min-height: 52px;
  justify-content: center;
  gap: 6px !important;
}
.bottom-navigation button[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 30%;
  right: 30%;
  height: 2px;
  background: var(--gold);
}
.orb-shop-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.orb-shop-heading h2 {
  font: 700 28px var(--reading-title);
  margin: 4px 0 8px;
  color: var(--goldBright);
}
.orb-shop-heading p {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.8;
  margin: 0;
}
.orb-shop-heading .orb-eyebrow {
  font-size: 9px;
  color: var(--gold);
}
.orb-plan {
  border-radius: 6px !important;
  min-height: 80px;
  padding: 12px 10px !important;
  gap: 8px !important;
}
.orb-plan > .orb-image {
  width: 28px !important;
  height: 28px !important;
}
.orb-plan > div:nth-of-type(2) {
  font-size: 15px !important;
}
.orb-plan[aria-pressed="true"] {
  background: #383838 !important;
  box-shadow: inset 3px 0 var(--gold);
}
.reading-price {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
}
.sound-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.reading-start {
  box-shadow: none;
  transition: background 0.2s !important;
}
.reading-start:hover {
  background: #e7d5a1;
}
.reading-start:active {
  background: #c7b582;
}
.deck-back {
  outline: 1px solid #aa996e40;
  outline-offset: -10px;
}
.reading-tabs button {
  transition:
    color 0.2s,
    border-color 0.2s;
}
@media (max-width: 600px) {
  .intro-heading .art-caption {
    display: none;
  }
  .intro-heading .intro-art {
    height: 200px;
  }
  .site-header .header-records {
    display: none;
  }
  .site-header .hdrbtns {
    gap: 4px !important;
  }
  .site-header .orb-balance {
    padding: 4px 8px !important;
  }
  .wordmark {
    font-size: 20px !important;
    gap: 6px;
  }
  .wordmark .orb-image {
    width: 28px !important;
    height: 28px !important;
  }
  .orb-shop-heading {
    gap: 12px;
  }
  .orb-shop-heading > .orb-image {
    width: 80px !important;
    height: 80px !important;
  }
}
.wrap-pad {
  /* viewport-fit=cover 대응: 상단 안전영역(노치·상태바)만큼 내려야 아이폰 PWA에서
     헤더의 구슬·기록·로그아웃 버튼이 노치 뒤에 깔리지 않는다 (2026-09-29 실사고). */
  padding: calc(20px + var(--safe-top, 0px)) 22px 110px !important;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  border: 0;
  background: none;
  color: var(--cream);
  font: 700 22px var(--reading-title);
  padding: 0;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}
.site-header .hdrbtns {
  position: static !important;
  align-items: center;
  gap: 6px !important;
}
.site-header .hdrbtns button {
  font-size: 11px !important;
  padding: 6px 9px !important;
  min-height: 44px;
}
.home-stage .wrap-pad {
  max-width: none !important;
  padding-top: 0 !important;
}
.home-stage .site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 0;
  border: 0;
}
.reading-home {
  margin: auto;
}
.intro-heading {
  background: #191919;
  color: #faf7f3;
  text-align: center;
  margin: 0 -22px;
  padding: 30px 22px 24px;
}
.intro-label {
  color: #cdb8aa;
  font-size: 10px;
  margin: 0 0 12px;
}
.intro-heading h1 {
  font: 700 34px/1.5 var(--reading-title);
  margin: 0;
}
.intro-description {
  font-size: 12px;
  line-height: 1.9;
  color: #c9bcc2;
  margin: 12px 0 0;
}
.intro-art {
  height: 235px;
  max-width: 520px;
  position: relative;
  margin: 24px auto 0;
}
.intro-art img {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 112px;
  height: 193px;
  object-fit: cover;
  border: 6px solid #e6ddc9;
  border-radius: 2px;
  box-shadow: 0 12px 25px #0005;
}
.intro-art img:first-child {
  transform: translateX(-133%) rotate(-14deg);
  top: 24px;
}
.intro-art img:nth-child(2) {
  transform: translateX(-50%);
  z-index: 2;
}
.intro-art img:last-child {
  transform: translateX(33%) rotate(14deg);
  top: 24px;
}
.art-caption {
  font-size: 10px;
  color: #cdb8aa;
  margin: 0;
}
.reading-menu {
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 0 0;
}
.reading-menu h2 {
  font: 700 20px var(--reading-title);
  margin: 0 0 20px;
}
.reading-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.reading-tabs button {
  font: inherit;
  font-size: 12px;
  min-height: 48px;
  padding: 8px 2px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  cursor: pointer;
}
.reading-tabs button[aria-selected="true"] {
  color: var(--gold);
  font-weight: 700;
  border-bottom-color: var(--gold);
}
.reading-offer {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 0 0;
}
.reading-offer h3 {
  font: 700 21px/1.6 var(--reading-title);
  margin: 0 0 10px;
}
.reading-offer p {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.9;
  min-height: 50px;
  margin: 0 0 12px;
}
.reading-price {
  font-size: 12px;
  color: var(--gold);
}
.reading-start {
  background: var(--action);
  color: var(--action-ink);
  padding: 16px 22px;
  border-radius: 3px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 54px;
}
.intro-footnote {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
}
.intro-footnote p {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.9;
  margin: 0;
}
.text-action {
  background: none;
  border: 0;
  color: var(--gold);
  padding: 8px 0;
  text-align: left;
  min-height: 44px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.flow-heading {
  font: 700 26px/1.6 var(--reading-title);
  margin: 0 0 24px;
}
.birth-form {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}
.birth-form .btn {
  border-radius: 4px !important;
}
.draw-surface .flow-heading {
  text-align: center;
  padding-right: 12px;
}
.draw-status > div:first-child {
  padding-right: 52px !important;
}
.draw-surface .slots {
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
}
.card-deck {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 112px);
  grid-auto-columns: 66px;
  gap: 14px;
  width: max-content !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 20px 8px;
}
.card-deck .fancard {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  z-index: auto !important;
  filter: none !important;
  min-width: 44px;
}
.deck-back {
  width: 66px;
  height: 112px;
  padding: 5px;
  background: #202e27;
  border: 1px solid #aa996e;
  border-radius: 3px;
  box-shadow: 0 3px 8px #0003;
}
.deck-back span {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  border: 1px solid #aa996e;
  color: #efd8c0;
  font: 16px/2 var(--reading-title);
}
.fancard:focus-visible {
  outline: 2px solid #efd8c0;
  outline-offset: 4px;
}
.reading-report {
  max-width: 720px;
  margin: auto;
}
.report-eyebrow {
  font-size: 10px;
  color: var(--gold);
  margin: 0 0 16px;
}
.report-opening {
  font: 18px/1.9 var(--reading-title);
  margin: 0 0 28px;
}
.report-body {
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 24px 0 !important;
  max-width: none !important;
  background: none !important;
  line-height: 2;
}
.surface-light [data-scroll-lock],
.card-lightbox {
  --night: #191919;
  --panel: #242424;
  --panel2: #303030;
  --cream: #f1f0e9;
  --gold: #c7b582;
  --goldBright: #e7d5a1;
  --line: #454545;
  --dim: #bdbdb8;
  --jade: #a9c2b3;
}
@media (max-width: 360px) {
  .intro-art img {
    width: 96px;
    height: 166px;
  }
  .intro-art {
    height: 210px;
  }
  .reading-tabs button {
    font-size: 11px;
  }
  .reading-offer h3 {
    font-size: 19px;
  }
  .site-header .hdrbtns {
    flex-wrap: wrap;
  }
  .flow-heading {
    font-size: 23px;
  }
}
@media (min-width: 700px) {
  .wrap-pad {
    padding: 28px 30px 110px !important;
  }
  .home-stage .site-header {
    padding: 16px 0;
  }
  .intro-heading {
    margin: 0 -30px;
    padding: 38px 30px 30px;
  }
  .intro-heading h1 {
    font-size: 44px;
  }
  .intro-art {
    height: 280px;
  }
  .intro-art img {
    width: 142px;
    height: 244px;
  }
  .reading-menu {
    padding-top: 32px;
  }
  .reading-offer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .reading-offer > div {
    max-width: 580px;
  }
  .reading-offer p {
    min-height: 0;
  }
  .reading-start {
    min-width: 190px;
  }
  .intro-footnote {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .flow-heading {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 699px) {
  .intro-heading {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .intro-heading h1 {
    font-size: 34px !important;
  }
  .intro-art {
    height: 212px;
    margin-top: 18px;
  }
  .intro-art img {
    width: 104px;
    height: 180px;
  }
  .reading-menu {
    padding-top: 22px;
  }
  .reading-menu h2 {
    margin-bottom: 14px;
  }
  .reading-offer {
    gap: 16px;
    padding-top: 20px;
  }
  .reading-offer p {
    min-height: 0;
  }
  .flow-heading {
    font-size: 26px !important;
  }
}
@media (max-width: 360px) {
  .intro-art img {
    width: 94px;
    height: 162px;
  }
  .intro-art {
    height: 195px;
  }
  .flow-heading {
    font-size: 23px !important;
  }
}
.intro-heading .combined-art {
  height: 258px;
  max-width: 560px;
  margin-top: 26px;
}
.saju-paper {
  position: absolute;
  left: calc(50% - 217px);
  top: 2px;
  width: 294px;
  padding: 18px 20px 14px;
  background: #f6f4ef;
  color: #302c2b;
  transform: rotate(-5deg);
  box-shadow: 0 10px 24px #0004;
  text-align: left;
}
.paper-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px solid #bcb3a7;
  font: 18px var(--reading-title);
}
.paper-seal {
  color: #8d3545;
  border: 1px solid #8d3545;
  padding: 1px 4px;
  font-size: 14px;
}
.paper-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 10px 0;
}
.paper-pillars > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border-right: 1px solid #d6cfc6;
}
.paper-pillars > div:last-child {
  border: 0;
}
.paper-pillars small {
  font: 10px var(--serif);
  color: #68625e;
}
.paper-pillars strong {
  font: 400 30px/1.2 var(--reading-title);
}
.paper-pillars .stem-1 {
  color: #8b6551;
}
.paper-pillars .stem-2 {
  color: #446752;
}
.paper-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #bcb3a7;
  font-size: 9px;
  color: #68625e;
}
.combined-art .tarot-pair img {
  width: 112px;
  height: 193px;
  top: 46px;
  left: calc(50% + 80px);
  border-width: 5px;
  transform: rotate(8deg);
}
.combined-art .tarot-pair img:last-child {
  left: calc(50% + 150px);
  top: 62px;
  transform: rotate(18deg);
}
@media (max-width: 699px) {
  .intro-heading .combined-art {
    height: 212px;
    margin-top: 23px;
  }
  .saju-paper {
    left: calc(50% - 143px);
    width: 200px;
    padding: 13px 13px 10px;
    top: 0;
  }
  .paper-title {
    font-size: 15px;
    padding-bottom: 8px;
  }
  .paper-pillars {
    margin: 9px 0;
  }
  .paper-pillars strong {
    font-size: 25px;
  }
  .paper-pillars > div {
    gap: 5px;
  }
  .paper-footer {
    font-size: 8px;
    padding-top: 8px;
  }
  .combined-art .tarot-pair img {
    width: 80px;
    height: 138px;
    left: calc(50% + 46px);
    top: 56px;
    border-width: 4px;
  }
  .combined-art .tarot-pair img:last-child {
    left: calc(50% + 87px);
    top: 69px;
  }
}
/* The desktop experience keeps the same single-column reading rhythm. */
html, body { background: #111111; }
.reading-app { max-width: 600px; margin-inline: auto; }
.reading-app .wrap-pad { max-width: 600px !important; padding: 20px 24px 110px !important; }
.home-stage .wrap-pad { padding-top: 0 !important; }
.home-stage .site-header { padding: 12px 0; }
.site-header .wordmark { font-size: 20px !important; }
.reading-home.fadeup { animation: none; }
.intro-heading { position: relative; isolation: isolate; margin: 0 -24px; padding: 0; height: min(560px, 66svh); min-height: 390px; overflow: hidden; background: #191919; }
.intro-heading .cinematic-table { position: absolute; inset: 0; height: 100%; width: 100%; max-width: none; margin: 0; }
.intro-heading .cinematic-table img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; border: 0; border-radius: 0; box-shadow: none; transform: none; animation: table-arrival 1.4s ease-out both; }
.intro-copy { position: relative; z-index: 3; padding: 24px 24px 0; text-align: center; }
.intro-heading .intro-copy h1 { color: #f4edda; font: 400 40px/1.3 var(--reading-title); margin: 0; letter-spacing: 0; }
.intro-copy .intro-description { font: 14px/1.8 var(--reading-title); color: #f1f0e9; margin: 12px 0 8px; }
.intro-copy .intro-label { color: #d7c8a2; font-size: 11px; margin: 0; }
.reading-menu { padding-top: 28px; }
.reading-menu h2 { font-weight: 400; font-size: 21px; margin-bottom: 16px; }
.reading-offer { flex-direction: column; align-items: stretch; gap: 20px; padding-top: 24px; }
.reading-offer h3 { font-weight: 400; font-size: 22px; }
.reading-offer p { min-height: 0; font-size: 14px; }
.reading-start { width: 100%; border-radius: 2px; color: var(--action-ink); font-weight: 700; }
.reading-tabs button { font-size: 12px; min-height: 52px; }
.reading-tabs button[aria-selected="true"] { color: #e7d5a1; }
.intro-footnote { flex-direction: column; align-items: stretch; }
.reading-app .bottom-navigation { max-width: 600px; margin-inline: auto; }
.reading-app .scroll-top { right: max(16px, calc((100vw - 600px) / 2 + 16px)) !important; box-shadow: 0 4px 16px #0004 !important; }
.reading-app button { letter-spacing: 0 !important; }
.reading-app .btn { box-shadow: none; }
.reading-report { max-width: 100%; }
.flow-heading { font-weight: 400; }
@keyframes table-arrival { from { opacity: .6; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 360px) {
  .reading-app .wrap-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .intro-heading { margin-inline: -20px; min-height: 370px; }
  .intro-heading .intro-copy h1 { font-size: 34px !important; }
  .intro-copy { padding-top: 20px; }
  .intro-copy .intro-description { font-size: 13px; }
  .reading-tabs button { font-size: 11px; }
}
@media (max-height: 650px) { .intro-heading { min-height: 300px; height: 64svh; } .intro-copy .intro-description { margin: 6px 0; } }
@media (prefers-reduced-motion: reduce) { .intro-heading .cinematic-table img { animation: none; } }

/* Reading introduction artwork. */
.reading-app { overflow: clip !important; }
.ink-journey { height: auto; position: relative; margin-inline: -24px; }
.ink-stage { position: sticky; top: 0; height: min(740px, 88svh); min-height: 400px; isolation: isolate; overflow: hidden; background: #181818; }
.ink-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -3; will-change: transform; }
.ink-shade { position: absolute; inset: 0; background: #181818; z-index: -2; }
.ink-caption { text-align: center; padding: 30px 24px 0; position: relative; z-index: 2; }
.ink-caption h1 { font: 400 40px/1.35 var(--reading-title); margin: 0 0 12px; color: #eeeee7; letter-spacing: 0; }
.ink-caption h1.ink-brand-small { font-size: 16px; margin-bottom: 18px; color: #b1bfb5; }
.ink-caption h2 { font: 400 25px/1.5 var(--reading-title); margin: 0 0 12px; color: #eeeee7; }
.ink-caption p { font-size: 14px; line-height: 1.9; margin: 0 auto; color: #d4dbd4; max-width: 25em; word-break: keep-all; }
.ink-visuals { position: absolute; inset: 180px 28px 100px; }
.ink-scene { position: absolute; inset: 0; will-change: transform, opacity; pointer-events: none; }
.ink-chart, .ink-result { max-width: 360px; max-height: 430px; margin: auto; background: none; color: #eeeee7; padding: 28px 12px; text-align: center; }
.ink-paper-label { display: block; font: 15px var(--reading-title); color: #b7c4b8; padding-bottom: 18px; border-bottom: 1px solid #687469; }
.ink-pillars { display: grid; grid-template-columns: repeat(4,1fr); padding: 18px 0; }
.ink-pillars > div { display: flex; flex-direction: column; align-items: center; gap: 18px; border-right: 1px solid #687469; }
.ink-pillars > div:last-child { border-right: 0; }
.ink-pillars small { font: 12px var(--serif); color: #c0cbbf; }
.ink-pillars b { font: 400 42px/1.2 var(--reading-title); }
.ink-chart > p { margin: 8px 0; font: 14px/1.5 var(--reading-title); }
.ink-chart > small, .ink-result > small { font: 11px/1.8 var(--serif); color: #acb9ad; }
.ink-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 14px 18px; max-width: 340px; max-height: 400px; margin: auto; padding: 8px; }
.ink-cards img { width: 100%; height: 100%; object-fit: contain; opacity: var(--reveal, 1); transform: translateY(calc((1 - var(--reveal, 1)) * 40px)) rotate(var(--card-angle)); }
.ink-result { text-align: left; padding-inline: 24px; }
.ink-result h3 { font: 400 32px/1.6 var(--reading-title); margin: 22px 0 20px; }
.ink-result p { font: 13px/1.9 var(--serif); margin: 0; }
.ink-result-note { border-top: 1px solid #687469; margin-top: 22px; padding-top: 18px; font: 14px/1.8 var(--reading-title); }
.ink-result > small { display: block; margin-top: 16px; }
.ink-controls { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #181818f5; padding: 18px 24px; }
.ink-controls ol { display: flex; gap: 14px; padding: 0; margin: 0; list-style: none; font-size: 11px; color: #9ba99f; }
.ink-controls li[aria-current] { color: #f1f0e9; text-decoration: underline; text-underline-offset: 6px; }
.ink-controls button { display: inline-flex; align-items: center; gap: 10px; color: #f1f0e9; background: none; border: 1px solid #68756b; border-radius: 2px; padding: 10px 14px; min-height: 44px; font: 12px var(--serif); cursor: pointer; }
.ink-controls .ui-icon { transform: rotate(180deg); width: 16px; height: 16px; }
.ink-controls .ink-chapter-button { padding: 10px 0; border: 0; color: #adb9af; min-width: 36px; }
.ink-controls .ink-chapter-button[aria-current] { color: #f1f0e9; text-decoration: underline; text-underline-offset: 7px; }
.ink-progress { position: absolute; bottom: 0; height: 2px; width: 100%; background: #424c44; }
.ink-progress span { display: block; width: 100%; height: 100%; background: #bdcbbd; transform: scaleX(var(--journey)); transform-origin: left; }
#reading-menu-title { scroll-margin-top: 24px; }
@media(max-width:360px) {
  .ink-journey { margin-inline: -20px; }
  .ink-caption { padding: 24px 20px 0; }
  .ink-caption h2 { font-size: 22px; }
  .ink-visuals { inset: 170px 20px 90px; }
  .ink-chart, .ink-result { padding: 20px 16px; }
  .ink-controls { padding: 16px 20px; }
  .ink-controls ol { gap: 10px; }
}
@media(max-height:740px) {
  .ink-stage { min-height: 360px; }
  .ink-caption { padding-top: 20px; }
  .ink-caption h1 { font-size: 32px; }
  .ink-caption h1.ink-brand-small { margin-bottom: 8px; }
  .ink-caption h2 { font-size: 22px; margin-bottom: 6px; }
  .ink-visuals { top: 135px; bottom: 78px; }
  .ink-chart, .ink-result { padding: 12px 18px; }
  .ink-paper-label { padding-bottom: 8px; font-size: 12px; }
  .ink-pillars { padding: 8px 0; }
  .ink-pillars > div { gap: 6px; }
  .ink-pillars b { font-size: 25px; }
  .ink-result h3 { font-size: 23px; line-height: 1.4; margin: 10px 0; }
  .ink-result-note { margin-top: 8px; padding-top: 8px; font-size: 12px; }
  .ink-result > small { margin-top: 8px; }
}
@media(prefers-reduced-motion:reduce) {
  .ink-journey { height: auto; }
  .ink-stage { position: relative; height: min(560px,75svh); }
  .ink-scene, .ink-backdrop { will-change: auto; }
}

/* Installed-app safe areas and visible chrome determine the actual stage size. */
.reading-app { --safe-top: env(safe-area-inset-top,0px); --safe-bottom: env(safe-area-inset-bottom,0px); --header-height: 68px; --bottom-height: 0px; }
.home-stage .site-header { position: sticky; top: 0; z-index: 50; max-width: none; margin-inline: -24px; padding: calc(10px + var(--safe-top)) 24px 10px; background: #191919; border-bottom: 1px solid #373737; }
.ink-stage { position: relative; top: 0; height: min(640px,calc(var(--view-height,100svh) - var(--header-height) - max(var(--bottom-height),var(--safe-bottom)) - 68px)); min-height: 340px; display: flex; flex-direction: column; container-type: size; touch-action: pan-y pinch-zoom; }
.ink-caption { flex: 0 0 auto; padding-bottom: 12px; }
.ink-visuals { position: relative; inset: auto; flex: 1 1 0; min-height: 0; margin: 8px 28px 18px; }
.ink-controls { position: relative; inset: auto; flex: 0 0 auto; }
.ink-chart,.ink-result { max-height: 100%; }
#reading-menu-title { scroll-margin-top: calc(var(--header-height) + 20px); }
@container(max-height:700px) {
  .ink-caption { padding: 16px 20px 8px; }
  .ink-caption h1.ink-brand-small { display: none; }
  .ink-caption h2 { font-size: 22px; margin-bottom: 8px; }
  .ink-caption p { font-size: 12px; }
  .ink-visuals { margin: 8px 24px 12px; }
  .ink-chart,.ink-result { padding: 8px 12px; }
  .ink-paper-label { padding-bottom: 8px; font-size: 12px; }
  .ink-pillars { padding: 10px 0; }
  .ink-pillars > div { gap: 8px; }
  .ink-pillars b { font-size: 28px; }
  .ink-result h3 { font-size: 25px; line-height: 1.4; margin: 12px 0; }
  .ink-result-note { margin-top: 12px; padding-top: 10px; font-size: 12px; }
  .ink-result > small { margin-top: 10px; }
  .ink-controls { padding: 12px 20px; }
}
@container(max-height:440px) {
  .ink-caption { padding-top: 10px; }
  .ink-caption h2 { font-size: 20px; margin-bottom: 4px; }
  .ink-visuals { margin-block: 4px; }
  .ink-paper-label { display: none; }
  .ink-result h3 { font-size: 21px; margin: 4px 0 8px; }
  .ink-result p,.ink-result-note { font-size: 11px; line-height: 1.65; }
  .ink-result > small { font-size: 9px; margin-top: 6px; }
  .ink-pillars { padding: 4px 0; }
  .ink-pillars > div { gap: 4px; }
  .ink-pillars b { font-size: 23px; }
  .ink-chart > p { font-size: 12px; margin: 4px 0; }
}
@media(max-width:360px) { .home-stage .site-header { margin-inline: -20px; padding-inline: 20px; } }
@media(prefers-reduced-motion:reduce) { .ink-stage { position: relative; top: 0; } }
.ink-scene { opacity: 0 !important; visibility: hidden; transform: translateX(12px); transition: opacity .25s ease, transform .25s ease; }
.ink-journey[data-chapter="0"] .ink-opening,
.ink-journey[data-chapter="1"] .ink-chart,
.ink-journey[data-chapter="2"] .ink-cards,
.ink-journey[data-chapter="3"] .ink-result { opacity: 1 !important; visibility: visible; transform: none; }
.ink-shade { transition: opacity .25s ease; }
.ink-pagination { display: flex; align-items: center; gap: 6px; }
.ink-pagination span { min-width: 52px; text-align: center; color: #c8c8c2; font-size: 11px; font-variant-numeric: tabular-nums; }
.ink-side-nav { position: absolute; inset: 0 4px 68px; display: flex; align-items: center; justify-content: space-between; z-index: 3; pointer-events: none; }
.ink-side-nav button { display: inline-flex; align-items: center; width: 44px; height: 44px; justify-content: center; padding: 0; border: 1px solid #ffffff30; border-radius: 50%; background: #191919d9; color: #f1f0e9; cursor: pointer; pointer-events: auto; }
.ink-side-nav button:hover:not(:disabled) { background: #353535; border-color: #ffffff80; }
.ink-side-nav button:disabled { opacity: .25; cursor: default; }
.ink-side-nav .ui-icon { width: 20px; height: 20px; }
.ink-side-nav .ink-prev .ui-icon { transform: rotate(-90deg); }
.ink-side-nav .ink-next .ui-icon { transform: rotate(90deg); }
.ink-visuals { margin-inline: 50px; }
.ink-introduction { margin: 18px auto 0; }
/* Keep contrast over the white paper regardless of the image crop. */
.ink-journey[data-chapter="0"] .ink-caption { isolation: isolate; }
.ink-journey[data-chapter="0"] .ink-caption::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, #191919e6 0, #191919e6 calc(100% - 40px), #19191900 100%);
}
.ink-introduction h2 { font-size: 26px; line-height: 1.4; margin-bottom: 10px; }
.ink-introduction p { color: #e0e0d9; font-size: 13px; line-height: 1.9; }
.ink-intro-steps { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; color: #d8c798; font-size: 11px; }
@container(max-height:520px) {
  .ink-introduction { margin-top: 14px; }
  .ink-introduction h2 { font-size: 22px; margin-bottom: 8px; }
  .ink-introduction p { font-size: 12px; line-height: 1.7; }
  .ink-intro-steps { margin-top: 12px; }
}
.ink-controls > button { white-space: nowrap; padding-inline: 10px; gap: 6px; }
.ink-pagination { gap: 0; }
@media(prefers-reduced-motion:reduce) { .ink-scene,.ink-shade { transition: none; } }

/* ── 메인 장면 캡션: 글자들이 순서대로 떠오르는 연출(장면 전환 시 재생) ── */
.ink-caption > * { animation: ink-rise .7s cubic-bezier(.2,.7,.3,1) both; }
.ink-caption > *:nth-child(2) { animation-delay: .22s; }
.ink-caption > *:nth-child(3) { animation-delay: .44s; }
.ink-caption > *:nth-child(4) { animation-delay: .66s; }
.ink-introduction > * { animation: ink-rise .7s cubic-bezier(.2,.7,.3,1) both; }
.ink-introduction > *:nth-child(2) { animation-delay: .2s; }
.ink-introduction > *:nth-child(3) { animation-delay: .4s; }
@keyframes ink-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sample-preview{display:grid;grid-template-columns:108px minmax(0,1fr);gap:20px;align-items:center;margin:24px 0;padding:22px 16px;border:1px solid #77786f;border-radius:6px;background:#232926;color:#f1f0e9;text-decoration:none;transition:border-color .2s}
.sample-preview:hover{border-color:#dbc58e}.sample-preview:focus-visible{outline:2px solid #dbc58e;outline-offset:4px}
.sample-preview-cards{position:relative;height:126px;display:block}.sample-preview-cards img{position:absolute;width:64px;height:108px;object-fit:cover;top:10px;border:1px solid #b6a67e;border-radius:3px;box-shadow:0 6px 14px #0006}
.sample-preview-cards img:nth-child(1){left:0;transform:rotate(-12deg)}.sample-preview-cards img:nth-child(2){left:22px;top:0;z-index:1}.sample-preview-cards img:nth-child(3){left:43px;transform:rotate(12deg)}
.sample-preview-copy{display:grid;gap:10px;text-align:left;min-width:0}.sample-preview-copy small{font-size:11px;color:#b8cdc3}.sample-preview-copy strong{font-size:18px;line-height:1.6;color:#f1f0e9}.sample-preview-copy>span{font-size:12px;line-height:1.8;color:#c8ccc6}.sample-preview-copy b{font-size:13px;color:#e7d5a1}
.sample-report-shell{max-width:600px;margin:auto;padding:0 20px 48px;background:var(--night);color:var(--cream);font-family:var(--serif);min-height:100vh}
.sample-report-shell .site-header .header-records{display:inline-flex;align-items:center;justify-content:center}
.sample-report-nav{display:flex;justify-content:space-between;align-items:center;padding:24px 0;border-bottom:1px solid var(--line)}.sample-report-nav a{color:var(--cream);font-size:14px}
.sample-disclosure{font-size:12px;line-height:1.8;color:var(--dim);border-left:2px solid var(--jade);padding-left:12px;margin:24px 0 32px}
.sample-report-end{display:flex;flex-direction:column;align-items:center;gap:12px;margin:40px 0 32px;padding-top:28px;border-top:1px solid var(--line);text-align:center}
.sample-report-end a{text-decoration:none;letter-spacing:0}
.sample-start{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:60px;padding:16px 20px;border:1px solid #b5a171;border-radius:6px;background:#292820;color:#eee0b7;font-size:16px;font-weight:600;line-height:1.6;transition:background .18s,border-color .18s}
.sample-start:hover{background:#343126;border-color:#e7d5a1}.sample-start .ui-icon{transform:rotate(90deg);width:20px;height:20px}
.sample-method{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;border-radius:4px;color:#cfcec7;font-size:13px;line-height:1.6}.sample-method .ui-icon{width:17px;height:17px}.sample-method:hover{background:#262626;color:#f1f0e9}
.sample-report-end p{margin:0;font-size:12px;color:var(--dim);line-height:1.9}
.reading-app .method-action{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;padding:12px 16px;border:1px solid #686d65;border-radius:6px;background:#262b28;color:#e5e8df;text-decoration:none;font-size:13px;line-height:1.6}
.method-action svg{width:18px;height:18px;flex-shrink:0}.method-action:hover{border-color:#dbc58e}.method-action:focus-visible,.sample-report-nav a:focus-visible{outline:2px solid #dbc58e;outline-offset:3px}
.sample-report-nav{flex-wrap:wrap;gap:12px}.sample-report-nav a{text-decoration:none}.sample-report-nav .sample-brand{font-weight:700;font-size:20px}.sample-report-nav nav{display:flex;flex-wrap:wrap;gap:8px}.sample-report-nav nav a{display:inline-flex;align-items:center;justify-content:center;border:1px solid #686d65;border-radius:6px;padding:9px 12px;min-height:44px;font-size:12px;background:#262b28;color:#f1f0e9}
.site-header .header-topup{color:#e7d5a1!important;border-color:#b6a67e!important}
.sample-report-nav nav a[href*="entry=shop"]{order:-1;background:rgba(200,162,74,.08);color:#e7d5a1;border-color:#454545;gap:7px}
.sample-report-nav nav a[href*="entry=shop"]:before{content:"";display:block;width:28px;height:28px;background:url('/assets/prophecy-orb.webp') center/contain no-repeat}
.sample-report-nav nav a[href*="entry=shop"]:after{content:"+";font-size:13px}
.sample-report-nav nav a[href*="entry=login"]{background:transparent;border-color:#dbc58e;color:#e7d5a1}
.reading-report .reading-question{margin:24px 0 28px;padding:20px 0 22px;border-top:1px solid #b8a571;border-bottom:1px solid #595448;text-align:left}
.reading-report .reading-question h2{margin:0 0 12px;font-size:12px;font-weight:700;color:#dbc58e;line-height:1.5;letter-spacing:0}
.reading-report .reading-question p{margin:0;color:#faf8f0;font-family:var(--serif);font-size:22px;font-weight:700;line-height:1.75;letter-spacing:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
@media(max-width:480px){.reading-report .reading-question p{font-size:19px}.reading-report .reading-question{margin:20px 0 24px;padding:18px 0}}
@media(max-width:360px){.sample-preview{grid-template-columns:82px minmax(0,1fr);gap:16px;padding:18px 12px}.sample-preview-cards img{width:50px;height:86px}.sample-preview-cards img:nth-child(2){left:15px}.sample-preview-cards img:nth-child(3){left:30px}.sample-preview-copy strong{font-size:16px}.sample-report-shell{padding-left:14px;padding-right:14px}}
@media (prefers-reduced-motion: reduce) {
  .ink-caption > *, .ink-introduction > * { animation: none; }
}
