:root {
    --accent: #4c9fff;
    --bg: #07090d;
    --card: rgba(16, 20, 28, 0.92);
    --line: rgba(255, 255, 255, 0.1);
    --text: #f5f7fb;
    --muted: #9aa3b2;
    --max: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(900px 520px at 78% 18%, rgba(77, 163, 255, 0.18), transparent 62%);
    mask-image: linear-gradient(#000 0%, transparent 88%);
}

.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.sky span {
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: var(--w);
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15) 35%, #fff);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
    opacity: 0;
    animation: shoot var(--t) linear infinite;
    animation-delay: var(--d);
}

@keyframes shoot {
    0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(24deg); }
    8% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(82vw, 36vh, 0) rotate(24deg); }
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(7, 9, 13, 0.78);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

.topbar-inner,
.shell,
.foot-inner {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

.shell,
.foot { position: relative; z-index: 1; }

.topbar-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand img,
.brand-mark {
    width: 28px;
    height: 28px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    color: var(--muted);
    font-size: 14px;
}

.nav a.is-current,
.nav a:hover { color: var(--text); }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    margin: 4px auto;
    background: #fff;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.currency select,
.currency-label,
.user-link,
.user-menu summary {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
}

.user-link,
.user-menu summary,
.basket-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
}

.user-link,
.user-menu {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }

.user-menu a {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #12161e;
}

.user-icon,
.basket-icon {
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.user-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4.2 0-7 2.1-7 4.6V20h14v-1.4c0-2.5-2.8-4.6-7-4.6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4.2 0-7 2.1-7 4.6V20h14v-1.4c0-2.5-2.8-4.6-7-4.6z'/%3E%3C/svg%3E");
}

.basket-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 7h8l.8 11H7.2L8 7zm1.2-1.2a2.8 2.8 0 0 1 5.6 0h-1.4a1.4 1.4 0 0 0-2.8 0H9.2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 7h8l.8 11H7.2L8 7zm1.2-1.2a2.8 2.8 0 0 1 5.6 0h-1.4a1.4 1.4 0 0 0-2.8 0H9.2z'/%3E%3C/svg%3E");
}

.basket-link {
    background: #fff;
    color: #111;
    font-weight: 700;
}

.basket-count {
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 11px;
}

.shell { padding: 28px 0 72px; }

.shell:has(.hero) .page-intro { display: none; }

.page-intro,
.intro h1,
.hero-copy h1 {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.lede,
.prose { color: var(--muted); }

.lede { max-width: 560px; margin-top: 14px; }

.supporter { position: relative; }

.supporter .intro { max-width: 680px; }

.packs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 8px;
    max-width: 680px;
    margin-top: 28px;
    position: relative;
}

.pack { display: contents; }

.pack .tier-card,
.pack .art { display: none; }

.pack:has(input:checked) .tier-card {
    display: block;
    order: 2;
    flex: 1 0 100%;
    margin-top: 6px;
    animation: card-in 0.35s ease;
}

.pack:has(input:checked) .art {
    display: grid;
    position: absolute;
    left: calc(100% + 12px);
    top: -80px;
    width: min(460px, 36vw);
    min-height: 460px;
    place-items: center;
    perspective: 1200px;
    pointer-events: none;
}

.supporter > .art {
    display: grid;
    position: absolute;
    top: 0;
    right: 0;
    width: min(460px, 36vw);
    min-height: 460px;
    place-items: center;
    perspective: 1200px;
    pointer-events: none;
}

.art img {
    grid-area: 1 / 1;
    width: min(100%, 520px);
    height: auto;
    pointer-events: none;
}

.art .logo-glow {
    filter: blur(34px) saturate(1.7) brightness(1.2);
    opacity: 0.8;
    transform: translateY(26px) scale(1.06);
}

.art .logo {
    transform: rotateX(12deg) rotateY(-24deg);
    filter: drop-shadow(0 22px 18px rgba(0, 0, 0, 0.4));
}

.tier-tab {
    order: 1;
    position: relative;
    width: 72px;
    padding: 8px 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #101318;
    color: #b7bec8;
    cursor: pointer;
    text-align: center;
}

.tier-tab input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.tier-tab:has(input:checked) {
    border-color: #3b82f6;
    color: #fff;
    background: #0e1626;
    box-shadow: 0 0 0 1px #3b82f6;
}

.tier-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 auto 4px;
    background: transparent;
    font-weight: 700;
}

.tier-icon img { width: 100%; height: 100%; object-fit: cover; }
.tier-tab span:last-child { display: block; font-size: 11px; }

.tier-card,
.panel,
.widget,
.shelf-row {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
}

.tier-card { padding: 22px 22px 18px; }

