:root {
  color-scheme: dark;
  --black: #040202;
  --wood: #1b0c07;
  --wood-hot: #54220f;
  --table: #35150b;
  --table-light: #8d4820;
  --gold: #d9a85b;
  --gold-soft: #f1d8a4;
  --paper: #ecd3a1;
  --paper-dim: #b79a67;
  --cold: #87fff0;
  --ember: #ff9d47;
  --blood: #68180f;
  --panel: rgba(7, 4, 4, 0.58);
  --line: rgba(226, 175, 99, 0.28);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --parallax-x: 0;
  --parallax-y: 0;
  --focus-index: 0;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  color: var(--paper);
  background: #050302;
  font-family:
    Georgia,
    "Times New Roman",
    serif;
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.experience {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 18%, rgba(35, 11, 8, 0.9), transparent 45%),
    linear-gradient(180deg, #080403 0%, #020101 100%);
}

.world {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1200px;
  transform-style: preserve-3d;
  transition:
    transform 1500ms cubic-bezier(0.18, 0.78, 0.15, 1),
    filter 900ms ease;
}

.experience[data-camera="introRoom"] .world {
  transform: translate3d(
      calc(var(--parallax-x) * -10px),
      calc(var(--parallax-y) * -8px),
      0
    )
    scale(0.97);
}

.experience[data-camera="tableView"] .world {
  transform: translate3d(
      calc(var(--parallax-x) * -14px),
      calc(-18px + var(--parallax-y) * -10px),
      0
    )
    scale(1.05);
}

.experience[data-camera="cardFocus"] .world {
  transform: translate3d(
      calc((var(--focus-index) - 1) * -22px + var(--parallax-x) * -12px),
      calc(-30px + var(--parallax-y) * -8px),
      0
    )
    scale(1.08);
}

.depth {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.depth-back {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(97, 40, 20, 0.18), transparent 45%),
    linear-gradient(180deg, #120605 0%, #080303 58%, #050202 100%);
  transition: transform 1500ms ease;
}

.experience[data-camera="tableView"] .depth-back,
.experience[data-camera="cardFocus"] .depth-back {
  transform: translateY(-12px) scale(1.03);
}

.roof-beams {
  position: absolute;
  inset: -20% -10% 40%;
  opacity: 0.65;
  transform: perspective(900px) rotateX(-18deg);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 17% 83%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(
      112deg,
      rgba(91, 48, 25, 0.22) 0 18px,
      rgba(15, 6, 4, 0.58) 18px 36px
    );
  box-shadow: inset 0 -90px 120px rgba(0, 0, 0, 0.62);
}

.back-wall {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 3%;
  height: 50%;
  overflow: hidden;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 50% 45%, rgba(112, 255, 232, 0.09), transparent 28%),
    repeating-linear-gradient(
      90deg,
      rgba(86, 45, 25, 0.2) 0 32px,
      rgba(18, 7, 5, 0.58) 32px 58px
    );
  border-bottom: 1px solid rgba(217, 168, 91, 0.1);
  box-shadow:
    inset 0 -90px 110px rgba(0, 0, 0, 0.78),
    0 30px 90px rgba(0, 0, 0, 0.62);
}

.back-wall::before,
.back-wall::after {
  position: absolute;
  content: "";
  top: -22%;
  bottom: -18%;
  width: 18%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent);
  transform: skewX(-13deg);
}

.back-wall::before {
  left: 0;
}

.back-wall::after {
  right: 0;
  transform: skewX(13deg) scaleX(-1);
}

.cold-window {
  position: absolute;
  top: 13%;
  width: clamp(88px, 12vw, 150px);
  height: clamp(120px, 17vw, 198px);
  border: 4px solid rgba(30, 18, 12, 0.95);
  border-radius: 12px 12px 2px 2px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(8, 13, 12, 0.88) 49% 52%, transparent 54%),
    linear-gradient(0deg, transparent 48%, rgba(8, 13, 12, 0.86) 50% 53%, transparent 55%),
    radial-gradient(circle at 50% 32%, rgba(190, 255, 247, 0.58), transparent 28%),
    linear-gradient(180deg, #b1ece2, #246963 50%, #061012);
  opacity: 0.72;
  box-shadow:
    0 0 70px rgba(135, 255, 240, 0.2),
    inset 0 0 36px rgba(220, 255, 250, 0.14);
}

