/*
 * OTA Player - Windows 11 Fluent Dark Mode Stylesheet
 * Strict compliance: #121212 & #1c1c1c surfaces, 1px rgba(255,255,255,0.08) borders,
 * #0078D4 accent, 6px border-radius, Segoe UI Variable / Inter, no neon glows, no gradients.
 */

:root {
  --bg-base: #121212;
  --bg-surface: #1c1c1c;
  --bg-elevated: #232323;
  --bg-hover: #2a2a2a;
  --bg-active: #323232;
  --bg-input: #161616;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --accent: #0078D4;
  --accent-hover: #1084d9;
  --accent-active: #006cbe;
  --accent-muted: rgba(0, 120, 212, 0.16);
  --text-primary: #f3f3f3;
  --text-secondary: #adadad;
  --text-muted: #767676;
  --status-online: #2ea043;
  --status-warning: #d29922;
  --status-danger: #d13438;
  --radius-md: 6px;
  --radius-sm: 4px;
  --font-sans: 'Segoe UI Variable', 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'SFMono-Regular', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  touch-action: manipulation;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #454545;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-sm {
  width: 14px;
  height: 14px;
}
.icon-lg {
  width: 20px;
  height: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
}
.btn:active {
  background-color: var(--bg-active);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}
.btn-primary:active {
  background-color: var(--accent-active);
}

/* Prominent High-Visibility Fade-Out Button */
.btn-fadeout {
  background-color: rgba(210, 153, 34, 0.24);
  border: 1px solid #d29922;
  color: #ffd369;
  font-weight: 600;
}
.btn-fadeout:hover {
  background-color: #b88214;
  border-color: #f2cc60;
  color: #ffffff;
}
.btn-fadeout:active {
  background-color: #96680c;
  color: #ffffff;
}

.btn-danger {
  background-color: rgba(209, 52, 56, 0.18);
  border-color: rgba(209, 52, 56, 0.45);
  color: #ff999b;
  font-weight: 600;
}
.btn-danger:hover {
  background-color: var(--status-danger);
  color: #ffffff;
}

.btn-warning {
  background-color: rgba(210, 153, 34, 0.22);
  border-color: rgba(210, 153, 34, 0.55);
  color: #ffd369;
  font-weight: 600;
}
.btn-warning:hover {
  background-color: #9e6a03;
  color: #ffffff;
}

.btn-sm {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 32px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 28px;
}

/* Inputs & Selects */
.input, .select, .textarea {
  height: 32px;
  padding: 0 10px;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.12s ease;
  width: 100%;
}
.textarea {
  height: auto;
  min-height: 68px;
  padding: 8px 10px;
  resize: vertical;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
}
.select {
  cursor: pointer;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.badge-accent {
  background-color: var(--accent-muted);
  border-color: rgba(0, 120, 212, 0.45);
  color: #6cb8f6;
}
.badge-success {
  background-color: rgba(46, 160, 67, 0.15);
  border-color: rgba(46, 160, 67, 0.4);
  color: #56d364;
}
.badge-warning {
  background-color: rgba(210, 153, 34, 0.18);
  border-color: rgba(210, 153, 34, 0.45);
  color: #ffd369;
}
.badge-danger {
  background-color: rgba(209, 52, 56, 0.15);
  border-color: rgba(209, 52, 56, 0.4);
  color: #f85149;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  display: inline-block;
}
.status-dot.online {
  background-color: var(--status-online);
}
.status-dot.warning {
  background-color: var(--status-warning);
}
.status-dot.danger {
  background-color: var(--status-danger);
}

/* Layout Structure */
.app-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-base);
}

