:root {
  font-family:
    ui-rounded,
    "Avenir Next",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #323247;
  background: #faf9f5;
  font-synthesis: none;
  font-size: 14px;
  --purple: #7153c9;
  --line: #e9e7ef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
summary {
  font: inherit;
}
button,
a,
input,
summary,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 0 14px;
  cursor: pointer;
  color: inherit;
  font-weight: 650;
  white-space: nowrap;
  touch-action: manipulation;
}
button:hover {
  background: #f0edf8;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #9479df;
  outline-offset: 3px;
}
.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 10px #7053c925;
}
.primary:hover {
  background: #5c40b0;
}
.topbar {
  height: 98px;
  padding: 0 3.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #3a3354;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1.3px;
}
.brand-icon {
  background: var(--purple);
  color: white;
  border-radius: 15px;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  letter-spacing: -3px;
  font-size: 31px;
  transform: rotate(-5deg);
}
.brand-light {
  font-weight: 400;
  color: #76678f;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.4px;
  font-weight: 650;
  margin-top: 3px;
  color: #898392;
}
.topbar nav {
  display: flex;
  gap: 6px;
}
.topbar .primary {
  margin-left: 12px;
  padding: 0 23px;
}
main {
  padding: 32px 3.2% 0;
  max-width: 1720px;
  margin: auto;
}
.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 30px;
}
.eyebrow {
  letter-spacing: 2px;
  font-size: 10px;
  color: #9586af;
  font-weight: 750;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}
#project-name {
  font-size: 31px;
  font-weight: 750;
  letter-spacing: -1px;
  border: 0;
  background: transparent;
  color: #39344b;
  max-width: min(65vw, 400px);
  width: 16ch;
  padding: 0;
  outline-offset: 5px;
}
.pencil {
  color: #a29aaa;
  font-size: 21px;
}
.project-heading p {
  margin: 8px 0 0;
  color: #8c8594;
}
.local-badge {
  background: #f0f4ec;
  border: 1px solid #e1e8d9;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 650;
  color: #677960;
}
.local-badge span {
  color: #7eac71;
  font-size: 9px;
  margin-right: 6px;
}
.local-badge small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  padding-left: 15px;
  margin-top: 3px;
}
.studio {
  border: 1px solid #e4e0eb;
  border-radius: 19px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 40px #38304405;
}
.transport {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  gap: 20px;
  background: #fff;
}
.transport-main {
  display: flex;
  gap: 7px;
  align-items: center;
}
.record {
  background: #ffedeb;
  color: #be514c;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.record:hover {
  background: #ffe0dc;
}
.record.active {
  background: #cc4e4e;
  color: white;
}
.record-dot {
  width: 13px;
  height: 13px;
  background: #d45e59;
  border-radius: 50%;
}
.active .record-dot {
  background: white;
  animation: pulse 1s infinite;
}
.play {
  background: #e4f2df;
  width: 49px;
  color: #598d4c;
}
.transport-main > button:not(.record) {
  padding: 0 8px;
  min-width: 48px;
  font-size: 17px;
}
.transport-main #back,
.transport-main #forward {
  font-size: 12px;
  color: #8c829b;
}
.transport-divider {
  height: 24px;
  border-left: 1px solid var(--line);
  margin: 0 6px;
}
.clock-area {
  margin-left: auto;
  text-align: center;
  position: relative;
  min-width: 135px;
}
.clock-area > span {
  display: block;
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #a29aa8;
  font-weight: 700;
}
.clock-area output {
  font-size: 28px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}
