        :root {
            --bg: #0b1220;
            --bg-soft: rgba(11, 18, 32, 0.72);
            --panel: rgba(14, 24, 43, 0.88);
            --panel-strong: rgba(10, 18, 34, 0.96);
            --card-alt: rgba(13, 23, 43, 0.86);
            --border: rgba(139, 176, 255, 0.18);
            --border-strong: rgba(139, 176, 255, 0.32);
            --text: #f4f7ff;
            --muted: #9fb0cf;
            --accent: #7dc7ff;
            --accent-2: #81f0c9;
            --warning: #ffd87d;
            --shadow: 0 24px 80px rgba(3, 10, 24, 0.48);
            --radius-xl: 28px;
            --radius-lg: 20px;
            --field-bg: rgba(5, 11, 22, 0.58);
            --hero-overlay: linear-gradient(135deg, rgba(6, 14, 28, 0.18), rgba(4, 9, 22, 0.82));
        }

        body.theme-forest {
            --bg: #0d1712;
            --bg-soft: rgba(13, 23, 18, 0.76);
            --panel: rgba(18, 33, 24, 0.9);
            --panel-strong: rgba(12, 24, 18, 0.96);
            --card-alt: rgba(17, 29, 21, 0.9);
            --border: rgba(141, 223, 160, 0.16);
            --border-strong: rgba(141, 223, 160, 0.3);
            --text: #f3fff4;
            --muted: #a2c7aa;
            --accent: #79d78c;
            --accent-2: #b6ffcd;
            --warning: #d0f18c;
            --hero-overlay: linear-gradient(135deg, rgba(14, 25, 18, 0.16), rgba(8, 18, 11, 0.8));
        }

        body.theme-sunset {
            --bg: #1d1011;
            --bg-soft: rgba(29, 16, 17, 0.76);
            --panel: rgba(44, 24, 25, 0.9);
            --panel-strong: rgba(32, 18, 18, 0.96);
            --card-alt: rgba(36, 19, 20, 0.9);
            --border: rgba(255, 173, 128, 0.18);
            --border-strong: rgba(255, 173, 128, 0.3);
            --text: #fff6f0;
            --muted: #e0b7a3;
            --accent: #ff9b6b;
            --accent-2: #ffd27a;
            --warning: #ffd27a;
            --hero-overlay: linear-gradient(135deg, rgba(38, 20, 21, 0.16), rgba(24, 12, 12, 0.82));
        }

        body.theme-mono {
            --bg: #111214;
            --bg-soft: rgba(17, 18, 20, 0.76);
            --panel: rgba(28, 29, 33, 0.9);
            --panel-strong: rgba(19, 20, 22, 0.96);
            --card-alt: rgba(24, 25, 28, 0.9);
            --border: rgba(218, 218, 218, 0.14);
            --border-strong: rgba(218, 218, 218, 0.28);
            --text: #f7f7f7;
            --muted: #b8b8b8;
            --accent: #dddddd;
            --accent-2: #ffffff;
            --warning: #d7d7d7;
            --hero-overlay: linear-gradient(135deg, rgba(25, 25, 28, 0.16), rgba(17, 17, 18, 0.82));
        }

        body.profile-page {
            margin: 0;
            min-height: 100vh;
            color: var(--text);
            font-family: "Trebuchet MS", "Segoe UI", sans-serif;
            background:
                radial-gradient(circle at top left, rgba(125, 199, 255, 0.18), transparent 34%),
                radial-gradient(circle at 82% 18%, rgba(129, 240, 201, 0.12), transparent 26%),
                linear-gradient(180deg, #050a14 0%, var(--bg) 22%, #060b16 100%);
        }

        .profile-shell {
            width: min(1380px, calc(100% - 32px));
            margin: 20px auto 60px;
        }

        .topbar, .panel-card, .hero-card {
            border: 1px solid var(--border);
            box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
            backdrop-filter: blur(14px);
        }

        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
            padding: 14px 18px;
            border-radius: 18px;
            background: var(--bg-soft);
        }

        .brand-link {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            color: var(--text);
            text-decoration: none;
            font-size: 20px;
            font-weight: 700;
        }

        .brand-link::before {
            content: "";
            width: 11px;
            height: 11px;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            box-shadow: 0 0 16px rgba(125, 199, 255, 0.65);
        }

        .topbar-actions, .hero-actions, .hero-quick-actions, .meta-pill-row, .settings-actions, .inline-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        .ghost-link, .hero-link, #vk-login-btn,
        .btn, .btn.secondary, .btn.ghost, .btn.danger {
            border-radius: 999px;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
            transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
        }

        .ghost-link, .hero-link, #vk-login-btn {
            color: var(--text);
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.03);
            padding: 10px 14px;
        }

        .ghost-link:hover, .hero-link:hover, #vk-login-btn:hover,
        .btn:hover, .btn.secondary:hover, .btn.ghost:hover, .btn.danger:hover {
            transform: translateY(-1px);
        }

        .hero-card {
            position: relative;
            overflow: hidden;
            border-radius: var(--radius-xl);
            background:
                radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
                linear-gradient(135deg, rgba(11, 18, 32, 0.82), rgba(8, 13, 28, 0.98));
            box-shadow: var(--shadow);
            margin-bottom: 20px;
            isolation: isolate;
        }

        .hero-cover {
            position: absolute;
            inset: 0;
            background-size: cover;
            background-position: center;
            opacity: 0.92;
            transform: scale(1.03);
        }

        .hero-card::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.08), transparent 24%),
                var(--hero-overlay);
            z-index: 1;
        }

        .hero-layout {
            position: relative;
            z-index: 2;
            display: grid;
            grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
            gap: 22px;
            min-height: 340px;
            padding: 30px;
        }

        .hero-layout > * {
            min-width: 0;
        }

        .hero-main {
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            gap: 18px;
        }

        .profile-identity {
            display: flex;
            align-items: flex-end;
            gap: 18px;
        }

        .profile-avatar {
            width: 124px;
            height: 124px;
            border-radius: 28px;
            object-fit: cover;
            border: 1px solid rgba(255, 255, 255, 0.28);
            box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.05);
        }

        .profile-avatar-fallback {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 42px;
            font-weight: 700;
            color: rgba(238, 244, 255, 0.88);
            background: linear-gradient(145deg, rgba(85, 231, 255, 0.18), rgba(16, 26, 44, 0.92));
        }

        .profile-identity-media-grid {
            display: grid;
            grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
            gap: 16px;
        }

        .profile-media-card {
            display: grid;
            gap: 12px;
            padding: 14px;
            border-radius: 18px;
            border: 1px solid var(--border);
            background: rgba(8, 14, 26, 0.42);
        }

        .profile-media-card-head {
            display: grid;
            gap: 4px;
        }

        .profile-media-preview {
            position: relative;
            overflow: hidden;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background:
                linear-gradient(135deg, rgba(26, 39, 64, 0.9), rgba(11, 18, 32, 0.95));
        }

        .profile-media-preview-avatar {
            width: 132px;
            height: 132px;
            border-radius: 999px;
            margin: 0 auto;
        }

        .profile-media-preview-cover {
            width: 100%;
            aspect-ratio: 3 / 1;
            min-height: 110px;
        }

        .profile-media-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .profile-media-placeholder {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            color: var(--muted);
            font-size: 13px;
            text-align: center;
            padding: 12px;
        }

        .profile-media-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .profile-media-file-btn {
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .identity-kicker, .meta-pill, .public-badge, .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border-radius: 999px;
            font-size: 12px;
            letter-spacing: 0.04em;
        }

        .identity-kicker {
            margin-bottom: 10px;
            padding: 7px 12px;
            background: rgba(5, 11, 22, 0.42);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--muted);
            text-transform: uppercase;
        }

        .profile-title-row {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .profile-title {
            margin: 0;
            font-size: clamp(30px, 4.2vw, 52px);
            line-height: 0.96;
            letter-spacing: -0.03em;
        }

        .public-badge {
            padding: 7px 12px;
            font-weight: 700;
            text-transform: uppercase;
        }

        .public-badge.is-public, .status-badge.live {
            color: #072415;
            background: linear-gradient(135deg, var(--accent-2), #d9ffe9);
        }

        .public-badge.is-private, .status-badge.draft {
            color: #402e07;
            background: linear-gradient(135deg, var(--warning), #ffe9ae);
        }

        .profile-slug, .panel-subtitle, .field-hint, .helper-line, .toggle-copy span, .guestbook-date, .artist-count {
            color: var(--muted);
        }

        .profile-id {
            margin: 6px 0 0;
            color: var(--muted);
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .profile-auth-actions,
        .profile-auth-providers {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
        }

        .profile-auth-providers {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .profile-auth-provider {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 64px;
            padding: 10px 12px;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.035);
            color: var(--text);
            text-decoration: none;
            box-sizing: border-box;
            transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
        }

        a.profile-auth-provider:hover {
            transform: translateY(-1px);
            border-color: var(--border-strong);
            background: rgba(255, 255, 255, 0.06);
        }

        .profile-auth-provider.is-linked {
            background: rgba(255, 255, 255, 0.028);
        }

        .profile-auth-brand {
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 12px;
            color: #fff;
        }

        .profile-auth-brand svg {
            display: block;
        }

        .profile-auth-brand--vk {
            background: #0077ff;
        }

        .profile-auth-brand--yandex {
            background: #fc3f1d;
        }

        .profile-auth-brand--telegram {
            background: #229ed9;
        }

        .profile-auth-provider-copy {
            display: grid;
            gap: 2px;
            min-width: 0;
            flex: 1 1 auto;
        }

        .profile-auth-provider-copy strong {
            color: var(--text);
            font-size: 14px;
            font-weight: 800;
            line-height: 1.2;
        }

        .profile-auth-provider-copy span {
            color: var(--muted);
            font-size: 12px;
            font-weight: 600;
        }

        .profile-auth-provider.is-linked .profile-auth-provider-copy span {
            color: var(--accent-2);
        }

        .profile-auth-provider-btn {
            flex: 0 0 auto;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text);
            font: inherit;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            transition: background 0.18s ease, border-color 0.18s ease;
        }

        .profile-auth-provider-btn:hover:not(:disabled) {
            border-color: rgba(255, 123, 134, 0.45);
            background: rgba(255, 90, 90, 0.14);
        }

        .profile-auth-provider-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .auth-link-error {
            margin: 10px 0 0;
            color: #ffd4d4;
            font-size: 14px;
        }

        .profile-bio {
            margin: 12px 0 0;
            max-width: 700px;
            font-size: 16px;
            line-height: 1.6;
        }

        .hero-stats-panel {
            display: grid;
            gap: 14px;
            align-content: end;
            min-width: 0;
        }

        .hero-stat-grid, .field-grid.two-col {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .hero-stat {
            padding: 16px;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(6, 13, 26, 0.4);
        }

        .hero-stat-value {
            display: block;
            font-size: 28px;
            font-weight: 700;
            line-height: 1;
            margin-bottom: 6px;
        }

        .hero-action-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            min-width: 48px;
            min-height: 48px;
            max-width: 48px;
            max-height: 48px;
            padding: 0;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(6, 13, 26, 0.42);
            overflow: hidden;
            flex: 0 0 auto;
        }

        .hero-action-icon img,
        .hero-action-icon svg {
            width: 22px !important;
            height: 22px !important;
            min-width: 22px;
            min-height: 22px;
            max-width: 22px;
            max-height: 22px;
            object-fit: contain;
            display: block;
            filter: brightness(0) invert(1);
            flex: 0 0 auto;
        }

        .page-grid {
            display: grid;
            gap: 20px;
            grid-template-columns: minmax(0, 1fr);
        }

        .page-grid.with-sidebar {
            grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
            align-items: start;
        }

        .content-stack, .sidebar-stack, .collection-stack, .guestbook-feed, .moderation-feed, .collection-admin-list, .section-form, .settings-form, .choice-grid, .rating-grid {
            display: grid;
            gap: 14px;
        }

        .panel-card {
            border-radius: var(--radius-lg);
            background: var(--panel);
            overflow: hidden;
        }

        .panel-card.compact {
            padding: 18px;
        }

        .panel-header, .panel-body {
            padding: 22px;
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            padding-bottom: 0;
        }

        .panel-header.no-padding {
            padding: 0 0 16px 0;
        }

        .panel-title {
            margin: 0;
            font-size: 22px;
        }

        .meta-pill {
            min-height: 36px;
            padding: 8px 12px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.03);
        }

        .meta-pill-link {
            display: inline-flex;
            align-items: center;
            color: var(--text);
            text-decoration: none;
            transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
        }

        .meta-pill-link:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.14);
            transform: translateY(-1px);
        }

        .profile-art-grid {
            display: grid;
            gap: 14px;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        }

        .profile-art-grid .art-card,
        .collection-preview-grid .art-card {
            display: block;
            padding: 0;
            overflow: hidden;
            border-radius: 18px;
            border: 1px solid var(--border);
            background: var(--card-alt);
            position: relative;
            cursor: pointer;
        }

        .profile-art-grid .art-card > img,
        .collection-preview-grid .art-card > img,
        .artist-card img {
            width: 100%;
            object-fit: cover;
            display: block;
        }

        .profile-art-grid .art-card > img {
            aspect-ratio: 0.84;
        }

        .collection-preview-grid {
            display: grid;
            gap: 10px;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        }

        .collection-preview-grid .art-card > img, .artist-card img {
            aspect-ratio: 1 / 1;
        }

        .art-card-overlay {
            position: absolute;
            inset: auto 10px 10px 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 12px;
            background: linear-gradient(180deg, rgba(4, 8, 16, 0.08), rgba(4, 8, 16, 0.78));
            pointer-events: none;
        }

        .art-card-title {
            min-width: 0;
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .art-card-description {
            min-width: 0;
            font-size: 11px;
            color: rgba(245, 247, 251, 0.7);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
        }

        .panel-note, .empty-state, .collection-card, .guestbook-card, .artist-card, .collection-admin-card, .toggle-row, .choice-pill, .rating-pill, .nickname-editor {
            border-radius: 18px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.03);
        }

        .panel-note, .empty-state, .collection-card, .guestbook-card, .collection-admin-card, .toggle-row, .choice-pill, .rating-pill, .nickname-editor {
            padding: 16px;
        }

        .empty-state strong {
            display: block;
            color: var(--text);
            margin-bottom: 6px;
        }

        .artist-podium {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        }

        .artist-card {
            text-decoration: none;
            color: inherit;
            overflow: hidden;
        }

        .video-title-grid {
            display: grid;
            gap: 14px;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            align-items: start;
        }

        .profile-video-card {
            display: block;
            min-width: 0;
            overflow: hidden;
            border-radius: 18px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.03);
            text-decoration: none;
            color: inherit;
            transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        }

        .profile-video-card:hover {
            border-color: var(--border-strong);
            transform: translateY(-2px);
            box-shadow: 0 14px 28px rgba(3, 10, 24, 0.28);
        }

        .profile-video-poster-shell {
            position: relative;
            overflow: hidden;
        }

        .profile-video-poster {
            width: 100%;
            aspect-ratio: 2 / 3;
            display: block;
            object-fit: cover;
            background: rgba(255, 255, 255, 0.04);
        }

        .profile-video-poster-fallback {
            display: grid;
            place-items: center;
            color: var(--muted);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
        }

        .profile-video-count {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 26px;
            padding: 0 9px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(8, 14, 24, 0.76);
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            backdrop-filter: blur(10px);
        }

        .profile-video-overlay {
            position: absolute;
            inset: auto 0 0;
            padding: 40px 12px 14px;
            background: linear-gradient(180deg, rgba(4, 8, 14, 0) 0%, rgba(4, 8, 14, 0.88) 72%, rgba(4, 8, 14, 0.98) 100%);
            text-align: center;
        }

        .profile-video-title {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            margin: 0;
            color: #fff;
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1.25;
            letter-spacing: 0.01em;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
            word-break: break-word;
        }

        .profile-history-card {
            position: relative;
        }

        .profile-history-link {
            display: block;
            text-decoration: none;
            color: inherit;
        }

        .profile-history-remove {
            position: absolute;
            top: 8px;
            left: 8px;
            z-index: 3;
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(8, 14, 24, 0.82);
            color: #fff;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: grid;
            place-items: center;
            backdrop-filter: blur(8px);
        }

        .profile-history-remove:hover {
            background: rgba(180, 48, 64, 0.88);
            border-color: rgba(255, 160, 170, 0.35);
        }

        /* legacy horizontal cards (if any) */
        .video-title-card {
            display: grid;
            grid-template-columns: 88px minmax(0, 1fr);
            gap: 14px;
            text-decoration: none;
            color: inherit;
            overflow: hidden;
        }

        .video-title-card img {
            width: 100%;
            height: 124px;
            object-fit: cover;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.04);
        }

        .video-title-card-meta {
            display: grid;
            align-content: center;
            gap: 8px;
            min-width: 0;
        }

        .video-title-card-name {
            font-weight: 700;
            font-size: 17px;
            line-height: 1.2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }

        .video-title-card-facts {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .video-title-card-facts span {
            display: inline-flex;
            align-items: center;
            min-height: 28px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.04);
            color: var(--muted);
            font-size: 12px;
        }

        .artist-meta {
            padding: 14px;
        }

        .artist-name, .guestbook-author {
            font-weight: 700;
        }

        .guestbook-card-header, .collection-card-header, .collection-admin-meta, .toggle-row, .helper-line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .guestbook-text {
            white-space: pre-wrap;
            line-height: 1.6;
        }

        .guestbook-card-header {
            align-items: flex-start;
        }

        .guestbook-media {
            display: block;
            margin-top: 14px;
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.02);
        }

        .guestbook-media img {
            display: block;
            width: 100%;
            max-height: 460px;
            object-fit: contain;
            background: rgba(7, 10, 16, 0.65);
        }

        .guestbook-file-input {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .upload-field {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid var(--border);
            background: linear-gradient(180deg, rgba(7, 12, 24, 0.72), rgba(9, 15, 28, 0.96));
        }

        .upload-field-trigger {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: linear-gradient(135deg, rgba(125, 199, 255, 0.2), rgba(129, 240, 201, 0.18));
            color: var(--text);
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
        }

        .upload-field-trigger:hover {
            transform: translateY(-1px);
            border-color: var(--border-strong);
            background: linear-gradient(135deg, rgba(125, 199, 255, 0.28), rgba(129, 240, 201, 0.24));
        }

        .upload-field-trigger::before {
            content: "+";
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            font-size: 16px;
            line-height: 1;
        }

        .upload-field-name {
            min-width: 0;
            color: var(--muted);
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .field-label {
            display: grid;
            gap: 8px;
            color: var(--muted);
            font-size: 13px;
        }

        .field-label strong, .toggle-copy strong, .settings-subsection-head strong, .setting-toggle-copy strong, .setting-toggle-title strong {
            color: var(--text);
            font-size: 14px;
            font-weight: 700;
        }

        .settings-subsection {
            display: grid;
            gap: 12px;
            padding: 14px;
            border-radius: 16px;
            border: 1px solid rgba(129, 240, 201, 0.18);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
        }

        .settings-subsection-head {
            display: grid;
            gap: 4px;
        }

        .settings-subsection-head span {
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
        }

        .settings-toggle-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .settings-toggle-grid > .setting-toggle-card:last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }

        .setting-toggle-card {
            position: relative;
            display: block;
            min-width: 0;
            cursor: pointer;
        }

        .setting-toggle-card input {
            position: absolute;
            opacity: 0;
            width: 1px;
            height: 1px;
            pointer-events: none;
        }

        .setting-toggle-surface {
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            grid-template-areas:
                "title state"
                "desc desc";
            align-items: start;
            gap: 8px 12px;
            padding: 14px;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: rgba(4, 10, 18, 0.48);
            color: var(--muted);
            transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .setting-toggle-card:hover .setting-toggle-surface {
            transform: translateY(-1px);
            border-color: rgba(129, 240, 201, 0.32);
        }

        .setting-toggle-card input:focus-visible + .setting-toggle-surface {
            outline: 2px solid rgba(129, 240, 201, 0.56);
            outline-offset: 2px;
        }

        .setting-toggle-copy {
            display: grid;
            gap: 5px;
            min-width: 0;
        }

        .setting-toggle-title {
            grid-area: title;
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            color: var(--text);
        }

        .setting-toggle-title strong {
            min-width: 0;
        }

        .setting-toggle-title .settings-ico {
            color: var(--accent-2);
        }

        .setting-toggle-desc,
        .setting-toggle-copy span {
            grid-area: desc;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
        }

        .setting-toggle-state {
            grid-area: state;
            align-self: start;
            display: inline-flex;
            align-items: center;
            min-height: 28px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.055);
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0;
            white-space: nowrap;
        }

        .setting-toggle-state .state-on {
            display: none;
        }

        .setting-toggle-card input:checked + .setting-toggle-surface {
            border-color: rgba(129, 240, 201, 0.54);
            background: linear-gradient(145deg, rgba(129, 240, 201, 0.2), rgba(125, 199, 255, 0.11));
            color: var(--text);
            box-shadow: inset 0 0 0 1px rgba(129, 240, 201, 0.1), 0 14px 30px rgba(28, 103, 79, 0.14);
        }

        .setting-toggle-card input:checked + .setting-toggle-surface .setting-toggle-state {
            border-color: rgba(129, 240, 201, 0.5);
            background: rgba(129, 240, 201, 0.18);
            color: var(--accent-2);
        }

        .setting-toggle-card input:checked + .setting-toggle-surface .state-on {
            display: inline;
        }

        .setting-toggle-card input:checked + .setting-toggle-surface .state-off {
            display: none;
        }

        .choice-pill-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .choice-pill-label .settings-ico {
            color: var(--accent-2);
        }

        .choice-pill,
        .rating-pill {
            position: relative;
            cursor: pointer;
            overflow: hidden;
            transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .choice-pill:hover,
        .rating-pill:hover {
            transform: translateY(-1px);
            border-color: rgba(129, 240, 201, 0.3);
        }

        .choice-pill input,
        .rating-pill input {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }

        .choice-pill > span,
        .rating-pill > span {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            pointer-events: none;
            color: var(--muted);
            font-weight: 700;
        }

        .choice-pill > span::after,
        .rating-pill > span::after {
            content: "Скрыто";
            flex: 0 0 auto;
            padding: 5px 9px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.045);
            color: var(--muted);
            font-size: 11px;
            font-weight: 800;
        }

        .rating-pill > span::after {
            content: "Выкл";
        }

        .rating-pill > span {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
        }

        .rating-pill small {
            display: block;
            margin-top: 3px;
            color: var(--muted);
            font-size: 11px;
            font-weight: 600;
        }

        .rating-pill > span::after {
            grid-column: 2;
            grid-row: 1 / span 2;
            align-self: center;
        }

        .choice-pill:has(input:checked),
        .rating-pill:has(input:checked) {
            border-color: rgba(129, 240, 201, 0.52);
            background: linear-gradient(135deg, rgba(129, 240, 201, 0.18), rgba(125, 199, 255, 0.08));
            box-shadow: inset 0 0 0 1px rgba(129, 240, 201, 0.08);
        }

        .choice-pill input:checked + span,
        .rating-pill input:checked + span {
            color: var(--text);
        }

        .choice-pill input:checked + span::after {
            content: "Видно";
            border-color: rgba(129, 240, 201, 0.5);
            background: rgba(129, 240, 201, 0.17);
            color: var(--accent-2);
        }

        .rating-pill input:checked + span::after {
            content: "Вкл";
            border-color: rgba(129, 240, 201, 0.5);
            background: rgba(129, 240, 201, 0.17);
            color: var(--accent-2);
        }

        .text-input, .text-area, .select-input {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--field-bg);
            color: var(--text);
            padding: 12px 14px;
            outline: none;
        }

        .text-area {
            resize: vertical;
            min-height: 112px;
            line-height: 1.55;
        }

        .switch {
            position: relative;
            width: 50px;
            height: 30px;
            flex: 0 0 auto;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch-track {
            position: absolute;
            inset: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
            border: 1px solid rgba(255, 255, 255, 0.12);
        }

        .switch-track::after {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #fff;
            transition: transform 0.22s ease;
        }

        .switch input:checked + .switch-track {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
        }

        .switch input:checked + .switch-track::after {
            transform: translateX(20px);
        }

        .btn, .btn.secondary, .btn.ghost, .btn.danger {
            border: 1px solid transparent;
            padding: 11px 16px;
        }

        .btn {
            color: #04111f;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            box-shadow: 0 12px 28px rgba(125, 199, 255, 0.24);
        }

        .btn.secondary {
            color: var(--text);
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--border);
            box-shadow: none;
        }

        .btn.ghost {
            color: var(--muted);
            background: transparent;
            border-color: var(--border);
        }

        .btn.danger {
            color: #fff2f3;
            background: linear-gradient(135deg, rgba(255, 123, 134, 0.92), rgba(222, 70, 92, 0.9));
        }

        .btn.small {
            padding: 8px 12px;
            font-size: 13px;
        }

        .nickname-editor {
            display: none;
            max-width: 480px;
        }

        .nickname-editor.is-open {
            display: grid;
        }

        .toast {
            position: fixed;
            right: 20px;
            bottom: 20px;
            z-index: 3000;
            min-width: 260px;
            max-width: min(420px, calc(100vw - 32px));
            padding: 14px 16px;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: rgba(8, 15, 28, 0.96);
            color: var(--text);
            transform: translateY(12px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.24s ease, transform 0.24s ease;
        }

        .toast.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .toast.success { border-color: rgba(129, 240, 201, 0.4); }
        .toast.error { border-color: rgba(255, 123, 134, 0.4); }
        .toast.info { border-color: rgba(125, 199, 255, 0.34); }

        .overlay-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(3, 8, 18, 0.86);
            backdrop-filter: blur(12px);
        }

        .overlay-modal.active {
            display: flex;
        }

        .overlay-modal .modal-inner {
            width: min(440px, calc(100vw - 32px));
            padding: 28px;
            border-radius: 24px;
            background: var(--panel-strong);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            display: grid;
            gap: 16px;
        }

        .profile-edit-modal .modal-inner {
            width: min(760px, calc(100vw - 32px));
            max-width: none;
            max-height: calc(100vh - 40px);
            padding: 0;
            overflow: hidden;
            overscroll-behavior: contain;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 0;
        }

        .profile-settings-modal .modal-inner {
            width: min(940px, calc(100vw - 24px));
            height: min(720px, calc(100vh - 32px));
            max-height: calc(100vh - 32px);
            align-items: stretch;
            justify-content: flex-start;
            gap: 0;
        }

        .settings-ico {
            width: 18px;
            height: 18px;
            display: block;
            flex: 0 0 auto;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.7;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .profile-settings-layout {
            display: grid;
            grid-template-columns: 188px minmax(0, 1fr);
            min-height: 0;
            flex: 1 1 auto;
            align-self: stretch;
            width: 100%;
            overflow: hidden;
        }

        .profile-settings-nav {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 14px 12px 16px 16px;
            border-right: 1px solid var(--border);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
        }

        .profile-settings-tab {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            min-height: 42px;
            padding: 8px 12px;
            border: 0;
            border-radius: 14px;
            background: transparent;
            color: var(--muted);
            text-align: left;
            cursor: pointer;
            font: inherit;
            font-size: 14px;
            font-weight: 700;
            transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .profile-settings-tab .settings-ico {
            width: 18px;
            height: 18px;
        }

        .profile-settings-tab:hover {
            color: var(--text);
            background: rgba(255, 255, 255, 0.045);
        }

        .profile-settings-tab.is-active {
            color: var(--text);
            background: linear-gradient(135deg, rgba(129, 240, 201, 0.2), rgba(125, 199, 255, 0.1));
            box-shadow: inset 0 0 0 1px rgba(129, 240, 201, 0.16);
        }

        .profile-settings-tab.is-active .settings-ico {
            color: var(--accent-2);
        }

        .profile-settings-tab:focus-visible {
            outline: 2px solid rgba(129, 240, 201, 0.56);
            outline-offset: 2px;
        }

        .profile-settings-modal .modal-sheet-body {
            display: flex;
            flex-direction: column;
            gap: 0;
            min-height: 0;
            padding: 16px 18px 12px;
            overflow: hidden;
        }

        .profile-settings-panels {
            display: grid;
            gap: 16px;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-right: 6px;
            scrollbar-width: thin;
            scrollbar-color: #4CAF50 #0d1420;
        }

        .profile-settings-panels::-webkit-scrollbar {
            width: 10px;
        }

        .profile-settings-panels::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #0b121d, #0f1725);
            border-radius: 999px;
            border: 1px solid rgba(80, 109, 151, 0.18);
        }

        .profile-settings-panels::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(76, 175, 80, 0.92), rgba(50, 122, 194, 0.92));
            border: 2px solid #0d1420;
        }

        .profile-settings-panel {
            display: grid;
            gap: 16px;
            align-content: start;
        }

        .profile-settings-panel[hidden] {
            display: none !important;
        }

        .settings-section-head {
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }

        .settings-section-ico {
            width: 36px;
            height: 36px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 12px;
            border: 1px solid rgba(129, 240, 201, 0.22);
            background: rgba(129, 240, 201, 0.12);
            color: var(--accent-2);
        }

        .settings-section-title {
            font-size: 18px;
        }

        .settings-section-head .panel-subtitle {
            margin: 4px 0 0;
        }

        .settings-autosave-footer {
            position: sticky;
            bottom: 0;
            justify-content: space-between;
            margin-top: 10px;
            padding-top: 12px;
            border-top: 1px solid var(--border);
            background: linear-gradient(180deg, rgba(10, 18, 34, 0.2), var(--panel-strong) 36%);
        }

        .modal-sheet-header,
        .modal-sheet-body {
            padding: 24px 26px;
        }

        .modal-sheet-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            flex: 0 0 auto;
            align-self: stretch;
            width: 100%;
            box-sizing: border-box;
            border-bottom: 1px solid var(--border);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
        }

        .modal-sheet-body {
            display: grid;
            flex: 1 1 auto;
            min-height: 0;
            gap: 18px;
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: #4CAF50 #0d1420;
            padding-right: 6px;
        }

        .modal-sheet-body::-webkit-scrollbar {
            width: 10px;
        }

        .modal-sheet-body::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #0b121d, #0f1725);
            border-radius: 999px;
            border: 1px solid rgba(80, 109, 151, 0.18);
        }

        .modal-sheet-body::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(76, 175, 80, 0.92), rgba(50, 122, 194, 0.92));
            border: 2px solid #0d1420;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
        }

        .modal-sheet-body::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(105, 214, 109, 0.96), rgba(74, 151, 255, 0.96));
        }

        .modal-sheet-title {
            margin: 0;
            font-size: 24px;
        }

        .modal-sheet-close {
            cursor: pointer;
        }

        .profile-edit-grid {
            display: grid;
            gap: 14px;
        }

        .profile-edit-grid.two-col {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .modal-section-card {
            border: 1px solid var(--border);
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.03);
            padding: 18px;
            display: grid;
            gap: 14px;
        }

        .modal-section-card-slim {
            background: linear-gradient(180deg, rgba(4, 10, 18, 0.34), rgba(255, 255, 255, 0.025));
        }

        .fullscreen-modal {
            position: fixed !important;
            inset: 0 !important;
            left: 0 !important;
            top: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            margin: 0 !important;
            padding: 24px !important;
            display: none;
            align-items: center !important;
            justify-content: center !important;
            z-index: 5000 !important;
            background: rgba(4, 8, 16, 0.92) !important;
            backdrop-filter: blur(12px);
            box-sizing: border-box;
        }

        .fullscreen-modal.show {
            display: flex !important;
        }

        .fullscreen-modal .modal-inner {
            position: relative;
            width: auto !important;
            max-width: min(94vw, 1600px) !important;
            max-height: 94vh !important;
            margin: 0 auto !important;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 15px;
            overflow: visible !important;
        }

        .fullscreen-modal .modal-content {
            max-width: min(92vw, 1500px) !important;
            max-height: 90vh !important;
            width: auto !important;
            height: auto !important;
            margin: 0 auto !important;
            object-fit: contain;
        }

        .cache-message {
            color: var(--muted);
            font-size: 12px;
            text-align: center;
            display: none;
        }

        @media (max-width: 1180px) {
            .hero-layout, .page-grid.with-sidebar {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 760px) {
            .profile-shell {
                width: min(100%, calc(100% - 20px));
                margin-top: 10px;
            }

            .topbar, .hero-layout {
                padding: 14px;
            }

            .profile-identity {
                flex-direction: column;
                align-items: flex-start;
            }

            .profile-avatar {
                width: 96px;
                height: 96px;
                border-radius: 24px;
            }

            .hero-stat-grid, .field-grid.two-col {
                grid-template-columns: 1fr;
            }

            .panel-header, .panel-body {
                padding-left: 16px;
                padding-right: 16px;
            }

            .profile-art-grid, .collection-preview-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px;
            }

            .video-title-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px;
            }

            .profile-video-title {
                font-size: 0.86rem;
                -webkit-line-clamp: 2;
            }

            .profile-video-overlay {
                padding: 28px 10px 12px;
            }

            .profile-art-grid .art-card > img {
                aspect-ratio: 0.78;
            }

            .settings-actions, .inline-actions, .topbar-actions, .hero-actions {
                width: 100%;
            }

            .settings-actions > *, .inline-actions > *, .hero-actions > * {
                flex: 1 1 auto;
                text-align: center;
            }

            .profile-identity-media-grid {
                grid-template-columns: 1fr;
            }

            .profile-edit-grid.two-col {
                grid-template-columns: 1fr;
            }

            .settings-toggle-grid,
            .profile-auth-providers {
                grid-template-columns: 1fr;
            }

            .modal-sheet-header, .modal-sheet-body {
                padding-left: 18px;
                padding-right: 18px;
            }

            .profile-settings-modal {
                padding: 8px;
                align-items: stretch;
            }

            .profile-settings-modal .modal-inner {
                width: 100%;
                min-width: 0;
                max-width: 100%;
                height: auto;
                max-height: none;
                flex: 1 1 auto;
                overflow: hidden;
            }

            .profile-settings-modal .modal-sheet-header > div:first-child {
                min-width: 0;
            }

            .profile-settings-modal .modal-sheet-title {
                font-size: 20px;
            }

            .profile-settings-layout {
                grid-template-columns: minmax(0, 1fr);
                grid-template-rows: auto minmax(0, 1fr);
                min-width: 0;
            }

            .profile-settings-nav {
                display: flex;
                flex-direction: row;
                flex-wrap: nowrap;
                min-width: 0;
                align-items: stretch;
                gap: 4px;
                padding: 10px 8px 8px;
                border-right: 0;
                border-bottom: 1px solid var(--border);
            }

            .profile-settings-tab {
                flex: 1 1 0%;
                flex-direction: column;
                justify-content: center;
                width: auto;
                min-width: 0;
                min-height: 56px;
                gap: 4px;
                padding: 8px 2px;
                font-size: 11px;
                text-align: center;
            }

            .profile-settings-tab span {
                min-width: 0;
                line-height: 1.2;
            }

            .profile-settings-modal .modal-sheet-body {
                padding: 12px 14px 10px;
            }

            .settings-autosave-footer {
                flex-wrap: wrap;
                gap: 8px;
            }

            .settings-autosave-footer .field-hint {
                flex: 1 1 160px;
            }

            .settings-autosave-footer .btn {
                flex: 0 0 auto;
                white-space: nowrap;
            }
        }

