:root {
    color-scheme: light;
    --background: #f5f7fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #6f7787;
    --border: #dfe4ec;
    --accent: #3867f4;
    --accent-hover: #2857e6;
    --accent-soft: #eef3ff;
    --danger: #b42318;
    --danger-bg: #fff2f0;
    --success: #176b45;
    --success-bg: #edf9f2;
    --shadow: 0 18px 60px rgba(25, 39, 75, 0.10);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 50% 0%, #eaf0ff 0, transparent 38rem), var(--background);
}
button, input { font: inherit; }
.page {
    width: 100%; min-height: 100vh; display: flex; justify-content: center;
    padding: clamp(36px, 7vw, 80px) 20px 40px;
}
.hero { width: min(760px, 100%); text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; color: #35415a; font-size: 15px; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--accent); font-size: 20px; }
h1 { max-width: 700px; margin: 0 auto 18px; font-size: clamp(38px, 7vw, 62px); line-height: 1.03; letter-spacing: -0.045em; }
h1 span { color: var(--accent); }
.subtitle { max-width: 590px; margin: 0 auto 32px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.download-card, .mobile-download-card { padding: 28px; border: 1px solid rgba(215,221,232,.9); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.field-label, fieldset legend { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 800; }
input[type="url"] { width: 100%; height: 56px; padding: 0 16px; border: 1px solid var(--border); border-radius: 14px; outline: none; color: var(--text); background: #fbfcfe; }
input[type="url"]:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(56,103,244,.12); }
fieldset { min-width: 0; margin: 24px 0; padding: 0; border: 0; }
.format-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.format-option { position: relative; cursor: pointer; }
.format-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.format-option span { display: flex; flex-direction: column; gap: 4px; min-height: 82px; padding: 17px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.format-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.format-option strong { font-size: 18px; }
.format-option small { color: var(--muted); font-size: 14px; }
.primary-button { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 14px; cursor: pointer; color: #fff; background: var(--accent); font-size: 17px; font-weight: 800; text-decoration: none; transition: background 150ms ease, opacity 150ms ease; }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:disabled { cursor: not-allowed; opacity: .6; }
.status { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.status.info { color: #3150a0; background: var(--accent-soft); }
.status.error { color: var(--danger); background: var(--danger-bg); }
.status.success { color: var(--success); background: var(--success-bg); }
.result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.result-meta { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.result-meta strong { overflow-wrap: anywhere; }
.result-meta span { color: var(--muted); font-size: 14px; }
.link-button { margin-top: 10px; }
.phone-block { margin-top: 18px; display: grid; grid-template-columns: 1fr 150px; gap: 20px; align-items: center; padding: 18px; border-radius: 16px; background: #f8faff; }
.phone-block p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.phone-block img { width: 150px; height: 150px; border-radius: 8px; background: white; }
.legal-note { margin: 25px auto 0; color: #9298a5; font-size: 12px; line-height: 1.5; text-align: center; }
.mobile-page { align-items: flex-start; }
.mobile-download-card { width: min(520px, 100%); text-align: center; }
.mobile-title { font-size: clamp(34px, 9vw, 50px); }
.mobile-file-meta { display: flex; flex-direction: column; gap: 7px; margin: 28px 0 20px; padding: 18px; background: #f8faff; border-radius: 15px; }
.mobile-file-meta strong { overflow-wrap: anywhere; }
.mobile-file-meta span { color: var(--muted); }
@media (max-width: 600px) {
    .page { padding: 28px 14px; }
    .download-card, .mobile-download-card { padding: 19px; border-radius: 20px; }
    .format-options { grid-template-columns: 1fr; }
    .phone-block { grid-template-columns: 1fr; text-align: center; }
    .phone-block img { margin: 0 auto; }
}

.progress-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.progress-heading span { color: var(--muted); }
.progress-heading strong { font-variant-numeric: tabular-nums; }
.progress-track { position: relative; height: 12px; overflow: hidden; border-radius: 999px; background: #e5eaf3; }
.progress-fill { width: 0%; height: 100%; border-radius: inherit; background: var(--accent); transition: width 300ms ease; }
.progress-panel.is-processing .progress-fill { position: relative; overflow: hidden; }
.progress-panel.is-processing .progress-fill::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: progress-sheen 1.2s linear infinite; }
.progress-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; color: #9298a5; font-size: 11px; }
.progress-stages span:nth-child(2), .progress-stages span:nth-child(3) { text-align: center; }
.progress-stages span:last-child { text-align: right; }
@keyframes progress-sheen { from { transform: translateX(-140%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } .progress-panel.is-processing .progress-fill::after { animation: none; display: none; } }
