.cabinet-shell {
    min-height: 100vh;
    max-width: 820px;
    width: min(100% - 32px, 820px);
    padding-bottom: 52px;
    font-size: var(--type-small);
}

.cabinet-header {
    height: 60px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    display: inline-flex;
    align-items: baseline;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: var(--type-big);
    letter-spacing: -0.06em;
}

.brand-link .brand-main,
.brand-link .brand-accent {
    font-size: inherit !important;
    line-height: 1;
}

.brand-link .brand-accent {
    color: var(--accent-glow);
}

.cabinet-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: var(--type-small);
    font-weight: 700;
}

.cabinet-nav a,
.nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.16s ease, transform 0.16s ease;
}

.cabinet-nav a:hover,
.nav-logout:hover {
    color: #fff;
    transform: translateY(-1px);
}

.nav-logout svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.card-panel {
    background:
        radial-gradient(circle at top right, rgba(125, 53, 19, 0.075), transparent 34%),
        linear-gradient(135deg, rgba(15, 15, 18, 0.98), rgba(18, 14, 17, 0.98));
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    transition: border-color 0.32s ease, box-shadow 0.32s ease, transform 0.32s ease, background 0.32s ease;
}

.cabinet-shell .btn,
.modal-card .btn,
.account-button {
    font-size: var(--type-small);
}

.cabinet-shell .muted,
.modal-card .muted,
.profile-kicker {
    font-size: var(--type-small);
}

.cabinet-auth {
    max-width: 620px;
    margin: 46px auto;
    padding: 28px;
}

body.is-mini-app .grid-overlay,
body.is-mini-app .scan-line {
    display: none;
}

body.is-mini-app .cabinet-shell {
    max-width: 100%;
    padding: 8px 14px 28px;
}

body.is-mini-app .cabinet-header {
    display: none;
}

body.is-mini-app .nav-logout {
    display: none !important;
}

body.is-mini-app .cabinet-auth {
    margin: 0 auto 14px;
    padding: 22px;
}

body.is-mini-app .dashboard-hero {
    margin-top: 0;
    margin-bottom: 12px;
}

body.is-mini-app .card-panel {
    border-radius: 18px;
}

body.is-mini-app .subscription-card .state-pill {
    display: none;
}

body.is-mini-app .instructions-panel {
    padding: 16px;
}

body.is-mini-app .instructions-panel .muted {
    margin-top: 4px;
}

body.is-mini-app .platform-grid {
    gap: 8px;
    margin-top: 10px;
}

body.is-mini-app .platform-card {
    min-height: 46px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

body.is-mini-app .platform-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.cabinet-auth h1,
.dashboard-hero h1 {
    font-size: var(--type-big);
    line-height: 0.98;
    margin-bottom: 18px;
}

.auth-form {
    margin-top: 30px;
}

.auth-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: var(--type-small);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

input,
textarea {
    width: 100%;
    background: #08080a;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font: inherit;
    outline: none;
}

input {
    min-height: 58px;
    padding: 0 18px;
    font-size: var(--type-small);
}

textarea {
    min-height: 74px;
    resize: vertical;
    padding: 14px;
    color: var(--text-secondary);
    font-family: var(--font-tech);
    font-size: var(--type-small);
    line-height: 1.45;
}

input:focus,
textarea:focus {
    border-color: var(--accent-red-mid);
    box-shadow: 0 0 0 4px rgba(125, 53, 19, 0.12);
}

.status-line {
    margin-top: 18px;
    min-height: 24px;
    color: var(--text-secondary);
    font-size: var(--type-small);
    font-weight: 600;
}

.status-line.is-error {
    color: #ff8d8d;
}

.status-line.is-ok {
    color: #8dffb1;
}

.link-button {
    margin-top: 16px;
    background: transparent;
    border: 0;
    color: var(--accent-glow);
    cursor: pointer;
    font-family: var(--font-tech);
    font-size: var(--type-small);
    transition: color 0.16s ease, transform 0.16s ease;
}

.link-button:hover {
    color: #fff;
    transform: translateX(2px);
}

.auth-hint {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: var(--type-small);
}

.resend-code {
    margin-right: 18px;
}

.resend-code:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.account-chooser {
    margin-top: 24px;
}

.signup-offer {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid rgba(125, 53, 19, 0.35);
    border-radius: 18px;
    background: rgba(125, 53, 19, 0.055);
}

.signup-offer .btn {
    margin-top: 14px;
    width: 100%;
}

.telegram-login {
    margin-top: 22px;
}

.telegram-login .btn {
    width: 100%;
}

.telegram-widget-host {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    min-height: 42px;
}

.telegram-widget-host.hidden {
    display: none;
}

.telegram-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: var(--type-small);
    text-transform: uppercase;
}