/* Profile content tabs */
body.profile-page .hero-card {
    margin-bottom: 6px;
}

.profile-tabs {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: 0 0 18px;
    background:
        linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(6, 11, 20, 0.86));
    backdrop-filter: blur(16px);
}

body.theme-forest .profile-tabs {
    background:
        linear-gradient(180deg, rgba(10, 18, 14, 0.94), rgba(10, 18, 14, 0.86));
}

body.theme-sunset .profile-tabs {
    background:
        linear-gradient(180deg, rgba(22, 12, 13, 0.94), rgba(22, 12, 13, 0.86));
}

body.theme-mono .profile-tabs {
    background:
        linear-gradient(180deg, rgba(14, 14, 16, 0.94), rgba(14, 14, 16, 0.86));
}

.profile-tabs-row {
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
}

.profile-tabs-row::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 10px 14px 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.profile-tab:hover {
    color: var(--text);
}

.profile-tab.is-active {
    color: var(--text);
}

.profile-tab.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--accent);
}

.profile-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 8px;
}

.profile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.profile-tab-count[hidden] {
    display: none !important;
}

.profile-tab-panel[hidden] {
    display: none !important;
}

.profile-tab-toolbar {
    justify-content: flex-end;
}

.collection-card-title {
    font-size: 20px;
}

