* { box-sizing: border-box; }

:root {
  --navy: #0d1b2a;
  --navy-card: #1b2a44;
  --navy-border: #243352;
  --navy-light: #2a3f5f;
  --orange: #F26522;
  --orange-hover: #ff7a3a;
  --orange-dim: #d4551a;
  --text: #e8eaf2;
  --text-muted: #9aa0bb;
  --plate-yellow: #ffd861;
  --link: #7aa2ff;
  --success: #8dd9a8;
  --warning: #ffd861;
  --error: #ff9d9d;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.appHeader {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 106px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--navy-border);
}
header:not(.appHeader) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--navy-border);
}

h1 {
  font-size: 1.2rem;
  margin: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand:focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.brandMark {
  width: 78px;
  height: 78px;
  border-radius: 16px;
}
.appNav a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.appNav {
  position: fixed;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 7px max(12px, env(safe-area-inset-right, 0px))
    calc(7px + env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--navy-border);
  background: rgba(13, 27, 42, 0.96);
  box-shadow: 0 -12px 30px rgba(4, 6, 15, 0.28);
  backdrop-filter: blur(16px);
}
.appNav a {
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
}
.appNav a:hover {
  background: var(--navy-card);
  color: var(--text);
  text-decoration: none;
}
.appNav a[aria-current="page"] { color: var(--orange); }
.appNav svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appNav .reportNavIcon { width: 29px; }
.appNav .reportNavIcon .reportPlus { stroke: var(--orange); }

main a { color: var(--link); text-decoration: none; }
main a:hover { text-decoration: underline; }
nav:not(.appNav) a { color: var(--link); text-decoration: none; }
nav:not(.appNav) a:hover { text-decoration: underline; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px;
}

.siteFooter {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 18px 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.siteFooter a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.siteFooter a:hover { color: var(--text); }

/* home */
.home {
  display: grid;
  padding-top: 24px;
  padding-bottom: 72px;
}
.welcome {
  padding: 0 clamp(24px, 7vw, 48px);
}
.welcome h2 {
  margin: 0 0 22px;
  font-size: clamp(1.8rem, 7vw, 2.7rem);
  line-height: 1.05;
}
.welcome p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.welcome strong { color: #f2f3f8; }
.heroPreviewLink {
  text-decoration: none;
  border: none;
}
.heroPreview {
  display: block;
  max-width: 70%;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 20px;
}
.welcome .plainStatement {
  color: var(--orange);
  font-weight: 700;
}

.infoDialog {
  background: var(--navy-card);
  color: var(--text);
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.infoDialog::backdrop {
  background: rgba(5, 6, 12, 0.84);
  backdrop-filter: blur(4px);
}
.infoDialog p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.infoDialog p:last-of-type {
  margin-bottom: 24px;
}
.infoDialog a { color: var(--link); text-decoration: none; }
.infoDialog a:hover { text-decoration: underline; }
.infoDialog button.compact {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
}

.reportButton {
  display: flex;
  width: 100%;
  margin-top: 28px;
  padding: 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.reportButton svg,
button.big svg {
  width: 27px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reportButton:hover {
  background: var(--orange-hover);
  text-decoration: none;
}
.reportButton:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* install banner */
.installBanner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  background: var(--navy-light);
  color: var(--text-muted);
  font-size: 0.92rem;
  cursor: pointer;
}
.installBanner:hover { border-color: var(--orange); }
.installBanner .installIcon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* floating variant used by the list/map engagement nudge (install-prompt.js) */
.installBannerFloat {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 75;
  width: max-content;
  max-width: min(92vw, 440px);
  margin-top: 0;
  margin-bottom: 0;
  background: var(--navy-card);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  animation: ctaSlideIn 0.4s ease-out;
}
/* stack below the floating "Get started" CTA when both are on screen */
.installBannerFloat.belowCta {
  top: calc(64px + env(safe-area-inset-top, 0px));
}
.installBannerFloat.hidden { display: none; }
.installNudgeClose {
  flex-shrink: 0;
  margin-left: 4px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.installNudgeClose:hover { color: var(--text); }

/* floating get-started CTA for new visitors */
.ctaBanner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  background: var(--orange);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
  animation: ctaSlideIn 0.4s ease-out;
}
.ctaBanner::before {
  content: "→";
  font-size: 1.1em;
}
.ctaBanner:hover {
  background: var(--orange-hover);
  text-decoration: none;
  transform: translateX(-50%) scale(1.04);
}
@keyframes ctaSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.termsOk .ctaBanner:not(.ctaReportAnother) { display: none; }
.ctaReportAnother { z-index: 200; }
.ctaReportAnother::before { content: none; }
.lightboxOpen .ctaBanner:not(.ctaReportAnother) { display: none; }
.termsOk #loginNudge { display: flex; }

/* homepage sections */
.homeSection {
  margin-top: 20px;
}
.homeSectionNote {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 12px;
}
.homeBenefits {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
#gsiButton,
#homeGsiButton {
  margin-bottom: 14px;
}
.homeInvite {
  margin-top: 32px;
  padding: clamp(24px, 7vw, 48px);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  background: var(--navy-card);
  box-shadow: 0 24px 70px rgba(4, 6, 15, 0.28);
  text-align: center;
}
.homeInvite h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}
.homeInvite p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.inviteQr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
  border-radius: 12px;
}
.inviteBtn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}
.inviteBtn:hover { opacity: 0.85; }
.inviteLinkRow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--navy-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.inviteUrl {
  font-size: 0.95rem;
  color: var(--text-muted);
  user-select: all;
}
.inviteCopyBtn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: var(--orange);
  transition: background 0.15s, color 0.15s;
}
.inviteCopyBtn svg { width: 18px; height: 18px; }
.inviteCopyBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--orange-hover);
}
.inviteCopied {
  margin-top: 10px;
  color: var(--success, #22c55e);
  font-size: 0.9rem;
}

.homeStory {
  margin-top: 32px;
  padding: clamp(24px, 7vw, 48px);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  background: var(--navy-card);
  box-shadow: 0 24px 70px rgba(4, 6, 15, 0.28);
}
.homeStory h3 {
  margin: 0 0 18px;
  font-size: 1.3rem;
}
.homeStory p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.homeStory .storyOptions {
  margin: -4px 0 16px;
  padding-left: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.homeStory p:last-child { margin-bottom: 0; }

/* iOS install modal */
.iosModal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  padding: 18px;
}
.iosModalContent {
  width: min(420px, 100%);
  padding: 28px 24px;
  border-radius: 20px 20px 0 0;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  text-align: center;
}
.iosModalContent h3 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}
.iosSteps {
  display: grid;
  gap: 16px;
  text-align: left;
  margin-bottom: 22px;
}
.iosStep {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.iosStep .stepNum {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.iosStep .stepText {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.iosStep .stepText strong { color: var(--text); }
.iosModalClose {
  padding: 12px 32px;
  border: none;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* terms acceptance — one inline checkbox */
.termsAgree {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy);
  cursor: pointer;
}
.termsAgree input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.termsAgree span {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.termsAgree a { color: var(--link); }
.termsAgree.nudge {
  border-color: var(--orange);
  animation: termsNudge 0.5s ease;
}
@keyframes termsNudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.reportButton.secondary {
  background: var(--navy);
  border: 1px solid var(--navy-border);
  color: var(--text);
}
.reportButton.secondary:hover {
  background: var(--navy-card);
}

/* desktop call-to-action: browse reports/map; reporting is mobile-only */
.desktopCtas {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.desktopCtas .reportButton { margin-top: 0; }
.desktopNote {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

/* first time terms are accepted, draw the eye to the nav Report tab */
@keyframes joinBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
body.joinBlink .appNav a[href="/submit"] {
  background: var(--navy-card);
  border: 1px solid var(--orange);
  animation: joinBlink 0.9s ease-in-out 5;
}

/* arrow from the terms checkbox down to the nav Report tab */
.navPointer {
  position: fixed;
  z-index: 26;
  left: 33%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  display: none;
  width: 33%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--orange);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
body.joinBlink .navPointer { display: flex; }
.navPointer svg {
  width: 30px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: pointerBounce 1s ease-in-out infinite;
}
@keyframes pointerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.big:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* legal / privacy page */
.legal {
  max-width: 720px;
  line-height: 1.65;
}
.legal h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 8px 0 6px;
}
.legal h3 {
  margin: 32px 0 10px;
  font-size: 1.15rem;
}
.legal p { margin: 0 0 14px; color: var(--text-muted); }
.legal ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.legal li { color: var(--text-muted); }
.legal a { color: var(--link); }
.legalMeta { font-size: 0.9rem; color: var(--text-muted); }
.legalBack { margin-top: 40px; font-weight: 600; }

/* loading bar */
.loadBarWrap { margin-bottom: 12px; }
.loadBarTrack {
  height: 4px;
  background: var(--navy-border);
  border-radius: 2px;
  overflow: hidden;
}
.loadBar {
  height: 100%;
  width: 0%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.lede { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--text-muted); }

.status { color: var(--text-muted); min-height: 1.2em; font-size: 0.92rem; }
.status:empty { display: none; }
/* One-shot flash when the poller brings in fresh reports — a single sweep back
   to the resting muted color, not a repeating blink. */
@keyframes countPulse {
  from { color: var(--orange); }
  to   { color: var(--text-muted); }
}
.status.countPulse { animation: countPulse 1.2s ease-out; }
/* Transient "+N" appended to the count line; fades in, then JS removes it. */
.newBadge {
  color: var(--orange);
  font-weight: 700;
  animation: newBadgeIn 0.3s ease-out;
}
@keyframes newBadgeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: none; }
}

.step { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

button.big {
  display: flex;
  font-size: 1.2rem;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: var(--orange);
  color: white;
  cursor: pointer;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
button.big:hover { background: var(--orange-hover); }
button.big:disabled { opacity: 0.6; }

button.compact {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--navy-light);
  border-radius: 10px;
  background: var(--navy-card);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
button.compact:disabled {
  cursor: wait;
  opacity: 0.6;
}
button.compact.danger {
  color: #ff6b6b;
  border-color: #ff6b6b44;
}

button.ghost {
  font-size: 1rem;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--navy-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
}

.frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  max-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame video { width: 100%; height: auto; }
.frame canvas { max-width: 100%; max-height: 38vh; width: auto; height: auto; }

.imageAndPlate {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platePreview {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.platePreview span {
  display: block;
  margin-bottom: 4px;
}
.platePreview canvas {
  display: block;
  width: 100%;
  max-height: 90px;
  object-fit: contain;
  border: 2px solid var(--plate-yellow);
  border-radius: 8px;
  background: #111;
}

.nativeCaptureInput {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* desktop upload dropzone */
.dropZone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 260px;
  padding: 32px 24px;
  margin-bottom: 16px;
  border: 3px dashed rgba(242, 101, 34, 0.5);
  border-radius: 16px;
  background: var(--navy-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropZone:hover { border-color: var(--orange); }
/* Mirrors :hover — the cursor holds a file, so there is no hover event to use. */
.dropZone.dragging {
  border-color: var(--orange);
  background: var(--navy-light);
}
.dropZone svg {
  width: 46px;
  height: 46px;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  /* The box is the drop target; letting the icon and labels raise their own
     dragenter/dragleave pairs makes the highlight strobe. */
  pointer-events: none;
}
.dropZone .dropZoneTitle,
.dropZone .dropZoneSub { pointer-events: none; }
.dropZoneTitle {
  font-size: 1.2rem;
  font-weight: 600;
}
.dropZoneSub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* drag & drop */
.dropOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 27, 42, 0.86);
  backdrop-filter: blur(3px);
  /* The overlay is pure feedback — the window-level drop handler does the work,
     so it must never swallow the drag events that keep it visible. */
  pointer-events: none;
}
.dropOverlay.active { display: flex; }

.dropOverlayCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 48px;
  max-width: 420px;
  border: 3px dashed var(--orange);
  border-radius: 18px;
  background: var(--navy-card);
}
.dropOverlayCard svg {
  width: 52px;
  height: 52px;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.dropOverlayCard p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}

/* full-screen live camera */
body.cameraOpen { overflow: hidden; }
body.cameraOpen #locationMap,
body.cameraOpen #mapHint { display: none !important; }
.cameraOverlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  overflow: hidden;
  touch-action: none;
}
.cameraOverlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}
#camOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.shutter {
  position: absolute;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.shutter:active { transform: translateX(-50%) scale(0.92); }
.camCancel {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.camStatus {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  max-width: 70vw;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.zoomChip {
  position: absolute;
  bottom: calc(124px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.85rem;
  pointer-events: none;
}

.landscapeWarning {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  text-align: center;
  padding: 24px;
}
.landscapeWarning svg {
  width: 56px;
  height: 56px;
  animation: rotateHint 2.5s ease-in-out infinite;
}
.landscapeWarning p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  max-width: 260px;
  line-height: 1.45;
}
@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  30%, 70% { transform: rotate(-90deg); }
}

/* review mode: hide chrome, image flush to top */
body.reviewMode .appHeader { display: none; }
body.reviewMode .appNav { display: none; }
body.reviewMode { padding-bottom: 0; }
body.reviewMode main { padding-top: 0; }

.discardBtn {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
body.reviewMode .discardBtn { display: flex; }
.discardBtn:hover { background: rgba(0, 0, 0, 0.75); }
.discardBtn svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

.discardDialog {
  background: var(--navy-card);
  color: var(--text);
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 85%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.discardDialog::backdrop {
  background: rgba(5, 6, 12, 0.84);
  backdrop-filter: blur(4px);
}
.discardDialog p {
  margin: 0 0 20px;
  line-height: 1.5;
  font-size: 1rem;
}
.discardDialog .discardActions {
  display: flex;
  gap: 10px;
}
.discardDialog .discardActions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.discardDialog .keepBtn {
  background: var(--orange);
  color: #fff;
}
.discardDialog .keepBtn:hover { background: var(--orange-hover); }
.discardDialog .confirmDiscardBtn {
  background: transparent;
  border: 1px solid var(--navy-light) !important;
  color: var(--text-muted);
}
.discardDialog .confirmDiscardBtn:hover {
  border-color: var(--error) !important;
  color: var(--error);
}

/* review step: compact row for plate input + buttons */
.plateRow {
  display: flex;
  align-items: center;
  gap: 8px;
}
#plateInput {
  flex: 1;
  min-width: 0;
  font-size: 1.4rem;
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--navy-light);
  background: var(--navy-card);
  color: var(--plate-yellow);
}

.actionBtn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  position: relative;
}
.actionBtn:disabled { opacity: 0.5; cursor: wait; }

.submitAction {
  background: var(--orange);
  color: #fff;
}
.submitAction:hover { background: var(--orange-hover); }
.submitAction svg { width: 22px; height: 22px; fill: #fff; }

.retakeAction {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  width: 88px;
  height: 88px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.retakeAction:hover { background: rgba(0, 0, 0, 0.75); }
.retakeAction svg { width: 44px; height: 44px; fill: currentColor; }

/* first-time tooltip bubble */
.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--navy-card);
  border: 1px solid var(--navy-light);
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
  animation: tooltipFade 3s ease forwards;
}
.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--navy-light);
}
.retakeAction .tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}
.retakeAction .tooltip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--navy-light);
}
@keyframes tooltipFade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

