/* Tablet-first foundation.
 * Loaded before hall_plan.css so component-specific rules still win on conflict.
 */

:root {
  --bp-phone: 599px;
  --bp-desktop: 1200px;
  --tap: 44px;
  --radius: 8px;
  --radius-sm: 6px;
  --drawer-w: 320px;

  --c-primary: #667eea;
  --c-primary-hover: #5468d4;
  --c-primary-active: #4a5bc7;
  --c-success: #22c55e;
  --c-success-hover: #16a34a;
  --c-danger: #ef4444;
  --c-danger-hover: #dc2626;
  --c-secondary: #64748b;
  --c-secondary-hover: #475569;
  --c-border: #d1d5db;
  --c-bg-subtle: #f8f9fa;
  --c-text: #1e293b;
  --c-text-muted: #64748b;
}

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

html {
  height: 100dvh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
}

a, button, input, select, textarea, label,
[role="button"], [tabindex] {
  touch-action: manipulation;
}

button,
.logout-btn,
.hall-modal-close,
.secp-pool-item,
.disp-member-card {
  min-height: var(--tap);
  min-width: var(--tap);
}

/* ─────────────────────────────────────────────────────────────
 * Buttons
 * ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
  min-height: var(--tap);
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  min-height: 26px;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 4px;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn-primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.btn-primary:active { background: var(--c-primary-active); }
.btn-primary.disabled, .btn-primary:disabled {
  background: #b0b8c8;
  border-color: #b0b8c8;
  color: #fff;
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-success {
  background: var(--c-success);
  color: #fff;
  border-color: var(--c-success);
}
.btn-success:hover { background: var(--c-success-hover); border-color: var(--c-success-hover); }

.btn-danger {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
}
.btn-danger:hover { background: var(--c-danger-hover); border-color: var(--c-danger-hover); }

.btn-secondary {
  background: var(--c-bg-subtle);
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-secondary:hover { background: #e9ecef; border-color: #adb5bd; }

.btn-outline-primary {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline-primary:hover { background: var(--c-primary); color: #fff; }
.btn-outline-primary.disabled {
  border-color: #b0b8c8;
  color: #b0b8c8;
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-outline-secondary {
  background: transparent;
  color: var(--c-secondary);
  border-color: var(--c-border);
}
.btn-outline-secondary:hover { background: var(--c-bg-subtle); color: var(--c-text); }

.btn-outline-danger {
  background: transparent;
  color: var(--c-danger);
  border-color: var(--c-danger);
}
.btn-outline-danger:hover { background: var(--c-danger); color: #fff; }

.btn-link {
  background: transparent;
  color: var(--c-primary);
  border: none;
  padding-left: 4px;
  padding-right: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--c-primary-hover); }

/* ─────────────────────────────────────────────────────────────
 * Form controls
 * ───────────────────────────────────────────────────────────── */

.form-control {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: var(--tap);
}

.form-control:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-control-sm {
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
}

.form-control::placeholder {
  color: var(--c-text-muted);
  opacity: 0.7;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.form-group {
  margin-bottom: 12px;
}

.form-group > label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

.text-danger { color: var(--c-danger); }
.text-muted  { color: var(--c-text-muted); }

/* ─────────────────────────────────────────────────────────────
 * Focus & press feedback
 * ───────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

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

.btn-selector-add:active,
.btn-selector-edit:active,
.btn-selector-delete:active,
.secp-pool-item:active,
.drawer-placement-item:active,
.page-list-item:active {
  opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────
 * App drawer — unified left-side navigation shell. Hosts user
 * info, logout, and the Leaflet layer tree on map pages.
 * ───────────────────────────────────────────────────────────── */

.app-main {
  min-height: 100dvh;
  transition: margin-left 0.22s ease;
}

.app-drawer-toggle {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1101;
  width: var(--tap);
  height: var(--tap);
  border: none;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.22s ease;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--drawer-w);
  max-width: 92vw;
  height: 100dvh;
  z-index: 1100;
  background: #fff;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  will-change: transform;
  overflow: hidden;
}

body.drawer-open .app-drawer {
  transform: translateX(0);
}

.app-drawer-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 12px 60px;
  border-bottom: 1px solid var(--c-border);
  background: #f8f9fa;
}

.app-drawer-user {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.app-drawer-user-name {
  color: #333;
}

.app-drawer-logout {
  margin: 0;
}

.app-drawer-logout .logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius);
}

.app-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Collapsible subgroups (Stage map, Selectors). */
.drawer-subgroup {
  display: flex;
  flex-direction: column;
}

.drawer-subgroup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f3f5;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  font-weight: bold;
  font-size: 13px;
}

.drawer-subgroup-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px 6px;
  color: #495057;
  min-height: auto;
  min-width: auto;
}

.drawer-subgroup-toggle:hover {
  color: #212529;
}

.drawer-subgroup-title {
  flex: 1;
  color: #212529;
}

a.drawer-subgroup-title {
  text-decoration: none;
  color: #667eea;
}

a.drawer-subgroup-title:hover {
  color: #764ba2;
}

