
html {
  scroll-behavior: smooth;
}

body:not(.home) h2 {
  color: #fff;
  background: linear-gradient(75deg,#556B2F 3%, #556B2F 8%,#1e293b 8%,#1e293b 9%, #556B2F 9%, #556B2F 10%,#1e293b 10%,#1e293b 100%);
}

body:not(.home) h3 {
  border-bottom: 4px groove #1e293b;
  padding: 0 0 10px 5px;
  color: #1e293b;
  margin-bottom:.5em;
}

body:not(.home) h4 {
  border-left: 8px ridge #1e293b;
  padding: 0 0 0 10px;
  color: #1e293b;
}

article h2 {
  margin: 4em 0 1em;
}

article h3 {
  margin: 2.5em 0 .5em;
}

article h4 {
  margin: 2em 0 1em;
}

h3:first-letter {
  color: #556B2F;
  font-size: 1.2em
}

.bnp_bc_cover {
  box-shadow: 0 0 10px rgba(0, 0, 0, .15);
  position: sticky;
  top: 0;
  z-index: 1;
}

#sidebar {
  align-self: stretch;
}
.toc-pc-only{
  position: sticky;
  top: 55px;
}
ul.navi li a {
  font-weight: 500;
}
.bnp_indexlist li a {
  line-height: 1.2!important;
  padding: .5em 0!important;
  border-bottom: 1px dashed #ddd;
  text-indent: -1.2em;
  margin-left: 1em;
}
.bnp_indexlist li:last-child a {
  border:none;
}
/* --- 補助リンク（Perplexity 風） --- */
.yws-link-list {
  margin: .5em 0 2em;
  padding: 0!important;
  list-style: none!important;
  border-bottom: 1px solid #e8e4de;
}

.yws-link-list__item{
  border-top: 1px solid #e8e4de;
}

.yws-link-list__link {
  display: block;
  padding: 0.9em 1em;
  color: #2c2c2c;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline!important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.yws-link-list__link::before {
  content: "↳";
  display: inline-block;
  margin-right: 0.55em;
  color: #6b6b6b;
  font-weight: 400;
}

/* --- ランクバッジ・順位メダル（共通） --- */
.yws-city-stat__missing {
  color: #aaa;
}

.yws-city-stat__rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(5.5rem, 16vw, 7rem);
  height: clamp(5.5rem, 16vw, 7rem);
  margin: 0 auto 0.65em;
  border-radius: 50%;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.yws-city-stat__rank-letter {
  font-size: 2.75em;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.yws-city-stat__rank-badge--s {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 32% 22%, #ffffff 0%, #d9eef8 22%, #b8cce8 48%, #c8b8e8 72%, #e2eaf2 100%);
  box-shadow: inset 0 -3px 8px rgba(120, 140, 190, 0.18), 0 5px 14px rgba(100, 120, 180, 0.22);
}

.yws-city-stat__rank-badge--s::after {
  content: '';
  position: absolute;
  inset: -60%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.75) 50%, transparent 58%);
  animation: yws-rank-s-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}

.yws-city-stat__rank-badge--s .yws-city-stat__rank-letter {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 1px rgba(0, 0, 0, 0.9);
}

@keyframes yws-rank-s-shine {
  0%, 72%, 100% {
    transform: translateX(-130%);
    opacity: 0;
  }
  38%, 48% {
    opacity: 1;
  }
  55% {
    transform: translateX(130%);
    opacity: 0.85;
  }
}

.yws-city-stat__rank-badge--a { background: radial-gradient(circle at 30% 25%, #ffe566, #ffd024 42%, #e6a817 78%, #c78800); }
.yws-city-stat__rank-badge--b { background: radial-gradient(circle at 30% 25%, #e2e6eb, #b8c0c8 45%, #919aa6 100%); }
.yws-city-stat__rank-badge--c { background: radial-gradient(circle at 30% 25%, #ece6e0, #b3a69b 42%, #8b7e74 100%); }
.yws-city-stat__rank-badge--d { background: radial-gradient(circle at 30% 25%, #dabca3, #be8e66 52%, #a16a3d 100%); }
.yws-city-stat__rank-badge--e { background: radial-gradient(circle at 30% 25%, #cd8b4a, #a6642f 50%, #80481a 100%); }

.yws-city-stat__rank-badge--inline {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto;
}

.yws-city-stat__rank-badge--inline .yws-city-stat__rank-letter {
  font-size: 1.05rem;
}

.yws-pref-hub__rank-medal {
  display: block;
}

svg.yws-pref-hub__rank-medal {
  width: 26px;
  height: 26px;
}

.yws-pref-hub__rank-medal--num {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  min-width: 1.8rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
  line-height: 1;
  justify-content: center;
}

.yws-pref-hub__rank-medal--unranked {
  color: #94a3b8;
}

.yws-pref-hub__rank-medal-suffix {
  font-size: 0.72em;
}
