:root {
  --bg: #050611;
  --panel: rgba(7, 8, 24, 0.94);
  --panel-2: rgba(17, 13, 39, 0.94);
  --ink: #ffd4f4;
  --muted: #9788c1;
  --cyan: #39f7ff;
  --pink: #ff2e79;
  --pink-2: #b937d8;
  --red: #ff355f;
  --yellow: #ffd35a;
  --green: #2cff98;
  --line: #8042ae;
  --shadow: rgba(0, 0, 0, 0.58);
  --app-scale: 1;
  --layout-left: 0px;
  --layout-top: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(91, 43, 154, 0.26), transparent 32%),
    radial-gradient(circle at 80% 30%, rgba(255, 46, 121, 0.14), transparent 28%),
    linear-gradient(180deg, #060716 0%, #09071a 52%, #02030a 100%);
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0;
}

button {
  font: inherit;
  color: inherit;
}

.is-hidden {
  display: none !important;
}

.app {
  --stage-width: 1424px;
  --side-width: 360px;
  --layout-gap: 18px;
  --layout-width: calc(var(--stage-width) + var(--layout-gap) + var(--side-width));
  width: 100vw;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.game-layout {
  position: absolute;
  left: var(--layout-left);
  top: var(--layout-top);
  width: var(--layout-width);
  display: grid;
  grid-template-columns: var(--stage-width) var(--side-width);
  gap: var(--layout-gap);
  align-items: stretch;
  transform: scale(var(--app-scale));
  transform-origin: top left;
}

.game-column,
.side-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-screen {
  position: relative;
  width: var(--stage-width);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050611;
  border: 3px solid #201a3d;
  box-shadow:
    0 0 0 2px #050611,
    0 0 34px rgba(57, 247, 255, 0.12),
    0 0 80px rgba(0, 0, 0, 0.78);
}

.game-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 46%, rgba(255, 35, 76, 0.08) 74%, rgba(255, 30, 60, 0.28) 100%),
    linear-gradient(90deg, rgba(255, 53, 95, 0.12), transparent 12% 88%, rgba(255, 53, 95, 0.12));
  mix-blend-mode: screen;
  transition: opacity 0.25s linear;
}

.game-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background:
    radial-gradient(circle at 46% 48%, transparent 0 46%, rgba(3, 3, 10, 0.32) 76%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(180deg, rgba(255, 46, 121, 0.03), transparent 30%, rgba(57, 247, 255, 0.03) 70%, rgba(0, 0, 0, 0.22));
}

.game-screen.low-energy::before {
  opacity: 1;
  animation: lowEnergyEdgePulse 1.15s steps(3, end) infinite;
}

.game-screen.energy-flash::before {
  opacity: 1;
  background:
    radial-gradient(circle at 43% 47%, rgba(57, 247, 255, 0.26), transparent 34%),
    radial-gradient(circle at 59% 42%, rgba(255, 46, 121, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(57, 247, 255, 0.12), rgba(255, 46, 121, 0.1));
  animation: energyDrinkFlash 0.62s steps(4, end) both;
}

.room-bg,
.fx-layer,
.character-layer,
.monitor-fx,
.room-hotspots,
.hud-layer {
  position: absolute;
  inset: 0;
}

.room-bg {
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: contrast(1.1) saturate(1.1);
  transition: filter 0.4s linear;
}

.game-screen.low-energy .room-bg {
  filter: contrast(1.04) saturate(0.86) brightness(0.76);
}

.fx-layer {
  z-index: 2;
  pointer-events: none;
}

.character-layer {
  z-index: 4;
  pointer-events: none;
}

.monitor-fx {
  z-index: 3;
  pointer-events: none;
}

.room-hotspots {
  z-index: 5;
  pointer-events: none;
}

.hud-layer {
  z-index: 20;
  pointer-events: none;
}

.hud-layer button,
.quick-button,
.pixel-button {
  pointer-events: auto;
}

.problem-card,
.flow-status,
.toast {
  pointer-events: auto;
}

.fx-neon {
  position: absolute;
  left: 41.3%;
  top: 10.5%;
  width: 18.2%;
  height: 11.2%;
  border: 0;
  background:
    radial-gradient(ellipse at 42% 42%, rgba(255, 46, 170, 0.18), transparent 58%),
    radial-gradient(ellipse at 78% 48%, rgba(255, 77, 189, 0.12), transparent 44%);
  filter: blur(4px);
  mix-blend-mode: screen;
  opacity: 0.42;
  animation: neonPulse 4.8s steps(5, end) infinite;
}

.fx-neon::after {
  content: "";
  position: absolute;
  inset: 8% 2% 12%;
  background:
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(255, 132, 223, 0.06) 13px 14px, transparent 14px 25px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 46, 170, 0.045) 38px 40px, transparent 40px 62px);
  opacity: 0.28;
  animation: neonFlicker 7.4s steps(2, end) infinite;
}

