/* Final layout layer: compact, centered, and easy to remove or tune. */
:root {
  --layout-max: 980px;
  --project-card-size: 156px;
  --bg: #101112;
  --panel: #18191b;
  --panel-soft: #202124;
  --ink: #f7f4ef;
  --text: #f7f4ef;
  --muted: #aaa49b;
  --dim: #77716a;
  --line: rgba(255, 255, 255, 0.11);
  --button: #202124;
  --button-hover: #292b2f;
  --accent: #8b5cf6;
  --accent-strong: #a78bfa;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --white: #f7f4ef;
  --black: #101112;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.36);
  --motion-ease: cubic-bezier(0.18, 0.92, 0.18, 1);
  --motion-fast: 180ms;
  --motion-mid: 360ms;
  --motion-slow: 640ms;
}

body.light-mode {
  --bg: #f5f3ef;
  --panel: #ffffff;
  --panel-soft: #ebe8e2;
  --ink: #171717;
  --text: #171717;
  --muted: #6f6a64;
  --dim: #918b83;
  --line: rgba(23, 23, 23, 0.12);
  --button: #ebe8e2;
  --button-hover: #e1ddd5;
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.13);
  --white: #171717;
  --black: #ffffff;
  --shadow: 0 22px 62px rgba(31, 26, 18, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.07) 0, transparent 230px),
    var(--bg);
}

.app-shell {
  background: transparent;
}

.screen {
  padding-top: 30px;
  padding-bottom: 132px;
}

[hidden],
.screen[hidden] {
  display: none !important;
}

button,
.circle-button,
.floating-add,
.player-icon-button,
.player-add-button,
.hero-play,
.shuffle-button,
.cover-play,
.track-menu,
.mini-more,
.done-button,
.sync-primary-button,
.sync-secondary-button,
.account-primary-button,
.account-secondary-button,
.account-plain-button,
.delete-confirm-button,
.delete-cancel-button,
.username-save-button,
.primary-button,
.secondary-button,
.convert-button,
.project-add-tracks,
.add-tracks {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.circle-button,
.floating-add,
.player-icon-button,
.player-add-button,
.hero-play,
.shuffle-button,
.cover-play,
.track-menu,
.mini-more {
  display: inline-grid;
  place-items: center;
}

.project-add-tracks,
.add-tracks,
.done-button,
.sync-primary-button,
.sync-secondary-button,
.account-primary-button,
.account-secondary-button,
.account-plain-button,
.delete-confirm-button,
.delete-cancel-button,
.username-save-button,
.primary-button,
.secondary-button,
.convert-button {
  display: inline-flex;
  gap: 8px;
}

.circle-button,
.floating-add,
.player-icon-button,
.player-add-button,
.hero-play,
.shuffle-button,
.project-add-tracks,
.add-tracks,
.done-button,
.profile-setting-row,
.add-option,
.search-tab,
.choice-item,
.target-item,
.track-action-row,
.search-result-row {
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) ease;
}

.circle-button:focus-visible,
.floating-add:focus-visible,
.player-icon-button:focus-visible,
.player-add-button:focus-visible,
.hero-play:focus-visible,
.shuffle-button:focus-visible,
.project-add-tracks:focus-visible,
.add-tracks:focus-visible,
.done-button:focus-visible,
.profile-setting-row:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.72);
  outline-offset: 3px;
}

.landing-screen {
  place-items: center;
  padding: 44px 24px;
}

.landing-content {
  width: min(420px, 100%);
  gap: 24px;
}

.landing-logo {
  width: min(292px, 72vw);
  height: auto;
  filter: brightness(1.22) saturate(1.1) drop-shadow(0 16px 36px rgba(0, 0, 0, 0.28));
  transform: translateZ(0);
}

.landing-enter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 48px;
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.2);
}

.landing-enter-button:hover {
  background: var(--accent-strong);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Simple login polish */
#profileModal .drawer-backdrop {
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.96), rgba(7, 7, 9, 0.98)),
    #070709;
}

#profileModal .login-panel {
  width: min(376px, calc(100vw - 32px));
  display: grid;
  justify-items: stretch;
  gap: 14px;
  padding: 30px 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(31, 31, 35, 0.96), rgba(15, 15, 17, 0.98)),
    #111113;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

#profileModal .login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%);
}

#profileModal .login-close {
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

#profileModal .login-close:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.login-logo-card {
  width: 136px;
  height: auto;
  justify-self: center;
  margin-top: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-logo-card img {
  width: 136px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: brightness(1.24) saturate(1.08) drop-shadow(0 14px 26px rgba(0, 0, 0, 0.34));
}

.login-panel h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.58rem;
  line-height: 1.12;
  font-weight: 700;
  text-align: center;
}

.login-auth-actions {
  width: 100%;
  display: grid;
  gap: 10px;
}

.auth-button,
.auth-phone-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.93rem;
  transition:
    transform 180ms var(--motion-ease),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.auth-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  padding: 0 10px;
}

.auth-button span:last-child {
  justify-self: center;
}

