:root {
  --ink: #171821;
  --paper: #f7f1e8;
  --paper-2: #fffaf1;
  --mist: #e8ddd0;
  --teal: #1b5d63;
  --teal-deep: #103f45;
  --rose: #9b4d63;
  --gold: #c99b4a;
  --violet: #4b4569;
  --line: rgba(23, 24, 33, 0.14);
  --shadow: 0 24px 80px rgba(8, 12, 20, 0.22);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #15161d;
}

body {
  min-height: 100vh;
  margin: 0;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(3, 6, 10, 0.94), rgba(5, 10, 15, 0.74) 43%, rgba(5, 10, 15, 0.22) 72%),
    radial-gradient(circle at 22% 30%, rgba(201, 155, 74, 0.16), transparent 36%),
    url("assets/tarot-cover-mystic.png");
  background-size: cover;
  background-position: center right;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 5, 9, 0.06), rgba(3, 5, 9, 0.72)),
    radial-gradient(circle at 76% 74%, rgba(244, 198, 108, 0.14), transparent 34%),
    radial-gradient(circle at 12% 18%, rgba(255, 248, 237, 0.08), transparent 28%);
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 10px;
}

.app:has(.cover-gate) .topbar {
  visibility: hidden;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  color: #fff8ed;
  background: transparent;
  padding: 0;
  text-align: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244, 198, 108, 0.52);
  border-radius: 50%;
  color: #f4c66c;
  font-size: 24px;
  background: rgba(5, 8, 13, 0.34);
  box-shadow: 0 0 28px rgba(244, 198, 108, 0.16);
}

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

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 248, 237, 0.72);
  font-size: 12px;
}

.nav-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid rgba(255, 248, 237, 0.22);
  background: rgba(17, 21, 28, 0.44);
  backdrop-filter: blur(18px);
  border-radius: 999px;
}

.nav-tab {
  min-width: 78px;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: rgba(255, 248, 237, 0.76);
  background: transparent;
  transition: 0.18s ease;
}

.nav-tab.is-active {
  color: var(--ink);
  background: var(--paper);
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 70px;
}

#client-view {
  position: relative;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(370px, 452px);
  align-items: center;
  gap: 62px;
  min-height: calc(100vh - 158px);
}

.workspace-grid.is-reading-mode {
  display: block;
  min-height: 0;
}

.workspace-grid.is-reading-mode .copy-pane,
.workspace-grid.is-package-mode .copy-pane {
  display: none;
}

.workspace-grid.is-package-mode {
  display: block;
  min-height: calc(100vh - 158px);
}

.copy-pane {
  position: relative;
  display: grid;
  align-self: center;
  max-width: 590px;
  color: #fff8ed;
  padding: 36px 0 40px 42px;
  animation: copyPaneRise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.copy-pane::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(244, 198, 108, 0.82), transparent);
  box-shadow: 0 0 24px rgba(244, 198, 108, 0.28);
  animation: lunarLineBreathe 5.8s ease-in-out infinite;
}

.copy-pane::after {
  content: "";
  position: absolute;
  bottom: 16px;
  left: 42px;
  width: min(420px, 72%);
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 198, 108, 0.52), transparent);
  opacity: 0.72;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: #f4c66c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.copy-pane .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #f4c66c;
  opacity: 0;
  animation:
    copyFadeLift 0.9s ease 0.15s forwards,
    tarotWhisperFlicker 12.8s ease-in-out 1.35s infinite;
}

.copy-pane .eyebrow::after {
  content: "";
  display: block;
  width: 86px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 198, 108, 0.78), transparent);
  transform-origin: left center;
  animation: goldLineSweep 4.6s ease-in-out infinite 0.9s;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 24px;
  color: #fffaf1;
  font-size: clamp(58px, 6.8vw, 92px);
  line-height: 0.94;
  font-weight: 850;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
}

.copy-pane h1 {
  max-width: 560px;
  margin-bottom: 26px;
  color: transparent;
  background: linear-gradient(108deg, #fffaf1 0%, #fffaf1 24%, #d7ecff 38%, #f4c66c 50%, #fff8ed 66%, #dbeeff 100%);
  background-size: 240% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  animation:
    copyTitleReveal 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s forwards,
    moonTextShimmer 12s ease-in-out 1.1s infinite,
    moonTextGlow 8.4s ease-in-out 1.1s infinite,
    tarotTitleFlicker 14s ease-in-out 1.45s infinite;
}

.nowrap {
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.lead {
  display: grid;
  gap: 8px;
  max-width: 600px;
  color: rgba(255, 248, 237, 0.86);
  font-size: 18px;
  line-height: 1.82;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.54);
}

.lead span {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  animation:
    copyFadeLift 0.95s ease forwards,
    tarotWhisperFlicker 15.2s ease-in-out 1.6s infinite;
}

.lead span:nth-child(1) {
  animation-delay: 0.58s;
}

.cover-note {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: max-content;
  max-width: calc(100vw - 40px);
  margin: 0;
  color: rgba(255, 248, 237, 0.5);
  font-size: 12px;
  line-height: 1.65;
  white-space: nowrap;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.workspace-grid.is-reading-mode + .cover-note,
.workspace-grid.is-package-mode + .cover-note {
  display: none;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.trust-row span {
  border: 1px solid rgba(244, 198, 108, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 248, 237, 0.84);
  background: rgba(5, 8, 13, 0.42);
  backdrop-filter: blur(12px);
}

.tool-panel,
.surface {
  border: 1px solid rgba(244, 198, 108, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.38);
}

.tool-panel {
  min-height: 490px;
  padding: 28px;
  backdrop-filter: blur(22px);
}

.tool-panel:has(.cover-gate) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tool-panel.is-reading-panel {
  width: min(100%, 1040px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-color: rgba(244, 198, 108, 0.28);
  background: rgba(6, 7, 12, 0.86);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
}

.tool-panel.is-package-panel {
  width: min(100%, 1080px);
  min-height: 0;
  margin: 0 auto;
  padding: 34px;
  overflow: hidden;
  color: #fff8ed;
  border-color: rgba(244, 198, 108, 0.3);
  background:
    linear-gradient(145deg, rgba(6, 7, 12, 0.94), rgba(10, 18, 29, 0.88) 48%, rgba(35, 21, 40, 0.86)),
    radial-gradient(circle at 88% 8%, rgba(244, 198, 108, 0.16), transparent 34%),
    url("assets/tarot-cover-mystic.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
}

.surface {
  padding: 30px;
}

.stack {
  display: grid;
  gap: 20px;
}

.cover-gate {
  position: relative;
  display: block;
  min-height: 434px;
  margin: -8px;
  border-radius: 0;
  padding: 30px;
  color: #fff8ed;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

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

.cover-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: 999px;
  padding: 7px 11px;
  color: rgba(255, 248, 237, 0.78);
  background: rgba(255, 248, 237, 0.08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.cover-cta {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: max-content;
  min-width: 190px;
  min-height: 52px;
  margin-inline: auto;
  transform: none;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.45s ease,
    filter 0.35s ease,
    transform 0.12s ease;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 248, 237, 0.08),
    inset 0 1px 0 rgba(255, 248, 237, 0.12);
  background: linear-gradient(135deg, #7e2f51, var(--teal));
}

.primary-button.cover-cta:hover,
.primary-button.cover-cta:focus-visible {
  transform: none;
  filter: brightness(1.06);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(244, 198, 108, 0.16),
    inset 0 1px 0 rgba(255, 248, 237, 0.16);
}

.primary-button.cover-cta:active {
  transform: scale(0.985);
  filter: brightness(0.98);
}

.cover-cta > span {
  animation: coverStarBreathe 3.4s ease-in-out infinite;
}

@keyframes coverStarBreathe {
  0%,
  100% {
    opacity: 0.72;
    text-shadow: 0 0 0 rgba(255, 242, 191, 0);
  }

  50% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 242, 191, 0.72);
  }
}

.package-selection {
  display: grid;
  gap: 20px;
}

.package-selection-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.package-list {
  display: grid;
  gap: 12px;
}

.prize-selection {
  display: grid;
  gap: 26px;
}

.prize-portal {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(260px, 0.84fr);
  gap: 18px;
  align-items: stretch;
}

.prize-portal #prize-wheel-host {
  display: grid;
  min-width: 0;
}

.prize-price-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  border: 1px solid rgba(255, 248, 237, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff8ed;
  background:
    radial-gradient(circle at 14% 10%, rgba(244, 198, 108, 0.12), transparent 34%),
    rgba(7, 12, 19, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
}

.prize-price-panel h3 {
  margin-bottom: 0;
  color: #fffaf1;
  font-size: 24px;
}

.prize-price-panel p {
  margin: 0;
  color: rgba(255, 248, 237, 0.72);
  line-height: 1.7;
}

.prize-price-preview {
  display: grid;
  gap: 8px;
}

.prize-price-preview span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  border: 1px solid rgba(255, 248, 237, 0.12);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 248, 237, 0.07);
}

.prize-price-preview strong {
  color: rgba(255, 248, 237, 0.82);
  font-size: 13px;
}

.prize-price-preview em {
  color: #f4c66c;
  font-style: normal;
  font-weight: 900;
}

.package-prize-note {
  margin: 10px 0 0;
  color: rgba(244, 198, 108, 0.86);
  font-size: 14px;
  font-weight: 750;
}

.package-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(23, 24, 33, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 253, 248, 0.74);
}

.package-card.is-featured {
  border-color: rgba(201, 155, 74, 0.55);
  background:
    linear-gradient(135deg, rgba(201, 155, 74, 0.16), rgba(27, 93, 99, 0.08)),
    rgba(255, 253, 248, 0.86);
}

.package-card h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.package-card p {
  margin-bottom: 0;
  color: rgba(23, 24, 33, 0.64);
  line-height: 1.65;
}

.package-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.package-badge {
  border-radius: 999px;
  padding: 4px 8px;
  color: #fffaf1;
  background: var(--rose);
  font-size: 12px;
  font-weight: 850;
}

.package-price {
  color: var(--teal-deep);
  font-size: 22px;
  font-weight: 900;
}

.package-original-price {
  color: rgba(23, 24, 33, 0.42);
  font-size: 13px;
  font-weight: 850;
  text-decoration: line-through;
}

.package-discount-chip {
  border: 1px solid rgba(201, 155, 74, 0.38);
  border-radius: 999px;
  padding: 4px 8px;
  color: #7c5a22;
  background: rgba(244, 198, 108, 0.14);
  font-size: 12px;
  font-weight: 850;
}

.package-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.package-features li {
  border-radius: 999px;
  padding: 5px 8px;
  color: rgba(23, 24, 33, 0.68);
  background: rgba(27, 93, 99, 0.08);
  font-size: 12px;
  font-weight: 750;
}

.package-card .primary-button {
  min-width: 104px;
  white-space: nowrap;
}

.tool-panel.is-package-panel .package-selection {
  gap: 26px;
}

.tool-panel.is-package-panel .package-selection-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 248, 237, 0.14);
}