.cold-window i {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(113deg, transparent 24%, rgba(9, 33, 30, 0.74) 27% 31%, transparent 34%),
    linear-gradient(72deg, transparent 40%, rgba(9, 33, 30, 0.68) 43% 47%, transparent 50%);
}

.window-left {
  left: 12%;
  transform: perspective(460px) rotateY(24deg) rotateZ(-2deg);
}

.window-right {
  right: 12%;
  transform: perspective(460px) rotateY(-24deg) rotateZ(2deg);
}

.window-light {
  position: absolute;
  top: 9%;
  width: 38vw;
  height: 52vh;
  opacity: 0.18;
  filter: blur(16px);
  mix-blend-mode: screen;
  background:
    linear-gradient(118deg, rgba(135, 255, 240, 0.38), transparent 58%),
    radial-gradient(ellipse at 30% 40%, rgba(135, 255, 240, 0.34), transparent 45%);
  animation: light-breathe 7s ease-in-out infinite alternate;
}

.light-left {
  left: 2%;
  transform: rotate(8deg);
}

.light-right {
  right: 2%;
  transform: scaleX(-1) rotate(8deg);
}

.wall-sigil {
  position: absolute;
  top: 18%;
  width: clamp(92px, 12vw, 150px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 168, 91, 0.2);
  border-radius: 50%;
  color: rgba(236, 211, 159, 0.32);
  font-size: clamp(3rem, 7vw, 5rem);
  text-shadow: 0 0 34px rgba(255, 185, 88, 0.16);
}

.wall-sigil::before,
.wall-sigil::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(217, 168, 91, 0.14);
  border-radius: 50%;
}

.wall-sigil::before {
  inset: 13px;
}

.wall-sigil::after {
  inset: 32px;
  border-style: dashed;
}

.sigil-left {
  left: 31%;
  transform: rotate(-11deg);
}

.sigil-right {
  right: 30%;
  transform: rotate(9deg);
}

.depth-host {
  z-index: 2;
  pointer-events: none;
}

.host-figure {
  position: absolute;
  left: 50%;
  top: 11%;
  width: clamp(260px, 34vw, 470px);
  height: clamp(280px, 42vh, 440px);
  transform: translateX(-50%) translateY(calc(var(--parallax-y) * 8px));
  transform-origin: 50% 82%;
  transition:
    transform 1500ms ease,
    opacity 900ms ease,
    filter 900ms ease;
}

.experience[data-camera="introRoom"] .host-figure {
  transform: translateX(-50%) translateY(10px) scale(0.88);
  opacity: 0.88;
}

.experience[data-camera="tableView"] .host-figure,
.experience[data-camera="cardFocus"] .host-figure {
  transform: translateX(-50%) translateY(-10px) scale(1.06);
}

.host-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 34% 34%;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(135, 255, 240, 0.13), transparent 22%),
    radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.5) 60%, transparent 76%);
  filter: blur(2px);
}

.host-cloak {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 76%;
  height: 70%;
  transform: translateX(-50%);
  border-radius: 54% 54% 18% 18%;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(47, 18, 15, 0.52), rgba(0, 0, 0, 0.94) 58%),
    linear-gradient(135deg, rgba(45, 17, 13, 0.88), rgba(0, 0, 0, 0.96));
  box-shadow:
    inset 0 -50px 60px rgba(0, 0, 0, 0.82),
    0 36px 90px rgba(0, 0, 0, 0.82);
}

.host-hood {
  position: absolute;
  left: 50%;
  top: 7%;
  width: 40%;
  height: 46%;
  transform: translateX(-50%);
  border-radius: 55% 55% 42% 42%;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(20, 9, 8, 0.12), rgba(0, 0, 0, 0.95) 62%),
    linear-gradient(145deg, rgba(48, 18, 14, 0.96), rgba(0, 0, 0, 0.9));
  box-shadow:
    inset 0 -22px 34px rgba(0, 0, 0, 0.9),
    0 24px 70px rgba(0, 0, 0, 0.86);
}

.host-face {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 20%;
  height: 21%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 28%, rgba(237, 198, 124, 0.09), rgba(0, 0, 0, 0.92) 65%);
}

