/*
 * UPASS public pages: event page, register page, waiting room, member tickets.
 * One flat ground, one ink, one accent (the orange of the udn.com logo, on the
 * action only), one typeface. No shadows at rest, no gradients, no outlines:
 * surfaces are told apart by a step in tone. Loaded by layouts/public.hbs only.
 */

:root {
  --u-ground: #efefed;
  --u-field: #e1e1dd;
  --u-bar: #ffffff;
  /* verification results: a leaf green and a brick red that sit next to the orange */
  --u-good: #1e7b4a;
  --u-bad: #c4281c;
  --u-good-tint: #dcefe3;
  --u-good-ink: #17613a;
  --u-bad-tint: #fadfdc;
  --u-bad-ink: #a2201a;
  --u-ink: #111111;
  --u-soft: #44443f;
  --u-accent: #f26b1d;
  --u-on-dark: #f4f4f1;
  --u-disabled: #d3d3ce;
  --u-pad: clamp(16px, 3vw, 32px);
  --u-font: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui,
    sans-serif;
  --u-small: 14px;
  --u-body: 17px;
  --u-lead: clamp(19px, 1.05rem + 0.6vw, 26px);
  --u-gap: clamp(64px, 8vw, 120px);
}

.upass {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--u-ground);
  color: var(--u-ink);
  font-family: var(--u-font);
  font-size: var(--u-body);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.upass main {
  flex: 1;
}
.upass [hidden] {
  display: none !important;
}
.upass :focus-visible {
  outline: 3px solid var(--u-ink);
  outline-offset: 3px;
}

.u-wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--u-pad);
}

/* ---------- Header ---------- */
/* Glass header: at the top of the page it is the page's own ground (nothing
   is under it); once content scrolls beneath it, it frosts. Without script it
   simply stays frosted. */
.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 239, 237, 0.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  color: var(--u-ink);
  transition: background-color 0.2s;
}
.public-header.is-top {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .public-header {
    background: rgba(239, 239, 237, 0.96);
  }
}
.public-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--u-ink);
  text-decoration: none;
}
.public-brand__logo {
  height: 30px;
  width: auto;
  flex: none;
}
.public-brand__title {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.public-header__right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.public-header__link {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--u-ink);
  text-decoration: none;
}
.public-header__link:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 2px;
}
.header-member {
  position: relative;
  flex: none;
}
.header-member__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--u-ink);
  cursor: pointer;
  transition: background 0.12s;
}
.header-member__trigger:hover,
.header-member--open .header-member__trigger {
  background: var(--u-field);
}
.header-member__icon {
  display: inline-flex;
}
.header-member__popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: min(18rem, calc(100vw - 32px));
  padding: 16px;
  /* flat like the rest: a tone step from the white bar, no shadow */
  background: var(--u-field);
  color: var(--u-ink);
}
.header-member__status {
  margin: 0;
  font-size: var(--u-small);
  word-break: break-all;
}
.header-member[data-member-state='error'] .header-member__status {
  font-weight: 900;
}
.header-member__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.header-member__action--primary {
  background: var(--u-accent);
  color: var(--u-ink);
}
.header-member__action--primary:hover {
  background: var(--u-ink);
  color: var(--u-accent);
}
.header-member__action--secondary {
  background: var(--u-bar);
  color: var(--u-ink);
}
.header-member__action--secondary:hover {
  background: var(--u-ground);
}

/* ---------- Footer ---------- */
.u-footer {
  margin-top: var(--u-gap);
  background: var(--u-bar);
  color: var(--u-ink);
}
.u-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px 32px;
  padding-top: 32px;
  /* room for the back-to-top button at the end of a page */
  padding-bottom: 88px;
}
.u-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
}
.u-footer__logo {
  height: 28px;
  width: auto;
}
.u-footer__brand span {
  white-space: nowrap;
}
@media (max-width: 479px) {
  .u-footer__grid {
    grid-template-columns: 1fr;
  }
}
.u-footer__link {
  font-weight: 500;
  color: var(--u-ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 2px;
}
.u-footer__link:hover {
  text-decoration-color: var(--u-accent);
}
.u-footer__legal {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--u-small);
  color: var(--u-soft);
}
/* The orange 報名 band closes the page on its own: the footer sits flush under it */
.upass:has(.u-close) .u-footer {
  margin-top: 0;
}
@media (max-width: 1023px) {
  /* The fixed 報名 bar must not sit on the footer at the end of the page */
  .upass:has(.u-actions) .u-footer__grid {
    padding-bottom: 140px;
  }
}
@media (max-width: 559px) {
  .public-header__link {
    display: none;
  }
}

