:root {
    --bg: #05060b;
    --bg-deep: #020307;
    --panel: rgba(11, 14, 25, 0.78);
    --panel-strong: rgba(12, 16, 30, 0.94);
    --line: rgba(194, 211, 255, 0.12);
    --line-strong: rgba(194, 211, 255, 0.22);
    --text: #f5f7ff;
    --muted: #8e98b4;
    --soft: #c8d0e6;
    --accent: #6ae4ff;
    --accent-2: #9a76ff;
    --accent-3: #ff6fd8;
    --success: #69f0b6;
    --danger: #ff6f8f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 14px;
    --font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-deep);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at 20% -10%, rgba(59, 99, 255, 0.14), transparent 38%),
        radial-gradient(circle at 100% 0%, rgba(173, 54, 255, 0.09), transparent 32%),
        linear-gradient(180deg, #06070d 0%, #030409 100%);
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button,
select,
input[type="range"] {
    accent-color: var(--accent);
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.34;
}

svg {
    display: block;
}

.site-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.site-atmosphere__orb {
    position: absolute;
    width: 45rem;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    animation: ambient-drift 22s ease-in-out infinite alternate;
}

.site-atmosphere__orb--one {
    top: 8vh;
    left: -16rem;
    background: #3266ff;
}

.site-atmosphere__orb--two {
    top: 54vh;
    right: -18rem;
    background: #bd43ff;
    animation-delay: -8s;
}

.site-atmosphere__noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.site-header {
    width: min(1680px, calc(100% - 40px));
    margin: 18px auto 12px;
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 12px 18px;
    border: 1px solid rgba(203, 218, 255, 0.1);
    border-radius: 22px;
    background: rgba(8, 10, 18, 0.66);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px) saturate(130%);
    position: sticky;
    top: 12px;
    z-index: 30;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    text-decoration: none;
    color: var(--text);
}

.brand__sigil {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 13px;
    border: 1px solid rgba(173, 208, 255, 0.25);
    background: linear-gradient(145deg, rgba(103, 233, 255, 0.15), rgba(145, 82, 255, 0.16));
    box-shadow: inset 0 0 22px rgba(111, 213, 255, 0.08), 0 0 22px rgba(89, 159, 255, 0.08);
    overflow: hidden;
}

.brand__sigil::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 20deg, transparent, rgba(104, 225, 255, 0.36), transparent 32%, rgba(170, 89, 255, 0.3), transparent 68%);
    animation: sigil-spin 9s linear infinite;
}

.brand__sigil span {
    position: absolute;
    z-index: 1;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #c6f7ff, transparent);
    box-shadow: 0 0 9px rgba(104, 225, 255, 0.8);
}

.brand__sigil span:nth-child(1) { transform: translateY(-7px); }
.brand__sigil span:nth-child(2) { width: 28px; }
.brand__sigil span:nth-child(3) { transform: translateY(7px); }

.brand__copy {
    display: grid;
    line-height: 1.1;
}

.brand__copy strong {
    letter-spacing: 0.18em;
    font-size: 0.94rem;
}

.brand__copy small {
    margin-top: 5px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.site-nav a {
    padding: 7px 13px;
    border-radius: 999px;
    color: #aab4cf;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.engine-cluster {
    justify-self: end;
    text-align: right;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: #c5cee4;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-pill__light {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #697089;
    box-shadow: 0 0 0 3px rgba(105, 112, 137, 0.12);
    transition: background 200ms ease, box-shadow 200ms ease;
}

.status-pill[data-kind="loading"] .status-pill__light {
    background: #ffd76a;
    box-shadow: 0 0 12px rgba(255, 215, 106, 0.85), 0 0 0 4px rgba(255, 215, 106, 0.1);
    animation: pulse-dot 800ms ease-in-out infinite alternate;
}

.status-pill[data-kind="ready"] .status-pill__light {
    background: var(--success);
    box-shadow: 0 0 12px rgba(105, 240, 182, 0.8), 0 0 0 4px rgba(105, 240, 182, 0.1);
}

.status-pill[data-kind="playing"] .status-pill__light {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(106, 228, 255, 0.9), 0 0 0 4px rgba(106, 228, 255, 0.12);
    animation: pulse-dot 520ms ease-in-out infinite alternate;
}

.status-pill[data-kind="error"] .status-pill__light {
    background: var(--danger);
    box-shadow: 0 0 13px rgba(255, 111, 143, 0.8);
}

.engine-source {
    margin: 5px 2px 0;
    color: #69728c;
    font-family: var(--font-mono);
    font-size: 0.63rem;
}

.app-shell {
    width: min(1680px, calc(100% - 40px));
    margin: 0 auto;
    padding-bottom: 64px;
}

.error-banner {
    position: fixed;
    left: 50%;
    top: 102px;
    z-index: 80;
    width: min(680px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 14px 18px;
    border: 1px solid rgba(255, 111, 143, 0.42);
    border-radius: 14px;
    background: rgba(47, 8, 19, 0.94);
    color: #ffd5df;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(16px);
}

.hero-stage {
    position: relative;
    min-height: clamp(560px, 74vh, 940px);
    overflow: hidden;
    border: 1px solid rgba(190, 210, 255, 0.15);
    border-radius: var(--radius-xl);
    background: #03040a;
    box-shadow: var(--shadow), inset 0 0 90px rgba(37, 66, 160, 0.07);
    isolation: isolate;
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), inset 0 -100px 120px rgba(0,0,0,0.18);
}

#visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-stage__vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 32%, rgba(0,0,0,0.14) 64%, rgba(0,0,0,0.64) 100%),
        linear-gradient(180deg, rgba(2,3,8,0.35), transparent 22%, transparent 72%, rgba(2,3,8,0.55));
}

