*{box-sizing:border-box}
:root{
  --breed-blue:#245ca8;
  --breed-text:#172033;
  --breed-muted:#738096;
  --breed-line:#dfe7f1;
  --breed-bg:#f5f6f8;
  --breed-surface:#fff;
}
body{margin:0;overflow-x:hidden;background:var(--breed-bg);color:var(--breed-text)}
body.is-breed-loading{overflow:hidden}
.breed-page-loader{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:var(--breed-bg);color:var(--breed-text)}
.breed-page-loader[hidden]{display:none}
.breed-page-loader strong{font-size:11px;letter-spacing:.28em}
.breed-page-loader-mark{width:34px;height:34px;border:2px solid #d7dfeb;border-top-color:var(--breed-blue);border-radius:50%;animation:breed-loader-spin .8s linear infinite}
@keyframes breed-loader-spin{to{transform:rotate(360deg)}}
.breed-page{width:100%;min-height:100vh;padding:0 20px 80px}
.breed-page-inner{width:min(1180px,100%);margin:0 auto}
.breed-hero{padding:72px 0 30px}
.breed-hero>p,.section-kicker{margin:0;color:var(--breed-blue);font-size:10px;font-weight:800;letter-spacing:.17em}
.breed-hero h1{margin:8px 0 0;font-size:clamp(48px,8vw,94px);line-height:.98;letter-spacing:-.055em}
.breed-lead{max-width:720px;margin-top:21px;color:var(--breed-muted);font-size:14px;line-height:1.9}

.hero-gallery{display:block;width:min(1040px,100%);margin-inline:auto}
.hero-gallery[hidden]{display:none}
.breed-hero-stage{display:block;width:100%;aspect-ratio:4/3;overflow:hidden;padding:0;border:0;border-radius:22px;background:#e8edf3;cursor:zoom-in}
.breed-hero-stage img{display:block;width:100%;height:100%;border-radius:22px;object-fit:contain}
.breed-hero-thumbs{display:flex;justify-content:center;gap:9px;margin-top:12px;padding:2px 1px 8px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity}
.breed-hero-thumb{flex:0 0 clamp(58px,7vw,80px);aspect-ratio:4/5;overflow:hidden;padding:2px;border:2px solid transparent;border-radius:9px;background:transparent;scroll-snap-align:center}
.breed-hero-thumb.is-active{border-color:var(--breed-text)}
.breed-hero-thumb img{display:block;width:100%;height:100%;border-radius:6px;object-fit:cover;background:#e8edf3}

.breed-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:18px 0 78px}
.breed-stats article{padding:18px;border:1px solid var(--breed-line);border-radius:18px;background:#fff}
.breed-stats span,.breed-stats strong{display:block}
.breed-stats span{color:var(--breed-muted);font-size:8px;font-weight:800;letter-spacing:.14em}
.breed-stats strong{margin-top:7px;font-size:30px;line-height:1}

.breed-sections{display:grid;gap:92px}
.breed-section{min-width:0}
.breed-section-head,.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.breed-section-head h2,.section-heading h2,.database-link-section h2{margin:6px 0 0;font-size:clamp(34px,5vw,58px);line-height:1;letter-spacing:-.045em}
.more-button,.section-link-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 15px;border:1px solid var(--breed-line);border-radius:999px;background:#fff;color:var(--breed-text);text-decoration:none;font-size:10px;font-weight:700}
.breed-section>.more-button{display:flex;width:max-content;margin:18px 0 0 auto}
.section-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.section-tag{min-height:32px;padding:0 11px;border:1px solid var(--breed-line);border-radius:999px;background:#fff;color:var(--breed-text);font-size:9px}
.section-tag.is-active{border-color:var(--breed-blue);background:var(--breed-blue);color:#fff}
.section-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:dense;grid-auto-rows:8px;align-items:start;gap:12px}
.section-grid.count-1{grid-template-columns:minmax(0,760px)}
.section-grid.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.section-grid.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.section-photo{position:relative;display:block;width:100%;min-width:0;align-self:start;overflow:hidden;padding:0;border:0;border-radius:18px;background:#e8edf3;cursor:zoom-in}
.section-grid.count-many .section-photo.is-large{grid-column:span 2}
.section-photo img{width:100%;height:auto;display:block;object-fit:contain}
.section-empty{padding:34px;border:1px dashed var(--breed-line);border-radius:18px;color:var(--breed-muted);text-align:center;font-size:11px}

.comparison-section,.breed-dogs-section{margin-top:110px}
.comparison-controls{display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px;padding:18px;border:1px solid var(--breed-line);border-radius:20px;background:#fff}
.comparison-controls label,.comparison-controls>div{display:grid;gap:7px;color:var(--breed-muted);font-size:9px;font-weight:800}
.comparison-controls select{width:100%;min-height:42px;padding:0 11px;border:1px solid var(--breed-line);border-radius:10px;background:#fff}
.comparison-dog-choices{display:flex;gap:7px;flex-wrap:wrap}
.comparison-dog-choice{display:flex;align-items:center;gap:6px;min-height:36px;padding:0 11px;border:1px solid var(--breed-line);border-radius:999px;background:#fff;color:var(--breed-text);font-size:10px}
.comparison-dog-choice.is-active{border-color:var(--breed-blue);background:var(--breed-blue);color:#fff}
.comparison-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:15px}
.compare-card{overflow:hidden;border:1px solid var(--breed-line);border-radius:18px;background:#fff}
.compare-card button{display:grid;place-items:center;width:100%;padding:0;border:0;background:#e8edf3;cursor:zoom-in;overflow:hidden}
/* 顔貌は比較しやすい1:1。その他の分類は元画像の比率を保ち、見切れさせない。 */
.compare-card img{display:block;width:100%;height:auto;object-fit:contain}
.compare-card[data-category="face"] button{aspect-ratio:1/1}
.compare-card[data-category="face"] img{width:100%;height:100%;object-fit:cover}
.compare-card-body{padding:12px}
.compare-card-body strong,.compare-card-body span{display:block}
.compare-card-body strong{font-size:15px}
.compare-card-body span{margin-top:4px;color:var(--breed-muted);font-size:9px}
.compare-empty{grid-column:1/-1;padding:45px;border:1px dashed var(--breed-line);border-radius:18px;color:var(--breed-muted);text-align:center;font-size:11px}

.breed-dogs-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.breed-dog-card{overflow:hidden;border:1px solid var(--breed-line);border-radius:18px;background:#fff;color:inherit;text-decoration:none}
.breed-dog-card img,.breed-dog-fallback{width:100%;aspect-ratio:1/1;display:block;object-fit:cover;background:#e8edf3}
.breed-dog-fallback{display:grid;place-items:center;color:var(--breed-muted);font-size:10px}
.breed-dog-body{padding:12px}
.breed-dog-body strong,.breed-dog-body span{display:block}
.breed-dog-body strong{font-size:15px}
.breed-dog-body span{margin-top:5px;color:var(--breed-muted);font-size:9px}

.database-link-section{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:110px;padding:28px;border-radius:24px;background:#15263d;color:#fff}
.database-link-section .section-kicker{color:#8fb8ef}
.database-link-section h2{color:#fff}
.database-link-section p:last-child{margin:12px 0 0;color:rgba(255,255,255,.65);font-size:11px}
.database-link-section>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:1px solid rgba(255,255,255,.25);border-radius:999px;color:#fff;text-decoration:none;font-size:10px;font-weight:700;white-space:nowrap}

.breed-error{margin-top:30px;padding:22px;border:1px solid #e3bcbc;border-radius:16px;background:#fff4f4;color:#9a3535;font-size:12px}
.back-area{margin-top:72px}
.back-link{display:inline-flex;align-items:center;min-height:42px;padding:0 15px;border:1px solid var(--breed-line);border-radius:999px;background:#fff;color:var(--breed-text);text-decoration:none;font-size:10px;font-weight:700}

.photo-modal{position:fixed;inset:0;z-index:500;display:grid;grid-template-columns:70px minmax(0,1fr) 70px;align-items:center;background:rgba(7,12,20,.96)}
.photo-modal[hidden]{display:none}
.modal-scroll{max-height:100vh;overflow-y:auto;overscroll-behavior:contain;padding:24px}
.photo-modal figure{margin:0;text-align:center}
.modal-image-frame{position:relative;display:grid;place-items:center;min-height:min(72vh,760px)}
.photo-modal .modal-image-frame img{display:block;max-width:100%;max-height:calc(100vh - 175px);object-fit:contain}
.modal-image-frame.is-loading img{visibility:hidden}
.modal-image-loading{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.68);font-size:10px;letter-spacing:.12em}
.modal-image-frame:not(.is-loading) .modal-image-loading{display:none}
.photo-modal figcaption{margin-top:10px;color:#fff}
.photo-modal figcaption strong,.photo-modal figcaption span{display:block}
.photo-modal figcaption>span{margin-top:4px;color:rgba(255,255,255,.62);font-size:10px}
.modal-tag-list{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin-top:8px}
.modal-tag-list span{padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.1);font-size:8px}
.modal-compare-link{display:flex;align-items:center;justify-content:center;width:min(760px,100%);min-height:42px;margin:12px auto 0;border:1px solid #5c625f;border-radius:999px;color:#fff;text-decoration:none;font-size:11px;font-weight:700}
.photo-modal figcaption a{display:inline-flex;margin-top:9px;padding:6px 10px;border:1px solid rgba(255,255,255,.25);border-radius:999px;color:#fff;text-decoration:none;font-size:9px}
.modal-close{position:absolute;top:16px;right:16px;width:42px;height:42px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:rgba(0,0,0,.25);color:#fff;font-size:25px}
.modal-nav{width:50px;height:66px;justify-self:center;border:0;border-radius:999px;background:rgba(255,255,255,.1);color:#fff;font-size:42px}
.modal-related{margin:20px 0 40px;padding-top:20px;border-top:1px solid rgba(255,255,255,.14);text-align:left}
.modal-related h3{margin:0 0 14px;color:#fff;font-size:16px}
.modal-related-grid{columns:4 150px;column-gap:10px}
.modal-related-item{display:block;width:100%;margin:0 0 10px;padding:0;overflow:hidden;break-inside:avoid;border:0;border-radius:12px;background:#111;cursor:pointer}
.photo-modal .modal-related-item img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}

@media(max-width:900px){
  .comparison-grid,.breed-dogs-grid{grid-template-columns:repeat(3,1fr)}
  .section-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:680px){
  .breed-page{padding-inline:12px}
  .breed-hero{padding-top:44px}
  .breed-hero-stage{aspect-ratio:4/5;border-radius:14px}
  .breed-hero-stage img{border-radius:14px}
  .breed-hero-thumbs{justify-content:flex-start;gap:7px}
  .breed-hero-thumb{flex:0 0 calc((100% - 28px)/5)}
  .breed-stats{gap:7px;margin-bottom:58px}
  .breed-stats article{padding:13px 10px}
  .breed-sections{gap:68px}
  .breed-section-head,.section-heading{align-items:flex-start}
  .section-grid,.section-grid.count-2,.section-grid.count-3{grid-template-columns:repeat(2,1fr)}
  .section-grid.count-1{grid-template-columns:1fr}
  .section-grid.count-many .section-photo.is-large{grid-column:1/-1}
  .comparison-controls{grid-template-columns:1fr}
  .comparison-grid,.breed-dogs-grid{grid-template-columns:repeat(2,1fr)}
  .database-link-section{align-items:flex-start;flex-direction:column}
  .photo-modal{grid-template-columns:42px minmax(0,1fr) 42px}
  .modal-nav{width:35px;height:54px;font-size:32px}
  .modal-scroll{padding:14px 6px}
  .modal-related-grid{columns:2 120px}
}
@media(max-width:420px){
  .breed-section-head,.section-heading{display:block}
  .more-button,.section-link-button{margin-top:13px}
  .section-grid,.section-grid.count-2,.section-grid.count-3,.comparison-grid{grid-template-columns:1fr}
  .section-grid.count-many .section-photo.is-large{grid-column:span 1}
}

/* 2026-07-29: 犬種ページのギャラリー・比較・白背景ビューアを統一 */
.section-tags{display:none!important}
.breed-section-head{margin-bottom:18px}
.breed-section>.more-button{
  display:flex;
  width:max-content;
  margin:18px 0 0 auto;
}
.section-grid{
  width:100%;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-flow:dense;
  align-items:start;
}
.section-grid.count-many .section-photo.is-large{grid-column:span 2}

.comparison-grid{
  width:min(1180px,100%);
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  margin-inline:auto;
}
.compare-card button{
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:100%;
  height:auto!important;
  min-height:180px;
  overflow:hidden;
}
.compare-card img,
.compare-card[data-category="face"] img{
  display:block;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:min(30vh,330px)!important;
  margin:auto;
  object-fit:contain!important;
  object-position:center!important;
}
.compare-card[data-category="face"] button{
  aspect-ratio:1/1!important;
}
.compare-card[data-category="face"] img{
  max-height:100%!important;
}
.compare-card-body{padding:8px 10px}

.photo-modal{
  display:block;
  overflow-y:auto;
  background:#fff;
}
.photo-modal[hidden]{display:none}
.modal-scroll{
  width:100%;
  max-height:none;
  margin:0 auto;
  padding:58px clamp(12px,2.2vw,38px) 34px;
  overflow:visible;
}
.photo-modal figure{width:100%}
.modal-image-frame{
  width:100%;
  min-height:min(76vh,820px);
}
.photo-modal .modal-image-frame img{
  width:auto;
  max-width:100%;
  max-height:82vh;
}
.modal-nav{display:none!important}
.modal-close{
  position:fixed;
  z-index:3;
  top:14px;
  right:14px;
  border-color:#cfd5dc;
  background:#fff;
  color:#172033;
}
.photo-modal figcaption,
.modal-related h3{color:#172033}
.modal-image-loading{color:#738096}
.photo-modal figcaption>span{color:#738096}
.modal-tag-list span{background:#eef1f5;color:#172033}
.modal-compare-link,
.photo-modal figcaption a{
  border-color:#cfd5dc;
  color:#172033;
}
.modal-related{
  border-top-color:#dfe7f1;
}
.modal-related-grid{
  width:100%;
  columns:6 190px;
  column-gap:12px;
}
.modal-related-item{background:#eef1f5}

@media(max-width:680px){
  .breed-section-head{display:block}
  .section-grid,
  .section-grid.count-2,
  .section-grid.count-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section-grid.count-many .section-photo.is-large{grid-column:1/-1}
  .breed-section>.more-button{margin-top:15px}
  .comparison-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
  .compare-card button{
    height:auto!important;
    min-height:120px;
  }
  .compare-card img,
  .compare-card[data-category="face"] img{
    max-height:min(25vh,210px)!important;
  }
  .compare-card-body{padding:7px}
  .compare-card-body strong{font-size:12px}
  .compare-card-body span{font-size:8px}
  .modal-scroll{padding:58px 8px 24px}
  .modal-image-frame{min-height:68vh}
  .photo-modal .modal-image-frame img{max-height:78vh}
  .modal-related-grid{columns:2 130px}
}

@media(max-width:420px){
  .section-grid,
  .section-grid.count-2,
  .section-grid.count-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section-grid.count-many .section-photo.is-large{grid-column:1/-1}
}