.telegram-divider::before,
.telegram-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.account-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.account-button {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-panel);
    color: var(--text-primary);
    padding: 16px;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-tech);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-hero {
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(90deg, rgba(125, 53, 19, 0.08), transparent 38%),
        rgba(10, 10, 12, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
    overflow: visible;
    padding: 16px 18px;
}

.profile-summary {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 18px;
}

.profile-kicker {
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 6px;
}

#userMeta {
    color: var(--text-primary);
    font-size: var(--type-big);
    font-weight: 800;
    line-height: 1.12;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.active-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.32);
    border-radius: 999px;
    padding: 9px 16px;
    color: #4ade80;
    font-size: var(--type-small);
    box-shadow: 0 12px 34px rgba(34, 197, 94, 0.08);
    white-space: nowrap;
}

.active-pill.is-inactive {
    background: rgba(125, 53, 19, 0.14);
    border-color: rgba(125, 53, 19, 0.36);
    color: #ff7b7b;
    box-shadow: 0 12px 34px rgba(125, 53, 19, 0.08);
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    animation: pulse 2s infinite;
}

.active-pill.is-inactive .active-dot {
    background: #8a2412;
}

.cabinet-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.cabinet-grid .card-panel,
.instructions-panel {
    padding: 20px;
}

.cabinet-grid .card-panel:hover,
.cabinet-auth:hover,
.dashboard-hero:hover,
.instructions-panel:hover {
    border-color: rgba(125, 53, 19, 0.42);
    box-shadow: 0 30px 82px rgba(125, 53, 19, 0.08), 0 28px 70px rgba(0, 0, 0, 0.34);
    transform: translateY(-2px);
}

.autopay-card {
    display: none;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-head h2 {
    margin-bottom: 4px;
    font-size: var(--type-big);
}

.warning-text {
    display: none;
}

.state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(125, 53, 19, 0.28);
    border-radius: 999px;
    background: rgba(125, 53, 19, 0.07);
    color: #ff9b9b;
    font-size: var(--type-small);
    font-weight: 800;
    white-space: nowrap;
}

.state-pill.is-active {
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.12);
    color: #8dffb1;
}

.secret-box {
    margin-top: 8px;
}

.secret-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: var(--type-small);
}

.subscription-card textarea {
    min-height: 50px;
    height: 50px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(125, 53, 19, 0.035), transparent 42%),
        #070708;
    border-color: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    resize: none;
    white-space: nowrap;
    text-overflow: ellipsis;
    scrollbar-width: none;
}

.subscription-card textarea::-webkit-scrollbar {
    display: none;
}

.secret-actions {
    margin-top: 12px;
}

.secret-actions .btn-primary {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    font-size: var(--type-small);
}

.secret-actions .btn-secondary {
    display: none;
}

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

.plan-card {
    min-height: 78px;
    padding: 16px 52px 16px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 42%),
        var(--bg-panel);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: 0.16s ease;
    position: relative;
}

.plan-card::after {
    content: '+';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #09090b;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    font-size: var(--type-big);
    font-weight: 400;
}

.plan-card:hover {
    border-color: rgba(125, 53, 19, 0.62);
    background:
        linear-gradient(135deg, rgba(125, 53, 19, 0.08), transparent 45%),
        var(--bg-panel);
    box-shadow: 0 18px 50px rgba(125, 53, 19, 0.1);
    transform: translateY(-2px);
}

.plan-card:hover::after {
    border-color: rgba(125, 53, 19, 0.65);
    color: #fff;
}

.plan-card:active {
    transform: translateY(0) scale(0.985);
}

.plan-card strong {
    display: block;
    font-size: var(--type-big);
    margin-bottom: 2px;
}

.plan-card span {
    color: var(--text-muted);
    font-size: var(--type-small);
}

.traffic-card {
    position: relative;
    padding-bottom: 16px !important;
}

