@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&display=swap');

:root {
  --bg: #f6f4ef;
  --bg2: #efebe3;
  --surface: #ffffff;
  --ink: #2a302c;
  --muted: #6e7a72;
  --line: #e6e1d6;
  --primary: #4f7a5c;
  --primary-dark: #3d6349;
  --primary-soft: #e8f0ea;
  --accent: #d4925a;
  --accent-soft: #f8efe6;
  --danger: #c45c4a;
  --danger-soft: #fdf0ed;
  --shadow: 0 8px 28px rgba(42, 48, 44, 0.07);
  --shadow-sm: 0 2px 12px rgba(42, 48, 44, 0.05);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }

/* Header */
.top {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 225, 214, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.brand-mark {
  background: linear-gradient(145deg, var(--primary), #5f9270);
  color: #fff;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(79, 122, 92, 0.25);
}

.quiet {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 40px 20px 36px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #e8f0ea 0%, transparent 60%),
    linear-gradient(180deg, #f0ebe2 0%, var(--bg) 100%);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: "Gowun Dodum", "Pretendard", sans-serif;
  font-size: clamp(1.85rem, 6.5vw, 2.6rem);
  letter-spacing: -0.8px;
  line-height: 1.35;
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 400;
}

.hero > p:not(.eyebrow) {
  color: var(--muted);
  margin: 0 auto 28px;
  font-size: 1rem;
  max-width: 320px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.primary, .secondary {
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  min-height: 52px;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary {
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(79, 122, 92, 0.28);
}

.primary:active { transform: scale(0.97); }

.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.secondary:active { transform: scale(0.97); }

.big {
  padding: 16px 28px;
  min-height: 56px;
  font-size: 1.05rem;
}

.full { width: 100%; }

/* Quick features */
.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 16px 28px;
  gap: 10px;
}

.quick > div {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 8px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(230, 225, 214, 0.6);
}

.quick span { font-size: 1.5rem; }
.quick b { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.quick small { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }

/* Sections */
.section {
  max-width: 640px;
  margin: auto;
  padding: 28px 18px 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.section h2,
.dialog-head h2,
.how h2 {
  font-family: "Gowun Dodum", "Pretendard", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.4px;
  margin: 0;
  font-weight: 400;
}

.count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Filters */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.filters label,
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.search-label { grid-column: 1 / -1; }

.filters select,
.filters input,
.field input,
.field select,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 1rem;
  color: var(--ink);
  min-height: 50px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filters select:focus,
.filters input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 122, 92, 0.15);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

/* Listing cards */
.listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.listing-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(230, 225, 214, 0.5);
  transition: transform 0.15s ease;
}

.listing-card:active { transform: scale(0.99); }

.cover,
.cover-placeholder {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(145deg, #e8f0ea, #efebe3);
}

.cover-placeholder {
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.5;
}

.card-body { padding: 16px 16px 18px; }

.location {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.rent {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
}

.card-foot {
  display: flex;
  gap: 8px;
}

.card-foot button {
  flex: 1;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-btn {
  background: var(--primary-soft);
  color: var(--primary);
}

.call-btn {
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 122, 92, 0.22);
}

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.empty span { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.empty b { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 20px; font-size: 0.95rem; }

.hidden { display: none !important; }

/* How it works */
.how {
  background: linear-gradient(180deg, transparent, var(--bg2) 30%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: 48px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.steps > div {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 18px 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(230, 225, 214, 0.6);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: start;
}

.steps > div > b {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
}

.steps strong {
  font-size: 1rem;
  font-weight: 700;
}

.steps p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  padding: 28px 20px calc(32px + var(--safe-bottom));
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  background: var(--bg2);
}

footer b {
  display: block;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 8px;
}

footer p { margin: 0 0 6px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* Dialogs */
dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 440px;
  width: calc(100% - 24px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(42, 48, 44, 0.18);
  background: var(--surface);
}

dialog::backdrop {
  background: rgba(42, 48, 44, 0.45);
  backdrop-filter: blur(4px);
}

#addForm,
#detailContent {
  padding: 22px 20px 24px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dialog-head .muted {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 400;
}

.close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.close:active { background: var(--line); }

.required {
  font-size: 0.7rem;
  color: var(--danger);
  background: var(--danger-soft);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 4px;
  font-weight: 600;
  vertical-align: middle;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 16px 0;
}

legend {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.rent-options {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
}

.rent-options label {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}

.rent-options label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.rent-options input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.field small,
#rentHint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  margin: 18px 0 12px;
  line-height: 1.45;
}

.consent input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.notice {
  background: var(--accent-soft);
  border: 1px solid #edd9c4;
  color: #7a5a38;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 12px 0;
}

.photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.detail-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.detail-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Admin */
.admin-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0.85;
  z-index: 15;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  gap: 10px;
}

.admin-row button {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  max-width: min(90vw, 360px);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  line-height: 1.4;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Tablet+ */
@media (min-width: 600px) {
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cover, .cover-placeholder { height: 180px; }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps > div {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 22px 16px;
  }

  .steps > div > b {
    grid-row: auto;
    margin: 0 auto 8px;
  }

  .hero-actions { gap: 12px; }

  .filters {
    grid-template-columns: 1fr 1fr 1.4fr;
  }

  .search-label { grid-column: auto; }
}

@media (min-width: 900px) {
  .top {
    padding: 0 max(24px, calc((100vw - 720px) / 2));
  }

  .section { max-width: 720px; }
}


/* Mode controls */
.top-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.mode-badge{font-size:0.72rem;font-weight:700;padding:5px 10px;border-radius:999px;background:#ece8e0;color:var(--muted);white-space:nowrap}
.mode-badge.on{background:var(--primary-soft);color:var(--primary)}
#refreshBtn{font-size:1.15rem;min-width:36px;min-height:36px;border-radius:50%;padding:0}
#modeToggle{font-size:0.78rem;padding:6px 10px}
@media(max-width:480px){
  #modeToggle{display:none}
  .brand span:last-child{font-size:1.05rem}
}

/* ── 어르신 친화형 입력 UI + 추가 기능 ── */
:root {
  --primary: #356b52;
  --primary-dark: #285640;
  --primary-soft: #e5f3e9;
  --accent: #efb85b;
  --blue-soft: #eaf3ff;
  --purple-soft: #f1ebff;
  --teal-soft: #e7f7f5;
}

.top { min-height: 64px; height: auto; gap: 10px; }
.top-actions { gap: 4px; }
.mode-badge { font-size: .76rem; }
.quiet { min-height: 42px; }
.hero { padding-top: 44px; padding-bottom: 38px; }
.hero .eyebrow { font-size: .82rem; }
.hero > p:not(.eyebrow) { max-width: 440px; font-size: 1.08rem; }
.primary, .secondary { min-height: 56px; }
.primary.big, .secondary.big { min-height: 62px; }

/* 카드 내 명확한 두 가지 선택 */
.card-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.card-foot button { min-height: 54px; font-size: .98rem; }
.owner-edit-btn { background: #fff2d7; color: #765118; border: 1px solid #f0d8a3; }
.owner-edit-btn:active, .detail-btn:active { filter: brightness(.96); }

/* 크게 보이고 색상으로 구분된 입력칸 */
#addForm { padding: 24px 20px 26px; }
#addForm .field, #addForm fieldset { margin-bottom: 15px; }
.field { font-size: 1.02rem; gap: 9px; line-height: 1.45; }
.field input, .field select, .field textarea {
  min-height: 60px; padding: 16px; font-size: 1.08rem; border: 2px solid #d7e6dc;
  border-radius: 16px; background: #fff; color: #273c30;
}
.field textarea { min-height: 112px; }
.field input::placeholder, .field textarea::placeholder { color: #85948a; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #356b52; box-shadow: 0 0 0 4px rgba(53, 107, 82, .14); }
.color-field { border-radius: 18px; padding: 14px; border: 1px solid #d9e7dd; background: #f4faf6; }
.color-field:nth-of-type(2) { background: #f0f6ff; border-color: #d9e5f6; }
.color-field:nth-of-type(3) { background: #fff7eb; border-color: #f2e2c5; }
.color-field:nth-of-type(4) { background: #f2efff; border-color: #e2daf8; }
.color-field:nth-of-type(5) { background: #eaf8f7; border-color: #d2eeea; }
.color-field:nth-of-type(6) { background: #fff3f0; border-color: #f1ddd7; }
.color-field small, #rentHint { display: block; font-size: .92rem; line-height: 1.5; color: #53675a; margin-top: 5px; }
.field .required { font-size: .78rem; }
.optional { display: inline-flex; width: fit-content; border-radius: 8px; padding: 2px 8px; background: #e5e9ef; color: #526071; font-size: .78rem; margin-left: 5px; }
fieldset.color-field { margin: 0 0 15px; }
fieldset.color-field legend { font-size: 1.02rem; margin-bottom: 9px; }
.rent-options { gap: 12px; }
.rent-options label { min-height: 60px; font-size: 1.08rem; border-width: 2px; border-radius: 16px; background: rgba(255,255,255,.8); }
.rent-options input { width: 22px; height: 22px; }
.consent { font-size: .98rem; gap: 12px; line-height: 1.55; }
.consent input { width: 23px; height: 23px; }
.notice { font-size: .91rem; padding: 14px 15px; line-height: 1.6; }
input[type="file"] { width: 100%; font-size: .97rem !important; min-height: 60px; padding: 10px !important; background: #fff !important; }

.photo-preview { align-items: flex-start; gap: 10px; }
.photo-thumb { position: relative; width: 86px; padding-bottom: 22px; }
.photo-thumb img { width: 86px; height: 86px; border-radius: 13px; border: 2px solid #d9e7dd; object-fit: cover; }
.photo-tag { display: block; text-align: center; font-size: .68rem; color: #42604d; margin-top: 3px; }
.new-tag { color: #765118; }
.remove-photo { position: absolute; top: -7px; right: -7px; border: 2px solid white; width: 29px; height: 29px; border-radius: 50%; background: #b84237; color: white; font-size: 1.2rem; font-weight: 800; box-shadow: 0 2px 6px #0002; }
.photo-counter { font-size: .83rem; color: #42604d; background: white; border: 1px solid #d9e7dd; border-radius: 10px; padding: 6px 9px; }

/* 집주인 수정번호 */
.code-dialog, .admin-login-form, .admin-panel { padding: 24px 20px; }
.code-dialog > p { font-size: 1.02rem; line-height: 1.65; }
.owner-code-value { margin: 18px 0; padding: 20px 10px; border: 2px dashed #78a68a; border-radius: 16px; background: #f0faf3; color: #285640; font-size: clamp(1.35rem, 5vw, 1.8rem); text-align: center; font-weight: 900; letter-spacing: .12em; overflow-wrap: anywhere; }
.code-dialog .full + .full { margin-top: 10px; }

/* 관리자 로그인·관리 */
.admin-fab { width: 64px; height: 58px; border-radius: 18px; font-size: .9rem; font-weight: 800; color: white; background: #354f40; border: 2px solid white; opacity: 1; }
.admin-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.admin-tools button { min-height: 44px; }
.admin-row { align-items: flex-start; padding: 15px 0; gap: 12px; }
.admin-row-info { min-width: 0; overflow-wrap: anywhere; flex: 1; }
.admin-row-info small { display: inline-block; margin-top: 6px; line-height: 1.6; }
.admin-row-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.admin-row-actions button { min-width: 62px; min-height: 40px; padding: 8px; border-radius: 10px; font-size: .84rem; font-weight: 800; }
.admin-edit-btn { background: #e9f2ff; color: #285b96; }
.admin-hide-btn { background: #fff1d5; color: #765118; }
.admin-delete-btn { background: #fdecea; color: #a63d34; }
.status-chip { display: inline-block; border-radius: 7px; padding: 2px 7px; font-weight: 800; }
.status-public { background: #e2f4e8; color: #286543; }
.status-hidden { background: #f0eaf7; color: #6b4685; }
.login-error { color: #a63d34; font-weight: 700; margin: 5px 0 12px; }
.empty-admin { padding: 24px 0; }

/* 주변 생활·관광 자동 정보 */
.nearby-box { margin-top: 25px; padding: 17px; border-radius: 20px; border: 1px solid #d8e8dd; background: linear-gradient(160deg, #f5fbf6, #f6f8ff); }
.nearby-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.nearby-title-row h3 { font-size: 1.2rem; line-height: 1.4; margin: 4px 0 0; }
.ai-kicker { color: #356b52; font-weight: 900; font-size: .8rem; }
.auto-badge { flex-shrink: 0; background: #dff3e6; color: #2e6846; border-radius: 999px; padding: 6px 9px; font-size: .72rem; font-weight: 800; }
.nearby-intro { color: #596b60; font-size: .94rem; line-height: 1.6; }
.ai-summary { padding: 14px; border-radius: 14px; background: white; border: 1px solid #dce8df; font-size: .94rem; line-height: 1.65; }
.ai-summary strong { color: #285640; font-size: 1rem; }
.ai-summary p { margin: 5px 0; }
.ai-summary small { color: #728078; font-size: .75rem; }
.spinner { display: inline-block; width: 17px; height: 17px; border: 3px solid #d5e6db; border-top-color: #356b52; border-radius: 50%; animation: spin .75s linear infinite; vertical-align: -3px; margin-right: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }
.nearby-group { margin-top: 15px; padding: 13px 12px; background: white; border: 1px solid #e2e9e3; border-radius: 15px; }
.nearby-group h4 { margin: 0 0 8px; color: #304f3c; font-size: 1rem; }
.event-group { background: #fff9ec; border-color: #f1e2c3; }
.local-specialty { background: #f4f0ff; border-color: #e5dcfa; }
.nearby-list { list-style: none; margin: 0; padding: 0; }
.nearby-list li { padding: 10px 0; border-top: 1px solid #edf0ec; }
.nearby-list li:first-child { border-top: 0; }
.nearby-item-title { font-weight: 800; font-size: .96rem; color: #293a30; }
.nearby-item-meta, .nearby-item-address { font-size: .82rem; line-height: 1.5; color: #69766d; margin-top: 3px; }
.nearby-list a, .search-shortcuts a { display: inline-block; margin-top: 6px; padding: 7px 10px; border-radius: 9px; background: #ecf5ef; color: #285640; text-decoration: none; font-size: .82rem; font-weight: 800; }
.no-nearby { margin: 4px 0; color: #78847b; font-size: .9rem; }
.search-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.search-shortcuts a { background: white; border: 1px solid #dedbf0; margin: 0; }
.small-note { font-size: .78rem; color: #778078; line-height: 1.55; margin: 9px 0 0; }
.nearby-fallback { margin-top: 12px; padding: 13px; border-radius: 14px; background: #fff5e7; border: 1px solid #f0debe; }
.nearby-actions { margin-top: 13px; }
.nearby-actions button { min-height: 48px; }
.data-source-note { margin: 12px 0 0; font-size: .75rem; line-height: 1.55; color: #7b847d; }
.detail-close-btn { width: calc(100% - 40px); margin: 0 20px 20px; }
.detail-description { white-space: pre-wrap; line-height: 1.65; }
.detail-gallery { display: grid; grid-template-columns: 1fr; gap: 8px; }
.detail-gallery .detail-photo { margin-bottom: 0; }

@media (min-width: 600px) {
  #addForm { padding: 28px 26px; }
  .nearby-box { padding: 20px; }
}
@media (max-width: 480px) {
  .top { padding-left: 10px; padding-right: 10px; }
  .top-actions { max-width: 57%; }
  .mode-badge { font-size: .68rem; padding: 4px 7px; }
  #refreshBtn { min-width: 34px; }
  .hero-actions { flex-direction: column; max-width: 360px; margin: auto; }
  .hero-actions button { width: 100%; }
  .nearby-box { padding: 13px; }
  .nearby-title-row { flex-direction: column; }
  .auto-badge { align-self: flex-start; }
  .admin-row { gap: 8px; }
  .admin-row-actions button { min-width: 56px; }
}
