:root {
  color-scheme: dark;
  --ink: #f4eefb;
  --muted: #9b93b8;
  --line: #2a2340;
  --paper: #15111f;
  --surface: #0e0a17;
  --surface-strong: #1b1526;
  --accent: #ff2d95;
  --accent-dark: #c81f77;
  --teal: #22e0ff;
  --violet: #a24bff;
  --amber: #ffcf2d;
  --good: #2bff9e;
  --bad: #ff3b57;
  --void: #0a0810;
  --void-2: #0e0a17;
  --grad: linear-gradient(120deg, #ff2d95 0%, #a24bff 50%, #22e0ff 100%);
  --glow-accent: 0 0 18px rgba(255, 45, 149, 0.5);
  --glow-cyan: 0 0 18px rgba(34, 224, 255, 0.45);
  --disp: "Rajdhani", "Noto Sans TC", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(255, 45, 149, 0.14), transparent 60%),
    radial-gradient(1000px 620px at 108% 38%, rgba(34, 224, 255, 0.1), transparent 55%),
    radial-gradient(760px 520px at 50% 118%, rgba(162, 75, 255, 0.12), transparent 60%),
    var(--void);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(162, 75, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(162, 75, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
}

body > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 88px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: rgba(12, 9, 20, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.identity-login-details {
  position: relative;
}

.identity-login-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.identity-login-details > summary::-webkit-details-marker {
  display: none;
}

.identity-login-details[open] > summary {
  border-color: rgba(255, 45, 149, 0.45);
  background: rgba(255, 45, 149, 0.1);
}

.identity-login-details[open] .identity-login-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 420px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.identity-login-form {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.identity-switcher {
  min-width: 128px;
}

.identity-login-field {
  width: 132px;
}

.identity-switcher select,
.identity-login-form input {
  min-height: 38px;
}

.identity-login-form .secondary-action {
  min-height: 38px;
  padding: 0 12px;
}

.identity-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

body:not(.admin-signed-in) .identity-caption,
body:not(.admin-signed-in) .tab-button[data-view="admin"] {
  display: none;
}

/* 頁尾：把「主辦/工作人員登入」從頂部大按鈕降級成低調的小連結，讓購票粉絲的畫面乾淨。 */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.site-footer-brand {
  font-size: 13px;
}
.site-footer .identity-login-details > summary {
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer .identity-login-details[open] > summary {
  background: none;
  border: 0;
  color: var(--ink);
}
/* 頁尾的登入表單往「上」彈出，避免超出頁面底部。 */
.site-footer .identity-login-details[open] .identity-login-form {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
}

/* 驗票專用畫面：登入入口在頁尾，未登入時讓它明顯、可直接登入；登入後整個頁尾隱藏。 */
.checkin-focus .site-footer {
  margin-top: 12px;
  border-top: 0;
}
.checkin-focus.admin-signed-in .site-footer {
  display: none;
}
.checkin-focus .site-footer-brand {
  display: none;
}
.checkin-focus .site-footer .identity-login-details > summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.checkin-focus .site-footer .identity-login-details[open] .identity-login-form {
  position: static;
  min-width: 0;
  box-shadow: none;
}

body:not(.admin-signed-in) .mode-tabs {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}

h2 {
  font-size: 24px;
  line-height: 1.15;
}

h3 {
  font-size: 17px;
  line-height: 1.2;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted,
.meta-line {
  color: var(--muted);
  line-height: 1.7;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.tab-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(38, 45, 58, 0.1);
}

.tab-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

main {
  padding: clamp(16px, 3vw, 36px);
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.event-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.5fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.event-list-panel,
.event-detail-panel,
.checkout-panel,
.scanner-panel,
.stats-panel,
.event-day-check-panel,
.publish-check-panel,
.operations-panel,
.event-builder-panel,
.participant-panel,
.manual-issue-panel,
.transfer-settings-panel,
.transfer-reconcile-panel,
.transfer-overdue-panel,
.order-panel,
.audit-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* 起步引導列：頂部一條霓虹強調的路標，只在活動尚未設定完成時出現。 */
.onboarding-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 45, 149, 0.45);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255, 45, 149, 0.12), rgba(34, 224, 255, 0.08));
  box-shadow: var(--glow-accent);
}
.onboarding-guide[hidden] {
  display: none;
}
.onboarding-guide strong {
  font-family: var(--disp);
  font-size: 18px;
}
.onboarding-guide p {
  margin: 4px 0 0;
  max-width: 52ch;
}
.onboarding-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-list-panel,
.checkout-panel,
.scanner-panel,
.stats-panel,
.event-day-check-panel,
.publish-check-panel,
.operations-panel,
.event-builder-panel,
.participant-panel,
.manual-issue-panel,
.transfer-settings-panel,
.transfer-reconcile-panel,
.transfer-overdue-panel,
.order-panel,
.audit-panel {
  padding: 18px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.event-card.is-active {
  border-color: rgba(255, 45, 149, 0.55);
  background: rgba(255, 45, 149, 0.1);
}

.event-card.is-paused,
.organizer-event.is-paused {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.03);
}

.event-card strong {
  line-height: 1.3;
}

.event-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.event-detail-panel {
  overflow: hidden;
}

.event-art {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background:
    repeating-linear-gradient(115deg, transparent 0 21px, rgba(34, 224, 255, 0.05) 21px 22px),
    radial-gradient(60% 80% at 18% 30%, rgba(255, 45, 149, 0.34), transparent 60%),
    radial-gradient(70% 90% at 92% 62%, rgba(34, 224, 255, 0.28), transparent 60%),
    #08060f;
}

.event-art::before {
  position: absolute;
  content: "";
  inset: -45% -15%;
  background: conic-gradient(
    from 210deg at 32% 34%,
    rgba(255, 45, 149, 0),
    rgba(255, 45, 149, 0.5),
    rgba(162, 75, 255, 0.4),
    rgba(34, 224, 255, 0.45),
    rgba(255, 45, 149, 0)
  );
  filter: blur(26px);
  opacity: 0.5;
  animation: stage-spin 24s linear infinite;
}

.event-art::after {
  position: absolute;
  content: "";
  inset: 0;
  /* 銳利的舞台光束（青＋洋紅斜線），給霧狀底層一個具體、有記憶點的結構。 */
  background:
    linear-gradient(114deg, transparent 45.5%, rgba(34, 224, 255, 0.65) 46.5%, transparent 47.5%),
    linear-gradient(114deg, transparent 61%, rgba(255, 45, 149, 0.5) 61.8%, transparent 62.6%),
    linear-gradient(114deg, transparent 71%, rgba(162, 75, 255, 0.4) 71.6%, transparent 72.2%);
  mix-blend-mode: screen;
}

@keyframes stage-spin {
  to {
    transform: rotate(360deg);
  }
}

.spotlight {
  position: absolute;
  inset: 20px 12% auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 224, 255, 0.55), transparent);
  box-shadow: 0 0 14px rgba(34, 224, 255, 0.4);
}

.stage-lines {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--grad);
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.5);
}