/* ---------- Buttons, links, small text ---------- */
.u-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: var(--u-accent);
  color: var(--u-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.u-btn:hover {
  background: var(--u-ink);
  color: var(--u-accent);
}
.u-btn:active {
  transform: translateY(1px);
}
.u-btn[disabled],
.u-btn.is-done,
.u-btn[disabled]:hover,
.u-btn.is-done:hover {
  background: var(--u-disabled);
  color: var(--u-soft);
  cursor: default;
  transform: none;
}
.u-btn--inline {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
}
.u-btn--quiet,
.u-btn--quiet:hover {
  background: transparent;
  color: var(--u-ink);
}
.u-btn--quiet:hover {
  background: var(--u-field);
}
.u-link {
  color: var(--u-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 2px;
}
.u-link:hover {
  text-decoration-color: var(--u-accent);
}
.u-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 16px 0 0;
}
.u-meta {
  margin: 0;
  font-size: var(--u-small);
  color: var(--u-soft);
}
.u-meta--text {
  font-size: var(--u-body);
  color: var(--u-ink);
}
.u-state {
  margin: 0;
  font-size: var(--u-small);
  font-weight: 500;
  color: var(--u-soft);
  white-space: nowrap;
}
.u-state--available {
  color: var(--u-ink);
  font-weight: 900;
}
.u-error {
  margin: 0;
  font-weight: 900;
}
.u-ok {
  margin: 0;
  font-weight: 900;
}
.u-banner {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--u-field);
  font-weight: 500;
}
.u-banner--fixed {
  margin: 0;
  padding: 12px var(--u-pad);
  background: var(--u-ink);
  color: var(--u-on-dark);
  text-align: center;
  font-size: var(--u-small);
}

/* ---------- Event + register layout ---------- */
.u-split {
  display: grid;
  gap: 32px;
  padding-top: 16px;
}
@media (min-width: 1024px) {
  .u-split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(40px, 5vw, 88px);
    padding-top: 24px;
    align-items: start;
  }
}
@media (min-width: 1024px) and (min-height: 760px) {
  .u-pin {
    position: sticky;
    top: 96px;
  }
}
/* The admin form asks for a 3:2 cover (900x600), so the slot is 3:2 whatever
   the upload turned out to be; a different ratio is contained, not cropped. */
.u-poster {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--u-field);
}
.u-poster__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.u-poster__date {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: clamp(16px, 2vw, 28px);
  background: var(--u-accent);
  color: var(--u-ink);
}
.u-poster__day {
  font-size: clamp(96px, 14vw, 200px);
  font-weight: 900;
  line-height: 0.82;
}
.u-poster__month {
  margin-top: 8px;
  font-size: var(--u-lead);
  font-weight: 900;
}

.u-title {
  margin: 0 0 20px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  font-size: clamp(28px, 6vw, 48px);
}
.u-title--xl {
  font-size: clamp(34px, 8vw, 64px);
}
.u-title--m {
  font-size: clamp(24px, 4.2vw, 36px);
}
.u-title--s {
  font-size: clamp(22px, 3.4vw, 28px);
}
.u-title--reg {
  font-size: clamp(28px, 5vw, 44px);
}
@media (min-width: 1024px) {
  .u-title {
    font-size: clamp(32px, 4.2vw, 52px);
  }
  .u-title--xl {
    font-size: clamp(36px, 5.4vw, 88px);
  }
  .u-title--m {
    font-size: clamp(24px, 2.4vw, 36px);
  }
  .u-title--s {
    font-size: clamp(22px, 2vw, 28px);
  }
  .u-title--reg {
    font-size: clamp(30px, 3.2vw, 48px);
  }
}
.u-lead {
  margin: 0 0 6px;
  font-size: var(--u-lead);
  font-weight: 500;
  line-height: 1.4;
}
.u-lead--soft {
  color: var(--u-soft);
}