.auth-brand {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: start;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-brand img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.auth-button:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.auth-phone-button {
  margin-top: 2px;
  border-color: rgba(167, 139, 250, 0.42);
  background: linear-gradient(180deg, #9b6cff, #7c3aed);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(124, 58, 237, 0.24);
}

.auth-phone-button:hover {
  border-color: rgba(196, 181, 253, 0.58);
  background: linear-gradient(180deg, #a981ff, #8b5cf6);
  color: #ffffff;
  transform: translateY(-1px);
}

.auth-button:active,
.auth-phone-button:active {
  transform: scale(0.985);
}

.terms-copy {
  max-width: 300px;
  margin: 2px auto 0;
  color: rgba(236, 236, 238, 0.52);
  font-size: 0.72rem;
  line-height: 1.42;
  text-align: center;
}

.home-actions {
  width: min(var(--layout-max), calc(100vw - (var(--page-pad-x) * 2)));
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: normal;
  margin: 0 auto;
}

.home-actions .site-name-slot {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  justify-content: center;
  padding: 0;
}

.home-actions .action-cluster {
  grid-column: 3;
  justify-self: end;
}

.detail-actions,
.profile-page-actions {
  width: min(var(--layout-max), calc(100vw - (var(--page-pad-x) * 2)));
  margin: 0 auto;
}

.site-name-logo {
  width: 126px;
  height: 58px;
  object-fit: contain;
  filter: brightness(1.75) saturate(1.32) drop-shadow(0 8px 18px rgba(139, 92, 246, 0.2));
}

.site-name-button {
  border-radius: 16px;
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-mid) var(--motion-ease);
}

.site-name-button:hover {
  background: transparent;
  transform: translateY(-1px);
}

.action-cluster {
  gap: 10px;
}

.circle-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.circle-button:hover {
  border-color: rgba(139, 92, 246, 0.38);
  background: var(--button-hover);
  transform: translateY(-2px);
}

.project-grid {
  width: min(var(--layout-max), calc(100vw - (var(--page-pad-x) * 2)));
  grid-template-columns: repeat(auto-fit, minmax(var(--project-card-size), var(--project-card-size)));
  justify-content: center;
  gap: 44px 38px;
  margin: 66px auto 0;
}

.nested-projects {
  grid-template-columns: repeat(auto-fit, minmax(var(--project-card-size), var(--project-card-size)));
  justify-content: center;
  gap: 30px;
}

.project-card,
.cover-button {
  width: var(--project-card-size);
}

.project-card {
  text-align: center;
  will-change: transform;
}

.cover-button {
  height: var(--project-card-size);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transform: translateZ(0);
  will-change: transform, box-shadow, filter;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card:hover .cover-button {
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.32);
  transform: scale(1.025);
}

.project-card.is-opening .cover-button {
  transform: scale(1.06);
}

.project-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-top: 12px;
}

.project-title,
.project-title.is-default-title {
  max-width: 100%;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

.project-meta {
  width: 100%;
  color: color-mix(in srgb, var(--ink) 68%, var(--muted));
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.cover-button.is-folder,
.detail-cover.is-folder {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 48%),
    #17181b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.24);
}

.mini-more,
.track-menu {
  min-width: 30px;
  min-height: 30px;
  border-radius: 10px;
}

.bottom-add {
  bottom: 28px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.floating-add {
  width: 62px;
  min-width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: var(--accent);
  color: #ffffff;
  box-shadow:
    0 18px 42px rgba(139, 92, 246, 0.24),
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.floating-add:hover {
  background: var(--accent-strong);
  transform: translateY(-3px);
}

.floating-add.is-close {
  background: var(--panel);
  color: var(--ink);
}

.floating-add #addButtonText {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.add-menu {
  width: 198px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.add-option {
  min-height: 42px;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  text-align: center;
}

.add-option:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.detail-layout {
  width: min(840px, calc(100vw - (var(--page-pad-x) * 2)));
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 30px;
  margin: 54px auto 0;
}

.detail-cover {
  width: min(300px, 72vw);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.detail-panel {
  width: min(660px, 100%);
}

.project-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  text-align: center;
}

.project-heading-row > div:first-child {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
}

.project-title-input,
.project-title-input.is-default-title,
.folder-breadcrumb input.is-default-title {
  display: block;
  justify-self: center;
  width: min(540px, 100%);
  color: var(--ink);
  text-align: center;
}

.detail-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.play-tools {
  justify-self: center;
  justify-content: center;
  gap: 12px;
}

.shuffle-button,
.hero-play {
  box-shadow: none;
}

.shuffle-button,
.shuffle-button:hover,
.shuffle-button:active,
.shuffle-button.is-active {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shuffle-button:focus-visible {
  outline: 0;
}

.shuffle-button img {
  filter: brightness(0) invert(1);
}

.shuffle-button.is-active img,
body.light-mode .shuffle-button.is-active img {
  filter: brightness(0) saturate(100%) invert(42%) sepia(89%) saturate(2476%) hue-rotate(239deg) brightness(98%) contrast(97%);
}

.player-icon-button.is-active:not(#volumeButton) .player-icon-slot,
body.light-mode .player-icon-button.is-active:not(#volumeButton) .player-icon-slot {
  color: var(--accent);
}

.player-icon-button.is-active:not(#volumeButton) img,
body.light-mode .player-icon-button.is-active:not(#volumeButton) img {
  filter: brightness(0) saturate(100%) invert(42%) sepia(89%) saturate(2476%) hue-rotate(239deg) brightness(98%) contrast(97%);
}

.shuffle-button:hover,
.hero-play:hover {
  transform: translateY(-2px);
}

.project-add-tracks,
.add-tracks {
  min-width: 156px;
  min-height: 42px;
  border-radius: 14px;
}

.project-add-tracks {
  display: flex;
  margin: 22px auto 0;
}

#emptyUpload .add-tracks {
  margin-inline: auto;
}

.search-row {
  width: 100%;
  margin-inline: auto;
}

.empty-upload {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 34px 22px;
  text-align: center;
}

.empty-upload p {
  color: var(--ink);
}

.track-list {
  width: 100%;
}

.track-row {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 14px;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.screen-search {
  padding-top: 30px;
}

.search-page-head,
.search-tabs,
.search-results {
  width: min(720px, calc(100vw - (var(--page-pad-x) * 2)));
  margin-inline: auto;
}

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

.global-search-field {
  border-radius: 16px;
}

.search-tabs {
  justify-content: center;
  flex-wrap: wrap;
}

.search-tab {
  min-width: 102px;
}

.profile-page-grid {
  width: min(var(--layout-max), calc(100vw - (var(--page-pad-x) * 2)));
  gap: 24px;
}

button.profile-setting-row,
.local-library-card button.profile-setting-row {
  justify-content: center;
  text-align: center;
}

label.profile-setting-row {
  justify-content: space-between;
  text-align: left;
}

.local-library-card .profile-setting-row:hover,
.profile-settings-panel > .profile-setting-row:hover {
  transform: translateY(-1px);
}

.player-dock {
  bottom: 24px;
}

.player {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
}

.player-open {
  text-align: left;
}

.player-icon-button,
.volume-wrap .player-icon-button,
.player-add-button {
  border-radius: 14px;
}

.player-icon-button:hover,
.volume-wrap .player-icon-button:hover,
.player-add-button:hover {
  transform: translateY(-2px);
}

.volume-wrap {
  width: 24px;
  height: 28px;
  flex-basis: 24px;
  border-radius: 0;
}

.volume-wrap .player-icon-button,
.volume-wrap .player-icon-button:hover,
.volume-wrap .player-icon-button:focus-visible,
.volume-wrap .player-icon-button.is-active {
  width: 24px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.volume-popover input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
}

.menu-enter,
.account-menu.menu-enter,
.notification-popover.menu-enter {
  transform: translateY(12px) scale(0.96);
}

.menu-enter.menu-enter-active,
.account-menu.menu-enter.menu-enter-active,
.notification-popover.menu-enter.menu-enter-active {
  transition:
    opacity 260ms var(--motion-ease),
    transform 320ms var(--motion-ease);
}

.notification-popover {
  max-height: calc(100vh - var(--notification-top, 62px) - 18px);
  overflow: hidden;
}

.notification-list {
  max-height: min(304px, calc(100vh - var(--notification-top, 62px) - 110px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.48);
}

.notification-row {
  min-height: 92px;
}

.notification-open strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.modal-enter .track-detail-shell,
.modal-enter .track-info-panel,
.modal-enter .choice-panel,
.modal-enter .small-panel,
.modal-enter .delete-panel,
.modal-enter .account-action-panel,
.modal-enter .sync-panel,
.modal-enter .login-panel,
.modal-enter .profile-card-panel,
.modal-enter .edit-profile-panel,
.modal-enter .username-panel {
  transform: translateY(18px) scale(0.975);
}

.modal-enter.modal-enter-active .track-detail-shell,
.modal-enter.modal-enter-active .track-info-panel,
.modal-enter.modal-enter-active .choice-panel,
.modal-enter.modal-enter-active .small-panel,
.modal-enter.modal-enter-active .delete-panel,
.modal-enter.modal-enter-active .account-action-panel,
.modal-enter.modal-enter-active .sync-panel,
.modal-enter.modal-enter-active .login-panel,
.modal-enter.modal-enter-active .profile-card-panel,
.modal-enter.modal-enter-active .edit-profile-panel,
.modal-enter.modal-enter-active .username-panel {
  transition:
    opacity 280ms ease,
    transform 360ms var(--motion-ease);
}

@media (max-width: 900px) {
  :root {
    --project-card-size: 142px;
  }

  .home-actions {
    width: min(660px, calc(100vw - (var(--page-pad-x) * 2)));
  }

  .detail-actions,
  .profile-page-actions,
  .detail-layout,
  .folder-layout {
    width: min(660px, calc(100vw - (var(--page-pad-x) * 2)));
  }

  .project-grid,
  .nested-projects {
    width: min(660px, calc(100vw - (var(--page-pad-x) * 2)));
    gap: 34px 28px;
    margin-top: 50px;
  }

  .player-wave,
  .player-time {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --project-card-size: auto;
  }

  .screen {
    padding-top: 22px;
    padding-bottom: 124px;
  }

  .home-actions {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }

  .home-actions .site-name-slot,
  .home-actions .action-cluster {
    grid-column: 1;
    justify-self: center;
  }

  .site-name-logo {
    width: 112px;
    height: 52px;
  }

  .circle-button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .project-grid,
  .nested-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 18px;
    margin-top: 42px;
  }

  .project-card,
  .cover-button {
    width: 100%;
  }

  .cover-button {
    height: auto;
    aspect-ratio: 1;
  }

  .detail-layout {
    gap: 24px;
    margin-top: 40px;
  }

  .detail-cover {
    width: min(250px, 72vw);
    border-radius: 15px;
  }

  .project-heading-row {
    gap: 16px;
  }

  .play-tools {
    width: 100%;
  }

  .project-add-tracks,
  .add-tracks {
    width: min(230px, 100%);
  }

  .player-dock {
    width: calc(100vw - 20px);
    max-width: none;
    gap: 8px;
  }

  .player {
    min-width: 0;
    max-width: none;
    min-height: 48px;
    flex: 1 1 auto;
    gap: 5px;
    padding: 4px 7px 4px 4px;
    overflow: hidden;
  }

  .player-open {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 7px;
  }

  .player-art {
    width: 36px;
    height: 36px;
  }

  .player-controls {
    flex: 0 0 auto;
    gap: 3px;
    margin-left: 0;
  }

  .player-icon-button,
  .volume-wrap,
  .volume-wrap .player-icon-button {
    width: 28px;
    height: 30px;
    flex-basis: 28px;
  }

  .player-icon-slot {
    width: 17px;
    height: 17px;
  }

  .player-icon-slot[data-player-icon="play"] {
    width: 20px;
    height: 20px;
  }

  .player-add-button {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .floating-add {
    width: 60px;
    min-width: 60px;
    height: 60px;
  }

  .profile-page-grid {
    width: min(660px, calc(100vw - (var(--page-pad-x) * 2)));
  }
}

/* ZamaMusic workspace home */
.screen-home {
  display: block;
  padding-top: 26px;
}

.screen-home::before {
  height: 104px;
}

.screen-home .home-actions,
.home-library-heading,
.screen-home .project-grid {
  width: min(1040px, calc(100vw - (var(--page-pad-x) * 2)));
}

.screen-home .home-actions {
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.screen-home .site-name-slot {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
  padding: 0;
}

.screen-home .action-cluster {
  grid-column: 3;
  justify-self: end;
  gap: 8px;
}

.screen-home .site-name-logo {
  width: 104px;
  height: 48px;
}

.screen-home .circle-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  backdrop-filter: none;
}

.home-library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 72px auto 0;
  padding: 0 10px 20px;
  border-bottom: 1px solid var(--line);
}

.home-library-heading div {
  display: grid;
  gap: 5px;
}

.home-library-heading p,
.home-library-heading h1,
.home-library-heading > span {
  margin: 0;
}

.home-library-heading p {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home-library-heading h1 {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 600;
}

.home-library-heading > span {
  color: var(--muted);
  font-size: 0.8rem;
}

.screen-home .project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  justify-content: stretch;
  gap: 0 32px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.screen-home .project-card {
  width: 100%;
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition:
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    transform var(--motion-mid) var(--motion-ease),
    opacity var(--motion-fast) ease;
}

.screen-home .project-card:hover {
  background: color-mix(in srgb, var(--panel) 58%, transparent);
  transform: translateX(4px);
}

.screen-home .project-card.is-playing-project {
  border-bottom-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.055);
}

.screen-home .project-card::before {
  top: 16px;
  bottom: 16px;
}

.screen-home .project-card .cover-button {
  width: 72px;
  height: 72px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: none;
  overflow: hidden;
}

.screen-home .project-card:hover .cover-button,
.screen-home .project-card.is-opening .cover-button {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transform: scale(1.035);
}

.screen-home .project-card .cover-button:not(.is-folder)::after,
.screen-home .project-card .cover-play {
  display: none;
}

.screen-home .cover-button.is-folder.has-folder-preview {
  padding: 5px;
}

.screen-home .folder-cover-preview {
  gap: 4px;
}

.screen-home .folder-cover-tile {
  border-radius: 4px;
}

.screen-home .project-copy {
  min-width: 0;
  display: grid;
  justify-items: stretch;
  gap: 10px;
  margin: 0;
}

.screen-home .project-title,
.screen-home .project-title.is-default-title {
  width: auto;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-home .project-meta {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: left;
}

.screen-home .project-kind {
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-weight: 600;
}

.screen-home .lock-dot {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  background: transparent;
  opacity: 0.58;
}

.screen-home .lock-image-slot {
  width: 10px;
  height: 10px;
}

.screen-home .lock-image-slot img {
  filter: brightness(0) invert(1);
}

.screen-home .mini-more {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  margin: 0;
  border-radius: 8px;
  color: var(--muted);
}

.screen-home .mini-more:hover {
  background: var(--button-hover);
  color: var(--ink);
}

.screen-home:not([hidden]) ~ .bottom-add {
  left: auto;
  right: max(var(--page-pad-x), calc((100vw - 1040px) / 2));
  transform: none;
}

@media (max-width: 760px) {
  .screen-home {
    padding-top: 18px;
  }

  .screen-home .home-actions,
  .home-library-heading,
  .screen-home .project-grid {
    width: calc(100vw - (var(--page-pad-x) * 2));
  }

  .screen-home .home-actions {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: stretch;
    gap: 10px;
  }

  .screen-home .site-name-slot {
    grid-column: 1;
    justify-self: start;
  }

  .screen-home .action-cluster {
    grid-column: 3;
    justify-self: end;
  }

  .screen-home .site-name-logo {
    width: 88px;
    height: 42px;
  }

  .screen-home .circle-button {
    width: 38px;
    height: 38px;
  }

  .home-library-heading {
    margin-top: 48px;
    padding: 0 6px 16px;
  }

  .home-library-heading h1 {
    font-size: 1.3rem;
  }

  .screen-home .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .screen-home .project-card {
    min-height: 88px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    padding: 12px 6px;
  }

  .screen-home .project-card .cover-button {
    width: 58px;
    height: 58px;
  }

  .screen-home .project-copy {
    gap: 7px;
  }

  .screen-home .project-title,
  .screen-home .project-title.is-default-title {
    font-size: 0.9rem;
  }

  .screen-home:not([hidden]) ~ .bottom-add {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 430px) {
  .screen-home .action-cluster {
    gap: 5px;
  }

  .screen-home .project-meta {
    grid-template-columns: auto auto minmax(0, 1fr) 28px;
    gap: 5px;
  }
}

/* ZamaMusic studio console */
@media (min-width: 961px) {
  .screen-home {
    --home-rail-width: 196px;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--home-rail-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(42px, 5vw, 86px);
    padding: 0 max(34px, 5vw) 132px 0;
  }

  .screen-home::before {
    display: none;
  }

  .screen-home .home-actions {
    position: sticky;
    top: 0;
    grid-column: 1;
    grid-row: 1 / 3;
    width: var(--home-rail-width);
    height: 100vh;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 30px 22px 108px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 28%, transparent);
  }

  .screen-home .site-name-slot {
    width: 100%;
    justify-content: center;
  }

  .screen-home .site-name-button {
    width: 100%;
    min-height: 70px;
  }

  .screen-home .site-name-logo {
    width: 124px;
    height: 62px;
  }

  .screen-home .action-cluster {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 78px;
  }

  .screen-home .action-cluster .circle-button {
    width: 100%;
    height: 44px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    place-items: center start;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    text-align: left;
  }

  .screen-home .action-cluster .circle-button::after {
    content: attr(title);
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen-home .action-cluster .circle-button:hover {
    background: var(--accent-soft);
    color: var(--ink);
    transform: translateX(4px);
  }

  .screen-home .action-cluster .button-image-slot,
  .screen-home .action-cluster .search-image-slot {
    justify-self: center;
  }

  .home-library-heading {
    grid-column: 2;
    grid-row: 1;
    width: min(900px, 100%);
    margin: 82px 0 0;
    padding: 0 0 28px;
  }

  .home-library-heading h1 {
    font-size: 2rem;
  }

  .screen-home .project-grid {
    grid-column: 2;
    grid-row: 2;
    width: min(900px, 100%);
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  .screen-home .project-card {
    min-height: 118px;
    grid-template-columns: 34px 148px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 10px 20px 0;
    border-radius: 0;
  }

  .screen-home .project-card:hover {
    padding-left: 8px;
    background: transparent;
    transform: translateX(6px);
  }

  .screen-home .project-card .cover-button {
    width: 148px;
    height: 78px;
    border-radius: 8px;
  }

  .screen-home .project-copy {
    gap: 12px;
  }

  .screen-home .project-title,
  .screen-home .project-title.is-default-title {
    font-size: 1.06rem;
  }

  .screen-home .project-index {
    align-self: start;
    padding-top: 5px;
    color: var(--dim);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
  }

  .screen-home:not([hidden]) ~ .bottom-add {
    left: calc(var(--home-rail-width, 196px) / 2);
    right: auto;
    transform: translateX(-50%);
  }

  .screen-home:not([hidden]) ~ .bottom-add .floating-add {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .screen-home:not([hidden]) ~ .bottom-add #addButtonText {
    display: none;
  }
}

@media (max-width: 960px) {
  .screen-home {
    display: block;
    padding: 18px var(--page-pad-x) 124px;
  }

  .screen-home .home-actions,
  .home-library-heading,
  .screen-home .project-grid {
    width: 100%;
  }

  .screen-home .home-actions {
    position: relative;
    height: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .screen-home .site-name-slot {
    width: auto;
  }

  .screen-home .site-name-button {
    width: auto;
  }

  .screen-home .action-cluster {
    width: auto;
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin: 0 0 0 auto;
  }

  .screen-home .action-cluster .circle-button {
    width: 38px;
    height: 38px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
  }

  .screen-home .action-cluster .circle-button::after {
    display: none;
  }

  .home-library-heading {
    margin: 52px 0 0;
  }

  .screen-home .project-grid {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  .screen-home .project-card {
    grid-template-columns: 30px 92px minmax(0, 1fr);
    gap: 16px;
    padding: 15px 6px 15px 0;
  }

  .screen-home .project-card .cover-button {
    width: 92px;
    height: 62px;
    border-radius: 8px;
  }

  .screen-home .project-index {
    align-self: start;
    padding-top: 4px;
    color: var(--dim);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 540px) {
  .screen-home {
    padding-inline: 16px;
  }

  .screen-home .site-name-logo {
    width: 88px;
    height: 42px;
  }

  .home-library-heading {
    margin-top: 42px;
  }

  .home-library-heading h1 {
    font-size: 1.45rem;
  }

  .screen-home .project-card {
    min-height: 88px;
    grid-template-columns: 24px 72px minmax(0, 1fr);
    gap: 12px;
    padding-block: 12px;
  }

  .screen-home .project-card .cover-button {
    width: 72px;
    height: 54px;
  }

  .screen-home .project-copy {
    gap: 7px;
  }

  .screen-home .project-title,
  .screen-home .project-title.is-default-title {
    font-size: 0.9rem;
  }

  .screen-home .project-meta {
    gap: 5px;
  }
}

/* Interface repairs and compact controls */
@media (min-width: 961px) {
  .screen-home .project-card {
    grid-template-columns: 34px 92px minmax(0, 1fr);
    min-height: 124px;
  }

  .screen-home .project-card .cover-button {
    width: 92px;
    height: 92px;
    aspect-ratio: 1;
  }

  .screen-home:not([hidden]) ~ .player-dock {
    left: calc(50% + 98px);
    max-width: calc(100vw - 232px);
  }

  #homeView .action-cluster #notificationButton,
  #homeView .action-cluster #profileButton,
  #homeView .action-cluster #homeSearchButton {
    place-items: center start;
  }

  #homeView .action-cluster .button-image-slot,
  #homeView .action-cluster .search-image-slot {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    display: grid;
    place-items: center;
  }

  #homeView #notificationButton .notification-image-slot img,
  #homeView .action-cluster .button-image-slot img,
  #homeView .action-cluster .search-image-slot img {
    width: 18px;
    height: 18px;
    margin: 0;
    object-fit: contain;
  }

  #homeView .action-cluster .circle-button::after {
    align-self: center;
    line-height: 1;
  }
}

@media (max-width: 960px) {
  body.player-add-mode .player-dock {
    opacity: 0;
    pointer-events: none;
  }

  .screen-home .project-card {
    grid-template-columns: 30px 72px minmax(0, 1fr);
    min-height: 102px;
  }

  .screen-home .project-card .cover-button {
    width: 72px;
    height: 72px;
    aspect-ratio: 1;
  }
}

@media (max-width: 540px) {
  .screen-home .project-card {
    grid-template-columns: 24px 64px minmax(0, 1fr);
    min-height: 88px;
  }

  .screen-home .project-card .cover-button {
    width: 64px;
    height: 64px;
  }
}

.player-dock {
  transition:
    left var(--motion-mid) var(--motion-ease),
    bottom var(--motion-mid) var(--motion-ease),
    opacity var(--motion-fast) ease,
    transform var(--motion-mid) var(--motion-ease);
}

body.player-add-mode .player-dock {
  visibility: hidden;
  opacity: 0 !important;
  pointer-events: none;
}

.add-menu {
  width: 124px;
  padding: 5px 4px;
  border-radius: 10px;
}

.add-option,
.project-menu-option,
.account-menu-option {
  width: 100%;
  min-height: 35px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 0 5px;
  border-radius: 6px;
  background: transparent;
  font-size: 0.78rem;
  line-height: 1;
  text-align: left;
}

.add-option:hover,
.project-menu-option:hover,
.account-menu-option:hover {
  background: var(--accent-soft);
  transform: none;
}

.add-icon-slot,
.project-menu-icon-slot,
.account-menu-icon,
.track-action-icon,
.profile-setting-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
}

.add-icon-slot img,
.project-menu-icon-slot img,
.account-menu-icon img,
.track-action-icon img,
.profile-setting-icon img {
  width: 17px;
  height: 17px;
  display: block;
  object-fit: contain;
}

.add-icon-slot[data-icon-slot="convert"] img,
.add-icon-slot[data-icon-slot="folder"] img,
.add-icon-slot[data-icon-slot="project"] img {
  transform: scale(1.08);
}

.add-option-label,
.project-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-menu {
  position: absolute;
  width: 138px;
  padding: 4px 3px;
  border-radius: 10px;
}

.project-menu .project-menu-option {
  min-height: 32px;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  padding: 0 5px;
  font-size: 0.74rem;
}

.project-menu .project-menu-icon-slot {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex-basis: 16px;
}

.project-menu .project-menu-icon-slot img {
  width: 15px;
  height: 15px;
}

.screen-home .cover-button.is-folder.has-folder-preview {
  padding: 7px;
  overflow: hidden;
}

.screen-home .folder-cover-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
}

.screen-home .folder-cover-preview.count-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.screen-home .folder-cover-preview.count-1 .folder-cover-tile {
  grid-column: 1;
  grid-row: 1;
}

.profile-settings-panel > button.profile-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding-inline: 14px;
  text-align: center;
}

.profile-settings-panel > label.profile-setting-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding-inline: 54px;
  text-align: center;
}

.profile-settings-panel > label.profile-setting-row > span:not(.switch-ui) {
  justify-self: center;
  text-align: center;
}

.profile-settings-panel > label.profile-setting-row > .switch-ui {
  position: absolute;
  top: 50%;
  right: 14px;
  margin: 0;
  transform: translateY(-50%);
}

.project-menu-option.danger:hover,
.account-menu-option.danger:hover {
  background: rgba(255, 29, 37, 0.08);
}

.track-detail-right {
  padding: 18px 18px 20px;
}

.track-detail-right h2 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.track-action-group {
  margin: 0;
  overflow: visible;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.track-action-row {
  min-height: 44px;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  gap: 11px;
  padding: 0 8px;
  border-radius: 0;
  font-size: 0.84rem;
}

.track-action-row:hover {
  background: var(--accent-soft);
}

.track-action-row small {
  font-size: 0.8rem;
}

.track-action-chevron {
  width: 9px;
  height: 9px;
}

#profileModal .edit-profile-panel {
  width: min(460px, calc(100vw - 28px));
  padding: 18px 18px 22px;
  border-radius: 18px;
}

#profileModal .edit-profile-grid {
  width: min(320px, 100%);
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#profileModal .profile-image-circle {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--button);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

#profileModal .profile-image-circle::before {
  content: none;
}

#profileModal .profile-image-circle::after {
  bottom: 10px;
}

#profileModal .profile-image-slot {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
}

#profileModal .profile-image-slot.has-profile-image {
  background: transparent;
}

#profileModal .profile-image-slot.has-profile-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transform: none;
}

