:root {
    --violet: #5A63C4;
    --violet-2: #6B74D0;
    --violet-dark: #4B54AA;
    --violet-deep: #353C80;
    --violet-soft: #EDEFFA;
    --violet-glow: rgba(90, 99, 196, 0.14);
    --accent-light: #B8BEE5;

    --grad: linear-gradient(135deg, #4B54AA, #5A63C4);
    --grad-hover: linear-gradient(135deg, #3F4799, #4E57B5);

    --bg: #FFFFFF;
    --bg-tint: #F5F6FC;
    --bg-grad: linear-gradient(180deg, #EEF0FA 0%, #FFFFFF 50%, #F5F6FC 100%);

    --ink: #1C2144;
    --ink-2: #2E3461;
    --ink-soft: #6A6F8F;
    --line: rgba(75, 84, 170, 0.15);

    --shadow-soft: 0 10px 30px -12px rgba(75, 84, 170, 0.22);
    --shadow-hover: 0 22px 50px -16px rgba(75, 84, 170, 0.38);
    --shadow-card: 0 4px 20px -8px rgba(75, 84, 170, 0.15);
    --radius: 18px;
    --radius-lg: 24px;

    --success: #16a34a;
    --error: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: var(--bg-grad);
}

.ambient::before,
.ambient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.28;
}

.ambient::before {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, var(--violet), transparent 70%);
    top: -150px;
    right: -120px;
    animation: floatA 20s ease-in-out infinite;
}

.ambient::after {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-light), transparent 70%);
    bottom: -250px;
    left: -150px;
    animation: floatB 24s ease-in-out infinite;
}

@keyframes floatA {
    50% {
        transform: translate(-30px, 40px) scale(1.1);
    }
}

@keyframes floatB {
    50% {
        transform: translate(40px, -30px) scale(1.05);
    }
}

main,
header,
footer {
    position: relative;
    z-index: 2;
}

.top-wrap {
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1500px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    z-index: 101;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .brand {
    font-weight: 700;
    font-size: 20px;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.logo-text .tag {
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
    font-weight: 500;
}

.nav-pill {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-pill nav {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 7px 12px;
}

.nav-pill a {
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-pill a:hover {
    color: var(--violet);
    background: var(--violet-soft);
}

.cta-btn {
    background: var(--grad);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s, filter 0.3s;
    box-shadow: 0 8px 22px -8px rgba(75, 84, 170, 0.55);
    flex-shrink: 0;
}

.cta-btn:hover {
    background: var(--grad-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(75, 84, 170, 0.7);
}

.cta-btn:disabled,
.cta-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: auto;
    transform: none;
    filter: grayscale(0.1);
}

.cta-btn:disabled:hover,
.cta-btn.disabled:hover {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: var(--grad);
    box-shadow: 0 8px 22px -8px rgba(75, 84, 170, 0.55);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    flex-shrink: 0;
}

.lang-switch button {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.lang-switch button:hover {
    color: var(--violet);
    background: var(--violet-soft);
}

.lang-switch button.active {
    background: var(--grad);
    color: white;
    box-shadow: 0 4px 10px -3px rgba(75, 84, 170, 0.4);
}

.lang-switch button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.25);
    box-shadow: none;
    transform: none;
}

.lang-switch button[disabled]:hover,
.lang-switch button[disabled]:active {
    background: inherit;
    color: inherit;
    transform: none;
    box-shadow: none;
}

.lang-switch button[disabled]::after,
.lang-switch button[disabled]::before {
    display: none;
}

.burger {
    display: none;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 101;
    flex-shrink: 0;
}

.burger:hover {
    background: var(--violet-soft);
    border-color: var(--violet);
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--violet);
    margin: 4px 0;
    border-radius: 2px;
}

.page {
    max-width: 1300px;
    margin: 20px auto 80px;
    padding: 40px 40px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 20px;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--ink-soft);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--violet);
}

.breadcrumb svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--ink);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 50px;
    animation: fadeUp 0.5s ease 0.3s backwards;
}

.page-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}

.page-header h1 .accent {
    color: var(--violet);
}

.page-header p {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 560px;
    line-height: 1.6;
}

