#game { --astral: 0 }
#observatory-sky, .ceremony-sky {
  position: absolute; inset: 0; pointer-events: none;
  background: #101c37 url(assets/observatorio.webp) center/cover no-repeat;
}
#observatory-sky { opacity: var(--astral); overflow: hidden }
#observatory-sky::after {
  content: ""; position: absolute; inset: -7%; opacity: .52; pointer-events: none;
  background: radial-gradient(ellipse at 16% 21%, #97ffc331, transparent 20%),
    radial-gradient(ellipse at 88% 15%, #79aaf035, transparent 25%);
}
#game[data-scene="observatory"] #observatory-sky::after {
  animation: aurora-drift 13s ease-in-out infinite alternate;
}
@keyframes aurora-drift { to { transform: translate(2.4%,-1.8%) scale(1.07); opacity: .86 } }
.well::before {
  content: ""; position: absolute; inset: 0; opacity: var(--astral); pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 47%, transparent 55%, #030f25b3),
    repeating-radial-gradient(circle at 50% 115%, transparent 0 13.75%, #b9d8b61f 13.83%, transparent 14.07%),
    conic-gradient(from 244deg at 50% 115%, transparent 0deg 39deg, #9bd4b821 39.2deg, transparent 39.45deg 77deg, #9bd4b821 77.2deg, transparent 77.45deg 115deg, #9bd4b821 115.2deg, transparent 115.45deg),
    radial-gradient(ellipse at 49% 7%, #205759, #103747 44%, #101d39 95%);
  box-shadow: inset 0 0 18px 2px #5ed4bb59;
}
.cabinet::before {
  content: ""; position: absolute; z-index: 5; pointer-events: none; opacity: var(--astral);
  inset: calc(var(--rail-y)*.66) calc(var(--rail-x)*.62);
  border: 2px solid #a7eed5; box-shadow: inset 0 0 7px #6ed1c77d,0 0 5px 2px #6cd8cb;
}
.board-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: var(--astral) }
.board-aurora::before {
  content: ""; position: absolute; inset: -22%;
  background: radial-gradient(ellipse at 32% 5%,#78ebca36 0%,transparent 49%),
    linear-gradient(123deg,transparent 18%,#64d7bc05 27%,#65e6ae25 32%,#91f1cb08 34%,transparent 39%,
       transparent 54%,#77d6bd17 60%,transparent 65%,#4867911c 80%,transparent 87%);
}
#game[data-scene="observatory"] .board-aurora::before { animation: board-ribbon 11s ease-in-out infinite alternate }
@keyframes board-ribbon {
  from { transform: translate(-3%,1%) rotate(-4deg) }
  to { transform: translate(4%,-3%) rotate(4deg) }
}
.lock::after {
  content: ""; position: absolute; inset: 0; opacity: var(--astral); pointer-events: none;
  background: linear-gradient(160deg,#a9ffe73d,transparent 54%,#0f536866); box-shadow: inset 0 -2px 2px #b7ffe6;
}
.lock b { z-index: 1 }
#game[data-scene="observatory"] .prize {
  background: radial-gradient(ellipse at top,#204953,#10273a 74%) padding-box;
}
#game[data-scene="observatory"] #purchase, #game[data-scene="observatory"] #mode { display: none }
#game[data-scene="observatory"] #feature { color: #a4f8df }
#bonus-ledger {
  width: min(110%,34svh); aspect-ratio: 2/3; position: relative; container-type: inline-size;
  background: url(assets/cronometro.webp) center/100% 100% no-repeat;
  filter: drop-shadow(0 4px 7px #051626b8); font-family: var(--display); text-align: center;
}
.bonus-dial {
  position: absolute; top: 16.4%; left: 22.75%; width: 54.5%; aspect-ratio: 1;
  border-radius: 50%; display: grid; place-items: center;
}
.bonus-dial::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#9afbd6 var(--progress,0%),#8ad4ca33 0%);
  mask: radial-gradient(closest-side,transparent calc(100% - 3px),#000 calc(100% - 2px));
}
.bonus-dial > div {
  position: relative; display: grid; align-content: center; text-shadow: 0 2px 3px #0b2831;
}
.bonus-dial small, #bonus-ledger dt { text-transform: uppercase; color: #f3dca4 }
.bonus-dial small { font-size: 6.7cqw; letter-spacing: .035em }
.bonus-dial strong { font-size: 14cqw; line-height: 1; color: #f9ffee; font-variant-numeric: tabular-nums }
.bonus-dial strong span { font-size: .46em; color: #a8d8c9; vertical-align: .12em }
#bonus-ledger dl {
  position: absolute; inset: 58% 30% 11%; margin: 0; display: grid; align-content: center;
}
#bonus-ledger dl > div + div { margin-top: 5%; padding-top: 5%; border-top: 1px solid #adab7c61 }
#bonus-ledger dt { font-size: 4.9cqw; letter-spacing: .012em; white-space: nowrap }
#bonus-ledger dd { margin: 0; font-size: 9cqw; color: #d8fff0; line-height: 1.08; font-variant-numeric: tabular-nums }
#bonus-ledger #bonus-bank { font-size: min(9cqw,calc(75cqw / var(--digits,4))) }
#ceremony {
  position: absolute; inset: 0; z-index: 9; display: grid; place-items: center;
  pointer-events: none; isolation: isolate; text-align: center;
}
.ceremony-sky {
  opacity: 0;
  background-image: radial-gradient(ellipse at 50% 51%, #071e34a3, #1219321a 72%),url(assets/observatorio.webp);
}
.ceremony-emblem {
  position: relative; width: min(57vw,96svh,960px); aspect-ratio: 1.55;
  background: url(assets/astrolabio.webp) center/100% 100% no-repeat;
  filter: drop-shadow(0 9px 12px #041021c9); container-type: inline-size; opacity: 0;
}
.ceremony-copy {
  position: absolute; inset: 47.3% 10% 23%; display: flex; flex-direction: column;
  justify-content: center; align-items: center; font-family: var(--display); white-space: nowrap;
  text-shadow: 0 2px 2px #061a29,0 3px 7px #03161d;
}
#ceremony-label { color: #fae3a7; font-size: 3.05cqw; line-height: 1.05; text-transform: uppercase; letter-spacing: .13em }
#ceremony-title { color: #fff5cf; font-size: 8.9cqw; line-height: .99; text-transform: uppercase; text-shadow: 0 2px #a7793c,0 4px 3px #12242c }
#ceremony-detail { color: #bbf8e5; font-size: 3.25cqw; line-height: 1.12 }
#ceremony[data-kind="extra"] #ceremony-title { font-size: 7.55cqw }
#ceremony[data-kind="exit"] #ceremony-title { font-variant-numeric: tabular-nums }
#ceremony.static .ceremony-emblem, #ceremony.static .ceremony-sky { opacity: 1 }
#ceremony-continue {
  position: absolute; bottom: 10%; min-height: 38px; padding: .44em 1.65em; pointer-events: auto;
  border-radius: 2em; border: 1px solid #d6bc7e; color: #ffefc4; background: #0d2936ed;
  box-shadow: inset 0 0 0 2px #25464e,0 2px 6px #0c182b;
  text-transform: uppercase; letter-spacing: .08em; font: 800 clamp(13px,1.14vw,21px)/1.2 var(--display);
}
#ceremony-continue:hover { background: #24535b }
@media(max-aspect-ratio:1/1) {
  #observatory-sky, .ceremony-sky { background-position: 63% center }
  .ceremony-emblem { width: min(98vw,90svh) }
  #ceremony-continue { bottom: 21% }
  .actions:has(#bonus-ledger:not([hidden])) { inset-inline: 4%; width: 92% }
  #bonus-ledger {
    width: 100%; height: 100%; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; gap: 4%;
    padding: 0 3.5% 0 2%;
    background: linear-gradient(100deg,#0c2634f2,#15414df5 50%,#0a2232f2);
    border: 3px ridge #bca36e; border-radius: 14px;
  }
  .bonus-dial { position: relative; inset: auto; width: auto; height: 120%; flex-shrink: 0;
    background: url(assets/cronometro.webp) 50% 21.5% / 151% auto; border: 1px solid #be9b61 }
  .bonus-dial::before { inset: 9% }
  .bonus-dial small { font-size: clamp(8px,2.4vw,16px) }
  .bonus-dial strong { font-size: clamp(15px,4.8vw,30px) }
  #bonus-ledger dl { position: static; flex: 1; grid-template-columns: 1.2fr 1fr; align-items: center }
  #bonus-ledger dl > div + div { margin: 0; padding: 0; border: 0; border-left: 1px solid #adab7c61 }
  #bonus-ledger dt { font-size: clamp(9px,2.7vw,15px); letter-spacing: .015em }
  #bonus-ledger dd, #bonus-ledger #bonus-bank { font-size: min(5.5cqw,calc(51cqw / var(--digits,4))) }
}
@media(prefers-reduced-motion:reduce) {
  #game[data-scene="observatory"] #observatory-sky::after, #game[data-scene="observatory"] .board-aurora::before { animation: none }
}
