* { 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;
}

/* home */
.home {
  display: grid;
  padding-top: 48px;
  padding-bottom: 72px;
}
.welcome {
  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);
}
.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; }
.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-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  background: var(--navy-card);
  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 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;
}
.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;
}
.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;
}
.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 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); }
.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;
  right: 0;
  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 { 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; }

.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;
}

/* 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;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.reviewMode .step {
  flex: 1;
  justify-content: center;
}

.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;
}
.petTypeRadios {
  display: flex;
  gap: 4px;
  border: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.petRadio {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--navy-light);
  background: var(--navy-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.petRadio:has(input:checked) {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(242, 101, 34, 0.1);
}
.petRadio input {
  accent-color: var(--orange);
  margin: 0;
}
#noteInput {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--navy-light);
  background: var(--navy-card);
  color: var(--text);
}
#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); }

/* 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; }

/* 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;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* dashboard */
.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;
  background: #000;
  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;
}
.trophiesGrid img {
  display: block;
  height: 56px;
  border-radius: 6px;
  object-fit: contain;
  background: #05090e;
}
.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 .cardPetType {
  font-size: 0.8rem;
  color: var(--orange);
}
.card .cardNote {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card .cardHandle {
  display: inline-block;
  margin-top: 2px;
  color: var(--link);
  text-decoration: none;
  font-size: 0.8rem;
}
.card .cardHandle:hover { text-decoration: underline; }
.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; }
/* 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;
}
.attributeHandle { font-weight: 600; color: var(--link); }
/* No handle yet: show the placeholder in red so it reads as "fill me in". */
.attributeHandle.placeholder { color: #ff6b6b; }
.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);
}
.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;
}
.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;
}
.plateEditBtn {
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--navy-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
}
.plateEditBtn:hover { border-color: var(--link, #6ea8fe); color: var(--link, #6ea8fe); }
.plateEditWrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.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;
}
.plateEditSave,
.plateEditCancel {
  font-size: 0.82rem;
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.plateEditSave {
  background: var(--link, #6ea8fe);
  color: #000;
}
.plateEditSave:disabled { opacity: 0.5; }
.plateEditCancel {
  background: transparent;
  color: var(--text-muted, #aaa);
}
.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;
  gap: 8px;
}
.lightboxShareRow a,
.lightboxShareRow button {
  flex: 1;
  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; }
.lightboxDeleteRow {
  margin-top: 6px;
  text-align: center;
}
.lightboxDeleteRow button {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--navy-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
}
.lightboxDeleteRow button:hover { border-color: #c44; color: #c44; }
.lightboxMap {
  display: block;
  margin-top: auto;
  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;
  pointer-events: none;
}
.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;
}

/* 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;
}
.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; }
.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; }
  .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; }
  body.joinBlink .appNav a[href="/submit"] { animation: none; }
  .navPointer svg { animation: 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; }
.profileCount { font-size: 1.05rem; }
.profileField {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--navy-border);
}
.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;
}
.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);
}

.appleSwitchWrapper {
  margin-top: 12px;
  display: flex;
}
.appleSwitch {
  position: relative;
  display: inline-block;
  width: 140px;
  height: 48px;
}
.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: 48px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.appleSlider:before {
  position: absolute;
  content: "";
  height: 40px;
  width: 40px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 2;
}
.appleSlider .textOff, .appleSlider .textOn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 1;
  user-select: none;
}
.appleSlider .textOff {
  right: 18px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.appleSlider .textOn {
  left: 18px;
  opacity: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.appleSwitch input:checked + .appleSlider {
  background-color: #5c7b99;
}
.appleSwitch input:checked + .appleSlider:before {
  transform: translateX(92px);
}
.appleSwitch input:checked + .appleSlider .textOff {
  opacity: 0;
}
.appleSwitch input:checked + .appleSlider .textOn {
  opacity: 1;
}
.appleSwitch input:focus-visible + .appleSlider {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.profileLinksRow {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
a.compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--navy-border);
  border-radius: 10px;
  background: var(--navy-card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
a.compact svg {
  width: 18px;
  height: 18px;
  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; }
.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;
}
.awardButton img {
  width: min(144px, 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;
}
.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;
}

/* 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; }