.hero-stage__scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.16;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(255,255,255,0.018) 4px, transparent 5px);
    mix-blend-mode: screen;
}

.hero-stage__hud {
    position: absolute;
    inset: 0;
    z-index: 4;
    padding: clamp(24px, 3vw, 48px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    pointer-events: none;
}

.hero-stage__topline,
.hero-stage__bottomline {
    display: grid;
    align-items: center;
    gap: 24px;
}

.hero-stage__topline {
    grid-template-columns: 1fr auto auto;
}

.hero-stage__bottomline {
    grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 2fr) auto;
    align-items: end;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-stage__microcopy {
    margin: 5px 0 0;
    color: rgba(211, 219, 242, 0.46);
    font-size: 0.76rem;
}

.visual-mode-bar,
.hero-stage__actions {
    pointer-events: auto;
}

.visual-mode-bar {
    display: flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(210, 225, 255, 0.12);
    border-radius: 999px;
    background: rgba(4, 6, 13, 0.46);
    backdrop-filter: blur(14px);
}

.mode-chip,
.icon-button,
.micro-button,
.preset-chip,
.text-button,
.toggle-button,
.accent-button,
.round-button,
.play-button,
.track-card__play {
    border: 0;
    cursor: pointer;
}

.mode-chip {
    padding: 8px 11px;
    border-radius: 999px;
    background: transparent;
    color: rgba(224, 231, 251, 0.56);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mode-chip:hover {
    color: #fff;
}

.mode-chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(87, 223, 255, 0.2), rgba(144, 91, 255, 0.2));
    box-shadow: inset 0 0 0 1px rgba(167, 226, 255, 0.16), 0 0 22px rgba(92, 176, 255, 0.08);
}

.hero-stage__actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(210, 225, 255, 0.14);
    border-radius: 12px;
    background: rgba(4, 6, 13, 0.46);
    color: rgba(230, 237, 255, 0.68);
    backdrop-filter: blur(14px);
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button.is-active {
    color: #fff;
    border-color: rgba(112, 226, 255, 0.32);
    background: rgba(62, 147, 195, 0.13);
}

