/* ================================================================
   RuSound Stream — "Aurora" design system
   Apple Music × Spotify × Linear · premium dark · #FF6A2B
   ================================================================ */

:root {
    /* Canvas */
    --bg:        #09090b;
    --bg-0:      #09090b;
    --bg-1:      #0d0d10;
    --bg-2:      #111114;
    --bg-3:      #16161a;

    /* Glass surfaces */
    --surface:   rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --surface-3: rgba(255, 255, 255, 0.09);
    --solid:     #131316;
    --solid-2:   #18181c;

    /* Hairlines */
    --line:          rgba(255, 255, 255, 0.07);
    --line-2:        rgba(255, 255, 255, 0.12);
    --border:        var(--line);
    --border-strong: var(--line-2);
    --hairline:      rgba(255, 255, 255, 0.05);

    /* Ink */
    --ink:    #f5f5f4;
    --ink-2:  #a8a8ad;
    --ink-3:  #717179;
    --ink-4:  #4a4a52;
    --text:   var(--ink);
    --text-2: var(--ink-2);
    --text-3: var(--ink-3);
    --text-4: var(--ink-4);

    /* Accent — signal orange */
    --accent:        #FF6A2B;
    --accent-up:     #ff8652;
    --accent-down:   #e8541a;
    --accent-2:      #ff4d6d;
    --accent-3:      #2dd4a8;
    --accent-ink:    #ffffff;
    --accent-soft:   rgba(255, 106, 43, 0.13);
    --accent-soft-2: rgba(255, 106, 43, 0.22);

    --grad:   linear-gradient(135deg, #FF6A2B 0%, #ff8652 100%);
    --grad-2: linear-gradient(135deg, #2dd4a8 0%, #FF6A2B 100%);
    --grad-3: linear-gradient(135deg, #ff4d6d 0%, #FF6A2B 100%);

    /* Elevation */
    --sh-sm: 0 1px 2px rgba(0,0,0,0.5);
    --sh-md: 0 8px 24px -6px rgba(0,0,0,0.55);
    --sh-lg: 0 24px 60px -18px rgba(0,0,0,0.8);
    --sh-xl: 0 40px 90px -24px rgba(0,0,0,0.9);
    --sh-accent: 0 8px 32px -8px rgba(255, 106, 43, 0.55);
    --glow: 0 0 0 1px rgba(255,106,43,0.25), 0 0 36px -6px rgba(255,106,43,0.35);
    --shadow-lg: var(--sh-lg);
    --shadow-glow: var(--sh-accent);

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    /* Type */
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --display: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Motion */
    --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.4, 0.5, 1);
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);

    --sidebar-w: 276px;
    --player-h: 92px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ================================================================
   RESET / ROOT LAYOUT
   ================================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

::selection { background: rgba(255,106,43,0.35); color: #fff; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01';
    letter-spacing: -0.011em;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: 1fr var(--player-h);
    grid-template-areas:
        "sidebar main"
        "player  player";
    position: relative;
}

/* Гостевой режим — без сайдбара и полного интерфейса */
body.guest-mode {
    grid-template-columns: 1fr;
    grid-template-areas:
        "main"
        "player";
}
body.guest-mode .sidebar,
body.guest-mode .sidebar-backdrop,
body.guest-mode .topbar { display: none !important; }
body.guest-mode .main { grid-area: main; }
body.guest-mode .content {
    padding: 0;
    max-width: none;
    width: 100%;
    min-height: calc(100dvh - var(--player-h));
}
/* «Моя свобода» в аккаунте — та же полноэкранная страница, что у гостей */
.content:has(> .welcome-view) {
    padding: 0;
    max-width: none;
}
.main .welcome-view {
    min-height: calc(100dvh - var(--player-h));
}

/* Плеер скрыт, пока пользователь не включил трек */
body.no-player { --player-h: 0px; }
body.no-player .player { display: none; }
.player { animation: playerIn 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes playerIn {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

button { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ================================================================
   AMBIENT — aurora wash
   ================================================================ */
.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(58% 42% at 82% -8%,  rgba(255, 106, 43, 0.13), transparent 65%),
        radial-gradient(42% 38% at -6% 18%,  rgba(255, 106, 43, 0.05), transparent 60%),
        radial-gradient(50% 45% at 50% 118%, rgba(45, 212, 168, 0.05), transparent 65%);
}
.ambient::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
    opacity: 0.035;
    mix-blend-mode: overlay;
}
.bg-blobs, .blob { display: none; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    padding: 24px 14px 20px 20px;
    position: relative;
    z-index: 40;
    overflow-y: auto;
    border-right: 1px solid var(--hairline);
    background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent 30%);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.sidebar-backdrop.open { opacity: 1; }

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 24px;
}
.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--sh-accent);
}
.logo-icon-lg {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 16px;
}
.brand-icon {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-copy { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--ink);
}
.logo-tag {
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 3px;
}

.nav { flex: 1; display: flex; flex-direction: column; gap: 28px; padding-top: 4px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-title {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-4);
    padding: 0 12px;
    margin-bottom: 10px;
}
.nav-title::before, .nav-title::after { display: none; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-radius: var(--r-sm);
    transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-item::before { display: none; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; transition: opacity 0.18s, transform 0.25s var(--ease-bounce); }

.nav-item:hover { color: var(--ink); background: var(--surface); }
.nav-item:hover svg { opacity: 1; transform: translateX(1px); }

.nav-item.active {
    color: var(--ink);
    background: var(--surface-2);
    font-weight: 600;
}
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-item.active::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(255,106,43,0.7);
    display: block;
}

.badge {
    margin-left: auto;
    background: var(--surface-3);
    color: var(--ink-3);
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 2px 8px;
    border-radius: var(--r-pill);
}
.badge-new { background: var(--accent-soft-2); color: var(--accent-up); }
.nav-wave .badge-new { background: var(--accent-soft-2); color: var(--accent-up); font-size: 12px; line-height: 1.3; }

.sidebar-footer { padding-top: 18px; }
.powered {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-3);
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
}
.powered strong { color: var(--ink); font-weight: 700; }
.powered-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 10px var(--accent-3);
    animation: blink 2.4s infinite;
    flex-shrink: 0;
}

/* ================================================================
   MAIN
   ================================================================ */
.main {
    grid-area: main;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: calc(16px + var(--safe-top)) calc(36px + var(--safe-right)) 16px calc(36px + var(--safe-left));
    background: rgba(9, 9, 11, 0.72);
    backdrop-filter: saturate(1.6) blur(20px);
    -webkit-backdrop-filter: saturate(1.6) blur(20px);
    border-bottom: 1px solid var(--hairline);
}

.menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.18s var(--ease);
    flex-shrink: 0;
}
.menu-btn svg { width: 18px; height: 18px; }
.menu-btn:hover { color: var(--ink); background: var(--surface-2); }

.nav-arrows { display: flex; gap: 6px; }
.arrow-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s var(--ease);
}
.arrow-btn svg { width: 15px; height: 15px; }
.arrow-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line-2); }
.arrow-btn:active { transform: scale(0.92); }

.search-wrap { flex: 1; max-width: 460px; position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 15px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; transition: color 0.2s; }
.search-wrap:focus-within .search-icon { color: var(--accent); }
#searchInput {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 48px 11px 42px;
    border-radius: var(--r-pill);
    font-size: 13.5px;
    font-family: var(--sans);
    font-weight: 450;
    outline: none;
    transition: border-color 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
#searchInput::placeholder { color: var(--ink-3); }
#searchInput:focus {
    border-color: rgba(255,106,43,0.5);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-wrap kbd {
    position: absolute;
    right: 13px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--ink-3);
    pointer-events: none;
}

.user-area { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
    width: 37px;
    height: 37px;
    border-radius: var(--r-pill);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(0.94); }
.icon-btn .dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg);
}

.avatar {
    width: 37px;
    height: 37px;
    border-radius: var(--r-pill);
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    color: #fff;
    box-shadow: var(--sh-accent);
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
}
button.avatar:hover { transform: scale(1.07); box-shadow: var(--glow); }

/* ================================================================
   CONTENT
   ================================================================ */