.host-eyes {
  position: absolute;
  left: 50%;
  top: 30%;
  display: flex;
  gap: clamp(20px, 4vw, 38px);
  transform: translateX(-50%);
}

.host-eyes i {
  width: 10px;
  height: 4px;
  border-radius: 999px;
  background: #ffe0a0;
  box-shadow:
    0 0 10px #ffd47e,
    0 0 26px rgba(255, 124, 48, 0.78);
  animation: blink 6.8s infinite;
}

.host-hands {
  position: absolute;
  left: 50%;
  top: 64%;
  width: 115%;
  transform: translateX(-50%);
}

.host-hands i {
  position: absolute;
  width: 35%;
  height: 36px;
  border-radius: 999px 999px 40px 40px;
  background: linear-gradient(180deg, rgba(95, 60, 42, 0.72), rgba(17, 7, 6, 0.95));
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.52);
}

.host-hands i:first-child {
  left: 1%;
  transform: rotate(12deg);
  animation: hand-left 4.8s ease-in-out infinite alternate;
}

.host-hands i:last-child {
  right: 1%;
  transform: rotate(-12deg);
  animation: hand-right 5.1s ease-in-out infinite alternate;
}

.altar {
  position: absolute;
  top: 36%;
  width: clamp(150px, 19vw, 245px);
  height: 90px;
  border-top: 1px solid rgba(217, 168, 91, 0.18);
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 157, 71, 0.22), transparent 52%),
    linear-gradient(180deg, rgba(67, 32, 17, 0.5), rgba(7, 3, 2, 0.72));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.52);
}

.altar-left {
  left: 4%;
  transform: perspective(520px) rotateY(23deg) rotateZ(-2deg);
}

.altar-right {
  right: 4%;
  transform: perspective(520px) rotateY(-23deg) rotateZ(2deg);
}

.altar i,
.near-candles i,
.loading-ritual i {
  position: absolute;
  width: 8px;
  height: 32px;
  border-radius: 999px 999px 5px 5px;
  background:
    linear-gradient(90deg, rgba(93, 50, 30, 0.42), transparent 45% 60%, rgba(81, 34, 20, 0.46)),
    linear-gradient(#ffe7bd, #ad7650 72%, #6b452e);
  box-shadow: 0 0 18px rgba(255, 157, 69, 0.38);
}

.altar i::before,
.near-candles i::before,
.loading-ritual i::before {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 16px;
  height: 22px;
  content: "";
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle, #fff1bd 0 18%, #ffb05b 44%, rgba(255, 74, 42, 0.56) 62%, transparent 78%);
  animation: flame 1.4s ease-in-out infinite alternate;
}

.altar i {
  bottom: 46px;
}

.altar i:nth-child(1) {
  left: 22%;
}

.altar i:nth-child(2) {
  left: 50%;
  height: 42px;
}

.altar i:nth-child(3) {
  right: 22%;
}

.depth-air {
  z-index: 5;
  pointer-events: none;
}

.fog {
  position: absolute;
  inset: 0;
  filter: blur(17px);
  opacity: 0.54;
  mix-blend-mode: screen;
}

.fog-near {
  background:
    radial-gradient(ellipse at 32% 68%, rgba(126, 255, 235, 0.14), transparent 34%),
    radial-gradient(ellipse at 65% 73%, rgba(255, 151, 69, 0.08), transparent 38%);
  animation: fog-near 17s ease-in-out infinite alternate;
}

.fog-far {
  background:
    radial-gradient(ellipse at 55% 42%, rgba(126, 255, 235, 0.12), transparent 34%),
    radial-gradient(ellipse at 48% 58%, rgba(255, 255, 255, 0.05), transparent 46%);
  animation: fog-far 24s ease-in-out infinite alternate;
}

.dust {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    radial-gradient(circle, rgba(255, 225, 166, 0.22) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(135, 255, 240, 0.12) 0 1px, transparent 1.4px);
  background-size:
    150px 190px,
    220px 260px;
  background-position:
    0 0,
    70px 96px;
  animation: dust 29s linear infinite;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 7;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 30%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 20% 80%, rgba(0, 0, 0, 0.48));
}

.depth-table {
  z-index: 4;
  pointer-events: auto;
  transition: transform 1500ms ease;
}

