﻿:root {
  --bg: #f2eadf;
  --paper: rgba(249, 243, 233, 0.86);
  --paper-strong: #f9f1e7;
  --ink: #24160e;
  --muted: #6c5547;
  --accent: #8e2f1f;
  --accent-deep: #5f190f;
  --gold: #b98a3b;
  --forest: #284137;
  --line: rgba(53, 27, 15, 0.12);
  --shadow: 0 18px 60px rgba(55, 27, 11, 0.16);
  --content-max: 1380px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Golos Text", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 138, 59, 0.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(142, 47, 31, 0.18), transparent 24%),
    linear-gradient(180deg, #e9ddcc 0%, var(--bg) 35%, #eadfce 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(111, 73, 48, 0.08) 49%, transparent 51%),
    linear-gradient(-45deg, transparent 48%, rgba(111, 73, 48, 0.08) 49%, transparent 51%);
  background-size: 42px 42px;
}

img,
video {
  max-width: 100%;
  display: block;
}

iframe {
  width: 100%;
  border: 0;
}

.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(10px, 2vw, 28px);
  padding-bottom: 72px;
}

.page-shell > main > .hero,
.page-shell > main > .section {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.hero > *,
.ticket-layout > *,
.vote-layout > *,
.quiz-layout > *,
.teams-layout > *,
.details-grid > *,
.contacts-grid > *,
.about-grid > *,
.jury-grid > * {
  min-width: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand strong,
.hero h1,
.section-heading h2,
.info-card h3,
.detail-block h3,
.timeline-item h3,
.contact-card h3,
.price-card h3,
.ticket-result h3,
.quiz-card h3,
.quiz-result h3,
.checkin-title {
  font-family: "Cormorant SC", serif;
}

.brand strong {
  display: block;
  font-size: 1.55rem;
}

.brand small {
  color: var(--muted);
}

.brand__crest {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff6ea;
  box-shadow: var(--shadow);
}

.brand__crest img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a,
.contact-card a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.contact-card a:hover {
  color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f1;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(95, 25, 15, 0.22);
}

.button--ticket {
  min-height: 60px;
  padding: 0 30px;
  font-size: 1rem;
}

.button--secondary,
.button--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(36, 22, 14, 0.16);
  box-shadow: none;
}

.hero,
.ticket-layout,
.details-grid,
.contacts-grid,
.about-grid,
.vote-layout,
.quiz-layout {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  padding: 58px 0 34px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.92;
  max-width: 10ch;
}

.hero__lead,
.muted,
.info-card p,
.detail-block p,
.timeline-item p,
.contact-card p,
.price-card p,
.ticket-copy p,
.info-message,
.quiz-result p,
.checkin-note,
.camera-status {
  color: var(--muted);
}

.hero__lead {
  max-width: 58ch;
  font-size: 1.1rem;
}

.hero__actions,
.payment-actions,
.camera-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__actions {
  margin: 28px 0;
}

.countdown-card {
  margin-bottom: 26px;
  padding: 20px 22px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 10px;
}

.countdown-grid div {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.9);
  text-align: center;
}

.countdown-grid strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

.countdown-grid span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero__stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.hero__stats li {
  min-width: 132px;
}

.hero__stats strong {
  display: block;
  font-size: 1.8rem;
  color: var(--accent);
}

.ornament-card,
.info-card,
.detail-block,
.contact-card,
.price-card,
.map-frame,
.timeline-item,
.gallery-card,
.quiz-card,
.scanner-shell,
.ticket-card,
.vote-scoreboard {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.ornament-card::before,
.info-card::before,
.detail-block::before,
.contact-card::before,
.price-card::before,
.timeline-item::before,
.gallery-card::before,
.quiz-card::before,
.scanner-shell::before,
.ticket-card::before,
.vote-scoreboard::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(185, 138, 59, 0.24);
  border-radius: 20px;
  pointer-events: none;
}

.hero__panel,
.info-card,
.detail-block,
.contact-card,
.price-card,
.timeline-item,
.ticket-widget,
.vote-panel,
.vote-scoreboard,
.quiz-result,
.scanner-shell,
.checkin-panel,
.checkin-log {
  padding: 24px;
}

.ornament-card__label,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.ornament-card__date {
  font-family: "Cormorant SC", serif;
  font-size: 4rem;
  line-height: 1;
}

.hero__panel-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 22, 14, 0.3), transparent);
  margin: 18px 0;
}