.icon-button svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button span {
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-stage__center {
    display: grid;
    place-items: center;
    text-align: center;
}

.reactor-caption {
    width: min(840px, 86%);
    text-shadow: 0 4px 26px rgba(0,0,0,0.72);
}

.reactor-caption__index {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(207, 224, 255, 0.15);
    border-radius: 999px;
    background: rgba(3, 5, 12, 0.36);
    color: rgba(213, 224, 255, 0.66);
    font-family: var(--font-mono);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    backdrop-filter: blur(12px);
}

.reactor-caption h1 {
    margin: 20px 0 8px;
    font-size: clamp(2.2rem, 5.4vw, 6.7rem);
    line-height: 0.93;
    letter-spacing: -0.055em;
    text-wrap: balance;
    background: linear-gradient(180deg, #fff 18%, #cfddff 63%, #7e8aad 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 34px rgba(100, 181, 255, 0.12));
}

.reactor-caption p {
    margin: 0 auto;
    max-width: 720px;
    color: rgba(218, 226, 246, 0.62);
    font-size: clamp(0.84rem, 1.2vw, 1.05rem);
}

.signal-readout {
    display: grid;
    gap: 5px;
}

.signal-readout__label {
    color: rgba(191, 202, 230, 0.44);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.signal-readout strong {
    max-width: 100%;
    color: rgba(239, 243, 255, 0.86);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signal-readout strong i {
    color: rgba(255,255,255,0.26);
    font-style: normal;
}

.tracker-coordinate {
    display: flex;
    gap: 7px;
}

.tracker-coordinate > span {
    min-width: 66px;
    padding: 10px 12px;
    display: grid;
    gap: 2px;
    border: 1px solid rgba(210, 225, 255, 0.12);
    border-radius: 12px;
    background: rgba(3, 5, 12, 0.42);
    text-align: center;
    backdrop-filter: blur(12px);
}

.tracker-coordinate small {
    color: #727d9a;
    font-family: var(--font-mono);
    font-size: 0.52rem;
    letter-spacing: 0.14em;
}

.tracker-coordinate strong {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #f4f7ff;
}

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(14, 18, 32, 0.84), rgba(8, 11, 20, 0.78));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.025);
    backdrop-filter: blur(20px) saturate(120%);
}

.transport-deck {
    margin: 14px 0 22px;
    padding: 15px 18px;
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 22px;
    border-radius: 20px;
}

.transport-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.round-button,
.play-button,
.text-button,
.accent-button,
.toggle-button,
.micro-button,
.preset-chip {
    transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.round-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(203, 220, 255, 0.12);
    background: rgba(255,255,255,0.035);
    color: #aab5cf;
}

.round-button:hover:not(:disabled) {
    color: #fff;
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.round-button svg,
.play-button svg,
.track-card__play svg,
.volume-control svg,
.search-field svg {
    width: 18px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.play-button {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #aaf7ff, #7cb9ff 42%, #a676ff);
    color: #07101c;
    box-shadow: 0 0 0 6px rgba(118, 214, 255, 0.06), 0 12px 32px rgba(75, 155, 255, 0.22);
}

.play-button:hover:not(:disabled) {
    transform: scale(1.04);
    box-shadow: 0 0 0 8px rgba(118, 214, 255, 0.08), 0 16px 38px rgba(75, 155, 255, 0.32);
}

.play-button svg {
    width: 22px;
}

.play-button__pause {
    display: none;
}

.play-button[data-state="playing"] .play-button__play {
    display: none;
}

.play-button[data-state="playing"] .play-button__pause {
    display: block;
}

.text-button {
    padding: 9px 12px;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: #b9c4dc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.text-button:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(115, 225, 255, 0.26);
    background: rgba(103, 204, 255, 0.08);
}

.timeline-wrap {
    min-width: 0;
}

.timeline-copy {
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #b8c3dc;
    font-size: 0.75rem;
}

.timeline-copy__current {
    min-width: 0;
    max-width: 62%;
    display: flex;
    align-items: center;
    gap: 9px;
}

.timeline-copy__current > span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
}

.current-favourite {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(203, 220, 255, 0.12);
    border-radius: 50%;
    background: rgba(255,255,255,0.035);
    color: #8d98b2;
    cursor: pointer;
    transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.current-favourite:hover:not(:disabled) {
    color: #ffc0ea;
    border-color: rgba(255, 111, 216, 0.3);
    background: rgba(255, 92, 195, 0.08);
    transform: translateY(-1px) scale(1.04);
}

.current-favourite:disabled {
    opacity: 0.35;
    cursor: default;
}

.current-favourite svg {
    width: 16px;
}

.timeline-copy > span:last-child {
    color: #68728c;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    text-align: right;
}

.range {
    --range-progress: 0%;
    width: 100%;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: linear-gradient(90deg, var(--accent) 0 var(--range-progress), rgba(255,255,255,0.09) var(--range-progress) 100%);
    cursor: pointer;
}

.range::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    appearance: none;
    border: 2px solid #dffaff;
    border-radius: 50%;
    background: #77e6ff;
    box-shadow: 0 0 14px rgba(95, 225, 255, 0.58);
}

.range::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: 2px solid #dffaff;
    border-radius: 50%;
    background: #77e6ff;
    box-shadow: 0 0 14px rgba(95, 225, 255, 0.58);
}

.range--timeline {
    height: 5px;
}

.transport-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
}

.compact-control {
    display: grid;
    gap: 4px;
    color: #68728c;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.compact-control select,
.select-field select {
    border: 1px solid rgba(203, 220, 255, 0.12);
    border-radius: 10px;
    background: #0b0f1b;
    color: #dce4f8;
    padding: 8px 30px 8px 10px;
    font-size: 0.72rem;
}

.toggle-button {
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    color: #7c879f;
    font-size: 0.69rem;
    font-weight: 700;
}

.toggle-button__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5a6173;
}

.toggle-button.is-active {
    color: #dffaff;
    border-color: rgba(104, 226, 255, 0.24);
    background: rgba(77, 180, 220, 0.09);
}

.toggle-button.is-active .toggle-button__dot {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(106, 228, 255, 0.8);
}

.volume-control {
    min-width: 160px;
    display: grid;
    grid-template-columns: auto auto minmax(80px, 1fr);
    align-items: center;
    gap: 8px;
    color: #68728c;
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.volume-control svg {
    width: 16px;
    fill: none;
}

.studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(360px, 0.88fr);
    align-items: start;
    gap: 22px;
}

.library-panel,
.rack-card {
    border-radius: var(--radius-lg);
}

.library-panel {
    padding: clamp(20px, 2.4vw, 34px);
}

