:root {
  color-scheme: light;
  --ink: #17332e;
  --muted: #5f6f6b;
  --forest: #17483f;
  --forest-2: #246558;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --gold: #efb44b;
  --peach: #f1a07e;
  --sage: #dce9df;
  --sky: #d9ecf2;
  --line: #d9dfda;
  --danger: #a93636;
  --success: #24724e;
  --shadow: 0 12px 34px rgba(23, 51, 46, .12);
  --radius: 22px;
  --tap: 48px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--cream); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 0%, rgba(239, 180, 75, .18), transparent 26rem),
    linear-gradient(180deg, #fffdf9 0, var(--cream) 42rem);
  font-size: 17px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 4px solid #176da3;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 100;
  padding: .75rem 1rem;
  color: white;
  background: var(--forest);
  border-radius: 10px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: .72rem clamp(1rem, 4vw, 2rem);
  background: rgba(255, 253, 248, .92);
  border-bottom: 1px solid rgba(217, 223, 218, .8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: var(--tap);
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  text-align: left;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  background: var(--forest);
  border-radius: 14px 14px 14px 5px;
  font-weight: 900;
  letter-spacing: -.05em;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .72rem; }

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: var(--tap);
  padding: .3rem .7rem .3rem .35rem;
  color: var(--forest);
  background: var(--sage);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.profile-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--forest);
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: -.02em;
}
.profile-button b { font-size: .95rem; }

.profile-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.profile-summary > .secondary,
.profile-summary > .primary {
  grid-column: 1 / -1;
}

.profile-picture {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 3px solid var(--cream);
  border-radius: 50%;
  color: white;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 1.35rem;
  font-weight: 850;
}

#app {
  width: min(100%, 1180px);
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 4vw, 2rem) 7.8rem;
}

.page { animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page { animation: none; }
}

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--forest-2);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .8rem; font-size: clamp(2rem, 8vw, 3.8rem); line-height: 1.02; letter-spacing: -.055em; }
h2 { margin-bottom: .7rem; font-size: clamp(1.45rem, 5vw, 2.15rem); line-height: 1.12; letter-spacing: -.035em; }
h3 { margin-bottom: .45rem; font-size: 1.08rem; line-height: 1.25; }
.lede { max-width: 42rem; color: #435b56; font-size: clamp(1rem, 3.8vw, 1.22rem); }
.muted { color: var(--muted); }
.tiny { font-size: .94rem; }

.status-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.7rem + env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .8rem;
  width: min(calc(100% - 1.5rem), 42rem);
  min-height: 54px;
  padding: .7rem .7rem .7rem 1rem;
  color: white;
  background: #123c34;
  border: 2px solid white;
  border-radius: 16px;
  box-shadow: 0 14px 45px rgba(9, 28, 24, .32);
  transform: translateX(-50%);
  pointer-events: none;
}
.status-toast[hidden] { display: none; }
.status-toast.over-compose { bottom: calc(10rem + env(safe-area-inset-bottom)); }
.status-toast-message { min-width: 0; flex: 1; overflow-wrap: anywhere; font-weight: 750; }
.status-toast button {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  color: white;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  font-size: 1.45rem;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0;
}
.duration-grid button { min-height: 64px; }
.group-choice-fieldset {
  display: grid;
  gap: .65rem;
  padding: 0;
  border: 0;
}
.group-choice-fieldset legend {
  margin-bottom: .65rem;
  font-weight: 820;
}
.group-choice-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 56px;
  padding: .7rem .85rem;
  background: white;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.group-choice-row:has(input:checked) {
  background: #edf8f2;
  border-color: var(--forest);
}
.group-choice-row input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
}
.group-choice-row span { display: grid; gap: .1rem; }
.group-choice-row small { color: var(--muted); }
.required-acknowledgment {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  min-height: 56px;
  margin-top: 1rem;
  padding: .8rem;
  background: #fff8e8;
  border: 2px solid #d4a844;
  border-radius: 14px;
  cursor: pointer;
}
.required-acknowledgment input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
}
.required-acknowledgment span { display: grid; gap: .2rem; }
.required-acknowledgment small { color: var(--muted); }
.duration-custom {
  display: grid;
  grid-template-columns: 1fr auto 72px 1fr;
  align-items: center;
  gap: .55rem;
  margin: 1rem 0;
}
.duration-custom label { font-weight: 800; }
.duration-custom input { text-align: center; }