@media (max-width: 760px) {
    .profile-tab {
        min-height: 42px;
        padding: 8px 10px 10px;
        font-size: 14px;
    }

    .profile-tab.is-active::after {
        left: 8px;
        right: 8px;
    }
}

.profile-stats {
    display: grid;
    gap: 14px;
}

.profile-stats-view {
    display: grid;
    gap: 14px;
}

.profile-stats-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.profile-stats-metric {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 112px;
    padding: 16px 16px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-alt);
}

.profile-stats-metric::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -36px;
    right: -24px;
    width: 120px;
    height: 90px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.18;
    filter: blur(26px);
    pointer-events: none;
}

.profile-stats-metric > * {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.profile-stats-metric.is-hot {
    border-color: var(--border-strong);
}

.profile-stats-metric-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.profile-stats-metric-value {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.profile-stats-metric-unit,
.profile-stats-metric-label,
.profile-stats-metric-detail,
.profile-stats-caption,
.profile-stats-kicker {
    color: var(--muted);
}

.profile-stats-metric-unit {
    font-size: 15px;
    font-weight: 700;
}

.profile-stats-metric-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-stats-metric-detail,
.profile-stats-caption {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
}

.profile-stats-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-alt);
}

.profile-stats-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.profile-stats-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.profile-stats-card-title-spaced,
.profile-stats-kicker-spaced {
    margin-top: 6px;
}

