  :root {
    --bg-body: #090a0c;
    --bg-chassis: linear-gradient(145deg, #1a1d24, #101216);
    --bg-screen: #05080a;
    --accent-cyan: #00e5ff;
    --accent-amber: #ff9d00;
    --accent-red: #ff2a55;
    --text-main: #e2e8f0;
    --text-dim: #64748b;
    --btn-bg: linear-gradient(180deg, #262b34, #171a20);
    --btn-active: #0d0f13;
  }

  * {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    margin: 0;
    padding: 16px;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }

  /* プレイヤー筐体 */
  .deck-chassis {
    width: 100%;
    max-width: 680px;
    background: var(--bg-chassis);
    border: 1px solid #2d333f;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  }

  .deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222630;
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-dim);
  }

  .deck-header .brand {
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  }
  
  
  /* 1. アナログVUメーターエリア（CSS描画・完全版） */
  .vu-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
  }

  .vu-meter {
    background: radial-gradient(circle at 50% 105%, #3d2b15 0%, #14100c 70%, #07080a 100%);
    border: 2px solid #2a2f3a;
    border-radius: 8px;
    height: 122px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  /* チャンネル表示をCSSのみで生成 */
  .vu-meter.ch-left::before {
    content: "CH-1: LEFT (L)";
  }
  .vu-meter.ch-right::before {
    content: "CH-2: RIGHT (R)";
  }
  .vu-meter::before {
    position: absolute;
    top: 7px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-amber);
    text-shadow: 0 1px 2px #000;
    z-index: 2;
  }

  /* "VU dB" 単位表示をCSSのみで生成 */
  .vu-meter::after {
    content: "VU dB";
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #9c805c;
    text-shadow: 0 1px 2px #000;
    z-index: 1;
  }

  /* メーター円弧ライン（左右完全対称・レッドゾーン一体型） */
  .vu-arc {
    position: absolute;
    bottom: -88px;
    left: 50%;
    width: 176px;
    height: 176px;
    transform: translateX(-50%);
    border-radius: 50%;
    /* -45度〜+25度まで通常色、+25度〜+45度までレッドゾーンを左右対称に描画 */
    background: conic-gradient(
      from -45deg at 50% 50%,
      #9e825c 0deg 70deg,
      #ff2a55 70deg 90deg,
      transparent 90deg 360deg
    );
    /* 外周2pxのリング状（円弧）に切り抜く */
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    pointer-events: none;
  }

  /* 旧 ::after は不要なためリセット */
  .vu-arc::after {
    content: none;
  }


  /* 目盛り数値の配置ベース */
  .vu-ticks {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .vu-ticks i {
    font-style: normal;
    position: absolute;
    bottom: -10px;
    left: 50%;
    height: 106px;
    width: 28px;
    margin-left: -14px;
    transform-origin: bottom center;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: bold;
    color: #d4b483;
    text-shadow: 0 1px 2px #000;
  }

  .vu-ticks i::after {
    content: "";
    display: block;
    width: 1px;
    height: 5px;
    background: currentColor;
    margin: 1px auto 0;
  }

  /* 各dB数値と角度をCSSのcontentで完全描画 */
  .vu-ticks i:nth-child(1) { transform: rotate(-44deg); }
  .vu-ticks i:nth-child(1)::before { content: "-70"; }

  .vu-ticks i:nth-child(2) { transform: rotate(-24deg); }
  .vu-ticks i:nth-child(2)::before { content: "-10"; }

  .vu-ticks i:nth-child(3) { transform: rotate(-11deg); }
  .vu-ticks i:nth-child(3)::before { content: "-7"; }

  .vu-ticks i:nth-child(4) { transform: rotate(2deg); }
  .vu-ticks i:nth-child(4)::before { content: "-5"; }

  .vu-ticks i:nth-child(5) { transform: rotate(15deg); }
  .vu-ticks i:nth-child(5)::before { content: "-3"; }

  .vu-ticks i:nth-child(6) { transform: rotate(28deg); color: #ff5e7e; }
  .vu-ticks i:nth-child(6)::before { content: "0"; }

  .vu-ticks i:nth-child(7) { transform: rotate(43deg); color: #ff2a55; }
  .vu-ticks i:nth-child(7)::before { content: "+3"; }

  /* ピークLED */
  .vu-peak-led {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #331118;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: background 0.05s;
    z-index: 2;
  }

  .vu-peak-led.on {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
  }

  /* メーター針 */
  .vu-needle {
    position: absolute;
    bottom: -14px;
    left: 50%;
    width: 2px;
    height: 98px;
    background: #ff4500;
    box-shadow: 0 0 4px rgba(255, 69, 0, 0.85);
    transform-origin: bottom center;
    transform: rotate(-45deg);
    transition: transform 0.06s ease-out;
    z-index: 3;
  }

  /* 針の軸キャップ */
  .vu-cap {
    position: absolute;
    bottom: -10px;
    left: calc(50% - 11px);
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 35% 35%, #3a404d, #111318);
    border: 2px solid #4a5262;
    border-radius: 50%;
    z-index: 4;
  }

  /* スマホ画面用レスポンシブ調整 */
  @media (max-width: 480px) {
    .vu-meter { height: 104px; }
    .vu-ticks i { height: 90px; font-size: 8px; }
    .vu-needle { height: 84px; }
    .vu-arc { width: 150px; height: 150px; bottom: -48px; }
  }



  /* 液晶ディスプレイ（情報＆ブラウザ画面） */
  .lcd-display {
    background: var(--bg-screen);
    border: 2px solid #252a34;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.95);
  }

  .status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-family: monospace;
  }

  .track-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    color: #fff;
  }

  /* シークバー */
  .progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
  }

  input[type="range"] {
    flex: 1;
    accent-color: var(--accent-cyan);
    cursor: pointer;
    height: 4px;
    background: #1e242b;
    border-radius: 2px;
  }

  /* ブラウザリスト（フォルダ・曲一覧） */
  .browser-box {
    background: #090d12;
    border: 1px solid #1b222c;
    border-radius: 6px;
    height: 150px;
    overflow-y: auto;
    padding: 4px;
  }

  .browser-header {
    font-size: 11px;
    color: var(--accent-amber);
    padding: 4px 8px;
    border-bottom: 1px solid #181e26;
    font-family: monospace;
  }

  .list-item {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
  }

  .list-item:hover {
    background: #161d26;
  }

  .list-item.selected {
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
  }

  .list-item.playing {
    color: var(--accent-amber);
    font-weight: bold;
  }

  /* 操作スイッチ群 */
  .controls-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }

  .btn {
    background: var(--btn-bg);
    border: 1px solid #323846;
    border-radius: 8px;
    color: var(--text-main);
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .btn:active, .btn.pressed {
    background: var(--btn-active);
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.6);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
  }

  .btn-play {
    border-color: rgba(0, 229, 255, 0.4);
    color: var(--accent-cyan);
  }

  .btn span.sub {
    font-size: 9px;
    color: var(--text-dim);
    font-weight: normal;
  }

  /* 音量バー表示 */
  .vol-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0c0e12;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #1f242d;
    font-size: 12px;
    font-family: monospace;
  }

  .vol-bars {
    display: flex;
    gap: 3px;
  }

  .vol-bar {
    width: 8px;
    height: 12px;
    background: #1e242b;
    border-radius: 1px;
  }

  .vol-bar.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 5px var(--accent-cyan);
  }

  /* スマホ・タブレット対応レスポンシブ */
  @media (max-width: 480px) {
    .deck-chassis {
      padding: 14px;
    }
    .vu-meter {
      height: 85px;
    }
    .vu-needle {
      height: 74px;
    }
    .controls-grid {
      gap: 8px;
    }
    .btn {
      padding: 10px 4px;
      font-size: 11px;
    }
  }
