/* ==========================================================================
   PonPonStarter — Studio Deck Design System (Decluttered)
   Light matte rehearsal hardware chassis + recessed dark cue monitor
   3-color functional audio phase coding:
     Amber  (#D98A1A) = Pre-roll
     Red    (#E63B2E) = Count-in Beats
     Cobalt (#2557D6) = Music Track
   ========================================================================== */

:root {
  --canvas: #EEF0F4;
  --surface: #FFFFFF;
  --surface-sub: #F6F7FA;
  --border: #DCE1E9;
  --border-strong: #C2CAD6;

  --ink: #141821;
  --ink-secondary: #4B5565;
  --ink-muted: #6C7689;

  /* Recessed Hardware Monitor Screen */
  --deck-bg: #141923;
  --deck-surface: #1D2432;
  --deck-border: #2C3548;
  --deck-ink: #F2F5FA;
  --deck-muted: #93A0B8;

  /* 3 Functional Audio Phase Accents */
  --signal: #E63B2E;
  --signal-hover: #CC2F23;
  --signal-soft: #FDECEB;
  --cobalt: #2557D6;
  --cobalt-soft: #EBF1FD;
  --amber: #D98A1A;
  --amber-soft: #FDF4E6;
  --emerald: #137A4B;
  --emerald-soft: #E8F6EF;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --font-sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'Space Grotesk', 'DIN Alternate', 'Zen Kaku Gothic New', sans-serif;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
}

button, input {
  font-family: inherit;
}

button {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible,
label[role="button"]:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 2px;
}

.num-display {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.app-shell {
  max-width: 1020px;
  margin: 0 auto;
  padding: 20px 18px 44px;
}

/* ---------- Header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--deck-bg);
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-mark .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4A5568;
}

.brand-mark .dot.active {
  background: var(--signal);
  box-shadow: 0 0 8px rgba(230, 59, 46, 0.7);
}

.brand-title {
  margin: 0;
  font-family: var(--font-num);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  margin: 1px 0 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

/* ---------- Recessed Studio Cue Monitor Deck ---------- */
.monitor-deck {
  background: var(--deck-bg);
  color: var(--deck-ink);
  border: 1px solid #0C1018;
  border-radius: var(--radius-lg);
  padding: 16px 18px 16px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 20px rgba(17, 24, 39, 0.1);
}

.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.phase-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--deck-muted);
}

.phase-lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #51607A;
  flex-shrink: 0;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.phase-lamp[data-phase="preroll"] {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(217, 138, 26, 0.85);
}

.phase-lamp[data-phase="count"] {
  background: var(--signal);
  box-shadow: 0 0 12px rgba(230, 59, 46, 0.95);
}

.phase-lamp[data-phase="music"] {
  background: #4F83FF;
  box-shadow: 0 0 12px rgba(79, 131, 255, 0.9);
}

.transport-time {
  font-size: 0.9rem;
  color: var(--deck-ink);
  letter-spacing: 0.02em;
}

.transport-time .time-sep,
.transport-time .muted {
  color: var(--deck-muted);
}

/* Beat Step LED Strip */
.beat-strip {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 11px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.beat-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--deck-surface);
  border: 1px solid var(--deck-border);
  font-family: var(--font-num);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--deck-muted);
  transition: transform 80ms ease, background-color 80ms ease, border-color 80ms ease, color 80ms ease;
  user-select: none;
}

.beat-pad.pad-preroll {
  min-width: auto;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  border-color: rgba(217, 138, 26, 0.4);
  color: #F4BE6A;
}

.beat-pad.pad-preroll.is-active {
  background: rgba(217, 138, 26, 0.25);
  border-color: var(--amber);
  color: #FFF4DF;
}

.beat-pad.pad-hit {
  color: #F4F6FA;
  border-color: rgba(230, 59, 46, 0.45);
}

.beat-pad.pad-hit.is-active {
  background: var(--signal);
  border-color: #FF756A;
  color: #FFFFFF;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(230, 59, 46, 0.65);
}

.beat-pad.pad-rest {
  min-width: 28px;
  opacity: 0.5;
  border-style: dashed;
}

.beat-pad.pad-music {
  flex: 1;
  min-width: 84px;
  flex-direction: row;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  border-color: rgba(79, 131, 255, 0.45);
  color: #93B4FF;
}

.beat-pad.pad-music.is-active {
  background: rgba(37, 87, 214, 0.35);
  border-color: #6B97FF;
  color: #FFFFFF;
}

/* Waveform Canvas Stage */
.waveform-stage {
  position: relative;
  width: 100%;
  height: 124px;
  background: #0F131C;
  border: 1px solid var(--deck-border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 13px;
}

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

/* Transport Controls */
.transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.transport-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 80ms ease, opacity 120ms ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--signal);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background: var(--signal-hover);
}

.btn-secondary {
  background: #273247;
  color: #F2F5FA;
  border-color: #394866;
}

.btn-secondary:hover:not(:disabled) {
  background: #32405B;
}

.btn-ghost-dark {
  background: transparent;
  color: #CBD5E5;
  border-color: #38445C;
}

.btn-ghost-dark:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.btn-stop {
  background: #1C2330;
  color: #E2E8F0;
  border-color: #3A4458;
}

.btn-stop:hover:not(:disabled) {
  background: #2A3346;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 120ms ease;
}

.btn-outline-sm:hover {
  background: var(--surface-sub);
}

.btn-link {
  margin-left: auto;
  background: none;
  border: none;
  padding: 3px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cobalt);
  cursor: pointer;
  border-radius: 4px;
}

.btn-link:hover {
  background: var(--cobalt-soft);
}

