html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0e2a63;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#title-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1.8s ease,
    transform 1.8s cubic-bezier(0.55, 0, 0.55, 1);
}

#title-overlay.hidden {
  opacity: 0;
  transform: translateY(-48px);
}

#title {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 11vw, 8rem);
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.06em;
  text-shadow:
    0 3px 0 rgba(173, 211, 255, 0.55),
    0 8px 28px rgba(13, 47, 110, 0.5),
    0 2px 6px rgba(13, 47, 110, 0.35);
  animation:
    title-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) both,
    title-bob 5.5s ease-in-out 1.6s infinite alternate;
}

#subtitle {
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.95);
  margin: 1.1rem 0 0;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  padding: 0.45em 1.4em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: title-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes title-bob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-12px);
  }
}

.hover-label {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -118%);
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hover-label.visible {
  opacity: 1;
}

.hover-label span {
  position: relative;
  display: inline-block;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: #3a2c14;
  background: #ffd84a;
  padding: 0.4em 1.1em;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(18, 44, 96, 0.28);
  white-space: nowrap;
}

.hover-label span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: #ffd84a;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

.hover-label.visible span {
  animation:
    label-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    label-bob 2s ease-in-out 0.45s infinite alternate;
}

@keyframes label-pop {
  from {
    opacity: 0;
    transform: scale(0.55) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes label-bob {
  from {
    transform: translateY(0) rotate(-1.2deg);
  }
  to {
    transform: translateY(-7px) rotate(1.2deg);
  }
}

/* --- vending machine modal: machine control panel -------------------------- */

#machine-modal {
  position: fixed;
  top: 50%;
  right: 5vw;
  transform: translateY(-50%);
  transform-origin: 100% 0%;
  width: min(390px, 86vw);
  box-sizing: border-box;
  background: linear-gradient(165deg, #8ed0f4, #6db8e0 70%, #5fabd6);
  border: 3px solid #4f9cc8;
  border-radius: 20px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 8px rgba(31, 79, 116, 0.35),
    0 24px 70px rgba(15, 40, 90, 0.4);
  padding: 22px 20px 18px;
  font-family: "DotGothic16", "Baloo 2", monospace;
  color: #1d2a40;
  z-index: 20;
}

#machine-modal.hidden {
  display: none;
}

/* anime panel entrance: a thin slash from the corner that springs open */
#machine-modal.opening {
  animation: modal-in 0.55s cubic-bezier(0.25, 0.9, 0.35, 1.2) both;
}

@keyframes modal-in {
  0% {
    transform: translateY(-50%) scale(0.04, 0.04) skewX(-10deg);
    opacity: 0;
  }
  35% {
    transform: translateY(-50%) scale(1.06, 0.07) skewX(-7deg);
    opacity: 1;
  }
  62% {
    transform: translateY(-50%) scale(0.99, 1.06) skewX(2.5deg);
  }
  80% {
    transform: translateY(-50%) scale(1.01, 0.98) skewX(-1deg);
  }
  100% {
    transform: translateY(-50%) scale(1, 1) skewX(0deg);
  }
}

#machine-modal.closing {
  animation: modal-out 0.3s ease-in both;
}

@keyframes modal-out {
  0% {
    transform: translateY(-50%) scale(1, 1);
    opacity: 1;
  }
  45% {
    transform: translateY(-50%) scale(1.04, 0.06) skewX(-6deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) scale(0.03, 0.03) skewX(-10deg);
    opacity: 0;
  }
}

#modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #16243c;
  background: #2b3a55;
  color: #cfe0f0;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#modal-close:hover {
  background: #16243c;
}

/* --- LED screen ------------------------------------------------------------ */

#led-screen {
  position: relative;
  background: #0b120d;
  border: 2px solid #14241a;
  border-radius: 12px;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.85);
  padding: 14px 14px 12px;
  overflow: hidden;
}

