:root {
  --bg: #10141d;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.13);
  --ink: #f8fbff;
  --muted: #a8b3c4;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #7ee7c8;
  --accent-2: #8fa8ff;
  --accent-3: #ffca73;
  --rose: #ff7db7;
  --deep: #171d2b;
  --disabled: #788293;
  --disabled-bg: rgba(154, 147, 128, 0.11);
  --disabled-line: rgba(177, 169, 146, 0.18);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 20, 29, 0.9), rgba(16, 20, 29, 0.96)),
    url("assets/decor/tuba-hero-studio.webp") center top / cover fixed;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
.is-disabled {
  cursor: not-allowed;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 92px);
  padding-bottom: 92px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(11, 15, 24, 0.68);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 34px;
  border-radius: 10px 18px 18px 10px;
  background:
    linear-gradient(135deg, rgba(10, 14, 23, 0.05), rgba(10, 14, 23, 0.28)),
    url("assets/decor/tuba-cover-bell.webp") center / cover;
  box-shadow: 0 12px 26px rgba(255, 202, 115, 0.22);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
}

.nav-item svg {
  width: 19px;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(126, 231, 200, 0.18), rgba(143, 168, 255, 0.14));
}

.nav-item.is-disabled,
.nav-item.is-disabled:hover,
.nav-item.is-disabled:focus-visible {
  color: var(--disabled);
  background: transparent;
  pointer-events: none;
}

.upload-panel {
  overflow: hidden;
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 16, 25, 0.2), rgba(12, 16, 25, 0.88)),
    url("assets/decor/tuba-cover-window.webp") center / cover;
  box-shadow: var(--shadow);
}

.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #10141d;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(126, 231, 200, 0.72)),
    url("assets/decor/tuba-cover-console.webp") center / cover;
}

.upload-panel h2,
.panel h2,
.section-head h2 {
  margin: 12px 0 4px;
  font-size: 1rem;
}