#reviewControls { display: flex; flex-direction: column; gap: 10px; }

.locationPanel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card);
}
.locationHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.locationHeader h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.locationHeader .status,
.addressForm .status {
  min-height: 0;
  margin: 0;
}
.locationPanel details {
  border-top: 1px solid var(--navy-border);
  padding-top: 10px;
}
.locationPanel summary {
  color: var(--link);
  cursor: pointer;
  font-size: 0.9rem;
}
.addressForm {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}
.addressForm label {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.addressRow {
  display: flex;
  gap: 8px;
}
#addressInput {
  min-width: 0;
  flex: 1 1 auto;
  padding: 9px 11px;
  border: 1px solid var(--navy-light);
  border-radius: 10px;
  background: var(--navy);
  color: var(--text);
  font: inherit;
}
/* location map crosshair pin */
.map-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.device-location-dot {
  background-color: #007aff;
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.status.success { color: var(--success); }
.status.warning { color: var(--warning); }
.status.error { color: var(--error); }
.status.warning a { color: inherit; text-decoration: underline; font-weight: 600; }

/* Collapsed by default: only someone reporting a location failure opens it. */
.geoDiag { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 8px; }
.geoDiag summary { cursor: pointer; }
.geoDiag pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* done step */
.doneActions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.doneActions button,
.doneActions a {
  flex: 1;
  min-width: 140px;
}
.shareBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--navy-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.shareBtn:hover { border-color: var(--orange); color: var(--text); text-decoration: none; }

/* Co-browse "Submit to 311" on the confirmation — a prominent full-width call
   to action, shown only for cities that can't auto-file (NYC/Chicago). */
.cobrowseBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: var(--orange);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
/* This action is opt-in: app.js reveals it only after the server says this
   report needs a separate co-browse flow. Without this author-level rule,
   display:flex above overrides the browser's built-in [hidden] styling and
   exposes the button for auto-filed cities such as Boston. */
.cobrowseBtn[hidden] { display: none; }
.cobrowseBtn:hover { background: var(--orange-hover); text-decoration: none; }

/* submission queue indicator */
.queueBadge {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--navy-card);
  border: 1px solid var(--orange);
  color: var(--text);
  font-size: 0.85rem;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 8px;
}
.queueBadge .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--navy-light);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
/* Failure state: let the (potentially long) reason wrap and read on a phone,
   so a user with no devtools can screenshot exactly why an upload won't go. */
