/* Clockwork Orrery: an immense, measured celestial instrument. */
html[data-world='clockwork-orrery'] {
  --orrery-brass: var(--world-accent);
  --orrery-blue: var(--world-accent-secondary);
  --orrery-gold: var(--world-highlight);
  --orrery-shadow: color-mix(in srgb,var(--world-deep) 42%,transparent);
  --theme-card-radius: 1px 1px 12px 1px;
  --theme-control-radius: 2px 7px 2px 7px;
  --theme-badge-radius: 1px 1px 8px 1px;
  --theme-badge-clip: polygon(0 0,100% 0,100% 78%,88% 100%,0 100%);
  --theme-card-lift: none;
  background-image: radial-gradient(ellipse at 50% 48%,color-mix(in srgb,var(--world-accent-secondary) 10%,transparent),transparent 52%),linear-gradient(145deg,var(--world-background),var(--world-deep));
}
html[data-world='clockwork-orrery'] { --theme-badge-radius: 1px 1px 8px 1px; --theme-badge-clip: polygon(0 0,100% 0,100% 78%,88% 100%,0 100%); }
html[data-world='clockwork-orrery'] .cinema-atmosphere {
  position:fixed; inset:0; overflow:hidden; pointer-events:none !important; z-index:0;
  perspective:1100px; isolation:isolate; opacity:.88;
}
html[data-world='clockwork-orrery'] .cinema-atmosphere > div { position:absolute; inset:-35%; pointer-events:none; transform-style:preserve-3d; }
.orrery-far {
  opacity:.44;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,color-mix(in srgb,var(--orrery-brass) 57%,transparent) 0deg .11deg,transparent .12deg 2.5deg),
    radial-gradient(ellipse at center,transparent 0 30.6%,color-mix(in srgb,var(--orrery-brass) 43%,transparent) 30.72% 30.86%,transparent 31% 43.8%,color-mix(in srgb,var(--orrery-blue) 40%,transparent) 43.94% 44.08%,transparent 44.2% 58.8%,color-mix(in srgb,var(--orrery-brass) 33%,transparent) 58.95% 59.1%,transparent 59.25% 74.8%,color-mix(in srgb,var(--orrery-brass) 42%,transparent) 74.95% 75.08%,transparent 75.2%);
  mask-image:radial-gradient(ellipse at center,#000 0 78%,transparent 78.4%);
  animation:orrery-far-turn 184s linear infinite;
}
.orrery-far::before,.orrery-far::after { content:''; position:absolute; inset:10% 21%; border:1px solid color-mix(in srgb,var(--orrery-blue) 34%,transparent); border-radius:50%; transform:rotate(31deg) scaleY(.52); box-shadow:0 0 0 12vw color-mix(in srgb,var(--orrery-brass) 4%,transparent),0 0 0 1px color-mix(in srgb,var(--orrery-brass) 17%,transparent); }
.orrery-far::after { inset:22% 7%; transform:rotate(-37deg) scaleY(.39); border-color:color-mix(in srgb,var(--orrery-brass) 29%,transparent); }
.orrery-mid {
  inset:-28% !important; opacity:.5;
  background:radial-gradient(ellipse at center,transparent 0 41%,color-mix(in srgb,var(--orrery-brass) 14%,transparent) 41.05% 41.22%,transparent 41.3% 42.5%,color-mix(in srgb,var(--orrery-blue) 22%,transparent) 42.62% 42.78%,transparent 42.9% 57%,color-mix(in srgb,var(--orrery-brass) 24%,transparent) 57.1% 57.26%,transparent 57.4%);
  animation:orrery-mid-turn 137s linear infinite reverse;
}
.orrery-mid::before { content:''; position:absolute; left:50%; top:4%; width:1px; height:92%; background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--orrery-brass) 42%,transparent) 20% 80%,transparent); transform:rotate(23deg); box-shadow:0 0 0 1px transparent; }
.orrery-mid::after { content:''; position:absolute; left:4%; top:50%; width:92%; height:1px; background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--orrery-blue) 35%,transparent) 20% 80%,transparent); transform:rotate(-18deg); }
.orrery-near {
  inset:-55% -20% !important; opacity:.39;
  background:radial-gradient(ellipse at center,transparent 0 60.1%,color-mix(in srgb,var(--orrery-brass) 51%,transparent) 60.2% 60.35%,transparent 60.5% 63.7%,color-mix(in srgb,var(--orrery-blue) 32%,transparent) 63.82% 63.96%,transparent 64.1%);
  transform:rotate(-13deg) scaleY(.62) !important;
}
.orrery-near::before { content:''; position:absolute; inset:10% 18%; border:1px solid color-mix(in srgb,var(--orrery-brass) 37%,transparent); border-radius:50%; transform:rotate(54deg) scaleY(.42); box-shadow:0 0 0 8px color-mix(in srgb,var(--world-deep) 12%,transparent),inset 0 0 28px -20px var(--orrery-gold); }
.orrery-celestials {
  opacity:.83;
  background:radial-gradient(circle at 29% 35%,#fff5d2 0 2px,color-mix(in srgb,var(--orrery-gold) 72%,transparent) 3px 5px,transparent 9px),radial-gradient(circle at 75% 62%,#dfebf2 0 2px,color-mix(in srgb,var(--orrery-blue) 72%,transparent) 3px 5px,transparent 9px),radial-gradient(circle at 62% 23%,var(--orrery-gold) 0 2px,transparent 5px),radial-gradient(circle at 18% 73%,var(--orrery-blue) 0 2px,transparent 5px);
  filter:drop-shadow(0 0 8px color-mix(in srgb,var(--orrery-gold) 46%,transparent));
  animation:orrery-celestial-drift 113s ease-in-out infinite alternate;
}
.orrery-celestials::before,.orrery-celestials::after { content:''; position:absolute; width:clamp(9px,1.3vw,18px); aspect-ratio:1; left:29%; top:35%; border-radius:50%; background:radial-gradient(circle at 32% 28%,#fff8df 0 8%,var(--orrery-gold) 28%,color-mix(in srgb,var(--orrery-brass) 75%,var(--world-deep)) 75%); box-shadow:0 0 14px color-mix(in srgb,var(--orrery-gold) 36%,transparent),inset -3px -3px 7px var(--orrery-shadow); animation:orrery-orbit-one 113s linear infinite; }
.orrery-celestials::after { width:clamp(6px,.8vw,11px); left:75%; top:62%; background:radial-gradient(circle at 32% 26%,#fff 0 8%,var(--orrery-blue) 37%,color-mix(in srgb,var(--world-deep) 66%,var(--orrery-blue)) 82%); animation:orrery-orbit-two 79s linear infinite reverse; }
.orrery-shadow { inset:-5% !important; opacity:.21; background:linear-gradient(112deg,transparent 20%,var(--orrery-shadow) 47%,transparent 69%); mix-blend-mode:multiply; animation:orrery-shadow-cross 151s ease-in-out infinite alternate; }
.orrery-light { inset:-12% !important; opacity:.48; background:radial-gradient(ellipse 32% 20% at 28% 22%,color-mix(in srgb,var(--orrery-gold) 11%,transparent),transparent 74%),radial-gradient(ellipse 26% 18% at 77% 72%,color-mix(in srgb,var(--orrery-blue) 10%,transparent),transparent 76%); animation:orrery-light-shift 113s ease-in-out infinite alternate; }

html[data-world='clockwork-orrery'] :is(.panel,.metric,.room-card,.room-item,.summary-card,.ops-card) {
  border-radius:var(--theme-card-radius) !important; border-color:color-mix(in srgb,var(--orrery-brass) 53%,var(--world-border)) !important;
  box-shadow:var(--world-shadow),inset 0 1px 0 color-mix(in srgb,var(--orrery-gold) 25%,transparent),inset 4px 0 0 -2px color-mix(in srgb,var(--orrery-brass) 55%,transparent) !important;
  background-image:linear-gradient(145deg,color-mix(in srgb,var(--world-surface) 93%,var(--orrery-blue) 7%),var(--world-surface));
  transition:border-color 180ms ease,box-shadow 180ms ease,background-color 180ms ease;
}
html[data-world='clockwork-orrery'] :is(button,.button,select,input,.nav-item,.mobile-nav-sheet-item) { border-radius:var(--theme-control-radius) !important; }
html[data-world='clockwork-orrery'] :is(.panel,.metric,.room-card,.room-item):hover { translate:none !important; transform:none !important; border-color:color-mix(in srgb,var(--orrery-gold) 72%,var(--world-border)) !important; box-shadow:var(--world-shadow),inset 0 0 0 1px color-mix(in srgb,var(--orrery-gold) 38%,transparent) !important; }
html[data-world='clockwork-orrery'] :is(.sidebar,.topbar,.mobile-nav-bar,#mobile-nav-sheet) { border-color:color-mix(in srgb,var(--orrery-brass) 58%,var(--world-border)) !important; background-image:linear-gradient(90deg,color-mix(in srgb,var(--orrery-brass) 8%,transparent),transparent 18% 82%,color-mix(in srgb,var(--orrery-brass) 7%,transparent)); }
html[data-world='clockwork-orrery'] :is(.nav-item.active,.mobile-nav-sheet-item.active) { box-shadow:inset 3px 0 0 var(--orrery-gold),inset 0 0 0 1px color-mix(in srgb,var(--orrery-gold) 32%,transparent) !important; }
html[data-world='clockwork-orrery'] .panel::after { content:'⌖'; color:var(--orrery-brass); border:0; border-radius:0; background:transparent; font:12px/1 Georgia,serif; opacity:.82; }
html[data-world='clockwork-orrery'] :is(.room-number,.summary-room-number,.room-list-number,.strip-room-number > strong) { font-family:var(--world-font,Georgia,serif); font-variant-numeric:tabular-nums; text-shadow:0 0 12px color-mix(in srgb,var(--orrery-blue) 17%,transparent); }
html[data-world='clockwork-orrery'][data-decorative-animations='on'] :is(.panel,.metric,.room-card,.employee-bubble,.prod-score-card,.summary-card,.metric-card) { animation:orrery-card-alignment 113s ease-in-out infinite; }
html[data-world='clockwork-orrery'] .cinema-transition[data-transition='clockwork-orrery'] { background:linear-gradient(90deg,transparent 0 48%,color-mix(in srgb,var(--orrery-brass) 22%,transparent) 49% 50%,transparent 51%); animation:orrery-navigation-align 700ms ease-out both; }
html[data-world='clockwork-orrery'] .cinema-transition[data-transition='clockwork-orrery'] i { display:none; }

html[data-world='clockwork-orrery'] .orrery-starting .orrery-far { animation:orrery-resolve-far 4200ms ease-out both; }
html[data-world='clockwork-orrery'] .orrery-starting .orrery-mid { animation:orrery-resolve-mid 3900ms ease-out 250ms both; }
html[data-world='clockwork-orrery'] .orrery-starting .orrery-near { animation:orrery-resolve-near 3500ms ease-out 550ms both; }
html[data-world='clockwork-orrery'] .orrery-starting .orrery-celestials { animation:orrery-resolve-bodies 3200ms ease-out 850ms both; }
html[data-world='clockwork-orrery'] .orrery-starting .orrery-shadow { animation:orrery-resolve-shadow 3000ms ease-in-out 1200ms both; }
html[data-world='clockwork-orrery'] .orrery-starting .orrery-light { animation:orrery-resolve-light 2800ms ease-in-out 1450ms both; }
html[data-world='clockwork-orrery'] .cine-room[data-room-transition-active='bed-made']::before { animation:orrery-bed-align 880ms ease-out both !important; }
html[data-world='clockwork-orrery'] .cine-room[data-room-transition-active='finished'] { animation:orrery-finished-plate 1580ms ease-out both !important; }
html[data-world='clockwork-orrery'] .cine-room[data-room-transition-active='finished'] :is(.room-number,.summary-room-number,.room-list-number,.strip-room-number > strong) { animation:orrery-finished-number 1580ms ease-out both; }

html[data-world='clockwork-orrery'] .world-atmosphere[data-event^='orrery-'] .world-particles { animation-play-state:paused !important; }
html[data-world='clockwork-orrery'] .world-atmosphere[data-event='orrery-grand-alignment'] + .cinema-atmosphere .orrery-far { animation:orrery-grand-align 26s ease-in-out both; }
html[data-world='clockwork-orrery'] .world-atmosphere[data-event='orrery-eclipse'] + .cinema-atmosphere { animation:orrery-eclipse 24s ease-in-out both; }
html[data-world='clockwork-orrery'] .world-atmosphere[data-event='orrery-counterweight'] + .cinema-atmosphere .orrery-near { animation:orrery-counterweight 22s ease-in-out both; }
html[data-world='clockwork-orrery'] .world-atmosphere[data-event='orrery-hidden-dial'] + .cinema-atmosphere .orrery-mid::after { animation:orrery-hidden-dial 22s ease-in-out both; }
html[data-world='clockwork-orrery'] .world-atmosphere[data-event='orrery-impossible-orbit'] + .cinema-atmosphere .orrery-celestials::after { animation:orrery-impossible-orbit 20s ease-in-out both; }

@keyframes orrery-far-turn { to { transform:rotate(360deg); } }
@keyframes orrery-mid-turn { to { transform:rotate(360deg); } }
@keyframes orrery-celestial-drift { from { background-position:0 0,0 0,0 0,0 0; } to { background-position:12px -9px,-10px 8px,8px 4px,-7px -6px; } }
@keyframes orrery-orbit-one { from { transform:rotate(0) translateX(12vw) rotate(0); } to { transform:rotate(360deg) translateX(12vw) rotate(-360deg); } }
@keyframes orrery-orbit-two { from { transform:rotate(0) translateX(8vw) rotate(0); } to { transform:rotate(360deg) translateX(8vw) rotate(-360deg); } }
@keyframes orrery-shadow-cross { from { transform:translateX(-9%) rotate(-2deg); } to { transform:translateX(9%) rotate(2deg); } }
@keyframes orrery-light-shift { from { opacity:.34; transform:translate3d(-1%,1%,0); } to { opacity:.55; transform:translate3d(1%,-1%,0); } }
@keyframes orrery-resolve-far { from { opacity:0; transform:rotate(-14deg) scale(.92); } to { opacity:.44; transform:rotate(0) scale(1); } }
@keyframes orrery-resolve-mid { from { opacity:0; transform:rotate(19deg) scale(.94); } to { opacity:.5; transform:rotate(0) scale(1); } }
@keyframes orrery-resolve-near { from { opacity:0; } to { opacity:.39; } }
@keyframes orrery-resolve-bodies { from { opacity:0; filter:brightness(2); } to { opacity:.83; filter:brightness(1); } }
@keyframes orrery-resolve-shadow { from { opacity:0; } to { opacity:.21; } }
@keyframes orrery-resolve-light { from { opacity:0; } 60% { opacity:.7; } to { opacity:.48; } }
@keyframes orrery-navigation-align { from { opacity:0; transform:scaleX(.2); } 35%,68% { opacity:.9; } to { opacity:0; transform:scaleX(1); } }
@keyframes orrery-card-alignment { 0%,100% { box-shadow:var(--world-shadow); } 52% { box-shadow:var(--world-shadow),inset 0 0 0 1px color-mix(in srgb,var(--orrery-brass) 24%,transparent); } }
@keyframes orrery-bed-align { 0%,100% { box-shadow:inset 0 0 0 1px transparent; } 48%,68% { box-shadow:inset 0 0 0 2px var(--orrery-blue),inset 0 0 22px -12px var(--orrery-blue); } }
@keyframes orrery-finished-plate { 0%,100% { box-shadow:var(--world-shadow); } 45%,72% { box-shadow:var(--world-shadow),inset 0 0 0 2px var(--orrery-gold),inset 0 0 30px -16px var(--orrery-gold); } }
@keyframes orrery-finished-number { 0%,100% { color:var(--world-text); } 42%,72% { color:var(--orrery-gold); text-shadow:0 0 14px color-mix(in srgb,var(--orrery-gold) 45%,transparent); } }
@keyframes orrery-grand-align { 0%,100% { filter:none; } 48%,72% { filter:brightness(1.23) drop-shadow(0 0 22px color-mix(in srgb,var(--orrery-gold) 36%,transparent)); } }
@keyframes orrery-eclipse { 0%,100% { opacity:.88; } 35%,68% { opacity:.56; } }
@keyframes orrery-counterweight { 0%,100% { transform:rotate(-13deg) scaleY(.62); } 50% { transform:rotate(8deg) scaleY(.62) translateY(3vh); } }
@keyframes orrery-hidden-dial { 0%,100% { opacity:.5; } 45%,72% { opacity:.95; filter:drop-shadow(0 0 12px var(--orrery-gold)); } }
@keyframes orrery-impossible-orbit { 0%,100% { transform:rotate(0) translateX(8vw) rotate(0); } 50% { transform:rotate(180deg) translateX(13vw) rotate(-180deg); } }

html[data-world='clockwork-orrery'][data-world-performance='lite'] :is(.orrery-far,.orrery-shadow) { display:none; }
html[data-world='clockwork-orrery'][data-background-animations='off'] :is(.orrery-far,.orrery-mid,.orrery-celestials,.orrery-shadow,.orrery-light),
html[data-world='clockwork-orrery'][data-decorative-animations='off'] :is(.orrery-far,.orrery-mid,.orrery-celestials,.orrery-shadow,.orrery-light) { animation-play-state:paused !important; }
html.cinema-paused[data-world='clockwork-orrery'] .cinema-atmosphere *,
html[data-world='clockwork-orrery'].world-focus-mode .cinema-atmosphere { animation-play-state:paused !important; opacity:.32; }
@media (max-width:700px) { html[data-world='clockwork-orrery'] .cinema-atmosphere { opacity:.64; } .orrery-near { inset:-45% -48% !important; } }
@media (prefers-reduced-motion:reduce) { html[data-world='clockwork-orrery'] .cinema-atmosphere *,html[data-world='clockwork-orrery'] .cinema-transition * { animation:none !important; transition:none !important; } }
@media print { html[data-world='clockwork-orrery'] .cinema-atmosphere { display:none !important; } }
