:root {
    color-scheme: light;
    --ink: #171738;
    --ink-2: #292b55;
    --muted: #6d7397;
    --soft: #f7fbff;
    --surface: rgba(255, 255, 255, .70);
    --surface-strong: rgba(255, 255, 255, .88);
    --line: rgba(35, 39, 82, .10);
    --line-strong: rgba(255, 255, 255, .86);
    --mint: #58cf89;
    --mint-deep: #1c9a63;
    --violet: #6258ff;
    --danger: #e0445a;
    --warning: #ffb84d;
    --glass-top: rgba(255, 255, 255, .86);
    --glass-mid: rgba(255, 255, 255, .54);
    --glass-low: rgba(236, 241, 255, .42);
    --shadow: 0 32px 78px rgba(31, 33, 74, .15), 0 14px 34px rgba(88, 207, 137, .11);
    --shadow-soft: 0 16px 40px rgba(31, 33, 74, .08), 0 8px 18px rgba(88, 207, 137, .08);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f6fbff;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "SF Pro Text", "SF Pro Display", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    background:
        linear-gradient(120deg, rgba(88, 207, 137, .10), transparent 32%),
        linear-gradient(230deg, rgba(98, 88, 255, .12), transparent 38%),
        linear-gradient(180deg, #f7fbff 0%, #f1f5ff 72%, #f9fcff 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .42;
    background-image:
        linear-gradient(rgba(23, 23, 56, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 23, 56, .045) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .64) 58%, transparent 100%);
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.lunar-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, .64) 48%, rgba(255, 255, 255, .24)),
        linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .56));
}

.launch-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(140deg, #f8fcff 0%, #edf4ff 54%, #f5f0ff 100%),
        linear-gradient(90deg, rgba(88, 207, 137, .18), rgba(98, 88, 255, .12));
    opacity: 1;
    transform: scale(1);
    transition: opacity .72s var(--ease), transform .72s var(--ease), visibility .72s var(--ease);
}

body.is-booted .launch-screen {
    opacity: 0;
    transform: scale(1.035);
    visibility: hidden;
    pointer-events: none;
}

.launch-cat-field {
    position: absolute;
    inset: -56px;
    z-index: 0;
    overflow: hidden;
    opacity: .92;
}

.launch-cat-field::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(23, 23, 56, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 23, 56, .035) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .55;
}

.cat-runner {
    --size: 34px;
    --top: 50%;
    --left: -70px;
    --end-x: calc(100vw + 120px);
    --end-y: 0px;
    --duration: 6.8s;
    --delay: 0s;
    --opacity: .62;
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--size);
    height: var(--size);
    opacity: var(--opacity);
    transform: translate3d(0, 0, 0);
    animation: catRun var(--duration) linear infinite;
    animation-delay: var(--delay);
    will-change: transform;
}

.cat-runner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    transform-origin: center;
    filter: drop-shadow(0 8px 12px rgba(23, 23, 56, .12));
    animation: catStep .38s steps(2, end) infinite;
}

.cat-runner.is-reverse {
    --left: calc(100vw + 90px);
    --end-x: calc(-100vw - 140px);
}

.cat-runner.is-reverse img,
.cat-runner.is-diagonal-reverse img {
    transform: scaleX(-1);
}

.cat-runner.is-diagonal {
    --end-y: 76px;
}

.cat-runner.is-diagonal-reverse {
    --left: calc(100vw + 90px);
    --end-x: calc(-100vw - 140px);
    --end-y: -86px;
}

.cat-runner.is-up {
    --left: 18%;
    --top: calc(100% + 70px);
    --end-x: 30px;
    --end-y: calc(-100vh - 160px);
}

.cat-runner.is-down {
    --left: 76%;
    --top: -70px;
    --end-x: -28px;
    --end-y: calc(100vh + 160px);
}