.u-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--u-bar);
}
.u-actions__title {
  margin: 0;
  font-size: var(--u-small);
  font-weight: 500;
  color: var(--u-soft);
}
.u-actions__status {
  margin: 0;
  font-size: var(--u-lead);
  font-weight: 900;
  line-height: 1.3;
}
.u-actions .u-btn {
  width: 100%;
}
@media (max-width: 1023px) {
  .u-main {
    padding-bottom: 16px;
  }
  .u-actions {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 40;
    max-width: none;
    margin: 0;
    padding: 12px var(--u-pad) calc(12px + env(safe-area-inset-bottom, 0px));
    /* ink: the grey and white panels above would swallow a grey or white bar */
    background: var(--u-ink);
    color: var(--u-on-dark);
    grid-template-columns: 1fr;
    align-items: center;
    gap: 4px;
  }
  .u-actions__title {
    display: none;
  }
  /* the bar is just the way in: the status and the tickets link stay on the page.
     A state that blocks the button (ended, paused) still says why. */
  .u-actions__status {
    font-size: 16px;
  }
  .u-actions__status--open,
  .u-actions .u-link {
    display: none;
  }
  .u-actions .u-btn {
    width: 100%;
  }
}

.u-section {
  margin-top: var(--u-gap);
}
.u-h2,
.u-h3 {
  margin: 0 0 20px;
  font-size: var(--u-lead);
  font-weight: 900;
  line-height: 1.3;
}
.u-h3 {
  margin: 0;
}
.u-prose {
  max-width: 38em;
  white-space: pre-line;
}
.u-prose--rich {
  white-space: normal;
}
.u-prose--rich h2,
.u-prose--rich h3 {
  margin: 1.6em 0 0.5em;
  font-size: var(--u-lead);
  font-weight: 900;
  line-height: 1.3;
}
.u-prose--rich h4 {
  margin: 1.4em 0 0.4em;
  font-weight: 900;
}
.u-prose--rich p {
  margin: 0 0 1.1em;
}
.u-prose--rich ul {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
  list-style: disc;
}
.u-prose--rich ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
  list-style: decimal;
}
.u-prose--rich a {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.u-prose--rich blockquote {
  margin: 1.2em 0;
  padding: 16px 20px;
  background: var(--u-field);
}
.u-prose--rich img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.2em auto;
}
.u-prose--rich hr {
  height: 32px;
  border: 0;
}
.u-prose--rich table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
}
.u-prose--rich th,
.u-prose--rich td {
  padding: 10px 12px;
  border: 1px solid #c8c8c2;
  text-align: left;
}
.u-prose--rich th {
  background: var(--u-field);
  font-weight: 900;
}