.experience[data-camera="introRoom"] .depth-table {
  transform: translateY(13vh) scale(0.78);
}

.experience[data-camera="tableView"] .depth-table,
.experience[data-camera="cardFocus"] .depth-table {
  transform: translateY(0) scale(1);
}

.table-shadow {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 118vw;
  max-width: 1320px;
  height: 44vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.9), transparent 72%);
  filter: blur(18px);
}

.table-plane {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  width: min(1320px, 128vw);
  height: min(760px, 72vh);
  transform: translateX(-50%) perspective(1050px) rotateX(60deg);
  transform-origin: center bottom;
  transform-style: preserve-3d;
  border-radius: 50%;
}

.table-rim,
.table-wood {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.table-rim {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 178, 83, 0.18), transparent 38%),
    radial-gradient(ellipse at 50% 50%, transparent 0 58%, rgba(217, 168, 91, 0.22) 59% 61%, rgba(16, 6, 3, 0.96) 62% 100%);
  box-shadow:
    0 -24px 70px rgba(255, 118, 44, 0.12),
    inset 0 0 80px rgba(0, 0, 0, 0.72);
}

.table-wood {
  inset: 4.5%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(139, 68, 30, 0.56), rgba(48, 18, 8, 0.92) 58%, #170704 80%),
    repeating-radial-gradient(ellipse at 50% 50%, rgba(255, 202, 119, 0.07) 0 2px, transparent 3px 31px),
    repeating-linear-gradient(
      92deg,
      rgba(118, 58, 25, 0.2) 0 28px,
      rgba(27, 10, 5, 0.28) 28px 54px
    );
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.72),
    inset 0 0 0 18px rgba(48, 18, 8, 0.5);
}

.table-sigil {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(260px, 28%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(-8deg);
  border: 1px solid rgba(241, 216, 164, 0.26);
  border-radius: 50%;
  color: rgba(241, 216, 164, 0.34);
  font-size: clamp(4rem, 8vw, 7rem);
  text-shadow: 0 0 28px rgba(255, 187, 88, 0.18);
}

.table-sigil::before,
.table-sigil::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(241, 216, 164, 0.16);
  border-radius: 50%;
}

.table-sigil::before {
  inset: 17px;
}

.table-sigil::after {
  inset: 42px;
  border-style: dashed;
}

.ritual-deck {
  position: absolute;
  left: 50%;
  top: 17%;
  width: clamp(108px, 10vw, 150px);
  height: clamp(154px, 14.8vw, 214px);
  transform: translate(-50%, -50%) rotate(-7deg);
  transform-style: preserve-3d;
  transition: opacity 500ms ease, transform 700ms ease;
  z-index: 4;
}

.ritual-deck.is-hidden {
  opacity: 0.22;
}

.ritual-deck i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(241, 216, 164, 0.44);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(241, 216, 164, 0.2), transparent 28%),
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(241, 216, 164, 0.05) 10px 12px),
    linear-gradient(135deg, #140706, #611611 58%, #0f0605);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.46);
}

.ritual-deck i:nth-child(2) {
  transform: translate(3px, -3px);
}

.ritual-deck i:nth-child(3) {
  transform: translate(6px, -6px);
}

.ritual-deck i:nth-child(4) {
  transform: translate(9px, -9px);
}

.ritual-deck i:nth-child(5) {
  transform: translate(12px, -12px);
}

.experience[data-state="shuffle"] .ritual-deck {
  animation: deck-shuffle 1.15s ease-in-out infinite;
}

.tarot-spread {
  position: absolute;
  left: 50%;
  top: 20%;
  z-index: 5;
  width: min(720px, 62%);
  height: min(300px, 38%);
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.tarot-card-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(118px, 11.2vw, 166px);
  height: clamp(174px, 16vw, 238px);
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transform:
    translate(-50%, -50%)
    translate3d(0, -120px, 0)
    rotateZ(-8deg)
    scale(0.78);
  transform-style: preserve-3d;
  transition:
    opacity 560ms ease,
    transform 760ms cubic-bezier(0.16, 0.82, 0.18, 1),
    filter 340ms ease;
}

.tarot-card-shell[data-index="0"].is-dealt {
  opacity: 1;
  transform: translate(-50%, -50%) translate3d(-150%, 30px, 0) rotateZ(-10deg);
}

