/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 0.9375rem;
  border: 1px solid transparent; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
/* 주황 바탕에 흰 글씨는 생각보다 잘 안 보여요 (대비 2.5).
   바탕색(브랜드 느낌)은 그대로 두고 글자만 진하게 바꿨습니다. */
.btn-primary { background: var(--accent); color: var(--on-accent, #fff); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-soft); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--heading); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-soft); background: var(--chip-bg); }
.btn-green { background: var(--brand); color: var(--on-brand, #fff); }
.btn-green:hover { background: var(--brand-soft); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }

/* ---------- 데모 안내 배너 (홈) ---------- */
/* 배너 바탕은 어느 테마에서나 '밝은 주황' 이에요.
   그래서 글자색을 테마 변수에 맡기면 주황 위에 주황이 얹혀 안 보입니다.
   (2호기 테마에서 특히 심했어요 — 대비 1.18)
   바탕이 고정이니 글자색도 진한 색으로 고정합니다. */
.demo-banner { background: linear-gradient(90deg, var(--accent), var(--accent-soft)); color: #3a2000; }
.demo-banner-inner {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; text-align: center;
}
.demo-banner p { font-size: 0.90625rem; font-weight: 600; }
.demo-banner b { font-weight: 800; color: #1c0e00; }   /* 강조는 더 진하게 */
/* 예전에는 흰 바탕 + 주황 글씨라 잘 안 보였어요 (대비 2.0) */
.demo-banner-btn {
  background: #2a1400; color: #fff; border-color: #2a1400; white-space: nowrap;
}
.demo-banner-btn:hover { background: #46220a; color: #fff; transform: translateY(-1px); }

/* ---------- 히어로 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--chip-bg), transparent 60%),
    radial-gradient(900px 400px at 0% 110%, var(--surface-2), transparent 55%);
}
/* 🏞️ 홈 첫 화면 배경 그림 — 9개 분류 친구들이 다 모인 그림입니다.
   글자가 묻히지 않도록 위에 옅은 막(veil)을 한 겹 덮습니다.
   그림 파일은 우리 서버에 있어서 어디서 열어도 똑같이 보여요. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: url("../home-bg.webp");
  background-size: cover; background-position: center 38%;
  opacity: .5;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  /* 왼쪽(문구 쪽)은 진하게, 오른쪽은 옅게 덮어 그림이 보이게 */
  background: linear-gradient(100deg,
    var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 38%,
    color-mix(in srgb, var(--bg) 55%, transparent) 72%,
    color-mix(in srgb, var(--bg) 35%, transparent) 100%);
}
.hero > * { position: relative; z-index: 1; }
/* 배경 그림을 쓸 수 없는(아주 오래된) 브라우저에서도 글자는 항상 읽힙니다 */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .hero::after { background: linear-gradient(100deg, var(--bg) 0%, rgba(255,255,255,.72) 45%, rgba(255,255,255,.35) 100%); }
}
/* 어두운 테마에서는 그림을 조금 더 가라앉힙니다 */
[data-theme="dark"] .hero::before,
[data-theme="unit02"] .hero::before { opacity: .34; }
/* 모바일에서는 가벼운 그림으로 */
@media (max-width: 700px) {
  .hero::before { background-image: url("../home-bg-sm.webp"); opacity: .34; }
  .hero::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent), var(--bg) 78%); }
}
/* 홈 첫 화면 — 메인 문구(왼쪽) + 이렇게 이용해요(오른쪽).
   안내 카드를 오른쪽으로 더 밀어 두어 문구가 넉넉히 자리를 씁니다. */
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .78fr);
  gap: 44px; align-items: start;
  /* ⚠️ padding 축약형을 쓰면 .container 가 준 좌우 20px 이 0 으로 덮여서
        큰 제목이 화면 가장자리에 딱 붙습니다. 위아래만 따로 지정해요. */
  padding-top: 56px; padding-bottom: 30px;
}
/* 안내 카드는 오른쪽 끝에 붙입니다 */
.how-card { justify-self: end; width: 100%; max-width: 380px; }

/* 메인 문구 바로 아래 — 화제글 · 새 글을 나란히.
   두 칸 모두 화제글과 똑같은 납작한 줄(hot-mini)을 씁니다. */
