/* =======================================================================
   scales.css — UI for Scale Machine
   Clean, tool-like layout with a simple design system.
   --------------------------------------------------------------------- */

/* 1. RESET & BASE TYPOGRAPHY
   ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Color system */
  --bg-body: #0a1124;          /* slate-900 */
  --bg-surface: #010312;
  --bg-panel: #010312;
  --bg-table-header: #020617;
  --bg-table-row: #020617;
  --bg-table-row-alt: #020617; /* slightly different with borders instead */
  --bg-badge: rgba(56, 189, 248, 0.18); /* cyan badge background */

  --border-subtle: rgba(148, 163, 184, 0.4);
  --border-strong: rgba(148, 163, 184, 0.85);

  --accent: #22d3ee;           /* cyan-400 */
  --accent-soft: rgba(34, 211, 238, 0.16);
  --accent-strong: #06b6d4;    /* cyan-500 */

  --text-primary: #e5e7eb;     /* gray-200 */
  --text-secondary: #9ca3af;   /* gray-400 */
  --text-muted: #6b7280;       /* gray-500 */
  --text-inverse: #020617;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;

  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.9);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;

  --content-max-width: 960px;
  --transition-fast: 150ms ease-out;

  /* Smart listening / magic box */
  --listen-strip-height: 2.4rem;
  --listen-strip-radius: 999px;
  --listen-strip-bg: radial-gradient(circle at top,
    rgba(56, 189, 248, 0.22),
    rgba(15, 23, 42, 0.95));
  --listen-strip-border-color: rgba(56, 189, 248, 0.6);
  --listen-strip-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.35),
    0 10px 28px rgba(15, 23, 42, 0.9);

  --magic-box-bg: radial-gradient(circle at top left,
    rgba(56, 189, 248, 0.12),
    rgba(15, 23, 42, 0.98));
  --magic-box-border-radius: var(--radius-lg);
  --magic-box-border-color: rgba(56, 189, 248, 0.5);
  --magic-box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 18px 42px rgba(0, 0, 0, 0.85);

  --magic-box-padding-inline: 1.1rem;
  --magic-box-padding-block: 0.85rem;
  --magic-box-staff-scale: 1;
  --magic-box-emoji-size: 1.1rem;
  --magic-box-emoji-offset-y: -10px;

  --magic-box-transition-duration: 180ms;
  --magic-box-transition-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.26), transparent 60%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.2), transparent 55%),
    var(--bg-body);
  display: flex;
  flex-direction: column;
}

/* 2. PAGE LAYOUT
   ------------------------------------------------------------------ */

.app-header,
.app-main,
.app-footer {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.app-header {
  padding-top: 1.75rem;
  padding-bottom: 0.5rem;
}

.app-main {
  flex: 1;
  padding-bottom: 1.5rem;
}

.app-footer {
  padding-top: 0.75rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 3. HEADER
   ------------------------------------------------------------------ */

.app-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.9rem);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e5f9ff;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.app-title::after {
  content: "●";
  font-size: 0.55em;
  color: var(--accent-strong);
  opacity: 0.8;
}

.app-tagline {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 4. CONTROL PANEL
   ------------------------------------------------------------------ */

.control-panel {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      120deg,
      rgba(15, 23, 42, 0.85),
      rgba(15, 23, 42, 0.97)
    );
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.control-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
}

/* Custom select styling */
.control-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;

  width: 100%;
  padding: 0.5rem 2.1rem 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font-size: 0.9rem;

  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.control-select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.control-select:focus-visible {
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.28),
    0 0 0 4px rgba(34, 211, 238, 0.2);
  transform: translateY(-0.5px);
}

/* Arrow */
.control-select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    right 0.75rem center,
    right 0.4rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Simplify toggle (■ vs ■■) */
.simplify-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.simplify-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.simplify-toggle:focus-visible {
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.28),
    0 0 0 4px rgba(34, 211, 238, 0.2);
}

/* 5. GRID SECTION & STATUS
   ------------------------------------------------------------------ */

.grid-section {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

.grid-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: var(--bg-badge);
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.grid-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-strong), transparent 65%);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.9);
}

.notation-grid {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.staff-row {
  padding: 0.25rem 0.25rem 0.2rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.5);
}

/* The tonic the grid was rotated to. Decoration, not navigation — the row is
   already first. Marked with weight and a rule, never colour alone. */