.profile-stats-kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-stats-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.profile-stats-range,
.profile-stats-retry {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.profile-stats-range.is-active {
    border-color: transparent;
    background: var(--accent);
    color: var(--bg);
}

.profile-stats-range:focus-visible,
.profile-stats-retry:focus-visible,
.profile-stats-title:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.profile-stats-plot {
    position: relative;
    min-height: 196px;
}

.profile-stats-svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.profile-stats-svg text {
    fill: var(--muted);
    font-size: 11px;
    font-family: inherit;
}

.profile-stats-gridline,
.profile-stats-guide {
    stroke: var(--border);
    stroke-width: 1;
}

.profile-stats-guide {
    stroke-dasharray: 3 4;
}

.profile-stats-area {
    fill: url(#profile-stats-area);
}

.profile-stats-area-stop-top {
    stop-color: var(--accent);
    stop-opacity: 0.38;
}

.profile-stats-area-stop-bottom {
    stop-color: var(--accent);
    stop-opacity: 0;
}

.profile-stats-line,
.profile-stats-seg {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.profile-stats-seg {
    stroke-width: 12;
}

.profile-stats-seg-1,
.profile-stats-swatch-1 {
    stroke: var(--accent-2);
    background: var(--accent-2);
}

.profile-stats-seg-2,
.profile-stats-swatch-2 {
    stroke: var(--warning);
    background: var(--warning);
}

.profile-stats-seg-3,
.profile-stats-swatch-3 {
    stroke: var(--muted);
    background: var(--muted);
}

.profile-stats-seg-0,
.profile-stats-swatch-0 {
    stroke: var(--accent);
    background: var(--accent);
}

.profile-stats-dot {
    fill: var(--bg);
    stroke: var(--accent);
    stroke-width: 2;
}

.profile-stats-tip {
    position: absolute;
    z-index: 2;
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--panel-strong);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

.profile-stats-tip[hidden] {
    display: none !important;
}

.profile-stats-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 12px;
}

.profile-stats-split > :only-child {
    grid-column: 1 / -1;
}

.profile-stats-cols {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-height: 120px;
}

.profile-stats-col {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 6px;
    min-width: 0;
}

.profile-stats-col-track,
.profile-stats-hour {
    display: flex;
    align-items: flex-end;
    min-height: 88px;
}

.profile-stats-col-track > span,
.profile-stats-hour > span,
.profile-stats-bar > span {
    display: block;
    border-radius: 8px 8px 3px 3px;
    background: var(--accent);
    opacity: 0.55;
}

.profile-stats-col-track > span,
.profile-stats-hour > span {
    width: 100%;
    height: 0;
    transition: height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-stats-col.is-peak > .profile-stats-col-track > span,
.profile-stats-hour.is-peak > span,
.profile-stats-bar > span.is-peak {
    opacity: 1;
}

.profile-stats-col-track.is-on > span,
.profile-stats-hour.is-on > span {
    height: var(--h);
}

.profile-stats-col-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.profile-stats-hours {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 3px;
    min-height: 72px;
}

.profile-stats-hour {
    min-height: 72px;
}

.profile-stats-hours-axis {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.profile-stats-kinds {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-stats-donut {
    transform-origin: 60px 60px;
    transform: rotate(-90deg);
}

.profile-stats-donut-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 12;
}

.profile-stats-donut-value {
    fill: var(--text);
    font-size: 18px;
    font-weight: 800;
    font-family: inherit;
}

.profile-stats-legend {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
    flex: 1;
}

.profile-stats-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
}

.profile-stats-legend-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-stats-legend-value {
    color: var(--muted);
}

.profile-stats-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.profile-stats-genres,
.profile-stats-titles {
    display: grid;
    gap: 12px;
}

.profile-stats-genre-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.profile-stats-genre-head span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.profile-stats-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.profile-stats-bar > span {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-stats-bar.is-on > span {
    width: var(--w);
}

.profile-stats-title {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.profile-stats-poster,
.profile-stats-letter {
    width: 52px;
    height: 74px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.profile-stats-letter {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
}

.profile-stats-title-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.profile-stats-title-name {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-stats-title-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-stats-title:hover .profile-stats-title-name {
    color: var(--accent);
}

.profile-stats-error {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 8px 0 4px;
}

.profile-stats-error p {
    margin: 0;
}

.profile-stats-skeleton {
    display: grid;
    gap: 12px;
}

.profile-stats-bone {
    height: 112px;
    border-radius: 18px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.04) 60%);
    background-size: 220% 100%;
    animation: profile-stats-shimmer 1.4s ease-in-out infinite;
}

.profile-stats-bone-chart {
    height: 240px;
}

.profile-stats-bone-side {
    height: 180px;
}

.profile-stats-view.is-ready > * {
    animation: profile-stats-rise 0.55s ease both;
}

.profile-stats-view.is-ready > *:nth-child(2) { animation-delay: 0.05s; }
.profile-stats-view.is-ready > *:nth-child(3) { animation-delay: 0.1s; }
.profile-stats-view.is-ready > *:nth-child(4) { animation-delay: 0.15s; }

.profile-stats-donut-svg {
    animation: profile-stats-pop 0.7s ease both;
}

@keyframes profile-stats-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes profile-stats-pop {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes profile-stats-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (max-width: 980px) {
    .profile-stats-summary,
    .profile-stats-split,
    .profile-stats-skeleton .profile-stats-split {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .profile-stats-summary,
    .profile-stats-split,
    .profile-stats-skeleton .profile-stats-summary,
    .profile-stats-skeleton .profile-stats-split {
        grid-template-columns: 1fr 1fr;
    }

    .profile-stats-split,
    .profile-stats-skeleton .profile-stats-split {
        grid-template-columns: 1fr;
    }

    .profile-stats-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-stats-metric-value {
        font-size: 28px;
    }

    .profile-stats-kinds {
        align-items: flex-start;
    }
}

.profile-hidden-card {
    margin-bottom: 16px;
}

.profile-hidden-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
}

.profile-hidden-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 280px;
}

.profile-hidden-note {
    margin: 4px 4px 28px;
    color: var(--muted, #9fb0cf);
    font-size: 1rem;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .profile-hidden-layout {
        min-height: 220px;
        padding: 14px;
    }

    .profile-hidden-note {
        margin-left: 2px;
        margin-right: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-stats-view.is-ready > *,
    .profile-stats-donut-svg,
    .profile-stats-bone,
    .profile-stats-col-track > span,
    .profile-stats-hour > span,
    .profile-stats-bar > span,
    .profile-stats-line {
        animation: none;
        transition: none;
    }
}