#led-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.22) 2px 3px
  );
  border-radius: inherit;
}

.led-title {
  margin: 0;
  font-family: "DotGothic16", monospace;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  color: #5dff8d;
  text-shadow:
    0 0 8px rgba(93, 255, 141, 0.7),
    0 0 2px rgba(93, 255, 141, 0.9);
  animation: led-flicker 4s steps(1) infinite;
}

.led-cursor {
  animation: blink 1.1s steps(1) infinite;
}

.led-sub {
  margin: 4px 0 0;
  font-family: "DotGothic16", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #3fd470;
  opacity: 0.8;
}

@keyframes led-flicker {
  0%,
  93%,
  100% {
    opacity: 1;
  }
  94% {
    opacity: 0.75;
  }
  95% {
    opacity: 1;
  }
  97% {
    opacity: 0.85;
  }
  98% {
    opacity: 1;
  }
}

#prompt-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  font-family: "DotGothic16", monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #5dff8d;
  caret-color: #5dff8d;
  text-shadow: 0 0 6px rgba(93, 255, 141, 0.5);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(93, 255, 141, 0.35);
  background: rgba(0, 0, 0, 0.3);
  resize: none;
  outline: none;
}

#prompt-input::placeholder {
  color: rgba(93, 255, 141, 0.3);
  text-shadow: none;
}

#prompt-input:focus {
  border: 1px solid rgba(93, 255, 141, 0.8);
}

#prompt-input:disabled {
  opacity: 0.5;
}

#prompt-input.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}

#generating {
  margin-top: 14px;
  text-align: center;
}

.led-status {
  margin: 10px 0 4px;
  font-family: "DotGothic16", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: #5dff8d;
  text-shadow: 0 0 8px rgba(93, 255, 141, 0.7);
}

.dots {
  animation: blink 1.4s steps(1) infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

.eq {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: flex-end;
  height: 34px;
}

.eq i {
  width: 7px;
  border-radius: 2px;
  background: linear-gradient(#5dff8d, #1f8f4a);
  box-shadow: 0 0 6px rgba(93, 255, 141, 0.5);
  animation: eq-bounce 1s ease-in-out infinite;
}

.eq i:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
}
.eq i:nth-child(2) {
  height: 75%;
  animation-delay: 0.15s;
}
.eq i:nth-child(3) {
  height: 100%;
  animation-delay: 0.3s;
}
.eq i:nth-child(4) {
  height: 65%;
  animation-delay: 0.45s;
}
.eq i:nth-child(5) {
  height: 45%;
  animation-delay: 0.6s;
}

@keyframes eq-bounce {
  0%,
  100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}

/* --- coin slot + red button -------------------------------------------------- */

#controls-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#coin-slot-area {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#5fabd6, #4f9cc8);
  border: 2px solid #3f86ad;
  border-radius: 10px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -3px 5px rgba(31, 79, 116, 0.4);
  perspective: 300px;
}

#coin-slot {
  width: 10px;
  height: 40px;
  background: #0e1116;
  border-radius: 5px;
  box-shadow:
    inset 0 0 5px #000,
    0 1px 0 rgba(255, 255, 255, 0.4);
}

#wado-coin {
  position: absolute;
  width: 46px;
  height: 46px;
  left: 50%;
  top: 50%;
  margin: -23px 0 0 -23px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(20, 30, 50, 0.45));
}

.wado-kanji {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 21px;
  fill: #5d431d;
}

.inserting #wado-coin {
  animation: coin-insert 1.15s ease-in-out forwards;
}

@keyframes coin-insert {
  0% {
    opacity: 0;
    transform: translate(-58px, 16px) rotate(-30deg) scale(0.3);
  }
  18% {
    opacity: 1;
    transform: translate(-40px, -8px) rotate(-10deg) scale(1.25);
  }
  42% {
    opacity: 1;
    transform: translate(0, -16px) rotate(0deg) scale(1.1);
  }
  60% {
    opacity: 1;
    transform: translate(0, -16px) rotateY(80deg) scale(1);
  }
  78% {
    opacity: 1;
    transform: translate(0, 6px) rotateY(80deg) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: translate(0, 26px) rotateY(80deg) scale(0.9);
  }
}

