:root {
    color-scheme: dark;
    --bg-grid: rgba(77, 98, 144, 0.1);
    --border: rgba(96, 116, 161, 0.18);
    --text: #eef3ff;
    --muted: #8e9ab6;
    --accent: #39d7db;
    --accent-soft: #4d94ff;
    --accent-green: #51e4a0;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    --screen-width: 360px;
    --screen-width-narrow: 336px;
    --mobile-nav-height: 86px;
}

@font-face {
    font-family: "Orbitron";
    src: url("./fonts/Orbitron-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Orbitron";
    src: url("./fonts/Orbitron-800.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Golos Text", sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(53, 228, 206, 0.08), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(77, 148, 255, 0.10), transparent 32%),
        radial-gradient(circle at 50% 100%, rgba(28, 58, 112, 0.12), transparent 34%),
        linear-gradient(180deg, #070a14 0%, #05070f 100%);
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 6px 18px calc(var(--mobile-nav-height) + 20px);
}

.panel,
.desktop-header,
.metric-card,
.quick-card,
.promo-box,
.plan-card,
.profile-card,
.settings-block,
.device-card,
.connect-helper {
    backdrop-filter: blur(18px);
}

.desktop-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-bottom: 0;
}

.desktop-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 46px;
    padding: 0 14px;
    position: relative;
}

.desktop-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    position: relative;
}

.desktop-topbar::after,
.desktop-nav-row::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100vw;
    height: 1px;
    background: rgba(96, 116, 161, 0.08);
    transform: translateX(-50%);
    pointer-events: none;
}

.desktop-header > .header-actions {
    display: none;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    background: url("./assets/logo.png") center / 170% no-repeat;
    transform: translateY(2px);
}

.brand-name,
h1,
h2,
.metric-card strong,
.quick-title,
.plan-price,
.plan-days {
    font-family: "Manrope", sans-serif;
}

.brand-name {
    font-family: "Orbitron", "Manrope", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: #f5f8ff;
    text-shadow: 0 0 18px rgba(101, 214, 255, 0.08);
    transform: translateY(1px);
}

.desktop-nav {
    display: grid;
    grid-template-columns: repeat(4, 144px);
    align-items: center;
    gap: 0;
    justify-self: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.desktop-nav-item {
    position: relative;
    width: 144px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: rgba(126, 136, 164, 0.64);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 0;
    transition:
        color 0.22s ease,
        opacity 0.22s ease;
}

.desktop-nav-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: transparent;
    transform: translateX(-50%);
    transition: background 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
    opacity: 0;
}

.desktop-nav-item.is-active {
    color: #7cecff;
    background: transparent;
    box-shadow: none;
}