.section-heading,
.rack-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.section-heading h2,
.rack-heading h2 {
    margin: 8px 0 0;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    max-width: 750px;
    font-size: clamp(1.8rem, 3.1vw, 3.7rem);
}

.section-heading > div > p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
}

.accent-button {
    flex: none;
    padding: 12px 16px;
    border-radius: 13px;
    border: 1px solid rgba(116, 226, 255, 0.25);
    background: linear-gradient(135deg, rgba(76, 193, 235, 0.15), rgba(142, 85, 255, 0.16));
    color: #ecfbff;
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 28px rgba(52, 125, 203, 0.08);
}

.accent-button:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 34px rgba(52, 125, 203, 0.17);
}

.library-toolbar {
    margin: 28px 0 18px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: 10px;
}

.search-field {
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(203, 220, 255, 0.12);
    border-radius: 13px;
    background: rgba(3, 5, 11, 0.52);
}

.search-field:focus-within {
    border-color: rgba(104, 226, 255, 0.34);
    box-shadow: 0 0 0 4px rgba(104, 226, 255, 0.04);
}

.search-field svg {
    width: 18px;
    fill: none;
    color: #66718b;
}

.search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f2f6ff;
}

.search-field input::placeholder {
    color: #626c83;
}

.select-field {
    min-width: 130px;
    display: grid;
    gap: 4px;
    color: #657089;
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.track-list {
    display: grid;
    gap: 7px;
    min-height: 560px;
}

.track-list[aria-busy="true"] {
    opacity: 0.5;
    filter: saturate(0.5);
}

.track-card {
    --track-delay: 0ms;
    min-height: 64px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(203, 220, 255, 0.075);
    border-radius: 14px;
    background: rgba(255,255,255,0.018);
    animation: track-enter 380ms cubic-bezier(.22,.8,.31,1) both;
    animation-delay: var(--track-delay);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.track-card:hover {
    transform: translateX(3px);
    border-color: rgba(112, 224, 255, 0.2);
    background: rgba(98, 177, 224, 0.045);
}

.track-card.is-playing {
    border-color: rgba(105, 229, 255, 0.35);
    background: linear-gradient(90deg, rgba(55, 188, 228, 0.1), rgba(126, 82, 255, 0.06));
    box-shadow: inset 3px 0 0 var(--accent), 0 0 30px rgba(79, 180, 230, 0.05);
}

.track-card__play {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(204, 223, 255, 0.12);
    background: rgba(255,255,255,0.035);
    color: #b9c6df;
}

.track-card__play:hover {
    color: #07101c;
    background: var(--accent);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(106, 228, 255, 0.28);
}

.track-card__play svg {
    width: 16px;
}

.track-card__format,
.format-badge,
.micro-badge {
    font-family: var(--font-mono);
    font-weight: 800;
    letter-spacing: 0.07em;
}

.track-card__format {
    min-width: 43px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #97a4c0;
    text-align: center;
    font-size: 0.63rem;
}

.track-card__format[data-format="mod"],
.format-badge[data-format="mod"] { color: #71ecff; background-color: rgba(55, 190, 220, 0.09); }
.track-card__format[data-format="xm"],
.format-badge[data-format="xm"] { color: #c494ff; background-color: rgba(151, 87, 255, 0.09); }
.track-card__format[data-format="s3m"],
.format-badge[data-format="s3m"] { color: #ff9adf; background-color: rgba(255, 82, 186, 0.08); }
.track-card__format[data-format="it"],
.format-badge[data-format="it"] { color: #86f3b6; background-color: rgba(67, 220, 134, 0.08); }

.track-card__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.track-card__copy strong {
    overflow: hidden;
    color: #ecf0fb;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.88rem;
}

.track-card__copy span {
    overflow: hidden;
    color: #7c879f;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.72rem;
}

.track-card__stats {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #66718a;
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.track-card__stats b {
    color: #b9c5dd;
    font-weight: 700;
}

.pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination span {
    color: #707b94;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.empty-state {
    min-height: 300px;
    display: grid;
    place-items: center;
    padding: 30px;
    border: 1px dashed rgba(203, 220, 255, 0.12);
    border-radius: 16px;
    color: #75809a;
    text-align: center;
}

.studio-rack {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 108px;
}

.rack-card {
    padding: 22px;
}

.rack-heading h2 {
    font-size: 1.28rem;
}

.micro-button {
    padding: 6px 9px;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    color: #8590a9;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.micro-button:hover {
    color: #fff;
    border-color: rgba(105, 225, 255, 0.22);
}

.preset-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.preset-chip {
    padding: 8px 7px;
    border: 1px solid rgba(203, 220, 255, 0.09);
    border-radius: 9px;
    background: rgba(255,255,255,0.025);
    color: #7f8aa3;
    font-size: 0.62rem;
    font-weight: 800;
}

.preset-chip:hover,
.preset-chip.is-active {
    color: #e9fbff;
    border-color: rgba(105, 225, 255, 0.24);
    background: linear-gradient(135deg, rgba(72, 185, 225, 0.11), rgba(126, 82, 255, 0.09));
}

.eq-bands {
    margin-top: 22px;
    height: 210px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.eq-band {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    gap: 8px;
}

.eq-band > span {
    color: #9da8c1;
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.eq-band output {
    color: #66718a;
    font-family: var(--font-mono);
    font-size: 0.53rem;
    white-space: nowrap;
}

.eq-band input {
    --eq-low: 50%;
    --eq-high: 50%;
    width: 150px;
    height: 4px;
    transform: rotate(-90deg);
    align-self: center;
    appearance: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 0 var(--eq-low), var(--accent) var(--eq-low) var(--eq-high), rgba(255,255,255,0.08) var(--eq-high) 100%);
}

.eq-band input::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    appearance: none;
    border: 2px solid #dffaff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(106, 228, 255, 0.58);
}

.eq-band input::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: 2px solid #dffaff;
    border-radius: 50%;
    background: var(--accent);
}

.performance-controls {
    margin-top: 18px;
    display: grid;
    gap: 18px;
}

.performance-controls label {
    display: grid;
    gap: 9px;
}

.performance-controls label > span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #75809a;
    font-size: 0.68rem;
}

.performance-controls b {
    color: #b9c4dc;
    font-weight: 700;
}

.performance-controls output {
    font-family: var(--font-mono);
}

.micro-badge,
.format-badge {
    padding: 6px 8px;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    color: #7c879f;
    font-size: 0.58rem;
}

.module-stats {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.module-stats > div {
    min-width: 0;
    padding: 10px;
    display: grid;
    gap: 3px;
    border: 1px solid rgba(203, 220, 255, 0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}

.module-stats dt {
    color: #66718a;
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.module-stats dd {
    margin: 0;
    color: #eef3ff;
    font-family: var(--font-mono);
    font-size: 0.94rem;
}

.row-monitor {
    margin-top: 18px;
}

.row-monitor__head {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #94a0b9;
    font-size: 0.66rem;
}

.row-monitor__head small {
    color: #566077;
    font-family: var(--font-mono);
    font-size: 0.54rem;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    max-height: 390px;
    overflow: auto;
    scrollbar-color: rgba(100, 211, 255, 0.24) transparent;
}

.channel-grid__empty {
    grid-column: 1 / -1;
    min-height: 120px;
    display: grid;
    place-items: center;
    padding: 18px;
    border: 1px dashed rgba(203, 220, 255, 0.1);
    border-radius: 11px;
    color: #606b84;
    text-align: center;
    font-size: 0.68rem;
}

.channel-node {
    --activity: 0;
    --channel-hue: 200;
    min-width: 0;
    padding: 8px;
    border: 1px solid hsla(var(--channel-hue), 80%, 70%, calc(0.06 + var(--activity) * 0.24));
    border-radius: 10px;
    background: linear-gradient(180deg, hsla(var(--channel-hue), 85%, 55%, calc(var(--activity) * 0.1)), rgba(255,255,255,0.018));
    box-shadow: inset 0 0 calc(var(--activity) * 20px) hsla(var(--channel-hue), 100%, 60%, calc(var(--activity) * 0.08));
    transition: border-color 90ms linear, background 90ms linear, transform 90ms linear;
}

.channel-node.is-active {
    transform: translateY(-1px);
}

.channel-node__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    color: #68728a;
    font-family: var(--font-mono);
    font-size: 0.49rem;
}

.channel-node__head i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: hsla(var(--channel-hue), 100%, 72%, calc(0.2 + var(--activity) * 0.8));
    box-shadow: 0 0 calc(var(--activity) * 12px) hsla(var(--channel-hue), 100%, 70%, var(--activity));
}

.channel-node strong {
    display: block;
    margin: 5px 0 4px;
    color: hsla(var(--channel-hue), 100%, 84%, calc(0.7 + var(--activity) * 0.3));
    font-family: var(--font-mono);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
}

.channel-node__data {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    color: #626c83;
    font-family: var(--font-mono);
    font-size: 0.45rem;
}

.channel-node--remainder {
    grid-column: span 2;
    display: grid;
    place-items: center;
    color: #68738b;
    font-size: 0.62rem;
}

.site-footer {
    width: min(1680px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 36px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #5d667c;
    font-size: 0.68rem;
}

.keyboard-hint {
    font-family: var(--font-mono);
}

.hero-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

.hero-stage:fullscreen .hero-stage__hud {
    padding: clamp(28px, 4vw, 68px);
}

.hero-stage:fullscreen .reactor-caption h1 {
    font-size: clamp(3rem, 7vw, 9rem);
}

@keyframes ambient-drift {
    from { transform: translate3d(-4%, -3%, 0) scale(0.94); }
    to { transform: translate3d(7%, 5%, 0) scale(1.08); }
}

@keyframes sigil-spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
    from { opacity: 0.58; transform: scale(0.82); }
    to { opacity: 1; transform: scale(1.08); }
}

@keyframes track-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1260px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .site-nav {
        display: none;
    }

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

    .studio-rack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }

    .rack-card--inspector {
        grid-column: 1 / -1;
    }

    .transport-deck {
        grid-template-columns: auto 1fr;
    }

    .transport-options {
        grid-column: 1 / -1;
        justify-content: space-between;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 12px;
    }
}

@media (max-width: 920px) {
    .timeline-copy__current {
        max-width: 68%;
    }

    .site-header,
    .app-shell,
    .site-footer {
        width: min(100% - 22px, 1680px);
    }

    .site-header {
        top: 7px;
        margin-top: 9px;
    }

    .engine-source {
        display: none;
    }

    .hero-stage {
        min-height: 650px;
    }

    .hero-stage__topline {
        grid-template-columns: 1fr auto;
    }

    .visual-mode-bar {
        position: absolute;
        left: 24px;
        right: 24px;
        bottom: 112px;
        justify-content: center;
        overflow-x: auto;
    }

    .hero-stage__actions {
        justify-self: end;
    }

    .hero-stage__bottomline {
        grid-template-columns: 1fr auto;
    }

    .signal-readout--wide {
        display: none;
    }

    .transport-deck {
        grid-template-columns: 1fr;
    }

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

    .timeline-wrap {
        order: -1;
    }

    .transport-options {
        grid-column: auto;
        flex-wrap: wrap;
    }

    .library-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .search-field {
        grid-column: 1 / -1;
    }

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

    .rack-card--inspector {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 14px;
    }

    .brand__copy small,
    .engine-cluster {
        display: none;
    }

    .site-header {
        grid-template-columns: 1fr;
        min-height: 58px;
    }

    .hero-stage {
        min-height: 660px;
        border-radius: 20px;
    }

    .hero-stage__hud {
        padding: 20px;
    }

    .hero-stage__microcopy,
    .hero-stage__actions #director-toggle {
        display: none;
    }

    .hero-stage__topline {
        grid-template-columns: 1fr auto;
    }

    .reactor-caption {
        width: 96%;
    }

    .reactor-caption h1 {
        font-size: clamp(2.25rem, 13vw, 4.3rem);
    }

    .visual-mode-bar {
        left: 12px;
        right: 12px;
        bottom: 120px;
        justify-content: flex-start;
    }

    .mode-chip {
        flex: 0 0 auto;
    }

    .hero-stage__bottomline {
        grid-template-columns: 1fr;
    }

    .tracker-coordinate {
        justify-content: space-between;
    }

    .tracker-coordinate > span {
        flex: 1;
        min-width: 0;
    }

    .transport-controls .text-button {
        display: none;
    }

    .transport-options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .compact-control,
    .volume-control {
        width: 100%;
    }

    .volume-control {
        grid-template-columns: auto auto 1fr;
    }

    .section-heading {
        display: grid;
    }

    .accent-button {
        width: 100%;
    }

    .library-toolbar {
        grid-template-columns: 1fr;
    }

    .search-field,
    .select-field {
        grid-column: auto;
    }

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

    .track-card__stats {
        display: none;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .eq-bands {
        gap: 2px;
    }

    .eq-band input {
        width: 126px;
    }

    .module-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .site-footer {
        display: block;
        text-align: center;
    }

    .keyboard-hint {
        display: none;
    }
}

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

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

/* v0.2.3: browser autoplay release gate. */
.autoplay-gate {
    position: fixed;
    left: 50%;
    top: max(104px, calc(env(safe-area-inset-top) + 88px));
    z-index: 80;
    transform: translateX(-50%);
    width: min(440px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(106, 228, 255, 0.42);
    border-radius: 18px;
    color: var(--text);
    background: linear-gradient(135deg, rgba(12, 22, 38, 0.96), rgba(24, 16, 46, 0.96));
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55), 0 0 42px rgba(106, 228, 255, 0.12);
    backdrop-filter: blur(22px) saturate(140%);
    cursor: pointer;
    animation: autoplay-gate-arrive 320ms ease-out both;
}

.autoplay-gate[hidden] {
    display: none;
}

.autoplay-gate__light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent), 0 0 34px rgba(106, 228, 255, 0.55);
    animation: autoplay-gate-pulse 1.25s ease-in-out infinite alternate;
}

.autoplay-gate span:nth-child(2) {
    display: grid;
    text-align: left;
    line-height: 1.15;
}

.autoplay-gate small {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.autoplay-gate strong {
    margin-top: 5px;
    font-size: 0.94rem;
}

.autoplay-gate svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@keyframes autoplay-gate-arrive {
    from { opacity: 0; transform: translate(-50%, -12px) scale(0.98); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes autoplay-gate-pulse {
    from { opacity: 0.55; transform: scale(0.82); }
    to { opacity: 1; transform: scale(1.08); }
}

/* Favourites constellation / v0.3.1 */
.favourite-button svg {
    width: 18px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    transition: fill 160ms ease, filter 160ms ease, transform 160ms ease;
}

.favourite-button:hover svg {
    transform: scale(1.08);
}

.favourite-button.is-favourite {
    color: #ff8fe2;
    border-color: rgba(255, 111, 216, 0.38);
    background: linear-gradient(135deg, rgba(255, 88, 194, 0.17), rgba(139, 92, 246, 0.13));
    box-shadow: 0 0 24px rgba(255, 83, 196, 0.14), inset 0 1px 0 rgba(255,255,255,0.05);
}

.favourite-button.is-favourite svg {
    fill: currentColor;
    filter: drop-shadow(0 0 7px rgba(255, 112, 216, 0.7));
}

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

.track-card__favourite {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 50%;
    background: rgba(255,255,255,0.025);
    color: #66718a;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.track-card__favourite:hover {
    color: #ffc0ea;
    transform: scale(1.06);
    border-color: rgba(255, 111, 216, 0.28);
}

.section-heading__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.favourite-manager-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: rgba(255, 111, 216, 0.16);
}

.favourite-manager-button > span:first-child {
    color: #ff8fe2;
    text-shadow: 0 0 14px rgba(255, 111, 216, 0.55);
}

.favourite-manager-button b {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 111, 216, 0.11);
    color: #ffc8ed;
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.library-scope {
    width: fit-content;
    margin-top: 24px;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(203, 220, 255, 0.1);
    border-radius: 999px;
    background: rgba(3, 5, 11, 0.42);
}

.library-scope__button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: transparent;
    color: #737e97;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.library-scope__button:hover {
    color: #eaf2ff;
}

.library-scope__button.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(93, 213, 255, 0.14), rgba(160, 91, 255, 0.15));
    box-shadow: inset 0 0 0 1px rgba(167, 226, 255, 0.11);
}

.library-scope__button[data-library-scope="favourites"].is-active {
    background: linear-gradient(135deg, rgba(255, 82, 188, 0.16), rgba(137, 94, 255, 0.16));
    box-shadow: inset 0 0 0 1px rgba(255, 174, 228, 0.14), 0 0 22px rgba(255, 74, 192, 0.07);
}

.favourites-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: min(820px, calc(100vh - 28px));
    padding: 0;
    border: 1px solid rgba(204, 220, 255, 0.17);
    border-radius: 26px;
    background: rgba(8, 11, 21, 0.96);
    color: var(--text);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72), 0 0 90px rgba(132, 82, 255, 0.09);
    backdrop-filter: blur(28px) saturate(130%);
}

