.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px 16px;
  border-bottom: 1px solid var(--color-border);
}
.mobile-navigation {
  position: fixed;
  z-index: 40;
  inset: auto 0 0;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--color-border);
  background: var(--color-card);
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
}
.mobile-nav-link {
  display: flex;
  flex: 1;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  color: var(--color-muted-foreground);
  font-size: 11px;
  font-weight: 500;
}
.mobile-nav-link svg, .mobile-nav-link > span { width: 24px; height: 24px; font-size: 24px; line-height: 24px; }
.mobile-nav-link[aria-current="page"] { background: var(--color-muted); color: var(--color-accent); }
.mobile-account { width: min(360px, calc(100vw - 24px)); max-height: 75dvh; margin: auto auto calc(84px + env(safe-area-inset-bottom)); overflow: auto; }
.mobile-account::backdrop { background: rgb(0 0 0 / 20%); }
.mobile-list-control { display: none; }
.scanner-preview { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 14px; background: #151820; }
.scanner-preview video { width: 100%; height: 100%; object-fit: cover; }
.scanner-guide { position: absolute; inset: 20%; border: 2px solid rgb(255 255 255 / 85%); border-radius: 16px; pointer-events: none; }
.scanner-preview-label { position: absolute; inset: auto 12px 16px; color: white; text-align: center; font-size: 12px; }
[data-ticket-scanner-target="torch"][aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-foreground); }
[data-ticket-scanner-target="status"] { padding: 12px; border-radius: 12px; background: var(--color-muted); line-height: 1.5; }
[data-ticket-scanner-target="status"][data-outcome="ok"], [data-ticket-scanner-target="status"][data-outcome="override"] { background: var(--color-success); color: var(--color-success-foreground); }
[data-ticket-scanner-target="status"][data-outcome="already"], [data-ticket-scanner-target="status"][data-outcome="wrong_event"] { background: var(--color-warning); color: var(--color-warning-foreground); }
[data-ticket-scanner-target="status"][data-outcome="invalid"] { background: var(--color-destructive); color: var(--color-destructive-foreground); }
@media (min-width: 768px) {
  .mobile-header, .mobile-navigation { display: none; }
}
@media (max-width: 767px) {
  .app-main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .app-main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .app-main select, .app-main textarea { font-size: 16px; }
  .app-main input:not([type="checkbox"]):not([type="radio"]), .app-main select { min-height: 44px; }
}
@media (max-width: 639px) {
  .mobile-list-control { display: flex; }
  .attendee-search > div { min-width: 0; }
  .attendee-filter-fields > div { flex: 1 1 calc(50% - 12px); min-width: 0; }
  .attendee-search select { width: 100%; }
  .attendee-workspace [popover] { max-width: calc(100vw - 16px); }
  .attendee-workspace[data-mobile-layout="list"] .attendee-table-container { border: 0; border-radius: 0; overflow: visible; background: transparent; }
  .attendee-workspace[data-mobile-layout="list"] table, .attendee-workspace[data-mobile-layout="list"] tbody { display: block; width: 100%; }
  .attendee-workspace[data-mobile-layout="list"] thead { display: none; }
  .attendee-workspace[data-mobile-layout="list"] [data-attendee-table-target="lockMode"] { display: none; }
  .attendee-workspace[data-mobile-layout="list"] tr { display: block; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-card); }
  .attendee-workspace[data-mobile-layout="list"] td:not(.hidden) { display: flex; gap: 12px; justify-content: space-between; padding: 8px 0; position: static; background: transparent; box-shadow: none; overflow-wrap: anywhere; text-align: right; }
  .attendee-workspace[data-mobile-layout="list"] td[data-column]::before { content: attr(data-mobile-label); flex: 0 0 34%; color: var(--color-muted-foreground); font-size: 12px; text-align: left; }
  .attendee-workspace[data-mobile-layout="list"] td[data-column="name"] { font-size: 17px; }
  .attendee-workspace[data-mobile-layout="list"] td[data-column="name"]::before { display: none; }
  .attendee-workspace tr[hidden] { display: none !important; }
}

.attendee-checkin { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 130px; }
.attendee-checkin-button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-card); color: var(--color-foreground); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.attendee-checkin-button:hover { background: var(--color-muted); }
.attendee-checkin-button:disabled { opacity: .5; cursor: wait; }
.attendee-checkin-history { font-size: 12px; text-align: left; }
.attendee-checkin-history summary { min-height: 24px; cursor: pointer; }
.attendee-checkin-history ul { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.attendee-checkin-history li strong, .attendee-checkin-history li span { display: block; }
.attendee-checkin-history li span { max-width: 240px; margin-top: 2px; color: var(--color-muted-foreground); font-size: 11px; }
@media (max-width: 639px) {
  .attendee-workspace[data-mobile-layout="list"] .attendee-checkin { align-items: flex-end; min-width: 0; }
  .attendee-workspace[data-mobile-layout="list"] .attendee-checkin-history { text-align: right; }
}

.mobile-event-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-card); }
.mobile-event-card:hover { background: var(--color-muted); }
.mobile-event-card-main { flex: 1; min-width: 0; }
.mobile-event-card-main::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.mobile-event-card-main:focus-visible { outline: none; }
.mobile-event-card-main:focus-visible::after { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.mobile-event-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mobile-event-card h2 { font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.mobile-event-card p { margin-top: 6px; color: var(--color-muted-foreground); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.mobile-event-scan { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 64px; min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--color-accent); color: var(--color-accent-foreground); font-size: 14px; font-weight: 500; }
.mobile-event-scan:hover { opacity: .9; }
