:root {
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background: #eef2f7;
  color: #172033;
  --pt-navy: #162836;
  --pt-blue: #255f8f;
  --pt-blue-deep: #183f63;
  --pt-blue-soft: #eaf2f8;
  --pt-blue-border: #bdd2e3;
  --pt-indigo: #616bd1;
  --pt-indigo-soft: #eef0ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgb(37 95 143 / 0.18), transparent 30%),
    radial-gradient(circle at top right, rgb(97 107 209 / 0.10), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f7 42%, #e2e8f0 100%);
}

body.auth-loading #mainLayout,
body.auth-loading #reportsScreen,
body.auth-loading #selfCheckInScreen {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

header {
  background: linear-gradient(135deg, var(--pt-navy) 0%, var(--pt-blue-deep) 54%, var(--pt-blue) 100%);
  border-bottom: 1px solid rgb(189 210 227 / 0.72);
  padding: 18px 28px;
  color: #ffffff;
  box-shadow: 0 18px 45px rgb(22 40 54 / 0.22);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover .brand-logo,
.brand-link:focus-visible .brand-logo {
  box-shadow: 0 0 0 3px rgb(47 128 237 / 0.18);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--pt-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-logo {
  width: 56px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  display: block;
}

header .muted {
  color: #d9e8f4;
}

header .pill {
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
  color: #ffffff;
}

header button.secondary {
  background: #ffffff;
  color: var(--pt-blue-deep);
  border-color: #ffffff;
}

.settings-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-button svg {
  width: 18px;
  height: 18px;
}

.menu-wrapper {
  position: relative;
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 180px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgb(15 23 42 / 0.18);
  z-index: 30;
}

.menu-dropdown.open {
  display: grid;
  gap: 6px;
}

.menu-dropdown button {
  width: 100%;
  background: #ffffff;
  border-color: transparent;
  color: #334155;
  text-align: left;
}

.menu-dropdown button:hover {
  background: var(--pt-blue-soft);
  border-color: var(--pt-blue-border);
  color: var(--pt-blue-deep);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

p {
  color: #64748b;
  line-height: 1.45;
}

main {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr) minmax(320px, 0.85fr);
  gap: 18px;
  padding: 20px 28px 28px;
  align-items: start;
}

main.queue-hidden {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr);
}

main.scan-go-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr);
}

main.camera-disabled-layout {
  grid-template-columns: minmax(320px, 0.85fr) minmax(520px, 1.35fr);
  align-items: stretch;
}

main.camera-disabled-layout #leftColumn,
main.camera-disabled-layout #centerColumn {
  min-height: calc(100dvh - 132px);
}

main.camera-disabled-layout #leftColumn {
  grid-template-rows: auto auto;
  align-content: start;
}

main.camera-disabled-layout #scanQueuePanel {
  min-height: 0;
}

main.camera-disabled-layout #scanQueuePanel .queue {
  max-height: none;
}

main.camera-disabled-layout #waitlistPanel {
  align-self: start;
}

main.camera-disabled-layout #waitlistList {
  max-height: 320px;
  overflow-y: auto;
}

main.scan-go-camera-disabled-layout {
  grid-template-columns: minmax(360px, 760px);
  justify-content: center;
  align-content: start;
}

main.scan-go-camera-disabled-layout #centerColumn {
  width: min(760px, 100%);
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.06);
}

.panel.dark {
  background: linear-gradient(180deg, var(--pt-navy) 0%, var(--pt-blue-deep) 100%);
  color: #f8fafc;
  border-color: var(--pt-blue);
}

.account-screen {
  padding: 24px 28px 32px;
}

.account-screen[hidden] {
  pointer-events: none;
}

.account-shell {
  display: grid;
  gap: 22px;
  width: min(100%, 980px);
  max-width: 980px;
  margin: 0 auto;
  min-height: 620px;
  padding: 42px 46px 68px;
  border: 1px solid rgb(37 95 143 / 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgb(37 95 143 / 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgb(97 107 209 / 0.16), transparent 38%),
    linear-gradient(145deg, rgb(255 255 255 / 0.96), rgb(231 239 249 / 0.84));
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.12);
}

.account-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  background:
    radial-gradient(circle at top right, rgb(97 107 209 / 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgb(37 95 143 / 0.10), transparent 36%),
    #ffffff;
}

