/* Wardrobe walk-through — see wardrobe.js. */
.wd-layer {
  position: absolute;
  inset: 0;
  z-index: 10; /* above the canvas, below the HUD (20) */
  pointer-events: none;
  visibility: hidden;
}
.wd-layer.is-on {
  visibility: visible;
  pointer-events: auto; /* while the lockers are up, taps don't walk Ethan */
}

.wd-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0f0d19;
}
.wd-plate-bg {
  /* the plate again, blurred and dimmed, filling the sides */
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.45);
}
.wd-plate {
  position: absolute;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
}

/* Behind the doors: a dark passage, lit faintly by the theater at the
   far end. --cx/--cy/--r are set by wardrobe.js to the doorway. */
.wd-theater {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle var(--r, 300px) at var(--cx, 50%) var(--cy, 50%), #3b2616, #140b12 55%, #050307 100%);
}
.wd-theater-art {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  box-shadow: 0 0 120px 30px rgba(255, 190, 110, 0.35);
}
.wd-fog {
  /* darkness closing in around the far-off room; fades as you step in */
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle calc(var(--r, 300px) * 0.55) at var(--cx, 50%) var(--cy, 50%),
    transparent 35%, rgba(5, 3, 7, 0.55) 70%, rgba(5, 3, 7, 0.9) 100%);
}
/* The theater painting, cover-fitted by wardrobe.js, with the two
   curtain halves laid over it in the same frame. */
.wd-stage {
  position: absolute;
}
.wd-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.wd-doors {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.wd-door {
  position: absolute;
  transform-style: preserve-3d;
}
.wd-face,
.wd-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.wd-back {
  /* inside of a locker door: darker metal */
  transform: rotateY(180deg);
  background: linear-gradient(90deg, #5a5570, #6d6886 60%, #5a5570);
  border: 2px solid #1b1822;
  box-sizing: border-box;
}

/* Click target over the doorway, and the prompt under the lockers. */
.wd-hit {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  pointer-events: none;
  transition: box-shadow 0.2s ease;
}
.wd-layer.is-waiting .wd-hit {
  pointer-events: auto;
}
.wd-layer.is-waiting .wd-hit:focus-visible {
  outline: none;
}
.wd-cue {
  position: absolute;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 999px;
  background: #0f0d19cc;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wd-cue.is-visible {
  opacity: 1;
  animation: wd-pulse 1.6s ease-in-out infinite;
}
@keyframes wd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  .wd-cue.is-visible { animation: none; }
}

/* The theater's screen (wardrobe.js SHOWS): a 2x2 grid of shows, or a
   scrolling rail once there are more. Sized in cqw so it all scales with
   the screen. */
.wd-stage .wd-screen {
  position: absolute;
  container-type: inline-size;
  background: #0d0b14;
  overflow: hidden;
}
.wd-shelf {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3cqw;
  padding: 4cqw 7cqw;
}
.wd-screen.is-rail .wd-shelf {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 7cqw;
}
.wd-screen.is-rail .wd-shelf::-webkit-scrollbar { display: none; }
.wd-screen.is-rail .wd-card {
  flex: 0 0 40cqw;
  height: auto;
  scroll-snap-align: center;
}

.wd-card {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  justify-self: center;
  align-self: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.6cqw;
  background: #000;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.15s ease;
}
.wd-card:hover,
.wd-card:focus-visible {
  outline: none;
  transform: scale(1.04);
}
.wd-card .wd-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.wd-card.is-soon {
  cursor: default;
  background: rgba(255, 255, 255, 0.04);
  border: 0.4cqw dashed rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
}
.wd-card.is-soon:hover { transform: none; }
.wd-card.is-soon span {
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: 3.4cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* the content's Knowledge Juice value */
.wd-card .wd-juice {
  position: absolute;
  right: -3%;
  top: -10%;
  width: 18%;
  aspect-ratio: 166 / 240;
  filter: drop-shadow(0 0.4cqw 0.6cqw rgba(0, 0, 0, 0.5));
}
.wd-card .wd-juice img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.wd-card .wd-juice b {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  text-align: center;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-weight: 900;
  font-size: 3.6cqw;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 0.3cqw #1a3a10;
  paint-order: stroke fill;
}

.wd-scroll {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 5cqw;
  height: 9cqw;
  border: 0;
  border-radius: 1cqw;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 5cqw;
  line-height: 1;
  cursor: pointer;
}
.wd-scroll.is-prev { left: 1cqw; }
.wd-scroll.is-next { right: 1cqw; }

/* Carrot, powered down, blocking the lockers (wardrobe.js CARROT) */
.wd-carrot { position: absolute; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35)); }

