:root {
  --bg: #f7f7f8;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #16a34a;
  --accent-dim: rgba(22, 163, 74, 0.12);
  --danger: #dc2626;
  --highlight: rgba(250, 204, 21, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  /* Location / help copy — darker than --text-muted on light theme */
  --geo-text-title: #0f172a;
  --geo-text-body: #1e293b;
  --menu-help-color: #0f766e;
  --distance-text: #000000;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.top-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  z-index: 80;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(320px, 86vw);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(18px);
  z-index: 90;
  transform: translateX(102%);
  transition: transform 0.18s ease;
  padding: 14px;
}

.menu-drawer-open {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.menu-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.menu-title {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.menu-link-button {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-link-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.menu-link-button:disabled:hover {
  border-color: var(--border);
}

.menu-link:hover {
  border-color: rgba(34, 197, 94, 0.35);
}

.menu-link[aria-current="page"] {
  background: var(--accent-dim);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--accent);
}

a.menu-link.menu-link-page,
a.menu-link.menu-link-page:visited {
  color: var(--text);
}

a.menu-link.menu-link-page[aria-current="page"] {
  background: var(--accent-dim);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--accent);
}

a.menu-link.menu-link-help,
a.menu-link.menu-link-help:visited {
  color: var(--menu-help-color);
}

.menu-link.menu-link-cta {
  color: var(--accent);
  border-color: rgba(22, 163, 74, 0.32);
}

.menu-link.menu-link-cta:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.5);
}

.menu-link.menu-link-cta:disabled {
  color: var(--text-muted);
}

a.menu-link.menu-link-help[aria-current="page"] {
  color: var(--menu-help-color);
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.32);
}

.page-card {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.page-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 18px 0 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.page-steps {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--geo-text-body);
  font-size: 0.92rem;
  line-height: 1.55;
}

.page-steps li {
  margin-bottom: 6px;
}

.page-text-tight {
  margin-top: 0;
  font-size: 0.88rem;
}

.page-text {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.page-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.contact-form {
  display: grid;
  gap: 8px;
}

/* Contact page — single-field store suggestion */
.store-suggestion {
  margin-top: 4px;
}

.store-suggestion-lead {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.store-suggestion-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-suggestion-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.store-suggestion-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-elevated, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  resize: vertical;
  min-height: 104px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.store-suggestion-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.store-suggestion-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.store-suggestion-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-suggestion-submit {
  width: 100%;
  padding: 12px 16px;
  font-weight: 700;
}

.store-suggestion-status {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.88rem;
  color: var(--accent);
}

.age-banner {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.age-banner-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.age-banner-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.age-banner .btn {
  padding: 10px 12px;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(72px + var(--safe-bottom));
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

a.brand {
  text-decoration: none;
  color: inherit;
}

a.brand:visited {
  color: inherit;
}

a.brand .brand-title {
  color: var(--text);
}

.brand-mark {
  font-size: 1.75rem;
  opacity: 0.9;
}

.brand-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-beta {
  font-size: 10px;
  vertical-align: super;
  color: var(--text-muted);
  margin-left: 2px;
  letter-spacing: 0;
  font-weight: 700;
}

.brand-tag {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.main {
  flex: 1;
  padding: 0 16px 16px;
  overflow-x: hidden;
}

.view {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view-active {
  display: block;
}

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

.search-row {
  margin-bottom: 12px;
}

.filter-row {
  margin-bottom: 12px;
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.filter-select:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
}

.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.near-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.geo-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.45;
}

.geo-panel-hint {
  background: var(--accent-dim);
  border-color: rgba(34, 197, 94, 0.28);
}

.geo-panel-denied {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.22);
}

.geo-panel-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--geo-text-title);
}

.geo-panel-text {
  margin: 0 0 10px;
  color: var(--geo-text-body);
}

.geo-panel-hint .geo-panel-text {
  color: var(--geo-text-body);
}

.geo-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--geo-text-body);
}

.geo-device-block {
  margin-top: 12px;
}

.geo-device-heading {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--geo-text-title);
}

.geo-panel-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--geo-text-body);
  opacity: 0.92;
}

.province-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.province-modal[hidden] {
  display: none !important;
}

.province-modal-dialog {
  width: min(520px, 92vw);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.notice-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 78%, transparent);
  color: var(--geo-text-body);
  font-size: 0.88rem;
  line-height: 1.45;
}

.notice-expired {
  border-color: rgba(250, 204, 21, 0.45);
  background: color-mix(in srgb, var(--highlight) 42%, var(--bg-elevated));
  color: var(--geo-text-title);
}