.fx-city-lights {
  position: absolute;
  inset: 0;
}

.fx-city-lights::before {
  content: "";
  position: absolute;
  left: 2.2%;
  top: 12.8%;
  width: 16%;
  height: 43%;
  background:
    repeating-linear-gradient(100deg, transparent 0 20px, rgba(132, 208, 255, 0.025) 21px 22px, transparent 23px 46px),
    radial-gradient(ellipse at 50% 75%, rgba(57, 247, 255, 0.045), transparent 66%);
  filter: blur(0.6px);
  mix-blend-mode: screen;
  opacity: 0.38;
  animation: windowRain 5.5s linear infinite;
}

.fx-city-lights::after {
  content: "";
  position: absolute;
  left: 2.4%;
  top: 13.2%;
  width: 15.4%;
  height: 42%;
  background:
    radial-gradient(circle at 20% 32%, rgba(255, 46, 121, 0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 44%, rgba(57, 247, 255, 0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 58%, rgba(255, 211, 90, 0.07) 0 1px, transparent 2px);
  mix-blend-mode: screen;
  opacity: 0.28;
  animation: windowNoise 6.2s steps(3, end) infinite;
}

.fx-wall-clock {
  position: absolute;
  left: 45.4%;
  top: 23.7%;
  color: var(--pink);
  font-size: clamp(14px, 2.2vw, 38px);
  font-weight: 900;
  text-shadow: 0 0 16px rgba(255, 46, 121, 0.9);
}

.fx-city-lights span {
  position: absolute;
  width: clamp(1px, 0.12vw, 2px);
  height: clamp(1px, 0.12vw, 2px);
  border: 0;
  background: currentColor;
  box-shadow: 0 0 4px currentColor;
  filter: blur(0.2px);
  opacity: 0.26;
  animation: cityBlink 4.4s steps(2, end) infinite;
}

.fx-city-lights span:nth-child(1) { left: 5.7%; top: 31.8%; color: var(--pink); }
.fx-city-lights span:nth-child(2) { left: 7.4%; top: 41.4%; color: var(--pink); animation-delay: 0.4s; }
.fx-city-lights span:nth-child(3) { left: 10.4%; top: 30.2%; animation-delay: 1s; }
.fx-city-lights span:nth-child(4) { left: 11.9%; top: 40.2%; animation-delay: 0.2s; }
.fx-city-lights span:nth-child(5) { left: 15.35%; top: 34.6%; color: var(--yellow); animation-delay: 1.4s; }
.fx-city-lights span:nth-child(6) { left: 16.95%; top: 40.1%; color: var(--yellow); animation-delay: 0.8s; }
.fx-city-lights span:nth-child(7) { left: 9.95%; top: 44.2%; animation-delay: 1.8s; }
.fx-city-lights span:nth-child(8) { left: 15.25%; top: 44.1%; animation-delay: 2s; }

.fx-lamp {
  position: absolute;
  left: 17.8%;
  top: 34%;
  width: 12.8%;
  height: 20%;
  background: radial-gradient(circle, rgba(255, 211, 90, 0.24), rgba(255, 177, 82, 0.08) 42%, transparent 72%);
  filter: blur(2px);
  animation: lampFlicker 1.6s steps(3, end) infinite;
}

.fx-monitor-glow {
  position: absolute;
  left: 25.6%;
  top: 34.2%;
  width: 17%;
  height: 20.5%;
  border: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(57, 247, 255, 0.13), rgba(255, 46, 121, 0.045) 42%, transparent 74%);
  filter: blur(6px);
  mix-blend-mode: screen;
  opacity: 0.34;
  animation: monitorGlow 2.4s steps(4, end) infinite;
}

.fx-fridge-glow {
  position: absolute;
  left: 54.8%;
  top: 54.2%;
  width: 9.3%;
  height: 25.2%;
  border: 0;
  background:
    radial-gradient(ellipse at 42% 48%, rgba(117, 197, 255, 0.11), rgba(57, 247, 255, 0.04) 40%, transparent 74%),
    radial-gradient(ellipse at 82% 38%, rgba(255, 46, 218, 0.08), transparent 42%);
  box-shadow: none;
  filter: blur(2.5px);
  mix-blend-mode: screen;
  opacity: 0.3;
  animation: fridgePulse 3.2s steps(3, end) infinite;
}

.fx-fridge-glow::after {
  content: "";
  position: absolute;
  right: 4%;
  top: 14%;
  width: 32%;
  height: 48%;
  background: radial-gradient(ellipse, rgba(255, 46, 218, 0.2), transparent 64%);
  filter: blur(3px);
  animation: boltPulse 2.4s steps(2, end) infinite;
}

.game-screen.has-drinks .fx-fridge-glow {
  opacity: 0.52;
  background:
    radial-gradient(ellipse at 42% 48%, rgba(117, 214, 255, 0.22), rgba(57, 247, 255, 0.09) 42%, transparent 76%),
    radial-gradient(ellipse at 82% 38%, rgba(255, 46, 218, 0.16), transparent 44%);
}

.fx-router {
  position: absolute;
  left: 58.7%;
  top: 53.0%;
  display: flex;
  gap: clamp(3px, 0.34vw, 5px);
  border: 0;
  background: transparent;
}

.fx-router span {
  width: clamp(2px, 0.28vw, 4px);
  height: clamp(2px, 0.22vw, 3px);
  border: 0;
  background: var(--green);
  box-shadow: 0 0 4px var(--green), 0 0 7px rgba(44, 255, 152, 0.28);
  opacity: 0.74;
  animation: routerBlink 1.8s steps(2, end) infinite;
}

.fx-router span:nth-child(2) { animation-delay: 0.25s; }
.fx-router span:nth-child(3) { animation-delay: 0.5s; }

.game-screen.problem-internet .fx-router span {
  background: var(--red);
  box-shadow: 0 0 5px var(--red), 0 0 10px rgba(255, 53, 95, 0.38);
  animation-duration: 0.34s;
}

.designer-sprite {
  position: absolute;
  left: 26.4%;
  top: 24.4%;
  width: 512px;
  height: 640px;
  background-image: url("assets/designer_typing_sheet_transparent.png");
  background-repeat: no-repeat;
  background-size: 2048px 640px;
  background-position: 0 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
  filter:
    drop-shadow(0 12px 10px rgba(0, 0, 0, 0.48))
    saturate(0.96)
    brightness(0.9);
  transform-origin: top left;
  transform: scale(0.82);
  animation: designerTyping 0.72s steps(4) infinite;
}

.monitor-screen {
  position: absolute;
  left: 25.7%;
  top: 34.8%;
  width: 16.3%;
  height: 18.1%;
  overflow: hidden;
  border: 0;
  background:
    repeating-linear-gradient(180deg, rgba(57, 247, 255, 0.04) 0 1px, transparent 1px 6px),
    radial-gradient(ellipse at 52% 46%, rgba(57, 247, 255, 0.055), transparent 64%);
  box-shadow: inset 0 0 12px rgba(57, 247, 255, 0.08);
  mix-blend-mode: screen;
  opacity: 0.28;
  animation: screenFlicker 2.1s steps(4, end) infinite;
}

.monitor-screen::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 16%;
  width: 76%;
  height: 68%;
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(57, 247, 255, 0.07) 45% 46%, transparent 47%),
    repeating-linear-gradient(180deg, transparent 0 15px, rgba(255, 46, 121, 0.035) 15px 16px, transparent 16px 28px);
  opacity: 0.38;
  animation: monitorDrift 5.8s steps(5, end) infinite;
}