/* ---------- Console Grid ---------- */
.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.console-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

/* ---------- Audio Drop Zone ---------- */
.drop-zone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-sub);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
}

.drop-zone:focus-within {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 2px;
}

.drop-zone.has-file {
  border-style: solid;
  border-color: var(--border);
  background: var(--surface);
}

.drop-zone.has-file.is-dragover {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
}

.drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
}

.drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--cobalt);
  margin-bottom: 9px;
}

.drop-headline {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.drop-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.file-loaded {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
}

.file-info {
  min-width: 0;
}

.file-name {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.inline-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--signal-soft);
  color: #9E1F16;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ---------- Timing Offset & Count Volume ---------- */
.control-block + .control-block-sep {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.control-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.control-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.control-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.offset-readout {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.offset-readout.is-shifted {
  color: var(--cobalt);
}

.offset-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nudge-btn {
  min-width: 50px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-sub);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.nudge-btn:hover {
  background: var(--cobalt-soft);
  border-color: var(--cobalt);
  color: var(--cobalt);
}

input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--cobalt);
  cursor: pointer;
}

.offset-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 58px;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* ---------- Rhythm Patterns & BPM ---------- */
.pattern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.pattern-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 12px;
  background: var(--surface-sub);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.pattern-card:hover {
  border-color: var(--border-strong);
  background: #FFFFFF;
}

.pattern-card.active {
  border-color: var(--signal);
  background: var(--signal-soft);
}

.pattern-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.pattern-label {
  font-family: var(--font-num);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.pattern-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.pattern-card.active .pattern-meta {
  color: #B62A1F;
}

.pattern-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.p-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-secondary);
}

.pattern-card.active .p-dot {
  background: var(--signal);
}

.p-rest {
  width: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--border-strong);
}

.p-go {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--cobalt);
  margin-left: 2px;
}

/* BPM & Tap Tempo */
.bpm-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  align-items: end;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.bpm-input-group {
  display: flex;
  align-items: stretch;
  gap: 5px;
}

.step-btn {
  width: 36px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-sub);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.step-btn:hover {
  background: #E8ECF3;
}

.bpm-input {
  width: 100%;
  min-width: 64px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  padding: 0 6px;
}

.bpm-shortcuts {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.chip-btn {
  flex: 1;
  min-height: 28px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface-sub);
  color: var(--ink-secondary);
  font-family: var(--font-num);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-btn:hover {
  background: #E5E9F1;
  color: var(--ink);
}

.tap-tempo-btn {
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 60ms ease, background-color 100ms ease, border-color 100ms ease;
}

.tap-tempo-btn:hover {
  background: #232A3A;
}

.tap-tempo-btn:active,
.tap-tempo-btn.is-tapped {
  transform: scale(0.97);
  background: var(--signal);
  border-color: var(--signal);
}

.tap-main {
  font-size: 0.9rem;
  font-weight: 700;
}

.tap-sub {
  font-size: 0.74rem;
  color: #C2CBE0;
}

.tap-tempo-btn.is-tapped .tap-sub {
  color: #FFE4E2;
}

/* ---------- Speaker Anti-Cutoff ---------- */
.preroll-group {
  margin-bottom: 12px;
}

.seg-control {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.seg-btn:hover {
  border-color: var(--border-strong);
}

.seg-btn.active {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #8A5205;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 120ms ease;
}

.toggle-row.is-muted {
  opacity: 0.48;
  cursor: not-allowed;
}

.toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toggle-copy strong {
  font-size: 0.83rem;
  color: var(--ink);
}

.toggle-copy span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #BCC5D4;
  flex-shrink: 0;
  transition: background-color 140ms ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 140ms ease;
}

.toggle-input:checked + .toggle-track {
  background: var(--amber);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-input:focus-visible + .toggle-track {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 2px;
}

/* ---------- Export Panel ---------- */
.export-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.format-switch {
  display: inline-flex;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.format-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-num);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.format-btn.active {
  background: var(--ink);
  color: #FFFFFF;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-sub);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.preset-card:hover {
  border-color: var(--border-strong);
  background: #FFFFFF;
}

.preset-card.active {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
}

.preset-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.preset-sub {
  font-family: var(--font-num);
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.export-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.size-line {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.size-line strong {
  font-size: 1.12rem;
  color: var(--ink);
}

.btn-export {
  min-height: 44px;
  padding: 0 22px;
  background: var(--cobalt);
  color: #FFFFFF;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
}

.btn-export:hover:not(:disabled) {
  background: #1C46B5;
}

/* Progress & Result */
.progress-wrap {
  margin-top: 12px;
  padding: 11px 13px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-track {
  height: 7px;
  background: #DDE2EC;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cobalt);
  border-radius: 999px;
  transition: width 100ms linear;
}

.export-result {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  background: var(--emerald-soft);
  border: 1px solid #B6DFCA;
  color: #0D5935;
  font-size: 0.84rem;
  font-weight: 600;
  word-break: break-all;
}

.export-result.is-error {
  background: var(--signal-soft);
  border-color: #F2B8B2;
  color: #9E1F16;
}

/* Footer */
.app-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.app-footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .console-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .app-shell {
    padding: 14px 12px 36px;
  }

  .monitor-deck {
    padding: 14px;
  }

  .waveform-stage {
    height: 108px;
  }

  .transport-actions {
    width: 100%;
  }

  .transport-actions .btn {
    flex: 1 1 auto;
    padding: 0 11px;
    font-size: 0.83rem;
  }

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

  .bpm-box {
    grid-template-columns: 1fr;
  }

  .panel,
  .export-panel {
    padding: 15px;
  }

  .export-cta,
  .btn-export {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
