@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Variable Fallback";
  src: local("Arial");
  ascent-override: 89.79%;
  descent-override: 22.36%;
  line-gap-override: 0%;
  size-adjust: 107.89%;
}
:root {
  font-family: "Inter Variable", "Inter Variable Fallback", system-ui, Arial, sans-serif;
  color: var(--color-neutral-800);
  background: var(--color-white);
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  --muted: var(--color-neutral-500);
  --line: var(--color-neutral-100);
  --sidebar: 224px;
  --topbar-height: 60px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input {
  touch-action: manipulation;
}
button,
input {
  font: inherit;
}
button,
a {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-blue-500);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
img, .ui-icon {
  display: block;
}
.icon-definitions { position: absolute; overflow: hidden; pointer-events: none; }
/* Match oklch.fyi's compact 224px / 36px navigation rhythm. */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--topbar-height);
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-neutral-200);
  background: var(--color-neutral-50);
  z-index: 30;
}
.sidebar {
  position: fixed;
  inset: var(--topbar-height) auto 0 0;
  width: var(--sidebar);
  border-right: 1px solid var(--color-neutral-200);
  background: var(--color-neutral-50);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  flex-shrink: 0;
  padding: 0 20px;
  text-decoration: none;
  font-size: 19px;
  line-height: 19px;
  font-weight: 600;
  letter-spacing: 0;
}
.brand .ui-icon { width: 30px; height: 30px; flex-shrink: 0; }
.brand-copy { display: flex; flex-direction: column; gap: .5px; }
.brand-tagline { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--color-neutral-500); }
:root[data-initial-tool="stem-splitter"] .tool-nav { --tab-index: 1; }
:root[data-initial-tool="chord-finder"] .tool-nav { --tab-index: 2; }
.not-found { margin: 0; padding: 80px 24px; }
.not-found nav { display: flex; flex-wrap: wrap; gap: 20px; }
.noscript-note { margin: 24px; text-align: center; color: var(--color-neutral-600); }
.tool-nav {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 12px;
}
.tool-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--color-neutral-600);
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.tool-nav a:active, .tool-nav a[aria-current] {
  background: var(--color-neutral-100);
  color: var(--color-neutral-800);
}
.tool-nav .ui-icon, .sidebar-bottom .ui-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .65;
}
.tool-nav a[aria-current] .ui-icon { opacity: 1; }

.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--color-neutral-200);
  display: grid;
  gap: 2px;
}
.sidebar-bottom button, .sidebar-bottom span, .sidebar-bottom a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  color: var(--color-neutral-600);
  font-size: 14px;
  line-height: 20px;
}
.sidebar-bottom a { text-decoration: none; }
.sidebar-bottom a:hover { background: var(--color-neutral-100); }

.tool-guide { width: min(100%, 900px); margin: 36px auto 0; padding: 36px 0 12px; border-top: 1px solid var(--color-neutral-200); }
.tool-guide h2 { margin: 0 0 24px; font-size: 22px; line-height: 30px; font-weight: 600; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.guide-steps h3 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.tool-guide p { margin: 0; color: var(--color-neutral-600); font-size: 14px; line-height: 22px; }
.guide-questions { margin-top: 32px; }
.guide-questions details { border-top: 1px solid var(--color-neutral-200); }
.guide-questions summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 14px; line-height: 22px; font-weight: 500; }
.guide-questions summary::-webkit-details-marker { display: none; }
.guide-questions summary::after { content: '+'; color: var(--color-neutral-500); font-size: 18px; font-weight: 400; }
.guide-questions details[open] summary::after { content: '−'; }
.guide-questions summary:focus-visible { outline: 2px solid var(--color-neutral-600); outline-offset: 2px; }
.guide-questions p { padding: 0 0 18px; max-width: 680px; }
.privacy-link { display: inline-block; margin-top: 24px; color: var(--color-neutral-500); font-size: 12px; text-underline-offset: 3px; }
.privacy-page { max-width: 680px; margin: 12px auto 36px; }
.privacy-page .policy-date { margin: 12px 0 28px; color: var(--color-neutral-500); font-size: 13px; }
.privacy-page p { font-size: 15px; line-height: 25px; color: var(--color-neutral-600); }
.privacy-page .policy-intro { font-size: 18px; line-height: 28px; color: var(--color-neutral-800); }
.privacy-page section { margin-top: 32px; }
.privacy-page h2 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 10px; }
.privacy-page a { color: inherit; text-underline-offset: 3px; }
.policy-return { display: inline-block; margin-top: 24px; font-size: 14px; }
:root[data-page="privacy"] .tool-nav::before { display: none; }
@media (max-width: 767px) {
  .guide-steps { grid-template-columns: 1fr; gap: 22px; }
  .tool-guide { margin-top: 28px; padding-top: 28px; }
  .privacy-page { margin-top: 16px; }
}

