:root {
  --ink: #17231e;
  --ink-soft: #425149;
  --forest: #1d3329;
  --forest-light: #2c4839;
  --paper: #f1ede2;
  --paper-deep: #e7e0d1;
  --gold: #b49659;
  --gold-light: #d7c28f;
  --rust: #9f5544;
  --line: rgba(23, 35, 30, 0.17);
  --shadow: 0 18px 60px rgba(20, 30, 26, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% 10%, rgba(180, 150, 89, 0.12), transparent 30rem),
    var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  letter-spacing: 0;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

.modal-open { overflow: hidden; }
.conclusion-copy, .conclusion-detail p, .conclusion-fact strong, .step-heading h2,
.result-header h2, .result-header blockquote, .analysis-step-copy { overflow-wrap: anywhere; }
.selection-hint { max-width: 1120px; margin: -12px auto 28px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.cards-swipe-hint { display: none; margin: 12px 0 0; color: var(--gold-light); font-size: 11px; text-align: center; }
.save-panel { width: min(100%, 620px); max-height: 90vh; max-height: 90dvh; overflow-y: auto; padding: 22px; border-radius: 8px; background: var(--paper); }
.save-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.save-panel h2 { margin: 0 0 8px; font-size: 23px; font-weight: 500; }
.save-panel p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.save-panel .icon-button { flex-shrink: 0; }
.save-panel img { display: block; width: 100%; height: auto; border-radius: 4px; }
.save-panel a { display: flex; justify-content: center; margin-top: 20px; text-decoration: none; }

.app-shell {
  min-height: 100vh;
  min-height: var(--app-height, 100dvh);
  overflow: hidden;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: calc(72px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) clamp(18px, 4vw, 48px) 0;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  transition: background 250ms ease, border-color 250ms ease;
}

body:not(.on-start) .topbar {
  background: rgba(241, 237, 226, 0.9);
  border-bottom: 1px solid rgba(23, 35, 30, 0.1);
  backdrop-filter: blur(16px);
}

.brand-lockup,
.icon-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.brand-lockup {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.brand-name {
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-mark {
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(23, 35, 30, 0.16);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 19px;
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.back-button {
  justify-self: start;
}

.info-button {
  justify-self: end;
  font-size: 15px;
  font-style: italic;
}

.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: var(--app-height, 100dvh);
  padding: calc(102px + env(safe-area-inset-top)) clamp(18px, 4vw, 48px) calc(54px + env(safe-area-inset-bottom));
  animation: screenIn 620ms var(--ease) both;
}

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

@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.content-column {
  width: min(100%, 920px);
  margin: 0 auto;
}

.eyebrow,
.step-number,
.result-kicker {
  margin: 0;
  color: var(--rust);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
blockquote {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
}

.start-screen {
  position: relative;
  min-height: var(--app-height, 100dvh);
  padding-top: calc(118px + env(safe-area-inset-top));
  color: #f4f0e5;
  background:
    linear-gradient(115deg, rgba(12, 25, 20, 0.97), rgba(28, 49, 39, 0.94)),
    url("assets/card-back.webp") center / cover;
}

.start-screen::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.2;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 70px, rgba(255, 255, 255, 0.035) 71px);
  pointer-events: none;
}

.on-start .topbar {
  color: #f4f0e5;
}

.on-start .icon-button {
  border-color: rgba(244, 240, 229, 0.3);
}

.start-copy {
  position: relative;
  z-index: 3;
  width: min(680px, 92vw);
  margin: 0 auto;
  text-align: center;
}

.start-copy .eyebrow {
  color: var(--gold-light);
}

.start-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 9vw, 84px);
  font-weight: 500;
  line-height: 1.12;
}

.intro {
  width: min(510px, 100%);
  margin: 0 auto;
  color: rgba(244, 240, 229, 0.72);
  font-size: clamp(14px, 2.5vw, 17px);
  line-height: 1.8;
}

.mode-selector {
  display: grid;
  width: min(100%, 520px);
  margin: 24px auto 0;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-option {
  display: grid;
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 194, 143, 0.3);
  border-radius: 5px;
  color: rgba(244, 240, 229, 0.68);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mode-option:hover,
.mode-option.is-selected {
  border-color: var(--gold-light);
  color: #fffaf0;
  background: rgba(215, 194, 143, 0.12);
  transform: translateY(-2px);
}

.mode-option.is-selected {
  box-shadow: inset 0 0 0 1px rgba(215, 194, 143, 0.28);
}

.mode-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(215, 194, 143, 0.45);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 18px;
}

.mode-option strong,
.mode-option small {
  display: block;
}

.mode-option strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 15px;
}