.content { padding: 26px 32px 64px; max-width: 1560px; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
    position: relative;
    margin: 2px 0 40px;
    padding: 56px 44px 52px;
    min-height: 340px;
    border-radius: var(--r-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    isolation: isolate;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(255, 106, 43, 0.28), transparent 58%),
        radial-gradient(80% 70% at 82% 88%, rgba(124, 77, 255, 0.1), transparent 55%),
        radial-gradient(70% 60% at 12% 78%, rgba(45, 212, 168, 0.08), transparent 55%),
        linear-gradient(165deg, #151518 0%, #0e0e11 55%, #101013 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hero-inner > * { animation: waveRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero-inner > :nth-child(1) { animation-delay: 0.02s; }
.hero-inner > :nth-child(2) { animation-delay: 0.1s; }
.hero-inner > :nth-child(3) { animation-delay: 0.18s; }
.hero-inner > :nth-child(4) { animation-delay: 0.26s; }
.hero-inner > :nth-child(5) { animation-delay: 0.34s; }
.hero-brand {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    overflow: hidden;
    margin: 0 auto 20px;
    box-shadow: var(--sh-accent), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
}
.hero-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    pointer-events: none;
}
.hero-brand .brand-icon { width: 100%; height: 100%; }
/* Glow orb — по центру сверху */
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,106,43,0.42), rgba(255,106,43,0.1) 42%, transparent 72%);
    filter: blur(44px);
    animation: heroOrb 9s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}
/* Fine grid — симметричная маска */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(85% 85% at 50% 35%, black, transparent 78%);
    -webkit-mask-image: radial-gradient(85% 85% at 50% 35%, black, transparent 78%);
    z-index: -1;
    pointer-events: none;
}
@keyframes heroOrb {
    0%, 100% { transform: translateX(-50%) translate(0, 0) scale(1); opacity: 0.85; }
    50%      { transform: translateX(-50%) translate(-24px, 20px) scale(1.07); opacity: 1; }
}

.hero > * { position: relative; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink-2);
    margin: 0 auto 16px;
}
.hero-eyebrow::before { display: none; }
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.8s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

.hero h1 {
    font-family: var(--display);
    font-size: clamp(34px, 4.2vw, 52px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    max-width: none;
    margin: 0 auto 14px;
    background: linear-gradient(180deg, #ffffff 30%, rgba(255,255,255,0.72));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero h1::first-letter { color: inherit; }
.hero h1 span {
    background: linear-gradient(115deg, #FF6A2B 10%, #ffb38f 50%, #FF6A2B 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: titleShimmer 5s ease-in-out infinite;
}
.hero p {
    font-size: 15px;
    font-weight: 450;
    color: var(--ink-2);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto 26px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-actions .btn-primary {
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--r-pill);
    box-shadow: var(--sh-accent), 0 16px 40px -14px rgba(255, 106, 43, 0.55);
    transition: transform 0.22s var(--ease-bounce), box-shadow 0.22s;
}
.hero-actions .btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--glow), 0 20px 48px -12px rgba(255, 106, 43, 0.62);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    padding: 13px 26px;
    border-radius: var(--r-pill);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.25s var(--ease), background 0.2s;
    will-change: transform;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow), 0 16px 40px -10px rgba(255,106,43,0.55); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.modal .btn-primary, .settings-footer .btn-primary, .auth-form .btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: var(--sh-accent);
}
.modal .btn-ghost, .settings-footer .btn-ghost {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--line);
}
.modal .btn-ghost:hover { background: var(--surface-3); }

/* ================================================================
   SECTIONS
   ================================================================ */
.section { margin-bottom: 42px; }
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 24px;
}
.section-title {
    font-family: var(--display);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--ink);
}
.section-subtitle {
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 450;
    margin-top: 5px;
}
.see-all {
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    transition: all 0.18s var(--ease);
}
.see-all:hover { color: var(--accent); border-color: var(--accent-soft-2); background: var(--accent-soft); }

/* ================================================================
   GRID + CARDS — spotlight hover
   ================================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
    gap: 20px;
}

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--hairline);
    padding: 14px;
    border-radius: var(--r-lg);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s var(--ease);
    will-change: transform;
}
/* Cursor spotlight (app.js feeds --mx / --my) */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 106, 43, 0.1), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
    display: block;
    z-index: 0;
}
.card:hover::before { opacity: 1; }
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 106, 43, 0.25);
    box-shadow: var(--sh-lg), 0 0 40px -12px rgba(255, 106, 43, 0.25);
}
.card > * { position: relative; z-index: 1; }

.card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--solid-2);
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out), filter 0.4s;
}
.card:hover .card-cover img { transform: scale(1.07); }
.card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover .card-cover::after { opacity: 1; }

.card-play {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(14px) scale(0.8);
    opacity: 0;
    transition: all 0.32s var(--ease-bounce);
    box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,0.3);
    z-index: 2;
}
.card-play svg { width: 19px; height: 19px; margin-left: 2px; }
.card:hover .card-play { transform: translateY(0) scale(1); opacity: 1; }
.card-play:hover { transform: scale(1.12) !important; background: var(--accent-up); }
.card-play:active { transform: scale(0.95) !important; }

.card-title {
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.015em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
}
.card-meta {
    font-size: 12.5px;
    font-weight: 450;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   CHART — тренды РФ (как в чартах)
   ================================================================ */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 32px;
}
.chart-col { display: flex; flex-direction: column; gap: 2px; }
.chart-row {
    display: grid;
    grid-template-columns: 44px 1fr 36px 44px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s var(--ease);
}
.chart-row:hover { background: var(--surface-2); }
.chart-row.playing {
    background: var(--accent-soft);
    box-shadow: inset 2px 0 0 var(--accent);
}
.chart-row.playing .chart-title { color: var(--accent-up); }
.chart-cover {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-2);
}
.chart-meta { min-width: 0; }
.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chart-artist {
    font-size: 12.5px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.chart-fav {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ink-3);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.chart-fav svg { width: 18px; height: 18px; }
.chart-fav:hover { color: var(--accent); background: var(--surface-2); }
.chart-fav.active { color: var(--accent-2); }
.chart-dur {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-4);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ================================================================
   TRACK LIST
   ================================================================ */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 10px;
    backdrop-filter: blur(10px);
}
.track-row {
    display: grid;
    grid-template-columns: 40px 52px 1fr 220px 64px 44px;
    align-items: center;
    gap: 16px;
    padding: 9px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s var(--ease);
}
.track-row:hover { background: var(--surface-2); }
.track-row.playing {
    background: var(--accent-soft);
    box-shadow: inset 2px 0 0 var(--accent);
}
.track-row.playing .track-name { color: var(--accent-up); -webkit-text-fill-color: var(--accent-up); background: none; }

.track-num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink-4);
    font-size: 12.5px;
    text-align: center;
}
.track-row:hover .track-num.has-play { display: none; }
.track-row .play-icon { display: none; color: var(--accent); cursor: pointer; }
.track-row:hover .play-icon { display: block; margin: 0 auto; }
.play-icon svg { width: 15px; height: 15px; }

.track-cover {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: var(--sh-sm);
}
.track-info { min-width: 0; }
.track-name {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.track-artist {
    font-size: 12.5px;
    font-weight: 450;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-album {
    font-size: 13px;
    font-weight: 450;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-duration {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--ink-3);
    text-align: right;
}
.track-fav {
    background: none;
    border: none;
    color: var(--ink-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, transform 0.2s var(--ease-bounce);
}
.track-fav svg { width: 17px; height: 17px; }
.track-fav:hover { color: var(--accent-2); transform: scale(1.2); }
.track-fav.active { color: var(--accent-2); }
.track-fav.active svg { fill: var(--accent-2); }

.list-header {
    display: grid;
    grid-template-columns: 40px 52px 1fr 220px 64px 44px;
    gap: 16px;
    padding: 6px 12px 12px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 6px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-4);
}
.list-header span:nth-child(1) { text-align: center; }
.list-header span:nth-child(5) { text-align: right; }

/* ================================================================
   FEATURED STRIP
   ================================================================ */
.featured-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}
.featured-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.22s var(--ease);
}
.featured-card:hover {
    background: var(--surface-2);
    border-color: var(--line-2);
    transform: translateY(-2px);
}
.featured-card img { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }
.featured-info { min-width: 0; flex: 1; }
.featured-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.featured-artist {
    font-size: 12.5px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}
