:root {
    --bg: #090a0d;
    --bg-soft: #0d0e12;
    --panel: #121319;
    --panel-2: #171820;
    --line: #292b35;
    --line-soft: #1e2028;
    --text: #f4f3f8;
    --muted: #9193a0;
    --purple: #866bff;
    --purple-bright: #a38fff;
    --purple-dark: #493ba1;
    --acid: #b8ff65;
    --red: #ff6f78;
    --radius: 20px;
    --sidebar: 244px;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--purple); color: white; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2b35; border: 2px solid var(--bg); border-radius: 10px; }

.noise {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 850; letter-spacing: .16em; }
.brand > span:last-child > span { color: var(--purple-bright); }
.brand-mark { position: relative; display: inline-flex; width: 33px; height: 33px; align-items: center; justify-content: center; border: 1px solid #444050; border-radius: 50%; background: linear-gradient(145deg, #1d1a2a, #0a0b0e); box-shadow: inset 0 0 0 3px #0d0e12; }
.brand-mark i { position: absolute; display: block; width: 3px; border-radius: 3px; background: var(--purple-bright); transform: rotate(-17deg); }
.brand-mark i:nth-child(1) { height: 8px; transform: translate(-6px, 3px) rotate(-17deg); }
.brand-mark i:nth-child(2) { height: 16px; transform: rotate(-17deg); }
.brand-mark i:nth-child(3) { height: 11px; transform: translate(6px, -2px) rotate(-17deg); }

.kicker { margin: 0; color: var(--purple-bright); font: 750 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; }
.connect-page { position: relative; display: flex; min-height: 100vh; flex-direction: column; isolation: isolate; background: radial-gradient(circle at 72% 44%, rgba(112, 82, 255, .17), transparent 28%), radial-gradient(circle at 18% 95%, rgba(134, 107, 255, .09), transparent 32%), var(--bg); }
.connect-page::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to right, black, transparent 78%); }
.public-header { display: flex; width: min(1400px, calc(100% - 64px)); margin: 0 auto; padding: 28px 0; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.privacy-chip { display: inline-flex; align-items: center; gap: 9px; color: #b2b2bc; font: 650 10px/1 ui-monospace, monospace; letter-spacing: .08em; }
.privacy-chip > span { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px rgba(184,255,101,.75); }
.connect-main { display: grid; width: min(1260px, calc(100% - 64px)); flex: 1; margin: auto; padding: 72px 0 64px; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 92px; }
.hero-copy h1, .section-heading h1, .page-title h1 { margin: 18px 0 22px; font-size: clamp(58px, 6.1vw, 96px); line-height: .91; letter-spacing: -.072em; font-weight: 750; }
.hero-copy h1 em, .section-heading h1 em, .page-title h1 em { color: var(--purple-bright); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; }
.hero-lede { max-width: 580px; margin: 0; color: #a8a8b3; font-size: 17px; line-height: 1.65; }
.signal-flow { display: grid; margin-top: 58px; grid-template-columns: 110px 1fr 110px 1fr 110px; align-items: center; }
.signal-flow > div { display: flex; min-width: 0; flex-direction: column; align-items: center; text-align: center; }
.signal-flow strong { margin-top: 12px; font-size: 12px; }
.signal-flow small { margin-top: 5px; color: #6f707c; font: 9px ui-monospace, monospace; letter-spacing: .06em; }
.signal-flow .flow-active strong { color: var(--purple-bright); }
.flow-icon, .mini-brand, .ipod-icon { display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid var(--line); background: #111217; }
.cloud-icon { border-radius: 50%; }
.cloud-icon::before { content: ""; width: 23px; height: 12px; border: 1.5px solid #bbb9c6; border-radius: 9px; box-shadow: 6px -6px 0 -2px #111217, 6px -6px 0 -1px #bbb9c6; }
.mini-brand { border-color: var(--purple); border-radius: 50%; background: var(--purple); color: white; font: 800 18px Georgia, serif; box-shadow: 0 0 32px rgba(134,107,255,.35); }
.ipod-icon { position: relative; border-radius: 10px; }
.ipod-icon::before { content: ""; position: absolute; top: 6px; width: 25px; height: 13px; border-radius: 2px; background: #373741; }
.ipod-icon i { position: absolute; bottom: 5px; width: 17px; height: 17px; border: 4px solid #92929d; border-radius: 50%; }
.flow-line { position: relative; height: 1px; overflow: hidden; background: #2d2c35; }
.flow-line i { position: absolute; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, var(--purple), transparent); animation: signal 2.4s linear infinite; }
.flow-line:nth-of-type(2) i { animation-delay: 1.2s; }
@keyframes signal { from { left: -30%; } to { left: 100%; } }

.connect-card-wrap { position: relative; }
.orbit { position: absolute; z-index: -1; border: 1px solid rgba(134,107,255,.2); border-radius: 50%; animation: slow-spin 20s linear infinite; }
.orbit::after { content: ""; position: absolute; top: 50%; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 15px var(--purple); }
.orbit-one { inset: -55px -75px; }
.orbit-two { inset: -115px -145px; opacity: .48; animation-direction: reverse; animation-duration: 30s; }
@keyframes slow-spin { to { transform: rotate(360deg); } }
.connect-card { position: relative; padding: 36px; overflow: hidden; border: 1px solid #33343e; border-radius: 3px 28px 3px 28px; background: linear-gradient(145deg, rgba(24,25,32,.98), rgba(13,14,18,.98)); box-shadow: 0 35px 100px rgba(0,0,0,.5); }
.connect-card::after { content: ""; position: absolute; right: -80px; bottom: -100px; width: 220px; height: 220px; border-radius: 50%; background: rgba(134,107,255,.11); filter: blur(35px); pointer-events: none; }
.card-topline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; color: #777987; font: 700 9px ui-monospace, monospace; letter-spacing: .18em; }
.card-topline i { height: 1px; background: var(--line); }
.connect-card h2 { margin: 30px 0 8px; font-size: 27px; letter-spacing: -.035em; }
.connect-card > p { margin: 0 0 31px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.connect-card label { display: block; margin: 0 0 8px; color: #c5c4cd; font: 700 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.field { display: flex; height: 52px; align-items: center; border: 1px solid #30313a; border-radius: 7px; background: #0c0d11; transition: border-color .2s, box-shadow .2s; }
.field:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(134,107,255,.1); }
.field input { min-width: 0; width: 100%; height: 100%; padding: 0 15px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.field input::placeholder { color: #555762; }
.with-prefix > span { padding-left: 16px; color: var(--purple-bright); }
.with-prefix input { padding-left: 10px; }
.server-examples { display: flex; margin-top: 9px; flex-wrap: wrap; gap: 5px 11px; color: #62636e; font: 650 7px/1.45 ui-monospace, monospace; }
.server-examples strong { color: var(--purple-bright); letter-spacing: .08em; }
.server-examples span { white-space: nowrap; }
.field-pair { display: grid; margin-top: 20px; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-field button { height: 30px; margin-right: 8px; padding: 0 8px; border: 0; background: transparent; color: #777987; cursor: pointer; font: 700 8px ui-monospace, monospace; }
.primary-button, .secondary-button { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; cursor: pointer; transition: transform .18s, filter .18s, opacity .18s; }
.primary-button { min-height: 57px; padding: 0 8px 0 21px; background: var(--purple); color: white; font-weight: 750; }
.primary-button:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-2px); }
.primary-button:disabled { cursor: not-allowed; opacity: .35; }
.connect-button { margin-top: 26px; border-radius: 7px; }
.button-arrow { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 5px; background: rgba(0,0,0,.18); font-size: 18px; }
.form-status { min-height: 18px; margin-top: 11px; color: var(--red); font-size: 11px; line-height: 1.5; }
.form-status.success { color: var(--acid); }
.connect-button.loading span:first-child::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: slow-spin .7s linear infinite; }
.trust-row { display: flex; margin-top: 19px; align-items: center; justify-content: center; gap: 8px; color: #62636e; font: 650 7px ui-monospace, monospace; letter-spacing: .08em; }
.trust-row i { width: 3px; height: 3px; border-radius: 50%; background: #494a54; }
.public-footer { display: flex; width: min(1400px, calc(100% - 64px)); margin: 0 auto; padding: 18px 0; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); color: #52535d; font: 700 8px ui-monospace, monospace; letter-spacing: .12em; }

/* App shell */
.app-shell { min-height: 100vh; background: radial-gradient(circle at 82% 12%, rgba(92,66,210,.09), transparent 24%), var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: var(--sidebar); padding: 28px 20px 22px; flex-direction: column; border-right: 1px solid var(--line-soft); background: #0b0c10; }
.sidebar-brand { padding: 0 10px 28px; border-bottom: 1px solid var(--line-soft); }
.main-nav { display: flex; margin-top: 25px; flex-direction: column; gap: 6px; }
.nav-item { display: grid; min-height: 46px; padding: 0 12px; grid-template-columns: 24px 1fr auto; align-items: center; gap: 9px; border: 0; border-radius: 7px; background: transparent; color: #858692; text-align: left; cursor: pointer; font-size: 12px; transition: color .2s, background .2s; }
.nav-item:hover { color: var(--text); background: #111218; }
.nav-item.active { background: linear-gradient(90deg, rgba(134,107,255,.18), rgba(134,107,255,.05)); color: white; }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 2px; height: 25px; background: var(--purple-bright); box-shadow: 0 0 12px var(--purple); }
.nav-item small { color: #4d4e58; font: 8px ui-monospace, monospace; }
.nav-glyph { position: relative; display: block; width: 16px; height: 16px; opacity: .9; }
.grid-glyph { border: 1px solid currentColor; box-shadow: inset 7px 0 transparent; }
.grid-glyph::before, .grid-glyph::after { content: ""; position: absolute; background: currentColor; }
.grid-glyph::before { inset: 7px 0 auto; height: 1px; }
.grid-glyph::after { inset: 0 auto 0 7px; width: 1px; }
.sync-glyph { border: 1px solid currentColor; border-radius: 50%; border-left-color: transparent; }
.sync-glyph::after { content: ""; position: absolute; top: -2px; left: 0; border: 3px solid transparent; border-right-color: currentColor; transform: rotate(24deg); }
.device-glyph { border: 1px solid currentColor; border-radius: 3px; }
.device-glyph::before { content: ""; position: absolute; inset: 3px 3px 7px; background: currentColor; opacity: .5; }
.device-glyph::after { content: ""; position: absolute; bottom: 1px; left: 6px; width: 3px; height: 3px; border: 1px solid currentColor; border-radius: 50%; }
.settings-glyph { border: 1px dashed currentColor; border-radius: 50%; }
.settings-glyph::after { content: ""; position: absolute; inset: 4px; border: 1px solid currentColor; border-radius: 50%; }
.sidebar-device { display: flex; margin-top: auto; padding: 14px 10px; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 7px; }
.device-dot { width: 8px; height: 8px; border: 2px solid #575863; border-radius: 50%; }
.sidebar-device.mapped .device-dot { border: 0; background: var(--acid); box-shadow: 0 0 10px rgba(184,255,101,.55); }
.sidebar-device div:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sidebar-device small, .sidebar-server small { color: #5f606b; font: 650 7px ui-monospace, monospace; letter-spacing: .1em; }
.sidebar-device strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-server { display: flex; margin-top: 13px; padding: 14px 10px 3px; flex-direction: column; gap: 5px; }
.sidebar-server strong { font-size: 11px; }
.sidebar-server > span { overflow: hidden; color: #656773; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.workspace-header { position: sticky; top: 0; z-index: 9; display: flex; height: 76px; padding: 0 42px; align-items: center; border-bottom: 1px solid var(--line-soft); background: rgba(9,10,13,.82); backdrop-filter: blur(20px); }
.mobile-brand { display: none; }
.search-wrap { display: flex; width: min(490px, 52vw); height: 41px; padding: 0 12px; align-items: center; border: 1px solid #22242c; border-radius: 6px; background: #0e0f14; }
.search-icon { width: 13px; height: 13px; border: 1.5px solid #666873; border-radius: 50%; }
.search-icon::after { content: ""; display: block; width: 5px; height: 1px; margin: 10px 0 0 9px; background: #666873; transform: rotate(45deg); }
.search-wrap input { min-width: 0; flex: 1; height: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-wrap kbd { padding: 4px 6px; border: 1px solid #292a32; border-radius: 3px; color: #60616c; background: #15161c; font: 8px ui-monospace, monospace; }
.header-actions { display: flex; margin-left: auto; align-items: center; gap: 24px; }
.live-status { display: flex; align-items: center; gap: 7px; color: #767883; font: 700 8px ui-monospace, monospace; letter-spacing: .12em; }
.live-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px rgba(184,255,101,.65); }
.avatar { width: 35px; height: 35px; border: 1px solid #3a354f; border-radius: 50%; background: #211b37; color: var(--purple-bright); cursor: pointer; font-size: 9px; font-weight: 800; }
.view { min-height: calc(100vh - 76px); padding: 54px 42px 120px; animation: view-in .35s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.section-heading { display: flex; align-items: end; justify-content: space-between; }
.section-heading h1 { margin-bottom: 0; font-size: clamp(52px, 5.2vw, 78px); }
.library-stat { display: flex; margin-bottom: 9px; align-items: end; gap: 10px; }
.library-stat strong { font: 300 38px/1 ui-monospace, monospace; letter-spacing: -.1em; }
.library-stat span { color: #62636d; font: 700 7px/1.4 ui-monospace, monospace; letter-spacing: .08em; }
.filter-row { display: flex; margin: 42px 0 25px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.filter-tabs { display: flex; gap: 28px; }
.filter-tabs button { position: relative; padding: 0 0 13px; border: 0; background: transparent; color: #737580; cursor: pointer; font-size: 11px; }
.filter-tabs button.active { color: white; }
.filter-tabs button.active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--purple-bright); }
.selection-count { margin-bottom: 13px; color: #696a75; font: 700 9px ui-monospace, monospace; letter-spacing: .06em; }
.selection-count b { color: var(--purple-bright); }
.album-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 18px; }
.album-card { position: relative; min-width: 0; cursor: pointer; animation: album-in .42s ease both; }
@keyframes album-in { from { opacity: 0; transform: translateY(14px); } }
.album-art { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: linear-gradient(145deg, #262431, #121319); }
.album-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s, filter .3s; }
.album-card:hover .album-art img { transform: scale(1.045); filter: brightness(.72); }
.album-art::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.07); pointer-events: none; }
.album-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(255,255,255,.13); font: 500 clamp(35px, 5vw, 70px) Georgia, serif; background: radial-gradient(circle at 30% 25%, rgba(134,107,255,.3), transparent 38%), linear-gradient(145deg, #252330, #101116); }
.album-hover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(6,7,9,.38); transition: opacity .25s; }
.album-card:hover .album-hover { opacity: 1; }
.album-hover > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 50%; background: white; color: #101115; font-size: 17px; transform: translateY(8px); transition: transform .25s; }
.album-card:hover .album-hover > span { transform: translateY(0); }
.select-album { position: absolute; top: 9px; right: 9px; z-index: 2; display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(10,10,14,.72); opacity: 0; cursor: pointer; transition: opacity .2s, background .2s, border-color .2s; backdrop-filter: blur(8px); }
.album-card:hover .select-album, .album-card.selected .select-album { opacity: 1; }
.select-album::before, .select-album::after { content: ""; position: absolute; width: 9px; height: 1px; background: white; }
.select-album::after { transform: rotate(90deg); }
.album-card.selected .select-album { border-color: var(--purple); background: var(--purple); }
.album-card.selected .select-album::before { width: 8px; transform: translate(-1px, 1px) rotate(45deg); }
.album-card.selected .select-album::after { width: 12px; transform: translate(2px, -1px) rotate(-45deg); }
.album-card.selected .album-art { box-shadow: 0 0 0 2px var(--purple), 0 14px 45px rgba(99,74,220,.18); }
.album-meta { padding-top: 11px; }
.album-meta strong, .album-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-meta strong { font-size: 11.5px; letter-spacing: -.01em; }
.album-meta span { margin-top: 5px; color: #747681; font-size: 9.5px; }
.album-submeta { display: flex; margin-top: 7px; gap: 7px; color: #53545e; font: 700 7px ui-monospace, monospace; letter-spacing: .07em; }
.album-submeta i { width: 2px; height: 2px; margin-top: 3px; border-radius: 50%; background: currentColor; }
.load-sentinel { display: flex; height: 80px; align-items: center; justify-content: center; gap: 5px; }
.load-sentinel span { width: 4px; height: 4px; border-radius: 50%; background: var(--purple-bright); animation: bounce 1s infinite alternate; }
.load-sentinel span:nth-child(2) { animation-delay: .2s; }
.load-sentinel span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { to { transform: translateY(-7px); opacity: .35; } }
.load-sentinel.done { visibility: hidden; }
.empty-state { padding: 80px 20px; text-align: center; color: #747580; }
.empty-state > span { font: 300 48px ui-monospace, monospace; }
.empty-state h3 { margin: 16px 0 8px; color: var(--text); }
.empty-state p { margin: 0; font-size: 12px; }

.selection-dock { position: fixed; right: 34px; bottom: 28px; z-index: 13; display: flex; min-width: 350px; padding: 8px; align-items: center; gap: 22px; border: 1px solid #3a3844; border-radius: 11px; background: rgba(19,20,26,.94); box-shadow: 0 22px 70px rgba(0,0,0,.55); backdrop-filter: blur(18px); animation: dock-in .3s ease; }
@keyframes dock-in { from { opacity: 0; transform: translateY(16px); } }
.selection-dock > div { display: flex; align-items: center; gap: 11px; padding-left: 9px; }
.selection-dock > div > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 6px; background: rgba(134,107,255,.15); color: var(--purple-bright); font: 800 13px ui-monospace, monospace; }
.selection-dock p { display: flex; margin: 0; flex-direction: column; gap: 4px; }
.selection-dock strong { font: 700 8px ui-monospace, monospace; letter-spacing: .1em; }
.selection-dock small { color: #737480; font-size: 9px; }
.selection-dock button { padding: 13px 15px; border: 0; border-radius: 6px; background: var(--purple); cursor: pointer; font-size: 10px; font-weight: 750; }
.selection-dock button span { margin-left: 8px; }

/* Studio */
.page-title h1 { margin-bottom: 15px; font-size: clamp(48px, 5vw, 76px); }
.page-title > p:last-child { max-width: 580px; color: #858691; font-size: 13px; line-height: 1.6; }
.studio-layout { display: grid; margin-top: 45px; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 20px; align-items: start; }
.rules-column, .plan-column { display: grid; gap: 16px; }
.panel { position: relative; padding: 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px 18px 4px 18px; background: linear-gradient(145deg, rgba(20,21,27,.96), rgba(14,15,20,.96)); }
.panel-number { position: absolute; top: 19px; right: 21px; color: #42434d; font: 700 9px ui-monospace, monospace; }
.panel-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.panel-heading p { margin: 6px 0 22px; color: #747681; font-size: 10px; }
.rule-toggle { display: flex; padding: 16px 0; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); cursor: pointer; }
.rule-toggle > span { display: flex; flex-direction: column; gap: 5px; }
.rule-toggle strong { font-size: 11px; }
.rule-toggle small { color: #737580; font-size: 9px; }
.rule-toggle input { position: absolute; opacity: 0; }
.rule-toggle i { position: relative; width: 37px; height: 20px; border-radius: 20px; background: #292a33; transition: background .2s; }
.rule-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #777984; transition: transform .2s, background .2s; }
.rule-toggle input:checked + i { background: var(--purple-dark); }
.rule-toggle input:checked + i::after { transform: translateX(17px); background: white; }
.range-row { display: grid; padding: 2px 0 15px; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 11px; }
.range-row label { color: #6c6d78; font-size: 9px; }
.range-row input { height: 2px; appearance: none; background: #353641; accent-color: var(--purple); }
.range-row input::-webkit-slider-thumb { width: 12px; height: 12px; appearance: none; border: 2px solid white; border-radius: 50%; background: var(--purple); }
.range-row output { color: var(--purple-bright); font: 700 10px ui-monospace, monospace; text-align: right; }
.selected-rule { display: flex; padding: 15px 0 0; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); color: #747681; font: 700 8px ui-monospace, monospace; letter-spacing: .1em; }
.selected-rule strong { color: white; font-size: 14px; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-cloud button { padding: 8px 11px; border: 1px solid #30313a; border-radius: 20px; background: #111218; color: #82838e; cursor: pointer; font-size: 9px; transition: .2s; }
.chip-cloud button:hover { border-color: #5b526f; color: white; }
.chip-cloud button.active { border-color: var(--purple); background: rgba(134,107,255,.17); color: var(--purple-bright); }
.skeleton-line { width: 80px; height: 29px; border-radius: 20px; background: linear-gradient(90deg, #171820, #23242d, #171820); background-size: 200%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.playlist-options { display: grid; max-height: 220px; overflow: auto; gap: 7px; }
.playlist-option { display: flex; padding: 11px; align-items: center; gap: 10px; border: 1px solid #24262e; border-radius: 6px; background: #101116; cursor: pointer; }
.playlist-option input { accent-color: var(--purple); }
.playlist-option span { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.playlist-option strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.playlist-option small { color: #666873; font-size: 8px; }
.muted-copy { color: #6f707b; font-size: 10px; }
.quality-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.quality-options label { position: relative; cursor: pointer; }
.quality-options input { position: absolute; opacity: 0; }
.quality-options span { display: flex; min-height: 69px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px solid #2b2c35; border-radius: 6px; background: #101116; transition: .2s; }
.quality-options strong { font-size: 13px; }
.quality-options small { color: #676873; font-size: 7px; }
.quality-options input:checked + span { border-color: var(--purple); background: rgba(134,107,255,.13); color: var(--purple-bright); }
.plan-card { position: relative; padding: 25px; overflow: hidden; border: 1px solid #423b5c; border-radius: 4px 22px 4px 22px; background: radial-gradient(circle at 85% 14%, rgba(134,107,255,.2), transparent 32%), #14131c; }
.plan-card-top { display: flex; justify-content: space-between; color: #767380; font: 750 8px ui-monospace, monospace; letter-spacing: .13em; }
.plan-card-top span:last-child { color: var(--purple-bright); }
.plan-visual { display: flex; padding: 26px 0 21px; align-items: center; gap: 28px; }
.plan-ring { display: flex; width: 112px; height: 112px; flex: 0 0 auto; align-items: center; justify-content: center; flex-direction: column; border: 1px solid rgba(163,143,255,.48); border-radius: 50%; background: radial-gradient(circle, rgba(134,107,255,.15), transparent 68%); box-shadow: inset 0 0 0 8px rgba(134,107,255,.035); }
.plan-ring::before { content: ""; position: absolute; width: 112px; height: 112px; border: 1px dashed rgba(163,143,255,.3); border-radius: 50%; transform: scale(1.12); animation: slow-spin 16s linear infinite; }
.plan-ring strong { font: 300 26px ui-monospace, monospace; letter-spacing: -.08em; }
.plan-ring span { margin-top: 5px; color: #797783; font: 700 7px ui-monospace, monospace; letter-spacing: .1em; }
.plan-metrics { display: grid; flex: 1; grid-template-columns: 1fr 1fr; }
.plan-metrics div { display: flex; flex-direction: column; gap: 6px; }
.plan-metrics div + div { padding-left: 20px; border-left: 1px solid #302d3e; }
.plan-metrics strong { font: 400 18px ui-monospace, monospace; }
.plan-metrics span { color: #6c6a77; font: 700 7px ui-monospace, monospace; letter-spacing: .1em; }
.secondary-button { min-height: 46px; padding: 0 15px; border: 1px solid #50436f; border-radius: 5px; background: rgba(134,107,255,.12); color: var(--purple-bright); font-size: 10px; font-weight: 750; }
.secondary-button:hover { background: rgba(134,107,255,.2); }
.track-preview { display: grid; max-height: 240px; margin-top: 14px; overflow: auto; }
.preview-track { display: grid; padding: 10px 0; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; border-top: 1px solid #292633; }
.preview-track > span { color: #666271; font: 8px ui-monospace, monospace; }
.preview-track div { min-width: 0; }
.preview-track strong, .preview-track small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-track strong { font-size: 9px; }
.preview-track small { margin-top: 3px; color: #6c6976; font-size: 8px; }
.preview-track time { color: #6c6976; font: 8px ui-monospace, monospace; }
.preview-more { padding: 11px 0 0; color: var(--purple-bright); font-size: 9px; text-align: center; }
.device-cta { display: grid; padding: 17px; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; border: 1px solid #282a33; border-radius: 9px; background: #101116; }
.device-illustration { position: relative; display: grid; width: 44px; height: 52px; place-items: center; border: 1px solid #393a44; border-radius: 6px; }
.device-illustration > span { position: absolute; top: 6px; width: 30px; height: 19px; border-radius: 2px; background: #24252d; }
.device-illustration i { position: absolute; bottom: 6px; width: 16px; height: 16px; border: 4px solid #555762; border-radius: 50%; }
.device-cta h3 { margin: 5px 0; font-size: 11px; }
.device-cta p:last-child { margin: 0; color: #676873; font-size: 8px; line-height: 1.45; }
.device-cta button { padding: 10px 11px; border: 1px solid #383a44; border-radius: 5px; background: #171820; cursor: pointer; font-size: 8px; }
.device-cta.mapped { border-color: rgba(184,255,101,.3); }
.device-cta.mapped .device-illustration { border-color: var(--acid); }
.cleanup-option { display: flex; padding: 6px; align-items: center; gap: 10px; cursor: pointer; }
.cleanup-option input { accent-color: var(--red); }
.cleanup-option span { display: flex; flex-direction: column; gap: 3px; }
.cleanup-option strong { font-size: 9px; }
.cleanup-option small { color: #666873; font-size: 8px; }
.sync-button { border-radius: 7px; }

/* Device and settings */
.device-hero { display: grid; max-width: 920px; margin-top: 45px; padding: 50px; grid-template-columns: 310px 1fr; align-items: center; gap: 70px; }
.large-ipod { position: relative; width: 260px; height: 410px; padding: 24px; border: 1px solid #4a4b55; border-radius: 32px; background: linear-gradient(145deg, #292a31, #111217 60%); box-shadow: inset 0 0 0 3px #1a1b21, 24px 35px 80px rgba(0,0,0,.45); transform: rotate(-3deg); }
.ipod-screen { display: flex; height: 143px; padding: 14px; flex-direction: column; border: 5px solid #0d0e11; border-radius: 6px; background: #889a72; color: #172014; font: 800 11px ui-monospace, monospace; }
.ipod-screen i { height: 36px; margin: auto 0; border: 2px solid #263521; background: linear-gradient(90deg, #263521 74%, transparent 74%); }
.ipod-screen small { font-size: 8px; }
.click-wheel { position: absolute; bottom: 40px; left: 55px; width: 150px; height: 150px; border-radius: 50%; background: #d7d7d4; color: #777; box-shadow: inset 0 0 20px rgba(0,0,0,.18); }
.click-wheel span { position: absolute; top: 17px; width: 100%; text-align: center; font-size: 10px; }
.click-wheel i { position: absolute; inset: 48px; border-radius: 50%; background: #1b1c21; box-shadow: inset 0 0 0 3px #0f1014; }
.status-label { color: var(--red); font: 750 8px ui-monospace, monospace; letter-spacing: .12em; }
.status-label.ready { color: var(--acid); }
.device-copy h2 { margin: 11px 0 13px; font-size: 27px; letter-spacing: -.04em; }
.device-copy > p { color: #898a94; font-size: 12px; line-height: 1.65; }
.device-copy code, .device-cta code, .cleanup-option code { color: var(--purple-bright); font-family: ui-monospace, monospace; font-size: .9em; }
.device-copy .primary-button { max-width: 260px; margin-top: 24px; border-radius: 6px; }
.device-copy ul { display: grid; margin: 28px 0 0; padding: 0; gap: 10px; list-style: none; color: #777985; font-size: 9px; }
.device-copy li::before { content: "✓"; margin-right: 9px; color: var(--acid); }
.settings-grid { display: grid; max-width: 950px; margin-top: 45px; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-grid dl { margin: 0; }
.settings-grid dl > div { display: grid; padding: 15px 0; grid-template-columns: 90px 1fr; border-top: 1px solid var(--line-soft); }
.settings-grid dt { color: #62636e; font: 700 8px ui-monospace, monospace; letter-spacing: .09em; }
.settings-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; }
.danger-button { width: 100%; margin-top: 18px; padding: 13px; border: 1px solid rgba(255,111,120,.38); border-radius: 5px; background: rgba(255,111,120,.08); color: var(--red); cursor: pointer; font-size: 9px; font-weight: 750; }
.boundary-list { display: grid; gap: 0; }
.boundary-list > div { display: flex; padding: 13px 0; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); }
.good-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px rgba(184,255,101,.4); }
.boundary-list span { display: flex; flex-direction: column; gap: 4px; }
.boundary-list strong { font-size: 10px; }
.boundary-list small { color: #6c6e79; font-size: 8px; }
.mobile-nav { display: none; }

/* Dialog, sync, toast */
.album-dialog { width: min(820px, calc(100% - 32px)); max-height: min(680px, calc(100vh - 40px)); padding: 0; overflow: hidden; border: 1px solid #3b3c46; border-radius: 4px 23px 4px 23px; background: #111218; color: var(--text); box-shadow: 0 40px 120px rgba(0,0,0,.7); }
.album-dialog[open] { display: grid; grid-template-columns: 42% 58%; animation: dialog-in .28s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.album-dialog::backdrop { background: rgba(3,4,6,.78); backdrop-filter: blur(9px); }
.dialog-close { position: absolute; top: 13px; right: 13px; z-index: 3; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(12,13,17,.7); cursor: pointer; font-size: 20px; }
.dialog-cover { min-height: 470px; background: linear-gradient(145deg, #292733, #14151b); }
.dialog-cover img { width: 100%; height: 100%; object-fit: cover; }
.dialog-content { padding: 47px 35px 30px; overflow: auto; }
.dialog-content h2 { margin: 14px 0 5px; font-size: 28px; letter-spacing: -.045em; }
.dialog-content > p:not(.kicker) { margin: 0; color: #848690; font-size: 12px; }
.dialog-actions { display: flex; margin: 24px 0 14px; gap: 8px; }
.dialog-actions button { padding: 11px 13px; border: 1px solid #3a3b45; border-radius: 5px; background: #1a1b22; cursor: pointer; font-size: 9px; }
.dialog-actions button:first-child { border-color: var(--purple); background: rgba(134,107,255,.16); color: var(--purple-bright); }
.dialog-content ol { margin: 0; padding: 0; list-style: none; counter-reset: tracks; }
.dialog-content li { display: grid; padding: 10px 0; grid-template-columns: 24px 1fr auto; align-items: center; border-top: 1px solid #292a32; counter-increment: tracks; }
.dialog-content li::before { content: counter(tracks, decimal-leading-zero); color: #555761; font: 8px ui-monospace, monospace; }
.dialog-content li span { overflow: hidden; padding-right: 8px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-content li time { color: #62646f; font: 8px ui-monospace, monospace; }
.sync-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(6,7,9,.86); backdrop-filter: blur(15px); }
.sync-progress-card { width: min(470px, 100%); padding: 38px; border: 1px solid #3d3a4d; border-radius: 4px 24px 4px 24px; background: radial-gradient(circle at 50% 12%, rgba(134,107,255,.18), transparent 38%), #121319; text-align: center; }
.sync-disc { display: grid; width: 155px; height: 155px; margin: 0 auto 28px; place-items: center; border: 1px dashed rgba(163,143,255,.35); border-radius: 50%; animation: slow-spin 10s linear infinite; }
.sync-disc > div { display: flex; width: 118px; height: 118px; align-items: center; justify-content: center; flex-direction: column; border: 1px solid var(--purple); border-radius: 50%; background: rgba(134,107,255,.1); animation: slow-spin 10s linear infinite reverse; }
.sync-disc strong { font: 300 26px ui-monospace, monospace; }
.sync-disc span { margin-top: 6px; color: #777581; font: 700 7px ui-monospace, monospace; letter-spacing: .12em; }
.sync-progress-card h2 { min-height: 45px; margin: 10px 0 20px; font-size: 17px; line-height: 1.35; }
.progress-bar { height: 3px; overflow: hidden; background: #292a33; }
.progress-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-bright)); transition: width .25s; }
.sync-stats { display: flex; margin-top: 11px; justify-content: space-between; color: #696b76; font: 8px ui-monospace, monospace; }
.sync-progress-card button { margin-top: 28px; padding: 10px 18px; border: 1px solid #383943; border-radius: 5px; background: transparent; color: #858690; cursor: pointer; font-size: 9px; }
.device-prompt { position: fixed; inset: 0; z-index: 29; display: grid; place-items: center; padding: 20px; background: rgba(5,6,8,.86); backdrop-filter: blur(16px); }
.device-prompt-card { position: relative; width: min(490px, 100%); padding: 36px; overflow: hidden; border: 1px solid #474153; border-radius: 4px 25px 4px 25px; background: radial-gradient(circle at 85% 5%, rgba(134,107,255,.2), transparent 35%), #13141a; box-shadow: 0 35px 110px rgba(0,0,0,.68); animation: dialog-in .3s ease; }
.device-prompt-card h2 { max-width: 330px; margin: 14px 0 10px; font-size: 29px; line-height: 1.03; letter-spacing: -.045em; }
.device-prompt-card > p:not(.kicker) { max-width: 390px; margin: 0; color: #898a95; font-size: 11px; line-height: 1.65; }
.device-prompt-card code { color: var(--purple-bright); font-family: ui-monospace, monospace; }
.device-prompt-art { position: absolute; top: 25px; right: 25px; width: 90px; height: 86px; opacity: .75; }
.prompt-ipod { position: absolute; right: 0; bottom: 0; width: 47px; height: 66px; border: 1px solid #6d6877; border-radius: 8px; background: #1b1c23; }
.prompt-ipod span { position: absolute; top: 7px; left: 7px; width: 31px; height: 22px; border-radius: 2px; background: #333440; }
.prompt-ipod i { position: absolute; bottom: 7px; left: 14px; width: 18px; height: 18px; border: 4px solid #6f707a; border-radius: 50%; }
.usb-cable { position: absolute; top: 8px; left: 5px; width: 50px; height: 50px; border: 1px solid transparent; border-bottom-color: var(--purple-bright); border-left-color: var(--purple-bright); border-radius: 0 0 0 27px; }
.usb-cable i { position: absolute; top: -3px; left: -5px; width: 10px; height: 8px; border: 1px solid var(--purple-bright); background: #15161c; }
.usb-cable span { position: absolute; right: -6px; bottom: -4px; width: 11px; height: 8px; border: 1px solid var(--purple-bright); background: #15161c; }
.prompt-privacy { display: flex; margin: 23px 0 17px; padding: 12px; align-items: center; gap: 10px; border: 1px solid #2b2d35; border-radius: 6px; background: #0e0f13; color: #797b86; font-size: 8.5px; line-height: 1.45; }
.prompt-privacy i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--acid); box-shadow: 0 0 11px rgba(184,255,101,.45); }
.device-prompt-card .primary-button { border-radius: 7px; }
.prompt-skip { display: block; margin: 14px auto 0; border: 0; background: transparent; color: #6f707a; cursor: pointer; font-size: 9px; }
.prompt-skip:hover { color: white; }
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 40; display: grid; width: min(340px, calc(100% - 40px)); gap: 8px; }
.toast { padding: 14px 16px; border: 1px solid #373842; border-left: 3px solid var(--purple); border-radius: 4px; background: rgba(21,22,28,.96); box-shadow: 0 15px 45px rgba(0,0,0,.4); color: #d9d8de; font-size: 10px; line-height: 1.45; animation: toast-in .25s ease; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--acid); }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }

@media (max-width: 1180px) {
    .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .connect-main { gap: 48px; }
    .signal-flow { grid-template-columns: 95px 1fr 95px 1fr 95px; }
}

@media (max-width: 920px) {
    :root { --sidebar: 0px; }
    .connect-main { grid-template-columns: 1fr; padding-top: 48px; }
    .hero-copy { text-align: center; }
    .hero-lede { margin-inline: auto; }
    .signal-flow { max-width: 520px; margin-inline: auto; margin-top: 42px; }
    .connect-card-wrap { width: min(560px, 100%); margin: 0 auto; }
    .sidebar { display: none; }
    .workspace { margin-left: 0; }
    .workspace-header { padding: 0 24px; }
    .mobile-brand { display: inline-flex; margin-right: 20px; }
    .mobile-brand > span:last-child { display: none; }
    .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .studio-layout { grid-template-columns: 1fr; }
    .device-hero { grid-template-columns: 260px 1fr; gap: 35px; }
    .large-ipod { transform: scale(.86) rotate(-3deg); transform-origin: left center; }
    .mobile-nav { position: fixed; inset: auto 14px 13px; z-index: 12; display: grid; height: 54px; padding: 5px; grid-template-columns: repeat(4, 1fr); border: 1px solid #343640; border-radius: 12px; background: rgba(16,17,22,.92); backdrop-filter: blur(18px); }
    .mobile-nav button { border: 0; border-radius: 8px; background: transparent; color: #6f707b; font-size: 9px; }
    .mobile-nav button.active { background: rgba(134,107,255,.16); color: var(--purple-bright); }
}

@media (max-width: 700px) {
    .public-header, .public-footer, .connect-main { width: calc(100% - 32px); }
    .privacy-chip { display: none; }
    .connect-main { padding: 42px 0; }
    .hero-copy h1 { font-size: clamp(52px, 17vw, 74px); }
    .hero-lede { font-size: 14px; }
    .signal-flow { grid-template-columns: 74px 1fr 74px 1fr 74px; }
    .signal-flow strong { font-size: 9px; }
    .signal-flow small { display: none; }
    .connect-card { padding: 27px 20px; }
    .field-pair { grid-template-columns: 1fr; }
    .public-footer span:last-child { display: none; }
    .workspace-header { height: 67px; padding: 0 16px; }
    .search-wrap { flex: 1; width: auto; }
    .search-wrap kbd, .live-status { display: none; }
    .header-actions { margin-left: 10px; }
    .view { padding: 38px 17px 110px; }
    .section-heading { align-items: start; }
    .section-heading h1, .page-title h1 { font-size: clamp(45px, 14vw, 65px); }
    .library-stat { display: none; }
    .filter-tabs { gap: 16px; overflow-x: auto; }
    .filter-tabs button { white-space: nowrap; }
    .selection-count { display: none; }
    .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 12px; }
    .select-album { opacity: 1; }
    .selection-dock { right: 12px; bottom: 78px; left: 12px; min-width: 0; justify-content: space-between; }
    .selection-dock p { display: none; }
    .selection-dock button { flex: 1; }
    .quality-options { grid-template-columns: repeat(2, 1fr); }
    .plan-visual { gap: 17px; }
    .device-cta { grid-template-columns: 46px 1fr; }
    .device-cta button { grid-column: 1 / -1; }
    .device-hero { grid-template-columns: 1fr; padding: 30px 24px; }
    .large-ipod { margin: -25px auto; transform: scale(.72) rotate(-3deg); transform-origin: center; }
    .settings-grid { grid-template-columns: 1fr; }
    .album-dialog[open] { grid-template-columns: 1fr; overflow: auto; }
    .dialog-cover { min-height: 260px; max-height: 340px; }
    .dialog-content { overflow: visible; }
    .sync-progress-card { padding: 30px 21px; }
    .device-prompt-card { padding: 31px 23px 25px; }
    .device-prompt-art { position: relative; top: auto; right: auto; float: right; width: 82px; height: 74px; margin: -4px 0 5px 10px; }
    .server-examples span { width: 100%; }
}

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