.upload-panel p,
.artist-row p,
.queue-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.primary-btn,
.secondary-btn,
.play-featured,
.follow-btn,
.text-btn,
.tab {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn,
.play-featured {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #55dcbf, #7f92ff);
  box-shadow: 0 14px 28px rgba(126, 231, 200, 0.22);
}

.primary-btn {
  width: 100%;
  margin-top: 16px;
}

.main-content {
  min-width: 0;
  padding: 20px 26px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(580px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
}

.search-wrap svg {
  width: 20px;
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.top-actions,
.hero-actions,
.player-controls,
.player-progress,
.volume-wrap,
.panel-head {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

body:not(.owner-session) .owner-only {
  display: none !important;
}

.icon-btn,
.profile-btn,
.main-play {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn {
  width: 42px;
  height: 42px;
  color: var(--ink);
  border-radius: 8px;
}

.icon-btn.small {
  width: 34px;
  height: 34px;
}

.icon-btn.active {
  color: #10141d;
  border-color: transparent;
  background: var(--accent);
}

.profile-btn {
  grid-auto-flow: column;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px 0 6px;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 800;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.avatar.mini {
  width: 32px;
  height: 32px;
}

.account-avatar {
  display: inline-grid;
  place-items: center;
  color: #10141d;
}

.account-avatar svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.avatar-gradient-one { background: linear-gradient(135deg, #7ee7c8, #8fa8ff); }
.avatar-gradient-two { background: linear-gradient(135deg, #ffca73, #7ee7c8); }
.avatar-gradient-three { background: linear-gradient(135deg, #ff7db7, #8fa8ff); }
.avatar-gradient-four { background: linear-gradient(135deg, #8fa8ff, #2a3350); }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(310px, 0.58fr);
  align-items: center;
  min-height: 350px;
  margin-bottom: 28px;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(10, 14, 23, 0.96) 0%, rgba(10, 14, 23, 0.86) 42%, rgba(10, 14, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(10, 14, 23, 0.46), rgba(10, 14, 23, 0.12)),
    url("assets/decor/tuba-hero-studio.webp") center / cover;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 44%;
  background: linear-gradient(0deg, rgba(10, 14, 23, 0.58), transparent);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 490px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.secondary-btn.is-disabled,
.icon-btn.is-disabled,
.track-action.is-disabled,
input.is-disabled {
  color: var(--disabled);
  border-color: var(--disabled-line);
  background: var(--disabled-bg);
  box-shadow: none;
  opacity: 0.72;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.hero-visual img {
  width: min(310px, 92%);
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 202, 115, 0.08);
  transform: rotate(2deg);
}

.live-chip {
  position: absolute;
  right: 0;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 14, 23, 0.68);
  backdrop-filter: blur(16px);
  font-size: 0.86rem;
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.app-screen {
  display: none;
}

body.music-toys-page .home-screen {
  display: none !important;
}

body.music-toys-page .music-toys-screen {
  display: block;
}

.music-toys-screen {
  min-height: calc(100vh - 146px);
}

.toys-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 210px;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(10, 14, 23, 0.96) 0%, rgba(10, 14, 23, 0.7) 58%, rgba(10, 14, 23, 0.34)),
    url("assets/decor/tuba-cover-console.webp") center / cover;
  box-shadow: var(--shadow);
}

.toys-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.3rem, 5.6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.toys-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 0;
  color: rgba(248, 251, 255, 0.78);
  line-height: 1.55;
}

.toy-open-link {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 132px;
}

.toy-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
}

.toy-stage {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  height: min(72vh, 820px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(126, 231, 200, 0.16), rgba(255, 202, 115, 0.08) 46%, rgba(255, 125, 183, 0.12)),
    #070b13;
  box-shadow: var(--shadow);
}

.toy-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.toy-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #070b13;
}

.toy-switcher {
  display: grid;
  align-content: start;
  gap: 10px;
}

.toy-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.toy-card:hover,
.toy-card:focus-visible {
  border-color: rgba(126, 231, 200, 0.38);
  background: rgba(255, 255, 255, 0.11);
  outline: 0;
  transform: translateY(-1px);
}

.toy-card.active {
  border-color: rgba(126, 231, 200, 0.52);
  background: linear-gradient(135deg, rgba(126, 231, 200, 0.18), rgba(143, 168, 255, 0.13));
  box-shadow: inset 0 0 0 1px rgba(126, 231, 200, 0.12);
}

.toy-card > span:last-child {
  min-width: 0;
}

.toy-card strong,
.toy-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toy-card strong {
  font-size: 0.98rem;
}

.toy-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.toy-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #10141d;
  border-radius: 8px;
}

.toy-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.toy-orbits {
  background: linear-gradient(135deg, #ffca73, #7ee7c8);
}

.toy-life {
  background: linear-gradient(135deg, #5ef0c0, #ffcf6b);
}

.toy-ink {
  background: linear-gradient(135deg, #ff7db7, #6fe0e0);
}

.toy-synapse {
  background: linear-gradient(135deg, #ff5ab4, #5ad8ff);
}

.toy-pocket {
  background: linear-gradient(135deg, #f2f65d, #ff8f70);
}

.import-studio {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
}

.import-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.import-head h2 {
  margin: 0;
  font-size: 1.34rem;
}

.import-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: #10141d;
  border-radius: 8px;
  background: var(--accent-3);
  font-size: 0.8rem;
  font-weight: 900;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.import-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 13, 22, 0.42);
}

.import-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #10141d;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.64), rgba(126, 231, 200, 0.68)),
    url("assets/decor/tuba-cover-bell.webp") center / cover;
}

.import-card h3 {
  margin: 12px 0 6px;
  font-size: 0.98rem;
}

.import-card p,
.import-card label,
.import-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.import-card p {
  margin: 0 0 12px;
}

.import-card label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 800;
}

.import-input {
  width: 100%;
  min-height: 40px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.import-input {
  padding: 0 10px;
  outline: 0;
}

.import-action {
  width: 100%;
  margin-top: 10px;
}

.auth-link {
  display: none;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.auth-link.ready {
  display: inline-block;
}

.command-preview {
  overflow: auto;
  min-height: 72px;
  margin: 10px 0 0;
  padding: 10px;
  color: #dbeafe;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 9, 15, 0.72);
  backdrop-filter: blur(14px);
}

.modal-backdrop[hidden] {
  display: none;
}

.upload-dialog {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121827;
  box-shadow: var(--shadow);
}

.upload-dialog h2 {
  margin: 0;
  font-size: 1.35rem;
}

.upload-form {
  display: grid;
  gap: 10px;
}

.upload-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.account-dialog {
  max-width: 440px;
}

.artwork-dialog {
  width: min(680px, 100%, calc(100vh - 124px));
  overflow: hidden;
  scrollbar-width: none;
}

.artwork-dialog::-webkit-scrollbar {
  display: none;
}

.artwork-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1320;
}

.artwork-preview img,
.artwork-preview .cover {
  width: 100%;
  height: 100%;
  max-height: none;
}

.artwork-preview img {
  display: block;
  object-fit: contain;
}

.artwork-preview .cover {
  border-radius: 0;
}

.artwork-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.room-backdrop {
  position: fixed;
  z-index: 54;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(3, 5, 9, 0.82);
  backdrop-filter: blur(12px);
}

.room-backdrop[hidden] {
  display: none;
}

body.room-open {
  overflow: hidden;
}

.listening-room {
  position: relative;
  overflow: hidden;
  width: min(1660px, calc(100vw - 20px));
  height: min(940px, calc(100vh - 20px));
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #0a0e17;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.68);
}

.room-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5, 8, 13, 0.9), rgba(7, 10, 16, 0.46) 42%, rgba(5, 8, 13, 0.62)),
    linear-gradient(0deg, rgba(5, 8, 13, 0.84), rgba(5, 8, 13, 0.1) 44%, rgba(5, 8, 13, 0.74)),
    url("assets/decor/listening-room-studio.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.room-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 26%, rgba(126, 231, 200, 0.16), transparent 28%),
    radial-gradient(circle at 76% 78%, rgba(255, 202, 115, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(5, 8, 13, 0.46), rgba(5, 8, 13, 0.24));
}

.room-cover-haze {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  opacity: 0.13;
  filter: blur(28px) saturate(1.3);
  transform: scale(1.08);
  mix-blend-mode: screen;
}

.room-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(6, 10, 16, 0.9), rgba(6, 10, 16, 0.2) 48%, rgba(6, 10, 16, 0.72)),
    linear-gradient(0deg, rgba(6, 10, 16, 0.88), transparent 36%);
}

.room-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
}

.room-topbar h2,
.room-console h3,
.room-next h4,
.room-tool h4,
.room-notes h4 {
  margin: 0;
}

.room-topbar h2 {
  font-size: clamp(1.2rem, 2.6vw, 2.05rem);
  max-width: 56vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.room-status span,
.room-mini-console span,
.room-track-data span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 13, 21, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.room-status span {
  padding: 8px 10px;
  color: rgba(248, 251, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 900;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(430px, 1.12fr) minmax(310px, 0.82fr);
  align-items: stretch;
  gap: 18px;
  min-height: 0;
}

.room-left,
.room-console,
.room-tools {
  min-width: 0;
}

.room-left,
.room-tools {
  display: grid;
  align-content: start;
  gap: 14px;
}

.room-tools {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  min-height: 0;
}

.room-art-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(126, 231, 200, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(12, 17, 27, 0.56), rgba(7, 10, 16, 0.72));
  backdrop-filter: blur(10px);
}

.room-equipment-light {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(126, 231, 200, 0.1), rgba(255, 202, 115, 0.24), rgba(143, 168, 255, 0.12), rgba(126, 231, 200, 0.1));
  filter: blur(24px);
  opacity: 0.8;
}

.room-art {
  position: relative;
  z-index: 1;
  width: min(380px, 86%);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.room-art-glow {
  position: absolute;
  width: min(430px, 98%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(126, 231, 200, 0.16), rgba(255, 202, 115, 0.2), rgba(143, 168, 255, 0.14), rgba(126, 231, 200, 0.16));
  filter: blur(18px);
  opacity: 0.72;
}

.room-mini-console {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.room-mini-console span {
  min-width: 0;
  padding: 11px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.room-mini-console strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.room-console {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.room-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.room-console h3 {
  font-size: clamp(2.5rem, 5.4vw, 5.6rem);
  line-height: 0.94;
  max-width: 11ch;
  overflow-wrap: anywhere;
}

.room-line {
  max-width: 62ch;
  margin: 14px 0 0;
  color: rgba(248, 251, 255, 0.72);
  line-height: 1.5;
}

.room-track-data,
.room-time,
.room-controls,
.room-next .panel-head,
.room-tool-head {
  display: flex;
  align-items: center;
}

.room-track-data {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
}

.room-track-data span {
  min-width: 0;
  padding: 10px;
}

.room-track-data small,
.room-chords span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.room-track-data strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-waveform {
  display: grid;
  grid-template-columns: repeat(var(--waveform-bars, 96), minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 132px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(126, 231, 200, 0.08), transparent 28%),
    rgba(9, 13, 21, 0.68);
  backdrop-filter: blur(12px);
}

.room-bar {
  min-height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.room-bar.played {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(126, 231, 200, 0.18);
}

.room-time {
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.room-controls {
  gap: 10px;
  margin-top: 16px;
}

.room-play {
  width: 58px;
  height: 58px;
}

.room-like.active {
  color: var(--rose);
  border-color: rgba(255, 125, 183, 0.36);
  background: rgba(255, 125, 183, 0.12);
}

.room-notes,
.room-tool,
.room-next {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(9, 13, 21, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.room-notes {
  margin-top: 18px;
  padding: 14px;
}

.room-tool {
  padding: 14px;
}

.room-tool-head {
  gap: 10px;
  margin-bottom: 12px;
}

.room-tool-head div {
  min-width: 0;
}

.room-tool-head > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(126, 231, 200, 0.12);
}

.room-tool-head h4 {
  font-size: 1rem;
}

.room-reset {
  margin-left: auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 900;
}

.room-reset:hover,
.room-reset:focus-visible {
  border-color: rgba(126, 231, 200, 0.4);
  background: rgba(126, 231, 200, 0.13);
  outline: 0;
}

.room-note-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.room-note {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.11);
  font-weight: 900;
}

.room-note.root {
  color: #0c1018;
  background: var(--accent-3);
}

.room-staff {
  position: relative;
  height: 116px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.room-staff > span:not(.room-melody-note) {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.room-staff > span:nth-child(1) { top: 18%; }
.room-staff > span:nth-child(2) { top: 34%; }
.room-staff > span:nth-child(3) { top: 50%; }
.room-staff > span:nth-child(4) { top: 66%; }
.room-staff > span:nth-child(5) { top: 82%; }

.room-melody-note {
  position: absolute;
  left: calc(12px + (var(--note-x) * ((100% - 88px) / 13)));
  top: calc(15% + (var(--note-lane) * 16%));
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #071018;
  background: rgba(126, 231, 200, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  transform: translateY(-50%);
  transition: transform 160ms ease, background 160ms ease;
}

.room-melody-note.long {
  min-width: 44px;
  background: rgba(255, 202, 115, 0.82);
}

.room-melody-note.active {
  transform: translateY(-50%) scale(1.08);
  background: #fff;
}

.room-analysis-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.room-meter-list {
  display: grid;
  gap: 10px;
}

.room-meter-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.room-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.room-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.room-spectrum {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 48px;
  margin-top: 13px;
}

.room-spectrum-bar {
  flex: 1;
  min-height: 10px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(255, 255, 255, 0.18);
  transform-origin: bottom;
  transition: transform 220ms ease, background 220ms ease;
}

.room-spectrum-bar.active {
  background: linear-gradient(180deg, var(--accent-3), var(--accent));
}

.room-chords {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.room-chords strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
}

.room-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.room-preset {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.74rem;
  font-weight: 900;
}

.room-preset:hover,
.room-preset:focus-visible,
.room-preset.active {
  color: #071018;
  border-color: rgba(255, 202, 115, 0.6);
  background: var(--accent-3);
  outline: 0;
}

.room-effect-list {
  display: grid;
  gap: 8px;
}

.room-effect-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.room-effect-row input {
  width: 100%;
  accent-color: var(--accent);
}

.room-effect-row strong {
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.room-next {
  display: flex;
  flex-direction: column;
  padding: 10px;
  min-height: 0;
  overflow: hidden;
}

.room-next .panel-head {
  justify-content: space-between;
  margin-bottom: 8px;
}

.room-next .panel-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.room-queue-list {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.room-queue-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.room-queue-item:hover,
.room-queue-item:focus-visible {
  border-color: rgba(126, 231, 200, 0.3);
  background: rgba(126, 231, 200, 0.1);
  outline: 0;
}

.room-queue-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #10141d;
  border-radius: 8px;
  background: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 900;
}

.room-queue-item strong,
.room-queue-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-queue-item em,
.room-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.account-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.account-summary .avatar {
  width: 52px;
  height: 52px;
}

.account-summary .account-avatar svg {
  width: 23px;
  height: 23px;
}

.account-summary h3,
.account-summary p {
  margin: 0;
}

.account-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.account-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.account-actions .secondary-btn {
  justify-content: flex-start;
  width: 100%;
}

.danger-action {
  color: #ffcad8;
  border-color: rgba(255, 125, 183, 0.34);
  background: rgba(255, 125, 183, 0.1);
}

.file-input {
  padding: 9px;
}

.file-input::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  color: #10141d;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 900;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(240px, max-content) minmax(280px, 1fr);
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  justify-self: stretch;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  scrollbar-width: none;
}

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

.tab {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: #10141d;
  background: var(--accent);
}

.track-list {
  display: grid;
  gap: 12px;
}

.track-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 40, 58, 0.96), rgba(23, 30, 45, 0.94));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.track-card.active {
  border-color: rgba(126, 231, 200, 0.36);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(126, 231, 200, 0.1);
}

.cover {
  min-width: 0;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 8px;
  background-color: #2a3350;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cover-button {
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.cover-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cover-button .cover {
  display: block;
  width: 100%;
}

.cover-button:hover .cover,
.cover-button:focus-visible .cover {
  filter: brightness(1.08);
}

.cover-one {
  background-image:
    linear-gradient(135deg, rgba(10, 14, 23, 0.05), rgba(10, 14, 23, 0.28)),
    url("assets/decor/tuba-cover-bell.webp");
}

.cover-two {
  background-image:
    linear-gradient(135deg, rgba(10, 14, 23, 0.02), rgba(10, 14, 23, 0.24)),
    url("assets/decor/tuba-cover-window.webp");
}

.cover-three {
  background-image:
    linear-gradient(135deg, rgba(10, 14, 23, 0.04), rgba(10, 14, 23, 0.3)),
    url("assets/decor/tuba-cover-console.webp");
}

.cover-four {
  background-image:
    linear-gradient(135deg, rgba(255, 202, 115, 0.08), rgba(10, 14, 23, 0.34)),
    url("assets/decor/tuba-cover-bell.webp");
  background-position: 58% center;
}

.cover-five {
  background-image:
    linear-gradient(135deg, rgba(126, 231, 200, 0.1), rgba(10, 14, 23, 0.36)),
    url("assets/decor/tuba-cover-console.webp");
  background-position: 24% center;
}

.track-main {
  min-width: 0;
}

.track-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.track-title {
  margin: 2px 0;
  font-size: 1.05rem;
}

.track-artist {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.track-actions {
  display: flex;
  gap: 6px;
}

.track-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.track-action.liked {
  color: var(--rose);
  border-color: rgba(255, 125, 183, 0.38);
  background: rgba(255, 125, 183, 0.1);
}

.track-action.danger {
  color: #ffb4c8;
  border-color: rgba(255, 125, 183, 0.34);
  background: rgba(255, 125, 183, 0.09);
}

.waveform {
  display: grid;
  grid-template-columns: repeat(var(--waveform-bars, 64), minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  height: 56px;
  margin: 12px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
}

.bar {
  display: block;
  min-height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 160ms ease, transform 160ms ease;
}

.track-card.active .bar:not(.played),
.waveform:hover .bar:not(.played) {
  background: var(--accent);
}

.bar.played {
  background: var(--accent-2);
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.right-rail {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 24, 39, 0.93), rgba(18, 24, 39, 0.86)),
    url("assets/decor/tuba-cover-console.webp") center / cover;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
}

.text-btn {
  color: var(--accent);
  background: transparent;
}

.artist-list {
  display: grid;
  gap: 14px;
}

.artist-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.artist-row .avatar {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.artist-row .avatar-gradient-two { background-image: url("assets/decor/tuba-cover-bell.webp"); }
.artist-row .avatar-gradient-three { background-image: url("assets/decor/tuba-cover-window.webp"); }
.artist-row .avatar-gradient-four { background-image: url("assets/decor/tuba-cover-console.webp"); }

.artist-row h3 {
  margin: 0 0 2px;
  font-size: 0.94rem;
}

.follow-btn {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.queue-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.queue-list li {
  min-width: 0;
}

.queue-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  color: inherit;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.queue-item:hover,
.queue-item:focus-visible {
  background: rgba(126, 231, 200, 0.1);
  outline: 0;
}

.queue-item > span:last-child {
  min-width: 0;
}

.queue-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #10141d;
  border-radius: 8px;
  background: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 900;
}

.queue-list h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(210px, 300px) auto minmax(220px, 1fr) 180px;
  align-items: center;
  gap: 18px;
  min-height: 92px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 -18px 40px rgba(40, 31, 22, 0.08);
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mini-cover {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.now-playing strong,
.now-playing span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.main-play {
  width: 52px;
  height: 52px;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 26px rgba(126, 231, 200, 0.26);
}

.mobile-mute-btn {
  display: none;
}

.player-controls {
  gap: 8px;
}

.player-progress,
.volume-wrap {
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.volume-wrap .icon-btn {
  flex: 0 0 auto;
}

.volume-wrap svg {
  width: 18px;
}

/* ===== Recording Studio ===== */

.recording-studio {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.studio-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 22% 72%, rgba(185, 28, 44, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse at 78% 16%, rgba(65, 48, 198, 0.14) 0%, transparent 48%),
    linear-gradient(155deg, #0d1018 0%, #100e1a 48%, #0d1320 100%);
  z-index: 0;
}

.studio-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/decor/tuba-hero-studio.webp") center / cover no-repeat;
  opacity: 0.05;
  mix-blend-mode: luminosity;
}

.studio-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 36px 48px;
  min-height: 100%;
  box-sizing: border-box;
}

/* Timeline strip — full width above the columns */

.studio-timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-timeline-wrap .room-tool-head {
  justify-content: flex-start;
}

.studio-time-display {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.studio-timeline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 68px;
}

.studio-tl-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  height: calc(var(--level, 0.04) * 100%);
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  transition: height 0.07s ease-out;
  opacity: 0.55;
}

/* Played portion — brighter teal */
.studio-tl-bar.played {
  background: linear-gradient(180deg, #9ef8df, #5de8c2);
  opacity: 1;
}

/* Playhead — bright white-teal spike */
.studio-tl-bar.playhead {
  background: linear-gradient(180deg, #fff 0%, #7ee7c8 60%);
  opacity: 1;
  min-height: 40%;
  box-shadow: 0 0 6px 1px rgba(126, 231, 200, 0.7);
}

/* Clickable timeline */
.studio-timeline[data-studio-timeline] {
  cursor: pointer;
}

/* Three-column layout */

.studio-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 240px;
  gap: 22px;
  align-items: start;
}

/* Left — VU meter */

.studio-meter-col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.studio-vu {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  margin-top: 10px;
}

.studio-vu-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-3), var(--accent));
  height: calc(var(--level, 0.04) * 100%);
  min-height: 3px;
  border-radius: 2px 2px 0 0;
  transition: height 0.05s ease-out;
}

.recording-studio.is-recording .studio-vu-bar {
  background: linear-gradient(180deg, #ff5a68, #b91c2c);
}

.studio-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.83rem;
}

.studio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s;
}

.is-recording .studio-dot {
  background: #cc1f2f;
  animation: studio-blink 1.1s ease-in-out infinite;
}

@keyframes studio-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.studio-timer {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Center — console */

.studio-console {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-headline {
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.studio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

/* Record button — solid red circle, mic icon */
.studio-rec-btn {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #b91c2c;
  color: #fff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 rgba(185, 28, 44, 0);
}

.studio-rec-btn svg {
  width: 26px;
  height: 26px;
}

.studio-rec-btn:hover {
  background: #d42235;
  transform: scale(1.07);
  box-shadow: 0 0 22px rgba(185, 28, 44, 0.55);
}

.studio-rec-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.is-recording .studio-rec-btn {
  animation: studio-rec-glow 1.5s ease-in-out infinite;
}

@keyframes studio-rec-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 44, 0.5); }
  50% { box-shadow: 0 0 0 18px rgba(185, 28, 44, 0); }
}

/* Stop button — dark circle, red square icon (clearly different from record) */
.studio-stop-btn {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #ff5a68;
  border: 2px solid rgba(255, 90, 104, 0.45);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.studio-stop-btn svg {
  width: 22px;
  height: 22px;
}

.studio-stop-btn:hover {
  background: rgba(255, 90, 104, 0.16);
  border-color: rgba(255, 90, 104, 0.75);
  transform: scale(1.07);
}

.studio-stop-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.studio-save-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.22);
}

.studio-field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 4px;
}

.studio-save-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}

/* Right — effects panel */

.studio-effects-col {
  display: grid;
  align-content: start;
  gap: 0;
}

.studio-effect-list {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

/* ── Pretty range sliders in effects panel ── */
.studio-effect-list input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

/* Track */
.studio-effect-list input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(126, 231, 200, 0.18);
}
.studio-effect-list input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(126, 231, 200, 0.18);
}

/* Thumb */
.studio-effect-list input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -5.5px;
  box-shadow: 0 0 0 2px rgba(126, 231, 200, 0.25), 0 0 8px rgba(126, 231, 200, 0.35);
  transition: box-shadow 0.15s, transform 0.15s;
}
.studio-effect-list input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(126, 231, 200, 0.25), 0 0 8px rgba(126, 231, 200, 0.35);
  transition: box-shadow 0.15s, transform 0.15s;
}

.studio-effect-list input[type="range"]:hover::-webkit-slider-thumb,
.studio-effect-list input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(126, 231, 200, 0.35), 0 0 14px rgba(126, 231, 200, 0.55);
  transform: scale(1.2);
}
.studio-effect-list input[type="range"]:hover::-moz-range-thumb,
.studio-effect-list input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(126, 231, 200, 0.35), 0 0 14px rgba(126, 231, 200, 0.55);
  transform: scale(1.2);
}

/* ── Track card "Recorded" badge ── */
.track-studio-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(126, 231, 200, 0.35);
  border-radius: 999px;
  padding: 1px 6px 1px 4px;
  white-space: nowrap;
  line-height: 1.4;
}

body.studio-open {
  overflow: hidden;
}

@media (max-width: 1000px) {
  .studio-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .studio-effects-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .studio-shell {
    padding: 20px 20px 36px;
    gap: 18px;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-effects-col {
    grid-column: 1;
  }

  .studio-vu {
    height: 96px;
  }

  .studio-timeline {
    height: 48px;
  }

  .studio-timer {
    font-size: 2rem;
  }

  .studio-headline {
    font-size: clamp(2rem, 11vw, 3rem);
  }
}

@media (max-width: 520px) {
  .studio-shell {
    padding: 16px 16px 32px;
  }

  .studio-rec-btn,
  .studio-stop-btn {
    width: 58px;
    height: 58px;
  }

  .studio-rec-btn svg {
    width: 22px;
    height: 22px;
  }

  .studio-stop-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    align-items: center;
    padding-inline: 12px;
  }

  .brand span:last-child,
  .nav-item span:last-child,
  .upload-panel {
    display: none;
  }

  .nav-item {
    justify-content: center;
    width: 48px;
    padding: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .toy-workbench {
    grid-template-columns: 1fr;
  }

  .toy-switcher {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .toy-card {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 118px;
  }

  .import-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 12;
    left: 0;
    right: 0;
    top: auto;
    bottom: 92px;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .brand {
    display: none;
  }

  .nav-list {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  .main-content {
    padding: 16px 14px 170px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: space-between;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .toys-hero {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }

  .toy-stage {
    min-height: 380px;
    height: min(620px, calc(100vh - 250px));
  }

  .toy-switcher {
    order: -1;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .toy-switcher::-webkit-scrollbar {
    display: none;
  }

  .toy-card {
    flex: 0 0 min(76vw, 260px);
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 74px;
    scroll-snap-align: start;
  }

  .toy-icon {
    width: 48px;
    height: 48px;
  }

  .hero-visual {
    min-height: 220px;
    margin-top: 12px;
  }

  .section-head {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .import-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .track-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .cover {
    width: 72px;
  }

  .track-top,
  .track-actions {
    flex-wrap: wrap;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .player-progress {
    grid-column: 1 / -1;
    order: 3;
  }

  .volume-wrap {
    display: none;
  }
}

@media (max-width: 520px) {
  .profile-btn span:last-child {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-visual {
    display: none;
  }

  .track-card {
    grid-template-columns: 1fr;
  }

  .cover {
    width: 100%;
    max-height: 180px;
  }

}

.mobile-appbar,
.mobile-nav {
  display: none;
}

.mobile-nav-item {
  min-width: 0;
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 86px;
    scroll-padding-bottom: 170px;
  }

  body {
    overflow-x: hidden;
    background:
      linear-gradient(rgba(16, 20, 29, 0.92), rgba(16, 20, 29, 0.96)),
      url("assets/decor/tuba-hero-studio.webp") center top / cover fixed;
  }

  .mobile-appbar {
    position: fixed;
    z-index: 24;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(18px);
  }

  .mobile-brand {
    display: inline-flex;
    min-width: 0;
    font-size: 1rem;
  }

  .mobile-brand span:last-child {
    display: inline;
  }

  .mobile-brand .brand-mark {
    width: 34px;
    height: 30px;
    border-radius: 12px 12px 14px 8px;
  }

  .mobile-app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  .mobile-app-actions .icon-btn,
  .mobile-auth-btn {
    min-width: 40px;
    height: 40px;
  }

  .mobile-auth-btn {
    min-width: 108px;
    padding: 0 10px 0 6px;
  }

  .app-shell {
    display: block;
    min-height: calc(100vh - 152px);
    padding-bottom: 152px;
  }

  body.music-toys-page .app-shell {
    min-height: calc(100vh - 76px);
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 86px 14px 178px;
  }

  body.music-toys-page .main-content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .main-content,
  .feed-column,
  .hero-copy,
  .track-main {
    min-width: 0;
    max-width: 100%;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar .top-actions {
    display: none;
  }

  .search-wrap {
    width: 100%;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.1);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 18px;
    padding: 18px;
    background:
      linear-gradient(90deg, rgba(10, 14, 23, 0.94) 0%, rgba(10, 14, 23, 0.76) 62%, rgba(10, 14, 23, 0.28) 100%),
      url("assets/decor/tuba-hero-studio.webp") center / cover;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 13vw, 4.1rem);
  }

  .hero p:not(.eyebrow) {
    max-width: min(30ch, 100%);
    margin-top: 12px;
    font-size: 0.96rem;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 16px;
  }

  .hero-actions .secondary-btn {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .content-grid {
    gap: 18px;
  }

  .section-head {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
  }

  .section-head h2 {
    font-size: 1.22rem;
  }

  .filter-tabs {
    width: calc(100vw - 28px);
    margin-inline: -1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .tab {
    flex: 0 0 auto;
  }

  .track-list {
    gap: 10px;
  }

  .track-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    overflow: hidden;
  }

  .cover {
    width: 76px;
  }

  .track-top {
    align-items: start;
    gap: 8px;
  }

  .track-top > div {
    min-width: 0;
  }

  .track-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .track-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .track-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    max-width: 144px;
  }

  .track-action {
    min-height: 34px;
  }

  .waveform {
    height: 44px;
    margin: 10px 0 7px;
    gap: 1px;
  }

  .track-meta {
    gap: 8px;
    font-size: 0.76rem;
  }

  .right-rail {
    gap: 12px;
  }

  .panel,
  .import-studio {
    padding: 14px;
  }

  .import-studio {
    margin-bottom: 0;
  }

  .import-grid {
    gap: 10px;
  }

  .modal-backdrop {
    z-index: 40;
    align-items: end;
    padding: 14px;
  }

  .room-backdrop {
    z-index: 52;
    align-items: stretch;
    padding: 10px;
  }

  .listening-room {
    width: 100%;
    height: calc(100vh - 20px);
    overflow: auto;
  }

  .room-shell {
    height: auto;
    min-height: 100%;
    padding: 16px;
  }

  .room-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .room-status {
    grid-column: 1 / -1;
    justify-content: start;
    order: 3;
  }

  .room-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .room-art-stage {
    min-height: 250px;
  }

  .room-art {
    width: min(320px, 74vw);
  }

  .room-console {
    justify-content: start;
  }

  .room-console h3 {
    font-size: clamp(2rem, 12vw, 3.8rem);
    max-width: 100%;
  }

  .room-track-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-waveform {
    height: 104px;
    gap: 1px;
  }

  .room-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-queue-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .room-queue-item em {
    display: none;
  }

  .upload-dialog {
    width: 100%;
    max-height: min(720px, calc(100vh - 28px));
  }

  .player {
    bottom: calc(64px + env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 10px 14px;
  }

  body.music-toys-page .player {
    display: none;
  }

  .now-playing {
    min-width: 0;
  }

  .mini-cover {
    width: 48px;
    height: 48px;
  }

  .main-play {
    width: 46px;
    height: 46px;
  }

  .mobile-mute-btn {
    display: inline-grid;
  }

  .player-progress {
    grid-column: 1 / -1;
    order: 3;
  }

  .volume-wrap {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 25;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    min-height: calc(64px + env(safe-area-inset-bottom));
    max-width: 100vw;
    overflow: hidden;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(10, 14, 23, 0.94);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    display: grid;
    flex: 1 1 0;
    place-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 800;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-item.active,
  .mobile-nav-item:hover,
  .mobile-nav-item:focus-visible {
    color: var(--ink);
    background: rgba(126, 231, 200, 0.14);
    outline: 0;
  }
}

@media (max-width: 520px) {
  .mobile-app-actions {
    display: flex;
  }

  .mobile-app-actions [data-mobile-search],
  .mobile-app-actions [data-mobile-upload] {
    display: none !important;
  }

  .mobile-auth-btn {
    position: fixed;
    top: calc(15px + env(safe-area-inset-top));
    right: 14px;
    z-index: 26;
    display: inline-grid !important;
    width: auto;
    min-width: 108px;
    padding: 0 10px 0 6px;
  }

  .mobile-nav [data-mobile-auth] {
    display: none;
  }

  .mobile-brand span:last-child {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-auth-btn span:last-child {
    display: inline;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .toys-hero h1 {
    font-size: 2.3rem;
  }

  .toy-open-link {
    width: 100%;
  }

  .toy-stage {
    min-height: 340px;
    height: min(560px, calc(100vh - 250px));
  }

  .toy-card {
    flex-basis: min(82vw, 238px);
  }

  .track-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .cover {
    width: 64px;
    max-height: none;
  }

  .track-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .track-actions {
    justify-content: flex-start;
    max-width: 100%;
  }

  .track-action {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .track-action svg {
    width: 16px;
    height: 16px;
  }

  .waveform {
    gap: 0;
  }

  .room-topbar {
    align-items: start;
  }

  .room-topbar h2 {
    font-size: 1.35rem;
  }

  .room-art-stage {
    min-height: 210px;
  }

  .room-art {
    width: min(260px, 72vw);
  }

  .room-mini-console,
  .room-track-data {
    grid-template-columns: 1fr;
  }

  .room-track-data {
    gap: 6px;
  }

  .room-track-data span,
  .room-mini-console span {
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .room-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-effect-row {
    grid-template-columns: 42px minmax(0, 1fr) 52px;
    gap: 6px;
  }

  .room-staff {
    height: 96px;
  }

  .room-melody-note {
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.68rem;
  }

  .room-controls {
    justify-content: center;
  }

  .track-meta span:nth-child(2) {
    display: none;
  }

  .player {
    min-height: 82px;
  }

  .player-controls .icon-btn {
    display: none;
  }

  .player-controls .mobile-mute-btn {
    display: inline-grid;
  }

  .player-progress span {
    display: none;
  }

  .mobile-nav-item {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.64rem;
  }
}