.inserting #coin-slot {
  animation: slot-flash 0.35s ease 0.95s;
}

@keyframes slot-flash {
  50% {
    box-shadow:
      inset 0 0 5px #000,
      0 0 12px rgba(93, 255, 141, 0.9);
  }
}

#coin-button {
  flex: 1;
  padding: 16px 10px;
  border-radius: 12px;
  border: 2px solid #a32119;
  background: linear-gradient(#ff6a5e, #e03a30 55%, #c52d24);
  color: #fff;
  font-family: "DotGothic16", monospace;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  box-shadow:
    0 5px 0 #8f1d18,
    inset 0 2px 3px rgba(255, 255, 255, 0.4);
}

#coin-button:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #8f1d18,
    inset 0 2px 3px rgba(255, 255, 255, 0.4);
}

#coin-button:disabled {
  cursor: default;
  filter: saturate(0.7) brightness(0.92);
}

#cassette-stage {
  margin-top: 16px;
}

#cassette {
  background: linear-gradient(#3a4254, #2c3344);
  border-radius: 14px;
  padding-bottom: 4px;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(15, 40, 90, 0.3);
  animation: cassette-out 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cassette-out {
  from {
    transform: translateY(56px) scale(0.92);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.cassette-label {
  background: #f6f1e3;
  border: 2px solid #e0d6bd;
  border-radius: 8px;
  margin: 12px 14px 10px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #4a3b2c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels {
  display: flex;
  align-items: center;
  padding: 0 28px 12px;
}

.reel {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 5px dashed #cfd6e4;
  background: #1d232f;
  box-sizing: border-box;
}

#cassette.playing .reel,
.cassette-card.playing .reel {
  animation: reel-spin 2.4s linear infinite;
}

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

.tape-window {
  flex: 1;
  height: 16px;
  margin: 0 12px;
  background: #1d232f;
  border-radius: 8px;
}

#player {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

#play-btn,
#np-toggle,
#deck-play {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: #ffd84a;
  color: #3a2c14;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #d9ab1e;
}

#play-btn:active,
#np-toggle:active,
#deck-play:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #d9ab1e;
}

#progress {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(13, 26, 43, 0.4);
  cursor: pointer;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #5dff8d, #2ea65a);
  box-shadow: 0 0 6px rgba(93, 255, 141, 0.6);
}

#time {
  font-family: "DotGothic16", monospace;
  font-size: 0.85rem;
  color: #16213a;
  min-width: 38px;
  text-align: right;
}

#again-btn {
  margin-top: 14px;
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 2px solid #16213a;
  background: linear-gradient(#3a4c6e, #2b3a55);
  color: #cfe0f0;
  font-family: "DotGothic16", monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow:
    0 4px 0 #16213a,
    inset 0 2px 2px rgba(255, 255, 255, 0.18);
}

#again-btn:hover {
  background: linear-gradient(#465a80, #324466);
}

#again-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #16213a,
    inset 0 2px 2px rgba(255, 255, 255, 0.18);
}

#error-msg {
  font-family: "DotGothic16", monospace;
  color: #ff6b5e;
  text-shadow: 0 0 8px rgba(255, 107, 94, 0.7);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  margin: 10px 0 0;
  text-align: center;
}

#error-msg.hidden,
#controls-row.hidden,
#prompt-input.hidden,
#generating.hidden,
#cassette-stage.hidden {
  display: none;
}

/* --- now playing pill ------------------------------------------------------ */

#now-playing {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 40, 90, 0.25);
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2b3a55;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

#now-playing.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

#now-playing #np-toggle {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

