.app-frame { min-height: 100dvh; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto var(--player-height) 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  border-right: 1px solid var(--color-border-soft);
  background: rgb(5 8 6 / 96%);
}
.brand { display: flex; align-items: center; gap: 11px; height: 46px; padding: 0 9px; color: #fff; font-size: 16px; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #4af28c, #16b85a); color: #04120a; box-shadow: 0 8px 30px rgb(46 232 120 / 18%); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy small { margin-top: 4px; color: var(--color-subtle); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.main-nav { display: grid; gap: 3px; margin-top: 18px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--radius-small); color: #9aa59e; font-size: 13px; font-weight: 650; text-decoration: none; transition: background var(--transition-fast), color var(--transition-fast); }
.nav-link:hover { background: rgb(255 255 255 / 4%); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgb(46 232 120 / 13%), transparent); color: #fff; }
.nav-link.active svg { color: var(--color-primary); }
.sidebar-label { margin: 25px 12px 8px; color: var(--color-subtle); font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-library { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: var(--radius-small); color: var(--color-muted); text-decoration: none; }
.sidebar-library:hover { background: rgb(255 255 255 / 4%); color: #fff; }
.sidebar-library-cover { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 7px; background: linear-gradient(145deg, #34463b, #17201a); color: var(--color-primary); }
.sidebar-library strong, .sidebar-library small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-library strong { font-size: 11px; }
.sidebar-library small { margin-top: 2px; color: var(--color-subtle); font-size: 9px; }
.sidebar-footer { margin-top: auto; }
.account-summary { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; margin-top: 8px; padding: 12px 8px 2px; border-top: 1px solid var(--color-border-soft); }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #253129; color: var(--color-primary); font-size: 10px; font-weight: 900; }
.account-summary strong, .account-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary strong { font-size: 11px; }
.account-summary small { color: var(--color-muted); font-size: 9px; }
.workspace { min-height: 100dvh; margin-left: var(--sidebar-width); padding-bottom: calc(var(--player-height) + 36px); }
.topbar { position: relative; z-index: 20; height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 26px; border-bottom: 1px solid rgb(46 232 120 / 15%); background: #102819; color: var(--color-muted); font-size: 10px; }
.topbar strong, .topbar a { color: var(--color-primary); }
.topbar a { margin-left: auto; font-weight: 800; text-decoration: none; }
.page { width: min(100%, var(--content-max)); margin: 0 auto; padding: 28px 28px 50px; }
.page.narrow { max-width: 900px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 6px; color: var(--color-primary); font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.page-header h1 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.12; letter-spacing: -.04em; }
.page-header p { margin: 7px 0 0; color: var(--color-muted); font-size: 12px; }
.page-actions { display: flex; gap: 8px; }
.mobile-nav { display: none; }

.player-bar { position: fixed; z-index: 60; inset: auto 0 0; height: var(--player-height); display: grid; grid-template-columns: minmax(210px, 1fr) minmax(310px, 1.15fr) minmax(210px, 1fr); align-items: center; gap: 16px; padding: 0 17px; border-top: 1px solid var(--color-border); background: rgb(14 19 16 / 96%); box-shadow: 0 -16px 50px rgb(0 0 0 / 30%); backdrop-filter: blur(14px); }
.player-progress { position: absolute; inset: 0 0 auto; height: 3px; background: #252f29; cursor: pointer; }
.player-progress > i { display: block; width: 0; height: 100%; background: var(--color-primary); box-shadow: 0 0 10px rgb(46 232 120 / 45%); }
.now-playing { min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.mini-cover { width: 50px; height: 50px; flex: 0 0 50px; overflow: hidden; border-radius: 7px; background: linear-gradient(145deg, #3a5644, #18221b); }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.now-playing-copy { min-width: 0; }
.now-playing-copy strong, .now-playing-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing-copy strong { font-size: 12px; }
.now-playing-copy small { margin-top: 3px; color: var(--color-muted); font-size: 10px; }
.bar-transport { display: grid; justify-items: center; gap: 4px; }
.bar-buttons { display: flex; align-items: center; gap: 18px; }
.bar-buttons button { width: 31px; height: 31px; padding: 0; border: 0; background: transparent; color: var(--color-muted); cursor: pointer; }
.bar-buttons .bar-play { width: 40px; height: 40px; border-radius: 50%; background: var(--color-text); color: #08100b; }
.bar-time { color: var(--color-subtle); font-size: 9px; }
.bar-tools { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.bar-volume { width: 92px; accent-color: var(--color-primary); }
.online-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--color-muted); font-size: 9px; }
.online-dot::before { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); content: ""; }

@media (max-width: 980px) {
  :root { --sidebar-width: 74px; }
  .brand { justify-content: center; padding: 0; }
  .brand-copy, .nav-link span, .sidebar-label, .sidebar-library > div, .account-summary > div:not(.account-avatar), .account-summary > button { display: none; }
  .nav-link, .sidebar-library { justify-content: center; padding-inline: 0; }
  .account-summary { display: flex; justify-content: center; }
  .player-bar { grid-template-columns: minmax(180px,1fr) minmax(260px,1fr); }
  .bar-tools { display: none; }
}

@media (max-width: 700px) {
  :root { --player-height: 70px; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding-bottom: calc(var(--player-height) + var(--mobile-nav-height) + 22px); }
  .topbar { height: 32px; padding-inline: 15px; }
  .topbar span { display: none; }
  .page { padding: 22px 16px 36px; }
  .page-header { align-items: flex-start; margin-bottom: 20px; }
  .page-actions .button span:not([data-icon]) { display: none; }
  .player-bar { bottom: var(--mobile-nav-height); grid-template-columns: minmax(0,1fr) auto; padding-inline: 11px; }
  .mini-cover { width: 45px; height: 45px; flex-basis: 45px; }
  .bar-buttons > button:not(.bar-play), .bar-time { display: none; }
  .bar-play { width: 42px !important; height: 42px !important; }
  .mobile-nav { position: fixed; z-index: 70; inset: auto 0 0; height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--color-border); background: rgb(8 11 9 / 98%); }
  .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--color-subtle); font-size: 8px; font-weight: 700; text-decoration: none; }
  .mobile-nav a svg { font-size: 18px; }
  .mobile-nav a.active { color: var(--color-primary); }
  .toast-region { bottom: calc(var(--player-height) + var(--mobile-nav-height) + 12px); right: 16px; }
}