.priv-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--line);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 600;
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
}

.priv-badge svg {
    width: 18px;
    height: 18px;
    stroke: var(--violet);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: flex-start;
    animation: fadeUp 0.7s ease 0.5s backwards;
}

.form-wrap {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--violet-soft);
    color: var(--violet-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.step.active .step-num {
    background: var(--grad);
    color: white;
    box-shadow: 0 4px 12px -4px rgba(75, 84, 170, 0.5);
}

.step.done .step-num {
    background: var(--success);
    color: white;
}

.step.done .step-num::after {
    content: '✓';
    font-size: 16px;
}

.step.done .step-num .n {
    display: none;
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color 0.3s;
}

.step.active .step-label {
    color: var(--ink);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--line);
    margin: 0 14px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    min-width: 20px;
}

.step-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--grad);
    transition: width 0.5s;
}

.step-line.filled::after {
    width: 100%;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.step-sub {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 28px;
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 8px;
}

.field .hint {
    font-size: 12px;
    color: var(--ink-soft);
    margin-top: 6px;
    font-weight: 500;
}

.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field textarea,
.field select {
    width: 100%;
    padding: 13px 16px;
    background: white;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    max-height: 500px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--violet);
    background: white;
    box-shadow: 0 0 0 3px var(--violet-soft);
}

.field textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tiles.three {
    grid-template-columns: repeat(3, 1fr);
}

.tile {
    position: relative;
    background: white;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tile:hover {
    border-color: var(--violet);
    background: var(--violet-soft);
}

.tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tile-ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--violet-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s;
    margin-bottom: 10px;
}

.tile-ic svg {
    width: 20px;
    height: 20px;
    stroke: var(--violet);
    fill: none;
    stroke-width: 1.8;
}

.tile-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.tile-text span {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.4;
}

.tile.checked {
    border-color: var(--violet);
    background: var(--violet-soft);
    box-shadow: 0 6px 18px -8px rgba(75, 84, 170, 0.3);
}

.tile.checked .tile-ic {
    background: var(--grad);
}

.tile.checked .tile-ic svg {
    stroke: white;
}

.tile .check-dot {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    transition: all 0.25s;
    background: white;
}

.tile.checked .check-dot {
    background: var(--grad);
    border-color: var(--violet);
}

.tile.checked .check-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-check {
    position: relative;
}

.chip-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-check label {
    display: inline-block;
    background: white;
    border: 1.5px solid var(--line);
    color: var(--ink-2);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}

.chip-check label:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.chip-check input:checked+label {
    background: var(--grad);
    color: white;
    border-color: var(--violet);
    box-shadow: 0 4px 10px -3px rgba(75, 84, 170, 0.4);
}

.calendar {
    background: var(--bg-tint);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
}

.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.cal-nav {
    display: flex;
    gap: 6px;
}

.cal-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cal-nav button:hover:not(:disabled) {
    background: var(--violet-soft);
    border-color: var(--violet);
}

.cal-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cal-nav svg {
    width: 14px;
    height: 14px;
    stroke: var(--ink-2);
    fill: none;
    stroke-width: 2;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 0;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--ink);
    background: white;
    border: 1px solid transparent;
    position: relative;
}

.cal-day:hover:not(.disabled):not(.selected) {
    background: var(--violet-soft);
    color: var(--violet-dark);
}

.cal-day.disabled {
    color: var(--ink-soft);
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent;
}

.cal-day.today {
    border-color: var(--violet);
}

.cal-day.selected {
    background: var(--grad);
    color: white;
    box-shadow: 0 6px 14px -4px rgba(75, 84, 170, 0.4);
}

.cal-day.other {
    opacity: 0;
    pointer-events: none;
}

.cal-day.has-slot::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--violet);
}

.cal-day.selected.has-slot::after {
    background: rgba(255, 255, 255, 0.7);
}

.slots {
    margin-top: 22px;
}

.slots-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.slots-empty {
    text-align: center;
    padding: 24px 16px;
    font-size: 14px;
    color: var(--ink-soft);
    background: var(--bg-tint);
    border-radius: 12px;
    border: 1px dashed var(--line);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}