/* Event page: sessions and passes as a flat list */
.u-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.u-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  background: var(--u-field);
}
.u-list__row.is-ended {
  color: var(--u-soft);
}
.u-list__name {
  margin: 0;
  font-weight: 900;
}
.u-list__meta {
  margin: 2px 0 0;
  font-size: var(--u-small);
  color: var(--u-soft);
}
.u-contact {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.u-contact span {
  display: inline-block;
  min-width: 4em;
  color: var(--u-soft);
}
.u-contact a {
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.u-share {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--u-field);
  color: var(--u-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.u-share:hover {
  background: var(--u-ink);
  color: var(--u-on-dark);
}

/* The page's close: the whole band is the way in */
.u-close {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 32px;
  padding: clamp(20px, 3vw, 32px)
    max(var(--u-pad), calc((100% - 1360px) / 2 + var(--u-pad)));
  background: var(--u-accent);
  color: var(--u-ink);
  text-decoration: none;
  overflow: hidden;
  transition: background 0.15s, color 0.15s;
}
.u-close:hover,
.u-close:focus-visible {
  background: var(--u-ink);
  color: var(--u-accent);
  outline: none;
}
.u-close__text {
  max-width: 16em;
  font-size: var(--u-lead);
  font-weight: 500;
  line-height: 1.35;
}
.u-close__word {
  font-size: clamp(56px, 8vw, 104px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
@media (max-width: 559px) {
  .u-close {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Register ---------- */
.u-timer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--u-ink);
  color: var(--u-on-dark);
}
.u-timer__remaining {
  font-size: var(--u-lead);
  font-weight: 900;
  color: var(--u-accent);
}
.u-timer__note {
  font-size: var(--u-small);
}
.u-sessions {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  margin-top: 40px;
}
.u-sessions--passes {
  margin-top: var(--u-gap);
  gap: 20px;
}
.u-sessions--passes > .u-h2 {
  margin: 0;
}
.u-session {
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--u-field);
}
.u-session.is-ended {
  color: var(--u-soft);
}
.u-session__head {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
/* The admin session form asks for a 3:2 cover (900x600): the slot is 3:2 and a
   different ratio is contained, not cropped, like the event poster. */
.u-session__thumb {
  width: 132px;
  aspect-ratio: 3 / 2;
  height: auto;
  flex: none;
  object-fit: contain;
  background: var(--u-ground);
}
.u-session__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.u-session__none {
  padding: 4px 0;
}
.u-days {
  display: grid;
  gap: 2px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
  font-size: var(--u-small);
}
.u-tiers {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.u-tier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: 20px;
  background: var(--u-ground);
}
.u-tier__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.u-tier__name {
  margin: 0;
  font-weight: 900;
}
.u-tier__name .u-state {
  margin-left: 8px;
}
.u-tier__price {
  margin: 4px 0 0;
  font-size: var(--u-lead);
  font-weight: 900;
  line-height: 1.2;
}
.u-tier__act {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}
.u-tier__act .u-meta {
  max-width: 16rem;
}
@media (max-width: 600px) {
  .u-tier {
    grid-template-columns: 1fr;
  }
  .u-tier__act {
    justify-items: stretch;
    text-align: left;
  }
  .u-tier__act .u-btn {
    width: 100%;
  }
  .u-session__thumb {
    width: 96px;
  }
}
.u-empty {
  margin-top: 40px;
  padding: 48px 24px;
  background: var(--u-field);
}
.u-empty__title {
  margin: 0 0 4px;
  font-size: var(--u-lead);
  font-weight: 900;
}

/* Claim modal: the dialog floats, so it keeps its shadow */
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal).modal-backdrop {
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .modal-box {
  max-width: 28rem;
  border-radius: 0;
  background: var(--u-ground);
  color: var(--u-ink);
  font-family: var(--u-font);
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .modal-header {
  padding: 24px 24px 8px;
  border: 0;
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .modal-body {
  display: grid;
  gap: 16px;
  padding: 8px 24px 20px;
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .modal-footer {
  gap: 8px;
  padding: 0 24px 24px;
  border: 0;
  background: transparent;
  border-radius: 0;
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .form-label {
  margin-bottom: 6px;
  font-size: var(--u-small);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  color: var(--u-ink);
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .form-input,
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .register-qty__input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: var(--u-field);
  color: var(--u-ink);
  font: inherit;
  font-size: var(--u-body);
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .register-qty__input {
  width: 5rem;
  text-align: center;
}
:is(#register-claim-modal, #cancel-ticket-modal, #confirm-action-modal) .form-input:focus {
  outline: 3px solid var(--u-ink);
  outline-offset: 0;
  box-shadow: none;
}
.register-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.register-qty__btn {
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--u-field);
  color: var(--u-ink);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.register-qty__btn:hover {
  background: var(--u-disabled);
}
.u-modal-x {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--u-ink);
  font-size: 18px;
  cursor: pointer;
}
.u-modal-x:hover {
  background: var(--u-field);
}

/* ---------- Waiting room ---------- */
.u-wr__event {
  margin: 0 0 4px;
  font-size: var(--u-lead);
  font-weight: 900;
  line-height: 1.3;
}
.u-wr__stage {
  display: grid;
  gap: 8px;
}
.u-wr__lead {
  margin: 0;
  font-size: var(--u-lead);
  font-weight: 500;
  line-height: 1.4;
}
.u-wr__num {
  margin: 8px 0 0;
  font-size: clamp(96px, 13vw, 190px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.u-wr__label {
  margin: 0 0 12px;
  font-size: var(--u-lead);
  font-weight: 900;
}
.u-wr__done {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
}
.u-wr .u-btn {
  justify-self: start;
  margin-top: 16px;
}
.u-panel--accent {
  background: var(--u-accent);
  color: var(--u-ink);
}

/* Loading and live state: a flat orange block sweeps along the top of the panel
   while the queue is being watched, and until the first answer arrives the number
   is a pulsing block of the same size. Nothing but transform and opacity moves. */
.u-wr__stage {
  position: relative;
  overflow: hidden;
}
.u-wr__bar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--u-field);
  overflow: hidden;
}
.u-wr__bar::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: var(--u-accent);
  animation: u-wr-sweep 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes u-wr-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(360%);
  }
}
.u-wr.is-loading [data-wr-position] {
  position: relative;
  color: transparent;
  user-select: none;
}
.u-wr.is-loading [data-wr-position]::after {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  width: 1.9em;
  height: 80%;
  background: var(--u-field);
  animation: u-wr-pulse 1.1s ease-in-out infinite alternate;
}
@keyframes u-wr-pulse {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .u-wr__bar::after {
    animation: none;
    width: 100%;
  }
  .u-wr.is-loading [data-wr-position]::after {
    animation: none;
  }
}

/* ---------- Entrances (see upass-motion.js) ---------- */
.js-motion [data-rise] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--rise-delay, 0ms);
}
.js-motion [data-rise].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-rise] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .u-btn,
  .u-close {
    transition: none;
  }
}

/* ---------- Member tickets (/tickets) ---------- */
.u-tickets__title {
  margin-top: 24px;
}
.u-empty .u-btn {
  margin-top: 20px;
}
.u-block {
  display: block;
}
.u-link--btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.u-btn--ink {
  background: var(--u-ink);
  color: var(--u-on-dark);
}
.u-btn--ink:hover {
  background: var(--u-accent);
  color: var(--u-ink);
}
.u-state--claimed,
.u-state--redeemed {
  color: var(--u-ink);
  font-weight: 900;
}
.u-bullets {
  margin: 8px 0 0;
  padding-left: 1.2em;
  list-style: disc;
}
.u-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 32px;
}
.u-filter__tabs,
.u-pager__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.u-filter__search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.u-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--u-field);
  color: var(--u-ink);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
a.u-tab:hover {
  background: var(--u-disabled);
}
.u-tab.is-active {
  background: var(--u-ink);
  color: var(--u-on-dark);
}
.u-tab.is-off {
  background: transparent;
  color: var(--u-soft);
  font-weight: 500;
}
.u-input {
  width: 14rem;
  max-width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: var(--u-field);
  color: var(--u-ink);
  font: inherit;
  font-size: var(--u-body);
}
.u-groups {
  display: grid;
  gap: clamp(40px, 5vw, 72px);
}
.u-group {
  padding: clamp(16px, 2.4vw, 32px);
  background: var(--u-field);
}
.u-group__head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.u-group__poster {
  width: 160px;
  flex: none;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--u-ground);
}
.u-group__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.u-group__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.u-table-wrap {
  display: none;
}
.u-cards {
  display: grid;
  gap: 8px;
}
@media (min-width: 768px) {
  .u-table-wrap {
    display: block;
    overflow-x: auto;
  }
  .u-cards {
    display: none;
  }
}
.u-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 15px;
}
.u-table th {
  padding: 10px 14px;
  background: var(--u-ink);
  color: var(--u-on-dark);
  font-size: var(--u-small);
  font-weight: 500;
  text-align: left;
}
.u-table td {
  padding: 14px;
  background: var(--u-ground);
  vertical-align: middle;
}
.u-table .u-day td {
  background: #f7f7f5;
}
.u-table .u-day.is-released td {
  opacity: 0.55;
}
.u-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--u-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.u-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}
.u-cancel {
  display: grid;
  gap: 2px;
  justify-items: start;
}
.u-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--u-ground);
}
.u-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.u-card__name {
  margin: 0;
  font-weight: 900;
}
.u-card__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 8px;
}
.u-days-toggle summary {
  padding: 6px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.u-days-toggle summary::-webkit-details-marker {
  display: none;
}
.u-day-list {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.u-day-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--u-field);
}
.u-day-list li.is-released {
  opacity: 0.55;
}
.u-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Back to top ---------- */
.u-top {
  position: fixed;
  right: var(--u-pad);
  bottom: 24px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  /* flat: an ink square with an orange arrow reads on the grey page, the orange band and the ink footer */
  background: var(--u-ink);
  color: var(--u-accent);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, background 0.12s, color 0.12s;
}
.u-top.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.u-top:hover {
  background: var(--u-accent);
  color: var(--u-ink);
}
.u-top:focus-visible {
  outline-color: var(--u-accent);
}
.u-top svg {
  width: 22px;
  height: 22px;
}
@media (max-width: 1023px) {
  /* clear the fixed 報名 bar on the event page */
  .upass:has(.u-actions) .u-top {
    bottom: 92px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .u-top {
    transition: none;
  }
}

/* ---------- Ticket verification (/verify/:qrToken) ---------- */
.u-select {
  width: 100%;
  min-height: 52px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: var(--u-field);
  color: var(--u-ink);
  font: inherit;
}
.u-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--u-small);
  font-weight: 900;
}
/* A summary that reads as a button: a tone block with a 展開/收合 label and a chevron */
.u-days-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--u-ground);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  list-style: none;
  transition: background 0.12s;
}
.u-days-sum:hover {
  background: var(--u-field);
}
.u-days-sum__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--u-soft);
}
.u-days-sum__chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}
details[open] > .u-days-sum .u-days-sum__chevron {
  transform: rotate(180deg);
}
.u-days-sum__label--open,
details[open] > .u-days-sum .u-days-sum__label--closed {
  display: none;
}
details[open] > .u-days-sum .u-days-sum__label--open {
  display: inline;
}
.u-days-sum::-webkit-details-marker {
  display: none;
}
.u-confirm {
  padding: 16px 20px;
  background: var(--u-field);
}
.u-confirm p {
  margin: 0;
}