main {
  margin-left: var(--sidebar);
  margin-top: var(--topbar-height);
  min-height: calc(100dvh - var(--topbar-height));
  padding: 48px 44px;
}
.empty {
  min-height: calc(100dvh - var(--topbar-height) - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 30px;
  text-align: center;
}
.audio-art {
  width: 220px;
  height: 174px;
  object-fit: contain;
  margin-bottom: 22px;
}
h1 {
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
  font-weight: 600;
}
.empty h1 {
  font-size: 40px;
}
.subtitle {
  font-size: 18px;
  line-height: 28px;
  color: var(--color-neutral-700);
  margin: 18px 0 0;
  max-width: 600px;
}
.dropzone {
  position: relative;
  width: min(100%, 900px);
  margin-top: 34px;
  padding: 42px 28px 40px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 23px;
  background: var(--color-neutral-50);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--color-black) 6.27%, transparent);
  outline: 1px dashed var(--color-neutral-200);
  outline-offset: -13px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.dropzone.dragging {
  background: var(--color-blue-50);
  border-color: var(--color-blue-500);
}
.upload-symbol {
  height: 54px;
  width: 54px;
  margin: 0 auto 17px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px color-mix(in srgb, var(--color-black) 3.53%, transparent);
}
.upload-symbol .ui-icon {
  width: 25px;
  height: 25px;
  opacity: 0.65;
}
.drop-title {
  font-size: 17px;
  margin: 0 0 8px;
}
.formats {
  font-size: 13px;
  color: var(--color-neutral-400);
  margin: 0 0 24px;
}
/* oklch.fyi Button: lg h-10 / rounded-[10px], default h-9 / rounded-lg. */
.primary, .secondary, .text-button, .icon-button, .play-button, .sm button {
  appearance: none;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.primary, .secondary {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}
.primary, .play-button {
  background: var(--color-neutral-800);
  color: var(--color-neutral-50);
  box-shadow: var(--elevation-filled);
}
.secondary {
  background: var(--color-white);
  color: var(--color-neutral-800);
  box-shadow: var(--elevation-raised);
}
.primary .ui-icon, .secondary .ui-icon, .text-button .ui-icon, .icon-button .ui-icon, .play-button .ui-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}
.primary:has(.ui-icon) {
  padding-left: 12px;
}
#choose.primary {
  padding-inline: 20px;
}



.preload {
  font-size: 11px;
  color: var(--color-neutral-400);
  margin-top: 13px;
  min-height: 14px;
}
.text-button {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--color-neutral-600);
}
.replace-file-action {
  margin-top: 12px;
}
.file-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 27px;
}
.file-summary strong {
  font-weight: 550;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-summary .ui-icon {
  width: 35px;
  height: 35px;
  color: var(--color-neutral-500);
}
.ready-wave {
  width: 100%;
  height: 40px;
  margin: 5px 0 23px;
}
.progress-state {
  width: min(100%, 670px);
  text-align: center;
  margin: 30px auto;
}
.progress-bar {
  width: 100%;
  height: 5px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-neutral-100);
}
.progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-neutral-700);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms cubic-bezier(.22, 1, .36, 1);
}
.progress-state p {
  color: var(--color-neutral-500);
  font-size: 14px;
}
.error {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-red-600);
  max-width: 650px;
  margin: 18px auto;
}
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 38px;
}
.view-header .subtitle {
  font-size: 15px;
  margin-top: 10px;
}
.file-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-neutral-500);
  font-size: 14px;
  margin: 16px 0 0;
}
.file-meta .filename {
  color: var(--color-neutral-700);
  max-width: 400px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.export-format select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 10px;
  background: var(--color-neutral-50);
  color: var(--color-neutral-800);
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.export-format select:hover { background: white; }
.export-format select:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: 3px; }