.pack:has(input:checked) .tier-card {
    border: 1px solid #3b82f6;
    border-radius: 14px;
    background: #070b12;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.28);
    max-width: 680px;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.tier-head,
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.tier-head h2,
.section-head h2,
.panel h1,
.package-summary h1 {
    font-size: 22px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tier-head h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.tier-price { color: #9aa3b2; text-align: right; white-space: nowrap; }
.tier-price strong { color: #fff; font-size: 22px; font-weight: 800; }
.tier-price span { font-size: 15px; font-weight: 500; }
.tier-price del { margin-right: 6px; }

.tier-perks { margin-top: 18px; color: #e7edf5; font-size: 15px; }
.tier-perks :is(h1, h2, h3, h4, p strong) {
    display: block;
    margin: 12px 0 8px;
    color: #fff;
    font-size: 15px;
}
.tier-perks ul,
.prose ul {
    columns: 2;
    column-gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tier-perks li,
.prose li {
    break-inside: avoid;
    position: relative;
    margin: 0 0 8px;
    padding-left: 16px;
    line-height: 1.35;
}

.tier-perks li::before,
.prose li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
}

.tier-actions,
.shelf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
}

.tier-actions { margin-top: 22px; gap: 12px; }
.tier-actions .btn { min-width: 132px; min-height: 44px; border-radius: 8px; }
.tier-actions .btn-light {
    background: linear-gradient(180deg, #ffffff 0%, #dedede 100%);
    color: #111;
    box-shadow: inset 0 1px 0 #fff;
}
.tier-actions .btn-ghost {
    background: #141414;
    border-color: #3a3a3a;
    color: #fff;
}
.btn-light { background: #fff; color: #141414; }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.btn:hover { transform: translateY(-1px); }
.is-disabled { opacity: 0.45; pointer-events: none; }

.countdown {
    margin-left: 8px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.shelf { margin-top: 54px; }
.section-head { margin-bottom: 14px; }
.section-head a,
.back { color: var(--muted); font-size: 14px; }
.section-head a:hover,
.back:hover { color: var(--text); }

.shelf-list { display: grid; gap: 10px; }
.shelf-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    min-height: 64px;
    padding: 12px 16px;
}
.shelf-row:hover { border-color: rgba(255, 255, 255, 0.2); }
.shelf-meta,
.shelf-row del { color: var(--muted); }
.shelf-row-static { align-items: center; }
.shelf-actions { margin-top: 0; align-items: center; }

.panel { padding: 22px; }
.narrow { width: min(640px, 100%); margin: 24px auto; }
.panel h1,
.package-summary h1 { margin-bottom: 8px; }
.empty { color: var(--muted); margin: 12px 0; }

.basket-list,
.code-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.basket-row,
.code-list li,
.code-row,
.stack-form,
.gift-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.basket-row { justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.basket-row p,
.code-list,
.pay-form p,
.widget-meta { color: var(--muted); }

input,
select,
.stack-form input,
.stack-form select,
.code-row input,
.gift-form input,
.widget input {
    width: min(100%, 360px);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0c1016;
}

.stack-form { display: grid; justify-items: start; margin-top: 16px; }
.stack-form label,
.stack-form select,
.stack-form input { width: min(100%, 420px); }
.stack-form label { display: grid; gap: 6px; }
.code-form,
.pay-form { margin-top: 22px; }
.pay-form p { margin-top: 10px; }

.package-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    margin-top: 16px;
}

.gallery { position: relative; }
.slide { display: none; }
.slide.is-active { display: block; }
.slide img,
.slide iframe {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #10141c;
}
.gallery-nav { display: flex; gap: 8px; margin-top: 10px; }
.gallery-nav button,
.text-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.package-summary .prose { margin: 16px 0; }
.prose :is(p, ul, ol) { margin-bottom: 10px; }
.prose a { color: var(--accent); }

.module-wrap { margin-top: 72px; }
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.widget {
    min-height: 196px;
    padding: 20px 22px 18px;
    border: 1px solid rgba(59, 130, 246, 0.55);
    border-radius: 14px;
    background: #070b12;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.16);
}
.widget h3 {
    margin-bottom: 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.widget .prose { color: #c5ceda; font-size: 15px; }
.widget-image { width: 100%; border-radius: 12px; margin-bottom: 12px; }
.widget form { display: grid; gap: 8px; }
.widget-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.widget-list li,
.donor,
.feature-package,
.status-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.widget-list li {
    position: relative;
    justify-content: flex-start;
    padding-left: 16px;
    color: #e7edf5;
}
.widget-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
}
.widget-list strong { font-weight: 600; }
.pay-price { margin-left: auto; color: #9aa3b2; white-space: nowrap; }
.feature-package img,
.donor img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.donor { justify-content: flex-start; align-items: center; }
.donor-copy strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.donor-amount {
    margin-top: 4px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}
.donor-amount span { color: #9aa3b2; font-size: 14px; font-weight: 500; }
.widget-list em,
.feature-package em { display: block; color: var(--muted); font-style: normal; }
.bar {
    height: 8px;
    margin: 14px 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.bar span { display: block; height: 100%; background: #3b82f6; }
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f07178;
}
.status-dot.is-online { background: #3dd68c; }

.foot {
    border-top: 1px solid var(--line);
    padding: 22px 0 32px;
    color: var(--muted);
}
.foot-inner,
.foot-links { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.foot p { margin-top: 4px; }
.foot a:hover,
.text-button:hover { color: var(--text); }

.toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    color: #111;
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        left: 20px;
        right: 20px;
        top: 74px;
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #10141b;
    }
    .nav.is-open { display: flex; }
    .top-actions { gap: 6px; }
.user-menu summary { max-width: 140px; overflow: hidden; }
    .pack:has(input:checked) .art,
    .supporter > .art {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        width: 100%;
        min-height: 280px;
        order: 3;
        flex: 1 0 100%;
    }
    .tier-perks ul,
    .prose ul { columns: 1; }
    .module-grid { grid-template-columns: 1fr; }
    .tier-head,
    .section-head,
    .foot-inner { display: grid; }
    .tier-price { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .sky { display: none; }
}