.hero-feeds { padding: 6px 0 34px; }
.hero-feeds-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start;
}
.hero-feeds .feed-col { min-width: 0; }
.hero-feeds .feed-head { margin: 0 0 10px; }
.hero-feeds .hot-wrap { margin-bottom: 0; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-bottom: 18px; }
  .how-card { justify-self: stretch; max-width: none; }
  .hero-feeds-inner { grid-template-columns: 1fr; gap: 22px; }
}
/* 화제글을 줄여서 번 자리를 메인 문구에 씁니다 — 홈의 주인공이니까요 */
.hero h1 { font-size: clamp(2.125rem, 5.6vw, 3.75rem); line-height: 1.12; color: var(--heading); letter-spacing: -.5px; }
.hero h1 .accent { color: var(--accent-text, var(--accent)); }
.hero .lead { margin-top: 20px; font-size: 1.25rem; line-height: 1.75; color: var(--text); max-width: 580px; }
.hero-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { margin-top: 40px; display: flex; gap: 32px; }
.hero-stats .num { font-size: 1.625rem; font-weight: 800; color: var(--brand); }
.hero-stats .lbl { font-size: 0.8125rem; color: var(--text-muted); }

.hero-art {
  aspect-ratio: 1 / 1; max-width: 440px; margin-left: auto; width: 100%;
  border-radius: 28px; background: linear-gradient(160deg, var(--surface), var(--chip-bg));
  box-shadow: var(--shadow-lg); position: relative; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.hero-art .emoji-big { font-size: clamp(5.625rem, 16vw, 9.375rem); filter: drop-shadow(0 10px 18px rgba(0,0,0,.12)); }
.hero-art .float {
  position: absolute; background: var(--surface); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--shadow-md); font-size: 0.875rem; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.hero-art .float.f1 { top: 24px; left: -14px; }
.hero-art .float.f2 { bottom: 30px; right: -10px; }
.hero-art .float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-soft); }

/* 이용 방법 미니 카드 (메인 문구 옆) */
/* ⚠️ 이 칸을 못 보고 지나치는 분이 많았습니다.
   흰 바탕에 얇은 선이라 옆의 본문과 구분이 안 됐어요.
   포인트 색 테두리와 옅은 색 바탕을 줘서 '안내판' 처럼 보이게 합니다. */