.cat-a { --top: 7%; --size: 28px; --duration: 6.2s; --delay: -.8s; --opacity: .44; }
.cat-b { --top: 13%; --size: 34px; --duration: 7.4s; --delay: -2.9s; --opacity: .62; }
.cat-c { --top: 21%; --size: 30px; --duration: 5.9s; --delay: -4.2s; --opacity: .50; }
.cat-d { --top: 30%; --size: 26px; --duration: 6.7s; --delay: -1.6s; --opacity: .42; }
.cat-e { --top: 42%; --size: 36px; --duration: 7.9s; --delay: -5.1s; --opacity: .58; }
.cat-f { --top: 55%; --size: 32px; --duration: 6.4s; --delay: -3.3s; --opacity: .50; }
.cat-g { --top: 67%; --size: 38px; --duration: 8.2s; --delay: -1.1s; --opacity: .60; }
.cat-h { --top: 80%; --size: 28px; --duration: 5.8s; --delay: -4.7s; --opacity: .46; }
.cat-i { --left: 12%; --size: 32px; --duration: 7.2s; --delay: -2.2s; --opacity: .42; }
.cat-j { --left: 82%; --size: 30px; --duration: 8.4s; --delay: -5.6s; --opacity: .38; }
.cat-k { --top: 90%; --size: 40px; --duration: 7.1s; --delay: -6.3s; --opacity: .54; }
.cat-l { --top: 3%; --size: 25px; --duration: 5.4s; --delay: -2.4s; --opacity: .40; }
.cat-m { --top: 35%; --size: 28px; --duration: 6.1s; --delay: -6.8s; --opacity: .44; }
.cat-n { --top: 64%; --size: 34px; --duration: 7.6s; --delay: -3.9s; --opacity: .50; }
.cat-o { --top: 18%; --size: 27px; --duration: 6.9s; --delay: -5.8s; --opacity: .46; }
.cat-p { --top: 25%; --size: 36px; --duration: 8.1s; --delay: -7.1s; --opacity: .60; }
.cat-q { --top: 49%; --size: 30px; --duration: 7.3s; --delay: -1.9s; --opacity: .48; }
.cat-r { --top: 74%; --size: 31px; --duration: 6.6s; --delay: -5.4s; --opacity: .48; }
.cat-s { --left: 28%; --size: 27px; --duration: 7.8s; --delay: -4.6s; --opacity: .40; }
.cat-t { --left: 62%; --size: 34px; --duration: 8.9s; --delay: -2.7s; --opacity: .44; }
.cat-u { --top: 87%; --size: 28px; --duration: 5.7s; --delay: -1.3s; --opacity: .42; }
.cat-v { --top: 10%; --size: 31px; --duration: 6.5s; --delay: -4.8s; --opacity: .50; }
.cat-w { --top: 58%; --size: 27px; --duration: 5.6s; --delay: -3.7s; --opacity: .44; }
.cat-x { --top: 92%; --size: 33px; --duration: 8.5s; --delay: -6.7s; --opacity: .42; }

.launch-glass {
    width: 188px;
    height: 188px;
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .90);
    border-radius: 40px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .44)),
        linear-gradient(180deg, rgba(88, 207, 137, .10), rgba(98, 88, 255, .08));
    box-shadow:
        0 44px 110px rgba(31, 33, 74, .20),
        0 18px 46px rgba(88, 207, 137, .13),
        inset 0 1px 0 rgba(255, 255, 255, .96),
        inset 0 -34px 82px rgba(98, 88, 255, .11);
    backdrop-filter: blur(32px) saturate(175%);
    -webkit-backdrop-filter: blur(32px) saturate(175%);
    animation: launchFloat 1.55s var(--ease) both;
}

.launch-glass::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 39px;
    border: 1px solid rgba(255, 255, 255, .70);
    pointer-events: none;
}

.launch-glass::after {
    content: "";
    position: absolute;
    inset: 16px 18px auto;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
    opacity: .62;
    transform: translateX(-82px) rotate(-7deg);
    animation: launchSweep 1.55s var(--ease) both;
}

.launch-aura {
    position: absolute;
    width: 136px;
    height: 136px;
    border-radius: 38px;
    background:
        linear-gradient(145deg, rgba(88, 207, 137, .16), rgba(98, 88, 255, .10)),
        rgba(255, 255, 255, .20);
    filter: blur(10px);
    opacity: .86;
    animation: launchAura 1.55s var(--ease) both;
}

.launch-glass img {
    width: 78px;
    height: 78px;
    position: relative;
    z-index: 1;
    image-rendering: pixelated;
    filter: drop-shadow(0 14px 20px rgba(23, 23, 56, .20));
    animation: launchIcon 1.1s var(--ease) both;
}

.launch-glass strong {
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 1;
    font-weight: 780;
}

.launch-ring {
    position: absolute;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 0;
    background: conic-gradient(from 90deg, transparent 0 18%, rgba(88, 207, 137, .86) 28%, transparent 44%, rgba(98, 88, 255, .48) 65%, transparent 84% 100%);
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    box-shadow:
        inset 0 0 0 12px rgba(255, 255, 255, .34),
        0 0 0 18px rgba(98, 88, 255, .045);
    animation: launchRing 1.45s linear infinite;
}

.launch-progress {
    width: 74px;
    height: 3px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(23, 23, 56, .10);
}

