@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #00A876;
  --primary-dark: #00895F;
  --accent: #00C853;
  --secondary: #2979FF;

  --bg: #F6F8F7;
  --bg-soft: #ECF1EF;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --border: rgba(15, 30, 25, 0.08);
  --text: #10201A;
  --text-muted: #5C6B65;
  --shadow: 0 8px 30px rgba(16, 32, 26, 0.08);
  --danger: #FF5252;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-soft: #191919;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-solid: #1C1E1D;
  --border: rgba(255, 255, 255, 0.08);
  --text: #EDF2EF;
  --text-muted: #96A19C;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  overscroll-behavior: none;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(0, 200, 83, 0.10), transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex: 1;
  padding: 20px 20px 100px;
  animation: fadeIn 0.35s ease;
}
.screen.active { display: flex; flex-direction: column; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4px 6px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 168, 118, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; color: var(--text-muted); margin-top: -2px; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Typography ---------- */
h1.hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 18px 0 4px;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 22px;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 22px 0 10px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 16px 22px;
  width: 100%;
  box-shadow: 0 10px 24px rgba(0, 168, 118, 0.30);
}
.btn-secondary {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 20px;
  width: 100%;
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 10px 14px;
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(3); opacity: 0; }
}

/* ---------- Home: scan CTA (signature element) ---------- */
.scan-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 0 20px;
}
.scan-ring {
  position: relative;
  width: 168px; height: 168px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.scan-ring::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--secondary), var(--accent));
  animation: spin 6s linear infinite;
  opacity: 0.85;
}
.scan-ring::after {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}
.scan-ring-core {
  position: relative;
  z-index: 2;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--surface-solid);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 0 1px var(--border);
}
.scan-ring-core svg { width: 34px; height: 34px; color: var(--primary); }
.scan-ring-core span { font-size: 13px; font-weight: 700; color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.scan-actions { display: flex; gap: 12px; margin-top: 22px; width: 100%; }

/* ---------- Guide / tip cards ---------- */
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.mini-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(0, 200, 83, 0.12);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mini-icon svg { width: 20px; height: 20px; }
.mini-title { font-weight: 700; font-size: 14px; }
.mini-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.chevron { margin-left: auto; color: var(--text-muted); }

/* ---------- Scan screen ---------- */
.camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
#camera-video, #camera-canvas, .camera-placeholder, #captured-preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.camera-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: rgba(255,255,255,0.7); text-align: center; padding: 24px;
  background: linear-gradient(160deg, #1a1a1a, #0a0a0a);
}
.camera-placeholder svg { width: 40px; height: 40px; opacity: 0.6; }
.scan-frame {
  position: absolute; inset: 24px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  pointer-events: none;
}
.scan-frame::before, .scan-frame::after {
  content: ''; position: absolute; width: 26px; height: 26px;
  border-color: var(--accent);
}
.scan-sweep {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
  animation: sweep 2.2s ease-in-out infinite;
  display: none;
}
.scanning .scan-sweep { display: block; }
@keyframes sweep {
  0% { top: 8%; opacity: 0.2; }
  50% { top: 90%; opacity: 1; }
  100% { top: 8%; opacity: 0.2; }
}

.camera-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px;
}
.shutter-btn {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: white;
  border: 5px solid rgba(255,255,255,0.35);
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  cursor: pointer;
}
.shutter-btn:active { transform: scale(0.92); }
.tool-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tool-btn svg { width: 20px; height: 20px; }
.tool-btn.active { background: var(--accent); color: white; border-color: transparent; }

