    :root {
      --bg: #070b16;
      --bg-soft: #0d1324;
      --panel: rgba(16, 23, 42, 0.86);
      --panel-strong: rgba(19, 28, 50, 0.96);
      --line: rgba(148, 163, 184, 0.15);
      --line-strong: rgba(148, 163, 184, 0.28);
      --text: #f8fafc;
      --muted: #94a3b8;
      --muted-2: #64748b;
      --accent: #7c9cff;
      --accent-2: #5eead4;
      --accent-3: #c084fc;
      --good: #34d399;
      --warn: #fbbf24;
      --danger: #fb7185;
      --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 16px;
      --radius-sm: 12px;
      --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    }

    * {
      box-sizing: border-box;
    }

    html {
      min-width: 320px;
      background: var(--bg);
    }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--text);
      font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
      background:
        radial-gradient(circle at 16% -10%, rgba(124, 156, 255, 0.28), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(94, 234, 212, 0.17), transparent 30%),
        radial-gradient(circle at 60% 95%, rgba(192, 132, 252, 0.12), transparent 34%),
        linear-gradient(180deg, #080c18 0%, #060914 100%);
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      opacity: 0.35;
      background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
      background-size: 32px 32px;
      mask-image: linear-gradient(to bottom, black, transparent 80%);
    }

    button,
    input,
    select {
      font: inherit;
    }

    button,
    label[for="fileInput"] {
      -webkit-tap-highlight-color: transparent;
    }

    .shell {
      width: min(1440px, calc(100% - 32px));
      margin: 0 auto;
      padding: 28px 0 40px;
      position: relative;
      z-index: 1;
    }

    .topbar {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-bottom: 22px;
    }

    .topbar-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 14px;
    }

    .topbar .btn,
    .topbar .file-btn {
      min-height: 36px;
      padding: 0 12px;
      font-size: 12px;
      border-radius: 11px;
    }

    .source-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .source-device {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .source-device-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .source-device select {
      width: auto;
      min-width: 150px;
      height: 36px;
      padding-left: 10px;
    }

    .topbar-tools .source-info {
      margin: 0;
      flex: 1 1 160px;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .topbar .audio-host {
      margin-top: 0;
    }

    .lang-toggle {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 3px;
      border: 1px solid var(--line-strong);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.035);
    }

    .lang-toggle button {
      min-width: 34px;
      height: 26px;
      padding: 0 8px;
      border: 0;
      border-radius: 999px;
      color: var(--muted);
      background: transparent;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      transition: color 150ms ease, background 150ms ease;
    }

    .lang-toggle button:hover {
      color: var(--text);
    }

    .lang-toggle button.is-active {
      color: #07111f;
      background: linear-gradient(135deg, #a5b4fc, #5eead4);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .brand-mark {
      width: 52px;
      height: 52px;
      border: 1px solid rgba(124, 156, 255, 0.35);
      border-radius: 17px;
      display: grid;
      place-items: center;
      font-size: 25px;
      background:
        linear-gradient(145deg, rgba(124, 156, 255, 0.2), rgba(94, 234, 212, 0.08)),
        rgba(255,255,255,0.025);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 10px 30px rgba(7, 12, 28, 0.3);
      flex: 0 0 auto;
    }

    .eyebrow {
      margin: 0 0 4px;
      color: var(--accent-2);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.22em;
      text-transform: uppercase;
    }

    h1 {
      margin: 0;
      font-size: clamp(20px, 2.2vw, 30px);
      line-height: 1.08;
      letter-spacing: -0.035em;
      white-space: nowrap;
    }

    .status-pill {
      min-width: 114px;
      height: 40px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      color: var(--muted);
      background: rgba(255,255,255,0.035);
      font-size: 13px;
      font-weight: 700;
      backdrop-filter: blur(14px);
      margin-left: auto;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--muted-2);
      box-shadow: 0 0 0 4px rgba(100,116,139,0.12);
      transition: 180ms ease;
    }

    .status-pill[data-state="live"] {
      color: #d1fae5;
      border-color: rgba(52,211,153,0.28);
      background: rgba(52,211,153,0.09);
    }

    .status-pill[data-state="live"] .status-dot {
      background: var(--good);
      box-shadow: 0 0 0 4px rgba(52,211,153,0.12), 0 0 16px rgba(52,211,153,0.75);
      animation: pulse 1.6s ease-in-out infinite;
    }

    .status-pill[data-state="error"] {
      color: #fecdd3;
      border-color: rgba(251,113,133,0.28);
      background: rgba(251,113,133,0.08);
    }

    .status-pill[data-state="error"] .status-dot {
      background: var(--danger);
      box-shadow: 0 0 0 4px rgba(251,113,133,0.12);
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.55; transform: scale(0.78); }
    }

    .notice {
      display: none;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 18px;
      padding: 14px 16px;
      border: 1px solid rgba(251,191,36,0.25);
      border-radius: var(--radius-md);
      color: #fde68a;
      background: rgba(251,191,36,0.075);
      font-size: 13px;
      line-height: 1.55;
    }

    .notice.show {
      display: flex;
    }

    .notice strong {
      color: #fef3c7;
    }

    .dashboard {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
      gap: 18px;
    }

    .card {
      position: relative;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      background:
        linear-gradient(145deg, rgba(255,255,255,0.038), rgba(255,255,255,0.008)),
        var(--panel);
      box-shadow: var(--shadow);
      backdrop-filter: blur(24px);
    }

    .card::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
    }

    .metric-card {
      min-height: 340px;
      padding: 26px;
      display: flex;
      flex-direction: column;
    }

    .metric-card.pitch::before,
    .metric-card.chord::before {
      content: "";
      position: absolute;
      width: 300px;
      height: 300px;
      border-radius: 50%;
      filter: blur(55px);
      opacity: 0.13;
      pointer-events: none;
    }

    .metric-card.pitch::before {
      right: -120px;
      top: -120px;
      background: var(--accent);
    }

    .metric-card.chord::before {
      left: -120px;
      top: -140px;
      background: var(--accent-2);
    }

    .card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      position: relative;
      z-index: 1;
    }

    .section-label {
      margin: 0 0 7px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .section-title {
      margin: 0;
      font-size: 17px;
      letter-spacing: -0.02em;
    }

    .micro-badge {
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--muted);
      background: rgba(255,255,255,0.025);
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.05em;
      white-space: nowrap;
    }

    .pitch-main {
      flex: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(210px, 0.68fr);
      gap: 24px;
      align-items: center;
      position: relative;
      z-index: 1;
    }

    .note-wrap {
      min-width: 0;
    }

    .note-line {
      display: flex;
      align-items: flex-start;
      gap: 6px;
      line-height: 0.88;
      margin: 24px 0 16px;
    }

    .note-name {
      font-size: clamp(78px, 9vw, 132px);
      font-weight: 850;
      letter-spacing: -0.08em;
      text-shadow: 0 16px 45px rgba(124,156,255,0.18);
      font-variant-numeric: tabular-nums;
    }

    .note-octave {
      margin-top: 9px;
      color: var(--accent);
      font-size: clamp(28px, 3.4vw, 46px);
      font-weight: 800;
      letter-spacing: -0.06em;
    }

    .pitch-subline {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 10px 16px;
    }

    .frequency {
      font-family: var(--font-mono);
      font-size: clamp(20px, 2.5vw, 34px);
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      letter-spacing: -0.04em;
    }

    .detector-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .pitch-side {
      display: grid;
      gap: 18px;
    }

    .stat-box {
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: rgba(5, 9, 20, 0.28);
    }

    .stat-top {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .stat-name {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .stat-value {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }

    .progress {
      height: 7px;
      border-radius: 999px;
      background: rgba(148,163,184,0.11);
      overflow: hidden;
    }

    .progress > span {
      display: block;
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
      transition: width 110ms linear;
    }

    .tuner {
      padding: 16px 16px 13px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: rgba(5, 9, 20, 0.28);
    }

    .tuner-readout {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      margin-bottom: 15px;
    }

    .cents-value {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 750;
      font-variant-numeric: tabular-nums;
    }

    .tuner-track {
      position: relative;
      height: 38px;
      margin: 0 4px;
    }

    .tuner-track::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 14px;
      height: 2px;
      background:
        linear-gradient(90deg,
          rgba(251,113,133,0.65),
          rgba(251,191,36,0.6) 30%,
          rgba(52,211,153,0.8) 48%,
          rgba(52,211,153,0.8) 52%,
          rgba(251,191,36,0.6) 70%,
          rgba(251,113,133,0.65));
      border-radius: 999px;
    }

    .tuner-track::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 7px;
      width: 1px;
      height: 16px;
      background: rgba(255,255,255,0.72);
    }

    .tuner-needle {
      position: absolute;
      left: 50%;
      top: 2px;
      width: 3px;
      height: 26px;
      border-radius: 3px;
      background: var(--text);
      box-shadow: 0 0 14px rgba(255,255,255,0.55);
      transform: translateX(-50%);
      transition: left 90ms ease-out;
    }

    .tuner-labels {
      display: flex;
      justify-content: space-between;
      color: var(--muted-2);
      font-family: var(--font-mono);
      font-size: 9px;
    }

    .chord-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
      z-index: 1;
    }

    .chord-title-row {
      margin: 30px 0 22px;
    }

    .chord-name {
      min-height: 98px;
      font-size: clamp(68px, 8vw, 112px);
      font-weight: 850;
      line-height: 0.92;
      letter-spacing: -0.08em;
      text-shadow: 0 16px 45px rgba(94,234,212,0.12);
    }

    .chord-description {
      min-height: 22px;
      margin-top: 12px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 650;
    }

    .chroma {
      height: 122px;
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      align-items: end;
      gap: 6px;
      padding: 13px 12px 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: rgba(5, 9, 20, 0.28);
    }

    .chroma-col {
      height: 100%;
      min-width: 0;
      display: grid;
      grid-template-rows: 1fr auto;
      align-items: end;
      gap: 7px;
    }

    .chroma-rail {
      height: 78px;
      border-radius: 6px;
      background: rgba(148,163,184,0.07);
      display: flex;
      align-items: end;
      overflow: hidden;
      position: relative;
    }

    .chroma-bar {
      width: 100%;
      height: 5%;
      border-radius: 5px 5px 2px 2px;
      background: linear-gradient(180deg, var(--accent-2), rgba(124,156,255,0.74));
      box-shadow: 0 0 12px rgba(94,234,212,0.18);
      transition: height 100ms linear, opacity 100ms linear;
      opacity: 0.55;
    }

    .chroma-col.is-tone .chroma-bar {
      opacity: 0.95;
      box-shadow: 0 0 18px rgba(94,234,212,0.28);
    }

    .chroma-col.is-root .chroma-bar {
      background: linear-gradient(180deg, #ffffff, var(--accent));
      box-shadow: 0 0 18px rgba(124,156,255,0.45);
    }

    .chroma-label {
      color: var(--muted-2);
      font-family: var(--font-mono);
      font-size: 9px;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
    }

    .chroma-col.is-tone .chroma-label {
      color: #dbeafe;
    }

    .spectrum-card {
      grid-column: 1 / -1;
      padding: 24px 24px 20px;
    }

    .spectrum-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
    }

    .spectrum-meta {
      display: flex;
      align-items: center;
      gap: 9px;
      color: var(--muted);
      font-family: var(--font-mono);
      font-size: 10px;
      white-space: nowrap;
    }

    .spectrum-meta span {
      padding: 6px 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255,255,255,0.025);
    }

    .spectrum-wrap {
      position: relative;
      height: clamp(260px, 34vw, 420px);
      border: 1px solid var(--line);
      border-radius: 20px;
      overflow: hidden;
      background:
        linear-gradient(180deg, rgba(124,156,255,0.035), rgba(5,9,20,0.38)),
        #080d1c;
    }

    #spectrumCanvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .spectrum-empty {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      pointer-events: none;
      color: var(--muted-2);
      font-size: 13px;
      letter-spacing: 0.02em;
      transition: opacity 180ms ease;
    }

    .spectrum-empty.hidden {
      opacity: 0;
    }

    .level-row {
      display: grid;
      grid-template-columns: auto minmax(120px, 1fr) auto;
      align-items: center;
      gap: 12px;
      margin-top: 14px;
    }

    .level-label,
    .level-db {
      color: var(--muted);
      font-family: var(--font-mono);
      font-size: 10px;
      font-variant-numeric: tabular-nums;
    }

    .level-meter {
      height: 6px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(148,163,184,0.1);
    }

    .level-meter span {
      display: block;
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--warn), var(--danger));
      transition: width 70ms linear;
    }

    .control-card {
      grid-column: 1 / -1;
      padding: 20px;
      display: grid;
      grid-template-columns: 1fr;
    }

    .control-group {
      min-width: 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: rgba(5, 9, 20, 0.22);
    }

    .control-group-title {
      margin: 0 0 13px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    .button-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .btn,
    .file-btn {
      min-height: 44px;
      padding: 0 15px;
      border-radius: 13px;
      border: 1px solid transparent;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      cursor: pointer;
      font-weight: 750;
      font-size: 13px;
      transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, opacity 150ms ease;
      user-select: none;
    }

    .btn:hover:not(:disabled),
    .file-btn:hover {
      transform: translateY(-1px);
    }

    .btn:active:not(:disabled),
    .file-btn:active {
      transform: translateY(0);
    }

    .btn:focus-visible,
    .file-btn:focus-visible,
    select:focus-visible,
    input:focus-visible {
      outline: 2px solid rgba(124,156,255,0.88);
      outline-offset: 2px;
    }

    .btn.primary {
      color: #07111f;
      background: linear-gradient(135deg, #a5b4fc, #5eead4);
      box-shadow: 0 10px 24px rgba(94,234,212,0.12);
    }

    .file-btn {
      color: #e2e8f0;
      border-color: var(--line-strong);
      background: rgba(255,255,255,0.055);
    }

    .btn.ghost {
      color: var(--muted);
      border-color: var(--line);
      background: rgba(255,255,255,0.025);
    }

    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.38;
      transform: none;
    }

    .btn-icon {
      width: 16px;
      height: 16px;
      display: inline-grid;
      place-items: center;
      font-size: 15px;
      line-height: 1;
    }

    .source-info {
      min-height: 22px;
      margin-top: 11px;
      color: var(--muted-2);
      font-size: 11px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }

    select {
      width: 100%;
      height: 44px;
      padding: 0 38px 0 12px;
      color: var(--text);
      border: 1px solid var(--line-strong);
      border-radius: 12px;
      background:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 17px) 18px/5px 5px no-repeat,
        linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 18px/5px 5px no-repeat,
        rgba(255,255,255,0.04);
      appearance: none;
    }

    select:disabled {
      opacity: 0.46;
    }

    .audio-host {
      margin-top: 10px;
    }

    .audio-host:empty {
      display: none;
    }

    .audio-host audio {
      width: 100%;
      height: 38px;
      filter: invert(0.88) hue-rotate(175deg) saturate(0.75);
      opacity: 0.88;
    }

    .sliders {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .slider-field {
      min-width: 0;
    }

    .slider-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 8px;
      margin-bottom: 10px;
    }

    .slider-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .slider-output {
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 10px;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    input[type="range"] {
      width: 100%;
      height: 18px;
      margin: 0;
      background: transparent;
      cursor: pointer;
      appearance: none;
    }

    input[type="range"]::-webkit-slider-runnable-track {
      height: 5px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(124,156,255,0.5), rgba(94,234,212,0.42));
    }

    input[type="range"]::-webkit-slider-thumb {
      width: 15px;
      height: 15px;
      margin-top: -5px;
      border: 2px solid #e2e8f0;
      border-radius: 50%;
      background: #111827;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      appearance: none;
    }

    input[type="range"]::-moz-range-track {
      height: 5px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(124,156,255,0.5), rgba(94,234,212,0.42));
    }

    input[type="range"]::-moz-range-thumb {
      width: 13px;
      height: 13px;
      border: 2px solid #e2e8f0;
      border-radius: 50%;
      background: #111827;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .footnote {
      margin: 17px 2px 0;
      color: var(--muted-2);
      font-size: 11px;
      line-height: 1.6;
      text-align: center;
    }

    .footnote strong {
      color: var(--muted);
      font-weight: 750;
    }

    .footer {
      margin: 20px 2px 0;
      color: var(--muted-2);
      font-size: 11px;
      line-height: 1.8;
    }

    .text-center {
      text-align: center;
    }

    .footer a {
      color: var(--muted);
      text-decoration: none;
      transition: color 150ms ease;
    }

    .footer a:hover {
      color: var(--accent);
    }

    .toast {
      position: fixed;
      z-index: 100;
      left: 50%;
      bottom: 24px;
      width: min(520px, calc(100% - 32px));
      padding: 13px 16px;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      color: var(--text);
      background: rgba(15,23,42,0.94);
      box-shadow: 0 20px 60px rgba(0,0,0,0.45);
      backdrop-filter: blur(18px);
      font-size: 13px;
      line-height: 1.5;
      transform: translate(-50%, 30px);
      opacity: 0;
      pointer-events: none;
      transition: 180ms ease;
    }

    .toast.show {
      transform: translate(-50%, 0);
      opacity: 1;
    }

    @media (max-width: 1040px) {
      .dashboard {
        grid-template-columns: 1fr;
      }

      .spectrum-card,
      .control-card {
        grid-column: 1;
      }

    }

    @media (max-width: 720px) {
      .shell {
        width: min(100% - 20px, 1440px);
        padding-top: 18px;
      }

      .topbar {
        align-items: stretch;
      }

      .topbar-tools .source-info {
        flex-basis: 100%;
      }

      .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 15px;
      }

      .eyebrow {
        font-size: 8px;
      }

      h1 {
        white-space: normal;
        font-size: 21px;
      }

      .status-pill {
        min-width: 40px;
        width: 40px;
        padding: 0;
      }

      .status-pill span:last-child {
        display: none;
      }

      .metric-card {
        min-height: 0;
        padding: 20px;
      }

      .pitch-main {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .pitch-side {
        grid-template-columns: 1fr 1.25fr;
      }

      .note-line {
        margin-top: 30px;
      }

      .chord-name {
        min-height: 72px;
      }

      .chroma {
        gap: 3px;
        padding-left: 7px;
        padding-right: 7px;
      }

      .chroma-label {
        font-size: 8px;
      }

      .spectrum-card {
        padding: 18px 14px 16px;
      }

      .spectrum-meta {
        display: none;
      }

      .spectrum-wrap {
        height: 270px;
        border-radius: 16px;
      }

      .control-card {
        grid-template-columns: 1fr;
        padding: 14px;
      }

      .control-card .control-group:last-child {
        grid-column: 1;
      }

      .sliders {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 440px) {
      .pitch-side {
        grid-template-columns: 1fr;
      }

      .button-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      .button-row .btn.ghost {
        grid-column: 1 / -1;
      }

      .btn,
      .file-btn {
        padding: 0 10px;
      }

      .chroma {
        height: 112px;
      }

      .chroma-rail {
        height: 70px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
      }
    }