.monitor-screen::after {
  content: "";
  position: absolute;
  left: 68%;
  top: 62%;
  width: 3px;
  height: 9px;
  background: rgba(57, 247, 255, 0.48);
  box-shadow: 0 0 6px rgba(57, 247, 255, 0.5);
  animation: cursorBlink 1.1s steps(2, end) infinite;
}

.cat-sleep-zz {
  position: absolute;
  left: 72.4%;
  top: 57.8%;
  width: 9%;
  height: 12%;
  pointer-events: none;
}

.cat-sleep-zz span {
  position: absolute;
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.62),
    2px 2px 0 rgba(25, 12, 44, 0.78);
  opacity: 0;
  animation: catSleepZ 3.2s steps(5, end) infinite;
}

.cat-sleep-zz span:nth-child(1) {
  left: 8%;
  top: 58%;
  font-size: clamp(11px, 0.95vw, 17px);
}

.cat-sleep-zz span:nth-child(2) {
  left: 38%;
  top: 30%;
  font-size: clamp(14px, 1.25vw, 23px);
  animation-delay: 0.35s;
}

.cat-sleep-zz span:nth-child(3) {
  left: 70%;
  top: 2%;
  font-size: clamp(18px, 1.55vw, 30px);
  animation-delay: 0.7s;
}

