body.flash-page {
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  background:
    radial-gradient(800px 420px at 50% 0%, #3a3230 0%, transparent 55%),
    #14181e;
  color: #e8eef4;
}

.dash {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 8px 12px 32px;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand-mark {
  font-family: "Permanent Marker", "Comic Sans MS", cursive;
  letter-spacing: 0.02em;
}

.stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.head-unit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px 10px 12px;
  background:
    linear-gradient(180deg, #3a3e46 0%, #1c2026 40%, #101216 100%);
  border: 3px solid #6a7078;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 #8a9098,
    inset 0 -8px 16px rgba(0, 0, 0, 0.45),
    0 14px 24px rgba(0, 0, 0, 0.5);
}

.face {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: stretch;
  min-height: 0;
}

.screen-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
}

.unit-lcd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 28px;
  padding: 3px 10px 2px;
  background: #0a1a14;
  border: 2px solid #1a3a2a;
  border-radius: 2px;
  color: #7dffb8;
  font-family: "VT323", "Courier New", monospace;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px #3dff8a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.unit-lcd .src {
  color: #9effc8;
  font-size: 0.95rem;
}

.unit-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-bezel {
  background: #0a0c10;
  border-radius: 6px;
  padding: 5px;
  box-shadow: inset 0 0 0 2px #2a3238, 0 0 0 1px #5a6268;
  min-height: 0;
}

.screen-bezel .yt-frame {
  border-radius: 3px;
  max-height: 38vh;
}

.console {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 4px;
}

.knob {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, #6a6e76 0 8deg, #2a2e34 8deg 10deg);
  box-shadow: inset 0 0 0 3px #1a1c20, 0 2px 4px rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.knob i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8ccd0;
}

.preset {
  width: 28px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a4e56, #1a1e24);
  box-shadow: 0 1px 0 #6a6e76;
}

.usb-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  padding-left: 2px;
}

.usb-port {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
}

.port-lip {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #8a929a;
  flex-shrink: 0;
}

.port-slot {
  width: 12px;
  height: 18px;
  margin-right: -8px;
  background: #0a0c10;
  border: 1px solid #3a3e46;
  border-radius: 1px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.75);
  flex-shrink: 0;
  z-index: 0;
}

.flash-stick {
  display: flex;
  align-items: center;
  transform: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}

.flash-metal {
  width: 22px;
  height: 16px;
  background: linear-gradient(180deg, #e8e8e8, #9aa0a6);
  border: 1px solid #6a7076;
  border-right: 0;
  border-radius: 1px 0 0 1px;
  box-shadow: inset 2px 0 0 #b0b4b8;
}

.flash-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px 4px 8px;
  background: linear-gradient(180deg, #6aa4d4, #2a6aaa 55%, #1a4a88);
  border: 1px solid #8ac0e8;
  border-radius: 0 6px 6px 0;
}

.flash-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a1010;
  box-shadow: inset 0 0 2px #000;
  flex-shrink: 0;
}

body.is-playing .flash-led {
  background: #ff3a3a;
  box-shadow: 0 0 8px #ff2a2a, 0 0 2px #fff;
  animation: led-blink 1s step-end infinite;
}

@keyframes led-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.22; }
}

.flash-tape {
  display: block;
  padding: 2px 8px;
  background: #f3e2b8;
  box-shadow: 0 0 0 1px #c8b080, 0 1px 0 rgba(0, 0, 0, 0.2);
  font-family: "Permanent Marker", "Comic Sans MS", cursive;
  font-size: 0.72rem;
  line-height: 1.1;
  color: #2a1c10;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.deck,
.deck-balanced {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 1.2fr 0.9fr 1.05fr;
  align-items: end;
  gap: 6px;
  flex-shrink: 0;
}

.deck-btn {
  min-height: 48px;
  padding: 6px 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #e8eef4;
  background: linear-gradient(180deg, #4a5058, #2a2e34 70%, #1a1e24);
  border: 2px solid #6a7078;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 #8a9098, 0 3px 0 #0a0c10;
}

.deck-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 #8a9098, 0 1px 0 #0a0c10;
}

.deck-play {
  min-height: 56px;
  border-radius: 50px;
  background: linear-gradient(180deg, #5eca7a, #145028);
  color: #f4fff4;
  border-color: #8ad0a0;
  box-shadow: inset 0 1px 0 #c8f0d4, 0 3px 0 #0a3018;
  font-size: 0.95rem;
}

.deck-play.is-playing {
  background: linear-gradient(180deg, #d4a024, #8a6010);
  border-color: #ffe08a;
}

.deck-btn[data-action="shuffle"].is-on {
  box-shadow: inset 0 1px 0 #8a9098, 0 3px 0 #0a0c10, 0 0 12px #7ec8ff;
  border-color: #7ec8ff;
}

.deck-random {
  background: linear-gradient(180deg, #e0a030, #8a5808);
  border-color: #f0c86a;
  color: #fff8e8;
  box-shadow: inset 0 1px 0 #ffe8b0, 0 3px 0 #4a2800;
}

@media (min-width: 960px) {
  .dash {
    padding: 8px 16px 40px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }

  .stage {
    min-height: calc(100dvh - 66px);
    height: calc(100dvh - 66px);
    flex: 0 0 auto;
    display: flex;
  }

  .head-unit {
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 12px 14px;
  }

  .face {
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 12px;
  }

  .screen-stack,
  .screen-bezel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .screen-bezel .yt-frame {
    aspect-ratio: auto;
    flex: 1;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .knob {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-playing .flash-led {
    animation: none;
    opacity: 1;
  }
}


body.flash-page .invite-field input,
body.flash-page .invite-field textarea {
  background: rgba(10, 12, 16, 0.5);
  border-color: rgba(200, 212, 222, 0.3);
  color: #e8eef4;
}

body.flash-page .invite-send {
  background: linear-gradient(180deg, #5eca7a, #145028);
  color: #f4fff4;
  border-color: #8ad0a0;
}
