:root {
    color-scheme: light;
    --ink: #251d34;
    --muted: #71677d;
    --accent: #64368a;
    --line: #e6e0eb;
    --paper: #faf8fc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 4px; }
.topbar { max-width: 1200px; margin: auto; padding: 24px 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; font-size: 27px; font-weight: 800; }
.brand span { font-size: 14px; font-weight: 600; max-width: 230px; line-height: 1.4; }
.brand img { width: 86px; height: 68px; object-fit: contain; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 6px; }
.quiet-link { font-size: 14px; }
.container { max-width: 1120px; padding: 30px 36px 70px; margin: auto; }
.intro { padding: 48px 0 35px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.12; letter-spacing: -.04em; margin: 18px 0 24px; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 26px; line-height: 1.25; margin: 12px 0 20px; }
.lead { color: var(--muted); font-size: 19px; }
.notice { background: #efe8f7; padding: 12px 18px; border-radius: 10px; font-size: 14px; }
.event-card { background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 32% 1fr; }
.event-art { min-height: 310px; padding: 30px; background: radial-gradient(ellipse at 80% 20%, #be7155, transparent 60%), linear-gradient(145deg, #261b38, #5b315e); color: white; display: flex; flex-direction: column; justify-content: center; }
.event-art span { font-size: 60px; font-weight: 800; letter-spacing: -.08em; }
.event-art small { margin-top: 18px; color: #f3dcd1; }
.event-info { padding: 28px 34px; }
.muted { color: var(--muted); }
.badge { display: inline-block; background: #f3edf8; color: #64368a; border-radius: 30px; padding: 7px 14px; font-size: 13px; }
.panel { padding: 28px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.login-container { max-width: 510px; padding: 60px 24px; margin: auto; }
.login-container h1 { font-size: 32px; }
label { display: block; margin: 15px 0 6px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid #bcb0c8; border-radius: 8px; font: inherit; color: var(--ink); background: white; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent); }
input[type="hidden"] { display: none; }
input:disabled,select:disabled { background: #f4f1f6; }
button:disabled { opacity: .5; cursor: default; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.check input { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 22px; margin-bottom: 22px; }
.form-grid label { margin: 0; }
.form-grid label input,.form-grid label select { margin-top: 6px; }
.form-grid label.check input { margin-top: 0; }
.form-grid .check { align-self: center; }
.people-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin: 20px 0; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; }
legend { padding: 0 8px; font-weight: 600; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.section-heading h2,.section-heading h3 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions select,.actions input:not([type="checkbox"]) { flex: 1 1 220px; width: auto; }
.actions form { margin: 0; }
.actions a { font-size: 14px; }
.card-list { display: grid; gap: 20px; }
.panel + .panel,form > .panel,.participant-card { margin-top: 22px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; }
.tabs button { background: white; color: var(--accent); border: 1px solid var(--line); }
.tabs button.selected { background: var(--accent); color: white; }
.button { display: inline-block; padding: 12px 22px; border-radius: 8px; background: var(--accent); color: white; text-decoration: none; font-weight: 600; }
.button.secondary { background: #f0eaf5; color: var(--accent); }
.event-card + .event-card { margin-top: 24px; }
.event-art img { width: 150px; height: 150px; object-fit: contain; align-self: center; }
.event-art small { text-align: center; }
.poster-thumb { width: 100%; height: 340px; object-fit: contain; background: #211a2e; display: block; }
.registration-poster { width: 140px; max-height: 220px; object-fit: contain; float: right; margin: 0 0 20px 22px; }
.preserve-lines { white-space: pre-wrap; }
.narrow { max-width: 1000px; }
.wish-order { padding-left: 24px; }
.wish-order li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wish-order li .actions { display: inline-flex; margin-left: 15px; }
.wish-order button { padding: 5px 10px; font-size: 13px; }
.wish-decision { border-bottom: 1px solid var(--line); padding: 0 0 24px; margin-bottom: 24px; }
.catalog-form { padding-bottom: 20px; }
td input[type="number"] { min-width: 105px; }
summary { cursor: pointer; font-weight: 600; }
[hidden] { display: none !important; }
button { cursor: pointer; border: 0; border-radius: 8px; background: var(--accent); color: white; padding: 12px 22px; font: inherit; font-weight: 600; }
.login-container button { width: 100%; margin: 24px 0 18px; }
button.secondary { background: white; color: var(--accent); border: 1px solid var(--line); }
:focus-visible { outline: 3px solid #aa73d2; outline-offset: 3px; }
.error { background: #fff0ed; color: #9e2b24; border-radius: 8px; padding: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0; }
.stats span { display: block; color: var(--muted); font-size: 14px; }
.stats strong { font-size: 36px; }
.finance-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-stats .panel { min-width: 0; }
.finance-stats strong { display: block; overflow-wrap: anywhere; font-size: clamp(24px, 3vw, 36px); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.next-stage { margin-top: 24px; }
footer { padding: 25px; color: var(--muted); font-size: 12px; text-align: center; }
.back-link { display: inline-block; font-weight: 600; margin-bottom: 20px; }
.event-date { color: var(--accent); font-size: clamp(24px, 3vw, 32px); font-weight: 750; line-height: 1.2; margin: 0 0 18px; }
.event-save-bar { margin-top: 26px; padding: 18px 0; display: flex; justify-content: flex-end; }
.flyer-gallery { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0; clear: both; }
.flyer { display: flex; flex-direction: column; width: 150px; gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.flyer img { width: 150px; height: 190px; object-fit: contain; border-radius: 10px; background: #ede7f2; }
.flyer-pdf { min-height: 100px; display: grid; place-items: center; background: #ede7f2; border-radius: 10px; font-size: 26px; font-weight: 700; }
@media (max-width: 680px) {
    .topbar { padding: 20px; align-items: flex-start; }
    .brand { gap: 12px; }
    .brand span { max-width: 125px; font-size: 11px; }
    .brand img { width: 62px; height: 52px; }
    .brand small { font-size: 10px; }
    .quiet-link { font-size: 12px; }
    .container { padding: 20px 18px 40px; }
    .intro { padding: 24px 0; }
    .event-card { grid-template-columns: 1fr; }
    .event-art { min-height: 150px; padding: 24px; }
    .event-art span { font-size: 44px; }
    .event-art small { margin: 0; }
    .event-info, .panel { padding: 22px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .finance-stats { grid-template-columns: 1fr; }
    .form-grid,.people-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-wrap: wrap; }
    .registration-poster { width: 100px; }
    .topbar > .actions { gap: 8px; }
    .topbar button { padding: 8px 12px; }
}

/* Единая шапка: комитет, полное название федерации и слоган. */
.topbar { padding-top: 30px; padding-bottom: 30px; align-items: flex-start; }
.brand { gap: 28px; min-width: 0; }
.brand img { width: 135px; height: 135px; flex: 0 0 135px; }
.brand .brand-copy { max-width: 720px; min-width: 0; font-weight: 400; overflow-wrap: anywhere; }
.brand-copy strong { display: block; font-size: 18px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.brand .brand-federation { display: block; max-width: none; margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.brand small { margin-top: 16px; font-size: 26px; line-height: 1.35; color: var(--ink); font-style: normal; font-weight: 600; }
.phone-hint { display: block; color: #9e2b24; font-size: 13px; font-weight: 400; margin-top: 6px; }
.catalog-event-help { margin: 12px 0 20px; }
.private-time-list { display: grid; gap: 10px; margin-top: 18px; }
.private-time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.private-time-row button { padding: 7px 12px; }
.topbar > .quiet-link { flex-shrink: 0; margin-top: 8px; }
@media (max-width: 800px) {
    .topbar { flex-wrap: wrap; }
    .brand { width: 100%; gap: 18px; }
    .brand img { width: 85px; height: 100px; flex-basis: 85px; }
    .brand .brand-copy { max-width: none; }
    .brand .brand-federation { font-size: 13px; }
    .brand small { font-size: 22px; }
    .topbar > .quiet-link { margin-left: 103px; margin-top: 0; }
}
@media (max-width: 420px) {
    .brand { gap: 12px; }
    .brand img { width: 62px; height: 84px; flex-basis: 62px; }
    .brand-copy strong { font-size: 15px; }
    .brand .brand-federation { font-size: 12px; }
    .topbar > .quiet-link { margin-left: 74px; }
    .event-save-bar button { width: 100%; }
}
