:root{
  --bg:#f5f5f7;
  --surface:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --accent:#1d4f91;
  --accent-dark:#174a84;
  --border:#e5e5ea;
  --soft:#eef4fb;
  --shadow:0 8px 30px rgba(0,0,0,.08);
  --radius:22px;
}

*{box-sizing:border-box;}

html{scroll-behavior:smooth;}

html,
body{
  margin:0;
  padding:0;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  background:
    radial-gradient(circle at top left,rgba(29,79,145,.08),transparent 34%),
    linear-gradient(180deg,#fafafa 0%,var(--bg) 100%);
  color:var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "YuGothic",
    "Meiryo",
    "Segoe UI",
    sans-serif;
  font-weight:400;
  letter-spacing:.012em;
  line-height:1.72;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

body{
  min-height:100vh;
}

a{
  color:inherit;
  text-decoration:none;
}

button{
  font:inherit;
  color:inherit;
  background:none;
  border:none;
  cursor:pointer;
}

img{
  display:block;
  width:100%;
  max-width:100%;
}

.container{
  width:min(1200px,calc(100% - 32px));
  margin:0 auto;
}

/* =========================
   Header / Footer
========================= */

.site-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(245,245,247,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(0,0,0,.06);
}

.site-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
}

.site-brand{
  display:block;
  color:inherit;
  text-decoration:none;
}

.brand-kicker,
.hero-kicker,
.eyebrow{
  margin:0;
  font-size:10px;
  letter-spacing:.26em;
  color:#8a8a93;
  font-weight:500;
}

.brand-title{
  margin:4px 0 0;
  font-size:17px;
  line-height:1.22;
  font-weight:650;
  color:var(--accent-dark);
  letter-spacing:.015em;
}

.header-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.header-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(0,0,0,.06);
  color:#4b5563;
  font-size:13px;
  line-height:1;
  font-weight:550;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.header-nav a:hover{
  background:#fff;
  color:var(--accent-dark);
  border-color:rgba(22,63,116,.18);
  transform:translateY(-1px);
}

.header-nav a.active{
  background:var(--accent-dark);
  border-color:var(--accent-dark);
  color:#fff;
}

.footer{
  border-top:1px solid var(--border);
  padding:30px 0 44px;
  color:#8a8a93;
  font-size:12px;
  letter-spacing:.08em;
  text-align:center;
}

/* =========================
   Hero
========================= */

.hero{
  padding:32px 0 18px;
}

.hero.is-compact{
  padding:24px 0 14px;
}

.hero.is-empty{
  padding:12px 0 0;
}

.hero-kicker{
  margin:0;
  font-size:10px;
  letter-spacing:.24em;
  color:#8a8a93;
  font-weight:500;
  text-transform:uppercase;
}

.hero-title{
  margin:6px 0 0;
  font-size:clamp(30px,4vw,48px);
  line-height:1.05;
  letter-spacing:-.025em;
  color:#111827;
  font-weight:650;
}

.home-hero .hero-title{
  font-size:clamp(32px,4.5vw,52px);
  line-height:1.05;
  letter-spacing:-.03em;
}

.hero-lead{
  margin:10px 0 0;
  max-width:740px;
  color:var(--muted);
  font-size:14px;
  line-height:1.75;
  font-weight:400;
}

/* =========================
   Sections
========================= */

.section{
  padding:22px 0 42px;
}

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
}

.section-title{
  margin:0 0 18px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:24px;
  color:#111827;
  font-weight:680;
  letter-spacing:.025em;
}

.section-head .section-title{
  margin:0;
}

.section-title svg{
  width:25px;
  height:25px;
  stroke:var(--accent-dark);
  stroke-width:2;
  fill:none;
}

.section-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 15px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border);
  color:#4b5563;
  font-size:12px;
  font-weight:550;
  box-shadow:0 5px 18px rgba(0,0,0,.04);
  white-space:nowrap;
}

.section-link:hover{
  color:var(--accent-dark);
  border-color:rgba(22,63,116,.2);
}

/* =========================
   Toolbar / Category
========================= */

.toolbar,
.subtoolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0 18px;
}

.subtoolbar{
  display:none;
  margin-top:-8px;
}

.subtoolbar.show{
  display:flex;
}

.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 15px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.66);
  color:#4b5563;
  font-size:13px;
  font-weight:550;
  transition:.18s ease;
  white-space:nowrap;
}

.chip:hover{
  border-color:#cbd5e1;
  background:#fff;
  color:var(--accent-dark);
}

.chip.active{
  background:var(--accent-dark);
  border-color:var(--accent-dark);
  color:#fff;
}

/* =========================
   Cards
========================= */

.card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  padding-bottom:70px;
}