.account-hero h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  color: #0f172a;
}

.account-hero-actions {
  display: flex;
  justify-content: flex-end;
}

.account-status-card {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--pt-blue-border);
  border-radius: 16px;
  background: var(--pt-blue-soft);
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-grid form {
  min-width: 0;
}

.account-grid > .panel,
.account-grid > form {
  width: min(100%, 620px);
  justify-self: center;
}

#firstLoginTrainingPanel {
  width: min(100%, 980px);
}

.account-welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.welcome-slideshow {
  display: grid;
  gap: 12px;
}

.welcome-slide-frame {
  display: grid;
  place-items: center;
  min-height: clamp(320px, 54vw, 560px);
  overflow: hidden;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  background: #f8fafc;
}

.welcome-slide-content {
  display: grid;
  gap: 0;
  justify-items: center;
  width: 100%;
  padding: 16px;
  text-align: center;
}

.welcome-slide-content img {
  width: 100%;
  max-width: 920px;
  max-height: clamp(300px, 50vw, 520px);
  object-fit: contain;
  border-radius: 12px;
}

.welcome-slide-copy {
  max-width: 560px;
}

.welcome-slide-copy h3 {
  margin: 0 0 10px;
  color: var(--pt-blue);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.welcome-slide-copy p {
  margin: 0;
  color: var(--pt-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.welcome-slide-placeholder {
  max-width: 360px;
  padding: 24px;
  text-align: center;
  color: #64748b;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.tenant-access-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  background: #f8fafc;
}

.setup-progress-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--pt-blue-border);
  border-radius: 16px;
  background: var(--pt-blue-soft);
}

.setup-progress-panel progress {
  width: 100%;
  height: 14px;
  accent-color: var(--pt-indigo);
}

.setup-progress-panel p {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
select,
button {
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font: inherit;
  padding: 11px 12px;
}

input,
select {
  background: #ffffff;
  color: #172033;
  min-width: 0;
}

button {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

button.secondary {
  background: #ffffff;
  color: var(--pt-blue-deep);
  border-color: var(--pt-blue-border);
}

button.success {
  background: #616bd1;
  border-color: #616bd1;
}

button.warning {
  background: #b45309;
  border-color: #b45309;
}

button.danger {
  background: #991b1b;
  border-color: #991b1b;
}

button.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

button.icon-button svg {
  width: 20px;
  height: 20px;
}

button.compact-button {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

video {
  width: 100%;
  height: 310px;
  object-fit: cover;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 16px;
}

.scan-hero {
  display: grid;
  gap: 14px;
  text-align: center;
}

.scan-status {
  border-radius: 16px;
  background: rgb(22 40 54 / 0.52);
  border: 1px solid rgb(189 210 227 / 0.35);
  padding: 16px;
}

.scan-status strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.muted {
  color: #64748b;
  font-size: 13px;
}

.dark .muted {
  color: #94a3b8;
}

.profile-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
}

.avatar {
  width: 96px;
  height: 120px;
  border-radius: 18px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 34px;
  font-weight: 800;
  overflow: hidden;
}

.avatar-button {
  padding: 0;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: pointer;
}

.avatar-button:hover {
  border-color: var(--pt-blue-border);
  box-shadow: 0 8px 20px rgb(37 95 143 / 0.16);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 26px;
  font-weight: 850;
  margin-bottom: 6px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-message {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 8px;
}

.profile-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.profile-alert {
  border-radius: 999px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill.active,
.pill.completed {
  background: #dcfce7;
  color: #166534;
}

.pill.warning,
.pill.needs-review {
  background: #fef3c7;
  color: #92400e;
}

.pill.failed {
  background: #fee2e2;
  color: #991b1b;
}

.pill.processing,
.pill.received {
  background: var(--pt-indigo-soft);
  color: #3942a3;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.visit-reason-grid label,
.visit-reason-grid select {
  width: 100%;
}

.visit-reason-grid #custom1Select,
.visit-reason-grid #custom2Select {
  font-size: 15px;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-actions button {
  width: 100%;
}

.violation-entry-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
}

.violation-entry-row select,
.violation-entry-row input {
  width: 100%;
}

.customization-list {
  display: grid;
  gap: 8px;
}

.customization-header-panel {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.customization-header-panel h3,
.settings-card h3 {
  margin-bottom: 0;
  font-size: 13px;
  color: #334155;
}

.customization-header-panel .form-grid {
  gap: 10px;
}

.customization-header-panel label {
  gap: 4px;
  font-size: 12px;
}

.customization-header-panel input {
  min-height: 34px;
  padding: 7px 10px;
}

.customization-panel {
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.customization-panel h3 {
  margin-bottom: 0;
  font-size: 13px;
  color: #334155;
}

.settings-card {
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.settings-card .form-grid {
  gap: 10px;
}

.customization-list .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customization-list.compact {
  gap: 5px;
}

.customization-list.compact .item {
  min-height: 0;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: #ffffff;
  border-color: #e2e8f0;
}

.customization-list.compact .item button {
  padding: 3px 7px;
  font-size: 11px;
}

.customization-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.customization-add-row input,
.customization-add-row button {
  min-height: 30px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.customization-add-row button.secondary {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  color: #ffffff;
}

.customization-add-row button.secondary:hover {
  background: var(--pt-blue-deep);
  border-color: var(--pt-blue-deep);
}

.customization-list-grid {
  margin-top: 14px;
  gap: 10px;
}

.item.selectable {
  cursor: pointer;
}

.item.selectable:hover {
  border-color: var(--pt-blue-border);
  box-shadow: 0 8px 22px rgb(37 95 143 / 0.12);
}

.member-tabs {
  border: 1px solid #d9e1ec;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
}

.member-tab-list {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #d9e1ec;
  background: var(--pt-blue-soft);
  flex-wrap: wrap;
}

.member-tab {
  background: transparent;
  border-color: transparent;
  color: #334155;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.member-tab.active {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  color: #ffffff;
}

.member-tab-panel {
  display: none;
  padding: 12px;
}

.member-tab-panel.active {
  display: grid;
  gap: 10px;
}

.mobile-tabs-toggle {
  display: none;
}

.family-list {
  display: grid;
  gap: 10px;
}

#violationsList {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

#passesList {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

#familyList,
#eventsList {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.family-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.waitlist-panel {
  display: grid;
  gap: 10px;
}

.waitlist-panel[hidden] {
  display: none !important;
}

.family-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  padding: 10px;
}

.waitlist-card {
  grid-template-columns: 54px 1fr;
  cursor: pointer;
}

.waitlist-item {
  padding: 9px 10px;
}

.waitlist-item strong {
  margin-bottom: 2px;
}

.waitlist-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0;
  justify-content: flex-end;
}

.family-photo {
  width: 54px;
  height: 68px;
  border-radius: 12px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 900;
  overflow: hidden;
}

.family-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-panel {
  display: block;
  padding: 10px 12px;
  align-self: start;
}

.search-panel h2 {
  margin-bottom: 8px;
}

.search-panel .row {
  gap: 8px;
}

.search-panel input,
.search-panel button {
  padding: 7px 10px;
}

.search-panel .results:empty,
.search-panel #licenseScanMessage:empty {
  display: none;
}

.search-panel .results:not(:empty) {
  margin-top: 4px;
}

.activity-panel {
  padding-top: 10px;
}

.activity-panel h2 {
  margin-bottom: 8px;
}

.self-screen {
  padding: 32px;
  display: grid;
  gap: 20px;
  max-width: 980px;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 150px);
  align-content: center;
}

.self-menu-panel {
  min-height: 460px;
  justify-content: center;
  gap: 36px;
}

.self-title {
  text-align: center;
}

.self-title h2 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 8px;
}

.self-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.self-option {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  font-size: 22px;
}

.self-option svg {
  width: 72px;
  height: 72px;
}

.self-scan-panel {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.self-scan-panel .scan-hero,
.self-scan-panel .search-panel {
  margin: 0;
}

.ai-help-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 12px 28px rgb(15 23 42 / 0.2);
  z-index: 30;
}

.ai-help-button svg {
  width: 24px;
  height: 24px;
}

.ai-help-button.has-notification::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #ffffff;
}

.help-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 80px;
  width: min(340px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 120px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgb(15 23 42 / 0.22);
  padding: 14px;
  overflow: hidden;
  z-index: 31;
}

.help-chat-panel[hidden] {
  display: none;
}

.help-chat-title {
  color: #64748b;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.help-chat-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.help-chat-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
  min-height: 0;
  overscroll-behavior: contain;
}

.help-chat-message {
  justify-self: start;
  max-width: 92%;
  min-width: 0;
  background: var(--pt-blue-soft);
  border: 1px solid var(--pt-blue-border);
  border-radius: 14px 14px 14px 4px;
  color: var(--pt-blue-deep);
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.help-chat-message a {
  overflow-wrap: anywhere;
}

.help-chat-message.user {
  justify-self: end;
  background: #f8fafc;
  border-color: #e2e8f0;
  border-radius: 14px 14px 4px 14px;
  color: #0f172a;
}

.help-chat-input {
  min-height: 42px;
  max-height: 100px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  font-size: 14px;
  line-height: 1.35;
  background: #fbfdff;
}

.help-chat-input:focus {
  border-color: var(--pt-indigo);
  box-shadow: 0 0 0 3px rgb(97 107 209 / 0.20);
  outline: none;
}

.import-panel {
  display: grid;
  gap: 12px;
}

.import-panel h3 {
  margin-bottom: 0;
}

.import-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.import-picker-label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.import-file-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
}

.import-file-control input {
  border: 0;
  box-shadow: none;
  padding: 6px 8px;
  min-width: 0;
  font-size: 13px;
  background: transparent;
}

.import-file-control button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.import-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.import-actions button {
  min-height: 36px;
  font-size: 13px;
  font-weight: 900;
}

.import-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.import-preview {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: auto;
  max-height: 260px;
  background: #ffffff;
}

.import-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.import-preview th,
.import-preview td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.import-preview th {
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
  position: sticky;
  top: 0;
}

.import-status-card {
  border-left: 4px solid var(--pt-blue);
}

#cameraSupport,
#scannerDiagnostics {
  display: none;
}

.detail {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.detail .label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail .value {
  color: #172033;
  font-weight: 750;
  margin-top: 4px;
  min-height: 20px;
}

.detail input {
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 10px;
}

.badge-designer {
  display: grid;
  grid-template-columns: minmax(190px, 240px) 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}

.badge-preview {
  position: relative;
  width: 180px;
  height: 320px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 10px 25px rgb(15 23 42 / 0.14);
  overflow: hidden;
  user-select: none;
}

.badge-preview-helper {
  text-align: center;
  margin-top: 8px;
}

.badge-preview.landscape {
  width: 240px;
  height: 135px;
}

.badge-preview-element {
  position: absolute;
  left: 50%;
  width: 86%;
  transform: translateX(-50%);
  text-align: center;
  color: #0f172a;
}

.badge-preview-classification {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #0f172a;
  padding-bottom: 4px;
}

.badge-preview-logo {
  position: absolute;
  top: 4%;
  left: 72%;
  width: 24%;
  max-height: 18%;
  object-fit: contain;
  z-index: 1;
}

.badge-draggable {
  cursor: grab;
  touch-action: none;
}

.badge-draggable:active {
  cursor: grabbing;
}

.badge-preview-photo {
  left: 50%;
  aspect-ratio: 1;
  border: 1px solid #0f172a;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #64748b;
  overflow: hidden;
}

.badge-preview-name {
  font-size: 26px;
  font-weight: 900;
}

.badge-preview-extra {
  font-size: 12px;
  font-weight: 750;
  color: #334155;
}

.badge-preview-barcode {
  left: 50%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    90deg,
    #0f172a 0,
    #0f172a 2px,
    transparent 2px,
    transparent 4px,
    #0f172a 4px,
    #0f172a 7px,
    transparent 7px,
    transparent 10px
  );
  border: 0;
}

.badge-preview-barcode.qr-preview {
  aspect-ratio: 1;
  background:
    repeating-conic-gradient(#0f172a 0 25%, transparent 0 50%) 0 0 / 16% 16%,
    #ffffff;
  border: 4px solid #ffffff;
  box-shadow: inset 0 0 0 2px #0f172a, 0 4px 10px rgb(15 23 42 / 0.18);
  height: auto !important;
  min-height: 0;
}

.badge-preview-barcode.qr-preview::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 8%;
  width: 22%;
  aspect-ratio: 1;
  background: #0f172a;
  box-shadow: 280% 0 0 #0f172a, 0 280% 0 #0f172a;
}

.badge-preview-barcode-value {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  font-size: 10px;
  margin-top: 2px;
}

.designer-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.badge-color-input {
  width: 42px !important;
  height: 42px;
  min-height: 42px;
  padding: 2px;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.badge-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.badge-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.badge-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.results,
.queue {
  display: grid;
  gap: 9px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.results {
  max-height: 260px;
}

.queue {
  max-height: calc(100vh - 250px);
}

.reports-screen {
  display: grid;
  gap: 16px;
  padding: 20px 28px 28px;
}

.reports-screen[hidden] {
  display: none;
}

.reports-top {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.reports-dashboard-panel {
  align-content: start;
}

.reports-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 280px;
}

.reports-filter-grid button {
  width: fit-content;
  min-width: 160px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-metric {
  display: grid;
  gap: 10px;
  min-height: 148px;
  overflow: hidden;
  position: relative;
}

.report-metric::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(37 95 143 / 0.18), rgb(22 163 74 / 0.12));
}

.report-metric strong {
  align-self: end;
  font-size: clamp(48px, 7vw, 78px);
  line-height: 0.95;
  color: #0f172a;
  letter-spacing: -0.06em;
  position: relative;
  z-index: 1;
}

.report-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.bar-chart {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.bar-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.12);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #475569, #1e293b);
}

.monthly-bars {
  display: grid;
  gap: 12px;
}

.monthly-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.monthly-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.monthly-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--legend-color);
}

