/* Wave 2: personal QR page, volunteer scanner, attendance screen. Tokens from styles.css. */

/* Personal QR (ticket page and thank-you screen) */
.ticket { text-align: center; padding-top: 28px; padding-bottom: 28px; }
.ticket__title { margin: 0 0 12px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.ticket__qr { display: block; width: min(280px, 80vw); height: auto; margin: 0 auto 12px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); image-rendering: pixelated; }
.ticket__note { margin: 0 auto 16px; max-width: 460px; color: var(--muted); }
.ticket__save { max-width: 320px; margin: 0 auto 24px; }
.ticket--inline { margin: 0 auto 24px; padding: 20px 16px; max-width: 420px; border: 2px solid var(--blue); border-radius: var(--radius); }
.ticket--inline .ticket__note { margin-bottom: 0; font-size: 15px; }
.ticket--inline .ticket__note a { color: var(--action); font-weight: 600; }

/* Volunteer scanner: phone-first, big targets */
.scan { background: var(--bg); }
.scan__bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--navy); color: #fff;
}
.scan__point { font-size: 18px; font-weight: 700; line-height: 1.2; }
.scan__place { font-size: 13px; color: var(--sky); }
.scan__net { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #1E7D3A; }
.scan__net.is-off { background: var(--error); }
.scan__rehearsal { margin: 0; padding: 10px 16px; background: var(--yellow); color: var(--navy); font-weight: 700; text-align: center; }
.scan__main { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.scan__queue { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: #FFF6D6; border-left: 5px solid var(--orange); font-weight: 600; }
.scan__camera, .scan__search, .scan__walkin, .scan__result { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.scan__video-wrap { position: relative; margin-bottom: 12px; border-radius: var(--radius-sm); overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.scan__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan__frame { position: absolute; top: 15%; right: 15%; bottom: 15%; left: 15%; border: 4px solid rgba(255, 255, 255, .85); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); }
.scan__big { min-height: 64px; font-size: 19px; }
.scan__hint { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.scan__h2 { margin: 0 0 12px; font-size: 18px; }

.scan__result { outline: none; text-align: center; border-top: 10px solid var(--line); }
.scan__result--ok { border-top-color: #1E7D3A; }
.scan__result--already { border-top-color: var(--orange); }
.scan__result--queued { border-top-color: var(--blue); }
.scan__result--error { border-top-color: var(--error); }
.scan__state { font-size: 28px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.scan__result--ok .scan__state { color: #1E7D3A; }
.scan__result--already .scan__state { color: #B35300; }
.scan__result--queued .scan__state { font-size: 19px; color: var(--navy); }
.scan__result--error .scan__state { font-size: 19px; color: var(--error); }
.scan__awardee { display: inline-block; margin: 4px 0 10px; padding: 8px 18px; border-radius: var(--radius-sm); background: var(--yellow); color: var(--navy); font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.scan__name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.scan__meta { color: var(--muted); font-size: 16px; }
.scan__warn { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: #FFF6D6; font-weight: 600; font-size: 15px; }
.scan__result .scan__big { margin-top: 16px; }

.scan__search-form { display: flex; gap: 8px; }
.scan__search-form input {
  flex: 1; min-width: 0; min-height: 54px; padding: 11px 14px;
  font: inherit; font-size: 18px; color: var(--navy); background: #fff;
  border: 1.5px solid #B8C7D5; border-radius: var(--radius-sm); -webkit-appearance: none; appearance: none;
}
.scan__search-btn { width: auto; flex: none; }
.scan__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.scan__item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.scan__item > div { flex: 1; min-width: 0; }
.scan__item b { display: block; font-size: 17px; line-height: 1.3; }
.scan__item span { display: block; color: var(--muted); font-size: 14px; }
.scan__item .scan__tag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: var(--yellow); color: var(--navy); font-weight: 700; font-size: 13px; }
.scan__mark { width: auto; flex: none; min-height: 52px; padding: 10px 16px; font-size: 16px; }
.scan__mark[disabled] { background: #E6EEF5; color: var(--muted); opacity: 1; cursor: default; }

/* Attendance screen */
.att { display: grid; gap: 16px; padding-top: 20px; }
.att__updated { margin: 8px 0 0; color: var(--sky); font-size: 14px; }
.att__points { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.att__point { border-top: 6px solid var(--blue); }
.att__point--mic { border-top-color: var(--orange); }
.att__label { margin: 0; font-size: 16px; color: var(--muted); }
.att__big { margin: 4px 0 0; font-size: 44px; font-weight: 700; line-height: 1.1; }
.att__big small { font-size: 20px; color: var(--muted); font-weight: 600; }
.att__sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.att__head { margin-bottom: 8px; }
.att__title { margin: 0; font-size: 20px; }
.att__summary { margin: 4px 0 0; color: var(--muted); }
.att__empty { margin: 8px 0 0; font-weight: 600; color: #1E7D3A; }
.att__group { padding: 12px 0; border-top: 1px solid var(--line); }
.att__group h3 { margin: 0 0 8px; font-size: 16px; }
.att__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.att__group li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.att__state { font-size: 14px; font-weight: 600; }
.att__state--unregistered { color: var(--error); }
.att__state--registered { color: #B35300; }
.att__state--not_for_ceremony { color: var(--muted); }
.att__pos { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.att__downloads { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.scan__result, .scan__camera { scroll-margin-top: 96px; }
a.button { text-decoration: none; text-align: center; }
.closed { text-align: center; padding-top: 32px; padding-bottom: 32px; }
.closed__title { margin: 0 0 12px; font-size: 24px; }
.closed__text { margin: 0 auto; max-width: 520px; color: var(--muted); }