.mode-option small {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 500;
  opacity: 0.65;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.primary-button {
  color: #fffaf0;
  background: var(--rust);
  box-shadow: 0 12px 30px rgba(95, 48, 37, 0.18);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.secondary-button {
  border-color: rgba(23, 35, 30, 0.24);
  background: transparent;
}

.start-button {
  min-width: 190px;
  margin-top: 18px;
  color: var(--ink);
  background: var(--gold-light);
}

.button-arrow {
  font-size: 18px;
}

.deck-scene {
  position: relative;
  z-index: 2;
  width: min(420px, 82vw);
  height: 310px;
  margin: 20px auto 0;
  perspective: 1000px;
}

.hero-card {
  position: absolute;
  bottom: -34px;
  left: 50%;
  width: 154px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(215, 194, 143, 0.55);
  border-radius: 7px;
  background: url("assets/card-back.webp") center / cover;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  transform-origin: center 115%;
}

.hero-card-left {
  transform: translateX(-94%) rotate(-14deg) translateY(18px);
}

.hero-card-right {
  transform: translateX(-6%) rotate(14deg) translateY(18px);
}

.hero-card-far-left {
  transform: translateX(-132%) rotate(-25deg) translateY(42px) scale(0.94);
}

.hero-card-far-right {
  transform: translateX(32%) rotate(25deg) translateY(42px) scale(0.94);
}

.hero-card-center {
  transform: translateX(-50%) translateY(-4px);
  animation: cardFloat 4s ease-in-out infinite;
}

.hero-card-glow {
  position: absolute;
  inset: 33% 25%;
  border-radius: 50%;
  box-shadow: 0 0 60px 22px rgba(215, 194, 143, 0.17);
}

@keyframes cardFloat {
  0%, 100% { transform: translateX(-50%) translateY(-4px); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

.orbit {
  position: absolute;
  left: 50%;
  border: 1px solid rgba(215, 194, 143, 0.14);
  border-radius: 50%;
  transform: translateX(-50%);
}

.orbit-one {
  top: 12px;
  width: 310px;
  height: 310px;
}

.orbit-two {
  top: 50px;
  width: 235px;
  height: 235px;
}

.scene-star {
  position: absolute;
  color: var(--gold-light);
}

.scene-star-one { top: 60px; left: 4%; font-size: 20px; }
.scene-star-two { top: 20px; right: 8%; font-size: 34px; }
.scene-star-three { top: 118px; right: 1%; font-size: 17px; }

.start-meta {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  color: rgba(244, 240, 229, 0.54);
  font-size: 11px;
  letter-spacing: 0;
}

.question-screen {
  background:
    linear-gradient(rgba(241, 237, 226, 0.92), rgba(241, 237, 226, 0.98)),
    url("assets/card-back.webp") center 38% / 680px auto;
}

.question-layout {
  max-width: 660px;
  padding-top: clamp(22px, 5vh, 68px);
}

.selected-mode-label {
  display: inline-flex;
  margin-right: 9px;
  padding: 5px 9px;
  border: 1px solid rgba(159, 85, 68, 0.28);
  border-radius: 999px;
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
}

.step-heading h2 {
  margin: 15px 0 11px;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 500;
}

.step-heading > p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.question-field {
  margin-top: 16px;
  padding: 17px 20px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(250, 248, 241, 0.88);
  box-shadow: 0 15px 48px rgba(36, 47, 40, 0.08);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.identity-field {
  margin-top: 38px;
  padding: 17px 20px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(250, 248, 241, 0.88);
  box-shadow: 0 12px 36px rgba(36, 47, 40, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.identity-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 16px 46px rgba(36, 47, 40, 0.11);
}

.identity-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.identity-label-row label {
  color: var(--rust);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.identity-label-row span {
  color: rgba(66, 81, 73, 0.56);
  font-size: 10px;
}

.name-input-wrap {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 28px;
}

.name-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 12px 0 7px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
}

.name-input-wrap input::placeholder {
  color: rgba(66, 81, 73, 0.42);
}

.name-sigil {
  color: var(--gold);
  font-size: 16px;
  text-align: right;
  transition: transform 240ms var(--ease), color 240ms ease;
}

.identity-field:focus-within .name-sigil {
  color: var(--rust);
  transform: rotate(22deg) scale(1.12);
}

.question-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 18px 52px rgba(36, 47, 40, 0.12);
}

.question-field label {
  color: var(--rust);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.question-field textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  margin: 8px 0;
  padding: 8px 0;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
  line-height: 1.75;
}

.question-field textarea::placeholder {
  color: rgba(66, 81, 73, 0.48);
}

.field-footer {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: rgba(66, 81, 73, 0.7);
  font-size: 11px;
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: var(--ink-soft);
  background: none;
  cursor: pointer;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 30px;
}

.prompt-chips button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.prompt-chips button:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.full-width {
  width: 100%;
}

.selection-screen {
  padding-right: clamp(14px, 3vw, 32px);
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
  padding-left: clamp(14px, 3vw, 32px);
  background:
    linear-gradient(rgba(241, 237, 226, 0.97), rgba(241, 237, 226, 0.97)),
    url("assets/card-back.webp") center / 620px auto;
}

.deck-preparing {
  position: fixed;
  z-index: 27;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  color: #f4f0e5;
  background: rgba(20, 39, 31, 0.96);
  backdrop-filter: blur(12px);
}

.deck-preparing.is-visible {
  display: flex;
  animation: fadeIn 220ms ease both;
}

.deck-preparing p {
  margin: 0;
  color: var(--gold-light);
  font-family: Georgia, "Songti SC", serif;
  font-size: 15px;
  letter-spacing: 0;
}

.shuffle-stack {
  position: relative;
  width: 110px;
  height: 154px;
  perspective: 800px;
}

.shuffle-stack span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(215, 194, 143, 0.7);
  border-radius: 6px;
  background: url("assets/card-back.webp") center / cover;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  animation: shuffleCard 850ms var(--ease) infinite alternate;
}

.shuffle-stack span:nth-child(2) { animation-delay: -280ms; }
.shuffle-stack span:nth-child(3) { animation-delay: -560ms; }

@keyframes shuffleCard {
  0% { transform: translate3d(-30px, 4px, -20px) rotate(-7deg); }
  50% { transform: translate3d(30px, -4px, 30px) rotate(7deg); }
  100% { transform: translate3d(0, 0, 60px) rotate(0); }
}

.selection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.compact-heading h2 {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 44px);
}

.compact-heading strong {
  color: var(--rust);
}

.selection-slots {
  display: flex;
  gap: 8px;
  padding-bottom: 5px;
}

.selection-slots span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px dashed rgba(23, 35, 30, 0.28);
  border-radius: 50%;
  color: rgba(23, 35, 30, 0.45);
  font-family: Georgia, serif;
  font-size: 12px;
  transition: 250ms var(--ease);
}

.selection-slots span.filled {
  border-style: solid;
  border-color: var(--rust);
  color: #fff;
  background: var(--rust);
  transform: scale(1.08);
}

.card-grid {
  display: grid;
  width: min(100%, 1120px);
  margin: 0 auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.7vw, 20px);
}

.pick-card {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 700px;
  touch-action: manipulation;
}

.pick-card-inner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 2px solid rgba(244, 237, 217, 0.72);
  border-radius: 6px;
  background: url("assets/card-back.webp") center / cover;
  box-shadow: 0 8px 22px rgba(23, 35, 30, 0.16);
  transition: transform 260ms var(--ease), border-color 260ms ease, box-shadow 260ms ease, filter 260ms ease;
}

