body[data-buyer-flow] {
  --buyer-black: #141414;
  --buyer-accent: #633fa2;
  --buyer-width: 70rem;
  --buyer-gutter: clamp(1rem, 3vw, 2rem);
  --buyer-inset: max(var(--buyer-gutter), calc((100% - var(--buyer-width)) / 2));
  --buyer-action-height: 5rem;
  --ink: #25232a;
  --muted: #5b5761;
  --line: #e3e0e7;
  --plum: var(--buyer-accent);
  color: var(--ink);
  background: #fff;
}

body[data-buyer-flow] .shell { display: block; }

body[data-buyer-flow] .topbar {
  min-height: 4.25rem;
  gap: .75rem;
  padding: 0 var(--buyer-inset);
  border-bottom: 1px solid #373437;
  background: var(--buyer-black);
}

.buyer-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.buyer-header > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
}

.buyer-header > a:hover { text-decoration: underline; text-underline-offset: .2em; }

#buyer-brand .organization-public-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}

#buyer-brand img { width: auto; max-width: 10rem; height: auto; max-height: 2.5rem; object-fit: contain; }
#buyer-account { flex-shrink: 0; }

body[data-buyer-flow] #main {
  display: grid;
  grid-template-columns: [edge-start] minmax(var(--buyer-gutter), 1fr) [content-start] minmax(0, var(--buyer-width)) [content-end] minmax(var(--buyer-gutter), 1fr) [edge-end];
  align-content: start;
  max-width: none;
  margin: 0;
  padding: 2rem 0 3rem;
}

body[data-buyer-flow] #main:has(> .buyer-masthead) { padding-top: 0; }
body[data-buyer-flow] #main:has(> .buyer-action) { padding-bottom: 0; }
body[data-buyer-flow] #main > * { grid-column: content; min-width: 0; }
body[data-buyer-flow] #main > :is(.buyer-masthead, .buyer-action) { grid-column: edge; }

.buyer-masthead {
  padding: 1.75rem var(--buyer-inset) 2.25rem;
  background: var(--buyer-black);
  color: #fff;
}