.featured-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-up);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-bounce);
}
.featured-play:hover { background: var(--accent); color: #fff; transform: scale(1.1); box-shadow: var(--sh-accent); }
.featured-play svg { width: 14px; height: 14px; margin-left: 1px; }

/* ================================================================
   GENRE CARDS
   ================================================================ */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.genre-card {
    position: relative;
    height: 130px;
    border-radius: var(--r-lg);
    padding: 22px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    isolation: isolate;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
    box-shadow: var(--sh-md);
}
.genre-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--sh-lg); }
.genre-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, var(--g1), var(--g2));
    opacity: 0.88;
    z-index: -2;
    transition: opacity 0.3s;
}
.genre-card:hover::before { opacity: 1; }
.genre-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(255,255,255,0.2), transparent 55%),
        linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35));
    z-index: -1;
}
.genre-card > * { text-shadow: 0 2px 14px rgba(0,0,0,0.35); }

/* ================================================================
   LOADER / EMPTY / SKELETON
   ================================================================ */
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; gap: 18px; }
.spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--surface-3);
    border-top-color: var(--accent);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--ink-3); font-size: 13px; }

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty { text-align: center; padding: 72px 20px; color: var(--ink-3); }
.empty-brand-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--sh-accent);
}
.empty-brand-icon .brand-icon { width: 100%; height: 100%; }
.empty h3 {
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink);
    font-size: 21px;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.empty p { font-size: 13.5px; color: var(--ink-3); }

/* ================================================================
   PLAYER — floating glass dock
   ================================================================ */
.player {
    grid-area: player;
    position: relative;
    z-index: 100;
    margin: 0 12px 12px;
    padding: 0 20px;
    border-radius: var(--r-lg);
    background: rgba(17, 17, 20, 0.82);
    backdrop-filter: saturate(1.8) blur(28px);
    -webkit-backdrop-filter: saturate(1.8) blur(28px);
    border: 1px solid var(--line);
    box-shadow: var(--sh-xl), inset 0 1px 0 rgba(255,255,255,0.06);
    display: grid;
    grid-template-columns: minmax(180px, 24%) minmax(0, 1fr) minmax(150px, 20%);
    align-items: center;
    gap: 18px;
    overflow: hidden;
}
/* Top accent line */
.player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,106,43,0.4), transparent);
    pointer-events: none;
}

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
#playerCover {
    width: 52px;
    height: 52px;
    border-radius: 11px;
    object-fit: cover;
    background: var(--solid-2);
    box-shadow: var(--sh-md);
    flex-shrink: 0;
}
#playerCover:not([src]), #playerCover[src=""] { background: var(--solid-2); }
#playerCover[src*="assets/icon"] { object-fit: cover; background: transparent; }
.player-info { min-width: 0; flex: 0 1 auto; }
.player-title {
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.player-artist {
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.like-btn {
    background: none;
    border: none;
    color: var(--ink-4);
    cursor: pointer;
    padding: 6px;
    transition: color 0.18s, transform 0.2s var(--ease-bounce);
}
.like-btn svg { width: 17px; height: 17px; }
.like-btn:hover { color: var(--accent-2); transform: scale(1.2); }
.like-btn.active { color: var(--accent-2); }
.like-btn.active svg { fill: var(--accent-2); }

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    min-width: 0;
}
.control-buttons { display: flex; align-items: center; gap: 18px; }
.ctrl-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--ink-2);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, transform 0.15s var(--ease);
}
.ctrl-btn svg { width: 16px; height: 16px; }
.ctrl-btn:hover { color: var(--ink); transform: scale(1.1); }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.active { color: var(--accent); }
.ctrl-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #0b0b0d;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transition: transform 0.22s var(--ease-bounce), background 0.2s, box-shadow 0.25s;
}
.play-btn svg { width: 19px; height: 19px; color: #0b0b0d; transition: color 0.2s; }
.play-btn:hover { transform: scale(1.08); background: var(--accent); box-shadow: var(--sh-accent); }
.play-btn:hover svg { color: #fff; }
.play-btn:active { transform: scale(0.96); }

.progress-wrap { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.time {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 10.5px;
    color: var(--ink-3);
    min-width: 34px;
    flex-shrink: 0;
    text-align: center;
}
.progress {
    flex: 1;
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: height 0.15s;
}
.progress:hover { height: 6px; }
.progress-fill {
    height: 100%;
    background: var(--ink-2);
    border-radius: 999px;
    width: 0;
    transition: width 0.1s linear, background 0.2s;
    position: relative;
}
.progress:hover .progress-fill { background: var(--accent); box-shadow: 0 0 12px rgba(255,106,43,0.5); }
.progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.5);
    transition: transform 0.18s var(--ease-bounce);
    pointer-events: none;
}
.progress:hover .progress-handle { transform: translate(-50%, -50%) scale(1); }

.player-extras { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.player-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 14, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.player-loading.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.player-loading-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    padding: 0 16px;
    text-align: center;
}
.spinner-sm {
    width: 22px;
    height: 22px;
    border-width: 2px;
    flex-shrink: 0;
}
.player.is-loading .ctrl-btn:not(#playBtn) { opacity: 0.45; pointer-events: none; }

/* ================================================================
   NOW PLAYING — mobile full-screen sheet
   ================================================================ */
.now-playing {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
    visibility: hidden;
}
.now-playing.open {
    pointer-events: auto;
    visibility: visible;
}
.now-playing-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.now-playing.open .now-playing-backdrop { opacity: 1; }

.now-playing-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: rgba(14, 14, 17, 0.96);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--line);
    border-bottom: none;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(105%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    touch-action: pan-y;
}
.now-playing.open .now-playing-sheet { transform: translateY(0); }

body.now-playing-open {
    overflow: hidden;
    touch-action: none;
}

.now-playing-grab {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    margin: 4px auto 0;
}
.now-playing-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.now-playing-close svg { width: 20px; height: 20px; }

.now-playing-art {
    position: relative;
    width: min(72vw, 280px);
    aspect-ratio: 1;
    margin-top: 8px;
    touch-action: pan-y;
}
.now-playing-art img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--sh-xl), 0 0 0 1px rgba(255,255,255,0.06);
}
.now-playing-art.swipe-left img { animation: npSwipeLeft 0.22s ease; }
.now-playing-art.swipe-right img { animation: npSwipeRight 0.22s ease; }
@keyframes npSwipeLeft {
    0% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-18px); opacity: 0.5; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes npSwipeRight {
    0% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(18px); opacity: 0.5; }
    100% { transform: translateX(0); opacity: 1; }
}
.now-playing-swipe-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -26px;
    text-align: center;
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.02em;
}

.now-playing-meta {
    text-align: center;
    width: 100%;
    padding: 0 8px;
    margin-top: 10px;
}
.now-playing-title {
    font-size: clamp(20px, 5.5vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.now-playing-artist {
    font-size: 15px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0 4px;
}
.now-playing-progress .progress { height: 6px; }
.now-playing-progress .progress-handle { transform: translate(-50%, -50%) scale(1); }

.now-playing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    width: 100%;
    padding: 8px 0 4px;
}
.np-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s var(--ease), background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.np-btn svg { width: 24px; height: 24px; }
.np-btn:active { transform: scale(0.92); }
.np-btn.np-play {
    width: 72px;
    height: 72px;
    background: #fff;
    color: #0b0b0d;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.np-btn.np-play svg { width: 30px; height: 30px; }

.now-playing-actions {
    display: flex;
    justify-content: center;
    padding-bottom: 4px;
}
.np-like {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.np-like svg { width: 24px; height: 24px; }
.np-like.active { color: var(--accent-2); }
.np-like.active svg { fill: var(--accent-2); }

@media (min-width: 721px) {
    .now-playing { display: none; }
}
.volume input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.volume input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink);
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}
.volume input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); background: var(--accent); }
.volume input[type=range]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink);
    border: none;
    cursor: pointer;
}

/* ================================================================
   TOAST
   ================================================================ */