/* Live events under the member's tickets */
.u-live {
  margin-top: var(--u-gap);
}
/* straight under the filters when there are no tickets of your own above it */
.u-filter + .u-live {
  margin-top: 8px;
}
.u-live__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.u-live__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 16px;
  background: var(--u-field);
}
.u-live__poster {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--u-ground);
}
.u-live__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.u-live__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
@media (max-width: 680px) {
  .u-live__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .u-live__row .u-btn {
    width: 100%;
  }
}

/* Event page chapters: open prose, a field panel, an ink panel */
.u-panel {
  margin-top: 16px;
  padding: clamp(20px, 2.6vw, 32px);
}
.u-panel--white {
  background: var(--u-bar);
}
.u-panel--field {
  background: var(--u-field);
}
.u-panel--field .u-list__row {
  background: var(--u-ground);
}
.u-panel--ink {
  background: var(--u-ink);
  color: var(--u-on-dark);
}
.u-panel--ink .u-contact span {
  color: #c9c9c4;
}
.u-panel--ink .u-contact a {
  color: var(--u-on-dark);
}
.u-panel--ink .u-contact a:hover {
  color: var(--u-accent);
}
.u-panel .u-h2 {
  margin-bottom: 20px;
}
.u-panel__note {
  margin: 20px 0 0;
  font-size: var(--u-small);
  color: var(--u-soft);
}