.traffic-head {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.traffic-refresh-btn {
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 44%),
        var(--bg-panel);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--type-small);
    font-weight: 800;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.traffic-refresh-btn:hover {
    border-color: rgba(125, 53, 19, 0.55);
    color: var(--text-primary);
    box-shadow: 0 14px 34px rgba(125, 53, 19, 0.08);
    transform: translateY(-1px);
}

.traffic-refresh-btn:disabled {
    cursor: progress;
    opacity: 0.58;
    transform: none;
}

.traffic-meter {
    display: grid;
    gap: 9px;
}

.traffic-meter-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.traffic-meter-top strong {
    font-size: var(--type-big);
}

.traffic-meter-top span {
    color: var(--text-muted);
    font-size: var(--type-small);
    white-space: nowrap;
}

.traffic-bar {
    height: 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.traffic-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #8a2412, #b45f27);
    box-shadow: 0 0 22px rgba(125, 53, 19, 0.28);
    transition: width 0.45s ease;
}

.traffic-packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.traffic-pack-card {
    min-height: 66px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 42%),
        var(--bg-panel);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: 0.16s ease;
}

.traffic-pack-card:hover {
    border-color: rgba(125, 53, 19, 0.62);
    box-shadow: 0 18px 50px rgba(125, 53, 19, 0.1);
    transform: translateY(-2px);
}

.traffic-pack-card:active {
    transform: translateY(0) scale(0.985);
}

.traffic-pack-card strong,
.traffic-pack-card span {
    display: block;
    font-size: var(--type-small);
}

.traffic-pack-card span {
    margin-top: 3px;
    color: var(--text-muted);
}

.autopay-setup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(125, 53, 19, 0.3);
    border-radius: 16px;
    background: rgba(125, 53, 19, 0.045);
}

.autopay-setup h3 {
    font-size: var(--type-big);
    margin-bottom: 3px;
}

.autopay-info {
    min-width: 0;
}

.autopay-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: var(--type-small);
    font-weight: 800;
}

.toggle-row input {
    appearance: none;
    width: 48px;
    min-height: 28px;
    height: 28px;
    border-radius: 999px;
    border-color: rgba(125, 53, 19, 0.38);
    background: #08080a;
    cursor: pointer;
    position: relative;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.toggle-row input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--text-muted);
    transition: transform 0.16s ease, background 0.16s ease;
}

.toggle-row input:checked {
    background: rgba(125, 53, 19, 0.28);
    border-color: var(--accent-glow);
}

.toggle-row input:checked::after {
    background: #fff;
    transform: translateX(20px);
}

.detach-card-btn {
    min-height: 42px;
    padding: 10px 14px;
    border-color: rgba(125, 53, 19, 0.4);
    color: #ffb0b0;
}

.instructions-panel {
    margin-top: 14px;
    background:
        radial-gradient(circle at top left, rgba(125, 53, 19, 0.08), transparent 32%),
        rgba(10, 10, 12, 0.62);
    border-color: rgba(255, 255, 255, 0.05);
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.platform-card {
    min-height: 84px;
    padding: 14px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-secondary);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.028), transparent 44%),
        var(--bg-panel);
    text-decoration: none;
    text-align: center;
    display: grid;
    gap: 8px;
    place-items: center;
    font-size: var(--type-small);
    font-weight: 700;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.platform-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.platform-card:hover,
.account-button:hover {
    border-color: rgba(125, 53, 19, 0.55);
    color: #fff;
    box-shadow: 0 16px 42px rgba(125, 53, 19, 0.08);
    transform: translateY(-2px);
}

.platform-card:hover {
    background:
        linear-gradient(145deg, rgba(125, 53, 19, 0.08), transparent 44%),
        var(--bg-panel);
}

.platform-card:active,
.account-button:active {
    transform: translateY(0) scale(0.985);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 50;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 999px;
    background: rgba(8, 8, 10, 0.92);
    color: #8dffb1;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
    font-size: var(--type-small);
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(0.96);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.toast.is-error {
    border-color: rgba(125, 53, 19, 0.45);
    color: #ff9b9b;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.18s ease both;
}

.modal-card {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid rgba(125, 53, 19, 0.32);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(125, 53, 19, 0.1), transparent 36%),
        linear-gradient(135deg, rgba(15, 15, 18, 0.98), rgba(20, 14, 18, 0.98));
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
    animation: modalPopIn 0.22s cubic-bezier(0.2, 0.9, 0.25, 1.1) both;
}