.toast {
    position: fixed;
    bottom: 122px;
    left: 50%;
    transform: translateX(-50%) translateY(16px) scale(0.97);
    background: rgba(24, 24, 28, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line-2);
    padding: 12px 22px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 550;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: all 0.32s var(--ease-bounce);
    z-index: 1000;
    box-shadow: var(--sh-xl);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ================================================================
   PAGE TITLES
   ================================================================ */
.page-title {
    font-family: var(--display);
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 4px 0 6px;
    color: var(--ink);
}
.page-sub { color: var(--ink-3); font-size: 13px; font-weight: 450; margin-bottom: 26px; }

/* ================================================================
   EQUALIZER
   ================================================================ */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.eq span { width: 2.5px; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq span:nth-child(1) { height: 50%;  animation-delay: -0.55s; }
.eq span:nth-child(2) { height: 100%; animation-delay: -0.38s; }
.eq span:nth-child(3) { height: 70%;  animation-delay: -0.2s; }
.eq span:nth-child(4) { height: 90%; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* ================================================================
   AUTH / PROFILE
   ================================================================ */
.btn-login {
    background: var(--grad);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
    padding: 10px 20px;
    border-radius: var(--r-pill);
    box-shadow: var(--sh-accent);
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.25s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn-login:active { transform: scale(0.96); }

/* Гость: «Присоединиться бесплатно» — главный CTA, «Войти» — тихий */
.btn-join {
    background: var(--grad);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.01em;
    padding: 10px 18px;
    border-radius: var(--r-pill);
    box-shadow: var(--sh-accent);
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.25s;
    white-space: nowrap;
    animation: joinPulse 3.2s ease-in-out infinite;
}
.btn-join:hover { transform: translateY(-1px); box-shadow: var(--glow); animation: none; }
.btn-join:active { transform: scale(0.96); }
@keyframes joinPulse {
    0%, 100% { box-shadow: var(--sh-accent); }
    50%      { box-shadow: 0 0 28px rgba(255, 106, 43, 0.55); }
}
/* рядом с CTA «Войти» становится тихой кнопкой */
.btn-login {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
.btn-login:hover { box-shadow: none; background: rgba(255, 255, 255, 0.12); }

.profile-wrap { position: relative; }
.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: rgba(22, 22, 26, 0.92);
    backdrop-filter: blur(24px);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 16px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: all 0.22s var(--ease-bounce);
    box-shadow: var(--sh-xl);
    z-index: 200;
}
.profile-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.profile-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; margin-bottom: 2px; }
.profile-status { font-size: 12px; color: var(--ink-3); }
.profile-divider { height: 1px; background: var(--line); margin: 12px 0; }
.profile-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s, color 0.15s;
}
.profile-item:hover { background: var(--surface-2); color: var(--ink); }
.profile-item svg { width: 16px; height: 16px; }

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    padding: 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--sh-xl), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: scale(0.95) translateY(18px);
    transition: transform 0.34s var(--ease-bounce);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: var(--surface-3); color: var(--ink); transform: rotate(90deg); }

.auth-hero { text-align: center; margin-bottom: 26px; }
.auth-hero .logo-icon { margin: 0 auto 16px; }
.auth-hero h2 { font-weight: 800; font-size: 25px; letter-spacing: -0.035em; margin-bottom: 7px; }
.auth-hero p { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }

.auth-tabs {
    position: relative;
    display: flex;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--ink-3);
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    z-index: 2;
}
.auth-tab.active { color: #fff; }
.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--grad);
    border-radius: var(--r-pill);
    transition: transform 0.32s var(--ease-bounce);
    z-index: 1;
    box-shadow: var(--sh-accent);
}
.auth-tabs[data-active="register"] .tab-indicator { transform: translateX(100%); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form-field input {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 13px 15px;
    border-radius: var(--r-md);
    font-family: var(--sans);
    font-size: 16px; /* >=16px — iOS Safari не приближает экран при фокусе */
    outline: none;
    transition: all 0.18s var(--ease);
}
.form-field input:focus {
    border-color: rgba(255,106,43,0.55);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field input::placeholder { color: var(--ink-4); }
.pwd-wrap { position: relative; }
.pwd-wrap input { width: 100%; padding-right: 44px; }
.pwd-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    padding: 4px;
}
.pwd-toggle svg { width: 17px; height: 17px; }
.pwd-toggle:hover { color: var(--ink); }
.form-error {
    color: #ff7a64;
    font-size: 13px;
    padding: 11px 14px;
    background: rgba(255, 77, 64, 0.08);
    border: 1px solid rgba(255, 77, 64, 0.25);
    border-radius: var(--r-md);
    display: none;
}
.form-error.show { display: block; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 14.5px; }
.auth-footer { text-align: center; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.auth-footer a { color: var(--accent-up); font-weight: 600; text-decoration: none; margin-left: 6px; }
.auth-footer a:hover { text-decoration: underline; }

/* ================================================================
   SETTINGS
   ================================================================ */
.settings-modal { max-width: 580px; }
.modal-title { font-weight: 800; font-size: 25px; letter-spacing: -0.035em; margin-bottom: 6px; }
.modal-sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 24px; }
.settings-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.setting-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 16px;
    border-radius: var(--r-md);
    transition: background 0.15s;
}
.setting-row:hover { background: var(--surface); }
.setting-info { flex: 1; }
.setting-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; letter-spacing: -0.01em; }
.setting-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.tag-ai {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--grad-2);
    color: #fff;
}

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: all 0.25s var(--ease);
}
.slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.28s var(--ease-bounce);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(255,106,43,0.4); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.settings-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.settings-section-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    margin: 26px 0 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.src-badge { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 8px var(--accent-3); }
.settings-section-sub { color: var(--ink-3); font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.settings-section-sub a { color: var(--accent-up); text-decoration: none; }
.settings-section-sub a:hover { text-decoration: underline; }
.setting-row.setting-col { flex-direction: column; align-items: stretch; gap: 10px; }
.setting-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 14px;
    border-radius: var(--r-md);
    font-family: var(--mono);
    font-size: 12.5px;
    outline: none;
    transition: all 0.18s;
}
.setting-input:focus { border-color: rgba(255,106,43,0.5); box-shadow: 0 0 0 3px var(--accent-soft); }
.setting-info code {
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 5px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-2);
}

.vk-status { margin: 6px 0 0; padding: 11px 14px; border-radius: var(--r-md); font-size: 12.5px; display: none; }
.vk-status.ok   { display: block; background: rgba(45,212,168,0.08); border: 1px solid rgba(45,212,168,0.3);  color: #5ce8c5; }
.vk-status.warn { display: block; background: rgba(255,181,71,0.08); border: 1px solid rgba(255,181,71,0.3);  color: #ffc875; }
.vk-status.err  { display: block; background: rgba(255,77,64,0.08);  border: 1px solid rgba(255,77,64,0.3);   color: #ff8a78; }
.vk-status code { background: rgba(0,0,0,0.3); border: 1px solid var(--line); padding: 1px 5px; font-family: var(--mono); font-size: 11px; }

.vk-setup {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px;
    margin-bottom: 16px;
}
.vk-setup-step { display: flex; gap: 14px; align-items: flex-start; }
.vk-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vk-step-body { flex: 1; min-width: 0; }
.vk-step-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.vk-step-desc { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin-top: 6px; }
.vk-step-desc a { color: var(--accent-up); text-decoration: none; }
.vk-step-desc a:hover { text-decoration: underline; }
.vk-code {
    background: #060608;
    border: 1px solid var(--line);
    color: #ffb38f;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-family: var(--mono);
    font-size: 12px;
    overflow-x: auto;
    margin: 0;
    user-select: all;
}
.vk-conn { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.vk-conn .btn { align-self: flex-start; padding: 10px 18px; font-size: 13px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.vk-conn .btn:hover { background: var(--surface-3); transform: none; }
.vk-conn .btn svg { width: 15px; height: 15px; }

.provider-unconfigured {
    background: var(--surface);
    border: 1px dashed var(--line-2);
    border-radius: var(--r-lg);
    padding: 56px;
    text-align: center;
    margin: 24px 0;
}
.provider-unconfigured-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: var(--grad-2);
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--sh-md);
}
.provider-unconfigured-icon svg { width: 32px; height: 32px; }
.provider-unconfigured h3 { font-weight: 700; font-size: 21px; margin-bottom: 8px; letter-spacing: -0.025em; }
.provider-unconfigured p { color: var(--ink-3); font-size: 13.5px; max-width: 460px; margin: 0 auto 20px; line-height: 1.55; }
.provider-unconfigured-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.provider-unconfigured-actions .btn-primary { background: var(--grad); color: #fff; box-shadow: var(--sh-accent); }
.provider-unconfigured-actions .btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }

/* ================================================================
   SOURCE SWITCHER
   ================================================================ */
.source-switcher { position: relative; flex-shrink: 0; }
.source-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.18s var(--ease);
}
.source-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.source-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex-shrink: 0; }
.src-chev { width: 13px; height: 13px; color: var(--ink-3); transition: transform 0.2s var(--ease); }
.source-switcher.open .src-chev { transform: rotate(180deg); }
.source-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: rgba(22, 22, 26, 0.94);
    backdrop-filter: blur(24px);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.2s var(--ease-bounce);
    z-index: 200;
    box-shadow: var(--sh-xl);
}
.source-switcher.open .source-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.source-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--ink);
    text-align: left;
    padding: 11px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
}
.source-item:hover { background: var(--surface-2); }
.source-item.active { background: var(--accent-soft); }
.source-item-info { flex: 1; min-width: 0; }
.source-item-name { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.source-item-desc { font-size: 11.5px; color: var(--ink-3); }
.source-warn { font-size: 10px; color: #ffc875; margin-top: 2px; }
.source-check { color: var(--accent); opacity: 0; transition: opacity 0.15s; }
.source-item.active .source-check { opacity: 1; }
.source-check svg { width: 15px; height: 15px; }

/* ================================================================
   PILL BUTTON
   ================================================================ */
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 14px 9px 10px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.22s var(--ease);
}
.pill-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-soft-2);
    box-shadow: 0 8px 24px -8px rgba(255,106,43,0.3);
}
.pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--grad);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.pill-icon svg { width: 13px; height: 13px; }
.pill-arrow { width: 13px; height: 13px; opacity: 0.5; transition: transform 0.2s, opacity 0.2s; }
.pill-btn:hover .pill-arrow { transform: translateX(3px); opacity: 1; }

