        * {
            box-sizing: border-box;
        }

        :root {
            --graphite: #101312;
            --lime: #b7ff4a;
            --lime-2: #8fe83f;
            --lime-3: #d6ff8d;
            --text: #f4f7f2;
            --muted: #aab4ac;
            --danger: #ff6b6b;
            --danger-bg: rgba(255, 107, 107, 0.14);
            --border: rgba(183, 255, 74, 0.18);
            --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
            --site-nav-width: 174px;
            --site-content-offset: 210px;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: Inter, Arial, sans-serif;
            color: var(--text);
            background: #080a09;
            isolation: isolate;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            background:
                radial-gradient(circle at 20% 0%, rgba(183, 255, 74, 0.22), transparent 32%),
                radial-gradient(circle at 88% 18%, rgba(143, 232, 63, 0.14), transparent 30%),
                linear-gradient(135deg, #080a09 0%, #151b18 48%, #263326 100%);
        }

        body.accounts-page {
            height: 100vh;
            min-height: 0;
            overflow: hidden;
        }

        .site-header {
            width: var(--site-nav-width);
            margin: 0;
            padding: 14px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 22px;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: rgba(16, 19, 18, 0.82);
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
            backdrop-filter: blur(20px);
            position: fixed;
            inset: 18px auto 18px 18px;
            z-index: 20;
        }

        .site-brand {
            width: 100%;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: var(--text);
            text-decoration: none;
        }

        .site-brand-logo {
            width: 34px;
            height: 34px;
            object-fit: contain;
            flex: 0 0 auto;
        }

        .site-brand-copy { display: grid; gap: 2px; }
        .site-brand-copy strong { font-size: 14px; letter-spacing: -0.02em; }
        .site-brand-copy small { color: var(--muted); font-size: 9px; }

        .site-tabs {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 6px;
        }

        .site-tab {
            width: 100%;
            min-height: 36px;
            padding: 8px 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid transparent;
            border-radius: 11px;
            color: var(--muted);
            text-decoration: none;
            font-size: 11px;
            font-weight: 900;
            transition: 0.16s ease;
        }

        .site-tab:hover,
        .site-tab:focus-visible {
            color: var(--lime-3);
            border-color: rgba(183, 255, 74, 0.32);
            background: rgba(183, 255, 74, 0.08);
            outline: none;
        }

        .site-tab.active {
            color: var(--graphite);
            border-color: var(--lime);
            background: var(--lime);
        }

        .layout {
            display: grid;
            grid-template-columns: 430px 1fr;
            gap: 18px;
            height: calc(100vh - 76px);
            margin-left: var(--site-content-offset);
            padding: 0 18px 18px;
        }

        .accounts-page .layout {
            height: calc(100vh - 76px);
        }

        .accounts-header {
            height: 76px;
            margin: 0 18px 0 var(--site-content-offset);
            padding-top: 18px;
        }

        .sidebar,
        #publicationList,
        #questionList,
        .modal {
            scrollbar-width: thin;
            scrollbar-color: rgba(183, 255, 74, 0.58) rgba(255, 255, 255, 0.06);
        }

        .sidebar::-webkit-scrollbar,
        #publicationList::-webkit-scrollbar,
        #questionList::-webkit-scrollbar,
        .modal::-webkit-scrollbar {
            width: 9px;
        }

        .sidebar::-webkit-scrollbar-track,
        #publicationList::-webkit-scrollbar-track,
        #questionList::-webkit-scrollbar-track,
        .modal::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.04);
            border-radius: 999px;
        }

        .sidebar::-webkit-scrollbar-thumb,
        #publicationList::-webkit-scrollbar-thumb,
        #questionList::-webkit-scrollbar-thumb,
        .modal::-webkit-scrollbar-thumb {
            border: 2px solid transparent;
            border-radius: 999px;
            background: rgba(183, 255, 74, 0.56);
            background-clip: padding-box;
        }

        .setting-help {
            position: relative;
            width: 17px;
            height: 17px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            border: 1px solid rgba(183, 255, 74, 0.42);
            border-radius: 50%;
            color: var(--lime);
            background: rgba(183, 255, 74, 0.08);
            font-size: 10px;
            font-weight: 900;
            cursor: help;
        }

        .setting-help::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 50%;
            bottom: calc(100% + 9px);
            z-index: 100;
            width: min(300px, 70vw);
            padding: 9px 10px;
            border: 1px solid rgba(183, 255, 74, 0.28);
            border-radius: 10px;
            color: var(--text);
            background: #111713;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
            font-size: 11px;
            font-weight: 600;
            line-height: 1.45;
            text-align: left;
            white-space: normal;
            transform: translate(-50%, 4px);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: 0.14s ease;
        }

        .setting-help:hover::after,
        .setting-help:focus-visible::after {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, 0);
        }

        @media (max-width: 720px) {
            :root { --site-nav-width: 154px; --site-content-offset: 174px; }
            .site-header { inset: 10px auto 10px 10px; padding: 12px 8px; }
            .site-brand { align-items: flex-start; flex-direction: column; }
            .layout { margin-left: var(--site-content-offset); padding-right: 10px; grid-template-columns: minmax(280px, 1fr); height: auto; }
            .accounts-header { margin-left: var(--site-content-offset); margin-right: 10px; }
            body.accounts-page { height: auto; min-height: 100vh; overflow: auto; }
            .accounts-page .layout { height: auto; }
            .viewer { min-height: 420px; }
        }

        .sidebar,
        .viewer {
            border: 1px solid var(--border);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
            box-shadow: var(--shadow);
            backdrop-filter: blur(20px);
        }

        .sidebar {
            border-radius: 24px;
            padding: 18px;
            overflow-y: auto;
        }

        .proxy-panel {
            position: sticky;
            top: 0;
            z-index: 8;
            transition: padding 0.16s ease, border-radius 0.16s ease;
        }

        body.proxy-scroll-compact .sidebar .proxy-form {
            display: none;
        }

        body.proxy-scroll-compact .sidebar .proxy-panel {
            padding: 9px 10px;
            border-radius: 15px;
        }

        body.proxy-scroll-compact .sidebar .proxy-panel .panel-title {
            margin-bottom: 5px;
        }

        .publication-header h1 {
            margin: 0;
            font-size: 28px;
            line-height: 1.15;
            letter-spacing: -0.035em;
        }

        .viewer {
            border-radius: 28px;
            overflow: hidden;
            position: relative;
            min-height: 500px;
        }

        .header {
            margin-bottom: 18px;
        }

        .header-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }


        .header-title-row h1 {
            font-size: 26px;
            letter-spacing: -0.035em;
        }

        .back-link {
            flex: 0 0 auto;
            color: var(--lime);
            text-decoration: none;
            font-weight: 900;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 38px;
            padding: 8px 13px;
            border: 1px solid rgba(183, 255, 74, 0.34);
            border-radius: 11px;
            background: rgba(183, 255, 74, 0.08);
            transition: color 0.16s ease, background 0.16s ease,
                border-color 0.16s ease, transform 0.16s ease;
        }

        .back-link:hover {
            color: var(--lime-3);
            border-color: rgba(183, 255, 74, 0.68);
            background: rgba(183, 255, 74, 0.15);
            transform: translateY(-1px);
        }

        .back-link:focus-visible {
            outline: 2px solid var(--lime);
            outline-offset: 2px;
        }

        .header-links {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 14px;
        }

        .eyebrow {
            color: var(--lime);
            font-size: 12px;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            font-weight: 900;
            margin-bottom: 8px;
        }

        h1 {
            margin: 0;
            font-size: 34px;
            line-height: 1.05;
            letter-spacing: -0.05em;
        }

        .panel {
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(16, 19, 18, 0.66);
            border-radius: 20px;
            padding: 14px;
            margin-bottom: 14px;
        }

        .display-mode-panel {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 12px;
        }

        .display-mode-title {
            color: var(--muted);
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .display-mode-control {
            display: inline-flex;
            align-items: center;
            gap: 7px;
        }

        .display-mode-label {
            color: rgba(244, 247, 242, 0.42);
            font-size: 10px;
            font-weight: 950;
            text-transform: uppercase;
            transition: color 0.18s ease;
        }

        .display-mode-label.active {
            color: var(--lime-3);
        }

        .display-mode-switch {
            position: relative;
            display: inline-flex;
            width: 42px;
            height: 22px;
            cursor: pointer;
        }

        .display-mode-switch input {
            position: absolute;
            opacity: 0;
            width: 1px;
            height: 1px;
            pointer-events: none;
        }

        .display-mode-slider {
            position: absolute;
            inset: 0;
            border: 1px solid rgba(183, 255, 74, 0.22);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            transition: background 0.18s ease, border-color 0.18s ease;
        }

        .display-mode-slider::after {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--lime);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
            transition: transform 0.18s ease;
        }

        .display-mode-switch input:checked + .display-mode-slider {
            background: rgba(183, 255, 74, 0.14);
            border-color: rgba(183, 255, 74, 0.42);
        }

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

        .proxy-panel {
            position: sticky;
            top: 0;
            z-index: 5;
        }

        .panel-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 12px;
            font-weight: 900;
            letter-spacing: -0.02em;
        }

        .counter {
            color: var(--muted);
            font-size: 12px;
        }

        .proxy-form {
            display: grid;
            gap: 8px;
            margin-bottom: 12px;
        }

        .proxy-input-row {
            display: grid;
            grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 44px;
            gap: 8px;
        }

        input,
        select,
        textarea {
            width: 100%;
            border: 1px solid rgba(183, 255, 74, 0.16);
            background: rgba(255, 255, 255, 0.06);
            color: var(--text);
            border-radius: 12px;
            padding: 11px 12px;
            outline: none;
            transition: border-color 0.2s ease, background 0.2s ease;
        }

        select option {
            color: #101312;
        }

        input:focus,
        select:focus,
        textarea:focus {
            border-color: rgba(183, 255, 74, 0.62);
            background: rgba(183, 255, 74, 0.08);
        }

        input::placeholder,
        textarea::placeholder {
            color: rgba(244, 247, 242, 0.38);
        }

        button {
            width: 100%;
            border: 0;
            border-radius: 14px;
            padding: 12px 14px;
            cursor: pointer;
            color: #101312;
            background: linear-gradient(135deg, var(--lime), var(--lime-2));
            font-weight: 950;
            transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
            box-shadow: 0 14px 36px rgba(183, 255, 74, 0.18);
        }

        button:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 18px 44px rgba(183, 255, 74, 0.26);
        }

        button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            box-shadow: none;
        }

        .icon-btn {
            padding: 0;
            height: 42px;
            border-radius: 12px;
            font-size: 22px;
            line-height: 1;
        }

        .small-btn {
            padding: 9px 10px;
            border-radius: 10px;
            font-size: 12px;
        }

        .btn-danger {
            color: #fff;
            background: linear-gradient(135deg, #ff6b6b, #d93636);
            box-shadow: 0 14px 36px rgba(255, 107, 107, 0.18);
        }

        .btn-stop {
            color: #fff;
            background: linear-gradient(135deg, #173a7a, #0b1f48);
            box-shadow: 0 14px 36px rgba(23, 58, 122, 0.22);
        }

        .btn-muted {
            color: var(--text);
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.11);
            box-shadow: none;
        }

        .proxy-list {
            display: grid;
            gap: 8px;
        }

        .proxy-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 44px 104px;
            gap: 8px;
            align-items: center;
            overflow: hidden;
            border: 1px solid rgba(183, 255, 74, 0.12);
            background: rgba(255, 255, 255, 0.045);
            border-radius: 14px;
            padding: 8px;
        }

        .proxy-row > div:first-child {
            min-width: 0;
        }

        .proxy-line {
            min-width: 0;
            font-size: 12px;
            color: var(--lime-3);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .proxy-check {
            font-size: 11px;
            color: var(--muted);
            margin-top: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .check-ok {
            color: var(--lime);
        }

        .check-bad {
            color: var(--danger);
        }

        .actions {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }

        .actions-single {
            grid-template-columns: 1fr;
        }

        .profile-card {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(183, 255, 74, 0.14);
            background:
                linear-gradient(135deg, rgba(183, 255, 74, 0.08), transparent 38%),
                rgba(255, 255, 255, 0.055);
            border-radius: 20px;
            padding: 14px;
            margin-bottom: 12px;
        }

        .profile-card::before {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 100% 0%, rgba(183, 255, 74, 0.16), transparent 32%);
            pointer-events: none;
        }

        .profile-content {
            position: relative;
            z-index: 1;
        }

        .name-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }

        .name {
            font-size: 18px;
            font-weight: 950;
            letter-spacing: -0.03em;
        }

        .meta {
            color: var(--muted);
            font-size: 12px;
            margin-top: 8px;
            line-height: 1.45;
        }

        .account-meta {
            color: var(--lime-3);
        }

        .account-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .account-row span {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .inline-plus {
            width: 32px;
            min-width: 32px;
            height: 28px;
            padding: 0;
            border-radius: 9px;
            font-size: 18px;
            line-height: 1;
            box-shadow: none;
        }

        .history-help {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            margin-left: 4px;
            border-radius: 999px;
            color: var(--lime-3);
            background: rgba(183, 255, 74, 0.12);
            border: 1px solid rgba(183, 255, 74, 0.24);
            font-size: 11px;
            font-weight: 950;
            cursor: help;
            vertical-align: middle;
        }

        .profile-proxy,
        .profile-tag {
            margin-top: 10px;
        }

        .profile-proxy label,
        .profile-tag label {
            display: block;
            color: var(--muted);
            font-size: 11px;
            font-weight: 900;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .min-field-label {
            display: none;
        }

        body.display-mode-min .fingerprint-meta,
        body.display-mode-min .date-meta {
            display: none;
        }

        body.display-mode-min .proxy-form {
            display: none;
        }

        body.display-mode-min .proxy-panel {
            padding-bottom: 11px;
        }

        body.display-mode-min .proxy-panel .panel-title {
            margin-bottom: 8px;
        }

        body.display-mode-min .profiles-list-panel {
            padding: 10px 12px;
        }

        body.display-mode-min .profiles-list-header {
            margin-bottom: 7px;
            gap: 8px;
        }

        body.display-mode-min .profiles-list-title {
            font-size: 14px;
            white-space: nowrap;
        }

        body.display-mode-min .profiles-create-btn {
            min-width: 0;
            width: auto;
            padding: 7px 10px;
            font-size: 11px;
        }

        body.display-mode-min .profile-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        body.display-mode-min .profile-stat {
            flex: 0 1 auto;
            min-width: 0;
            justify-content: flex-start;
            gap: 5px;
            padding: 5px 7px;
            border-radius: 9px;
        }

        body.display-mode-min .profile-stat:first-child {
            grid-column: auto;
        }

        body.display-mode-min .profile-stat-value {
            font-size: 13px;
        }

        body.display-mode-min .profile-stat-label {
            font-size: 9px;
        }

        body.display-mode-min .profile-card {
            padding: 11px 12px;
            margin-bottom: 9px;
        }

        body.display-mode-min .profile-compact-field {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr);
            align-items: center;
            gap: 8px;
            margin-top: 7px;
            min-width: 0;
        }

        body.display-mode-min .profile-compact-field label {
            margin: 0;
            line-height: 1;
            white-space: nowrap;
        }

        body.display-mode-min .full-field-label {
            display: none;
        }

        body.display-mode-min .min-field-label {
            display: inline;
        }

        body.display-mode-min .profile-compact-field select {
            min-width: 0;
            width: 100%;
            height: 34px;
            padding: 6px 30px 6px 9px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        body.display-mode-min .account-meta {
            margin-top: 6px;
        }

        body.display-mode-min .actions {
            margin-top: 9px;
        }

        .profile-tag-select {
            font-weight: 950;
            text-transform: uppercase;
        }

        .tag-none {
            background: rgba(255, 255, 255, 0.08);
            color: var(--muted);
        }

        .tag-authorized {
            background: rgba(39, 214, 99, 0.16);
            color: #60ff93;
        }

        .tag-drop {
            background: rgba(255, 168, 46, 0.18);
            color: #ffb454;
        }

        .tag-block {
            background: var(--danger-bg);
            color: var(--danger);
        }

        select option.tag-none {
            color: #747d78;
        }

        select option.tag-authorized {
            color: #18813d;
        }

        select option.tag-drop {
            color: #a15b00;
        }

        select option.tag-block {
            color: #b21f1f;
        }

        .status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 950;
            text-transform: uppercase;
        }

        .status::before {
            content: "";
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: currentColor;
        }

        .running {
            background: rgba(183, 255, 74, 0.14);
            color: var(--lime);
        }

        .stopped {
            background: rgba(255, 255, 255, 0.08);
            color: var(--muted);
        }

        .error {
            color: #ffd0d0;
            background: var(--danger-bg);
            border: 1px solid rgba(255, 107, 107, 0.22);
            border-radius: 14px;
            padding: 10px 12px;
            margin: 12px 0;
            font-size: 13px;
            display: none;
        }

        .error.show {
            display: block;
        }

        .save-message {
            color: var(--lime-3);
            font-size: 12px;
            margin-top: 8px;
            min-height: 16px;
        }

        .empty {
            border: 1px dashed rgba(183, 255, 74, 0.2);
            border-radius: 20px;
            padding: 18px;
            color: var(--muted);
            text-align: center;
            background: rgba(255, 255, 255, 0.035);
            font-size: 13px;
        }

        .viewer-placeholder,
        .viewer-loading {
            height: 100%;
            min-height: calc(100vh - 36px);
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 32px;
        }

        .viewer-placeholder-card {
            max-width: 480px;
        }

        .viewer-title {
            font-size: 42px;
            line-height: 1;
            font-weight: 950;
            letter-spacing: -0.07em;
            margin-bottom: 14px;
        }

        .viewer-subtitle {
            color: var(--muted);
            line-height: 1.55;
        }

        .loader {
            display: grid;
            place-items: center;
            gap: 18px;
        }

        .spinner {
            width: 54px;
            height: 54px;
            border-radius: 50%;
            border: 4px solid rgba(183, 255, 74, 0.14);
            border-top-color: var(--lime);
            animation: spin 0.9s linear infinite;
        }

        .loading-text {
            font-size: 28px;
            font-weight: 950;
            letter-spacing: -0.05em;
        }

        .loading-subtext {
            color: var(--muted);
            font-size: 14px;
        }

        .viewer iframe {
            width: 100%;
            height: 100%;
            min-height: calc(100vh - 36px);
            border: 0;
            background: var(--graphite);
        }

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

        .modal-backdrop.show {
            display: flex;
        }

        .modal {
            width: min(720px, 100%);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 18px;
            background: linear-gradient(180deg, rgba(25, 31, 29, 0.98), rgba(16, 19, 18, 0.98));
            box-shadow: var(--shadow);
        }

        .modal-header {
            margin-bottom: 12px;
        }

        .modal-title {
            font-size: 24px;
            font-weight: 950;
            letter-spacing: -0.05em;
        }

        .modal-help {
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
            margin-top: 6px;
        }

        .accounts-textarea {
            min-height: 220px;
            resize: vertical;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            line-height: 1.45;
        }

        .single-account-textarea {
            min-height: 92px;
        }

        .modal-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }

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

        @media (max-width: 1000px) {
            .layout {
                grid-template-columns: 1fr;
                height: auto;
            }

            .proxy-input-row,
            .proxy-row,
            .actions {
                grid-template-columns: 1fr;
            }

            .viewer iframe,
            .viewer-placeholder,
            .viewer-loading {
                min-height: 620px;
            }
        }


        /* Глобальная блокировка страницы профилей во время цикла публикаций. */
        body.publication-cycle-locked {
            overflow: hidden;
        }

        body.publication-cycle-locked > .layout,
        body.publication-cycle-locked > .modal-backdrop {
            filter: blur(8px);
            pointer-events: none !important;
            user-select: none;
        }

        .publication-cycle-lock {
            position: fixed;
            inset: 0;
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(4, 7, 5, 0.46);
            backdrop-filter: blur(3px);
        }

        .publication-cycle-lock.show {
            display: flex;
        }

        .publication-cycle-lock-card {
            width: min(720px, 100%);
            padding: 28px 32px;
            border: 1px solid rgba(183, 255, 74, 0.36);
            border-radius: 22px;
            background: rgba(16, 19, 18, 0.96);
            box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
            text-align: center;
        }

        .publication-cycle-lock-title {
            color: var(--text);
            font-size: clamp(22px, 3vw, 34px);
            line-height: 1.25;
            font-weight: 950;
            letter-spacing: -0.035em;
        }


        .profiles-list-panel {
            padding: 14px;
        }

        .profiles-list-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .profiles-list-title {
            font-size: 18px;
            font-weight: 950;
            letter-spacing: -0.03em;
        }

        .profiles-create-btn {
            width: auto;
            min-width: 150px;
            padding: 10px 14px;
        }

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

        .profile-stat {
            min-width: 0;
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.045);
            border-radius: 12px;
            padding: 9px 10px;
        }

        .profile-stat:first-child {
            grid-column: 1 / -1;
        }

        .profile-stat-value {
            font-size: 18px;
            line-height: 1;
            font-weight: 950;
            color: var(--text);
        }

        .profile-stat-label {
            min-width: 0;
            color: var(--muted);
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .profile-stat.tag-authorized {
            border-color: rgba(183, 255, 74, 0.28);
        }

        .profile-stat.tag-drop {
            border-color: rgba(255, 193, 92, 0.32);
        }

        .profile-stat.tag-block {
            border-color: rgba(255, 107, 107, 0.30);
        }


        /* Список профилей теперь является содержимым собственного panel-блока. */
        .profiles-list-title-row {
            min-width: 0;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .profiles-sort-toggle {
            width: 30px;
            min-width: 30px;
            height: 28px;
            min-height: 28px;
            padding: 2px 5px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 1px;
            border-radius: 8px;
            color: var(--muted);
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.10);
            box-shadow: none;
        }

        .profiles-sort-toggle:hover {
            background: rgba(255, 255, 255, 0.10);
        }

        .profiles-sort-toggle .sort-arrow {
            font-size: 13px;
            line-height: 1;
            opacity: 0.34;
            transition: opacity 0.15s ease, color 0.15s ease;
        }

        .profiles-sort-toggle.sort-oldest .sort-arrow-up,
        .profiles-sort-toggle.sort-newest .sort-arrow-down {
            color: var(--lime);
            opacity: 1;
        }

        .profiles-list {
            margin-top: 12px;
        }

        .profiles-list .profile-card:last-child {
            margin-bottom: 0;
        }

        /* MIN: уплотняем только левую колонку ниже блока «Режим отображения». */
        body.display-mode-min .sidebar .proxy-panel,
        body.display-mode-min .sidebar .profiles-list-panel {
            border-radius: 14px;
            padding: 8px 9px;
            margin-bottom: 8px;
        }

        body.display-mode-min .sidebar .proxy-panel .panel-title {
            margin-bottom: 5px;
            gap: 6px;
            font-size: 12px;
        }

        body.display-mode-min .sidebar .proxy-panel .counter {
            font-size: 9px;
        }

        body.display-mode-min .sidebar .proxy-list {
            gap: 4px;
        }

        body.display-mode-min .sidebar .proxy-row {
            grid-template-columns: minmax(0, 1fr) 22px 62px;
            gap: 3px;
            padding: 3px;
            border-radius: 8px;
            align-items: center;
        }

        body.display-mode-min .sidebar .proxy-line {
            font-size: 9px;
            line-height: 1.15;
        }

        body.display-mode-min .sidebar .proxy-check {
            margin-top: 1px;
            font-size: 7px;
            line-height: 1.1;
        }

        body.display-mode-min .sidebar .proxy-row .icon-btn {
            width: 22px;
            min-width: 22px;
            height: 22px;
            min-height: 22px;
            align-self: center;
            padding: 0;
            border-radius: 6px;
            font-size: 15px;
            line-height: 1;
        }

        body.display-mode-min .sidebar .proxy-row .small-btn {
            height: 22px;
            min-height: 22px;
            padding: 2px 4px;
            border-radius: 6px;
            font-size: 8px;
            line-height: 1;
        }

        body.display-mode-min .sidebar .profiles-list-header {
            gap: 6px;
            margin-bottom: 5px;
        }

        body.display-mode-min .sidebar .profiles-list-title-row {
            gap: 5px;
        }

        body.display-mode-min .sidebar .profiles-list-title {
            font-size: 12px;
        }

        body.display-mode-min .sidebar .profiles-sort-toggle {
            width: 24px;
            min-width: 24px;
            height: 22px;
            min-height: 22px;
            padding: 1px 3px;
            border-radius: 6px;
        }

        body.display-mode-min .sidebar .profiles-sort-toggle .sort-arrow {
            font-size: 10px;
        }

        body.display-mode-min .sidebar .profiles-create-btn {
            min-height: 26px;
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 9px;
        }

        body.display-mode-min .sidebar .profile-stats {
            gap: 3px;
        }

        body.display-mode-min .sidebar .profile-stat {
            gap: 3px;
            padding: 3px 5px;
            border-radius: 7px;
        }

        body.display-mode-min .sidebar .profile-stat-value {
            font-size: 10px;
        }

        body.display-mode-min .sidebar .profile-stat-label {
            font-size: 7px;
        }

        body.display-mode-min .sidebar .profiles-list {
            margin-top: 6px;
        }

        body.display-mode-min .sidebar .profile-card {
            padding: 7px 8px;
            margin-bottom: 5px;
            border-radius: 12px;
        }

        body.display-mode-min .sidebar .name-row {
            gap: 6px;
        }

        body.display-mode-min .sidebar .name {
            font-size: 12px;
        }

        body.display-mode-min .sidebar .status {
            padding: 3px 6px;
            border-radius: 999px;
            font-size: 8px;
        }

        body.display-mode-min .sidebar .meta {
            margin-top: 4px;
            font-size: 9px;
            line-height: 1.25;
        }

        body.display-mode-min .sidebar .account-row {
            gap: 4px;
        }

        body.display-mode-min .sidebar .inline-plus {
            width: 24px;
            min-width: 24px;
            height: 22px;
            border-radius: 6px;
            font-size: 14px;
        }

        body.display-mode-min .sidebar .profile-compact-field {
            grid-template-columns: 42px minmax(0, 1fr);
            gap: 5px;
            margin-top: 4px;
        }

        body.display-mode-min .sidebar .profile-compact-field label {
            font-size: 8px;
            letter-spacing: 0.04em;
        }

        body.display-mode-min .sidebar .profile-compact-field select {
            height: 26px;
            padding: 3px 22px 3px 6px;
            border-radius: 7px;
            font-size: 9px;
        }

        body.display-mode-min .sidebar .actions {
            gap: 4px;
            margin-top: 5px;
        }

        body.display-mode-min .sidebar .actions button {
            min-height: 27px;
            padding: 4px 5px;
            border-radius: 8px;
            font-size: 9px;
            box-shadow: none;
        }

        body.display-mode-min .sidebar .empty,
        body.display-mode-min .sidebar .error {
            padding: 7px 8px;
            border-radius: 9px;
            font-size: 9px;
        }

        /* Дополнительное уплотнение прокси в min: высоту определяет содержимое, а не кнопка +. */
        body.display-mode-min .sidebar .proxy-panel {
            padding-top: 6px;
            padding-bottom: 6px;
        }

        body.display-mode-min .sidebar .proxy-panel .panel-title {
            margin-bottom: 4px;
        }

        /* Шапка списка профилей: заголовок, сортировка и создание всегда в одной строке. */
        .profiles-list-header {
            flex-wrap: nowrap;
            gap: 8px;
        }

        .profiles-list-title-row {
            flex: 1 1 auto;
            flex-wrap: nowrap;
            gap: 7px;
            overflow: hidden;
        }

        .profiles-list-title {
            min-width: 0;
            white-space: nowrap;
        }

        .profiles-sort-toggle {
            flex: 0 0 auto;
        }

        .profiles-create-btn {
            flex: 0 0 auto;
            min-width: 0;
            padding: 9px 12px;
            white-space: nowrap;
        }

        /* MIN: немного увеличиваем компактный режим для лучшей читаемости. */
        body.display-mode-min .sidebar .proxy-panel,
        body.display-mode-min .sidebar .profiles-list-panel {
            border-radius: 15px;
            padding: 9px 10px;
            margin-bottom: 9px;
        }

        body.display-mode-min .sidebar .proxy-panel {
            padding-top: 7px;
            padding-bottom: 7px;
        }

        body.display-mode-min .sidebar .proxy-panel .panel-title {
            margin-bottom: 5px;
            gap: 7px;
            font-size: 13px;
        }

        body.display-mode-min .sidebar .proxy-panel .counter {
            font-size: 10px;
        }

        body.display-mode-min .sidebar .proxy-list {
            gap: 5px;
        }

        body.display-mode-min .sidebar .proxy-row {
            grid-template-columns: minmax(0, 1fr) 24px 68px;
            gap: 4px;
            padding: 4px;
            border-radius: 9px;
        }

        body.display-mode-min .sidebar .proxy-line {
            font-size: 10px;
            line-height: 1.2;
        }

        body.display-mode-min .sidebar .proxy-check {
            font-size: 8px;
            line-height: 1.15;
        }

        body.display-mode-min .sidebar .proxy-row .icon-btn {
            width: 24px;
            min-width: 24px;
            height: 24px;
            min-height: 24px;
            border-radius: 7px;
            font-size: 16px;
        }

        body.display-mode-min .sidebar .proxy-row .small-btn {
            height: 24px;
            min-height: 24px;
            padding: 3px 5px;
            border-radius: 7px;
            font-size: 9px;
        }

        body.display-mode-min .sidebar .profiles-list-header {
            gap: 7px;
            margin-bottom: 6px;
        }

        body.display-mode-min .sidebar .profiles-list-title-row {
            gap: 6px;
        }

        body.display-mode-min .sidebar .profiles-list-title {
            font-size: 13px;
        }

        body.display-mode-min .sidebar .profiles-sort-toggle {
            width: 26px;
            min-width: 26px;
            height: 24px;
            min-height: 24px;
            padding: 1px 4px;
            border-radius: 7px;
        }

        body.display-mode-min .sidebar .profiles-sort-toggle .sort-arrow {
            font-size: 11px;
        }

        body.display-mode-min .sidebar .profiles-create-btn {
            min-height: 28px;
            padding: 5px 9px;
            border-radius: 8px;
            font-size: 10px;
        }

        body.display-mode-min .sidebar .profile-stats {
            gap: 4px;
        }

        body.display-mode-min .sidebar .profile-stat {
            gap: 4px;
            padding: 4px 6px;
            border-radius: 8px;
        }

        body.display-mode-min .sidebar .profile-stat-value {
            font-size: 11px;
        }

        body.display-mode-min .sidebar .profile-stat-label {
            font-size: 8px;
        }

        body.display-mode-min .sidebar .profiles-list {
            margin-top: 7px;
        }

        body.display-mode-min .sidebar .profile-card {
            padding: 8px 9px;
            margin-bottom: 6px;
            border-radius: 13px;
        }

        body.display-mode-min .sidebar .name-row {
            gap: 7px;
        }

        body.display-mode-min .sidebar .name {
            font-size: 13px;
        }

        body.display-mode-min .sidebar .status {
            padding: 3px 7px;
            font-size: 9px;
        }

        body.display-mode-min .sidebar .meta {
            margin-top: 5px;
            font-size: 10px;
            line-height: 1.3;
        }

        body.display-mode-min .sidebar .account-row {
            gap: 5px;
        }

        body.display-mode-min .sidebar .inline-plus {
            width: 26px;
            min-width: 26px;
            height: 24px;
            border-radius: 7px;
            font-size: 15px;
        }

        body.display-mode-min .sidebar .profile-compact-field {
            grid-template-columns: 46px minmax(0, 1fr);
            gap: 6px;
            margin-top: 5px;
        }

        body.display-mode-min .sidebar .profile-compact-field label {
            font-size: 9px;
        }

        body.display-mode-min .sidebar .profile-compact-field select {
            height: 28px;
            padding: 4px 24px 4px 7px;
            border-radius: 8px;
            font-size: 10px;
        }

        body.display-mode-min .sidebar .actions {
            gap: 5px;
            margin-top: 6px;
        }

        body.display-mode-min .sidebar .actions button {
            min-height: 29px;
            padding: 5px 6px;
            border-radius: 8px;
            font-size: 10px;
        }

        body.display-mode-min .sidebar .empty,
        body.display-mode-min .sidebar .error {
            padding: 8px 9px;
            border-radius: 10px;
            font-size: 10px;
        }

        .storage-status {
            margin: -2px 0 10px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 9px 10px;
            color: var(--muted);
            background: rgba(255, 255, 255, 0.035);
            font-size: 11px;
            font-weight: 800;
            line-height: 1.25;
        }

        .storage-status-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .storage-status-label {
            color: var(--text);
        }

        .storage-status-value {
            white-space: nowrap;
        }

        .storage-progress {
            position: relative;
            height: 8px;
            margin-top: 7px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.10);
        }

        .storage-progress-fill {
            width: 0;
            height: 100%;
            border-radius: inherit;
            background: #75d45b;
            transition: width 180ms ease, background-color 180ms ease;
        }

        .storage-status-meta {
            margin-top: 5px;
            font-size: 9px;
            font-weight: 700;
            color: var(--muted);
        }

        .storage-status.storage-ok {
            border-color: rgba(117, 212, 91, 0.30);
            background: rgba(117, 212, 91, 0.07);
        }

        .storage-status.storage-ok .storage-status-value {
            color: #9be985;
        }

        .storage-status.storage-ok .storage-progress-fill {
            background: #75d45b;
        }

        .storage-status.storage-warning {
            border-color: rgba(255, 205, 86, 0.38);
            background: rgba(255, 205, 86, 0.08);
        }

        .storage-status.storage-warning .storage-status-value {
            color: #ffd66f;
        }

        .storage-status.storage-warning .storage-progress-fill {
            background: #f1c84b;
        }

        .storage-status.storage-critical,
        .storage-status.storage-error {
            border-color: rgba(255, 107, 107, 0.34);
            background: rgba(255, 107, 107, 0.09);
        }

        .storage-status.storage-critical .storage-status-value,
        .storage-status.storage-error .storage-status-value {
            color: #ff9f9f;
        }

        .storage-status.storage-critical .storage-progress-fill,
        .storage-status.storage-error .storage-progress-fill {
            background: #ff6b6b;
        }

        .storage-status.storage-disabled,
        .storage-status.storage-loading {
            color: var(--muted);
        }

        .profiles-create-btn.storage-blocked {
            cursor: not-allowed;
            opacity: 0.58;
        }

        body.display-mode-min .sidebar .storage-status {
            margin-bottom: 4px;
            padding: 4px 5px;
            border-radius: 6px;
            font-size: 7px;
        }

        body.display-mode-min .sidebar .storage-progress {
            height: 4px;
            margin-top: 3px;
        }

        body.display-mode-min .sidebar .storage-status-meta {
            margin-top: 2px;
            font-size: 6px;
        }