.launch-progress::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #171738, #58cf89);
    transform-origin: left;
    animation: launchProgress 1.45s var(--ease) both;
}

@keyframes launchFloat {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes launchIcon {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.82);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes launchAura {
    from {
        opacity: 0;
        transform: scale(.78);
    }
    to {
        opacity: .86;
        transform: scale(1);
    }
}

@keyframes launchSweep {
    0% {
        opacity: 0;
        transform: translateX(-92px) rotate(-7deg);
    }
    38% {
        opacity: .68;
    }
    100% {
        opacity: 0;
        transform: translateX(92px) rotate(-7deg);
    }
}

@keyframes launchProgress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes catRun {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(var(--end-x), var(--end-y), 0);
    }
}

@keyframes catStep {
    0% {
        translate: 0 0;
    }
    50% {
        translate: 0 -2px;
    }
    100% {
        translate: 0 0;
    }
}

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

.app-shell {
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(106px + env(safe-area-inset-bottom));
    position: relative;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    text-align: left;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-size: 16px;
    line-height: 1.05;
    font-weight: 780;
}

.brand-lockup small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 680;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(240, 247, 255, .44)),
        radial-gradient(circle at 48% 42%, rgba(88, 207, 137, .20), transparent 58%),
        rgba(255, 255, 255, .46);
    border: 1px solid rgba(255, 255, 255, .86);
    box-shadow:
        0 15px 34px rgba(23, 23, 56, .13),
        inset 0 1px 0 rgba(255, 255, 255, .92),
        inset 0 -12px 28px rgba(98, 88, 255, .08);
}

.brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 8px rgba(23, 23, 56, .16));
}

.status-pill {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(88, 207, 137, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #2d604e;
    font-size: 12px;
    font-weight: 720;
    box-shadow: 0 12px 28px rgba(23, 23, 56, .06);
    white-space: nowrap;
}

.status-pill.is-offline {
    border-color: rgba(224, 68, 90, .22);
    color: #9f2f40;
}

.app-main {
    display: grid;
    gap: 14px;
}

.view {
    display: grid;
    gap: 14px;
    animation: viewIn .28s var(--ease);
}

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

.glass-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(150deg, var(--glass-top) 0%, var(--glass-mid) 52%, var(--glass-low) 100%);
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, .96),
        inset 0 -34px 84px rgba(98, 88, 255, .08);
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.glass-panel::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-xl) - 1px);
    border: 1px solid rgba(255, 255, 255, .72);
    pointer-events: none;
    z-index: 2;
}

.glass-panel::after {
    content: "";
    position: absolute;
    inset: auto 14px 10px;
    height: 32%;
    border-radius: 0 0 calc(var(--radius-xl) - 10px) calc(var(--radius-xl) - 10px);
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .34) 56%, rgba(176, 184, 225, .16) 100%);
    pointer-events: none;
    z-index: 0;
}

.glass-panel > * {
    position: relative;
    z-index: 1;
}

.hero-card {
    min-height: 246px;
    padding: 22px;
    display: grid;
    gap: 18px;
}

.hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.hero-head > div {
    min-width: 0;
}

.hero-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.06;
    font-weight: 780;
}

.hero-title span {
    display: block;
}

.hero-user {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-user.is-long {
    font-size: 27px;
    line-height: 1.06;
}

.hero-subtitle {
    margin: 8px 0 0;
    max-width: 290px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.48;
    font-weight: 620;
}

.account-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .54));
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 10px 22px rgba(31, 33, 74, .06);
}

.status-grid {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.days-ring {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--mint) var(--ring, 68%), rgba(23, 23, 56, .08) 0);
    box-shadow:
        0 20px 46px rgba(88, 207, 137, .22),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}

.days-ring span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
    font-size: 30px;
    font-weight: 780;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}

.status-copy strong {
    display: block;
    font-size: 18px;
    line-height: 1.12;
    font-weight: 760;
}

.status-copy {
    min-width: 0;
}

.status-copy p {
    margin: 7px 0 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 620;
    overflow-wrap: anywhere;
}

.primary-btn,
.secondary-btn,
.text-btn,
.icon-btn {
    border: 0;
    min-height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 760;
    max-width: 100%;
    text-align: center;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

.primary-btn {
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(135deg, #171738 0%, #28245f 58%, #58cf89 100%);
    box-shadow:
        0 18px 38px rgba(23, 23, 56, .20),
        inset 0 1px 0 rgba(255, 255, 255, .20);
}

.secondary-btn {
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .58));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 10px 24px rgba(31, 33, 74, .06);
}