/* ================================================================
   PROMO REC
   ================================================================ */
.promo-rec {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    background:
        radial-gradient(70% 130% at 100% 0%, rgba(255,106,43,0.18), transparent 55%),
        linear-gradient(120deg, #141417, #121215);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-bottom: 36px;
    overflow: hidden;
    box-shadow: var(--sh-md), inset 0 1px 0 rgba(255,255,255,0.05);
    color: #fff;
}
.promo-rec > * { position: relative; }
.promo-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: var(--sh-accent);
}
.promo-icon svg { width: 24px; height: 24px; }
.promo-content { flex: 1; min-width: 0; }
.promo-badge {
    display: inline-block;
    background: var(--accent-soft-2);
    color: var(--accent-up);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    margin-bottom: 9px;
}
.promo-content h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 5px; }
.promo-content p { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; max-width: 540px; }
.promo-rec .btn-primary { flex-shrink: 0; }
.promo-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    background: var(--surface-2);
    border: none;
    color: var(--ink-3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}
.promo-close svg { width: 13px; height: 13px; }
.promo-close:hover { background: var(--surface-3); color: var(--ink); transform: rotate(90deg); }

/* ================================================================
   RECOMMENDATIONS
   ================================================================ */
.rec-hero {
    position: relative;
    background:
        radial-gradient(75% 110% at 92% 0%, rgba(255,106,43,0.22), transparent 58%),
        radial-gradient(60% 100% at 0% 100%, rgba(45,212,168,0.1), transparent 55%),
        linear-gradient(150deg, #141417, #0f0f12);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 30px 34px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.05);
    color: #fff;
}
.rec-hero > * { position: relative; z-index: 1; }
.rec-hero h1 {
    font-size: clamp(24px, 2.8vw, 32px);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
}
.rec-emoji {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--grad);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-accent);
    flex-shrink: 0;
}
.rec-emoji svg { width: 24px; height: 24px; }
.rec-hero p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; max-width: 540px; }
.rec-stats { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.rec-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    padding: 14px 20px;
    border-radius: var(--r-md);
    min-width: 110px;
    backdrop-filter: blur(8px);
}
.rec-stat-num {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}
.rec-stat-label {
    font-size: 10px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

.rec-onboarding {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 40px;
    text-align: center;
}
.rec-onboarding-icon {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    background: var(--grad);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-accent);
    color: #fff;
}
.rec-onboarding-icon svg { width: 36px; height: 36px; }
.rec-onboarding h3 { font-size: 23px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.035em; }
.rec-onboarding p { color: var(--ink-3); font-size: 13.5px; max-width: 420px; margin: 0 auto 24px; line-height: 1.55; }

/* ================================================================
   WELCOME — гостевая страница «Попробуй Мою свободу»
   ================================================================ */
.welcome-view {
    position: relative;
    width: 100%;
    margin: 0;
    padding: calc(32px + var(--safe-top)) calc(24px + var(--safe-right)) 48px calc(24px + var(--safe-left));
    min-height: calc(100dvh - var(--player-h));
    overflow-x: hidden;
    overflow-y: auto;
    background: #07070a;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.guest-mode .ambient { display: none; }
body.guest-mode .welcome-view,
body.guest-mode .wave-view {
    min-height: calc(100dvh - var(--player-h));
}
body.guest-mode .wave-view {
    margin: 0;
    width: 100%;
}
/* мягкое aurora-свечение сверху — без круглого «диска» */
.welcome-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(255, 106, 43, 0.16) 0%,
            rgba(255, 106, 43, 0.05) 14%,
            transparent 42%),
        linear-gradient(118deg,
            transparent 38%,
            rgba(124, 77, 255, 0.07) 58%,
            transparent 78%),
        linear-gradient(248deg,
            transparent 55%,
            rgba(255, 77, 109, 0.05) 72%,
            transparent 88%);
    pointer-events: none;
    animation: welcomeAurora 14s ease-in-out infinite alternate;
}
@keyframes welcomeAurora {
    0%   { opacity: 0.75; filter: hue-rotate(0deg); }
    100% { opacity: 1; filter: hue-rotate(8deg); }
}
/* тонкая сетка, затухает к низу */
.welcome-view::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 45%, transparent 85%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 45%, transparent 85%);
    pointer-events: none;
}
.welcome-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 0 32px;
    text-align: center;
    color: #fff;
}
.welcome-shell > * { animation: waveRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.welcome-shell > :nth-child(2) { animation-delay: 0.08s; }
.welcome-shell > :nth-child(3) { animation-delay: 0.16s; }
.welcome-shell > :nth-child(4) { animation-delay: 0.24s; }
.welcome-shell > :nth-child(5) { animation-delay: 0.3s; }
.welcome-shell > :nth-child(6) { animation-delay: 0.4s; }
.welcome-shell > :nth-child(7) { animation-delay: 0.48s; }

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 18px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-pill);
    backdrop-filter: blur(12px);
}
.welcome-brand {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 18px;
    box-shadow: var(--sh-accent);
}
.welcome-brand .brand-icon { width: 100%; height: 100%; }
.welcome-title {
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 16px;
}
.welcome-title span {
    background: linear-gradient(115deg, #FF6A2B 10%, #ffb38f 50%, #FF6A2B 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: titleShimmer 5s ease-in-out infinite;
}
@keyframes titleShimmer {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}
.welcome-sub {
    color: var(--ink-2);
    font-size: 15.5px;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 34px;
}
.welcome-vibes-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-2);
    margin-bottom: 18px;
}
.welcome-vibes-label::before,
.welcome-vibes-label::after {
    content: '';
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 106, 43, 0.55), transparent);
}
.welcome-vibes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 auto 32px;
    max-width: 380px;
    width: 100%;
}
@media (min-width: 721px) {
    .welcome-vibes {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-width: 720px;
        gap: 14px;
    }
}
.vibe-card {
    position: relative;
    width: 100%;
    min-height: 118px;
    padding: 14px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background:
        linear-gradient(155deg, color-mix(in srgb, var(--v1) 22%, rgba(255,255,255,0.04)), color-mix(in srgb, var(--v2) 14%, rgba(255,255,255,0.02)));
    border: 1px solid color-mix(in srgb, var(--v1) 32%, rgba(255,255,255,0.08));
    border-radius: 18px;
    color: var(--ink);
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.24s var(--ease-bounce), box-shadow 0.24s ease, border-color 0.24s ease;
    animation: waveRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(0.34s + var(--i) * 0.04s);
    overflow: hidden;
    isolation: isolate;
}
.vibe-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--v1) 38%, transparent), transparent 58%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}
.vibe-emoji {
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 26px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.28s var(--ease-bounce), filter 0.28s ease;
    filter: saturate(1.1);
}
.vibe-label {
    position: relative;
    z-index: 1;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
    line-height: 1.2;
}
.vibe-hint {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--v1) 70%, white);
    opacity: 0;
    max-height: 0;
    transition: all 0.22s ease;
}
.vibe-hint svg { width: 10px; height: 10px; }
.vibe-card:hover,
.vibe-card:focus-visible {
    transform: translateY(-4px) scale(1.02);
    border-color: color-mix(in srgb, var(--v1) 55%, white);
    box-shadow:
        0 16px 40px -16px color-mix(in srgb, var(--v1) 55%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.vibe-card:hover .vibe-emoji,
.vibe-card:focus-visible .vibe-emoji {
    transform: scale(1.12) rotate(-4deg);
    filter: saturate(1.3);
}
.vibe-card:hover .vibe-hint,
.vibe-card:focus-visible .vibe-hint {
    opacity: 1;
    max-height: 16px;
}
.vibe-card:active { transform: translateY(-1px) scale(0.99); }
.vibe-card.active {
    border-color: color-mix(in srgb, var(--v1) 65%, white);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--v1) 40%, transparent),
        0 14px 36px -14px color-mix(in srgb, var(--v1) 60%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.vibe-card.active .vibe-glow { opacity: 1; }
.vibe-card.active .vibe-emoji {
    background: color-mix(in srgb, var(--v1) 28%, rgba(0,0,0,0.35));
    border-color: color-mix(in srgb, var(--v1) 45%, transparent);
}
.vibe-card.active .vibe-label { color: #fff; }


.welcome-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}
.welcome-join {
    padding: 15px 30px !important;
    font-size: 15px !important;
    animation: joinPulse 3.2s ease-in-out infinite;
}
.welcome-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--ink-3);
}
.welcome-login-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-up);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.welcome-login-link:hover { color: var(--accent); }