.queueBadge.queueError {
  border-color: #ef4444;
  background: #3b0d0d;
  max-width: min(90vw, 420px);
  white-space: normal;
  word-break: break-word;
  align-items: flex-start;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* dashboard */
/* Gallery filter — a wrapping row of "Near me" + per-city chips, plus a
   clear button that appears once anything is selected. */
.galleryFilter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.galleryFilter.hidden { display: none; }
.filterChip {
  background: var(--navy-card);
  color: var(--text, #cdd7e2);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.filterChip:hover { background: rgba(255, 255, 255, 0.06); }
.filterChip.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.filterChipNear::before {
  content: "◎";
  margin-right: 5px;
}
.cityInput {
  background: var(--navy-card);
  color: var(--text, #cdd7e2);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  min-width: 150px;
  max-width: 220px;
}
.cityInput::placeholder { color: var(--text-muted, #8899aa); }
.cityInput:focus {
  outline: none;
  border-color: var(--orange);
}
.filterCount {
  font-size: 0.8rem;
  color: var(--text-muted, #8899aa);
  margin-left: 2px;
}
.filterClear {
  background: transparent;
  color: var(--text-muted, #8899aa);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filterClear:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.card {
  position: relative;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  overflow: hidden;
}
.cardSelect {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 2;
  accent-color: var(--orange);
}
.bulkActions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 8px 12px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: 10px;
}
.bulkActions label { color: var(--text-muted); font-size: 0.9rem; }
.bulkDelete {
  margin-left: auto;
  background: #a01818;
  color: #fff;
  border-color: #a01818;
}
.bulkDelete:disabled { opacity: 0.5; cursor: default; }
@keyframes cardNewPulse {
  from { box-shadow: 0 0 0 2px var(--orange); }
  to   { box-shadow: 0 0 0 0 transparent; }
}
.cardNew { animation: cardNewPulse 1.8s ease-out; }
.cardImageButton {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: zoom-in;
}
.cardImageButton:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}
.cardImageButton img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  /* The bollard loader shows until the photo paints over it. */
  background: #d9dad5 url(flexpost-loader.svg) center / 55% no-repeat;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.cardImageButton:hover img {
  transform: scale(1.02);
  opacity: 0.92;
}
.card .plate {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 8px 10px 2px;
}
.cardPlateCrop {
  padding: 8px 10px 0;
  background: #05090e;
}
.cardPlateCrop img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  display: block;
}
.lightboxPlateCrop {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  border-radius: 6px;
}
.trophiesGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
.trophyPlate {
  display: block;
  min-width: 112px;
  min-height: 56px;
  border-radius: 6px;
  background: linear-gradient(100deg, var(--navy-card) 40%, var(--navy-light) 50%, var(--navy-card) 60%);
  background-size: 200% 100%;
  animation: trophyShimmer 1.2s ease-in-out infinite;
}
.trophyPlate.loaded {
  min-width: 0;
  min-height: 0;
  background: none;
  animation: none;
}
@keyframes trophyShimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
/* Trophies collapse far later than the stamp collection: License plates are a
   bigger draw, so ~7 rows (56px plate + 4px gap) peek through before the
   chevron even becomes clickable, with the last row fading to hint at more. */
.trophiesGrid.trophiesCollapsed {
  max-height: 424px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}
.trophiesGrid img {
  display: block;
  height: 56px;
  border-radius: 6px;
  object-fit: contain;
  background: #05090e;
}

/* The stamp animation on the report-confirmed page — it lands large, spanning
   the full width of the confirmation, just above the footer's terms link.
   min-height reserves the space so the layout doesn't jump when it strikes. */
.stampSlot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 160px;
  margin: 16px auto 4px;
}
.stampSlot svg {
  width: 90%;
  height: auto;
}

/* Bicycle fireworks — a full-viewport, click-through shower of tiny bikes,
   mounted by fireworks.js when a report caught a person with a bike. It sits
   above the page but never intercepts taps, and removes itself when the SMIL
   timeline finishes. */
.fireworksOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.fireworksOverlay svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Report-confirmed reward. Wraps the caption, the stamp, and (on an award) the
   badges, all centered. The stampSlot keeps its own margin: 16px 0 above. */
.rewardSlot {
  text-align: center;
}
.rewardSlot .stampSlot,
.rewardSlot .docket {
  transition: opacity 0.34s ease, transform 0.34s ease;
}
/* The stamp and award slots set their own display, which beats the UA
   [hidden] { display: none } — so re-assert none here or a hidden slot keeps
   showing (and an empty award slot would reserve blank space on every report). */
.stampSlot[hidden],
.awardSlot[hidden] {
  display: none;
}
/* The stamp (and its docket) bowing out as an award takes their place. The
   docket keeps its resting tilt while it shrinks, or it would snap straight
   on the way out. */
.stampSlot.rewardOut {
  opacity: 0;
  transform: scale(0.82);
}
.docket.rewardOut {
  opacity: 0;
  transform: rotate(-1.4deg) scale(0.82);
}
/* The fresh-stamp announcement: a printed docket label rather than a caption,
   because the caption was too small to register as a reward. Paper chip, ruled
   in stamp ink, in the stamp's own stencil face. */
.docket {
  display: inline-block;
  margin: 4px auto 0;
  padding: 9px 20px 10px;
  background: #f3ece0;
  color: #cc0022;
  border-radius: 3px;
  transform: rotate(-1.4deg);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    inset 0 0 0 2px rgba(204, 0, 34, 0.85),
    inset 0 0 0 5px #f3ece0,
    inset 0 0 0 6px rgba(204, 0, 34, 0.35);
  /* Waits for the spiral to land, then slams down. `backwards`, not `both`:
     the fill has to cover the delay (so it isn't sitting there at full size
     before it drops), but must NOT be retained afterwards — a forwards fill
     keeps winning over .rewardOut, which is how the docket ended up snapping
     away instead of fading out with the stamp when an award landed. The
     animation's end state and this rule's resting state are identical, so
     dropping the forwards fill changes nothing about how it looks at rest. */
  animation: docketIn 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) backwards;
  animation-delay: 0.95s;
}
.docket[hidden] {
  display: none;
}
.docketTitle {
  margin: 0;
  font-family: "Stardos Stencil", Impact, "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
}
.docketSub {
  margin: 3px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a6a5c;
}
.docketSub:empty {
  display: none;
}
@keyframes docketIn {
  from { opacity: 0; transform: rotate(-1.4deg) scale(1.45); }
  to   { opacity: 1; transform: rotate(-1.4deg) scale(1); }
}

.rewardLabel {
  margin: 12px 0 0;
  font-weight: 700;
  text-transform: uppercase;
  animation: rewardLabelIn 0.5s ease both;
}
/* The rare fresh stamp: a quiet, muted caption that eases in a moment after the
   die lands (delay), so it reads as a small reward and never a heading. */
.rewardLabel-stamp {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  animation-delay: 0.28s;
}
/* An award — the bigger of the two — gets the accent and a touch more size. */
.rewardLabel-award {
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  color: var(--orange);
}
@keyframes rewardLabelIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.awardSlot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 14px;
}
.awardShareBtn {
  /* basis 100% forces its own row under the badges; max-width keeps it a pill */
  flex: 0 0 100%;
  max-width: 200px;
  margin: 0 auto;
  padding: 10px 28px;
}
/* The badge is a link to the collector's profile. Sized to dominate the
   confirmation — the award is the moment, so it's bigger than the stamp. */
.awardWin {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 340px;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  animation: awardWinIn 0.55s cubic-bezier(0.2, 1.35, 0.45, 1) both;
}
.awardWinArt {
  position: relative;
  display: inline-flex;
  width: min(320px, 74vw);
}
.awardWin img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(4, 6, 15, 0.55));
  transition: transform 0.16s ease, filter 0.16s ease;
}
.awardWin:hover img {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 26px 34px rgba(4, 6, 15, 0.62));
}
.awardWin:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 6px;
  border-radius: 16px;
}
.awardWinName {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}
/* Stagger a multi-award win so the badges land one after another, not as a slab. */
.awardWin:nth-child(2) { animation-delay: 0.09s; }
.awardWin:nth-child(3) { animation-delay: 0.18s; }
.awardWin:nth-child(4) { animation-delay: 0.27s; }
@keyframes awardWinIn {
  from { opacity: 0; transform: scale(0.6) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* The profile "Stamp collection": frozen impressions tiled tightly, matching
   the gap-free packing of the trophy plates above. */
.stampsGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
/* Minimized state: ~2.5 rows of 58px tiles peek through, the half row fading out
   to signal there's more. Expanding just drops this class. */
.stampsGrid.stampsCollapsed {
  max-height: 153px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}
/* A section label that doubles as an expand/collapse control — the chevron
   rotates from › (collapsed) to ⌄ (expanded), mirroring the City Explorer
   stats disclosure. JS adds .noExpand when the grid fits without cropping. */
.collapseLabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.collapseChevron {
  color: var(--text-muted);
  font-weight: 400;
  transition: transform 0.15s ease;
  display: inline-block;
}
.collapseLabel[aria-expanded="true"] .collapseChevron { transform: rotate(90deg); }
.collapseLabel.noExpand { cursor: default; }
.collapseLabel.noExpand .collapseChevron { visibility: hidden; }
.collapseLabel:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}
.stampTile {
  display: block;
}
/* Tap (or keyboard-activate) a stamp to replay its strike animation. */
.stampReplay {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.stampsGrid svg {
  display: block;
  height: 58px;
  width: auto;
}
.card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 2px 10px 10px;
  line-height: 1.5;
}
.card .city {
  color: #d7d9e5;
  font-size: 0.9rem;
}
.card .cardFiled {
  font-size: 0.75rem;
  vertical-align: 1px;
}
/* The city refused the filing (officialStatus "rejected"): a red ✕ where the
   delivered check would be. Explained by its title/aria-label. */
.card .cardRejected {
  color: #ef6b6b;
  font-weight: 700;
  cursor: help;
}
/* Shared delivered-to-city badge (glyphs.js deliveredMark()); sized to text. */
.deliveredMark {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}
.card .cardHandle {
  display: inline-block;
  margin-top: 2px;
  color: var(--link);
  text-decoration: none;
  font-size: 0.8rem;
}
.card .cardHandle:hover { text-decoration: underline; }
/* "Submit to 311" action on a card in the grid (see list.js buildFilingBar /
   renderCardFilingBar). Full-width footer button, orange to read as an action
   rather than the green "already filed" badge. */
.cardFileBtn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-top: 1px solid var(--navy-border);
  border-radius: 0;
  background: var(--orange);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.cardFileBtn:hover { background: var(--orange-hover); }
.cardFileBtn:disabled { opacity: 0.6; cursor: default; }
/* The card's filing footer, split like the lightbox bar: a short eye (ignore)
   segment (moderators) and the full-width "Submit to 311", one orange strip
   divided by a hairline. The card's own overflow:hidden rounds the outer
   bottom corners, so the bar reads as one piece cut in two. */
.cardFileBar {
  display: flex;
  width: 100%;
  border-top: 1px solid var(--navy-border);
}
.cardFileBar > .cardFileBtn {
  flex: 1 1 auto;
  width: auto;
  border-top: 0;
}
.cardFileBar > .fbIgnore {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 15px;
  border: 0;
  border-radius: 0;
  background: var(--orange);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.22);
}
.cardFileBar > .fbIgnore:hover { background: var(--orange-hover); }
.cardFileBar > .fbIgnore:disabled { opacity: 0.6; cursor: default; }
/* A lone segment (the shut-eye un-ignore square with no Submit beside it, e.g. an
   ignored report no city can file) drops the inner hairline divider. */
