@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Inter:wght@400;500;600&display=swap");

:root {
  --ink: #f5ecd9;
  --muted: #b8aebd;
  --violet: #9e82d5;
  --violet-bright: #c9adff;
  --gold: #c9a968;
  --night: #090713;
  --glass: rgba(15, 12, 29, .67);
  --line: rgba(226, 207, 255, .17);
  --room-x: 0deg;
  --room-y: 0deg;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--night); }
body { color: var(--ink); font-family: Inter, system-ui, sans-serif; overflow: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.room {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  perspective: 1400px;
  background: #090713;
}
.room-background {
  position: absolute;
  inset: -4%;
  z-index: -6;
  background: url("assets/tarot-room-wide-v1.png") center 46% / cover no-repeat;
  transform: rotateX(var(--room-y)) rotateY(var(--room-x)) scale(1.07);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  filter: saturate(.85) brightness(.71) contrast(1.08);
}
.room-firelight {
  position: absolute; inset: -4%; z-index: -4; pointer-events: none;
  transform: rotateX(var(--room-y)) rotateY(var(--room-x)) scale(1.07);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.wall-flame {
  position: absolute; left: var(--x); top: var(--y); width: 9px; height: 22px;
  border-radius: 78% 22% 62% 38%; transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 72%, #fff9cf 0 13%, #ffc65d 35%, rgba(245,124,31,.72) 60%, transparent 72%);
  filter: blur(.15px); mix-blend-mode: screen;
  animation: wall-flame-flicker var(--speed) var(--delay) ease-in-out infinite alternate;
}
.wall-flame-a { --x: 5.5%; --y: 34.7%; --scale: .72; --delay: -1.8s; --speed: 1.34s; }
.wall-flame-b { --x: 12.2%; --y: 37.7%; --scale: 1; --delay: -.6s; --speed: 1.08s; }
.wall-flame-c { --x: 18.1%; --y: 54.2%; --scale: .82; --delay: -2.1s; --speed: 1.51s; }
.wall-flame-d { --x: 20.2%; --y: 80.6%; --scale: .88; --delay: -.2s; --speed: 1.17s; }
.wall-flame-e { --x: 74%; --y: 57.2%; --scale: .62; --delay: -1.3s; --speed: 1.43s; }
.wall-flame-f { --x: 81.1%; --y: 82.3%; --scale: .56; --delay: -2.6s; --speed: 1.29s; }
.wall-flame-g { --x: 94.1%; --y: 86%; --scale: .72; --delay: -.9s; --speed: 1.56s; }
.wall-flame-h { --x: 94.2%; --y: 13.1%; --scale: .76; --delay: -2.4s; --speed: 1.21s; }
.wall-flame::before {
  content: ""; position: absolute; left: 50%; top: 68%; width: 74px; height: 74px;
  border-radius: 50%; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(255,174,70,.3), rgba(227,101,37,.1) 38%, transparent 70%);
  filter: blur(7px); animation: firelight-bloom 2.3s ease-in-out infinite alternate;
}
@keyframes wall-flame-flicker {
  0% { transform: translate(-50%,-94%) scale(var(--scale)) rotate(-2deg) skewX(-3deg); opacity: .58; }
  37% { transform: translate(-50%,-98%) scale(var(--scale)) scale(.91,1.1) rotate(3deg) skewX(6deg); opacity: .92; }
  70% { transform: translate(-50%,-95%) scale(var(--scale)) scale(1.04,.88) rotate(-4deg); opacity: .68; }
  100% { transform: translate(-50%,-101%) scale(var(--scale)) scale(.95,1.06) rotate(2deg) skewX(4deg); opacity: 1; }
}
@keyframes firelight-bloom { to { opacity: .5; transform: translate(-50%,-50%) scale(1.22); } }
.room-haze {
  position: absolute; inset: 0; z-index: -5; pointer-events: none;
  background:
    radial-gradient(circle at 50% 43%, rgba(104,73,145,.1), transparent 27%),
    linear-gradient(180deg, rgba(5,4,12,.22), transparent 30%, rgba(5,4,12,.25));
}
.room-vignette {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  box-shadow: inset 0 0 13vw 5vw rgba(0,0,0,.72);
}
.dust {
  position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: .3;
  background-image:
    radial-gradient(circle, rgba(255,229,180,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(203,184,255,.65) 0 1px, transparent 1.5px);
  background-size: 151px 173px, 227px 199px;
  animation: dust-drift 18s linear infinite;
}
@keyframes dust-drift { to { background-position: 40px -90px, -70px -50px; } }

.room-header {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 4vw, 64px);
  background: linear-gradient(180deg, rgba(5,4,12,.82), transparent);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; width: max-content; }
.brand-moon { font: 500 38px/1 "Cormorant Garamond", serif; color: var(--gold); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Cormorant Garamond", serif; letter-spacing: .23em; font-size: 20px; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; margin-top: 2px; }
.status-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(9,7,19,.45);
  backdrop-filter: blur(16px); color: #c9bfce; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
}
.status-pill i, .presence-chip i, .caption-name i, .room-meter > i {
  width: 6px; height: 6px; border-radius: 50%; background: #9aa188;
  box-shadow: 0 0 10px currentColor; animation: pulse 2.4s ease-in-out infinite;
}
.session-clock { justify-self: end; display: flex; align-items: center; gap: 13px; font-size: 11px; color: var(--muted); }
.session-clock strong { color: var(--ink); font: 600 19px "Cormorant Garamond", serif; letter-spacing: .08em; }
@keyframes pulse { 50% { opacity: .42; transform: scale(.72); } }

.reader-stage {
  position: absolute; z-index: 2; top: 5vh; bottom: 21vh; left: 50%; width: min(46vw, 610px);
  transform: translateX(-50%); pointer-events: none;
}
.reader-aura {
  position: absolute; inset: 10% 5% 0; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(119,75,147,.18), transparent 66%);
  filter: blur(16px); animation: aura 5s ease-in-out infinite;
}
@keyframes aura { 50% { opacity: .55; transform: scale(1.04); } }
.reader-visual { position: absolute; inset: 0; display: grid; place-items: center; }
.local-avatar { position: absolute; inset: 0; transform-origin: 50% 67%; }
.local-avatar > img, .avatar-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 31%;
  filter: brightness(.9) saturate(.87) contrast(1.05) drop-shadow(0 30px 30px rgba(0,0,0,.54));
  -webkit-mask-image: radial-gradient(ellipse 69% 88% at 50% 44%, #000 56%, transparent 100%);
  mask-image: radial-gradient(ellipse 69% 88% at 50% 44%, #000 56%, transparent 100%);
}
.avatar-video { position: absolute; inset: 0; }
.waiting-jaw-layer {
  opacity: 0; pointer-events: none; transform-origin: 50% 51.5%;
  -webkit-mask-image: radial-gradient(ellipse 17% 8% at 50% 51.3%, #000 10%, rgba(0,0,0,.9) 42%, transparent 76%);
  mask-image: radial-gradient(ellipse 17% 8% at 50% 51.3%, #000 10%, rgba(0,0,0,.9) 42%, transparent 76%);
}
.waiting-mouth {
  position: absolute; z-index: 3; left: 50%; top: 51.7%; width: 13.4%; height: 2.5%;
  border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%,-50%);
  background:
    radial-gradient(ellipse at 50% 42%, rgba(42,13,22,.92) 0 18%, rgba(85,28,40,.78) 31%, transparent 61%),
    radial-gradient(ellipse at 50% 71%, rgba(196,102,114,.65) 0 20%, transparent 55%);
  filter: blur(.25px) saturate(.9);
  box-shadow: inset 0 -1px rgba(243,165,166,.28);
}
.portrait-glow {
  position: absolute; z-index: 2; width: 88px; aspect-ratio: 1; border-radius: 50%;
  opacity: .18; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,192,93,.62), rgba(233,110,35,.13) 35%, transparent 70%);
  filter: blur(7px); animation: portrait-firelight 1.8s ease-in-out infinite alternate;
}
.portrait-glow-left { left: 5%; top: 49%; animation-delay: -.7s; }
.portrait-glow-right { right: 4%; top: 53%; width: 62px; animation-duration: 1.35s; animation-delay: -1.1s; }
@keyframes portrait-firelight { to { opacity: .34; transform: scale(1.18) translateY(-2px); } }
.waiting-live {
  position: absolute; z-index: 8; top: 17%; right: -2%; display: grid; gap: 3px;
  padding: 9px 11px; border: 1px solid rgba(234,212,255,.16); border-radius: 10px;
  background: rgba(7,6,15,.5); backdrop-filter: blur(13px); box-shadow: 0 12px 35px rgba(0,0,0,.22);
  opacity: 0; transform: translateY(5px); transition: opacity .5s ease, transform .5s ease;
}
.waiting-live span { display: flex; align-items: center; gap: 6px; color: #ded5e3; font-size: 8px; font-weight: 600; letter-spacing: .14em; }
.waiting-live span i { width: 6px; height: 6px; border-radius: 50%; background: #bd6381; box-shadow: 0 0 10px #bd6381; animation: live-dot 1.7s ease-in-out infinite; }
.waiting-live small { color: #8f8492; font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
@keyframes live-dot { 50% { opacity: .38; } }
.queue-preview .local-avatar { animation: waiting-presence 9.5s ease-in-out infinite; }
.queue-preview .waiting-jaw-layer { opacity: .95; animation: waiting-jaw 6.8s steps(1,end) infinite; }
.queue-preview .waiting-mouth { animation: waiting-mouth-speech 6.8s steps(1,end) infinite; }
.queue-preview .waiting-live { opacity: 1; transform: translateY(0); }
.queue-preview .reader-aura { animation-duration: 3.8s; }
@keyframes waiting-presence {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  28% { transform: translate3d(-.35%,.15%,0) scale(1.006); }
  61% { transform: translate3d(.28%,-.1%,0) scale(1.01); }
  82% { transform: translate3d(.08%,.18%,0) scale(1.004); }
}
@keyframes waiting-jaw {
  0%,8%,13%,18%,23%,32%,37%,43%,58%,64%,70%,80%,86%,100% { transform: translateY(0) scaleY(1); }
  10%,20%,34%,45%,60%,72%,82% { transform: translateY(1.1px) scaleY(1.008); }
  11%,21%,35%,47%,61%,74%,83% { transform: translateY(2px) scaleY(1.013); }
}
@keyframes waiting-mouth-speech {
  0%,8%,13%,18%,23%,32%,37%,43%,58%,64%,70%,80%,86%,100% { opacity: 0; transform: translate(-50%,-50%) scaleY(.2); }
  10%,20%,34%,45%,60%,72%,82% { opacity: .62; transform: translate(-50%,-50%) scale(.72,.5); }
  11%,21%,35%,47%,61%,74%,83% { opacity: .78; transform: translate(-50%,-50%) scale(1,.9); }
}
.presence-chip {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; white-space: nowrap;
  padding: 7px 12px; border: 1px solid rgba(223,204,255,.15); border-radius: 999px;
  background: rgba(9,7,19,.55); backdrop-filter: blur(12px);
  color: #ddd4e2; font-size: 9px; letter-spacing: .13em; text-transform: uppercase;
}
.session-active .presence-chip i { background: #a8ba8c; }
.reader-stage.is-thinking .reader-aura { animation-duration: 1.1s; }

.sky-orbit {
  position: absolute; z-index: 4; inset: 8% -18% 12%; display: grid; place-items: center;
  color: var(--gold); opacity: .78; animation: sky-in 1.3s ease both;
}
@keyframes sky-in { from { opacity: 0; transform: scale(.75) rotate(-8deg); } }
.orbit-ring { position: absolute; border: 1px solid rgba(205,176,115,.36); border-radius: 50%; }
.ring-a { width: 92%; aspect-ratio: 1; animation: spin 30s linear infinite; }
.ring-b { width: 69%; aspect-ratio: 1; border-style: dashed; animation: spin 21s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.sun-glyph { position: absolute; top: 4%; font-size: 36px; text-shadow: 0 0 20px rgba(218,183,111,.5); }
.sky-orbit p {
  position: absolute; right: -2%; top: 38%; margin: 0; text-align: center;
  font: italic 20px "Cormorant Garamond", serif; text-shadow: 0 2px 7px #000;
}
.sky-orbit p strong { display: block; font: 600 34px "Cormorant Garamond", serif; color: var(--ink); }
.sky-orbit p small { display: block; color: var(--muted); font: 9px Inter; letter-spacing: .12em; text-transform: uppercase; }

.table-scene {
  position: absolute; z-index: 10; left: -5%; right: -5%; bottom: -4vh; height: 37vh;
  transform-style: preserve-3d; transform: rotateX(54deg); transform-origin: center bottom;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(88,55,102,.5), transparent 46%),
    repeating-linear-gradient(89deg, transparent 0 90px, rgba(255,255,255,.015) 92px 93px),
    linear-gradient(90deg, #170d15, #271522 47%, #130b12);
  border-top: 1px solid rgba(229,199,155,.27);
  box-shadow: 0 -30px 90px rgba(0,0,0,.38), inset 0 16px 30px rgba(0,0,0,.34);
}
.table-edge { position: absolute; left: 0; right: 0; bottom: -3vh; height: 8vh; background: linear-gradient(#1b0f16,#0a0609); box-shadow: inset 0 1px rgba(215,177,107,.12); }
.table-card-area { position: absolute; inset: 5% 22% 18%; transform-style: preserve-3d; }
.table-tarot-card {
  --tx: 0px; --rot: 0deg;
  --card-accent: #5c4166;
  --card-halo: rgba(138,102,156,.22);
  position: absolute; left: calc(50% - clamp(49px, 4.7vw, 74px)); top: 2%;
  width: clamp(98px, 9.4vw, 148px); aspect-ratio: .62;
  padding: 6px; color: #231526; border-radius: 7px;
  background: linear-gradient(145deg,#ead9b6,#b99564);
  box-shadow: 0 18px 30px rgba(0,0,0,.46), inset 0 0 0 1px rgba(66,38,38,.4);
  transform: translateX(var(--tx)) rotateZ(var(--rot)) translateZ(6px);
  animation: deal-card .95s cubic-bezier(.18,.85,.24,1.03) both;
  animation-delay: calc(var(--deal-index) * .24s);
}
.table-tarot-card.suit-bastos { --card-accent: #8e3f2d; --card-halo: rgba(196,91,49,.24); }
.table-tarot-card.suit-copas { --card-accent: #7b2947; --card-halo: rgba(166,55,91,.22); }
.table-tarot-card.suit-espadas { --card-accent: #38566b; --card-halo: rgba(71,117,143,.22); }
.table-tarot-card.suit-oros { --card-accent: #80601d; --card-halo: rgba(184,142,46,.25); }
.table-tarot-card.deck-lenormand { --card-accent: #31574e; --card-halo: rgba(68,123,108,.24); background: linear-gradient(145deg,#e9ddbd,#aa8b5c); }
.deck-lenormand .card-face { background: radial-gradient(circle at 50% 35%, var(--card-halo), transparent 37%), repeating-linear-gradient(135deg,rgba(56,91,77,.035) 0 2px,transparent 2px 8px), linear-gradient(#f0e5ca,#d3b783); }
.deck-lenormand .card-symbol { font-family: "Segoe UI Symbol", "Cormorant Garamond", serif; }
.deck-lenormand .card-orientation { visibility: hidden; }
@keyframes deal-card {
  0% { opacity: 0; transform: translate(38vw, 32vh) rotateZ(28deg) translateZ(90px) scale(.82); }
  65% { opacity: 1; }
  100% { transform: translateX(var(--tx)) rotateZ(var(--rot)) translateZ(6px); }
}
.table-tarot-card:nth-child(1):nth-last-child(3) { --tx: clamp(-180px, -11vw, -105px); --rot: -7deg; }
.table-tarot-card:nth-child(2):nth-last-child(2) { --tx: 0px; --rot: 1deg; }
.table-tarot-card:nth-child(3):last-child { --tx: clamp(105px, 11vw, 180px); --rot: 7deg; }
.card-face {
  width: 100%; height: 100%; padding: 9px 7px; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid rgba(49,29,51,.57); background:
    radial-gradient(circle at 50% 35%, var(--card-halo), transparent 34%),
    linear-gradient(#eee1c5,#d9bd8c);
}
.card-face.reversed { transform: rotate(180deg); }
.card-number, .card-position { font-size: clamp(6px,.55vw,9px); letter-spacing: .12em; text-transform: uppercase; }
.card-symbol { font: 600 clamp(28px,3vw,48px) "Cormorant Garamond"; margin: auto 0 2px; color: var(--card-accent); text-shadow: 0 1px rgba(255,255,255,.35); }
.card-face h3 { margin: 2px 0; font: 600 clamp(13px,1.3vw,20px)/1 "Cormorant Garamond"; }
.card-face p { margin: 3px 0 auto; font-size: clamp(6px,.55vw,9px); line-height: 1.25; }
.card-orientation { color: var(--card-accent); font-size: clamp(5px,.48vw,8px); letter-spacing: .09em; margin-top: 3px; text-transform: uppercase; }
.deck-home {
  position: absolute; right: 13%; top: 12%; width: 7.5vw; max-width: 108px; min-width: 72px; aspect-ratio: .62;
  background: #171126; border: 2px solid #9e7d4b; border-radius: 7px; color: #c2a26c;
  display: grid; place-items: center; box-shadow: 8px 10px 0 #0b0811, 14px 17px 25px rgba(0,0,0,.5);
}
.deck-home::after { content: ""; position: absolute; inset: 7px; border: 1px solid #846f5e; }
.deck-home b { font: 42px "Cormorant Garamond"; }
.pendulum-tool {
  position: absolute; z-index: 8; left: 50%; top: -12%; width: clamp(220px,24vw,350px); height: 92%;
  transform: translateX(-50%); opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.pendulum-tool.is-active { opacity: 1; }
.pendulum-board {
  position: absolute; left: 50%; bottom: 3%; width: 88%; height: 43%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-around; padding: 0 14%;
  color: rgba(219,189,132,.72); border: 1px solid rgba(208,174,111,.38); border-radius: 50%;
  background: radial-gradient(circle,rgba(92,59,83,.52),rgba(18,11,21,.9) 68%), repeating-conic-gradient(from 0deg,rgba(219,187,125,.08) 0 1deg,transparent 1deg 30deg);
  box-shadow: inset 0 0 35px rgba(0,0,0,.62),0 15px 35px rgba(0,0,0,.38);
}
.pendulum-board::before,.pendulum-board::after { content:""; position:absolute; left:50%; top:10%; bottom:10%; width:1px; background:linear-gradient(transparent,rgba(210,177,117,.28),transparent); }
.pendulum-board::before { transform:rotate(60deg); }.pendulum-board::after { transform:rotate(-60deg); }
.pendulum-board i { font: 25px "Cormorant Garamond",serif; }.pendulum-board b { font: 18px Inter,sans-serif; color:#a98e63; }
.pendulum-chain {
  position: absolute; left: calc(50% - 1px); top: -2%; width: 2px; height: 70%;
  transform: rotateX(-54deg); transform-origin: 50% 0;
  background: linear-gradient(#ae9469,#e3c98f 45%,#796141); filter: drop-shadow(0 4px 5px #000);
}
.pendulum-chain i {
  position:absolute; left:50%; bottom:-13px; width:22px; height:31px; transform:translateX(-50%);
  clip-path:polygon(50% 0,88% 34%,68% 100%,32% 100%,12% 34%);
  background:linear-gradient(110deg,#4e345a,#c49bd1 48%,#4b3357); box-shadow:0 0 18px rgba(188,135,207,.5);
}
.pendulum-tool.is-active[data-motion="circle"] .pendulum-chain { animation: pendulum-circle 1.7s ease-in-out 1 both; }
.pendulum-tool.is-active[data-motion="lateral"] .pendulum-chain { animation: pendulum-lateral 1.7s ease-in-out 1 both; }
.pendulum-tool.is-active[data-motion="still"] .pendulum-chain { animation: pendulum-still 1.7s ease-out 1 both; }
@keyframes pendulum-circle {
  0% { transform:rotateX(-54deg) rotateZ(0deg); }
  18% { transform:rotateX(-54deg) rotateZ(-13deg) translateX(-5px); }
  43% { transform:rotateX(-54deg) rotateZ(11deg) translateX(5px); }
  69% { transform:rotateX(-54deg) rotateZ(-8deg) translateX(-3px); }
  100% { transform:rotateX(-54deg) rotateZ(4deg); }
}
@keyframes pendulum-lateral {
  0%,100% { transform:rotateX(-54deg) rotateZ(0deg); }
  22% { transform:rotateX(-54deg) rotateZ(-17deg); }
  48% { transform:rotateX(-54deg) rotateZ(17deg); }
  73% { transform:rotateX(-54deg) rotateZ(-10deg); }
}
@keyframes pendulum-still { 0% { transform:rotateX(-54deg) rotateZ(5deg); } 100% { transform:rotateX(-54deg) rotateZ(0deg); } }
.pendulum-tool p {
  position:absolute; left:50%; bottom:-3%; transform:translateX(-50%); width:100%; margin:0; text-align:center;
  color:#cdb58a; font:600 clamp(8px,.7vw,11px) Inter,sans-serif; letter-spacing:.14em; text-transform:uppercase; text-shadow:0 2px 4px #000;
}
.candle { position: absolute; top: 8%; transform: rotateX(-54deg); transform-origin: bottom; }
.candle-left { left: 9%; } .candle-right { right: 6%; }
.candle span { display: block; width: 18px; height: 72px; border-radius: 7px 7px 2px 2px; background: linear-gradient(90deg,#806a51,#e4c79a,#6f5945); box-shadow: 0 0 20px rgba(236,183,94,.2); }
.candle i { display: block; margin: 0 auto -2px; width: 10px; height: 23px; border-radius: 80% 20% 55% 45%; transform-origin: 50% 100%; background: radial-gradient(ellipse at 50% 74%,#fff9cc 0 13%,#ffd06f 37%,#ec7d2f 66%,transparent 70%); box-shadow: 0 0 25px 8px rgba(244,176,68,.42); animation: flame 1.1s ease-in-out infinite alternate; }
.candle-right i { animation-duration: 1.37s; animation-delay: -.7s; }
@keyframes flame {
  0% { transform: skewX(-4deg) scale(.94,1.05); filter: brightness(.9); }
  42% { transform: translateX(1px) skewX(8deg) scale(1.04,.86); filter: brightness(1.18); }
  100% { transform: translateX(-1px) skewX(-7deg) scale(.91,1.1); filter: brightness(1); }
}
.crystal-cluster { position: absolute; left: 16%; top: 50%; display: flex; align-items: end; gap: 4px; }
.crystal-cluster i { width: 13px; height: 42px; clip-path: polygon(50% 0,100% 30%,85% 100%,12% 100%,0 30%); background: linear-gradient(110deg,#684d6b,#cbaed7,#4b3958); opacity: .7; }
.crystal-cluster i:nth-child(2){ height: 58px; }.crystal-cluster i:nth-child(3){ height: 31px; }

.oracle-interface { position: absolute; z-index: 31; inset: 0; pointer-events: none; }
.selene-caption {
  position: absolute; left: 50%; bottom: 16vh; transform: translateX(-50%);
  width: min(650px, calc(100vw - 44px)); padding: 13px 48px 13px 18px;
  border: 1px solid rgba(225,205,255,.19); border-radius: 13px;
  background: linear-gradient(115deg, rgba(9,7,20,.84), rgba(23,16,37,.68));
  backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0,0,0,.28); pointer-events: auto;
}
.caption-name { display: flex; align-items: center; gap: 7px; color: var(--gold); font-size: 8px; letter-spacing: .2em; }
.caption-name i { background: #aa9a6f; }
.selene-caption p { margin: 5px 0 0; font: italic 17px/1.25 "Cormorant Garamond", serif; text-shadow: 0 1px 4px #000; }
.sound-button {
  position: absolute; top: 50%; right: 13px; transform: translateY(-50%); width: 29px; height: 29px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer;
}
.oracle-form {
  position: absolute; left: 50%; bottom: max(45px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(680px, calc(100vw - 36px)); min-height: 54px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: end; gap: 5px;
  padding: 6px; border: 1px solid rgba(223,205,255,.23); border-radius: 19px;
  background: rgba(8,6,17,.84); box-shadow: 0 16px 50px rgba(0,0,0,.45); backdrop-filter: blur(18px); pointer-events: auto;
}
.oracle-form textarea {
  width: 100%; max-height: 100px; min-height: 40px; resize: none; padding: 10px 7px;
  border: 0; outline: 0; color: var(--ink); background: transparent; line-height: 1.3;
}
.oracle-form textarea::placeholder { color: #8f8496; }
.mic-button, .send-button { width: 40px; height: 40px; border: 0; border-radius: 13px; cursor: pointer; }
.mic-button { background: transparent; color: var(--muted); font-size: 22px; }
.mic-button.is-listening { color: #e4b4b4; box-shadow: inset 0 0 0 1px #a26477; animation: pulse .8s infinite; }
.send-button { background: #e2d3ef; color: #23172c; font-size: 22px; }
.send-button:disabled { opacity: .4; cursor: wait; }
.oracle-note { position: absolute; bottom: 15px; width: 100%; margin: 0; text-align: center; color: #80768a; font-size: 8px; letter-spacing: .09em; }
.conversation-memory {
  position: absolute; left: 3vw; bottom: 19vh; width: min(250px, 20vw);
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.memory-line { margin: 0; padding: 8px 11px; border-left: 1px solid rgba(205,177,229,.26); color: #aaa0ad; font: 12px/1.35 "Cormorant Garamond"; text-shadow: 0 1px 3px #000; opacity: .68; }
.memory-line strong { display: block; margin-bottom: 2px; color: #c7b9ca; font: 7px Inter; letter-spacing: .14em; }

.birth-data-card {
  position: absolute; z-index: 45; right: clamp(20px,5vw,80px); top: 50%; transform: translateY(-50%);
  width: min(380px, calc(100vw - 40px)); padding: 25px;
  background: rgba(12,9,24,.91); border: 1px solid rgba(216,190,255,.24); border-radius: 18px;
  backdrop-filter: blur(22px); box-shadow: 0 25px 90px #000; animation: overlay-in .55s ease both;
}
@keyframes overlay-in { from { opacity: 0; transform: translateY(-46%) translateX(20px); } }
.birth-data-card h2 { margin: 5px 0 8px; font: 600 30px/1 "Cormorant Garamond"; }
.birth-data-card > p:not(.eyebrow) { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.birth-data-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.birth-data-card label { display: grid; gap: 5px; color: #b7adba; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.birth-data-card .place-field, .birth-data-card .ritual-button { grid-column: 1 / -1; }
.birth-data-card input { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #0b0917; color: var(--ink); color-scheme: dark; }
.overlay-close { position: absolute; right: 13px; top: 12px; border: 0; background: transparent; font-size: 24px; color: var(--muted); cursor: pointer; }

.queue-panel {
  position: absolute; z-index: 35; left: clamp(18px,4.5vw,72px); bottom: clamp(22px,5vh,58px);
  width: min(520px, calc(100vw - 36px)); padding: 23px;
  background: linear-gradient(130deg, rgba(10,8,21,.88), rgba(28,18,36,.7));
  border: 1px solid rgba(228,207,255,.2); border-radius: 22px; backdrop-filter: blur(22px);
  box-shadow: 0 24px 90px rgba(0,0,0,.5);
}
.queue-intro h2 { margin: 5px 0 6px; font: 600 clamp(28px,3vw,42px)/.95 "Cormorant Garamond"; }
:lang(ja) .queue-intro h2 { font-size: clamp(22px,2.2vw,29px); line-height: 1.06; white-space: nowrap; }
:lang(ko) .queue-intro h2 { font-size: clamp(25px,2.5vw,33px); line-height: 1.06; word-break: keep-all; }
:lang(ja) .access-card h3 { font-size: 18px; line-height: 1.08; white-space: nowrap; }
:lang(ko) .access-card h3 { font-size: 20px; line-height: 1.08; word-break: keep-all; }
.queue-intro > p:not(.eyebrow) { margin: 0; max-width: 440px; color: var(--muted); font: 15px/1.35 "Cormorant Garamond"; }
.market-selector { display: grid; grid-template-columns: auto minmax(150px,230px); gap: 10px; align-items: center; margin-top: 11px; color: #9e94a3; font-size: 8px; letter-spacing: .14em; }
.market-selector select { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 7px 27px 7px 11px; background: rgba(11,8,20,.78); color: #eee6f3; font: 10px "Inter",sans-serif; }
.eyebrow, .card-kicker { margin: 0; color: var(--gold); font-size: 8px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.room-meter { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.room-meter > i { background: #b0a175; }
.room-meter span, .room-meter strong, .room-meter small { display: block; }
.room-meter strong { color: #ded4e2; font-size: 10px; font-weight: 500; }
.room-meter small { margin-top: 3px; color: #8e8392; font-size: 8px; }
.access-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.access-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.paid-access { background: linear-gradient(145deg, rgba(129,92,156,.17), rgba(255,255,255,.02)); }
.access-card h3 { margin: 12px 0 1px; font: 600 25px "Cormorant Garamond"; }
.access-card p { min-height: 30px; margin: 0 0 11px; color: #9e94a3; font-size: 9px; line-height: 1.45; }
.ritual-button, .ghost-button {
  width: 100%; min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
  border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 600;
}
.ritual-button { border: 0; background: #e0d0ec; color: #25182c; }
.ghost-button { border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.ritual-button:disabled, .ghost-button:disabled { opacity: .45; cursor: wait; }
.ad-track { height: 2px; margin: -3px 0 11px; background: rgba(255,255,255,.09); }
.ad-track i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .4s; }
.legal-note { display: block; margin-top: 12px; color: #766d7c; font-size: 7px; line-height: 1.4; }
.queue-state-panel { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.queue-sigil { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-size: 28px; }
.queue-state-panel h3 { margin: 3px 0; font: 600 26px "Cormorant Garamond"; }
.queue-state-panel p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; }
.queue-numbers { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 11px; }
.queue-numbers span { padding: 9px 12px; }.queue-numbers span + span { border-left: 1px solid var(--line); }
.queue-numbers small, .queue-numbers b { display: block; }
.queue-numbers small { color: #867d8a; font-size: 7px; letter-spacing: .1em; }.queue-numbers b { margin-top: 3px; font: 600 18px "Cormorant Garamond"; }
.queue-state-panel .ritual-button, .queue-state-panel .quiet-button { grid-column: 1 / -1; }
.quiet-button { padding: 5px 8px; border: 0; background: transparent; color: #a99eac; font-size: 9px; text-decoration: underline; cursor: pointer; }

.ad-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4,3,9,.84); backdrop-filter: blur(15px); }
.ad-shell { width: min(390px,100%); padding: 28px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: #100c1e; box-shadow: 0 30px 100px #000; }
.ad-moon { width: 90px; height: 90px; display: grid; place-items: center; margin: 20px auto; border: 1px solid #745b8a; border-radius: 50%; font: 55px "Cormorant Garamond"; color: var(--gold); }
.ad-shell h2 { margin: 5px 0; font: 600 32px "Cormorant Garamond"; }.ad-shell > p:not(.eyebrow) { color: var(--muted); font-size: 11px; }
.ad-shell > strong { display: block; margin: 18px; font: 600 30px "Cormorant Garamond"; }
.toast { position: fixed; z-index: 120; right: 20px; top: 82px; max-width: 330px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: #171126; box-shadow: 0 15px 50px #000; color: #e6ddeb; font-size: 11px; }

.is-locked .reader-stage { left: 68%; opacity: .86; }
.is-locked .table-scene { filter: brightness(.72); }
.session-active .queue-panel { display: none; }
.session-active .reader-stage { animation: reader-enter 1.2s ease both; }
@keyframes reader-enter { from { opacity: .6; transform: translateX(-50%) scale(.96); } }

@media (max-width: 850px) {
  body { overflow: hidden; }
  .room-firelight { display: none; }
  .room { min-height: 600px; }
  .room-header { grid-template-columns: 1fr auto; padding: max(14px,env(safe-area-inset-top)) 16px; }
  .status-pill { display: none; }
  .brand small, .session-clock > span { display: none; }
  .reader-stage, .is-locked .reader-stage { left: 50%; top: 7vh; bottom: 24vh; width: min(90vw,520px); opacity: .88; }
  .is-locked .reader-stage { left: 69%; width: 78vw; }
  .waiting-live { top: 18%; right: auto; left: 50%; transform: translate(-50%,5px); }
  .queue-preview .waiting-live { transform: translate(-50%,0); }
  .queue-preview .presence-chip { display: none; }
  .queue-panel { left: 14px; right: 14px; bottom: 16px; width: auto; padding: 17px; max-height: 68vh; overflow: auto; }
  .queue-intro h2 { font-size: 29px; }
  .access-options { grid-template-columns: 1fr 1fr; }
  .access-card { padding: 12px; }
  .table-scene { height: 35vh; bottom: -5vh; left: -35%; right: -35%; }
  .table-card-area { inset: 7% 31% 19%; }
  .deck-home { right: 25%; }
  .candle-left { left: 27%; } .candle-right { right: 25%; }
  .crystal-cluster { left: 32%; }
  .conversation-memory { display: none; }
  .selene-caption { bottom: 17vh; width: calc(100vw - 28px); }
  .oracle-form { bottom: max(42px,env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .oracle-note { bottom: max(14px,env(safe-area-inset-bottom)); }
  .birth-data-card { top: auto; right: 14px; left: 14px; bottom: 22px; width: auto; transform: none; }
  @keyframes overlay-in { from { opacity: 0; transform: translateY(20px); } }
  .sky-orbit p { right: 4%; top: 30%; }
}

@media (max-width: 540px) {
  .room { min-height: 540px; }
  .room-background { background-position: 55% center; }
  .brand strong { font-size: 17px; }
  .room-header { padding-top: max(10px,env(safe-area-inset-top)); }
  .session-clock { gap: 5px; }
  .access-options { grid-template-columns: 1fr; }
  .queue-panel { max-height: 61vh; }
  .queue-intro > p:not(.eyebrow), .legal-note { display: none; }
  .room-meter { margin-top: 10px; padding-top: 9px; }
  .access-card { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; align-items: end; }
  .access-card .card-kicker { grid-column: 1 / -1; }
  .access-card .ad-track { display: none; }
  .access-card h3 { margin-top: 5px; font-size: 21px; }
  .access-card p { min-height: 0; margin: 0; }
  .reader-stage, .is-locked .reader-stage { top: 5vh; bottom: 27vh; width: 105vw; }
  .is-locked .reader-stage { left: 72%; }
  .waiting-live { top: 19%; padding: 7px 9px; }
  .waiting-live small { display: none; }
  .table-scene { height: 35vh; }
  .table-card-area { left: 32%; right: 32%; }
  .table-tarot-card { width: 92px; left: calc(50% - 46px); }
  .table-tarot-card:nth-child(1):nth-last-child(3) { --tx: -88px; }
  .table-tarot-card:nth-child(3):last-child { --tx: 88px; }
  .deck-home { width: 66px; right: 25%; }
  .selene-caption { padding: 10px 43px 10px 13px; bottom: 18vh; }
  .selene-caption p { font-size: 14px; }
  .oracle-form { min-height: 49px; grid-template-columns: 36px 1fr 37px; }
  .mic-button, .send-button { width: 36px; height: 36px; }
  .birth-data-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .queue-preview .waiting-mouth, .queue-preview .waiting-jaw-layer { opacity: 0; }
}
