.aag-icon-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.autosave-status {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.autosave-status.is-error { color: #f4ab83; }

.daw-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  padding: 4px 0 14px;
  border-bottom: 1px solid #3b3d43;
  min-width: 0;
}

.clip-tools,
.timeline-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.selected-clip-name {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 240px;
  margin-right: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
  color: #e5e6e8;
}

.daw-tool {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #d4d5d8;
  border: 1px solid #44474e;
  border-radius: 6px;
  background: #202228;
  cursor: pointer;
}

.daw-tool svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.daw-tool:hover:not(:disabled) { border-color: #e5de41; color: #fff447; }
.daw-tool:disabled { opacity: 0.35; cursor: default; }
.daw-tool:focus-visible,
.timeline-snap:focus-visible { outline: 2px solid #fff447; outline-offset: 2px; }
.timeline-zoom-value { flex: 0 0 30px; text-align: center; color: #b8bbc3; font-size: 11px; }
.timeline-snap-label { margin-left: 6px; font-size: 11px; color: #b8bbc3; }
.timeline-tools .timeline-snap { width: 94px; min-width: 0; height: 34px; padding: 0 22px 0 10px; font-size: 11px; }
.timeline-range-tools { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 24px; padding-top: 6px; min-width: 0; }
.timeline-range-tools .track-loop-tools { grid-column: auto; padding-top: 0; gap: 12px; }
.timeline-zoom-tools { display: grid; grid-template-columns: 34px minmax(0, 1fr) 38px; align-items: center; gap: 12px; min-width: 0; }
.timeline-navigator-icon { width: 18px; height: 18px; justify-self: center; fill: none; stroke: #c9cdd2; stroke-width: 1.7; stroke-linecap: round; }
.timeline-navigator { position: relative; height: 36px; min-width: 0; touch-action: none; user-select: none; }
.timeline-navigator::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 10px; border: 1px solid #41464b; border-radius: 3px; background: #121519; }
.timeline-navigator-window { position: absolute; left: var(--navigator-left, 0%); width: var(--navigator-width, 100%); top: 0; bottom: 0; }
.timeline-navigator-pan { position: absolute; inset: 0 14px; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: grab; touch-action: none; }
.timeline-navigator-pan::before { content: ""; position: absolute; inset: 13px 0; background: #62695b; pointer-events: none; }
.timeline-navigator-pan::after { content: ""; position: absolute; width: 4px; height: 8px; border-inline: 1px solid #ccd0c7; left: calc(50% - 2px); top: 14px; pointer-events: none; }
.timeline-navigator-pan[aria-disabled="true"] { cursor: default; }
.timeline-navigator-pan[aria-disabled="true"]::after { opacity: 0.35; }
.timeline-navigator-handle { position: absolute; top: 0; bottom: 0; width: 16px; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: ew-resize; touch-action: none; }
.timeline-navigator-handle::before { content: ""; position: absolute; inset: 3px 2px; border: 1px solid #d3d6d0; border-radius: 3px; background: #a4aaa0; pointer-events: none; }
.timeline-navigator-handle-start { left: 0; }
.timeline-navigator-handle-end { right: 0; }
.timeline-navigator-playhead { position: absolute; z-index: 2; left: var(--navigator-playhead, 0%); top: 6px; bottom: 6px; width: 2px; transform: translateX(-1px); background: #e7ed63; pointer-events: none; }
.timeline-navigator-window:hover .timeline-navigator-pan::before { background: #767c6e; }
.timeline-navigator-handle:hover::before { border-color: #fff447; }
.timeline-navigator-pan:focus-visible,
.timeline-navigator-handle:focus-visible { outline: 2px solid #fff447; outline-offset: 1px; }
.timeline-navigator.is-panning,
.timeline-navigator.is-panning .timeline-navigator-pan { cursor: grabbing; }
.timeline-navigator-handle:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 1000px) {
  .timeline-range-tools { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 680px) {
  .timeline-range-tools .track-loop-tools { grid-template-columns: 36px 1fr 1fr; gap: 10px; }
}
.timeline-time { font: 10px Consolas, monospace; color: #afb3bc; font-variant-numeric: tabular-nums; }
.timeline-time:last-child { text-align: right; }
.clip-edit-status { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #f4ab83; }
.clip-edit-status[hidden] { display: none; }
.track-lane-viewport { position: absolute; inset: 0 12px; }
.track-lane-content { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; transform-origin: left center; }
.track-lane { touch-action: pan-y; user-select: none; }
.track-lane.is-pannable { cursor: grab; }
.track-lane.is-timeline-panning { cursor: grabbing; }
.track-lane-content .track-playhead { z-index: 8; pointer-events: none; touch-action: none; transition: opacity 0.18s ease; }
.track-playhead::before,
.track-playhead::after { content: ""; position: absolute; left: -6px; right: -6px; height: 5px; }
.track-playhead::before { top: 0; }
.track-playhead::after { bottom: 0; }
.track-lane-content .track-playhead.is-seekable { pointer-events: auto; cursor: ew-resize; }
.track-lane.is-playhead-dragging { cursor: ew-resize; }
.track-playhead:focus-visible { outline: 1px solid #fff447; outline-offset: 1px; }
.track-lane-content .track-arranger-clip,
.track-lane-content .track-clip { top: 5px; bottom: 5px; min-width: 0; border-radius: 5px; background: #727477; box-shadow: none; color: #fff447; }
.track-lane-content .track-clip { --track-clip-left: var(--track-clip-start, 0%); width: var(--track-clip-width, 0%); container-type: inline-size; }
.track-lane-content .track-arranger-clip-label { margin-inline: min(12px, 25%); font-weight: 400; letter-spacing: 0; }
.track-lane-content .track-arranger-clip { padding-inline: 0; container-type: inline-size; }
.arranger-waveform { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 4px; pointer-events: none; }
.track-lane-content :is(.track-clip, .track-arranger-clip):hover { z-index: 6; }
.track-lane-content :is(.is-edit-selected, .track-arranger-clip.is-selected) { z-index: 7; }
@container (max-width: 56px) {
  .track-arranger-clip-label,
  .track-clip-label { visibility: hidden; }
}
.track-lane-content .track-arranger-clip.is-missing { background: #704b49; color: #ffe4de; }

.mobile-transport-bar {
  position: fixed;
  display: none;
  grid-template-columns: minmax(110px, 1fr) 70px auto;
  align-items: center;
  gap: 5px 12px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid #54575f;
  background: #202227;
  box-shadow: 0 -4px 18px #0005;
}
.mobile-transport-source { min-width: 0; }
.mobile-transport-source .select { width: 100%; min-width: 0; max-width: 200px; height: 40px; padding: 0 20px 0 10px; font-size: 12px; }
#mobileTransportTime { font: 11px Consolas, monospace; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mobile-transport-buttons { display: flex; gap: 10px; }
.mobile-transport-buttons .recorder-button { width: 56px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; }
.mobile-performance-status { grid-column: 1 / -1; font-size: 10px; color: #aeb2bc; }
.mobile-transport-source > .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.session-recovery-dialog {
  box-sizing: border-box;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid #5c6068;
  border-radius: 8px;
  background: #25272c;
  color: #e9e9ec;
  box-shadow: 0 16px 80px #0009;
  font: inherit;
}

.session-recovery-dialog::backdrop { background: #000a; }
.session-recovery-dialog h2 { margin: 0 0 16px; font-size: 20px; font-weight: 650; letter-spacing: 0; }
.session-recovery-dialog p { font-size: 14px; line-height: 1.55; margin: 0 0 22px; }
#sessionRecoveryError { color: #f4ab83; }
.session-recovery-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.session-recovery-actions .recorder-button { flex: 1 0 150px; width: auto; min-height: 44px; padding: 10px 16px; font-size: 12px; white-space: nowrap; }
.session-recovery-actions [hidden] { display: none; }
#sessionRestore, #sessionRestoreAvailable { border-color: #bbb637; color: #fff447; }

@media (min-width: 1101px) {
  body.has-sticky-desktop-transport { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .mobile-transport-bar.is-desktop-sticky { display: flex; justify-content: center; gap: 24px; }
  .mobile-transport-bar .mobile-transport-source { width: 180px; }
  #mobileTransportTime { width: 72px; }
  .mobile-performance-status { display: none; }
  body.has-sticky-desktop-transport .performance-warning { bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 1100px) {
  body { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .daw-tools { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .clip-tools { flex-wrap: wrap; }
  .selected-clip-name { max-width: none; }
  .timeline-tools { justify-content: flex-end; }
  .mobile-transport-bar { display: grid; }
  .performance-warning { bottom: calc(108px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 600px) {
  .recorder-panel-header { gap: 10px; flex-wrap: wrap; }
  .recorder-panel-header h2 { font-size: 16px; }
  .autosave-status { font-size: 10px; }
  .selected-clip-name { flex: 0 0 100%; width: 100%; margin: 0 0 4px; }
  .clip-tools { gap: 6px; }
  .daw-tool { width: 38px; height: 40px; flex-basis: 38px; }
  .timeline-tools { justify-content: flex-start; gap: 5px; flex-wrap: wrap; }
  .timeline-tools .daw-tool { width: 32px; flex-basis: 32px; }
  .timeline-tools .timeline-snap { width: 85px; }
  .timeline-snap-label { margin-left: 1px; }
  .mobile-transport-bar { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; }
  .mobile-transport-source .select { height: 40px; font-size: 11px; }
  .mobile-transport-buttons { grid-column: 2; grid-row: 1 / 3; gap: 7px; }
  .mobile-transport-buttons .recorder-button { width: 46px; }
  #mobileTransportTime { grid-row: 2; grid-column: 1; text-align: left; padding-left: 10px; }
  .mobile-performance-status { grid-row: 3; grid-column: 1 / -1; padding-left: 10px; }
}