.modal-card h2 {
    margin-bottom: 10px;
    font-size: var(--type-big);
}

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

.modal-actions .btn {
    width: 100%;
}

.modal-actions .btn span {
    display: block;
    color: currentColor;
    opacity: 0.72;
    font-size: var(--type-small) !important;
    font-weight: 600;
    line-height: 1.35;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 760px) {
    .cabinet-header,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .cabinet-auth,
    .cabinet-grid .card-panel,
    .instructions-panel {
        padding: 18px;
    }

    .cabinet-shell {
        width: min(100% - 24px, 820px);
    }

    #userMeta {
        font-size: var(--type-big);
    }

    .section-head,
    .autopay-setup,
    .autopay-controls {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    body.is-mini-app .platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cabinet-nav {
        gap: 16px;
    }
}

/* Mini App: Neura parchment / liquid glass layer */
body.is-mini-app .cabinet-shell {
    width: 100%;
    max-width: 100%;
    padding: 10px 0 26px;
}

body.is-mini-app .card-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(82, 39, 15, 0.2);
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.56), transparent 26%),
        radial-gradient(circle at 86% 18%, rgba(123, 58, 18, 0.1), transparent 36%),
        linear-gradient(145deg, rgba(255, 252, 243, 0.7), rgba(240, 216, 184, 0.46));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        inset 0 -22px 54px rgba(94, 45, 16, 0.06),
        0 22px 58px rgba(80, 39, 16, 0.15);
    backdrop-filter: blur(22px) saturate(1.18);
    transition:
        border-color 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.is-mini-app .card-panel:hover {
    border-color: rgba(82, 39, 15, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -22px 54px rgba(94, 45, 16, 0.07),
        0 30px 68px rgba(80, 39, 16, 0.2);
    transform: translateY(-2px);
}

body.is-mini-app .card-panel::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.36), transparent 34%),
        radial-gradient(circle at 50% 120%, rgba(92, 45, 18, 0.08), transparent 42%);
    opacity: 0.84;
    pointer-events: none;
}

body.is-mini-app .cabinet-auth,
body.is-mini-app .dashboard-hero,
body.is-mini-app .cabinet-grid .card-panel,
body.is-mini-app .instructions-panel {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 26px;
}

body.is-mini-app .cabinet-auth {
    max-width: 100%;
    padding: 24px 18px;
}

body.is-mini-app .cabinet-auth::before {
    content: "";
    position: absolute;
    right: -12px;
    top: -24px;
    width: 130px;
    height: 130px;
    background: url("../brand/neura-cat.webp") center / contain no-repeat;
    opacity: 0.1;
    transform: rotate(8deg);
    pointer-events: none;
}