.wd-carrot { pointer-events: auto; cursor: pointer; z-index: 2; transition: transform 1.2s ease-in, opacity 1.2s ease-in; }
.wd-carrot.is-waking { animation: wd-wake 1s ease-out; }
/* rolling backwards to his spot by the console: a slide with a little bounce */
.wd-carrot.is-rolling { transition: left 1.7s cubic-bezier(0.45, 0, 0.3, 1), top 1.7s ease-in-out; animation: wd-roll 0.28s ease-in-out 6; }
@keyframes wd-roll { 50% { transform: translateY(-1.5%) rotate(-1.5deg); } }
.wd-carrot.is-parked { cursor: default; }
@keyframes wd-wake { 0% { filter: brightness(0.7); } 40% { filter: brightness(1.5) drop-shadow(0 0 18px rgba(130, 255, 255, 0.8)); } 100% { filter: none; } }
/* Carrot's power card (wardrobe.js) */
.wd-ccard .ob-text b { color: #2e7d1f; font-weight: inherit; }
.wd-cneed { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 8px; }
.wd-cneed img { height: 1.2em; width: auto; }
.wd-cneed b { font-weight: inherit; }
.wd-cbar { height: 16px; border-radius: 999px; background: rgba(12, 59, 63, 0.18); overflow: hidden; margin: 0 8px 14px; }
.wd-cbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #62ba34, #b8f28a); }
.wd-cmore { margin: 0 0 14px; font-size: clamp(16px, 1.9vw, 19px); }
.wd-cbtns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ob-ok.is-quiet { background: rgba(12, 59, 63, 0.12); }

/* the player's character in the lockers view (wardrobe.js drawChar) */
.wd-char { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.wd-cue { z-index: 4; }

/* the cutscene (wardrobe.js CUT): over everything in the view, faded in
   over Ethan's last step and out onto the open stage */
.wd-cut {
  position: absolute;
  z-index: 6;
  object-fit: fill;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.wd-layer.is-cut .wd-cut {
  opacity: 1;
  visibility: visible;
  /* a soft dissolve from the lab: the room is lined up, so only the
     character changes pose; the video holds its first frame meanwhile */
  transition: opacity 0.4s ease-in-out;
}
.wd-skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 7;
  padding: 8px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: #0f0d19aa;
  color: #fff;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: 0.05em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wd-layer.is-cut .wd-skip { opacity: 1; pointer-events: auto; }
.wd-skip:hover, .wd-skip:focus-visible { background: #0f0d19; outline: none; }

/* dev bar "Fit": the whole 16:9 art, letterboxed */
.wd-layer.is-fit {
  right: auto;
  bottom: auto;
  overflow: hidden;
  box-shadow: 0 0 0 100vmax #0f0d19;
}

/* an unlocked show: a play button instead of its price */
.wd-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(15, 13, 25, 0.62);
  border: 0.35cqw solid #fff;
  box-shadow: 0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.45);
}
.wd-play::after {
  content: "";
  position: absolute;
  left: 38%;
  top: 27%;
  border-style: solid;
  border-width: 1.9cqw 0 1.9cqw 3.2cqw;
  border-color: transparent transparent transparent #fff;
}

/* the show player, over everything. Picking a show: the frame grows from
   the card to the stage's screen (is-anim), pushes in to fill the window
   while the theater goes dark (is-push), then plays full screen (is-playing). */
.wd-player {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  background: rgba(0, 0, 0, 0);
  transition: background 0.75s ease-in;
}
.wd-player.is-on { display: block; }
.wd-player.is-push, .wd-player.is-playing { background: #000; }
.wd-player-frame {
  position: absolute;
  overflow: hidden;
  border-radius: 1.2vmin;
  background: #000;
  box-shadow: 0 2vmin 6vmin rgba(0, 0, 0, 0.6);
}
.wd-player.is-push .wd-player-frame { border-radius: 0; box-shadow: none; transition-property: left, top, width, height, border-radius; }
.wd-player.is-playing .wd-player-frame { inset: 0; border-radius: 0; box-shadow: none; }
.wd-player-thumb, .wd-player-v {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.wd-player-thumb { object-fit: cover; }
.wd-player.is-anim .wd-player-v { visibility: hidden; }
.wd-player.is-playing .wd-player-thumb { display: none; }
.wd-player.is-anim .wd-player-x { opacity: 0; pointer-events: none; }
.wd-player-x {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 13, 25, 0.7);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.wd-player-x:hover, .wd-player-x:focus-visible { border-color: #ffd93d; outline: none; }
/* the other shows step back while one is picked */
.wd-screen.is-picking .wd-card { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0.25; }

/* inside the theater the (swung-open) doors layer still spans the view:
   let clicks through to the screen's shows */
.wd-layer.is-inside .wd-doors,
.wd-layer.is-inside .wd-doors * { pointer-events: none; }

/* waiting to start: a big play button in the middle */
.wd-player-play {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: clamp(88px, 13vmin, 140px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(15, 13, 25, 0.6);
  box-shadow: 0 1.2vmin 3vmin rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.wd-player-play::after {
  content: "";
  position: absolute;
  left: 39%;
  top: 28%;
  border-style: solid;
  border-width: clamp(19px, 2.8vmin, 30px) 0 clamp(19px, 2.8vmin, 30px) clamp(32px, 4.6vmin, 50px);
  border-color: transparent transparent transparent #fff;
}
.wd-player.is-ready .wd-player-play { display: block; }
.wd-player-play:hover, .wd-player-play:focus-visible { transform: translate(-50%, -50%) scale(1.08); border-color: #ffd93d; background: rgba(15, 13, 25, 0.75); outline: none; }

/* a show's card (mockup): status line, title, thumbnail, description, juice */
.wd-scard .wd-sstatus { margin: 0 0 4px; }
.wd-scard .ob-title { margin: 0 0 12px; }
.wd-sthumb { display: block; width: min(320px, 70%); aspect-ratio: 16 / 9; object-fit: cover; margin: 0 auto 14px; }
.wd-sdesc { margin: 0 auto 14px; font: 400 16px/1.35 system-ui, sans-serif; letter-spacing: 0.02em; max-width: 44ch; text-align: center; color: #0c3b3f; }
/* running time on the thumbnail, bottom-right (sized with the screen) */
.wd-clen {
  position: absolute; right: 1cqw; bottom: 1cqw;
  padding: 0.4cqw 1.2cqw 0.3cqw; border-radius: 999px;
  background: rgba(12, 59, 63, 0.88); color: #fff;
  font-family: "Londrina Solid", system-ui, sans-serif; font-size: 2.1cqw; line-height: 1;
  letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none;
}

/* Carrot's card: the cost up top, then what you have */
.wd-ccost { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 22px; margin-bottom: 10px; }
.wd-ccost img { height: 1.3em; width: auto; }
.wd-ccost b { font-weight: inherit; font-size: 1.25em; }
.wd-chave { margin: 10px 0 16px; font-size: 20px; letter-spacing: 0.04em; color: #0c3b3f; }
.wd-chave b { font-weight: inherit; }
.wd-cmore { color: #8a4b00; }