.section {
  padding: clamp(26px, 4vw, 42px) 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.section--accent {
  padding: clamp(22px, 3vw, 38px) clamp(16px, 2.5vw, 28px);
  margin: clamp(14px, 2vw, 24px) 0;
  border-radius: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.76), rgba(235, 223, 208, 0.84));
  border: 1px solid rgba(111, 73, 48, 0.14);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.section-heading h2,
.checkin-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.98;
  max-width: 18ch;
}

.about-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.details-grid,
.contacts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contacts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-story-card {
  grid-column: 1 / -1;
}

.contact-story-details {
  margin-top: 6px;
}

.contact-story-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}

.contact-story-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.map-frame {
  margin-top: 22px;
  padding: 10px;
}

.map-frame iframe {
  min-height: clamp(220px, 42vw, 360px);
  border-radius: 22px;
}

.section-cta {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 16px;
}

.timeline-item span {
  font-family: "Cormorant SC", serif;
  font-size: 2rem;
  color: var(--accent);
}

.timeline-item--collapsed {
  display: none;
}

.gallery-carousel {
  position: relative;
}

.gallery-viewport {
  overflow: hidden;
  border-radius: 24px;
}

.gallery-track {
  display: flex;
  transition: transform 0.42s ease;
  will-change: transform;
}

.gallery-slide {
  min-width: 100%;
}

.gallery-card {
  min-height: clamp(250px, 42vw, 460px);
  margin: 0;
  padding: 20px;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background:
    linear-gradient(180deg, transparent, rgba(36, 22, 14, 0.52)),
    linear-gradient(135deg, rgba(40, 65, 55, 0.92), rgba(185, 138, 59, 0.62));
  color: #fff8f1;
}

.gallery-card--with-image {
  background-color: rgba(40, 65, 55, 0.92);
}

.gallery-card figcaption {
  position: relative;
  z-index: 1;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(36, 22, 14, 0.2);
  background: rgba(249, 241, 231, 0.88);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.gallery-nav--prev {
  left: 12px;
}

.gallery-nav--next {
  right: 12px;
}

.gallery-dots {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(36, 22, 14, 0.26);
  cursor: pointer;
}

.gallery-dot--active {
  background: var(--accent);
}

.ticket-layout,
.vote-layout,
.quiz-layout {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.vote-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.quiz-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.teams-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.teams-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 24px;
}

.teams-form-card h3 {
  margin-top: 0;
}

.teams-form-card {
  min-width: 0;
  padding: 24px;
}

.teams-form-card .ticket-form,
.teams-form-card .ticket-form label {
  min-width: 0;
}

.teams-form-card .ticket-form input,
.teams-form-card .ticket-form select,
.teams-form-card .ticket-form textarea,
.teams-copy .button {
  width: 100%;
  max-width: 100%;
}

.teams-regulation {
  margin: 0;
}

.teams-regulation a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.teams-fieldset {
  border: 1px solid rgba(36, 22, 14, 0.15);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  margin: 0;
}

.teams-fieldset legend {
  padding: 0 6px;
  font-weight: 600;
}

.teams-fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.jury-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.jury-card {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  text-align: center;
  padding: 16px;
}

.jury-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.jury-card p {
  margin: 0;
  font-size: 0.94rem;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.jury-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(36, 22, 14, 0.28)),
    linear-gradient(135deg, rgba(40, 65, 55, 0.92), rgba(185, 138, 59, 0.62));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.feature-list {
  padding-left: 18px;
  color: var(--ink);
}

.checkout-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.checkout-step {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(36, 22, 14, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.checkout-step--active {
  background: rgba(142, 47, 31, 0.12);
  color: var(--accent);
}

.ticket-form,
.quiz-form {
  display: grid;
  gap: 14px;
}

.quiz-progress {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.ticket-form label,
.quiz-card label,
.team-card {
  display: grid;
  gap: 8px;
}

.ticket-form label {
  font-weight: 600;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.checkin-form input,
.team-card input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 22, 14, 0.15);
  background: rgba(255, 250, 245, 0.9);
  font: inherit;
  color: var(--ink);
}

.ticket-form textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.ticket-form input[type="checkbox"],
.ticket-form input[type="radio"] {
  min-height: 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  accent-color: var(--accent);
}

.payment-grid,
.scanner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-summary,
.info-message {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(36, 22, 14, 0.12);
}

.info-message--ok {
  border-color: rgba(40, 65, 55, 0.28);
  background: rgba(232, 247, 237, 0.72);
}

.info-message--warn {
  border-color: rgba(142, 47, 31, 0.26);
  background: rgba(255, 238, 231, 0.76);
}

.center-disclaimer {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(36, 22, 14, 0.2);
  background: rgba(255, 250, 245, 0.96);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.center-disclaimer--visible {
  opacity: 1;
}

.parking-note {
  margin: 14px 0 0;
}

.ticket-legal {
  margin-top: 10px;
}

.ticket-legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.pelmen-mini {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  opacity: 0;
  --pelmen-from-x: 0px;
  --pelmen-from-y: 0px;
  transform: translate(-50%, -50%) translate(var(--pelmen-from-x), var(--pelmen-from-y));
  transition: transform 0.52s ease, opacity 0.52s ease, left 0.36s ease, top 0.36s ease;
}

.pelmen-mini.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) translate(0, 0);
}

.pelmen-mini.is-leaving {
  opacity: 0;
}

.pelmen-mini--from-left {
  --pelmen-from-x: -65vw;
  --pelmen-from-y: 0px;
}

.pelmen-mini--from-right {
  --pelmen-from-x: 65vw;
  --pelmen-from-y: 0px;
}

.pelmen-mini--from-top {
  --pelmen-from-x: 0px;
  --pelmen-from-y: -55vh;
}

.pelmen-mini--from-bottom {
  --pelmen-from-x: 0px;
  --pelmen-from-y: 55vh;
}

.pelmen-mini__hint {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.95);
  border: 1px solid rgba(36, 22, 14, 0.14);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.pelmen-mini__button {
  width: 300px;
  height: 300px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.pelmen-mini__button:disabled {
  cursor: default;
  pointer-events: none;
}

.pelmen-mini__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 18px rgba(36, 22, 14, 0.24));
}

.ticket-result {
  display: grid;
  gap: 16px;
}

.ticket-result__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(40, 65, 55, 0.12);
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 700;
}