.slot {
    padding: 11px 10px;
    background: white;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.slot:hover:not(:disabled):not(.selected) {
    border-color: var(--violet);
    color: var(--violet);
}

.slot.selected {
    background: var(--grad);
    border-color: var(--violet);
    color: white;
    box-shadow: 0 4px 10px -3px rgba(75, 84, 170, 0.4);
}

.slot:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.review-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-tint);
    border-radius: 12px;
    border: 1px solid var(--line);
}

.review-row .k {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 600;
    flex-shrink: 0;
}

.review-row .v {
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
    min-width: 0;
}

.review-row.is-long {
    flex-direction: column;
    gap: 10px;
}

.review-row.is-long .v {
    width: 100%;
    text-align: right;
    font-weight: 500;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--violet-soft);
    border-radius: 12px;
    margin-bottom: 24px;
}

.agree input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--violet);
    flex-shrink: 0;
}

.agree label {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.5;
}

.agree a {
    color: var(--violet);
    font-weight: 600;
    text-decoration: underline;
}

.form-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.btn-back {
    background: white;
    border: 1.5px solid var(--line);
    color: var(--ink-2);
    padding: 12px 22px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.btn-back:disabled,
.btn-back.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: var(--line);
    color: var(--ink-soft);
    pointer-events: auto;
}

.btn-back:disabled:hover,
.btn-back.disabled:hover {
    opacity: 0.5;
    background: #f5f5f5;
    border-color: var(--line);
    color: var(--ink-soft);
    transform: none;
}

.sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.side-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-card h4 svg {
    width: 18px;
    height: 18px;
    stroke: var(--violet);
    fill: none;
    stroke-width: 2;
}

.side-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.side-list li {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.55;
    display: flex;
    gap: 10px;
}

.side-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--violet);
}

.side-card.grad {
    background: var(--grad);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.side-card.grad::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
    border-radius: 50%;
}

.side-card.grad>* {
    position: relative;
    z-index: 2;
}

.side-card.grad h4 {
    color: white;
}

.side-card.grad h4 svg {
    stroke: white;
}

.side-card.grad .phone-line {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 8px 0 6px;
    color: white;
}

.side-card.grad p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.55;
}

.success {
    display: none;
    text-align: center;
    padding: 30px 20px 10px;
    animation: fadeIn 0.5s ease;
}

.success.show {
    display: block;
}

.success-mark {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--grad);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px -12px rgba(75, 84, 170, 0.5);
    position: relative;
}

.success-mark::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--violet);
    opacity: 0;
    animation: ringOut 1.2s ease-out forwards;
}

