:root {
    --bg: #f0f0f0;
    --panel: #ffffff;
    --text: #222222;
    --muted: #666666;
    --line: #dedede;
    --soft-line: #e5e8eb;
    --primary: #169bd5;
    --primary-hover: #0f86bc;
    --primary-soft: #eef8fc;
    --danger: #d32f2f;
    --danger-bg: #fff3f3;
    --ok-bg: #f0faf4;
    --ok: #1b7f3a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

.download-header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1920px;
    height: 60px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    display: block;
    height: 22px;
    width: auto;
}

.header-title {
    padding-left: 14px;
    border-left: 1px solid var(--line);
    color: #333333;
    font-size: 15px;
    font-weight: 600;
}

.download-page {
    width: 100%;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.download-panel {
    width: min(680px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 34px 36px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.error-panel {
    text-align: center;
}

.error-code {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.error-panel .summary {
    max-width: 460px;
    margin-right: auto;
    margin-left: auto;
}

.error-action {
    min-width: 120px;
    height: 44px;
    margin-top: 28px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.error-action:hover {
    background: var(--primary-hover);
}

.brand-area {
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

h1,
h2,
p {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
}

.summary {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.loading-box,
.notice-box {
    margin-bottom: 18px;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 14px;
}

.loading-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-soft);
    color: #17627f;
}

.notice-box {
    display: flex;
    align-items: center;
    min-height: 68px;
    background: var(--danger-bg);
    color: var(--danger);
}

.notice-box.success {
    background: var(--ok-bg);
    color: var(--ok);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #b8ddeb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.password-form label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 700;
}

.password-row {
    display: flex;
    gap: 8px;
}

.password-row input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    font-size: 15px;
    color: var(--text);
    background: #ffffff;
}

.password-row input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(22, 155, 213, 0.14);
}

.password-row button,
.download-button {
    height: 44px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.password-row button {
    width: 96px;
}

.password-row button:hover,
.download-button:hover {
    background: var(--primary-hover);
}

.password-row button:disabled,
.download-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.help-text {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.file-section {
    margin-top: 28px;
    border-top: 1px solid var(--soft-line);
    padding-top: 24px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title-row h2 {
    margin: 0;
    font-size: 18px;
}

.expire-text {
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.file-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--soft-line);
    border-radius: 6px;
    padding: 14px;
    background: #ffffff;
}

.file-name {
    font-weight: 700;
}

.file-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.download-button {
    min-width: 96px;
    padding: 0 14px;
}

@media (max-width: 560px) {
    .header-inner {
        height: auto;
        min-height: 56px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 10px 16px;
    }

    .header-title {
        padding-left: 0;
        border-left: 0;
        font-size: 13px;
    }

    .download-panel {
        padding: 24px 18px;
    }

    .password-row,
    .file-item,
    .section-title-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .password-row button,
    .download-button {
        width: 100%;
    }

    .expire-text {
        text-align: left;
    }
}