.favourites-dialog::backdrop {
    background: rgba(1, 2, 7, 0.76);
    backdrop-filter: blur(14px);
}

.favourites-dialog__shell {
    padding: clamp(20px, 4vw, 36px);
    display: grid;
    gap: 16px;
}

.favourites-dialog__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.favourites-dialog__header h2 {
    margin: 6px 0 5px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.favourites-dialog__header p:last-child,
.favourites-dialog__panel p,
.favourites-dialog__footer {
    color: #8792aa;
}

.favourites-dialog__panel {
    padding: 20px;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(203, 220, 255, 0.09);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.025), rgba(112, 65, 255, 0.025));
}

.favourites-dialog__panel h3 {
    margin: 5px 0 3px;
    font-size: 1.15rem;
}

.favourites-dialog__panel p {
    margin: 0;
    font-size: 0.82rem;
}

.favourites-dialog__panel > .accent-button {
    justify-self: start;
}

.recovery-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 119, 220, 0.2);
    border-radius: 14px;
    background: rgba(255, 83, 197, 0.055);
}

.recovery-code-box code {
    flex: 1;
    overflow-wrap: anywhere;
    color: #ffd3f1;
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 2.2vw, 0.95rem);
    letter-spacing: 0.08em;
}

.favourites-dialog__note {
    color: #657089 !important;
    font-size: 0.69rem !important;
}

