:root {
  --demo-accent: #1f3b5c;
  --demo-bg-glow-a: rgba(10, 68, 151, 0.06);
  --demo-bg-glow-b: rgba(139, 30, 45, 0.04);
  --demo-bg-top: #fcf9f3;
  --demo-bg-bottom: #f7f2e8;
}

body.create-page::before {
  content: none !important;
}

body.create-page {
  background: linear-gradient(180deg, #f7f2e8 0%, #efe5d6 100%);
}

body.demo-loader-page::before {
  content: none !important;
}

body.demo-loader-page {
  background:
    radial-gradient(1200px 800px at 50% -220px, rgba(255, 255, 255, 0.96), transparent 60%),
    radial-gradient(900px 650px at 18% 14%, var(--demo-bg-glow-a), transparent 62%),
    radial-gradient(900px 650px at 82% 18%, var(--demo-bg-glow-b), transparent 60%),
    linear-gradient(180deg, var(--demo-bg-top), var(--demo-bg-bottom));
}

body.demo-loader-page .demo-panel {
  border: 1px solid rgba(108, 58, 126, 0.18);
  background: linear-gradient(180deg, rgba(250, 243, 252, 0.96), rgba(245, 235, 247, 0.96));
  box-shadow: 0 14px 28px rgba(85, 42, 104, 0.12);
}

body.demo-loader-page .demo-title {
  color: #2b1238;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.demo-page {
  width: min(980px, calc(100% - 24px));
  margin: 18px auto 28px;
}

.demo-panel {
  border: 1px solid rgba(31, 59, 92, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(31, 59, 92, 0.14);
  padding: clamp(18px, 3vw, 30px);
}

.demo-head {
  text-align: center;
  margin-bottom: 18px;
}

.demo-logo {
  width: clamp(262px, 45vw, 412px);
  margin: 0 auto 4px;
  margin-top: -25px;
}

.demo-title {
  margin-top: 0px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  font-family: "Cormorant Garamond";

}

.demo-kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(43, 18, 56, 0.68);
}

.demo-copy {
  margin: 10px auto 0;
  max-width: 420px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: rgba(43, 18, 56, 0.8);
}

.demo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 540px);
  margin: 0 auto;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.demo-preview {
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(31, 59, 92, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(31, 59, 92, 0.12);
}

.demo-preview__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(31, 59, 92, 0.08), rgba(255, 255, 255, 0.92));
  border-bottom: 1px solid rgba(31, 59, 92, 0.1);
}

.demo-preview__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #2b1238;
  background: color-mix(in srgb, var(--demo-accent) 16%, #ffffff);
}

.demo-preview__colour {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  background: var(--demo-accent);
}

.demo-preview__hero {
  aspect-ratio: 16 / 9;
  background: #e9edf5;
}

.demo-preview__hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.demo-preview__copy {
  padding: 14px 16px 16px;
}

.demo-preview__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(47, 35, 64, 0.68);
}

.demo-preview__title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.05;
  color: #241a31;
  font-family: "Cormorant Garamond", serif;
}

.demo-preview__names,
.demo-preview__date,
.demo-preview__venue {
  margin: 7px 0 0;
  color: rgba(36, 26, 49, 0.88);
}

.demo-preview__names {
  font-weight: 700;
}

.demo-preview__date {
  color: var(--demo-accent);
  font-weight: 700;
}

.demo-preview__venue {
  opacity: 0.9;
}

.field {
  display: grid;
  gap: 6px;
}

.demo-modal[hidden] {
  display: none;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.demo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 19, 37, 0.42);
  backdrop-filter: blur(8px);
}

.demo-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  border-radius: 28px;
  border: 1px solid rgba(108, 58, 126, 0.18);
  background: linear-gradient(180deg, rgba(255, 250, 253, 0.98), rgba(247, 238, 245, 0.98));
  box-shadow: 0 24px 60px rgba(63, 32, 78, 0.22);
  padding: 24px 20px 20px;
  transition: width 180ms ease, padding 180ms ease, transform 180ms ease;
}

.demo-modal[data-stage="form"] .demo-modal__panel {
  width: min(640px, calc(100vw - 24px));
}

.demo-modal__stage {
  display: grid;
  gap: 14px;
}

.demo-modal__copy {
  margin: -4px auto 0;
  max-width: 420px;
  text-align: center;
  color: rgba(43, 18, 56, 0.78);
  line-height: 1.45;
}

.demo-modal__copy--form {
  grid-column: 1 / -1;
  margin: -10px 0 2px;
  max-width: none;
}

.demo-modal__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.demo-choice {
  display: grid;
  gap: 8px;
  min-height: 168px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(108, 58, 126, 0.16);
  padding: 18px 18px 16px;
  text-decoration: none;
  color: #2b1238;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 238, 245, 0.98));
  box-shadow: 0 14px 30px rgba(63, 32, 78, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.demo-choice:hover,
.demo-choice:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(63, 32, 78, 0.12);
  border-color: rgba(108, 58, 126, 0.28);
  outline: none;
}

.demo-choice__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(43, 18, 56, 0.56);
}

.demo-choice__title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.02;
}

.demo-choice__copy {
  color: rgba(43, 18, 56, 0.76);
  line-height: 1.35;
}