.cat-keyboard-alert {
  position: absolute;
  left: 24.3%;
  top: 44.8%;
  min-width: clamp(34px, 3.4vw, 54px);
  padding: 4px 8px;
  display: none;
  border: 2px solid var(--yellow);
  background: rgba(20, 10, 28, 0.88);
  color: var(--yellow);
  font-size: clamp(10px, 0.9vw, 15px);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 14px rgba(255, 211, 90, 0.35);
  animation: catAlert 0.7s steps(2, end) infinite;
}

.game-screen.problem-cat .cat-keyboard-alert {
  display: block;
}

.game-screen.problem-cat .cat-sleep-zz {
  display: none;
}

.hud {
  position: absolute;
  left: 1.4%;
  right: 1.4%;
  top: 2%;
  display: grid;
  grid-template-columns: 1.1fr 1.25fr 0.8fr 0.95fr auto;
  gap: 0.9%;
  align-items: center;
}

.hud-card,
.pixel-panel,
.problem-card,
.side-header,
.start-card,
.end-card,
.desktop-only-card,
.toast {
  position: relative;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 16, 48, 0.96), rgba(8, 8, 25, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 46, 121, 0.2) inset,
    0 0 18px rgba(185, 55, 216, 0.22),
    5px 5px 0 var(--shadow);
}

.hud-card {
  min-height: clamp(40px, 5.7vw, 58px);
  padding: 0.7% 1.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 0.8vw, 12px);
  white-space: nowrap;
  text-align: center;
}

.game-screen.low-energy .energy-card {
  border-color: var(--red);
  animation: energyHudBlink 0.72s steps(2, end) infinite;
}

.game-screen.low-energy .energy-card strong {
  color: #ff6a70;
  text-shadow: 0 0 14px rgba(255, 53, 95, 0.88);
}

.game-screen.energy-flash .energy-card {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 1px rgba(57, 247, 255, 0.28) inset,
    0 0 24px rgba(57, 247, 255, 0.48),
    5px 5px 0 var(--shadow);
}

.hud-card strong {
  color: var(--cyan);
  font-size: clamp(15px, 1.55vw, 25px);
  text-shadow: 0 0 12px rgba(57, 247, 255, 0.72);
  transition: color 0.2s linear, text-shadow 0.2s linear;
}

.hud-label {
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(11px, 1.05vw, 18px);
}

.hud-icon {
  position: relative;
  width: clamp(22px, 2.2vw, 34px);
  height: clamp(22px, 2.2vw, 34px);
  flex: 0 0 auto;
}

.clock-icon {
  border: 4px solid var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 46, 121, 0.7);
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  background: var(--pink);
}

.clock-icon::before {
  left: 43%;
  top: 18%;
  width: 12%;
  height: 36%;
}

.clock-icon::after {
  left: 47%;
  top: 48%;
  width: 33%;
  height: 12%;
}