.tool-panel.is-package-panel .package-selection-head h2 {
  color: #fffaf1;
  font-size: 40px;
}

.tool-panel.is-package-panel .package-selection-head .link-button {
  color: rgba(244, 198, 108, 0.86);
}

.tool-panel.is-package-panel .package-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-panel.is-package-panel .package-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 226px;
  border-color: rgba(255, 248, 237, 0.16);
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.1), rgba(255, 248, 237, 0.04)),
    rgba(7, 12, 19, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
  backdrop-filter: blur(18px);
}

.tool-panel.is-package-panel .package-card.is-wide {
  grid-column: 1 / -1;
  min-height: 190px;
}

.tool-panel.is-package-panel .package-card.is-featured {
  border-color: rgba(244, 198, 108, 0.58);
  background:
    linear-gradient(145deg, rgba(244, 198, 108, 0.14), rgba(27, 93, 99, 0.14)),
    rgba(8, 12, 18, 0.76);
}

.tool-panel.is-package-panel .package-card h3 {
  color: #fffaf1;
  font-size: 22px;
}

.tool-panel.is-package-panel .package-card p {
  color: rgba(255, 248, 237, 0.72);
}

.tool-panel.is-package-panel .package-price {
  color: #f4c66c;
}

.tool-panel.is-package-panel .package-original-price {
  color: rgba(255, 248, 237, 0.42);
}

.tool-panel.is-package-panel .package-discount-chip {
  color: #fff8ed;
  background: rgba(244, 198, 108, 0.16);
}

.tool-panel.is-package-panel .package-features li {
  color: rgba(255, 248, 237, 0.76);
  background: rgba(255, 248, 237, 0.1);
}

.tool-panel.is-package-panel .package-card .primary-button {
  justify-self: start;
  min-width: 138px;
  margin-top: 4px;
}

.tool-panel.is-package-panel .microcopy {
  color: rgba(255, 248, 237, 0.62);
}

.prize-wheel-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 194px;
  align-items: center;
  gap: 20px;
  min-height: 226px;
  border: 1px solid rgba(244, 198, 108, 0.36);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff8ed;
  background:
    radial-gradient(circle at 82% 28%, rgba(244, 198, 108, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(16, 63, 69, 0.48), rgba(7, 12, 19, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
  overflow: hidden;
}

.prize-selection .prize-wheel-card {
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 420px;
  padding: 28px;
}

.prize-wheel-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.prize-wheel-copy h3 {
  margin-bottom: 0;
  color: #fffaf1;
  font-size: 22px;
}

.prize-wheel-copy p {
  margin-bottom: 0;
  color: rgba(255, 248, 237, 0.7);
  line-height: 1.65;
}

.prize-wheel-copy strong {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid rgba(244, 198, 108, 0.34);
  border-radius: 999px;
  padding: 6px 10px;
  color: #f4c66c;
  background: rgba(5, 8, 13, 0.34);
  font-size: 13px;
}

.prize-wheel-limit {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  color: rgba(255, 248, 237, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.prize-wheel-limit::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #f4c66c;
  box-shadow: 0 0 10px rgba(244, 198, 108, 0.7);
  content: "";
  flex: 0 0 auto;
}

.prize-wheel-limit.is-loading::before {
  animation: prize-limit-pulse 1.1s ease-in-out infinite;
}

.prize-wheel-limit.is-exhausted {
  color: rgba(255, 248, 237, 0.52);
}

.prize-wheel-limit.is-exhausted::before {
  background: rgba(255, 248, 237, 0.38);
  box-shadow: none;
}

@keyframes prize-limit-pulse {
  50% {
    opacity: 0.36;
    transform: scale(0.72);
  }
}

.prize-wheel-stage {
  position: relative;
  justify-self: center;
  width: 186px;
  aspect-ratio: 1;
}

.prize-selection .prize-wheel-stage {
  width: min(280px, 100%);
}

.prize-wheel {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(244, 198, 108, 0.54);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(5, 8, 13, 0.2) 0 24%, transparent 25%),
    conic-gradient(
      from -90deg,
      rgba(244, 198, 108, 0.92) 0deg 60deg,
      rgba(126, 47, 81, 0.9) 60deg 120deg,
      rgba(27, 93, 99, 0.92) 120deg 180deg,
      rgba(255, 248, 237, 0.78) 180deg 240deg,
      rgba(107, 43, 64, 0.92) 240deg 300deg,
      rgba(201, 155, 74, 0.86) 300deg 360deg
    );
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.25),
    inset 0 0 0 7px rgba(5, 8, 13, 0.22);
  transform: rotate(0deg);
  will-change: transform;
}

.prize-wheel span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  min-height: 22px;
  margin: -11px 0 0 -23px;
  color: #fffaf1;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
  z-index: 1;
}

.prize-selection .prize-wheel span {
  width: 58px;
  min-height: 24px;
  margin: -12px 0 0 -29px;
  font-size: 12px;
}

.prize-wheel-label-1 {
  transform: rotate(-60deg) translateY(-50px) rotate(60deg);
}

.prize-wheel-label-2 {
  transform: translateY(-50px);
}

.prize-wheel-label-3 {
  transform: rotate(60deg) translateY(-50px) rotate(-60deg);
}

.prize-wheel-label-4 {
  transform: rotate(120deg) translateY(-50px) rotate(-120deg);
}

.prize-wheel-label-5 {
  transform: rotate(180deg) translateY(-50px) rotate(-180deg);
}

.prize-wheel-label-6 {
  transform: rotate(240deg) translateY(-50px) rotate(-240deg);
}

.prize-selection .prize-wheel-label-1 {
  transform: rotate(-60deg) translateY(-78px) rotate(60deg);
}

.prize-selection .prize-wheel-label-2 {
  transform: translateY(-78px);
}

.prize-selection .prize-wheel-label-3 {
  transform: rotate(60deg) translateY(-78px) rotate(-60deg);
}

.prize-selection .prize-wheel-label-4 {
  transform: rotate(120deg) translateY(-78px) rotate(-120deg);
}

.prize-selection .prize-wheel-label-5 {
  transform: rotate(180deg) translateY(-78px) rotate(-180deg);
}

.prize-selection .prize-wheel-label-6 {
  transform: rotate(240deg) translateY(-78px) rotate(-240deg);
}

.prize-wheel.is-spinning {
  filter: saturate(1.08) brightness(1.03);
}

.prize-wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  border-right: 9px solid transparent;
  border-left: 9px solid transparent;
  border-top: 18px solid #fffaf1;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.34));
  transform: translateX(-50%);
  transform-origin: 50% 0;
}

.prize-wheel-stage.is-spinning .prize-wheel-pointer {
  animation: prize-wheel-pointer-tick 150ms ease-in-out infinite;
}

@keyframes prize-wheel-pointer-tick {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  45% {
    transform: translateX(-50%) rotate(-8deg);
  }

  72% {
    transform: translateX(-50%) rotate(4deg);
  }
}

.prize-wheel-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(244, 198, 108, 0.64);
  border-radius: 50%;
  color: #fffaf1;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 248, 237, 0.2), transparent 34%),
    linear-gradient(135deg, var(--teal), var(--rose));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  font-size: 18px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.prize-wheel-button:disabled {
  cursor: wait;
  opacity: 0.82;
  box-shadow:
    0 0 0 8px rgba(244, 198, 108, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.prize-wheel-button[data-limit-state="exhausted"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.payment-page {
  display: grid;
  gap: 26px;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(440px, 1.22fr);
  min-height: 580px;
}

.payment-order-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 28px 38px 28px 6px;
}

.payment-order-label {
  margin-top: 28px;
  color: rgba(255, 248, 237, 0.6);
  font-size: 12px;
}

.payment-order-panel h3 {
  margin: 8px 0 4px;
  font-size: 27px;
}

.payment-total {
  margin-top: 10px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  line-height: 1;
}

.payment-order-panel > p:not(.panel-kicker, .payment-discount) {
  margin: 24px 0 0;
  color: rgba(255, 248, 237, 0.68);
  line-height: 1.75;
}

.payment-discount {
  width: fit-content;
  margin: 16px 0 0;
  border: 1px solid rgba(244, 198, 108, 0.4);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--gold);
  font-size: 11px;
}

.payment-email-line {
  display: grid;
  gap: 6px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 248, 237, 0.14);
}

