/* Approved day/night scenery, driven by the expedition clock. */
body .compact-shell .encounter-upgraded {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-image-outset: 0 !important;
}
.encounter-sky {
  position: absolute;
  inset: 3px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  clip-path: polygon(
    9px 0,
    calc(100% - 9px) 0,
    100% 9px,
    100% calc(100% - 9px),
    calc(100% - 9px) 100%,
    9px 100%,
    0 calc(100% - 9px),
    0 9px
  );
}
.encounter-scene {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 4s ease-in-out;
}
.encounter-scene-day {
  background-image: url("./ui/encounters/scenery/day-background.112fdfc1c1ec.png?v=1");
}
.encounter-scene-night {
  background-image: url("./ui/encounters/scenery/night-background.726d07b08a07.png?v=1");
  opacity: 0;
}
.encounter-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(#061b374d, #061b3714 30%, #061b3777 85%);
}
.encounter-celestial {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  image-rendering: pixelated;
  transition:
    opacity 4s ease-in-out,
    transform 4s ease-in-out;
}
.encounter-sky .sun {
  width: 120px;
  height: 120px;
  left: -4px;
  top: -10px;
  filter: drop-shadow(0 0 9px #fff3b0b3) drop-shadow(0 0 24px #ffc53699);
}
.encounter-sky .moon {
  width: 86px;
  height: 86px;
  left: 15px;
  top: 3px;
  opacity: 0;
  transform: translateY(20px);
  filter: drop-shadow(0 0 12px #c3dbff44);
}
.encounter-sun-glow {
  position: absolute;
  top: 2px;
  left: 11px;
  width: 96px;
  height: 96px;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2a45c 10%, #ffc63e33 40%, #ffb53600 72%);
  opacity: 1;
  transition: opacity 4s ease-in-out;
  pointer-events: none;
}
.encounter-upgraded[data-sky='night'] :is(.encounter-scene-night, .moon, .encounter-cord-on) {
  opacity: 1;
  transform: translateY(0);
}
.encounter-upgraded[data-sky='night'] :is(.encounter-scene-day, .encounter-sun-glow, .encounter-cord-day) {
  opacity: 0;
}
.encounter-upgraded[data-sky='night'] .sun {
  opacity: 0;
  transform: translateY(25px);
}
body .compact-shell .encounter-upgraded::after {
  content: '' !important;
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  border: 2px solid transparent;
  border-image: url("/static/game/ui/pixel-gold-frame.8917bbdb0a7c.svg?v=20261011-frame2") 12 / 12px / 2px stretch;
  border-image-outset: 0;
  background: none;
  box-shadow: none;
}
body .compact-shell .encounter-upgraded .machine-heading-copy h1 {
  text-shadow:
    0 2px #07172e,
    1px 0 #07172e,
    -1px 0 #07172e;
}
body .compact-shell .encounter-upgraded .machine-lights {
  display: block;
  width: calc(100% + 16px);
  height: 0;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0 -8px;
  padding: 0;
  position: relative;
  overflow: visible;
  background: none;
  z-index: 5;
  pointer-events: none;
}
.encounter-cord {
  display: block;
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: auto;
  overflow: hidden;
  aspect-ratio: 2106 / 185;
  image-rendering: pixelated;
  transition: opacity 4s ease-in-out;
}
.encounter-cord-on {
  opacity: 0;
}
.encounter-cord-day {
  opacity: 1;
}
body .compact-shell .encounter-upgraded .encounter-reels {
  min-height: 410px;
}
body .compact-shell .encounter-upgraded > .machine-controls {
  top: -8px;
}
body .compact-shell .encounter-upgraded .encounter-heading .expedition-clock {
  left: 50px;
  top: 2px;
  transform: translateX(-50%);
  justify-content: center;
  z-index: 6;
  background: #06172e;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .encounter-sky :is(.encounter-scene, .encounter-celestial),
  .encounter-sun-glow,
  .encounter-cord {
    transition: none;
  }
}

/* Passive items use the same inset blue cells as the Bag. */
body .compact-shell #dock-passives .passive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 56px);
  grid-auto-rows: 56px;
  align-content: start;
  align-items: stretch;
  gap: 6px;
  padding: 4px;
  border: 0 !important;
  border-image: none !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: none;
  overflow: auto;
}
body .compact-shell #dock-passives .passive-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 0;
  padding: 4px;
  box-sizing: border-box;
  border: 1px solid #4c7398 !important;
  border-top-color: #789bbd !important;
  border-bottom-color: #304b6c !important;
  border-radius: 8px !important;
  border-image: none !important;
  clip-path: none !important;
  background: linear-gradient(#0a1d31, #071626);
  box-shadow:
    inset 0 0 0 2px #071625,
    inset 0 0 0 3px #45698a38,
    0 1px 2px #020a1580 !important;
}
body .compact-shell #dock-passives .passive-item::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  pointer-events: none;
  background:
    linear-gradient(#8bb1d1, #8bb1d1) left top / 7px 1px,
    linear-gradient(#8bb1d1, #8bb1d1) left top / 1px 7px,
    linear-gradient(#8bb1d1, #8bb1d1) right top / 7px 1px,
    linear-gradient(#8bb1d1, #8bb1d1) right top / 1px 7px,
    linear-gradient(#52789e, #52789e) left bottom / 7px 1px,
    linear-gradient(#52789e, #52789e) left bottom / 1px 7px,
    linear-gradient(#52789e, #52789e) right bottom / 7px 1px,
    linear-gradient(#52789e, #52789e) right bottom / 1px 7px;
  background-repeat: no-repeat;
  opacity: 0.65;
}
body .compact-shell #dock-passives .passive-item:is(:hover, :focus-visible) {
  border-color: #9bbddd !important;
  outline: 1px solid #9bbddd;
  outline-offset: 2px;
}
body .compact-shell #dock-passives .passive-item .item-sprite {
  width: 40px;
  height: 40px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
body .compact-shell #dock-passives .passive-item .pi-copy {
  display: none;
}
body .compact-shell #dock-passives .passive-empty {
  grid-column: 1 / -1;
}
