body.cd-page {
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  background:
    radial-gradient(900px 500px at 50% 0%, #3a4450 0%, transparent 55%),
    #161a20;
  color: #e8eef4;
}

.walk {
  width: min(1180px, 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;
}

.discman {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #1a1e24;
  min-height: 0;
}

.phones {
  position: relative;
  width: 148px;
  height: 36px;
  margin: 0 auto -4px;
  pointer-events: none;
  flex-shrink: 0;
  z-index: 2;
}

.phones-band {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 16px;
  border: 3px solid #2a2a30;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: transparent;
}

.cup {
  position: absolute;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #6a6a72, #1a1a1e 70%);
  box-shadow: 0 0 0 2px #2a2a30, inset 0 0 0 4px #3a3a42;
}

.cup.left { left: 4px; }
.cup.right { right: 4px; }

.lead {
  position: absolute;
  left: 8px;
  top: 26px;
  width: 18px;
  height: 28px;
  border-left: 2px solid #2a2a30;
  border-bottom: 2px solid #2a2a30;
  border-radius: 0 0 0 12px;
}

.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 10px 0;
  background:
    linear-gradient(180deg, #e8eef2 0%, #c5ced6 38%, #9aa5ae 78%, #7a848e 100%);
  border: 2px solid #f2f5f8;
  border-radius: 28px 28px 22px 22px;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -10px 16px rgba(0, 0, 0, 0.18),
    0 14px 24px rgba(0, 0, 0, 0.4);
}

.shell::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 52px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d8d8d0, #8a8a80);
  box-shadow: 0 0 0 1px #5a5a50;
  z-index: 2;
}

.lid {
  background: linear-gradient(180deg, #d8dee4, #a8b0b8);
  border: 1px solid #eef2f6;
  border-radius: 22px 22px 8px 8px;
  padding: 8px 8px 4px;
  box-shadow: inset 0 1px 0 #fff;
  min-height: 0;
}

.lid-glass {
  background: #0a0c10;
  border-radius: 10px;
  padding: 5px;
  box-shadow: inset 0 0 0 2px #2a3238, 0 0 0 1px #8a9298;
}

.lid .yt-frame {
  border-radius: 6px;
  max-height: 26vh;
}

.hinge {
  display: flex;
  justify-content: center;
  gap: 36px;
  padding: 3px 0 4px;
  flex-shrink: 0;
}

.hinge span {
  width: 36px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(180deg, #eef2f6, #7a828a);
  box-shadow: 0 1px 0 #fff, 0 2px 0 #5a6268;
}

.body-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 8px 8px;
  min-height: 0;
}

.cd-well {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.cd-window {
  position: relative;
  width: min(100%, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background:
    radial-gradient(circle at 50% 50%, #12161a 0 42%, #1c2228 70%, #2a3238);
  border: 3px solid #d8dee4;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.25),
    inset 0 8px 16px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.cd-window::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.3) 0%, transparent 38%, transparent 64%, rgba(255, 255, 255, 0.08) 100%);
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 12.2%, #000 12.8%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 12.2%, #000 12.8%);
}

.cd-disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  transform-origin: 50% 50%;
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 12.2%, #000 12.65%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 12.2%, #000 12.65%);
}

.cd-data {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.62), transparent 34%),
    conic-gradient(
      from 18deg,
      hsla(200, 90%, 72%, 0),
      hsla(265, 80%, 70%, 0.45),
      hsla(190, 90%, 65%, 0.4),
      hsla(50, 95%, 68%, 0.42),
      hsla(330, 85%, 70%, 0.38),
      hsla(155, 80%, 60%, 0.35),
      hsla(210, 90%, 70%, 0.2),
      hsla(200, 90%, 72%, 0)
    ),
    radial-gradient(circle at 50% 50%, #f4f7fa 0%, #c5ced6 42%, #9aa5ae 68%, #d5dce2 100%),
    #c8d0d6;
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 0 41.2%, #000 41.8%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, transparent 0 41.2%, #000 41.8%);
}

.cd-paper {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(
      circle closest-side at 50% 50%,
      transparent 0 41.4%,
      #2a1c10 41.4% 42%,
      #f3e2b8 42.2% 54.6%,
      #2a1c10 54.8% 55.4%,
      transparent 55.5%
    );
}

.cd-title {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.cd-clear {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(
      circle closest-side at 50% 50%,
      transparent 0 12.5%,
      rgba(210, 225, 235, 0.14) 12.9% 20%,
      rgba(255, 255, 255, 0.08) 24% 34%,
      rgba(230, 240, 245, 0.22) 39% 41%,
      transparent 41.6%
    );
}

.cd-hub {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: auto;
  aspect-ratio: auto;
  border-radius: 50%;
  background:
    radial-gradient(
      circle closest-side at 50% 50%,
      transparent 0 21%,
      rgba(255, 255, 255, 0.55) 21.5%,
      rgba(80, 90, 100, 0.35) 23%,
      transparent 24.2%
    );
  box-shadow: none;
}

body.is-playing .cd-disc {
  animation: spin-cd 0.6s linear infinite;
}

@keyframes spin-cd {
  to { transform: rotate(360deg); }
}


.push-open {
  flex-shrink: 0;
  width: 28px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.push-slot {
  width: 14px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(90deg, #6a7278, #d0d6dc 40%, #8a9298);
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, 0.35), 0 0 0 1px #c8d0d6;
  position: relative;
}

.push-slot::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 8px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f4f6f8, #a8b0b8);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.push-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: Arial, sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  color: #3a4248;
}

.front-edge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, #9aa4ac, #6a727a);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 20px 20px;
  margin: 0 -10px;
  flex-shrink: 0;
}

.jack {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a1a1e;
  box-shadow: inset 0 0 0 2px #8a8a82, 0 0 0 1px #c8c8c0;
  flex-shrink: 0;
}

.lcd {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px 2px;
  background: #0c1812;
  border: 2px solid #2a3a30;
  border-radius: 2px;
  color: #7dffb8;
  font-family: "VT323", "Courier New", monospace;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 8px #3dff8a;
  box-shadow: inset 0 0 10px rgba(0, 255, 120, 0.12);
  flex-shrink: 0;
}

.lcd-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.edge-keys {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.edge-btn {
  min-height: 28px;
  min-width: 36px;
  padding: 2px 7px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1e24;
  background: linear-gradient(180deg, #f0f2f4, #8a9298);
  border: 1px solid #d8dee4;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #3a4248;
}

.edge-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #3a4248;
}

.edge-btn .play-icon svg {
  width: 12px;
  height: 12px;
}

.edge-btn[data-action="play"] {
  flex-direction: row;
  gap: 0;
  min-height: 28px;
}


.now-playing {
  margin: 0;
  text-align: center;
  font-family: "VT323", "Courier New", monospace;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #7dffb8;
  background: #0c1812;
  border: 2px solid #2a3a30;
  border-radius: 6px;
  text-shadow: 0 0 8px #3dff8a;
}

.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: #1a1e24;
  background: linear-gradient(180deg, #f4f6f8, #a8b0b8 70%, #6a727a);
  border: 2px solid #d8dee4;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #3a4248;
}

.deck-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #3a4248;
}

.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 #fff, 0 3px 0 #3a4248, 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) {
  .walk {
    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;
  }

  .discman {
    flex: 1;
    min-height: 0;
    height: 100%;
  }

  .shell {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    grid-template-areas:
      "lid body"
      "lid front";
    gap: 8px 12px;
    padding: 12px 12px 0;
    align-items: stretch;
  }

  .lid { grid-area: lid; display: flex; flex-direction: column; min-height: 0; height: 100%; border-radius: 22px; }
  .lid-glass { flex: 1; min-height: 0; display: flex; }
  .lid .yt-frame { aspect-ratio: auto; flex: 1; height: auto; min-height: 0; max-height: none; }
  .hinge { display: none; }
  .body-top { grid-area: body; min-height: 0; }
  .cd-window { width: min(100%, 280px); }
  .front-edge { grid-area: front; margin: 0; border-radius: 12px 12px 20px 20px; }
}

@media (min-width: 960px) and (max-height: 800px) {
  .deck-btn { min-height: 44px; }
  .deck-play { min-height: 50px; }
  .now-playing { font-size: 1.1rem; }
  .phones { margin-bottom: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  body.is-playing .cd-disc {
    animation-duration: 8s !important;
    animation-iteration-count: infinite !important;
  }
}


body.cd-page .invite-field input,
body.cd-page .invite-field textarea {
  background: rgba(10, 14, 20, 0.45);
  border-color: rgba(200, 210, 220, 0.35);
  color: #e8eef4;
}

body.cd-page .invite-send {
  background: linear-gradient(180deg, #f0f2f4, #8a9298);
  color: #1a1e24;
  border-color: #c8d0d6;
}