.payment-email-line span {
  color: rgba(255, 248, 237, 0.54);
  font-size: 11px;
}

.payment-email-line strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.payment-collection-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 28px 0 28px 38px;
  border-left: 1px solid rgba(255, 248, 237, 0.14);
}

.payment-collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.payment-collection-head h3 {
  margin: 5px 0 0;
  font-size: 22px;
}

.payment-collection-head > span {
  color: rgba(255, 248, 237, 0.58);
  font-size: 12px;
  white-space: nowrap;
}

.payment-collection-head > span strong {
  margin-left: 4px;
  color: var(--gold);
  font-size: 18px;
}

.payment-loading {
  margin: 92px 0;
  color: rgba(255, 248, 237, 0.55);
  text-align: center;
}

.payment-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid rgba(255, 248, 237, 0.16);
  border-radius: 7px;
  background: rgba(5, 8, 13, 0.34);
}

.payment-method-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 248, 237, 0.66);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.payment-method-tab span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.payment-method-tab.payment-method-alipay span {
  background: #1677ff;
}

.payment-method-tab.payment-method-wechat span {
  background: #07c160;
}

.payment-method-tab.is-active {
  color: #fffaf1;
  background: rgba(255, 248, 237, 0.11);
  box-shadow: inset 0 0 0 1px rgba(244, 198, 108, 0.25);
}

.payment-qr-stage {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(340px, 100%);
  margin: 24px auto 0;
}

.payment-qr-stage img {
  display: block;
  width: min(300px, 100%);
  aspect-ratio: 1;
  border: 8px solid #fff;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
}

.payment-qr-stage figcaption {
  display: grid;
  gap: 4px;
  text-align: center;
}

.payment-qr-stage figcaption strong {
  font-size: 15px;
}

.payment-qr-stage figcaption span,
.payment-note {
  color: rgba(255, 248, 237, 0.58);
  font-size: 11px;
  line-height: 1.6;
}

.payment-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 24px;
  border: 1px dashed rgba(255, 248, 237, 0.2);
  border-radius: var(--radius);
  padding: 72px 20px;
  color: rgba(255, 248, 237, 0.6);
  text-align: center;
}

.payment-empty strong {
  color: #fffaf1;
}

.payment-note {
  margin: 18px 0 0;
  text-align: center;
}

.payment-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.payment-actions .link-button {
  justify-self: center;
}

.selected-package {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(201, 155, 74, 0.42);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(201, 155, 74, 0.12);
}

.selected-package span,
.selected-package small {
  color: rgba(23, 24, 33, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.selected-package strong {
  color: var(--ink);
  font-size: 18px;
}

.align-start {
  justify-self: start;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(23, 24, 33, 0.72);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: #fffdf8;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(27, 93, 99, 0.13);
}

.date-input-group,
.time-input-group {
  display: grid;
  align-items: center;
  gap: 8px;
}

.date-input-group {
  grid-template-columns: minmax(86px, 1.25fr) auto minmax(56px, 0.8fr) auto minmax(56px, 0.8fr) auto;
}

.time-input-group {
  grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr) auto;
}

.date-input-group span,
.time-input-group span {
  color: rgba(23, 24, 33, 0.58);
  font-size: 14px;
  font-weight: 800;
}

.date-part,
.time-part {
  text-align: center;
  font-weight: 850;
}

.birth-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.75fr);
  gap: 22px;
}

.birth-time-title,
.birth-place-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.birth-time-title small,
.birth-place-title small {
  border: 1px solid rgba(244, 198, 108, 0.28);
  border-radius: 999px;
  padding: 2px 7px;
  color: rgba(244, 198, 108, 0.86);
  font-size: 11px;
  font-weight: 750;
}

.birth-place-field {
  display: grid;
  gap: 10px;
}

.birth-place-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.direction-field {
  display: grid;
  gap: 10px;
}

.field-label {
  font-size: 14px;
  font-weight: 700;
}

.direction-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.direction-option {
  position: relative;
  display: block;
  color: inherit;
}

.direction-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.direction-option span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: 999px;
  padding: 9px 10px;
  color: rgba(255, 248, 237, 0.78);
  background: rgba(255, 248, 237, 0.08);
  font-size: 14px;
  font-weight: 850;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.direction-option:hover span,
.direction-option input:focus-visible + span {
  border-color: rgba(244, 198, 108, 0.46);
  background: rgba(244, 198, 108, 0.12);
}

.direction-option input:checked + span {
  border-color: rgba(244, 198, 108, 0.72);
  color: #fffaf1;
  background:
    linear-gradient(135deg, rgba(27, 93, 99, 0.88), rgba(107, 43, 64, 0.64)),
    rgba(244, 198, 108, 0.16);
  box-shadow: 0 0 0 3px rgba(244, 198, 108, 0.12);
}

.account-page {
  display: grid;
  gap: 26px;
  min-height: 700px;
  padding: 34px;
  color: #fff8ed;
  background:
    linear-gradient(118deg, rgba(5, 7, 12, 0.98), rgba(9, 14, 21, 0.92) 54%, rgba(24, 20, 31, 0.9)),
    url("assets/tarot-hero.png");
  background-position: center;
  background-size: cover;
}

.account-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 248, 237, 0.16);
  padding-bottom: 20px;
}

.account-page-hero h2 {
  max-width: 720px;
  margin-top: 5px;
  color: #fffaf1;
  font-size: 42px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 10, 16, 0.76);
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.account-visual {
  position: relative;
  display: grid;
  align-content: end;
  min-width: 0;
  overflow: hidden;
  padding: 42px;
  border-right: 1px solid rgba(255, 248, 237, 0.14);
  background:
    linear-gradient(180deg, rgba(4, 8, 13, 0.2), rgba(4, 8, 13, 0.94)),
    url("assets/tarot-cover-mystic.png");
  background-position: center;
  background-size: cover;
}

.account-visual::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(201, 155, 74, 0.22);
  pointer-events: none;
}

.account-moon {
  position: absolute;
  top: 50px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(244, 198, 108, 0.5);
  border-radius: 50%;
  color: #f4c66c;
  background: rgba(4, 8, 13, 0.62);
  box-shadow: 0 0 44px rgba(244, 198, 108, 0.15);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  transform: translateX(-50%);
}

.account-visual > p,
.account-visual > h3 {
  position: relative;
  z-index: 1;
}

.account-visual h3 {
  max-width: 430px;
  margin: 8px 0 28px;
  color: #fffaf1;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 30px;
  line-height: 1.35;
}

.account-constellation {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(280px, 78%);
}

.account-constellation::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(244, 198, 108, 0.32);
}

.account-constellation span {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4c66c;
  box-shadow: 0 0 12px rgba(244, 198, 108, 0.65);
}

.account-constellation span:nth-child(2),
.account-constellation span:nth-child(4) {
  width: 3px;
  height: 3px;
}

.account-entry {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 34px 38px;
  background: rgba(8, 12, 18, 0.78);
}

.account-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border: 1px solid rgba(255, 248, 237, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 248, 237, 0.04);
}

.account-mode-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 248, 237, 0.66);
  background: transparent;
  font-weight: 800;
}

.account-mode-tabs button.is-active {
  color: #fffaf1;
  background: rgba(27, 93, 99, 0.88);
  box-shadow: inset 0 0 0 1px rgba(244, 198, 108, 0.18);
}

.account-form {
  display: grid;
  gap: 17px;
}

.account-form-heading {
  margin-bottom: 2px;
}

.account-form-heading h3 {
  margin-top: 5px;
  color: #fffaf1;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 27px;
}

.account-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 237, 0.76);
  font-size: 13px;
  font-weight: 750;
}

.account-form input {
  min-height: 46px;
}

.account-form .primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.customer-account-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(100%, 420px);
  padding-left: 18px;
  border-left: 1px solid rgba(255, 248, 237, 0.18);
}

.customer-account-chip > span {
  overflow: hidden;
  color: rgba(255, 248, 237, 0.72);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intake-page input[readonly],
.activation-form input[readonly] {
  color: rgba(23, 24, 33, 0.64);
  background: #e8e2d9;
  cursor: default;
}

.intake-page {
  display: grid;
  gap: 28px;
  padding: 34px;
  color: #fff8ed;
  background:
    linear-gradient(145deg, rgba(6, 7, 12, 0.96), rgba(15, 19, 27, 0.92) 48%, rgba(30, 21, 34, 0.88)),
    linear-gradient(180deg, rgba(244, 198, 108, 0.11), transparent 34%),
    url("assets/tarot-hero.png");
  background-size: cover;
  background-position: center;
}

.intake-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 248, 237, 0.16);
  padding-bottom: 22px;
}

.intake-page-hero h2 {
  color: #fffaf1;
  font-size: 42px;
  max-width: 740px;
}

.intake-form-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
  width: 100%;
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(9, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 237, 0.08),
    0 22px 70px rgba(0, 0, 0, 0.28);
}