.bolt-icon::before {
  content: "";
  position: absolute;
  inset: 0 22%;
  background: linear-gradient(135deg, #fff26b, #ff7d2f);
  clip-path: polygon(55% 0, 0 52%, 42% 52%, 27% 100%, 100% 36%, 58% 36%);
  filter: drop-shadow(0 0 8px rgba(255, 211, 90, 0.9));
}

.coin-dot {
  position: relative;
  display: inline-grid;
  width: clamp(22px, 2vw, 30px);
  height: clamp(22px, 2vw, 30px);
  place-items: center;
  border: 3px solid #ffab1f;
  border-radius: 50%;
  background: #e07b0f;
  box-shadow: 0 0 9px rgba(255, 211, 90, 0.7);
}

.coin-dot::before {
  content: "";
  width: 42%;
  height: 42%;
  background: #fff3ad;
  box-shadow: 2px 2px 0 #9c4700;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.coin-dot.small {
  width: clamp(18px, 1.45vw, 23px);
  height: clamp(18px, 1.45vw, 23px);
}

.can-icon {
  position: relative;
  width: clamp(20px, 1.7vw, 27px);
  height: clamp(28px, 2.45vw, 38px);
  flex: 0 0 auto;
  border: 3px solid #99b5ff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(180deg, #234cff, #5b23d5);
  box-shadow: 0 0 10px rgba(57, 247, 255, 0.5);
}

.can-icon::before {
  content: "";
  position: absolute;
  left: 34%;
  top: 18%;
  width: 34%;
  height: 55%;
  background: var(--yellow);
  clip-path: polygon(65% 0, 0 52%, 45% 52%, 25% 100%, 100% 36%, 58% 36%);
}

.can-icon.large {
  width: clamp(24px, 2vw, 34px);
  height: clamp(34px, 2.9vw, 48px);
}

.mini-bar {
  display: inline-block;
  width: clamp(70px, 7.4vw, 136px);
  height: clamp(16px, 1.65vw, 25px);
  padding: 3px;
  border: 2px solid #332b62;
  background: #09081d;
  overflow: hidden;
}

.mini-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), #db3bb4);
  box-shadow: inset 0 0 8px rgba(255, 230, 255, 0.2);
  transition: width 0.45s steps(8, end), background 0.25s linear, box-shadow 0.25s linear;
}

.game-screen.low-energy .mini-bar span {
  box-shadow: inset 0 0 8px rgba(255, 244, 190, 0.22);
}

.game-screen.energy-flash .mini-bar span {
  box-shadow: inset 0 0 10px rgba(238, 255, 255, 0.28);
}

.hud-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.7vw;
  pointer-events: auto;
}

.tool-icon {
  display: block;
  width: clamp(42px, 4.2vw, 64px);
  height: clamp(36px, 3.5vw, 54px);
  border: 2px solid var(--line);
  background: rgba(14, 11, 35, 0.9);
  color: var(--ink);
  box-shadow: 0 0 12px rgba(128, 66, 174, 0.35);
}

button.tool-icon {
  cursor: pointer;
  font-size: clamp(23px, 2.2vw, 36px);
  line-height: 1;
  font-weight: 900;
  display: grid;
  place-items: center;
  text-shadow: 0 0 12px rgba(185, 55, 216, 0.8);
}

button.tool-icon:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(57, 247, 255, 0.4);
}

.tool-icon.music {
  background:
    radial-gradient(circle at 68% 26%, rgba(255, 46, 121, 0.3), transparent 24%),
    rgba(14, 11, 35, 0.9);
}

.tool-icon.music.is-on {
  border-color: var(--pink);
  color: var(--pink);
  animation: musicPulse 1.2s steps(2, end) infinite;
}

.tool-icon.music.is-off {
  color: #665b86;
  border-color: #4b3a67;
  text-shadow: none;
  box-shadow: none;
}

.bottom-panels {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 10px;
  align-items: stretch;
}

.side-panel {
  align-self: stretch;
}

.side-actions-panel {
  margin-top: auto;
  padding: 16px;
}

.side-actions-panel h2 {
  margin-bottom: 12px;
  font-size: 19px;
}

.bottom-panels .pixel-panel {
  padding: 10px 12px;
}

.side-header {
  padding: 18px 16px;
}

.side-header h2 {
  margin: 0 0 12px;
  color: var(--pink);
  font-size: 20px;
  line-height: 1.1;
  text-transform: uppercase;
}

.pixel-panel {
  padding: clamp(8px, 0.75vw, 12px);
}