.tarot-card-shell[data-index="1"].is-dealt {
  opacity: 1;
  transform: translate(-50%, -50%) translate3d(0, -14px, 0) rotateZ(1deg);
}

.tarot-card-shell[data-index="2"].is-dealt {
  opacity: 1;
  transform: translate(-50%, -50%) translate3d(150%, 30px, 0) rotateZ(10deg);
}

.tarot-card-shell.is-active {
  filter: drop-shadow(0 0 22px rgba(255, 197, 98, 0.34));
}

.tarot-card-shell[data-index="0"].is-active {
  transform: translate(-50%, -50%) translate3d(-150%, 14px, 36px) rotateZ(-8deg) scale(1.08);
}

.tarot-card-shell[data-index="1"].is-active {
  transform: translate(-50%, -50%) translate3d(0, -32px, 36px) rotateZ(0deg) scale(1.08);
}

.tarot-card-shell[data-index="2"].is-active {
  transform: translate(-50%, -50%) translate3d(150%, 14px, 36px) rotateZ(8deg) scale(1.08);
}

.tarot-card-shell.is-dimmed {
  filter: brightness(0.48) saturate(0.68);
}

.card-position {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: 190%;
  transform: translateX(-50%);
  color: rgba(241, 216, 164, 0.7);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(0.52rem, 0.9vw, 0.68rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.86);
}

.tarot-card {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(0.2, 0.76, 0.16, 1);
}

.tarot-card-shell.is-flipped .tarot-card {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 216, 164, 0.5);
  border-radius: 12px;
  backface-visibility: hidden;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(255, 246, 204, 0.08);
}

.card-back {
  background:
    radial-gradient(circle at 50% 50%, rgba(241, 216, 164, 0.2), transparent 28%),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(241, 216, 164, 0.05) 9px 11px),
    linear-gradient(135deg, #150706, #661713 56%, #0d0505);
}

.card-back::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(241, 216, 164, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(241, 216, 164, 0.17) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(241, 216, 164, 0.16) 49% 51%, transparent 52%);
}

.back-symbol {
  position: relative;
  color: rgba(241, 216, 164, 0.86);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  text-shadow:
    0 0 18px rgba(255, 196, 98, 0.34),
    0 0 48px rgba(255, 104, 62, 0.2);
}

.card-front {
  grid-template-rows: auto auto 1fr auto auto;
  padding: 10px;
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 247, 210, 0.46), transparent 24%),
    radial-gradient(circle at 50% 56%, rgba(117, 59, 30, 0.25), transparent 45%),
    linear-gradient(180deg, #ead8aa, #a27947 72%, #6d452b);
  color: #24110b;
  text-align: center;
}

.card-front::before,
.card-front::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(52, 20, 11, 0.22);
  border-radius: 10px;
}

.card-front::before {
  inset: 8px;
}

.card-front::after {
  inset: 17px;
  border-style: dotted;
  opacity: 0.5;
}

.card-number,
.card-arcana,
.card-illustration,
.card-name,
.card-orientation {
  position: relative;
  z-index: 1;
}

.card-number {
  justify-self: start;
  color: rgba(44, 20, 12, 0.7);
  font-size: 0.72rem;
}

.card-arcana {
  max-width: 100%;
  color: rgba(44, 20, 12, 0.58);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 0.52rem;
}

.card-illustration {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: grid;
  place-items: center;
}

.card-halo {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid rgba(47, 20, 12, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 252, 224, 0.35), transparent 35%),
    repeating-radial-gradient(circle, transparent 0 10px, rgba(47, 20, 12, 0.08) 11px 12px);
}

.card-glyph {
  position: relative;
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 1;
}

.suit-major .card-glyph,
.suit-wands .card-glyph {
  color: rgba(105, 41, 18, 0.86);
}

.suit-cups .card-glyph {
  color: rgba(35, 67, 94, 0.84);
}

.suit-swords .card-glyph {
  color: rgba(50, 54, 70, 0.84);
}

.suit-pentacles .card-glyph {
  color: rgba(68, 85, 38, 0.86);
}

.card-name {
  font-size: clamp(0.86rem, 1.4vw, 1.08rem);
  line-height: 1.06;
}

.card-orientation {
  color: #6c281e;
  font-size: 0.68rem;
}