#profileModal .profile-image-slot.is-empty-profile-image {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), transparent 42%),
    var(--profile-empty-cover, linear-gradient(135deg, #8b5cf6, #4f6eff));
}

#profileModal .profile-image-slot.is-empty-profile-image::before {
  content: none;
}

#profileModal .username-display-button {
  min-height: 50px;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Home library: centered and intentionally simple. */
.screen-home {
  min-height: 100vh;
  display: block;
  padding: 28px var(--page-pad-x) 132px;
}

.screen-home::before {
  display: none;
}

.screen-home .home-actions {
  position: relative;
  top: auto;
  width: min(900px, 100%);
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.screen-home .site-name-slot,
.screen-home .site-name-button {
  width: auto;
  min-height: 0;
  justify-content: center;
  padding: 0;
}

.screen-home .site-name-slot {
  position: fixed;
  left: 22px;
  bottom: 20px;
  z-index: 32;
}

.screen-home .site-name-logo {
  width: 78px;
  height: 40px;
}

.screen-home .action-cluster {
  width: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.screen-home .action-cluster .circle-button {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.screen-home .action-cluster .circle-button::after {
  display: none;
}

.screen-home .action-cluster .circle-button:hover,
.screen-home .action-cluster .circle-button:focus-visible {
  border-color: rgba(139, 92, 246, 0.42);
  background: var(--button);
  transform: translateY(-1px);
}

.home-library-heading {
  width: min(900px, 100%);
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 7px;
  margin: 46px auto 0;
  padding: 0;
  border: 0;
  text-align: center;
}

.home-library-heading div {
  justify-items: center;
}

.home-library-heading h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.home-library-heading > span {
  color: var(--muted);
  font-size: 0.75rem;
}

.screen-home .project-grid {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, 160px);
  align-content: start;
  justify-content: center;
  gap: 34px 30px;
  margin: 38px auto 0;
  padding: 0 0 28px;
  border: 0;
}

.screen-home .project-card {
  width: 160px;
  min-width: 0;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  text-align: center;
  transition:
    transform var(--motion-mid) var(--motion-ease),
    opacity var(--motion-fast) ease;
}

.screen-home .project-card:hover {
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-3px);
}

.screen-home .project-card.is-playing-project {
  border: 0;
  background: transparent;
}

.screen-home .project-index {
  display: none;
}

.screen-home .project-card .cover-button {
  width: 160px;
  height: 160px;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.screen-home .project-card:hover .cover-button,
.screen-home .project-card.is-opening .cover-button {
  border-color: rgba(139, 92, 246, 0.34);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
  transform: none;
}

.screen-home .project-copy {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
}

.screen-home .project-title,
.screen-home .project-title.is-default-title {
  width: 100%;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: center;
}

.screen-home .project-kind {
  display: none;
}

.screen-home .project-meta {
  width: 100%;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: left;
}

.screen-home .mini-more {
  justify-self: end;
}

.screen-home:not([hidden]) ~ .bottom-add {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.screen-home:not([hidden]) ~ .bottom-add .floating-add {
  width: 56px;
  min-width: 56px;
  height: 56px;
  border-radius: 8px;
}

.screen-home:not([hidden]) ~ .bottom-add #addButtonText {
  display: none;
}

.screen-home:not([hidden]) ~ .player-dock {
  left: 50%;
  max-width: min(900px, calc(100vw - 40px));
}

@media (max-width: 560px) {
  .screen-home {
    padding: 20px 16px 124px;
  }

  .screen-home .site-name-logo {
    width: 68px;
    height: 34px;
  }

  .screen-home .site-name-slot {
    left: 14px;
    bottom: 16px;
  }

  .screen-home .action-cluster {
    gap: 6px;
  }

  .screen-home .action-cluster .circle-button {
    width: 40px;
    height: 40px;
  }

  .home-library-heading {
    margin-top: 34px;
  }

  .home-library-heading h1 {
    font-size: 1.4rem;
  }

  .screen-home .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
    margin-top: 30px;
  }

  .screen-home .project-card,
  .screen-home .project-card .cover-button {
    width: 100%;
  }

  .screen-home .project-card .cover-button {
    height: auto;
    aspect-ratio: 1;
  }

  .screen-home .project-title,
  .screen-home .project-title.is-default-title {
    font-size: 0.84rem;
  }
}

/* ZamaMusic landing: full-screen interactive audio scene. */
.landing-screen {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: #0f1012;
}

body.light-mode .landing-screen {
  background: #0f1012;
}

.landing-screen::before {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.landing-visualizer {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.94;
  pointer-events: none;
}

.landing-content {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 0;
  color: #f8f7fb;
  text-align: center;
  transform: translateY(-2vh);
}

.landing-mark {
  width: 170px;
  height: 124px;
  overflow: hidden;
  margin-bottom: 10px;
  filter: drop-shadow(0 18px 34px rgba(75, 28, 190, 0.32));
  animation: landing-mark-float 5s var(--motion-ease) infinite;
}

.landing-mark img {
  width: 250px;
  max-width: none;
  height: auto;
  display: block;
  transform: translate(-40px, -1px);
}

.landing-content h1 {
  display: block;
  margin: 0;
  color: #f8f7fb;
  font-size: clamp(3.7rem, 8vw, 6.2rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

.landing-content p {
  margin: 18px 0 0;
  color: rgba(248, 247, 251, 0.62);
  font-size: 0.82rem;
  line-height: 1.4;
}

.landing-enter-button {
  width: 176px;
  min-width: 176px;
  height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  padding: 0 18px 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(80, 40, 170, 0.32);
  font-size: 0.9rem;
  text-align: center;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.landing-enter-button > span:first-child {
  padding-left: 18px;
}

.landing-enter-arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--motion-fast) var(--motion-ease);
}

.landing-enter-button:hover,
.landing-enter-button:focus-visible {
  background: #9d75f7;
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(80, 40, 170, 0.42);
  transform: translateY(-2px);
}

.landing-enter-button:hover .landing-enter-arrow,
.landing-enter-button:focus-visible .landing-enter-arrow {
  transform: translateX(3px) rotate(45deg);
}

.landing-enter-button:active {
  transform: translateY(0) scale(0.98);
}

.landing-enter-button:disabled {
  cursor: default;
  opacity: 0.82;
}

@keyframes landing-mark-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 560px) {
  .landing-screen {
    padding: 18px;
  }

  .landing-screen::before {
    inset: 10px;
  }

  .landing-content {
    transform: translateY(-1vh);
  }

  .landing-mark {
    width: 142px;
    height: 104px;
    margin-bottom: 8px;
  }

  .landing-mark img {
    width: 210px;
    transform: translate(-34px, -1px);
  }

  .landing-content h1 {
    font-size: clamp(3.35rem, 18vw, 4.5rem);
  }

  .landing-content p {
    margin-top: 14px;
  }

  .landing-enter-button {
    width: 170px;
    min-width: 170px;
    height: 50px;
    margin-top: 28px;
  }
}

/* Drag feedback without the create-folder label. */
.project-card.is-drag-create-folder::after {
  content: none;
  display: none;
}

/* Restore the stable player proportions. */
.screen-home:not([hidden]) ~ .player-dock {
  left: 50%;
  max-width: calc(100vw - 32px);
}

@media (min-width: 901px) {
  .player {
    min-height: 58px;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    overflow: visible;
  }

  .player-open {
    width: 160px;
    flex: 0 1 160px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
  }

  .player-art {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .player-wave {
    width: clamp(180px, 20vw, 220px);
    height: 38px;
    flex: 0 1 clamp(180px, 20vw, 220px);
  }

  .player-time {
    width: 88px;
    flex-basis: 88px;
  }

  .player-controls {
    gap: 9px;
  }
}

@media (max-width: 900px) {
  .player-dock {
    width: calc(100vw - 16px);
    max-width: 540px;
    gap: 6px;
  }

  .player {
    min-width: 0;
    max-width: calc(100% - 50px);
    min-height: 48px;
    flex: 1 1 auto;
    gap: 4px;
    padding: 4px 6px 4px 4px;
    overflow: hidden;
  }

  .player-wave,
  .player-time {
    display: none !important;
  }

  .player-open {
    width: auto;
    min-width: 72px;
    flex: 1 1 124px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }

  .player-art {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .player-controls {
    flex: 0 0 auto;
    gap: 2px;
    margin-left: 0;
  }

  .player-icon-button,
  .volume-wrap,
  .volume-wrap .player-icon-button {
    width: 25px;
    height: 28px;
    flex-basis: 25px;
  }

  .player-icon-slot {
    width: 16px;
    height: 16px;
  }

  .player-icon-slot[data-player-icon="play"] {
    width: 18px;
    height: 18px;
  }

  .player-add-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 10px;
  }
}

/* Keep the player waveform identical to the compact strip reference. */
.player-wave {
  width: clamp(142px, 15vw, 150px);
  height: 38px;
  flex: 0 0 clamp(142px, 15vw, 150px);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.player-wave-canvas {
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-wave-progress {
  top: 1px;
  bottom: 1px;
  left: var(--progress);
  width: 2px;
  transform: translateX(-1px);
  border-radius: 999px;
  background: #8b5cf6;
  box-shadow: none;
}

@media (max-width: 900px) {
  .player-wave {
    display: none !important;
  }
}

/* Project card text alignment requested: no lock, left title, compact meta. */
.screen-home .project-copy,
.nested-projects .project-copy,
.folder-grid .project-copy {
  justify-items: start;
  text-align: left;
}

.screen-home .project-title,
.screen-home .project-title.is-default-title,
.nested-projects .project-title,
.folder-grid .project-title {
  width: 100%;
  text-align: left;
}

.screen-home .lock-dot,
.nested-projects .lock-dot,
.folder-grid .lock-dot {
  display: none !important;
}

.screen-home .project-meta,
.nested-projects .project-meta,
.folder-grid .project-meta {
  width: auto;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  justify-content: start;
  justify-items: start;
  column-gap: 9px;
  text-align: left;
}

.screen-home .project-meta .project-kind,
.nested-projects .project-meta .project-kind,
.folder-grid .project-meta .project-kind {
  display: none;
}

.screen-home .project-meta > span:not(.project-kind),
.nested-projects .project-meta > span:not(.project-kind),
.folder-grid .project-meta > span:not(.project-kind) {
  min-width: 0;
}

.screen-home .mini-more,
.nested-projects .mini-more,
.folder-grid .mini-more {
  justify-self: start;
  width: 24px;
  min-width: 24px;
  margin-left: 0;
}

/* Folder covers: show contained projects as mini square previews again. */
.cover-button.is-folder.has-folder-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: start;
  padding: 8px;
  overflow: hidden;
  background: #242424;
}

.folder-cover-preview,
.folder-cover-preview.count-1,
.folder-cover-preview.count-2,
.folder-cover-preview.count-3,
.folder-cover-preview.count-4 {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.folder-cover-preview .folder-cover-tile,
.folder-cover-preview.count-1 .folder-cover-tile {
  min-width: 0;
  min-height: 0;
  grid-column: auto;
  grid-row: auto;
  display: block;
  border-radius: 8px;
  background: var(--folder-tile-cover, linear-gradient(135deg, #8b5cf6, #4f6eff));
}

.screen-home .folder-cover-preview.count-1,
.nested-projects .folder-cover-preview.count-1,
.folder-grid .folder-cover-preview.count-1,
.folder-cover-preview.count-1 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
}

.screen-home .folder-cover-preview.count-1 .folder-cover-tile,
.nested-projects .folder-cover-preview.count-1 .folder-cover-tile,
.folder-grid .folder-cover-preview.count-1 .folder-cover-tile,
.folder-cover-preview.count-1 .folder-cover-tile {
  grid-column: 1 / 2 !important;
  grid-row: 1 / 2 !important;
}

.nested-projects .project-index,
.folder-grid .project-index {
  display: none !important;
}

.screen-home .project-copy,
.nested-projects .project-copy,
.folder-grid .project-copy {
  gap: 1px;
}

.screen-home .project-meta,
.nested-projects .project-meta,
.folder-grid .project-meta {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  align-items: center;
  margin-top: 0;
  line-height: 1;
  min-height: 18px;
  column-gap: 6px;
}

.screen-home .mini-more,
.nested-projects .mini-more,
.folder-grid .mini-more {
  justify-self: end;
  height: 18px;
  min-height: 18px;
  line-height: 0.6;
}

.folder-breadcrumb {
  width: min(900px, 100%);
  display: grid;
  justify-items: start;
  margin: 0 auto 34px;
  gap: 0;
}

.folder-breadcrumb span {
  display: none !important;
}

.folder-breadcrumb input,
.folder-breadcrumb input.is-default-title {
  width: min(540px, 100%);
  justify-self: start;
  color: var(--ink);
  text-align: left;
}

/* Queue row alignment: keep title directly beside the cover art. */
.queue-panel .queue-row {
  grid-template-columns: 28px 58px minmax(0, 1fr) 36px !important;
  justify-items: start !important;
  column-gap: 4px !important;
}

.queue-panel .queue-art {
  justify-self: start !important;
}

.queue-panel .queue-copy {
  width: 100% !important;
  min-width: 0 !important;
  justify-self: start !important;
  align-self: center !important;
  display: grid !important;
  place-items: center start !important;
  justify-content: start !important;
  text-align: left !important;
}

.queue-panel .queue-copy strong,
.queue-panel .queue-copy small {
  width: 100%;
  text-align: left !important;
}

.queue-panel .queue-row-actions {
  justify-self: end !important;
}

@media (max-width: 560px) {
  .queue-panel .queue-row {
    grid-template-columns: 24px 50px minmax(0, 1fr) 32px !important;
    column-gap: 4px !important;
  }
}

/* Landing alignment: keep the brand stack visually centered. */
.landing-screen {
  display: grid;
  place-items: center;
  padding: 28px;
}

.landing-content {
  width: min(520px, calc(100vw - 40px));
  justify-items: center;
  align-content: center;
  gap: 0;
  transform: translateY(2vh);
  text-align: center;
}

.landing-mark {
  width: clamp(220px, 24vw, 300px);
  height: auto;
  aspect-ratio: 1.34;
  display: grid;
  place-items: center;
  overflow: visible;
  margin: 0 auto 10px;
  animation: landing-logo-motion 3.4s ease-in-out infinite;
}

.landing-mark img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  transform: none;
  object-fit: contain;
}

.landing-content h1 {
  width: auto;
  max-width: 100%;
  margin: 0;
  font-size: clamp(4.2rem, 9vw, 6.8rem);
  line-height: 0.9;
  text-align: center;
  transform: translateX(clamp(-40px, -3vw, -22px));
}

.landing-content p {
  margin: 0;
  text-align: center;
}

@keyframes landing-logo-motion {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg) scale(1);
  }

  35% {
    transform: translate3d(0, -12px, 0) rotate(1.8deg) scale(1.035);
  }

  70% {
    transform: translate3d(0, 5px, 0) rotate(-1.4deg) scale(0.992);
  }
}

/* Shared project opening: pull-to-open tape. */
.shared-open-gate {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background: rgba(5, 6, 8, 0.86);
  backdrop-filter: blur(18px);
}

.shared-open-gate[hidden] {
  display: none !important;
}

.shared-gate-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(139, 92, 246, 0.22), transparent 34%),
    rgba(0, 0, 0, 0.28);
}

.shared-gate-panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 36px));
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.shared-gate-cover {
  width: min(250px, 58vw);
  aspect-ratio: 1;
  border-radius: 24px;
  background: var(--project-cover, linear-gradient(135deg, #e577d8, #8b5cf6));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  transform: translateY(calc(var(--pull-progress, 0) * -10px)) scale(calc(1 + var(--pull-progress, 0) * 0.04));
  transition: transform var(--motion-fast) var(--motion-ease);
}

.shared-gate-cover.is-folder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(139, 92, 246, 0.14)),
    var(--project-cover, #141118);
  border: 1px solid rgba(139, 92, 246, 0.34);
}

.shared-gate-eyebrow {
  margin: 10px 0 0;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shared-gate-panel h2 {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1;
}

.shared-gate-panel p {
  margin: 0;
  color: var(--muted);
}

.shared-tape {
  position: relative;
  width: min(420px, 100%);
  height: 64px;
  display: block;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.shared-tape:active {
  cursor: grabbing;
}

.shared-tape:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.shared-tape-track {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
}

.shared-tape-fill {
  position: absolute;
  left: 14px;
  top: 50%;
  width: calc(100% - 28px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #d957ff);
  transform: translateY(-50%) scaleX(var(--pull-progress, 0));
  transform-origin: left center;
}

.shared-tape-handle {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 92px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  transform: translateX(var(--pull-x, 0px));
  transition:
    box-shadow var(--motion-fast) ease,
    background var(--motion-fast) ease;
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.34);
}

.shared-open-gate.is-ready .shared-tape-handle {
  background: #d957ff;
  box-shadow: 0 18px 38px rgba(217, 87, 255, 0.36);
}

.shared-open-gate.is-opening {
  pointer-events: none;
  animation: shared-gate-open 520ms var(--motion-ease) forwards;
}

@keyframes shared-gate-open {
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}

@media (max-width: 560px) {
  .landing-content {
    width: min(440px, calc(100vw - 28px));
    transform: translateY(1.5vh);
  }

  .landing-mark {
    width: clamp(178px, 56vw, 238px);
    margin-bottom: 8px;
  }

  .landing-content h1 {
    font-size: clamp(3.2rem, 17vw, 4.5rem);
    transform: translateX(-6px);
  }

  .shared-gate-panel {
    width: min(390px, calc(100vw - 28px));
  }

  .shared-tape {
    height: 60px;
  }

  .shared-tape-handle {
    width: 86px;
    height: 44px;
  }
}

/* Unified sign-in selector: one choice for email, phone, or username. */
#profileModal .phone-signup-panel {
  width: min(430px, calc(100vw - 28px));
}

#profileModal .phone-form {
  gap: 12px;
}

#profileModal .auth-mode-field {
  position: relative;
}

