.download-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 24px;
    align-items: start;
}

.download-main {
    display: grid;
    gap: 24px;
}

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

.download-card,
.changelog-card,
.install-guide,
.auth-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.download-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.download-card-standard {
    border-color: var(--border);
}

.download-card-gold {
    border-color: rgba(80, 184, 255, 0.36);
    background: linear-gradient(180deg, var(--premium-soft), var(--surface) 48%);
}

.download-card-gold.has-gold-badge {
    padding-top: 54px;
}

.download-badge-gold {
    position: absolute;
    top: 18px;
    left: 24px;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #dcf3ff;
    color: #1769aa;
    font-size: 0.78rem;
    font-weight: 800;
}

.download-card-top {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.download-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.download-icon-gold {
    background: var(--highlight-soft);
    color: var(--premium);
}

.download-title {
    margin-bottom: 6px;
    color: var(--text-strong);
    font-size: 1.25rem;
}

.download-title-gold {
    color: var(--premium);
}

.download-desc {
    color: var(--muted);
    font-size: 0.95rem;
}

.download-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.download-meta-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.download-meta-row dt {
    color: var(--muted);
}

.download-meta-row dd {
    color: var(--text-strong);
    text-align: right;
}

.download-version-highlight {
    color: var(--premium);
    font-weight: 800;
}

.download-btn-standard,
.download-btn-gold {
    width: 100%;
    margin-top: auto;
}

.download-btn-standard {
    background: var(--accent);
    color: #fff;
}

.download-btn-gold {
    background: var(--premium);
    color: #fff;
}

.install-guide {
    padding: 26px;
}

.guide-list {
    display: grid;
    gap: 18px;
}

.guide-step {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
}

.guide-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.guide-step h3 {
    margin-bottom: 4px;
    color: var(--text-strong);
    font-size: 1rem;
}

.guide-step p {
    color: var(--muted);
}

.changelog-card {
    position: sticky;
    top: 94px;
    padding: 24px;
}

.changelog-list {
    display: grid;
    gap: 18px;
    max-height: 540px;
    overflow: auto;
}

.changelog-item {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.changelog-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.changelog-item h3 {
    margin-bottom: 8px;
    color: var(--text-strong);
    font-size: 1rem;
}

.changelog-date {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 500;
}

.changelog-item ul,
.changelog-item ol {
    padding-left: 18px;
    color: var(--muted);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(37, 52, 71, 0.42);
}

.auth-modal.active {
    display: flex;
}

.auth-panel {
    width: min(460px, 100%);
    padding: 24px;
    box-shadow: var(--shadow);
}

.auth-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.auth-panel-title {
    color: var(--text-strong);
    font-size: 1.35rem;
}

.auth-close,
.auth-tabs button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-strong);
    cursor: pointer;
    font-weight: 700;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}

.auth-tabs button.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.auth-message {
    min-height: 24px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.auth-message.error {
    color: var(--error);
}

.auth-message.ok {
    color: var(--success);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-field label {
    color: var(--text-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.auth-submit {
    width: 100%;
}

@media (max-width: 980px) {
    .download-shell,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .changelog-card {
        position: static;
    }
}