.pixel-panel h2 {
  margin: 0 0 clamp(6px, 0.6vw, 10px);
  color: var(--pink);
  font-size: clamp(12px, 1.05vw, 18px);
  line-height: 1.12;
}

.order-content {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 14px;
  align-items: center;
}

.order-preview {
  position: relative;
  min-height: 70px;
  border: 3px solid var(--pink);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 120, 67, 0.45), transparent 40%),
    linear-gradient(135deg, transparent 0 38%, #30184f 39% 56%, transparent 57%),
    linear-gradient(45deg, transparent 0 34%, #101a49 35% 62%, transparent 63%),
    linear-gradient(180deg, #753047, #10143a);
  box-shadow: 0 0 16px rgba(255, 46, 121, 0.25);
}

.order-preview span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90%;
  transform: translate(-50%, -50%);
  color: #fff2c6;
  font-weight: 900;
  font-size: clamp(11px, 1.1vw, 17px);
  text-align: center;
  text-shadow: 2px 2px 0 #9b2738;
}

.line-label,
.payout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pink);
  font-weight: 700;
  font-size: clamp(11px, 0.95vw, 16px);
}

.line-label strong {
  color: var(--cyan);
  font-size: clamp(18px, 1.65vw, 28px);
  text-shadow: 0 0 10px rgba(57, 247, 255, 0.7);
}

.progress-bar {
  width: 100%;
  height: 18px;
  margin: 4px 0 7px;
  padding: 3px;
  border: 2px solid #302964;
  background: #09091c;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 12px, #1747ff 12px 16px);
  box-shadow: 0 0 12px rgba(57, 247, 255, 0.55);
  transition: width 0.18s linear;
}

.payout-row strong {
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 7px;
}

.orders-queue {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(6px, 0.7vw, 10px);
}

.queue-item {
  min-height: 64px;
  padding: 6px;
  border: 2px solid #4e3a71;
  background: rgba(14, 13, 34, 0.88);
  color: #c7c0f2;
  display: grid;
  align-content: center;
  gap: 5px;
  text-align: center;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.28);
}

.queue-item strong {
  color: var(--cyan);
  font-size: clamp(12px, 1.15vw, 18px);
}

.queue-item span {
  font-size: clamp(10px, 0.9vw, 15px);
  overflow-wrap: anywhere;
}

.queue-item.done {
  border-color: var(--green);
  color: #95ffd0;
  background: rgba(5, 69, 45, 0.38);
}

.queue-item.active {
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 46, 121, 0.35);
}

.queue-item.pending {
  border-color: var(--yellow);
  color: #ffe9a3;
  animation: warningPulse 1s steps(2, end) infinite;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-button {
  min-height: 112px;
  padding: 10px 8px;
  display: grid;
  place-items: center;
  gap: 5px;
  text-align: center;
  border: 2px solid var(--pink);
  background: rgba(14, 10, 34, 0.95);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(255, 46, 121, 0.16) inset,
    0 0 12px rgba(255, 46, 121, 0.22);
  cursor: pointer;
}

.quick-button span:not(.can-icon) {
  font-weight: 900;
  font-size: clamp(11px, 1vw, 16px);
}

.quick-button small {
  color: var(--green);
  font-size: clamp(9px, 0.85vw, 13px);
}

.quick-button:hover,
.pixel-button:hover,
.problem-action:hover {
  transform: translate(-2px, -2px);
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 var(--shadow), 0 0 16px rgba(57, 247, 255, 0.36);
}

.quick-button:disabled,
.pixel-button:disabled,
.problem-action:disabled {
  color: #6e668a;
  border-color: #3c355d;
  background: rgba(12, 11, 28, 0.8);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.flow-status {
  min-height: 76px;
  padding: 14px 12px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(57, 247, 255, 0.7);
  background: rgba(5, 7, 19, 0.82);
  color: var(--cyan);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 0 10px rgba(57, 247, 255, 0.75);
  box-shadow: 0 0 16px rgba(57, 247, 255, 0.18);
}

.flow-status.warning {
  color: var(--yellow);
  border-color: rgba(255, 211, 90, 0.75);
}

.flow-status.danger {
  color: var(--red);
  border-color: rgba(255, 53, 95, 0.9);
  animation: warningPulse 0.8s steps(2, end) infinite;
}

.problem-card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(29, 8, 34, 0.97), rgba(10, 8, 25, 0.98));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 24px rgba(255, 46, 121, 0.75),
    7px 7px 0 var(--shadow);
  animation: problemGlitch 0.22s steps(3, end), redFrame 1.15s steps(2, end) infinite;
}