.desktop-nav-item.is-active::after {
    opacity: 1;
    background: linear-gradient(90deg, #39d7db, #69c9ff);
    box-shadow: 0 0 14px rgba(77, 212, 255, 0.22);
}

.desktop-nav-icon {
    display: inline-grid;
    place-items: center;
}

.desktop-nav-icon img {
    display: block;
    width: 17px;
    height: 17px;
    opacity: 0.48;
}

.desktop-nav-item.is-active .desktop-nav-icon img {
    opacity: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}

.header-button,
.status-pill {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-family: "Manrope", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
}

.header-button {
    cursor: pointer;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        color 0.22s ease;
}

.header-button.is-primary {
    background: linear-gradient(135deg, #39d7db, #4d94ff);
    color: #07111f;
    box-shadow: 0 6px 18px rgba(61, 178, 255, 0.18);
}

.header-button.is-ghost,
.status-pill {
    background: rgba(14, 18, 31, 0.88);
    color: #b6c0da;
    border-color: rgba(98, 112, 150, 0.22);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #35f0cc, #3a8dff);
    box-shadow: 0 0 14px rgba(53, 240, 204, 0.55);
}

.dashboard {
    max-width: var(--screen-width);
    margin: 10px auto 0;
}

.dashboard.is-connect-guide-layout {
    width: 100%;
    max-width: 100%;
}

.screen {
    display: none;
}

.screen.is-active {
    display: block;
    animation: fadeUp 220ms ease;
}

.dashboard-grid {
    display: grid;
    gap: 14px;
}

.panel {
    border: 1px solid rgba(98, 112, 150, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(21, 24, 38, 0.98), rgba(16, 19, 30, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        var(--shadow);
}

.ring-panel {
    position: relative;
    min-height: 278px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-color: rgba(85, 101, 145, 0.24);
    background:
        radial-gradient(circle at 50% 0%, rgba(77, 148, 255, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(24, 27, 42, 0.99), rgba(17, 20, 31, 0.97));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 44px rgba(0, 0, 0, 0.26);
}

.panel-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.03);
}

.ring-core {
    position: relative;
    width: 184px;
    height: 184px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    isolation: isolate;
}

.ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ring-content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    justify-items: center;
    align-content: center;
    text-align: center;
    transform: none;
}

.ring-value {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 3.54rem;
    font-weight: 800;
    line-height: 0.96;
    color: #8fdcff;
    letter-spacing: -0.06em;
}

.ring-label {
    display: block;
    margin-top: 8px;
    color: #a5b2cd;
    font-size: 0.94rem;
    line-height: 1;
}

.metrics-row,
.quick-actions,
.plans-grid {
    display: grid;
    gap: 10px;
}

.metrics-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric-card {
    min-height: 122px;
    padding: 14px 12px 14px;
    display: grid;
    grid-template-rows: auto 1fr 12px;
    align-content: start;
    align-items: center;
    text-align: center;
    border-radius: 22px;
    border-color: rgba(90, 102, 138, 0.2);
    background:
        linear-gradient(180deg, rgba(24, 27, 41, 0.98), rgba(17, 20, 31, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 14px 26px rgba(0, 0, 0, 0.18);
}

.metric-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #7f8aa7;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    line-height: 1.08;
    text-wrap: balance;
}

.metric-label::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(52, 88, 140, 0.52), rgba(24, 40, 69, 0.42))
        center / 20px 20px no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 18px rgba(0, 0, 0, 0.16);
}

.metrics-row .metric-card:nth-child(1) .metric-label::before {
    background-image: url("./icons/tab-home.svg");
}

.metrics-row .metric-card:nth-child(2) .metric-label::before {
    background-image: url("./icons/bolt.svg");
}

.metrics-row .metric-card:nth-child(3) .metric-label::before {
    background-image: url("./icons/tab-store.svg");
}

.metric-card strong {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    min-height: 2.3em;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.18;
    text-align: center;
    color: #f3f7ff;
}

.metric-card--expiry {
    background: linear-gradient(180deg, rgba(21, 24, 38, 0.98), rgba(16, 19, 30, 0.96));
}

.metric-card--expiry strong {
    font-size: 0.8rem;
    line-height: 1.16;
}

.metric-card--expiry .metric-label {
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.accent-green {
    color: var(--accent-green);
}

.metric-card strong.accent-green {
    color: #51e4a0;
    text-shadow: 0 0 14px rgba(81, 228, 160, 0.2);
}

.metric-card strong.accent-red {
    color: #ff7379;
    text-shadow: 0 0 14px rgba(255, 115, 121, 0.18);
}

.metric-bar {
    display: block;
    width: 76%;
    max-width: 68px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #35e4ce 0 38%, rgba(255, 255, 255, 0.08) 38% 100%);
}

.quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
}

.quick-card {
    position: relative;
    display: grid;
    width: 100%;
    justify-self: stretch;
    justify-items: center;
    align-content: center;
    gap: 6px;
    min-height: 78px;
    padding: 11px 8px 10px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    border: 1px solid rgba(86, 98, 134, 0.16);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(22, 25, 38, 0.98), rgba(16, 19, 30, 0.96));
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease,
        background 0.24s ease;
}

.quick-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(44, 72, 112, 0.42), rgba(24, 40, 69, 0.28));
    color: #7fdcff;
    font-size: 0.94rem;
}

.quick-icon img {
    display: block;
    width: 18px;
    height: 18px;
}

.quick-card--renew .quick-icon img {
    width: 20px;
    height: 20px;
}

.quick-card--qr .quick-icon img {
    width: 21px;
    height: 21px;
}

.quick-card--devices .quick-icon img {
    width: 20px;
    height: 20px;
}

.quick-card--connect .quick-title {
    font-size: 0;
    line-height: 1;
}

.quick-card--connect .quick-title::after {
    content: "Подключить";
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.02;
    color: #aeb8d3;
}

