/* DentalEvents: образовательные события для стоматологов
   Палитра: бирюза (чистота, медицина), тёмно-синий (доверие), янтарь (событие, акцент). */
:root {
    --bg: #f3faf9;
    --surface: #ffffff;
    --text: #0b2e4a;
    --muted: #5b7083;
    --border: #dcebea;
    --primary: #0e9aa7;
    --primary-dark: #0b7f9e;
    --primary-soft: #e3f5f4;
    --accent: #ffc24b;
    --accent-soft: #fff4dc;
    --danger: #c43d3d;
    --danger-soft: #fdecec;
    --success: #1c8c5e;
    --success-soft: #e3f6ed;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(11, 46, 74, .04), 0 8px 24px rgba(11, 46, 74, .07);
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
a { color: var(--primary-dark); }
img { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 32px; padding-bottom: 72px; }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 28px; font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 40px; height: 40px; display: block; }
.brand-name { font-weight: 800; font-size: 20px; line-height: 1.1; }
.brand-name span { color: var(--primary); }
.brand-tagline { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 48px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0e9aa7 0%, #0b7f9e 55%, #0b5f86 100%);
    color: #fff;
}
.hero::after {
    content: "";
    position: absolute;
    right: -60px; bottom: -80px;
    width: 360px; height: 360px;
    background: url("/img/tooth-outline.svg") center / contain no-repeat;
    opacity: .12;
    pointer-events: none;
}
.hero h1 { font-size: 44px; }
.hero p { font-size: 18px; opacity: .92; margin: 16px 0 28px; max-width: 560px; }
.hero .eyebrow {
    display: inline-block; margin-bottom: 16px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.hero-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.hero-benefits li {
    display: flex; gap: 14px; align-items: center;
    padding: 14px 16px; border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
.hero-benefits .icon {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent); color: var(--text); font-weight: 800; font-size: 14px;
}
.hero-benefits strong { display: block; }
.hero-benefits small { opacity: .85; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border: 0; border-radius: 12px;
    background: var(--primary); color: #fff;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b9c7cf; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { background: var(--accent); }
.btn-block { width: 100%; }
.btn-link { background: none; color: var(--muted); padding: 13px 8px; }
.btn-link:hover { background: none; color: var(--danger); }

/* ---------- Секции ---------- */
.section { margin-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Карточки событий ---------- */
.events-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card {
    display: flex; flex-direction: column;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; color: inherit; text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11, 46, 74, .12); }
.event-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder { width: 100%; height: 100%; position: relative; }
.cover-placeholder::after {
    content: ""; position: absolute; right: -10%; bottom: -25%; width: 70%; height: 120%;
    background: url("/img/tooth-outline.svg") center / contain no-repeat; opacity: .35;
}
.cat-CONFERENCE   { background: linear-gradient(135deg, #0e9aa7, #0b5f86); }
.cat-MASTER_CLASS { background: linear-gradient(135deg, #2bb59a, #0e8a7e); }
.cat-COURSE       { background: linear-gradient(135deg, #3b6fd8, #26479c); }
.cat-WEBINAR      { background: linear-gradient(135deg, #7b6be0, #4f3fb3); }

.date-badge {
    position: absolute; left: 14px; top: 14px; z-index: 1;
    min-width: 56px; padding: 6px 8px; border-radius: 12px; background: #fff; text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.date-badge .day { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.date-badge .month { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }

.event-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card .meta { color: var(--muted); font-size: 14px; }
.event-card .speaker { font-size: 14px; font-weight: 600; }
.event-card .footer {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
}
.event-card .price { font-size: 18px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary-dark);
}
.tag-soldout { background: var(--danger-soft); color: var(--danger); }
.tag-few { background: var(--accent-soft); color: #8a5a00; }

.price { font-weight: 800; }

/* ---------- Как это работает ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px;
    border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800;
}
.step p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Страница события ---------- */
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--primary); }

.event-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.event-main { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.event-main .event-cover { aspect-ratio: 21 / 8; }
.event-main .content { padding: 28px; }
.event-main h1 { font-size: 34px; margin: 12px 0 18px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.fact { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fact span { font-weight: 700; }

.description { white-space: pre-line; margin: 0 0 24px; }

.speaker-card { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.avatar {
    flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: 20px;
}
.speaker-card small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.speaker-card strong { display: block; font-size: 17px; }

.book-aside { position: sticky; top: 92px; padding: 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.book-aside .price { font-size: 30px; }
.book-aside ul { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; font-size: 14px; }
.book-aside li::before { content: "✓"; color: var(--primary); font-weight: 800; margin-right: 8px; }
.book-aside .note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* ---------- Форма записи ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; max-width: 620px; margin: 0 auto; }
.card h1 { font-size: 26px; margin: 10px 0 6px; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field input, .field select { width: 100%; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select {
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.field .error { color: var(--danger); font-size: 13px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkbox input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.timer {
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    margin-top: 18px; padding: 12px 16px; border-radius: 12px;
    background: var(--primary-soft); color: var(--primary-dark); font-weight: 700;
}
.timer .time { font-size: 22px; font-variant-numeric: tabular-nums; }
.timer.urgent { background: var(--danger-soft); color: var(--danger); }

.alert { padding: 14px 16px; border-radius: 12px; margin: 16px 0; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--accent-soft); color: #7a4f00; }

.state { text-align: center; padding: 56px 16px; color: var(--muted); }

/* ---------- Текстовые страницы ---------- */
.prose { max-width: 760px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.prose h1 { font-size: 30px; margin-bottom: 16px; }
.prose h2 { font-size: 20px; margin: 24px 0 8px; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--text); color: #c9d6df; padding: 40px 0; font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-tagline { color: #9fb3c2; }
.site-footer a { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 32px 24px; }
    .hero h1 { font-size: 32px; }
    .event-layout { grid-template-columns: 1fr; }
    .book-aside { position: static; }
    .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    h1, .event-main h1 { font-size: 26px; }
    .nav { display: none; }
    .brand-tagline { display: none; }
    .event-main .content, .card, .prose { padding: 20px; }
    .form-row, .steps { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
}

/* ---------- Будущие / прошедшие ---------- */
.period-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.period-tab {
    padding: 10px 18px; border: 0; border-radius: 10px; background: none; color: var(--muted);
    font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
}
.period-tab.active { background: var(--primary); color: #fff; }
.event-card.is-past { opacity: .85; }
.event-card.is-past .event-cover { filter: grayscale(.6); }

/* ---------- Страница мероприятия ---------- */
.block { margin-bottom: 28px; }
.block h2, .goal h2 { font-size: 20px; margin-bottom: 10px; }
.goal { margin: 0 0 28px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.goal p { margin: 0; white-space: pre-line; }
.speakers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.speaker-card span { display: block; font-size: 14px; }
.sponsor { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--border); }
.sponsor a, .sponsor strong { font-weight: 800; }

.aside-title { margin: 20px 0 10px; font-size: 16px; }
.sessions { display: grid; gap: 10px; }
.session {
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.session-info { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.session-city { font-size: 16px; }
.session.is-past { opacity: .7; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 10px; flex: none; }

/* ---------- Оформление записи ---------- */
.booking-summary {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 4px;
    padding: 16px; border-radius: var(--radius-sm); background: var(--bg);
}
.booking-summary small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.change-link { font-size: 13px; margin-left: 6px; }
.req { color: var(--danger); }
.hint { color: var(--muted); font-size: 13px; }
.note { font-size: 13px; color: var(--muted); }

/* ---------- Билет ---------- */
.ticket { text-align: center; }
.ticket .booking-summary { text-align: left; }
.ticket-qr { display: block; margin: 8px auto 0; width: 260px; height: 260px; image-rendering: pixelated; }
.ticket-code { margin: 10px 0 4px; font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.ticket-hint { font-size: 14px; }

@media (max-width: 600px) {
    .booking-summary { grid-template-columns: 1fr; }
    .period-tab { font-size: 16px; padding: 8px 12px; }
}
.tag { white-space: nowrap; }
.event-layout { grid-template-columns: 1fr 380px; }
@media (max-width: 900px) { .event-layout { grid-template-columns: 1fr; } }

/* ---------- Выбор города (плашки) ---------- */
.cities-block h2 { margin-bottom: 4px; }
.cities-hint { margin: 0 0 14px; font-size: 14px; }
.city-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.city-card {
    display: flex; flex-direction: column; gap: 8px; text-align: left;
    padding: 18px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface);
    font: inherit; color: inherit; cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
button.city-card:hover { border-color: var(--primary); box-shadow: 0 10px 24px rgba(14, 154, 167, .15); transform: translateY(-2px); }
button.city-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.city-card.is-disabled { cursor: default; background: var(--bg); opacity: .8; }
.city-card.is-loading { opacity: .6; pointer-events: none; }
.city-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.city-name { font-size: 20px; font-weight: 800; }
.city-detail { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.city-icon { flex: none; width: 18px; text-align: center; }
.city-cta { margin-top: 4px; font-weight: 800; color: var(--primary-dark); }

.aside-cities { margin: 4px 0 16px; }
.aside-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; font-size: 14px; }
.aside-list li::before { content: "✓"; color: var(--primary); font-weight: 800; margin-right: 8px; }
.fixed-note { margin: 8px 0 0; }

/* ---------- HTML-описание ---------- */
.description.rich { white-space: normal; }
/* :where() не добавляет веса: оформление из rich.css (классы de-*) всегда важнее этих базовых правил */
:where(.description.rich) img, :where(.description.rich) video { max-width: 100%; height: auto; border-radius: 12px; }
:where(.description.rich) video { display: block; margin: 12px 0; background: #000; }
:where(.description.rich) table { border-collapse: collapse; width: 100%; margin: 12px 0; }
:where(.description.rich) td, :where(.description.rich) th { border: 1px solid var(--border); padding: 8px 10px; }
:where(.description.rich) h2, :where(.description.rich) h3 { margin: 18px 0 8px; }
:where(.description.rich) ul, :where(.description.rich) ol { padding-left: 22px; }
:where(.description.rich) a { color: var(--primary-dark); }

/* ---------- Телефон с маской: серые нули показывают, сколько цифр осталось ---------- */
.phone-input { position: relative; background: #fff; border-radius: 12px; }
.phone-input input { position: relative; background: transparent; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.phone-ghost {
    position: absolute; inset: 0; display: flex; align-items: center; padding: 0 15px;
    font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: pre; pointer-events: none;
    color: #b8c6cf; overflow: hidden;
}
.phone-typed { color: transparent; }

/* ---------- Стоимость и скидка в форме записи ---------- */
.price-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; background: #f7fcfc; }
.price-box .price-row { display: flex; justify-content: space-between; gap: 12px; }
.price-box .old { color: var(--muted); }
.price-box .old span:last-child { text-decoration: line-through; }
.price-box .discount { color: #1f9d6a; font-weight: 600; }
.price-box .total { font-weight: 800; font-size: 18px; }

/* ---------- Страница мероприятия: адаптивная раскладка ---------- */
/* Широкий экран: шире контейнер, слева описание, справа запись (прилипает при прокрутке) */
.container-wide { max-width: 1480px; }
.event-hero { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
/* Обложка мероприятия целиком, без обрезки: высота по картинке (очень высокие ограничены, поля по бокам тёмные) */
.event-hero .event-cover { aspect-ratio: auto; height: auto; background: #0b2e4a; }
.event-hero .event-cover img { width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.event-hero .event-cover .cover-placeholder { height: clamp(160px, 22vw, 300px); }
.event-hero .content { padding: 28px 32px; }
.event-hero h1 { font-size: 34px; margin: 12px 0 18px; }
.event-hero .goal { margin: 0; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.event-main { display: grid; gap: 24px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }

/* Отдельный блок описания: карточка с цветной полосой сверху и чертой под заголовком */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 32px 28px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin: 0 -32px 22px; padding: 20px 32px 16px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 22px; }
.description-panel { border-top: 4px solid var(--primary); }
.description-panel .description { margin: 0; font-size: 16px; line-height: 1.65; }
:where(.description.rich) > :first-child { margin-top: 0; }
:where(.description.rich) > :last-child { margin-bottom: 0; }
:where(.description.rich) p { margin: 0 0 12px; }
:where(.description.rich) hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
:where(.description.rich) img { display: block; margin: 12px 0; }

.book-aside { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 24px; }
.aside-price { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.aside-price .price { font-size: 30px; }
.book-aside .aside-title { margin: 18px 0 4px; font-size: 20px; }
.book-aside .city-cards { grid-template-columns: 1fr; }
.book-aside .city-name { font-size: 18px; }
.mobile-only { display: none; }

/* Узкий экран: всё в одну колонку, запись под описанием */
@media (max-width: 1000px) {
    .event-layout { grid-template-columns: 1fr; }
    .book-aside { position: static; max-height: none; overflow: visible; }
    .book-aside .city-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .mobile-only { display: inline-flex; margin-top: 18px; }
    .event-hero .event-cover .cover-placeholder { height: clamp(140px, 36vw, 260px); }
}
@media (max-width: 600px) {
    .event-hero .content { padding: 20px; }
    .event-hero h1 { font-size: 26px; }
    .panel { padding: 0 20px 20px; }
    .panel-head { margin: 0 -20px 16px; padding: 16px 20px 12px; }
    .book-aside { padding: 20px; }
}

/* ---------- Оплата переводом и чек ---------- */
.payment-block {
    display: grid; gap: 14px; padding: 20px; border-radius: var(--radius);
    border: 2px solid var(--primary); background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 60%);
}
.payment-title { margin: 0; font-size: 20px; }
.pay-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pay-card, .pay-qr { display: grid; gap: 8px; justify-items: start; align-content: start; padding: 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--border); }
.pay-card small, .pay-qr small { color: var(--muted); font-weight: 600; }
.pay-card-number { white-space: nowrap; font-size: 18px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pay-card .btn-light { border: 1px solid var(--border); }
.pay-qr img { width: 180px; height: 180px; object-fit: contain; border-radius: 10px; background: #fff; }
.receipt-drop {
    position: relative; display: flex; align-items: center; gap: 10px; padding: 16px; cursor: pointer;
    border: 2px dashed var(--primary); border-radius: var(--radius-sm); background: #fff; font-weight: 700; color: var(--primary-dark);
}
.receipt-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.receipt-drop:hover { background: var(--primary-soft); }
.receipt-drop.is-attached { border-style: solid; border-color: var(--success); background: var(--success-soft); color: var(--success); }
.receipt-drop.is-loading { opacity: .6; pointer-events: none; }
.receipt-icon { font-size: 20px; }
#submit-btn:disabled { opacity: .5; cursor: not-allowed; }

.result-details { display: grid; gap: 10px; margin: 0 0 16px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.result-details p { margin: 0; }

.done-dialog {
    width: min(480px, calc(100% - 32px)); padding: 28px 24px 22px; border: 0; border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(11, 46, 74, .3); color: var(--text); text-align: center;
}
.done-dialog::backdrop { background: rgba(11, 46, 74, .55); }
.done-dialog h2 { margin: 8px 0 14px; font-size: 22px; }
.done-dialog #done-body { display: grid; gap: 10px; margin-bottom: 18px; text-align: left; }
.done-dialog #done-body p { margin: 0; }
.done-icon {
    width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
    background: var(--success-soft); color: var(--success); font-size: 32px; font-weight: 800;
}

a[href^="tel:"] { white-space: nowrap; }

/* Описание со встроенными стилями на телефоне: фото, видео и плитки на всю ширину
   (!important нужен, чтобы перебить style="..." внутри описания) */
@media (max-width: 600px) {
    .description.rich img,
    .description.rich video,
    .description.rich [style*="width:44%"],
    .description.rich [style*="width:48.5%"] { width: 100% !important; min-width: 0 !important; margin-right: 0 !important; box-sizing: border-box; }
}

/* ---------- Правило возврата ---------- */
.refund-alert {
    display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px 16px;
    border-radius: var(--radius-sm); border: 1px solid #f3c27a; background: #fff4dc; color: #6b4300;
}
.refund-alert p { margin: 0; line-height: 1.5; }
.refund-alert b { color: #8a4b00; }
.refund-alert a { color: #8a4b00; font-weight: 700; white-space: nowrap; }
.refund-icon {
    flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: #e08a1e; color: #fff; font-weight: 800;
}
.payment-block .refund-alert { margin: 0; }
.aside-refund { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #fff4dc; color: #8a4b00; font-weight: 700; font-size: 12px; }
.city-deadline { color: #8a4b00; }
.messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.refund-alert a.messenger { display: inline-flex; padding: 5px 12px; border-radius: 999px; color: #fff; font-size: 13px; text-decoration: none; }
.refund-alert a.messenger-wa { background: #1d9a52; }
.refund-alert a.messenger-tg { background: #229ed9; }

/* Телефон: описание максимально во всю ширину экрана */
@media (max-width: 600px) {
    .container-wide { padding: 0 8px; }
    .panel { padding: 0 12px 16px; }
    .panel-head { margin: 0 -12px 14px; padding: 14px 12px 10px; }
}

/* ---------- Страница политики ---------- */
.policy-text { line-height: 1.65; }
.policy-text h2 { font-size: 19px; margin: 26px 0 8px; }
.policy-text p { margin: 0 0 10px; }
.policy-text ul { margin: 0 0 10px; padding-left: 22px; }
.policy-text a { color: var(--primary-dark); }

/* ---------- Скидки на странице мероприятия и проверка серийного номера ---------- */
.aside-offers { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.aside-offers .offer { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--success-soft); }
.aside-offers .offer-value { flex: none; min-width: 52px; padding: 2px 8px; border-radius: 8px; background: var(--success); color: #fff; font-size: 14px; text-align: center; }
.aside-offers .offer-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; }
.aside-offers small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.serial-offer { padding: 8px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 600; }
.serial-status { padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.serial-status.is-found { background: var(--success-soft); color: var(--success); font-weight: 600; }
.serial-status.is-missing { background: #fff4dc; color: #6b4300; }
.aside-offers .offer::before { content: none; display: none; }
