/* Console close-up — code-drawn screen content.
 *
 * The plate (assets/closeup-monitor.webp) ships with all five screens
 * blank. Everything you see ON the glass is rendered here as DOM, so a
 * channel can change without new art. Positions come from console.js,
 * which anchors each screen to the same cover-fit transform the canvas
 * uses, so these boxes stay glued to the artwork at any window size.
 */

.console-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  /* hidden (not just transparent) when closed, so its buttons can't catch
     clicks meant for the room; visibility flips after the fade-out */
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
  z-index: 5;
  font-family: "Londrina Solid", system-ui, sans-serif;
}
.console-layer.is-on {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* One box per screen. --u is 1% of that screen's width, so every size
   below scales with the artwork instead of with the viewport. */
.cscreen {
  position: absolute;
  display: flex;
  overflow: hidden;
  box-sizing: border-box;
  color: #0c3b3f;
  text-align: center;
}

/* ---- the four small screens: channel pickers ---- */

.cscreen.is-thumb {
  pointer-events: auto;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: calc(var(--u) * 6);
  border: 0;
  background: transparent;
  border-radius: calc(var(--u) * 8);
  transition: filter 0.12s ease;
  font: inherit;
}
/* Sized so the longest label ("Parent Dashboard") keeps clear of the
   bezel on the shortest monitor; overflow-wrap is the backstop. */
.cscreen.is-thumb .thumb-label {
  font-size: calc(var(--u) * 14);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
/* Icon monitors (e.g. Settings). The icon fills the whole box and is
   then mapped onto the glass quad by console.js (fitIcon), so padding
   here would fight that -- the inset comes from ICON_FILL instead. */
.cscreen.is-thumb.has-icon {
  padding: 0;
}
.cscreen.is-thumb .thumb-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  -webkit-user-drag: none;
  user-select: none;
}

.cscreen.is-thumb:hover,
.cscreen.is-thumb:focus-visible {
  filter: brightness(1.12);
  outline: none;
}
/* the monitor that's showing on the big screen: its glass glows green
   (clipped to the glass in console.js), icon still on top */
.cscreen.is-thumb.is-active {
  background: radial-gradient(ellipse at 50% 45%, #c8ffb0 0%, #8ff27a 55%, #5fd55a 100%);
  box-shadow: inset 0 0 calc(var(--u) * 10) rgba(40, 140, 50, 0.55);
}

/* ---- the big screen: the channel itself ---- */

.cscreen.is-main {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Top inset keeps content clear of the ultrawide crop line. */
  padding: calc(var(--u) * 5) calc(var(--u) * 6) calc(var(--u) * 4);
  gap: calc(var(--u) * 2.5);
}

.cscreen.is-main .ch-title {
  font-size: calc(var(--u) * 11);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.cscreen.is-main .ch-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 5);
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.ch-stat {
  background: rgba(146, 232, 113, 0.92);
  border-radius: calc(var(--u) * 4);
  padding: calc(var(--u) * 3.5) calc(var(--u) * 5);
}
.ch-stat .ch-stat-label {
  display: block;
  font-size: calc(var(--u) * 6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}
.ch-stat .ch-stat-value {
  display: block;
  font-size: calc(var(--u) * 13);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

/* The juice meter art on the main screen. */
.ch-meter {
  height: calc(var(--u) * 36);
  width: auto;
  flex: 0 0 auto;
}

.ch-action {
  pointer-events: auto;
  cursor: pointer;
  font: inherit;
  font-size: calc(var(--u) * 6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0c3b3f;
  background: rgba(190, 240, 150, 0.95);
  border: 0;
  border-radius: calc(var(--u) * 2.5);
  padding: calc(var(--u) * 2) calc(var(--u) * 5);
  text-decoration: none;
  align-self: flex-end;
}
.ch-action:hover,
.ch-action:focus-visible {
  background: #fff;
  outline: none;
}

/* An embedded page (the thumbnail vote) filling the glass. console.js
   scales the fixed-size frame to fit and centres it. */
.ch-frame-wrap {
  position: absolute;
  inset: calc(var(--u) * 1.2);
  overflow: hidden;
  border-radius: calc(var(--u) * 1.5);
  pointer-events: auto;
}
.ch-frame {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  transform-origin: 0 0;
  background: #b8f0f2;
}

/* Settings menu: one big button per sub-screen. */
.ch-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: calc(var(--u) * 2.5);
  flex: 1 1 auto;
  width: 60%;
}
.ch-menu .ch-action {
  align-self: auto;
  font-size: calc(var(--u) * 6.5);
  line-height: 1.05;
  padding: calc(var(--u) * 2.4) calc(var(--u) * 6);
}

.ch-note {
  font-size: calc(var(--u) * 4.6);
  opacity: 0.72;
  letter-spacing: 0.03em;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .console-layer,
  .cscreen.is-thumb {
    transition: none;
  }
}

/* ---- powered down (see power.js): trivia, small monitors off ---- */
.console-layer.is-dark .cscreen.is-thumb {
  display: none;
}
.console-layer.is-dark .cscreen.is-main {
  gap: calc(var(--u) * 1.8);
  padding-top: calc(var(--u) * 4);
  padding-bottom: calc(var(--u) * 3);
}
.console-layer.is-dark .ch-title {
  font-size: calc(var(--u) * 7.5);
}
.console-layer.is-dark .ch-note {
  font-size: calc(var(--u) * 4);
}
.tv-q {
  margin: 0;
  font-size: calc(var(--u) * 7.5);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.tv-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr; /* every row as tall as the tallest: equal buttons */
  gap: calc(var(--u) * 2) calc(var(--u) * 2.5);
  width: calc(var(--u) * 80);
}
.tv-answers .tv-answer {
  align-self: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--u) * 6);
  line-height: 1.05;
  padding: calc(var(--u) * 1.2) calc(var(--u) * 4);
}
.tv-answers .tv-answer.is-wrong {
  background: rgba(240, 150, 150, 0.85);
  text-decoration: line-through;
  cursor: default;
  opacity: 0.7;
}

/* ---- the monitor icons in the room view (see console.js ROOM_GLASS) ---- */
.room-icons {
  position: absolute;
  inset: 0;
  z-index: 3; /* above the canvas, under power.js's dark (4) */
  pointer-events: none;
  overflow: hidden;
}
/* Ethan redrawn over the room layer (console.js window.__roomTop) */
.room-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
/* Ethan redrawn over close-up screens/boards (console.js window.__cuTop) */
.cu-top {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}
.room-glass,
.room-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  transform-origin: 0 0;
}
.room-icon {
  object-fit: fill;
}

/* powered-down status readout and the start button */
.tv-status {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 2.5);
  font-size: calc(var(--u) * 5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}
.tv-dot {
  width: calc(var(--u) * 3);
  height: calc(var(--u) * 3);
  border-radius: 50%;
  background: #e8423c;
  box-shadow: 0 0 calc(var(--u) * 2) #ff5a4f;
  animation: tv-blink 1.1s steps(2, start) infinite;
}
.tv-dot.is-on {
  background: #7ee64a;
  box-shadow: 0 0 calc(var(--u) * 2) #9dff6a;
  animation: none;
}
@keyframes tv-blink {
  to { visibility: hidden; }
}
.tv-bar {
  position: relative;
  width: calc(var(--u) * 34);
  height: calc(var(--u) * 4.5);
  border-radius: calc(var(--u) * 2.5);
  background: rgba(12, 59, 63, 0.25);
  box-shadow: inset 0 0 0 calc(var(--u) * 0.6) rgba(12, 59, 63, 0.6);
  overflow: hidden;
}
.tv-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #6fd83a, #b8f562);
  transition: width 0.35s ease-out;
}
/* "Checking power cells": a light sweeping back and forth in the bar */
.tv-status.is-scanning .tv-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 90, 0.9), transparent);
  animation: tv-scan 1.1s ease-in-out infinite alternate;
}
.tv-status.is-scanning .tv-dot {
  background: #f2b632;
  box-shadow: 0 0 calc(var(--u) * 2) #ffcf4a;
}
@keyframes tv-scan {
  from { left: -10%; }
  to { left: 80%; }
}

