.product-page {
  --app-header-offset: 5rem;
  scroll-padding-top: var(--app-header-offset);
}
.product {
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 38rem 24rem at 50% -9rem, var(--brand-surface), transparent 100%), var(--background);
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-block: .8rem .25rem;
  pointer-events: none;
}
.app-bar {
  --ring: rgb(165 184 255 / .85);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.5rem, 1.6vw, 1.3rem);
  padding: .42rem .6rem .42rem 1rem;
  border: 1px solid rgb(255 255 255 / .1);
  border-radius: 1.15rem;
  background: var(--nav);
  color: var(--paper);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
}
.app-bar > .brand {
  justify-self: start;
  font-size: 1.075rem;
}
.app-nav, .primary-links {
  display: flex;
  align-items: center;
  gap: .15rem;
}
.app-nav { padding-inline-start: .8rem; border-inline-start: 1px solid rgb(255 255 255 / .18); }
.primary-links .icon, .mobile-menu-label, .mobile-primary-links { display: none; }
.app-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  min-height: 2.75rem;
  padding: .3rem .72rem;
  border: 0;
  border-radius: .7rem;
  background: transparent;
  color: rgb(255 250 245 / .72);
  font-size: .875rem;
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color .22s var(--ease), background .22s var(--ease), scale .18s var(--ease);
}
.app-tab:hover { background: rgb(255 255 255 / .09); color: var(--paper); }
.app-tab[aria-current], .app-nav:has(.product-menu > [aria-current]) .app-menu-toggle {
  background: rgb(130 157 255 / .21);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(165 184 255 / .22);
}
.app-tab:active { scale: .97; }
.app-tab .icon { font-size: .96rem; }
.app-menu-toggle { anchor-name: --product-menu-toggle; }
.app-nav:has(:popover-open) .app-menu-toggle .icon { rotate: 180deg; }
.product-menu {
  position: fixed;
  inset: 4.5rem max(1rem, calc((100% - 72rem) / 2)) auto auto;
  width: 14rem;
  max-height: calc(100dvh - 5.5rem);
  overflow-y: auto;
  margin: 0;
  padding: .4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-float);
}
@supports (top: anchor(bottom)) {
  .product-menu {
    position-anchor: --product-menu-toggle;
    inset: calc(anchor(bottom) + .65rem) auto auto anchor(left);
  }
}
.product-menu .text-label { padding: .55rem .65rem .25rem; }
.product-menu .app-tab { display: flex; justify-content: flex-start; gap: .7rem; color: var(--foreground); }
.product-menu .app-tab .icon { color: var(--muted-foreground); }
.product-menu .app-tab:hover { background: var(--muted); }
.product-menu .app-tab[aria-current] { color: var(--accent-foreground); background: var(--brand-surface); box-shadow: none; }
.product-menu .app-tab[aria-current] .icon { color: inherit; }
.product-menu .app-tab:focus-visible { outline-offset: -2px; }
.app-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; }
.app-header .theme-toggle { width: 2.55rem; height: 2.55rem; }
.wallet-button { min-height: 2.55rem; padding-inline: .85rem; border-radius: 99rem; white-space: nowrap; }
.wallet-button[data-connected] {
  border-color: rgb(255 255 255 / .14);
  background: rgb(255 255 255 / .08);
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08);
}
.wallet-button[data-connected]:hover:enabled { background: rgb(255 255 255 / .14); }
.wallet-button[data-connected] #wallet-label { font-family: var(--font-mono); font-size: .75rem; }
.wallet-button img { border-radius: .25rem; object-fit: contain; }
.wallet-button:has(img:not([hidden])) > .icon { display: none; }