.quick-title {
    display: block;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.02;
    color: #aeb8d3;
    max-width: 100%;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.quick-card:nth-child(3) .quick-icon img {
    width: 19px;
    height: 19px;
}

.quick-badge {
    position: absolute;
    top: 7px;
    right: 8px;
    min-width: 30px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(57, 215, 219, 0.16);
    color: #bff8ff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.promo-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(21, 24, 38, 0.98), rgba(16, 19, 30, 0.97));
    border-color: rgba(96, 109, 148, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 18px 32px rgba(0, 0, 0, 0.18);
}

.promo-box input {
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(98, 112, 150, 0.28);
    border-radius: 14px;
    background: rgba(36, 39, 55, 0.92);
    color: var(--text);
    font: inherit;
}

.promo-box input::placeholder {
    color: #7e88a4;
}

.promo-box .header-button.is-primary {
    background: linear-gradient(135deg, rgba(57, 215, 219, 0.82), rgba(77, 148, 255, 0.84));
    color: #07111f;
    box-shadow: 0 6px 16px rgba(61, 178, 255, 0.14);
}

.subscription-promo {
    margin-top: 2px;
}

.content-panel {
    padding: 15px;
}

.connect-panel,
.store-panel,
.profile-panel {
    max-width: var(--screen-width);
    margin: 0 auto;
}

.eyebrow {
    color: #8d97b2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.section-head h1,
.connect-helper h2,
.profile-card h2 {
    margin: 6px 0 0;
    font-size: 1.72rem;
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.section-copy {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.34;
    font-size: 0.92rem;
}

.connect-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.store-panel,
.profile-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.connect-head {
    justify-content: center;
    text-align: center;
    margin-bottom: 14px;
    padding-top: 0;
}

.connect-head > div {
    width: 100%;
}

.store-panel {
    padding-top: 18px;
}

.store-head {
    justify-content: center;
    text-align: center;
}

.store-head > div {
    width: 100%;
}

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

.device-card {
    display: grid;
    grid-template-columns: 42px 1fr 12px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px 14px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    border-radius: 18px;
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease,
        background 0.24s ease;
}

.device-card.is-highlighted {
    border: 1px solid rgba(82, 92, 128, 0.20);
}

.device-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(61, 178, 255, 0.11);
    color: #82ddff;
    font-size: 1rem;
}

.device-icon img {
    display: block;
    width: 21px;
    height: 21px;
}

.device-name {
    font-family: "Manrope", sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.device-arrow {
    color: #7f8aa5;
    font-size: 1.2rem;
}

.connect-device-browser,
.connect-guide {
    display: none;
}

.connect-panel.is-guide-mode .connect-head {
    display: none;
}

.connect-panel.is-guide-mode {
    width: 100%;
    max-width: 100%;
}

.connect-device-browser.is-active,
.connect-guide.is-active {
    display: block;
}

.connect-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #82d7ff;
    font-family: "Manrope", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.connect-steps {
    display: grid;
    gap: 10px;
}

.connect-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 15px;
    border-radius: 14px;
}

.connect-step-index {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(73, 86, 142, 0.24);
    color: #9edbff;
    font-family: "Manrope", sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
}

.connect-step-body h3 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 0.94rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.connect-step-body p {
    margin: 8px 0 0;
    color: #95a3c1;
    font-size: 0.84rem;
    line-height: 1.42;
}

.connect-step-body {
    min-width: 0;
}

.connect-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.guide-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 11px;
    background: rgba(74, 86, 144, 0.22);
    color: #8aa7ff;
    text-decoration: none;
    white-space: nowrap;
    font-family: "Manrope", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.guide-chip.is-primary {
    background: rgba(74, 86, 144, 0.34);
    color: #a8baff;
}

@media (min-width: 761px) {
    .connect-panel {
        max-width: 304px;
        padding-top: 8px;
    }

    .connect-panel.is-guide-mode {
        width: min(100%, 500px);
        max-width: 500px;
        padding-top: 0;
        margin: 0 auto;
    }

    .connect-head {
        margin-bottom: 10px;
    }

    .connect-head h1 {
        margin-top: 0;
        font-size: 0.96rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.02em;
        color: #cfd8f0;
    }

    .device-list {
        max-width: 304px;
        gap: 8px;
    }

    .device-card {
        grid-template-columns: 40px 1fr 8px;
        min-height: 60px;
        padding: 8px 16px;
        border: 1px solid rgba(82, 92, 128, 0.20);
        border-radius: 15px;
        background:
            linear-gradient(180deg, rgba(23, 24, 34, 0.96), rgba(20, 21, 31, 0.96));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.03),
            0 8px 22px rgba(2, 5, 16, 0.14);
    }

    .device-card.is-highlighted {
        border-color: rgba(96, 112, 154, 0.24);
        background:
            radial-gradient(circle at top left, rgba(82, 148, 255, 0.05), transparent 32%),
            linear-gradient(180deg, rgba(23, 24, 34, 0.98), rgba(20, 21, 31, 0.98));
    }

    .device-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        background: linear-gradient(180deg, rgba(53, 62, 112, 0.34), rgba(37, 43, 77, 0.30));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .device-icon img {
        width: 18px;
        height: 18px;
    }

    .device-name {
        font-size: 0.86rem;
        font-weight: 700;
        color: #edf1fb;
    }

    .device-arrow {
        font-size: 0.9rem;
        color: #7982a3;
    }

    .connect-guide {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .connect-step {
        grid-template-columns: 36px 1fr;
        gap: 14px;
        padding: 15px 16px;
        border-radius: 14px;
    }

    .connect-step-index {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.84rem;
    }

    .connect-step-body h3 {
        font-size: 0.92rem;
    }

    .connect-step-body p {
        margin-top: 7px;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .guide-chip {
        min-height: 32px;
        padding: 0 12px;
        border-radius: 10px;
        font-size: 0.74rem;
    }
}

.connect-helper {
    margin-top: 12px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.connect-helper p,
.plan-card p,
.profile-card p {
    color: var(--muted);
    line-height: 1.45;
}

.helper-actions {
    display: flex;
    gap: 10px;
}

.plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
    align-items: stretch;
}

.plan-card {
    position: relative;
    min-height: 142px;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 20px;
    border-color: rgba(88, 98, 132, 0.2);
    background:
        linear-gradient(180deg, rgba(24, 26, 38, 0.98), rgba(18, 20, 31, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 14px 28px rgba(0, 0, 0, 0.16);
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease,
        background 0.24s ease;
}

.plan-card.is-featured {
    border-color: rgba(61, 178, 255, 0.34);
    background:
        radial-gradient(circle at top, rgba(61, 178, 255, 0.10), transparent 38%),
        linear-gradient(180deg, rgba(24, 26, 38, 0.99), rgba(18, 20, 31, 0.97));
}

.plan-card.accent-outline {
    border-color: rgba(53, 228, 206, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 0 0 1px rgba(53, 228, 206, 0.05),
        0 16px 30px rgba(0, 0, 0, 0.16);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #35e4ce, #4d94ff);
    color: #07111f;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(46, 156, 232, 0.22);
}

.plan-days {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

.plan-price {
    margin-top: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.plan-meta {
    margin-top: 10px;
    color: #8995b3;
    font-size: 0.76rem;
    line-height: 1.3;
    text-align: center;
}

.accent-price {
    color: #72cfff;
}

.compact-promo {
    margin-top: 12px;
    border-radius: 22px;
}

@media (min-width: 761px) {
    .store-panel {
        max-width: 520px;
        padding-top: 16px;
    }

    .store-head {
        margin-bottom: 16px;
    }

    .store-head h1 {
        font-size: 1.28rem;
        line-height: 1.1;
        letter-spacing: -0.03em;
    }

    .store-head .section-copy {
        margin-top: 6px;
        font-size: 0.92rem;
        line-height: 1.3;
        color: #99a6c4;
    }

    .plans-grid {
        gap: 14px;
    }

    .plan-card {
        min-height: 134px;
        padding: 15px 14px 14px;
        border-radius: 20px;
    }

    .plan-days {
        font-size: 0.96rem;
    }

    .plan-price {
        margin-top: 6px;
        font-size: 1.68rem;
    }

    .plan-meta {
        margin-top: 7px;
        font-size: 0.8rem;
    }

    .plan-badge {
        top: -9px;
        padding: 4px 10px;
        font-size: 0.62rem;
    }

    .compact-promo {
        margin-top: 12px;
    }

    .store-panel .promo-box {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 11px;
        border-radius: 20px;
    }

    .store-panel .promo-box input {
        min-height: 40px;
        padding: 0 14px;
        border-radius: 12px;
        font-size: 0.94rem;
    }

    .store-panel .promo-box .header-button {
        min-height: 40px;
        padding: 0 18px;
        border-radius: 12px;
        font-size: 0.82rem;
    }
}

.profile-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 22px 16px;
    margin-bottom: 12px;
}

.profile-card-centered {
    padding: 24px 16px 20px;
}

.profile-card-narrow {
    max-width: 292px;
    margin-left: auto;
    margin-right: auto;
    padding: 14px 14px 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.profile-card-centered h2 {
    margin-top: 6px;
    font-size: 1.42rem;
}

.avatar-soft {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(98, 242, 255, 0.7), transparent 28%),
        radial-gradient(circle at 68% 72%, rgba(57, 168, 255, 0.68), transparent 34%),
        linear-gradient(135deg, #141b31, #0b1020);
    border: 1px solid rgba(77, 148, 255, 0.18);
    color: #dff7ff;
    font-family: "Manrope", sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(30, 114, 255, 0.12);
}

.invite-card-compact {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 16px;
}

.invite-card-compact .settings-title {
    padding: 0;
    margin-bottom: 10px;
}

.invite-card-compact p {
    margin: 0 0 14px;
}

.avatar-glow {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #62f2ff, transparent 28%),
        radial-gradient(circle at 70% 70%, #39a8ff, transparent 34%),
        linear-gradient(135deg, #10182e, #0b0f1d);
    border: 1px solid rgba(101, 130, 255, 0.26);
    font-family: "Manrope", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(60, 54, 162, 0.35);
}

.settings-block {
    max-width: var(--screen-width);
    margin: 0 auto;
    overflow: hidden;
}

.settings-title {
    padding: 14px 16px 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

.settings-row {
    width: 100%;
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border: 0;
    border-top: 1px solid rgba(100, 118, 163, 0.12);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.94rem;
    transition:
        background-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease;
}

.settings-key {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.settings-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
}

.settings-icon img {
    display: block;
    width: 16px;
    height: 16px;
}

.settings-value {
    color: #8fdcff;
}

.bottom-nav {
    display: none;
}

@media (min-width: 761px) {
    .dashboard {
        max-width: 436px;
        margin-top: 18px;
    }

    .dashboard-grid {
        gap: 16px;
    }

    .ring-panel {
        min-height: 244px;
    }

    .ring-core {
        width: 164px;
        height: 164px;
    }

    .ring-value {
        font-size: 3.42rem;
    }

    .ring-label {
        margin-top: 7px;
        font-size: 0.9rem;
    }

    .metrics-row {
        gap: 14px;
    }

    .metric-card {
        min-height: 116px;
        padding: 16px 13px 14px;
        border-radius: 24px;
    }

    .metric-label {
        font-size: 0.72rem;
    }

    .metric-card strong,
    .metric-card--expiry strong {
        font-size: 0.92rem;
    }

    .quick-actions {
        gap: 14px;
    }

    .quick-card {
        min-height: 88px;
        padding: 12px 9px 11px;
        border-radius: 22px;
    }

    .quick-icon {
        width: 36px;
        height: 36px;
    }

    .quick-icon img {
        width: 20px;
        height: 20px;
    }

    .quick-card--renew .quick-icon img,
    .quick-card--devices .quick-icon img {
        width: 22px;
        height: 22px;
    }

    .quick-card--qr .quick-icon img {
        width: 23px;
        height: 23px;
    }

    .quick-title,
    .quick-card--connect .quick-title::after {
        font-size: 0.68rem;
    }

    .promo-box {
        gap: 12px;
        padding: 13px;
        border-radius: 22px;
    }

    .promo-box input {
        min-height: 42px;
        padding: 0 14px;
        font-size: 0.94rem;
    }

    .connect-panel {
        max-width: 352px;
        padding-top: 12px;
    }

    .connect-head h1 {
        font-size: 1.08rem;
    }

    .device-list {
        max-width: 352px;
        gap: 10px;
    }

    .device-card {
        grid-template-columns: 44px 1fr 10px;
        min-height: 68px;
        padding: 10px 18px;
        border-radius: 17px;
    }

    .device-icon {
        width: 38px;
        height: 38px;
    }

    .device-icon img {
        width: 19px;
        height: 19px;
    }

    .device-name {
        font-size: 0.92rem;
    }

    .device-arrow {
        font-size: 1rem;
    }

    .profile-card-narrow,
    .settings-block {
        max-width: 352px;
    }

    .profile-card-centered {
        padding: 28px 18px 22px;
    }

    .profile-card-centered h2 {
        font-size: 1.56rem;
    }

    .avatar-soft {
        width: 64px;
        height: 64px;
        font-size: 1.16rem;
    }

    .settings-title {
        padding: 15px 18px 9px;
        font-size: 0.76rem;
    }

    .settings-row {
        min-height: 56px;
        padding: 0 18px;
        font-size: 0.98rem;
    }
}

.nav-item {
    border: 0;
    background: transparent;
    color: #7f8aa8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 50px;
    padding: 6px 4px;
    border-radius: 0;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.nav-item span:last-child {
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.nav-item.is-active {
    background: transparent;
    color: #7cecff;
    box-shadow: none;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 0.9rem;
    line-height: 1;
    background: transparent;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-icon img {
    display: block;
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.nav-item.is-active .nav-icon {
    background: transparent;
    box-shadow: none;
}

.nav-item.is-active .nav-icon img {
    opacity: 1;
}

.nav-item::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-top: 1px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.nav-item.is-active::after {
    background: #39d7db;
    box-shadow: 0 0 10px rgba(57, 215, 219, 0.34);
}

@media (hover: hover) and (pointer: fine) {
    .desktop-nav-item:hover {
        color: rgba(158, 153, 188, 0.82);
        opacity: 1;
    }

    .desktop-nav-item.is-active:hover {
        color: #7cecff;
        opacity: 1;
    }

    .header-button.is-primary:hover {
        background: linear-gradient(135deg, #57e4e5, #6aa8ff);
        box-shadow:
            0 12px 28px rgba(42, 128, 255, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
        transform: translateY(-1px);
    }

    .header-button.is-ghost:hover {
        color: #e8f2ff;
        border-color: rgba(110, 130, 178, 0.32);
        background: linear-gradient(180deg, rgba(27, 32, 49, 0.96), rgba(16, 20, 33, 0.96));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 10px 22px rgba(4, 8, 18, 0.22);
        transform: translateY(-1px);
    }

    .quick-card:hover,
    .device-card:hover,
    .plan-card:hover {
        transform: translateY(-3px);
        box-shadow:
            0 18px 34px rgba(3, 7, 18, 0.34),
            0 0 0 1px rgba(88, 132, 212, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .quick-card:hover {
        background:
            radial-gradient(circle at top, rgba(77, 148, 255, 0.10), transparent 46%),
            linear-gradient(180deg, rgba(25, 29, 45, 0.99), rgba(16, 19, 30, 0.98));
    }

    .quick-card:hover .quick-icon {
        background: linear-gradient(180deg, rgba(76, 163, 255, 0.22), rgba(53, 228, 206, 0.14));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 10px 20px rgba(35, 109, 216, 0.18);
    }

    .device-card:hover {
        border-color: rgba(77, 148, 255, 0.26);
        background:
            radial-gradient(circle at right top, rgba(77, 148, 255, 0.11), transparent 42%),
            linear-gradient(180deg, rgba(25, 29, 45, 0.99), rgba(16, 19, 30, 0.98));
    }

    .device-card:hover .device-icon {
        background: linear-gradient(180deg, rgba(77, 148, 255, 0.20), rgba(53, 228, 206, 0.14));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 10px 20px rgba(35, 109, 216, 0.16);
    }

    .device-card:hover .device-arrow {
        color: #b9dcff;
    }

    .plan-card:hover {
        border-color: rgba(77, 148, 255, 0.3);
        background:
            radial-gradient(circle at top, rgba(77, 148, 255, 0.12), transparent 52%),
            linear-gradient(180deg, rgba(25, 29, 45, 0.99), rgba(16, 19, 30, 0.98));
    }

    .plan-card.is-featured:hover,
    .plan-card.accent-outline:hover {
        border-color: rgba(53, 228, 206, 0.30);
        box-shadow:
            0 22px 38px rgba(3, 7, 18, 0.36),
            0 0 0 1px rgba(53, 228, 206, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .settings-row:hover {
        color: #f2f7ff;
        background: linear-gradient(90deg, rgba(31, 39, 62, 0.72), rgba(18, 22, 36, 0.18));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .settings-row:hover .settings-value {
        color: #bde7ff;
    }

    .guide-chip:hover {
        transform: translateY(-1px);
        background: rgba(86, 102, 172, 0.34);
        color: #a8beff;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 8px 18px rgba(19, 24, 48, 0.22);
    }

    .guide-chip.is-primary:hover {
        background: rgba(95, 110, 188, 0.42);
        color: #c3d0ff;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            0 10px 22px rgba(22, 28, 58, 0.26);
    }

    .nav-item:hover {
        color: #9e99bc;
        transform: none;
    }

    .nav-item:hover .nav-icon {
        background: transparent;
    }

    .nav-item:hover .nav-icon img {
        opacity: 0.9;
    }
}

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

@media (max-width: 760px) {
    .app-shell {
        max-width: 430px;
        padding: 8px 12px 90px;
    }

    .desktop-header {
        min-height: 36px;
        padding: 2px 4px 4px;
        border-bottom: 0;
    }

    .desktop-topbar {
        min-height: 38px;
        gap: 10px;
        padding: 0 4px;
    }

    .brand-mark {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }

    .brand-name {
        font-size: 0.78rem;
    }

    .desktop-nav {
        display: none;
    }

    .desktop-nav-row {
        display: none;
        min-height: 0;
        border-bottom: 0;
    }

    .desktop-topbar::after,
    .desktop-nav-row::after {
        display: none;
    }

    .header-actions {
        margin-left: auto;
        gap: 5px;
    }

    .header-button,
    .status-pill {
        min-height: 28px;
        padding: 0 9px;
        font-size: 0.7rem;
        border-radius: 10px;
    }

    .header-actions .header-button.is-ghost {
        display: inline-flex;
        align-items: center;
    }

    .dashboard {
        max-width: 100%;
        margin-top: 8px;
    }

    .dashboard-grid {
        gap: 10px;
    }

    .ring-panel {
        min-height: 248px;
    }

    .ring-core {
        width: 170px;
        height: 170px;
    }

    .ring-value {
        font-size: 3.32rem;
    }

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

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card {
        min-height: 108px;
        padding: 12px 10px 12px;
    }

    .quick-card {
        min-height: 84px;
        gap: 6px;
    }

    .state-panel {
        margin-top: 6px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .subscription-promo {
        margin-top: 0;
    }

    .promo-box {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 9px;
        border-radius: 17px;
    }

    .promo-box input {
        min-height: 38px;
        border-radius: 11px;
        font-size: 0.92rem;
    }

    .promo-box .header-button {
        min-height: 38px;
        min-width: 102px;
        padding: 0 15px;
        border-radius: 11px;
        font-size: 0.8rem;
    }

    .content-panel {
        padding: 13px 0 0;
    }

    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .section-head h1,
    .connect-helper h2,
    .profile-card h2 {
        font-size: 1.36rem;
    }

    .connect-head {
        text-align: center;
    }

    .connect-head h1 {
        font-size: 1.28rem;
    }

    .connect-head,
    .device-list,
    .profile-card-narrow,
    .settings-block {
        max-width: var(--screen-width-narrow);
        margin-left: auto;
        margin-right: auto;
    }

    .store-head,
    .plans-grid,
    .compact-promo {
        max-width: 352px;
        margin-left: auto;
        margin-right: auto;
    }

    .connect-panel {
        padding: 0;
    }

    .connect-panel.is-guide-mode {
        width: 100%;
        max-width: 100%;
    }

    .connect-guide {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .connect-back-button {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }

    .connect-steps {
        gap: 8px;
    }

    .connect-step {
        grid-template-columns: 30px 1fr;
        gap: 12px;
        padding: 14px 14px;
        border-radius: 13px;
    }

    .connect-step-body h3 {
        font-size: 0.96rem;
    }

    .connect-step-body p {
        margin-top: 7px;
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .guide-chip {
        min-height: 34px;
        padding: 0 12px;
        border-radius: 11px;
        font-size: 0.78rem;
    }

    .store-panel,
    .profile-panel {
        padding: 0;
    }

    .store-head {
        text-align: center;
    }

    .store-head h1 {
        font-size: 1.42rem;
        line-height: 1.04;
    }

    .store-head .section-copy {
        margin-top: 6px;
        font-size: 0.88rem;
        line-height: 1.26;
    }

    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .plan-card {
        min-height: 124px;
        padding: 13px 12px 12px;
    }

    .plan-days {
        font-size: 0.86rem;
    }

    .plan-price {
        margin-top: 6px;
        font-size: 1.3rem;
    }

    .plan-meta {
        margin-top: 7px;
        font-size: 0.72rem;
    }

    .plan-badge {
        top: -8px;
        padding: 3px 9px;
        font-size: 0.56rem;
    }

    .compact-promo {
        margin-top: 8px;
    }

    .store-panel .promo-box {
        padding: 10px;
        border-radius: 18px;
    }

    .store-panel .promo-box input {
        min-height: 36px;
        font-size: 0.88rem;
    }

    .store-panel .promo-box .header-button {
        min-height: 36px;
        min-width: 92px;
        padding: 0 14px;
        font-size: 0.76rem;
    }

    .helper-actions {
        flex-direction: column;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 12px;
        transform: none;
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
        width: 100%;
        min-height: var(--mobile-nav-height);
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid rgba(78, 88, 122, 0.18);
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 0;
        background: rgba(9, 12, 22, 0.96);
        backdrop-filter: blur(18px);
        box-shadow: 0 -10px 24px rgba(2, 5, 16, 0.14);
    }

    .nav-item {
        min-height: 60px;
        padding: 8px 5px 7px;
        gap: 5px;
        font-size: 0.8rem;
    }

    .nav-icon {
        font-size: 1rem;
    }

    .nav-icon img {
        width: 21px;
        height: 21px;
    }
}

@media (max-width: 440px) {
    .app-shell {
        padding: 6px 10px 92px;
    }

    .dashboard {
        max-width: 100%;
    }

    .dashboard-grid {
        gap: 9px;
    }

    .desktop-header {
        padding: 0 2px 4px;
    }

    .desktop-topbar {
        min-height: 34px;
        gap: 8px;
        padding: 0 2px;
    }

    .brand-mark {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .brand-name {
        font-size: 0.74rem;
    }

    .header-button,
    .status-pill {
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.78rem;
    }

    .plans-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .plan-card {
        min-height: 118px;
        padding: 12px 11px 11px;
    }

    .plan-price {
        font-size: 1.24rem;
    }

    .plan-meta {
        font-size: 0.7rem;
    }

    .plan-days {
        font-size: 0.84rem;
    }

    .plan-badge {
        top: -7px;
        padding: 3px 8px;
        font-size: 0.54rem;
    }

    .metrics-row,
    .quick-actions {
        gap: 8px;
    }

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

    .quick-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .connect-head {
        margin-bottom: 16px;
    }

    .connect-head h1 {
        font-size: 1.26rem;
    }

    .connect-head,
    .device-list,
    .profile-card-narrow,
    .settings-block {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .store-head,
    .plans-grid,
    .compact-promo {
        max-width: 338px;
        margin-left: auto;
        margin-right: auto;
    }

    .store-head h1 {
        font-size: 1.3rem;
        line-height: 1.04;
    }

    .store-head .section-copy {
        margin-top: 6px;
        font-size: 0.82rem;
        line-height: 1.24;
    }

    .device-card {
        grid-template-columns: 48px 1fr 14px;
        min-height: 82px;
        padding: 12px 16px;
        gap: 14px;
        border-radius: 18px;
    }

    .device-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 1.06rem;
    }

    .device-icon img {
        width: 23px;
        height: 23px;
    }

    .device-name {
        font-size: 1rem;
        font-weight: 800;
    }

    .device-arrow {
        font-size: 1.26rem;
    }

    .connect-guide {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .connect-back-button {
        margin-bottom: 9px;
        font-size: 0.86rem;
    }

    .connect-step {
        grid-template-columns: 28px 1fr;
        gap: 10px;
        padding: 13px 12px;
        border-radius: 12px;
    }

    .connect-step-index {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        font-size: 0.78rem;
    }

    .connect-step-body h3 {
        font-size: 0.9rem;
    }

    .connect-step-body p {
        margin-top: 6px;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .connect-step-actions {
        gap: 7px;
        margin-top: 10px;
    }

    .guide-chip {
        min-height: 31px;
        padding: 0 11px;
        border-radius: 10px;
        font-size: 0.75rem;
    }

    .metric-card {
        min-height: 102px;
        padding: 12px 9px 12px;
        grid-template-rows: auto 1fr 12px;
    }

    .metric-label {
        font-size: 0.66rem;
        letter-spacing: 0.05em;
    }

    .metric-label::before {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        background-size: 17px 17px;
    }

    .metric-card strong {
        margin-top: 5px;
        min-height: 2.2em;
        font-size: 0.8rem;
        line-height: 1.18;
    }

    .metric-card--expiry .metric-label {
        font-size: 0.62rem;
        letter-spacing: 0.05em;
        line-height: 1.04;
    }

    .metric-card--expiry strong {
        margin-top: 5px;
        min-height: 2.2em;
        font-size: 0.76rem;
        line-height: 1.14;
    }

    .metric-bar {
        width: 74%;
        max-width: 60px;
    }

    .quick-card {
        min-height: 80px;
        padding: 10px 7px 10px;
        gap: 6px;
    }

    .quick-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.92rem;
    }

    .quick-icon img {
        width: 19px;
        height: 19px;
    }

    .quick-card--renew .quick-icon img {
        width: 21px;
        height: 21px;
    }

    .quick-card--qr .quick-icon img {
        width: 22px;
        height: 22px;
    }

    .quick-card--devices .quick-icon img {
        width: 21px;
        height: 21px;
    }

    .quick-card--connect .quick-title::after {
        font-size: 0.68rem;
        line-height: 1;
    }

    .quick-title {
        font-size: 0.68rem;
        line-height: 1.08;
    }

    .quick-badge {
        top: 5px;
        right: 6px;
        min-width: 28px;
        height: 17px;
        font-size: 0.58rem;
    }

    .quick-card:nth-child(3) .quick-icon img {
        width: 20px;
        height: 20px;
    }

    .promo-box {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 9px;
        border-radius: 16px;
    }

    .store-panel .promo-box {
        padding: 9px;
    }

    .promo-box input {
        min-height: 36px;
        padding: 0 12px;
        font-size: 0.9rem;
        border-radius: 11px;
    }

    .promo-box .header-button {
        min-height: 36px;
        width: auto;
        min-width: 96px;
        padding: 0 14px;
        font-size: 0.78rem;
        border-radius: 11px;
    }

    .promo-box .header-button.is-primary {
        box-shadow: 0 5px 14px rgba(61, 178, 255, 0.12);
    }

    .ring-panel {
        min-height: 228px;
    }

    .ring-core {
        width: 156px;
        height: 156px;
    }

    .ring-value {
        font-size: 3rem;
    }

    .ring-label {
        margin-top: 4px;
        font-size: 0.9rem;
    }

    .bottom-nav {
        bottom: 0;
        width: 100%;
        min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 0;
        border-radius: 0;
    }

    .nav-item {
        min-height: 64px;
        font-size: 0.82rem;
    }

    .nav-icon {
        font-size: 1rem;
    }

.nav-icon img {
        width: 22px;
        height: 22px;
    }
}

body.is-telegram-miniapp {
    min-height: 100vh;
    min-height: 100dvh;
}

body.is-telegram-miniapp .app-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

body.is-telegram-miniapp .desktop-topbar .header-actions {
    display: none;
}

.state-panel {
    display: grid;
    gap: 8px;
    margin: 8px auto 0;
    max-width: 420px;
    padding: 11px 13px;
}

.state-title,
.mini-info-title {
    font-family: "Manrope", sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.state-copy,
.mini-info-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.state-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.state-panel .header-button {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
    border-radius: 10px;
}

.mini-info {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
}

.metric-bar--soft {
    background: linear-gradient(90deg, #35e4ce 0 100%, rgba(255, 255, 255, 0.08) 100% 100%);
}

.accent-red {
    color: #ff7379;
}

button.plan-card {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(96, 116, 161, 0.18);
    cursor: pointer;
    color: var(--text);
}

.plan-card--loading {
    cursor: default;
}

.guide-chip.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--mobile-nav-height) + 18px);
    z-index: 60;
    max-width: min(320px, calc(100vw - 28px));
    padding: 12px 16px;
    border: 1px solid rgba(96, 116, 161, 0.18);
    border-radius: 14px;
    background: rgba(17, 21, 34, 0.94);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
    color: #eef3ff;
    font-family: "Manrope", sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    transform: translate(-50%, 14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-content: center;
    gap: 16px;
    background: rgba(7, 10, 20, 0.96);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.boot-overlay[hidden] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: #6f7dff;
    border-right-color: #7ae7ff;
    animation: boot-spin 0.8s linear infinite;
}

.boot-label {
    color: #9aa7c7;
    font-family: "Golos Text", sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    text-align: center;
}

body.is-booting {
    overflow: hidden;
}

body.is-booting .app-shell > :not(.boot-overlay) {
    visibility: hidden;
}

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