.ruler {
  position: relative;
  height: 30px;
  color: var(--color-neutral-500);
  font-size: 10px;
}
.ruler span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ruler span:first-child {
  transform: none;
}
.ruler span.last {
  transform: translateX(-100%);
}
.ruler span:after {
  content: "";
  display: block;
  height: 7px;
  width: 1px;
  background: var(--color-neutral-300);
  margin: 6px auto 0;
}
.wave {
  display: block;
  width: 100%;
  height: 100%;
}
.track-ruler {
  margin-left: 190px;
}
.track {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 14px 0;
}
.track-controls {
  min-width: 0;
  display: grid;
  align-self: stretch;
  align-content: center;
  gap: 11px;
}
.track-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--track);
}
/* Track toggles retain full labels, with DAW-style state colors. */
.sm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.sm button, .track-download {
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 6px;
  gap: 4px;
  font-size: 12px;
  background: var(--color-white);
  color: var(--color-neutral-700);
  border-radius: 8px;
  box-shadow: var(--elevation-raised);
}
.sm .ui-icon, .track-download .ui-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  pointer-events: none;
}
.sm button[aria-pressed="true"] {
  box-shadow: var(--elevation-filled);
}
.sm button[data-action="mute"] { --mix-rim: var(--color-cyan-700); }
.sm button[data-action="solo"] { --mix-rim: var(--color-amber-700); }
.sm button[data-action="mute"][aria-pressed="true"] {
  background: var(--color-cyan-600);
  color: var(--color-white);
}
.sm button[data-action="solo"][aria-pressed="true"] {
  background: var(--color-amber-600);
  color: var(--color-white);
}

.sm button[data-action="mute"][data-state="indirect"] {
  --mix-weak-bg: var(--color-cyan-100);
  --mix-weak-hover: var(--color-cyan-200);
  --mix-rim: var(--color-cyan-200);
  color: var(--color-cyan-800);
}
.sm button[data-action="solo"][data-state="context"] {
  --mix-weak-bg: var(--color-amber-100);
  --mix-weak-hover: var(--color-amber-200);
  --mix-rim: var(--color-amber-200);
  color: var(--color-amber-800);
}

.volume {
  display: flex;
  gap: 9px;
  align-items: center;
}
.volume .audio-slider {
  width: 100%;
  height: 32px;
}
.track-wave {
  align-self: stretch;
  height: 174px;
  min-height: 150px;
  border-radius: 7px;
  background: var(--tint);
  position: relative;
  cursor: crosshair;
  overflow: visible;
}
.track.vocal .track-wave {
  min-height: 150px;
}
.track-wave canvas {
  padding: 8px 0;
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-neutral-800);
  pointer-events: none;
  z-index: 4;
}
.playhead:before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-neutral-800);
  top: -4px;
  left: -2.5px;
}
.track-wave .playhead,
.track-wave .playhead::before { background: var(--track-seek); }
.track-wave .hover-seek { border-left-color: var(--track-seek); }
.timeline-row .playhead {
  top: 24px;
  bottom: 0;
}
.hover-seek {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--color-neutral-400);
  z-index: 5;
  pointer-events: none;
}
.timeline-row .hover-seek { top: 24px; }
.hover-seek-time {
  position: absolute;
  top: -23px;
  left: 0;
  transform: translateX(-50%);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--color-neutral-600);
  background: var(--color-neutral-50);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hover-seek.near-start .hover-seek-time { transform: none; }