.ticket-list,
.score-list {
  display: grid;
  gap: 14px;
}

.ticket-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 18px;
}

.ticket-card__qr {
  width: 160px;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
}

.ticket-card__meta {
  display: grid;
  gap: 8px;
}

.vote-panel,
.vote-scoreboard {
  min-height: 100%;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team-grid--carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.team-card {
  position: relative;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(36, 22, 14, 0.12);
  background: rgba(255, 249, 241, 0.92);
  cursor: pointer;
}

.team-card--scroll {
  min-width: min(300px, 86vw);
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.team-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.team-card span {
  font-weight: 700;
  display: block;
}

.team-card small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.team-card__votes {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(142, 47, 31, 0.12);
}

.vote-scoreboard {
  display: none;
}

.team-card:has(input:checked) {
  border-color: rgba(142, 47, 31, 0.36);
  background: rgba(142, 47, 31, 0.08);
}

.score-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.score-list li,
.log-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 249, 241, 0.92);
  border: 1px solid rgba(36, 22, 14, 0.08);
}

.quiz-form {
  grid-template-columns: 1fr;
  align-items: start;
  width: 100%;
}

.quiz-card {
  padding: 20px;
  width: 100%;
}

.quiz-card label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(36, 22, 14, 0.1);
  background: rgba(255, 250, 245, 0.9);
}

.quiz-card label span {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.quiz-result {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
}

.quiz-result[hidden] {
  display: grid;
  visibility: hidden;
}

.checkin-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(10px, 2vw, 28px);
  padding-top: 32px;
  padding-bottom: 72px;
}

.checkin-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.checkin-panel,
.checkin-log {
  margin-top: 18px;
}

.checkin-result {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(36, 22, 14, 0.12);
}

.checkin-result--ok {
  border-color: rgba(40, 65, 55, 0.24);
  background: rgba(40, 65, 55, 0.08);
}

.checkin-result--warn {
  border-color: rgba(142, 47, 31, 0.28);
  background: rgba(142, 47, 31, 0.08);
}

.scanner-shell {
  margin-top: 18px;
  padding: 18px;
}

.scanner-video {
  width: 100%;
  min-height: 280px;
  border-radius: 22px;
  background: #221b16;
  object-fit: cover;
  overflow: hidden;
}

.scanner-video video,
.scanner-video img,
.scanner-video canvas {
  width: 100% !important;
  border-radius: 22px;
}

.log-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.auth-card {
  width: min(560px, 100%);
}

