/* site-tools.css — 홈 화면 추가 · 농장 추가 요청 (index.html, farms.html 공용) */
:root {
  --ci-ink: #221E1A;
  --ci-soft: #5A5148;
  --ci-line: #E2D8C9;
  --ci-cream: #FBF7F0;
  --ci-terra: #C2603C;
  --ci-green: #2F4636;
}

.topact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.tbtn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--ci-terra);
  background: var(--ci-terra); color: #FFF8EF;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 8px 11px; border-radius: 999px;
  cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
  font-family: inherit;
}
.tbtn:hover { background: #A94F2E; border-color: #A94F2E; }
.tbtn.ghost { background: transparent; color: var(--ci-ink); border-color: var(--ci-line); }
.tbtn.ghost:hover { background: #F3ECE1; border-color: #CBBFAE; }
.tbtn:focus-visible { outline: 2px solid var(--ci-terra); outline-offset: 2px; }
.tbtn svg { flex: none; }

/* farms.html 상단 바 안에 들어갈 때 */
.topbar .topact { margin: 6px 0 0; }

/* ── 팝업 공통 ─────────────────────────────────────────────── */
html.ci-lock { overflow: hidden; }

.ci-pop-back {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(34, 30, 26, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}

.ci-pop {
  width: 100%; max-width: 460px; max-height: 88dvh;
  display: flex; flex-direction: column;
  background: var(--ci-cream); color: var(--ci-ink);
  border-radius: 18px; border: 1px solid var(--ci-line);
  box-shadow: 0 24px 60px -24px rgba(34, 30, 26, .55);
  font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px; line-height: 1.55;
  overflow: hidden;
}

.ci-pop-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--ci-line); flex: none;
}
.ci-pop-head h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.ci-pop-x {
  border: 0; background: none; color: var(--ci-soft); font-size: 16px;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; line-height: 1;
}
.ci-pop-x:hover { background: #F3ECE1; color: var(--ci-ink); }

.ci-pop-body { padding: 14px 18px 18px; overflow-y: auto; }
.ci-lead { margin: 0 0 12px; color: var(--ci-soft); font-size: 13px; }

.ci-field { display: block; margin-bottom: 11px; }
.ci-field > span { display: block; font-size: 12px; font-weight: 700; color: var(--ci-soft); margin-bottom: 5px; }
.ci-field input, .ci-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--ci-line); border-radius: 10px;
  background: #FFFDF9; color: var(--ci-ink);
  padding: 10px 11px; font-size: 14px; font-family: inherit; line-height: 1.4;
}
.ci-field textarea { resize: vertical; min-height: 76px; }
.ci-field input:focus, .ci-field textarea:focus {
  outline: none; border-color: var(--ci-terra); box-shadow: 0 0 0 3px rgba(194, 96, 60, .13);
}
.ci-req { color: var(--ci-terra); font-weight: 700; font-size: 11px; margin-left: 3px; }

.ci-link { color: var(--ci-terra); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ci-link:hover { color: #A94F2E; }
.ci-note { margin: 6px 0 0; font-size: 12px; color: var(--ci-soft); }
.ci-msg { min-height: 0; margin: 8px 0 0; font-size: 12.5px; }
.ci-msg:empty { display: none; }
.ci-msg.ok { color: var(--ci-green); font-weight: 600; }
.ci-msg.err { color: #A33B2A; font-weight: 600; }

.ci-pop-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ci-btn {
  border: 1px solid var(--ci-line); background: #fff; color: var(--ci-ink);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.ci-btn:hover { background: #F3ECE1; }
.ci-btn.primary { background: var(--ci-terra); border-color: var(--ci-terra); color: #FFF8EF; }
a.ci-btn { text-decoration: none; display: inline-block; line-height: 1.2; }
.ci-btn.primary:hover { background: #A94F2E; border-color: #A94F2E; }
.ci-btn.ghost { background: transparent; border-color: transparent; color: var(--ci-soft); }
.ci-btn:disabled { opacity: .6; cursor: default; }

.ci-steps { margin: 8px 0 0; padding-left: 20px; }
.ci-steps li { margin: 4px 0; }
.ci-pop-body p { margin: 6px 0; }

@media (max-width: 520px) {
  .ci-pop { max-height: 92dvh; }
  .ci-pop-body { padding: 12px 14px 16px; }
  .tbtn { font-size: 11px; padding: 7px 10px; }
}