.intake-form-panel > .birth-fields,
.intake-form-panel > .birth-place-field,
.intake-form-panel > .direction-field,
.intake-form-panel > label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.intake-form-panel > label:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.intake-form-panel > .primary-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 280px;
}

.intake-page label,
.intake-page .date-label,
.intake-page .birth-time-label,
.intake-page .birth-place-field,
.intake-page .direction-field {
  display: grid;
  gap: 10px;
  color: rgba(255, 248, 237, 0.78);
}

.intake-page .date-input-group span,
.intake-page .time-input-group span {
  color: rgba(255, 248, 237, 0.66);
}

.intake-page textarea {
  min-height: 134px;
}

.primary-button,
.ghost-button,
.link-button {
  border-radius: var(--radius);
  min-height: 44px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.primary-button {
  border: 1px solid var(--teal-deep);
  padding: 12px 16px;
  color: #fffaf1;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.ghost-button {
  border: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.76);
  font-weight: 750;
}

.link-button {
  border: 0;
  min-height: 0;
  padding: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 800;
}

.microcopy {
  margin: -6px 0 0;
  color: rgba(23, 24, 33, 0.58);
  font-size: 13px;
}

.dialogue-page {
  display: grid;
  gap: 22px;
  min-height: 560px;
  padding: 30px;
  color: #fff8ed;
  background:
    linear-gradient(145deg, rgba(6, 7, 12, 0.96), rgba(15, 19, 27, 0.92) 48%, rgba(30, 21, 34, 0.88)),
    radial-gradient(circle at 72% 12%, rgba(244, 198, 108, 0.16), transparent 32%),
    url("assets/tarot-hero.png");
  background-size: cover;
  background-position: center;
}

.dialogue-page .dialogue-head {
  align-items: start;
  border-bottom: 1px solid rgba(255, 248, 237, 0.16);
  padding-bottom: 22px;
}

.dialogue-context {
  min-height: 24px;
  margin: 6px 0 12px;
  color: rgba(255, 248, 237, 0.66);
  font-size: 14px;
  line-height: 1.6;
}

.dialogue-page h2 {
  max-width: 760px;
  color: #fffaf1;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.dialogue-page h2.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.56em;
  height: 0.1em;
  margin-left: 6px;
  border-radius: 999px;
  background: #f4c66c;
  vertical-align: baseline;
  animation: typingCursor 1.15s ease-in-out infinite;
}

.dialogue-page h2.is-personalizing {
  color: rgba(255, 250, 241, 0.72);
  font-size: clamp(24px, 3vw, 34px);
}

.dialogue-personalizing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 172px;
  color: rgba(255, 248, 237, 0.68);
  text-align: center;
}

.dialogue-personalizing span {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid rgba(244, 198, 108, 0.22);
  border-top-color: #f4c66c;
  border-radius: 50%;
  animation: dialogueThinking 1.1s linear infinite;
}

.dialogue-personalizing p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 244, 222, 0.86);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.75;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(244, 198, 108, 0.2);
}

.dialogue-page .progress-ring {
  color: #fffaf1;
  background: conic-gradient(var(--gold) var(--progress), rgba(255, 248, 237, 0.14) 0);
}

.dialogue-page .progress-ring::before {
  background: rgba(6, 7, 12, 0.78);
}

.dialogue-page .option-list {
  gap: 14px;
}

.dialogue-page .option-list.is-waiting {
  pointer-events: none;
}

.dialogue-page .option-card {
  opacity: 0;
  transform: translateY(12px);
  border-color: rgba(255, 248, 237, 0.18);
  color: rgba(255, 248, 237, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.08), rgba(255, 248, 237, 0.03)),
    rgba(9, 12, 18, 0.68);
  transition: opacity 0.58s ease, transform 0.58s ease, border-color 0.16s ease, background 0.16s ease;
}

.dialogue-page .option-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dialogue-page .option-card:hover,
.dialogue-page .option-card.is-selected {
  border-color: rgba(244, 198, 108, 0.58);
  background:
    linear-gradient(135deg, rgba(27, 93, 99, 0.38), rgba(107, 43, 64, 0.32)),
    rgba(244, 198, 108, 0.08);
}

.dialogue-page .option-card span {
  color: rgba(255, 248, 237, 0.62);
}

.dialogue-page .custom-answer-card {
  cursor: text;
}

.dialogue-page .custom-answer-card label {
  color: #fff8ed;
  font-size: 15px;
  font-weight: 750;
}

.dialogue-page .custom-answer-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 248, 237, 0.22);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #fffaf1;
  background: rgba(4, 7, 12, 0.72);
  font: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.dialogue-page .custom-answer-card input::placeholder {
  color: rgba(255, 248, 237, 0.42);
}

.dialogue-page .custom-answer-card input:focus {
  border-color: rgba(244, 198, 108, 0.72);
  background: rgba(7, 12, 18, 0.9);
  box-shadow: 0 0 0 3px rgba(244, 198, 108, 0.1);
}

.dialogue-page > .primary-button {
  justify-self: end;
  min-width: 220px;
}

.dialogue-head,
.section-heading,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--progress), rgba(23, 24, 33, 0.12) 0);
  color: var(--ink);
  font-weight: 850;
}

.progress-ring::before {
  content: attr(data-label);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
}

.progress-10 { --progress: 10%; }
.progress-20 { --progress: 20%; }
.progress-30 { --progress: 30%; }
.progress-40 { --progress: 40%; }
.progress-50 { --progress: 50%; }
.progress-60 { --progress: 60%; }
.progress-70 { --progress: 70%; }
.progress-80 { --progress: 80%; }
.progress-90 { --progress: 90%; }
.progress-100 { --progress: 100%; }

.option-list {
  display: grid;
  gap: 12px;
}

.option-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 15px;
  color: var(--ink);
  background: #fffdf8;
  text-align: left;
}

.option-card strong {
  font-size: 15px;
}

.option-card span {
  color: rgba(23, 24, 33, 0.58);
  font-size: 13px;
  line-height: 1.55;
}

.option-card.is-selected {
  border-color: var(--teal);
  background: rgba(27, 93, 99, 0.09);
  box-shadow: inset 0 0 0 1px rgba(27, 93, 99, 0.18);
}

.spread-choice-list {
  display: grid;
  gap: 10px;
}

.spread-page {
  display: grid;
  gap: 24px;
  padding: 30px;
  color: #fff8ed;
  background:
    linear-gradient(145deg, rgba(6, 7, 12, 0.96), rgba(15, 19, 27, 0.92) 48%, rgba(30, 21, 34, 0.88)),
    linear-gradient(180deg, rgba(244, 198, 108, 0.11), transparent 34%),
    url("assets/tarot-hero.png");
  background-size: cover;
  background-position: center;
}

.spread-page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(255, 248, 237, 0.16);
  padding-bottom: 20px;
}

.spread-page-hero h2 {
  color: #fffaf1;
  font-size: 42px;
}

.spread-page-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
  gap: 20px;
  align-items: start;
}

.spread-choice-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(9, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
}

.spread-choice-panel h3 {
  color: #fffaf1;
  font-size: 22px;
}

.spread-option {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--ink);
  background: #fffdf8;
  text-align: left;
}

.spread-option span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spread-option strong {
  font-size: 15px;
}

.spread-option em {
  border-radius: 999px;
  padding: 4px 8px;
  color: #6d4a16;
  background: rgba(201, 155, 74, 0.18);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.spread-option small,
.pick-head p,
.reading-spread-summary {
  color: rgba(23, 24, 33, 0.58);
  line-height: 1.55;
}

.spread-option.is-selected {
  border-color: var(--teal);
  background: rgba(27, 93, 99, 0.09);
  box-shadow: inset 0 0 0 1px rgba(27, 93, 99, 0.18);
}

.spread-page .spread-option {
  border-color: rgba(255, 248, 237, 0.18);
  color: #fff8ed;
  background: rgba(255, 248, 237, 0.07);
}

.spread-page .spread-option small,
.spread-page .pick-head p,
.spread-page .reading-spread-summary,
.spread-page .carousel-meta {
  color: rgba(255, 248, 237, 0.68);
}

.spread-page .spread-option em {
  color: #f4c66c;
  background: rgba(244, 198, 108, 0.14);
}

.spread-page .spread-option.is-selected {
  border-color: rgba(244, 198, 108, 0.56);
  background: rgba(244, 198, 108, 0.12);
  box-shadow: inset 0 0 0 1px rgba(244, 198, 108, 0.18);
}

.pick-area {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 253, 248, 0.72);
}