.cardFileBar > :only-child { box-shadow: none; }
/* Bare ↗ arrow after "Submit to 311" (glyphs.js filedArrow()); sized to text,
   inherits the button's white via currentColor. */
.filedArrow {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  margin-left: 0.3em;
}
/* The eye on the moderator ignore segment (glyphs.js eyeGlyph()): open = live,
   shut = ignored. Block-level so it centers in the short orange square. */
.fbIgnore .eyeGlyph {
  display: block;
  width: 1.3em;
  height: 1.3em;
}
.popupHandle {
  display: block;
  margin-top: 4px;
  color: var(--link);
  text-decoration: none;
}
.adminHandle {
  display: inline-block;
  margin-top: 2px;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}
.adminHandle:hover { text-decoration: underline; }
.adminAnon { color: var(--text-muted); font-weight: 400; font-style: italic; }
.adminEmail { color: #d7d9e5; word-break: break-all; }
.adminLink {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.adminLink .adminLinkLabel { color: var(--text-muted); }
.adminLink a {
  color: var(--link);
  text-decoration: none;
  word-break: break-all;
}
.adminLink a:hover { text-decoration: underline; }
.adminLinkCopy {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
}
.adminLinkCopy:hover { opacity: 0.7; }
/* Reusable inline info/tooltip trigger (kept for future fields). */
.infoButton {
  border: none;
  background: none;
  color: var(--link);
  cursor: pointer;
  font-size: 0.95em;
  padding: 0 0 0 4px;
  line-height: 1;
}
.checkboxField {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  cursor: pointer;
}
.checkboxField input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  cursor: pointer;
}
.inputError {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3);
}
.dim { color: #586381; }
body.lightboxOpen { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 18px;
  backdrop-filter: blur(8px);
}
/* A bare image dropped straight into .lightbox (no details panel) — used by
   the admin grid to view a report photo full-size. */
.lightbox > img {
  max-width: 100%;
  max-height: calc(100vh - 36px);
  object-fit: contain;
}
.lightboxContent {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  width: min(1180px, 100%);
  height: min(780px, calc(100vh - 36px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.lightboxMedia {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 360px;
  background: #05060c;
}
.lightboxMedia img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 36px);
  object-fit: contain;
}
/* Bollard loader on a pale plate while the next photo loads (list.js toggles it). */
.lightboxMedia.isLoading img { visibility: hidden; }
.lightboxMedia.isLoading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 50%);
  aspect-ratio: 480 / 430;
  padding: 10px;
  border-radius: 10px;
  transform: translate(-50%, -50%);
  background: #d9dad5 url(flexpost-loader.svg) center / contain no-repeat content-box;
  pointer-events: none;
}
.lightboxDetails {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 28px 24px 24px;
  overflow-y: auto;
}
.lightboxCount {
  color: #777e9d;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lightboxPlate {
  color: var(--text);
  font-family: ui-monospace, Menlo, monospace;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.12em;
  overflow-wrap: anywhere;
}
.plateEditInput {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background: var(--bg, #1a1a2e);
  color: var(--text, #fff);
  width: 10ch;
}
.lightboxMetadata {
  display: grid;
  gap: 16px;
  color: var(--text);
  line-height: 1.35;
}
.lightboxMetadata > div {
  display: grid;
  gap: 4px;
}
.lightboxLabel {
  color: #777e9d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lightboxMetadata a {
  color: var(--link);
  text-decoration: none;
}
.lightboxMetadata a:hover { text-decoration: underline; }
.lightboxShareRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Muted secondary buttons in the action row (Delete, Cancel) — same footprint
   as the orange primaries, but quiet outlines so they don't compete. */
.lightboxShareRow button.lightboxSecondaryBtn {
  background: transparent;
  border-color: var(--navy-light);
  color: var(--text-muted);
}
.lightboxShareRow button.lightboxSecondaryBtn:hover {
  background: transparent;
  border-color: #c44;
  color: #c44;
}
.lightboxShareRow a,
.lightboxShareRow button {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.lightboxShareRow a:hover,
.lightboxShareRow button:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: #fff; text-decoration: none; }
/* "Filed with the city" link: its own full-width line, green to read as a win. */
.lightboxShareRow a.lightboxFiled {
  flex: 1 0 100%;
  background: #2e7d32;
  border-color: #2e7d32;
  font-weight: 600;
}
.lightboxShareRow a.lightboxFiled:hover {
  background: #276b2b;
  border-color: #276b2b;
}
/* The city refused the filing (officialStatus "rejected"): a red, non-clickable
   pill in place of the green city link. */
.lightboxShareRow .lightboxRejected {
  flex: 1 0 100%;
  display: block;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(198, 40, 40, 0.16);
  color: #ef9a9a;
  border: 1px solid rgba(198, 40, 40, 0.42);
  cursor: default;
}
/* Filed, but the public city link hasn't landed yet (~30s after a browser
   dispatch). A muted, clearly NON-clickable status — not the solid green link —
   so it never reads as a broken link during that window. */
.lightboxShareRow .lightboxFiledPending {
  flex: 1 0 100%;
  display: block;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(46, 125, 50, 0.16);
  color: #8fd694;
  border: 1px solid rgba(46, 125, 50, 0.42);
  cursor: default;
}
/* "Submit to 311" + ignore as ONE orange bar split into two segments by a
   hairline — like a single physical button snapped in two, the eye piece short on
   the left. Shared shape; the lightbox and the gallery card each set their own
   base metrics. */
.lightboxShareRow .fileBar {
  flex: 1 0 100%;
  display: flex;
  align-items: stretch;
}
.lightboxShareRow .fileBar > button {
  flex: 1 1 auto;
  margin: 0;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}
.lightboxShareRow .fileBar > button:hover { background: var(--orange-hover); }
/* The eye (ignore) segment: short, left, with a hairline splitting the bar. */
.lightboxShareRow .fileBar > .fbIgnore {
  flex: 0 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  font-weight: 700;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.22);
}
/* Round only the OUTER corners; the inner edges stay square where they meet. */
.lightboxShareRow .fileBar > :first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.lightboxShareRow .fileBar > :last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
/* A lone segment (only Submit, or only the shut-eye un-ignore square) is a normal
   full-width rounded button with no divider. */
.lightboxShareRow .fileBar > :only-child {
  border-radius: 8px;
  box-shadow: none;
}
/* An ignored report's Submit button, parked beside the shut-eye un-ignore square:
   grayed and inert, so it's clear the report won't be filed until it's brought
   back. Overrides the orange (and the generic disabled fade) on both surfaces. */
.cardFileBar > .fbParked,
.lightboxShareRow .fileBar > .fbParked,
.cardFileBar > .fbParked:hover,
.lightboxShareRow .fileBar > .fbParked:hover {
  background: #4b5563;
  color: #cbd2dc;
  opacity: 1;
  cursor: default;
}

/* Share pulled out of the button row and floated centered just below the photo,
   overlapping its lower edge — same on mobile and desktop. */
.lightboxShareFloat {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 5;
}
.lightboxShareFloat .lightboxShareFloatBtn {
  display: inline-block;
  padding: 11px 40px;
  border-radius: 999px;
  background: var(--orange);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.lightboxShareFloat .lightboxShareFloatBtn:hover { background: var(--orange-hover); }
.lightboxMap {
  display: block;
  position: relative;
  overflow: hidden;
  font-size: 0.8rem;
  text-align: right;
}
#lightboxMap {
  display: block;
  width: 100%;
  height: 170px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  /* Clickable in read-only mode: a click jumps to the full /map (see list.js). */
  cursor: pointer;
}
/* In edit mode the mini-map is draggable and the crosshair pin is shown. */
.lightboxMap.editing #lightboxMap {
  pointer-events: auto;
  cursor: grab;
  box-shadow: 0 0 0 2px var(--orange);
}
.lightboxMap.editing #lightboxMap:active { cursor: grabbing; }
.lightboxMapHint {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
}
.lightboxMap a {
  color: var(--link);
  text-decoration: none;
}
.lightboxMap a:hover { text-decoration: underline; }
.lightboxClose {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 6, 12, 0.82);
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.lightboxNav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 6, 12, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  transform: translateY(-50%);
}
.lightboxPrev { left: 14px; }
.lightboxNext { right: 14px; }
.lightboxClose:hover,
.lightboxNav:hover {
  background: var(--orange);
}
.lightboxClose:focus-visible,
.lightboxNav:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* The city's issue page, framed inside our own chrome (see openCityView in
   list.js). Sits above the lightbox: the report stays open behind it, so
   ← Back — and the system back gesture — return to it. */