/* staggered entrances: each piece waits --d, then fades up */
.tv-in {
  opacity: 0;
  animation: tv-rise 0.55s ease-out both; /* both: hidden through its delay */
  animation-delay: var(--d, 0s);
}
@keyframes tv-rise {
  from { opacity: 0; transform: translateY(calc(var(--u) * 1.5)); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-in { animation-duration: 0.01s; }
  .tv-status.is-scanning .tv-bar::after { animation: none; left: 35%; }
}
.cscreen.is-main .tv-go {
  align-self: center;
  font-size: calc(var(--u) * 7);
  padding: calc(var(--u) * 2.5) calc(var(--u) * 7);
  margin-top: calc(var(--u) * 2);
}
@media (prefers-reduced-motion: reduce) {
  .tv-dot { animation: none; }
}

/* Carrot's alert: on the console's main screen ... */
.ca-title { display: flex; align-items: center; gap: calc(var(--u) * 2); }
.ca-bang {
  display: inline-grid;
  place-items: center;
  width: calc(var(--u) * 7.5);
  height: calc(var(--u) * 7.5);
  border-radius: 50%;
  background: #e8423c;
  color: #fff;
  font-size: calc(var(--u) * 7);
  animation: ca-blink 1.2s ease-in-out infinite;
}
.ca-text { margin: 0; font-size: calc(var(--u) * 5.5); line-height: 1.2; text-wrap: balance; }
.ca-text b { color: #b3261e; }
@keyframes ca-blink { 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .ca-bang, .room-icon.is-blinking, .is-blinking .thumb-icon { animation: none; }
}

/* The alerts monitor: blinks while unread; dimmed when there's nothing. */
.room-icon.is-blinking,
.cscreen.is-thumb.is-blinking .thumb-icon {
  animation: ca-blink 1s ease-in-out infinite;
}
.cscreen.is-thumb.is-quiet .thumb-icon {
  opacity: 0.35;
  filter: grayscale(1);
}

/* "! ALERT" blinking on the main screen in the room view */
.room-alert {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  transform-origin: 0 0;
  display: grid;
  place-items: center;
}
.room-alert-in {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b3261e;
  animation: ca-blink 1s steps(2, jump-none) infinite;
}
.room-alert-bang {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8423c;
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .room-alert-in { animation: none; }
}

/* "How to earn": one line of copy, no amounts (each activity sets its own) */
.ch-stat.ch-howto span {
  display: block;
  font-size: calc(var(--u) * 7.5);
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}
.ch-stat.ch-howto {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3.5);
  text-align: left;
  padding: calc(var(--u) * 4) calc(var(--u) * 6);
}
.ch-drop {
  height: calc(var(--u) * 17);
  width: auto;
  flex: 0 0 auto;
}

/* Reset lab (Settings) */
.ch-action.ch-reset {
  background: rgba(240, 160, 150, 0.95);
}
.ch-menu.ch-confirm {
  flex-direction: row;
  flex: 0 0 auto;
  gap: calc(var(--u) * 3);
  width: auto;
}
.ch-menu.ch-confirm .ch-action {
  font-size: calc(var(--u) * 6);
  padding: calc(var(--u) * 2.5) calc(var(--u) * 5);
}

/* The alarm light by the door (console.js ALARM). The lit glass sits
   behind the painted cage bars and fades in and out slowly; a soft red
   glow spills onto the wall. Gentle on purpose: a nudge, not a siren. */
.room-alarm {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.room-alarm-lit {
  position: absolute;
  animation: alarm-pulse 2.4s ease-in-out infinite;
}
.room-alarm-wash {
  position: absolute;
  width: calc(var(--r) * 22);
  height: calc(var(--r) * 22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 50, 35, 0.44) 0%, rgba(255, 40, 25, 0.16) 35%, rgba(255, 30, 20, 0) 70%);
  mix-blend-mode: screen;
  animation: alarm-pulse 2.4s ease-in-out infinite;
}
@keyframes alarm-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .room-alarm-lit, .room-alarm-wash { animation: none; opacity: 0.8; }
}

/* Carrot's alert, visual (console.js renderAlerts) */
.ca-vis {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 6);
}
.ca-bot {
  position: relative;
  height: calc(var(--u) * 34);
}
.ca-bot img {
  height: 100%;
  width: auto;
  filter: saturate(0.55) brightness(0.9);
}
.ca-off {
  position: absolute;
  right: calc(var(--u) * -1);
  top: calc(var(--u) * 2);
  width: calc(var(--u) * 7.5);
  height: calc(var(--u) * 7.5);
  border-radius: 50%;
  background: #e8423c;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 calc(var(--u) * 0.8) #fff;
}
.ca-off svg {
  width: 62%;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}
