/* 上野山シェルティ 新デザイン（試作 第2版）
   旧サイトの骨組み（上の帯・左の緑の列・白い本文）を残し、文字を大きく、角を丸くして親しみやすくした。
   差し色は上野山の犬に多いセーブルの毛色。 */
:root {
  --forest: #1d4a2c;         /* 旧サイトの緑 */
  --forest-deep: #0f2e1a;
  --forest-soft: #e8efe6;
  --sable: #b06a24;          /* セーブルの毛色 */
  --sable-deep: #8a4f17;
  --sable-soft: #f7ebdc;
  --merle: #66717c;
  --paper: #ffffff;
  --ink: #23292a;
  --line: #dfe4dc;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --italic: "Lora", "Georgia", serif;
  --gutter: 16px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 1.0625rem/1.85 var(--round); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--sable-deep); }
:focus-visible { outline: 3px solid var(--sable); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-weight: 700; line-height: 1.45; margin: 0; }
p { margin: 0 0 .9em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ───── 上の帯（旧サイトの「UENOYAMA Shelties」の画像をそのまま使う） ───── */
header.site { background: var(--forest-deep); }
.banner { display: block; max-width: 1024px; }
.banner img { width: 100%; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px var(--gutter); background: var(--forest); position: sticky; top: 0; z-index: 5; }
header.site { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: #fff; font-weight: 700; padding: 6px 16px 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); }
.menu summary::before { content: "≡"; margin-right: 8px; font-size: 1.15rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; left: 0; right: 0; background: var(--forest); padding: 4px var(--gutter) 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; z-index: 6; box-shadow: 0 12px 20px -12px rgba(0,0,0,.4); }
.menu nav a { color: #fff; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.14); text-decoration: none; }
.menu nav a[aria-current="page"] { color: #f2cf9f; }
.lang { color: #fff; font-size: .9rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 3px 12px; text-decoration: none; }
.lang:hover { color: #fff; background: rgba(255,255,255,.12); }

/* ───── 全体の段組み：PCでは旧サイトと同じく左に緑の列 ───── */
.layout { display: flex; flex-direction: column; }
main { padding: 0 var(--gutter); min-width: 0; }
.side { background: var(--forest-deep); color: #fff; padding: 22px var(--gutter) 28px; }
.side-nav { display: none; }
.side-lang { display: none; }

section { margin: 34px 0; }
.sec-head, section > h2 { border-bottom: 3px solid var(--sable); padding-bottom: 6px; margin-bottom: 14px; }
.sec-head h2, section > h2 { font-size: 1.4rem; color: var(--forest-deep); }
.more { font-weight: 700; }
.button { display: inline-block; background: var(--forest); color: #fff; font-weight: 700; text-decoration: none; padding: 10px 20px; border-radius: 999px; }
.button:hover { background: var(--sable-deep); color: #fff; }

/* ───── トップの最初の画面 ───── */
.hero { text-align: center; margin-top: 22px; }
.plate { margin: 0 auto 10px; max-width: 501px; }
.plate img { margin: 0 auto; }
.welcome { font-family: var(--italic); font-style: italic; color: #8f8f8f; font-size: 1.12rem; line-height: 1.6; }
.mat { margin: 16px auto 0; background: #fff; padding: 8px 8px 0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 22px -16px rgba(15,46,26,.5); max-width: 626px; }
.mat img { width: 100%; border-radius: 6px; }
.mat figcaption { text-align: center; padding: 8px 4px 10px; }
.mat:not(:has(figcaption)) { padding-bottom: 8px; }
.stamp { display: inline-block; margin-top: 16px; color: var(--sable-deep); background: var(--sable-soft); padding: 4px 14px; border-radius: 999px; font-weight: 700; }

/* 最近の結果 */
.latest-list { list-style: none; margin: 0 0 12px; padding: 0; }
.latest-list a { display: block; padding: 12px 0; border-bottom: 1px dashed var(--line); color: inherit; text-decoration: none; }
.latest-list a:hover .show { color: var(--sable-deep); }
.latest-list time { color: var(--merle); font-size: .9rem; display: block; }
.latest-list .show { font-size: 1.15rem; color: var(--forest-deep); font-weight: 700; display: block; }
.who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }

/* 賞のリボン（セーブル色）：このサイトで一番目立たせる部品 */
.ribbon {
  display: inline-block; background: var(--sable); color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.5;
  padding: 3px 20px 3px 11px; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%);
  border-radius: 4px 0 0 4px;
}

/* 牡犬の帯 */
.dog-strip { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dog-strip a { display: block; color: inherit; text-decoration: none; }
.dog-strip img { aspect-ratio: 6 / 5; object-fit: cover; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.call { display: block; font-size: 1.15rem; font-weight: 700; color: var(--forest-deep); margin-top: 6px; }
.reg { display: block; font-family: var(--italic); font-style: italic; color: var(--merle); font-size: .88rem; line-height: 1.5; }
.mating { background: var(--sable-soft); padding: 12px 16px; border-radius: var(--radius); color: var(--sable-deep); font-weight: 700; }

/* 写真の列（スマホでは横にめくる） */
.gal-row { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.gal-row figure { margin: 0; scroll-snap-align: start; }
.gal-row img { border-radius: var(--radius); }
.gal-row figcaption { text-align: center; padding-top: 6px; }

.video-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.video-list a { color: inherit; text-decoration: none; font-size: .92rem; display: block; }
.video-list img { border-radius: 8px; margin-bottom: 4px; }

.poem { font-family: var(--italic); font-style: italic; color: #8f8f8f; text-align: center; margin: 40px auto; }
.poem p { margin: 0 0 .3em; }

.updates { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 28px 0; }
.updates summary { cursor: pointer; font-weight: 700; color: var(--forest); }
.updates ul { columns: 2 14em; padding-left: 1.2em; margin: 10px 0 0; font-size: .92rem; }

/* ───── 左の列（PC）／本文の後ろ（スマホ）の案内 ───── */
.guide, .contact { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; }
.guide h2, .contact h2 { font-size: 1.1rem; color: var(--forest-deep); margin-bottom: 8px; }
.guide { border-top: 6px solid var(--sable); }
.contact dl { margin: 0 0 8px; }
.contact dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.contact dt { white-space: nowrap; }
.contact dd { margin: 0 0 0 auto; font-weight: 700; white-space: nowrap; }
.contact-note { color: var(--merle); font-size: .85rem; margin: 10px 0 2px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px; }
.related h2 { font-size: 1rem; color: #f2cf9f; border: 0; margin-bottom: 8px; }
.related { margin: 22px 0 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.related a { display: block; color: #fff; text-decoration: none; font-size: .9rem; }
.related img { margin-bottom: 4px; }

/* ───── 各ページ ───── */
.page-head { padding-top: 24px; }
.page-head h1 { font-size: 1.8rem; color: var(--forest-deep); border-bottom: 3px solid var(--sable); padding-bottom: 6px; margin-bottom: 12px; }
.jump { display: flex; gap: 6px 8px; flex-wrap: wrap; font-size: .92rem; margin: 8px 0; }
.jump a { background: var(--forest-soft); color: var(--forest-deep); border-radius: 999px; padding: 2px 12px; text-decoration: none; }
.jump a:hover { background: var(--sable-soft); }
.dog { display: grid; gap: 14px; padding: 26px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 70px; }
.dog .mat { max-width: 470px; margin: 0; }
.dog h2 .call { font-size: 1.8rem; margin: 0; }
.dog h2 .reg { font-size: 1rem; margin-top: 2px; }
.titles { list-style: none; padding: 0; margin: 10px 0; }
.titles li { padding-left: 18px; position: relative; }
.titles li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 9px; border-radius: 50%; background: var(--sable); }
.dog .summary { margin: 10px 0 6px; line-height: 1.9; }
.dog .sources { margin: 0 0 10px; font-size: .86rem; color: var(--merle); line-height: 1.7; }
.ped { margin: 12px 0; background: var(--forest-soft); border-radius: var(--radius); padding: 10px 14px; }
.ped div { display: grid; grid-template-columns: 3em 1fr; gap: 8px; padding: 3px 0; }
.ped dt { color: var(--merle); font-size: .88rem; padding-top: 2px; }
.ped dd { margin: 0; font-family: var(--italic); font-style: italic; }

.years { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 10px; margin-bottom: 6px; }
.years a { flex: none; border: 1px solid var(--line); padding: 4px 13px; border-radius: 999px; text-decoration: none; font-size: .92rem; }
.years a[aria-current="page"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.year-h { font-size: 1.5rem; display: flex; align-items: baseline; gap: 12px; margin-top: 8px; color: var(--forest-deep); }
.year-h span { font-size: .88rem; color: var(--merle); font-weight: 500; }
.event { padding: 22px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 70px; }
.event header { margin-bottom: 8px; }
.event time { color: var(--merle); font-size: .9rem; display: block; }
.event h2 { font-size: 1.2rem; color: var(--forest-deep); }
.entry { margin: 12px 0 20px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.dog-name { font-weight: 700; }
.photos { display: grid; gap: 12px; }
.photos figure { margin: 0; max-width: 524px; }
.photos img { border-radius: var(--radius); }
.links a { margin-right: 14px; }
.dog-god { margin: 14px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; }
.dog-god summary { cursor: pointer; font-family: var(--italic); font-style: italic; color: var(--forest); }
.dog-god .mat { margin: 14px auto; }
.dog-god .poem { margin: 10px 0; text-align: left; font-family: var(--round); font-style: normal; color: var(--ink); line-height: 2; }
.dog-god .poem p:last-child { text-align: right; font-family: var(--italic); font-style: italic; color: var(--merle); }

footer.site { background: var(--forest-deep); color: #e6ece6; padding: 22px var(--gutter) 30px; border-top: 4px solid var(--sable); font-size: .88rem; }
footer.site a { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
footer.site p { margin: 0; opacity: .85; }

/* ───── PC：旧サイトと同じく左に緑の列（メニュー・連絡先・関連サイト） ───── */
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  header.site { background: var(--forest-deep) linear-gradient(90deg, transparent 1024px, var(--forest-deep) 1024px); }
  .topbar { display: none; }
  .layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .side { grid-column: 1; grid-row: 1; min-height: 100%; padding: 20px 18px 32px; position: relative; box-shadow: inset -6px 0 8px -6px rgba(0,0,0,.6); }
  main { grid-column: 2; grid-row: 1; padding: 0 var(--gutter) 40px; max-width: 920px; }
  .side-nav { display: grid; margin-bottom: 18px; }
  .side-nav a { color: #fff; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 700; }
  .side-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
  .side-nav a[aria-current="page"] { background: var(--sable); }
  .side-lang { display: block; margin: 0 0 22px 12px; }
  .guide, .contact { font-size: .95rem; padding: 16px; }
  .dog-strip { grid-template-columns: repeat(4, 1fr); }
  .gal-row { grid-auto-columns: calc((100% - 28px) / 3); }
  .video-list { grid-template-columns: repeat(3, 1fr); }
  .dog { grid-template-columns: minmax(0, 400px) 1fr; gap: 28px; align-items: start; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ── 読み物（旧ページから変換したニュース・出産情報・コラムなど） ── */
.article { max-width: 680px; }
.article p { margin: 0 0 1em; overflow-wrap: anywhere; }
.article h2 { font-size: 1.3rem; color: var(--forest); margin: 1.8em 0 .7em; padding-bottom: 6px; border-bottom: 2px solid var(--sable-soft); scroll-margin-top: 70px; }
.article .anchor { display: block; position: relative; top: -70px; visibility: hidden; }
.article figure.mat { margin: 6px auto 18px; max-width: 520px; }
.article figure.mat img { width: 100%; height: auto; border-radius: 6px; }
.article img.inline { display: inline-block; vertical-align: middle; max-height: 1.6em; width: auto; }
.article pre { font: .95rem/1.7 var(--italic); background: var(--forest-soft); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; white-space: pre; }
.article .c-red { color: var(--sable-deep); font-weight: 700; }
.article .c-blue, .article .c-green { color: var(--forest); font-weight: 700; }
.article .big { font-size: 1.12em; }
.article .small { font-size: .9em; }
.article a .c-red, .article a .c-blue, .article a .c-green { color: inherit; }
.new { display: inline-block; font: 700 .72rem/1 var(--round); letter-spacing: .06em; color: #fff; background: var(--sable); border-radius: 999px; padding: 4px 8px; margin-right: 4px; vertical-align: 2px; }
.prev-page { margin-top: 2.4em; font-size: .9rem; }
.dog-photos { max-width: 470px; }
.more-photos { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.more-photos .mat { margin: 0; }
.more-photos img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 25%; width: 100%; }

/* ── 交配の案内・現役と歴代の見出し ── */
.mating a { color: var(--sable-deep); }
.mating-tel { display: block; font-weight: 500; font-size: .95em; margin-top: 4px; }
.group-h { font-size: 1.35rem; color: var(--forest); margin: 34px 0 0; padding: 6px 0 6px 12px; border-left: 6px solid var(--sable); background: var(--sable-soft); border-radius: 0 var(--radius) var(--radius) 0; scroll-margin-top: 70px; }
.jump .jump-h { flex-basis: 100%; font-weight: 700; color: var(--forest); font-size: .92rem; margin-top: 6px; }

/* ── お問い合わせフォーム（送信ボタンまで1画面に収める） ── */
.contact-form { max-width: 560px; display: grid; gap: 12px; }
.contact-form .form-note { color: var(--sable-deep); font-size: .92rem; margin: 0; }
.contact-form label { display: grid; gap: 4px; font-weight: 700; font-size: .95rem; }
.contact-form input, .contact-form textarea { font: 500 1rem/1.6 var(--round); padding: 8px 10px; border: 1px solid #c9d1c6; border-radius: 8px; width: 100%; background: #fff; color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 8em; }
.contact-form .button { justify-self: start; font: 700 1.05rem var(--round); padding: 10px 28px; border: 0; border-radius: 999px; background: var(--forest); color: #fff; cursor: pointer; }
.contact-form .form-tel { font-size: .9rem; margin: 0; }
.contact-form .hp { position: absolute; left: -9999px; }

/* ── 1頭に複数のリボン（WD とチャンピオン完成など） ── */
.ribbons { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.soon { padding: 18px 20px; background: var(--sable-soft); border-radius: var(--radius); color: var(--sable-deep); font-weight: 700; }
.ribbon.inline { margin: 0 4px; vertical-align: 1px; }
.photos figcaption { text-align: center; font-size: .9rem; margin-top: 4px; color: var(--ink); }

/* ── スタンダード解説の配点表 ── */
.table-wrap { overflow-x: auto; margin: 6px 0 18px; }
.points-table { border-collapse: collapse; min-width: 300px; width: 100%; max-width: 520px; font-variant-numeric: tabular-nums; }
.points-table th, .points-table td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.points-table thead th { background: var(--forest); color: #fff; font-size: .9rem; white-space: nowrap; }
.points-table .grp { background: var(--sable-soft); color: var(--sable-deep); font-weight: 700; }
.points-table .num { text-align: right; white-space: nowrap; }
.points-table .sub { font-weight: 700; color: var(--forest); vertical-align: middle; }
.points-table tfoot th, .points-table tfoot td { border-top: 2px solid var(--forest); border-bottom: 0; font-weight: 700; }

/* 犬の詳細ページ（旧ページの「写真と血統」をスマホ向けにしたもの） */
.back { margin: 14px 0; }
.back a { font-weight: 700; color: var(--forest); }
.detail-head .reg { font-family: var(--italic); font-style: italic; color: var(--forest); margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.detail-head .parents { color: #555; margin: 4px 0 0; overflow-wrap: anywhere; }
.detail-head .parents::before { content: "父 × 母　"; font-size: .85em; color: var(--sable-deep); }
.dog-detail .titles li { color: #b00000; font-weight: 700; }
.detail-text { line-height: 1.9; margin: 10px 0; }
.pedigree h2 { font-size: 1.2rem; color: var(--forest-deep); margin: 28px 0 8px; border-left: 5px solid var(--sable); padding-left: 10px; }
.ped, .ped ul { list-style: none; margin: 0; padding: 0; }
.ped > li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; }
.ped ul { margin-left: 14px; border-left: 2px solid var(--line); padding-left: 10px; }
.ped li { margin: 6px 0; }
.ped-l { display: inline-block; min-width: 3.6em; font-size: .8rem; color: var(--sable-deep); font-weight: 700; margin-right: 6px; }
.ped > li > .ped-n { font-weight: 700; color: var(--forest-deep); }
.ped-n { overflow-wrap: anywhere; }