.spread-page .pick-area {
  gap: 18px;
  border-color: rgba(255, 248, 237, 0.18);
  padding: 20px;
  background: rgba(9, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
}

.pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pick-head > div {
  min-width: 0;
}

.shuffle-again-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(244, 198, 108, 0.32);
  border-radius: 4px;
  padding: 7px 11px;
  color: #f4c66c;
  background: rgba(244, 198, 108, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.shuffle-again-button:hover:not(:disabled) {
  border-color: rgba(244, 198, 108, 0.62);
  background: rgba(244, 198, 108, 0.14);
}

.shuffle-again-button > span:first-child {
  font-size: 18px;
  line-height: 1;
}

.shuffle-again-button.is-shuffling > span:first-child {
  animation: shuffleButtonTurn 0.85s linear infinite;
}

.shuffle-again-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.spread-page .pick-head h3 {
  color: #fffaf1;
  font-size: 24px;
}

.pick-head p,
.reading-spread-summary {
  margin: 6px 0 0;
}

.position-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.position-pill {
  border: 1px solid rgba(27, 93, 99, 0.22);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--teal-deep);
  background: rgba(27, 93, 99, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.spread-page .position-pill {
  border-color: rgba(244, 198, 108, 0.3);
  color: #f4c66c;
  background: rgba(244, 198, 108, 0.12);
}

.spread-confirm-button {
  justify-self: end;
  min-width: 220px;
}

.card-back {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  min-height: 116px;
  border: 1px solid rgba(23, 24, 33, 0.18);
  border-radius: var(--radius);
  padding: 8px;
  color: rgba(255, 250, 241, 0.9);
  background:
    linear-gradient(160deg, rgba(16, 63, 69, 0.96), rgba(75, 69, 105, 0.96)),
    radial-gradient(circle at 50% 38%, rgba(201, 155, 74, 0.32), transparent 36%);
  box-shadow: 0 10px 28px rgba(8, 12, 20, 0.13);
}

.card-back-face {
  position: absolute;
  inset: 8px;
  overflow: hidden;
  border: 1px solid rgba(244, 198, 108, 0.42);
  border-radius: calc(var(--radius) - 4px);
  background-image: url("assets/card-back.jpg");
  background-size: cover;
  background-position: center;
}

.card-back-face::before,
.card-back-face::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.card-back-face::before {
  inset: 12px;
  border: 1px solid rgba(244, 198, 108, 0.38);
  border-radius: calc(var(--radius) - 7px);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 241, 0.06);
}

.card-back-face::after {
  inset: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 250, 241, 0.08),
    inset 0 -48px 52px rgba(0, 0, 0, 0.18);
}

.carousel-card-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px 9px;
  border: 1px solid rgba(255, 250, 241, 0.18);
  border-radius: calc(var(--radius) - 5px);
  background: rgba(8, 10, 15, 0.48);
  backdrop-filter: blur(10px);
}

.card-back-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 250, 241, 0.38);
  border-radius: 50%;
  color: #f4c66c;
  font-size: 16px;
  font-weight: 900;
}

.card-back small {
  display: block;
  max-width: calc(100% - 12px);
  color: rgba(255, 250, 241, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-back.is-selected {
  border-color: var(--gold);
  background:
    linear-gradient(160deg, rgba(107, 43, 64, 0.98), rgba(27, 93, 99, 0.98)),
    radial-gradient(circle at 50% 38%, rgba(244, 198, 108, 0.38), transparent 36%);
  box-shadow: 0 0 0 3px rgba(201, 155, 74, 0.2), 0 12px 30px rgba(8, 12, 20, 0.16);
}

.card-back.is-selected .card-back-face {
  border-color: rgba(244, 198, 108, 0.8);
}

.card-back.is-selected .carousel-card-overlay {
  border-color: rgba(244, 198, 108, 0.44);
  background: rgba(35, 17, 26, 0.74);
}

.card-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(150px, 220px) 44px;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.card-carousel > .carousel-nav,
.card-carousel > .carousel-card {
  position: relative;
  z-index: 1;
}

.card-carousel > .carousel-nav {
  z-index: 4;
}

.shuffle-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(100%, 430px);
  height: calc(100% + 84px);
  transform: translate(-50%, -50%);
  perspective: 1100px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.shuffle-stage::after {
  content: "";
  position: absolute;
  right: 16%;
  bottom: 5%;
  left: 16%;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.44);
  filter: blur(13px);
  opacity: 0.72;
}

.shuffle-stage-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: calc(20 - var(--layer));
  width: clamp(112px, 38%, 164px);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(244, 198, 108, 0.48);
  border-radius: var(--radius);
  background-image: url("assets/card-back.jpg");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 248, 237, 0.08);
  transform: translate3d(
    calc(-50% + var(--layer) * 0.8px),
    calc(-50% - var(--layer) * 0.7px),
    calc(var(--layer) * -1px)
  );
  transform-origin: 50% 96%;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.shuffle-stage-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(244, 198, 108, 0.28);
  border-radius: calc(var(--radius) - 3px);
  box-shadow: inset 0 -30px 38px rgba(0, 0, 0, 0.15);
}

.shuffle-stage[data-phase="split"] .shuffle-stage-card-left {
  animation: realisticSplitLeft 0.68s cubic-bezier(0.32, 0.72, 0.2, 1) both;
  animation-delay: calc(var(--layer) * 12ms);
}

.shuffle-stage[data-phase="split"] .shuffle-stage-card-right {
  animation: realisticSplitRight 0.68s cubic-bezier(0.32, 0.72, 0.2, 1) both;
  animation-delay: calc(var(--layer) * 12ms);
}

.shuffle-stage[data-phase="riffle"] .shuffle-stage-card-left {
  animation: realisticRiffleLeft 1.02s cubic-bezier(0.22, 0.72, 0.18, 1) both;
  animation-delay: calc(var(--layer) * 34ms);
}

.shuffle-stage[data-phase="riffle"] .shuffle-stage-card-right {
  animation: realisticRiffleRight 1.02s cubic-bezier(0.22, 0.72, 0.18, 1) both;
  animation-delay: calc(var(--layer) * 34ms + 18ms);
}

.shuffle-stage[data-phase="bridge"] .shuffle-stage-card {
  animation: realisticBridge 0.94s cubic-bezier(0.2, 0.74, 0.24, 1) both;
  animation-delay: calc(144ms - var(--layer) * 18ms);
}

.shuffle-stage[data-phase="square"] .shuffle-stage-card-left {
  animation: realisticSquareLeft 0.78s cubic-bezier(0.16, 0.8, 0.22, 1) both;
  animation-delay: calc(var(--layer) * 10ms);
}

.shuffle-stage[data-phase="square"] .shuffle-stage-card-right {
  animation: realisticSquareRight 0.78s cubic-bezier(0.16, 0.8, 0.22, 1) both;
  animation-delay: calc(var(--layer) * 10ms);
}

.carousel-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 24, 33, 0.14);
  border-radius: 50%;
  color: var(--teal-deep);
  background: rgba(255, 253, 248, 0.86);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.carousel-nav:hover {
  border-color: var(--teal);
  background: rgba(27, 93, 99, 0.08);
}

.spread-page .carousel-nav {
  border-color: rgba(255, 248, 237, 0.2);
  color: #f4c66c;
  background: rgba(255, 248, 237, 0.08);
}

.spread-page .carousel-nav:hover {
  border-color: rgba(244, 198, 108, 0.5);
  background: rgba(244, 198, 108, 0.12);
}

.carousel-card {
  width: min(100%, 220px);
  min-height: 280px;
  justify-self: center;
}

.carousel-card.is-looping {
  animation: cardFloat 1.9s ease-in-out infinite;
}

.carousel-card.is-shuffling {
  cursor: wait;
  opacity: 0.24;
  animation: shuffleFocus 1.05s ease-in-out infinite;
}

.carousel-card.is-shuffling .card-back-face {
  animation: shuffleGlow 1.2s ease-in-out infinite;
}

.card-carousel.is-shuffling .carousel-nav,
.pick-area.is-shuffling .card-dot {
  cursor: wait;
}

.card-carousel.is-shuffling .carousel-nav {
  opacity: 0.3;
}

.card-carousel.is-shuffling .carousel-card-overlay {
  border-color: rgba(244, 198, 108, 0.38);
  background: rgba(8, 10, 15, 0.62);
}

.carousel-meta {
  display: grid;
  gap: 4px;
  color: rgba(23, 24, 33, 0.58);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.carousel-meta span:first-child {
  color: var(--teal-deep);
  font-weight: 850;
}

.card-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.card-track.is-shuffling {
  min-height: 45px;
  gap: 3px;
  align-content: center;
}

.card-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(23, 24, 33, 0.2);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.84);
  font-size: 11px;
  font-weight: 850;
}

.card-dot.is-current {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 93, 99, 0.12);
}

.card-dot.is-selected {
  border-color: var(--gold);
  color: #6d4a16;
  background: rgba(201, 155, 74, 0.24);
}

.card-track.is-shuffling .card-dot {
  width: 9px;
  height: 18px;
  border-radius: 3px;
  padding: 0;
  opacity: 0.68;
  background:
    linear-gradient(160deg, rgba(244, 198, 108, 0.2), rgba(27, 93, 99, 0.46)),
    rgba(255, 248, 237, 0.08);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
  animation: shuffleTrackWave 0.74s ease-in-out infinite alternate;
  animation-delay: calc(var(--track-index) * -9ms);
  transform-origin: center bottom;
}

.card-track.is-shuffling .card-dot.is-current {
  border-color: #f4c66c;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(244, 198, 108, 0.18), 0 4px 9px rgba(0, 0, 0, 0.24);
}

.spread-page .card-dot {
  border-color: rgba(255, 248, 237, 0.24);
  color: #fff8ed;
  background: rgba(255, 248, 237, 0.08);
}

.spread-page .card-dot.is-current {
  border-color: #f4c66c;
  box-shadow: 0 0 0 3px rgba(244, 198, 108, 0.14);
}

.spread-page .card-dot.is-selected {
  border-color: #f4c66c;
  color: #241a09;
  background: rgba(244, 198, 108, 0.82);
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.6deg);
  }

  50% {
    transform: translateY(-7px) rotate(0.6deg);
  }
}