.drawer-subgroup-body {
  padding: 6px 12px;
}

.drawer-subgroup.collapsed .drawer-subgroup-body {
  display: none;
}

.drawer-subgroup-link {
  font-size: 12px;
  text-decoration: none;
  color: #667eea;
  margin-left: auto;
  padding: 2px 6px;
}

.drawer-subgroup-link:hover {
  color: #764ba2;
}

/* ── Drawer section detail panel ────────────────────────────────────── */

.drawer-section-back {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  color: #495057;
  min-height: auto;
  min-width: auto;
}

.drawer-section-back:hover {
  color: #212529;
}

#app-drawer-section-detail-body {
  padding: 8px 12px;
}

.drawer-section-header-fields {
  margin-bottom: 10px;
}

.drawer-section-field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.drawer-section-field-row > label {
  font-size: 12px;
  color: #495057;
  min-width: 52px;
  flex-shrink: 0;
  margin: 0;
}

.drawer-section-input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--c-border, #dee2e6);
  border-radius: var(--radius-sm, 4px);
  font-size: 13px;
  min-height: 32px;
  box-sizing: border-box;
}

.drawer-section-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.drawer-section-unit {
  font-size: 12px;
  color: #868e96;
  flex-shrink: 0;
  min-width: 18px;
}

.drawer-section-checkbox-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #495057;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
}

.drawer-section-status {
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 4px;
  transition: opacity 0.2s;
}

.drawer-section-status:empty {
  display: none;
}