.admin-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(10px, 2vw, 28px);
  padding-top: 32px;
  padding-bottom: 72px;
}

.admin-layout,
.admin-stats,
.admin-content-grid {
  display: grid;
  gap: 24px;
}

.admin-layout {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0;
}

.admin-stat-card,
.admin-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-stat-card::before,
.admin-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(185, 138, 59, 0.24);
  border-radius: 20px;
  pointer-events: none;
}

.admin-stat-card,
.admin-panel {
  padding: 22px;
}

.admin-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  color: var(--accent);
}

.admin-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(36, 22, 14, 0.12);
  background: rgba(255, 250, 245, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab--active {
  background: rgba(142, 47, 31, 0.12);
  border-color: rgba(142, 47, 31, 0.24);
  color: var(--accent);
}

.admin-tab-panel {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.admin-tab-panel--active {
  display: grid;
}

.admin-content-grid label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.admin-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 22, 14, 0.15);
  background: rgba(255, 250, 245, 0.9);
}

.admin-toggle input {
  width: 18px !important;
  min-height: auto !important;
  margin: 0;
}

.admin-content-grid textarea,
.admin-content-grid input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 22, 14, 0.15);
  background: rgba(255, 250, 245, 0.9);
  font: inherit;
  color: var(--ink);
}

.admin-content-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-user-form,
.admin-user-password-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.admin-user-form label,
.admin-user-password-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.admin-user-form input,
.admin-user-form select,
.admin-user-password-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 22, 14, 0.15);
  background: rgba(255, 250, 245, 0.9);
  font: inherit;
  color: var(--ink);
}

.admin-users-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.admin-user-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(36, 22, 14, 0.12);
  background: rgba(255, 250, 245, 0.9);
}

.admin-user-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-user-card__header h3 {
  margin: 0;
}

