/* บัตรผู้ร่วมกิจกรรม (reg-pass.js · เจ้าของระบบ 28 ต.ค. 2569): เต็มจอบนมือถือ · กระชับ · QR ใหญ่กลางจอให้ทีมงานสแกน */
html:has(.reg-pass[open]),
html:has(.reg-pass[open]) body {
  overflow: hidden;
}
.reg-pass {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: #17211c;
  overscroll-behavior: contain;
}
.reg-pass::backdrop {
  background: rgba(10, 20, 15, 0.6);
}
.rp-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #eef1ef;
  color: #17211c;
  cursor: pointer;
}
.rp-body {
  display: grid;
  justify-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: min(440px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  align-content: center;
}
.rp-head {
  width: 100%;
  padding-right: 48px;
  box-sizing: border-box;
}
.rp-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}
.rp-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 6px 0 0;
  color: #5f6761;
  font-size: 0.88rem;
}
.rp-when .material-symbols-rounded {
  font-size: 18px;
}
.rp-person {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border-block: 1px solid #e3e8e5;
}
.rp-bib {
  flex: none;
  min-width: 72px;
  color: #256e45;
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rp-person strong {
  display: block;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.rp-status {
  display: block;
  margin-top: 2px;
  color: #256e45;
  font-size: 0.85rem;
  font-weight: 700;
}
.rp-status[data-state='checked'] {
  color: #9a3412;
}
.rp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  width: 100%;
  margin: 0;
}
.rp-facts:empty {
  display: none;
}
.rp-facts dt {
  color: #5f6761;
  font-size: 0.78rem;
}
.rp-facts dd {
  margin: 0;
  font-weight: 700;
}
.rp-qr-wrap {
  display: grid;
  place-items: center;
  width: 100%;
}
.rp-qr {
  width: min(78vw, 46dvh, 320px);
  aspect-ratio: 1;
}
.rp-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.rp-qr.is-loading {
  border-radius: 16px;
  background: #eef1ef;
}
.rp-qr-note {
  margin: 0;
  font-weight: 700;
  text-align: center;
}
.rp-timer {
  margin: -8px 0 0;
  color: #5f6761;
  font-size: 0.88rem;
  text-align: center;
}
.rp-link {
  border: 0;
  background: none;
  color: #194e31;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.rp-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
}
/* ปุ่มใน card: ทีมงานยืนยันแล้ว = ไอคอน QR (กดแล้วเปิดบัตรผู้ร่วมกิจกรรม) */
.healthy-formal
  :is(.event-register-row .button, .next-bib .bib-register).is-confirmed
  .reg-done::before {
  content: 'qr_code_2';
}

/* ลงทะเบียนสำเร็จ / Check-in แล้ว (เจ้าของระบบ 29 ต.ค. 2569): ไอคอน QR ใหญ่คลุมสองบรรทัดทางซ้าย · บรรทัดล่างไม่ขีดเส้นใต้ */
.healthy-formal :is(.event-register-row .button, .next-bib .bib-register).is-registered.is-pass {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}
.healthy-formal :is(.event-register-row .button, .next-bib .bib-register).is-pass .reg-done::before {
  content: none;
}
.healthy-formal :is(.event-register-row .button, .next-bib .bib-register).is-pass .reg-pass-icon {
  flex: 0 0 auto;
  font-size: 2.6em;
  line-height: 1;
}
.healthy-formal :is(.event-register-row .button, .next-bib .bib-register).is-pass .reg-pass-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.healthy-formal :is(.event-register-row .button, .next-bib .bib-register).is-pass .reg-edit {
  text-decoration: none;
}