#profileModal .phone-form input,
#profileModal .phone-form select {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--button);
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
  text-align: left;
}

#profileModal .phone-form input {
  padding: 0 16px;
}

#profileModal .password-input-wrap {
  position: relative;
  display: block;
}

#profileModal .password-input-wrap input {
  padding-right: 58px;
}

#profileModal .password-toggle-button {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%) !important;
  transition:
    background var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}

#profileModal .password-toggle-button:hover,
#profileModal .password-toggle-button:focus-visible,
#profileModal .password-toggle-button.is-visible {
  background: rgba(139, 92, 246, 0.16);
}

#profileModal .password-toggle-button:active {
  transform: translateY(-50%) !important;
}

#profileModal .password-toggle-button img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.86;
}

#profileModal .password-toggle-button.is-visible img {
  opacity: 1;
}

#profileModal .phone-form select {
  appearance: none;
  padding: 0 44px 0 16px;
  cursor: pointer;
}

#profileModal .auth-mode-field::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 24px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: rotate(45deg);
}

#profileModal .phone-form input:focus,
#profileModal .phone-form select:focus {
  border-color: rgba(139, 92, 246, 0.66);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.09);
}

/* Bigger hover target for project card three-dot buttons. */
.screen-home .mini-more,
.nested-projects .mini-more,
.folder-grid .mini-more {
  width: 32px !important;
  min-width: 32px !important;
  height: 24px !important;
  min-height: 24px !important;
  border-radius: 9px !important;
}