.monthly-row {
  display: grid;
  gap: 6px;
}

.monthly-axis-chart {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: stretch;
}

.monthly-y-axis {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  color: #64748b;
  font-size: 11px;
  text-align: right;
  padding-top: 2px;
}

.monthly-chart-area {
  display: grid;
  gap: 10px;
}

.monthly-bar-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 120px;
  padding: 8px 8px 0;
  border-left: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  background:
    linear-gradient(to top, #e2e8f0 1px, transparent 1px) 0 0 / 100% 25%,
    #ffffff;
}

.monthly-bar {
  align-self: end;
  min-height: 3px;
  border-radius: 8px 8px 0 0;
}

.monthly-bar.enrollments {
  background: #16a34a;
}

.monthly-bar.visits {
  background: var(--pt-blue);
}

.monthly-bar.violations {
  background: #dc2626;
}

.report-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.report-preview {
  overflow: hidden;
}

.report-loading-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  text-align: center;
  border: 1px solid #dbe7f4;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.report-loading-spinner {
  width: 58px;
  height: 58px;
  border: 6px solid #dbeafe;
  border-top-color: var(--pt-blue);
  border-radius: 50%;
  animation: report-spin 0.8s linear infinite;
}

@keyframes report-spin {
  to {
    transform: rotate(360deg);
  }
}