.staff-row--tonic {
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
  background: var(--accent-soft);
}

.staff-row--tonic .staff-label {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Song banner ------------------------------------------------------- */

.song-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--bg-panel);
}

.song-banner[hidden] {
  display: none;
}

.song-banner-body {
  min-width: 0;
  flex: 1 1 18rem;
}

.song-banner-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.song-banner-title[hidden] {
  display: none;
}

.song-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.song-banner-link,
.song-banner-clear {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.song-banner-link {
  border-color: var(--accent);
  color: var(--accent);
}

.song-banner-link:hover,
.song-banner-clear:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.song-banner-link[hidden],
.song-banner-clear[hidden] {
  display: none;
}

/* Empties the song slot entirely. Distinct from "Start from X", which only
   changes where the twelve begin. */
.song-banner-dismiss {
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.song-banner-dismiss:hover {
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.staff-label {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.staff-svg {
  display: block;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.staff-svg svg {
  width: 100%;
  height: auto;
  display: block;
}

.staff-fallback {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
}

/* 6. SCALE TABLE
   ------------------------------------------------------------------ */

.scale-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  min-width: 640px; /* allow horizontal scroll on small screens */
  font-size: 0.88rem;
}

.scale-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.scale-table th,
.scale-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.6); /* blue-ish separators */
}

.scale-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 1),
    rgba(15, 23, 42, 0.96)
  );
}

/* Concert key column */
.scale-table td:first-child {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e0f2fe; /* light blue */
  width: 5rem;
}

/* Written key / scale column */
.scale-table td:nth-child(2) {
  white-space: nowrap;
  color: #f9fafb;
}

/* Notes column */
.scale-table td:nth-child(3) {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: #e5f9ff;
}

/* Row striping & hover */
.scale-table tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.9);
}

.scale-table tbody tr:nth-child(odd) td {
  background: rgba(15, 23, 42, 0.96);
}

.scale-table tbody tr:hover td {
  background: radial-gradient(
      circle at left,
      rgba(34, 211, 238, 0.14),
      transparent 60%
    ),
    rgba(15, 23, 42, 0.97);
  border-bottom-color: rgba(34, 211, 238, 0.6);
}

/* 7. NO-JS WARNING
   ------------------------------------------------------------------ */

.no-js-warning {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: #7f1d1d;
  color: #fee2e2;
  font-size: 0.85rem;
  border: 1px solid #fecaca;
}

/* 8. FOOTER
   ------------------------------------------------------------------ */

.app-footer p {
  margin: 0;
}

/* 9. RESPONSIVE TWEAKS
   ------------------------------------------------------------------ */

@media (max-width: 768px) {
  .app-header,
  .app-main,
  .app-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .control-panel {
    grid-template-columns: repeat(3, 1fr);
    padding: 0.9rem 0.9rem 1rem;
    gap: 0.9rem;
  }

  .grid-section {
    padding: 0.9rem 0.9rem 1.1rem;
  }

  .app-title {
    font-size: 1.4rem;
  }

  .app-tagline {
    font-size: 0.83rem;
  }
}

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


/* 10. SMART LISTENING PANEL / MAGIC BOX
   ------------------------------------------------------------------ */

.listen-panel {
  margin-top: 1.25rem;
}

/* Collapsed strip (button) */

.listen-strip {
  appearance: none;
  width: 100%;
  height: var(--listen-strip-height);
  border-radius: var(--listen-strip-radius) var(--listen-strip-radius) 0 0;
  border: 1px solid var(--listen-strip-border-color);
  background: var(--listen-strip-bg);
  box-shadow: var(--listen-strip-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0.9rem;
  color: #ecfeff;
  cursor: pointer;
  outline: none;
  gap: 0.75rem;
  text-align: left;
  transition:
    background 160ms ease,
    transform 120ms ease,
    box-shadow 160ms ease;
}

.listen-strip:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.5),
    0 14px 32px rgba(0, 0, 0, 0.9);
}

.listen-strip:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.55),
    0 10px 24px rgba(15, 23, 42, 0.9);
}