@keyframes shuffleFocus {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }

  33% {
    transform: translateX(-10px) translateY(-4px) rotate(-3deg);
  }

  66% {
    transform: translateX(10px) translateY(3px) rotate(3deg);
  }
}

@keyframes realisticSplitLeft {
  from {
    transform: translate3d(calc(-50% + var(--layer) * 0.8px), calc(-50% - var(--layer) * 0.7px), calc(var(--layer) * -1px));
  }
  to {
    transform: translate3d(calc(-105% + var(--layer) * 0.9px), calc(-49% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(calc(-9deg + var(--layer) * 0.16deg)) rotateY(-7deg);
  }
}

@keyframes realisticSplitRight {
  from {
    transform: translate3d(calc(-50% + var(--layer) * 0.8px), calc(-50% - var(--layer) * 0.7px), calc(var(--layer) * -1px));
  }
  to {
    transform: translate3d(calc(5% - var(--layer) * 0.9px), calc(-49% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(calc(9deg - var(--layer) * 0.16deg)) rotateY(7deg);
  }
}

@keyframes realisticRiffleLeft {
  0% {
    transform: translate3d(calc(-105% + var(--layer) * 0.9px), calc(-49% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(-9deg) rotateY(-7deg);
  }
  34% {
    transform: translate3d(calc(-116% + var(--layer) * 0.6px), calc(-43% - var(--layer) * 0.6px), calc(var(--layer) * -1px)) rotateZ(-12deg) rotateY(-11deg);
  }
  74% {
    transform: translate3d(calc(-52% + var(--layer) * 0.65px), calc(-43% - var(--layer) * 1.15px), calc(var(--layer) * -1px)) rotateZ(-1.4deg) rotateX(7deg);
  }
  100% {
    transform: translate3d(calc(-50% + var(--layer) * 0.72px), calc(-50% - var(--layer) * 0.72px), calc(var(--layer) * -1px));
  }
}

@keyframes realisticRiffleRight {
  0% {
    transform: translate3d(calc(5% - var(--layer) * 0.9px), calc(-49% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(9deg) rotateY(7deg);
  }
  34% {
    transform: translate3d(calc(16% - var(--layer) * 0.6px), calc(-43% - var(--layer) * 0.6px), calc(var(--layer) * -1px)) rotateZ(12deg) rotateY(11deg);
  }
  74% {
    transform: translate3d(calc(-48% - var(--layer) * 0.65px), calc(-46% - var(--layer) * 1.15px), calc(var(--layer) * -1px)) rotateZ(1.4deg) rotateX(7deg);
  }
  100% {
    transform: translate3d(calc(-50% - var(--layer) * 0.72px), calc(-50% - var(--layer) * 0.72px), calc(var(--layer) * -1px));
  }
}

@keyframes realisticBridge {
  0% {
    transform: translate3d(calc(-50% + var(--layer) * 0.35px), calc(-50% - var(--layer) * 0.65px), calc(var(--layer) * -1px));
  }
  42% {
    transform: translate3d(calc(-50% + var(--layer) * 0.35px), calc(-65% + var(--layer) * 1.1px), calc(var(--layer) * -1px)) rotateX(19deg) scaleY(0.96);
  }
  70% {
    transform: translate3d(calc(-50% + var(--layer) * 0.28px), calc(-43% - var(--layer) * 0.52px), calc(var(--layer) * -1px)) rotateX(-7deg) scaleY(0.985);
  }
  100% {
    transform: translate3d(calc(-50% + var(--layer) * 0.45px), calc(-50% - var(--layer) * 0.65px), calc(var(--layer) * -1px));
  }
}

@keyframes realisticSquareLeft {
  from {
    transform: translate3d(calc(-69% + var(--layer) * 0.8px), calc(-48% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(-3deg);
  }
  to {
    transform: translate3d(calc(-50% + var(--layer) * 0.55px), calc(-50% - var(--layer) * 0.7px), calc(var(--layer) * -1px));
  }
}

@keyframes realisticSquareRight {
  from {
    transform: translate3d(calc(-31% - var(--layer) * 0.8px), calc(-48% - var(--layer) * 0.7px), calc(var(--layer) * -1px)) rotateZ(3deg);
  }
  to {
    transform: translate3d(calc(-50% - var(--layer) * 0.55px), calc(-50% - var(--layer) * 0.7px), calc(var(--layer) * -1px));
  }
}

@keyframes shuffleTrackWave {
  0% {
    transform: translate3d(var(--track-shift), 4px, 0) rotate(var(--track-tilt)) scale(0.9);
    filter: brightness(0.78);
  }
  100% {
    transform: translate3d(var(--track-shift), -4px, 0) rotate(var(--track-tilt)) scale(1.02);
    filter: brightness(1.18);
  }
}

@keyframes shuffleButtonTurn {
  to { transform: rotate(360deg); }
}

@keyframes shuffleGlow {
  0%,
  100% {
    filter: brightness(0.9) saturate(0.98);
  }

  50% {
    filter: brightness(1.18) saturate(1.12);
  }
}

@keyframes copyPaneRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes copyFadeLift {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes copyTitleReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

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

@keyframes moonTextShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes moonTextGlow {
  0%,
  100% {
    text-shadow:
      0 18px 46px rgba(0, 0, 0, 0.52),
      0 0 18px rgba(244, 198, 108, 0.08);
  }

  50% {
    text-shadow:
      0 19px 50px rgba(0, 0, 0, 0.55),
      0 0 26px rgba(244, 198, 108, 0.16),
      0 0 34px rgba(205, 232, 255, 0.08);
  }
}

@keyframes tarotTitleFlicker {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1) saturate(1);
  }

  35% {
    opacity: 0.98;
    filter: brightness(1.025) saturate(1.01);
  }

  52% {
    opacity: 0.94;
    filter: brightness(0.98) saturate(0.99);
  }

  70% {
    opacity: 0.99;
    filter: brightness(1.035) saturate(1.01);
  }
}

@keyframes tarotWhisperFlicker {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }

  45% {
    opacity: 0.93;
    filter: brightness(0.97);
  }

  62% {
    opacity: 0.98;
    filter: brightness(1.035);
  }
}

@keyframes lunarLineBreathe {
  0%,
  100% {
    opacity: 0.58;
    box-shadow: 0 0 20px rgba(244, 198, 108, 0.2);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 34px rgba(244, 198, 108, 0.36);
  }
}

@keyframes goldLineSweep {
  0%,
  100% {
    opacity: 0.42;
    transform: scaleX(0.42);
  }

  50% {
    opacity: 0.95;
    transform: scaleX(1);
  }
}

.spread {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.reading-page {
  display: grid;
  gap: 24px;
  padding: 30px;
  color: #fff8ed;
  background:
    linear-gradient(145deg, rgba(6, 7, 12, 0.96), rgba(18, 16, 25, 0.9) 48%, rgba(35, 23, 33, 0.88)),
    linear-gradient(180deg, rgba(244, 198, 108, 0.12), transparent 32%),
    url("assets/tarot-hero.png");
  background-size: cover;
  background-position: center;
}

.reading-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 22px;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 248, 237, 0.16);
  padding-bottom: 24px;
}

.reading-hero-main {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.reading-title-block {
  text-align: center;
}

.reading-title-block .panel-kicker,
.reading-title-block .reading-spread-summary {
  margin-left: auto;
  margin-right: auto;
}

.reading-hero h2 {
  color: #fffaf1;
  font-size: 42px;
}

.reading-question-box,
.reading-section,
.reading-report-panel {
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: var(--radius);
  background: rgba(9, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.08);
}

.reading-question-box {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.reading-question-box span {
  color: rgba(244, 198, 108, 0.76);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.reading-question-box strong {
  color: #fffaf1;
  font-size: 18px;
  line-height: 1.55;
}

.reading-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(244, 198, 108, 0.2);
  border-radius: var(--radius);
  background: rgba(244, 198, 108, 0.14);
}

.reading-context-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(244, 198, 108, 0.06), transparent),
    rgba(7, 11, 17, 0.88);
}

.reading-context-strip span {
  color: rgba(244, 198, 108, 0.7);
  font-size: 11px;
  font-weight: 800;
}

.reading-context-strip strong {
  overflow: hidden;
  color: rgba(255, 250, 241, 0.92);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.reading-section {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.reading-spread-section {
  gap: 22px;
  padding: 24px;
}

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

.reading-section-head .panel-kicker {
  margin-bottom: 4px;
}

.reading-section-head h3 {
  color: #fffaf1;
  margin-bottom: 0;
  font-size: 22px;
}

.reading-spread {
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-items: center;
  gap: 22px;
  padding: 16px;
}

.reading-spread::before,
.reading-spread::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(244, 198, 108, 0.44), transparent);
}

.reading-spread--single {
  grid-template-columns: minmax(220px, 280px);
  justify-content: center;
}

.reading-spread--single::before {
  inset: 8%;
  border: 1px solid rgba(244, 198, 108, 0.24);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 198, 108, 0.2), transparent 58%);
}

.reading-spread--single::after {
  display: none;
}

.reading-spread--three {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.reading-spread--three::before {
  top: 42%;
  right: 7%;
  left: 7%;
  height: 1px;
}

.reading-spread--three::after {
  display: none;
}

.reading-spread--career,
.reading-spread--relationship {
  grid-template-columns: repeat(3, minmax(158px, 1fr));
  grid-template-rows: repeat(3, auto);
}

.reading-spread--seven {
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  grid-template-rows: repeat(3, auto);
}

.reading-spread--career::before,
.reading-spread--relationship::before,
.reading-spread--seven::after {
  top: 16px;
  bottom: 16px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(244, 198, 108, 0.44), transparent);
}

.reading-spread--career::after,
.reading-spread--relationship::after,
.reading-spread--seven::before {
  top: 50%;
  right: 5%;
  left: 5%;
  height: 1px;
}

.reading-spread--career .tarot-card--position-1,
.reading-spread--relationship .tarot-card--position-4 {
  grid-column: 2;
  grid-row: 1;
}

.reading-spread--career .tarot-card--position-2,
.reading-spread--relationship .tarot-card--position-1 {
  grid-column: 1;
  grid-row: 2;
}

.reading-spread--relationship .tarot-card--position-3 {
  grid-column: 2;
  grid-row: 2;
  transform: translateY(-4px);
}

.reading-spread--career .tarot-card--position-3,
.reading-spread--relationship .tarot-card--position-2 {
  grid-column: 3;
  grid-row: 2;
}

.reading-spread--career .tarot-card--position-4,
.reading-spread--relationship .tarot-card--position-5 {
  grid-column: 2;
  grid-row: 3;
}

.reading-spread--seven .tarot-card--position-1 {
  grid-column: 2;
  grid-row: 1;
}

.reading-spread--seven .tarot-card--position-2 {
  grid-column: 1;
  grid-row: 2;
}

.reading-spread--seven .tarot-card--position-3 {
  grid-column: 2;
  grid-row: 2;
  transform: translateY(-4px);
}

.reading-spread--seven .tarot-card--position-4 {
  grid-column: 3;
  grid-row: 2;
}

.reading-spread--seven .tarot-card--position-5 {
  grid-column: 4;
  grid-row: 2;
}

.reading-spread--seven .tarot-card--position-6 {
  grid-column: 2;
  grid-row: 3;
}

.reading-spread--seven .tarot-card--position-7 {
  grid-column: 3;
  grid-row: 3;
}

.reading-spread .tarot-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 198px;
}

.reading-spread--relationship .tarot-card--position-3,
.reading-spread--single .tarot-card {
  max-width: 226px;
}

.reading-spread--three .tarot-card {
  max-width: 220px;
}

.reading-spread--seven .tarot-card {
  max-width: 182px;
}

.reading-report-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(201, 155, 74, 0.09), rgba(16, 63, 69, 0.14)),
    rgba(9, 12, 18, 0.78);
}

.reading-report-panel .button-row,
.reading-report-panel .primary-button {
  width: 100%;
}

.reading-page .reading-spread-summary,
.reading-page .analysis-copy p {
  color: rgba(255, 248, 237, 0.76);
}

.reading-page .status-box {
  display: grid;
  align-content: center;
  gap: 8px;
  border-left-color: var(--gold);
  color: rgba(255, 248, 237, 0.82);
  background: rgba(201, 155, 74, 0.14);
}

.report-status-heading {
  display: grid;
  gap: 2px;
}

.report-status-heading span {
  color: rgba(244, 198, 108, 0.78);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-status-heading strong {
  color: #fffaf1;
  font-size: 16px;
}

.report-countdown {
  display: grid;
  gap: 4px;
  margin: 2px 0;
  border: 1px solid rgba(244, 198, 108, 0.28);
  border-radius: calc(var(--radius) - 2px);
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 198, 108, 0.24), transparent 52%),
    rgba(6, 7, 12, 0.38);
}

.report-countdown span {
  color: rgba(255, 248, 237, 0.68);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-countdown b {
  color: #fffaf1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(244, 198, 108, 0.28);
}

.report-countdown.is-ready b {
  color: #f4c66c;
}

.status-box small {
  display: grid;
  gap: 2px;
  color: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.status-box small span {
  overflow-wrap: anywhere;
}

.reading-page .tarot-card {
  border-color: rgba(244, 198, 108, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.08), rgba(255, 248, 237, 0.03)),
    linear-gradient(145deg, rgba(16, 63, 69, 0.36), rgba(75, 69, 105, 0.22));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.reading-page .tarot-card.is-reversed {
  border-color: rgba(155, 77, 99, 0.48);
  background:
    linear-gradient(180deg, rgba(155, 77, 99, 0.18), rgba(255, 248, 237, 0.03)),
    linear-gradient(145deg, rgba(16, 63, 69, 0.32), rgba(75, 69, 105, 0.3));
}

.reading-page .tarot-card.is-reversed .tarot-art,
.reading-page .tarot-card.is-reversed .tarot-symbol {
  transform: rotate(180deg);
}

.spread-order {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 248, 237, 0.42);
  border-radius: 50%;
  color: #2c1f10;
  background: #f4c66c;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.reading-page .tarot-symbol {
  color: #f4c66c;
  background: rgba(244, 198, 108, 0.14);
}

.reading-page .tarot-card b {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  color: #fffaf1;
}

.reading-page .tarot-card b em {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  border: 1px solid rgba(244, 198, 108, 0.4);
  border-radius: 999px;
  padding: 1px 7px 2px;
  color: #f4c66c;
  background: rgba(244, 198, 108, 0.12);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.reading-page .tarot-card.is-reversed b em {
  border-color: rgba(255, 194, 214, 0.44);
  color: #ffc2d6;
  background: rgba(155, 77, 99, 0.22);
}

.reading-page .tarot-card small {
  color: rgba(255, 248, 237, 0.66);
}

.reading-loading-page {
  min-height: 560px;
  place-items: center;
}

.reading-loading {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(520px, 100%);
  text-align: center;
}

.loading-card {
  display: grid;
  place-items: center;
  width: 120px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(244, 198, 108, 0.34);
  border-radius: var(--radius);
  color: #f4c66c;
  background:
    linear-gradient(160deg, rgba(16, 63, 69, 0.72), rgba(75, 69, 105, 0.56)),
    linear-gradient(180deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.03));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  animation: readingPulse 3s ease-in-out infinite;
}

.loading-card span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(244, 198, 108, 0.34);
  border-radius: 50%;
  font-size: 30px;
}

.loading-card--back {
  position: relative;
  overflow: hidden;
  border-color: rgba(244, 198, 108, 0.58);
  background-image:
    linear-gradient(180deg, rgba(4, 7, 12, 0.02), rgba(4, 7, 12, 0.16)),
    url("assets/card-back.jpg");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 5px rgba(16, 63, 69, 0.42),
    0 24px 70px rgba(0, 0, 0, 0.44),
    0 0 32px rgba(244, 198, 108, 0.12);
}

.loading-card--back::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(244, 198, 108, 0.42);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.reading-loading h2 {
  color: #fffaf1;
  font-size: 34px;
}

.loading-question {
  margin: 12px auto 0;
  max-width: 460px;
  color: rgba(255, 248, 237, 0.7);
  line-height: 1.7;
}

.loading-progress {
  width: min(360px, 100%);
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.16);
}