.problem-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 15px;
  border-bottom: 2px solid var(--red);
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.close-fake {
  width: clamp(27px, 2.1vw, 34px);
  height: clamp(27px, 2.1vw, 34px);
  border: 2px solid var(--red);
  background: var(--red);
  color: #160514;
  font-weight: 900;
  line-height: 1;
  cursor: not-allowed;
}

.problem-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 18px 16px 8px;
  align-items: center;
}

.problem-icon {
  min-height: 82px;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 46, 121, 0.9);
}

.problem-body h2 {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 22px;
  line-height: 1.12;
}

.problem-body p {
  margin: 0;
  color: #ffc4d3;
  font-size: 15px;
  line-height: 1.25;
}

.problem-timer {
  margin-top: 8px !important;
  color: var(--yellow) !important;
}

.problem-actions {
  display: grid;
  gap: 10px;
  padding: 10px 16px 18px;
}

.problem-action {
  min-height: 54px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid var(--pink);
  background: rgba(14, 10, 34, 0.95);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 46, 121, 0.16) inset,
    0 0 12px rgba(255, 46, 121, 0.22);
}

.problem-action strong {
  color: var(--yellow);
}

.toast {
  position: relative;
  z-index: 1;
  transform: none;
  width: 100%;
  padding: 13px 14px;
  color: #fff3d9;
  border-color: var(--yellow);
  background: linear-gradient(180deg, rgba(18, 13, 35, 0.88), rgba(6, 7, 18, 0.9));
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(255, 211, 90, 0.12) inset,
    0 0 14px rgba(255, 211, 90, 0.2),
    3px 3px 0 rgba(0, 0, 0, 0.45);
  animation: toastNudge 0.18s steps(2, end);
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 46, 121, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(4, 4, 14, 0.92), rgba(1, 2, 9, 0.98));
}

.screen-stack {
  width: min(660px, 100%);
  display: grid;
  justify-items: center;
}

.start-card,
.end-card,
.desktop-only-card {
  width: min(660px, 100%);
  padding: 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 900;
}

.start-card h1,
.desktop-only-card h1,
.end-card h2 {
  margin: 0;
  color: var(--pink);
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  line-height: 1;
  text-shadow:
    0 0 8px rgba(255, 46, 121, 0.85),
    4px 4px 0 #150618;
}

.end-card h2 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.desktop-only-screen {
  z-index: 130;
}

.desktop-only-card {
  width: min(560px, 100%);
}

.desktop-only-card h1 {
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.05;
}

.lead,
.end-card p {
  margin: 18px auto 26px;
  max-width: 520px;
  color: #ead5ff;
  font-size: 1.1rem;
  line-height: 1.5;
}

.game-author {
  margin: 42px 0 0;
  color: rgba(234, 213, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
  text-shadow: 0 0 8px rgba(57, 247, 255, 0.18);
}

.game-author a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.game-author a:hover {
  color: inherit;
  text-shadow: 0 0 10px rgba(255, 46, 121, 0.45);
}

.pixel-button {
  min-width: 188px;
  min-height: 48px;
  padding: 14px 22px;
  border: 2px solid var(--cyan);
  background: linear-gradient(180deg, rgba(39, 46, 114, 0.95), rgba(20, 14, 54, 0.95));
  color: #efffff;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(57, 247, 255, 0.75);
  box-shadow: 0 0 14px rgba(57, 247, 255, 0.22);
  cursor: pointer;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0 26px;
}

.summary div {
  min-height: 82px;
  padding: 10px;
  border: 2px solid #4e3a71;
  background: rgba(8, 8, 24, 0.84);
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.summary strong {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 1.25rem;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body {
    min-width: 0;
    overflow: hidden;
  }

  #startScreen,
  #app,
  #endScreen {
    display: none !important;
  }

  #desktopOnlyScreen.desktop-only-screen {
    display: grid !important;
  }

  .desktop-only-card {
    width: min(520px, calc(100vw - 32px));
    padding: 24px 18px;
  }

  .desktop-only-card .lead {
    margin-bottom: 0;
    font-size: 1rem;
  }
}