#np-title {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- cassette collection: carousel ------------------------------------------ */

#collection-panel {
  position: fixed;
  top: 6vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 94vw);
  z-index: 18;
  text-align: center;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

#collection-panel.hidden {
  opacity: 0;
  transform: translate(-50%, -18px);
  pointer-events: none;
}

#collection-heading {
  margin: 0;
}

#collection-heading span {
  display: inline-block;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: #3a2c14;
  background: #ffd84a;
  padding: 0.4em 1.3em;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(18, 44, 96, 0.3);
}

#collection-close {
  position: absolute;
  top: -6px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(15, 40, 90, 0.4);
}

#collection-close:hover {
  background: rgba(255, 255, 255, 0.38);
}

#collection-status {
  margin: 26px 0 0;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(15, 40, 90, 0.45);
}

#collection-status.hidden {
  display: none;
}

#carousel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.caro-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(15, 40, 90, 0.4);
}

.caro-btn:hover {
  background: rgba(255, 255, 255, 0.38);
}

#carousel {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 14px 6px 20px;
  scrollbar-width: none;
}

#carousel::-webkit-scrollbar {
  display: none;
}

.cassette-card {
  flex: none;
  width: 196px;
  box-sizing: border-box;
  scroll-snap-align: center;
  cursor: pointer;
  border: none;
  padding: 0 0 4px;
  font-family: "Baloo 2", sans-serif;
  background: linear-gradient(var(--shell1, #3a4254), var(--shell2, #2c3344));
  border-radius: 14px;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.14),
    0 8px 22px rgba(15, 40, 90, 0.32);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  animation: cassette-out 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cassette-card:hover {
  transform: translateY(-4px);
}

.cassette-card.selected {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 3px #ffd84a,
    inset 0 2px 6px rgba(255, 255, 255, 0.14),
    0 12px 28px rgba(15, 40, 90, 0.4);
}

.cassette-card .cassette-label {
  margin: 10px 12px 8px;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.cassette-card .reels {
  padding: 0 22px 10px;
}

.cassette-card .reel {
  width: 28px;
  height: 28px;
  border-width: 4px;
}

.cassette-card .tape-window {
  height: 13px;
  margin: 0 10px;
}

/* --- tape deck: glass pill player -------------------------------------------- */

#tape-deck {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(620px, 92vw);
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 44px rgba(15, 40, 90, 0.38);
  font-family: "Baloo 2", sans-serif;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

#tape-deck.hidden {
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
}

#deck-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#deck-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(15, 40, 90, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 6px;
}

#deck-progress {
  height: 8px;
  border-radius: 4px;
  background: rgba(13, 26, 43, 0.35);
  cursor: pointer;
  overflow: hidden;
}

#deck-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #ffd84a, #e8a13c);
  box-shadow: 0 0 8px rgba(255, 216, 74, 0.65);
}

#deck-time {
  flex: none;
  font-family: "DotGothic16", monospace;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(15, 40, 90, 0.45);
  min-width: 38px;
  text-align: right;
}

#deck-cassette {
  flex: none;
  position: relative;
  width: 64px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(var(--shell1, #3a4254), var(--shell2, #2c3344));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 3px 10px rgba(15, 40, 90, 0.3);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding-bottom: 6px;
  box-sizing: border-box;
}

#deck-cassette::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  right: 7px;
  height: 12px;
  background: #f6f1e3;
  border: 1px solid #e0d6bd;
  border-radius: 3px;
  box-sizing: border-box;
}

.mini-reel {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px dashed #cfd6e4;
  background: #1d232f;
  box-sizing: border-box;
}

#tape-deck.playing .mini-reel {
  animation: reel-spin 2.4s linear infinite;
}

#deck-download {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

#deck-download:hover {
  background: rgba(255, 255, 255, 0.4);
}

#deck-download.disabled {
  opacity: 0.4;
  pointer-events: none;
}