.loading-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #fff2bf);
  animation: loadingSweep 3s ease-in-out forwards;
}

.reading-error .loading-card {
  border-color: rgba(190, 109, 127, 0.48);
  color: #ffd4dd;
  animation: none;
}

.analysis-error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.analysis-error-actions .primary-button,
.analysis-error-actions .ghost-button {
  min-width: 160px;
}

@keyframes readingPulse {
  0%,
  100% {
    transform: translateY(0) rotateY(0deg);
  }

  50% {
    transform: translateY(-10px) rotateY(12deg);
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(240%);
  }
}

.tarot-card {
  min-height: 0;
  border: 1px solid rgba(23, 24, 33, 0.2);
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.78), rgba(255, 250, 241, 0.95)),
    radial-gradient(circle at 50% 34%, rgba(201, 155, 74, 0.34), transparent 32%);
  text-align: center;
  display: grid;
  gap: 10px;
}

.tarot-symbol {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - 4px);
  color: var(--teal-deep);
  background: rgba(201, 155, 74, 0.22);
  font-size: 34px;
  font-weight: 800;
}

.tarot-art-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(201, 155, 74, 0.58);
  border-radius: calc(var(--radius) - 4px);
  background:
    radial-gradient(circle at 50% 22%, rgba(244, 198, 108, 0.24), transparent 38%),
    #080a0f;
}

.tarot-art-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 237, 0.08),
    inset 0 -44px 54px rgba(0, 0, 0, 0.22);
}

.tarot-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tarot-card-caption {
  display: grid;
  gap: 5px;
}

.tarot-card b,
.tarot-card small {
  display: block;
}

.tarot-card b {
  margin-bottom: 5px;
}

.tarot-card small {
  color: rgba(23, 24, 33, 0.56);
  line-height: 1.45;
}

.analysis-copy {
  display: grid;
  gap: 12px;
}

.analysis-copy p {
  margin: 0;
  color: rgba(23, 24, 33, 0.72);
  line-height: 1.75;
}

.analysis-line {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.analysis-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.analysis-line.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(244, 198, 108, 0.46);
  animation: typingCursor 1.15s ease-in-out infinite;
}

@keyframes typingCursor {
  0%,
  100% {
    opacity: 0.95;
  }

  50% {
    opacity: 0.18;
  }
}

@keyframes dialogueThinking {
  to {
    transform: rotate(360deg);
  }
}