.is-reversed .card-illustration,
.is-reversed .card-name {
  transform: rotate(180deg);
}

.near-candles {
  position: absolute;
  left: 50%;
  bottom: 35%;
  width: min(360px, 36%);
  height: 60px;
  transform: translateX(-50%);
}

.near-candles i {
  bottom: 8px;
}

.near-candles i:nth-child(1) {
  left: 8%;
}

.near-candles i:nth-child(2) {
  left: 35%;
  height: 38px;
}

.near-candles i:nth-child(3) {
  right: 35%;
}

.near-candles i:nth-child(4) {
  right: 8%;
  height: 40px;
}

.ui-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  padding:
    calc(12px + var(--safe-top))
    clamp(12px, 3vw, 30px)
    calc(14px + var(--safe-bottom));
}

.ui-layer > * {
  pointer-events: auto;
}

.brand {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 50%;
  width: min(560px, 90vw);
  transform: translateX(-50%);
  text-align: center;
  transition:
    opacity 700ms ease,
    transform 900ms ease,
    filter 700ms ease;
}

.brand p {
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.brand h1 {
  margin: 0;
  color: rgba(241, 216, 164, 0.92);
  font-weight: 400;
  font-size: clamp(2rem, 5.6vw, 4.2rem);
  line-height: 0.95;
  text-shadow:
    0 0 28px rgba(255, 160, 70, 0.22),
    0 12px 34px rgba(0, 0, 0, 0.82);
}

.experience:not([data-state="idle"]) .brand {
  opacity: 0;
  transform: translateX(-50%) translateY(-48px) scale(0.64);
  filter: blur(4px);
  pointer-events: none;
}

.host-dialogue {
  position: absolute;
  left: 50%;
  top: calc(88px + var(--safe-top));
  width: min(720px, 86vw);
  transform: translateX(-50%);
  padding: 12px 16px 14px;
  border: 1px solid rgba(135, 255, 240, 0.17);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(4, 18, 16, 0.52), rgba(24, 7, 6, 0.66)),
    rgba(5, 3, 3, 0.48);
  box-shadow:
    inset 0 0 35px rgba(135, 255, 240, 0.04),
    0 18px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.experience:not([data-state="idle"]) .host-dialogue {
  top: calc(16px + var(--safe-top));
  width: min(620px, 80vw);
  padding: 9px 13px 10px;
  background:
    linear-gradient(90deg, rgba(4, 18, 16, 0.42), rgba(24, 7, 6, 0.5)),
    rgba(5, 3, 3, 0.34);
}

.speaker {
  margin: 0 0 5px;
  color: rgba(151, 255, 221, 0.72);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

#hostText {
  min-height: 1.42em;
  margin: 0;
  color: #d9f6dc;
  line-height: 1.48;
  text-shadow: 0 0 16px rgba(135, 255, 240, 0.12);
}

.experience:not([data-state="idle"]) #hostText {
  line-height: 1.38;
  font-size: clamp(0.86rem, 1.45vw, 0.98rem);
}

.ritual-panel,
.error-panel {
  position: absolute;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  width: min(720px, 88vw);
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 157, 71, 0.07), transparent 48%),
    rgba(7, 4, 4, 0.58);
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, 0.42),
    0 20px 56px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.experience[data-state^="interpret_card"] .ritual-panel,
.experience[data-state="final_summary"] .ritual-panel,
.experience[data-state="completed"] .ritual-panel {
  bottom: calc(14px + var(--safe-bottom));
  width: min(560px, 78vw);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 157, 71, 0.08), transparent 42%),
    rgba(7, 4, 4, 0.48);
  backdrop-filter: blur(8px);
}

.experience[data-state="idle"] .ritual-panel {
  width: min(650px, 86vw);
}

.panel-body,
.card-reading {
  padding: clamp(14px, 2.2vw, 22px);
}

.panel-body p,
.card-reading p {
  margin: 0;
  color: #ecd3a1;
  line-height: 1.55;
}

.microcopy {
  margin-top: 10px !important;
  color: var(--paper-dim) !important;
  font-size: 0.88rem;
}