.text-btn {
    min-height: 38px;
    padding: 0 8px;
    color: var(--mint-deep);
    background: transparent;
}

.primary-btn:active,
.secondary-btn:active,
.text-btn:active,
.icon-btn:active {
    transform: translateY(1px);
}

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

.quick-card,
.mini-card,
.tariff-card,
.setup-card,
.list-row {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(250, 252, 255, .54));
    box-shadow:
        var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, .95),
        inset 0 -20px 46px rgba(98, 88, 255, .045);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.quick-card::before,
.mini-card::before,
.tariff-card::before,
.setup-card::before,
.list-row::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-lg) - 1px);
    border: 1px solid rgba(255, 255, 255, .62);
    pointer-events: none;
}

.quick-card > *,
.mini-card > *,
.tariff-card > *,
.setup-card > *,
.list-row > * {
    position: relative;
    z-index: 1;
}

.quick-card {
    min-height: 104px;
    padding: 14px;
    display: grid;
    align-content: space-between;
    text-align: left;
}

.quick-card span {
    color: var(--mint-deep);
    font-size: 14px;
    font-weight: 760;
}

.quick-card strong {
    font-size: 15px;
    line-height: 1.18;
    font-weight: 720;
}

.quick-card small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 680;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 -2px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 760;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 660;
}

.mini-card {
    padding: 16px;
}

.mini-card h3,
.tariff-card h3,
.setup-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.15;
    font-weight: 760;
}

.mini-card p,
.tariff-card p,
.setup-card p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 620;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.stat-pill {
    min-width: 0;
    min-height: 66px;
    padding: 10px;
    border: 1px solid rgba(88, 207, 137, .20);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .46));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
}

.stat-pill strong {
    display: block;
    font-size: 17px;
    font-weight: 760;
}

.stat-pill span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 660;
}

.product-frame {
    padding: 10px;
}

.product-frame picture {
    display: block;
}

.product-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .88);
    filter: saturate(1.03) contrast(1.02);
    box-shadow: 0 14px 32px rgba(31, 33, 74, .10);
}

.tariff-list,
.setup-list,
.more-list {
    display: grid;
    gap: 10px;
}

.tariff-card,
.setup-card {
    padding: 15px;
    display: grid;
    gap: 12px;
}

.ios-setup-card {
    gap: 10px;
}

.ios-setup-head {
    align-items: flex-start;
}

.ios-setup-head .secondary-btn {
    min-width: 124px;
}

.ios-setup-link {
    display: block;
    width: 100%;
    padding: 11px 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid rgba(91, 107, 255, .14);
    border-radius: 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, .68);
    font-size: 12px;
    line-height: 1.35;
}

.ios-copy-vless {
    width: 100%;
}

.ios-json-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(91, 107, 255, .12);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(248, 251, 255, .52));
}

.ios-json-head {
    display: grid;
    gap: 3px;
}

.ios-json-head strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 760;
}

.ios-json-head span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 640;
}

.ios-server-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 10px 6px 12px;
    border: 1px solid rgba(91, 107, 255, .14);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .66);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 760;
}

.ios-server-select select {
    width: 100%;
    min-height: 30px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 760;
}

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

.ios-json-actions .secondary-btn {
    min-height: 42px;
    padding: 0 10px;
    white-space: normal;
    line-height: 1.15;
}

.tariff-top,
.setup-top,
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price {
    font-size: 22px;
    font-weight: 760;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #22624b;
    background: rgba(88, 207, 137, .16);
    border: 1px solid rgba(88, 207, 137, .24);
    font-size: 12px;
    font-weight: 720;
}

.list-row {
    min-height: 58px;
    padding: 12px 14px;
}

.list-row strong {
    display: block;
    font-size: 14px;
    font-weight: 720;
}

.list-row small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 620;
}

.auth-card {
    padding: 22px;
}

.auth-card h1 {
    margin: 12px 0 8px;
    font-size: 31px;
    line-height: 1.03;
    font-weight: 760;
}

.auth-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.46;
    font-weight: 680;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.field {
    display: grid;
    gap: 6px;
}

.field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    outline: none;
    color: var(--ink);
    background: rgba(255, 255, 255, .78);
    font-size: 15px;
    font-weight: 720;
}