@keyframes ringOut {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.success-mark svg {
    width: 40px;
    height: 40px;
    stroke: white;
    fill: none;
    stroke-width: 3;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: drawCheck 0.6s 0.3s ease forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success h2 {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.success p {
    color: var(--ink-soft);
    font-size: 15px;
    max-width: 440px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.success .book-id {
    display: inline-block;
    padding: 10px 18px;
    background: var(--violet-soft);
    color: var(--violet-dark);
    font-family: ui-monospace, monospace;
    font-weight: 700;
    border-radius: 10px;
    margin-bottom: 28px;
    letter-spacing: 0.05em;
}

.error {
    display: none;
    text-align: center;
    padding: 30px 20px 10px;
    animation: fadeIn 0.5s ease;
}

.error.show {
    display: block;
}

.error-mark {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d4f, #d9363e);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px -12px rgba(217, 54, 62, 0.5);
    position: relative;
}

.error-mark::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #ff4d4f;
    opacity: 0;
    animation: ringOut 1.2s ease-out forwards;
}

.error-mark svg {
    width: 40px;
    height: 40px;
    stroke: white;
    fill: none;
    stroke-width: 3;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: drawCheck 0.6s 0.3s ease forwards;
}

.error h2 {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.error p {
    color: var(--ink-soft);
    font-size: 15px;
    max-width: 440px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

@media (max-width: 1315px) {
    #startSvg {
        width: 17px;
        height: 17px;
    }

    #startMark {
        display: none;
    }
}

@media (max-width: 1225px) {
    .top-wrap {
        padding: 14px 18px;
        gap: 12px;
        justify-content: space-between;
    }

    .nav-pill {
        display: none;
    }

    .cta-btn.header-cta {
        display: none;
    }

    .lang-switch.header-lang {
        display: none;
    }

    .burger {
        display: block;
    }
}

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .page {
        padding: 20px 18px 0;
        margin-bottom: 50px;
    }

    .form-wrap {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .page-header {
        margin-bottom: 32px;
        gap: 16px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .tiles,
    .tiles.three {
        grid-template-columns: 1fr;
    }

    .stepper {
        margin-bottom: 28px;
    }

    .step-label {
        display: none;
    }

    .step-line {
        margin: 0 6px;
    }

    .form-nav {
        flex-direction: column-reverse;
    }

    .form-nav button {
        width: 100%;
        justify-content: center;
    }

    .review-row {
        flex-direction: column;
        gap: 4px;
    }

    .review-row .v {
        text-align: left;
    }

    .logo-text .brand {
        font-size: 18px;
    }

    .logo-text .tag {
        font-size: 11px;
    }
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: white;
    padding: 80px 32px 40px;
    z-index: 100;
    transition: right 0.4s cubic-bezier(.2, .9, .3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav a {
    font-size: 17px;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: var(--violet);
}

.mobile-nav .cta-btn {
    margin-top: 28px;
    width: 100%;
    justify-content: center;
    padding: 14px;
}

.mobile-nav .lang-switch {
    margin-top: 20px;
    width: 100%;
    justify-content: space-between;
    padding: 6px;
}

.mobile-nav .lang-switch button {
    flex: 1;
    padding: 10px;
    font-size: 13px;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--violet-soft);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    color: var(--violet);
    font-weight: 300;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 21, 48, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 99;
    backdrop-filter: blur(4px);
}

.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

footer {
    border-top: 1px solid var(--line);
    padding: 32px 40px;
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

footer p {
    font-size: 13px;
    color: var(--ink-soft);
}

footer a {
    color: var(--violet);
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.scroll-top-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 130;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.92);
    box-shadow: 0 14px 34px -12px rgba(75, 84, 170, 0.55);
    transition:
        opacity .28s ease,
        transform .28s ease,
        visibility .28s ease,
        box-shadow .28s ease,
        filter .28s ease;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
    background: var(--grad-hover);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 20px 42px -14px rgba(75, 84, 170, 0.68);
}

.scroll-top-btn:active {
    transform: translateY(0) scale(0.97);
}

.scroll-top-btn svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        right: 12px;
        bottom: 12px;
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(26, 21, 48, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: white;
    border-radius: 24px;
    padding: 40px 36px 32px;
    max-width: 475px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 80px -20px rgba(75, 84, 170, 0.4);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(.2, .9, .3, 1);
}

.modal-overlay.show .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1px;
}

.modal-icon.warn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 16px 36px -10px rgba(217, 119, 6, 0.45);
}

.modal-icon.error {
    background: linear-gradient(135deg, #ff4d4f, #d9363e);
    box-shadow: 0 16px 36px -10px rgba(220, 38, 38, 0.45);
}

.modal-icon::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: none;
}

.modal-overlay.show .modal-icon::before {
    animation: modalRing 1.2s ease-out forwards;
}

.modal-icon.warn {
    color: #f59e0b;
}

.modal-icon.error {
    color: #ff4d4f;
}

@keyframes modalRing {
    0% {
        transform: scale(0.85);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    fill: none;
    stroke-width: 2.8;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.modal-overlay.show .modal-icon svg {
    animation: modalDraw 0.5s 0.15s ease forwards;
}

@keyframes modalDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 8px;
}

.modal-msg {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin-bottom: 26px;
}

.modal-close {
    background: var(--grad);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px -8px rgba(75, 84, 170, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(75, 84, 170, 0.65);
}

::selection {
    color: white;
    background: rgb(62, 64, 149);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: rgb(57, 65, 136, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(57, 65, 136, 0.7);
}

.required {
    color: red;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(75, 84, 170, 0.25);
    border-top-color: rgb(75, 84, 170);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.animate-spin-load {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgb(57, 72, 211);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 3px;
}