.buyer-masthead :is(.booking-head, .intro) { margin: 0; }
.buyer-masthead h1 { margin: 0 0 .5rem; color: inherit; font: 700 clamp(1.75rem, 4vw, 2.75rem)/1.12 ATXSans, "Segoe UI", Arial, sans-serif; letter-spacing: -.025em; }
.buyer-masthead p { color: #e8e4ec; line-height: 1.55; }
.buyer-masthead .notice { color: var(--ink); }
.buyer-masthead .backline { margin: 0 0 .75rem; color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.buyer-masthead .text-button { color: #eee5ff; }

.buyer-steps {
  justify-content: center;
  flex-wrap: wrap;
  gap: .625rem clamp(1rem, 4vw, 3.5rem);
  padding: 0;
  margin: 1.625rem 0 1.75rem;
  font-size: .875rem;
  list-style: none;
}

.buyer-steps li { display: flex; gap: .65rem; align-items: center; }
.buyer-steps b { flex: none; width: 2.8rem; height: 2.8rem; font-size: 1.15rem; color: #45404b; }
.buyer-steps .current b { color: #fff; }
.buyer-package-intro { margin: 0 0 1.5rem; }
.buyer-package-intro h2 { margin: 0 0 .5rem; font-size: 1.55rem; }

body[data-buyer-flow] .booking-layout { margin: 1.25rem 0; }
body[data-buyer-flow] .booking-layout .panel { border: 1px solid var(--line); box-shadow: none; }
body[data-buyer-flow] .checkout-account-choice { margin-top: 0; }

.buyer-performance-support {
  justify-self: start;
  margin: .75rem 0 1.5rem;
  color: var(--buyer-accent);
  font-size: .875rem;
  text-underline-offset: .18em;
}

.buyer-action {
  position: sticky;
  z-index: 12;
  bottom: 0;
  margin-top: 1.25rem;
  padding-inline: var(--buyer-inset);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -6px 20px #25232a12;
}

.buyer-action-inner {
  min-height: var(--buyer-action-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.buyer-action-caption { font-size: .925rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.buyer-action .primary {
  width: auto;
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 60%;
  padding: .625rem 1.5rem;
  border-radius: 999px;
  background: var(--buyer-accent);
  white-space: normal;
}

.buyer-action .primary:not(:disabled):hover { background: #4e3083; }
body[data-buyer-flow] #main:has(> .buyer-action) :focus-visible { scroll-margin-bottom: calc(var(--buyer-action-height) + 1rem); }
body[data-buyer-flow] :focus-visible { outline: 2px solid var(--buyer-accent); outline-offset: 3px; }
body[data-buyer-flow] :is(.buyer-header, .buyer-masthead) :focus-visible { outline-color: #dfc6ff; }

body[data-buyer-flow] #shop-footer {
  padding-inline: var(--buyer-inset);
  color: #e8e4ec;
  background: var(--buyer-black);
}

.buyer-receipt-heading { text-align: center; }
.buyer-receipt-heading h1 { margin: 0; text-wrap: balance; }
.buyer-receipt {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  grid-template-areas: "order actions";
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  width: min(100%, 65rem);
  max-width: none;
  margin: .65rem auto 0;
}
.buyer-receipt-order { grid-area: order; min-width: 0; }
.buyer-receipt-actions { grid-area: actions; min-width: 0; }
.buyer-receipt-order h2 { margin: 0 0 .875rem; font-size: 1.175rem; }
.buyer-receipt-reference {
  margin: 0 0 .875rem;
  text-align: end;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.buyer-receipt-payment {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .45rem 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px #25232a1a;
}
.buyer-receipt-payment strong { text-transform: capitalize; }
.buyer-receipt-payment time { color: var(--muted); font-size: .875rem; }
.buyer-receipt-payment p { flex-basis: 100%; margin: 0; }
.buyer-receipt-totals { margin-top: 1.25rem; padding: 1rem; border-radius: 12px; background: #f6f5f7; }
.buyer-receipt-controls { margin: 0; gap: .5rem; }
.buyer-receipt-controls button { min-height: 44px; border-radius: 999px; }
.buyer-receipt-links { margin-top: .6rem; gap: .25rem 1rem; }
.buyer-receipt-links :is(.backline,.secondary) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: .2em;
}
@media screen {
  .buyer-receipt-order :is([data-ticket-services],.ticket-copy-slot):empty { display: none; }
  .buyer-receipt-order .ticket {
    align-items: start;
    border: 0;
    border-radius: 12px;
    background: #f6f5f7;
  }
  .buyer-receipt-order .ticket h3 {
    margin: 0 0 .4rem;
    font: 700 1rem/1.35 ATXSans, "Segoe UI", Arial, sans-serif;
    overflow-wrap: anywhere;
  }
  .buyer-receipt-order .ticket-seat {
    font: 700 .92rem/1.4 ATXSans, "Segoe UI", Arial, sans-serif;
    overflow-wrap: anywhere;
  }
  .buyer-receipt-order .ticket-qr:empty { display: none; }
}
@media (max-width: 720px) {
  .buyer-receipt { grid-template-columns: minmax(0,1fr); grid-template-areas: "actions" "order"; }
  .buyer-receipt-reference { text-align: start; }
}

@media (max-width: 480px) {
  body[data-buyer-flow] { --buyer-action-height: 4.25rem; }
  body[data-buyer-flow] .topbar { min-height: 3.5rem; }
  .buyer-masthead { padding-block: 1.125rem 1.5rem; }
  .buyer-steps { gap: 1rem; font-size: .775rem; }
  .buyer-steps li { gap: .35rem; }
  .buyer-steps b { width: 1.5rem; height: 1.5rem; font-size: .775rem; }
  .buyer-action .primary { padding-inline: .85rem; }
}

@media print {
  body[data-buyer-flow] #main { display: block; }
  body[data-buyer-flow] :is(.buyer-action, .buyer-performance-support, .buyer-steps, [data-receipt-print-status]) { display: none; }
  .buyer-receipt-heading { padding: 0; background: none; color: #000; }
  .buyer-receipt-reference { margin: .75rem 0 0; text-align: start; }
  .buyer-receipt-payment { padding-inline: 0; box-shadow: none; }
  .buyer-receipt { display: block; width: 100%; margin: 0; }
  .buyer-receipt-totals { padding: 0; background: none; }
}

.buyer-map-open { margin-bottom: .75rem; }

body:has(.buyer-seat-picker[open]) { overflow: hidden; }

.buyer-seat-picker {
  width: 100dvw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}

.buyer-seat-picker[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.buyer-map-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
  min-height: 5.5rem;
  padding: .875rem max(1rem, env(safe-area-inset-right)) .875rem max(1rem, env(safe-area-inset-left));
  background: var(--buyer-black);
  color: #fff;
}

.buyer-map-header h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.buyer-map-header [data-map-brand] { font-size: .9rem; font-weight: 650; }
.buyer-map-header img { width: auto; max-width: 9rem; max-height: 3rem; object-fit: contain; }
.buyer-map-header a { color: inherit; padding-block: .75rem; font-size: .875rem; white-space: nowrap; }
.buyer-map-header :focus-visible { outline-color: #dfc6ff; }

.buyer-map-workspace {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.buyer-map-corners,
.buyer-map-tools {
  display: flex;
  align-items: start;
  gap: .375rem;
  padding: .5rem max(.75rem, env(safe-area-inset-left));
}

.buyer-map-corners { justify-content: space-between; }
.buyer-map-tools { flex-wrap: wrap; }

.buyer-map-icon,
.buyer-map-help summary {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: .3rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.buyer-map-icon:hover:not(:disabled),
.buyer-map-help summary:hover { border-color: var(--buyer-accent); color: var(--buyer-accent); }

.buyer-map-icon:disabled { color: #706a78; background: #f1eff4; cursor: default; }
.buyer-map-help { position: relative; z-index: 2; text-align: right; }
.buyer-map-help[open] {
  max-width: min(24rem, 75vw);
  padding: .375rem .75rem .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fff;
}
.buyer-map-help summary::-webkit-details-marker { display: none; }
.buyer-map-help p { margin: .5rem 0; font-size: .85rem; line-height: 1.45; text-align: left; }

.buyer-map-viewport { overflow: auto; min-width: 0; min-height: 0; overscroll-behavior: contain; }
.buyer-map-stage {
  display: grid;
  place-items: center;
  min-height: 100%;
  width: max(100%, calc(var(--buyer-map-width, 480px) + 28px));
  padding: 14px;
}
.buyer-map-stage > [data-buyer-map-content] { width: var(--buyer-map-width, 480px); }
.buyer-map-stage .seat-scroller,
.buyer-map-stage .seat-map-surface > .seat-scroller {
  max-height: none;
  overflow: visible;
  padding: 0;
}
.buyer-map-stage .seat-map-sizing { display: none; }
.buyer-map-stage .seat-scroller .venue-geometry { min-width: 0 !important; }
.buyer-map-stage .seat-grid { min-width: 0; max-width: none; }
.buyer-map-stage .seat-grid .seat { height: min(96px, calc(24px * var(--buyer-map-scale, 1))); }
.buyer-map-stage .seat-row { grid-template-columns: 16px repeat(var(--seat-count, 12), minmax(0, 1fr)); }
.buyer-map-stage .seat[data-price-muted]:not(:disabled):not([aria-pressed="true"]) {
  color: #5c5366;
  border-color: #dad4e3;
  background: #f1eef5;
}

.buyer-map-message {
  position: absolute;
  bottom: 3.75rem;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: min(30rem, 90%);
  transform: translateX(-50%);
  margin: 0;
  padding: .625rem 1rem;
  border-radius: .5rem;
  color: #fff;
  background: #302044;
}

.buyer-map-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  border-top: 1px solid var(--line);
  padding: .75rem clamp(.75rem, 3vw, 2rem) max(.75rem, env(safe-area-inset-bottom));
  background: #fff;
}

.buyer-map-footer .map-legend { flex: 1 1 16rem; justify-content: center; margin: 0; }
.buyer-map-price, .buyer-map-finish { display: flex; align-items: center; gap: .625rem; font-size: .825rem; }
.buyer-map-price { margin: 0; }
.buyer-map-price select { width: auto; min-height: 44px; border-radius: 999px; }
.buyer-map-finish { margin-inline-start: auto; white-space: nowrap; font-weight: 650; }
.buyer-map-finish .primary { min-height: 44px; padding-inline: 1.5rem; border-radius: 999px; }

@media (max-width: 600px) {
  .buyer-map-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 4.25rem; gap: .25rem .75rem; }
  .buyer-map-header [data-map-brand] { display: none; }
  .buyer-map-header h2 { grid-column: 1; }
  .buyer-map-header a { grid-column: 2; }
  .buyer-map-tools { column-gap: .2rem; }
  .buyer-map-tools .buyer-map-icon { padding: .25rem; min-width: 42px; }
  .buyer-map-footer .map-legend { order: -1; flex-basis: 100%; justify-content: flex-start; }
  .buyer-map-price > span { max-width: 7rem; }
}

@media (max-width: 390px) {
  .buyer-map-tools [data-map-action="fit"] { padding-inline: .4rem; }
  .buyer-map-footer { gap: .375rem .75rem; }
  .buyer-map-price > span { display: none; }
}

@media print {
  .buyer-seat-picker[open] { display: none; }
}