/* Keep search filter labels readable on the light segmented control. */
body.light-mode .search-tab,
body.light-mode .search-tab:hover,
body.light-mode .search-tab:focus-visible,
body.light-mode .search-tab:active,
body.light-mode .search-tab.is-active {
  color: var(--ink) !important;
}

/* Bottom-left logo is decorative only. */
.screen-home .site-name-static {
  pointer-events: none;
  cursor: default;
  user-select: none;
}

/* Refreshed track popups. */
.track-detail-shell {
  width: min(860px, calc(100vw - 42px));
  max-height: min(650px, calc(100vh - 42px));
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent 38%),
    #141416;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.54);
}

.track-detail-left {
  padding: 68px 22px 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 38%, rgba(139, 92, 246, 0.16), transparent 45%),
    rgba(255, 255, 255, 0.025);
}

.track-detail-close {
  left: 18px;
  top: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.track-detail-summary {
  gap: 10px;
}

.track-title-edit {
  margin: 0;
  font-size: 1.72rem;
}

.track-detail-wave {
  height: 58px;
  margin: 20px 0 8px;
  padding: 0 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.track-detail-wave span,
.track-info-wave span {
  background: rgba(255, 255, 255, 0.56);
}

#trackDetailFileName {
  margin-top: 2px;
  color: rgba(247, 244, 239, 0.62);
}

.track-more-info-button {
  min-width: 128px;
  margin-top: 14px;
  background: rgba(139, 92, 246, 0.16);
  color: var(--ink);
}

.track-detail-right {
  max-height: min(650px, calc(100vh - 42px));
  padding: 24px;
}

.track-detail-right h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
}