.ca-tank {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(var(--u) * 3);
  width: calc(var(--u) * 38);
}
.ca-need {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.6);
  color: #0c3b3f;
}
.ca-need img {
  height: calc(var(--u) * 12);
  width: auto;
}
.ca-need b {
  font-size: calc(var(--u) * 13);
  line-height: 1;
}
.ca-need span {
  font-size: calc(var(--u) * 5.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}
.ca-bar {
  position: relative;
  height: calc(var(--u) * 5);
  border-radius: calc(var(--u) * 3);
  background: rgba(12, 59, 63, 0.22);
  box-shadow: inset 0 0 0 calc(var(--u) * 0.6) rgba(12, 59, 63, 0.55);
  overflow: hidden;
}
.ca-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: calc(var(--u) * 2);
  background: linear-gradient(90deg, #6fd83a, #b8f562);
}
.ca-tank .ch-action {
  align-self: center;
}
.ch-title.ca-title {
  font-size: calc(var(--u) * 8);
  white-space: nowrap;
}
.ca-need span,
.ca-tank .ch-action {
  white-space: nowrap;
}
.ca-tank { width: calc(var(--u) * 44); }
.ca-tank .ch-action { font-size: calc(var(--u) * 5); }

/* -- alert tweaks: empty bar at 0, power glyph on his face, one fraction -- */
.ca-bar i { min-width: 0; }
.ca-off {
  /* sits on Carrot's dark face screen (carrot.js SCREEN: 168,74 144x120 of 472x617) */
  left: 35.6%;
  top: 12%;
  right: auto;
  width: 30.5%;
  height: 19.4%;
  border-radius: 18%;
  background: transparent;
  box-shadow: none;
}
.ca-off svg {
  width: 55%;
  stroke: #ff4b3e;
  stroke-width: 2.6;
  filter: drop-shadow(0 0 calc(var(--u) * 0.8) rgba(255, 60, 50, 0.8));
}
.ca-need { gap: calc(var(--u) * 2.2); }
.ca-frac {
  display: inline-flex;
  align-items: baseline;
  color: #0c3b3f;
  line-height: 1;
}
.ca-frac b { font-size: calc(var(--u) * 13); }
.ca-frac i {
  font-style: normal;
  font-size: calc(var(--u) * 13);
  opacity: 1;
}
.ca-frac small {
  font-size: calc(var(--u) * 5);
  margin-left: calc(var(--u) * 1.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -- Carrot's power switch (console.js renderAlerts / wakeCarrot) -- */
.ca-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 2);
}
.ca-bot { height: calc(var(--u) * 28); }
.ca-bot.is-on img,
.ca-bot.is-waking img { filter: none; }
.ca-bot.is-waking img { animation: ca-flicker 0.12s steps(2, end) 8; }
@keyframes ca-flicker { 50% { opacity: 0.5; } }
.ca-switch {
  position: relative;
  width: calc(var(--u) * 26);
  height: calc(var(--u) * 11);
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: #3a1416;
  box-shadow: inset 0 0 0 calc(var(--u) * 0.7) rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
  transition: background 0.35s ease;
}
.ca-switch:disabled { cursor: default; }
.ca-switch:not(.is-ready):not(.is-on) { opacity: 0.55; }
.ca-knob {
  position: absolute;
  top: 50%;
  left: calc(var(--u) * 1);
  width: calc(var(--u) * 9.5);
  height: calc(var(--u) * 9.5);
  transform: translateY(-50%);
  border-radius: 50%;
  background: #e8423c;
  box-shadow: 0 0 0 calc(var(--u) * 0.7) #fff, 0 calc(var(--u) * 0.6) calc(var(--u) * 1.4) rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transition: left 0.35s cubic-bezier(0.3, 1.4, 0.6, 1), background 0.35s ease;
}
.ca-knob svg {
  width: 60%;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}
.ca-sw-label {
  position: absolute;
  top: 50%;
  right: calc(var(--u) * 3.2);
  transform: translateY(-50%);
  font-size: calc(var(--u) * 4.6);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}
.ca-switch.is-ready {
  background: #5a1a1d;
  animation: ca-ready 1.6s ease-in-out infinite;
}
@keyframes ca-ready {
  50% { box-shadow: 0 0 0 calc(var(--u) * 1) rgba(255, 220, 90, 0.7), 0 0 calc(var(--u) * 4) rgba(255, 220, 90, 0.6); }
}
.ca-switch.is-on { background: #2f7d2a; animation: none; }
.ca-switch.is-on .ca-knob { left: calc(100% - var(--u) * 10.5); background: #57c93a; }
.ca-switch.is-on .ca-sw-label { right: auto; left: calc(var(--u) * 3.5); color: #fff; }
.ca-done {
  margin: 0;
  text-align: center;
  font-size: calc(var(--u) * 4.8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2f7d2a;
}
@media (prefers-reduced-motion: reduce) {
  .ca-switch.is-ready, .ca-bot.is-waking img { animation: none; }
}

/* -- not enough juice: show it (console.js notEnough) -- */
.ca-switch:not(.is-ready):not(.is-on) { opacity: 1; }
.ca-hint {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.4);
  font-size: calc(var(--u) * 4.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0c3b3f;
  opacity: 0;
  transform: translateY(calc(var(--u) * 1.5));
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ca-hint img { height: calc(var(--u) * 6); width: auto; }
.is-short .ca-hint { opacity: 1; transform: none; }
.is-short .ca-knob { animation: ca-tryflip 0.6s ease; }
.is-short .ca-bar { animation: ca-empty 0.6s ease 0.55s 2; } /* after the knob snaps back */
@keyframes ca-tryflip {
  0%, 100% { left: calc(var(--u) * 1); }
  35% { left: calc(var(--u) * 7); }
}
@keyframes ca-empty {
  0%, 100% { transform: none; box-shadow: inset 0 0 0 calc(var(--u) * 0.6) rgba(12, 59, 63, 0.55); }
  25% { transform: translateX(calc(var(--u) * -1)); }
  50% { box-shadow: inset 0 0 0 calc(var(--u) * 0.6) #e8423c, 0 0 calc(var(--u) * 2) rgba(232, 66, 60, 0.6); }
  75% { transform: translateX(calc(var(--u) * 1)); }
}
@media (prefers-reduced-motion: reduce) {
  .is-short .ca-knob, .is-short .ca-bar { animation: none; }
}
/* three columns: Carrot | juice tank | power switch */
.ca-vis { gap: calc(var(--u) * 4); }
.ca-tank { width: calc(var(--u) * 38); }
.ca-switch { flex: 0 0 auto; }
.ca-vis { gap: calc(var(--u) * 3); }
.ca-tank { width: calc(var(--u) * 34); }
.ca-bot { flex: 0 0 auto; }
.ca-switch { width: calc(var(--u) * 23); }
.ca-switch.is-on .ca-knob { left: calc(100% - var(--u) * 10.5); }
.ca-tank { width: calc(var(--u) * 36); }
.ca-hint { white-space: nowrap; }
.ca-vis { padding: 0 calc(var(--u) * 2); }
.ca-tank { width: auto; flex: 1 1 auto; min-width: 0; }
.ca-frac b, .ca-frac i { font-size: calc(var(--u) * 10.5); }
.ca-need img { height: calc(var(--u) * 10); }
.ca-need { justify-content: flex-start; }
.ca-vis { padding: 0; gap: calc(var(--u) * 2.5); width: 100%; }
.ca-bot { height: calc(var(--u) * 25); }
.ca-switch { width: calc(var(--u) * 21); height: calc(var(--u) * 10); }
.ca-knob { width: calc(var(--u) * 8.5); height: calc(var(--u) * 8.5); }
.ca-switch.is-on .ca-knob { left: calc(100% - var(--u) * 9.5); }
.ca-sw-label { right: calc(var(--u) * 2.4); font-size: calc(var(--u) * 4.2); }

/* ---- side monitors while dark (console.js skins): off, static, on ----
   They sit above the canvas's dark, so "off" is drawn dark here: switched-
   off CRT glass with a faint reflection. Powering up: static (dim), a
   flicker on (dim), then pw-lit warms them to full over the same time the
   console's dark lifts (power.js lightConsole). */
.cscreen.is-skin {
  display: none;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,0) 30%, rgba(170,200,215,0.07) 38%, rgba(255,255,255,0) 46%),
    radial-gradient(ellipse at 45% 40%, #1d2329 0%, #12161a 70%, #0b0d10 100%);
}
.console-layer.is-dark .cscreen.is-skin {
  display: block;
}
.skin-static {
  position: absolute;
  inset: -40%;
  opacity: 0;
  background: #888 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='1.8' intercept='-0.35'/%3E%3CfeFuncG type='linear' slope='1.8' intercept='-0.35'/%3E%3CfeFuncB type='linear' slope='1.8' intercept='-0.35'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  animation: skin-noise 0.24s steps(1) infinite;
}
.console-layer.is-dark.pw-static .skin-static {
  opacity: 0.4; /* a faint snow in the dark, not a bright patch */
}
.console-layer.is-dark.pw-on .cscreen.is-skin {
  background: radial-gradient(ellipse at 50% 45%, #b8ffff 0%, #84fffe 60%, #5fe3e8 100%);
  filter: brightness(0.4);
}
.console-layer.is-dark.pw-on .skin-static {
  opacity: 0;
}
.console-layer.is-dark.pw-on .cscreen.is-thumb {
  display: flex;
  pointer-events: none;
  filter: brightness(0.4);
}
.console-layer.is-dark.pw-on.pw-lit .cscreen.is-skin,
.console-layer.is-dark.pw-on.pw-lit .cscreen.is-thumb {
  filter: brightness(1);
  transition: filter 1.3s ease-out;
}
@keyframes skin-noise {
  0% { transform: translate(0, 0); filter: brightness(1); }
  25% { transform: translate(-17%, 9%); filter: brightness(1.25); }
  50% { transform: translate(11%, -13%); filter: brightness(0.85); }
  75% { transform: translate(-7%, -19%); filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .skin-static { animation: none; }
}

/* Explore: leave the console to go earn juice */
.ca-explore {
  align-self: flex-end; /* right side, clear of Ethan's head at bottom centre */
  margin-right: calc(var(--u) * 4);
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 1.4);
  font-size: calc(var(--u) * 5.2);
  padding: calc(var(--u) * 1.6) calc(var(--u) * 5) calc(var(--u) * 1.6) calc(var(--u) * 3.5);
  pointer-events: auto;
}
.ca-explore img { height: calc(var(--u) * 5.5); width: auto; }

/* the ready switch rises in, then starts its glow */
.ca-switch.is-ready.tv-in {
  animation: tv-rise 0.55s ease-out var(--d, 0s) both, ca-ready 1.6s ease-in-out calc(var(--d, 0s) + 0.6s) infinite;
}

/* Carrot's checklist (console.js renderTasks, onboard.js) */
.ca-tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: calc(var(--u) * 2.5);
}
.ca-tasks li {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.2);
  padding: calc(var(--u) * 1) calc(var(--u) * 2.2) calc(var(--u) * 1) calc(var(--u) * 1.2);
  border-radius: 999px;
  background: rgba(12, 59, 63, 0.1);
  font-size: calc(var(--u) * 3.6);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ca-tasks i { font-style: normal; color: #3c8f1f; }
.ca-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--u) * 4.2);
  height: calc(var(--u) * 4.2);
  border-radius: 50%;
  border: calc(var(--u) * 0.5) solid #0c3b3f;
  font-size: calc(var(--u) * 3.2);
  line-height: 1;
}
.ca-tasks li.is-done { background: #b8f28a; }
.ca-tasks li.is-done .ca-check { background: #3c8f1f; border-color: #3c8f1f; color: #fff; }

/* Settings > Choose avatar */
.av-pick { display: flex; gap: calc(var(--u) * 4); justify-content: center; }
.av-card {
  font: inherit;
  width: calc(var(--u) * 24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 1);
  padding: calc(var(--u) * 1.6) calc(var(--u) * 1.6) calc(var(--u) * 1.2);
  border: calc(var(--u) * 0.6) solid #0c3b3f;
  border-radius: calc(var(--u) * 2.4);
  background: rgba(255, 255, 255, 0.55);
  color: #0c3b3f;
  cursor: pointer;
  pointer-events: auto;
}
.av-card img { height: calc(var(--u) * 28); width: auto; }
.av-card span { font-size: calc(var(--u) * 4.4); letter-spacing: 0.04em; text-transform: uppercase; }
.av-card:hover, .av-card:focus-visible { background: #fff; outline: none; }
.av-card.is-on { background: #b8f28a; box-shadow: 0 0 0 calc(var(--u) * 0.8) #f5b72b; }
.cscreen.is-main:has(.av-pick) { justify-content: flex-start; }

/* Settings: four buttons as a 2 x 2 grid, kept in the top of the glass
   (Ethan's head covers the bottom middle) */
.cscreen.is-main:has(.ch-menu.is-grid) { justify-content: flex-start; }
.ch-menu.is-grid {
  flex: 0 0 auto;
  width: 82%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: calc(var(--u) * 2.4);
}
.ch-menu.is-grid .ch-action {
  font-size: calc(var(--u) * 5.2);
  padding: calc(var(--u) * 2.2) calc(var(--u) * 3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings > Choose character: both kids' headshots on the button */
.ch-menu.is-grid .ch-chars { flex-direction: row; gap: calc(var(--u) * 1.4); padding: calc(var(--u) * 1.2) calc(var(--u) * 2); text-align: left; }
.ch-heads { display: flex; justify-content: center; flex: 0 0 auto; }
.ch-heads img {
  width: calc(var(--u) * 7.5);
  height: calc(var(--u) * 7.5);
  border-radius: 50%;
  background: #84fffe;
  border: calc(var(--u) * 0.5) solid #0c3b3f;
  object-fit: cover;
}
.ch-heads img + img { margin-left: calc(var(--u) * -1.6); }
.ch-menu.is-grid .ch-chars { font-size: calc(var(--u) * 4.4); padding: calc(var(--u) * 1.2) calc(var(--u) * 1.4); gap: calc(var(--u) * 1); }
.ch-chars .ch-heads img { width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); }
.ch-chars .ch-heads img + img { margin-left: calc(var(--u) * -1.8); }

/* Knowledge Juice screen: the room's tank, filled to the same level
   (console.js tankHTML; --lv 0..1) */
.ch-tank {
  position: relative;
  flex: 0 0 auto;
  height: calc(var(--u) * 40);
  aspect-ratio: 297 / 840;
}
.ch-tank img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* tank with its base: shorter, so it sits under the heading */
.ch-tank { height: calc(var(--u) * 33); aspect-ratio: 301 / 889; align-self: center; }
/* new standalone tank art (empty + full, stacked) */
.ch-tank { aspect-ratio: 215 / 740; height: calc(var(--u) * 36); }
.ch-tank { height: calc(var(--u) * 33); margin-top: calc(var(--u) * 2.5); }
.ch-tank-juice { position: absolute; display: block; }
.ch-tank-juice { left: 0; top: 0; width: 100%; height: 100%; }
.tv-status.is-small { margin-bottom: calc(var(--u) * 1); }

/* ---- the waiting message (console.js ENVELOPE_SVG) ---- */
.tv-letter {
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
  width: calc(var(--u) * 34);
  filter: drop-shadow(0 0 calc(var(--u) * 3) rgba(255, 255, 255, 0.85));
  animation: env-bob 1.8s ease-in-out infinite;
}
.tv-letter.tv-in { animation: tv-rise 0.55s ease-out var(--d, 0s) both, env-bob 1.8s ease-in-out calc(var(--d, 0s) + 0.6s) infinite; }
.tv-letter:hover, .tv-letter:focus-visible { outline: none; filter: drop-shadow(0 0 calc(var(--u) * 4) #fff); }
.env { width: 100%; height: auto; display: block; overflow: visible; }
/* opening: the front flap folds up to its crease, then carries on as the
   back flap (drawn behind the note), so the note slides out in front of it */
.env-flap { transform-origin: 60px 34px; transition: transform 0.22s ease-in; }
.env-flap-back { transform-origin: 60px 34px; transform: scaleY(0); transition: transform 0.23s ease-out 0.22s; }
.env-paper { opacity: 0; transform: translateY(20px); transition: transform 0.5s ease-out 0.4s, opacity 0.15s linear 0.4s; } /* sealed: hidden inside */
.tv-letter.is-opening .env-paper { opacity: 1; }
.tv-letter.is-opening { animation: none; }
.tv-letter.is-opening .env-flap { transform: scaleY(0); }
.tv-letter.is-opening .env-flap-back { transform: scaleY(-1); }
.tv-letter.is-opening .env-paper { transform: translateY(-34px); }
.tv-letter-note {
  margin: calc(var(--u) * 2) 0 0;
  font-size: calc(var(--u) * 4.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@keyframes env-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(var(--u) * -2)); }
}
/* room view: on the main screen's glass, mapped like the alert text */
.room-letter {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  transform-origin: 0 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.room-letter-in { width: 58px; animation: env-bob-room 1.8s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); }
/* the 100x100 box is mapped onto the glass, which is 1.49x wider than tall
   (MAIN_GLASS in console.js) -- squeeze the envelope back so it keeps its shape */
.room-letter-in .env { display: block; width: 100%; height: auto; transform: scaleX(0.669); }
@keyframes env-bob-room {
  0%, 100% { transform: translateY(2px); }
  50% { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .tv-letter, .room-letter-in { animation: none; }
}

/* ---- missions as power cells (console.js missionCells) ---- */
.mc-cells { display: flex; gap: calc(var(--u) * 3.5); justify-content: center; margin: calc(var(--u) * 1) 0; }
.mc-cell { display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 0.6); width: calc(var(--u) * 17); }
.mc-icon { height: calc(var(--u) * 6); display: flex; align-items: center; }
.mc-icon img { height: 100%; width: auto; }
.mc-icon svg { height: 100%; fill: none; stroke: #0c3b3f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mc-bat {
  position: relative;
  width: calc(var(--u) * 8);
  height: calc(var(--u) * 12);
  border: calc(var(--u) * 0.6) solid #0c3b3f;
  border-radius: calc(var(--u) * 1.2);
  background: rgba(12, 59, 63, 0.08);
  overflow: hidden;
}
.mc-bat::before { content: ""; position: absolute; left: 30%; right: 30%; top: calc(var(--u) * -0.1); height: calc(var(--u) * 0.6); background: #0c3b3f; }
.mc-bat i { position: absolute; left: 0; right: 0; bottom: 0; background: #e8423c; transition: height 0.6s ease; }
.mc-cell.is-full .mc-bat i { background: #62ba34; }
.mc-cell.is-now .mc-bat i { background: #f5b72b; }
.mc-cell.is-now .mc-bat { animation: mc-pulse 1.4s ease-in-out infinite; }
.mc-name { font-size: calc(var(--u) * 3.2); letter-spacing: 0.04em; text-transform: uppercase; }
.mc-st { font-size: calc(var(--u) * 2.6); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }
.mc-cell.is-low .mc-st { color: #b3261e; opacity: 1; }
.mc-cell.is-full .mc-st { color: #2f7d2a; opacity: 1; }
.mc-mission { margin: calc(var(--u) * 1) 0 0; font-size: calc(var(--u) * 4.6); letter-spacing: 0.03em; text-transform: uppercase; }
.mc-task { margin: 0; font-size: calc(var(--u) * 3.4); max-width: 80%; text-align: center; line-height: 1.15; }
.cscreen.is-main .mc-title { font-size: calc(var(--u) * 7); }
.cscreen.is-main .mc-go { font-size: calc(var(--u) * 4.4); padding: calc(var(--u) * 1.4) calc(var(--u) * 4); }
@keyframes mc-pulse { 50% { box-shadow: 0 0 0 calc(var(--u) * 0.8) rgba(245, 183, 43, 0.6); } }
@media (prefers-reduced-motion: reduce) { .mc-cell.is-now .mc-bat { animation: none; } }

/* ---- missions: a cell opened (console.js missionBoard) ---- */
.mc-cell { font: inherit; color: inherit; background: none; border: 0; padding: calc(var(--u) * 0.6); border-radius: calc(var(--u) * 2); cursor: pointer; pointer-events: auto; }
.mc-cell:hover, .mc-cell:focus-visible { background: rgba(12, 59, 63, 0.08); outline: none; }
.mc-hint { margin: calc(var(--u) * 0.6) 0 0; font-size: calc(var(--u) * 3); letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.65; }
.mc-open {
  position: relative;
  width: 100%;
  height: calc(var(--u) * 52);
  display: grid;
  grid-template-columns: calc(var(--u) * 20) 1fr calc(var(--u) * 12);
  grid-template-rows: auto 1fr;
  column-gap: calc(var(--u) * 3);
  align-items: start;
}
.mc-back { position: absolute; left: calc(var(--u) * -1); top: calc(var(--u) * -1); }
.cscreen.is-main .mc-otitle { grid-column: 1 / -1; margin: 0 0 calc(var(--u) * 2.4); font-size: calc(var(--u) * 6); text-align: center; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 0.4); }
.mc-otitle span { font-size: calc(var(--u) * 3); letter-spacing: 0.1em; opacity: 0.7; }
.mc-main { display: flex; justify-content: center; }
.mc-cell.is-big { width: calc(var(--u) * 20); }
.mc-cell.is-big .mc-bat { width: calc(var(--u) * 11); height: calc(var(--u) * 17); }
.mc-cell.is-big .mc-icon { height: calc(var(--u) * 8); }
.mc-side { display: flex; flex-direction: column; gap: calc(var(--u) * 1.6); align-items: center; }
.mc-cell.is-mini { width: calc(var(--u) * 12); gap: calc(var(--u) * 0.3); opacity: 0.8; }
.mc-cell.is-mini .mc-icon { height: calc(var(--u) * 3.6); }
.mc-cell.is-mini .mc-bat { width: calc(var(--u) * 5); height: calc(var(--u) * 7); border-width: calc(var(--u) * 0.45); }
.mc-cell.is-mini .mc-name { font-size: calc(var(--u) * 2.4); }
.mc-cell.is-mini .mc-st { display: none; }
.mc-body { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 1.6); }
.mc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 1); text-align: left; }
.mc-steps li {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.4);
  font-size: calc(var(--u) * 3.3);
  line-height: 1.1;
  opacity: 0;
  animation: mc-step 0.4s ease-out calc(0.25s + var(--k) * 0.08s) forwards;
}
.mc-tick {
  flex: 0 0 auto;
  width: calc(var(--u) * 4.6);
  height: calc(var(--u) * 4.6);
  border-radius: 50%;
  border: calc(var(--u) * 0.45) solid #0c3b3f;
  display: grid;
  place-items: center;
  font-size: calc(var(--u) * 2.6);
}
.mc-steps li.is-done { opacity: 0.6; }
.mc-steps li.is-done .mc-tick { background: #62ba34; border-color: #62ba34; color: #fff; }
.mc-steps.is-locked li { filter: grayscale(1); }
.mc-locked { margin: 0; font-size: calc(var(--u) * 3); letter-spacing: 0.05em; text-transform: uppercase; color: #b3261e; }
.mc-body .mc-go { align-self: flex-start; }
@keyframes mc-step { from { opacity: 0; transform: translateX(calc(var(--u) * 2)); } to { opacity: 1; transform: none; } }
.mc-steps li.is-done { animation-name: mc-step-done; }
@keyframes mc-step-done { from { opacity: 0; transform: translateX(calc(var(--u) * 2)); } to { opacity: 0.6; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mc-steps li { animation-duration: 0.01s; animation-delay: 0s; } }

/* ---- missions, mockup layout ---- */
.mc-cells { gap: calc(var(--u) * 6); margin-top: calc(var(--u) * 2); }
.mc-cell { gap: calc(var(--u) * 1); }
.mc-cell .mc-bat { width: calc(var(--u) * 8.5); height: calc(var(--u) * 12.5); }
.mc-name { font-size: calc(var(--u) * 3.8); }
.mc-switch {
  position: relative;
  width: calc(var(--u) * 6.5);
  height: calc(var(--u) * 11);
  border-radius: 999px;
  background: #0f2a2c;
  margin-top: calc(var(--u) * 0.6);
}
.mc-switch i {
  position: absolute;
  left: 50%;
  bottom: calc(var(--u) * 0.5);
  width: calc(var(--u) * 5.6);
  height: calc(var(--u) * 5.6);
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  border: calc(var(--u) * 0.4) solid #0f2a2c;
  display: grid;
  place-items: center;
  transition: bottom 0.3s ease;
}
.mc-switch svg { width: 62%; height: 62%; fill: none; stroke: #0f2a2c; stroke-width: 3; stroke-linecap: round; }
.mc-switch.is-on { background: #2f7d2a; }
.mc-switch.is-on i { bottom: calc(100% - var(--u) * 6.1); }
.mc-cell:hover .mc-switch i { box-shadow: 0 0 0 calc(var(--u) * 0.6) rgba(255, 255, 255, 0.5); }
.cscreen.is-main .mc-otitle { font-size: calc(var(--u) * 6.2); margin: 0 0 calc(var(--u) * 1.6); }
.mc-cell.is-big { background: none; }
.mc-cell.is-big .mc-bat { box-shadow: 0 0 0 calc(var(--u) * 0.8) #e7d77a; }
.mc-cell.is-big .mc-bat i { background: #e8423c; }
.mc-open { grid-template-columns: calc(var(--u) * 16) 1fr calc(var(--u) * 11); height: auto; }
.mc-panel {
  width: 100%;
  box-sizing: border-box;
  padding: calc(var(--u) * 2.4) calc(var(--u) * 3);
  border-radius: calc(var(--u) * 2.4);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--u) * 1.6);
}
.mc-panel .tv-q { font-size: calc(var(--u) * 4.6); text-align: left; text-transform: none; line-height: 1.15; }
.mc-panel .tv-answers { width: 100%; gap: calc(var(--u) * 1.2); }
.mc-panel .tv-answer { font-size: calc(var(--u) * 3.2); padding: calc(var(--u) * 1.2) calc(var(--u) * 1.4); }
.mc-panel .ch-note { font-size: calc(var(--u) * 3); }
.mc-name { white-space: nowrap; }

/* Mission 1 reward: in the panel, while the big Lights cell charges */
.mc-panel .mc-correct { font-size: calc(var(--u) * 5.2); text-transform: uppercase; margin: 0; }
.mc-reward { display: flex; align-items: center; gap: calc(var(--u) * 3); margin: calc(var(--u) * 0.5) 0 calc(var(--u) * 1); }
.mc-reward img { height: calc(var(--u) * 15); width: auto; }
.mc-reward span { font-family: "Londrina Solid", system-ui, sans-serif; font-size: calc(var(--u) * 13); line-height: 1; color: #0c3b3f; }
.mc-cell.is-big.is-charging .mc-bat i { background: #f5b72b; transition: height 0.35s ease, background 0.3s ease; }
.mc-cell.is-big.is-charged .mc-bat i { background: #62ba34; }
.mc-cell.is-big.is-charging .mc-bat { animation: none; }

/* the power-up screen, copied onto the room's main screen (snapBoard) */
.room-board { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.room-board .cscreen { position: relative; }

/* Mission 2 panel: the tank, one line, Explore */
.mc-tankp { display: flex; align-items: center; gap: calc(var(--u) * 3); width: 100%; }
.mc-tankp img { height: calc(var(--u) * 26); width: auto; flex: 0 0 auto; }
.mc-tankp-txt { display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * 2.4); flex: 1; }
.mc-tankp-txt p { margin: 0; align-self: stretch; text-align: left; font-size: calc(var(--u) * 4.4); line-height: 1.2; }

.mc-carrotp img { height: calc(var(--u) * 22); }
.mc-carrotp img.is-waking { animation: mc-wake 1.2s ease-out; }
@keyframes mc-wake { 0% { filter: brightness(0.6); } 40% { filter: brightness(1.6); } 100% { filter: none; } }
.mc-panel .mc-go[disabled] { opacity: 0.55; cursor: default; }

/* side monitor tapped during a mission: the main screen blips */
.cscreen.is-main.is-blip { animation: mc-blip 0.5s ease-out; }
@keyframes mc-blip {
  0% { filter: brightness(1.6); transform: translateX(0); }
  20% { transform: translateX(calc(var(--u) * -1)); }
  40% { transform: translateX(calc(var(--u) * 1)); }
  60% { transform: translateX(calc(var(--u) * -0.6)); }
  100% { filter: none; transform: none; }
}
.cscreen.is-main.is-blip .mc-cell.is-big .mc-bat { animation: mc-pulse 0.5s ease-in-out 3; }
.mc-nudge {
  position: absolute;
  left: 50%;
  bottom: calc(var(--u) * 4);
  transform: translateX(-50%);
  margin: 0;
  padding: calc(var(--u) * 1.2) calc(var(--u) * 3.2);
  border-radius: 999px;
  background: #0c3b3f;
  color: #fff;
  font-family: "Londrina Solid", system-ui, sans-serif;
  font-size: calc(var(--u) * 3.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: mc-nudge 2.6s ease-out forwards;
}
@keyframes mc-nudge { 0% { opacity: 0; transform: translate(-50%, 30%); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cscreen.is-main.is-blip, .mc-nudge { animation: none; } }
.room-board { z-index: 3; }

/* Lights cell: one smooth green fill */
.mc-cell.is-big.is-charging .mc-bat i,
.mc-cell.is-big.is-charged .mc-bat i { background: #62ba34; transition: height 1.3s ease-in-out; }

/* Messages (top-left monitor) */
.msg-list { display: flex; flex-direction: column; gap: calc(var(--u) * 1.6); width: 80%; }
.msg-row {
  display: flex; align-items: center; gap: calc(var(--u) * 2.4);
  padding: calc(var(--u) * 1.6) calc(var(--u) * 2.4);
  border: 0; border-radius: calc(var(--u) * 2.2);
  background: rgba(255, 255, 255, 0.72); color: #0c3b3f; cursor: pointer;
  font-family: "Londrina Solid", system-ui, sans-serif; font-size: calc(var(--u) * 4.2); text-align: left;
  pointer-events: auto; /* the screen layer lets clicks through; the rows take them */
}
.msg-row:hover, .msg-row:focus-visible { background: #fff; outline: none; }
.msg-row span { flex: 1; }
.msg-row .msg-env { width: calc(var(--u) * 8); height: auto; }
.msg-row i { font-style: normal; font-size: calc(var(--u) * 3); padding: calc(var(--u) * 0.6) calc(var(--u) * 1.6); border-radius: 999px; background: #62ba34; color: #fff; text-transform: uppercase; }
.msg-title { font-size: calc(var(--u) * 7) !important; }
.msg-body { width: 80%; }
.msg-body p { margin: 0; font-size: calc(var(--u) * 4.4); line-height: 1.3; text-align: left; }
.cscreen.is-main > .mc-back { position: absolute; left: calc(var(--u) * 5); top: calc(var(--u) * 5); }
/* Choose character: one-line title, cards side by side above Ethan's head */
.cscreen.is-main:has(.av-pick) .ch-title { font-size: calc(var(--u) * 7); white-space: nowrap; margin-bottom: 0; }
.cscreen.is-main:has(.av-pick) .av-pick { gap: calc(var(--u) * 12); }
.cscreen.is-main:has(.av-pick) .av-card { width: calc(var(--u) * 23); }
.cscreen.is-main:has(.av-pick) .av-card img { height: calc(var(--u) * 26); }
.msg-row.is-empty { cursor: default; opacity: 0.85; }
.msg-row.is-empty:hover { background: rgba(255, 255, 255, 0.72); }

/* Carrot's welcome message (after the envelope, before the powered-down screen) */
.cw-msg { display: flex; align-items: center; gap: calc(var(--u) * 3); width: 94%; margin-top: calc(var(--u) * -4); }
.cw-carrot { height: calc(var(--u) * 34); width: auto; flex: 0 0 auto; filter: drop-shadow(0 calc(var(--u) * 0.6) calc(var(--u) * 1) rgba(0, 0, 0, 0.25)); }
.cw-bubble {
  position: relative; flex: 1; padding: calc(var(--u) * 2.6) calc(var(--u) * 3.2); border-radius: calc(var(--u) * 3);
  background: rgba(255, 255, 255, 0.8); color: #0c3b3f; text-align: left;
}
.cw-bubble::before {
  content: ""; position: absolute; left: calc(var(--u) * -2.2); top: 40%;
  border: calc(var(--u) * 1.4) solid transparent; border-right: calc(var(--u) * 1.8) solid rgba(255, 255, 255, 0.8); border-left: 0;
}
.cw-bubble p { margin: 0 0 calc(var(--u) * 1); font-size: calc(var(--u) * 3.3); line-height: 1.22; }
.cw-bubble b { font-weight: 900; }
.cw-hi { font-weight: 900; font-size: calc(var(--u) * 5.2) !important; text-transform: uppercase; letter-spacing: 0.03em; }
.cw-go { display: block; margin: calc(var(--u) * 0.6) 0 0 auto; }
/* the ways to earn: a 2x2 list with juice-drop bullets, so the hello isn't one block of text */
.cw-ways {
  display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 0.8) calc(var(--u) * 2.4);
  margin: 0 0 calc(var(--u) * 1.8); padding: 0; list-style: none;
}
.cw-ways li {
  display: flex; align-items: center; gap: calc(var(--u) * 1); font-size: calc(var(--u) * 3.1); line-height: 1.1;
}
.cw-ways li::before {
  content: ""; flex: 0 0 auto; width: calc(var(--u) * 2); height: calc(var(--u) * 2.6);
  background: url(assets/juice-drop.webp) center / contain no-repeat;
}
.cw-msg:not(.msg-from) .cw-hi { margin-bottom: calc(var(--u) * 1.8) !important; text-wrap: balance; }
.cw-msg:not(.msg-from) .cw-power { margin-top: calc(var(--u) * 1.8) !important; }
/* Carrot a bit smaller so the bubble is wide enough for the list */
.cw-msg:not(.msg-from) { width: 98%; gap: calc(var(--u) * 2.4); margin-top: 0; }
/* Carrot's welcome: the hello is the screen's title, on one line above him and the bubble */
.cw-title { white-space: nowrap; font-size: calc(var(--u) * 7) !important; margin-bottom: calc(var(--u) * 1.6) !important; }
.cw-msg:not(.msg-from) .cw-carrot { height: calc(var(--u) * 27); }
.cw-ways li { white-space: nowrap; }
/* smaller Let's Go, so the text has room */
.cw-msg:not(.msg-from) .cw-go { font-size: calc(var(--u) * 4); padding: calc(var(--u) * 1.2) calc(var(--u) * 3.6); margin-top: calc(var(--u) * 1.4); }
.cw-drop { height: 1.2em; width: auto; vertical-align: -0.2em; }
.cw-power { font-weight: 900; }
/* a message from someone (Grandma Gabby): her head instead of the envelope */
.msg-row .msg-face { width: calc(var(--u) * 9); }
.msg-row small { display: block; font-size: calc(var(--u) * 2.8); opacity: 0.7; letter-spacing: 0.02em; }
.msg-from { width: 84%; margin-top: 0; }
.msg-from .msg-pic { height: calc(var(--u) * 30); }
.msg-from .cw-bubble p { font-size: calc(var(--u) * 4.4); }
.msg-from .cw-hi { font-size: calc(var(--u) * 6) !important; }

/* Settings > Player tag (playertag.js) */
.ch-menu.is-grid .ch-tag { grid-column: 1 / -1; flex-direction: row; gap: calc(var(--u) * 1.6); padding: calc(var(--u) * 1.4) calc(var(--u) * 2.4); font-size: calc(var(--u) * 4.2); }
.ch-tag-label { font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.ch-tag b { font-weight: 900; }
.ch-tag-st { font-style: normal; font-size: 0.7em; padding: calc(var(--u) * 0.4) calc(var(--u) * 1.4); border-radius: 999px; background: rgba(12, 59, 63, 0.12); white-space: nowrap; }
.ch-tag-st.is-approved { background: #62ba34; color: #fff; }
.ch-tag-st.is-pending { background: #f5b72b; color: #0c3b3f; }
.ch-tag-st.is-declined { background: #e8423c; color: #fff; }
.cscreen.is-main:has(.tg-row) { justify-content: flex-start; }
.tg-title { margin-bottom: 0 !important; }
.tg-now { display: flex; align-items: center; gap: calc(var(--u) * 1.6); margin: 0; font-size: calc(var(--u) * 6); }
.tg-now b { font-weight: 900; }
.tg-row { display: flex; gap: calc(var(--u) * 1.4); width: 86%; }
.tg-input {
  flex: 1; min-width: 0; padding: calc(var(--u) * 1.6) calc(var(--u) * 2.4); border: calc(var(--u) * 0.6) solid #0c3b3f; border-radius: calc(var(--u) * 2);
  background: #fff; color: #0c3b3f; font: 400 calc(var(--u) * 4.6) "Londrina Solid", system-ui, sans-serif; letter-spacing: 0.04em;
}
.tg-input:focus { outline: none; border-color: #3b8d99; }
.tg-row .ch-action { font-size: calc(var(--u) * 4); padding: calc(var(--u) * 1.4) calc(var(--u) * 2.2); white-space: nowrap; }
.tg-note { margin: 0; width: 86%; font-size: calc(var(--u) * 3.6); line-height: 1.25; text-align: center; }
.cscreen.is-main .tg-input { pointer-events: auto; }
/* Settings with the Player tag row: a bit tighter, to stay above the character's head */
.cscreen.is-main:has(.ch-tag) .ch-title { font-size: calc(var(--u) * 8.5); margin-bottom: calc(var(--u) * 1); }
.ch-menu.is-grid:has(.ch-tag) { gap: calc(var(--u) * 1.6); }
.ch-menu.is-grid .ch-reset { grid-column: 1 / -1; } /* alone in the last row (Help removed) */
.ch-menu.is-grid:has(.ch-tag) .ch-action { font-size: calc(var(--u) * 4.6); padding-top: calc(var(--u) * 1.4); padding-bottom: calc(var(--u) * 1.4); }
.ch-menu.is-grid:has(.ch-tag) .ch-chars { font-size: calc(var(--u) * 4); }
.ch-tag-label { white-space: nowrap; }

/* Settings > User button: label, name and status on one tidy row */
.ch-menu.is-grid .ch-tag { justify-content: flex-start; gap: calc(var(--u) * 2); padding: calc(var(--u) * 1.6) calc(var(--u) * 3); }
.ch-menu.is-grid .ch-tag .ch-tag-label { font-size: 0.72em; letter-spacing: 0.14em; opacity: 0.65; white-space: nowrap; }
.ch-menu.is-grid .ch-tag b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; letter-spacing: 0.04em; }
.ch-menu.is-grid .ch-tag .ch-tag-st { flex: 0 0 auto; font-size: 0.66em; padding: calc(var(--u) * 0.5) calc(var(--u) * 1.6); }

/* One mission cell (just Lights now): the power switch beside the battery,
   not stacked under it */
.mc-cells .mc-cell:not(.is-big):not(.is-mini) {
  width: auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "icon ." "bat sw" "name .";
  column-gap: calc(var(--u) * 4);
  row-gap: calc(var(--u) * 1);
  align-items: center;
  justify-items: center;
}
.mc-cells .mc-cell:not(.is-big):not(.is-mini) .mc-icon { grid-area: icon; }
.mc-cells .mc-cell:not(.is-big):not(.is-mini) .mc-bat { grid-area: bat; }
.mc-cells .mc-cell:not(.is-big):not(.is-mini) .mc-name { grid-area: name; }
.mc-cells .mc-cell:not(.is-big):not(.is-mini) .mc-st { display: none; }
.mc-cells .mc-cell:not(.is-big):not(.is-mini) .mc-switch { grid-area: sw; margin-top: 0; }
