/* 色は病棟の連想から：スクラブの青緑、リネンの白、ナースコールの琥珀色 */
:root {
  --scrub: #0b5f61;
  --scrub-deep: #073f42;
  --mint: #dcefe9;
  --mint-pale: #f1f8f5;
  --linen: #fcfdfc;
  --ink: #17302f;
  --ink-soft: #4b6462;
  --rule: #c4d9d3;
  --lamp: #ffb627;
  --lamp-deep: #e89b00;
  --star-off: #cfdcd8;
  --sample: #fff1b8;
  --sample-ink: #5c4300;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --font-round: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0 auto;
  max-width: 600px;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, p, ul, table, blockquote, fieldset, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
table { border-collapse: collapse; width: 100%; }
a { color: var(--scrub); }

:focus-visible { outline: 3px solid var(--scrub-deep); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* 共通ヘッダー */
.site-header { background: var(--scrub); color: #fff; padding: 8px var(--gutter); }
.site-header__name { font-family: var(--font-round); font-size: 14px; font-weight: 700; }
.pr-note { background: var(--mint); padding: 4px var(--gutter); font-size: 13px; font-weight: 700; }

/* SAMPLE表示：sampleMode が false なら消える */
[data-sample-only] { display: none; }
.is-sample [data-sample-only] { display: block; }
.sample-band { background: var(--sample); color: var(--sample-ink); padding: 6px var(--gutter); font-size: 13px; line-height: 1.6; }
.sample-tag {
  background: var(--sample); color: var(--sample-ink);
  font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 2px;
}
.placeholder-note {
  background: var(--sample); color: var(--sample-ink);
  font-size: 13px; line-height: 1.6; padding: 8px 12px; margin-bottom: 16px;
}

/* 第1層：ファーストビュー */
.hero { padding: 18px var(--gutter) 22px; }
.hero h1 {
  font-family: var(--font-round);
  font-size: clamp(25px, 7.4vw, 34px);
  line-height: 1.32;
  font-weight: 800;
  color: var(--scrub-deep);
  letter-spacing: 0;
}
.hero__meta { margin: 8px 0 14px; font-size: 13px; color: var(--ink-soft); }

.top { border-top: 3px solid var(--scrub); }
.top thead th {
  padding: 4px 4px; font-size: 12px; font-weight: 700;
  color: var(--ink-soft); text-align: left; border-bottom: 1px solid var(--rule);
}
.top tbody tr { border-bottom: 1px solid var(--rule); }
.top td, .top tbody th { padding: 9px 4px; vertical-align: middle; text-align: left; }

.top__rank {
  width: 46px; font-family: var(--font-round); font-size: 26px; font-weight: 800;
  line-height: 1; color: var(--scrub); white-space: nowrap;
}
.top__rank small { font-size: 12px; margin-left: 1px; }
.top__name { font-size: 16px; font-weight: 700; line-height: 1.45; }
.top__score {
  width: 62px; font-family: var(--font-round); font-size: 21px; font-weight: 800;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.top__score small { font-size: 11px; margin-left: 1px; }
.top__link { width: 48px; }
.top__link a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; font-size: 14px; font-weight: 700;
}

/* 1位の行とモザイク。このページで一番目立たせる場所 */
.top tr.is-first { background: var(--mint-pale); border-bottom: 0; }
.top tr.is-first .top__rank { font-size: 34px; }
.top tr.is-first .top__name { font-size: 18px; }
.top tr.is-first .top__score { font-size: 25px; }

.mosaic {
  display: inline-block;
  filter: blur(7px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: filter .35s ease;
}
.mosaic.is-revealed { filter: none; user-select: auto; -webkit-user-select: auto; cursor: auto; }

.top__reveal { background: var(--mint-pale); }
.top__reveal td { padding: 0 4px 12px; }
.reveal-button {
  display: block; width: 100%; min-height: 56px;
  border: 0; border-bottom: 4px solid var(--lamp-deep); border-radius: 6px;
  background: var(--lamp); color: var(--ink);
  font-family: var(--font-round); font-size: 19px; font-weight: 800;
  cursor: pointer;
}
.reveal-button:active { transform: translateY(2px); border-bottom-width: 2px; }

.fine-print { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }

/* 星 */
.stars { position: relative; display: inline-block; width: 90px; height: 18px; vertical-align: -3px; }
.stars__base, .stars__fill { position: absolute; top: 0; left: 0; display: flex; height: 18px; overflow: hidden; }
.stars svg { flex: none; width: 18px; height: 18px; }
.stars__base svg { fill: var(--star-off); }
.stars__fill svg { fill: var(--lamp-deep); }

/* 見出し */
.section-title {
  background: var(--scrub); color: #fff;
  font-family: var(--font-round); font-size: 19px; font-weight: 800; line-height: 1.4;
  padding: 11px var(--gutter);
}
.section-lead { padding: 12px var(--gutter) 0; font-size: 15px; }
.sub-heading { margin: 18px 0 6px; font-size: 15px; font-weight: 700; color: var(--scrub-deep); }

/* TOP5の詳細 */
.detail { padding: 20px var(--gutter) 26px; border-bottom: 6px solid var(--mint); scroll-margin-top: 8px; }
.detail.is-highlighted { background: var(--mint-pale); }
.detail__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail__rank {
  flex: none; font-family: var(--font-round); font-size: 44px; font-weight: 800;
  line-height: 1; color: var(--scrub);
}
.detail__rank small { font-size: 16px; }
.detail__name { font-family: var(--font-round); font-size: 23px; font-weight: 800; line-height: 1.35; }
.detail__score { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.detail ul, .card__more ul { padding-left: 1.2em; list-style: disc; }
.detail li::marker, .card__more li::marker { color: var(--scrub); }

.cta {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 8px 14px; margin: 14px 0 0;
  background: var(--lamp); color: var(--ink);
  border-bottom: 4px solid var(--lamp-deep); border-radius: 6px;
  font-family: var(--font-round); font-size: 17px; font-weight: 800; line-height: 1.35;
  text-align: center; text-decoration: none;
}
.cta:active { transform: translateY(2px); border-bottom-width: 2px; }
.cta--compact { min-height: 50px; font-size: 16px; }

.spec { margin-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.6; }
.spec tr { border-bottom: 1px solid var(--rule); }
.spec th, .spec td { padding: 8px 8px; text-align: left; vertical-align: top; }
.spec tbody th, .spec tr > th[scope="row"] { width: 6.2em; background: var(--mint-pale); font-weight: 700; }
.spec thead th { background: var(--mint); font-size: 13px; }

.review { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--mint); font-size: 14px; line-height: 1.7; }
.review cite { display: block; margin-top: 2px; font-size: 12px; font-style: normal; color: var(--ink-soft); }

/* 第2層：絞り込み */
.search { margin-top: 28px; }
#filter-form { padding: 6px var(--gutter) 0; }
.filter { margin-top: 12px; }
.filter legend { padding: 0; font-size: 14px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; min-height: 44px; padding: 4px 13px;
  border: 1px solid var(--rule); border-radius: 22px; background: #fff;
  font-size: 14px; line-height: 1.3;
}
.chip input:checked + span { background: var(--scrub); border-color: var(--scrub); color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--scrub-deep); outline-offset: 2px; }

.text-button {
  min-height: 44px; margin-top: 6px; padding: 0 2px; border: 0; background: none;
  color: var(--scrub); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer;
}

.result-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px; padding: 8px 0; border-top: 3px solid var(--scrub);
}
.result-bar__count { font-size: 14px; }
.result-bar__count b { font-family: var(--font-round); font-size: 22px; color: var(--scrub-deep); }

.cards { padding: 0 var(--gutter); }
.card { padding: 14px 0 18px; border-top: 1px solid var(--rule); }
.card__head { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.card__rank { font-family: var(--font-round); font-weight: 800; color: var(--scrub); }
.card__name { font-family: var(--font-round); font-size: 18px; font-weight: 800; line-height: 1.4; }
.card__score { grid-column: 2; font-size: 14px; }
.card__facts { margin-top: 8px; font-size: 14px; line-height: 1.6; }
.card__facts div { display: flex; gap: 10px; }
.card__facts dt { flex: none; width: 5em; color: var(--ink-soft); }
.card__tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.card__tags li { padding: 1px 8px; background: var(--mint); border-radius: 3px; font-size: 12px; line-height: 1.7; }
.card__more { margin-top: 8px; font-size: 14px; }
.card__more summary { display: flex; align-items: center; min-height: 44px; color: var(--scrub); font-weight: 700; cursor: pointer; }
.card__more ul { margin-top: 10px; }
.card .cta { margin-top: 10px; }

.empty { margin: 0 var(--gutter); padding: 22px 16px; background: var(--mint-pale); text-align: center; font-size: 14px; }
.empty__title { font-family: var(--font-round); font-size: 17px; font-weight: 800; }

/* 読み物 */
.prose { margin-top: 28px; padding-bottom: 8px; scroll-margin-top: 8px; }
.prose > :not(.section-title) { margin-left: var(--gutter); margin-right: var(--gutter); }
.prose > .section-title + * { margin-top: 14px; }
.prose > p { margin-top: 10px; }
.prose h3 { margin-top: 20px; font-size: 16px; font-weight: 700; color: var(--scrub-deep); }
.prose > table.spec { width: calc(100% - 2 * var(--gutter)); }
.spec--wide td:nth-child(3) { white-space: nowrap; }

.faq { margin-top: 8px; border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; align-items: center; min-height: 48px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.faq p { padding-bottom: 12px; font-size: 15px; }

.site-footer {
  margin-top: 32px; padding: 18px var(--gutter) 26px;
  background: var(--scrub-deep); color: #fff; font-size: 13px;
}
.site-footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mosaic { transition: none; }
}

/* TOP5直下の簡易検索 */
.quick { margin-top: 16px; padding: 12px; background: var(--mint-pale); border-top: 3px solid var(--mint); }
.quick__title { font-size: 15px; font-weight: 700; color: var(--scrub-deep); }
.quick__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.quick__fields label { display: block; font-size: 12px; font-weight: 700; }
.quick__button {
  display: block; width: 100%; min-height: 48px; margin-top: 10px;
  border: 1px solid var(--scrub); border-radius: 6px; background: #fff; color: var(--scrub);
  font: inherit; font-weight: 700; cursor: pointer;
}
select, input[type="search"] {
  display: block; width: 100%; min-height: 44px; padding: 6px 8px;
  border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink);
  font: inherit; font-size: 16px;
}

/* 絞り込みの追加分 */
.keyword { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; }
.more-filters { margin-top: 12px; border-top: 1px solid var(--rule); }
.more-filters summary {
  display: flex; align-items: center; min-height: 48px;
  color: var(--scrub); font-weight: 700; cursor: pointer;
}
.result-bar { scroll-margin-top: 8px; }
.result-bar .sort { display: block; flex: 0 1 190px; font-size: 12px; font-weight: 700; }

/* 比較 */
.compare { margin: 8px var(--gutter) 12px; scroll-margin-top: 8px; }
.compare h3 { font-size: 16px; font-weight: 700; color: var(--scrub-deep); }
.compare__scroll { margin-top: 6px; overflow-x: auto; }
.compare-table { min-width: 100%; font-size: 13px; line-height: 1.5; }
.compare-table th, .compare-table td {
  min-width: 96px; padding: 7px 8px; border: 1px solid var(--rule);
  text-align: left; vertical-align: top;
}
.compare-table th[scope="row"] { min-width: 76px; background: var(--mint-pale); }
.compare-table thead th { background: var(--mint); }
.compare-link { display: block; padding: 8px 0; font-weight: 700; }
.compare-limit { margin: 0 var(--gutter); font-size: 13px; font-weight: 700; color: var(--scrub-deep); }
.compare-toggle { position: relative; display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 14px; font-weight: 700; }
.compare-toggle input { width: 20px; height: 20px; margin: 0 8px 0 0; accent-color: var(--scrub); }
.compare-bar {
  position: fixed; left: 50%; bottom: 12px; z-index: 10; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 24px; background: var(--scrub-deep); color: #fff;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}

/* 詳細の追加分 */
.cta-note { margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.fit { margin-top: 14px; font-size: 14px; line-height: 1.7; }
.fit div + div { margin-top: 6px; }
.fit dt { font-weight: 700; color: var(--scrub-deep); }
.weight { margin-left: 4px; font-size: 12px; color: var(--ink-soft); }
.update-log { font-size: 14px; }
.filter-note { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.source-link { margin-top: 6px; font-size: 12px; }