@media (max-width: 430px) {
  .duration-custom { grid-template-columns: 1fr 1fr; }
  .duration-custom label { text-align: right; }
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 1rem 0;
  padding: .9rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
}
.check-row input {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: .1rem;
}
.form-error {
  min-height: 1.5rem;
  margin: .5rem 0;
  color: var(--danger);
  font-weight: 750;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 6vw, 3rem);
  background: linear-gradient(135deg, #eef5ed 0%, #fff7e9 55%, #f7dcc8 100%);
  border: 1px solid #e1dfd1;
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  right: -4.5rem;
  bottom: -6rem;
  width: 15rem;
  height: 15rem;
  border: 2.5rem solid rgba(23, 72, 63, .08);
  border-radius: 50%;
}
.hero > * { position: relative; z-index: 1; }
.hero-home {
  display: grid;
  padding: 0;
  background: #eef5ed;
}
.hero-home::after { display: none; }
.hero-copy { padding: clamp(1.35rem, 6vw, 3rem); }
.hero-visual {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #d7e3d9;
}
.hero-visual img {
  display: block;
  width: 100%;
  height: clamp(215px, 58vw, 340px);
  object-fit: cover;
  object-position: 68% center;
}
.hero-visual figcaption {
  position: absolute;
  right: .65rem;
  bottom: .65rem;
  padding: .32rem .55rem;
  color: white;
  background: rgba(13, 48, 41, .82);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 720;
}
.location-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.location-chip, .scope-chip, .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .32rem .65rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 780;
}
.location-chip { color: #17483f; background: rgba(255,255,255,.78); border: 1px solid #b9d0c5; }
.scope-chip { color: #31534c; background: var(--sage); }
.scope-chip.private { color: #51401a; background: #f5e6b8; }
.status-pill { color: #254a40; background: #e4efe8; }
.status-pill.pending { color: #60450e; background: #ffe8a8; }
.status-pill.sold { color: #5f6262; background: #e7e9e8; }
.status-pill.free { color: #6e2947; background: #f7dce9; }
.phone-verified-badge { display:inline-flex; align-items:center; min-height:30px; margin:.25rem 0 0 .35rem; padding:.2rem .55rem; border:1px solid #8db9aa; border-radius:999px; color:var(--forest); background:#e4efe8; font:inherit; font-size:.78rem; font-weight:800; cursor:pointer; }

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .55rem;
  max-width: 38rem;
  margin-top: 1.1rem;
}
.search-bar input, .field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  color: var(--ink);
  background: white;
  border: 2px solid #cbd5cf;
  border-radius: 14px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-bar input:focus { border-color: var(--forest-2); }
.field { display: grid; gap: .38rem; margin-bottom: 1rem; }
.field label, .field > span { font-weight: 780; }
.field-help { color: var(--muted); font-size: .86rem; }
.currency-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  background: white;
  border: 1px solid #b8c9c5;
  border-radius: 12px;
}
.currency-input > span {
  padding-left: .85rem;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 900;
}
.currency-input input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.currency-input:focus-within {
  outline: 3px solid rgba(15, 112, 104, .18);
  border-color: var(--teal);
}
.agreement-history {
  display: grid;
  gap: .65rem;
  margin-top: .8rem;
}
.agreement-history-row {
  display: grid;
  gap: .16rem;
  padding: .75rem;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(15, 73, 62, .16);
  border-radius: 12px;
}
.agreement-history-row span,
.agreement-history-row small { color: var(--muted); }

.primary, .secondary, .quiet, .danger, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: var(--tap);
  padding: .7rem 1rem;
  border-radius: 14px;
  font-weight: 820;
  text-decoration: none;
}
.primary { color: white; background: var(--forest); border: 2px solid var(--forest); }
.primary:hover { background: #0e3a32; }
.secondary { color: var(--forest); background: white; border: 2px solid #aac4ba; }
.quiet { color: var(--forest); background: transparent; border: 2px solid transparent; }
.danger { color: white; background: var(--danger); border: 2px solid var(--danger); }
.primary:disabled, .secondary:disabled { opacity: .52; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.button-row > * { flex: 1 1 9rem; }

.section { margin-top: 2rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-head h2 { margin-bottom: 0; }

.home-entry {
  padding: .35rem 0 0;
}
.home-page { max-width: 68rem; margin: 0 auto; }
.home-entry > h1 {
  max-width: none;
  margin-bottom: .35rem;
  font-size: clamp(2.15rem, 10vw, 4rem);
  line-height: 1.02;
  text-align: center;
}
.home-entry > .lede {
  margin: 0 auto .9rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
}
.door-grid { display: grid; gap: 1rem; margin-top: .65rem; }
.door {
  display: grid;
  grid-template-columns: clamp(104px, 30vw, 124px) minmax(0, 1fr);
  grid-template-rows: minmax(128px, auto);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  width: 100%;
  min-height: 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid #d4ded8;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(23, 51, 46, .11);
  text-align: left;
}
.door:hover { border-color: #6d9d8c; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(23, 51, 46, .15); }
.door:focus-visible { outline-offset: 4px; }
.door-photo-wrap { min-width: 0; min-height: 0; background: #dfe7df; }
.door-photo { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.door:nth-child(2) .door-photo { object-position: center 46%; }
.door-content { position: relative; display: grid; align-content: center; justify-items: start; gap: .4rem; min-width: 0; padding: .9rem 3rem .9rem 1rem; overflow-wrap: anywhere; text-align: left; }
.door strong, .door small { display: block; }
.door strong { font-size: clamp(1.35rem, 5.8vw, 1.7rem); line-height: 1.08; }
.door small { max-width: 27ch; color: var(--muted); font-size: 1rem; line-height: 1.3; }
.door-arrow { position: absolute; right: .85rem; bottom: .85rem; display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--forest); border-radius: 50%; font-size: 1.35rem; font-weight: 900; }
.door:nth-child(2) .door-arrow { color: #3f2c00; background: #f5b400; }

.home-safety {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1.15rem;
  padding: .8rem 1rem;
  color: #583f12;
  background: #fff5d8;
  border: 1px solid #ead08a;
  border-radius: 16px;
}
.home-safety .quiet { flex: 0 0 auto; min-height: 48px; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.item-card {
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 7px 20px rgba(23, 51, 46, .07);
}
.item-card button { width: 100%; padding: 0; color: inherit; background: none; border: 0; text-align: left; }
.item-photo { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e9e5da; }
.item-body { padding: .75rem; }
.item-title { margin-bottom: .2rem; font-weight: 820; }
.item-price { margin-bottom: .45rem; color: var(--forest); font-size: 1.12rem; font-weight: 900; }
.item-meta { display: flex; flex-wrap: wrap; gap: .3rem; color: var(--muted); font-size: .94rem; }

.info-card, .warning-card, .success-card, .continue-card, .counter-card {
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.connection-state {
  display: grid;
  justify-items: center;
  max-width: 620px;
  margin: clamp(2rem, 12vh, 7rem) auto 0;
  padding: clamp(1.4rem, 5vw, 2.4rem);
  text-align: center;
}
.connection-state .brand-mark { margin-bottom: .85rem; }
.connection-state h1 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 7vw, 2.65rem); }
.connection-state p { max-width: 38ch; margin: 0 0 1.25rem; color: var(--muted); }
body.connection-unavailable .profile-button,
body.connection-unavailable .bottom-nav { display: none; }
body.connection-unavailable main { padding-bottom: 2rem; }
.warning-card { color: #583f12; background: #fff5d8; border-color: #ead08a; }
.success-card { color: #174d35; background: #e6f4eb; border-color: #add4bb; }
.continue-card { display: grid; gap: .7rem; background: #eaf3f0; border-color: #bdd5cc; }
.counter-grid { display: grid; gap: .75rem; }
.group-identity { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: start; }
.group-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: white;
  background: var(--forest);
  border-radius: 18px;
  font-size: 1.2rem;
  font-weight: 900;
}
.counter-card strong { display: block; margin-bottom: .25rem; font-size: 1.45rem; }
.progress { height: 9px; margin-top: .55rem; overflow: hidden; background: #e6e9e7; border-radius: 99px; }
.progress > span { display: block; height: 100%; background: var(--forest-2); border-radius: inherit; }

.page-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.15rem; }
.back-button { flex: 0 0 auto; width: var(--tap); height: var(--tap); color: var(--forest); background: white; border: 1px solid var(--line); border-radius: 14px; font-size: 1.35rem; }
.page-head h1 { margin: .1rem 0 0; font-size: clamp(1.8rem, 7vw, 2.8rem); }

.filter-row { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .8rem; scrollbar-width: thin; }
.filter-chip { flex: 0 0 auto; min-height: 44px; padding: .5rem .8rem; color: var(--forest); background: white; border: 1px solid #bfd0c9; border-radius: 999px; font-weight: 730; }
.filter-chip.active { color: white; background: var(--forest); border-color: var(--forest); }
.search-distance-note { max-width: 48rem; margin: .4rem 0 .75rem; }
.free-distance-control { margin: 0 0 1rem; padding: .9rem; background: #eef5f1; border: 1px solid #c9d9d2; border-radius: 16px; }
.free-distance-control .section-head { margin-bottom: .55rem; }
.distance-help { display:grid; place-items:center; width:44px; min-width:44px; height:44px; padding:0; border-radius:50%; font-size:1.1rem; font-weight:900; }

.detail-layout { display: grid; gap: 1.1rem; }
.detail-photo { width: 100%; max-height: 32rem; object-fit: cover; background: #e8e4da; border-radius: 24px; box-shadow: var(--shadow); }
.detail-copy { padding: .2rem; }
.detail-price { color: var(--forest); font-size: 1.8rem; font-weight: 900; }
.fact-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; margin: 1rem 0; }
.fact { padding: .75rem; background: white; border: 1px solid var(--line); border-radius: 14px; }
.fact small, .fact strong { display: block; }
.fact small { color: var(--muted); }

.list { display: grid; gap: .7rem; }
.list-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 76px;
  padding: .75rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
}
.list-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 13px; }
.list-row strong, .list-row small { display: block; }
.list-row small { color: var(--muted); }
.list-row > span { min-width: 0; overflow-wrap: anywhere; }
.inbox-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1rem; padding: .3rem; background: #e5eee9; border-radius: 16px; }
.inbox-switch button { min-height: var(--tap); padding: .65rem .55rem; color: var(--forest); background: transparent; border: 0; border-radius: 12px; font-weight: 850; }
.inbox-switch button.active { color: white; background: var(--forest); box-shadow: 0 4px 12px rgba(23,72,63,.16); }
.activity-row .status-pill { justify-self: end; white-space: nowrap; }
.moderation-report-row { align-items: start; }
.moderation-report-actions { margin-top: 0; }
.badge { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 .45rem; color: white; background: var(--forest); border-radius: 999px; font-size: .78rem; font-weight: 850; }

.post-choice-grid { display: grid; gap: .8rem; }
.post-choice { min-height: 132px; padding: 1.1rem; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 20px; text-align: left; }
.post-choice strong { display: block; margin: .55rem 0 .25rem; font-size: 1.15rem; }
.post-choice small { color: var(--muted); }
.post-choice-icon { font-size: 1.7rem; }

.stepper { display: flex; gap: .4rem; margin: 0 0 1.2rem; }
.stepper span { flex: 1; height: 7px; background: #d9dedb; border-radius: 99px; }
.stepper span.on { background: var(--forest); }
.photo-picker { display: grid; place-items: center; min-height: 190px; padding: 1rem; background: #f3f0e7; border: 2px dashed #a8b7b0; border-radius: 18px; text-align: center; }
.photo-picker img { width: min(100%, 260px); border-radius: 14px; }

.conversation { display: grid; gap: .65rem; margin: 1rem 0; }
.conversation-item-context {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  margin-bottom: .85rem;
  padding: .7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 7px 20px rgba(23, 51, 46, .07);
}
.conversation-item-context img,
.conversation-item-fallback {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background: #e8e4da;
}
.conversation-item-fallback {
  display: grid;
  place-items: center;
  color: var(--forest);
  font-size: 2rem;
  font-weight: 900;
}
.conversation-item-context h2,
.conversation-item-context p { margin: 0; }
.conversation-item-context strong { color: var(--forest); }
.bubble { max-width: 84%; padding: .75rem .9rem; background: white; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; }
.bubble.mine { justify-self: end; color: white; background: var(--forest-2); border-color: var(--forest-2); border-radius: 16px 16px 5px 16px; }
.bubble small { display: block; margin-top: .35rem; opacity: .75; }
.offer-card { padding: 1rem; background: #fff8e6; border: 2px solid #e7c66a; border-radius: 18px; }
.offer-card strong { font-size: 1.3rem; }
.message-compose { position: sticky; bottom: 5.6rem; display: grid; grid-template-columns: 1fr auto; gap: .55rem; padding: .7rem 0; background: linear-gradient(180deg, transparent, var(--cream) 25%); }
.message-compose input { min-height: 50px; padding: .75rem; border: 2px solid #c4d1cb; border-radius: 14px; }

.group-card { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 18px; }
.group-card + .group-card { margin-top: .75rem; }

.treasure-example-layout {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.treasure-example-layout > * { min-width: 0; }
.treasure-example-photo {
  display: block;
  width: 104px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
}
.treasure-example h2 { font-size: clamp(1.2rem, 5.5vw, 1.65rem); }

.qr-panel {
  display: grid;
  justify-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding: clamp(1rem, 5vw, 1.6rem);
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.qr-panel h2 { margin-bottom: 0; }
.qr-panel .button-row { width: 100%; }
.qr-image {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: .25rem auto;
  background: white;
  border: 1px solid #d7dfdb;
  border-radius: 8px;
}
.full-qr { text-align: center; }
.full-qr .qr-image { width: min(100%, 440px); }
.join-welcome {
  padding: clamp(1.25rem, 6vw, 2.4rem);
  text-align: center;
  background: linear-gradient(145deg, #e7f2ed, #fff8e8);
  border: 1px solid #c8d9d2;
  border-radius: 24px;
}
.join-welcome h2 { margin: .35rem 0 .75rem; font-size: clamp(1.8rem, 8vw, 3rem); }
.join-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto .75rem;
  color: white;
  background: var(--forest);
  border-radius: 20px;
  font-size: 2rem;
}
.privacy-list {
  padding: 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.plain-list { padding-left: 1.2rem; }
.plain-list li { margin-bottom: .45rem; }

details { padding: .9rem; background: white; border: 1px solid var(--line); border-radius: 16px; }
details + details { margin-top: .65rem; }
summary { min-height: 44px; font-weight: 800; cursor: pointer; }

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 620px;
  margin: 0 auto;
  padding: .48rem .45rem calc(.45rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, .97);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 35px rgba(23, 51, 46, .13);
  backdrop-filter: blur(16px);
}
.bottom-nav button { position: relative; display: grid; place-items: center; gap: .12rem; min-height: 54px; padding: .25rem; color: #687773; background: none; border: 0; border-radius: 13px; }
.bottom-nav button { min-width: 0; }
.bottom-nav button span { font-size: 1.3rem; line-height: 1; }
.bottom-nav button b { font-size: .9rem; line-height: 1.1; }
.bottom-nav button.active { color: var(--forest); background: var(--sage); }
.bottom-nav .post-nav { align-self: end; color: white; background: var(--forest); transform: translateY(-.65rem); box-shadow: 0 8px 20px rgba(23, 72, 63, .24); }
.bottom-nav .post-nav.active { color: white; background: #0e3a32; }
.bottom-nav .nav-count { position: absolute; top: 1px; right: max(4px, 12%); display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem; color: white; background: #b42318; border: 2px solid white; border-radius: 999px; font-size: .72rem; font-weight: 900; line-height: 1; }
.bottom-nav .nav-count[hidden] { display: none; }

dialog {
  width: min(calc(100% - 1.5rem), 520px);
  max-height: calc(100dvh - 1rem);
  overflow-y: auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(9, 28, 24, .35);
}
dialog::backdrop { background: rgba(11, 30, 26, .55); backdrop-filter: blur(3px); }
.dialog-inner { padding: 1.2rem; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; }
.icon-button { width: var(--tap); padding: 0; color: var(--forest); background: #eef2ef; border: 0; }

.empty-state { padding: 2rem 1rem; text-align: center; }
.empty-state span { display: block; margin-bottom: .7rem; font-size: 2.2rem; }

.free-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.free-choice-grid .post-choice { min-height: 168px; }
.give-away-welcome {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
  margin-bottom: 1rem;
  overflow: hidden;
  background: linear-gradient(145deg, #e7f2ed, #fff8e8);
  border: 1px solid #c8d9d2;
  border-radius: 24px;
}
.give-away-welcome img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.give-away-welcome > div { padding: 1rem 1rem 1rem 0; }
.give-away-welcome h2 { margin: .2rem 0 .5rem; font-size: clamp(1.7rem, 6vw, 2.6rem); }
.give-away-welcome p:last-child { margin-bottom: 0; }
.location-permission-card {
  display: grid;
  justify-items: center;
  gap: .65rem;
  padding: clamp(1.2rem, 5vw, 2rem);
  text-align: center;
  background: linear-gradient(145deg, #e7f2ed, #fff8e8);
}
.location-permission-card h2,
.location-permission-card p { margin: 0; }
.free-sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  margin: .7rem 0 1rem;
}
.free-sort label { font-weight: 800; }
.free-sort select { width: min(100%, 220px); }
.free-card { position: relative; overflow: hidden; }
.free-card .item-body { align-content: start; }
.free-label {
  display: inline-flex;
  width: max-content;
  margin-bottom: .35rem;
  padding: .2rem .55rem;
  color: white;
  background: var(--forest);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.free-kind { margin-top: .45rem; color: var(--forest); font-size: .9rem; font-weight: 800; }
.free-photo-placeholder {
  display: grid;
  place-items: center;
  min-height: 170px;
  color: white;
  background: linear-gradient(145deg, var(--forest), #247968);
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 900;
}
.giveaway-form { display: grid; gap: 1rem; }
.giveaway-form .stepper { position: sticky; top: 4.9rem; z-index: 8; padding: .55rem; background: rgba(248, 245, 236, .94); border-radius: 999px; backdrop-filter: blur(10px); }
.form-step { margin: 0; }
.form-step .eyebrow { margin-bottom: .75rem; }
.form-step fieldset { margin: .8rem 0; }
.full-width { width: 100%; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.admin-stat {
  min-width: 0;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: inherit;
  font: inherit;
  text-align: left;
}
.admin-stat:is(button) { cursor: pointer; }
.admin-stat:is(button):hover { border-color: var(--brand); box-shadow: 0 8px 22px rgba(18,74,63,.12); transform: translateY(-1px); }
.admin-stat strong { display: block; font-size: 1.6rem; line-height: 1; color: var(--brand); }
.admin-stat span { display: block; margin-top: .35rem; color: var(--muted); font-size: .86rem; }
.admin-stat small { display: block; margin-top: .55rem; color: var(--brand); font-size: .75rem; font-weight: 800; }
.admin-control-row { display: grid; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.admin-control-summary { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .75rem; align-items: start; min-width: 0; }
.admin-control-summary small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.admin-control-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-control-actions button { min-height: 44px; }
.admin-explorer-tabs { display: flex; gap: .45rem; margin: 0 0 1rem; padding: .2rem 0 .55rem; overflow-x: auto; scrollbar-width: thin; }
.admin-explorer-tabs button { flex: 0 0 auto; min-height: 42px; padding: .55rem .8rem; }
.admin-explorer-search { display: grid; gap: .75rem; margin-bottom: 1.15rem; padding: .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.admin-explorer-search .field { margin: 0; }
.admin-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.admin-account-tile { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) 48px; gap: .5rem; align-items: center; min-width: 0; padding: .55rem; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.admin-account-avatar { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: var(--brand); border-radius: 50%; font-weight: 900; }
.admin-account-copy { min-width: 0; }
.admin-account-copy strong,.admin-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-copy strong { color: var(--ink); font-size: .9rem; }
.admin-account-copy small { color: var(--muted); font-size: .72rem; }
.admin-mini-action { display: grid; width: 48px; height: 48px; min-height: 48px; padding: 0; place-items: center; border: 0; border-radius: 50%; color: white; font-size: 1.05rem; font-weight: 900; background-color: transparent; }
button.admin-mini-action { cursor: pointer; }
.admin-mini-action.block { background: radial-gradient(circle at center,#a32828 0 15px,transparent 16px); }
.admin-mini-action.restore { background: radial-gradient(circle at center,var(--brand) 0 15px,transparent 16px); }
.admin-mini-action.protected { background: radial-gradient(circle at center,#d89a00 0 15px,transparent 16px); }
.admin-record-grid { display: grid; gap: .55rem; }
.admin-record-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: .65rem; align-items: start; padding: .75rem; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.admin-record-row small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.admin-record-control { align-self: center; }
.admin-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: .7rem; align-items: center; margin-top: 1rem; }
.admin-pagination > :last-child { justify-self: end; }
.admin-us-map { position: relative; width: 100%; aspect-ratio: 5 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #edf4f1; }
.admin-us-map > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.admin-map-dot { position: absolute; left: var(--dot-x); top: var(--dot-y); display: grid; width: var(--dot-size); height: var(--dot-size); place-items: center; border: 3px solid rgba(255,255,255,.98); outline: 2px dashed #85101b; outline-offset: 1px; border-radius: 50%; color: white; background: radial-gradient(circle at 34% 28%,#ffb0b0 0 17%,#e42525 19% 58%,#98131f 60% 100%); box-shadow: 0 0 0 4px rgba(196,28,28,.14),0 6px 16px rgba(105,16,16,.3); transform: translate(-50%,-50%); }
.admin-map-dot.zip { z-index: 2; }
.admin-map-legend,.admin-state-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.admin-map-legend span { display: inline-flex; gap: .35rem; align-items: center; color: var(--muted); font-size: .8rem; }
.admin-map-legend i { flex: 0 0 auto; border: 2px dashed #85101b; border-radius: 50%; background: radial-gradient(circle at 34% 28%,#ffb0b0 0 17%,#e42525 19% 58%,#98131f 60% 100%); }
.admin-map-legend i.small { width: 10px; height: 10px; }
.admin-map-legend i.medium { width: 17px; height: 17px; }
.admin-map-legend i.large { width: 25px; height: 25px; }
.admin-map-data { margin-top: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.admin-map-data summary { min-height: 48px; padding: .85rem 1rem; color: var(--ink); font-weight: 850; cursor: pointer; }
.admin-table-scroll { overflow-x: auto; padding: 0 .8rem .8rem; }
.admin-map-data table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.admin-map-data th,.admin-map-data td { padding: .65rem .55rem; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-map-data th { color: var(--ink); }
.activity-band-marker { display: inline-block; width: 13px; height: 13px; margin-right: .45rem; border: 2px dashed #85101b; border-radius: 50%; background: #e42525; vertical-align: -1px; }
.admin-map-source { margin-top: .7rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (forced-colors: active) {
  .admin-map-dot,.admin-map-legend i,.activity-band-marker { border-color: CanvasText; outline-color: CanvasText; background: CanvasText; box-shadow: none; forced-color-adjust: auto; }
}

@media (min-width: 700px) {
  .hero-home { grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr); align-items: stretch; }
  .hero-visual { min-height: 480px; }
  .hero-visual img { height: 100%; min-height: 480px; }
  .door-grid { grid-template-columns: repeat(3, 1fr); }
  .door { grid-template-columns: 1fr; grid-template-rows: 220px minmax(185px, 1fr); min-height: 415px; }
  .door-photo { min-height: 220px; }
  .door-content { align-content: start; justify-items: center; padding: 1.15rem 1.15rem 4rem; text-align: center; }
  .door strong { font-size: 1.5rem; }
  .door small { min-height: 2.6em; font-size: 1rem; }
  .door-arrow { right: 50%; bottom: 1rem; width: 44px; height: 44px; transform: translateX(50%); }
  .buy-sell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .95fr); align-items: start; }
  .treasure-example-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .treasure-example-photo { width: 180px; height: 220px; }
  .post-choice-grid, .counter-grid { grid-template-columns: repeat(3, 1fr); }
  .bottom-nav { bottom: 1rem; border: 1px solid var(--line); border-radius: 22px; }
  #app { padding-bottom: 8.8rem; }
  .admin-account-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .admin-explorer-search { grid-template-columns: minmax(0,1fr) minmax(170px,.3fr) auto; align-items: end; }
}

@media (max-width: 520px) {
  .home-safety { align-items: stretch; flex-direction: column; }
  .home-safety .quiet { width: 100%; }
  .card-grid { grid-template-columns: 1fr; gap: .7rem; }
  .item-card button { display: grid; grid-template-columns: minmax(112px, 38%) 1fr; }
  .item-card .item-photo { height: 100%; min-height: 132px; }
  .free-choice-grid { grid-template-columns: 1fr; }
  .free-choice-grid .post-choice { min-height: 128px; }
  .give-away-welcome { grid-template-columns: 1fr; }
  .give-away-welcome img { height: 190px; min-height: 0; }
  .give-away-welcome > div { padding: 0 1rem 1.15rem; text-align: center; }
  .free-sort { justify-content: stretch; }
  .free-sort select { flex: 1; width: auto; }
  .free-photo-placeholder { min-height: 132px; }
  .giveaway-form .stepper { top: 4.25rem; }
  .admin-account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
  .admin-account-tile { grid-template-columns: 32px minmax(0,1fr) 48px; gap: .32rem; padding: .4rem; border-radius: 11px; }
  .admin-account-avatar { width: 32px; height: 32px; font-size: .82rem; }
  .admin-account-copy strong { font-size: .78rem; }
  .admin-account-copy small { font-size: .63rem; }
  .admin-mini-action { width: 48px; height: 48px; min-height: 48px; font-size: .92rem; }
  .admin-us-map { border-radius: 12px; }
  .admin-map-dot { border-width: 2px; }
}

@media (max-width: 340px) {
  .admin-account-tile { grid-template-columns: minmax(0,1fr) 48px; }
  .admin-account-avatar { display: none; }
}

@media (max-width: 480px) {
  .join-request-row,
  .moderation-report-row { grid-template-columns: 40px minmax(0, 1fr); }
  .join-request-actions,
  .moderation-report-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: .25rem;
  }
  .join-request-actions > *,
  .moderation-report-actions > * { min-width: 0; width: 100%; }
  .section-head { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 360px) {
  body { font-size: 17px; }
  .brand small { display: none; }
  .hero { padding: 1.1rem; border-radius: 22px; }
  .hero-home { padding: 0; }
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .primary { width: 100%; }
  .qr-panel { padding: .85rem; }
  .door { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: minmax(124px, auto); padding: 0; }
  .door-photo { min-height: 0; }
  .door-content { padding: .8rem 2.7rem .8rem .8rem; }
  .item-body { padding: .62rem; }
  .bottom-nav button b { font-size: .82rem; }
  #app { padding-right: .75rem; padding-left: .75rem; }
  .site-header { padding-right: .75rem; padding-left: .75rem; }
  .status-toast { width: calc(100% - 1rem); }
  .inbox-switch button { padding-right: .35rem; padding-left: .35rem; font-size: .9rem; }
  .activity-row .status-pill { grid-column: 2; justify-self: start; }
}

.giveaway-feed-filters { margin-bottom: 1rem; }
.activity-owner-grid { display: grid; gap: .85rem; }
.activity-owner-card { display: grid; gap: .85rem; }
.activity-owner-summary { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: .8rem; align-items: center; }
.activity-owner-summary img { width: 64px; height: 64px; object-fit: cover; border-radius: .8rem; }
.activity-owner-summary > span:nth-child(2) { display: grid; gap: .2rem; min-width: 0; }
.activity-owner-actions { justify-content: flex-start; }
.activity-owner-actions button { min-height: 48px; }
.activity-picture-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: .75rem; }
.activity-picture-row { display: grid; gap: .5rem; }
.activity-picture-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .8rem; }

@media (max-width: 560px) {
  .activity-owner-summary { grid-template-columns: 52px minmax(0,1fr); }
  .activity-owner-summary img { width: 52px; height: 52px; }
  .activity-owner-summary .status-pill { grid-column: 2; justify-self: start; }
  .activity-owner-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .activity-owner-actions button { width: 100%; }
}

@media (prefers-contrast: more) {
  :root { --line: #65736e; }
  .primary, .post-nav { border-color: #000; }
}

@media (forced-colors: active) {
  button, a, input, select, textarea, summary { forced-color-adjust: auto; }
  .bottom-nav, .item-card, .info-card, .warning-card, .success-card { border: 1px solid CanvasText; }
}
