@media screen {
  html body main#app:has(.organizer-workspace, .family-journey, .event-flyer-view, .ticket-checkout) {
    background: #fbfaff !important;
    color: #211838;
  }

  html body #app :is(.organizer-workspace, .family-journey, .event-flyer-view, .ticket-checkout)
    :is(h1, h2, h3, p, a, button, label, input, select, summary, td, th) {
    font-family: Inter, system-ui, sans-serif !important;
    text-shadow: none !important;
  }

  html body #app :is(.organizer-pass, .event-flyer-display, .verified-event-pass) {
    border: 2px solid transparent !important;
    background: linear-gradient(#fff, #fff) padding-box,
      linear-gradient(120deg, var(--invite-glow-1, #b710ae), var(--invite-glow-2, #7445ff) 48%, var(--invite-glow-3, #1bd9df)) border-box !important;
    box-shadow: 0 0 10px color-mix(in srgb, var(--invite-glow-1, #ad45e5) 48%, transparent), 0 8px 28px #7a3fbe24 !important;
  }

  html body #app .organizer-pass {
    background: linear-gradient(115deg, #2b164e, #171230) padding-box,
      linear-gradient(120deg, var(--invite-glow-1, #f062d2), var(--invite-glow-2, #a376ff) 48%, var(--invite-glow-3, #1bd9df)) border-box !important;
  }
  html body #app .organizer-pass :is(h1,p) { color: #fff !important; }
  html body #app .organizer-pass .outline { color: #49227a !important; background: #fff !important; }
  #app .organizer-pass-art { border-right-color: #ce9afa; }

  html body #app :is(.family-journey, .stripe-surface.ticket-checkout) {
    background: #fbfaff !important;
    border-color: #ddd0f3 !important;
  }

  html body #app .family-journey .journey-hero,
  html body #app .stripe-surface.ticket-checkout .stripe-heading {
    background: #25173f !important;
    border: 1px solid #b287ed !important;
    box-shadow: 0 0 14px color-mix(in srgb, var(--invite-glow-1, #9639d5) 48%, transparent) !important;
  }

  #app .family-art {
    max-height: 136px;
    overflow: hidden;
    margin: 0 0 14px;
    border-radius: 10px;
    background: #462373;
  }
  html body #app .family-art > .school-event-flyer {
    max-width: 100% !important;
    margin: 0 !important;
    pointer-events: none;
  }

  html body #app .event-flyer-side .cc-ticket-actions,
  html body #app .family-journey .ed-section,
  html body #app .organizer-records {
    background: #fff !important;
    border: 1px solid #dfd3f3 !important;
  }

  html body #app .family-journey .ed-choice-grid button[aria-pressed="true"] {
    color: #35165f;
    background: #fae8ff;
    border-color: #b234b0;
    box-shadow: 0 0 0 1px #b234b0;
  }

  html body #app :is(.family-journey, .event-flyer-side, .stripe-surface.ticket-checkout) .primary,
  html body #app .organizer-actions button[data-ed-scan] {
    background: linear-gradient(100deg, #ac075f, #7123c6) !important;
    border: 1px solid #8e24a2 !important;
    color: white !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--invite-glow-1, #d920a4) 52%, transparent) !important;
  }

  html body #app .organizer-actions button[data-ed-track="tickets"] {
    background: #dcfbfc !important;
    border-color: #96e5e6;
    color: #163b52 !important;
  }

  html body #app .verified-event-pass .ed-ticket-brand {
    color: #502188;
    border-bottom: 1px dashed #a481ce;
  }
  html body #app .verified-event-pass .ed-payment-state {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 9px;
    background: #d9faeb;
    color: #14533d;
  }
  html body #app .verified-event-pass .ed-ticket-qr {
    background: white !important;
    box-shadow: none !important;
  }
  html body #app .event-flyer-actions :is(button,a) { color: #432771; }

  @media (max-width: 680px) {
    #app .family-art { max-height: 98px; }
    #app .organizer-pass { grid-template-columns: minmax(76px, 30%) minmax(0, 1fr); }
    #app .organizer-actions { background: #fbfaff; }
  }
}