@media (max-width: 720px) {
    .welcome-view { padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right)) 32px calc(16px + var(--safe-left)); }
    body.guest-mode .welcome-view,
    body.guest-mode .wave-view {
        min-height: calc(100dvh - var(--player-h));
    }
    .welcome-shell { padding: 12px 0 16px; }
    .welcome-sub { font-size: 14px; }
    .welcome-vibes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-width: none;
    }
    .vibe-card { min-height: 112px; padding: 12px 8px 10px; }
    .vibe-emoji { width: 46px; height: 46px; font-size: 24px; border-radius: 14px; }
    .vibe-label { font-size: 12px; }
    .welcome-join { width: 100%; justify-content: center; }
    .btn-join { font-size: 11px; padding: 8px 12px; }
}

/* ================================================================
   МОЯ ВОЛНА — immersive
   ================================================================ */
.wave-view {
    position: relative;
    margin: -26px -32px -64px;
    padding: 0 32px 48px;
    min-height: calc(100vh - var(--player-h) - 70px);
    overflow: hidden;
    background: #07070a;
}
/* вращающийся «вихрь» света */
.wave-view::before {
    content: '';
    position: absolute;
    width: 1300px;
    height: 1300px;
    top: 46%;
    left: 64%;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg,
        transparent 0deg,
        rgba(255, 106, 43, 0.14) 55deg,
        transparent 120deg,
        rgba(124, 77, 255, 0.09) 190deg,
        transparent 250deg,
        rgba(255, 77, 109, 0.08) 310deg,
        transparent 360deg);
    border-radius: 50%;
    animation: waveVortex 42s linear infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes waveVortex { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* точечная сетка с мягкой маской */
.wave-view::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 62% 38%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 75% 65% at 62% 38%, #000 0%, transparent 72%);
    z-index: 1;
    pointer-events: none;
}
.wave-bg {
    position: absolute;
    inset: -80px;
    background-size: cover;
    background-position: center;
    filter: blur(100px) saturate(1.4);
    opacity: 0.5;
    transition: background-image 1.2s ease-in-out, opacity 0.6s;
    z-index: 0;
    transform: scale(1.2);
}
.wave-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,8,10,0.55) 0%, rgba(8,8,10,0.75) 50%, rgba(8,8,10,0.97) 100%);
}
.wave-noise { display: none; }
.wave-shell { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding-top: 26px; color: #fff; }

/* ---- сплит-герой, когда волна ещё не запущена ---- */
.wave-shell:has(.wave-cta) {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 20px 56px;
    min-height: calc(100vh - var(--player-h) - 170px);
    padding-top: 12px;
}
.wave-shell:has(.wave-cta) .wave-top { margin: 0; position: relative; z-index: 1; }
.wave-shell:has(.wave-cta) .wave-stage { position: relative; z-index: 1; }
.wave-shell:has(.wave-cta) .wave-queue-wrap { grid-column: 1 / -1; }
/* гигантская призрачная типографика за контентом */
.wave-shell:has(.wave-cta)::before {
    content: 'свобода';
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-54%);
    font-size: clamp(90px, 15vw, 230px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.045);
    z-index: 0;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}
/* увеличенная типографика в сплит-режиме */
.wave-shell:has(.wave-cta) .wave-title-h {
    font-size: clamp(44px, 5.2vw, 74px);
    margin-bottom: 14px;
}
.wave-shell:has(.wave-cta) .wave-sub {
    font-size: 15px;
    margin-bottom: 26px;
}
/* каскадное появление */
.wave-top > * { animation: waveRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.wave-top > :nth-child(1) { animation-delay: 0.02s; }
.wave-top > :nth-child(2) { animation-delay: 0.1s; }
.wave-top > :nth-child(3) { animation-delay: 0.18s; }
.wave-top > :nth-child(4) { animation-delay: 0.26s; }
.wave-cta { animation: waveRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards; }
@keyframes waveRise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wave-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 12px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-pill);
    backdrop-filter: blur(12px);
}
.wave-eyebrow::before { display: none; }

.wave-title-h {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    margin-bottom: 10px;
    background: linear-gradient(115deg, #ffffff 35%, #ffb38f 65%, #FF6A2B 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wave-title-h::first-letter { color: inherit; }
.wave-sub { color: var(--ink-2); font-size: 13.5px; max-width: 560px; line-height: 1.55; margin-bottom: 20px; }

.wave-moods { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.mood-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ink);
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.24s var(--ease-bounce);
    backdrop-filter: blur(12px);
}
.mood-chip:hover {
    background: rgba(255, 106, 43, 0.1);
    border-color: rgba(255, 106, 43, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -10px rgba(255, 106, 43, 0.35);
}
.mood-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--sh-accent);
    transform: translateY(-2px);
}
/* VK 2017 — фирменный синий */
.mood-chip[data-mood="vk"]:hover {
    background: rgba(0, 119, 255, 0.12);
    border-color: rgba(0, 119, 255, 0.45);
    box-shadow: 0 8px 24px -10px rgba(0, 119, 255, 0.45);
}
.mood-chip[data-mood="vk"].active {
    background: #0077ff;
    border-color: #0077ff;
    box-shadow: 0 10px 30px -8px rgba(0, 119, 255, 0.65);
}
.mood-icon { font-size: 15px; line-height: 1; }

.wave-cta { text-align: center; padding: 10px 0 18px; max-width: none; margin: 0 auto; }

