/* Neighborhood Lost & Found
   Direction: a village notice board — oat paper, pine-green boards, one
   marigold pin. Warm, plain-spoken, legible at arm's length on a phone. */

:root {
  /* palette */
  --paper:      #F4EEE2;
  --paper-2:    #EDE5D5;
  --card:       #FFFBF3;
  --ink:        #1E241F;
  --ink-2:      #55604F;
  --ink-3:      #666E5D;
  --pine:       #23392E;
  --pine-2:     #2E4B3B;
  --marigold:   #E9A53B;
  --marigold-2: #D68F22;
  --rust:       #9A4526;
  --moss:       #2F6B45;
  --line:       #DDD2BE;
  --line-2:     #C9BCA3;

  /* type */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Karla', 'Helvetica Neue', Arial, sans-serif;

  /* spacing */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --r-sm: 6px; --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(31,36,31,.05), 0 8px 24px -12px rgba(31,36,31,.28);
  --shadow-lg: 0 2px 6px rgba(31,36,31,.06), 0 28px 60px -24px rgba(31,36,31,.4);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  /* the cork-board grain: two faint dot layers, no image request */
  background-image:
    radial-gradient(rgba(122,104,72,.10) 1px, transparent 1.2px),
    radial-gradient(rgba(122,104,72,.07) 1px, transparent 1.2px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--rust); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
@media (max-width: 560px) { .wrap { width: min(1160px, 100% - 32px); } }

.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;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--marigold); color: var(--ink); font-weight: 700;
  padding: 10px 16px; border-radius: var(--r-sm); transition: top .18s;
}
.skip:focus { top: 12px; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--marigold-2);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--body); font-size: 16px; font-weight: 700; line-height: 1.2;
  border: 1.5px solid transparent; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn-primary { background: var(--marigold); color: #24200F; box-shadow: 0 2px 0 var(--marigold-2); }
.btn-primary:hover { background: #F2B451; color: #24200F; transform: translateY(-1px); box-shadow: 0 3px 0 var(--marigold-2); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 0 0 var(--marigold-2); }
.btn-ghost { background: transparent; color: #F4EEE2; border-color: rgba(244,238,226,.45); }
.btn-ghost:hover { background: rgba(244,238,226,.12); color: #fff; border-color: rgba(244,238,226,.8); }
.btn-ghost:active { transform: translateY(1px); }
.btn-quiet { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { background: #fff; border-color: var(--ink-3); color: var(--ink); }
.btn-quiet:active { transform: translateY(1px); }
.btn-danger { background: transparent; color: var(--rust); border-color: rgba(154,69,38,.4); }
.btn-danger:hover { background: rgba(154,69,38,.08); border-color: var(--rust); color: var(--rust); }
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: 15px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-block { width: 100%; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244,238,226,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand:hover .mk-lens { fill: rgba(233,165,59,.35); }
.mark { width: 38px; height: 38px; flex: none; }
.mark-lg { width: 46px; height: 46px; }
.mk-lens { fill: rgba(233,165,59,.22); stroke: var(--ink); stroke-width: 2.4; transition: fill .2s; }
.mk-house { fill: none; stroke: var(--ink); stroke-width: 2.1; stroke-linejoin: round; }
.mk-heart { fill: var(--rust); stroke: none; }
.mk-handle { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.foot .mk-lens { fill: rgba(233,165,59,.3); stroke: #F4EEE2; }
.foot .mk-house, .foot .mk-handle { stroke: #F4EEE2; }
.foot .mk-heart { fill: var(--marigold); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.brand-text em { font-style: normal; font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
@media (max-width: 700px) {
  .brand-text em { display: none; }
  .brand-text strong { font-size: 17px; max-width: 9.5em; }
  .mark { width: 34px; height: 34px; }
}
@media (max-width: 430px) {
  .topbar-cta span { display: none; }
  .topbar-cta { padding: 9px; width: 44px; }
  .topbar-cta .ic { width: 20px; height: 20px; }
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  background: var(--pine);
  background-image:
    radial-gradient(120% 90% at 88% -10%, rgba(233,165,59,.20), transparent 55%),
    radial-gradient(90% 70% at 0% 110%, rgba(47,107,69,.35), transparent 60%);
  color: #F4EEE2;
  padding: clamp(56px, 9vw, 108px) 0 clamp(64px, 10vw, 116px);
  overflow: hidden;
}
.hero::after {
  /* a torn-paper edge into the next band */
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
  background: var(--paper);
  -webkit-mask-image: radial-gradient(14px 26px at 14px 0, transparent 99%, #000 100%);
  mask-image: radial-gradient(14px 26px at 14px 0, transparent 99%, #000 100%);
  -webkit-mask-size: 28px 26px; mask-size: 28px 26px;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
}
/* An oversized outline of the mark, bleeding off the right edge — fills the
   wide-screen space without competing with the headline. */
.hero::before {
  content: ''; position: absolute; right: -70px; top: 50%; width: 460px; height: 460px;
  transform: translateY(-50%) rotate(-8deg);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><g fill='none' stroke='%23E9A53B' stroke-width='1.5'><circle cx='17.5' cy='17.5' r='12.5'/><path d='M10.6 18.6 17.5 12.2l6.9 6.4v5.9a1.6 1.6 0 0 1-1.6 1.6h-3.3v-4.4h-4v4.4h-3.3a1.6 1.6 0 0 1-1.6-1.6z' stroke-linejoin='round'/><path d='M17.5 22.4c-1.9-1.6-3-2.5-3-3.7a1.7 1.7 0 0 1 3-1.05A1.7 1.7 0 0 1 20.5 18.7c0 1.2-1.1 2.1-3 3.7z'/><path d='M26.6 26.6 35 35' stroke-width='2.6' stroke-linecap='round'/></g></svg>") center / contain no-repeat;
  opacity: .16; pointer-events: none;
}
@media (max-width: 1080px) { .hero::before { display: none; } }
.hero-in { position: relative; max-width: 760px; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--marigold); margin-bottom: var(--s4);
}
.hero h1 {
  font-size: clamp(2.55rem, 7.4vw, 4.5rem);
  line-height: 1.02; letter-spacing: -.03em; color: #FBF7EE;
}
.lede {
  margin-top: var(--s5); max-width: 54ch;
  font-size: clamp(17px, 2.2vw, 19.5px); line-height: 1.62; color: #D9DCCF;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s6); }
.hero-stat {
  margin-top: var(--s5); font-size: 14.5px; color: #A9B3A2; letter-spacing: .01em;
}
.hero-stat b { color: var(--marigold); font-weight: 700; }

@media (max-width: 620px) {
  .hero { padding: 40px 0 48px; }
  .lede { margin-top: var(--s4); font-size: 16.5px; }
  .hero-cta { margin-top: var(--s5); }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-stat { margin-top: var(--s4); }
  .how { padding: 40px 0 32px; }
}

/* ---------------- how it works ---------------- */
.section-h { font-size: clamp(1.55rem, 3.4vw, 2.15rem); letter-spacing: -.02em; }
.how { padding: clamp(48px, 7vw, 84px) 0 clamp(40px, 6vw, 64px); }
.steps {
  list-style: none; margin: var(--s6) 0 0; padding: 0;
  display: grid; gap: var(--s5); grid-template-columns: repeat(3, 1fr);
}
.steps li {
  position: relative; padding: var(--s5) var(--s5) var(--s5);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.step-n {
  position: absolute; top: -14px; left: var(--s5);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--marigold); color: #24200F;
  font-weight: 700; font-size: 15px; box-shadow: 0 2px 0 var(--marigold-2);
}
.step-ic {
  width: 42px; height: 42px; margin: var(--s2) 0 var(--s3);
  fill: none; stroke: var(--pine-2); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: var(--s6); } }
/* Tablet: stacked, but read sideways so the section stays compact. */
@media (min-width: 601px) and (max-width: 860px) {
  .steps { gap: var(--s5); }
  .steps li { display: grid; grid-template-columns: 46px 1fr; column-gap: 20px; padding-top: var(--s6); }
  .step-ic { grid-column: 1; grid-row: 1 / span 2; margin: 2px 0 0; width: 46px; height: 46px; }
  .steps h3, .steps p { grid-column: 2; }
}

/* ---------------- board ---------------- */
.board-sec { padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 9vw, 104px); scroll-margin-top: 84px; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.board-cta { flex: none; }
@media (max-width: 560px) { .board-cta { display: none; } }

.filters {
  margin-top: var(--s5); padding: var(--s4);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  display: grid; gap: var(--s3);
}
.search-wrap { position: relative; display: flex; align-items: center; }
.ic-search {
  position: absolute; left: 14px; width: 19px; height: 19px; pointer-events: none;
  fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round;
}
.filters input[type="search"] {
  width: 100%; min-height: 48px; padding: 12px 16px 12px 42px;
  font-family: var(--body); font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 999px;
  transition: border-color .15s, background-color .15s;
}
.filters input[type="search"]::placeholder { color: var(--ink-3); }
.filters input[type="search"]:hover { border-color: var(--ink-3); }
.filters input[type="search"]:focus { background: #fff; border-color: var(--pine-2); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Ten categories stack into five rows on a phone — scroll them instead. */
@media (max-width: 620px) {
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    margin: -5px -16px 0; padding: 5px 16px 8px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }
}
.chip {
  min-height: 40px; padding: 8px 15px;
  font-family: var(--body); font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  background: transparent; border: 1.5px solid var(--line-2); border-radius: 999px;
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--pine-2); color: var(--ink); background: rgba(46,75,59,.06); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #F7F2E6; font-weight: 700; }
.chip[aria-pressed="true"]:hover { background: var(--pine-2); color: #fff; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--ink-2); min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-box {
  width: 22px; height: 22px; flex: none; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: var(--paper);
  display: grid; place-items: center; transition: all .15s;
}
.toggle-box svg { width: 14px; height: 14px; fill: none; stroke: #F7F2E6; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .12s; }
.toggle:hover .toggle-box { border-color: var(--pine-2); }
.toggle input:checked + .toggle-box { background: var(--pine); border-color: var(--pine); }
.toggle input:checked + .toggle-box svg { opacity: 1; }
.toggle input:focus-visible + .toggle-box { outline: 3px solid var(--marigold-2); outline-offset: 2px; }

.result-count { margin: var(--s5) 0 var(--s4); font-size: 14px; color: var(--ink-3); letter-spacing: .01em; }

.grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer;
  font: inherit; color: inherit; padding: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card:active { transform: translateY(-1px); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-photo img { transform: scale(1.035); }
.card.is-claimed .card-photo img { filter: saturate(.55) brightness(1.03); }

.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, #EFE7D6, #E3DAC5); }
.ph svg { width: 44%; height: 44%; fill: none; stroke: rgba(35,57,46,.36); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.badge {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  background: rgba(255,251,243,.94); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--marigold-2); }
.badge.claimed { background: var(--moss); color: #F2F7F0; }
.badge.claimed::before { background: #A8DCB8; }

.card-body { padding: var(--s4) var(--s4) var(--s5); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.card-meta { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 1.42; color: var(--ink-2); }
.card-meta svg { width: 15px; height: 15px; flex: none; margin-top: 3px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-meta span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill {
  align-self: flex-start; padding: 3px 10px; border-radius: 999px;
  background: rgba(46,75,59,.09); color: var(--pine-2);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.card-foot { margin-top: auto; padding-top: 4px; font-size: 13.5px; color: var(--ink-3); }

/* skeletons */
.skel { pointer-events: none; }
.skel .card-photo { background: linear-gradient(100deg, #EDE5D5 30%, #F6F0E3 50%, #EDE5D5 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.skel .card-body span { display: block; height: 13px; border-radius: 4px; background: #EDE5D5; }
.skel .card-body span:first-child { width: 70%; height: 19px; }
.skel .card-body span:last-child { width: 45%; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .skel .card-photo { animation: none; } }

/* empty + error states */
.state {
  grid-column: 1 / -1; text-align: center; padding: clamp(40px, 7vw, 72px) var(--s5);
  background: var(--card); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
}
.state svg { width: 92px; height: 92px; margin: 0 auto var(--s4); fill: none; stroke: var(--line-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.state h3 { font-size: 22px; margin-bottom: 8px; }
.state p { color: var(--ink-2); max-width: 42ch; margin: 0 auto var(--s5); }
.state.error { border-style: solid; border-color: rgba(154,69,38,.4); background: #FDF4EF; }
.state.error svg { stroke: var(--rust); }

/* Phones: one column, but laid out sideways so a neighbour can scan eight
   things in a couple of thumb-flicks instead of eight screenfuls. */
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; gap: var(--s3); }
  .card { flex-direction: row; align-items: stretch; }
  .card-photo { aspect-ratio: auto; width: 128px; flex: none; align-self: stretch; }
  .card-body { padding: var(--s3) var(--s4) var(--s3) var(--s3); gap: 6px; min-width: 0; }
  .card-title { font-size: 18px; }
  .card .badge { top: 6px; right: auto; left: 6px; font-size: 11px; padding: 3px 8px; }
  .card .badge::before { width: 6px; height: 6px; }
  .card-meta { font-size: 13.5px; }
  .card-foot { font-size: 13px; }
  .skel .card-photo { min-height: 112px; }
  .state { padding: 40px 20px; }
}

/* ---------------- footer ---------------- */
.foot {
  background: var(--pine); color: #CFD6C9;
  padding: clamp(48px, 7vw, 80px) 0 var(--s6);
  font-size: 15px;
}
.foot-in { display: grid; gap: var(--s6); grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
@media (max-width: 900px) { .foot-in { grid-template-columns: 1fr; gap: var(--s6); } }
.foot-brand { display: flex; gap: var(--s3); align-items: flex-start; max-width: 34ch; }
.foot-brand strong { font-family: var(--display); font-size: 18px; color: #FBF7EE; font-weight: 600; }
.foot-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--marigold); font-family: var(--body); font-weight: 700; margin-bottom: var(--s3); }
.foot-col ul { margin: 0; padding-left: 1.1em; display: grid; gap: 9px; }
.foot-col li { line-height: 1.55; font-size: 14.5px; }
.foot-col strong { color: #FBF7EE; }
.foot a { color: var(--marigold); }
.foot a:hover { color: #F7CE8C; }
.colophon {
  grid-column: 1 / -1; margin-top: var(--s5); padding-top: var(--s5);
  border-top: 1px solid rgba(244,238,226,.16); font-size: 13.5px; color: #A3AE9D;
}

/* ---------------- modal ---------------- */
dialog#modal {
  border: 0; padding: 0; background: transparent;
  width: min(640px, 100%); max-width: 100%; max-height: 100dvh;
  margin: auto; overflow: visible;
}
dialog#modal::backdrop { background: rgba(23,30,24,.62); backdrop-filter: blur(3px); }
.sheet {
  position: relative;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-height: min(92dvh, 900px); overflow-y: auto; overscroll-behavior: contain;
}
dialog#modal[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { dialog#modal[open] { animation: none; } }

@media (max-width: 620px) {
  dialog#modal { width: 100%; margin: auto 0 0; }
  .sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94dvh; }
}

.x {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgba(255,251,243,.92); border: 1px solid var(--line);
  display: grid; place-items: center; transition: background-color .15s, transform .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.x svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.x:hover { background: #fff; transform: rotate(90deg); }

.m-pad { padding: var(--s6) clamp(20px, 4vw, 36px) var(--s6); }
.m-head { padding-right: 52px; }
.m-kicker { font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--rust); margin-bottom: 10px; }
.m-title { font-size: clamp(1.5rem, 4.4vw, 2rem); line-height: 1.12; letter-spacing: -.025em; }
.m-sub { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }

.detail-photo { position: relative; background: var(--paper-2); aspect-ratio: 4 / 3; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
/* left, so it never fights the close button */
.detail-photo .badge { top: 14px; left: 14px; right: auto; font-size: 13px; padding: 6px 13px; }

.facts { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: 2px; border-top: 1px solid var(--line); }
.facts li { display: flex; gap: var(--s4); padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.facts dt, .facts .k { flex: none; width: 8.5em; color: var(--ink-3); font-size: 13.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; padding-top: 2px; }
.facts .v { color: var(--ink); }
@media (max-width: 480px) { .facts li { flex-direction: column; gap: 2px; } .facts .k { width: auto; } }

.desc { margin-top: var(--s5); font-size: 16.5px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

.note {
  margin-top: var(--s5); padding: var(--s4) var(--s5);
  background: rgba(233,165,59,.13); border: 1px solid rgba(214,143,34,.35);
  border-radius: var(--r); font-size: 15px; line-height: 1.55; color: #4A3A18;
}
.note h3 { font-family: var(--display); font-size: 17px; margin: 0 0 6px; font-weight: 600; color: #3A2E12; }
.note ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 5px; }
.note.calm { background: rgba(46,75,59,.07); border-color: rgba(46,75,59,.2); color: var(--ink-2); }
.note.calm h3 { color: var(--pine); }
.note.good { background: rgba(47,107,69,.1); border-color: rgba(47,107,69,.3); color: #244F33; }
.note.good h3 { color: var(--moss); }

.privacy-line { display: flex; gap: 8px; align-items: flex-start; margin-top: var(--s3); font-size: 14px; color: var(--ink-2); }
.privacy-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: var(--moss); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s6); }
.actions .btn { flex: 1 1 auto; }

/* ---------------- forms ---------------- */
.field { margin-top: var(--s5); }
.field > label, .field .lbl { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; font-size: 13.5px; color: var(--ink-3); margin-top: -2px; margin-bottom: 8px; line-height: 1.45; }
.field input[type="text"], .field input[type="date"], .field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 15px;
  font-family: var(--body); font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s, background-color .15s;
}
.field textarea { min-height: 116px; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2355604F' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px;
  padding-right: 40px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--pine-2); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--rust); background: #FDF5F1; }
.err { display: none; margin-top: 6px; font-size: 14px; color: var(--rust); font-weight: 500; }
.field.bad .err { display: block; }
.counter { float: right; font-size: 13px; color: var(--ink-3); font-weight: 400; }
/* Two fields side by side keep their inputs on one line even when one hint
   wraps and the other doesn't. */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: stretch; }
.row2 .field { display: flex; flex-direction: column; }
.row2 .field input { margin-top: auto; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; gap: 0; } .row2 .field input { margin-top: 0; } }

.drop {
  display: block; border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: var(--paper); padding: var(--s5); text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover { border-color: var(--pine-2); background: #fff; }
.drop svg { width: 34px; height: 34px; margin: 0 auto 8px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop b { display: block; font-size: 15.5px; }
.drop span { font-size: 13.5px; color: var(--ink-3); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview { margin-top: var(--s3); display: flex; gap: var(--s4); align-items: center; }
.preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line-2); }
.preview p { font-size: 14px; color: var(--ink-2); }

.form-foot { margin-top: var(--s6); display: flex; flex-direction: column; gap: 12px; }
.form-error {
  display: none; padding: 12px 16px; border-radius: var(--r);
  background: #FBEDE6; border: 1px solid rgba(154,69,38,.35); color: #7C3419; font-size: 15px;
}
.form-error.on { display: block; }

/* ---------------- manage / success ---------------- */
.linkbox {
  margin-top: var(--s4); display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
}
.linkbox input {
  flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 12px 14px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 13.5px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r); color: var(--ink);
}
.claims { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s4); }
.claim {
  padding: var(--s4) var(--s5); background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--marigold); border-radius: var(--r);
}
.claim-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.claim-h strong { font-family: var(--display); font-size: 18px; font-weight: 600; }
.claim-h time { font-size: 13px; color: var(--ink-3); }
.claim-c { margin-top: 4px; font-size: 15px; }
.claim-c a { font-weight: 700; }
.claim-p { margin-top: 10px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

.mini-item { display: flex; gap: var(--s4); align-items: center; margin-top: var(--s5); padding: var(--s3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.mini-item img, .mini-item .ph { width: 72px; height: 72px; flex: none; border-radius: var(--r-sm); object-fit: cover; }
.mini-item .ph svg { width: 50%; height: 50%; }
.mini-item b { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; }
.mini-item span { font-size: 14px; color: var(--ink-2); }

.admin-list { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; }
.admin-list li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.admin-list b { font-size: 15px; font-family: var(--display); font-weight: 600; }
.admin-list span { font-size: 13px; color: var(--ink-3); display: block; }
.admin-list .grow { flex: 1; min-width: 0; }
.admin-list .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  z-index: 80; max-width: min(440px, calc(100% - 32px));
  padding: 13px 20px; border-radius: 999px;
  background: var(--pine); color: #F4EEE2; font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.spin {
  display: inline-block; width: 16px; height: 16px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
