:root {
  color-scheme: light;
  --ink: #272421;
  --muted: #716b64;
  --paper: #f5f3ee;
  --panel: #fffefa;
  --line: #ddd7ce;
  --line-soft: rgba(113, 107, 100, 0.2);
  --teal: #1b747b;
  --teal-dark: #105b61;
  --amber: #e4aa3a;
  --red: #b84036;
  --green: #3f7e5c;
  --shadow: 0 14px 38px rgba(51, 45, 38, 0.1);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 243, 238, 0.96)),
    repeating-linear-gradient(90deg, rgba(39, 36, 33, 0.025) 0 1px, transparent 1px 94px);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

button,
input {
  font: inherit;
}

@media (max-width: 767px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.app-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 254, 250, 0.9);
}

.brand-cluster,
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
}

.brand-cluster {
  gap: 8px;
}

.brand {
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 11px;
  background: #080807;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 18px;
  line-height: 1.05;
}

.brand small {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.version-refresh-pill {
  min-width: 42px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(27, 116, 123, 0.28);
  border-radius: 999px;
  background: rgba(27, 116, 123, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.version-refresh-pill:hover {
  background: rgba(27, 116, 123, 0.14);
}

.version-refresh-pill:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.icon-text-button,
.account-button,
.wallet-button,
.primary-button,
.secondary-button,
.favorite-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 750;
}

.icon-text-button,
.account-button,
.wallet-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wallet-button {
  min-height: 38px;
  border: 1px solid rgba(228, 170, 58, 0.5);
  border-radius: 7px;
  padding: 0 11px;
  background: rgba(255, 246, 220, 0.9);
  color: #76510a;
  font-size: 13px;
  font-weight: 750;
}

.wallet-button > span:first-child {
  color: var(--amber);
  font-size: 10px;
}

.wallet-button:hover {
  border-color: var(--amber);
  background: #fff7df;
}

.account-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
}

.primary-button {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button:hover,
.favorite-button:hover,
.icon-text-button:hover,
.account-button:hover {
  border-color: #b9afa3;
  background: white;
}

.library-toolbar {
  padding: 22px 20px 15px;
  border: 1px solid var(--line-soft);
  border-top: 0;
  background: rgba(255, 254, 250, 0.78);
}

.workspace-tabs {
  display: flex;
  gap: 3px;
  margin: -7px 0 20px;
  border-bottom: 1px solid var(--line);
}

.workspace-tab {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.workspace-tab.active {
  border-bottom-color: var(--teal);
  color: var(--teal);
}

.library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.library-heading h1 {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.library-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.catalog-count {
  min-width: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 18px;
}

.search-submit-button {
  min-width: 76px;
}

.search-field {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.search-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 116, 123, 0.1);
}

.search-icon {
  width: 15px;
  height: 15px;
  position: relative;
  display: block;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  transform: rotate(45deg);
  background: var(--muted);
}

.search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.clear-search {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  min-width: 76px;
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.filter-tab.active {
  border-bottom-color: var(--teal);
  color: var(--teal);
}

.catalog-section {
  min-height: 410px;
  padding: 18px 0 0;
}

.personal-section {
  padding: 24px 0 0;
}

.personal-heading,
.block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.personal-heading h1,
.block-heading h2 {
  margin: 0;
}

.personal-heading h1 {
  font-size: 30px;
}

.personal-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.personal-heading-actions {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.personal-search-form {
  width: min(390px, 38vw);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 6px;
  margin-right: auto;
}

.points-account {
  margin-top: 14px;
  border: 1px solid rgba(228, 170, 58, 0.42);
  border-radius: 8px;
  background: #fffdf7;
  overflow: hidden;
}

.points-account-summary {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

.points-account-summary > div:first-child {
  display: grid;
  gap: 3px;
}

.points-account-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.points-account-summary strong {
  color: #76510a;
  font-size: 25px;
  line-height: 1.1;
}

.points-account-summary strong small {
  font-size: 12px;
}

.points-account-actions {
  display: flex;
  gap: 7px;
}

.points-history-panel {
  border-top: 1px solid rgba(228, 170, 58, 0.28);
  padding: 13px 16px 8px;
  background: white;
}

.points-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.points-history-heading span {
  color: var(--muted);
  font-size: 11px;
}

.points-history-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
}

.points-history-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.points-history-copy strong,
.points-history-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-history-copy small {
  color: var(--muted);
  font-size: 11px;
}

.points-history-amount {
  flex: 0 0 auto;
  font-size: 16px;
}

.points-history-amount.credit {
  color: var(--teal);
}

.points-history-amount.debit {
  color: var(--red);
}

.inline-preview-frame {
  width: 1px;
  height: 1px;
  position: fixed;
  left: -10px;
  bottom: -10px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.personal-empty,
.personal-block {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.personal-empty {
  padding: 44px 20px;
  text-align: center;
}

.personal-empty strong {
  font-size: 19px;
}

.personal-empty p {
  margin: 8px auto 18px;
  color: var(--muted);
}

.personal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.personal-summary > div {
  min-height: 82px;
  display: grid;
  place-content: center;
  gap: 3px;
  text-align: center;
}

.personal-summary > div + div {
  border-left: 1px solid var(--line-soft);
}

.personal-summary strong {
  color: var(--teal);
  font-size: 24px;
}

.personal-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.personal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.personal-tab {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.personal-tab + .personal-tab {
  border-left: 1px solid var(--line-soft);
}

.personal-tab strong {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(113, 107, 100, 0.1);
  color: inherit;
  font-size: 12px;
  text-align: center;
}

.personal-tab.active {
  border-bottom-color: var(--teal);
  background: rgba(27, 116, 123, 0.06);
  color: var(--teal);
}

.personal-tab.active strong {
  background: rgba(27, 116, 123, 0.13);
}

.personal-block {
  padding: 16px;
}

.block-heading h2 {
  font-size: 17px;
}

.personal-list {
  margin-top: 8px;
}

.personal-track-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
}

.personal-track-row.public-track {
  background: transparent;
}

.personal-track-row.public-track .personal-track-main strong {
  color: var(--teal);
}

.personal-track-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.personal-track-main > span:last-child,
.personal-track-title-button {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.personal-track-title-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.personal-track-title-button:hover strong,
.personal-track-title-button:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.personal-track-main strong,
.personal-track-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-track-main small {
  color: var(--muted);
}

.track-origin {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.personal-track-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.personal-track-actions .secondary-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.personal-list-empty {
  margin: 14px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.upload-dialog {
  width: min(520px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.upload-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

#managementDialog {
  width: min(580px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
}

#managementDialog .upload-panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.management-playback {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.management-playback-head,
.management-playback-actions,
.management-stepper,
.management-change-row {
  display: flex;
  align-items: center;
}

.management-playback-head {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.management-playback-actions {
  gap: 7px;
}

.management-play-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
}

.management-playback input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.management-midi-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.management-edit-control {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.management-stepper,
.management-edit-control select {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.management-stepper {
  justify-content: space-between;
}

.management-stepper button {
  width: 40px;
  align-self: stretch;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.management-edit-control select {
  padding: 0 10px;
  color: var(--ink);
}

.management-change-header {
  display: grid;
  gap: 2px;
}

.management-change-header strong {
  font-size: 13px;
}

.management-change-header small {
  color: var(--muted);
  font-size: 11px;
}

.management-change-list {
  display: grid;
  gap: 6px;
}

.management-change-row {
  min-height: 34px;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(27, 116, 123, 0.035);
  font-size: 12px;
}

.management-change-row button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--red);
}

.management-change-empty {
  color: var(--muted);
  font-size: 12px;
}

.management-midi-editor.is-disabled,
.management-change-list.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

.upload-panel h2,
.upload-panel p {
  margin: 0;
}

.upload-panel > p:not(.auth-status) {
  color: var(--muted);
  font-size: 13px;
}

.upload-panel > label:not(.visibility-choice) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-panel input[type="text"],
.upload-panel input[type="file"],
.upload-panel input[type="number"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.price-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.price-field.is-disabled {
  opacity: 0.52;
}

.price-field.is-disabled input {
  cursor: not-allowed;
  background: #f1efeb;
}

.dialog-track-title {
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  background: rgba(27, 116, 123, 0.06);
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 800;
}

.publish-warning {
  padding: 10px 12px;
  border: 1px solid rgba(184, 64, 54, 0.22);
  background: rgba(184, 64, 54, 0.06);
  color: var(--red) !important;
  font-size: 12px !important;
}

.dialog-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}

.management-utility-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.management-icon-action {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

.management-icon-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.management-icon-action.favorite-action[aria-pressed="true"] {
  border-color: rgba(228, 170, 58, 0.5);
  background: rgba(228, 170, 58, 0.12);
  color: #a46b00;
}

.management-icon-action.favorite-action[aria-pressed="true"] svg {
  fill: currentColor;
}

.danger-button {
  border-color: rgba(190, 48, 42, 0.32);
  background: rgba(190, 48, 42, 0.045);
  color: var(--red);
}

.danger-button:hover:not(:disabled) {
  background: rgba(190, 48, 42, 0.09);
}

.personal-track-row.sold-track {
  background: rgba(228, 170, 58, 0.06);
}

.sold-label {
  color: #8b650e;
  font-size: 11px;
  font-weight: 800;
}

.personal-track-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.visibility-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.visibility-choice input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.visibility-choice span {
  display: grid;
  gap: 2px;
}

.visibility-choice small {
  color: var(--muted);
}

.catalog-status {
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.track-grid {
  display: block;
  border-top: 1px solid var(--line-soft);
}

.track-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}

.track-open {
  width: 100%;
  display: block;
  border: 0;
  padding: 13px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.track-open:hover {
  background: rgba(27, 116, 123, 0.035);
}

.score-preview {
  height: 94px;
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.staff-lines {
  position: absolute;
  inset: 22px 10px auto;
  height: 44px;
  background: repeating-linear-gradient(180deg, transparent 0 8px, rgba(39, 36, 33, 0.55) 8px 9px);
}

.preview-clef {
  position: absolute;
  left: 14px;
  top: 26px;
  color: #292522;
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.preview-note {
  width: 13px;
  height: 9px;
  position: absolute;
  border-radius: 50%;
  background: var(--ink);
}

.note-one {
  left: 60px;
  top: 49px;
}

.note-two {
  left: 84px;
  top: 39px;
}

.note-three {
  left: 106px;
  top: 31px;
}

.track-copy,
.track-title-row {
  min-width: 0;
  display: flex;
}

.track-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.track-title-row {
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.track-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-price,
.price-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(63, 126, 92, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.track-price.paid,
.price-badge.paid {
  background: rgba(228, 170, 58, 0.16);
  color: #8a5c00;
}

.track-author {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-facts {
  color: var(--muted);
  font-size: 12px;
}

.track-card-actions {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 7px 10px 7px 4px;
}

.quick-preview,
.quick-practice {
  width: 33px;
  height: 31px;
  min-height: 31px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.quick-preview {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.compact-track-action,
.personal-track-actions .row-preview,
.personal-track-actions .row-practice {
  width: 33px;
  height: 31px;
  min-height: 31px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 33px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}

.catalog-more {
  position: relative;
}

.catalog-more-trigger {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.catalog-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: max-content;
  min-width: 176px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(39, 36, 33, 0.16);
}

.catalog-more-menu button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.catalog-more-menu button:hover,
.catalog-more-menu button:focus-visible {
  background: rgba(27, 116, 123, 0.08);
}

.download-action-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.download-action-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-preview.playing,
.row-preview.playing {
  border-color: var(--teal);
  background: rgba(27, 116, 123, 0.1);
  color: var(--teal);
}

.card-favorite {
  width: 33px;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--muted);
  font-size: 19px;
}

.card-favorite[aria-pressed="true"] {
  border-color: rgba(228, 170, 58, 0.5);
  color: #a46b00;
  background: rgba(228, 170, 58, 0.12);
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.empty-note {
  font-size: 42px;
  color: var(--teal);
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state h2 {
  color: var(--ink);
  font-size: 18px;
}

.empty-state p {
  font-size: 13px;
}

.shared-app-banner {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -1px -1px 0;
  padding: 10px 18px;
  border: 1px solid #9fc9cc;
  background: #e8f4f3;
  color: #174f54;
}

.shared-app-banner > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.shared-app-banner strong {
  flex: none;
  font-size: 14px;
}

.shared-app-banner span {
  font-size: 13px;
}

.shared-download-button {
  flex: none;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.shared-track-view {
  padding: 38px 28px 42px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--panel);
}

.shared-browse-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.shared-track-heading {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.shared-track-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #171716;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 38px;
}

.shared-track-heading h1 {
  margin: 4px 0 7px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.shared-track-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.shared-track-metadata {
  max-width: 820px;
  margin: 34px 0 28px;
}

.shared-track-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shared-preview-button,
.shared-app-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
}

.shared-preview-button {
  min-width: 128px;
}

.shared-app-action {
  padding: 0 18px;
  color: var(--ink);
}

.shared-track-more .catalog-more-trigger {
  width: 42px;
  height: 42px;
  min-height: 42px;
  flex-basis: 42px;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(24, 22, 19, 0.46);
  backdrop-filter: blur(3px);
}

.track-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
}

.track-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.15fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dialog-close {
  width: 34px;
  height: 34px;
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 20px;
}

.detail-artwork {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 66% 30%, rgba(228, 170, 58, 0.2), transparent 30%),
    linear-gradient(145deg, #184f54, #102d31 65%, #292522);
}

.detail-artwork::before {
  content: "𝄞";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -53%);
  color: rgba(255, 255, 255, 0.92);
  font-family: Georgia, serif;
  font-size: 142px;
}

.detail-artwork::after {
  content: "";
  width: 170px;
  height: 88px;
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: repeating-linear-gradient(180deg, transparent 0 16px, rgba(255, 255, 255, 0.45) 16px 17px);
}

.detail-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 24px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-right: 26px;
}

.detail-creator,
.detail-description {
  color: var(--muted);
}

.detail-creator {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-title-row h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.18;
}

.detail-description {
  min-height: 62px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.6;
}

.detail-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.detail-metadata div {
  min-width: 0;
}

.detail-metadata dt {
  color: var(--muted);
  font-size: 11px;
}

.detail-metadata dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

.detail-actions .favorite-button {
  grid-column: 1 / -1;
}

.favorite-button[aria-pressed="true"] {
  border-color: rgba(228, 170, 58, 0.55);
  background: rgba(228, 170, 58, 0.12);
  color: #8a5c00;
}

.notice-dialog {
  width: min(390px, calc(100% - 24px));
}

.notice-panel {
  position: relative;
  padding: 25px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notice-panel h2 {
  margin: 0 40px 9px 0;
  font-size: 19px;
}

.notice-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notice-actions .primary-button,
.notice-actions .secondary-button {
  width: 100%;
}

.auth-dialog {
  width: min(410px, calc(100% - 24px));
}

.auth-dialog.profile-mode {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 84px);
  position: fixed;
  inset: 70px 14px auto auto;
  margin: 0;
  overflow: auto;
}

.auth-dialog.profile-mode::backdrop {
  background: rgba(32, 29, 26, 0.12);
}

.auth-panel {
  position: relative;
  padding: 25px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  margin: 0 40px 8px 0;
  font-size: 20px;
}

.auth-panel > div > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.profile-points-account {
  margin: 14px 0;
}

.profile-points-account .points-account-summary {
  min-height: 64px;
  padding: 11px 12px;
}

.points-history-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: var(--bg);
}

.points-history-dialog::backdrop {
  background: var(--bg);
}

.points-history-page {
  width: min(820px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel);
}

.points-history-page-header {
  min-height: 78px;
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
  background: rgba(255, 255, 255, 0.98);
}

.points-history-back {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
}

.points-history-page-header h2 {
  margin: 0;
  font-size: 19px;
}

.points-history-page-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.points-history-page-header > strong {
  color: #76510a;
  font-size: 22px;
}

.points-history-page-header > strong small {
  color: var(--muted);
  font-size: 11px;
}

.points-history-page-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
}

.points-history-page .points-history-row {
  min-height: 62px;
}

.points-history-state {
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.profile-language {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.profile-language > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.profile-language-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.profile-language-options button {
  min-height: 38px;
  border: 0;
  background: white;
  color: var(--ink);
  font-weight: 750;
}

.profile-language-options button + button {
  border-left: 1px solid var(--line);
}

.profile-language-options button.active {
  background: var(--teal);
  color: white;
}

.oauth-buttons {
  display: grid;
  gap: 9px;
}

.oauth-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.apple-auth-button {
  border-color: #111;
  background: #111;
  color: white;
}

.provider-mark {
  min-width: 34px;
  font-size: 12px;
  font-weight: 800;
}

.google-mark {
  color: #4285f4;
  font-size: 17px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.auth-form input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(27, 116, 123, 0.15);
}

.auth-status {
  min-height: 18px;
  margin: -2px 0 0;
  font-size: 12px;
}

.auth-status.error {
  color: #b93832;
}

.auth-status.success {
  color: var(--teal);
}

.auth-form .primary-button,
.auth-sign-out {
  width: 100%;
}

.auth-form .text-button {
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.auth-user-email {
  overflow-wrap: anywhere;
}

.account-button.signed-in .account-mark {
  background: var(--teal);
  color: white;
}

.language-menu {
  min-width: 140px;
  position: fixed;
  z-index: 30;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.language-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.language-menu button:hover {
  background: rgba(27, 116, 123, 0.08);
}

@media (max-width: 720px) {
  .catalog-more-menu {
    position: fixed;
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    z-index: 100;
    width: auto;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(39, 36, 33, 0.24);
  }

  .catalog-more-menu button {
    min-height: 46px;
    text-align: center;
  }

  .catalog-more-menu button + button {
    border-top: 1px solid var(--line-soft);
  }

  .wallet-button span:last-child {
    display: none;
  }
  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-header {
    min-height: 58px;
    padding: 7px 9px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 16px;
  }

  .version-refresh-pill {
    min-width: 39px;
    height: 24px;
    padding: 0 7px;
  }

  .icon-text-button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .account-button > span:last-child {
    display: none;
  }

  .account-button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .library-toolbar {
    padding: 18px 12px 10px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-submit-button {
    min-width: 66px;
  }

  .personal-tab {
    min-height: 54px;
    gap: 5px;
    padding: 0 4px;
    font-size: 11px;
  }

  .points-history-page-header {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .points-history-page-header > strong {
    font-size: 18px;
  }

  .points-history-page-scroll {
    padding-right: 14px;
    padding-left: 14px;
  }

  #uploadButton {
    display: none;
  }

  .workspace-tabs {
    margin-bottom: 15px;
  }

  .workspace-tab {
    flex: 1;
    padding: 0 8px;
  }

  .personal-section {
    padding-top: 14px;
  }

  .personal-heading h1 {
    font-size: 24px;
  }

  .personal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .personal-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .personal-heading-actions > button {
    min-width: 0;
  }

  .personal-search-form {
    width: 100%;
    grid-column: 1 / -1;
  }

  .points-account-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .points-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .personal-track-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .track-origin {
    display: none;
  }

  .track-grid {
    border-top: 1px solid var(--line-soft);
  }

  .track-open {
    padding: 10px;
  }

  .track-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .note-two {
    left: 70px;
    top: 36px;
  }

  .note-three {
    left: 90px;
    top: 28px;
  }

  .track-detail {
    display: block;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .detail-artwork {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .detail-artwork::before {
    font-size: 95px;
  }

  .detail-artwork::after {
    bottom: 20px;
  }

  .detail-content {
    padding: 20px 16px 16px;
  }

  .detail-title-row h2 {
    font-size: 21px;
  }
}

@media (max-width: 390px) {
  .track-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .track-card-actions {
    justify-content: flex-start;
    padding: 0 10px 10px;
  }

  .track-copy {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 720px) {
  .shared-app-banner {
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
  }

  .shared-app-banner > div {
    display: grid;
    gap: 2px;
  }

  .shared-app-banner span {
    line-height: 1.35;
  }

  .shared-download-button {
    padding: 0 10px;
  }

  .shared-track-view {
    padding: 24px 16px 30px;
  }

  .shared-browse-link {
    margin-bottom: 22px;
  }

  .shared-track-heading {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
  }

  .shared-track-mark {
    width: 58px;
    height: 58px;
    font-size: 30px;
  }

  .shared-track-heading h1 {
    font-size: 27px;
  }

  .shared-track-heading .price-badge {
    grid-column: 2;
    justify-self: start;
  }

  .shared-track-metadata {
    margin: 26px 0 22px;
  }

  .shared-track-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .shared-preview-button {
    min-width: 0;
  }

  .shared-app-action {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .shared-track-more {
    grid-column: 2;
    grid-row: 1;
  }
}