/* ---- ЗВУКОВОЙ ПОРТАЛ ---- */
.wave-portal {
    position: relative;
    width: min(330px, 60vw);
    aspect-ratio: 1;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
/* внешний циферблат из штрихов */
.wave-portal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,
        rgba(255, 255, 255, 0.32) 0deg 1.6deg,
        transparent 1.6deg 9deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    animation: wpSpin 50s linear infinite;
    opacity: 0.7;
}
/* бегущая огненная дуга */
.wave-portal::after {
    content: '';
    position: absolute;
    inset: 6.5%;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        transparent 0deg 252deg,
        rgba(255, 106, 43, 0.25) 270deg,
        rgba(255, 106, 43, 0.95) 330deg,
        #ffd9c4 358deg,
        transparent 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    animation: wpSpin 6s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 106, 43, 0.7));
}
@keyframes wpSpin { to { transform: rotate(360deg); } }
/* расходящиеся круги-рябь */
.wp-ring {
    position: absolute;
    inset: 19%;
    border-radius: 50%;
    border: 1px solid rgba(255, 106, 43, 0.55);
    opacity: 0;
    animation: wpRipple 4.2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
    pointer-events: none;
}
.wp-r2 { animation-delay: 1.4s; }
.wp-r3 { animation-delay: 2.8s; }
@keyframes wpRipple {
    0%   { transform: scale(0.55); opacity: 0; }
    12%  { opacity: 0.85; }
    100% { transform: scale(1.28); opacity: 0; }
}
/* орбита со спутником */
.wp-orbit {
    position: absolute;
    inset: 11%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.13);
    animation: wpSpin 16s linear infinite;
    pointer-events: none;
}
.wp-sat {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: #ffd9c4;
    box-shadow: 0 0 16px 4px rgba(255, 106, 43, 0.85);
}
/* светящееся ядро с эквалайзером */
.wp-core {
    position: relative;
    width: 37%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.38), transparent 45%),
        var(--grad);
    box-shadow:
        0 0 70px rgba(255, 106, 43, 0.55),
        0 26px 70px -12px rgba(255, 106, 43, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    display: grid;
    place-items: center;
    animation: wpBreath 4.4s ease-in-out infinite;
    transition: transform 0.32s var(--ease-bounce), box-shadow 0.32s;
    z-index: 2;
}
@keyframes wpBreath {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.055); }
}
.wave-portal:hover .wp-core,
.wave-portal:focus-visible .wp-core {
    transform: scale(1.12);
    box-shadow:
        0 0 100px rgba(255, 106, 43, 0.75),
        0 30px 80px -10px rgba(255, 106, 43, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.wave-portal:hover .wp-ring { animation-duration: 2.4s; }
.wave-portal:active .wp-core { transform: scale(0.98); }
.wp-eq {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 34%;
}
.wp-eq i {
    width: 4.5px;
    height: 100%;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.95);
    transform-origin: bottom;
    animation: wpEq 1.15s ease-in-out infinite;
}
.wp-eq i:nth-child(1) { animation-delay: 0s;    animation-duration: 1.05s; }
.wp-eq i:nth-child(2) { animation-delay: 0.18s; animation-duration: 0.9s; }
.wp-eq i:nth-child(3) { animation-delay: 0.34s; animation-duration: 1.25s; }
.wp-eq i:nth-child(4) { animation-delay: 0.12s; animation-duration: 0.95s; }
.wp-eq i:nth-child(5) { animation-delay: 0.26s; animation-duration: 1.1s; }
@keyframes wpEq {
    0%, 100% { transform: scaleY(0.28); }
    50%      { transform: scaleY(1); }
}

.wave-cta h2 { font-size: 25px; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 7px; }
.wave-cta p { color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.wave-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    background: var(--grad);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,0.25);
    transition: all 0.26s var(--ease-bounce);
}
.wave-start-btn svg { width: 19px; height: 19px; }
.wave-start-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--glow), 0 20px 50px -12px rgba(255,106,43,0.6); }
.wave-start-btn:disabled { opacity: 0.7; cursor: wait; }

.wave-now {
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 330px) 1fr;
    gap: 52px;
    align-items: center;
    padding: 22px 0 14px;
    animation: waveRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
/* призрачное имя артиста за сценой */
.wave-now-ghost {
    position: absolute;
    top: 48%;
    right: -1%;
    transform: translateY(-50%);
    font-size: clamp(70px, 10vw, 160px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    overflow: hidden;
    max-width: 58%;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* ---- ВИНИЛОВАЯ ПЛАСТИНКА ---- */
.wave-disc-zone {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    z-index: 1;
    filter: drop-shadow(0 36px 70px rgba(0, 0, 0, 0.6));
}
.wd-ripple {
    position: absolute;
    inset: -3%;
    border-radius: 50%;
    border: 1px solid rgba(255, 106, 43, 0.45);
    opacity: 0;
    pointer-events: none;
}
.wave-now.playing .wd-ripple { animation: wdRipple 4.8s cubic-bezier(0.2, 0.6, 0.35, 1) infinite; }
.wave-now.playing .wd-rp2 { animation-delay: 1.6s; }
.wave-now.playing .wd-rp3 { animation-delay: 3.2s; }
@keyframes wdRipple {
    0%   { transform: scale(0.92); opacity: 0; }
    14%  { opacity: 0.7; }
    100% { transform: scale(1.32); opacity: 0; }
}
/* прогресс-кольцо вокруг пластинки */
.wave-disc-progress {
    --p: 0%;
    position: absolute;
    inset: -7.5%;
    border-radius: 50%;
    background: conic-gradient(var(--accent) var(--p), rgba(255, 255, 255, 0.08) var(--p));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
    filter: drop-shadow(0 0 8px rgba(255, 106, 43, 0.55));
    pointer-events: none;
}
.wave-disc {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 70px rgba(255, 106, 43, 0.16);
    animation: wdSpin 24s linear infinite;
    animation-play-state: paused;
}
.wave-disc.spinning { animation-play-state: running; }
@keyframes wdSpin { to { transform: rotate(360deg); } }
.wave-disc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* виниловые дорожки поверх обложки */
.wave-disc::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
        transparent 0 5px,
        rgba(0, 0, 0, 0.16) 5.5px 6.5px);
    pointer-events: none;
}
/* блики света */
.wave-disc-shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 215deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.16) 38deg,
        transparent 85deg,
        transparent 185deg,
        rgba(255, 255, 255, 0.08) 230deg,
        transparent 275deg);
    pointer-events: none;
    z-index: 2;
}
/* центральная втулка */
.wave-disc-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #1c1c20, #0a0a0c 70%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.04), 0 0 26px rgba(0, 0, 0, 0.6);
    z-index: 3;
}
.wave-disc-hole::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(255, 106, 43, 0.9);
}

.wave-now-meta { min-width: 0; position: relative; z-index: 1; }
.wave-now-source {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-up);
    margin-bottom: 10px;
}
/* мини-эквалайзер у «сейчас играет» */
.wns-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 12px;
}
.wns-eq i {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
    transform-origin: bottom;
    transform: scaleY(0.3);
    animation: wpEq 1s ease-in-out infinite;
}
.wns-eq i:nth-child(2) { animation-delay: 0.22s; animation-duration: 0.85s; }
.wns-eq i:nth-child(3) { animation-delay: 0.1s; animation-duration: 1.15s; }
.wave-now:not(.playing) .wns-eq i { animation-play-state: paused; }
.wave-now-title {
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.wave-now-artist { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; letter-spacing: -0.015em; }
.wave-now-album {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 22px;
}
.wave-actions { display: flex; align-items: center; gap: 12px; }
.wave-act {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.24s var(--ease-bounce);
    backdrop-filter: blur(16px);
}
.wave-act svg { width: 19px; height: 19px; }
.wave-act:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }
.wave-act-play {
    width: 58px;
    height: 58px;
    background: var(--grad);
    border-color: transparent;
    box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,0.3);
}
.wave-act-play svg { width: 23px; height: 23px; color: #fff; }
.wave-act-play:hover { transform: translateY(-3px) scale(1.05); box-shadow: var(--glow); }
.wave-act-like.active { background: var(--accent-2); border-color: var(--accent-2); }
.wave-act-like.active svg { color: #fff; }
.wave-act-dislike:hover { background: rgba(255, 77, 109, 0.25); border-color: var(--accent-2); }
.wave-act-skip:hover { background: rgba(45, 212, 168, 0.22); border-color: var(--accent-3); }

.wave-queue-wrap { margin-top: 32px; }
.wave-queue-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-3);
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wave-queue-label::before { display: none; }
.wave-queue-count {
    background: var(--accent-soft-2);
    color: var(--accent-up);
    padding: 2px 9px;
    border-radius: var(--r-pill);
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-left: auto;
}
.wave-queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    counter-reset: wq;
}
.wave-q-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    backdrop-filter: blur(10px);
    counter-increment: wq;
    overflow: hidden;
}
.wave-q-item::before {
    content: counter(wq, decimal-leading-zero);
    position: absolute;
    left: 11px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ink-3);
    transition: color 0.2s;
}
.wave-q-item:hover {
    background: rgba(255, 106, 43, 0.08);
    border-color: rgba(255, 106, 43, 0.3);
    transform: translateX(4px);
}
.wave-q-item:hover::before { color: var(--accent-up); }
.wave-q-item img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.wave-q-meta { min-width: 0; flex: 1; }
.wave-q-title {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.wave-q-artist {
    font-size: 11.5px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1280px) {
    .content { padding: 24px 26px 60px; }
    .topbar { padding: calc(14px + var(--safe-top)) calc(26px + var(--safe-right)) 14px calc(26px + var(--safe-left)); }
    .wave-view { margin: -24px -26px -60px; padding: 0 26px 44px; }
}

@media (max-width: 1200px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 16px; }
    .track-row, .list-header { grid-template-columns: 40px 52px 1fr 64px 44px; }
    .track-row > .track-album, .list-header > :nth-child(4) { display: none; }
    .hero { padding: 44px 32px; min-height: 300px; }
}