.pick-card-inner::after {
  position: absolute;
  inset: 5px;
  content: "";
  border: 1px solid rgba(215, 194, 143, 0.6);
  border-radius: 3px;
}

.pick-card:hover .pick-card-inner {
  transform: translateY(-7px) rotate(0.7deg);
  box-shadow: 0 15px 34px rgba(23, 35, 30, 0.24);
}

.pick-card.selected .pick-card-inner {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(159, 85, 68, 0.18), 0 16px 35px rgba(23, 35, 30, 0.25);
  transform: translateY(-9px);
  filter: saturate(1.08) brightness(1.08);
}

.pick-number {
  display: inline-flex;
  height: 25px;
  min-width: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.pick-order {
  position: absolute;
  z-index: 2;
  top: -8px;
  right: -7px;
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: white;
  background: var(--rust);
  font-size: 11px;
  font-weight: 800;
}

.pick-card.selected .pick-order {
  display: grid;
  animation: popIn 280ms var(--ease) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.pick-card.limit-reached:not(.selected) .pick-card-inner {
  filter: grayscale(0.4) brightness(0.72);
}

.sticky-action {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: calc(96px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: center;
  padding: 16px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(23, 35, 30, 0.11);
  background: rgba(241, 237, 226, 0.9);
  backdrop-filter: blur(16px);
}

.sticky-action .primary-button {
  width: min(100%, 460px);
}

.result-screen {
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  background: var(--paper);
}

.result-header {
  padding: clamp(25px, 5vw, 56px) 20px 34px;
  text-align: center;
}

.result-kicker {
  margin-top: 17px;
  color: var(--gold);
}

.result-header h2 {
  margin: 8px 0 15px;
  font-size: clamp(38px, 7vw, 60px);
  font-weight: 500;
}

.result-header blockquote {
  width: min(100%, 640px);
  margin: 0 auto;
  color: var(--ink-soft);
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  line-height: 1.7;
}

.reading-stage {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 44px max(18px, calc((100vw - 920px) / 2)) 30px;
  color: #f4f0e5;
  background:
    linear-gradient(120deg, rgba(19, 37, 29, 0.98), rgba(34, 57, 45, 0.96)),
    url("assets/card-back.webp") center / cover;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.revealed-cards {
  display: grid;
  width: min(100%, 920px);
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.7vw, 22px);
  perspective: 1200px;
}

.reveal-wrap {
  min-width: 0;
  text-align: center;
}

.reveal-position {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.reveal-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  animation: flipCard 1050ms var(--ease) both;
}

.reveal-wrap:nth-child(2) .reveal-card { animation-delay: 180ms; }
.reveal-wrap:nth-child(3) .reveal-card { animation-delay: 360ms; }
.reveal-wrap:nth-child(4) .reveal-card { animation-delay: 540ms; }
.reveal-wrap:nth-child(5) .reveal-card { animation-delay: 720ms; }

@keyframes flipCard {
  0% { opacity: 0; transform: rotateY(180deg) translateY(24px); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: rotateY(0) translateY(0); }
}

.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 9% 8%;
  border: 1px solid rgba(180, 150, 89, 0.65);
  border-radius: 7px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 45%),
    #efe7d7;
  box-shadow: 0 16px 42px rgba(3, 12, 8, 0.35);
  backface-visibility: hidden;
}

.card-face::before,
.card-face::after {
  position: absolute;
  width: 28px;
  height: 28px;
  content: "";
  border-color: var(--gold);
  opacity: 0.6;
}

.card-face::before {
  top: 6px;
  left: 6px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.card-face::after {
  right: 6px;
  bottom: 6px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.card-topline {
  display: flex;
  width: 100%;
  justify-content: space-between;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: clamp(9px, 1.6vw, 13px);
  font-weight: 700;
}

.card-illustration {
  display: grid;
  width: 68%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(180, 150, 89, 0.4);
  border-radius: 50%;
  background: rgba(180, 150, 89, 0.08);
  font-family: "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: clamp(26px, 4.5vw, 50px);
  line-height: 1;
  filter: grayscale(1) sepia(0.25);
}

.card-title {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(13px, 2.4vw, 21px);
  font-weight: 700;
}

.card-title small {
  display: block;
  margin-top: 3px;
  color: rgba(23, 35, 30, 0.55);
  font-family: Georgia, serif;
  font-size: 0.48em;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reading-date {
  margin: 24px 0 0;
  color: rgba(244, 240, 229, 0.48);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0;
  text-align: center;
}

.reading-body {
  max-width: 820px;
  padding: 62px 20px 50px;
}

.analysis-status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: -28px 0 38px;
  color: var(--ink-soft);
}

.analysis-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.analysis-status p {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.analysis-status.is-loading > span {
  animation: statusPulse 1.1s ease-in-out infinite;
}

.analysis-status.is-ai > span {
  background: #6f9b78;
  box-shadow: 0 0 0 4px rgba(111, 155, 120, 0.12);
}

.analysis-status.is-error > span {
  background: var(--rust);
}

@keyframes statusPulse {
  50% { opacity: 0.35; transform: scale(0.75); }
}

.conclusion-section {
  position: relative;
  overflow: hidden;
  margin: -20px 0 70px;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgba(215, 194, 143, 0.35);
  border-radius: 6px;
  color: #f4f0e5;
  background:
    radial-gradient(circle at 88% 10%, rgba(215, 194, 143, 0.13), transparent 15rem),
    linear-gradient(135deg, #1a3026, #284638);
  box-shadow: 0 22px 60px rgba(20, 35, 28, 0.2);
}

.conclusion-section::after {
  position: absolute;
  right: -30px;
  bottom: -85px;
  content: "☾";
  color: rgba(215, 194, 143, 0.07);
  font-family: Georgia, serif;
  font-size: 250px;
  line-height: 1;
  pointer-events: none;
}

.light-label {
  position: relative;
  z-index: 1;
}

.light-label span {
  background: var(--gold-light);
}

.light-label p {
  color: var(--gold-light);
}

.conclusion-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.conclusion-signal,
.conclusion-domain {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.conclusion-signal {
  padding: 7px 11px;
  border: 1px solid rgba(215, 194, 143, 0.42);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(215, 194, 143, 0.08);
}

.conclusion-domain {
  color: rgba(244, 240, 229, 0.55);
}

.conclusion-section h3 {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 18px 0 15px;
  font-size: clamp(29px, 5vw, 42px);
  font-weight: 500;
  line-height: 1.35;
}

.conclusion-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 0;
  color: rgba(244, 240, 229, 0.76);
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  line-height: 1.9;
}

.conclusion-breakdown {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 30px;
  border-top: 1px solid rgba(244, 240, 229, 0.16);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.conclusion-detail {
  min-width: 0;
  padding: 24px 0 26px;
  border-bottom: 1px solid rgba(244, 240, 229, 0.12);
}

.conclusion-detail span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.conclusion-detail p {
  margin: 0;
  color: rgba(244, 240, 229, 0.78);
  font-family: Georgia, "Songti SC", serif;
  font-size: 14px;
  line-height: 1.85;
}

.conclusion-facts {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 240, 229, 0.13);
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.conclusion-fact span {
  display: block;
  margin-bottom: 7px;
  color: rgba(244, 240, 229, 0.44);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.conclusion-fact strong {
  color: #f4f0e5;
  font-family: Georgia, "Songti SC", serif;
  font-size: 14px;
  font-weight: 500;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label span {
  width: 30px;
  height: 1px;
  background: var(--rust);
}

.section-label p {
  margin: 0;
  color: var(--rust);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.synthesis-section h3,
.details-section h3 {
  margin: 14px 0 23px;
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 500;
}

.synthesis-section > p,
.meaning-copy p {
  color: var(--ink-soft);
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  line-height: 1.9;
}

.synthesis-lead {
  color: var(--ink) !important;
  font-size: 20px !important;
}

.analysis-sequence {
  display: grid;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.analysis-step {
  display: grid;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 42px 1fr;
  gap: 16px;
}

.analysis-step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(159, 85, 68, 0.35);
  border-radius: 50%;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 11px;
}

.analysis-step p {
  margin: 0;
}

.analysis-step-label {
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.analysis-step-title {
  margin-top: 6px !important;
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.analysis-step-copy {
  margin-top: 8px !important;
  color: var(--ink-soft);
  font-family: Georgia, "Songti SC", serif;
  font-size: 14px;
  line-height: 1.85;
}

.combination-section {
  margin-top: 38px;
}

.combination-section h4 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
}

.combination-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.combination-item {
  padding: 15px;
  border: 1px solid rgba(180, 150, 89, 0.24);
  border-radius: 4px;
  background: rgba(180, 150, 89, 0.06);
}

.combination-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--rust);
  font-family: Georgia, "Songti SC", serif;
  font-size: 13px;
}

.combination-item p {
  margin: 0;
  color: var(--ink-soft);
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
  line-height: 1.75;
}

.guidance-note {
  display: grid;
  margin-top: 30px;
  padding: 22px;
  border-left: 3px solid var(--gold);
  background: rgba(180, 150, 89, 0.1);
  grid-template-columns: 30px 1fr;
  gap: 12px;
}

.guidance-note span {
  color: var(--gold);
  font-size: 23px;
}

.guidance-note p {
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
}

.details-section {
  margin-top: 70px;
}

.card-meanings {
  border-top: 1px solid var(--line);
}

.meaning-row {
  display: grid;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 74px 1fr;
  gap: 20px;
}

.meaning-index {
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.meaning-copy h4 {
  margin: 0 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
}

.meaning-copy p {
  margin: 0;
  font-size: 14px;
}

.meaning-copy .meaning-position {
  margin-top: 9px;
  color: var(--ink);
  font-size: 13px;
  font-style: italic;
}

.meaning-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.meaning-keywords span {
  padding: 5px 9px;
  border: 1px solid rgba(180, 150, 89, 0.35);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 10px;
}

.result-actions {
  display: grid;
  margin-top: 58px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-disclaimer {
  margin: 24px 0 0;
  color: rgba(66, 81, 73, 0.6);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  background: rgba(10, 19, 15, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-visible {
  display: flex;
  animation: fadeIn 280ms ease both;
}

@keyframes fadeIn { from { opacity: 0; } }

.modal-panel {
  width: min(100%, 420px);
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 38px 34px 30px;
  border: 1px solid rgba(180, 150, 89, 0.5);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  animation: modalIn 480ms var(--ease) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
}

.modal-symbol {
  display: inline-grid;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid rgba(180, 150, 89, 0.5);
  border-radius: 50%;
  color: var(--gold);
  font-size: 28px;
}

.modal-panel h2 {
  margin: 13px 0 12px;
  font-size: 28px;
  font-weight: 500;
}

.modal-panel > p:not(.eyebrow) {
  margin: 0 0 25px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 40px);
  padding: 12px 18px;
  border-radius: 4px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: 250ms var(--ease);
  font-size: 13px;
}

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

@media (max-width: 760px) {
  .cards-swipe-hint { display: block; }
  .conclusion-breakdown { grid-template-columns: 1fr; }
  .save-panel { padding: 16px; }
  .screen { padding-top: calc(86px + env(safe-area-inset-top)); }
  .topbar {
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(15px, env(safe-area-inset-right)) 0 max(15px, env(safe-area-inset-left));
  }
  .brand-name { font-size: 12px; }
  .icon-button { width: 40px; height: 40px; }
  .primary-button, .secondary-button { min-height: 56px; }
  .start-screen { padding-top: calc(94px + env(safe-area-inset-top)); }
  .start-copy h1 { font-size: clamp(39px, 11vw, 58px); }
  .deck-scene { height: 286px; }
  .hero-card { width: 136px; }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .selection-header { align-items: flex-start; }
  .selection-slots { padding-top: 25px; }
  .reading-stage { padding-right: 0; padding-left: 0; }
  .revealed-cards {
    display: flex;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    padding: 0 max(18px, env(safe-area-inset-left)) 12px;
    gap: 10px;
    scroll-padding-inline: 18px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .revealed-cards::-webkit-scrollbar { display: none; }
  .reveal-wrap { flex: 0 0 118px; scroll-snap-align: start; }
  .reading-date { padding-right: 18px; padding-left: 18px; }
  .sticky-action { padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
  .toast { right: max(16px, env(safe-area-inset-right)); left: max(16px, env(safe-area-inset-left)); max-width: none; text-align: center; }
}

@media (max-width: 480px) {
  .start-copy { width: 100%; }
  .intro { padding: 0 16px; }
  .mode-selector { gap: 8px; }
  .mode-option { min-height: 70px; padding: 10px; grid-template-columns: 29px 1fr; gap: 7px; }
  .mode-symbol { width: 28px; height: 28px; font-size: 15px; }
  .mode-option strong { font-size: 13px; }
  .start-meta { gap: 8px; font-size: 9px; }
  .identity-field { margin-top: 28px; }
  .conclusion-section { margin-top: -30px; padding: 25px 21px; }
  .conclusion-topline { align-items: flex-start; flex-direction: column; gap: 9px; }
  .conclusion-breakdown { grid-template-columns: 1fr; }
  .conclusion-detail { padding: 20px 0; }
  .conclusion-facts { grid-template-columns: 1fr; gap: 14px; }
  .conclusion-fact { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; }
  .conclusion-fact span { margin: 0; }
  .selection-header { display: block; margin-bottom: 24px; }
  .selection-slots { padding-top: 18px; }
  .card-grid { gap: 10px 8px; }
  .pick-card { min-height: 118px; }
  .pick-card-inner { border-width: 1px; border-radius: 4px; }
  .revealed-cards { gap: 8px; }
  .reveal-wrap { flex-basis: 112px; }
  .reading-stage { padding-top: 34px; }
  .card-face { padding: 9% 6%; border-radius: 5px; }
  .card-topline { font-size: 8px; }
  .card-illustration { font-size: clamp(26px, 12vw, 44px); }
  .card-title { font-size: clamp(12px, 3.7vw, 16px); }
  .meaning-row { grid-template-columns: 52px 1fr; gap: 12px; }
  .result-actions { grid-template-columns: 1fr; }
  .analysis-step { grid-template-columns: 34px 1fr; gap: 10px; }
  .combination-list { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .brand-lockup { gap: 5px; padding-right: 2px; padding-left: 2px; }
  .brand-mark { font-size: 19px; }
  .brand-name { font-size: 11px; }
  .start-copy h1 { font-size: 36px; }
  .step-heading h2 { font-size: 31px; }
  .card-grid { gap: 9px 6px; }
  .sticky-action .primary-button { font-size: 13px; }
  .reveal-wrap { flex-basis: 108px; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .start-screen { padding-top: calc(78px + env(safe-area-inset-top)); }
  .start-copy h1 { margin-top: 12px; margin-bottom: 10px; font-size: 36px; }
  .mode-selector { margin-top: 14px; }
  .mode-option { min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
  .start-button { margin-top: 12px; }
  .deck-scene { height: 145px; margin-top: 10px; }
  .hero-card { width: 106px; }
  .orbit-one { width: 230px; height: 230px; }
  .orbit-two { width: 175px; height: 175px; }
  .start-meta { position: static; margin-top: 16px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
}

@media (hover: none) and (pointer: coarse) {
  .pick-card:hover .pick-card-inner,
  .primary-button:hover:not(:disabled),
  .secondary-button:hover:not(:disabled),
  .icon-button:hover {
    transform: none;
  }

  .pick-card.selected:hover .pick-card-inner {
    transform: translateY(-9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