.event-summary,
.ticket-types {
  padding: 20px;
}

.event-summary h2 {
  margin-bottom: 10px;
  font-family: var(--disp);
  font-weight: 700;
  letter-spacing: 0.01em;
  /* 手機下限拉高到 30px，與區塊標題(24px)差一整級；balance 讓換行不留孤字。 */
  font-size: clamp(30px, 8vw, 44px);
  text-wrap: balance;
}

.event-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 16px;
}

.event-summary-actions .muted {
  font-size: 13px;
}

.event-notice {
  display: grid;
  gap: 6px;
  margin: 0 20px 20px;
  padding: 14px;
  border: 1px solid rgba(197, 122, 27, 0.26);
  border-radius: 8px;
  background: rgba(255, 207, 45, 0.08);
}

.event-notice.is-canceled {
  border-color: rgba(183, 53, 53, 0.28);
  background: rgba(255, 59, 87, 0.09);
}

.event-notice strong {
  font-size: 15px;
}

.event-notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.event-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 20px 20px;
}

.event-info-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.event-info-card strong {
  font-size: 14px;
}

.event-info-card p {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.info-grid div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.info-grid div:last-child {
  border-right: 0;
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ticket-type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ticket-type {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.ticket-type .price {
  font-family: var(--disp);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ticket-type .stock {
  color: var(--muted);
  font-size: 13px;
}

.checkout-form,
.manual-scan-form {
  display: grid;
  gap: 12px;
}

/* 結帳總金額：空字串時不佔位，有值時以品牌青色強調，讓買家送出前看得到要付多少。 */
.checkout-total:empty {
  display: none;
}
.checkout-total {
  margin: 0;
  font-family: var(--disp);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

textarea {
  min-height: 94px;
  padding: 10px 12px;
  line-height: 1.45;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 700;
}

.primary-action {
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: white;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.secondary-action.is-active {
  border-color: rgba(34, 224, 255, 0.5);
  background: rgba(34, 224, 255, 0.1);
  color: var(--teal);
}

.checkout-result,
.scan-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(43, 255, 158, 0.08);
  border: 1px solid rgba(30, 140, 88, 0.22);
}

.checkout-result.is-error {
  background: rgba(255, 59, 87, 0.09);
  border-color: rgba(183, 53, 53, 0.28);
}

.checkout-result.is-success {
  background: rgba(43, 255, 158, 0.08);
  border-color: rgba(30, 140, 88, 0.28);
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

/* 後台頁面級標題比各區塊標題(24px)大一級，讓長頁滾動時能判斷所在層級。 */
#admin-title,
#tickets-title {
  font-family: var(--disp);
  font-size: clamp(28px, 4vw, 34px);
  letter-spacing: 0.01em;
}

.ticket-wallet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* 找回提醒：免帳號購票，提醒粉絲記住 Email+手機以便換裝置找回票券。 */
.wallet-recovery-hint {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 207, 45, 0.4);
  border-radius: 8px;
  background: rgba(255, 207, 45, 0.08);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.wallet-recovery-hint strong {
  color: var(--amber);
}

/* 每張票 = 發光票根 + 其下方獨立的匯款回報卡片，直向堆疊於同一格。 */
.ticket-entry {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wallet-profile-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wallet-profile-form,
.ticket-lookup-form,
.ticket-recovery-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.wallet-profile-form > div,
.ticket-lookup-form > div,
.ticket-recovery-form > div {
  grid-column: 1 / -1;
}

.wallet-profile-panel .checkout-result {
  grid-column: 1 / -1;
  margin-top: 0;
}

.ticket-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ticket-card canvas {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  border: 8px solid white;
  box-shadow: 0 0 0 1px var(--line);
}

.ticket-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.ticket-code {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.order-badge {
  display: inline-block;
  margin-top: 10px;
  margin-right: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(162, 75, 255, 0.12);
  color: #c79bff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.serial-badge {
  display: inline-block;
  margin-top: 10px;
  margin-right: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(34, 224, 255, 0.12);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.ticket-status {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(197, 122, 27, 0.15);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.ticket-status.is-checked {
  background: rgba(30, 140, 88, 0.14);
  color: var(--good);
}

.ticket-status.is-voided,
.status-pill.is-voided {
  background: rgba(183, 53, 53, 0.12);
  color: var(--bad);
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ticket-actions .secondary-action {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.nomination-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nomination-editor .secondary-action {
  min-height: 42px;
}

.nomination-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.transfer-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.transfer-panel strong {
  display: block;
  margin-bottom: 4px;
}

.transfer-qr-payment {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 10px 0;
}

.transfer-qr-payment span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.transfer-qr-payment img {
  width: min(220px, 100%);
  height: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.transfer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.transfer-info-grid div {
  padding: 8px;
  border-radius: 6px;
  background: var(--surface-strong);
}

.transfer-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.transfer-info-grid b {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.transfer-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.transfer-form label {
  min-width: 0;
}

.transfer-form .secondary-action {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
}

.empty-state {
  padding: 32px;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.active-event-control {
  min-width: min(360px, 100%);
}

.manual-issue-form {
  display: grid;
  gap: 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.event-builder-panel,
.manual-issue-panel,
.event-day-check-panel,
.publish-check-panel,
.operations-panel,
.transfer-settings-panel,
.transfer-reconcile-panel,
.transfer-overdue-panel {
  margin-bottom: 18px;
}

.event-day-check-panel,
.publish-check-panel {
  padding: 18px;
}

.event-day-check-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.event-day-check-summary strong {
  font-size: 17px;
}

.event-day-check-summary span {
  color: var(--muted);
  font-weight: 700;
}

.event-day-check-summary.is-ok {
  border-color: rgba(30, 140, 88, 0.35);
  background: rgba(43, 255, 158, 0.08);
}

.event-day-check-summary.is-warn {
  border-color: rgba(197, 122, 27, 0.35);
  background: rgba(255, 207, 45, 0.08);
}

.event-day-check-summary.is-bad {
  border-color: rgba(183, 53, 53, 0.35);
  background: rgba(255, 59, 87, 0.09);
}

.event-day-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.event-day-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.event-day-check-badge {
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.event-day-check-item strong {
  display: block;
  margin-bottom: 4px;
}

.event-day-check-item p {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.event-day-check-item.is-ok .event-day-check-badge {
  background: rgba(43, 255, 158, 0.08);
  color: var(--good);
}

.event-day-check-item.is-warn .event-day-check-badge {
  background: rgba(255, 207, 45, 0.08);
  color: var(--amber);
}

.event-day-check-item.is-bad .event-day-check-badge {
  background: rgba(255, 59, 87, 0.12);
  color: var(--bad);
}

.operations-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.operations-list li {
  display: grid;
  grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.operations-list strong {
  color: var(--ink);
  font-size: 15px;
}

.operations-list span {
  color: var(--muted);
  line-height: 1.65;
}

.order-panel,
.audit-panel {
  margin-bottom: 18px;
}

.transfer-reconcile-list,
.transfer-overdue-list,
.order-list {
  display: grid;
  gap: 12px;
}

.audit-log-list {
  display: grid;
  gap: 10px;
}

.audit-log-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.audit-log-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-log-heading strong {
  line-height: 1.35;
}

.audit-log-meta {
  color: var(--muted);
  font-size: 13px;
}

.order-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.transfer-reconcile-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(18, 115, 105, 0.22);
  border-radius: 8px;
  background: rgba(18, 115, 105, 0.06);
}

.transfer-overdue-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(183, 53, 53, 0.22);
  border-radius: 8px;
  background: rgba(183, 53, 53, 0.06);
}

.transfer-overdue-item .transfer-reconcile-grid div {
  border-color: rgba(183, 53, 53, 0.14);
}

.order-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-item-heading > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-item-heading strong,
.order-item-heading small {
  overflow-wrap: anywhere;
}

.order-item-heading small {
  color: var(--muted);
}

.order-item-metrics,
.order-ticket-lines,
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.transfer-reconcile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.transfer-reconcile-grid div {
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.transfer-reconcile-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.transfer-reconcile-grid strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.order-item-metrics span {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.transfer-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(18, 115, 105, 0.08);
  color: var(--ink);
  font-size: 13px;
}

.transfer-summary span {
  color: var(--muted);
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.event-builder-form,
.transfer-settings-form {
  display: grid;
  gap: 12px;
}

.transfer-qr-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.transfer-qr-field > input[type="hidden"] {
  display: none;
}

.transfer-qr-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  grid-column: 1 / -1;
}

.transfer-qr-preview img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.transfer-qr-preview.is-empty {
  min-height: 52px;
}

.transfer-settings-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.transfer-settings-status strong {
  display: block;
  margin-bottom: 4px;
}

.transfer-settings-status p {
  margin: 0;
  color: var(--muted);
}

.transfer-settings-status span {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.transfer-settings-status ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.transfer-settings-status.is-ok {
  border-color: rgba(30, 140, 88, 0.35);
  background: rgba(43, 255, 158, 0.08);
}

.transfer-settings-status.is-bad {
  border-color: rgba(183, 53, 53, 0.35);
  background: rgba(255, 59, 87, 0.09);
}

.form-actions,
.organizer-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions .primary-action,
.form-actions .secondary-action,
.organizer-event-actions .secondary-action {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.builder-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(34, 224, 255, 0.22);
  border-radius: 8px;
  background: rgba(43, 255, 158, 0.08);
}

.builder-preview.is-error {
  border-color: rgba(183, 53, 53, 0.28);
  background: rgba(255, 59, 87, 0.09);
}

.preview-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-lines span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.organizer-event-list {
  display: grid;
  gap: 10px;
}

.organizer-event {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.organizer-event.is-active {
  border-color: rgba(255, 45, 149, 0.55);
  background: rgba(255, 45, 149, 0.1);
}

.organizer-event strong {
  line-height: 1.3;
}

.organizer-event span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#scanner-video {
  width: 100%;
  max-height: 320px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #111;
}

.scanner-start-action {
  width: 100%;
  margin-bottom: 12px;
}

.scan-helper {
  margin-top: 10px;
  font-size: 13px;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.metric span {
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  font-size: 34px;
}

.nomination-board {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.report-board {
  display: grid;
  gap: 10px;
  align-content: start;
}

.report-line {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.report-line span,
.report-line small {
  color: var(--muted);
}

.report-line small {
  grid-column: 1 / -1;
}

.rank-line {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rank-line span {
  color: var(--muted);
}

.participant-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.8fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.filter-summary {
  grid-column: 1 / -1;
  align-self: center;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.ticket-detail-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(34, 224, 255, 0.22);
  border-radius: 8px;
  background: rgba(43, 255, 158, 0.08);
}

.ticket-detail-panel.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.04);
}

.ticket-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-detail-heading h3 {
  margin-top: 3px;
}

.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.ticket-detail-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ticket-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ticket-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  line-height: 1.45;
}

tbody tr.is-selected {
  background: rgba(43, 255, 158, 0.08);
}

.table-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.danger-action {
  border-color: rgba(183, 53, 53, 0.32);
  color: var(--bad);
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(197, 122, 27, 0.15);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.is-checked {
  background: rgba(30, 140, 88, 0.14);
  color: var(--good);
}

.scan-result.is-error {
  background: rgba(255, 59, 87, 0.09);
  border-color: rgba(183, 53, 53, 0.28);
}

.scan-result.is-success {
  background: rgba(43, 255, 158, 0.08);
  border-color: rgba(30, 140, 88, 0.28);
}

.scan-result.is-payment {
  background: rgba(255, 207, 45, 0.08);
  border-color: rgba(197, 122, 27, 0.28);
}

.scan-inline-action {
  margin-top: 12px;
}

.checkin-focus main {
  padding: clamp(8px, 2vw, 18px);
}

.checkin-focus .topbar {
  position: static;
  min-height: auto;
  padding: 8px clamp(10px, 3vw, 18px);
}

.checkin-focus.admin-signed-in .topbar {
  display: none;
}

.checkin-focus .topbar h1,
.checkin-focus .mode-tabs,
.checkin-focus .identity-caption {
  display: none;
}

.checkin-focus .topbar-actions,
.checkin-focus .identity-login-form {
  width: 100%;
}

.checkin-focus .identity-login-form {
  justify-content: stretch;
}

.checkin-focus .identity-switcher,
.checkin-focus .identity-login-field,
.checkin-focus .identity-login-form .secondary-action {
  flex: 1 1 120px;
}

.checkin-focus .workspace-header {
  align-items: stretch;
  margin-bottom: 8px;
}

.checkin-focus .workspace-header > div:first-child {
  display: none;
}

.checkin-focus .admin-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  width: 100%;
  gap: 8px;
  align-items: end;
}

.checkin-focus .active-event-control {
  min-width: 0;
}

.checkin-focus .scanner-panel {
  padding: clamp(10px, 3vw, 16px);
}

.checkin-focus #scanner-video:not([hidden]) {
  display: block;
  height: min(62dvh, 560px);
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.checkin-focus .onboarding-guide,
.checkin-focus .event-builder-panel,
.checkin-focus .event-day-check-panel,
.checkin-focus .publish-check-panel,
.checkin-focus .operations-panel,
.checkin-focus .order-panel,
.checkin-focus .participant-panel,
.checkin-focus .nomination-board,
.checkin-focus .report-board {
  display: none;
}

.checkin-focus #admin-view .operations-panel {
  display: none;
}

.checkin-focus .admin-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin-inline: auto;
}

.checkin-focus #manual-token {
  min-height: 54px;
  font-size: 20px;
  text-transform: uppercase;
}

.checkin-focus .manual-scan-form .primary-action,
.checkin-focus #start-camera {
  min-height: 54px;
  font-size: 17px;
}

.checkin-focus .stats-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin-inline: auto;
}

@media (max-width: 720px) {
  .transfer-qr-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .transfer-settings-status {
    grid-template-columns: minmax(0, 1fr);
  }

  .transfer-settings-status span {
    white-space: normal;
  }

  .checkin-focus .topbar {
    padding-block: 6px;
  }

  .checkin-focus .identity-login-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .checkin-focus .identity-login-field,
  .checkin-focus .identity-login-form .secondary-action {
    width: 100%;
  }

  .checkin-focus .admin-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkin-focus #scanner-video:not([hidden]) {
    height: min(68dvh, 620px);
    margin-bottom: 8px;
  }

  .checkin-focus .scanner-panel {
    padding: 10px;
  }

  .checkin-focus .scanner-panel .muted {
    line-height: 1.45;
  }

  .checkin-focus .stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .event-shell,
  .admin-layout,
  .builder-grid,
  .event-day-check-list,
  .wallet-profile-panel {
    grid-template-columns: 1fr;
  }

  .event-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    min-height: 0;
    gap: 10px;
    padding: 12px 16px;
  }

  .topbar > div:first-child .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .topbar-actions {
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
  }

  .identity-login-details {
    width: 100%;
  }

  .identity-login-details > summary {
    justify-content: center;
    width: 100%;
  }

  .identity-login-details[open] .identity-login-form {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .mode-tabs {
    width: 100%;
    /* 固定三等分一列，避免 auto-fit 在窄螢幕把第三顆分頁擠成孤行。 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .mode-tabs .tab-button {
    padding: 10px 6px;
    font-size: 14px;
  }

  /* Hero 在手機不佔掉三成首屏、也不再像載入失敗的空色塊。 */
  .event-art {
    min-height: 150px;
  }

  .info-grid,
  .ticket-type-list,
  .form-row,
  .stats-panel,
    .ticket-detail-grid,
    .participant-toolbar,
    .nomination-editor,
    .event-info-list,
    .operations-list li,
    .transfer-reconcile-grid,
    .transfer-info-grid,
    .transfer-form,
    .ticket-card,
    .wallet-profile-form,
    .ticket-lookup-form,
    .ticket-recovery-form {
    grid-template-columns: 1fr;
  }

  .ticket-detail-heading {
    flex-direction: column;
  }

  .order-item-heading {
    flex-direction: column;
  }

  .info-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .info-grid div:last-child {
    border-bottom: 0;
  }

  .ticket-card canvas {
    width: 220px;
    height: 220px;
  }

  /* 手機為單欄堆疊，垂直撕票線不再適用。 */
  .ticket-card::after {
    display: none;
  }
}

/* --- 無障礙、觸控與互動回饋強化（2026 修復批次） --- */
:where(button, a, [role="button"], input, select, textarea):focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

.primary-action:hover,
.secondary-action:hover,
.tab-button:hover,
.table-action:hover {
  filter: brightness(0.96);
}

.primary-action:active,
.secondary-action:active,
.tab-button:active,
.table-action:active {
  transform: translateY(1px);
}

.tab-button,
.primary-action,
.secondary-action,
.table-action,
.ticket-actions .secondary-action,
.form-actions .primary-action,
.form-actions .secondary-action,
.organizer-event-actions .secondary-action,
.identity-login-form input,
.identity-login-form .secondary-action,
input,
select {
  min-height: 44px;
}

button,
a,
[role="button"],
.tab-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ticket-qr-void {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.stats-panel,
.report-table,
.participant-table {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  /* 深色主題下 --ink 是近白的文字色，不能當底色（原本白字白底等於隱形）。 */
  background: var(--void);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
}

@supports (padding: max(0px, env(safe-area-inset-left))) {
  .topbar {
    padding-left: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 4vw, 48px), env(safe-area-inset-right));
  }
}

/* ================= 深色霓虹強化（2026-07 改版） ================= */
.topbar h1,
.eyebrow,
.tab-button,
.primary-action,
.secondary-action,
.metric strong,
.serial-badge,
.order-badge,
.ticket-code,
.status-pill,
.ticket-status {
  font-family: var(--disp);
  letter-spacing: 0.04em;
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0.24em;
}

.event-shell h2,
.event-detail h2 {
  font-weight: 700;
  letter-spacing: -0.005em;
}

.topbar h1 {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: var(--glow-accent);
}

.primary-action {
  background: var(--grad);
  border: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 0 22px rgba(255, 45, 149, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.primary-action:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 30px rgba(255, 45, 149, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}
.secondary-action:hover {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: var(--glow-cyan);
}
.secondary-action.is-danger {
  border-color: rgba(255, 59, 87, 0.55);
  color: var(--bad);
}
.secondary-action.is-danger:hover {
  border-color: var(--bad);
  color: var(--bad);
  box-shadow: 0 0 18px rgba(255, 59, 87, 0.4);
}

.tab-button {
  border-radius: 999px;
}
.tab-button.is-active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-accent);
}

.event-card {
  position: relative;
  background: linear-gradient(150deg, var(--paper), var(--void-2));
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad);
  box-shadow: var(--glow-accent);
}
.event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 45, 149, 0.5);
}
.event-card.is-active {
  border-color: rgba(255, 45, 149, 0.6);
  box-shadow: var(--glow-accent);
}

.ticket-status,
.status-pill {
  font-weight: 600;
  letter-spacing: 0.06em;
}
.ticket-status.is-checked,
.status-pill.is-checked {
  color: var(--good);
  text-shadow: 0 0 8px rgba(43, 255, 158, 0.5);
}

.metric strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ticket-card {
  position: relative;
  background: linear-gradient(165deg, var(--surface-strong), var(--void-2));
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.ticket-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: var(--grad);
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.55);
  z-index: 1;
}
.ticket-card canvas {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 0 0 1.5px var(--teal), 0 0 22px rgba(34, 224, 255, 0.4);
}
/* QR 與票面資訊之間的撕票虛線＋兩端打孔缺口，做出實體票根的結構感。 */
.ticket-card::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 236px;
  width: 14px;
  transform: translateX(-50%);
  border-left: 2px dashed rgba(34, 224, 255, 0.4);
  background:
    radial-gradient(circle at 50% 0, var(--void) 6px, transparent 7px) top center / 14px 14px no-repeat,
    radial-gradient(circle at 50% 100%, var(--void) 6px, transparent 7px) bottom center / 14px 14px no-repeat;
  z-index: 1;
}
.ticket-code {
  color: var(--teal);
  letter-spacing: 0.16em;
}
.serial-badge {
  color: var(--teal);
}