.app-main { flex: 1; padding: clamp(1.75rem, 4.5vw, 3.5rem) 0 4rem; overflow: visible; }
.app-intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem 1.5rem; margin-bottom: 1.45rem; }
.app-intro h1 { font-size: clamp(2.35rem, 5vw, 4rem); letter-spacing: -.05em; line-height: 1; }
.event-selector { display: grid; width: min(100%, 19rem); flex: none; gap: .4rem; }
.ticket-view > .test-ticket-note { grid-area: note; margin-bottom: 0; }
.test-ticket-note {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.35rem;
  padding: .75rem .9rem;
  border: 1px solid var(--brand-border);
  border-radius: .9rem;
  background: var(--brand-surface);
  color: var(--foreground);
  font-size: .875rem;
}
.test-ticket-note .icon { margin-top: .17em; color: var(--accent-foreground); }
.test-ticket-note a { color: var(--accent-foreground); text-decoration: underline; text-underline-offset: .2em; }
.event-directory { display: grid; gap: 1.1rem; }
.standby-proof-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--brand-surface);
}
.standby-proof-callout p { display: grid; gap: .18rem; }
.standby-proof-callout .muted { font-size: .875rem; }
.standby-proof-callout .button { min-height: 2.75rem; text-align: start; }
.directory-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem 1.3rem; }
.directory-search { flex: 1 1 20rem; max-width: 34rem; }
.listing-filter { min-width: 0; margin: 0; padding: 0; border: 0; }
.listing-filter legend { margin-bottom: .35rem; }
.listing-options {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  padding: .2rem;
  border: 1px solid var(--input);
  border-radius: .95rem;
  background: var(--muted);
}
.listing-options label {
  display: grid;
  min-height: 2.3rem;
  place-items: center;
  padding: .3rem .7rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  color: var(--muted-foreground);
  font-size: .875rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.listing-options label:hover { color: var(--foreground); }
.listing-options label:has(:checked) { border-color: var(--brand-border); background: var(--card); color: var(--accent-foreground); box-shadow: var(--shadow-card); }
.listing-options label:has(:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.search-control { position: relative; display: block; }
.search-control .icon { position: absolute; top: 50%; left: .85rem; color: var(--muted-foreground); translate: 0 -50%; pointer-events: none; }
.search-control .control { padding-inline-start: 2.55rem; background: var(--card); }
.directory-status, .owned-feedback { color: var(--muted-foreground); font-size: .875rem; }
.directory-status .icon-tile, .owned-feedback .icon-tile { display: none; }
.directory-status[data-state="results"], .owned-feedback[data-state="results"] {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.directory-status:is([data-state="empty"], [data-state="error"]),
.owned-feedback:is([data-state="empty"], [data-state="error"]) {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--card);
  color: var(--foreground);
}
:is(.directory-status, .owned-feedback):is([data-state="empty"], [data-state="error"]) .icon-tile { display: grid; }
:is(.directory-status, .owned-feedback)[data-state="loading"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.event-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.05rem;
  list-style: none;
  padding: 0;
}
.event-results:empty { display: none; }
.event-groups { display: grid; gap: clamp(1.75rem, 4.5vw, 3.25rem); }
.event-groups:not(:has(.event-group:not([hidden]))) { display: none; }
.event-group { display: grid; gap: .9rem; }
.event-group:not([hidden]) + .event-group:not([hidden]) { padding-top: 1rem; border-top: 1px solid var(--border); }
.event-group h2 { font-size: clamp(1.35rem, 2vw, 1.85rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.event-group p { margin-top: .35rem; color: var(--muted-foreground); font-size: .9rem; }
.directory-recovery { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.directory-recovery .text-link, .owned-feedback .text-link { min-height: 2.4rem; color: var(--accent-foreground); }
.event-results li { position: relative; min-width: 0; }
.event-result {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-card);
  overflow-wrap: anywhere;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.event-result:is(:hover, :focus-visible) { border-color: var(--brand-border); box-shadow: var(--shadow-float); }
.event-card-copy { display: flex; flex: 1; flex-direction: column; gap: .45rem; padding: 1rem 1.05rem; font-size: .875rem; }
.event-card-copy strong { font-size: 1.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
.event-program { font-weight: 600; line-height: 1.35; }
.event-destination { width: fit-content; margin-bottom: .2rem; color: var(--accent-foreground); font-weight: 600; }
.event-result:hover .event-destination { text-decoration: underline; text-underline-offset: .2em; }
.event-visual { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--muted); }
.event-photo { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.event-result:hover .event-photo { scale: 1.035; }
.event-visual-fallback {
  background: repeating-linear-gradient(135deg, transparent 0 1rem, rgb(215 221 255 / .09) 1rem 1.05rem),
    radial-gradient(ellipse at 76% 0%, #4161f0, var(--cobalt-deep));
  color: #e3eaff;
}
.event-visual-fallback .icon { width: 3.75rem; height: 3.75rem; rotate: -10deg; }
.photo-credit { position: absolute; top: .65rem; right: .65rem; max-width: calc(100% - 1.3rem); padding: .2rem .45rem; border-radius: 99rem; background: rgb(0 0 0 / .78); color: white; font-size: .68rem; line-height: 1.4; }
.photo-credit:is(:hover, :focus-visible) { text-decoration: underline; }
.event-skeleton { display: grid; gap: .65rem; padding-bottom: 1rem; border: 1px solid var(--border); border-radius: 1.4rem; background: var(--card); overflow: hidden; }
.event-skeleton .skeleton:first-child { aspect-ratio: 16 / 9; border-radius: 0; margin-bottom: .25rem; }
.event-skeleton .skeleton:nth-child(n+2) { width: 65%; height: .8rem; margin-inline: 1.05rem; }
.event-skeleton .skeleton:last-child { width: 42%; }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select {
  width: 100%;
  min-height: 2.75rem;
  appearance: none;
  padding: .55rem 2.25rem .55rem .8rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-card);
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
}
.select-wrap select:disabled { opacity: .68; cursor: default; }
.select-wrap .icon { position: absolute; top: 50%; right: .7rem; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }

.workspace-notice { position: sticky; top: var(--app-header-offset); z-index: 2; margin-bottom: 1rem; }
.app-main:has(#receipts:not([hidden])) .workspace-notice { position: static; }
.workspace-notice:not(:has(.message:not([hidden]):not(:empty), :not([hidden])[data-action], .wallet-help:not([hidden]), .pending-operations:not([hidden]), #wallet-providers:not([hidden]))) { display: none; }
.message { display: flex; align-items: baseline; gap: .55rem; padding: .65rem .85rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--card); color: var(--foreground); box-shadow: var(--shadow-card); font-size: .875rem; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message:not(:empty)::before { width: .42rem; height: .42rem; flex: none; border-radius: 50%; background: var(--accent-foreground); content: ""; }
.message[data-state="error"] { background: color-mix(in srgb, var(--destructive) 11%, var(--card)); color: var(--error-text); }
.message[data-state="error"]::before { background: var(--destructive); }
.message[data-state="success"] { background: color-mix(in srgb, var(--success) 10%, var(--card)); }
.message[data-state="success"]::before { background: var(--success); }
#offline-status::before { background: var(--warning); }
.workspace-notice > [data-action="reload"] { margin-top: .35rem; }
.wallet-help { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.wallet-help a:hover { background: var(--brand-surface); }
.pending-operations { display: grid; gap: .35rem; max-height: 30dvh; overflow: auto; margin-top: .35rem; border-radius: .9rem; }
.pending-operation { display: grid; gap: .65rem; padding: .65rem .85rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--card); font-size: .85rem; }
.pending-operation .text-mono { font-size: .75rem; overflow-wrap: anywhere; }
.pending-operation .step-item { align-items: center; }
.pending-operation .step-spine { --step-size: 1.45rem; --step-space: .5rem; }
.pending-operation .text-link { color: var(--accent-foreground); }
.event-detail { max-width: 42ch; margin: .25rem 0; font-size: .875rem; overflow-wrap: anywhere; }
.event-cover .text-link { color: #fff; }
.offer-countdown { padding-block: .55rem; color: var(--accent-foreground); font-family: var(--font-mono); font-size: .88rem; font-variant-numeric: tabular-nums; }
.offer-countdown[data-state="expired"] { color: var(--error-text); }

.ticket-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .56fr);
  grid-template-areas: "event checkout" "note checkout" "categories checkout" "waitlist checkout";
  align-items: start;
  gap: 1.45rem 1.25rem;
}
.app-main [data-panel]:not([hidden]) { animation: slide-in .32s var(--ease) backwards; }
.panel-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.panel-line .text-link { font-size: .85rem; }

.event-cover {
  grid-area: event;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(13rem, 24vw, 17rem);
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1.8rem;
  background: radial-gradient(ellipse 87% 160% at 99% -8%, #4161f0, #253d95 42%, var(--cobalt-deep) 83%);
  color: #fff;
  box-shadow: var(--shadow-float);
}
.event-cover::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-radial-gradient(ellipse at 90% 25%, transparent 0 20px, rgb(216 226 255 / .16) 21px 22px, transparent 23px 37px);
  mask-image: linear-gradient(to left, #000, transparent 69%);
  pointer-events: none;
  content: "";
}
.event-cover-copy { display: grid; justify-items: start; gap: .7rem; width: min(73%, 31rem); }
.event-cover-copy > .text-label { color: #c4d0ff; }
.event-cover h1 { font-size: clamp(1.7rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -.05em; overflow-wrap: anywhere; }
.event-cover[data-loading] h1 { --skeleton-fill: rgb(216 226 255 / .15); --skeleton-highlight: rgb(216 226 255 / .22); }
.network-pill {
  gap: .36rem;
  max-width: 100%;
  padding: .33rem .56rem;
  border-color: rgb(216 226 255 / .25);
  border-radius: .75rem;
  background: rgb(13 23 67 / .4);
  color: #eef2ff;
  box-shadow: none;
  font-size: .75rem;
}
.network-pill:hover[href] { background: rgb(13 23 67 / .7); }
.network-pill img { width: 1rem; height: 1rem; border-radius: .28rem; }
.network-pill .icon { font-size: .75em; }
.network-pill:not([href]) .icon { display: none; }
.event-cover-art {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 2.5%;
  width: min(37%, 14rem);
  aspect-ratio: 1.25;
  transform: translateY(-50%);
}
.cover-pass {
  position: absolute;
  inset: 10% 4%;
  display: grid;
  place-items: center;
  border: 1px solid rgb(217 226 255 / .55);
  border-radius: .95rem;
  background: linear-gradient(130deg, rgb(233 240 255 / .24), rgb(208 222 255 / .04));
  box-shadow: 0 5px 16px rgb(11 19 58 / .35);
  color: #e3eaff;
  transition: transform .45s var(--ease);
}
.cover-pass::after {
  position: absolute;
  inset: .35rem;
  border: 1px dashed rgb(217 226 255 / .35);
  border-radius: .7rem;
  content: "";
}
.cover-pass-back { transform: translate(-.2rem, -.75rem) rotate(-15deg); }
.cover-pass-front { transform: translate(.25rem, .5rem) rotate(8deg); }
.cover-pass-front .icon { width: 29%; height: auto; }
@media (hover: hover) {
  .event-cover:hover .cover-pass-back { transform: translate(-.7rem, -1.1rem) rotate(-20deg); }
  .event-cover:hover .cover-pass-front { transform: translate(.55rem, .5rem) rotate(12deg); }
}

.category-picker { grid-area: categories; min-width: 0; margin: 0; padding: 0; border: 0; }
.category-picker legend, .waitlist-section h2, .tool-panel h2 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.category-picker legend { margin-bottom: .65rem; padding: 0; }
.category-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; }
.category-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .6rem;
  min-height: 4rem;
  padding: .65rem .75rem;
  border: 1px solid var(--input);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  transition: translate .23s var(--ease), scale .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.category-name { min-width: 0; overflow-wrap: anywhere; }
.category-seating { grid-column: 1 / -1; color: var(--muted-foreground); font-weight: 400; overflow-wrap: anywhere; }
.icon-tile { display: grid; flex: none; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .72rem; background: var(--brand-surface); color: var(--accent-foreground); }
.category-icon { width: 2rem; height: 2rem; border-radius: .65rem; }
.category-skeleton { min-height: 4rem; }
.category-indicator { display: grid; width: 1rem; height: 1rem; place-items: center; border: 1px solid var(--input); border-radius: 50%; }
.category-indicator::after {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--accent-foreground);
  transform: scale(0);
  transition: transform .22s var(--ease);
  content: "";
}
.category-card:has(input:checked) { border-color: var(--brand-border); background: var(--brand-surface); }
.category-card:has(input:checked) .category-indicator { border-color: var(--accent-foreground); }
.category-card:has(input:checked) .category-indicator::after { transform: none; }
.category-card:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.category-card:has(input:disabled) { opacity: .6; cursor: default; }
@media (hover: hover) {
  .category-card:has(input:enabled):hover:not(:active) { translate: 0 -2px; border-color: var(--brand-border); }
}
.category-card:has(input:enabled):active { scale: .98; }

.checkout-column { grid-area: checkout; min-width: 0; }
.checkout-card {
  border: 1px solid var(--border);
  border-radius: 1.8rem;
  background: var(--card);
  box-shadow: var(--shadow-float);
}
.checkout-face { padding: clamp(1rem, 2.4vw, 1.55rem); padding-bottom: 1.15rem; }
.checkout-heading { margin-top: .4rem; }
.checkout-heading h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.13; letter-spacing: -.045em; overflow-wrap: anywhere; }
.sale-pill { min-height: 1.6rem; padding: .25rem .65rem; font-size: .75rem; }
.face-price {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .6rem;
  margin-top: clamp(.9rem, 2vw, 1.35rem);
  padding: .85rem .9rem;
  border: 1px solid var(--brand-border);
  border-radius: 1.03rem;
  background: var(--brand-surface);
}
.face-price > div { min-width: 0; }
.face-price output { display: block; margin-top: .25rem; color: var(--accent-foreground); font-size: clamp(2rem, 5.15vw, 3rem); line-height: 1; overflow-wrap: anywhere; }
.checkout-card[data-priced] .face-price output { animation: slide-in .33s var(--ease) backwards; }
.checkout-card[data-loading] #tier-price { width: 3.85rem; }
.checkout-card[data-loading] #tier-status { width: min(100%, 12rem); }
.checkout-card[data-loading] :is(#tier-price, #tier-status) { --skeleton-fill: var(--brand-border); }
.currency-pill { flex: none; margin-bottom: .05rem; padding: .28rem .65rem .28rem .35rem; font-size: .83rem; }
.tier-status { margin-top: .7rem; color: var(--muted-foreground); font-size: .825rem; line-height: 1.4; }
#terms-label { margin-top: 1rem; }
#checkout-terms { margin: .35rem 0 .8rem; }
#checkout-terms dd { font: inherit; line-height: 1.4; }
.ticket-actions { display: grid; gap: .5rem; padding: 1rem clamp(1rem, 2.4vw, 1.55rem); }
.action-context { color: var(--muted-foreground); font-size: .82rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.checkout-cost { font-size: .84rem; }
.checkout-cost dd { font-family: inherit; }
.checkout-guidance, .waitlist-availability { color: var(--muted-foreground); font-size: .86rem; }
:is([data-action="retry-tier"], [data-action="check-funds"]) { min-height: 2.75rem; width: fit-content; color: var(--accent-foreground); }
.view-link { display: inline-flex; width: fit-content; min-height: 2.75rem; margin-inline: auto; color: var(--muted-foreground); font-size: .835rem; text-align: center; }
.app-demo { margin: .4rem 0 0; color: var(--accent-foreground); text-align: center; font-size: .875rem; }
.app-demo .text-link { min-height: 2.75rem; }

.waitlist-section {
  grid-area: waitlist;
  display: grid;
  gap: .6rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--card);
}
.waitlist-section .text-link { min-height: 2.75rem; color: var(--accent-foreground); font-size: .875rem; text-align: start; }
.waitlist-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .95rem 0;
  border-block: 1px solid var(--border);
}
.waitlist-card strong:not(.candy-pill) { display: block; font-size: .94rem; font-weight: 600; line-height: 1.25; }
.waitlist-card .candy-pill { margin-bottom: .22rem; }
.waitlist-card p { margin-top: .175rem; color: var(--muted-foreground); font-size: .85rem; line-height: 1.35; overflow-wrap: anywhere; }
.waitlist-actions, .notification-settings { display: grid; gap: .55rem; font-size: .875rem; }
.waitlist-actions:has(> :not(:empty):not([hidden]), #standby-actions > button:not([hidden])) { margin-top: .15rem; }
#standby-actions:not(:has(button:not([hidden]))) { display: none; }
.notification-settings { border-top: 1px solid var(--border); padding-top: .65rem; }

.skeleton,
.event-cover[data-loading] h1,
.checkout-card[data-loading] :is(#tier-price, #tier-status) {
  border-radius: .5rem;
  background: linear-gradient(100deg, transparent 32%, var(--skeleton-highlight, var(--card)) 50%, transparent 68%) 200% 0 / 220% 100% no-repeat,
    var(--skeleton-fill, var(--muted));
  color: transparent;
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.tool-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: start;
  gap: 1.15rem;
}
.gate-forms { display: grid; min-width: 0; gap: 1.15rem; }
.gate-tasks { display: flex; flex-wrap: wrap; gap: .4rem; grid-column: 1 / -1; }
.gate-tasks .button { text-align: left; }
.gate-heading > .text-label { margin-bottom: .4rem; }
.desk-panel {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.45rem);
  border: 1px solid var(--border);
  border-radius: 1.3rem;
  background: color-mix(in srgb, var(--card) 64%, var(--background));
}
.desk-panel.chapter-dark { padding: clamp(1.15rem, 3vw, 1.75rem); border-radius: 1.5rem; background: var(--background); box-shadow: var(--shadow-float); }
.tool-panel { display: grid; min-width: 0; gap: 1rem; }
.tool-panel > p { margin-top: -.45rem; font-size: .9rem; }
.organizer-grid, .ticket-collection { display: grid; align-items: start; gap: 1rem; }
.organizer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ticket-collection { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); }
.ticket-collection:empty, .metric-grid:empty, .result-fields:empty { display: none; }
#organizer { grid-template-columns: minmax(0, 1fr); }
#my-tickets { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); }
#receipts { grid-template-columns: minmax(0, 1fr) minmax(0, .58fr); }
.receipt-result { grid-column: 1 / -1; }

.owned-ticket {
  display: grid;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background: var(--card);
  box-shadow: var(--shadow-float);
}
.owned-ticket-heading {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: .55rem;
  padding: 1rem 1.15rem 1.25rem;
  border-radius: 1.35rem 1.35rem 0 0;
  background: radial-gradient(ellipse 106% 230% at 95% -21%, #3655d7, var(--cobalt-deep) 76%);
  color: #fff;
}
.owned-ticket-heading > .icon { width: 1.5rem; height: 1.5rem; color: #c9d3ff; }
.owned-ticket-heading h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; overflow-wrap: anywhere; }
.owned-ticket-body { display: grid; gap: .7rem; padding: .9rem 1.15rem 1rem; }
.owned-ticket-body > p { font-size: .875rem; }
.owned-ticket-body .button { min-height: 2.75rem; text-align: start; }
.owned-ticket-body .text-link { width: fit-content; min-height: 1.85rem; color: var(--accent-foreground); }
.ticket-skeleton { min-height: 10rem; border-radius: 1.4rem; }
.activity-entry {
  position: relative;
  display: grid;
  gap: .18rem;
  padding: .25rem 1.4rem .65rem 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-size: .9rem;
  line-height: 1.3;
  text-align: left;
}
.activity-entry strong { font-weight: 600; }
.activity-entry .text-mono { color: var(--muted-foreground); font-size: .75rem; overflow-wrap: anywhere; }
.activity-entry .icon { position: absolute; top: .4rem; right: 0; color: var(--accent-foreground); }
.activity-entry:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.empty-text { font-size: .875rem; }

.gate-video { width: 100%; max-height: 22rem; border-radius: var(--radius); background: var(--background); }
.file-button { min-height: 2.75rem; align-self: center; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--ring); outline-offset: 3px; }
.permit-card { justify-items: center; text-align: center; }
#permit-gate { font-weight: 600; }
.permit-card canvas { width: min(15rem, 100%); height: auto; border: .5rem solid #fff; border-radius: 1rem; background: #fff; image-rendering: pixelated; }
.permit-card .text-link { min-height: 2.25rem; color: var(--accent-foreground); }
#permit-expiry { margin-top: 0; }
#gate-progress {
  margin-top: 0;
  padding: .7rem .8rem;
  border-radius: .7rem;
  background: var(--muted);
}
#gate-progress:empty { display: none; }
#gate-progress[data-state="pending"] { background: var(--brand-surface); }
#gate-progress[data-state="error"] { background: color-mix(in srgb, var(--destructive) 11%, var(--card)); color: var(--error-text); }
#gate-progress[data-state="success"] { background: color-mix(in srgb, var(--success) 16%, var(--card)); color: var(--foreground); font-weight: 600; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.tool-actions .button { flex: 1 1 auto; padding-inline: .7rem; font-size: .875rem; }
.control {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .7rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: .9375rem;
  line-height: 1.3;
}
.control:focus-visible { outline-offset: 0; }
.control::placeholder { color: var(--muted-foreground); }
textarea.control { resize: vertical; min-height: 6rem; }
.product input[type="checkbox"] { accent-color: var(--primary); }
.result-card { display: grid; gap: .85rem; min-width: 0; padding: .95rem; border: 1px solid var(--border); border-radius: 1.15rem; background: var(--card); }
.result-card:not([hidden]) { animation: slide-in .3s var(--ease) backwards; }
.result-card h3 { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.result-heading > h3 { overflow-wrap: anywhere; }
.receipt-result { padding: clamp(1rem, 3vw, 1.65rem); border-radius: 1.5rem; background: var(--background); box-shadow: var(--shadow-float); }
.receipt-result .text-link { color: var(--accent-foreground); }
#receipt-feedback, .receipt-result, .gate-forms [tabindex="-1"], #gate-check-in, #checkout-progress, #waitlist-progress { scroll-margin-top: .65rem; }
#receipt-ticket-link { width: fit-content; min-height: 2.75rem; }
.receipt-block { font-size: clamp(1.1rem, 4.3vw, 1.65rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.receipt-entries { padding-top: .85rem; border-top: 1px solid var(--border); }
.receipt-entry { display: grid; gap: .55rem; min-width: 0; padding: .3rem 0 .65rem; border-bottom: 1px solid var(--border); }
.receipt-entry h3 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem; }
.receipt-entry .text-amount { color: var(--accent-foreground); overflow-wrap: anywhere; }
.result-fields { display: grid; grid-template-columns: minmax(4.25rem, 23%) minmax(0, 1fr); align-items: baseline; gap: .35rem .7rem; font-size: .83rem; }
.result-fields dt { color: var(--muted-foreground); }
.result-fields dd { font-family: var(--font-mono); font-size: .75rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-card .raw-data { color: var(--muted-foreground); font-size: .83rem; }
.raw-data summary { width: fit-content; cursor: pointer; }
.raw-data pre { margin: .4rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .73rem; }
.demo-links { gap: .15rem; }
.demo-links h2 { margin-bottom: .3rem; }
.demo-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  min-height: 2.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), scale .18s var(--ease);
}
.demo-links a:is(:hover, :focus-visible) { color: var(--accent-foreground); }
.demo-links a:active { scale: .98; }
.demo-links .icon { color: var(--accent-foreground); }

.admin-overview h2 { font-size: clamp(1.3rem, 3.4vw, 1.85rem); }
.admin-overview > p { margin-top: 0; }
#admin-status[data-state="connected"] { color: var(--success); }
#admin-status[data-state="restricted"] { color: var(--warning); }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; }
.metric-grid > div { display: grid; gap: .25rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--muted); }
.metric-grid dt { color: var(--muted-foreground); font-size: .8rem; }
.metric-grid dd { font-family: var(--font-mono); font-size: clamp(1.1rem, 2vw, 1.5rem); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.admin-overview .result-fields { grid-template-columns: minmax(5.65rem, 17%) minmax(0, 1fr); padding-top: .8rem; border-top: 1px solid var(--border); }
#admin-manage fieldset { min-width: 0; padding: .55rem .75rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); }
#admin-manage fieldset legend { padding-inline: .4rem; font-weight: 600; overflow-wrap: anywhere; }
#admin-manage .tool-panel > .tool-panel:not(fieldset), #admin-manage [data-action="access"] { padding-top: .75rem; border-top: 1px solid var(--border); }
.cancellation-panel { border-color: color-mix(in srgb, var(--destructive) 35%, var(--border)); }

.app-footer { display: grid; justify-items: center; gap: .75rem; padding: 1.25rem 0 2rem; border-top: 1px solid var(--border); text-align: center; }
.app-footer .footer-nav a { color: var(--muted-foreground); }

@media (max-width: 56rem) {
  .app-nav { justify-content: end; border: 0; padding: 0; }
  .primary-links, .desktop-menu-label { display: none; }
  .mobile-menu-label { display: inline; }
  .mobile-primary-links { display: grid; padding-bottom: .35rem; margin-bottom: .35rem; border-bottom: 1px solid var(--border); }
  .product-menu { inset: 4.5rem 1rem auto auto; width: min(20rem, calc(100% - 2rem)); }
}

@media (max-width: 52rem) {
  .ticket-view {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "event" "note" "categories" "checkout" "waitlist";
    gap: 1.15rem;
  }
  .tool-view, #my-tickets, #receipts { grid-template-columns: minmax(0, 1fr); }
  .checkout-card { border-radius: 1.5rem; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 39rem) {
  .app-header { padding-top: .55rem; }
  .app-bar { gap: .25rem; padding-inline: .65rem .4rem; }
  .app-header .theme-toggle { width: 2.75rem; height: 2.75rem; }
  .wallet-button { min-height: 2.75rem; }
  .app-intro { flex-wrap: wrap; align-items: start; }
  .app-intro h1 { width: 100%; }
  .event-selector { width: 100%; max-width: none; }
  .directory-search, .listing-filter { width: 100%; max-width: none; }
  .listing-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing-options label { min-height: 2.6rem; padding-inline: .3rem; }
  .event-visual { aspect-ratio: 2 / 1; }
  .gate-tasks .button { flex: 1; padding-inline: .575rem; font-size: .82rem; }
  .event-cover { min-height: 11.75rem; border-radius: 1.45rem; }
  .event-cover-art { top: 4.85rem; width: min(32%, 7.5rem); opacity: .48; }
  .event-cover-copy { width: 100%; }
  .event-cover-copy > :is(h1, .event-program) { width: min(77%, 30rem); }
  .event-cover::before { mask-image: linear-gradient(to left, #000, transparent 58%); }
  .category-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.7rem), 1fr)); }
  .category-card { gap: .38rem; padding-inline: .6rem; font-size: .875rem; }
  .organizer-grid, .ticket-collection { grid-template-columns: minmax(0, 1fr); }
  .receipt-entry .result-fields { grid-template-columns: minmax(3.75rem, 22%) minmax(0, 1fr); gap: .3rem .45rem; }
  .standby-proof-callout .button { width: 100%; justify-content: space-between; }
}
@media (max-width: 30rem) {
  .wallet-button { width: 2.75rem; padding: 0; }
  #wallet-label { display: none; }
}
@media (max-width: 25rem) {
  .category-card { grid-template-columns: auto 1fr; }
  .category-card .category-indicator { grid-column: 2; grid-row: 1; justify-self: end; }
  .category-name { grid-column: 1 / -1; grid-row: 2; }
  .category-icon { width: 1.65rem; height: 1.65rem; }
  .field-row .button { padding-inline: .62rem; }
}
@media (max-width: 23rem) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  .app-tab[aria-current], .app-nav:has(.product-menu > [aria-current]) .app-menu-toggle { outline: 1px solid Highlight; outline-offset: -1px; }
}