/* ---------- Skeleton / loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 37%, var(--bg-soft) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-block { height: 90px; }

/* ---------- Result screen ---------- */
.result-image-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.result-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Carbon footprint chip (bottom-of-image overlay) ---------- */
.co2-chip {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 7px;
  border: none;
  background: rgba(16, 32, 26, 0.68);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 100px;
  padding: 9px 12px;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.co2-chip svg { flex-shrink: 0; color: var(--accent); }
.co2-chip-text { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co2-quality-tag {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 100px;
}
.co2-quality-measured { background: var(--accent); color: #06331F; }
.co2-quality-estimated { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.co2-chip .co2-quality-estimated { color: #fff; border-color: rgba(255, 255, 255, 0.55); }

.result-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin: 18px 0 4px;
}
.result-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.result-sub { color: var(--text-muted); font-size: 14px; }

/* ---------- Estimated scrap value (right side of result header,
   where the circular confidence indicator used to sit) ---------- */
.scrap-value-box {
  flex: 0 0 auto;
  text-align: right;
  max-width: 160px;
}
.scrap-value-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.scrap-value-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  flex-wrap: wrap;
}
.scrap-value-amount {
  font-size: 16px; font-weight: 800; color: var(--text);
  white-space: nowrap;
}
.scrap-value-unavailable {
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  line-height: 1.35;
}
.scrap-value-disclaimer {
  font-size: 10.5px; color: var(--text-muted);
  line-height: 1.35;
  margin-top: 4px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  font-size: 12.5px; font-weight: 700;
  margin-top: 10px;
}
.badge-yes { background: rgba(0, 200, 83, 0.14); color: var(--primary-dark); }
.badge-limited { background: rgba(245, 158, 11, 0.16); color: #B45309; }
.badge-no { background: rgba(255, 82, 82, 0.14); color: var(--danger); }
.badge-unknown { background: var(--bg-soft); color: var(--text-muted); }

.resin-chip {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
}
.resin-chip svg { width: 100%; height: 100%; }

.resin-family-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 0 2px;
}
.guide-intro {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.guide-example-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin: 0 0 6px;
  border: 1px solid var(--border);
}
.guide-example-caption {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 18px;
}

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.info-tile { padding: 14px; }
.info-tile .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.info-tile .value { font-size: 15px; font-weight: 700; margin-top: 4px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  background: var(--bg-soft);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
}

.check-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.check-list svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

.fact-card {
  background: linear-gradient(135deg, rgba(0,168,118,0.10), rgba(41,121,255,0.08));
  border: 1px solid var(--border);
}

/* ---------- History ---------- */
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px;
}
.history-thumb { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--bg-soft); flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-title { font-weight: 700; font-size: 14.5px; }
.history-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.history-delete { color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 8px; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 16px;
}
.search-bar input {
  border: none; background: transparent; outline: none;
  font-family: inherit; font-size: 14.5px; color: var(--text); width: 100%;
}
.search-bar svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 46px; height: 46px; margin-bottom: 12px; opacity: 0.5; }

/* ---------- Settings ---------- */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-weight: 600; font-size: 14.5px; }
.settings-value { font-size: 13px; color: var(--text-muted); }

.toggle { position: relative; width: 48px; height: 28px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; background: var(--bg-soft);
  border-radius: 100px; cursor: pointer; transition: background 0.2s;
  border: 1px solid var(--border);
}
.toggle-track::before {
  content: ''; position: absolute; width: 20px; height: 20px;
  left: 3px; top: 3px; background: white; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::before { transform: translateX(20px); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--border);
  z-index: 50;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; color: var(--text-muted);
  font-family: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer; padding: 6px 14px; border-radius: 14px;
  transition: color 0.2s;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); }

/* ---------- Snackbar ---------- */
.snackbar {
  position: fixed; bottom: 86px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 100px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100; white-space: nowrap;
}
[data-theme="dark"] .snackbar { background: var(--surface-solid); color: var(--text); }
.snackbar.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  z-index: 90;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.bottom-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: var(--surface-solid);
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  z-index: 95;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  max-height: 70vh; overflow-y: auto;
}
.bottom-sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 100px; margin: 6px auto 16px; }

