:root {
  --bg: #07090b;
  --panel: rgba(12, 16, 19, .88);
  --panel-strong: #0d1114;
  --line: rgba(184, 207, 210, .13);
  --line-hot: rgba(255, 111, 61, .45);
  --text: #edf2ee;
  --muted: #7e8c8b;
  --muted-2: #4e5a5b;
  --ember: #ff6539;
  --ember-bright: #ff9b52;
  --cyan: #8ad5d5;
  --acid: #d6de78;
  --player-h: 102px;
  --sidebar-w: 248px;
  color-scheme: dark;
  font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.rain { position: fixed; inset: 0; z-index: 0; opacity: .11; pointer-events: none; background-image: repeating-linear-gradient(100deg, transparent 0 41px, rgba(175, 224, 222, .2) 42px, transparent 43px 93px); background-size: 140px 100%; transform: skewX(-8deg); animation: rain 14s linear infinite; }
.ambient { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .14; }
.ambient-a { width: 430px; height: 430px; background: var(--ember); left: 30%; top: 20%; }
.ambient-b { width: 360px; height: 360px; background: #277c88; right: -100px; bottom: 0; }
@keyframes rain { to { background-position: 140px 450px; } }

.app-shell { position: relative; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); padding-bottom: var(--player-h); }
.sidebar { position: fixed; inset: 0 auto var(--player-h) 0; width: var(--sidebar-w); z-index: 20; display: flex; flex-direction: column; padding: 28px 18px 18px; background: rgba(7, 9, 11, .86); border-right: 1px solid var(--line); backdrop-filter: blur(24px); }
.brand { display: flex; align-items: center; gap: 13px; color: var(--text); text-decoration: none; padding: 0 10px 30px; }
.brand-mark { width: 34px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--ember); transform: rotate(45deg); box-shadow: inset 0 0 14px rgba(255, 101, 57, .15), 0 0 22px rgba(255, 101, 57, .1); }
.brand-mark span { width: 12px; height: 12px; border: 1px solid var(--ember-bright); }
.brand strong { display: block; font: 700 20px/1 "Cascadia Mono", "SFMono-Regular", monospace; letter-spacing: .2em; }
.brand small { display: block; margin-top: 5px; font: 400 7px/1 "Cascadia Mono", "SFMono-Regular", monospace; letter-spacing: .13em; color: var(--muted); }