.report-preview-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-table tr:last-child td {
  border-bottom: 0;
}

.report-options button.active {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  color: #ffffff;
}

.item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 11px;
  background: #f8fafc;
  cursor: default;
}

.item.selectable {
  cursor: pointer;
}

.item.selectable:hover {
  border-color: var(--pt-blue-border);
  background: var(--pt-blue-soft);
}

.item.activity-attention {
  background: #fee2e2;
  border-color: #fecaca;
}

.item.activity-attention.selectable:hover {
  background: #fecaca;
  border-color: #fca5a5;
}

.item.violation-history {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.item strong {
  display: block;
  margin-bottom: 4px;
}

.queue-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
}

.queue-photo {
  width: 52px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 850;
  overflow: hidden;
}

.queue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-photo.initials {
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.actions.profile-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: stretch;
  width: 100%;
  margin-bottom: 10px;
}

.actions.profile-actions button {
  width: 100%;
}

.mode-card {
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
}

.empty-profile {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, 0.58);
  padding: 18px;
  z-index: 20;
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(760px, 100%);
  max-height: min(780px, 94vh);
  overflow: auto;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #d9e1ec;
  padding: 20px;
}

.app-dialog-backdrop {
  z-index: 60;
}

.app-dialog {
  width: min(460px, 100%);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 70px rgb(15 23 42 / 0.28);
}

