/* 공개 입양 페이지 — 양평군 품 유기동물보호센터 로고 색(#f39744)에 맞춤 */
:root {
  color-scheme: light;
  --brand: #f39744;        /* 로고 띠 주황 */
  --brand-soft: #fdebd9;   /* 연한 주황 바탕 */
  --brand-deep: #c4570f;   /* 버튼 · 링크 (흰 글씨가 잘 보이는 진한 주황) */
  --brown: #6e3510;        /* 제목 */
  --ink: #3b2a1e;          /* 본문 */
  --muted: #7c6656;
  --bg: #fff8f0;           /* 크림 바탕 */
  --panel: #ffffff;
  --line: #f0dfcd;
  --heart: #e2463b;
  --green: #2f7d45;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(110, 53, 16, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }   /* 위에 붙은 로고 띠에 가리지 않게 */
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Noto Sans KR", system-ui, sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: var(--brand-deep); }
button, select, input { font: inherit; color: inherit; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
.jua { font-family: "Jua", sans-serif; font-weight: 400; }

/* 맨 위 로고 띠 */
.top { background: var(--brand); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { flex: 0 1 auto; min-width: 0; }
.logo img { height: 56px; width: auto; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav a { color: #fff; text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.topnav a:hover, .topnav a.on { background: rgba(255, 255, 255, .22); }
.topnav .tel { background: #fff; color: var(--brand-deep); margin-left: 6px; }
.topnav .tel:hover { background: var(--brand-soft); }
.tel-s { display: none; }
@media (max-width: 480px) { .tel-n { display: none; } .tel-s { display: inline; } }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 0; padding-top: 6px; }
  .logo img { height: 44px; }
  .topnav { width: 100%; margin: 0 -8px; padding-bottom: 6px; overflow-x: auto; }
  .topnav a { padding: 6px 10px; font-size: 15px; }
  .topnav .tel { margin-left: auto; }
}

/* 첫 화면 제목 */
.hero { text-align: center; padding: 36px 0 22px; }
.hero h1 { font-family: "Jua", sans-serif; font-weight: 400; color: var(--brown); font-size: clamp(34px, 6vw, 52px); line-height: 1.2; margin: 0 0 10px; }
.hero h1 em { font-style: normal; color: var(--brand-deep); }
.hero p { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 17px; }
.sptabs { display: inline-flex; margin-top: 18px; padding: 4px; border-radius: 999px; background: var(--brand-soft); gap: 4px; }
.sptabs button { border: 0; background: transparent; color: var(--brown); font-family: "Jua", sans-serif; font-size: 20px; padding: 6px 22px; border-radius: 999px; cursor: pointer; }
.sptabs button small { font-family: "Noto Sans KR", sans-serif; font-size: 13px; font-weight: 700; opacity: .8; }
.sptabs button.on { background: var(--brand); color: #fff; box-shadow: 0 1px 4px rgba(110, 53, 16, .25); }
.hero .quick { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pillbtn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--brand); background: var(--panel); color: var(--brand-deep); font-weight: 700; padding: 8px 16px; border-radius: 999px; text-decoration: none; cursor: pointer; }
.pillbtn:hover, .pillbtn.on { background: var(--brand); color: #fff; }

/* 우리 집을 알려 주세요 (주황 띠) */
.match { background: var(--brand); border-radius: var(--radius); padding: 20px 20px 16px; margin: 0 -4px; box-shadow: var(--shadow); }
.match h2 { font-family: "Jua", sans-serif; font-weight: 400; color: #fff; font-size: 26px; margin: 0 0 12px; text-align: center; text-shadow: 0 1px 2px rgba(110, 53, 16, .35); }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 900; color: #4a2208; }
.field select, .field input { width: 100%; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgba(110, 53, 16, .12); }
.field select:focus, .field input:focus { outline: 3px solid #fff3e6; outline-offset: 1px; }
.morebtn { min-height: 46px; border: 0; background: transparent; color: #fff; font-weight: 900; cursor: pointer; padding: 0 6px; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.more { display: none; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .6); }
.match.open .more { display: grid; }
.checkf { flex-direction: row; align-items: center; gap: 8px; min-height: 46px; color: #4a2208; font-weight: 700; }
.checkf input { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand-deep); }
@media (max-width: 760px) {
  .match { padding: 16px 14px 12px; margin: 0; }
  .mgrid { grid-template-columns: 1fr 1fr; }
  .mgrid .field:first-child { grid-column: 1 / -1; }
  .morebtn { grid-column: 1 / -1; min-height: 36px; }
  .more { grid-template-columns: 1fr 1fr; }
  .more .field:first-child { grid-column: 1 / -1; }
}

/* 결과 줄 */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 22px 0 12px; }
.bar .count { font-weight: 900; font-size: 18px; color: var(--brown); }
.bar .hint { color: var(--muted); font-size: 14px; }
.bar .reset { margin-left: auto; border: 0; background: none; color: var(--brand-deep); font-weight: 700; cursor: pointer; text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brown); font-size: 13px; font-weight: 700; }

/* 개 카드 */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { position: relative; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(110, 53, 16, .14); }
.card > a { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.ph { position: relative; aspect-ratio: 1; background: var(--brand-soft); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .nophoto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.ribbon { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ribbon span { padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 900; color: #fff; background: var(--green); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.ribbon .notice { background: #5b6b7d; }
.ribbon .long { background: var(--brand-deep); }
.wait { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 8px; background: rgba(59, 42, 30, .78); color: #fff; font-size: 12px; font-weight: 700; }
.heart { position: absolute; right: 10px; top: 10px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); cursor: pointer; display: grid; place-items: center; padding: 0; }
.heart svg { width: 22px; height: 22px; fill: none; stroke: var(--heart); stroke-width: 2.2; }
.heart.on svg { fill: var(--heart); }
.heart:hover { transform: scale(1.06); }
.cbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cname { font-family: "Jua", sans-serif; font-size: 23px; color: var(--brown); line-height: 1.25; }
.cno { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.facts span { padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); }
.ckind { font-size: 14px; color: var(--muted); }
.cgo { margin-top: auto; padding-top: 8px; font-weight: 900; color: var(--brand-deep); font-size: 15px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 16px; color: var(--muted); background: var(--panel); border-radius: var(--radius); }
.loadmore { display: block; margin: 26px auto 10px; min-width: 220px; min-height: 50px; border: 2px solid var(--brand); background: var(--panel); color: var(--brand-deep); font-weight: 900; border-radius: 999px; cursor: pointer; }
.loadmore:hover { background: var(--brand); color: #fff; }
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cname { font-size: 19px; }
  .cbody { padding: 10px 10px 12px; }
  .facts span { font-size: 12px; padding: 1px 6px; }
  .ckind { font-size: 13px; }
  .heart { width: 36px; height: 36px; }
}

/* 상세 */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 18px 0 10px; font-weight: 700; text-decoration: none; }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.gallery .main { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--brand-soft); box-shadow: var(--shadow); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--brand-soft); }
.thumbs button.on { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dhead h1 { font-family: "Jua", sans-serif; font-weight: 400; color: var(--brown); font-size: clamp(32px, 5vw, 44px); line-height: 1.15; margin: 0; }
.dhead .cno { font-size: 14px; margin-top: 4px; }
.dhead .ribbon { position: static; flex-direction: row; flex-wrap: wrap; margin-top: 10px; }
.info { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.info div { padding: 12px 10px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info div:nth-child(3n) { border-right: 0; }
.info div:nth-last-child(-n + 3) { border-bottom: 0; }
.info dt { font-size: 12px; font-weight: 900; color: var(--muted); }
.info dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); }
.waitline { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; color: var(--brown); font-weight: 700; margin: 0 0 14px; }
.waitline b { font-size: 20px; color: var(--brand-deep); }
.cta { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 18px; border-radius: 14px; font-weight: 900; font-size: 17px; text-decoration: none; cursor: pointer; border: 2px solid var(--brand-deep); background: var(--panel); color: var(--brand-deep); }
.btn.primary { background: var(--brand-deep); color: #fff; }
.btn.primary:hover { background: #a94a0c; border-color: #a94a0c; }
.btn:not(.primary):hover { background: var(--brand-soft); }
.btn.fav.on { color: var(--heart); border-color: var(--heart); }
.btn svg { width: 20px; height: 20px; }
.btn.fav svg { fill: none; stroke: currentColor; stroke-width: 2.2; }
.btn.fav.on svg { fill: currentColor; }
.ctanote { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.box { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-top: 18px; }
.box h2 { font-family: "Jua", sans-serif; font-weight: 400; color: var(--brown); font-size: 22px; margin: 0 0 8px; }
.box p { margin: 0; }
.box.notice { background: #f1f4f8; box-shadow: none; }
.box.intro { border-left: 6px solid var(--brand); }
.box.intro p { font-size: 17px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: flex-start; counter-increment: s; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; display: grid; place-items: center; }
.steps b { display: block; color: var(--brown); }
.steps small { color: var(--muted); font-size: 14px; }
.more-dogs { margin-top: 36px; }
.more-dogs h2 { font-family: "Jua", sans-serif; font-weight: 400; color: var(--brown); font-size: 26px; margin: 0 0 12px; }
@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 16px; }
  .cta { grid-template-columns: 1fr 1fr; }
  .cta .primary { grid-column: 1 / -1; }
  .info dd { font-size: 15px; }
}

/* 입양 절차 · 준비 중 · 센터 안내 화면 */
.how { max-width: 760px; margin: 0 auto; }
.pillbtn b[data-favn] { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; text-align: center; }
.pillbtn.on b[data-favn] { background: #fff; }

/* 첫 화면: 카테고리 타일 */
.hero.home { padding-top: 44px; }
.cats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 18px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.cat:hover { transform: translateY(-3px); border-color: var(--brand); }
.cat-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); display: grid; place-items: center; }
.cat-ic svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat-t { font-family: "Jua", sans-serif; font-size: 24px; color: var(--brown); line-height: 1.2; margin-top: 4px; }
.cat-t small { font-family: "Noto Sans KR", sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.cat-s { font-size: 14px; color: var(--muted); }
.cat.soon .cat-ic { background: var(--brand-soft); }
.cat.soon .cat-ic svg { stroke: var(--brand-deep); }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sechead a { font-weight: 900; text-decoration: none; }
@media (max-width: 860px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .cat { padding: 14px 12px; } .cat-t { font-size: 20px; } .cat-ic { width: 44px; height: 44px; } }

.soonbox { text-align: center; padding: 30px 20px; }
.cat-ic.big { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 22px; }
.cat-ic.big svg { width: 38px; height: 38px; }
.soonbox .sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.contact { margin-top: 36px; }
.cinfo { display: grid; gap: 8px; margin: 6px 0 12px; }
.cinfo div { display: flex; gap: 12px; }
.cinfo dt { flex: none; width: 44px; font-weight: 900; color: var(--muted); }
.cinfo dd { margin: 0; }
.maplinks { display: flex; flex-wrap: wrap; gap: 8px; }
.footnav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.foot-links { flex-direction: column; align-items: flex-start; gap: 4px; }

/* 아래쪽 */
.foot { margin-top: 56px; background: var(--brown); color: #fbe7d4; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 26px; padding-bottom: 30px; }
.foot p { margin: 4px 0 0; font-size: 14px; }
.foot a { color: #fff; }
.foot-name { font-family: "Jua", sans-serif; font-weight: 400; font-size: 20px; color: #fff; }
.foot-links { display: flex; align-items: flex-end; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
:focus-visible { outline: 3px solid var(--brand-deep); outline-offset: 2px; }