body.is-mini-app .dashboard-hero {
    min-height: 72px;
    padding: 11px 12px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

body.is-mini-app .dashboard-hero::before {
    display: none;
}

body.is-mini-app .profile-kicker,
body.is-mini-app .auth-form label,
body.is-mini-app .telegram-divider,
body.is-mini-app .secret-label {
    color: var(--text-muted);
}

body.is-mini-app #userMeta {
    color: var(--text-primary);
    font-size: 0.92rem;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

body.is-mini-app .dashboard-hero .profile-summary {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding-right: 0;
}

body.is-mini-app .dashboard-hero #userMeta {
    margin-bottom: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.is-mini-app .active-pill {
    flex: 0 0 auto;
    padding: 6px 8px;
    gap: 5px;
    font-size: 0.74rem;
    white-space: nowrap;
    background: rgba(69, 129, 70, 0.16);
    border-color: rgba(40, 111, 45, 0.22);
    color: #286f2d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body.is-mini-app .active-pill.is-inactive {
    background: rgba(138, 36, 18, 0.16);
    border-color: rgba(138, 36, 18, 0.3);
    color: #8a2412;
}

body.is-mini-app .section-head {
    margin-bottom: 10px;
}

body.is-mini-app .active-dot {
    width: 7px;
    height: 7px;
    background: #2e8b3c;
}

body.is-mini-app .section-head {
    padding-right: 0;
}

body.is-mini-app .section-head > *,
body.is-mini-app .profile-summary,
body.is-mini-app .cabinet-grid,
body.is-mini-app .secret-box,
body.is-mini-app .platform-grid,
body.is-mini-app .platform-card {
    min-width: 0;
}

body.is-mini-app .title-with-mark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

body.is-mini-app .title-with-mark::before {
    content: "";
    flex: 0 0 auto;
    width: 1.22em;
    height: 1.22em;
    background: center / contain no-repeat;
    transform: translateY(0.03em);
}

body.is-mini-app .title-network::before {
    background-image: url("../brand/neura-network.webp");
}

body.is-mini-app .title-money::before {
    background-image: url("../brand/neura-money.webp");
}

body.is-mini-app .title-tools::before {
    background-image: url("../brand/neura-tools.webp");
}

body.is-mini-app .title-traffic::before {
    background-image: url("../brand/neura-network.webp");
}

body.is-mini-app .title-sync::before {
    background-image: url("../brand/neura-sync.webp");
}

body.is-mini-app .title-shield::before {
    background-image: url("../brand/neura-shield.webp");
}

body.is-mini-app .subscription-card textarea,
body.is-mini-app input,
body.is-mini-app textarea {
    background: rgba(255, 251, 241, 0.6);
    border-color: rgba(82, 39, 15, 0.2);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -18px 34px rgba(89, 43, 17, 0.04);
}

body.is-mini-app .secret-box {
    margin-top: 0;
}

body.is-mini-app .secret-actions {
    margin-top: 0;
}

body.is-mini-app .subscription-card textarea {
    height: 48px;
    min-height: 48px;
    padding-top: 13px;
    color: #563018;
}

body.is-mini-app .secret-actions .btn-primary {
    min-height: 48px;
    color: #fff7eb;
}

body.is-mini-app .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
}

body.is-mini-app .plan-card {
    min-height: 58px;
    width: 100%;
    min-width: 0;
    padding: 10px 9px;
    border-color: rgba(82, 39, 15, 0.3);
    background:
        linear-gradient(145deg, rgba(255, 242, 217, 0.34), transparent 38%),
        rgba(218, 184, 143, 0.5);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 226, 0.42),
        inset 0 -14px 30px rgba(82, 39, 15, 0.045),
        0 8px 20px rgba(82, 39, 15, 0.055);
}

body.is-mini-app .plan-card::after {
    display: none;
}

body.is-mini-app .plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

body.is-mini-app .plan-card span {
    color: var(--text-secondary);
}

body.is-mini-app .plan-card strong,
body.is-mini-app .plan-card .plan-price {
    display: block;
    font-size: 0.94rem !important;
    line-height: 1.08;
    margin: 0;
    white-space: nowrap;
}

body.is-mini-app .plan-card .plan-price {
    flex: 0 0 auto;
    color: #7d3513;
}

body.is-mini-app .plan-card:hover {
    border-color: rgba(125, 53, 19, 0.42);
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.4), transparent 38%),
        rgba(223, 194, 158, 0.7);
    box-shadow: 0 18px 42px rgba(92, 42, 12, 0.14);
}

body.is-mini-app .traffic-meter {
    gap: 8px;
}

body.is-mini-app .traffic-head {
    display: flex;
    align-items: center;
    flex-direction: row;
}

body.is-mini-app .traffic-refresh-btn {
    min-height: 32px;
    padding: 6px 10px;
    border-color: rgba(82, 39, 15, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.36), transparent 42%),
        rgba(215, 181, 139, 0.52);
    color: #5a250d;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 226, 0.45),
        0 8px 18px rgba(82, 39, 15, 0.07);
}

body.is-mini-app .traffic-refresh-btn:hover {
    border-color: rgba(125, 53, 19, 0.52);
    color: #3b1c0c;
}

body.is-mini-app .traffic-card {
    padding-bottom: 16px !important;
}

body.is-mini-app .traffic-meter-top strong,
body.is-mini-app .traffic-meter-top span {
    font-size: 0.88rem;
}