.main-nav, .playlist-nav { display: grid; gap: 4px; }
.nav-item, .playlist-nav button { position: relative; width: 100%; min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-left: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; transition: .2s ease; }
.nav-item span { flex: 1; font-size: 13px; }
.nav-item b { font: 400 10px Space Mono, monospace; color: var(--muted-2); }
.nav-item:hover, .playlist-nav button:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.nav-item.active { color: var(--ember-bright); border-left-color: var(--ember); background: linear-gradient(90deg, rgba(255, 101, 57, .1), transparent); }
.nav-item.active::after { content: ''; position: absolute; right: 0; width: 3px; height: 3px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.signal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.sidebar-label { display: flex; align-items: center; justify-content: space-between; margin: 28px 10px 9px; color: var(--muted-2); font: 400 9px Space Mono, monospace; letter-spacing: .18em; text-transform: uppercase; }
.playlist-nav { overflow: auto; }
.playlist-nav button { min-height: 37px; font-size: 12px; }
.playlist-nav button::before { content: '//'; font: 400 9px Space Mono, monospace; color: var(--muted-2); }
.playlist-nav button.active { color: var(--text); }
.icon-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); transition: .2s; }
.icon-btn:hover, .icon-btn.active { color: var(--ember-bright); }
.sidebar-label .icon-btn { width: 22px; height: 22px; }
.sidebar-label svg { width: 14px; }
.sync-card { margin-top: auto; display: grid; grid-template-columns: 31px 1fr 24px; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.sync-card strong, .sync-card small { display: block; }
.sync-card strong { font: 400 9px Space Mono, monospace; letter-spacing: .11em; }
.sync-card small { margin-top: 4px; font-size: 8px; color: var(--muted); }
.sync-card .icon-btn { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; font: 400 10px Space Mono, monospace; }
.sync-orbit { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.sync-orbit::before { content: ''; position: absolute; width: 18px; height: 18px; border: 1px dashed var(--muted-2); border-radius: 50%; animation: spin 10s linear infinite; }
.sync-orbit span { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 7px var(--acid); }
@keyframes spin { to { transform: rotate(360deg); } }

.main-content { grid-column: 2; min-width: 0; padding: 0 clamp(24px, 4vw, 64px) 64px; }
.topbar { height: 84px; display: grid; grid-template-columns: 1fr minmax(260px, 460px) 1fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 8px; font: 400 8px Space Mono, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.status em { font-style: normal; color: var(--muted-2); }
.status-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px var(--acid); animation: pulse 2s infinite; }
.status.offline .status-pulse { background: var(--ember); box-shadow: 0 0 8px var(--ember); animation: none; }
body.offline .sync-orbit { filter: grayscale(1); opacity: .5; }
@keyframes pulse { 50% { opacity: .35; } }
.search-box { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); transition: .2s; }
.search-box:focus-within { border-color: var(--ember); color: var(--ember-bright); }
.search-box svg { width: 16px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd { padding: 3px 5px; border: 1px solid var(--line); color: var(--muted-2); font: 400 8px Space Mono, monospace; }
.profile-btn { justify-self: end; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; }
.profile-avatar { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(255, 101, 57, .45); background: linear-gradient(135deg, rgba(255, 101, 57, .25), rgba(255, 101, 57, .02)); color: var(--ember-bright); font: 400 9px Space Mono, monospace; }
.profile-avatar.large { width: 60px; height: 60px; font-size: 15px; }
.profile-btn strong, .profile-btn small { display: block; }
.profile-btn strong { font-size: 10px; font-weight: 600; }
.profile-btn small { margin-top: 4px; color: var(--muted); font: 400 7px Space Mono, monospace; text-transform: uppercase; }
.profile-btn i { width: 5px; height: 5px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); }

.hero { position: relative; min-height: 326px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: auto 0 0; height: 34%; opacity: .45; background: linear-gradient(90deg, transparent 50%, var(--line) 50%) 0 0 / 42px 1px, linear-gradient(0deg, transparent 50%, var(--line) 50%) 0 0 / 1px 18px; mask-image: linear-gradient(transparent, black); transform: perspective(180px) rotateX(35deg); transform-origin: bottom; }
.hero-copy { position: relative; z-index: 2; padding: 48px 0 42px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 400 8px Space Mono, monospace; letter-spacing: .16em; }
.eyebrow i { width: 28px; height: 1px; background: var(--ember); }
.hero h1 { margin: 16px 0 14px; font-size: clamp(44px, 5.4vw, 76px); line-height: .85; font-weight: 500; letter-spacing: -.055em; text-transform: uppercase; }
.hero h1 em { color: transparent; -webkit-text-stroke: 1px rgba(255, 155, 82, .8); font-style: normal; font-weight: 400; }
.hero-copy > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.primary-btn, .secondary-btn, .danger-btn { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid var(--ember); background: var(--ember); color: #160c09; font: 700 9px Space Mono, monospace; letter-spacing: .08em; text-transform: uppercase; transition: .2s; }
.primary-btn:hover { background: var(--ember-bright); border-color: var(--ember-bright); box-shadow: 0 0 24px rgba(255, 101, 57, .17); }
.secondary-btn { border-color: var(--line); background: transparent; color: var(--muted); }
.secondary-btn:hover { border-color: var(--muted); color: var(--text); }
.danger-btn { border-color: rgba(255, 101, 57, .3); background: transparent; color: var(--ember); }
.danger-btn:disabled { opacity: .45; cursor: wait; }
.primary-btn svg, .secondary-btn svg, .danger-btn svg { width: 15px; }
.hero-visual { position: relative; height: 100%; min-height: 326px; overflow: hidden; }
.sun-disc { position: absolute; width: min(23vw, 280px); aspect-ratio: 1; right: 6%; top: 48%; transform: translateY(-50%); border-radius: 50%; background: repeating-linear-gradient(0deg, rgba(255, 108, 56, .07) 0 5px, transparent 5px 8px), radial-gradient(circle at 40% 40%, #ffad61, #ef4a26 58%, rgba(159, 27, 7, .3)); box-shadow: 0 0 70px rgba(255, 75, 30, .27); opacity: .84; }
#signalCanvas { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 7px rgba(255, 129, 67, .5)); }
.tower { position: absolute; bottom: 0; width: 28px; border: 1px solid rgba(15, 11, 10, .8); background: #0a0b0d; box-shadow: 0 0 20px rgba(0, 0, 0, .6); }
.tower::before { content: ''; position: absolute; left: 5px; right: 5px; top: 8px; bottom: 0; background: repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 115, 53, .4) 11px 12px); }
.tower-a { height: 86px; right: 5%; }.tower-b { height: 54px; right: 17%; width: 45px; }.tower-c { height: 105px; right: 27%; width: 20px; }
.hero-readout { position: absolute; right: 1%; top: 19%; padding-left: 10px; border-left: 1px solid var(--ember); font-family: Space Mono, monospace; }
.hero-readout span, .hero-readout small { display: block; font-size: 7px; color: var(--muted); letter-spacing: .15em; }
.hero-readout strong { display: block; margin: 3px 0; color: var(--ember-bright); font-size: 19px; font-weight: 400; }

.library-section { padding-top: 34px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head > div:first-child { display: grid; grid-template-columns: 26px auto; align-items: end; column-gap: 8px; }
.section-index { grid-row: 1 / 3; align-self: start; margin-top: 4px; color: var(--ember); font: 400 8px Space Mono, monospace; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.section-head small { margin-top: 5px; color: var(--muted); font: 400 8px Space Mono, monospace; text-transform: uppercase; }
.section-tools { display: flex; align-items: center; gap: 20px; }
.text-btn { border: 0; background: none; color: var(--muted); font: 400 9px Space Mono, monospace; }
.text-btn:hover { color: var(--text); }
.text-btn.danger { color: var(--ember); }
.view-switch { display: flex; border: 1px solid var(--line); }
.view-switch button { width: 32px; height: 29px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted-2); }
.view-switch button.active { background: rgba(255, 101, 57, .1); color: var(--ember-bright); }
.view-switch svg { width: 14px; }

.empty-state { min-height: 325px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .01), transparent); }
.empty-state .eyebrow { margin-top: 18px; color: var(--ember); }
.empty-state h3 { margin: 10px 0; font-size: 30px; line-height: 1.05; font-weight: 500; text-transform: uppercase; }
.empty-state p { max-width: 390px; margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-state > small { margin-top: 12px; color: var(--muted-2); font: 400 8px Space Mono, monospace; letter-spacing: .1em; }
.empty-glyph { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--line-hot); transform: rotate(45deg); }
.empty-glyph::before, .empty-glyph::after, .empty-glyph i, .empty-glyph span { content: ''; position: absolute; background: var(--ember); }
.empty-glyph::before { width: 23px; height: 1px; }.empty-glyph::after { width: 1px; height: 23px; }.empty-glyph i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 12px var(--ember); }.empty-glyph span { width: 1px; height: 76px; opacity: .2; }
.drop-zone { position: fixed; z-index: 100; inset: 18px; display: grid; place-items: center; background: rgba(7, 9, 11, .86); border: 1px solid var(--ember); backdrop-filter: blur(20px); }
.drop-target { display: flex; flex-direction: column; align-items: center; gap: 9px; font-family: Space Mono, monospace; text-transform: uppercase; }
.drop-target svg { width: 42px; height: 42px; color: var(--ember); }
.drop-target strong { font-size: 14px; letter-spacing: .1em; }.drop-target span { color: var(--muted); font-size: 8px; }

.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 22px 14px; }
.track-card { min-width: 0; }
.card-cover { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); background: #111; }
.card-cover::after { content: ''; position: absolute; inset: 0; border: 1px solid transparent; transition: .2s; }
.track-card:hover .card-cover::after { border-color: rgba(255, 101, 57, .5); }
.card-cover img, .mini-cover img, .edit-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-play { position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%, -42%); width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(7, 9, 11, .64); color: white; opacity: 0; transition: .2s; backdrop-filter: blur(8px); }
.cover-play svg { width: 16px; margin-left: 2px; }
.track-card:hover .cover-play, .track-card.playing .cover-play { opacity: 1; transform: translate(-50%, -50%); }
.track-card.playing .cover-play { border-color: var(--ember); color: var(--ember); }
.scope-tag { position: absolute; z-index: 2; left: 8px; top: 8px; padding: 4px 6px; background: rgba(7, 9, 11, .72); color: var(--cyan); font: 400 7px Space Mono, monospace; letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(5px); }
.uniform-record { background: linear-gradient(145deg, #0b1013, #11191b); }
.uniform-record::before { content: ''; position: absolute; inset: 13%; border: 1px solid rgba(111, 216, 226, .22); background: repeating-linear-gradient(90deg, transparent 0 15px, rgba(111, 216, 226, .045) 16px 17px); }
.uniform-record i { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; border: 1px solid rgba(255, 121, 64, .58); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 28px rgba(255, 93, 39, .12); }
.record-number { position: absolute; right: 10px; bottom: 8px; z-index: 2; color: rgba(255,255,255,.24); font: 400 18px Space Mono, monospace; }
.card-menu { position: absolute; z-index: 3; top: 5px; right: 5px; background: rgba(7, 9, 11, .55); opacity: 0; }
.track-card:hover .card-menu { opacity: 1; }
.card-info { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding-top: 10px; }
.card-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.card-info > span { color: var(--muted-2); font: 400 8px Space Mono, monospace; }
.card-info small { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.generated-cover { position: relative; overflow: hidden; background: linear-gradient(145deg, #101c1e, #1c0d0a); }
.generated-cover::before { content: ''; position: absolute; width: 64%; aspect-ratio: 1; left: 18%; top: 18%; border: 1px solid rgba(255, 121, 64, .58); transform: rotate(45deg); box-shadow: 0 0 30px rgba(255, 83, 35, .12), inset 0 0 35px rgba(255, 83, 35, .08); }
.generated-cover::after { content: ''; position: absolute; inset: 8%; background: repeating-linear-gradient(90deg, transparent 0 11px, rgba(138, 213, 213, .08) 12px 13px), repeating-linear-gradient(0deg, transparent 0 11px, rgba(138, 213, 213, .06) 12px 13px); }
.generated-cover i { position: absolute; z-index: 1; width: 18%; aspect-ratio: 1; left: 41%; top: 41%; border-radius: 50%; background: var(--ember); box-shadow: 0 0 18px var(--ember); }
.generated-cover[data-seed="1"] { background: linear-gradient(145deg, #171128, #08191e); }.generated-cover[data-seed="1"]::before { border-color: rgba(110, 213, 226, .6); }.generated-cover[data-seed="1"] i { background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.generated-cover[data-seed="2"] { background: linear-gradient(145deg, #23170a, #11160e); }.generated-cover[data-seed="2"]::before { border-color: rgba(214, 222, 120, .6); border-radius: 50%; }.generated-cover[data-seed="2"] i { background: var(--acid); box-shadow: 0 0 18px var(--acid); }
.generated-cover[data-seed="3"] { background: linear-gradient(145deg, #211016, #0d131d); }.generated-cover[data-seed="3"]::before { transform: rotate(25deg); border-radius: 50% 0; }

.track-grid.list-layout { display: block; }
.list-layout .track-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 13px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.list-layout .card-cover { width: 52px; }.list-layout .card-info { display: grid; grid-template-columns: 1fr 80px; padding: 0; }.list-layout .card-info small { grid-column: auto; }.list-layout .card-menu { position: static; opacity: 1; background: transparent; }.list-layout .scope-tag { display: none; }.list-layout .cover-play { width: 30px; height: 30px; opacity: .8; }
.search-empty { grid-column: 1 / -1; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line); text-align: center; }.search-empty span { color: var(--ember); font: 400 8px "Cascadia Mono", monospace; letter-spacing: .15em; }.search-empty strong { margin-top: 10px; font-size: 22px; font-weight: 500; text-transform: uppercase; }.search-empty small { margin-top: 7px; color: var(--muted); }

.player-bar { position: fixed; z-index: 60; inset: auto 0 0; height: var(--player-h); display: grid; grid-template-columns: minmax(245px, .9fr) minmax(340px, 1.25fr) minmax(200px, .8fr); align-items: center; gap: 25px; padding: 0 28px; border-top: 1px solid rgba(255, 101, 57, .18); background: rgba(8, 10, 12, .93); backdrop-filter: blur(25px); }
.player-bar::before { content: ''; position: absolute; top: -1px; left: 0; width: 14%; height: 1px; background: var(--ember); box-shadow: 0 0 11px var(--ember); }
.now-playing { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.mini-cover { flex: 0 0 54px; width: 54px; height: 54px; border: 1px solid var(--line); }
.track-meta { min-width: 0; }
.track-meta strong, .track-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-meta strong { font-size: 12px; }.track-meta small { margin-top: 6px; color: var(--muted); font-size: 9px; }
.player-like { display: none; }
.player-center { min-width: 0; }
.transport { display: flex; align-items: center; justify-content: center; gap: 10px; }
.play-btn { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ember); border-radius: 50%; background: rgba(255, 101, 57, .08); color: var(--ember-bright); }
.play-btn svg { width: 15px; margin-left: 2px; }
.progress-row { display: grid; grid-template-columns: 35px 1fr 35px; align-items: center; gap: 8px; margin-top: 7px; }
.progress-row time { color: var(--muted-2); font: 400 8px Space Mono, monospace; }
.progress-row time:last-child { text-align: right; }
input[type="range"] { appearance: none; height: 2px; margin: 0; background: linear-gradient(90deg, var(--ember) var(--range, 0%), var(--line) var(--range, 0%)); outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--ember-bright); box-shadow: 0 0 8px var(--ember); }
.player-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.player-actions input { width: min(8vw, 96px); --range: 82%; }
#queueBtn b { position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; display: grid; place-items: center; border-radius: 8px; background: var(--ember); color: #160c09; font: 700 7px Space Mono, monospace; }
#repeatBtn sup { position: absolute; top: 2px; right: 1px; color: var(--ember); font: 700 7px Space Mono, monospace; }
.mobile-nav { display: none; }

.queue-panel { position: fixed; z-index: 55; top: 0; right: 0; bottom: var(--player-h); width: min(390px, 95vw); padding: 26px 22px; border-left: 1px solid var(--line); background: rgba(9, 12, 14, .97); transform: translateX(103%); transition: transform .3s ease; backdrop-filter: blur(25px); }
.queue-panel.open { transform: translateX(0); }
.panel-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-head span, .modal-head span { color: var(--ember); font: 400 7px Space Mono, monospace; letter-spacing: .15em; }
.panel-head h2, .modal-head h2 { margin: 5px 0 0; font-size: 21px; font-weight: 500; }
.queue-list { margin: 24px 0; max-height: calc(100% - 110px); overflow: auto; }
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.queue-play { min-width: 0; display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 4px; border: 0; background: transparent; color: var(--text); text-align: left; }
.queue-play > span:first-child { color: var(--muted-2); font: 400 8px Space Mono, monospace; }
.queue-item strong, .queue-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.queue-item strong { font-size: 10px; }.queue-item small { margin-top: 4px; color: var(--muted); font-size: 8px; }.queue-item.playing strong { color: var(--ember-bright); }
.queue-actions { display: flex; gap: 2px; }
.queue-actions button { width: 25px; height: 25px; padding: 0; border: 1px solid transparent; background: transparent; color: var(--muted-2); font: 400 12px Space Mono, monospace; }
.queue-actions button:hover:not(:disabled) { border-color: var(--line); color: var(--ember-bright); }
.queue-actions button:disabled { opacity: .2; cursor: default; }
.queue-empty { padding: 44px 15px; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; text-align: center; }.queue-empty small { display: block; margin-top: 7px; color: var(--muted-2); }

.modal-backdrop { position: fixed; z-index: 89; inset: 0; background: rgba(0, 0, 0, .68); backdrop-filter: blur(7px); }
.modal { z-index: 90; width: min(680px, calc(100vw - 28px)); padding: 24px; border: 1px solid var(--line-hot); background: #0c1012; color: var(--text); box-shadow: 0 35px 100px rgba(0, 0, 0, .65); }
.modal::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
.modal[open] { animation: modalIn .22s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.99); } }
.edit-layout { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
.cover-editor { cursor: pointer; }
.edit-cover { display: block; width: 178px; aspect-ratio: 1; border: 1px solid var(--line); }
.cover-editor b { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; color: var(--muted); font: 400 8px Space Mono, monospace; text-transform: uppercase; }.cover-editor svg { width: 13px; }
.form-grid { display: grid; gap: 13px; }
.modal label > span { display: block; margin-bottom: 6px; color: var(--muted); font: 400 8px Space Mono, monospace; text-transform: uppercase; }
.modal input, .modal select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 0; outline: 0; background: rgba(255, 255, 255, .025); color: var(--text); font-size: 11px; }
.modal input:focus, .modal select:focus { border-color: var(--ember); }
.modal-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.info-modal, .compact-modal { width: min(470px, calc(100vw - 28px)); }
.info-modal p { color: var(--muted); font-size: 11px; line-height: 1.7; }.info-modal > .primary-btn { width: 100%; margin-top: 10px; }
.info-graphic { display: flex; align-items: center; margin: 28px 0; }.info-graphic .node { width: 35px; height: 35px; border: 1px solid var(--muted-2); border-radius: 50%; }.info-graphic .node.active { border-color: var(--ember); background: radial-gradient(circle, var(--ember) 0 2px, transparent 3px); box-shadow: 0 0 20px rgba(255, 101, 57, .18); }.info-graphic i { flex: 1; border-top: 1px dashed var(--muted-2); }
.compact-modal form > label { display: block; margin-top: 24px; }
.playlist-picker-section { margin-top: 20px; }
.playlist-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font: 400 8px Space Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
.playlist-picker-head small { color: var(--ember-bright); font: inherit; letter-spacing: 0; }
.playlist-track-picker { max-height: min(310px, 38vh); overflow: auto; border: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.playlist-track-option { display: grid !important; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; margin: 0 !important; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; transition: .18s ease; }
.playlist-track-option:last-child { border-bottom: 0; }
.playlist-track-option:hover { background: rgba(255, 255, 255, .03); }
.playlist-track-option:has(input:checked) { background: linear-gradient(90deg, rgba(255, 101, 57, .1), transparent); }
.modal .playlist-track-option input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--ember); }
.modal .playlist-track-copy { min-width: 0; margin: 0; }
.playlist-track-copy strong, .playlist-track-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-track-copy strong { color: var(--text); font-size: 10px; font-weight: 500; }
.playlist-track-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.playlist-scope { color: var(--muted-2); font: 400 7px Space Mono, monospace; }
.playlist-scope.shared { color: var(--cyan); }
.playlist-picker-empty { padding: 24px 14px; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.profile-card { display: flex; align-items: center; gap: 15px; margin: 25px 0; padding: 15px; border: 1px solid var(--line); }.profile-card strong, .profile-card small { display: block; }.profile-card strong { font-size: 13px; }.profile-card small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.auth-panel { margin-top: 14px; }.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }.auth-tabs button { padding: 11px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font: 400 9px Space Mono, monospace; text-transform: uppercase; }.auth-tabs button.active { border-color: var(--ember); color: var(--ember-bright); }.auth-form { display: grid; gap: 12px; padding-top: 15px; }.auth-form label { margin: 0 !important; }.auth-hint, .legacy-claim { color: var(--muted); font-size: 9px; line-height: 1.6; }.auth-hint { margin: 0; padding: 10px; border-left: 2px solid var(--ember); background: rgba(255,101,57,.06); }.legacy-claim { margin: 14px 0 0; text-align: center; }.legacy-claim a { color: var(--ember-bright); }
.profile-security-label { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ember); font: 400 8px Space Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }.profile-security-label small { display: block; margin-top: 5px; color: var(--muted-2); font: 400 8px Manrope, sans-serif; letter-spacing: 0; line-height: 1.5; text-transform: none; }
.profile-view { padding: 48px 0 70px; }
.profile-view-head { max-width: 760px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.profile-view-head h1 { margin: 18px 0 16px; font-size: clamp(44px, 6vw, 76px); line-height: .86; font-weight: 500; letter-spacing: -.055em; text-transform: uppercase; }
.profile-view-head h1 em { color: transparent; -webkit-text-stroke: 1px rgba(255, 155, 82, .8); font-style: normal; font-weight: 400; }
.profile-view-head p { max-width: 580px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.profile-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 680px); gap: clamp(24px, 4vw, 58px); padding-top: 34px; }
.profile-identity-card { align-self: start; padding: 22px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,101,57,.06), rgba(138,213,213,.025)); }
.profile-identity-card > div { margin-top: 16px; }
.profile-identity-card strong, .profile-identity-card small { display: block; }
.profile-identity-card strong { font-size: 16px; }
.profile-identity-card small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.account-readout { display: grid; gap: 11px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.account-readout div { display: grid; grid-template-columns: 86px 1fr; gap: 8px; }
.account-readout dt { color: var(--muted-2); font: 400 8px Space Mono, monospace; text-transform: uppercase; }
.account-readout dd { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-console { min-width: 0; }
.profile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.profile-tabs button { min-height: 44px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font: 400 9px Space Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
.profile-tabs button.active { border-color: var(--ember); color: var(--ember-bright); background: linear-gradient(0deg, rgba(255,101,57,.07), transparent); }
.profile-console > section { padding-top: 22px; }
.profile-console input:not([type="checkbox"]):not([type="range"]), .profile-console select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; outline: 0; background: rgba(255,255,255,.025); color: var(--text); }
.profile-console input:focus, .profile-console select:focus { border-color: var(--ember); }
.profile-console label > span { display: block; margin-bottom: 7px; color: var(--muted); font: 400 8px Space Mono, monospace; letter-spacing: .06em; text-transform: uppercase; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.settings-form > label:first-child { grid-column: 1 / -1; }
.settings-form input[type="range"] { width: 100%; margin-top: 12px; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 62px; padding: 12px; border: 1px solid var(--line); }
.setting-toggle > span { margin: 0 !important; text-transform: none !important; }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle strong { color: var(--text); font-size: 10px; }
.setting-toggle small { margin-top: 5px; color: var(--muted-2); font: 400 8px Manrope, sans-serif; letter-spacing: 0; }
.setting-toggle input { width: 17px; height: 17px; accent-color: var(--ember); }
.settings-note { margin: 18px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.6; }
.security-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.security-heading span { color: var(--ember); font: 400 7px Space Mono, monospace; letter-spacing: .15em; }
.security-heading h2 { margin: 5px 0 0; font-size: 18px; font-weight: 500; }
.security-heading .secondary-btn { flex: 0 0 auto; }
.session-list { border: 1px solid var(--line); }
.session-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 70px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.session-item:last-child { border-bottom: 0; }
.session-item strong, .session-item small { display: block; }
.session-item strong { font-size: 10px; }
.session-item strong em { margin-left: 7px; color: var(--acid); font: 400 7px Space Mono, monospace; font-style: normal; }
.session-item small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.session-item button { min-height: 32px; padding: 0 10px; }
.session-empty, .security-empty { padding: 30px 16px; border: 1px dashed var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.wide { width: 100%; margin-top: 8px; }
.toast-region { position: fixed; z-index: 120; right: 18px; bottom: calc(var(--player-h) + 18px); display: grid; gap: 8px; }
.toast { min-width: 240px; padding: 12px 14px; border-left: 2px solid var(--ember); background: #14191b; box-shadow: 0 10px 35px rgba(0,0,0,.4); font-size: 10px; animation: toastIn .25s ease; }.toast small { display: block; margin-top: 3px; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateX(10px); } }

@media (max-width: 1000px) {
  :root { --sidebar-w: 205px; }
  .topbar { grid-template-columns: 1fr minmax(230px, 380px); }.profile-btn { display: none; }
  .hero { grid-template-columns: 1.1fr .9fr; }.player-bar { grid-template-columns: minmax(190px, .8fr) minmax(330px, 1.3fr) minmax(130px, .6fr); padding: 0 18px; gap: 15px; }
}

@media (max-width: 760px) {
  :root { --player-h: 70px; }
  .app-shell { display: block; padding: 0 0 142px; }.sidebar { display: none; }.main-content { padding: 0 17px 34px; }
  .topbar { height: 62px; grid-template-columns: auto 1fr; }.status span:not(.status-pulse), .status em { display: none; }.search-box { justify-self: stretch; }.search-box kbd { display: none; }
  .hero { min-height: 296px; grid-template-columns: 1fr; margin: 0 -17px; padding: 0 17px; }.hero-copy { padding: 45px 0 38px; }.hero-copy > p { max-width: 80%; }.hero-visual { position: absolute; z-index: 0; inset: 0; min-height: auto; opacity: .58; }.hero-copy { z-index: 2; }.sun-disc { width: 220px; right: -58px; }.hero-readout { display: none; }
  .hero-actions #deletePlaylistBtn:not([hidden]), .hero-actions #shareLibraryBtn:not([hidden]), .hero-actions #editPlaylistBtn:not([hidden]) { display: inline-flex; }
  .hero h1 { font-size: clamp(44px, 14vw, 64px); }.hero-actions .secondary-btn { display: none; }
  .library-section { padding-top: 25px; }.section-tools .text-btn { display: none; }.section-head { align-items: center; }.section-head h2 { font-size: 17px; }
  .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 10px; }.card-menu { opacity: 1; }.card-info strong { font-size: 11px; }
  .empty-state { min-height: 310px; padding: 25px 18px; }.empty-state h3 { font-size: 25px; }
  .player-bar { inset: auto 0 72px; height: var(--player-h); grid-template-columns: 1fr auto auto; gap: 2px; padding: 0 11px; }.now-playing { min-width: 0; }.mini-cover { flex-basis: 45px; width: 45px; height: 45px; }.track-meta strong { font-size: 10px; }.track-meta small { font-size: 8px; margin-top: 4px; }.player-like { display: grid; }.player-center { display: contents; }.transport .icon-btn { display: none; }.transport #playBtn { width: 38px; height: 38px; }.progress-row { position: absolute; left: 0; right: 0; top: -2px; display: block; margin: 0; }.progress-row input { width: 100%; display: block; }.progress-row time { display: none; }.player-actions { display: none; }
  .mobile-nav { position: fixed; z-index: 65; inset: auto 0 0; height: 72px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(7,9,11,.97); }.mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; color: var(--muted-2); font-size: 7px; }.mobile-nav svg { width: 18px; }.mobile-nav button.active { color: var(--ember-bright); }.mobile-nav .mobile-add { color: var(--ember); }.mobile-add svg { width: 28px; height: 28px; padding: 5px; border: 1px solid var(--ember); transform: rotate(45deg); }
  .queue-panel { bottom: 142px; width: 100%; }.modal { padding: 19px; }.edit-layout { grid-template-columns: 1fr; }.cover-editor { width: 150px; margin: auto; }.edit-cover { width: 150px; }.modal-actions { grid-template-columns: 1fr 1fr; }.modal-actions > span { display: none; }.modal-actions .danger-btn { grid-column: 1 / -1; order: 3; }.toast-region { bottom: 154px; left: 14px; right: 14px; }.toast { min-width: 0; }
  .profile-view { padding: 34px 0 20px; }.profile-view-head h1 { font-size: 44px; }.profile-layout { grid-template-columns: 1fr; gap: 18px; padding-top: 24px; }.profile-identity-card { display: grid; grid-template-columns: 62px 1fr; gap: 0 14px; }.profile-identity-card > div { margin-top: 6px; }.account-readout { grid-column: 1 / -1; }.profile-tabs button { font-size: 8px; }.settings-form { grid-template-columns: 1fr; }.settings-form > label:first-child { grid-column: auto; }.security-heading { align-items: flex-start; }.security-heading .secondary-btn { min-height: 34px; padding: 0 10px; font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
