:root {
  color-scheme: dark;
  --bg: #0e0a1e;
  --bg-soft: #17102d;
  --panel: rgba(35, 25, 62, 0.76);
  --panel-border: rgba(224, 202, 255, 0.14);
  --text: #f8f3ff;
  --muted: #b9accd;
  --gold: #f2d492;
  --lavender: #b9a1ff;
  --violet: #8562dd;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); }

body {
  min-height: 100dvh;
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 18% 4%, rgba(111, 71, 189, .28), transparent 33%),
    radial-gradient(circle at 88% 78%, rgba(52, 83, 145, .22), transparent 30%),
    linear-gradient(155deg, #130d27 0%, #0b0917 58%, #151028 100%);
}

button { font: inherit; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hidden { display: none !important; }

.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(193, 174, 255, .05);
  border-radius: 50%;
  animation: ambient-breathe 10s infinite ease-in-out;
}
.ambient::before { left: -26rem; top: 12%; box-shadow: 0 0 100px rgba(105, 69, 180, .1); }
.ambient::after { right: -28rem; bottom: -8rem; animation-name: ambient-drift; animation-duration: 13s; }
.ambient span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: white; opacity: .55; box-shadow: 0 0 8px rgba(232, 221, 255, .75); animation: twinkle 4s infinite ease-in-out; }
.ambient span:nth-child(1) { left: 9%; top: 18%; animation-duration: 3.6s; }
.ambient span:nth-child(2) { right: 12%; top: 28%; width: 3px; height: 3px; animation-delay: -1.1s; animation-duration: 4.8s; }
.ambient span:nth-child(3) { left: 18%; bottom: 18%; animation-delay: -2s; animation-duration: 5.2s; }
.ambient span:nth-child(4) { right: 25%; bottom: 9%; animation-delay: -.6s; animation-duration: 3.9s; }
.ambient span:nth-child(5) { left: 61%; top: 9%; width: 3px; height: 3px; background: #f7e5b4; animation-delay: -2.8s; animation-duration: 5.6s; }
.ambient span:nth-child(6) { left: 38%; top: 31%; animation-delay: -1.7s; animation-duration: 4.3s; }
.ambient span:nth-child(7) { right: 6%; top: 58%; width: 3px; height: 3px; background: #dcd1ff; animation-delay: -3.1s; animation-duration: 5.9s; }
.ambient span:nth-child(8) { left: 6%; bottom: 39%; animation-delay: -.4s; animation-duration: 4.7s; }
.ambient span:nth-child(9) { left: 48%; bottom: 11%; background: #f7e5b4; animation-delay: -2.4s; animation-duration: 5.3s; }
.ambient span:nth-child(10) { right: 34%; top: 46%; width: 3px; height: 3px; animation-delay: -1.2s; animation-duration: 6.1s; }
.ambient span:nth-child(11) { left: 28%; top: 7%; animation-delay: -3.6s; animation-duration: 4.9s; }
.ambient span:nth-child(12) { right: 8%; bottom: 24%; background: #d8c8ff; animation-delay: -2.1s; animation-duration: 3.8s; }

.app-shell {
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) clamp(20px, 5vw, 44px) calc(24px + var(--safe-bottom));
  position: relative;
  transition: opacity .3s ease;
}
.app-shell.is-loading { opacity: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; position: relative; z-index: 4; }
.language-picker { margin-left: auto; }
.language-picker select { max-width: 9.5rem; border: 1px solid rgba(242, 212, 146, .28); border-radius: 999px; background: rgba(18, 12, 38, .78); color: var(--text); padding: .48rem 1.9rem .48rem .8rem; font: inherit; font-size: .78rem; outline: none; }
.language-picker select:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 212, 146, .12); }
.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; }
.brand-button, .text-button {
  border: 0;
  color: var(--text);
  background: transparent;
  padding: 6px 0;
  cursor: pointer;
}
.brand-button { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(242, 212, 146, .42); border-radius: 50%; color: var(--gold); font-size: 12px; }
.cycle-pill { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255,255,255,.08); border-radius: 100px; color: var(--muted); font-size: 11px; }
.cycle-pill strong { color: var(--text); font-variant-numeric: tabular-nums; min-width: 34px; }
.cycle-dot { width: 6px; height: 6px; background: #8fe0be; border-radius: 50%; box-shadow: 0 0 10px #8fe0be; }

main { position: relative; }
.screen { display: none; animation: screen-in .42s ease both; }
.screen.active { display: block; }
.landing-hero { text-align: center; padding-top: clamp(48px, 9vh, 88px); }
.landing-hero h1 { max-width: 640px; margin: 0 auto; }
.landing-hero .subtitle { max-width: 36rem; }
.game-preview { width: min(100%, 610px); height: clamp(310px, 52vw, 390px); display: block; margin: clamp(34px, 7vh, 60px) auto 0; padding: 0; border: 1px solid rgba(211,193,255,.24); border-radius: 28px; overflow: hidden; position: relative; color: white; background: #0b0918; box-shadow: 0 30px 80px rgba(0,0,0,.36), 0 0 70px rgba(118,81,198,.12); cursor: pointer; isolation: isolate; }
.game-preview::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.06), transparent 65%); translate: -120% 0; transition: translate .8s ease; }
.game-preview:hover::after { translate: 120% 0; }
.preview-browser-bar { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: rgba(255,255,255,.055); border-bottom: 1px solid rgba(255,255,255,.08); }
.preview-browser-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); }
.preview-browser-bar b { margin-left: auto; color: rgba(255,255,255,.38); font: 8px/1 system-ui, sans-serif; letter-spacing: .13em; }
.preview-stage { position: absolute; inset: 39px 0 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(126,83,210,.38), transparent 24%), radial-gradient(circle at 20% 5%, rgba(67,86,158,.24), transparent 34%), #0d0a20; }
.preview-stage::before { content: ""; position: absolute; inset: 0; opacity: .38; background-image: radial-gradient(circle, white 0 1px, transparent 1.5px); background-size: 72px 72px; }
.preview-moon { width: 116px; height: 116px; display: grid; place-items: center; z-index: 2; border-radius: 50%; color: #fff0bd; font-size: 56px; background: radial-gradient(circle at 38% 32%, #b59af4, #5d429e 43%, #24183e 75%); box-shadow: inset -15px -18px 28px rgba(11,7,25,.56), 0 0 58px rgba(144,108,226,.5); animation: breathe 3.5s ease-in-out infinite; }
.preview-orbit { position: absolute; width: 280px; height: 92px; border: 1px solid rgba(230,218,255,.22); border-radius: 50%; }
.preview-orbit-a { rotate: -16deg; }
.preview-orbit-b { rotate: 27deg; width: 320px; opacity: .55; }
.preview-card { position: absolute; width: 36px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(242,212,146,.3); border-radius: 6px; color: var(--gold); background: #21163b; box-shadow: 0 10px 20px rgba(0,0,0,.25); }
.preview-card-a { translate: -150px 38px; rotate: -18deg; }
.preview-card-b { translate: 150px 28px; rotate: 16deg; }
.preview-card-c { translate: 0 116px; rotate: 4deg; }
.play-game-label { position: absolute; z-index: 4; left: 50%; bottom: 25px; translate: -50% 0; display: grid; gap: 5px; min-width: 218px; padding: 16px 34px 15px; border: 2px solid rgba(255,246,220,.72); border-radius: 28px; background: radial-gradient(circle at 26% 12%, rgba(255,255,255,.48), transparent 22%), linear-gradient(125deg, rgba(242,173,218,.96), rgba(158,118,237,.97) 48%, rgba(105,77,190,.98)); backdrop-filter: blur(12px); box-shadow: inset 0 2px 1px rgba(255,255,255,.42), inset 0 -7px 14px rgba(71,40,128,.22), 0 9px 0 rgba(65,43,116,.52), 0 18px 34px rgba(65,41,126,.42), 0 0 30px rgba(218,181,255,.24); transform-origin: center; animation: play-button-float 2.7s ease-in-out infinite; }
.play-game-label::before, .play-game-label::after { position: absolute; color: #fff4c7; line-height: 1; text-shadow: 0 0 9px rgba(255,245,205,.95); animation: play-sparkle 1.8s ease-in-out infinite; }
.play-game-label::before { content: "✦"; left: 15px; top: 13px; font-size: 12px; rotate: -12deg; }
.play-game-label::after { content: "✧"; right: 15px; top: 16px; font-size: 15px; rotate: 14deg; animation-delay: -.85s; }
.play-game-label b { color: white; font: 900 14px/1.15 system-ui, sans-serif; letter-spacing: .2em; text-shadow: 0 2px 0 rgba(86,50,145,.25), 0 0 12px rgba(255,255,255,.34); }
.play-game-label small { color: rgba(255,255,255,.84); font: 10px/1.2 system-ui, sans-serif; letter-spacing: .06em; }
.game-preview:hover .play-game-label { animation-play-state: paused; transform: translateY(-3px) scale(1.045); filter: saturate(1.08) brightness(1.05); }
.game-preview:active .play-game-label { transform: translateY(4px) scale(.98); box-shadow: inset 0 2px 1px rgba(255,255,255,.3), inset 0 -3px 8px rgba(71,40,128,.2), 0 4px 0 rgba(65,43,116,.52), 0 10px 22px rgba(65,41,126,.34); }
.landing-details { width: min(100%, 610px); margin: 18px auto 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.landing-details article { min-height: 124px; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.03); text-align: left; }
.landing-details article span { color: rgba(242,212,146,.55); font: 9px/1 ui-monospace, monospace; }
.landing-details article strong { display: block; margin-top: 12px; font-size: 12px; }
.landing-details article p { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 7px 0 0; }

.system-panel { width: min(100%, 520px); margin: clamp(80px, 16vh, 150px) auto 0; text-align: center; padding: 34px 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 28px; background: linear-gradient(145deg, rgba(46,33,75,.86), rgba(20,15,37,.9)); box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.system-orb { width: 88px; height: 88px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; color: white; font-size: 28px; background: radial-gradient(circle, #a38be3, #47336f 68%); box-shadow: 0 0 36px rgba(162,132,231,.34); animation: loading-orb 2s linear infinite; }
.system-panel h1 { font-size: clamp(28px, 7vw, 38px); }
.game-load-track { height: 5px; overflow: hidden; margin-top: 28px; border-radius: 10px; background: rgba(255,255,255,.09); }
.game-load-progress { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8e6cdb, #d7cbff, #f2d492); box-shadow: 0 0 14px rgba(205,187,255,.45); transition: width .16s linear; }
.loading-percent { display: block; margin-top: 12px; color: var(--muted); font: 11px/1 ui-monospace, monospace; }
.error-symbol { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 24px; border: 1px solid rgba(255,151,163,.3); border-radius: 50%; color: #ffb1bb; background: rgba(126,42,58,.24); font: 700 28px/1 system-ui, sans-serif; }
.system-actions { display: grid; gap: 10px; margin-top: 28px; }

.thought-shell { position: relative; width: min(100%, 720px); margin: clamp(40px, 8vh, 76px) auto 40px; text-align: center; }
.thought-shell h1 { font-size: clamp(30px, 7vw, 44px); }
.slot-machine { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: stretch; gap: 14px; margin-top: 34px; padding: 14px; border: 1px solid rgba(225,207,255,.16); border-radius: 24px; background: radial-gradient(circle at 50% -20%, rgba(155,116,233,.2), transparent 42%), linear-gradient(145deg, rgba(36,25,60,.88), rgba(15,11,29,.92)); box-shadow: 0 20px 55px rgba(5,3,15,.28), inset 0 1px rgba(255,255,255,.04); }
.thought-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; text-align: left; }
.thought-choice-group { min-width: 0; margin: 0; padding: 12px 10px 10px; overflow: hidden; border: 1px solid rgba(212,191,255,.16); border-radius: 17px; background: rgba(27,20,48,.72); box-shadow: inset 0 0 24px rgba(4,3,12,.22); }
.thought-choice-group legend { padding: 0 8px; color: var(--gold); font-size: 11px; letter-spacing: .12em; }
.thought-choice-group legend span { color: rgba(242,212,146,.42); font: 9px/1 ui-monospace, monospace; }
.thought-options { position: relative; height: 132px; display: grid; grid-template-rows: repeat(3, 44px); overflow: hidden; border: 1px solid rgba(224,210,255,.16); border-radius: 13px; background: linear-gradient(180deg, rgba(6,5,17,.92), rgba(23,15,42,.95) 48%, rgba(6,5,17,.92)); box-shadow: inset 0 13px 24px rgba(0,0,0,.36), inset 0 -13px 24px rgba(0,0,0,.36); }
.thought-options::before { content: ""; position: absolute; z-index: 2; left: 5px; right: 5px; top: 43px; height: 43px; pointer-events: none; border-top: 1px solid rgba(242,212,146,.38); border-bottom: 1px solid rgba(242,212,146,.38); background: linear-gradient(90deg, rgba(163,126,232,.08), rgba(242,212,146,.1), rgba(163,126,232,.08)); box-shadow: 0 0 18px rgba(205,180,255,.11); }
.thought-options::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,4,14,.64), transparent 32%, transparent 68%, rgba(5,4,14,.64)); }
.slot-reel-item { min-width: 0; display: grid; place-items: center; padding: 0 4px; color: rgba(202,188,221,.38); font-size: 10px; white-space: nowrap; transition: color .18s, transform .18s, filter .18s; }
.slot-reel-item.current { z-index: 2; color: #fff4ce; font-size: clamp(13px, 2.4vw, 18px); font-weight: 700; letter-spacing: .06em; text-shadow: 0 0 14px rgba(242,212,146,.34); }
.slot-reel-window.is-spinning .slot-reel-item { animation: slot-flicker .12s linear infinite; filter: blur(.55px); }
.slot-reel-window.is-locked { animation: slot-lock .42s cubic-bezier(.2,.8,.2,1) both; }
.slot-lever { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 5px; border: 1px solid rgba(242,212,146,.18); border-radius: 18px; color: #efe5ff; background: linear-gradient(180deg, rgba(84,58,131,.64), rgba(29,19,49,.88)); cursor: grab; box-shadow: inset 0 1px rgba(255,255,255,.06), 0 9px 24px rgba(0,0,0,.24); transition: border-color .2s, transform .2s, filter .2s; }
.slot-lever:hover { border-color: rgba(242,212,146,.44); filter: brightness(1.08); }
.slot-lever:active { cursor: grabbing; filter: brightness(1.12); }
.slot-lever:disabled { cursor: wait; opacity: 1; }
.slot-lever-mechanism { position: relative; width: 70px; height: 125px; display: block; perspective: 260px; perspective-origin: 50% 80%; }
.slot-lever-base { position: absolute; left: 50%; bottom: 2px; width: 62px; height: 39px; translate: -50% 0; border: 1px solid rgba(236,220,255,.18); border-radius: 18px 18px 12px 12px; background: linear-gradient(145deg, #7356a8, #2c1d4a 70%); box-shadow: inset 0 3px 8px rgba(255,255,255,.08), 0 8px 15px rgba(0,0,0,.25); }
.slot-lever-base::after { content: ""; position: absolute; width: 22px; height: 8px; left: 19px; top: 9px; border-radius: 50%; background: #1d1232; box-shadow: inset 0 2px 4px rgba(0,0,0,.55); }
.slot-lever-arm { position: absolute; z-index: 2; left: 50%; bottom: 25px; width: 7px; height: 82px; translate: -50% 0; border-radius: 8px; background: linear-gradient(90deg, #8b779d, #f0e8f8 45%, #786786); box-shadow: 0 2px 8px rgba(0,0,0,.32); transform: rotateX(0) rotateZ(0); transform-origin: 50% 100%; transform-style: preserve-3d; will-change: transform; }
.slot-lever-arm::before { content: ""; position: absolute; inset: 4px 2px; border-radius: 999px; background: rgba(255,255,255,.34); box-shadow: 0 0 8px rgba(231,216,255,.22); }
.slot-lever-arm i { position: absolute; z-index: 2; left: 50%; top: -17px; width: 33px; height: 33px; translate: -50% 0; border: 2px solid rgba(255,246,217,.3); border-radius: 50%; background: radial-gradient(circle at 34% 28%, #ffe7a2, #d05d8b 48%, #5b295e 78%); box-shadow: 0 0 20px rgba(255,109,157,.3), inset -5px -5px 8px rgba(64,19,55,.32); backface-visibility: hidden; transform-style: preserve-3d; will-change: transform; }
.slot-lever-text { color: rgba(242,229,255,.78); font-size: 9px; line-height: 1.25; letter-spacing: .08em; }
.slot-machine.is-spinning .slot-lever-arm { animation: lever-arc-pull .78s cubic-bezier(.24,.78,.24,1) both; }
.slot-machine.is-spinning .slot-lever-arm i { animation: lever-knob-face .78s cubic-bezier(.24,.78,.24,1) both; }
.slot-machine.is-spinning { box-shadow: 0 20px 55px rgba(5,3,15,.28), inset 0 0 32px rgba(164,117,238,.11); }
.slot-machine.is-celebrating { animation: machine-celebrate 1.05s ease both; }
.thought-selection-status { margin: 15px 0 0; color: var(--muted); font-size: 10px; }
.sense-button { margin-top: 12px; }
.confetti-burst { position: fixed; z-index: 80; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-burst.active { animation: celebration-flash 1.45s ease-out both; }
.confetti-burst::before, .confetti-burst::after { content: ""; position: absolute; bottom: 8%; width: 150px; height: 150px; opacity: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,224,107,.85) 0 4deg, transparent 4deg 14deg, rgba(98,232,255,.72) 14deg 18deg, transparent 18deg 28deg); filter: blur(.2px) drop-shadow(0 0 18px rgba(255,218,130,.55)); }
.confetti-burst::before { left: -35px; transform-origin: left bottom; }
.confetti-burst::after { right: -35px; transform-origin: right bottom; }
.confetti-burst.active::before { animation: confetti-cannon-left 1.25s ease-out both; }
.confetti-burst.active::after { animation: confetti-cannon-right 1.25s .1s ease-out both; }
.confetti-piece { position: absolute; left: var(--origin-x); top: var(--origin-y); width: 9px; height: 27px; opacity: 0; border-radius: 2px; background: var(--confetti-color); box-shadow: 0 0 10px color-mix(in srgb, var(--confetti-color), transparent 25%); }
.confetti-piece.round { width: 13px; height: 13px; border-radius: 50%; }
.confetti-piece.streamer { width: 7px; height: 42px; border-radius: 50%; background: linear-gradient(180deg, var(--confetti-color), transparent 130%); }
.confetti-piece.star { width: 20px; height: 20px; clip-path: polygon(50% 0, 61% 35%, 100% 50%, 63% 62%, 50% 100%, 38% 63%, 0 50%, 36% 37%); filter: drop-shadow(0 0 8px var(--confetti-color)); }
.confetti-burst.active .confetti-piece { animation: confetti-burst var(--duration) cubic-bezier(.12,.72,.2,1) var(--delay) forwards; }
.ritual-panel { text-align: center; padding-top: clamp(24px, 5vh, 50px); }
.ritual-panel h1 { font-size: clamp(28px, 7vw, 42px); }
.witch-stage { position: relative; width: 250px; height: 225px; margin: 0 auto 12px; }
.witch-stage-large { scale: 1.05; transform-origin: bottom center; }
.witch-aura { position: absolute; width: 190px; height: 190px; left: 50%; top: 8px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, rgba(152,118,226,.28), transparent 67%); animation: breathe 3s ease-in-out infinite; }
.witch-character { position: absolute; z-index: 3; width: 112px; height: 170px; left: 50%; top: 28px; translate: -50% 0; }
.witch-hat { position: absolute; z-index: 6; width: 94px; height: 70px; left: 9px; top: -12px; background: linear-gradient(145deg, #6f51aa, #21143f 68%); clip-path: polygon(51% 0, 100% 86%, 66% 77%, 50% 100%, 36% 78%, 0 88%); filter: drop-shadow(0 8px 8px rgba(0,0,0,.28)); }
.witch-hat::after { content: ""; position: absolute; width: 92px; height: 12px; left: 1px; bottom: 5px; border-radius: 50%; background: #1b1035; }
.witch-hat b { position: absolute; z-index: 2; width: 8px; height: 8px; left: 46px; top: 27px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.witch-head { position: absolute; z-index: 4; width: 58px; height: 64px; left: 27px; top: 47px; border-radius: 46% 46% 50% 50%; background: linear-gradient(145deg, #ead8d0, #c79fa5); box-shadow: inset -8px -5px 12px rgba(102,52,78,.14); }
.witch-eye { position: absolute; width: 6px; height: 7px; top: 27px; border-radius: 50%; background: #241633; animation: witch-blink 4s infinite; }
.witch-eye.left { left: 15px; }.witch-eye.right { right: 15px; }
.witch-head em { position: absolute; width: 12px; height: 6px; left: 23px; bottom: 12px; border-bottom: 1px solid #8a5268; border-radius: 50%; }
.witch-hair { position: absolute; z-index: 3; width: 30px; height: 82px; top: 49px; border-radius: 50% 50% 30% 30%; background: linear-gradient(#d4bcf2, #70519d 75%); }
.witch-hair-left { left: 17px; rotate: 8deg; }.witch-hair-right { right: 17px; rotate: -8deg; }
.witch-body { position: absolute; z-index: 2; width: 90px; height: 80px; left: 11px; bottom: 0; border-radius: 45% 45% 16px 16px; background: linear-gradient(150deg, #7654af, #251640 75%); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.witch-body::after { content: "✦"; position: absolute; left: 50%; top: 29px; translate: -50% 0; color: rgba(242,212,146,.72); font-style: normal; }
.witch-casting-arm { position: absolute; z-index: 7; width: 142px; height: 54px; left: 76px; top: 112px; transform: rotate(-20deg); transform-origin: 5px 9px; }
.witch-arm { position: absolute; z-index: 2; width: 52px; height: 18px; left: 0; top: 0; border-radius: 20px 12px 12px 20px; background: linear-gradient(180deg, #8060ba, #4d327c 65%, #2f1d54); box-shadow: inset 0 2px 4px rgba(255,255,255,.14), 0 5px 10px rgba(13,7,28,.24); }
.witch-arm::before { content: ""; position: absolute; left: 8px; right: 13px; top: 4px; height: 3px; border-radius: 99px; background: rgba(224,207,255,.2); }
.witch-arm::after { content: ""; position: absolute; z-index: 2; width: 10px; height: 20px; right: -1px; top: -1px; border-radius: 4px 8px 8px 4px; background: linear-gradient(90deg, #5d3a88, #d7b66d 45% 58%, #6d4899 60%); box-shadow: 0 0 7px rgba(242,212,146,.22); }
.witch-hand { position: absolute; z-index: 5; width: 21px; height: 14px; left: 47px; top: 3px; border-radius: 9px 12px 12px 7px; background: linear-gradient(145deg, #efd8d0, #c995a0 76%); box-shadow: inset -3px -3px 5px rgba(113,54,76,.13), 0 2px 5px rgba(25,12,35,.2); }
.witch-hand::before { content: ""; position: absolute; z-index: 3; width: 12px; height: 6px; right: -4px; top: 1px; rotate: -18deg; border-radius: 7px; background: #dcaeb1; box-shadow: inset 0 -1px rgba(120,62,80,.15); }
.witch-hand::after { content: ""; position: absolute; z-index: 4; width: 10px; height: 5px; right: -3px; bottom: 1px; border-bottom: 1px solid rgba(118,63,80,.32); border-radius: 50%; }
.witch-wand { position: absolute; z-index: 3; width: 66px; height: 8px; left: 57px; top: 6px; border: 1px solid rgba(255,231,164,.62); border-radius: 999px; background: linear-gradient(180deg, #f9e9ba, #9c6dcc 30%, #4a276d 67%, #24123e); box-shadow: inset 0 1px 2px rgba(255,255,255,.55), 0 0 10px rgba(187,132,255,.3); transform-origin: 4px 50%; rotate: -24deg; }
.witch-wand-grip { position: absolute; z-index: 1; width: 25px; height: 14px; left: -13px; top: -4px; border: 1px solid rgba(242,212,146,.48); border-radius: 7px; background: repeating-linear-gradient(90deg, #321746 0 4px, #c8985f 5px 7px, #512769 8px 11px); box-shadow: inset 0 1px rgba(255,255,255,.15); }
.witch-wand-collar { position: absolute; z-index: 2; width: 13px; height: 18px; right: -4px; top: -6px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: linear-gradient(135deg, #fff2b5, #b883df 52%, #5e3588); filter: drop-shadow(0 0 5px rgba(235,203,255,.55)); }
.witch-wand-crown { position: absolute; z-index: 4; width: 32px; height: 32px; right: -27px; top: 50%; translate: 0 -50%; border: 1px solid rgba(255,235,170,.7); border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff7ca, #d6a7ff 27%, #7d4daf 57%, #25123e 76%); box-shadow: inset -5px -5px 8px rgba(42,15,68,.38), 0 0 13px rgba(221,174,255,.65), 0 0 28px rgba(149,99,218,.42); }
.witch-wand-crown::before { content: ""; position: absolute; width: 17px; height: 17px; left: 7px; top: 7px; clip-path: polygon(50% 0, 61% 36%, 100% 50%, 63% 62%, 50% 100%, 38% 63%, 0 50%, 36% 37%); background: linear-gradient(135deg, #fffbd7, #f3ca74 45%, #f5ecff); filter: drop-shadow(0 0 5px #fff2b2); animation: wand-star-pulse 1.15s ease-in-out infinite; }
.witch-wand-crown::after { content: ""; position: absolute; inset: -7px; border: 1px solid rgba(242,212,146,.28); border-radius: 50%; animation: wand-glow 1.2s ease-in-out infinite; }
.witch-wand-crown em { position: absolute; width: 3px; height: 3px; left: 2px; top: -3px; border-radius: 50%; background: #fff8c7; box-shadow: -11px 8px 0 #d7b0ff, 32px 2px 0 #ffe28c, 28px 28px 0 #d8b7ff, -5px 29px 0 #fff1b7; animation: wand-sparks 1.4s ease-in-out infinite; }
.is-sensing .witch-casting-arm { animation: sensing-cast 1.35s cubic-bezier(.45,0,.55,1) infinite; }
.crystal-ball { position: absolute; z-index: 4; width: 75px; height: 75px; right: -4px; bottom: 4px; display: grid; place-items: center; border: 2px solid rgba(218,204,255,.32); border-radius: 50%; color: #fff0c1; font-size: 27px; background: radial-gradient(circle at 35% 30%, #c9bcf3, #6e559e 42%, #251b43 76%); box-shadow: inset -10px -10px 18px rgba(15,9,31,.45), 0 0 30px rgba(159,130,224,.34); animation: crystal-float 2s ease-in-out infinite; }
.crystal-ball::after { content: ""; position: absolute; width: 54px; height: 9px; left: 10px; bottom: -12px; border-radius: 50%; background: #2b1c45; }
.ritual-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.ritual-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--lavender); animation: ritual-dot 1.2s ease-in-out infinite; }
.ritual-dots i:nth-child(2) { animation-delay: .16s; }.ritual-dots i:nth-child(3) { animation-delay: .32s; }
.home-copy { text-align: center; padding-top: clamp(36px, 8vh, 74px); }
.eyebrow { color: var(--gold); text-transform: uppercase; font-size: 11px; letter-spacing: .24em; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 7.8vw, 48px); line-height: 1.18; letter-spacing: .06em; margin: 0; font-weight: 600; }
.subtitle { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 14px auto 0; max-width: 30rem; }

.oracle-stage { position: relative; height: clamp(250px, 38vh, 330px); display: grid; place-items: center; }
.oracle-core { position: relative; display: grid; place-items: center; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle at 42% 35%, #b9a4fb, #6547aa 38%, #231943 70%); box-shadow: inset -16px -16px 34px rgba(13,7,32,.55), 0 0 54px rgba(133,98,221,.4); animation: breathe 4.2s infinite ease-in-out; }
.oracle-core::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.moon { font-size: 56px; color: #fff1c9; filter: drop-shadow(0 0 12px rgba(255,238,194,.65)); transform: rotate(-12deg); }
.oracle-halo { position: absolute; width: 188px; height: 188px; border-radius: 50%; background: radial-gradient(circle, rgba(151,116,233,.22), transparent 66%); filter: blur(4px); }
.orbit { position: absolute; width: 230px; height: 94px; border: 1px solid rgba(219,200,255,.2); border-radius: 50%; transform: rotate(-17deg); }
.orbit-two { width: 260px; height: 120px; transform: rotate(28deg); border-color: rgba(242,212,146,.13); }
.orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); left: 24px; top: 13px; box-shadow: 0 0 12px var(--gold); }
.orbit-one { animation: orbit-float 7s infinite ease-in-out; }
.orbit-two { animation: orbit-float-alt 9s infinite ease-in-out; }
.spark { position: absolute; color: white; animation: twinkle 2.6s infinite; }
.spark-a { right: 18px; top: 25px; }
.spark-b { left: 25px; top: 20px; }
.spark-c { left: 24px; bottom: 25px; animation-delay: 1s; }

.chance-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border: 1px solid var(--panel-border); border-radius: 18px; background: linear-gradient(115deg, rgba(46,34,76,.8), rgba(30,24,53,.64)); box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.chance-label { color: var(--muted); font-size: 11px; margin: 0 0 3px; }
.chance-value { font-size: 22px; margin: 0; font-weight: 700; }
.chance-value span { color: var(--muted); font-size: 12px; font-weight: 400; }
.chance-dots { display: flex; gap: 9px; }
.chance-dots i { display: block; width: 27px; height: 35px; border: 1px solid rgba(210,188,255,.15); border-radius: 7px; background: rgba(11,8,25,.4); position: relative; transform: rotate(4deg); transition: opacity .3s, transform .3s; }
.chance-dots i:nth-child(2) { transform: rotate(-2deg) translateY(-3px); }
.chance-dots i::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: 9px; }
.chance-dots i.used { opacity: .22; transform: scale(.88); }

.home-actions { margin-top: 16px; display: grid; gap: 10px; }
.primary-button, .secondary-button, .unlock-button, .ad-action {
  width: 100%; min-height: 54px; border-radius: 16px; cursor: pointer; transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.primary-button { border: 1px solid rgba(255,255,255,.16); background: linear-gradient(115deg, #8d6ae2, #694bad); color: white; display: flex; align-items: center; justify-content: center; gap: 14px; box-shadow: 0 15px 32px rgba(84,55,151,.3); font-weight: 700; letter-spacing: .1em; }
.primary-button:not(:disabled):active, .secondary-button:active, .unlock-button:active, .ad-action:active { transform: scale(.98); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; }
.secondary-button { border: 1px solid rgba(198,173,255,.22); background: rgba(45,31,75,.65); color: #eaddff; }
.wait-message { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 6px 0 0; }
.footnote { color: rgba(185,172,205,.63); font-size: 10px; text-align: center; margin: 15px 0 0; }

.text-button { color: var(--muted); margin-top: 18px; font-size: 12px; }
.draw-copy { text-align: center; padding-top: clamp(18px, 4vh, 38px); }
.draw-copy h1 { font-size: clamp(28px, 7vw, 42px); }
.dealer-scene { width: 250px; height: 142px; margin: 6px auto -18px; position: relative; }
.witch-character-dealer { left: 67px; top: -4px; scale: .68; transform-origin: top center; }
.witch-character-dealer .witch-casting-arm { animation: deal-cast .8s cubic-bezier(.4,0,.2,1) 5; }
.dealer-stack { position: absolute; right: 25px; top: 70px; width: 45px; height: 60px; }
.dealer-stack i { position: absolute; inset: 0; border: 1px solid rgba(242,212,146,.34); border-radius: 6px; background: linear-gradient(145deg, #513778, #1b1232); box-shadow: 0 8px 18px rgba(0,0,0,.25); }
.dealer-stack i:nth-child(1) { translate: -5px 5px; rotate: -5deg; }.dealer-stack i:nth-child(2) { translate: -2px 2px; rotate: -2deg; }
.dealer-scene p { position: absolute; left: 50%; bottom: -2px; translate: -50% 0; width: 220px; margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.card-deck { min-height: 285px; display: flex; align-items: center; justify-content: center; margin: 0 -12px; perspective: 1000px; }
.star-card { --card-rest: translateY(-2px); width: clamp(82px, 21vw, 118px); aspect-ratio: 2 / 3.35; margin: 0 clamp(-18px, -3vw, -10px); border: 1px solid rgba(242,212,146,.35); border-radius: 12px; padding: 7px; background: linear-gradient(145deg, #3b285f, #16102e 70%); box-shadow: 0 18px 28px rgba(0,0,0,.3); cursor: pointer; position: relative; overflow: hidden; color: var(--gold); opacity: 0; transform: var(--card-rest); animation: witch-deal .82s cubic-bezier(.18,.72,.25,1.15) forwards; transition: transform .25s ease, filter .25s ease; }
.star-card:nth-child(1) { --card-rest: rotate(-15deg) translateY(24px); animation-delay: .12s; }
.star-card:nth-child(2) { --card-rest: rotate(-7deg) translateY(5px); animation-delay: .34s; }
.star-card:nth-child(3) { --card-rest: translateY(-2px); z-index: 2; animation-delay: .56s; }
.star-card:nth-child(4) { --card-rest: rotate(7deg) translateY(5px); animation-delay: .78s; }
.star-card:nth-child(5) { --card-rest: rotate(15deg) translateY(24px); animation-delay: 1s; }
.star-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(235,219,255,.2); border-radius: 7px; background: radial-gradient(circle at 50% 42%, rgba(180,143,255,.17), transparent 32%), repeating-radial-gradient(circle at center, transparent 0 18px, rgba(255,255,255,.035) 19px 20px); }
.star-card::after { content: "✦\A ☾ \A ✦"; white-space: pre; position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; line-height: 2.1; text-shadow: 0 0 10px rgba(242,212,146,.55); }
.star-card:not(:disabled):hover { filter: brightness(1.16); }
.star-card:disabled { cursor: default; }
.star-card.selected { transform: translateY(-22px) scale(1.08); filter: brightness(1.25); z-index: 5; }
.star-card.faded { opacity: .2 !important; }
.breath-guide { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.breath-guide span { width: 7px; height: 7px; border-radius: 50%; background: var(--lavender); box-shadow: 0 0 12px var(--lavender); animation: breathe 3s infinite; }

.result-card { margin-top: clamp(22px, 5vh, 46px); padding: 28px 20px 22px; border: 1px solid var(--panel-border); border-radius: 28px; background: linear-gradient(145deg, rgba(47,33,79,.91), rgba(21,16,39,.91)); box-shadow: 0 24px 70px rgba(0,0,0,.28); text-align: center; overflow: hidden; position: relative; }
.result-card::before { content: ""; position: absolute; width: 230px; height: 230px; left: 50%; top: -150px; transform: translateX(-50%); border-radius: 50%; background: rgba(151,113,229,.21); filter: blur(22px); }
.result-symbol-wrap { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: radial-gradient(circle, #8f6bd8, #382653 72%); border: 1px solid rgba(242,212,146,.34); box-shadow: 0 0 28px rgba(143,107,216,.35); position: relative; }
.result-symbol { font-size: 38px; color: #fff0bf; }
.result-card h1 { font-size: 35px; }
.keyword-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }
.keyword-list span { padding: 5px 10px; border-radius: 20px; background: rgba(242,212,146,.08); border: 1px solid rgba(242,212,146,.18); color: #eddcae; font-size: 10px; }
.result-short { max-width: 34rem; margin: 16px auto 0; color: #e2d8ef; font-size: 14px; line-height: 1.9; }
.locked-panel { margin-top: 24px; padding: 18px; border-radius: 18px; background: rgba(9,7,21,.34); border: 1px dashed rgba(197,175,244,.17); }
.lock-icon { color: var(--gold); font-size: 22px; }
.locked-panel strong { display: block; font-size: 14px; margin-top: 4px; }
.locked-panel p { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 7px auto 14px; max-width: 26rem; }
.unlock-button { min-height: 46px; border: 1px solid rgba(242,212,146,.2); background: linear-gradient(115deg, rgba(133,98,221,.9), rgba(92,66,155,.9)); color: white; }
.full-reading { margin-top: 26px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 4px; text-align: left; animation: reveal .5s ease both; }
.reading-section { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 19px 0; border-bottom: 1px solid rgba(255,255,255,.065); }
.reading-section > span { color: rgba(242,212,146,.6); font: 10px/1.5 ui-monospace, monospace; padding-top: 2px; }
.reading-section h2 { font-size: 13px; color: var(--gold); margin: 0 0 7px; }
.reading-section p { color: #d5cae2; font-size: 12px; line-height: 1.8; margin: 0; }
.lucky-note { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 18px; padding: 16px; border-radius: 14px; background: rgba(242,212,146,.075); }
.lucky-note span { color: var(--muted); font-size: 10px; }
.lucky-note strong { color: var(--gold); font-size: 12px; text-align: right; }
.result-again { margin: 14px 0 30px; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translate(-50%, 20px); min-width: min(80vw, 320px); padding: 11px 16px; background: rgba(20,15,35,.96); border: 1px solid rgba(255,255,255,.13); border-radius: 100px; text-align: center; font-size: 11px; color: #f0e8fb; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.screen-transition {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  pointer-events: all;
  opacity: 0;
  background: #090615;
}
.screen-transition.active { animation: transition-curtain 1.15s cubic-bezier(.45, 0, .28, 1) both; }
.transition-nebula {
  position: absolute;
  z-index: -2;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 50%, rgba(172, 126, 255, .42), transparent 17%),
    radial-gradient(circle at 30% 65%, rgba(54, 90, 164, .28), transparent 29%),
    radial-gradient(circle at 72% 30%, rgba(131, 74, 184, .24), transparent 28%),
    #090615;
  filter: saturate(1.15);
  animation: transition-nebula 1.15s ease both;
}
.transition-portal {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  color: #fff3c8;
  font-size: 27px;
  filter: drop-shadow(0 0 20px rgba(200, 172, 255, .55));
  animation: portal-bloom 1.15s cubic-bezier(.2, .68, .26, 1) both;
}
.transition-portal::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 201, .75), rgba(145, 105, 226, .18) 42%, transparent 70%);
  box-shadow: 0 0 48px rgba(156, 112, 235, .48);
}
.transition-portal i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(235, 222, 255, .48);
  border-radius: 50%;
  animation: portal-ring 1.15s ease-out both;
}
.transition-portal i:nth-child(2) { inset: 13px; animation-delay: 55ms; animation-direction: reverse; }
.transition-portal i:nth-child(3) { inset: -17px; border-color: rgba(242, 212, 146, .25); animation-delay: 100ms; }
.transition-portal span { position: relative; z-index: 2; text-shadow: 0 0 14px white; }
.transition-streaks { position: absolute; inset: 0; z-index: -1; }
.transition-streaks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(90px, 22vw, 190px);
  height: 1px;
  border-radius: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(231, 219, 255, .88));
  transform-origin: left center;
  animation: star-streak 1.15s ease-in both;
}
.transition-streaks i:nth-child(1) { rotate: 8deg; animation-delay: 20ms; }
.transition-streaks i:nth-child(2) { rotate: 62deg; animation-delay: 90ms; }
.transition-streaks i:nth-child(3) { rotate: 126deg; animation-delay: 35ms; }
.transition-streaks i:nth-child(4) { rotate: 188deg; animation-delay: 115ms; }
.transition-streaks i:nth-child(5) { rotate: 244deg; animation-delay: 55ms; }
.transition-streaks i:nth-child(6) { rotate: 306deg; animation-delay: 145ms; }
.screen-transition p {
  position: absolute;
  left: 50%;
  top: calc(50% + 96px);
  translate: -50% 0;
  width: min(80vw, 360px);
  margin: 0;
  color: rgba(238, 226, 255, .82);
  font-size: 11px;
  letter-spacing: .2em;
  text-align: center;
  animation: transition-label 1.15s ease both;
}

.google-card-region { width: min(100%, 356px); margin: 22px auto calc(18px + var(--safe-bottom)); padding: 9px 0 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(12,10,25,.38); text-align: center; }
.google-card-label { display: block; margin-bottom: 7px; color: rgba(255,255,255,.42); font: 9px/1.2 system-ui, sans-serif; letter-spacing: .12em; }
.google-card-slot { min-height: 250px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
body.has-google-bottom-anchor { padding-bottom: calc(110px + var(--safe-bottom)); }
body.has-google-bottom-anchor .toast { bottom: calc(116px + var(--safe-bottom)); }

.test-anchor-ad { position: fixed; z-index: 35; left: 50%; bottom: calc(8px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 16px), 728px); min-height: 82px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 13px; padding: 12px 44px 12px 14px; border: 1px solid rgba(242,212,146,.3); border-radius: 16px; background: linear-gradient(135deg, rgba(39,29,72,.98), rgba(16,14,34,.98)); box-shadow: 0 16px 48px rgba(0,0,0,.48); }
.test-anchor-label { align-self: stretch; display: grid; place-items: center; padding: 0 10px; border-right: 1px solid rgba(255,255,255,.11); color: var(--gold); font: 9px/1.4 system-ui, sans-serif; letter-spacing: .08em; white-space: nowrap; }
.test-anchor-copy { min-width: 0; display: grid; gap: 4px; }
.test-anchor-copy strong { overflow: hidden; color: #f5efff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.test-anchor-copy span { overflow: hidden; color: #aaa0bc; font: 10px/1.4 system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.test-anchor-close { position: absolute; right: 9px; top: 9px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; background: rgba(0,0,0,.24); color: white; font-size: 19px; line-height: 1; cursor: pointer; }

.test-card-creative { width: min(100%, 336px); min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 26px 22px; border-radius: 12px; background: radial-gradient(circle at 50% 24%, rgba(151,119,225,.32), transparent 34%), linear-gradient(145deg, #241a43, #111126 72%); color: #f7f1ff; }
.test-card-mark { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(242,212,146,.34); border-radius: 50%; color: var(--gold); font-size: 26px; box-shadow: 0 0 28px rgba(147,111,224,.22); }
.test-card-creative strong { font-size: 16px; letter-spacing: .04em; }
.test-card-creative > span:last-child { max-width: 250px; color: #afa5c2; font: 11px/1.7 system-ui, sans-serif; }

@media (max-width: 350px) {
  .google-card-region { width: calc(100% + 24px); margin-left: -12px; margin-right: -12px; }
  .test-anchor-ad { min-height: 76px; gap: 8px; padding-left: 9px; }
  .test-anchor-label { padding: 0 7px; }
}

.ad-modal { position: fixed; z-index: 50; inset: 0; padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)); display: grid; place-items: center; background: rgba(6,5,13,.92); backdrop-filter: blur(14px); animation: screen-in .25s ease both; }
.ad-surface { width: min(100%, 560px); min-height: min(720px, calc(100dvh - 32px)); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 34%, rgba(93,109,181,.28), transparent 30%), linear-gradient(160deg, #171b35, #0b0c17 72%); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 100px rgba(0,0,0,.5); }
.ad-topline { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.48); font: 9px/1.4 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; padding-right: 30px; }
.ad-close { position: absolute; right: 14px; top: 12px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.17); background: rgba(0,0,0,.3); color: white; font-size: 22px; line-height: 1; cursor: pointer; animation: reveal .25s both; }
.demo-ad-visual { position: relative; flex: 1; min-height: 280px; display: grid; place-items: center; }
.demo-planet { width: clamp(145px, 43vw, 210px); height: clamp(145px, 43vw, 210px); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #e4e0ff 0 3%, #9ca7df 5%, #495582 42%, #1b213a 75%); box-shadow: inset -30px -28px 48px rgba(4,5,13,.55), 0 0 80px rgba(122,137,208,.25); }
.demo-planet::after { content: ""; position: absolute; width: clamp(230px, 66vw, 330px); height: 56px; border: 7px solid rgba(194,203,245,.22); border-radius: 50%; transform: rotate(-15deg); }
.demo-planet span { color: white; font-size: 38px; filter: drop-shadow(0 0 15px white); }
.ad-star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: white; box-shadow: 0 0 12px white; animation: twinkle 2s infinite; }
.ad-star.one { left: 13%; top: 20%; }
.ad-star.two { right: 17%; top: 28%; animation-delay: .7s; }
.ad-star.three { left: 26%; bottom: 17%; animation-delay: 1.3s; }
.ad-copy { text-align: center; padding: 0 12px 24px; }
.ad-copy > p:first-child { color: #a9b6e7; font: 10px/1 system-ui, sans-serif; letter-spacing: .42em; margin: 0 0 12px; }
.ad-copy h2 { font-size: clamp(23px, 6vw, 32px); letter-spacing: .03em; margin: 0; }
.ad-copy > p:last-child { color: #9fa7bd; font: 12px/1.7 system-ui, sans-serif; margin: 12px 0 0; }
.ad-progress-track { height: 3px; background: rgba(255,255,255,.09); border-radius: 4px; overflow: hidden; }
.ad-progress { width: 0; height: 100%; background: linear-gradient(90deg, #96a9ef, #e8edff); box-shadow: 0 0 10px #b9c6f7; }
.ad-timer-row { min-height: 50px; display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.52); font: 10px/1.3 system-ui, sans-serif; }
.ad-timer-row strong { color: white; font-size: 13px; font-variant-numeric: tabular-nums; }
.ad-action { border: 1px solid rgba(255,255,255,.16); background: #e6eaff; color: #171b31; font-weight: 700; min-height: 48px; }
.reward-decision-surface { width: min(100%, 560px); min-height: min(520px, calc(100dvh - 32px)); display: grid; place-items: center; padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: radial-gradient(circle at 50% 38%, rgba(111,126,210,.28), transparent 34%), linear-gradient(160deg, #171b35, #0b0c17 72%); box-shadow: 0 30px 100px rgba(0,0,0,.5); }
.ad-decision-card { width: min(100%, 390px); padding: 34px 24px 26px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: rgba(12,14,28,.76); box-shadow: 0 24px 70px rgba(0,0,0,.32); text-align: center; animation: reveal .3s ease both; }
.ad-decision-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid rgba(232,237,255,.24); border-radius: 50%; background: radial-gradient(circle, #8b9ee4, #343d72 72%); color: white; font-size: 28px; box-shadow: 0 0 32px rgba(144,162,229,.28); }
.ad-decision-eyebrow { color: #a9b6e7; font: 10px/1.4 system-ui, sans-serif; letter-spacing: .18em; margin: 0 0 10px; }
.reward-decision-surface h2 { font-size: clamp(22px, 6vw, 30px); margin: 0; }
.ad-decision-card > p:last-of-type { color: #b6bdd1; font: 13px/1.8 system-ui, sans-serif; margin: 14px 0 0; }
.ad-decision-actions { display: grid; gap: 10px; margin-top: 26px; }
.ad-exit { min-height: 46px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.055); color: #d3d8e8; cursor: pointer; }
.ad-exit:active { transform: scale(.98); }

@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes ambient-breathe { 0%, 100% { opacity: .48; transform: scale(.94) translate3d(0, 0, 0); } 50% { opacity: .9; transform: scale(1.05) translate3d(18px, -10px, 0); } }
@keyframes ambient-drift { 0%, 100% { opacity: .36; transform: translate3d(0, 0, 0) scale(.96); } 50% { opacity: .72; transform: translate3d(-24px, -17px, 0) scale(1.06); } }
@keyframes transition-curtain { 0% { opacity: 0; } 18% { opacity: .76; } 42%, 58% { opacity: 1; } 100% { opacity: 0; } }
@keyframes transition-nebula { 0% { opacity: 0; transform: scale(1.22) rotate(-3deg); } 42% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(1.13) rotate(2deg); } }
@keyframes portal-bloom { 0% { opacity: 0; transform: scale(.2) rotate(-18deg); } 38% { opacity: 1; transform: scale(1) rotate(0); } 58% { opacity: 1; transform: scale(1.08) rotate(4deg); } 100% { opacity: 0; transform: scale(4.8) rotate(12deg); filter: blur(3px) drop-shadow(0 0 30px rgba(255, 244, 210, .7)); } }
@keyframes portal-ring { 0% { opacity: 0; transform: scale(.3) rotate(0); } 38% { opacity: .9; } 100% { opacity: 0; transform: scale(3.4) rotate(135deg); } }
@keyframes star-streak { 0%, 22% { opacity: 0; transform: translateX(-15px) scaleX(.1); } 46% { opacity: .72; } 100% { opacity: 0; transform: translateX(38vw) scaleX(2.1); } }
@keyframes transition-label { 0%, 18% { opacity: 0; transform: translateY(8px); } 40%, 62% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-7px); } }
@keyframes play-button-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.025); } }
@keyframes play-sparkle { 0%, 100% { opacity: .4; transform: scale(.72) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.24) rotate(8deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.96); } 50% { transform: scale(1.04); } }
@keyframes orbit-float { 0%, 100% { transform: rotate(-17deg) scale(1); } 50% { transform: rotate(-12deg) scale(1.05); } }
@keyframes orbit-float-alt { 0%, 100% { transform: rotate(28deg) scale(1); } 50% { transform: rotate(22deg) scale(.96); } }
@keyframes witch-deal { 0% { opacity: 0; transform: translate(120px, -175px) rotate(34deg) scale(.22); filter: blur(2px); } 62% { opacity: 1; filter: none; } 84% { transform: var(--card-rest) scale(1.06); } 100% { opacity: 1; transform: var(--card-rest); filter: none; } }
@keyframes loading-orb { 0% { rotate: 0deg; filter: hue-rotate(0); } 100% { rotate: 360deg; filter: hue-rotate(25deg); } }
@keyframes witch-blink { 0%, 44%, 48%, 100% { scale: 1 1; } 46% { scale: 1 .08; } }
@keyframes wand-glow { 0%, 100% { scale: .72; opacity: .2; rotate: 0deg; } 50% { scale: 1.28; opacity: .9; rotate: 120deg; } }
@keyframes wand-star-pulse { 0%, 100% { scale: .82; rotate: -8deg; filter: drop-shadow(0 0 4px #fff2b2); } 50% { scale: 1.18; rotate: 10deg; filter: drop-shadow(0 0 9px #fff8d7); } }
@keyframes wand-sparks { 0%, 100% { opacity: .25; scale: .7; rotate: 0deg; } 50% { opacity: 1; scale: 1.2; rotate: 35deg; } }
@keyframes sensing-cast { 0%, 100% { transform: rotate(-20deg); } 44% { transform: rotate(-50deg); } 68% { transform: rotate(-46deg); } }
@keyframes crystal-float { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -5px; } }
@keyframes ritual-dot { 0%, 100% { opacity: .25; translate: 0 2px; } 50% { opacity: 1; translate: 0 -4px; } }
@keyframes slot-flicker { 0% { transform: translateY(-4px); opacity: .35; } 50% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(-3px); opacity: .42; } }
@keyframes slot-lock { 0% { transform: translateY(-8px) scale(.96); filter: brightness(1.7); } 65% { transform: translateY(3px) scale(1.04); } 100% { transform: none; filter: none; } }
@keyframes lever-arc-pull { 0% { transform: rotateX(0) rotateZ(0); } 43% { transform: rotateX(-66deg) rotateZ(16deg); } 68% { transform: rotateX(-69deg) rotateZ(18deg); } 84% { transform: rotateX(7deg) rotateZ(-2deg); } 100% { transform: rotateX(0) rotateZ(0); } }
@keyframes lever-knob-face { 0% { transform: rotateZ(0) rotateX(0) scale(1); } 43% { transform: rotateZ(-16deg) rotateX(66deg) scale(1.04); } 68% { transform: rotateZ(-18deg) rotateX(69deg) scale(1.06); } 84% { transform: rotateZ(2deg) rotateX(-7deg) scale(1.02); } 100% { transform: rotateZ(0) rotateX(0) scale(1); } }
@keyframes machine-celebrate { 0% { transform: scale(.96); } 24% { transform: scale(1.04) rotate(-.5deg); filter: brightness(1.42) saturate(1.25); box-shadow: 0 0 70px rgba(242,212,146,.36); } 48% { transform: scale(1.02) rotate(.45deg); } 72% { transform: scale(1.035) rotate(-.2deg); filter: brightness(1.16); } 100% { transform: none; filter: none; } }
@keyframes celebration-flash { 0% { background: rgba(255,245,205,0); } 5% { background: rgba(255,245,205,.32); } 12% { background: rgba(185,135,255,.08); } 21% { background: rgba(98,232,255,.14); } 34%, 100% { background: transparent; } }
@keyframes confetti-cannon-left { 0% { opacity: 0; transform: scale(.15) rotate(-18deg); } 12% { opacity: 1; } 48% { opacity: .7; transform: scale(1.15) rotate(10deg); } 100% { opacity: 0; transform: scale(1.8) rotate(24deg); } }
@keyframes confetti-cannon-right { 0% { opacity: 0; transform: scale(.15) rotate(18deg); } 12% { opacity: 1; } 48% { opacity: .7; transform: scale(1.15) rotate(-10deg); } 100% { opacity: 0; transform: scale(1.8) rotate(-24deg); } }
@keyframes confetti-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.18) rotate(0); } 6% { opacity: 1; } 36% { opacity: 1; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scale(var(--piece-scale)) rotate(var(--spin-mid)); } 62% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--fall-x)), calc(-50% + var(--fall-y))) scale(var(--piece-end-scale)) rotate(var(--spin-end)); } }
@keyframes deal-cast { 0%, 100% { transform: rotate(-20deg); } 45% { transform: rotate(-58deg); } }

@media (min-width: 700px) {
  .app-shell { padding-left: 64px; padding-right: 64px; }
  .chance-card, .home-actions, .footnote { max-width: 520px; margin-left: auto; margin-right: auto; }
  .result-card { padding: 38px 42px 32px; }
  .result-again { max-width: 520px; display: block; margin-left: auto; margin-right: auto; }
}

@media (max-height: 720px) {
  .home-copy { padding-top: 22px; }
  .oracle-stage { height: 230px; }
  .oracle-core { width: 112px; height: 112px; }
  .orbit { transform: scale(.88) rotate(-17deg); }
  .system-panel { margin-top: 32px; }
  .ad-surface { min-height: calc(100dvh - 24px); }
  .demo-ad-visual { min-height: 220px; }
}

@media (max-width: 560px) {
  .landing-details { grid-template-columns: 1fr; }
  .landing-details article { min-height: 0; }
  .slot-machine { grid-template-columns: minmax(0, 1fr) 64px; gap: 7px; padding: 9px; }
  .thought-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .thought-choice-group { padding: 9px 5px 6px; border-radius: 13px; }
  .thought-choice-group legend { padding: 0 3px; font-size: 9px; }
  .thought-choice-group legend span { display: none; }
  .thought-options { height: 114px; grid-template-rows: repeat(3, 38px); }
  .thought-options::before { top: 37px; height: 37px; }
  .slot-reel-item { padding: 0 2px; font-size: 8px; }
  .slot-reel-item.current { font-size: clamp(10px, 3.2vw, 13px); letter-spacing: 0; }
  .slot-lever { padding: 3px; border-radius: 14px; }
  .slot-lever-mechanism { width: 54px; height: 108px; }
  .slot-lever-base { width: 50px; height: 34px; }
  .slot-lever-base::after { left: 14px; }
  .slot-lever-arm { height: 69px; }
  .slot-lever-arm i { width: 29px; height: 29px; }
  .slot-lever-text { font-size: 8px; letter-spacing: 0; }
  .game-preview { height: 330px; }
  .preview-card-a { translate: -118px 38px; }.preview-card-b { translate: 118px 28px; }
}

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