body.is-mini-app .traffic-bar {
    height: 12px;
    border-color: rgba(82, 39, 15, 0.24);
    background: rgba(255, 248, 236, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.is-mini-app .traffic-bar span {
    background: linear-gradient(90deg, #6e2a0d, #b45f27);
    box-shadow: 0 0 18px rgba(110, 42, 13, 0.18);
}

body.is-mini-app .traffic-packs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 11px;
}

body.is-mini-app .traffic-pack-card {
    min-height: 54px;
    padding: 9px 10px;
    border-color: rgba(82, 39, 15, 0.3);
    background:
        linear-gradient(145deg, rgba(255, 242, 217, 0.34), transparent 38%),
        rgba(218, 184, 143, 0.5);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 226, 0.42),
        inset 0 -14px 30px rgba(82, 39, 15, 0.045),
        0 8px 20px rgba(82, 39, 15, 0.055);
}

body.is-mini-app .traffic-pack-card strong,
body.is-mini-app .traffic-pack-card span {
    font-size: 0.84rem !important;
    line-height: 1.08;
}

body.is-mini-app .traffic-pack-card span {
    color: #7d3513;
}

body.is-mini-app .traffic-pack-card:hover {
    border-color: rgba(125, 53, 19, 0.52);
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.42), transparent 42%),
        rgba(199, 158, 110, 0.64);
    box-shadow: 0 18px 42px rgba(92, 42, 12, 0.14);
}

body.is-mini-app .autopay-setup {
    position: relative;
    border-color: rgba(82, 39, 15, 0.18);
    background: rgba(255, 248, 236, 0.5);
}

body.is-mini-app .autopay-info .muted:empty {
    display: none;
}

body.is-mini-app .toggle-row input {
    background: rgba(255, 248, 236, 0.42);
    border-color: rgba(82, 39, 15, 0.22);
}

body.is-mini-app .toggle-row input:checked {
    background: rgba(125, 53, 19, 0.32);
    border-color: rgba(125, 53, 19, 0.5);
}

body.is-mini-app .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
}

body.is-mini-app .platform-card {
    min-height: 50px;
    width: 100%;
    border-radius: 22px;
    border-color: rgba(82, 39, 15, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.36), transparent 42%),
        rgba(215, 181, 139, 0.52);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 226, 0.45),
        inset 0 -16px 28px rgba(82, 39, 15, 0.055),
        0 9px 22px rgba(82, 39, 15, 0.075);
}

body.is-mini-app .platform-card .platform-icon {
    width: 20px;
    height: 20px;
}

body.is-mini-app .platform-card:hover {
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.42), transparent 42%),
        rgba(199, 158, 110, 0.64);
    border-color: rgba(125, 53, 19, 0.52);
    color: var(--text-primary);
}

body.is-mini-app .detach-card-btn {
    border-color: rgba(86, 42, 17, 0.4);
    color: #5a250d;
}

body.is-mini-app .modal-overlay {
    background: rgba(73, 38, 17, 0.28);
    backdrop-filter: blur(14px) saturate(1.05);
}

body.is-mini-app .modal-card,
body.is-mini-app .toast {
    border-color: rgba(82, 39, 15, 0.24);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 34%),
        rgba(255, 247, 232, 0.84);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        0 28px 76px rgba(80, 39, 16, 0.2);
    backdrop-filter: blur(20px) saturate(1.12);
}

body.is-mini-app #paymentChoiceText {
    color: var(--text-primary);
    font-size: calc(var(--type-big) * 1.14);
    font-weight: 900;
    line-height: 1.15;
    margin-top: 4px;
}

body.is-mini-app #payAutopayBtn,
body.is-mini-app #payAnyMethodBtn {
    text-align: center;
    justify-content: center;
}

body.is-mini-app .toast {
    color: #286f2d;
}

body.is-mini-app .toast.is-error {
    color: #7d3513;
}

/* Unified site parchment layer, matching the Telegram Mini App cabinet. */
.card-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(82, 39, 15, 0.2);
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.56), transparent 26%),
        radial-gradient(circle at 86% 18%, rgba(123, 58, 18, 0.1), transparent 36%),
        linear-gradient(145deg, rgba(255, 252, 243, 0.7), rgba(240, 216, 184, 0.46));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        inset 0 -22px 54px rgba(94, 45, 16, 0.06),
        0 22px 58px rgba(80, 39, 16, 0.15);
    backdrop-filter: blur(22px) saturate(1.18);
}

.card-panel::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.36), transparent 34%),
        radial-gradient(circle at 50% 120%, rgba(92, 45, 18, 0.08), transparent 42%);
    opacity: 0.84;
    pointer-events: none;
}

