@import url("https://fonts.googleapis.com/css2?family=Jua&display=swap");

:root {
  --bg: #eaf6fb;
  --card: #ffffff;
  --text: #3d3a4b;
  --muted: #7a7a8c;
  --accent: #ff8a4c;
  --accent-dark: #e8702f;
  --accent-soft: #fff3df;
  --pink: #ffe3e0;
  --border: #cfe6f2;
  --shadow: #b7d6e8;
  --paw: rgba(255, 138, 76, .10);
  --display: "Jua", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17212b;
    --card: #1f2c38;
    --text: #eaf1f6;
    --muted: #a3b3c0;
    --accent: #ff9a5e;
    --accent-dark: #ff8a4c;
    --accent-soft: #3a2f26;
    --pink: #433030;
    --border: #2f4252;
    --shadow: #0f161d;
    --paw: rgba(255, 154, 94, .08);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%2362a8d1' fill-opacity='.14' transform='rotate(-20 30 30)'%3E%3Cellipse cx='30' cy='36' rx='9' ry='7'/%3E%3Ccircle cx='19' cy='25' r='4'/%3E%3Ccircle cx='27' cy='20' r='4'/%3E%3Ccircle cx='35' cy='20' r='4'/%3E%3Ccircle cx='42' cy='25' r='4'/%3E%3C/g%3E%3Cg fill='%2362a8d1' fill-opacity='.10' transform='rotate(15 90 90)'%3E%3Cellipse cx='90' cy='96' rx='9' ry='7'/%3E%3Ccircle cx='79' cy='85' r='4'/%3E%3Ccircle cx='87' cy='80' r='4'/%3E%3Ccircle cx='95' cy='80' r='4'/%3E%3Ccircle cx='102' cy='85' r='4'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65;
}
a { color: var(--accent-dark); }
main { max-width: 1040px; margin: 0 auto; padding: 12px 16px 48px; }

/* 헤더 */
.site-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.site-header .logo {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 2px solid var(--border);
  box-shadow: 0 3px 0 var(--shadow);
  border-radius: 999px;
  padding: 6px 16px;
}
.site-header nav { display: flex; gap: 6px; font-size: .9rem; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.site-header nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.site-header nav a[aria-current] { background: var(--accent); color: #fff; }

/* 푸터 */
.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 16px 44px;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}
.site-footer::before { content: "🐾 🐾 🐾"; display: block; letter-spacing: 8px; margin-bottom: 10px; opacity: .6; }
.site-footer nav { display: flex; gap: 14px; justify-content: center; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

/* 제목 */
h1 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin: 10px 0 6px; line-height: 1.3; }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin: 32px 0 10px; }
h2::before { content: "🐾"; margin-right: 8px; font-size: .9em; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: .95rem; }

/* 히어로 */
.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--accent-soft);
  border: 2px solid var(--border);
  border-radius: 28px;
  padding: 18px 20px;
  margin: 8px 0 18px;
}
.hero .dog { font-size: 3.4rem; line-height: 1; animation: wag 2.4s ease-in-out infinite; transform-origin: 70% 90%; }
.hero h1 { margin: 0 0 4px; font-size: 1.7rem; }
.hero .sub { margin: 0; }
@keyframes wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* 카드 & 폼 */
.card {
  background: var(--card);
  border: 2px solid var(--border);
  box-shadow: 0 5px 0 var(--shadow);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 22px;
}
label { display: block; font-weight: 700; font-size: .9rem; margin: 16px 0 6px; }
label:first-child { margin-top: 0; }
input, select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.range-val { float: right; color: var(--accent-dark); font-weight: 800; background: var(--accent-soft); border-radius: 999px; padding: 0 10px; }
input[type=range] { padding: 0; accent-color: var(--accent); }

/* 결과 */
.result {
  background: linear-gradient(135deg, var(--accent-soft), var(--pink));
  border-color: var(--accent);
  box-shadow: 0 5px 0 var(--accent);
  text-align: center;
}
.big { font-family: var(--display); font-size: 3rem; color: var(--accent-dark); line-height: 1.1; }
.big::before { content: "🥣"; display: block; font-size: 2rem; margin-bottom: 4px; }
.big small { font-size: 1rem; color: var(--text); font-family: inherit; font-weight: 700; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; text-align: left; }
.stat { background: var(--card); border: 2px solid var(--border); border-radius: 18px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.25rem; font-family: var(--display); font-weight: 400; color: var(--accent-dark); }
.stat span { font-size: .8rem; color: var(--muted); }
.empty { color: var(--muted); padding: 8px 0; }
.empty::before { content: "🐕"; display: block; font-size: 2rem; }
.note { font-size: .85rem; color: var(--muted); }
.note ul { padding-left: 18px; margin: 6px 0 0; }

/* 글 목록 카드 */
.guide-list { display: grid; gap: 12px; padding: 0; list-style: none; margin: 0; }
.guide-list a {
  display: block;
  position: relative;
  background: var(--card);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--shadow);
  border-radius: 20px;
  padding: 14px 16px 14px 52px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.guide-list a::before { content: "🐾"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; }
.guide-list a:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 0 var(--accent); }
.guide-list b { display: block; margin-bottom: 2px; }
.guide-list span { font-size: .88rem; color: var(--muted); }

/* 글 본문 */
article p, article li { font-size: 1rem; }
article ul, article ol { padding-left: 20px; }
article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: .92rem; border: 2px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card); }
article th, article td { border-bottom: 1px solid var(--border); padding: 9px 12px; text-align: left; }
article tr:last-child td { border-bottom: 0; }
article th { background: var(--accent-soft); font-family: var(--display); font-weight: 400; }
.meta { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.callout {
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  border-radius: 18px;
  padding: 14px 16px 14px 46px;
  margin: 18px 0;
  font-size: .95rem;
  position: relative;
}
.callout::before { content: "💡"; position: absolute; left: 14px; top: 12px; font-size: 1.3rem; }
.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.05rem;
  box-shadow: 0 4px 0 var(--accent-dark);
  transition: transform .1s, box-shadow .1s;
}
.cta:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }
.related { margin-top: 36px; }

/* 광고 자리 */
.ad-slot { margin: 24px 0; text-align: center; min-height: 0; }

textarea { width: 100%; padding: 12px 14px; font-size: 1rem; border: 2px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); font-family: inherit; min-height: 120px; }
button.submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--display);
  font-size: 1.05rem;
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 0 4px 0 var(--accent-dark);
}
button.submit:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }

@media (max-width: 420px) {
  .hero { flex-direction: column; text-align: center; }
  h1 { font-size: 1.6rem; }
}
/* 글·소개 등 본문은 읽기 좋은 폭으로 */
article { max-width: 760px; margin: 0 auto; }

/* 태블릿 이상 */
@media (min-width: 720px) {
  main { padding: 20px 24px 64px; }
  .site-header, .site-footer { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 26px 32px; gap: 24px; }
  .hero .dog { font-size: 4.6rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero .sub { font-size: 1.05rem; }
  .calc-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
  .calc-layout .result { position: sticky; top: 16px; }
  .guide-list { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.1rem; }
}
@media (min-width: 1000px) {
  .guide-list { grid-template-columns: 1fr 1fr 1fr; }
  article .guide-list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .dog { animation: none; }
  * { transition: none !important; }
}
