.hero {
    position: relative;
    min-height: calc(100vh - 64px);
    min-height: calc(100svh - 64px);
    padding: 48px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: center;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #0c0c12; }
.hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .28;
    filter: saturate(.8) blur(1px);
    transform: scale(1.04);
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 35%, rgba(17,17,17,.35) 0%, var(--bg) 78%),
        linear-gradient(to bottom, rgba(17,17,17,.2), var(--bg));
}
.hero > *:not(.hero-bg) { position: relative; z-index: 1; }
.hero .hero-big-logo { width: 240px; margin-bottom: 16px; }

.hub { width: 100%; max-width: 1000px; text-align: left; }
.hub .sliced-inner {
    padding: 0;
    background: rgba(21,21,21,.94);
    box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.hub-inner {
    display: grid;
    grid-template-columns: 1.3fr 1.5fr auto;
    align-items: center;
}
.hub-main, .hub-stats, .hub-cta { padding: 18px 22px; }
.hub-main { border-right: 1px solid #2a2a2a; min-width: 0; }
.hub-name {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0;
    font-weight: 600; font-size: 16px; margin-bottom: 8px;
}
.hub-state {
    font-family: var(--font-mono); font-size: 11px; color: var(--muted);
    margin-left: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.hub-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.hub-tag {
    font-family: var(--font-mono); font-size: 11px; color: #bbb;
    background: #222; border: 1px solid #333; padding: 2px 8px;
}
.hub-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px;
}
.hub-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-stat .data-val { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-bar { height: 4px; background: #2a2a2a; margin-top: 5px; }
.hub-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }
.hub-cta { display: flex; flex-direction: column; gap: 8px; border-left: 1px solid #2a2a2a; }
.hub-cta .btn { padding: 10px 18px; font-size: 12px; letter-spacing: .5px; white-space: nowrap; }

.btn.copied { border-color: #72d47d; color: #72d47d; }

.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

.about-shot {
    position: relative; overflow: hidden; margin-bottom: 16px;
    aspect-ratio: 16 / 10; background: #0d0d10;
}
.about-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-shot::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(21,21,21,.7), transparent 45%);
}

.gallery-section { max-width: 1200px; }
.gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 150px;
    gap: 12px;
}
.shot {
    position: relative; overflow: hidden; cursor: zoom-in;
    background: #0d0d10; border: 1px solid var(--border);
    transition: border-color .2s, transform .2s;
}
.shot:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.shot:nth-child(2) { grid-column: span 3; }
.shot:nth-child(3) { grid-column: span 3; }
.shot:nth-child(4), .shot:nth-child(5), .shot:nth-child(6) { grid-column: span 2; grid-row: span 2; }
.shot img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    image-rendering: auto; transition: transform .5s ease;
}
.shot:hover { border-color: var(--accent); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.shot:hover img { transform: scale(1.05); }
.shot figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px;
    font-family: var(--font-mono); font-size: 12px; color: #ddd;
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
    opacity: 0; transform: translateY(6px); transition: all .25s;
}
.shot:hover figcaption { opacity: 1; transform: none; }
.shot { margin: 0; }

.no-image { background: repeating-linear-gradient(45deg, #151515, #151515 10px, #1b1b1b 10px, #1b1b1b 20px); }
.no-image::before {
    content: 'скриншот'; position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 12px; color: #555; z-index: 1;
}

.band {
    position: relative; height: 280px; overflow: hidden;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.band img { width: 100%; height: 100%; object-fit: cover; opacity: .55; display: block; }
.band::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right, var(--bg), transparent 30%, transparent 70%, var(--bg));
}
.band-text {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 0 24px;
}
.band-text strong { font-size: clamp(22px, 3vw, 32px); letter-spacing: -.5px; }
.band-text span { color: #ccc; margin-top: 6px; font-size: 14px; }

.play-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: stretch; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.steps li {
    position: relative; padding-left: 52px; color: #ccc; font-size: 14px; line-height: 1.6;
    counter-increment: step;
}
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 500; color: var(--accent);
    border: 1px solid rgba(232,105,58,.4); background: rgba(232,105,58,.08);
}
.steps li strong { color: var(--text); display: block; margin-bottom: 2px; }
.steps code, .addr-box code {
    font-family: var(--font-mono); font-size: 13px; color: var(--accent);
    background: #222; padding: 1px 6px; border: 1px solid #333;
}
.addr-box { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.addr-box h3 { margin: 0; font-size: 16px; }
.addr-box p { margin: 0; color: var(--muted); font-size: 13px; }
.addr-line {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #111; border: 1px solid #333; padding: 12px 14px;
}
.addr-line code { background: none; border: 0; padding: 0; font-size: 15px; }
.addr-line .btn { padding: 8px 14px; font-size: 11px; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.addr-actions .btn { font-size: 12px; padding: 10px 16px; }

.lightbox {
    position: fixed; inset: 0; z-index: 200; display: none;
    align-items: center; justify-content: center; flex-direction: column; gap: 12px;
    background: rgba(0,0,0,.9); cursor: zoom-out;
    padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; max-height: 80svh; width: auto; border: 1px solid #333; }
.lb-cap { font-family: var(--font-mono); font-size: 13px; color: #aaa; text-align: center; }
.lb-close {
    position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; line-height: 1;
}

@media (max-width: 900px) {
    .hub-inner { grid-template-columns: 1fr; }
    .hub-main { border-right: 0; border-bottom: 1px solid #2a2a2a; }
    .hub-cta { border-left: 0; border-top: 1px solid #2a2a2a; flex-direction: row; }
    .hub-cta .btn { flex: 1; }
    .play-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
    .shot:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    .shot:nth-child(1) { grid-column: span 2; grid-row: span 2; }
    .band { height: 200px; }
}

.toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: min(520px, calc(100vw - 32px));
    background: #1c1c1c; border: 1px solid var(--accent); color: var(--text);
    padding: 12px 16px; font-size: 13px; line-height: 1.5;
    box-shadow: 0 10px 30px rgba(0,0,0,.6); transition: all .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer-legal a { color: var(--muted); border-bottom: 1px dashed #555; text-decoration: none; }
.footer-legal a:hover { color: var(--text); }



.data-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-val {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-align: right;
}
.data-val.accent { color: var(--accent); }

#support {
    max-width: 1000px;
}

.support-intro {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
    align-items: start;
}

.support-mission h3,
.support-impact h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a2a;
}

.support-mission p {
    color: #bbb;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 16px;
}

.support-mission p:last-child { margin-bottom: 0; }
.support-mission strong { color: var(--text); }

.support-impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-impact-list li {
    position: relative;
    padding-left: 24px;
    font-size: 13.5px;
    color: #999;
    line-height: 1.55;
}

.support-impact-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 1px;
}

.support-impact-list strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 2px;
}

.support-cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.support-note {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 900px) {
    .support-intro {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 32px;
    }
}

#contributors {
    max-width: 1000px;
}

.contributors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.contributor {
    flex: 0 1 240px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #151515;
    border: 1px solid var(--border);
    padding: 14px 16px;
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contributor:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contributor-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    overflow: hidden;
    background: #0d0d10;
    border: 1px solid #222;
}

.contributor-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: #111;
    z-index: 0;
}

.contributor-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block;
    background: #0d0d10;
}

.contributor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contributor-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.contributor-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contributors-note {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
    text-align: center;
    margin: 20px auto 0;
    max-width: 560px;
}

@media (max-width: 520px) {
    .contributor {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


@media (max-width: 900px) {
    .changelog-list-container {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
    .changelog-controls input,
    .changelog-controls select {
        font-size: 16px;
    }
    .addr-line {
        flex-direction: column;
        align-items: stretch;
    }
    .addr-line .btn {
        width: 100%;
    }
    .addr-actions .btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 520px) {
    .hero {
        min-height: auto;
        padding: 32px 16px;
        gap: 24px;
    }
    .hero .hero-big-logo {
        width: 180px;
    }
    .hero-subtitle {
        font-size: 11px;
        letter-spacing: 3px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .hub-main,
    .hub-stats,
    .hub-cta {
        padding: 16px;
    }
    .hub-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px 16px;
    }
    .hub-stat .data-val {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }
    .hub-cta {
        flex-direction: column;
    }
    .hub-cta .btn {
        width: 100%;
    }
    .support-cta .btn-large {
        width: 100%;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
    }
}

@media (hover: none) {
    .shot figcaption {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .shot:hover img {
        transform: none;
    }
    .nav-link:hover {
        padding-left: 10px;
    }
    .nav-link.nav-sub:hover {
        padding-left: 24px;
    }
    .wiki-card:hover,
    .contributor:hover,
    .social-icon:hover {
        transform: none;
    }
}

.hero-bg picture,
.about-shot picture,
.shot picture {
    display: block;
    width: 100%;
    height: 100%;
}

.lightbox {
    touch-action: pan-y;
}