@media (min-width:640px){
  .card-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (min-width:900px){
  .card-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media (min-width:1100px){
  .card-grid{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}

.card{
  display:block;
  width:100%;
  height:100%;
  text-align:left;
}

.card-shell{
  height:100%;
  background:rgba(255,255,255,.74);
  backdrop-filter:blur(16px);
  border:1px solid rgba(0,0,0,.06);
  border-radius:20px;
  padding:14px;
  box-shadow:var(--shadow);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.card:hover .card-shell{
  transform:translateY(-4px);
  box-shadow:0 14px 34px rgba(0,0,0,.10);
  border-color:rgba(29,79,145,.12);
}

/* 
  基本は1:1。
  犬種・Profile画像は正方形。
  雑誌だけ3:4、日記だけ4:3。
*/
.card-photo{
  background:#eef2f7;
  border-radius:14px;
  overflow:hidden;
  aspect-ratio:1/1;
}

.card-photo.is-cover{
  aspect-ratio:3/4;
}

.card-photo.is-diary{
  aspect-ratio:4/3;
}

.card-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 35%;
  background:#eef2f7;
}

.card-meta{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
  font-size:11px;
  color:#8a8a93;
  min-height:19px;
  text-transform:uppercase;
}

.card-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:19px;
  padding:0 7px;
  border-radius:999px;
  background:#eef4fb;
  color:var(--accent);
  font-weight:550;
}

.card-badge.normal{
  background:#f2f2f4;
  color:#6b7280;
}

.card-title{
  margin:8px 0 0;
  font-size:15px;
  line-height:1.4;
  font-weight:650;
  color:#111827;
}

.card-text{
  margin:5px 0 0;
  font-size:12px;
  color:#6b7280;
  line-height:1.6;
}

.dog-meta{
  margin:8px 0 0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.dog-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#eef4fb;
  color:var(--accent);
  font-size:11px;
  font-weight:550;
}

.empty{
  padding:24px 0 70px;
  color:#8a8a93;
  font-size:14px;
}

/* =========================
   Breed Detail / Profile Detail Shared
========================= */

.profile-photo{
  aspect-ratio:1/1;
}

.profile-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 35%;
}

.representative-card{
  aspect-ratio:1/1;
}

/* =========================
   Mobile
========================= */

@media (max-width:640px){
  .container{
    width:calc(100% - 24px);
  }

  .site-header-inner{
    align-items:flex-start;
    gap:10px;
    flex-wrap:wrap;
    padding:12px 0;
  }

  .site-brand{
    width:100%;
  }

  .brand-kicker,
  .hero-kicker,
  .eyebrow{
    font-size:8px;
    letter-spacing:.24em;
  }

  .brand-title{
    font-size:14px;
    line-height:1.25;
  }

  .header-nav{
    width:100%;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:6px;
  }

  .header-nav a{
    min-height:40px;
    padding:0 4px;
    font-size:11px;
    border-radius:14px;
    font-weight:520;
  }

  .header-nav a:nth-child(5),
  .header-nav a:nth-child(6){
    display:none;
  }

  .hero{
    padding:20px 0 12px;
  }

  .hero.is-compact{
    padding:16px 0 10px;
  }

  .hero-title{
    font-size:28px;
    font-weight:650;
    letter-spacing:-.02em;
  }

  .home-hero .hero-title{
    font-size:30px;
  }

  .hero-lead{
    display:none;
  }

  .section{
    padding:18px 0 30px;
  }

  .section-title{
    font-size:21px;
    font-weight:650;
  }

  .section-link{
    min-height:34px;
    padding:0 12px;
    font-size:11px;
  }

  .toolbar,
  .subtoolbar{
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
    padding-bottom:2px;
    margin:12px 0 14px;
  }

  .toolbar::-webkit-scrollbar,
  .subtoolbar::-webkit-scrollbar{
    display:none;
  }

  .chip{
    flex:0 0 auto;
    font-size:13px;
    padding:0 14px;
  }

  .card-grid{
    gap:14px;
    padding-bottom:52px;
  }

  .card-shell{
    border-radius:16px;
    padding:12px;
  }

  .card-photo{
    border-radius:12px;
  }

  .card-title{
    font-size:13px;
  }

  .card-text{
    font-size:11px;
  }

  .representative-card{
    aspect-ratio:1/1;
    min-height:auto;
  }

  .profile-photo{
    aspect-ratio:1/1;
  }
}

@media (max-width:380px){
  .header-nav a{
    font-size:10px;
    min-height:38px;
  }

  .hero-title{
    font-size:24px;
  }

  .home-hero .hero-title{
    font-size:26px;
  }

  .card-title{
    font-size:12px;
  }
}