.geo-steps li {
  margin-bottom: 4px;
}

.geo-steps li:last-child {
  margin-bottom: 0;
}

.near-locate,
.near-select {
  min-width: 0;
}

.metro-banner {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  line-height: 1.4;
}

.metro-banner[hidden] {
  display: none !important;
}

.feed-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  min-height: 1.2em;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.category-title {
  margin: 14px 4px 4px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.category-toggle {
  display: block;
  width: calc(100% - 8px);
  text-align: left;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.product-brand {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-wish {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.btn-wish:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.offers-roll {
  margin-top: 12px;
}

.offers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offers-roll-sentinel {
  margin-top: 8px;
  padding: 12px 8px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.offer-complimentaries {
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: pre-line;
}

.offer-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.offer-row-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}

.offer-row-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 14px;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}

.card-action-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

a.card-action-link {
  color: var(--accent);
}

.card-action-link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: none;
}

.card-action-link--strong {
  color: var(--text);
  text-decoration: underline;
}

.btn-wish-heart {
  flex-shrink: 0;
  min-width: 40px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-wish-heart:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--accent-dim);
}

.btn-wish-heart:disabled {
  opacity: 0.85;
  cursor: default;
}

.card-listing-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.offer-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.offer-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.offer-store {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.card-meta .card-store {
  font-weight: 700;
  color: var(--text);
}

.offer-sub {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-word;
}

.btn-icon {
  min-width: 38px;
  min-height: 36px;
  padding: 8px;
  font-size: 1rem;
  line-height: 1;
}

.btn-offer {
  padding: 8px 8px;
  font-size: 0.75rem;
}

.card-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  scroll-snap-align: start;
}

.feed {
  scroll-snap-type: y proximity;
}

.card-post.highlight-match {
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.card-head-text {
  flex: 1;
  min-width: 0;
}

.card-thumb-wrap {
  flex-shrink: 0;
}

.card-thumb {
  display: block;
  width: 112px;
  height: 112px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.card-thumb:hover {
  border-color: rgba(34, 197, 94, 0.45);
}

.card-thumb:active {
  transform: scale(0.98);
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.product-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  flex: 1;
}

.badge-trending {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.45;
}

.price {
  color: var(--accent);
  font-weight: 600;
}

.card-distance {
  font-size: 0.8rem;
  color: var(--distance-text);
  margin-top: 6px;
}

.card-distance.has-distance {
  color: var(--distance-text);
}

.card-seen {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.btn-seen {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-seen:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.4);
  background: var(--accent-dim);
}

.btn-seen:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card-seen-text {
  margin: 0;
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  padding-top: 4px;
}

.card-seen-text.card-seen-stale {
  color: #fbbf24;
}

.card-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  background: var(--bg-elevated);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.image-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(520px, 92vw);
  margin: 0 auto;
  padding: 48px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.image-lightbox-inner > * {
  pointer-events: auto;
}

.image-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.image-lightbox-img {
  max-width: 100%;
  max-height: min(72vh, 480px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.image-lightbox-placeholder {
  width: min(240px, 70vw);
  height: min(240px, 70vw);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.image-lightbox-caption {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4f4f5;
  text-align: center;
  max-width: 100%;
  line-height: 1.35;
}

.load-more {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.load-more:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.view-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-auth-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.admin-json {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.admin-json:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
}

.trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: trend;
}

.trending-item {
  counter-increment: trend;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.trending-item::before {
  content: counter(trend);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 1.5em;
}

.trending-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.trending-count {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 24px;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.req {
  color: var(--danger);
}

.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.field input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
}

.field select:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
}

.media-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.image-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #052e16;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-spot {
  flex: 0 0 auto;
}

.tab-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px calc(10px + var(--safe-bottom));
  background: rgba(247, 247, 248, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  z-index: 20;
}

@media (max-width: 520px) {
  .near-controls {
    grid-template-columns: 1fr;
  }

  .admin-inline {
    grid-template-columns: 1fr;
  }
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 120px;
}

.tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.tab-active {
  color: var(--accent);
}

mark.search-hit {
  background: var(--highlight);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* First-load placeholders while Firestore connects */
.skeleton-card {
  pointer-events: none;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
  margin-bottom: 10px;
}

.skeleton-title {
  height: 18px;
  width: 78%;
  margin-bottom: 14px;
}

.skeleton-meta {
  width: 55%;
}

.skeleton-meta.short {
  width: 38%;
  margin-bottom: 0;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.92;
  }
}