.how-card {
  position: relative;
  align-self: center; width: 100%; max-width: 380px; margin-left: auto;
  background: var(--chip-bg);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 22px 24px;
  /* 포인트 색을 머금은 그림자 — 종이에서 살짝 떠 보입니다 */
  box-shadow: 0 10px 26px -12px var(--accent), var(--shadow-md);
}
/* 위쪽 모서리에 색 띠 — 눈이 먼저 닿는 자리입니다 */
.how-card::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -2px; height: 4px;
  background: var(--accent); border-radius: 0 0 4px 4px;
}
.how-card-head {
  font-size: 1.3125rem; font-weight: 800; color: var(--heading); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.how-steps { display: flex; flex-direction: column; gap: 13px; list-style: none; margin: 0; padding: 0; }
.how-steps li { display: flex; align-items: center; gap: 11px; font-size: 1.0625rem; color: var(--text); }
/* 다크·2호기 테마에서는 브랜드색이 밝아서 흰 숫자가 묻혔어요 (대비 2.1)
   그래서 브랜드색 위에 올릴 글자색(--on-brand)을 씁니다. */
.how-steps .hs-num {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--brand); color: var(--on-brand, #fff);
  font-weight: 800; font-size: 0.8125rem; display: grid; place-items: center;
}
.how-steps b { color: var(--heading); font-weight: 800; }
.how-card-note {
  /* STEP 0 은 목록 위로 올라갔어요 — 구분선도 아래쪽으로 */
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line);
  font-size: 0.8125rem; color: var(--text-muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.how-card-note b { color: var(--heading); }

/* ---------- How? 이용 안내 ---------- */
.step-note {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: var(--surface-2); border: 1px dashed var(--accent); border-radius: 14px;
  padding: 14px 20px; margin-bottom: 26px; font-size: 0.9375rem; color: var(--text);
}
.step0-badge {
  /* 주황 바탕이라 흰 글씨는 안 보여요 (대비 2.0~2.5) — 진한 글씨로 */
  font-size: 0.75rem; font-weight: 800; color: var(--on-accent, #2a1400); background: var(--accent);
  padding: 3px 10px; border-radius: 999px; letter-spacing: .03em;
}
/* 2호기 테마는 주황이 더 밝아서 --on-accent 를 따로 정해줍니다 */
:root[data-theme="unit02"] { --on-accent: #3a1200; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 22px 24px; text-align: center;
}
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.25rem; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.step-card h3 { font-size: 1.125rem; color: var(--heading); }
.step-card p { margin-top: 8px; font-size: 0.875rem; color: var(--text-muted); }
/* 카드 사이 화살표 (넓은 화면) */
.steps .step-card:not(:last-child)::after {
  content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; color: var(--brand-soft); font-weight: 800; z-index: 1;
}

/* ---------- 카테고리 카드 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-soft); }
.cat-card .ico { font-size: 2.75rem; margin-bottom: 12px; }
.cat-card h3 { font-size: 1.125rem; color: var(--heading); }
.cat-card p { margin-top: 6px; font-size: 0.875rem; color: var(--text-muted); }
.cat-card .count { margin-top: 12px; font-size: 0.8125rem; font-weight: 700; color: var(--brand); }

/* ---------- 🚧 준비 중인 분류 ----------
   아직 열지 않은 곳이에요. 흐릿하게 보여서 "여기도 생기는구나" 하고
   알 수는 있지만, 지금은 들어갈 수 없다는 게 한눈에 보이게 합니다. */
.cat-card.cat-soon {
  position: relative;
  cursor: pointer;
  font: inherit;
  width: 100%;
  /* 살짝 흐리고 색을 뺍니다 — 완전히 가리지는 않아요 */
  opacity: .55;
  filter: grayscale(.35);
}
.cat-card.cat-soon:hover {
  opacity: .78;
  filter: grayscale(.1);
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
/* 카드 위쪽에 붙는 '준비 중' 딱지 — 흐림 효과를 받지 않게 따로 띄웁니다 */
.cat-card.cat-soon .soon-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--chip-bg); color: var(--heading);
  font-size: 0.71875rem; font-weight: 800; letter-spacing: .02em;
  border: 1px solid var(--line);
}
.cat-card.cat-soon .count { color: var(--text-muted); }

/* 메뉴·서랍에 있는 준비 중 항목 */
.cat-soon-link {
  background: none; border: 0; font: inherit; cursor: pointer;
  color: var(--text-muted); opacity: .7;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;   /* 준비 중 칩까지 한 줄로 */
}
.cat-soon-link .soon-mini { flex: none; }
.cat-soon-link:hover { opacity: 1; color: var(--heading); }
.soon-mini {
  font-size: 0.65625rem; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: var(--chip-bg); color: var(--text-muted); border: 1px solid var(--line);
}
/* 아래쪽 정보칸은 바탕이 어느 테마에서나 어두운 초록이에요.
   그래서 --text-muted(밝은 화면 기준 회색)를 쓰면 안 읽힙니다.
   정보칸 안의 다른 글자와 같은 밝은 색으로 맞춥니다. */
.foot-soon { color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.site-footer .foot-soon { color: #cfe0d5; }
.site-footer .foot-soon .soon-mini {
  background: rgba(255, 255, 255, .12); color: #cfe0d5; border-color: rgba(255, 255, 255, .22);
}

/* ---------- 준비 중 안내창 ---------- */
.soon-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .55);
}
.soon-backdrop[hidden] { display: none; }
.soon-panel {
  position: relative; width: min(420px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 26px 26px; text-align: center; box-shadow: var(--shadow-lg);
}
.soon-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: none; color: var(--text-muted); font-size: 1.375rem; line-height: 1; cursor: pointer;
}
.soon-close:hover { background: var(--chip-bg); color: var(--heading); }
.soon-ico { font-size: 3.25rem; line-height: 1; margin-bottom: 12px; }
.soon-ico .emo { width: 52px; height: 52px; vertical-align: middle; }
.soon-panel h2 { font-size: 1.375rem; color: var(--heading); }
.soon-lead { margin-top: 10px; font-size: 0.9375rem; line-height: 1.7; color: var(--text); }
.soon-note {
  margin-top: 16px; padding: 11px 14px; border-radius: 12px;
  background: var(--chip-bg); color: var(--text); font-size: 0.875rem;
}
.soon-note b { color: var(--heading); }
.soon-members { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.soon-panel .btn { margin-top: 20px; width: 100%; }

/* ---------- 공통 카드 그리드 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .thumb {
  aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 3.5rem;
  background: linear-gradient(150deg, var(--chip-bg), var(--surface-2));
}
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.0625rem; color: var(--heading); }
.card p { font-size: 0.875rem; color: var(--text-muted); flex: 1; }
.card .meta { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- 태그 ---------- */
.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--chip-bg); color: var(--brand);
}
.tag.rodent { background: #fbeada; color: var(--tag-rodent); }
.tag.reptile { background: #e2f2e8; color: var(--tag-reptile); }
.tag.crustacean { background: #e0eef8; color: var(--tag-crustacean); }
.tag.isopod { background: #efe4f8; color: var(--tag-isopod); }

/* ---------- 밴드(CTA) ---------- */
/* 어두운 테마에서는 브랜드색·제목색이 밝아져서 흰 글씨가 묻혔어요 (대비 1.59).
   바탕은 그대로 두고 글자를 진하게 바꿉니다. */
.band {
  background: linear-gradient(135deg, var(--brand), var(--heading));
  color: var(--on-brand, #fff); border-radius: 24px; padding: 48px; text-align: center; margin: 0 auto;
}
.band h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); color: inherit; }
.band p { margin-top: 12px; opacity: .92; color: inherit; }
.band .btn { margin-top: 24px; }

/* ---------- 페이지 헤더(서브 페이지 상단) ---------- */
.page-hero {
  background: radial-gradient(900px 360px at 80% -20%, var(--chip-bg), transparent 60%);
  padding: 52px 0 40px; border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(1.625rem, 4vw, 2.5rem); color: var(--heading); }
.cat-hero-inner { display: flex; align-items: center; gap: 20px; }

/* 동물 전용 홈 상단 탭 (정보글/커뮤니티/업체/병원) */
.animal-tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.animal-tab {
  flex: 1 1 150px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.animal-tab:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.animal-tab .at-ico {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.6875rem; background: var(--chip-bg);
}
.animal-tab .at-label { font-size: 1rem; font-weight: 800; color: var(--heading); }

/* 동물 전용 홈 미리보기 패널 */
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.pv-item { min-width: 0; }
.preview-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 12px; }
.preview-panel .pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-panel .pv-head h3 { font-size: 1rem; color: var(--heading); }
.preview-panel .pv-head a { font-size: 0.8125rem; font-weight: 700; color: var(--brand); flex-shrink: 0; }
.pv-list { display: flex; flex-direction: column; }
.pv-item { display: flex; gap: 11px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.pv-item:first-child { border-top: none; }
.pv-item:hover { background: var(--chip-bg); border-radius: 8px; }
.pv-thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb-emoji { display: grid; place-items: center; font-size: 1.375rem; }
.pv-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pv-title { font-size: 0.875rem; font-weight: 700; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title b { color: var(--brand); }
.pv-meta { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-empty { padding: 22px 6px; text-align: center; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }
@media (max-width: 900px) { .preview-grid { grid-template-columns: 1fr; } }

/* 분류 페이지 바로가기 (크고 직관적으로) */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quick-card {
  display: flex; align-items: center; gap: 16px; padding: 22px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.quick-card .qc-ico {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.875rem; background: var(--chip-bg);
}
.quick-card .qc-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.quick-card .qc-tag { font-size: 0.75rem; font-weight: 800; color: var(--brand); }
.quick-card .qc-title { font-size: 1.0625rem; font-weight: 800; color: var(--heading); }
.quick-card .qc-desc { font-size: 0.8125rem; color: var(--text-muted); }
.quick-card .qc-arrow { font-size: 1.375rem; color: var(--brand-soft); font-weight: 800; flex-shrink: 0; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: 1fr; } }
.cat-hero-ico {
  width: 78px; height: 78px; flex-shrink: 0; border-radius: 20px; display: grid; place-items: center;
  font-size: 2.625rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.page-hero p { margin-top: 12px; color: var(--text-muted); font-size: 1rem; max-width: 640px; }
.breadcrumb { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 14px; }
/* '홈' 처럼 짧은 링크는 손가락으로 누르기엔 너무 작아요 (15px).
   글씨 크기는 그대로 두고, 눌리는 면적만 넓혀 줍니다. */
.breadcrumb a {
  display: inline-block; padding: 6px 8px; margin: -6px -8px;
  min-width: 30px; text-align: center;   /* '홈' 처럼 한 글자여도 누를 자리를 확보 */
}
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 필터 바 ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-group { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.filter-group .filterbar { margin-bottom: 12px; }
.filter-label { font-size: 0.8125rem; font-weight: 800; color: var(--text-muted); min-width: 44px; flex-shrink: 0; }
@media (max-width: 640px) {
  .filter-group { flex-direction: column; align-items: flex-start; gap: 4px; }
}
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-size: 0.875rem; font-weight: 600;
  /* ⚠️ 예전에는 transition: .15s 였습니다. 시간만 적으면 '모든 속성' 이 대상이라
        글자 크기까지 전환에 걸립니다. 그런데 글자 크기 설정을 바꿔서
        기준(rem)이 달라지면, 전환에 묶인 칩만 예전 값에 붙들려
        혼자 안 커졌어요. 바뀌어야 할 것만 적습니다. */
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--brand-soft); }
.chip.active { background: var(--brand); color: var(--on-brand, #fff); border-color: var(--brand); }
/* 어두운 테마에서는 브랜드색이 '밝은' 색이라, 그 위에 흰 글자를 얹으면
   대비가 2:1 대까지 떨어져 잘 안 보였어요. 어두운 글자로 뒤집습니다. */
/* 브랜드색 위에 얹을 글자색. 라이트는 브랜드색이 진해서 흰 글씨가 맞아요. */
:root                      { --on-brand: #ffffff; }
/* 주황(accent) 위에 얹을 글자색 — 주황이 밝아서 진한 글씨라야 읽혀요.
   2호기 테마는 주요 버튼이 진한 빨강(#c81400)이라 아래에서 흰 글씨로 따로 정합니다. */
:root, :root[data-theme="dark"] { --on-accent: #2a1400; }
:root[data-theme="dark"]   { --on-brand: #0f2015; }
:root[data-theme="unit02"] { --on-brand: #2a0d07; }

/* ---------- 폼 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.875rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.9375rem; background: var(--surface); color: var(--text); transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand-soft); }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- 모달 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31,61,43,.5); backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 200; padding: 20px;
}
.modal-backdrop.open { display: grid; }
.modal {
  background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; padding: 28px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 1.25rem; color: var(--heading); margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ---------- 사육동물 선택 팝업 ---------- */
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.picker-item {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; color: var(--text); transition: border-color .15s, background .15s, transform .1s;
}
.picker-item:hover { border-color: var(--brand); background: var(--chip-bg); transform: translateY(-2px); }
.picker-item .pk-ico { font-size: 1.625rem; }
.picker-item .pk-name { font-size: 0.875rem; font-weight: 700; color: var(--heading); }
@media (max-width: 480px) { .picker-grid { grid-template-columns: 1fr; } }

/* ---------- 게시판 선택 (☰ 드롭다운) ---------- */
.board-select { position: relative; }
.board-trigger {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  font-family: inherit; font-size: 0.9375rem; font-weight: 800; color: var(--heading);
}
.board-trigger:hover { border-color: var(--brand-soft); }
.board-trigger .caret { font-size: 0.6875rem; opacity: .7; }
.board-ham { display: inline-flex; flex-direction: column; gap: 3px; }
.board-ham span { width: 15px; height: 2px; background: var(--brand); border-radius: 2px; }
.board-menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 210px; z-index: 80; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px;
}
.board-menu.open { display: block; }
.board-item {
  display: block; width: 100%; text-align: left; padding: 11px 14px; border: none; background: none; cursor: pointer;
  border-radius: 8px; font-family: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--text);
}
.board-item:hover { background: var(--chip-bg); color: var(--heading); }
.board-item.active { color: var(--brand); background: var(--chip-bg); }

/* 글쓰기 사전 경고문 */
.write-notice {
  background: var(--surface-2); border: 1px solid var(--accent); border-radius: 12px;
  padding: 12px 16px; font-size: 0.84375rem; color: var(--text); line-height: 1.6; margin: 12px 0 6px;
}
/* 이 안내문은 바탕이 흰색이 아니라 옅은 회색이라, 글자에 쓰는 주황
   (--accent-text) 으로도 살짝 모자랐어요 (4.35). 여기서만 더 진하게. */
.write-notice b { font-weight: 800; color: #8f5210; }
:root[data-theme="dark"] .write-notice b,
:root[data-theme="unit02"] .write-notice b { color: var(--accent); }