.app-dialog-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pt-navy), var(--pt-blue));
}

.app-dialog-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  display: block;
}

.app-dialog-kicker {
  color: #d9e8f4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-dialog h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.app-dialog p {
  margin: 0;
  padding: 18px 20px 0;
  color: #334155;
}

.app-dialog-field {
  padding: 14px 20px 0;
}

.app-dialog-field input,
.app-dialog-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 11px 12px;
  color: #172033;
  background: #f8fafc;
  font: inherit;
}

.app-dialog-field textarea {
  min-height: 120px;
  resize: vertical;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 20px 20px;
}

#settingsModal .modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  width: min(980px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
}

#settingsModal .modal > .spread {
  align-items: flex-start;
}

.settings-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.settings-tab {
  background: #f8fafc;
  border-color: #d9e1ec;
  color: #334155;
  text-align: left;
  width: 100%;
}

.settings-tab.active {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  color: #ffffff;
}

.settings-nav-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 6px 4px 2px;
  text-transform: uppercase;
}

.settings-screen {
  display: none;
  min-width: 0;
  overflow: auto;
  max-height: calc(100dvh - 170px);
  padding-right: 4px;
  overscroll-behavior: contain;
}

.settings-screen.active {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-screen label,
.badge-designer,
.designer-controls {
  min-width: 0;
}

.settings-screen label {
  gap: 4px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.settings-screen h3 {
  color: #334155;
  font-size: 15px;
  margin-bottom: 4px;
}

.settings-screen p {
  font-size: 13px;
  margin-bottom: 0;
}

.designer-controls input[type="range"],
#settingsModal input,
#settingsModal select {
  width: 100%;
}

.designer-controls input[type="range"] {
  accent-color: var(--pt-blue);
  --range-progress: 50%;
  --range-track: #d9e1ec;
  cursor: pointer;
}

.designer-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--pt-blue) 0%,
    var(--pt-blue) var(--range-progress),
    var(--range-track) var(--range-progress),
    var(--range-track) 100%
  );
}