.field input:focus {
    border-color: rgba(88, 207, 137, .56);
    box-shadow: 0 0 0 4px rgba(88, 207, 137, .14);
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.notice {
    border: 1px solid rgba(88, 207, 137, .20);
    border-radius: 18px;
    padding: 12px 13px;
    color: #285a49;
    background: rgba(88, 207, 137, .12);
    font-size: 13px;
    line-height: 1.38;
    font-weight: 760;
}

.notice.is-error {
    border-color: rgba(224, 68, 90, .20);
    color: #9f2f40;
    background: rgba(224, 68, 90, .08);
}

.external-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(242, 247, 255, .58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.external-sheet {
    width: min(100% - 28px, 460px);
    position: fixed;
    left: 50%;
    bottom: calc(102px + env(safe-area-inset-bottom));
    z-index: 41;
    transform: translateX(-50%);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(248, 251, 255, .72)),
        linear-gradient(180deg, rgba(88, 207, 137, .10), rgba(98, 88, 255, .08));
    box-shadow:
        0 28px 72px rgba(31, 33, 74, .20),
        inset 0 1px 0 rgba(255, 255, 255, .96);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.external-sheet h2 {
    margin: 12px 0 0;
    font-size: 22px;
    line-height: 1.08;
    font-weight: 780;
}

.external-sheet p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 640;
}

.external-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.loader-card {
    min-height: 280px;
    padding: 28px;
    display: grid;
    grid-template-rows: auto auto auto;
    place-items: center;
    text-align: center;
}

.loader-cat {
    position: relative;
    grid-row: 1;
    grid-column: 1;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
}

.loader-cat img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 14px 18px rgba(23, 23, 56, .16));
}

.loader-card h1 {
    grid-row: 2;
    grid-column: 1;
    margin: 12px 0 6px;
    font-size: 28px;
    font-weight: 760;
}

.loader-card p {
    grid-row: 3;
    grid-column: 1;
    margin: 0;
    color: var(--muted);
    font-weight: 680;
}

.loader-orbit {
    grid-row: 1;
    grid-column: 1;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 8px solid rgba(23, 23, 56, .08);
    border-top-color: var(--mint);
    animation: spin .9s linear infinite;
}

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

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 30;
    width: min(492px, calc(100% - 28px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(246, 249, 255, .62));
    box-shadow:
        0 26px 62px rgba(23, 23, 56, .17),
        inset 0 1px 0 rgba(255, 255, 255, .94),
        inset 0 -18px 42px rgba(98, 88, 255, .06);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.nav-item {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    gap: 3px;
    border: 0;
    border-radius: 17px;
    color: #697095;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
}

.nav-item svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.is-active {
    color: var(--ink);
    background: linear-gradient(180deg, rgba(88, 207, 137, .22), rgba(255, 255, 255, .66));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 10px 22px rgba(88, 207, 137, .08);
}

.hidden {
    display: none !important;
}

body.is-auth .bottom-nav {
    display: none;
}

body.is-auth .app-shell {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

@media (min-width: 860px) {
    .app-shell {
        width: min(100% - 48px, 1120px);
        padding-top: 24px;
    }

    .app-main {
        grid-template-columns: minmax(390px, 520px) minmax(380px, 1fr);
        align-items: start;
    }

    .view {
        grid-column: 1 / -1;
        grid-template-columns: minmax(390px, 520px) minmax(380px, 1fr);
        align-items: start;
    }

    .view > .hero-card,
    .view > .auth-card {
        grid-row: span 3;
    }

    .bottom-nav {
        width: 430px;
    }
}

@media (max-width: 380px) {
    .app-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-card,
    .auth-card {
        padding: 18px;
    }

    .hero-title,
    .auth-card h1 {
        font-size: 28px;
    }

    .hero-user.is-long {
        font-size: 26px;
    }

    .status-grid {
        grid-template-columns: 100px 1fr;
    }

    .ios-setup-head,
    .ios-json-actions {
        grid-template-columns: 1fr;
    }

    .ios-setup-head {
        display: grid;
    }

    .ios-setup-head .secondary-btn {
        width: 100%;
    }

    .days-ring {
        width: 100px;
        height: 100px;
    }

    .days-ring span {
        width: 74px;
        height: 74px;
        font-size: 24px;
    }
}

@media (max-width: 520px) {
    .status-grid {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
    }

    .days-ring {
        width: 104px;
        height: 104px;
    }

    .days-ring span {
        width: 78px;
        height: 78px;
        font-size: 26px;
    }

    .hero-head {
        display: block;
    }

    .hero-head.has-chip > div {
        padding-right: 96px;
    }

    .account-chip {
        position: absolute;
        top: 0;
        right: 0;
    }

    .cat-runner {
        --size: 30px;
    }

    .cat-b,
    .cat-g,
    .cat-k {
        --size: 38px;
    }

    .external-sheet {
        bottom: calc(96px + env(safe-area-inset-bottom));
    }

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

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

    .cat-runner {
        display: none;
    }
}
