:root {
  --ink: #142726;
  --muted: #647573;
  --paper: #f7faf7;
  --white: #ffffff;
  --teal: #083d3a;
  --teal-2: #0f5a54;
  --mint: #dff1e8;
  --yellow: #f5c96a;
  --line: #dfe8e3;
  --shadow: 0 18px 60px rgba(8, 61, 58, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 250, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--teal); font-size: 19px; }
nav { display: flex; gap: 34px; font-size: 0.92rem; font-weight: 650; }
nav a:hover, nav a:focus-visible { color: var(--teal-2); }

main { overflow: hidden; }
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  background: var(--teal);
  color: white;
}
.hero-content { padding: clamp(62px, 8vw, 112px) clamp(28px, 6vw, 94px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { margin: 0 0 13px; color: #8fd0bd; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(3.1rem, 6vw, 5.7rem); line-height: 0.98; letter-spacing: -0.065em; max-width: 700px; }
h1 span { color: var(--yellow); }
.hero-copy { max-width: 530px; margin: 27px 0 0; color: #c9ddda; font-size: 1.08rem; }
.search-box { margin-top: 34px; max-width: 610px; height: 62px; padding: 7px 7px 7px 20px; display: flex; align-items: center; gap: 12px; background: white; border-radius: 16px; box-shadow: 0 13px 34px rgba(0, 0, 0, 0.18); }
.search-box > span { color: #5a6a68; font-size: 1.6rem; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 0.96rem; }
.search-box button, .empty-state button { border: 0; cursor: pointer; border-radius: 11px; background: var(--yellow); color: #2b332b; font-weight: 800; }
.search-box button { height: 48px; padding: 0 22px; }
.search-box button:hover { background: #ffda80; }
.hero-stats { display: flex; gap: clamp(24px, 4vw, 54px); margin: 42px 0 0; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font-size: 1.45rem; font-weight: 850; line-height: 1.2; }
.hero-stats dd { margin: 4px 0 0; color: #9fbeb9; font-size: 0.78rem; }
.hero-visual { min-height: 650px; position: relative; overflow: hidden; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 61, 58, 0.35), transparent 28%); pointer-events: none; }
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 55% center; }
.image-note { position: absolute; z-index: 2; right: 28px; bottom: 28px; padding: 13px 18px; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.22); border-radius: 13px; background: rgba(5, 38, 36, .72); backdrop-filter: blur(10px); }
.image-note strong { font-size: 0.9rem; }
.image-note span { color: #bed8d3; font-size: 0.75rem; }

.guide, .catalog { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.guide { padding: 100px 0 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.section-heading h2, .catalog h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.13; letter-spacing: -0.045em; }
.section-heading > p { max-width: 440px; margin: 0 0 5px; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.guide-grid article { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.guide-grid article > span { width: 38px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); color: var(--teal); font-size: 0.75rem; font-weight: 850; }
.guide-grid h3 { margin: 23px 0 9px; font-size: 1.06rem; }
.guide-grid p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.catalog { padding: 68px 0 92px; }
.catalog-top { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.catalog-top > p { margin: 0 0 5px; color: var(--muted); font-size: 0.88rem; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 34px 0 28px; }
.filter-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #536461; cursor: pointer; font-weight: 700; font-size: 0.88rem; }
.filter-button:hover { border-color: #93b8af; }
.filter-button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: white; }
.pet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pet-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: white; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.pet-card:hover { transform: translateY(-4px); border-color: #a9c5bd; box-shadow: var(--shadow); }
.card-head { min-height: 154px; padding: 25px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--card-bg), #fff); }
.animal-icon { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 24px; background: rgba(255,255,255,.75); font-size: 2.8rem; box-shadow: 0 12px 32px rgba(29, 64, 58, .09); }
.category-badge { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--teal); font-weight: 800; font-size: 0.72rem; }
.card-body { padding: 22px 24px 24px; display: flex; flex: 1; flex-direction: column; }
.card-body h3 { margin: 0; font-size: 1.24rem; letter-spacing: -0.02em; }
.latin { margin: 1px 0 13px; color: #8a9996; font-size: 0.72rem; font-style: italic; }
.card-summary { min-height: 51px; margin: 0; color: var(--muted); font-size: 0.87rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 19px; }
.card-tags span { padding: 3px 8px; border-radius: 7px; background: #f1f6f3; color: #52635f; font-size: 0.73rem; }
.card-meta { display: flex; gap: 18px; padding-top: 17px; border-top: 1px solid #edf2ef; color: #697a77; font-size: 0.75rem; }
.card-meta strong { color: var(--ink); display: block; font-size: 0.85rem; }
.detail-button { width: 100%; margin-top: 20px; min-height: 43px; border: 1px solid #c9d9d4; border-radius: 11px; background: transparent; color: var(--teal); cursor: pointer; font-weight: 800; }
.detail-button:hover, .detail-button:focus-visible { background: var(--teal); border-color: var(--teal); color: white; }
.empty-state { padding: 60px 20px; text-align: center; border: 1px dashed #b9cbc6; border-radius: 20px; background: white; }
.empty-state > span { font-size: 2rem; }
.empty-state h3 { margin: 10px 0 4px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-state button { margin-top: 20px; padding: 10px 18px; }

.notice { width: min(1180px, calc(100% - 40px)); margin: 0 auto 96px; padding: 30px 34px; display: flex; align-items: center; gap: 22px; border-radius: 20px; background: var(--teal); color: white; }
.notice > span { flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--teal); font-size: 1.45rem; }
.notice h2 { margin: 0; font-size: 1.15rem; }
.notice p { margin: 3px 0 0; color: #bcd4d0; font-size: 0.87rem; }
footer { padding: 30px clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); background: white; color: var(--muted); font-size: 0.8rem; }
.footer-brand { color: var(--ink); }

dialog { width: min(690px, calc(100% - 30px)); max-height: 88vh; padding: 0; overflow: auto; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 30px 100px rgba(5, 38, 36, .3); }
dialog::backdrop { background: rgba(4, 29, 28, .62); backdrop-filter: blur(4px); }
.dialog-close { position: sticky; z-index: 3; top: 16px; float: right; width: 40px; height: 40px; margin: 16px 16px -56px 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer; font-size: 1.6rem; line-height: 1; box-shadow: 0 5px 18px rgba(0,0,0,.15); }
.dialog-hero { min-height: 210px; padding: 35px; display: flex; align-items: end; gap: 24px; background: linear-gradient(135deg, var(--dialog-bg), #fff); }
.dialog-hero .animal-icon { width: 98px; height: 98px; font-size: 3.6rem; }
.dialog-hero h2 { margin: 0; font-size: 2rem; letter-spacing: -0.04em; }
.dialog-hero p { margin: 2px 0 0; color: #637572; font-size: 0.85rem; font-style: italic; }
.dialog-body { padding: 30px 35px 38px; }
.dialog-intro { margin: 0 0 25px; color: var(--muted); }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 27px; }
.detail-stats div { padding: 14px; border-radius: 12px; background: #f2f7f4; }
.detail-stats span { display: block; color: var(--muted); font-size: 0.72rem; }
.detail-stats strong { font-size: 0.9rem; }
.care-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.care-list li { padding: 12px 14px; border-left: 3px solid var(--yellow); background: #fbfcfb; color: #52635f; font-size: 0.88rem; }

:focus-visible { outline: 3px solid #efbd4f; outline-offset: 3px; }
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 430px; order: -1; }
  .hero-content { padding-top: 60px; padding-bottom: 70px; }
  .pet-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .site-header { min-height: 66px; }
  nav { display: none; }
  .hero-visual { min-height: 330px; }
  .image-note { right: 16px; bottom: 16px; }
  .hero-content { padding: 50px 20px 56px; }
  h1 { font-size: clamp(2.8rem, 15vw, 4rem); }
  .search-box { height: auto; padding: 10px 10px 10px 15px; flex-wrap: wrap; }
  .search-box input { min-height: 38px; width: calc(100% - 40px); }
  .search-box button { width: 100%; }
  .hero-stats { justify-content: space-between; gap: 10px; }
  .guide { padding-top: 72px; }
  .section-heading, .catalog-top { display: block; }
  .section-heading > p { margin-top: 18px; }
  .guide-grid, .pet-grid { grid-template-columns: 1fr; }
  .guide-grid article { padding: 24px; }
  .catalog-top > p { margin-top: 8px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .filter-button { flex: 0 0 auto; }
  .notice { align-items: flex-start; padding: 25px; }
  footer { flex-direction: column; align-items: flex-start; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .dialog-hero { padding: 28px 24px; }
  .dialog-body { padding: 25px 24px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