.designer-controls input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--pt-blue);
  box-shadow: 0 3px 10px rgb(22 40 54 / 0.22);
}

.designer-controls input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--range-track);
}

.designer-controls input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--pt-blue);
}

.designer-controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--pt-blue);
  box-shadow: 0 3px 10px rgb(22 40 54 / 0.22);
}

#settingsModal input,
#settingsModal select {
  min-height: 34px;
  padding: 7px 10px;
}

.masked-text-input {
  -webkit-text-security: disc;
  text-security: disc;
}

@media (max-width: 1180px) {
  main {
    grid-template-columns: 1fr 1fr;
  }

  .right-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  main {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  main.queue-hidden {
    grid-template-columns: 1fr;
  }

  main.camera-disabled-layout,
  main.scan-go-camera-disabled-layout {
    grid-template-columns: 1fr;
  }

  .reports-top,
  .report-summary-grid,
  .report-charts,
  .report-options,
  .report-preview-filters,
  .account-hero,
  .account-grid,
  .account-welcome-grid,
  .import-picker-grid {
    grid-template-columns: 1fr;
  }

  .reports-filter-grid {
    max-width: none;
  }

  header {
    padding: 16px;
  }

  .profile-card,
  .details-grid,
  .actions,
  .self-options {
    grid-template-columns: 1fr;
  }

  #settingsModal .modal {
    width: min(720px, calc(100vw - 24px));
    padding: 16px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .settings-tab {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    white-space: nowrap;
    text-align: center;
  }

  .settings-nav-label {
    display: none;
  }

  .settings-tab[data-settings-screen="badgeDesignSettings"],
  .settings-tab[data-settings-screen="importExportSettings"],
  #badgeDesignSettings,
  #importExportSettings {
    display: none !important;
  }

  .settings-screen {
    max-height: calc(100dvh - 230px);
  }

  .badge-designer {
    grid-template-columns: minmax(170px, 220px) 1fr;
  }
}