.restore-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.restore-row input {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid rgba(203, 220, 255, 0.12);
    border-radius: 12px;
    outline: 0;
    background: #090d17;
    color: #fff;
    font-family: var(--font-mono);
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.restore-row input:focus {
    border-color: rgba(106, 228, 255, 0.38);
    box-shadow: 0 0 0 4px rgba(106, 228, 255, 0.045);
}

.favourites-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 0.72rem;
}

.danger-button {
    flex: none;
    border: 1px solid rgba(255, 111, 143, 0.2);
    border-radius: 11px;
    padding: 9px 12px;
    background: rgba(255, 64, 109, 0.055);
    color: #ff9bb1;
    cursor: pointer;
}

.danger-button:hover {
    background: rgba(255, 64, 109, 0.11);
    border-color: rgba(255, 111, 143, 0.34);
}

.favourite-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100;
    transform: translateX(-50%);
    padding: 11px 16px;
    border: 1px solid rgba(255, 145, 224, 0.22);
    border-radius: 999px;
    background: rgba(16, 10, 28, 0.92);
    color: #ffe4f6;
    box-shadow: 0 16px 50px rgba(0,0,0,0.5), 0 0 28px rgba(255, 77, 195, 0.12);
    backdrop-filter: blur(18px);
    font-size: 0.78rem;
    font-weight: 700;
    animation: favourite-toast-in 260ms ease both;
}