.clock-area meter {
  width: 95px;
  height: 5px;
  display: block;
  margin: auto;
}
.undo-group {
  display: flex;
  border-left: 1px solid var(--line);
  padding-left: 15px;
  margin-left: 20px;
}
.undo-group button {
  font-size: 26px;
  min-width: 48px;
  padding: 0 8px;
}
.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px;
  background: #fdfcfe;
  gap: 10px;
}
.timeline-toolbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dot {
  height: 7px;
  width: 7px;
  background: #bba8e9;
  border-radius: 50%;
}
#track-count {
  font-size: 11px;
  color: #a59dae;
}
.zoom button {
  min-height: 40px;
  min-width: 44px;
  padding: 0 8px;
}
.zoom span {
  font-size: 10px;
  color: #91859e;
  min-width: 37px;
  text-align: center;
}
.zoom #library-toggle {
  background: #efe9fa;
  color: #775cb1;
  padding: 0 15px;
  margin-left: 8px;
  font-size: 12px;
}
.workspace {
  display: flex;
  min-height: 400px;
}
.editor {
  min-width: 0;
  flex: 1;
  background: #fcfbfe;
}
#timeline-scroll {
  height: 340px;
  overflow: auto;
  position: relative;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}
#timeline {
  min-height: 100%;
  position: relative;
  width: 1600px;
}
#ruler {
  height: 38px;
  background: #f7f6fa;
  border-bottom: 1px solid var(--line);
  position: relative;
  touch-action: none;
  cursor: crosshair;
}
.tick {
  position: absolute;
  top: 12px;
  font-size: 10px;
  color: #a29aa9;
  pointer-events: none;
}
.tick:after {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 1px;
  height: 10px;
  background: #dcd7e5;
}
.ruler-label {
  position: sticky;
  left: 0;
  background: #f7f6fa;
  width: 170px;
  height: 100%;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 9px;
  color: #aaa1b3;
  letter-spacing: 1.5px;
}
.track {
  height: 108px;
  position: relative;
  border-bottom: 1px solid #e6e1ed;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 47px,
    #ece9f455 47px,
    #ece9f455 48px
  );
}
.track.active-track {
  background-color: #f2eef9;
  background-color: color-mix(in srgb, var(--track-color) 30%, white);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--track-color) 70%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--track-color) 70%, transparent);
}
.track.active-track .track-meta {
  background-color: #f2eef9;
  background-color: color-mix(in srgb, var(--track-color) 25%, white);
}
.track-meta {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 170px;
  height: 100%;
  background: #fcfbfe;
  border-right: 1px solid #e1dcea;
  border-left: 4px solid var(--track-color);
  padding: 10px 10px 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-content: start;
}
.track-meta input[type="text"] {
  width: 118px;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: #544766;
  font-weight: 700;
  height: 26px;
  min-width: 0;
}
.track-meta button {
  height: 42px;
  min-height: 42px;
  padding: 0;
  width: 42px;
  font-size: 13px;
  color: #988ba7;
}
.track-meta input[type="range"] {
  width: 62px;
  accent-color: #9180b2;
  margin: 6px 3px;
}
.track-meta .muted {
  background: #f5dfe2;
  color: #9e4251;
}
.clip {
  position: absolute;
  top: 13px;
  height: 81px;
  min-width: 0;
  background: var(--clip-color);
  border: 0;
  border-radius: 10px;
  cursor: grab;
  box-shadow: inset 0 0 0 1px #00000008, 0 2px 3px #00000003;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.clip.selected {
  box-shadow: inset 0 0 0 2px #8b6dc3;
}
.clip.dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: 0 6px 20px #51406735;
  touch-action: none;
}
.clip canvas {
  position: absolute;
  left: 0;
  top: 29px;
  width: 100%;
  height: 43px;
  pointer-events: none;
  opacity: 0.58;
}
.clip-label {
  position: absolute;
  left: 20px;
  top: 9px;
  right: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
  color: #4d435d;
}
.handle {
  position: absolute;
  width: 22px;
  top: 0;
  height: 100%;
  touch-action: none;
  cursor: ew-resize;
  z-index: 2;
  display: none;
  background: #ffffff38;
  align-items: center;
  justify-content: center;
  color: #77618d;
}
.selected .handle {
  display: flex;
}
.handle::after {
  content: "⋮";
  font-size: 22px;
}
.handle.left {
  left: 0;
}
.handle.right {
  right: 0;
}
#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 170px;
  width: 2px;
  background: #8770b7;
  pointer-events: none;
  z-index: 3;
}
#playhead > span {
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 11px;
  background: #8770b7;
  clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
}
#empty {
  position: absolute;
  top: 67px;
  left: 170px;
  right: 0;
  bottom: 0;
  text-align: center;
  padding: 30px 15px;
  pointer-events: none;
}
#empty > * {
  pointer-events: auto;
}
.empty-wave {
  font-size: 29px;
  letter-spacing: 5px;
  color: #c4b2e4;
}
#empty h2 {
  font-size: 18px;
  color: #76638c;
  margin: 15px 0 10px;
}
#empty p {
  font-size: 12px;
  line-height: 1.8;
  color: #9c91a7;
}
#empty button {
  margin: 6px 0;
  background: #eee8f6;
  color: #82679c;
  font-size: 12px;
}
#empty > span {
  display: block;
  font-size: 9px;
  color: #b0a6ba;
  margin-top: 5px;
}
.track-actions {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: white;
}
.track-actions button {
  font-size: 12px;
}
.track-actions button:first-child {
  border: 1px dashed #cabfda;
  background: #fcfaff;
  color: #806099;
}
.track-actions > span {
  margin-left: auto;
  font-size: 10px;
  color: #b4a9bf;
  font-style: italic;
}
.editor-tip {
  padding: 13px 22px;
  color: #a79bb3;
  font-size: 11px;
  background: #fcfbfe;
  border-top: 1px solid var(--line);
}
#library {
  width: 328px;
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 19px 0;
  max-height: 531px;
}
#library[hidden] {
  display: none;
}
.library-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.library-title h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
  margin: 0;
  color: #5b4c6d;
}
.library-title p {
  font-size: 11px;
  color: #a198aa;
  margin: 6px 0 17px;
}
.library-title button {
  margin: -12px -12px 0 0;
  font-size: 23px;
  color: #a99fb3;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e9e3f0;
  background: #fcfafe;
  border-radius: 10px;
  padding: 0 13px;
  min-height: 44px;
  color: #9e88b5;
}
.search span {
  font-size: 23px;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 12px;
  color: #5c4c6e;
}
.search input::placeholder {
  color: #afa1bc;
}
#categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0;
}
#categories button {
  font-size: 10px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #eee9f3;
  border-radius: 8px;
  color: #9c8eaa;
  font-weight: 550;
}
#categories button.active {
  background: #ebe3f6;
  border-color: #e4d9f2;
  color: #7f5da4;
}
.library-caption {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #b0a6b9;
  letter-spacing: 0.6px;
  margin: 4px 0 8px;
}
.library-caption > span:first-child {
  letter-spacing: 0;
}
#sound-list {
  overflow: auto;
  flex: 1;
  min-height: 80px;
}
.sound {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1edf6;
  min-height: 66px;
}
.sound-icon {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #efeafb;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.sound:nth-child(3n + 2) .sound-icon {
  background: #e5f1e8;
}
.sound:nth-child(3n) .sound-icon {
  background: #fff0d6;
}
.sound-info {
  min-width: 0;
  flex: 1;
}
.sound-info strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: #6b5a7f;
}
.sound-info small {
  display: block;
  color: #b0a4b8;
  font-size: 9px;
  margin-top: 5px;
}
.sound button {
  min-width: 40px;
  min-height: 48px;
  padding: 0;
  color: #a08bab;
  font-size: 14px;
}
.sound button.add {
  background: #f2edf9;
  min-width: 36px;
  min-height: 36px;
  font-size: 20px;
  color: #9a7bb7;
}
.library-footer {
  padding: 13px 0;
  font-size: 9px;
  color: #b3a7be;
}
.library-footer a {
  float: right;
  color: #a997b8;
}
.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin: 19px 0 30px;
  font-size: 11px;
  color: #aea3b9;
}
.bottom-row > p {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bottom-row > p > span {
  font-size: 17px;
  color: #b1a1c5;
}
.bottom-row i {
  font-style: normal;
  margin: 0 7px;
  color: #cec4d9;
}
.bottom-row details {
  max-width: 340px;
  line-height: 1.7;
  text-align: right;
  position: relative;
}
.bottom-row summary {
  cursor: pointer;
  min-height: 40px;
  padding: 10px;
}
.bottom-row details[open] {
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bottom-row details p {
  text-align: left;
  padding: 0 12px;
}
footer {
  border-top: 1px solid #eae6ef;
  padding: 22px 3.2%;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #b1a8b8;
  font-size: 10px;
}
footer a {
  color: #9b8aa8;
  margin-left: 16px;
}
#clip-tools {
  padding: 10px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  background: #f2edf8;
  border-top: 1px solid #e4dcef;
}
#clip-tools[hidden] {
  display: none;
}
#clip-name {
  font-size: 11px;
  margin-right: 12px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#clip-tools button {
  font-size: 11px;
  padding: 0 10px;
}
#clip-tools label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
#clip-volume {
  width: 80px;
  accent-color: var(--purple);
}
summary {
  cursor: pointer;
}
#advanced summary {
  font-size: 11px;
  padding: 14px;
}
#advanced[open] {
  width: 100%;
}
.advanced-content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.advanced-content label {
  flex-direction: column !important;
  align-items: start !important;
}
.advanced-content input,
.advanced-content select {
  max-width: 140px;
  min-height: 42px;
  border: 1px solid #d6cae3;
  border-radius: 8px;
  padding: 5px;
  background: #fff;
}
#message {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #453652;
  color: white;
  padding: 13px 22px;
  border-radius: 14px;
  box-shadow: 0 8px 30px #0002;
  z-index: 40;
  max-width: 90%;
  font-size: 13px;
  display: none;
}
#message.visible {
  display: block;
}
#busy {
  position: fixed;
  inset: 0;
  background: #faf9f5cc;
  backdrop-filter: blur(5px);
  z-index: 30;
  display: grid;
  place-items: center;
}
#busy[hidden] {
  display: none;
}
.busy-card {
  text-align: center;
  padding: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
}
.busy-card h2 {
  font-size: 20px;
}
.busy-card p {
  color: #94869c;
}
.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #e1d5ee;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
dialog {
  max-width: 450px;
  border: 1px solid #ddd1e7;
  border-radius: 20px;
  padding: 30px;
  color: #544360;
}
dialog::backdrop {
  background: #302a4060;
}
dialog h2 {
  font-size: 21px;
}
dialog p {
  line-height: 1.6;
  color: #93829f;
}
dialog form {
  display: flex;
  gap: 10px;
  justify-content: end;
  margin-top: 25px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
@media (pointer: coarse) {
  .handle {
    width: 28px;
  }
  .zoom button,
  #categories button,
  .sound button.add,
  .track-meta button {
    min-height: 48px;
    min-width: 48px;
  }
  .track-meta input[type="text"] {
    height: 24px;
  }
  #library {
    max-height: 560px;
  }
  .track-meta input[type="range"] {
    width: 40px;
  }
}
@media (min-width: 1550px) {
  #timeline-scroll {
    height: 430px;
  }
  #library {
    max-height: 621px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 25px 20px 0;
  }
  .topbar {
    padding: 0 20px;
  }
  .topbar nav button {
    font-size: 12px;
    padding: 0 10px;
  }
  .transport {
    padding: 15px 16px;
    gap: 10px;
  }
  .undo-group {
    margin-left: 0;
    padding-left: 5px;
  }
  .transport-main {
    gap: 2px;
  }
  #library {
    width: 280px;
    padding: 18px 14px 0;
  }
  .record {
    padding: 0 14px;
  }
  .track-actions > span {
    display: none;
  }
  .brand {
    font-size: 23px;
  }
  .transport-main #home {
    display: none;
  }
}
@media (max-width: 800px) {
  .topbar {
    height: auto;
    min-height: 90px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
  }
  .topbar nav {
    width: 100%;
    justify-content: space-between;
  }
  .topbar nav button {
    padding: 0 10px;
  }
  .topbar nav .primary {
    margin-left: auto;
  }
  .project-heading {
    margin-bottom: 20px;
  }
  .local-badge {
    padding: 10px;
    font-size: 10px;
  }
  .local-badge small {
    display: none;
  }
  .transport {
    flex-wrap: wrap;
    gap: 10px;
  }
  .transport-main {
    gap: 4px;
  }
  .transport-main #home {
    display: block;
  }
  .clock-area {
    margin-left: auto;
  }
  .undo-group {
    margin-left: auto;
  }
  .timeline-toolbar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  .timeline-toolbar strong {
    font-size: 12px;
  }
  #track-count {
    display: none;
  }
  .workspace {
    flex-direction: column;
  }
  #library {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 360px;
    padding: 20px;
  }
  #sound-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    max-height: 170px;
  }
  .library-title p {
    margin-bottom: 10px;
  }
  .library-footer {
    padding-bottom: 12px;
  }
  .search {
    max-width: 100%;
  }
  #categories {
    margin: 10px 0;
  }
  #timeline-scroll {
    height: 330px;
  }
  #project-name {
    font-size: 27px;
    width: 14ch;
  }
  .bottom-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .bottom-row details {
    max-width: 100%;
    text-align: left;
  }
  .bottom-row p {
    font-size: 10px;
    gap: 6px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 9px;
  }
  .transport-main > button:not(.record) {
    font-size: 15px;
  }
  .transport-main {
    width: 100%;
  }
  .transport-main .record {
    margin-right: auto;
  }
  .project-heading p {
    font-size: 11px;
  }
  .project-heading .eyebrow {
    font-size: 8px;
  }
}
@media (max-width: 480px) {
  main {
    padding: 22px 10px 0;
  }
  .topbar {
    padding: 16px 10px;
  }
  .topbar nav button {
    font-size: 10px;
    padding: 0 7px;
  }
  .topbar .primary {
    padding: 0 10px;
  }
  #sound-list {
    grid-template-columns: 1fr;
  }
  .zoom #library-toggle {
    font-size: 11px;
    padding: 0 8px;
  }
  .timeline-toolbar > div {
    gap: 5px;
  }
  .zoom {
    gap: 1px !important;
  }
  .zoom button {
    min-width: 35px;
  }
  .zoom span {
    min-width: 30px;
  }
  .local-badge {
    max-width: 100px;
    line-height: 1.5;
  }
  .project-heading p {
    max-width: 215px;
    line-height: 1.5;
  }
  .transport-main > button:not(.record) {
    min-width: 40px;
  }
  .transport-divider {
    margin: 0 1px;
  }
  .record {
    padding: 0 12px;
    font-size: 12px;
  }
  .transport-main #home {
    display: none;
  }
  #empty {
    left: 115px;
    padding: 28px 10px;
  }
  #empty h2 {
    font-size: 14px;
  }
  #empty p {
    font-size: 11px;
  }
  .track-meta,
  .ruler-label {
    width: 115px;
  }
  .track-meta {
    padding-left: 7px;
  }
  .track-meta input[type="text"] {
    width: 93px;
    font-size: 11px;
  }
  .track-meta input[type="range"] {
    width: 34px;
    margin: 0;
  }
  .track-meta button {
    min-width: 32px;
    width: 32px;
    min-height: 44px;
  }
  .bottom-row p {
    gap: 5px;
  }
  .bottom-row i {
    margin: 0 2px;
  }
}