.top-header {
  min-height: 52px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.brand-icon-box {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-divider {
  width: 1px;
  height: 22px;
  background-color: var(--border-subtle);
}

.mode-segmented {
  display: inline-flex;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.mode-btn {
  height: 28px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.mode-btn:hover {
  color: var(--text-primary);
}
.mode-btn.active {
  background-color: var(--accent);
  color: #ffffff;
}

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

/* Main Content Full-Width (Right sidebar moved into dedicated Systems & Output Modal) */
.workspace-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background-color: var(--bg-base);
  overflow: hidden;
}

.stage-toolbar {
  min-height: 46px;
  padding: 8px 16px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  position: relative;
}

/* ============================================================================
   SIMPLE MODE: CLEAN & UNCLUTTERED MULTI-PLAY SOUNDBOARD GRID
   ============================================================================ */

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.sound-pad {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.sound-pad:hover {
  background-color: var(--bg-elevated);
  border-color: var(--border-strong);
}
.sound-pad.is-playing {
  border-color: var(--accent);
  border-width: 2px;
  background-color: #16222f;
}
.sound-pad.is-fading {
  border-color: var(--status-warning);
  border-width: 2px;
  background-color: #241e14;
}
.sound-pad.is-paused {
  border-color: var(--border-strong);
}

.pad-color-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--accent);
}

.pad-progress-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  width: 0%;
  background-color: rgba(0, 120, 212, 0.15);
  pointer-events: none;
}

.pad-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pad-cue-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pad-title {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 10px 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pad-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.pad-timer {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.sound-pad.is-playing .pad-timer {
  color: #6cb8f6;
}
.sound-pad.is-fading .pad-timer {
  color: #ffd369;
}

.pad-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================================
   COMPLEX MODE: SHOW-RUNDOWN / CUE TABLE WITH MULTI-OUT & DANTE
   ============================================================================ */

.go-trigger-btn {
  height: 36px;
  padding: 0 22px;
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.go-trigger-btn:hover {
  background-color: var(--accent-hover);
}

.cue-table-wrap {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.cue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.cue-table th {
  text-align: left;
  padding: 9px 10px;
  background-color: #171717;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.cue-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.cue-row {
  transition: background-color 0.1s ease;
  cursor: pointer;
}
.cue-row:hover {
  background-color: var(--bg-elevated);
}
.cue-row.is-standby {
  background-color: rgba(0, 120, 212, 0.08);
}
.cue-row.is-playing {
  background-color: rgba(0, 120, 212, 0.18);
}
.cue-row.is-fading {
  background-color: rgba(210, 153, 34, 0.18);
}
.cue-row.dragging {
  opacity: 0.45;
}

.cue-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}
.cue-drag-handle:hover {
  color: var(--text-primary);
}

.inline-select {
  height: 26px;
  padding: 0 6px;
  font-size: 11.5px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.inline-select:focus {
  border-color: var(--accent);
  outline: none;
}

.inline-time-input {
  height: 26px;
  width: 82px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.row-progress-wrap {
  width: 110px;
}
.row-progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--bg-base);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}
.row-progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--accent);
}

/* ============================================================================
   SYSTEMS & AUDIO ROUTING MODAL CARDS
   ============================================================================ */

.node-card {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.node-card.is-master {
  border-color: var(--accent);
  background-color: #141c24;
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.node-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dante-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.dante-pill {
  font-size: 11px;
  padding: 2px 7px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ============================================================================
   BOTTOM MASTER TRANSPORT BAR (REAL-TIME SYNC)
   ============================================================================ */

.master-transport {
  min-height: 88px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr 290px;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

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

.transport-play-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.transport-play-btn:hover {
  background-color: var(--accent-hover);
}

.transport-fade-btn {
  height: 44px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 700;
}

.transport-stop-btn {
  height: 44px;
  padding: 0 14px;
  font-size: 13px;
}

.transport-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.transport-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transport-track-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transport-timers {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.timer-remaining {
  color: #6cb8f6;
}

.scrub-bar-container {
  position: relative;
  height: 12px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
}

.scrub-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background-color: var(--accent);
  pointer-events: none;
}

.scrub-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ffffff;
  pointer-events: none;
}

.active-voices-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  min-height: 22px;
}

.voice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background-color: var(--bg-base);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  white-space: nowrap;
}

.transport-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.vu-meter-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 78px;
}
.vu-channel {
  height: 6px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.vu-fill {
  height: 100%;
  width: 0%;
  background-color: var(--status-online);
  transition: width 0.06s linear;
}

.master-vol-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 165px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  cursor: pointer;
}

/* ============================================================================
   WINDOWS 11 CONTEXT MENU & MODALS
   ============================================================================ */

.context-menu {
  position: fixed;
  z-index: 2000;
  min-width: 230px;
  background-color: #202020;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.ctx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
}
.ctx-item:hover {
  background-color: var(--bg-hover);
}
.ctx-item.danger {
  color: #ff999b;
}
.ctx-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 4px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background-color: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-window {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

.modal-header {
  padding: 14px 18px;
  background-color: #171717;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 12px 18px;
  background-color: #171717;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.waveform-editor-box {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
}
.waveform-canvas {
  width: 100%;
  height: 96px;
  display: block;
  cursor: crosshair;
}

/* ============================================================================
   ADMIN VIEW (/admin) & LOGIN VIEW
   ============================================================================ */

.admin-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background-color: var(--bg-base);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.kpi-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.admin-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.login-screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-base);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toast-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background-color: #222222;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 12.5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   MOBILE & TABLET LIVE-PAD OPTIMIZED VIEW (.touch-live-view & <= 960px)
   Focus purely on big Play & Fade-Out buttons without editing clutter
   ============================================================================ */

.app-shell.touch-live-view .desktop-only {
  display: none !important;
}

.app-shell.touch-live-view .soundboard-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.app-shell.touch-live-view .sound-pad {
  min-height: 164px;
  padding: 16px;
  border-width: 2px;
}

.app-shell.touch-live-view .pad-title {
  font-size: 17px;
  line-height: 1.3;
  margin: 10px 0;
}

.app-shell.touch-live-view .pad-timer {
  font-size: 19px;
}

.app-shell.touch-live-view .pad-fade-btn {
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
}

.app-shell.touch-live-view .pad-stop-btn {
  height: 44px;
  width: 44px;
}

@media (max-width: 960px) {
  .desktop-only {
    display: none !important;
  }
  .top-header {
    padding: 8px 12px;
  }
  .stage-content {
    padding: 12px;
  }
  .soundboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
  .sound-pad {
    min-height: 158px;
    padding: 14px;
    border-width: 2px;
  }
  .pad-title {
    font-size: 16.5px;
  }
  .pad-timer {
    font-size: 18px;
  }
  .pad-fade-btn {
    height: 42px;
    padding: 0 16px;
    font-size: 13.5px;
  }
  .pad-stop-btn {
    height: 42px;
    width: 42px;
  }
  .master-transport {
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 12px;
    gap: 10px;
  }
  .transport-left {
    width: 100%;
    display: grid;
    grid-template-columns: 52px 1fr 110px;
    gap: 8px;
  }
  .transport-play-btn {
    width: 52px;
    height: 48px;
  }
  .transport-fade-btn {
    height: 48px;
    font-size: 15px;
  }
  .transport-stop-btn {
    height: 48px;
    font-size: 14px;
  }
  .transport-right {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

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