@media (max-width: 640px) {
  body {
    background: #eef2f7;
  }

  .app-shell {
    min-height: 100vh;
  }

  header {
    padding: 10px 12px;
  }

  .account-screen {
    padding: 12px;
  }

  .account-shell {
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
  }

  .topbar {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-logo {
    width: 42px;
    height: 32px;
    border-radius: 8px;
    padding: 3px;
  }

  h1 {
    font-size: 18px;
    margin-bottom: 0;
  }

  header .brand .muted {
    display: none;
  }

  header .row {
    gap: 8px;
    margin-left: auto;
  }

  #stationSummary {
    display: none;
  }

  .settings-button {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }

  .settings-button span {
    display: none;
  }

  main,
  main.queue-hidden,
  main.scan-go-layout,
  main.camera-disabled-layout {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px;
  }

  main.camera-disabled-layout #leftColumn,
  main.camera-disabled-layout #centerColumn {
    min-height: 0;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .stack {
    gap: 8px;
  }

  #scanQueuePanel,
  .ai-help-button {
    display: none !important;
  }

  .search-panel {
    padding: 10px;
  }

  .search-panel h2,
  .scan-status,
  .scan-hero video,
  #stopCamera,
  #cameraTakePhotoButton {
    display: none;
  }

  .scan-hero {
    padding: 8px;
    box-shadow: none;
  }

  #startCamera {
    width: 100%;
    min-height: 48px;
    font-size: 17px;
  }

  body.mobile-camera-active {
    overflow: hidden;
  }

  body.mobile-camera-active #cameraPanel {
    position: fixed;
    inset: 0;
    z-index: 100;
    border-radius: 0;
    border: 0;
    padding: 0;
    display: grid;
    background: #000000;
  }

  body.mobile-camera-active #cameraPanel video {
    display: block;
    width: 100%;
    height: 100dvh;
    object-fit: cover;
  }

  body.mobile-camera-active #cameraPanel .row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    justify-content: center !important;
    padding: 0 14px;
    z-index: 101;
  }

  body.mobile-camera-active #startCamera {
    display: none;
  }

  body.mobile-camera-active #stopCamera {
    display: inline-flex;
    justify-content: center;
    width: min(260px, calc(100vw - 28px));
    background: rgb(255 255 255 / 0.92);
    color: var(--pt-blue-deep);
    border-color: #ffffff;
  }

  .profile-card,
  .details-grid,
  .visit-reason-grid,
  .actions.profile-actions,
  .form-grid,
  .self-options {
    grid-template-columns: 1fr;
  }

  .actions.profile-actions {
    margin-bottom: 0;
  }

  .profile-card {
    gap: 10px;
    padding: 10px;
  }

  .avatar {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }

  .profile-name {
    font-size: 22px;
  }

  .profile-meta,
  .member-tab-list {
    gap: 5px;
  }

  .member-tab {
    padding: 6px 8px;
    font-size: 12px;
  }

  .member-tab-panel {
    padding: 8px;
  }

  .mobile-tabs-toggle {
    display: block;
    width: 100%;
    margin-top: -2px;
    margin-bottom: 4px;
  }

  .member-tabs.mobile-tabs-collapsed {
    display: none;
  }

  .item,
  .detail,
  .family-card,
  .queue-item {
    padding: 8px;
  }

  .family-list {
    gap: 7px;
  }

  #violationsList,
  #passesList,
  #eventsList,
  #familyList {
    max-height: 240px;
  }

  button {
    min-height: 44px;
  }

  .self-screen {
    padding: 12px;
    width: 100%;
    min-height: calc(100vh - 72px);
  }

  .self-menu-panel {
    min-height: 0;
    gap: 18px;
  }

  .self-title h2 {
    font-size: 34px;
  }

  .self-option {
    min-height: 130px;
  }

  #settingsModal.modal-backdrop {
    padding: 0;
    place-items: stretch;
  }

  #settingsModal .modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    padding: 14px;
  }

  #settingsModal .modal > .spread {
    align-items: flex-start;
    gap: 10px;
  }

  #settingsModal h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  #settingsModal .modal > .spread p {
    font-size: 13px;
    margin-bottom: 0;
  }

  #settingsModal #closeSettingsButton {
    width: auto;
    min-height: 40px;
    padding: 9px 12px;
  }

  .settings-layout {
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .settings-nav {
    margin: 0 -4px;
    padding: 0 4px 8px;
  }

  .settings-tab {
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 999px;
    font-size: 13px;
  }

  .settings-screen {
    max-height: none;
    padding-right: 0;
  }

  .settings-screen.active {
    gap: 10px;
    min-height: 0;
    padding-bottom: 22px;
  }

  .settings-screen h3 {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .settings-screen p {
    font-size: 13px;
    margin-bottom: 0;
  }

  .badge-designer {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .badge-preview {
    width: min(150px, 54vw);
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .designer-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