/* Decide touch behavior before pointerdown: short swipe pans; long hold moves. */
.clip {
  touch-action: none;
}
.zoom #library-toggle {
  min-height: 48px;
}
.track-meta {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  grid-template-rows: 26px 48px;
  gap: 2px;
  align-items: center;
}
.track-meta input[type="text"] {
  grid-column: 1/-1;
  width: 100%;
  max-width: 100%;
}
.track-meta input[type="range"] {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.track-meta button {
  width: 42px;
  min-width: 42px;
  height: 48px;
  min-height: 48px;
}
.sound-info strong {
  font-size: 13px;
  line-height: 1.3;
}
.sound-info small {
  font-size: 11px;
  line-height: 1.3;
}
#categories button {
  font-size: 11px;
}
@media (pointer: coarse) and (min-width: 481px) {
  .track-meta {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }
  .track-meta button {
    width: 48px;
    min-width: 48px;
  }
}
@media (max-width: 480px) {
  .transport-main {
    flex-wrap: wrap;
  }
  .transport-main .record {
    flex: 0 0 100%;
    justify-content: center;
  }
  .transport-main > button:not(.record) {
    min-width: 48px;
    flex: 1;
  }
  .transport-divider {
    display: none;
  }
  .zoom button {
    min-width: 48px;
    min-height: 48px;
  }
  .track-meta {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }
  .track-meta button {
    width: 32px;
    min-width: 32px;
  }
}