.demo-choice--prefilled {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.54), transparent 48%),
    linear-gradient(180deg, rgba(250, 244, 232, 0.98), rgba(244, 233, 214, 0.98));
}

.demo-choice--custom {
  font: inherit;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.5), transparent 48%),
    linear-gradient(180deg, rgba(248, 239, 248, 0.98), rgba(241, 230, 245, 0.98));
}

.demo-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: rgba(43, 18, 56, 0.64);
  font: inherit;
  cursor: pointer;
}

.demo-modal__eyebrow {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(43, 18, 56, 0.56);
}

.demo-modal__title {
  margin: 0 0 18px;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #2b1238;
  line-height: 1.05;
}

.theme-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-picker-row input[type="color"] {
  width: 46px;
  height: 34px;
  border: 1px solid rgba(31, 59, 92, 0.22);
  border-radius: 10px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.field--full {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.88rem;
  color: #2f2340;
  font-weight: 600;
}

.input,
.select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(31, 59, 92, 0.2);
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  padding: 11px 12px;
}

.input::placeholder {
  color: rgba(47, 35, 64, 0.68);
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.role-picker {
  position: relative;
  display: flex;
  align-items: center;
  width: auto;
}

.role-picker__dropdown {
  position: relative;
  width: auto;
}

.role-picker__dropdown[open] {
  z-index: 4;
}

.role-picker__trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(31, 59, 92, 0.16);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  padding: 0 8px;
}

.role-picker__trigger::-webkit-details-marker {
  display: none;
}

.role-picker__trigger img,
.role-picker__choice img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.role-picker__caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(31, 59, 92, 0.54);
  border-bottom: 2px solid rgba(31, 59, 92, 0.54);
  transform: rotate(45deg) translateY(-1px);
}

.role-picker__dropdown[open] .role-picker__caret {
  transform: rotate(225deg) translateY(-1px);
}

.role-picker__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(31, 59, 92, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 30px rgba(31, 59, 92, 0.16);
}

.role-picker__choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(31, 59, 92, 0.16);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  padding: 4px 0;
}

.role-picker__dropdown:not([open]) .role-picker__menu {
  display: none;
}

.role-picker__choice.is-active {
  border-color: rgba(200, 116, 63, 0.7);
  box-shadow: 0 0 0 2px rgba(200, 116, 63, 0.16);
  background: linear-gradient(180deg, #fffaf5, #f7ede1);
}

.input--file {
  padding: 10px 12px;
}

.input--file::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(31, 59, 92, 0.12);
  color: #2b1238;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.demo-loader-page .input,
body.demo-loader-page .select {
  color: #241a31;
  border-color: rgba(43, 18, 56, 0.32);
}

.sprite-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.name-sprite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.name-input {
  width: 100%;
  max-width: 250px;
}

.sprite-row--compact {
  flex-wrap: nowrap;
  gap: 6px;
}

.sprite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(108, 58, 126, 0.24);
  background: rgba(255, 255, 255, 0.94);
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
  color: #4c2f5d;
  font-size: 0;
  width: 44px;
  height: 44px;
  position: relative;
}

.sprite input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sprite__thumb {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
  filter: saturate(0.8);
}

.sprite input:checked + .sprite__thumb {
  filter: saturate(1);
}

.sprite:has(input:checked) {
  border-color: var(--demo-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--demo-accent) 26%, transparent);
  background: color-mix(in srgb, var(--demo-accent) 16%, #ffffff);
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

body.demo-loader-page .actions {
  grid-template-columns: 1fr;
}

.btn {
  width: 100%;
}

/* Energetic demo CTA treatment. */
.demo-page .btn--primary {
  color: #ffffff !important;
  border-color: rgba(59, 17, 85, 0.55) !important;
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(120deg, #ff5a7a 0%, #ff7b32 48%, #ffc746 100%) !important;
  box-shadow:
    0 18px 34px rgba(225, 80, 38, 0.34),
    0 8px 16px rgba(122, 33, 168, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  text-shadow: 0 1px 0 rgba(80, 24, 8, 0.25);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.demo-page .btn--primary:hover,
.demo-page .btn--primary:focus-visible {
  transform: translateY(-1px) scale(1.01);
  filter: saturate(1.08) brightness(1.03);
  box-shadow:
    0 22px 38px rgba(225, 80, 38, 0.4),
    0 10px 18px rgba(122, 33, 168, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.note {
  margin-top: 12px;
  text-align: center;
  color: rgba(245, 247, 251, 0.7);
  font-size: 13px;
}

.note code {
  color: rgba(245, 247, 251, 0.95);
}

@media (max-width: 760px) {
  .demo-actions,
  .demo-modal__choices,
  .demo-grid,
  .actions {
    grid-template-columns: 1fr;
  }

  .input-group {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .demo-preview__chrome {
    align-items: flex-start;
  }

  .name-input {
    max-width: 250px;
  }

  .sprite-row--compact {
    gap: 4px;
  }

  .sprite-row--compact .sprite {
    width: 40px;
    height: 40px;
    padding: 5px;
  }

  .sprite__thumb {
    width: 24px;
    height: 24px;
  }

  .demo-modal__panel {
    padding: 22px 16px 16px;
  }
}
