:root {
    --bg: #fff9f6;
    --bg-soft: #fff3ed;
    --card: #ffffff;
    --line: #f1dacf;
    --text: #2d3137;
    --muted: #626d7a;
    --accent: #ff8f74;
    --accent-2: #6aa2ff;
    --max: 900px;
    --radius: 18px;
    --shadow: 0 10px 24px rgba(134, 98, 83, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.58;
}

/* Landing page */
body.landing-page {
    background:
        radial-gradient(circle at 100% -10%, #ffe9dd 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, #ffe5f2 0%, transparent 44%),
        var(--bg);
}

.wrap {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

header {
    padding: 28px 0 20px;
}

.brand {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.hero {
    margin-top: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

h1 {
    font-size: clamp(29px, 8vw, 44px);
    line-height: 1.12;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 62ch;
    font-size: clamp(16px, 4vw, 19px);
}

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 13px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform .16s ease, box-shadow .16s ease;
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent) 0%, #ffb07f 100%);
    color: #2f1b12;
    box-shadow: 0 8px 18px rgba(255, 143, 116, 0.32);
}

.btn-secondary {
    border-color: #b7d1ff;
    background: #eaf1ff;
    color: #1d4684;
}

main {
    padding: 8px 0 36px;
}

section {
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

h2 {
    margin: 0 0 10px;
    font-size: clamp(22px, 5.8vw, 30px);
    letter-spacing: -0.015em;
}

p {
    margin: 0;
}

.muted {
    color: var(--muted);
    margin-top: 8px;
}

.list {
    margin: 14px 0 0;
    padding-left: 18px;
}

.list li + li {
    margin-top: 8px;
}

.steps {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.step {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.step-num {
    width: 26px;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #ffd9ca;
    color: #583326;
    margin-top: 1px;
}

.support-box {
    background: linear-gradient(180deg, #fff8f4 0%, #fff 100%);
    border: 1px solid #f2d3c4;
    border-radius: 15px;
    padding: 14px;
    margin-top: 12px;
}

.support-btn {
    margin-top: 12px;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 12px;
    text-decoration: none;
    background: #ffe2d6;
    border: 1px solid #f3bcaa;
    color: #6d2f1f;
    font-weight: 700;
}

footer {
    margin-top: 16px;
    margin-bottom: 26px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.contacts {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.contacts a {
    color: #295ca5;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-14 {
    margin-top: 14px;
}

.fs-14 {
    font-size: 14px;
}

.fs-13 {
    font-size: 13px;
}

.fw-700 {
    font-weight: 700;
}

/* Error pages */
body.error-page {
    min-height: 100vh;
}

body.error-404 {
    background:
        radial-gradient(circle at 100% -10%, #ffe9dd 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, #ffe5f2 0%, transparent 44%),
        var(--bg);
}

body.error-403 {
    background:
        radial-gradient(circle at 100% -10%, #ffe9dd 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, #ffeaf0 0%, transparent 44%),
        var(--bg);
}

body.error-500 {
    background:
        radial-gradient(circle at 100% -10%, #ffe9dd 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, #fef3dd 0%, transparent 44%),
        var(--bg);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(28px, 6vw, 52px) clamp(24px, 6vw, 56px);
    max-width: 480px;
    width: 100%;
}

.code {
    font-size: clamp(72px, 20vw, 108px);
    font-weight: 800;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
    -webkit-background-clip: text;
    background-clip: text;
}

.error-404 .code {
    background: linear-gradient(90deg, var(--accent) 0%, #ffb07f 100%);
}

.error-403 .code {
    background: linear-gradient(90deg, #ff7eb3 0%, #ff4e8b 100%);
}

.error-500 .code {
    background: linear-gradient(90deg, #ffb347 0%, #ff7043 100%);
}

.emoji {
    font-size: 48px;
    margin: 12px 0 0;
}

.error-page h1 {
    margin: 14px 0 8px;
    font-size: clamp(20px, 5vw, 26px);
    letter-spacing: -0.01em;
}

.desc {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.error-page .btn {
    min-height: 46px;
    padding: 0 20px;
    font-size: 15px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-ghost {
    border-color: var(--line);
    background: var(--bg-soft);
    color: var(--text);
}

.brand-link {
    margin-top: 28px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.brand-link span {
    color: var(--accent);
    font-weight: 600;
}

.hint {
    margin-top: 14px;
    background: #fff8ee;
    border: 1px solid #ffe4b5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #7a5220;
    text-align: left;
}

.hint ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.hint li + li {
    margin-top: 4px;
}

@media (min-width: 720px) {
    .hero,
    section {
        padding: 28px;
    }

    .grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}
