/* «Заповедник. Соседи» — тёплый природный стиль */
:root {
  --green: #2F6B3A;
  --green-dark: #275A31;
  --green-soft: #E4F0E0;
  --honey: #E8A13C;
  --cream: #F7F4EA;
  --card: #FFFFFF;
  --ink: #2C2C24;
  --muted: #7C8577;
  --line: #E7E3D6;
  --danger: #C4574A;
  --radius: 18px;
  --shadow: 0 2px 10px rgba(47, 76, 42, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
}
#app { max-width: 560px; margin: 0 auto; padding: 0 14px 90px; }
button { font: inherit; cursor: pointer; border: none; }
input, textarea, select { font: inherit; color: var(--ink); }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 2px 8px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--cream) 85%, rgba(247,244,234,0));
}
.top .back {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 20px; flex: none; color: var(--green);
}
.top h1 { font-size: 21px; margin: 0; flex: 1; }
.top .emoji { font-size: 26px; }

/* ---------- приветствие / онбординг ---------- */
.hero {
  text-align: center; padding: 42px 10px 6px;
}
.hero .logo {
  width: 86px; height: 86px; margin: 0 auto 14px; border-radius: 28px;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  font-size: 44px; box-shadow: var(--shadow);
}
.hero h1 { font-size: 26px; margin: 0 0 6px; color: var(--green-dark); }
.hero p { color: var(--muted); margin: 0 0 10px; }
.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 14px 0;
}
.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #FDFCF8; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--green); }
textarea { min-height: 96px; resize: vertical; }

.btn {
  display: block; width: 100%; padding: 15px; border-radius: 16px;
  background: var(--green); color: #fff; font-size: 18px; font-weight: 600;
  box-shadow: var(--shadow); transition: transform .06s;
}
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--green-soft); color: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; font-weight: 500; font-size: 15px; }
.btn.honey { background: var(--honey); }
.btn.danger { background: var(--danger); }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; }

/* ---------- главная ---------- */
.greeting { padding: 18px 4px 4px; }
.greeting h1 { font-size: 24px; margin: 0; color: var(--green-dark); }
.greeting p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.search {
  display: flex; gap: 8px; margin: 14px 0 6px;
}
.search input {
  flex: 1; padding: 13px 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); box-shadow: var(--shadow); outline: none;
}
.search button {
  width: 50px; border-radius: 16px; background: var(--green); color: #fff; font-size: 20px;
}

.road {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FFF7E6; border: 1.5px solid #F2DFB6; border-radius: 16px;
  padding: 12px 14px; margin: 10px 0; font-size: 15px;
}
.road .ico { font-size: 20px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile {
  border-radius: 20px; padding: 16px 14px; text-align: left;
  box-shadow: var(--shadow); min-height: 108px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.tile .emoji { font-size: 32px; }
.tile .name { font-weight: 700; font-size: 16.5px; margin-top: 8px; line-height: 1.2; }
.tile .hint { font-size: 12.5px; color: rgba(44,44,36,.55); margin-top: 2px; }
.tile.soon { opacity: .55; }
.tile .soon-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.8);
  font-size: 11px; padding: 3px 8px; border-radius: 8px; color: var(--muted);
}
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; min-height: 0; }
.tile.wide .name { margin-top: 0; }