.status-box {
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: rgba(23, 24, 33, 0.72);
  background: rgba(201, 155, 74, 0.14);
  line-height: 1.65;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  margin: 24px 0;
}

.manager-form,
.manager-output {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  padding: 18px;
}

.manager-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) auto;
  align-items: end;
  gap: 14px;
}

.manager-output {
  display: grid;
  align-content: center;
  gap: 8px;
}

.code-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fffaf1;
  background: var(--teal-deep);
  font-weight: 850;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 253, 248, 0.72);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: rgba(23, 24, 33, 0.58);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ready {
  color: #174336;
  background: rgba(51, 144, 112, 0.16);
}

.badge.pending {
  color: #6d4a16;
  background: rgba(201, 155, 74, 0.18);
}

.badge.used {
  color: #6b2b40;
  background: rgba(155, 77, 99, 0.16);
}

.badge.unused {
  color: #103f45;
  background: rgba(27, 93, 99, 0.15);
}

.report-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.report-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.74);
  padding: 16px;
}

.report-item p {
  margin-bottom: 0;
  color: rgba(23, 24, 33, 0.62);
  line-height: 1.55;
}

.empty-state {
  border: 1px dashed rgba(23, 24, 33, 0.24);
  border-radius: var(--radius);
  padding: 30px;
  color: rgba(23, 24, 33, 0.58);
  background: rgba(255, 253, 248, 0.58);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(340px, calc(100% - 44px));
  border: 1px solid rgba(255, 248, 237, 0.35);
  border-radius: var(--radius);
  padding: 13px 15px;
  color: #fffaf1;
  background: rgba(16, 22, 30, 0.9);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(14px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .topbar,
  main {
    width: min(100% - 28px, 680px);
  }

  .topbar,
  .dialogue-head,
  .section-heading,
  .package-selection-head,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .nav-tab {
    flex: 1;
  }

  main {
    padding-top: 28px;
  }

  .workspace-grid {
    display: block;
    min-height: 0;
  }

  .workspace-grid.is-reading-mode {
    display: block;
  }

  .workspace-grid.is-package-mode {
    display: block;
    min-height: 0;
  }

  .copy-pane {
    max-width: 100%;
    padding: 28px 0 32px 30px;
    margin-bottom: 28px;
  }

  .copy-pane::after {
    left: 30px;
    width: min(360px, 74%);
  }

  h1 {
    font-size: 52px;
  }

  .lead {
    font-size: 16px;
  }

  .cover-note {
    position: static;
    margin-top: 18px;
    max-width: none;
    text-align: left;
    white-space: normal;
  }

  .tool-panel,
  .surface {
    padding: 22px;
  }

  .cover-gate {
    min-height: 420px;
    margin: 0;
  }

  .tool-panel.is-reading-panel {
    padding: 0;
  }

  .tool-panel.is-package-panel {
    padding: 22px;
  }

  .tool-panel.is-package-panel .package-list {
    grid-template-columns: 1fr;
  }

  .prize-portal {
    grid-template-columns: 1fr;
  }

  .prize-selection .prize-wheel-card {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    text-align: center;
  }

  .prize-wheel-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .prize-wheel-copy strong {
    justify-self: center;
  }

  .payment-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .payment-order-panel {
    padding: 12px 0 26px;
  }

  .payment-total {
    font-size: 42px;
  }

  .payment-email-line {
    margin-top: 26px;
  }

  .payment-collection-panel {
    padding: 26px 0 8px;
    border-top: 1px solid rgba(255, 248, 237, 0.14);
    border-left: 0;
  }

  .reading-page {
    padding: 22px;
  }

  .dialogue-page {
    padding: 22px;
  }

  .intake-page {
    padding: 22px;
  }

  .account-page {
    min-height: 0;
    padding: 22px;
  }

  .account-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-visual {
    min-height: 250px;
    padding: 34px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 248, 237, 0.14);
    background-position: center 62%;
  }

  .account-moon {
    top: 36px;
    width: 68px;
    height: 68px;
    font-size: 34px;
  }

  .account-visual h3 {
    max-width: 520px;
    margin-bottom: 22px;
    font-size: 26px;
  }

  .account-entry {
    padding: 28px;
  }

  .intake-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .intake-form-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .birth-fields {
    grid-template-columns: 1fr;
  }

  .birth-place-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intake-form-panel > label:nth-of-type(2),
  .intake-form-panel > .birth-fields,
  .intake-form-panel > .birth-place-field,
  .intake-form-panel > .direction-field,
  .intake-form-panel > label:nth-of-type(3),
  .intake-form-panel > .primary-button {
    grid-column: 1;
    grid-row: auto;
  }

  .intake-form-panel > .primary-button {
    justify-self: stretch;
    min-width: 0;
    width: 100%;
  }

  .spread-page {
    padding: 22px;
  }

  .reading-hero,
  .reading-analysis-grid,
  .spread-page-grid {
    grid-template-columns: 1fr;
  }

  .reading-report-panel {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.46fr);
    grid-template-rows: auto;
    align-items: end;
  }

  .reading-report-panel .button-row {
    align-items: stretch;
  }

  .reading-spread {
    gap: 12px;
    padding: 8px;
  }

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

  .reading-spread--career,
  .reading-spread--relationship {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .reading-spread .tarot-card,
  .reading-spread--three .tarot-card,
  .reading-spread--relationship .tarot-card--position-3,
  .reading-spread--seven .tarot-card {
    max-width: 176px;
  }

  .spread-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .reading-hero h2 {
    font-size: 34px;
  }

  .spread-page-hero h2 {
    font-size: 34px;
  }

  .intake-page-hero h2 {
    font-size: 34px;
  }

  .account-page-hero h2 {
    font-size: 34px;
  }

  .dialogue-page > .primary-button {
    justify-self: stretch;
    width: 100%;
  }

  .admin-grid,
  .manager-form,
  .report-item {
    grid-template-columns: 1fr;
  }

  .manager-form .primary-button {
    width: 100%;
  }
}

@media (max-width: 560px) {

  .account-page {
    gap: 20px;
    padding: 16px;
  }

  .account-visual {
    min-height: 210px;
    padding: 26px;
  }

  .account-visual::after {
    inset: 14px;
  }

  .account-moon {
    top: 26px;
    width: 58px;
    height: 58px;
    font-size: 29px;
  }

  .account-visual h3 {
    margin-bottom: 14px;
    font-size: 22px;
  }

  .account-entry {
    padding: 22px 18px;
  }

  .account-mode-tabs {
    margin-bottom: 22px;
  }

  .customer-account-chip {
    justify-content: space-between;
    max-width: 100%;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 248, 237, 0.14);
    border-left: 0;
  }

  .date-part {
    padding-inline: 4px;
    font-size: 13px;
  }

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

  .reading-context-strip > div {
    padding: 10px 8px;
    text-align: center;
  }

  .reading-context-strip strong {
    font-size: 13px;
  }

  .pick-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .shuffle-again-button {
    align-self: flex-end;
  }

  .shuffle-stage {
    width: min(100%, 350px);
  }

  .payment-collection-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .payment-method-tabs {
    grid-template-columns: 1fr;
  }

  .payment-qr-stage img {
    width: min(270px, 100%);
  }

  .analysis-error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-error-actions .primary-button,
  .analysis-error-actions .ghost-button {
    width: 100%;
  }
  .spread {
    grid-template-columns: 1fr;
  }

  .reading-spread {
    gap: 12px;
    padding: 0;
  }

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

  .reading-spread--single,
  .reading-spread--three,
  .reading-spread--career,
  .reading-spread--relationship,
  .reading-spread--seven {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .reading-spread .tarot-card {
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: center;
    max-width: 240px;
    transform: none !important;
  }

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

  h1 {
    font-size: 42px;
  }

  .trust-row span {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .card-carousel {
    grid-template-columns: 38px minmax(132px, 190px) 38px;
    gap: 10px;
  }

  .carousel-nav {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .carousel-card {
    min-height: 238px;
  }

  .topbar {
    padding-top: 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .tool-panel {
    min-height: 0;
  }

  .cover-gate {
    padding: 24px;
  }

  .cover-cta,
  .package-card .primary-button {
    width: 100%;
  }

  .cover-cta {
    right: 24px;
    bottom: 34px;
    left: 24px;
    width: auto;
    transform: none;
  }

  .package-card {
    grid-template-columns: 1fr;
  }

  .spread-confirm-button {
    justify-self: stretch;
    width: 100%;
  }

  th,
  td {
    padding: 11px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy-pane,
  .copy-pane::before,
  .copy-pane::after,
  .copy-pane .eyebrow,
  .copy-pane .eyebrow::after,
  .copy-pane h1,
  .lead span,
  .cover-cta > span,
  .prize-wheel-stage.is-spinning .prize-wheel-pointer,
  .shuffle-stage-card,
  .card-track.is-shuffling .card-dot,
  .shuffle-again-button.is-shuffling > span:first-child,
  .dialogue-personalizing span {
    animation: none !important;
    transition: none !important;
    opacity: 1;
  }

  .copy-pane h1 {
    background: none;
    color: #fffaf1;
    -webkit-text-fill-color: currentColor;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .copy-pane,
  .nav-tabs,
  .button-row,
  .toast {
    display: none !important;
  }

  .hero-bg {
    display: none;
  }

  .workspace-grid,
  main {
    display: block;
    width: 100%;
    padding: 0;
  }

  .tool-panel,
  .surface {
    border: 0;
    box-shadow: none;
  }
}
