:root {
  color-scheme: dark;
  --ink: #1a1220;
  --panel: #261b2b;
  --panel-deep: #211726;
  --violet: #874596;
  --violet-bright: #bc73cf;
  --paper: #f4ecf7;
  --muted: #c0afc9;
  --line: #5d4265;
  --danger: #ff9d9d;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 22px 28px 20px;
  background-color: var(--ink);
  background-image: radial-gradient(#573361 0.8px, transparent 0.8px);
  background-size: 17px 17px;
}

.brand {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin: 0 auto 52px;
}

.brand__logo {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.layout {
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 34px;
  margin: 0 auto;
}

.panel {
  position: relative;
  border: 3px solid #09070b;
  border-radius: 28px;
  background: var(--panel);
  box-shadow:
    0 0 0 6px var(--violet),
    8px 10px 0 #0b080d;
}

.event {
  margin-top: 33px;
  padding: 68px 30px 28px;
  text-align: center;
}

.event__mark {
  position: absolute;
  top: -54px;
  left: 50%;
  transform: translateX(-50%);
}

.event__mark::before,
.event__mark::after {
  content: none;
}

.event__mark img {
  width: 106px;
  height: 106px;
  object-fit: contain;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--violet-bright);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Old English Text MT", "Palatino Linotype", Georgia, serif;
  line-height: 1.02;
}
h1 {
  font-size: 43px;
}
h2 {
  font-size: 34px;
}

.event__facts {
  margin: 25px 0 18px;
  text-align: left;
}
.event__facts div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}
.event__facts dt {
  color: var(--muted);
}
.event__facts dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}
.price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price span {
  width: 13px;
  aspect-ratio: 1;
  border: 2px solid #09070b;
  border-radius: 50%;
  background: #edc85f;
}

.capacity {
  margin-top: 22px;
  text-align: left;
}
.capacity__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}
progress {
  display: block;
  width: 100%;
  height: 13px;
  overflow: hidden;
  border: 2px solid #09070b;
  border-radius: 20px;
  background: #100c13;
}
progress::-webkit-progress-bar {
  background: #100c13;
}
progress::-webkit-progress-value {
  background: linear-gradient(90deg, #6c3680, #bb69c9);
}
progress::-moz-progress-bar {
  background: #874596;
}
.capacity__message,
.event__note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.capacity__confirmed {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.capacity__confirmed strong {
  color: var(--violet-bright);
}
.capacity__message {
  min-height: 20px;
  margin: 8px 0 0;
}
.event__note {
  margin: 20px 0 0;
}

.registration {
  margin-top: 33px;
  padding: 34px 38px 32px;
}
.steps {
  display: flex;
  justify-content: space-between;
  gap: 0;
  margin: 0 0 25px;
  padding: 0;
  list-style: none;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8c7d94;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.steps li + li::before {
  width: 27px;
  height: 2px;
  margin: 0 9px;
  background: var(--line);
  content: "";
}
.steps li span {
  display: grid;
  width: 28px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #75647d;
  border-radius: 50%;
}
.steps .steps__active {
  color: var(--paper);
}
.steps__active span {
  border-color: var(--violet-bright) !important;
  background: var(--violet);
}
.form-heading {
  margin-bottom: 24px;
}
.form-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}
label > span {
  display: inline;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.field-wide {
  grid-column: 1 / -1;
}
input:not([type="checkbox"]) {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 2px solid #e8ddeb;
  border-radius: 13px;
  outline: none;
  background: var(--panel-deep);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}
input::placeholder {
  color: #8c7d94;
}
input:focus-visible {
  border-color: var(--violet-bright);
  box-shadow: 0 0 0 3px #87459666;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 15px;
  font-weight: 600;
  line-height: 1.5;
}
.consent input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--violet-bright);
}
a {
  color: #e1b4eb;
  text-underline-offset: 3px;
}
.test-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--violet-bright);
  background: #1d1422;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
button {
  width: 100%;
  min-height: 52px;
  border: 2px solid #d69ae2;
  border-radius: 12px;
  background: var(--violet);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}
button:hover:not(:disabled) {
  background: #9954a9;
}
button:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}
button:disabled {
  border-color: #655369;
  background: #493b4c;
  color: #b4a7b9;
  cursor: not-allowed;
}
.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
}
.result {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-deep);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.result strong {
  color: #e5b8ef;
}
.confirmation-result h3 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.2;
}
.confirmation-result p {
  margin: 12px 0;
}
.confirmation-result button,
.button-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  padding: 10px 16px;
  border: 2px solid #d69ae2;
  border-radius: 8px;
  background: var(--violet);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.confirmation-result .confirmation-note {
  margin-top: 18px;
  color: var(--muted);
}
.admin-login,
.admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 22px 0;
}
.admin-search label {
  grid-column: 1 / -1;
}
.admin-login[hidden],
.admin-search[hidden] {
  display: none;
}
.admin-login label {
  grid-column: 1 / -1;
}
.admin-login button,
.admin-search button,
.admin-actions button,
.admin-table-wrap button {
  width: auto;
  min-width: 120px;
  padding-inline: 16px;
}
.admin-search input {
  min-width: 0;
}
.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0;
}
.admin-actions button:last-child {
  min-width: 80px;
}
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table-wrap th,
.admin-table-wrap td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.admin-table-wrap th {
  color: var(--violet-bright);
}
.admin-table-wrap button {
  min-height: 38px;
  font-size: 13px;
}
.turnstile-container {
  min-height: 65px;
  margin: 12px 0;
}
.test-notice[hidden] {
  display: none;
}
.privacy-layout {
  max-width: 850px;
  grid-template-columns: minmax(0, 1fr);
}
.admin-layout {
  width: min(1280px, 100%);
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
}
.privacy h2 {
  margin-top: 25px;
  font-size: 26px;
}
.privacy > p {
  line-height: 1.65;
}

footer {
  margin: 36px auto 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 850px) {
  body {
    padding: 22px 22px 18px;
  }
  .brand {
    margin-bottom: 39px;
  }
  .layout {
    max-width: 540px;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .event {
    margin-top: 30px;
  }
  .registration {
    padding: 28px 24px;
  }
}

@media (max-width: 430px) {
  body {
    padding-inline: 18px;
  }
  .brand__name {
    font-size: 37px;
  }
  .event {
    padding-inline: 22px;
  }
  .registration {
    padding: 25px 18px;
  }
  .steps li {
    gap: 3px;
    font-size: 10px;
  }
  .steps li + li::before {
    width: 3px;
    margin-inline: 2px;
  }
  .steps li span {
    width: 22px;
  }
  .fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }
  .admin-search {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-search button,
  .admin-login button {
    width: 100%;
  }
  .field-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .panel {
    animation: rise-in 420ms ease-out both;
  }
  .registration {
    animation-delay: 80ms;
  }
  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