@keyframes favourite-toast-in {
    from { opacity: 0; transform: translate(-50%, 12px) scale(0.97); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (max-width: 760px) {
    .section-heading__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .section-heading__actions .text-button,
    .section-heading__actions .accent-button {
        width: 100%;
        justify-content: center;
    }

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

    .track-card__stats {
        display: none;
    }

    .favourites-dialog__footer,
    .restore-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .favourites-dialog__footer .danger-button,
    .restore-row .text-button {
        width: 100%;
    }
}


/* v0.3.2 — portable favourites queue */
.favourites-playback-bar[hidden] {
    display: none !important;
}

.favourites-playback-bar {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) minmax(170px, 220px) auto;
    align-items: center;
    gap: 18px;
    margin: 14px 0 18px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(113, 221, 255, 0.17);
    border-radius: 20px;
    background:
        radial-gradient(circle at 10% 50%, rgba(81, 210, 255, 0.13), transparent 34%),
        linear-gradient(120deg, rgba(22, 31, 52, 0.98), rgba(25, 21, 45, 0.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 16px 42px rgba(0,0,0,0.2);
}

.favourites-playback-bar::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0;
    background: linear-gradient(100deg, transparent 15%, rgba(95, 223, 255, 0.11), rgba(176, 92, 255, 0.12), transparent 85%);
    transform: translateX(-40%);
    transition: opacity 220ms ease;
}

.favourites-playback-bar.is-active {
    border-color: rgba(105, 225, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 18px 50px rgba(31, 111, 180, 0.14);
}

.favourites-playback-bar.is-active::after {
    opacity: 1;
    animation: favourite-queue-sweep 7s linear infinite;
}

.favourites-playback-bar.is-dirty #favourites-queue-status::after {
    content: ' · press Play favourites to rebuild';
    color: #f1b9ff;
}

.favourites-playback-bar__signal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(118, 225, 255, 0.22);
    border-radius: 14px;
    background: rgba(7, 13, 26, 0.46);
}

.favourites-playback-bar__signal i {
    width: 3px;
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(180deg, #77e8ff, #9d70ff);
    box-shadow: 0 0 10px rgba(105, 224, 255, 0.32);
}

.favourites-playback-bar__signal i:nth-child(2),
.favourites-playback-bar__signal i:nth-child(4) { height: 20px; }
.favourites-playback-bar__signal i:nth-child(3) { height: 29px; }
.favourites-playback-bar.is-active .favourites-playback-bar__signal i {
    animation: favourite-signal 820ms ease-in-out infinite alternate;
}
.favourites-playback-bar.is-active .favourites-playback-bar__signal i:nth-child(2) { animation-delay: -240ms; }
.favourites-playback-bar.is-active .favourites-playback-bar__signal i:nth-child(3) { animation-delay: -430ms; }
.favourites-playback-bar.is-active .favourites-playback-bar__signal i:nth-child(4) { animation-delay: -120ms; }
.favourites-playback-bar.is-active .favourites-playback-bar__signal i:nth-child(5) { animation-delay: -360ms; }

.favourites-playback-bar__copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.favourites-playback-bar__copy strong {
    overflow: hidden;
    color: #f3f5ff;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favourites-playback-bar__copy small {
    color: var(--muted, #9098b1);
    font-family: var(--mono, monospace);
    font-size: 10px;
    letter-spacing: 0.035em;
}

.favourites-playback-bar__mode {
    min-width: 0;
}

.favourites-playback-bar__play {
    min-width: 154px;
    justify-content: center;
}

.favourites-playback-bar__play svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.compact-control.is-disabled {
    opacity: 0.45;
}

@keyframes favourite-signal {
    from { transform: scaleY(0.45); opacity: 0.55; }
    to { transform: scaleY(1.05); opacity: 1; }
}

@keyframes favourite-queue-sweep {
    from { transform: translateX(-55%); }
    to { transform: translateX(55%); }
}

@media (max-width: 980px) {
    .favourites-playback-bar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
    .favourites-playback-bar__mode {
        grid-column: 2 / 3;
    }
    .favourites-playback-bar__play {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
    }
}

@media (max-width: 650px) {
    .favourites-playback-bar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }
    .favourites-playback-bar__mode,
    .favourites-playback-bar__play {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
    }
    .favourites-playback-bar__play {
        min-height: 46px;
    }
}