.cityView {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--navy);
}
.cityView.hidden { display: none; }
.cityViewBar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px
    max(12px, env(safe-area-inset-left, 0px));
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--navy-card);
  border-bottom: 1px solid var(--navy-border);
}
.cityViewBack,
.cityViewOpen {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--navy-light);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  text-decoration: none;
  cursor: pointer;
}
.cityViewBack:hover,
.cityViewOpen:hover {
  border-color: var(--orange);
  color: var(--orange);
  text-decoration: none;
}
.cityViewBack:focus-visible,
.cityViewOpen:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.cityViewTitle {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cityViewNote {
  flex: none;
  margin: 0;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}
.cityViewFrame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

/* admin page */
.adminLogin {
  max-width: 360px;
  margin: 60px auto;
  display: grid;
  gap: 14px;
  text-align: center;
}
.adminLogin input {
  padding: 12px;
  border: 1px solid var(--navy-light);
  border-radius: 10px;
  background: var(--navy-card);
  color: var(--text);
  font: inherit;
  text-align: center;
}
.adminSearch {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.adminSearch input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--navy-light);
  border-radius: 10px;
  background: var(--navy-card);
  color: var(--text);
  font: inherit;
}
.adminGrid .card { position: relative; }
.adminReportImage {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #000;
  cursor: zoom-in;
}
.adminPlateCrop {
  min-height: 76px;
  padding: 10px;
  display: grid;
  place-items: center;
  background: #05090e;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.adminPlateCrop img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  image-rendering: auto;
}
.adminPlateFilter {
  width: 100%;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: var(--navy-card);
  color: var(--text);
}
.adminPlateFilter:hover:not(:disabled) {
  background: var(--orange);
  color: #fff;
}
.adminPlateFilter:disabled { cursor: default; }
.adminSafe { color: #8fd694; }
.adminLegacy { color: #ffb36b; }
.adminOfficial {
  margin-top: 6px;
  color: #b9bccb;
  font-size: 0.85em;
  line-height: 1.4;
}
.adminOfficial a { color: #8fd694; }
/* Green even when idle (not just on :hover) so the "Submit to 311" action
   is impossible to miss while scrolling the admin grid. Scoped as
   button.compact.adminOfficialBtn so it out-specifies button.compact's navy
   default, which was otherwise leaving the button navy until hover. Full-width
   and wrapping so the card's overflow:hidden can never clip it, no matter how
   narrow the window or the phone. */
button.compact.adminOfficialBtn {
  display: block;
  width: 100%;
  white-space: normal;
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}
button.compact.adminOfficialBtn:hover { background: #35983b; border-color: #35983b; }
.adminOfficialDone { color: #8fd694; font-weight: 600; }
/* Moderator ignore / un-ignore toggle on an admin card — a quiet full-width
   control under the Submit button, amber once a report is ignored. */
button.compact.adminIgnoreBtn {
  display: block;
  width: 100%;
  margin-top: 6px;
  white-space: normal;
  background: transparent;
  color: #b9bccb;
  border-color: var(--navy-light, #3a4266);
}
button.compact.adminIgnoreBtn:hover { border-color: #c44; color: #e0908f; }
button.compact.adminIgnoreBtn.isIgnored { color: #d8b24a; border-color: #8a6d1f; }
button.compact.adminIgnoreBtn.isIgnored:hover { border-color: #d8b24a; color: #d8b24a; }
.adminDeleteBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 60, 60, 0.85);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adminDeleteBtn:hover { background: #ff2020; }

@media (min-width: 700px) {
  main.wide { max-width: 1100px; }
}

@media (min-width: 761px) {
  body { padding-bottom: 0; }
  .mobileOnly { display: none !important; }
  .appHeader {
    justify-content: flex-start;
    padding-left: 18px;
  }
  .appNav {
    position: absolute;
    top: 7px;
    right: 14px;
    bottom: auto;
    left: auto;
    grid-template-columns: repeat(5, 78px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .appNav a {
    min-height: 45px;
    flex-direction: row;
    gap: 6px;
    font-size: 0.78rem;
  }
  .appNav svg { width: 21px; height: 21px; }
  .appNav .reportNavIcon { width: 24px; }
}

@media (max-width: 760px) {
  main { padding-bottom: 28px; }
  .siteFooter { padding-bottom: 28px; }
  .desktopOnly { display: none !important; }
  .home {
    padding-top: 24px;
    padding-bottom: 28px;
  }
  .queueBadge,
  .turnstilePanel {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .locationHeader {
    align-items: stretch;
    flex-direction: column;
  }
  .locationHeader button.compact {
    width: 100%;
  }
  .addressRow {
    align-items: stretch;
    flex-direction: column;
  }

  .lightbox {
    align-items: flex-start;
    padding: 0;
  }
  .lightboxContent {
    grid-template-columns: 1fr;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
  }
  .lightboxMedia {
    min-height: 0;
    height: min(58dvh, 520px);
    flex: 0 0 auto;
  }
  .lightboxMedia img {
    max-height: none;
  }
  .lightboxDetails {
    overflow: visible;
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .lightboxMap #lightboxMap { height: 150px; }
  .lightboxClose {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    background: rgba(5, 6, 12, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10;
  }
  .lightboxNav {
    width: 44px;
    height: 44px;
  }
  .lightboxPrev { left: 10px; }
  .lightboxNext { right: 10px; }
}

@media (max-width: 360px) {
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }
  .appNav {
    padding-top: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .appNav a {
    min-height: 46px;
    gap: 0;
  }
  .appNav a span {
    display: none;
  }
  .appNav svg {
    display: block;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    overflow: visible;
  }
  .appNav .reportNavIcon { width: 31px; }
  .queueBadge,
  .turnstilePanel {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cardImageButton img { transition: none; }
  .tooltip { animation: none; }
  .installBannerFloat { animation: none; }
  body.joinBlink .appNav a[href="/submit"] { animation: none; }
  .navPointer svg { animation: none; }
  .rewardLabel, .awardWin { animation: none; }
  /* No slam-down, but keep the tilt the static rule sets. */
  .docket { animation: none; }
  .rewardSlot .stampSlot { transition: none; }
}

.loadMore {
  margin: 18px auto 0;
}
.loadMore:not([hidden]) {
  display: block;
}

.turnstilePanel {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--panel, #14233a);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.turnstilePanel.hidden { display: none; }
.turnstilePanel p { margin: 0 0 8px; font-size: 0.85rem; }

/* ---------- profile & accounts ---------- */


.profileLink {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}
.profileLink:hover {
  background: var(--navy-card);
  color: var(--text);
  text-decoration: none;
}
.profileLink:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.profileLink svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint { color: var(--text-muted); font-size: 0.85rem; }

.profilePanel {
  max-width: 560px;
  margin: 0 auto;
}
.profilePanel h2 { margin-top: 0; }
.profilePanel.hidden { display: none; }
.profileStat {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 6px;
}
.profileStatNum {
  font-weight: 800;
  font-size: 4.2rem;
  line-height: 0.9;
  color: #fff;
  letter-spacing: -0.02em;
}
.profileStatLabel {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.profileStats { margin: 0 0 4px; }
.profileStats.hidden { display: none; }
.profileStatsSummary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
}
/* Drop the native disclosure triangle in every engine; the chevron below is
   the affordance instead. */
.profileStatsSummary::-webkit-details-marker { display: none; }
.profileStatsSummary::marker { content: ""; }
.profileStatsToggle {
  color: var(--text-muted);
  transition: transform 0.15s ease;
  display: inline-block;
}
.profileStats[open] .profileStatsToggle { transform: rotate(90deg); }
/* Nothing to expand: the headline stands alone, no chevron, no pointer. */
.profileStats.noExpand .profileStatsToggle { visibility: hidden; }
.profileStats.noExpand .profileStatsSummary { cursor: default; }
/* Miniature, simplified cousins of the 311, City Explorer, and Fine Frame
   patches. They use the interface's line language rather than shrinking the
   detailed PNGs past legibility. */
.profileStatsGlyph {
  display: inline-flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}
.profileStatsGlyph svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profileStatsGlyph .profileStatsGlyphAccent { stroke: var(--orange); }
/* Expanded lines match the headline's size/weight — same look as the "filed
   with official city channels" line, just stacked beneath it. */
.profileStatsList {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 18px;
  font-size: 1.05rem;
}
.profileStatsList li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
/* text-align centres the inline-flex button and the "Copied ✓" line together,
   without turning the wrapper into a flex column that would fight the hidden
   state below. */
.profileShare { margin-top: 20px; text-align: center; }
.profileShare.hidden { display: none; }
.shareButton {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: none;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.shareButton:hover { background: var(--orange-hover); }
.shareButton svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Card that segments a group of settings, matching the homepage's section
   cards. */
.profileSection {
  margin-top: 24px;
  padding: clamp(18px, 5vw, 30px);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  background: var(--navy-card);
  box-shadow: 0 24px 70px rgba(4, 6, 15, 0.28);
}
.profileSection > h2 {
  margin: 0;
  font-size: 1.3rem;
}
.profileField {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--navy-border);
}
/* The first field in a card sits flush against the heading (or card top);
   later fields keep a divider so grouped settings stay visually separated. */
.profileSection > .profileField:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.profileSection > h2 + .profileField {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}
.profileField label,
.profileFieldLabel {
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
}
.profileHandleRow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profileHandleRow .handleAt { color: var(--text-muted); font-weight: 650; }
.profileHandleRow input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--navy-border);
  background: var(--navy-card);
  color: var(--text);
  font: inherit;
}
/* Locked until "Edit": read as plain text rather than an input box. */
.profileHandleRow input[readonly] {
  border-color: transparent;
  background: transparent;
  padding-left: 0;
  cursor: default;
}
.contact311Row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.contact311Row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--navy-border);
  background: var(--navy-card);
  color: var(--text);
  font: inherit;
}
.textButton {
  background: none;
  border: none;
  color: var(--link);
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.expandArrow {
  display: inline-block;
  transition: transform 0.2s;
}
.open .expandArrow {
  transform: rotate(180deg);
}

.appleSwitch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
}
.appleSwitch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.appleSlider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #5c7b99;
  transition: .3s;
  border-radius: 30px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.appleSlider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 2;
}
.appleSwitch input:checked + .appleSlider {
  background-color: #5c7b99;
}
.appleSwitch input:checked + .appleSlider:before {
  transform: translateX(30px);
}
/* Labels flanking the toggle — the word for each side sits outside its glyph. */
.modeText {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
  opacity: 0.55;
  user-select: none;
  cursor: pointer;
  transition: opacity 0.3s, color 0.3s;
}
.modeText.active {
  opacity: 1;
  color: white;
}
.appleSwitch input:focus-visible + .appleSlider {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- capture mode toggle ---------- */

.captureModeRow {
  margin: 16px 0;
  text-align: center;
}
.captureModeLabel {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.captureModePicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* Each side wraps its word + glyph so the whole zone — including the gap
   between them — is one click target for that mode. */
.modeSide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.captureModeIcon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  opacity: 0.35;
  transition: opacity 0.3s, color 0.3s;
  flex-shrink: 0;
  cursor: pointer;
}
.captureModeIcon.active {
  opacity: 1;
  color: white;
}
.profileField .captureModeRow {
  text-align: left;
  margin: 0;
}
.profileField .captureModeLabel {
  display: none;
}

.profileLinksRow {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
/* Only the profile's "my gallery" / "my map" links use this, and they are the
   card's whole point — sized to be tapped, not to sit quietly beside a label. */
a.compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
}
a.compact svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a.compact:hover { border-color: var(--orange); text-decoration: none; }

.profileFooter {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--navy-border);
}

.publicProfile {
  max-width: 480px;
  margin: 24px auto 0;
  text-align: center;
}
.publicProfileAvatar svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.publicProfile h2 { margin: 10px 0 4px; }
.publicProfileCount { color: var(--text-muted); }
.publicProfileCount strong { color: var(--text); font-size: 1.2rem; }

/* Public mode: /profile served at /u/<handle> renders read-only. Every
   .ownerOnly control is hidden, and the surviving header/count/awards are
   centred so it reads as a profile card rather than a settings form. */
.publicView .ownerOnly { display: none !important; }
.publicProfileHead { text-align: center; }
.publicProfileHead h2 { margin: 10px 0 0; }
.publicView .profileStat { justify-content: center; }
.publicView #profileAwards,
.publicView #publicOwnerNote,
.publicView #publicAdminEmail,
.publicView #publicAdminEdit { text-align: center; }
/* Reuse the /profile big-number count, centred under the avatar/handle. */
.publicProfileStat { justify-content: center; margin: 14px 0 6px; }
.publicProfileAwards {
  margin-top: 34px;
  text-align: center;
}
.publicProfileAwards h3 {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}
.awardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 18px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.awardButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
}
.awardArt {
  position: relative;
  display: inline-flex;
  width: min(144px, 100%);
}
.awardButton img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(4, 6, 15, 0.48));
  transition: transform 0.16s ease, filter 0.16s ease;
}
.awardButton:hover img {
  filter: drop-shadow(0 18px 22px rgba(4, 6, 15, 0.58));
  transform: translateY(-2px) scale(1.03);
}
.awardButton:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 5px;
}
/* Each cell stacks its badge over an optional "next level" hint. */
.awardGrid > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
/* Muting is reserved for an actual upcoming badge type. Another level of the
   current type stays full-color and uses only the progress line below it. */
.awardUpcoming .awardButton img {
  opacity: 0.38;
  filter: grayscale(0.7) drop-shadow(0 10px 14px rgba(4, 6, 15, 0.32));
}
.awardUpcoming .awardButton:hover img {
  opacity: 0.5;
  transform: translateY(-2px) scale(1.03);
}
/* The level track: one rung per level a badge's name can reach, filled up to
   the level earned. It reads at a glance — a full row of gold means the series
   is maxed, a lone gold rung means the climb has barely started. Gold echoes the
   thread on the patches themselves rather than the app's orange, so it feels
   like part of the award, not UI chrome. */
.awardTrack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 1px;
}
.awardRung {
  width: 9px;
  height: 3px;
  border-radius: 2px;
  background: rgba(154, 160, 187, 0.26);
}
.awardRungOn {
  background: #e3b23c;
  box-shadow: 0 0 4px rgba(227, 178, 60, 0.4);
}
/* A completed award wears a warm aura. Casting it as a colored drop-shadow on
   the badge art — rather than a shape parked behind it — means the glow always
   hugs the patch's silhouette and reads at any badge size; it can't slip
   underneath a patch that fills its frame. It layers over the badge's usual dark
   lift shadow, which is restated here since `filter` replaces rather than adds. */
.awardMaxed .awardButton img {
  filter:
    drop-shadow(0 0 13px rgba(227, 178, 60, 0.6))
    drop-shadow(0 14px 18px rgba(4, 6, 15, 0.48));
}
.awardMaxed .awardButton:hover img {
  filter:
    drop-shadow(0 0 16px rgba(227, 178, 60, 0.72))
    drop-shadow(0 18px 22px rgba(4, 6, 15, 0.58));
}
/* A maxed patch is complete, so its rungs read as a settled gold rather than the
   brighter, still-earning glow of a climb in progress. */
.awardMaxed .awardRungOn {
  box-shadow: none;
}
/* One quiet line under a still-climbing series: how many more to level up. */
.awardHint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
}
.awardHint strong {
  color: var(--text);
  font-weight: 700;
}
.awardOverlay {
  position: fixed;
  z-index: 60;
  max-width: 240px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(242, 101, 34, 0.35);
  border-radius: 10px;
  background: rgba(13, 27, 42, 0.96);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
}
.awardOverlay strong {
  color: #fff;
  font-weight: 750;
}
/* Award lightbox: tap a patch to see it blown up with its name and blurb, and
   arrow/swipe through the rest of the shelf. Sits above everything (z 80, over
   the iOS install sheet at 70). */
.awardModal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
body.awardModalOpen { overflow: hidden; }
.filingAwardCelebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  background: var(--navy-card);
  color: var(--text);
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: filingAwardFade 0.25s 2.75s ease forwards;
}
.filingAwardCelebration .rewardLabel { margin-top: 0; }
.filingAwardCelebration .awardSlot { margin-bottom: 0; }
.filingAwardCelebration .awardWinArt { width: min(240px, 58vw); }
.filingAwardCelebrationMultiple .awardWinArt { width: min(180px, 30vw); }
.filingAwardCelebrationMultiple .awardWin { max-width: min(180px, 30vw); }
@keyframes filingAwardFade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .filingAwardCelebration { animation: none; }
}
.awardModalContent {
  position: relative;
  width: min(360px, 100%);
  padding: 22px 22px 26px;
  border-radius: 20px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: awardModalPop 0.18s ease;
}
@keyframes awardModalPop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.awardModalArt {
  display: flex;
  justify-content: center;
  margin: 6px auto 14px;
  width: min(240px, 68%);
}
.awardModalArt img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(4, 6, 15, 0.55));
}
.awardModalIsUpcoming .awardModalArt img {
  opacity: 0.42;
  filter: grayscale(0.7) drop-shadow(0 12px 16px rgba(4, 6, 15, 0.35));
}
.awardModalTitle {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #fff;
}
.awardModalHint {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 650;
}
.awardModalDesc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.awardModalClose {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.awardModalClose:hover { color: #fff; }
/* The pager arrows straddle the card's outer edges, thumb-reachable on a phone. */
.awardModalNav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--navy-border);
  border-radius: 50%;
  background: rgba(13, 27, 42, 0.9);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.awardModalNav:hover { border-color: var(--orange); }
.awardModalPrev { left: -10px; }
.awardModalNext { right: -10px; }
.awardModalClose:focus-visible,
.awardModalNav:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
@media (max-width: 400px) {
  .awardModalPrev { left: 2px; }
  .awardModalNext { right: 2px; }
}
.cityListOverlay {
  max-width: 340px;
}
.cityListOverlay strong {
  display: block;
  margin-bottom: 4px;
}
.cityListOverlay .cityGrid {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 12px;
}
.cityListOverlay .cityGrid li {
  break-inside: avoid;
  padding: 1px 0;
}

.footerCityList {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 16px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.footerCityList li {
  break-inside: avoid;
}
@media (max-width: 500px) {
  .footerCityList { columns: 2; }
}

/* Map popup actions: a prominent Share button, with a quiet delete link
   tucked beside it for your own reports. (Popup background is white.) */
.popupActions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.popupShareBtn {
  flex: 0 0 auto;
  padding: 7px 18px;
  border: none;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.popupShareBtn:hover { background: var(--orange-hover); }
.popupDeleteLink {
  flex: 0 0 auto;
  padding: 2px 2px;
  border: none;
  background: none;
  color: #999;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
}
.popupDeleteLink:hover { color: #d2342b; }

/* Heat-strip popup (/map?heat=1): "‹ 3 of 12 reports here ›" above the report. */
.popupPager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.popupPager button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font: 700 20px/1 system-ui, sans-serif;
  cursor: pointer;
}
.popupPager button:hover:not(:disabled) { background: #f2f2f2; }
.popupPager button:disabled { opacity: 0.35; cursor: default; }

/* Keep report navigation visibly busy through metadata and image loading.
   The flexpost (bollard) loader from situatedimage's NYC page is the one
   loading indicator for report photos site-wide: map popups, the list grid,
   the lightbox and the art pages. */
.popupReportImage { display: block; position: relative; }
.popupImageLoading {
  min-height: 130px;
  padding: 10px;
  border-radius: 6px;
  background: #d9dad5 url(flexpost-loader.svg) center / contain no-repeat content-box;
}
.popupReportImage.isLoading img { display: none; }

.reportCountMarker { display:flex; align-items:center; justify-content:center; }
.reportCountMarker span {
  background:#f58025; color:white; border:2px solid white;
  border-radius:20px; padding:5px 10px; font:600 13px/20px system-ui,sans-serif;
  box-shadow:0 1px 5px #0005; white-space:nowrap;
}

/* Native apps are already installed; never show web installation prompts. */
.nativeApp .installBanner { display: none !important; }