/* Compact header on small screens */
@media (max-width: 1023px) {
  .public-header__bar {
    height: 56px;
  }
  .public-brand {
    gap: 10px;
  }
  .public-brand__logo {
    height: 24px;
  }
  .public-brand__title {
    font-size: 15px;
  }
}

/* ---------- Ticket verification: a small card under the logo ---------- */
.upass--bare main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 28px 16px 40px;
}
.u-vbrand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 900;
}
.u-vbrand img {
  height: 24px;
  width: auto;
}
.u-verify {
  width: 100%;
  max-width: 380px;
  background: var(--u-bar);
}
.u-vstatus {
  display: block;
  margin: 0;
  padding: 12px 16px;
  background: var(--u-accent);
  color: var(--u-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}
.u-vstatus--stop {
  background: var(--u-ink);
  color: var(--u-on-dark);
}
.u-vstatus--good {
  background: var(--u-good);
  color: #ffffff;
}
.u-vstatus--bad {
  background: var(--u-bad);
  color: #ffffff;
}
.u-vstatus--result {
  padding: 10px 16px;
  font-size: 14px;
}
.u-vstatus__note {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.u-verify__body {
  display: grid;
  gap: 16px;
  padding: 20px;
}
.u-verify__event {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}
.u-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 0;
}
.u-facts div {
  min-width: 0;
}
.u-facts dt {
  font-size: 13px;
  color: var(--u-soft);
}
.u-facts dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.u-facts dd.is-plain {
  font-weight: 500;
}
.u-kv {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  background: var(--u-ground);
  font-size: 13px;
}
.u-kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.u-kv dt {
  flex: none;
  color: var(--u-soft);
}
.u-kv dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.u-vact {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.u-vact .u-btn {
  width: 100%;
  min-height: 48px;
  font-size: 17px;
}
.u-vact__field {
  width: 100%;
}
.u-vact__qr {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}
.u-vact__qr.is-dim {
  opacity: 0.4;
}
.u-vact__note {
  margin: 0;
  max-width: 26em;
  font-size: 13px;
  color: var(--u-soft);
  text-align: center;
}
.u-vnote {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  background: var(--u-ground);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
/* notes under the card take the colour of the state they explain */
.u-vnote--bad {
  background: var(--u-bad-tint);
  color: var(--u-bad-ink);
}
.u-vnote--good {
  background: var(--u-good-tint);
  color: var(--u-good-ink);
}
.u-vdays {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.u-vdays li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--u-ground);
}
.u-vdays__name {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}
.u-vdays__state {
  flex: none;
  text-align: right;
}