/* ---------- Model status banner ---------- */
.model-status-banner {
  position: fixed;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  max-width: 440px;
  width: calc(100% - 32px);
  z-index: 80;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.model-status-banner.hidden { display: none; }
.model-status-banner.status-ready { color: var(--primary-dark); }
.model-status-banner.status-error { color: #B45309; }
.model-status-spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.model-status-banner.status-ready .model-status-spinner,
.model-status-banner.status-error .model-status-spinner { display: none; }

/* ---------- Confidence breakdown (result screen) ---------- */
.breakdown-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
}
.breakdown-label {
  width: 56px; flex-shrink: 0;
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
}
.breakdown-bar-track {
  flex: 1; height: 8px; border-radius: 100px;
  background: var(--bg-soft);
  overflow: hidden;
}
.breakdown-bar-fill {
  height: 100%; border-radius: 100px;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}
.breakdown-pct {
  width: 38px; flex-shrink: 0; text-align: right;
  font-size: 12.5px; font-weight: 700;
}
.heuristic-note {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 12px;
}

/* ---------- Waste-guidance result groups (iOS grouped-list style) ---------- */
.result-group {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 14px 0;
}
.result-group-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.result-group-row:last-child { border-bottom: none; }
.result-group-row .row-icon {
  width: 24px; flex-shrink: 0;
  font-size: 16px; line-height: 1;
  text-align: center;
}
.result-group-row .row-text { flex: 1; min-width: 0; }
.result-group-row .row-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.result-group-row .row-value { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.result-group-row.tappable { cursor: pointer; transition: background 0.15s ease; }
.result-group-row.tappable:active { background: var(--bg-soft); }
.result-group-row .row-chip {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 100px;
}
.result-group-row .row-chevron { color: var(--text-muted); flex-shrink: 0; }

.app-message-box {
  background: var(--bg-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 10px 0;
}
.warning-box {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 14px 0;
}
.not-plastic-link {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 14px 0 4px;
  cursor: pointer;
}

/* ---------- Nearby Recycling locator ---------- */
.recycling-status-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  margin: 4px 0 14px;
}
.recycling-status-banner.status-granted { color: var(--primary-dark); background: rgba(0, 200, 83, 0.10); border-color: rgba(0, 200, 83, 0.2); }
.recycling-status-banner.status-denied,
.recycling-status-banner.status-unavailable,
.recycling-status-banner.status-unsupported,
.recycling-status-banner.status-error { color: #B45309; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.25); }
.recycling-status-banner.status-requesting,
.recycling-status-banner.status-loading_centers { color: var(--secondary); }

.recycling-controls { padding: 14px; margin-bottom: 14px; }
.recycling-search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.recycling-search-row input {
  flex: 1; min-width: 0;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit; font-size: 14px; color: var(--text);
  outline: none;
}
.recycling-search-row .btn { width: auto; padding: 10px 16px; font-size: 13.5px; }
.recycling-controls-row { display: flex; align-items: center; }
.recycling-locate-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 168, 118, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.recycling-locate-btn svg { flex-shrink: 0; }
.recycling-locate-btn:hover { background: var(--primary-dark); }
.recycling-locate-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 168, 118, 0.28);
}

.recycling-map-wrap {
  width: 100%; height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
#recycling-map { width: 100%; height: 100%; background: var(--bg-soft); }
.recycling-user-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--surface-solid);
  box-shadow: 0 0 0 3px rgba(41, 121, 255, 0.3);
}
.recycling-pin {
  width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--primary);
  border: 2px solid var(--surface-solid);
}
.recycling-pin-container { background: var(--text-muted); opacity: 0.75; }
.recycling-pin-nearest { width: 22px; height: 22px; background: var(--accent); box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.25); }

.recycling-card { padding: 14px; margin-bottom: 10px; }
.recycling-card-nearest { border: 1.5px solid var(--accent); }
.recycling-card-selected { box-shadow: 0 0 0 2px var(--secondary); }
.recycling-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recycling-card-name { font-weight: 700; font-size: 14.5px; }
.recycling-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.recycling-card-distance { font-weight: 800; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.recycling-type-chip {
  font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px;
  background: var(--bg-soft); color: var(--text-muted);
}
.recycling-type-centre { background: rgba(0, 200, 83, 0.14); color: var(--primary-dark); }
.recycling-nearest-chip { background: rgba(0, 200, 83, 0.18); color: var(--primary-dark); }
.recycling-material-chip { background: rgba(41, 121, 255, 0.14); color: var(--secondary); }
.recycling-directions-link {
  display: inline-block; margin-top: 10px;
  font-size: 13px; font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
}

/* ---------- Confetti ---------- */
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

/* ---------- Scrollbars / misc ---------- */
::-webkit-scrollbar { width: 0; height: 0; }

.spacer { flex: 1; }
.hidden { display: none !important; }