@keyframes neonPulse {
  0%, 100% { opacity: 0.42; filter: blur(4px) brightness(1); }
  46% { opacity: 0.34; filter: blur(4.5px) brightness(0.92); }
  50% { opacity: 0.5; filter: blur(3.8px) brightness(1.08); }
}

@keyframes neonFlicker {
  0%, 88%, 100% { opacity: 0.24; transform: translateX(0); }
  90% { opacity: 0.04; transform: translateX(-1px); }
  91% { opacity: 0.34; transform: translateX(1px); }
  92% { opacity: 0.2; transform: translateX(0); }
}

@keyframes cityBlink {
  0%, 100% { opacity: 0.24; }
  50% { opacity: 0.06; }
}

@keyframes windowRain {
  from { transform: translateY(-1.2%); opacity: 0.32; }
  to { transform: translateY(1.2%); opacity: 0.42; }
}

@keyframes windowNoise {
  0%, 100% { opacity: 0.22; transform: translate(0, 0); }
  50% { opacity: 0.32; transform: translate(1px, -1px); }
}

@keyframes lampFlicker {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  30% { opacity: 0.62; transform: scale(0.98); }
  70% { opacity: 1; transform: scale(1.02); }
}

@keyframes monitorGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.42; }
}

@keyframes fridgePulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.22; }
}

@keyframes boltPulse {
  0%, 100% { opacity: 0.42; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.96); }
}

@keyframes routerBlink {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 0.2; }
}

@keyframes designerTyping {
  from { background-position-x: 0; }
  to { background-position-x: -2048px; }
}

@keyframes catAlert {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.65; transform: translateY(-3px); }
}

@keyframes screenFlicker {
  0%, 100% { filter: brightness(1); opacity: 0.26; }
  50% { filter: brightness(1.12); opacity: 0.34; }
}

@keyframes monitorDrift {
  0%, 100% { transform: translate(0, 0); opacity: 0.28; }
  40% { transform: translate(2px, 0); opacity: 0.36; }
  70% { transform: translate(-1px, 1px); opacity: 0.24; }
}

@keyframes cursorBlink {
  0%, 45% { opacity: 0.72; }
  46%, 100% { opacity: 0; }
}

@keyframes catSleepZ {
  0% { opacity: 0; transform: translate(0, 5px) scale(0.8); }
  18% { opacity: 0.9; transform: translate(0, 1px) scale(1); }
  44% { opacity: 0.72; transform: translate(2px, -5px) scale(1.08); }
  68%, 100% { opacity: 0; transform: translate(5px, -14px) scale(1.18); }
}

@keyframes toastNudge {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes warningPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 46, 121, 0.3); }
  50% { box-shadow: 0 0 24px rgba(255, 46, 121, 0.85); }
}

@keyframes lowEnergyEdgePulse {
  0%, 100% { opacity: 0.62; filter: brightness(1); }
  50% { opacity: 0.95; filter: brightness(1.12); }
}

@keyframes energyHudBlink {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 53, 95, 0.22) inset,
      0 0 18px rgba(255, 53, 95, 0.2),
      5px 5px 0 var(--shadow);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 53, 95, 0.45) inset,
      0 0 28px rgba(255, 53, 95, 0.72),
      5px 5px 0 var(--shadow);
  }
}

@keyframes energyDrinkFlash {
  0% { opacity: 0; filter: brightness(1); }
  18% { opacity: 0.9; filter: brightness(1.28); }
  55% { opacity: 0.42; filter: brightness(1.1); }
  100% { opacity: 0; filter: brightness(1); }
}

@keyframes musicPulse {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 46, 121, 0.8); }
  50% { text-shadow: 0 0 18px rgba(255, 46, 121, 1); }
}

@keyframes problemGlitch {
  0% { transform: translate(-10px, 0); clip-path: inset(0 0 16% 0); }
  33% { transform: translate(8px, -2px); clip-path: inset(18% 0 0 0); }
  66% { transform: translate(-3px, 2px); clip-path: inset(0 0 0 0); }
  100% { transform: translate(0, 0); }
}

@keyframes redFrame {
  0%, 100% { border-color: var(--red); }
  50% { border-color: #ff82a0; }
}
