/* LocalBoard — one small stylesheet, no framework */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1b211e;
  --ink-2: #3a433f;
  --muted: #66716c;
  --line: #e6e2d9;
  --line-2: #d6d1c5;
  --brand: #1d6b4f;
  --brand-2: #155a41;
  --brand-soft: #e5f1eb;
  --accent: #b45309;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.05), 0 6px 20px rgba(20, 30, 25, 0.06);
  --shadow-hover: 0 2px 4px rgba(20, 30, 25, 0.06), 0 12px 28px rgba(20, 30, 25, 0.1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2, .h2 { font-size: 1.35rem; }
.h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; margin-top: 20px; }
:focus-visible { outline: 3px solid #7fb89f; outline-offset: 2px; }

/* ---------- top bar & footer ---------- */
.announce { background: var(--brand); color: #fff; text-align: center; padding: 8px 16px; font-size: 0.95rem; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.93); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; color: var(--brand); flex: none; }
.brand-sm { font-size: 1rem; }
.brand-sm .logo { width: 24px; height: 24px; }
.topnav { display: flex; align-items: center; gap: 14px; }
.topnav-link { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 0 36px; margin-top: 20px; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-in p { margin: 8px 0 0; font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.footer-links a { color: var(--ink-2); font-size: 0.95rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 46px; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-link { background: none; color: var(--brand); padding: 8px 4px; min-height: auto; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-ai { background: var(--brand-soft); color: var(--brand-2); border-color: #cde4d8; }
.btn-ai:hover { border-color: var(--brand); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: 0.92rem; }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; min-height: 52px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- inputs ---------- */
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgba(29, 107, 79, 0.15); }
textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--brand); flex: none; margin: 2px 0 0; }
input[type="file"] { display: none; }
input::placeholder, textarea::placeholder { color: #9aa29e; }

/* ---------- home ---------- */
.hero { background: linear-gradient(160deg, #ffffff 0%, #eaf4ee 100%); border: 1px solid var(--line); border-radius: 22px; padding: 34px 22px 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 0.2em; }
.lead { color: var(--ink-2); font-size: 1.1rem; margin: 0 0 18px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input[type="search"] { flex: 1 1 240px; width: auto; }
.search select { flex: 0 1 190px; width: auto; }
.search .btn { flex: 0 0 auto; min-height: 48px; border-radius: 12px; padding: 0 22px; }
.search-big input[type="search"], .search-big select, .search-big .btn { min-height: 54px; font-size: 1.08rem; }
.host-card { background: #fffaf0; border: 1px solid #f0e2c4; border-radius: var(--radius); padding: 18px 20px; margin: 0 0 22px; }
.host-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.host-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.host-text p { margin: 0 0 8px; }
.section { margin: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2, .section-head h1 { margin: 0; }
.h-emoji { margin-right: 8px; }
.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }

/* ---------- categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; color: var(--ink); font-weight: 600; min-height: 66px; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.cat-tile:hover { text-decoration: none; box-shadow: var(--shadow-hover); border-color: var(--line-2); transform: translateY(-1px); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--tint, #eef0ec); flex: none; }
.cat-label { flex: 1; line-height: 1.25; font-size: 0.97rem; }
.cat-count { font-size: 0.8rem; color: var(--muted); background: #f2f0ea; border-radius: 999px; padding: 2px 8px; font-weight: 650; }
.cat-snow { --tint: #dcedf9; }
.cat-yard { --tint: #e0f2dc; }
.cat-handyman { --tint: #f5e8d6; }
.cat-trades { --tint: #e3e9f2; }
.cat-cleaning { --tint: #dcf1ee; }
.cat-food { --tint: #fbe5d6; }
.cat-farm { --tint: #fde3cc; }
.cat-lessons { --tint: #e8e1f6; }
.cat-childcare { --tint: #fbe1e9; }
.cat-pets { --tint: #f1e8d8; }
.cat-beauty { --tint: #f7e0ee; }
.cat-auto { --tint: #e2e6ec; }
.cat-crafts { --tint: #f4e2dc; }
.cat-shops { --tint: #e3eafb; }
.cat-events { --tint: #fcefcc; }
.cat-other { --tint: #ebeee9; }

/* ---------- listing cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; color: var(--ink); transition: box-shadow 0.15s, border-color 0.15s; }
.card:hover { text-decoration: none; box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.card-thumb { width: 104px; height: 104px; border-radius: 10px; overflow: hidden; flex: none; background: var(--tint, #eef0ec); display: grid; place-items: center; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-emoji { font-size: 2.3rem; }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 2px 2px 2px 0; }
.card-title { font-weight: 650; font-size: 1.04rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { color: var(--brand-2); font-weight: 700; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--muted); font-size: 0.86rem; margin-top: auto; }
.card-meta span:not(:first-child)::before { content: "· "; }
.empty { text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 36px 20px; }
.empty-icon { font-size: 2rem; margin-bottom: 6px; }
.empty h3 { font-size: 1.15rem; }

/* ---------- search ---------- */
.search-top { display: grid; gap: 12px; margin-bottom: 20px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 2px 16px 6px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--ink-2); }
.chip-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- listing page ---------- */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.listing { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .listing { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .listing-side { position: sticky; top: 80px; }
}
.gallery { margin-bottom: 18px; }
.gallery-main { width: 100%; max-height: 520px; object-fit: contain; background: #ece9e1; border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery-thumbs a { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: 0.75; }
.gallery-thumbs a.on { border-color: var(--brand); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.listing-title { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 6px; }
.listing-price { font-size: 1.35rem; font-weight: 750; color: var(--brand-2); margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tint, #f0eee8); color: var(--ink-2); font-size: 0.9rem; font-weight: 600; }
.tag:hover { text-decoration: none; }
.tag-plain { background: transparent; border: 1px solid var(--line); font-weight: 500; color: var(--muted); }
.details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 16px; margin: 0 0 18px; }
.details > div { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.details > div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; }
@media (max-width: 520px) { .details > div { grid-template-columns: 1fr; gap: 2px; } }
.desc { font-size: 1.05rem; overflow-wrap: anywhere; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.contact-card p { margin: 0; }
.contact-biz { font-weight: 750; font-size: 1.15rem; color: var(--ink); }
.verified { color: var(--brand); font-size: 0.92rem; font-weight: 650; }
.side-more { margin-top: 22px; }
.side-more .cards { grid-template-columns: 1fr; }
.report { margin-top: 22px; font-size: 0.93rem; }
.report summary { cursor: pointer; color: var(--muted); }
.report form { display: grid; gap: 8px; margin-top: 10px; }
.radio, .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
body.has-bottombar { padding-bottom: 76px; }
@media (min-width: 900px) {
  .bottombar { display: none; }
  body.has-bottombar { padding-bottom: 0; }
}
.biz-head { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.biz-head h1 { margin-bottom: 4px; }
.biz-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- forms ---------- */
.narrow { max-width: 580px; margin: 0 auto; }
.lead-sm { color: var(--ink-2); font-size: 1.05rem; }
.form { display: grid; gap: 18px; margin-top: 18px; }
.form-wide { max-width: 760px; }
.field { display: grid; gap: 6px; }
.field > span, .field-row label { font-weight: 650; }
.field small { color: var(--muted); font-size: 0.86rem; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.static { padding: 10px 0; color: var(--ink-2); }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; display: grid; gap: 14px; background: #fff; margin: 0; }
.box legend { font-weight: 700; padding: 0 6px; }
.note { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; color: var(--brand-2); }
.note p { margin: 0 0 6px; }
.note p:last-child { margin: 0; }
.code-input { font-size: 1.7rem; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.flash { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-weight: 550; }
.flash-ok { background: #e4f3ea; color: #145c41; }
.flash-warn { background: #fff3d9; color: #6f4800; }
.flash-err { background: #fde8e6; color: #9a1c12; }
.tpl-list { display: grid; gap: 12px; margin-top: 16px; }
.tpl { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
.tpl:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow); }
.tpl-emoji { font-size: 1.7rem; width: 54px; height: 54px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 14px; flex: none; }
.tpl strong { display: block; font-size: 1.08rem; }
.tpl small { color: var(--muted); font-size: 0.92rem; }
.tpl-go { margin-left: auto; font-size: 1.6rem; color: var(--muted); }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eceae4; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.loading::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.55) center / 28px no-repeat; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.35; } to { opacity: 0.85; } }
.photo-x { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; color: var(--brand); font-weight: 650; cursor: pointer; text-align: center; padding: 8px; font-size: 0.95rem; }
.photo-add:hover { border-color: var(--brand); }
.photo-add[hidden] { display: none; }

/* ---------- my posts ---------- */
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.account-head h1 { margin-bottom: 2px; }
.account-head p { margin: 0; }
.mylist { display: grid; gap: 12px; }
.myitem { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.myitem-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--tint, #eef0ec); font-size: 2rem; }
.myitem-thumb:hover { text-decoration: none; }
.myitem-thumb img { width: 100%; height: 100%; object-fit: cover; }
.myitem-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.myitem-title { font-weight: 650; color: var(--ink); }
.myitem-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 0.88rem; }
.myitem-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.signout { margin-top: 28px; text-align: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: #eee; color: #444; }
.pill-active { background: #e1f2e8; color: #145c41; }
.pill-pending { background: #fff0d2; color: #6f4800; }
.pill-expired { background: #eceae4; color: #5d5a52; }
.pill-removed, .pill-rejected { background: #fde8e6; color: #9a1c12; }

/* ---------- text pages ---------- */
.prose { max-width: 740px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; }
.prose h2 { margin-top: 1.4em; font-size: 1.2rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.35em 0; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.admin-tabs a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; }
.admin-tabs a:hover { text-decoration: none; background: #fff; }
.admin-tabs a.on { background: var(--ink); color: #fff; }
.admin-tabs form { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 22px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; }
.stats strong { font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: 0.88rem; }
.arow { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.arow-main { flex: 1 1 320px; min-width: 0; }
.arow-title { font-weight: 650; color: var(--ink); }
.arow-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 0.86rem; margin-top: 4px; align-items: center; }
.arow-desc { margin: 6px 0 0; color: var(--ink-2); font-size: 0.92rem; }
.arow-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.reject-form { display: flex; gap: 6px; }
.reject-form input { min-height: 36px; padding: 6px 10px; font-size: 0.9rem; width: 210px; }
.admin-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-filter input { flex: 1 1 220px; width: auto; }
.admin-filter select { width: auto; }

@media (max-width: 560px) {
  .search select, .search .btn { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .brand span { font-size: 1.05rem; }
  .topnav { gap: 10px; }
  .topnav .btn-sm { padding: 7px 12px; }
  .hero { padding: 26px 16px 20px; }
  .card-thumb { width: 92px; height: 92px; }
}