.cabinet-grid .card-panel:hover,
.cabinet-auth:hover,
.dashboard-hero:hover,
.instructions-panel:hover {
    border-color: rgba(82, 39, 15, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -22px 54px rgba(94, 45, 16, 0.07),
        0 30px 68px rgba(80, 39, 16, 0.2);
}

.dashboard-hero,
.instructions-panel {
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.56), transparent 26%),
        radial-gradient(circle at 86% 18%, rgba(123, 58, 18, 0.1), transparent 36%),
        linear-gradient(145deg, rgba(255, 252, 243, 0.7), rgba(240, 216, 184, 0.46));
    border-color: rgba(82, 39, 15, 0.2);
}

.cabinet-nav a:hover,
.nav-logout:hover,
.platform-card:hover,
.account-button:hover {
    color: var(--text-primary);
}

input,
textarea,
.subscription-card textarea {
    background: rgba(255, 251, 241, 0.6);
    border-color: rgba(82, 39, 15, 0.2);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -18px 34px rgba(89, 43, 17, 0.04);
}

input:focus,
textarea:focus {
    border-color: rgba(125, 53, 19, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.56),
        0 0 0 4px rgba(125, 53, 19, 0.12);
}

.signup-offer,
.autopay-setup {
    border-color: rgba(82, 39, 15, 0.18);
    background: rgba(255, 248, 236, 0.5);
}

.state-pill {
    border-color: rgba(138, 36, 18, 0.24);
    background: rgba(138, 36, 18, 0.12);
    color: #8a2412;
}

.state-pill.is-active,
.active-pill {
    background: rgba(69, 129, 70, 0.16);
    border-color: rgba(40, 111, 45, 0.22);
    color: #286f2d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.active-pill.is-inactive {
    background: rgba(138, 36, 18, 0.16);
    border-color: rgba(138, 36, 18, 0.3);
    color: #8a2412;
}

.active-dot {
    background: #2e8b3c;
}

.active-pill.is-inactive .active-dot {
    background: #8a2412;
}

.plan-card,
.traffic-pack-card,
.platform-card,
.account-button,
.traffic-refresh-btn {
    border-color: rgba(82, 39, 15, 0.3);
    background:
        linear-gradient(145deg, rgba(255, 242, 217, 0.34), transparent 38%),
        rgba(218, 184, 143, 0.5);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 226, 0.42),
        inset 0 -14px 30px rgba(82, 39, 15, 0.045),
        0 8px 20px rgba(82, 39, 15, 0.055);
}

.plan-card::after {
    border-color: rgba(82, 39, 15, 0.26);
    background: rgba(255, 248, 236, 0.52);
    color: #7d3513;
}

.plan-card:hover,
.traffic-pack-card:hover,
.platform-card:hover,
.account-button:hover,
.traffic-refresh-btn:hover {
    border-color: rgba(125, 53, 19, 0.52);
    background:
        linear-gradient(145deg, rgba(255, 239, 207, 0.42), transparent 42%),
        rgba(199, 158, 110, 0.64);
    box-shadow: 0 18px 42px rgba(92, 42, 12, 0.14);
}

.plan-card:hover::after {
    border-color: rgba(125, 53, 19, 0.52);
    color: var(--text-primary);
}

.traffic-bar {
    border-color: rgba(82, 39, 15, 0.24);
    background: rgba(255, 248, 236, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.traffic-bar span {
    background: linear-gradient(90deg, #6e2a0d, #b45f27);
    box-shadow: 0 0 18px rgba(110, 42, 13, 0.18);
}

.toggle-row input {
    background: rgba(255, 248, 236, 0.42);
    border-color: rgba(82, 39, 15, 0.22);
}

.toggle-row input:checked {
    background: rgba(125, 53, 19, 0.32);
    border-color: rgba(125, 53, 19, 0.5);
}

.detach-card-btn {
    border-color: rgba(86, 42, 17, 0.4);
    color: #5a250d;
}

.toast,
.modal-card {
    border-color: rgba(82, 39, 15, 0.24);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 34%),
        rgba(255, 247, 232, 0.9);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        0 28px 76px rgba(80, 39, 16, 0.2);
    backdrop-filter: blur(20px) saturate(1.12);
}

.toast {
    color: #286f2d;
}

.toast.is-error,
.status-line.is-error {
    color: #8a2412;
}

.modal-overlay {
    background: rgba(73, 38, 17, 0.28);
    backdrop-filter: blur(14px) saturate(1.05);
}