/* Drawer mode */
@media (max-width: 960px) {
    body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "player";
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 84vw);
        z-index: 100;
        background: rgba(13, 13, 16, 0.97);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-right: 1px solid var(--line-2);
        transform: translateX(-105%);
        transition: transform 0.34s var(--ease-out);
        box-shadow: var(--sh-xl);
        padding: calc(24px + var(--safe-top)) calc(18px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(18px + var(--safe-left));
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.open { display: block; }
    body.nav-open { overflow: hidden; }
    .nav-item.active::after { left: -18px; }

    .menu-btn { display: flex; }
    .nav-arrows { display: none; }

    .wave-now { grid-template-columns: 1fr; gap: 26px; text-align: center; }
    .wave-disc-zone { max-width: 240px; margin: 0 auto; width: 100%; }
    .wave-now-ghost { display: none; }
    .wave-now-source { justify-content: center; }
    .wave-actions { justify-content: center; flex-wrap: wrap; }

    /* портал — в одну колонку */
    .wave-shell:has(.wave-cta) {
        grid-template-columns: 1fr;
        gap: 6px;
        min-height: 0;
        text-align: center;
    }
    .wave-shell:has(.wave-cta)::before {
        right: 50%;
        transform: translate(50%, -50%);
        top: 56%;
        font-size: clamp(110px, 26vw, 200px);
    }
    .wave-shell:has(.wave-cta) .wave-title-h { font-size: clamp(36px, 8vw, 54px); }
    .wave-shell:has(.wave-cta) .wave-sub { margin-left: auto; margin-right: auto; }
    .wave-shell:has(.wave-cta) .wave-moods { justify-content: center; }
    .wave-view::before { left: 50%; }
    .wave-view::after {
        -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 0%, transparent 75%);
        mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 0%, transparent 75%);
    }
    .promo-rec { flex-wrap: wrap; }
    .promo-rec .btn-primary { width: 100%; justify-content: center; }
    .chart-grid { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 720px) {
    :root { --player-h: calc(132px + var(--safe-bottom)); }

    body:not(.no-player) {
        grid-template-rows: 1fr 0;
    }

    body:not(.no-player) .main {
        padding-bottom: var(--player-h);
    }

    /* iOS Safari зумит поля с font-size < 16px */
    #searchInput,
    .setting-input {
        font-size: 16px;
    }

    .topbar {
        padding: calc(12px + var(--safe-top)) calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left));
        gap: 10px;
    }
    .search-wrap { max-width: none; }
    .search-wrap kbd { display: none; }
    .main {
        -webkit-overflow-scrolling: touch;
    }
    .content { padding: 22px 16px 28px; }

    .welcome-view {
        min-height: calc(100dvh - var(--player-h));
        overflow-x: hidden;
        overflow-y: auto;
        align-items: flex-start;
        padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right)) 32px calc(16px + var(--safe-left));
        -webkit-overflow-scrolling: touch;
    }
    .welcome-shell { padding: 12px 0 16px; }

    body.guest-mode .content {
        min-height: calc(100dvh - var(--player-h));
        padding-bottom: 0;
    }
    body.guest-mode .welcome-view,
    body.guest-mode .wave-view {
        min-height: calc(100dvh - var(--player-h));
    }

    .hero { padding: 36px 22px 34px; min-height: 280px; margin-bottom: 40px; border-radius: var(--r-lg); }
    .hero h1 { font-size: clamp(28px, 8vw, 34px); }
    .hero p { font-size: 14px; margin-bottom: 22px; }
    .hero::before { width: 340px; height: 340px; top: -120px; }
    .hero-brand { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 16px; }

    .section { margin-bottom: 44px; }
    .section-title { font-size: 19px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 13px; }
    .card { padding: 11px; }
    .genre-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .genre-card { height: 110px; font-size: 17px; padding: 16px; }

    .page-title { font-size: 28px; }
    .page-sub { margin-bottom: 26px; }

    /* Mobile player — compact bottom dock */
    .player {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 120;
        display: grid;
        grid-template-areas:
            "track track track"
            "progress progress progress"
            "controls controls controls";
        grid-template-rows: auto auto auto;
        gap: 6px;
        padding: 8px 14px 0;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: #121215;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
    }
    .player::before { display: none; }
    .player-track {
        grid-area: track;
        width: 100%;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        padding: 0;
        gap: 10px;
    }
    .player-track::after {
        content: '';
        width: 22px;
        height: 22px;
        margin-left: 2px;
        flex-shrink: 0;
        opacity: 0.55;
        background: center / 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23717179' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }
    .player-info { flex: 1; min-width: 0; }
    .like-btn {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .like-btn svg { width: 18px; height: 18px; }
    .player-controls {
        display: contents;
    }
    .progress-wrap {
        grid-area: progress;
        max-width: none;
        padding: 0 2px;
        gap: 8px;
    }
    .control-buttons {
        grid-area: controls;
        justify-content: center;
        gap: 28px;
        padding: 0 0 2px;
    }
    .player-extras { display: none; }
    #playerCover { width: 44px; height: 44px; border-radius: 9px; }
    .player-title { font-size: 13.5px; margin-bottom: 2px; }
    .player-artist { font-size: 11.5px; }
    #shuffleBtn, #repeatBtn { display: none; }
    .ctrl-btn:not(.play-btn) {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
    }
    .ctrl-btn:not(.play-btn) svg { width: 19px; height: 19px; }
    .play-btn { width: 46px; height: 46px; }
    .play-btn svg { width: 19px; height: 19px; }
    .progress { height: 3px; }
    .time { font-size: 10px; min-width: 30px; }

    /* Compact track rows */
    .track-row, .list-header { grid-template-columns: 30px 1fr 40px; gap: 12px; }
    .track-row > .track-cover { display: none; }
    .track-row > .track-album,
    .track-row > .track-duration,
    .list-header > :nth-child(2),
    .list-header > :nth-child(4),
    .list-header > :nth-child(5) { display: none; }

    .featured-strip { grid-template-columns: 1fr; }

    .wave-view {
        padding: calc(var(--safe-top) + 8px) calc(16px + var(--safe-right)) 32px calc(16px + var(--safe-left));
        margin: -22px -16px 0;
        min-height: calc(100dvh - var(--player-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .wave-shell { padding-top: 22px; }
    .wave-title-h { font-size: clamp(28px, 8vw, 40px); }
    .wave-now-title { font-size: clamp(22px, 6.5vw, 32px); }
    .wave-now-artist { font-size: 15px; }
    .wave-act { width: 44px; height: 44px; }
    .wave-act-play { width: 54px; height: 54px; }
    .wave-portal { width: min(250px, 68vw); margin-bottom: 18px; }
    .wave-cta h2 { font-size: 21px; }
    .wave-disc-zone { max-width: 200px; }
    .wave-now { gap: 20px; padding-top: 12px; }

    .rec-hero { padding: 28px 22px; }
    .rec-stat { padding: 11px 15px; min-width: 92px; }
    .rec-stat-num { font-size: 21px; }
    .rec-onboarding { padding: 40px 24px; }

    .modal { padding: 26px 22px; border-radius: var(--r-lg); }
    .toast { bottom: calc(var(--player-h) + 8px); max-width: calc(100vw - 32px); text-align: center; }
}

@media (max-width: 400px) {
    .content { padding: 18px 12px 48px; }
    .wave-view { margin: -18px -12px -48px; padding: 0 14px 40px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 11px; }
    .hero h1 { font-size: 26px; }
    .page-title { font-size: 25px; }
    .section-title { font-size: 17px; }
    .hero-actions .btn { padding: 11px 18px; font-size: 13px; }
}

/* ================================================================
   TOUCH + MOTION PREFERENCES
   ================================================================ */
@media (hover: none) {
    .card-play { opacity: 1; transform: translateY(0) scale(1); }
    .card:hover { transform: none; }
    .progress { height: 8px; }
    .progress-handle { transform: translate(-50%, -50%) scale(1); }
    .player-track:active { opacity: 0.85; }
    .vibe-card .vibe-hint { opacity: 0.75; max-height: 16px; }
}

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