/* Invitation, responses, and admission each have their own layout. */
@media screen {
  html body #app .event-flyer-view {
    grid-template-columns: minmax(0, 660px);
    justify-content: center;
    gap: 14px;
  }

  html body #app .event-flyer-display {
    padding: 8px;
    background: linear-gradient(135deg, var(--invite-glow-1, #a933a2), var(--invite-glow-2, #6c4db5)) !important;
  }

  html body #app .event-flyer-side .cc-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 16px !important;
  }

  html body #app .event-flyer-side .cc-ticket-actions :is(h2,p) { margin: 0; }
  html body #app .event-flyer-side .cc-ticket-actions .primary { margin-left: auto !important; }

  html body #app .family-journey .journey-hero {
    background: white !important;
    color: #241a40 !important;
    padding: 16px !important;
  }

  html body #app .family-journey .journey-hero :is(h1,p,dt,dd) { color: #241a40 !important; }
  html body #app .family-journey .journey-hero dl { border-top-color: #dfd5ec; }
  html body #app .family-journey .journey-hero dl > div { background: #f4effb; border-color: #e7dcf4; }

  #app .family-journey .ed-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  }

  #app .family-journey .ed-choice-grid button {
    min-height: 76px;
    border: 1px solid #d6c9e9;
    border-radius: 14px;
  }

  #app .record-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f0e8ff;
    color: #492481;
  }
  #app .record-status:is([data-status="paid_online"],[data-status="paid_external"]) {
    background: #d9faeb;
    color: #14533d;
  }
  #app .record-actions summary { cursor: pointer; color: #522893; }

  html body #app .event-admission-card {
    max-width: 470px;
    margin: 20px auto;
    padding: 0 !important;
    text-align: center;
    overflow: hidden;
  }

  #app .admission-heading, #app .admission-stub { padding: 18px; }
  #app .admission-heading { background: #f8f2ff; }
  #app .admission-code { padding: 5px 14px; background: white; }
  #app .admission-stub { border-top: 2px dashed #c5aedc; }
  #app .admission-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
  }

  #app .order-breakdown { margin: 0; }
  #app .order-breakdown > div { display: flex; justify-content: space-between; gap: 12px; }
  #app .order-breakdown dd { margin: 0; }
  #app .order-breakdown > div:last-child { border-top: 1px dashed #8ebcb2; margin-top: 7px; padding-top: 7px; font-weight: 800; }

  @media (max-width: 680px) {
    html body #app .organizer-records .ed-table tbody tr {
      display: grid;
      grid-template-columns: minmax(0,1fr) auto;
      gap: 2px 6px;
    }
    #app .organizer-records .record-family { grid-row: span 2; overflow-wrap: anywhere; }
    #app .organizer-records .record-code { display: none; }
    #app .organizer-records .ed-table :is(td[data-record-label="Adults / children"],td[data-record-label="Method"],td[data-record-label="Amount"]) { display: none; }
    #app .organizer-records .record-actions { grid-column: 1 / -1; }
    html body #app .organizer-actions { bottom: 0; }
  }
}

@media screen {
  html body main#app[data-page]:is(:has(.organizer-workspace), :has(.family-journey)) {
    background: #faf9ff !important;
    background-image: none !important;
  }

  html body #app .organizer-pass {
    grid-template-columns: clamp(72px, 23vw, 110px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff !important;
    border: 1px solid #e4dced !important;
    box-shadow: none !important;
  }
  html body #app .organizer-pass::after { display: none; }
  html body #app .organizer-pass-art {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--invite-glow-1, #b983df) 18%, white);
  }
  html body #app .organizer-pass-art > span { color: #552c79; }
  html body #app .organizer-pass-art > img { width: 100%; height: 100%; object-fit: cover; }
  #app .event-art-tile { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; overflow: hidden; }
  html body #app .event-art-tile img { width: 100%; height: 100%; max-height: 100px; object-fit: contain; margin: 0; }
  html body #app .organizer-pass-copy { padding: 0; }
  html body #app .organizer-pass-copy :is(h1,p) { color: #241838 !important; }
  html body #app .organizer-pass-copy h1 { font-size: clamp(20px, 5vw, 34px) !important; }
  html body #app .organizer-pass-copy p { font-size: 13px; margin: 0; }

  html body #app .family-journey .family-art {
    height: 96px;
    max-height: none;
    background: color-mix(in srgb, var(--invite-glow-1, #b983df) 18%, white);
  }
  html body #app .family-art > img { height: 100%; width: 100%; object-fit: cover; object-position: center; }
  html body #app .family-journey .journey-hero { box-shadow: none !important; }

  @media (max-width: 680px) {
    html body #app .organizer-actions {
      position: static;
      order: -1;
      padding: 0;
      gap: 6px;
      background: transparent;
    }
    html body #app .organizer-actions button {
      font-size: 13px !important;
      padding: 6px !important;
      overflow-wrap: anywhere;
    }
    html body #app .organizer-pass-copy button { min-height: 44px; padding: 5px 10px; }
  }
}