.track-action-group {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.track-action-row {
  min-height: 48px;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 0 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.9rem;
}

.track-action-row:hover {
  background: rgba(139, 92, 246, 0.14);
}

.track-action-row.danger {
  background: rgba(255, 29, 37, 0.055);
}

.track-action-row.danger:hover {
  background: rgba(255, 29, 37, 0.12);
}

.track-info-panel {
  width: min(560px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  gap: 13px;
  padding: 22px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.16), transparent 34%),
    #141416;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.54);
}

.track-info-head .circle-button {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.track-info-title {
  font-size: 1.65rem;
  font-weight: 850;
}

.track-info-fields input,
.track-key-button,
.track-notes-field textarea {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.track-key-picker {
  position: relative;
  display: block;
  width: 100%;
}

.track-key-native {
  display: none;
}

.track-key-button {
  width: 100%;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--white);
  font: inherit;
  text-align: left;
  outline: 0;
  cursor: pointer;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

.track-key-button.is-empty {
  color: var(--muted);
}

.track-key-button.is-open,
.track-key-button:focus-visible {
  border-color: rgba(139, 92, 246, 0.58);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.track-key-arrow {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--motion-fast) ease;
}

.track-key-button.is-open .track-key-arrow {
  transform: translateY(2px) rotate(225deg);
}

.track-key-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 35;
  width: min(220px, 100%);
  max-height: 238px;
  display: grid;
  gap: 3px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #1f1f23;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.track-key-menu[hidden] {
  display: none !important;
}

.track-key-option {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f7f4ef;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
  text-align: left;
}

.track-key-option:hover,
.track-key-option:focus-visible,
.track-key-option.is-selected {
  background: var(--accent);
  color: #ffffff;
  outline: 0;
}

body.light-mode .track-key-button {
  background: rgba(255, 255, 255, 0.76);
  color: #101010;
}

body.light-mode .track-key-button.is-empty {
  color: rgba(10, 10, 10, 0.55);
}

body.light-mode .track-key-menu {
  border-color: rgba(20, 20, 20, 0.12);
  background: #f8f7f4;
}

body.light-mode .track-key-option {
  color: #101010;
}

body.light-mode .track-key-option:hover,
body.light-mode .track-key-option:focus-visible,
body.light-mode .track-key-option.is-selected {
  color: #ffffff;
}

.track-info-meta {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.track-info-wave {
  height: 64px;
  padding: 0 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.track-tag-row {
  justify-content: center;
}

.track-tag-row button {
  min-height: 36px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.075);
}

.track-tag-row button.is-active {
  background: var(--accent);
  color: #ffffff;
}

.track-notes-field textarea {
  min-height: 104px;
}

.version-section {
  margin-top: 2px;
}

.version-section > p {
  margin: 0 0 0 2px;
}

.version-row {
  min-height: 70px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.version-row.is-active,
.version-row:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.12);
}

.track-version-button,
.track-save-info-button,
.track-info-done {
  border-radius: 14px;
}

.track-version-button {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.track-save-info-button,
.track-info-done {
  min-height: 52px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 850;
}

@media (max-width: 760px) {
  .track-detail-shell {
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
  }

  .track-detail-left {
    min-height: 320px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .track-detail-right {
    max-height: none;
    overflow: visible;
  }

  .track-info-panel {
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
}