.hover-seek.near-end .hover-seek-time { transform: translateX(-100%); }
.timeline-row {
  position: relative;
  padding: 0 0 15px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-neutral-200);
  cursor: crosshair;
}
.timeline-row:last-child {
  border-bottom: 0;
  margin: 0;
}
.timeline-row .wave {
  height: 38px;
  margin: 0 0 8px;
}
.chord-lane {
  position: relative;
  height: 42px;
}
.chord {
  position: absolute;
  top: 0;
  height: 42px;
  min-width: 1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  border-right: 2px solid var(--color-white);
  background: var(--color-slate-100);
  border-radius: 4px;
  padding: 0 3px;
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
}
.chord:nth-child(even) {
  background: var(--color-neutral-200);
}
.chord.active {
  background: var(--color-blue-100);
}
.chord:focus-visible {
  z-index: 6;
  outline-offset: 0;
}
.chord-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playhead-time {
  position: absolute;
  top: -23px;
  left: 0;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-neutral-900);
  background: var(--color-white);
  padding: 1px 3px;
  white-space: nowrap;
}
.chord-result .view-header {
  margin-bottom: 30px;
}
.chord-result h1 {
  font-size: 40px;
}
.chord-result .file-meta {
  margin-top: 10px;
}
.transport {
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 25px 0 8px;
  margin-top: 34px;
  background: var(--color-white);
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.play-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}
.play-button .ui-icon { width: 20px; height: 20px; }
.transport-time {
  font-size: 13px;
  color: var(--color-neutral-400);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.transport-time b {
  color: var(--color-neutral-800);
  font-weight: 500;
}
.seek-area {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 32px;
}
.chord-result main {
  padding-top: 32px;
}
.chord-result .transport {
  margin-top: 16px;
  padding-top: 20px;
}
.empty .filename {
  max-width: 450px;
}
.icon-button {
  background: var(--color-white);
  border-radius: 8px;
  padding: 0;
  width: 32px;
  height: 32px;
  box-shadow: var(--elevation-raised);
}
dialog {
  border: 1px solid var(--color-neutral-200);
  border-radius: 20px;
  padding: 35px;
  max-width: 530px;
  color: var(--color-neutral-700);
  box-shadow: 0 20px 100px color-mix(in srgb, var(--color-black) 20.00%, transparent);
}
dialog::backdrop {
  background: color-mix(in srgb, var(--color-black) 26.67%, transparent);
}
dialog h2 {
  font-size: 24px;
  letter-spacing: 0;
}
dialog p {
  font-size: 14px;
  line-height: 1.8;
}
#help-dialog { width: min(530px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; }
#help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; flex-shrink: 0; min-height: 56px; padding: 0 12px; border-bottom: 1px solid var(--color-neutral-200); background: var(--color-white); }
.help-dialog-header h2 { grid-column: 2; margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.help-dialog-header .close-dialog { grid-column: 3; justify-self: end; }
.help-dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 28px 20px; }
.help-dialog-body h3 { font-size: 15px; font-weight: 600; }
@media (max-width: 767px) { .help-dialog-body { padding-inline: 20px; } }
.shortcuts { font-size: 13px; margin: 16px 0; }
.shortcuts > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 0; }
.shortcuts dt { flex-shrink: 0; }
.shortcuts dd { margin: 0; text-align: right; color: var(--color-neutral-600); }
kbd { font: inherit; font-size: 12px; padding: 2px 5px; border: 1px solid var(--color-neutral-200); border-radius: 4px; background: var(--color-neutral-50); }
.master-mute[aria-pressed="true"] { background: var(--color-neutral-100); }
.muted {
  color: var(--color-neutral-400);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: calc(50% + 100px);
  transform: translateX(-50%);
  background: var(--color-neutral-800);
  color: var(--color-white);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 13px;
  z-index: 40;
  max-width: 80vw;
}
input[type="range"] {
  cursor: pointer;
}
progress {
  border: 0;
  border-radius: 8px;
}
progress::-webkit-progress-bar {
  background: var(--color-neutral-100);
  border-radius: 8px;
}
progress::-webkit-progress-value {
  background: var(--color-neutral-700);
  border-radius: 8px;
}
@media (min-width: 1250px) {
  .chord-result {
    padding-top: 32px;
    padding-bottom: 24px;
  }
  .chord-result .timeline-row {
    padding-bottom: 18px;
    margin-bottom: 18px;
  }
  .chord-result .timeline-row .wave {
    height: 42px;
  }
}
@media (max-width: 1050px) {
  main {
    padding: 36px 28px;
  }
  .track {
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 14px;
  }
  .track-ruler {
    margin-left: 170px;
  }
  .view-header { flex-wrap: wrap; }
  .header-actions {
    gap: 8px;
  }


  .chord {
    font-size: 12px;
  }
}
@media (max-width: 767px) {
  :root {
    --sidebar: 0px;
    --topbar-height: 60px;
    --tabbar-height: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  html { scroll-padding-bottom: calc(var(--tabbar-height) + 90px); }
  .topbar { position: relative; }
  .sidebar {
    position: static;
    width: 100%;
    border: 0;
  }
  .brand {
    height: var(--topbar-height);
    padding: 0 20px;
    border: 0;
  }
  .tool-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    height: var(--tabbar-height);
    padding: 6px max(12px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-50);
  }
  .tool-nav a {
    min-width: 0;
    min-height: 0;
    padding: 4px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0;
    border-radius: 8px;
  }
  .tool-nav .ui-icon { width: 22px; height: 22px; }
  .sidebar-bottom { display: none; }
  main {
    margin: 0;
    min-height: calc(100dvh - 64px);
    padding: 16px 18px calc(16px + var(--tabbar-height));
  }
  .empty {
    min-height: calc(100svh - var(--topbar-height) - var(--tabbar-height) - 32px);
    padding: 0;
  }
  .audio-art {
    width: 120px;
    height: clamp(56px, 10svh, 88px);
    margin-bottom: 16px;
    flex-shrink: 0;
  }
  .empty h1 {
    font-size: 30px;
  }
  .subtitle {
    font-size: 14px;
    line-height: 21px;
    margin-top: 10px;
    max-width: 310px;
  }
  .dropzone {
    margin-top: 20px;
    padding: 22px 18px;
    border-radius: 20px;
  }
  .upload-symbol { width: 40px; height: 40px; margin-bottom: 12px; }
  .upload-symbol .ui-icon { width: 22px; height: 22px; }
  .drop-title { font-size: 15px; line-height: 22px; margin-bottom: 4px; }
  .formats { font-size: 11px; line-height: 16px; margin-bottom: 16px; }
  .dropzone .primary { min-height: 44px; }
  .file-summary { margin: 0 0 12px; gap: 12px; }
  .file-summary > div { min-width: 0; }
  .file-summary strong { display: block; }
  .ready-wave { margin: 0 0 14px; }

  .view-header {
    margin-bottom: 25px;
    gap: 16px;
    flex-wrap: wrap;
  }
  .view-header h1,
  .chord-result h1 {
    font-size: 30px;
  }
  .header-actions {
    justify-content: flex-start;
  }
  .file-meta {
    font-size: 12px;
    gap: 8px;
  }
  .file-meta .filename {
    max-width: 200px;
  }
  .track {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 10px;
    margin: 16px 0;
  }
  .track-name {
    font-size: 12px;
    gap: 6px;
  }
  .track-ruler {
    margin-left: 134px;
  }
  .sm button {
    padding-inline: 4px;
  }
  .track-controls {
    gap: 8px;
  }
  .volume {
    gap: 4px;
  }


  .dot {
    width: 7px;
    height: 7px;
  }
  .transport {
    gap: 12px;
    padding: 17px 0 12px;
    bottom: var(--tabbar-height);
  }
  .transport-time {
    font-size: 11px;
  }
  .ruler {
    font-size: 9px;
  }
  .chord {
    font-size: 12px;
  }
  .timeline-row .wave {
    height: 35px;
  }
  .timeline-row {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }
  .chord-result .view-header {
    margin-bottom: 26px;
  }
  .toast {
    bottom: calc(var(--tabbar-height) + 16px);
    left: 50%;
    width: max-content;
  }
  .file-summary strong {
    max-width: 200px;
  }
  dialog {
    max-width: calc(100vw - 32px);
    padding: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.track-download { width: 100%; }
.track-vocals {
  --track: var(--color-blue-400);
  --track-seek: var(--color-blue-600);
  --tint: var(--color-blue-50);
}
.track-instrumental {
  --track: var(--color-violet-400);
  --track-seek: var(--color-violet-600);
  --tint: var(--color-violet-50);
}
.track-drums {
  --track: var(--color-amber-400);
  --track-seek: var(--color-amber-600);
  --tint: var(--color-amber-50);
}
.track-bass {
  --track: var(--color-green-400);
  --track-seek: var(--color-green-600);
  --tint: var(--color-green-50);
}
.track-other {
  --track: var(--color-violet-400);
  --track-seek: var(--color-violet-600);
  --tint: var(--color-violet-50);
}
.audio-art {
  transform: scale(1.6);
}

.current-chord {
  min-width: 50px;
  text-align: center;
  font-size: 15px;
  font-weight: 550;
  background: var(--color-slate-100);
  border-radius: 6px;
  padding: 7px 9px;
}
@media (max-width: 767px) {
  .current-chord {
    font-size: 12px;
    min-width: 36px;
    padding: 5px;
  }
  .chord-result .transport {
    gap: 8px;
  }
}

.chord.compact .chord-label {
  visibility: hidden;
}

@media (min-width: 768px) {
  .vocal-result {
    padding-top: clamp(64px, 14vh, 160px);
  }
  .vocal-result .view-header {
    margin-bottom: 54px;
  }
  .vocal-result .track {
    background: var(--tint);
    border-radius: 9px;
  }
  .vocal-result .track-controls {
    padding: 12px;
    background: color-mix(in srgb, var(--color-white) 40.00%, transparent);
  }

  .vocal-result .transport {
    max-width: 720px;
    margin: 40px auto 0;
    border-top: 0;
  }
}

/* Keep the attachment action above the tab bar with Safari chrome expanded. */
@media (max-width: 767px) and (max-height: 650px) {
  .empty .audio-art { display: none; }
  .empty h1 { font-size: 28px; }
  .empty .dropzone { margin-top: 16px; }
}
@media (max-width: 767px) and (max-height: 500px) {
  .empty .upload-symbol { display: none; }
  .empty .dropzone { padding-block: 16px; }
  .empty .ready-wave { height: 24px; margin-bottom: 8px; }
}