.drawer-section-status.status-ok {
  color: var(--c-success, #22c55e);
}

.drawer-section-status.status-err {
  color: var(--c-danger, #ef4444);
}

.drawer-section-list-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #868e96;
  margin-bottom: 6px;
}

.drawer-section-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.drawer-section-card {
  border: 1px solid var(--c-border, #dee2e6);
  border-radius: var(--radius, 6px);
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drawer-section-card:hover {
  background: rgba(102, 126, 234, 0.04);
}

.drawer-section-card.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  box-shadow: 0 0 0 1px #fbbf24;
}

.drawer-section-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.drawer-section-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
}

.drawer-section-card-info {
  font-size: 12px;
  color: #868e96;
}

.drawer-section-card-fields {
  margin-bottom: 6px;
}

.drawer-section-card-actions {
  display: flex;
  gap: 6px;
}

.drawer-section-row-actions {
  padding-top: 8px;
  border-top: 1px solid var(--c-border, #dee2e6);
}

.drawer-section-btn {
  width: 100%;
  min-height: var(--tap, 44px);
  font-size: 14px;
}

/* ── Drawer placement panel ──────────────────────────────────────────── */

.drawer-placement {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-placement-filter {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  font-size: 14px;
  min-height: var(--tap);
  box-sizing: border-box;
}

.drawer-placement-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-placement-empty {
  padding: 8px 4px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  font-style: italic;
}

.drawer-placement-group {
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
}

.drawer-placement-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  min-height: var(--tap);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.drawer-placement-group-caret {
  width: 14px;
  text-align: center;
  color: rgba(0, 0, 0, 0.55);
}

.drawer-placement-group-title {
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 14px;
}

.drawer-placement-group-counts {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.drawer-placement-voice-group {
  padding-left: 12px;
}

.drawer-placement-voice-header {
  min-height: 32px;
  padding: 4px 6px;
}

.drawer-placement-voice-header .drawer-placement-group-title {
  font-weight: 500;
  font-size: 13px;
}

.drawer-placement-item-count {
  font-size: 11px;
  font-weight: 600;
  color: #667eea;
  margin-left: 2px;
}

.drawer-placement-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px 6px;
}

.drawer-placement-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  min-height: var(--tap);
  touch-action: manipulation;
  cursor: grab;
}

.drawer-placement-item.dragging {
  opacity: 0.4;
}

.drawer-placement-item-icon {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.drawer-placement-item-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.drawer-placement-item-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-placement-item-sub {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-placement-item-handle {
  color: rgba(0, 0, 0, 0.35);
  font-size: 16px;
  padding: 0 4px;
  flex: 0 0 auto;
}

.drawer-placement-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-placement-icon > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.drawer-placement-icon-badge {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.drawer-placement-header-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

body.drawer-open:not(.drawer-pinned) .app-drawer-scrim {
  opacity: 1;
  pointer-events: auto;
}

body.placement-dragging .app-drawer-scrim {
  pointer-events: none;
  opacity: 0;
}

/* Pinned mode: drawer sits inline, main content shifts. */
body.drawer-pinned.drawer-open .app-main {
  margin-left: var(--drawer-w);
}

body.drawer-pinned.drawer-open .app-drawer-toggle {
  left: calc(var(--drawer-w) - var(--tap) - 8px);
}

body.drawer-pinned .app-drawer-scrim {
  display: none;
}

/* Navigation buttons row in the drawer */
.drawer-nav-buttons {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
}

.drawer-nav-buttons .btn {
  flex: 1;
}

.drawer-nav-buttons .btn.active {
  background: var(--c-primary);
  color: #fff;
  pointer-events: none;
}

/* Layer-tree Leaflet control on the map */
.leaflet-control-layers-tree {
  max-height: 70vh;
  overflow-y: auto;
}

.leaflet-control-layers-expanded {
  max-width: min(360px, 80vw);
}

.groundplane-opacity-slider {
  display: block;
  padding-top: 2px;
}

.groundplane-opacity-range {
  width: 100%;
  height: 14px;
  cursor: pointer;
  vertical-align: middle;
}

/* Leaflet popup sizing — tablet default, phone compressed, desktop roomier. */
.leaflet-popup-content-wrapper {
  max-width: 440px;
}

/* Floating ghost for touch-dnd — the helper also sets position/transform inline. */
.touch-dnd-ghost {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
}

/* Musician overlay being dragged on the map — dim the source. */
.leaflet-overlay-pane svg.dragging {
  opacity: 0.25;
}

/* Fullscreen toggle — hidden in installed PWA */
.map-fullscreen-btn {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 1000;
  width: var(--tap);
  height: var(--tap);
  border: none;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.map-fullscreen-btn.active {
  background: #e8f4fd;
}

@media (display-mode: standalone) {
  .map-fullscreen-btn { display: none; }
}

/* ─────────────────────────────────────────────────────────────
 * Dedicated CRUD pages (Phase 4b) — orchestras / dispositions /
 * instrument sets rendered as full pages instead of modals.
 * ───────────────────────────────────────────────────────────── */

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.page-header h1 {
  margin: 0;
  font-size: 22px;
}

.page-section {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px;
}

.page-section h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

.page-form .form-group {
  margin-bottom: 10px;
}

.page-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-list-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.page-list-item:hover {
  background: #f1f3f5;
  border-color: #adb5bd;
}

.page-list-item-name {
  font-weight: 600;
}

.page-list-item-desc {
  font-size: 12px;
  color: var(--c-text-muted);
}

.page-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.page-tab-pane {
  display: none;
  background: #fff;
  border: 1px solid var(--c-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px;
}

.page-tab-pane.active {
  display: block;
}

.page-container--wide {
  max-width: 1200px;
}

.page-header-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.page-header-action svg {
  flex-shrink: 0;
}

.page-settings {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.page-settings-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.page-settings-summary::-webkit-details-marker {
  display: none;
}

.page-settings-summary::before {
  content: '▸';
  font-size: 11px;
  transition: transform 0.15s;
}

.page-settings[open] > .page-settings-summary::before {
  transform: rotate(90deg);
}

.page-settings-body {
  padding: 0 14px 14px;
}

.page-settings-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ── CSV column mapping ────────────────────────────────────── */

.page-container--fill {
  height: 100dvh;
  max-width: none;
}

.page-section--fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.csv-textarea {
  flex: 1;
  min-height: 120px;
  width: 100%;
  resize: vertical;
  font-family: monospace;
  font-size: 13px;
}

.csv-mapping-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 10px;
  align-items: center;
}

.csv-mapping-row {
  display: contents;
}

.csv-mapping-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
 * PWA — install button, online/offline banner, update notice
 * ───────────────────────────────────────────────────────────── */

.pwa-install-btn {
  align-self: flex-start;
}

.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.pwa-banner--warn {
  background: #fef3c7;
  color: #92400e;
}

.pwa-banner--info {
  background: rgba(102, 126, 234, 0.12);
  color: var(--c-primary-hover);
}

.pwa-banner-action {
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: auto;
  min-width: auto;
}

.pwa-banner-action:hover {
  opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────────
 * Breakpoint overrides
 * ───────────────────────────────────────────────────────────── */

@media (max-width: 599px) {
  .leaflet-popup-content-wrapper {
    max-width: min(92vw, 360px);
  }

  /* Section popup — full-screen on phone */
  .orch-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0;
  }

  /* Show the seating sub-tab bar on phone */
  .secp-pane-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0;
  }

  /* Stack the two panes and toggle via data attribute */
  .disp-musicians-layout {
    flex-direction: column;
  }

  .disp-musicians-layout[data-phone-tab="assignments"] .disp-musicians-right {
    display: none;
  }

  .disp-musicians-layout[data-phone-tab="pool"] .disp-musicians-left {
    display: none;
  }

  /* Disposition musicians page panels */
  .dm-two-panel {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .dm-left-panel {
    border-right: none;
    padding-right: 0;
    max-height: calc(100dvh - 200px);
  }
  .dm-right-panel {
    width: 100%;
    border-top: 1px solid var(--c-border);
    padding-left: 0;
    padding-top: 12px;
    max-height: calc(100dvh - 300px);
    min-height: 150px;
  }
  .dm-voice-row { padding-left: 24px; }
  .dm-voice-assigned { padding-left: 36px; }
}

@media (min-width: 1200px) {
  :root {
    --drawer-w: 360px;
  }

  .leaflet-popup-content-wrapper {
    max-width: 480px;
  }

  /* Section popup — capped width on desktop */
  .orch-modal {
    max-width: 1040px !important;
    width: 88vw;
    height: 82vh;
  }

}
