:root {
  color-scheme: light;
  --canvas: #f9f8f5;
  --paper: #fffefa;
  --ink: #25211d;
  --body: #4d4942;
  --muted: #625e56;
  --border: #d7d1c6;
  --gold: #72531d;
  --gold-line: #b8a47a;
  --silver: #eeefec;
  --danger: #942a27;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.58 var(--sans);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: clamp(2rem, 5.2vw, 3.75rem); line-height: 1.04; letter-spacing: -.042em; }
h3 { font-size: 1.55rem; line-height: 1.18; letter-spacing: -.025em; }
p { color: var(--body); }
a { color: var(--gold); text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #795215; outline-offset: 4px; }
.frame { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.visually-hidden, .trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.site-header {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  padding-block: .35rem;
}
.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font: 1.035rem var(--serif);
  text-decoration: none;
}
.header-link {
  min-height: 44px;
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  font-size: .82rem;
}
.button {
  min-height: 3.35rem;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding: .8rem 1rem;
  border: 1px solid transparent;
  border-radius: .18rem;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: var(--gold); }
.button-secondary { background: transparent; color: var(--ink); border-color: #9c8b68; }
.button-secondary:hover { background: #eae2d4; }
.button:disabled { opacity: .7; cursor: wait; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 31rem;
  display: grid;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5.7rem) clamp(1.2rem, 5.8vw, 5.4rem);
  border: 1px solid var(--border);
  background: linear-gradient(120deg, #fffdfa 8%, #f6f1e7 65%, #e9e9e4);
}
.hero-content { position: relative; z-index: 1; }
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #fffdfa 5%, #fffcf6b8 51%, #fffdfa00 94%),
    radial-gradient(ellipse at 87% 45%, #e4d7ba 5%, transparent 58%),
    linear-gradient(130deg, transparent 52%, #fafbfa 77%, #f2ecdf 80%, #cbd0cc 100%);
}
.hero-glow span {
  position: absolute;
  inline-size: 46rem;
  block-size: 32rem;
  right: -28rem;
  top: 0;
  border: 1px solid #a48d5d63;
  box-shadow: inset 0 0 1.7rem #fff9ee9e, 0 0 .45rem #ffffffe8;
  border-radius: 50%;
  transform: rotate(-37deg);
}
.hero-glow span:nth-child(2) { right: -32rem; top: 2rem; }
.hero-glow span:nth-child(3) { right: -36rem; top: 4rem; }
.event-date, .eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .38rem .55rem;
  color: var(--gold);
  font-size: .73rem;
  font-weight: 650;
  letter-spacing: .13em;
  line-height: 1.45;
  text-transform: uppercase;
}
.event-date > span { color: #897449; }
.hero h1 {
  margin-top: 1.45rem;
  max-width: 10ch;
  font-size: clamp(2.375rem, 12vw, 6.35rem);
  letter-spacing: -.062em;
  line-height: .96;
}
.hero-year {
  display: block;
  margin-left: -.05em;
  color: var(--gold);
  font-size: 1.7em;
  line-height: .87;
  font-variant-numeric: lining-nums;
}
.hero-title { display: block; margin-top: .11em; }
.hero-description { margin-top: 1.5rem; max-width: 28rem; font-size: clamp(1.035rem, 2.2vw, 1.25rem); }
.hero-button { margin-top: 1.5rem; }

.program {
  display: grid;
  gap: 1.7rem;
  padding-block: clamp(3rem, 8.5vw, 6.5rem);
}
.program-intro p { margin-top: 1rem; max-width: 29rem; }
.program-agenda > p { font-weight: 650; color: var(--ink); }
.agenda-list { list-style: none; padding: 0; margin: .55rem 0 0; }
.agenda-list li {
  position: relative;
  padding: .85rem .25rem .85rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--body);
}
.agenda-list li:last-child { border-bottom: 1px solid var(--border); }
.agenda-list li::before {
  content: '';
  position: absolute;
  width: .32rem;
  height: .32rem;
  top: 1.43rem;
  left: .15rem;
  background: var(--gold-line);
  transform: rotate(45deg);
}
.gift {
  padding: clamp(2rem, 6vw, 5rem) clamp(1.2rem, 5.8vw, 5.4rem);
  border: 1px solid var(--border);
  background: linear-gradient(147deg, var(--silver), #f9f8f2 51%, #eee6d4);
}
.gift-inner { max-width: 47rem; }
.gift p { max-width: 39rem; margin-top: 1rem; }
.gift .button { margin-top: 1.5rem; }
.expert {
  display: grid;
  gap: 1.25rem clamp(1.5rem, 6vw, 5rem);
  padding-block: clamp(3rem, 7vw, 5.2rem);
}
.expert .eyebrow { margin-bottom: .75rem; }
.expert h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.expert-city { font-size: .52em; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.expert-copy > p:last-child { margin-top: .75rem; max-width: 39rem; }
.expert-photo {
  display: block;
  width: min(100%, 17.5rem);
  height: auto;
  border: 1px solid var(--border);
}
.registration {
  margin-bottom: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--gold-line);
  background: var(--paper);
  outline: 1px solid #e6e1d7;
  outline-offset: -1px;
}
.registration-entry { display: grid; }
.registration-intro, .form-panel, .success { padding: clamp(1.2rem, 4vw, 3rem); }
.registration-intro { background: #f3efe6; }
.registration-intro p { margin-top: .85rem; max-width: 31rem; }
.form-panel { min-width: 0; }
form { display: grid; gap: .95rem; }
.field { display: grid; gap: .28rem; min-width: 0; }
.field > span:first-child, .interests legend { color: var(--ink); font-size: .92rem; font-weight: 630; }
.field-pair { display: grid; gap: .95rem; }
input:not([type="checkbox"]), select, textarea {
  min-height: 2.85rem;
  min-width: 0;
  width: 100%;
  border: 1px solid #a49e91;
  border-radius: .18rem;
  background: var(--paper);
  color: var(--ink);
  padding: .55rem .7rem;
}
input[type="date"] { appearance: none; }
textarea { resize: vertical; }
input::placeholder { color: var(--muted); }
input[type="checkbox"] {
  margin: .15rem 0 0;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  accent-color: var(--gold);
}
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; }
.interests { border: 0; padding: 0; min-width: 0; margin: 0; }
.interests legend { padding: 0; }
.interests > p:not(.field-error) { font-size: .82rem; padding: .2rem 0 .55rem; }
.interests > .field-error { margin-block-start: .45rem; }
.interest-options { display: grid; gap: .45rem; }
.topic, .check-line {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-height: 2.75rem;
  padding: .56rem .64rem;
  font-size: .875rem;
  line-height: 1.48;
}
.topic { border: 1px solid var(--border); border-radius: .18rem; }
.topic:hover, .topic:has(input:checked) { background: #f4eddd; border-color: #b69e6e; }
.topic:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.topic input:focus-visible { outline: none; }
.consents { display: grid; padding-top: .6rem; border-top: 1px solid var(--border); }
.check-line { padding-inline: 0; }
.check-line span, .notice, .copy-status { overflow-wrap: anywhere; }
#consent-text, #marketing-consent-text { white-space: pre-wrap; }
.privacy-link {
  min-height: 44px;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-inline-start: 1.75rem;
  font-size: .84rem;
  line-height: 1.45;
}
.submit-button { width: 100%; }
.notice { padding: .75rem 1rem; border-inline-start: 2px solid var(--gold-line); background: #f4efe4; }
.notice-error { color: var(--danger); border-color: var(--danger); background: #fcf1ec; }
#retry-event { margin-top: .85rem; }
.success { max-width: 48rem; margin-inline: auto; }
.success h2 { margin: .8rem 0 1rem; }
.success p:not(.event-date), .success .field { margin-top: .65rem; }
.success-step { color: var(--ink); font-weight: 700; }
.success .request-id {
  margin-top: 1.25rem;
  padding-block: .75rem;
  border-block: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.success-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.request-id strong { margin-inline-start: .25rem; font-variant-numeric: tabular-nums; }
.copy-status:empty { display: none; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 4.25rem;
  gap: .2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  padding-block: .65rem;
}
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }

@media (min-width: 36rem) {
  .frame { width: min(100% - 3.5rem, 72rem); }
  .hero-glow span { right: -15rem; }
  .hero-glow span:nth-child(2) { right: -19rem; }
  .hero-glow span:nth-child(3) { right: -23rem; }
  .expert { grid-template-columns: minmax(10rem, .46fr) 1fr; align-items: center; }
  .expert-photo { grid-row: 1; grid-column: 1; }
  .expert-copy { grid-row: 1; grid-column: 2; }
  .interest-options { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 53rem) {
  .hero { min-height: min(42rem, calc(100svh - 5.5rem)); }
  .hero h1 { font-size: clamp(4.5rem, 8.25vw, 6.35rem); }
  .hero-glow span { width: 56rem; height: 38rem; right: -9rem; }
  .hero-glow span:nth-child(2) { right: -15rem; top: 3rem; }
  .hero-glow span:nth-child(3) { right: -21rem; top: 6rem; }
  .program { grid-template-columns: 1fr 1fr; gap: 3.25rem; align-items: start; }
  .registration-entry { grid-template-columns: .78fr 1.22fr; }
  .field-pair { grid-template-columns: minmax(8.5rem, .68fr) 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.admin-main { padding: 1.65rem 0 3rem; }
.admin-main h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); line-height: 1.04; letter-spacing: -.042em; }
.admin-main h2 { font-size: clamp(1.7rem, 4vw, 2.45rem); }
.admin-panel {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: clamp(1rem, 3.3vw, 2rem);
}
.login-panel { width: min(100%, 30rem); margin: clamp(1rem, 8vh, 6rem) auto; }
.login-panel h1 { font-size: clamp(1.8rem, 5vw, 2.55rem); }
.login-panel form, .event-settings form { margin-top: 1rem; }
.dashboard-title {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.25rem;
}
.event-selection { flex: 0 1 19rem; }
#event-dashboard, #dashboard > .notice { margin-top: 1rem; }
#event-dashboard > * + * { margin-top: 1rem; }
#retry-dashboard { margin-top: .75rem; }
.admin-panel summary {
  cursor: pointer;
  min-height: 44px;
  padding: .6rem 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.event-settings summary { font-weight: 650; }
.event-settings form { max-width: 46rem; }
.participants-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.stats, .list-controls { display: grid; gap: .75rem; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1rem 0; }
.stats > div {
  padding: .65rem .75rem;
  border-top: 1px solid var(--gold-line);
  background: #f5f2ea;
}
.stats dt { font-size: .79rem; }
.stats dd {
  margin: 0;
  color: var(--ink);
  font: 1.9rem/1.12 var(--serif);
  font-variant-numeric: tabular-nums;
}
.list-status { margin: .8rem 0 .45rem; color: var(--muted); font-size: .87rem; }
.participant { border-top: 1px solid var(--border); }
.participant:last-child { border-bottom: 1px solid var(--border); }
.participant summary { line-height: 1.42; }
.participant .tag {
  display: inline-block;
  margin-inline-start: .55rem;
  padding: .15rem .45rem;
  border-radius: .2rem;
  background: #eee8d8;
  color: #604713;
  font-size: .75rem;
}
.participant[open] { background: #f9f7f1; }
.participant[open] > summary { padding-inline: .5rem; }
.participant-body { padding: 0 .5rem .85rem; }
.application-data {
  display: grid;
  gap: .35rem 1rem;
  margin: 0 0 .95rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .95rem;
}
.application-data dt { font-size: .78rem; color: var(--muted); }
.application-data dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.edit-fields { display: grid; gap: .75rem; }
#load-more { margin-top: .8rem; }
.admin-panel textarea { min-height: 4.5rem; }

@media (min-width: 40rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-controls { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
  .application-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Утверждённая афиша: целиком, без обрезки и наложения текста. */
.hero-with-poster { display: grid; gap: 1.75rem; padding: 0 0 2rem; background: var(--paper, #faf9f6); min-height: auto; }
.event-poster { display: block; width: 100%; height: auto; }
.hero-with-poster .hero-content { padding: 0 1.4rem; }
.hero-with-poster h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.hero-with-poster .hero-year { font-size: 1em; }
@media (min-width: 900px) {
  .hero-with-poster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 0; gap: 0; }
  .hero-with-poster .event-poster { grid-column: 2; grid-row: 1; }
  .hero-with-poster .hero-content { grid-column: 1; grid-row: 1; padding: 2rem; }
}

.legal-document { max-width: 62rem; padding-block: 2rem 4rem; overflow-wrap: anywhere; }
.legal-document h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-block: 2rem 1rem; }
.legal-document h2 { font-size: 1.65rem; margin-block: 2rem 1rem; }
.legal-document p { margin-block: 1rem; }
.legal-document table { width: 100%; border-collapse: collapse; }
.legal-document th, .legal-document td { border: 1px solid var(--border); padding: .75rem; text-align: left; vertical-align: top; }
.legal-document nav { margin-top: 2rem; }
@media (max-width: 600px) { .legal-document table, .legal-document tbody, .legal-document tr, .legal-document td { display: block; } .legal-document thead { display: none; } .legal-document tr { margin-block: 1rem; } }