/* ---------- карточки объявлений ---------- */
.cards { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: flex; gap: 13px; text-align: left; width: 100%;
  position: relative;
}
.card .pic {
  width: 62px; height: 62px; border-radius: 16px; flex: none;
  background: var(--green-soft); display: flex; align-items: center; justify-content: center;
  font-size: 30px; overflow: hidden;
}
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { flex: 1; min-width: 0; }
.card .title { font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.card .desc {
  color: var(--muted); font-size: 14px; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { display: flex; gap: 8px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.price { color: var(--green-dark); font-weight: 700; font-size: 15px; }
.who { color: var(--muted); font-size: 13px; }
.chip {
  font-size: 12px; padding: 3px 9px; border-radius: 9px; font-weight: 600;
}
.chip.pending { background: #FFF3D6; color: #9A7017; }
.chip.sold { background: #ECECEC; color: #777; }
.chip.rejected { background: #FBE3DF; color: var(--danger); }
.chip.offer { background: #DCF0FA; color: #1F6E96; }
.chip.seek { background: #F3E8FB; color: #7B4FA0; }
.card.sold-card { opacity: .55; }

/* ---------- рейтинг мастеров ---------- */
.stars { color: var(--honey); letter-spacing: 1.5px; font-size: 15px; }
.stars .off { color: #DDD6C4; }
.rating-num { font-weight: 800; color: var(--green-dark); }
.review {
  background: #FBFAF4; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-top: 10px; font-size: 15px;
}
.review .rhead { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.review .work { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.review .reply {
  margin-top: 8px; padding: 8px 12px; background: var(--green-soft);
  border-radius: 10px; font-size: 14px;
}
.review .reply b { color: var(--green-dark); }

/* ---------- сегменты, вкладки ---------- */
.seg { display: flex; background: #EDE9DC; padding: 4px; border-radius: 14px; margin: 12px 0; }
.seg button {
  flex: 1; padding: 9px; border-radius: 11px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14.5px;
}
.seg button.on { background: var(--card); color: var(--green-dark); box-shadow: var(--shadow); }

/* ---------- мастер добавления ---------- */
.steps { display: flex; gap: 6px; margin: 10px 0 16px; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: #E3DECE; }
.steps i.on { background: var(--green); }
.wizard h2 { font-size: 21px; margin: 4px 0 4px; }
.wizard .why { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.stars-input { display: flex; gap: 6px; font-size: 38px; justify-content: center; margin: 8px 0 14px; }
.stars-input span { cursor: pointer; filter: grayscale(1) opacity(.45); transition: filter .1s; }
.stars-input span.on { filter: none; }
.photo-drop {
  border: 2px dashed var(--line); border-radius: 16px; padding: 22px;
  text-align: center; color: var(--muted); background: #FDFCF8;
}
.photo-drop img { max-width: 100%; border-radius: 12px; }

.done-check { font-size: 64px; text-align: center; margin: 30px 0 8px; }

/* ---------- модалка ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(35,45,32,.45); z-index: 20;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--cream); width: 100%; max-width: 560px;
  border-radius: 24px 24px 0 0; padding: 20px 18px 30px;
  max-height: 88vh; overflow-y: auto;
}
.sheet .grip { width: 44px; height: 5px; background: #D8D2BF; border-radius: 3px; margin: 0 auto 14px; }
.sheet h2 { margin: 4px 0 8px; font-size: 21px; }
.sheet .big-pic { width: 100%; border-radius: 16px; margin: 8px 0; }
.contact-row { display: flex; gap: 10px; margin-top: 14px; }
.contact-row .btn { flex: 1; }

/* ---------- модератор ---------- */
.mod-item { border-left: 4px solid var(--honey); }
.mod-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- пустые состояния, загрузка ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 52px; margin-bottom: 10px; }
.loading { text-align: center; padding: 40px; color: var(--muted); }
.spinner {
  width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%;
  border: 4px solid var(--green-soft); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px;
  font-size: 15px; z-index: 50; max-width: 88%; text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}

/* ---------- плавающая кнопка ---------- */
.fab {
  position: fixed; right: 18px; bottom: 22px; z-index: 10;
  background: var(--honey); color: #fff; font-size: 17px; font-weight: 700;
  padding: 15px 22px; border-radius: 30px;
  box-shadow: 0 6px 18px rgba(232,161,60,.45);
}
.footer-links { text-align: center; margin-top: 26px; padding-bottom: 10px; }
.footer-links button { display: inline-block; margin: 2px 6px; }
.note { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 10px; }