.ritual-button {
  border: 1px solid rgba(241, 216, 164, 0.42);
  border-radius: 999px;
  color: #f6dfae;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 211, 117, 0.2), transparent 52%),
    linear-gradient(180deg, rgba(98, 25, 17, 0.96), rgba(38, 9, 6, 0.96));
  cursor: pointer;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 0 20px rgba(255, 203, 112, 0.05);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.ritual-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(255, 170, 82, 0.12);
}

.ritual-button:disabled {
  cursor: wait;
  opacity: 0.66;
  filter: saturate(0.65);
}

.ritual-button-main {
  display: block;
  min-width: min(260px, 100%);
  margin: 12px auto 0;
  padding: 10px 18px;
  font-size: 0.94rem;
}

.ritual-button-small {
  margin: 10px 4px 0;
  padding: 10px 15px;
  font-size: 0.92rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(135, 255, 240, 0.1), transparent 52%),
    rgba(22, 9, 7, 0.94);
}

.loading-ritual {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 18px;
  height: 48px;
  margin: 14px 0 4px;
}

.loading-ritual i {
  position: relative;
  bottom: auto;
  animation: candle-pulse 1.8s ease-in-out infinite alternate;
}

.loading-ritual i:nth-child(2) {
  animation-delay: -0.22s;
}

.loading-ritual i:nth-child(3) {
  animation-delay: -0.44s;
}

.loading-ritual i:nth-child(4) {
  animation-delay: -0.66s;
}

.loading-ritual i:nth-child(5) {
  animation-delay: -0.88s;
}

.card-reading {
  max-height: 15vh;
  overflow: auto;
}

.kicker {
  margin-bottom: 6px !important;
  color: var(--gold) !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.card-reading h2 {
  margin: 0 0 6px;
  color: var(--gold-soft);
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.card-reading p {
  font-size: clamp(0.82rem, 1.25vw, 0.92rem);
}

.experience[data-state^="interpret_card"] .panel-body,
.experience[data-state^="interpret_card"] .card-reading,
.experience[data-state="final_summary"] .panel-body,
.experience[data-state="final_summary"] .card-reading,
.experience[data-state="completed"] .panel-body,
.experience[data-state="completed"] .card-reading {
  padding: 12px 15px 10px;
}

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

.keywords span {
  border: 1px solid rgba(217, 168, 91, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
  color: #f0d7a2;
  background: rgba(80, 25, 15, 0.44);
  font-size: 0.74rem;
}

.action-row {
  padding: 0 clamp(12px, 2vw, 18px) clamp(10px, 1.8vw, 14px);
  text-align: center;
}

.audio {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
}

.error-panel {
  padding: 18px;
}

@keyframes light-breathe {
  to {
    opacity: 0.28;
    transform: translateY(8px) rotate(7deg);
  }
}

@keyframes blink {
  0%,
  45%,
  52%,
  100% {
    transform: scaleY(1);
  }

  48% {
    transform: scaleY(0.1);
  }
}

@keyframes hand-left {
  to {
    transform: translateY(7px) rotate(8deg);
  }
}

@keyframes hand-right {
  to {
    transform: translateY(7px) rotate(-8deg);
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) scaleY(0.82) rotate(-2deg);
    opacity: 0.76;
  }

  to {
    transform: translateX(-50%) scaleY(1.13) rotate(2deg);
    opacity: 1;
  }
}

@keyframes fog-near {
  to {
    transform: translate3d(7vw, -2vh, 0) scale(1.14);
  }
}

@keyframes fog-far {
  to {
    transform: translate3d(-6vw, 3vh, 0) scale(1.16);
  }
}

@keyframes dust {
  to {
    background-position:
      150px 280px,
      240px 360px;
  }
}

@keyframes deck-shuffle {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-8deg);
  }

  38% {
    transform: translate(calc(-50% - 24px), calc(-50% + 8px)) rotate(-18deg);
  }

  72% {
    transform: translate(calc(-50% + 25px), calc(-50% - 8px)) rotate(14deg);
  }
}

@keyframes candle-pulse {
  to {
    filter: drop-shadow(0 0 12px rgba(255, 160, 70, 0.44));
  }
}