.admin-wide {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  :root {
    --shadow: 0 10px 24px rgba(55, 27, 11, 0.1);
  }

  body::before {
    display: none;
  }

  .page-shell,
  .checkin-page,
  .admin-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: 12px;
    padding-bottom: 44px;
  }

  .site-header,
  .hero,
  .ticket-layout,
  .teams-layout,
  .jury-grid,
  .about-grid,
  .details-grid,
  .contacts-grid,
  .timeline-item,
  .checkin-form,
  .vote-layout,
  .quiz-layout,
  .team-grid,
  .payment-grid,
  .scanner-grid,
  .quiz-form,
  .admin-layout,
  .admin-content-grid,
  .admin-stats,
  .admin-tab-panel,
  .admin-user-form,
  .admin-user-password-form {
    grid-template-columns: 1fr;
  }

  .about-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .about-grid .info-card {
    flex: 0 0 min(84vw, 360px);
    scroll-snap-align: start;
  }

  .details-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .details-grid .detail-block {
    flex: 0 0 min(84vw, 360px);
    scroll-snap-align: start;
  }

  .jury-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .jury-grid .jury-card {
    flex: 0 0 min(82vw, 320px);
    scroll-snap-align: start;
  }

  .team-grid--carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .team-grid--carousel .team-card--scroll {
    min-width: min(82vw, 320px);
    scroll-snap-align: start;
  }

  .site-header {
    position: static;
    padding: 12px 0 8px;
    gap: 12px;
    backdrop-filter: none;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    width: 100%;
    padding-bottom: 4px;
  }

  .site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.94rem;
  }

  .hero {
    padding: 22px 0 14px;
    gap: 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    max-width: 100%;
    line-height: 0.96;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .button,
  .button--ticket {
    min-height: 48px;
    padding: 0 18px;
    font-size: 0.96rem;
  }

  .hero__actions {
    margin: 16px 0;
  }

  .hero__stats {
    gap: 14px;
  }

  .hero__stats li {
    min-width: 108px;
  }

  .hero__stats strong {
    font-size: 1.45rem;
  }

  .section-heading h2,
  .checkin-title {
    max-width: 100%;
    line-height: 1.02;
  }

  .ornament-card,
  .info-card,
  .detail-block,
  .contact-card,
  .price-card,
  .map-frame,
  .timeline-item,
  .gallery-card,
  .quiz-card,
  .scanner-shell,
  .ticket-card,
  .vote-scoreboard,
  .admin-stat-card,
  .admin-panel {
    border-radius: 22px;
  }

  .ornament-card::before,
  .info-card::before,
  .detail-block::before,
  .contact-card::before,
  .price-card::before,
  .timeline-item::before,
  .gallery-card::before,
  .quiz-card::before,
  .scanner-shell::before,
  .ticket-card::before,
  .vote-scoreboard::before,
  .admin-stat-card::before,
  .admin-panel::before {
    inset: 8px;
    border-radius: 16px;
    opacity: 0.55;
  }

  .hero__panel,
  .info-card,
  .detail-block,
  .contact-card,
  .price-card,
  .timeline-item,
  .ticket-widget,
  .vote-panel,
  .vote-scoreboard,
  .quiz-result,
  .scanner-shell,
  .checkin-panel,
  .checkin-log,
  .admin-panel,
  .admin-stat-card {
    padding: 18px;
  }

  .gallery-card {
    min-height: 360px;
  }

  .ticket-card {
    grid-template-columns: 1fr;
  }

  .ticket-card__qr {
    width: min(200px, 100%);
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-result[hidden] {
    display: none;
    visibility: hidden;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .checkin-page,
  .admin-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: 8px;
  }

  .hero {
    padding-top: 16px;
    gap: 14px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 1.3rem;
  }

  .brand small {
    font-size: 0.82rem;
  }

  .brand__crest {
    width: 38px;
    height: 38px;
  }

  .section {
    padding: 16px 0;
  }

  .section--accent {
    padding: 14px 10px;
    border-radius: 16px;
    margin: 10px 0;
  }

  .gallery-card {
    min-height: 280px;
  }

  .gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }

  .ticket-result__top,
  .log-list li,
  .score-list li {
    flex-direction: column;
  }

  .section-cta {
    justify-content: stretch;
  }

  .button--ticket {
    width: 100%;
  }

  .button,
  .button--ticket {
    min-height: 44px;
    font-size: 0.9rem;
    padding: 0 14px;
  }

  .countdown-grid {
    gap: 10px;
  }

  .countdown-grid div {
    padding: 10px 8px;
    border-radius: 14px;
  }

  .countdown-grid strong {
    font-size: 1.5rem;
  }

  .timeline-item {
    gap: 10px;
  }

  .timeline-item span {
    font-size: 1.5rem;
  }

  .ticket-form textarea {
    min-height: 88px;
  }

  .quiz-card label {
    padding: 10px 12px;
  }

  .pelmen-mini__button {
    width: 180px;
    height: 180px;
  }

  .pelmen-mini__hint {
    font-size: 0.84rem;
    padding: 7px 10px;
  }

  .site-nav {
    gap: 8px !important;
    padding-bottom: 2px;
  }

  .site-nav a {
    font-size: 0.84rem !important;
  }

  .about-grid,
  .details-grid {
    gap: 10px;
    padding-bottom: 6px;
  }

  .about-grid::-webkit-scrollbar,
  .details-grid::-webkit-scrollbar,
  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .about-grid,
  .details-grid,
  .site-nav {
    scrollbar-width: none;
  }
}

@media (max-width: 768px) {
  .site-nav {
    gap: 10px;
  }

  .site-nav a {
    font-size: 0.88rem;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero__actions .button,
  .section-cta .button {
    width: 100%;
  }

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .hero__stats li {
    min-width: 0;
  }

  .ornament-card__date {
    font-size: 3rem;
  }
}

@media (max-width: 420px) {
  .page-shell,
  .checkin-page,
  .admin-page {
    padding-inline: 6px;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 9vw, 2.2rem);
    line-height: 1;
  }

  .section-heading h2,
  .checkin-title {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    line-height: 1.04;
  }

  .eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.72rem;
  }

  .hero__lead {
    font-size: 0.95rem;
  }

  .button,
  .button--ticket {
    min-height: 44px;
    font-size: 0.9rem;
    padding: 0 14px;
  }

  .timeline-item {
    grid-template-columns: 88px 1fr;
    gap: 8px;
  }

  .timeline-item span {
    font-size: 1.28rem;
  }

  .ornament-card__date {
    font-size: 2.4rem;
  }
}

.jury-score-form {
  display: grid;
  gap: 18px;
}

.jury-team-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
}

.jury-team-card h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.jury-score-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.jury-score-row select {
  width: 100%;
}

.admin-jury-summary {
  display: grid;
  gap: 18px;
}

.admin-jury-summary table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.admin-jury-summary th,
.admin-jury-summary td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.admin-jury-summary tfoot td {
  font-weight: 700;
}

@media (max-width: 760px) {
  .jury-score-row {
    grid-template-columns: 1fr;
  }
}
