/* Canvas layers, HUD, effects, and gameplay presentation. */
    .arcade-canvas-wrap {
      position: relative;
      width: 100%;
      height: clamp(340px, 64vh, 560px);
      border-radius: 12px;
      overflow: hidden;
      background: radial-gradient(circle at 50% 0%, #111, #000 70%);
    }
    .layer-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      touch-action: none;
    }
    .product-flash {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      text-decoration: none;
      transition: opacity 0.5s ease, visibility 0.5s ease;
      z-index: 10;
    }
    .product-flash.show {
      opacity: 0.95;
      visibility: visible;
      pointer-events: auto;
    }
    .product-flash:focus-visible {
      outline: 2px solid var(--neon, #00ff9d);
      outline-offset: -6px;
    }
    .product-flash img {
      max-width: 55%;
      max-height: 55%;
      object-fit: contain;
      border-radius: 10px;
      filter: drop-shadow(0 0 18px rgba(0,255,157,0.5));
    }
    .product-flash-name {
      font-family: 'Space Mono', monospace;
      font-size: 0.66rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--neon, #00ff9d);
      background: rgba(0,0,0,0.6);
      padding: 4px 10px;
      border-radius: 999px;
      border: 1px solid rgba(0,255,157,0.4);
    }
    #dodArcadeBgCanvas {
      z-index: 0;
    }
    #dodArcadeGameCanvas {
      z-index: 1;
    }
    #dodArcadeFxCanvas {
      z-index: 3;
      pointer-events: none;
    }
    .scanline-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0.16;
      background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.04) 0px,
        rgba(255,255,255,0.04) 1px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0) 4px
      );
      mix-blend-mode: screen;
      z-index: 2;
    }
    .fog-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 2;
      background:
        radial-gradient(58% 38% at 20% 18%, rgba(132,245,255,0.10), transparent 72%),
        radial-gradient(46% 40% at 80% 68%, rgba(107,255,159,0.10), transparent 76%);
    }
    .in-game-hud {
      position: absolute;
      top: 8px;
      left: 8px;
      right: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.5rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      pointer-events: none;
      z-index: 2;
    }
    .in-game-hud .mini-pill {
      border-radius: 999px;
      border: 1px solid rgba(0,255,157,0.4);
      padding: 3px 7px;
      background: rgba(0,0,0,0.45);
      white-space: nowrap;
    }
    .in-game-hud .fx {
      color: #9be9ff;
      margin-left: 6px;
    }
    .wave-readout {
      position: absolute;
      bottom: 8px;
      left: 8px;
      border-radius: 999px;
      border: 1px solid rgba(0,255,157,0.32);
      padding: 3px 8px;
      font-size: 0.5rem;
      letter-spacing: 0.1em;
      background: rgba(0,0,0,0.5);
      text-transform: uppercase;
      z-index: 2;
      pointer-events: none;
    }
    .combo-decay {
      position: absolute;
      left: 8px;
      right: 8px;
      top: 31px;
      height: 3px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      z-index: 2;
      pointer-events: none;
      overflow: hidden;
    }
    .combo-decay-fill {
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255,240,140,0.9), rgba(255,130,90,0.9));
      transition: width 0.08s linear;
    }
    .danger-vignette {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 3;
      opacity: 0;
      transition: opacity 0.2s ease;
      background: radial-gradient(circle at center, rgba(0,0,0,0) 40%, rgba(255, 38, 38, 0.35) 100%);
    }
    .danger-vignette.active {
      opacity: 1;
      animation: pulseDanger 1.1s ease-in-out infinite;
    }
    @keyframes pulseDanger {
      0%, 100% { opacity: 0.35; }
      50% { opacity: 0.75; }
    }
    .event-banner {
      position: absolute;
      top: 46%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 4;
      opacity: 0;
      pointer-events: none;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-size: 0.66rem;
      border: 1px solid rgba(0,255,157,0.4);
      border-radius: 999px;
      padding: 8px 14px;
      background: rgba(0,0,0,0.74);
      transition: opacity 0.2s ease;
    }
    .event-banner.show {
      opacity: 1;
    }
    .score-popups {
      position: absolute;
      inset: 0;
      z-index: 4;
      pointer-events: none;
      overflow: hidden;
    }
    .score-popup {
      position: absolute;
      transform: translate(-50%, 0);
      font-size: 0.58rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #d9fff0;
      text-shadow: 0 0 8px rgba(0,255,157,0.45);
      opacity: 0;
      animation: floatScore 0.75s ease-out forwards;
      white-space: nowrap;
    }
    .score-popup.perfect {
      color: #fff4be;
      text-shadow: 0 0 10px rgba(255,228,122,0.6);
    }
    .score-popup.heal {
      color: #b6ffd4;
      text-shadow: 0 0 10px rgba(107,255,159,0.55);
    }
    @keyframes floatScore {
      0% { opacity: 0; transform: translate(-50%, 4px) scale(0.9); }
      15% { opacity: 1; }
      100% { opacity: 0; transform: translate(-50%, -38px) scale(1); }
    }
    .boss-state-indicator {
      position: absolute;
      top: 22px;
      right: 8px;
      z-index: 4;
      pointer-events: none;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.26);
      background: rgba(0,0,0,0.62);
      font-size: 0.48rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 3px 8px;
      opacity: 0;
      transition: opacity 0.16s ease;
    }
    .boss-state-indicator.show {
      opacity: 1;
    }
    .boss-state-indicator.armored {
      border-color: rgba(180,180,180,0.5);
      color: #d0d0d0;
    }
    .boss-state-indicator.vulnerable {
      border-color: rgba(0,255,157,0.62);
      color: #7cffc7;
    }
    .hit-flash {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
      opacity: 0;
      background: radial-gradient(circle at center, rgba(255,255,255,0.18), rgba(255,255,255,0));
      transition: opacity 0.06s linear;
    }
    .hit-flash.show {
      opacity: 1;
    }