.listen-strip-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.listen-strip-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.listen-strip-label {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Status text lives inside the strip, but stays quiet */

.listen-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Magic box container (starts collapsed) */

/* Legacy alias — in case any old markup still uses listen-active-box */
.listen-active-box,
.active-scale-box {
  position: relative;
  border-radius: 0 0 var(--magic-box-border-radius) var(--magic-box-border-radius);
  background: var(--magic-box-bg);
  border: 1px solid var(--magic-box-border-color);
  box-shadow: var(--magic-box-shadow);
  padding: var(--magic-box-padding-block) var(--magic-box-padding-inline);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity var(--magic-box-transition-duration) var(--magic-box-transition-ease),
    transform var(--magic-box-transition-duration) var(--magic-box-transition-ease),
    max-height var(--magic-box-transition-duration) var(--magic-box-transition-ease);
}

/* When the panel is open, expand and show the magic box */
.listen-panel.is-open .active-scale-box {
  max-height: 420px; /* plenty of room for one staff + emoji lane */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.listen-active-status {
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--md-sys-color-on-primary);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Stage area where VexFlow will render */

.active-scale-stage {
  width: 100%;
  transform: scale(var(--magic-box-staff-scale));
  transform-origin: center top;
}

/* Close button in the corner */

.active-scale-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: rgba(226, 232, 240, 0.8);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.15rem;
  line-height: 1;
}

.active-scale-close:hover {
  color: #e5f9ff;
}

.listen-active-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.listen-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.listen-tuner-strip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

.tuner-gauge {
  position: relative;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: #1e293b;
}

.tuner-gauge-flat {
  flex: 1;
  background: linear-gradient(to right, #eab308 0%, #facc15 100%);
  opacity: 0.7;
}

.tuner-gauge-green {
  flex: 0.6;
  background: linear-gradient(to right, #22c55e, #4ade80, #22c55e);
}

.tuner-gauge-sharp {
  flex: 1;
  background: linear-gradient(to left, #3b82f6 0%, #60a5fa 100%);
  opacity: 0.7;
}

.tuner-center-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f9fafb;
  transform: translateX(-50%);
  z-index: 2;
}

.tuner-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 4px;
  background: #f9fafb;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  transition: left 0.08s ease-out;
  z-index: 3;
}

.tuner-needle.tuner-needle-hidden {
  opacity: 0.3;
}

.tuner-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Overall embouchure offset — the absolute story, reported once here so the
   per-note lights are free to show deviation from the player's own center. */
.tuner-drift {
  font-size: 0.65rem;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  opacity: 0.85;
  min-height: 0.9rem;
}

.tuner-drift.tuner-drift-flat {
  color: #facc15;
}

.tuner-drift.tuner-drift-sharp {
  color: #60a5fa;
}

.tuner-drift.tuner-drift-centered {
  color: #4ade80;
}

.listen-reset-button {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
}

.listen-reset-button:hover {
  border-color: #38bdf8;
  color: #f9fafb;
}

.listen-header-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Matches the reset button; the pressed state is filled, not just recoloured. */
.listen-loop-toggle {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  white-space: nowrap;
}

.listen-loop-toggle:hover {
  border-color: #38bdf8;
  color: #f9fafb;
}

.listen-loop-toggle[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #f9fafb;
  font-weight: 600;
}

/* Small-screen tweaks */

@media (max-width: 640px) {
  .listen-strip {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding-block: 0.6rem;
  }
}

/* 11. TUNING OVERLAY
   ------------------------------------------------------------------ */

.tuning-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tuning-overlay.hidden {
  display: none;
}

.tuning-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 2.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.92)
  );
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.2),
    0 25px 60px rgba(0, 0, 0, 0.7);
  max-width: 360px;
  width: 90%;
  text-align: center;
}

.tuning-overlay-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #e5f9ff;
  letter-spacing: 0.02em;
}

.tuning-overlay-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 0.65rem 2.2rem 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 55%),
    rgba(15, 23, 42, 0.95);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);

  /* Arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    right 0.85rem center,
    right 0.5rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.tuning-overlay-select:hover {
  border-color: var(--accent);
}

.tuning-overlay-select:focus-visible {
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.28),
    0 0 0 4px rgba(34, 211, 238, 0.15);
}

.tuning-overlay-button {
  width: 100%;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(
    135deg,
    var(--accent-strong),
    var(--accent)
  );
  color: var(--text-inverse);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.tuning-overlay-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
}

.tuning-overlay-button:active:not(:disabled) {
  transform: translateY(0);
}

.tuning-overlay-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}