@media (max-width: 820px) {
  .brand {
    top: calc(10px + var(--safe-top));
  }

  .brand p {
    font-size: 0.58rem;
  }

  .brand h1 {
    font-size: clamp(1.9rem, 10vw, 3.3rem);
  }

  .host-dialogue {
    top: calc(68px + var(--safe-top));
    width: calc(100vw - 22px);
    padding: 11px 13px;
  }

  .speaker {
    font-size: 0.58rem;
  }

  #hostText {
    font-size: 0.92rem;
  }

  .host-figure {
    top: 14%;
    width: 72vw;
    height: 38vh;
  }

  .host-hands {
    display: none;
  }

  .back-wall {
    left: -4%;
    right: -4%;
    height: 52%;
  }

  .window-left {
    left: 7%;
  }

  .window-right {
    right: 7%;
  }

  .wall-sigil {
    opacity: 0.34;
  }

  .altar {
    opacity: 0.7;
    top: 40%;
  }

  .table-plane {
    bottom: 14vh;
    width: 132vw;
    height: 56vh;
  }

  .ritual-deck {
    top: 13%;
  }

  .tarot-spread {
    top: 15%;
    width: 74%;
  }

  .tarot-card-shell {
    width: clamp(82px, 23vw, 112px);
    height: clamp(122px, 34vw, 166px);
  }

  .tarot-card-shell[data-index="0"].is-dealt {
    transform: translate(-50%, -50%) translate3d(-116%, 22px, 0) rotateZ(-10deg);
  }

  .tarot-card-shell[data-index="1"].is-dealt {
    transform: translate(-50%, -50%) translate3d(0, -8px, 0) rotateZ(1deg);
  }

  .tarot-card-shell[data-index="2"].is-dealt {
    transform: translate(-50%, -50%) translate3d(116%, 22px, 0) rotateZ(10deg);
  }

  .tarot-card-shell[data-index="0"].is-active {
    transform: translate(-50%, -50%) translate3d(-116%, 8px, 30px) rotateZ(-8deg) scale(1.08);
  }

  .tarot-card-shell[data-index="1"].is-active {
    transform: translate(-50%, -50%) translate3d(0, -24px, 30px) rotateZ(0deg) scale(1.08);
  }

  .tarot-card-shell[data-index="2"].is-active {
    transform: translate(-50%, -50%) translate3d(116%, 8px, 30px) rotateZ(8deg) scale(1.08);
  }

  .card-position {
    width: 170%;
    font-size: 0.46rem;
  }

  .card-arcana {
    display: none;
  }

  .card-illustration {
    min-height: 42px;
  }

  .card-name {
    font-size: 0.72rem;
  }

  .card-orientation {
    font-size: 0.58rem;
  }

  .ritual-panel,
  .error-panel {
    width: calc(100vw - 20px);
    bottom: calc(10px + var(--safe-bottom));
  }

  .experience[data-state^="reveal_card"] .ritual-panel,
  .experience[data-state^="interpret_card"] .ritual-panel,
  .experience[data-state="final_summary"] .ritual-panel,
  .experience[data-state="completed"] .ritual-panel {
    bottom: calc(8px + var(--safe-bottom));
  }

  .panel-body,
  .card-reading {
    padding: 13px;
  }

  .card-reading {
    max-height: 18vh;
  }

  .keywords {
    display: none;
  }

  .ritual-button-main {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 430px) {
  .experience[data-camera="tableView"] .world,
  .experience[data-camera="cardFocus"] .world {
    transform: translate3d(0, -24px, 0) scale(1.04);
  }

  .host-dialogue {
    top: calc(54px + var(--safe-top));
  }

  .brand h1 {
    opacity: 0.7;
  }

  .brand p {
    display: none;
  }

  .ritual-panel {
    border-radius: 16px;
  }

  .near-candles,
  .wall-sigil,
  .altar {
    display: none;
  }
}

.experience[data-quality="medium"] .dust {
  opacity: 0.34;
}

.experience[data-quality="medium"] .fog {
  filter: blur(12px);
}

.experience[data-quality="low"] .dust,
.experience[data-quality="low"] .wall-sigil,
.experience[data-quality="low"] .altar,
.experience[data-quality="low"] .window-light {
  opacity: 0.18;
}

.experience[data-quality="low"] .fog {
  opacity: 0.28;
  filter: blur(8px);
}

.experience[data-quality="low"] .host-shadow,
.experience[data-quality="low"] .vignette {
  opacity: 0.75;
}

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

.experience[data-motion="reduced"] *,
.experience[data-motion="reduced"] *::before,
.experience[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