/* Visible mouse position and the waveform being recorded. */
#playhead {
  width: 3px;
  background: #6f48c9;
  z-index: 6;
}
#playhead > span {
  background: #6f48c9;
  width: 15px;
  height: 15px;
  left: -6px;
}
#hoverhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed #8565ad;
  pointer-events: none;
  z-index: 5;
}
#hoverhead[hidden] {
  display: none;
}
#hoverhead > span {
  position: absolute;
  top: 18px;
  left: 4px;
  color: #654687;
  background: #fffc;
  border-radius: 4px;
  padding: 2px 4px;
  font:
    10px ui-monospace,
    monospace;
}
.recording-clip {
  position: absolute;
  top: 13px;
  height: 81px;
  min-width: 32px;
  border: 2px solid #d96377;
  background: #ffe0e6;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.recording-clip .clip-label {
  color: #a93854;
  left: 10px;
}
.recording-clip canvas {
  position: absolute;
  top: 29px;
  height: 44px;
}
#record.active .record-dot {
  border-radius: 3px;
  animation: none;
}
#record {
  gap: 8px;
}
#record:disabled {
  cursor: wait;
}

.recording-options { border-top: 1px solid var(--line, #e8e3dd); padding: 10px 20px; background: #fffdfa; }
.recording-options details { max-width: 650px; }
.recording-options summary { cursor: pointer; width: fit-content; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: #655174; }
.recording-options summary::before { content: '▸'; }
.recording-options details[open] summary::before { content: '▾'; }
.microphone-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 12px; }
.microphone-fields label { width: 100%; font-size: 13px; }
.microphone-fields select { min-height: 48px; min-width: 0; max-width: 100%; flex: 1 1 250px; border: 1px solid #d8cedf; border-radius: 12px; padding: 10px; background: white; color: #3c3448; font: inherit; font-size: 13px; }
.microphone-fields p, #record-advice { margin: 0; font-size: 12px; line-height: 1.6; color: #675d6b; }
.microphone-fields p { width: 100%; }
#record-advice { max-width: 800px; padding: 0 0 8px; }

.info-page { max-width: 860px; margin: 0 auto; padding: 32px 24px 60px; line-height: 1.65; }
.info-page h1 { line-height: 1.2; margin: 28px 0 20px; }
.info-page h2 { font-size: 20px; line-height: 1.35; margin-top: 30px; }
.info-page a { color: var(--purple); text-underline-offset: 3px; }
#record-recover { max-width: 100%; white-space: normal; }

/* Matitola family navigation stays available without crowding studio controls. */
.brand-family { display: flex; align-items: center; gap: 22px; }
.brand-family .brand { font-size: 26px; letter-spacing: -1px; }
.matitola-home { color: #526657; font-size: 12px; font-weight: 650; text-decoration: none; padding: 12px 0; white-space: nowrap; }
.matitola-home:hover { text-decoration: underline; text-underline-offset: 3px; }
.matitola-home:focus-visible { outline: 3px solid #7257cf; outline-offset: 4px; border-radius: 3px; }
@media (min-width: 801px) and (max-width: 1100px) {
  .brand-family { gap: 12px; }
  .brand-family .brand { font-size: 22px; gap: 9px; }
  .brand-family .brand-icon { width: 40px; height: 40px; }
  .brand-family .brand small { font-size: 8px; letter-spacing: 1.8px; }
}
@media (max-width: 800px) {
  .brand-family { width: 100%; justify-content: space-between; gap: 12px; }
}
@media (max-width: 380px) {
  .brand-family .brand { font-size: 22px; gap: 9px; }
  .brand-family .brand small { font-size: 8px; letter-spacing: 1.5px; }
}
@media (max-width: 480px) {
  .topbar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav button { width: 100%; min-height: 44px; font-size: 12px; }
  .topbar nav .primary { margin-left: 0; }
}
