/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --surface2: #273449;
  --border:   #334155;
  --text:     #e2e8f0;
  --text2:    #94a3b8;
  --accent:   #f59e0b;
  --blue:     #3b82f6;
  --green:    #22c55e;
  --red:      #ef4444;
  --radius:   12px;
  --shadow:   0 8px 32px rgba(0,0,0,.45);
  --topbar-h: 56px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ── Map ───────────────────────────────────────────────────────────────────── */
#map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ── Top bar ───────────────────────────────────────────────────────────────── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(15,23,42,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .01em;
  color: var(--accent);
}
.btn-submit {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: .5rem 1.1rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-submit:hover { background: #d97706; }
.btn-submit:active { transform: scale(.96); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Overlay / Panel ───────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}
.overlay.hidden { display: none !important; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.panel {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;              /* vh fallback for older browsers */
  max-height: 90dvh;             /* dvh accounts for mobile browser chrome */
  overflow: hidden;
  overscroll-behavior: contain;
  animation: slideUp .28s cubic-bezier(.25,.46,.45,.94);
  box-shadow: var(--shadow);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem .8rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.panel-header h2 { font-size: 1.05rem; }
.panel-close {
  background: var(--surface2);
  border: none;
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.panel-close:hover { background: var(--border); }
.panel-body {
  padding: 1rem 1.2rem 1rem;
  flex: 1 1 auto;
  min-height: 0;         /* KEY: lets flex child shrink below content height */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .82rem;
  color: var(--text2);
  margin-bottom: .35rem;
  font-weight: 500;
}
.req { color: var(--red); }
.field input[type=text],
.field textarea,
.field input[type=file] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .6rem .8rem;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s;
}
.field input[type=text]:focus,
.field textarea:focus { outline: none; border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 72px; }
.field input[type=file] { padding: .5rem; cursor: pointer; }
.hint { font-size: .75rem; color: var(--text2); }

/* ── File drop zone ────────────────────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
  min-height: 100px;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--accent);
  background: rgba(245,158,11,.05);
}
.file-drop input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0; border: none; background: transparent;
}
.upload-icon {
  width: 36px; height: 36px;
  stroke: var(--text2);
  margin: 0 auto .6rem;
  display: block;
}
#fileDropContent p { font-size: .88rem; color: var(--text2); }
#previewCanvas {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}
.process-msg {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.8);
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem;
  color: var(--accent);
  border-radius: 8px;
}

/* ── Pin chooser ───────────────────────────────────────────────────────────── */
.pin-chooser {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .8rem;
}
.pin-status {
  font-size: .85rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pin-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pin-dot.pending  { background: var(--text2); }
.pin-dot.set      { background: var(--green); box-shadow: 0 0 6px var(--green); }
.pin-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-loc {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .5rem .7rem;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
  min-width: 130px;
  -webkit-tap-highlight-color: transparent;
}
.btn-loc:hover { background: var(--border); }
.btn-loc.active { border-color: var(--accent); color: var(--accent); }
.pin-coords {
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.panel-footer {
  flex: 0 0 auto;       /* never shrinks – always visible */
  padding: .75rem 1.2rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: .85rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 0;        /* footer handles spacing */
}
.btn-primary:hover { background: #d97706; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  background: rgba(239,68,68,.12);
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: .5rem .8rem;
  font-size: .85rem;
  color: #fca5a5;
  margin-top: .5rem;
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
.modal.hidden { display: none !important; }

.modal-inner {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  box-shadow: var(--shadow);
  animation: slideUp .25s cubic-bezier(.25,.46,.45,.94);
}

.modal-close {
  position: absolute;
  top: .7rem; right: .7rem;
  background: rgba(0,0,0,.5);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: rgba(0,0,0,.75); }

/* Image area – fixed aspect ratio to prevent layout jump */
.modal-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 aspect */
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.modal-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* No blur until fully loaded – managed in JS */
  transition: filter .3s;
}
.modal-img.reported { filter: blur(16px); }

.blur-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: .85rem;
  background: rgba(15,23,42,.5);
  color: #fca5a5;
}

.modal-content { padding: 1rem 1.2rem 1.4rem; }
.modal-content h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.modal-date { font-size: .78rem; color: var(--text2); margin-bottom: .6rem; }
.modal-comments { font-size: .88rem; color: var(--text2); white-space: pre-wrap; margin-bottom: .8rem; }
.modal-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.badge {
  font-size: .72rem;
  padding: .2rem .55rem;
  border-radius: 99px;
  font-weight: 600;
}
.badge-reported { background: #7f1d1d; color: #fca5a5; }
.badge-fixed    { background: #14532d; color: #86efac; }

.modal-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-action {
  flex: 1;
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: .85rem;
  cursor: pointer;
  min-width: 120px;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-action:hover { background: var(--border); }
.btn-report:hover { border-color: var(--red); color: var(--red); }
.btn-fix:hover    { border-color: var(--green); color: var(--green); }

/* ── Fix form ──────────────────────────────────────────────────────────────── */
.fix-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.fix-form h4 { font-size: .9rem; margin-bottom: .7rem; color: var(--text2); }
.stars-input { display: flex; gap: .3rem; }
.star {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--border);
  transition: color .1s, transform .1s;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.star.on { color: var(--accent); }
.star:hover, .star:focus { color: var(--accent); transform: scale(1.2); outline: none; }

/* ── Manual placement overlay ──────────────────────────────────────────────── */
.place-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;  /* NEVER block map clicks */
}
/* .active only used to show/hide — no pointer-events change */
.place-inner {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(15,23,42,.9);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text);
  pointer-events: all;   /* only the bar is clickable */
}
.btn-ghost-sm {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .82rem;
  cursor: pointer;
}
#crosshair {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);   /* sits just above confirm button */
  font-size: 2.8rem;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.7));
  z-index: 2501;
  line-height: 1;
}

.btn-place-confirm {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, 1.6rem);  /* more breathing room below the pin */
  z-index: 2501;
  pointer-events: all;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: .6rem 1.4rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  white-space: nowrap;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-place-confirm:hover  { background: #d97706; }
.btn-place-confirm:active { transform: translate(-50%, 1.6rem) scale(.96); }

/* ── Leaflet marker pin ────────────────────────────────────────────────────── */
.sh-pin {
  width: 36px;
  height: 36px;
  background: var(--red);        /* new pins = red */
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) translate(4px, -4px);
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  cursor: pointer;
  transition: transform .15s;
}
.sh-pin.reported { background: var(--red); outline: 3px solid #fff; outline-offset: 2px; opacity: .6; }
.sh-pin.fixed    { background: var(--green); }   /* fixed = green */
.sh-pin:hover    { transform: rotate(-45deg) translate(4px, -4px) scale(1.2); }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green);
  color: #000;
  padding: .65rem 1.2rem;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.err { background: var(--red); color: #fff; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (min-width: 560px) {
  .overlay { align-items: center; }
  .panel { border-radius: var(--radius); max-height: 85vh; max-height: 85dvh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── Before/after image toggle ─────────────────────────────────────────────── */
.modal-img-wrap { cursor: default; }
.modal-img-wrap.has-after { cursor: pointer; }
.modal-img-wrap.has-after:active .modal-img,
.modal-img-wrap.has-after:active .modal-img { opacity: .85; }

.img-label {
  position: absolute;
  top: .6rem; left: .6rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 99px;
  letter-spacing: .04em;
  pointer-events: none;
  z-index: 2;
  text-transform: uppercase;
}

/* Guidance hint bar at bottom of image */
.ba-hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: .55rem .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  z-index: 3;
  pointer-events: all;
}
#baHintText {
  font-size: .8rem;
  color: #e2e8f0;
}
.ba-hint-dismiss {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
}
.ba-hint-dismiss input { cursor: pointer; accent-color: var(--accent); }

/* ── Modal star rating display ─────────────────────────────────────────────── */
.modal-stars {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .6rem;
  font-size: .88rem;
}
.modal-stars .star-filled { color: var(--accent); font-size: 1.1rem; }
.modal-stars .star-label  { color: var(--text2); font-size: .82rem; }

/* ── Reported pin image replacement ────────────────────────────────────────── */
/* Black placeholder fills the slot – no blur filter, no real image URL in DOM */
.modal-img-wrap.reported-wrap .modal-img {
  object-fit: cover;
  filter: none;                   /* no blur – solid black instead */
  background: #000;
}
.modal-img-wrap.reported-wrap .blur-msg {
  background: rgba(0,0,0,.75);    /* slightly stronger overlay on black bg */
}

/* ── Fix notes panel ────────────────────────────────────────────────────────── */
.fix-notes {
  margin-top: .75rem;
  border: 1px solid var(--green);
  border-radius: 10px;
  overflow: hidden;
}
.fix-note-item {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.fix-note-item:last-child { border-bottom: none; }
.fix-note-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
}
.fix-note-stars { color: var(--accent); letter-spacing: .05em; font-size: .85rem; }
.fix-note-date  { color: var(--text2); font-size: .75rem; }
.fix-note-text  { color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.fix-note-empty {
  padding: .8rem 1rem;
  color: var(--text2);
  font-size: .85rem;
  font-style: italic;
}

/* ── Welcome modal ──────────────────────────────────────────────────────────── */
.welcome-inner {
  max-width: 480px;
  width: calc(100% - 2rem);
  margin: auto;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  animation: slideUp .3s cubic-bezier(.25,.46,.45,.94);
}

.welcome-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.2rem 1.2rem .9rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.welcome-logo { font-size: 2rem; line-height: 1; }
.welcome-header h2 { font-size: 1.1rem; margin: 0; }

.welcome-body {
  padding: 1rem 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

.welcome-intro {
  font-size: .92rem;
  color: var(--text2);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.welcome-step {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem;
}
.step-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .1rem;
}
.welcome-step strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.welcome-step p { font-size: .83rem; color: var(--text2); margin: 0; line-height: 1.5; }

.welcome-footer {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .9rem 1.2rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}
.welcome-again {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}
.welcome-again input { cursor: pointer; accent-color: var(--accent); }
.welcome-btn { margin-top: 0; }

/* ── Inline report form ─────────────────────────────────────────────────────── */
.report-form {
  margin-top: .75rem;
  padding: .85rem;
  background: var(--bg);
  border: 1px solid var(--red);
  border-radius: 10px;
}
.report-optional { color: var(--text2); font-weight: 400; }

/* ── Press-and-hold submit button ──────────────────────────────────────────── */
.btn-hold-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: .75rem;
  padding: .75rem 1rem;
  background: var(--surface2);
  border: 2px solid var(--red);
  border-radius: 99px;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s, color .15s;
}
.btn-hold-submit:disabled { opacity: .5; cursor: not-allowed; }

/* Fill bar that grows from left to right while held */
.hold-progress {
  position: absolute;
  inset: 0;
  background: var(--red);
  border-radius: 99px;
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0.18;
  pointer-events: none;
  transition: none;
}
.btn-hold-submit.holding .hold-progress {
  transform: scaleX(1);
  opacity: 0.28;
  transition: transform var(--hold-dur, 1.5s) linear, opacity .1s;
}
.btn-hold-submit.holding {
  border-color: var(--red);
  color: var(--red);
}
.btn-hold-submit.held {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.hold-label { position: relative; z-index: 1; pointer-events: none; }

/* ── GA Consent banner ──────────────────────────────────────────────────────── */
.consent-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: calc(100% - 2rem);
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  padding: 1rem 1.1rem;
  animation: slideUp .3s cubic-bezier(.25,.46,.45,.94);
}
.consent-banner.hidden { display: none !important; }
.consent-inner { display: flex; flex-direction: column; gap: .75rem; }
.consent-text strong { display: block; font-size: .95rem; margin-bottom: .3rem; }
.consent-text p { font-size: .82rem; color: var(--text2); margin: 0; line-height: 1.5; }
.consent-link { color: var(--accent); text-decoration: underline; }
.consent-btns {
  display: flex;
  gap: .5rem;
}
.consent-btn {
  flex: 1;
  padding: .6rem .5rem;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.consent-btn:active { transform: scale(.96); }
.consent-allow { background: #22c55e; color: #000; }
.consent-allow:hover { filter: brightness(1.1); }
.consent-defer  { background: #f59e0b; color: #000; }
.consent-defer:hover  { filter: brightness(1.1); }
.consent-deny  { background: #ef4444; color: #fff; }
.consent-deny:hover  { filter: brightness(1.1); }

/* ── Report form image drop zone ────────────────────────────────────────────── */
.report-file-drop {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: .9rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-file-drop:hover,
.report-file-drop.drag-over {
  border-color: var(--red);
  background: rgba(239,68,68,.04);
}
.report-file-drop.has-image {
  border-color: var(--green);
  border-style: solid;
  padding: 0;
  min-height: 120px;
}
.report-file-drop input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0; border: none; background: transparent;
}
#reportFileDropContent .upload-icon {
  width: 28px; height: 28px;
  margin: 0 auto .4rem;
}
#reportFileDropContent p {
  font-size: .82rem;
  color: var(--text2);
  margin: 0;
}
#reportImgCanvas {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ── Topbar button group ────────────────────────────────────────────────────── */
.topbar-btns {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .45rem .95rem;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-contact:hover  { background: var(--border); }
.btn-contact:active { transform: scale(.96); }
