/* Left and Found — plain, warm, dependable.
   Mobile-first, large print (base 19px), high contrast, big tap targets. */

:root {
  --ink: #1a1a1a;
  --paper: #fffdf8;
  --accent: #7a2e0e;        /* deep warm rust, strong on white */
  --accent-ink: #ffffff;
  --card-border: #5a4632;
  --soft: #f3e9dc;
  --ok: #14532d;
  --err: #8f1d1d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

.site-header {
  padding: 1.25rem 1rem 0.5rem;
  text-align: center;
}
.site-header h1 { font-size: 2.4rem; margin: 0; letter-spacing: 0.01em; }
.tagline { font-size: 1.3rem; font-style: italic; color: var(--accent); margin: 0.25rem 0 0.75rem; }
.intro { max-width: 42rem; margin: 0 auto; }

.tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; padding: 1rem 0.75rem;
  position: sticky; top: 0; background: var(--paper); z-index: 5;
  border-bottom: 3px solid var(--soft);
}
.tab {
  font-size: 1.05rem; padding: 0.7rem 1rem; min-height: 52px;
  border: 2px solid var(--card-border); border-radius: 999px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

main { max-width: 62rem; margin: 0 auto; padding: 0 1rem 2rem; }
.view { display: none; }
.view.active { display: block; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; }

.filters, .form { display: grid; gap: 0.9rem; max-width: 34rem; }
.filters { grid-template-columns: 1fr 1fr; max-width: none; }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr; } }
label { display: grid; gap: 0.3rem; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 0.65rem; min-height: 52px;
  border: 2px solid var(--card-border); border-radius: 10px; background: #fff; color: var(--ink);
}
.big-btn {
  font: inherit; font-weight: 700; padding: 0.85rem 1.4rem; min-height: 56px;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent); border-radius: 12px; cursor: pointer;
}
button { font: inherit; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); margin-top: 1rem; }
.card {
  border: 2px solid var(--card-border); border-radius: 14px; padding: 1rem;
  background: #fff; display: grid; gap: 0.35rem; align-content: start;
}
.card h3 { margin: 0; font-size: 1.3rem; }
.card .side-size { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--soft); }
.badge {
  display: inline-block; background: var(--soft); color: var(--accent);
  font-weight: 700; font-size: 0.9rem; padding: 0.15rem 0.6rem; border-radius: 999px; width: fit-content;
}
.card .request-btn {
  margin-top: 0.6rem; padding: 0.7rem; min-height: 52px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: 10px; cursor: pointer;
}
.card .admin-actions { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.card .admin-actions button { padding: 0.55rem; min-height: 48px; border-radius: 10px; border: 2px solid var(--card-border); background: #fff; cursor: pointer; width: 100%; max-width: 16rem; }
.card .admin-actions input[type="file"] { width: 100%; max-width: 16rem; }

/* Admin view only: keep cards and the lock control from stretching on wide screens. */
#admin-listings.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 340px)); }
#admin-lock { padding: 0.55rem 1rem; min-height: 48px; border-radius: 10px; border: 2px solid var(--card-border); background: #fff; cursor: pointer; width: 100%; max-width: 16rem; }

.mirror-pair { border: 2px solid var(--accent); border-radius: 14px; padding: 1rem; margin-top: 1rem; background: #fff; }
.mirror-pair .pair-cards { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .mirror-pair .pair-cards { grid-template-columns: 1fr; } }

.tally { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin: 0.25rem 0 0.75rem; }

.status { min-height: 1.5em; font-weight: 600; }
.status.error { color: var(--err); }
.status.ok { color: var(--ok); }

.steps li { margin-bottom: 0.75rem; }

dialog { border: 3px solid var(--card-border); border-radius: 16px; max-width: 32rem; width: calc(100% - 2rem); }
dialog::backdrop { background: rgba(0,0,0,0.55); }
dialog form { display: grid; gap: 0.8rem; }
.dialog-buttons { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
.dialog-buttons button { padding: 0.7rem 1.1rem; min-height: 52px; border-radius: 10px; }

.photo-preview { max-width: 100%; border-radius: 10px; border: 2px solid var(--soft); }

.request-row { border: 2px solid var(--card-border); border-radius: 12px; padding: 0.9rem; margin-top: 0.75rem; background: #fff; }
.request-row p { margin: 0.25rem 0; }

footer { text-align: center; padding: 1.5rem 1rem 2.5rem; border-top: 3px solid var(--soft); }
