/* 浄水型ウォーターサーバーランキング（.pw-ranking 配下のみに適用） */
.pw-ranking {
  --pw-bg: #f4f4f4;
  --pw-ink: #222222;
  --pw-sub: #6b6b6b;
  --pw-blue: #3985d1;
  --pw-blue-dark: #2a6db0;
  --pw-line: #cccccc;
  --pw-white: #ffffff;
  --pw-soft: #f4f4f4;
  --pw-row: #f9f9f9;
  --pw-font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --pw-font-en: "Lexend", "Zen Kaku Gothic New", sans-serif;
  background: var(--pw-bg);
  color: var(--pw-ink);
  font-family: var(--pw-font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
.pw-ranking *, .pw-ranking *::before, .pw-ranking *::after { box-sizing: border-box; }
:where(.pw-ranking) img { max-width: 100%; height: auto; display: block; }
:where(.pw-ranking) :where(p, ul, ol, dl, dd, h1, h2, h3) { margin: 0; }
:where(.pw-ranking) a { color: var(--pw-blue); }
.pw-ranking a:focus-visible, .pw-ranking summary:focus-visible, .pw-table-wrap:focus-visible { outline: 3px solid var(--pw-blue); outline-offset: 2px; }

/* hero */
.pw-hero { background: var(--pw-blue); color: var(--pw-white); }
.pw-hero__inner { max-width: 1040px; margin: 0 auto; padding: 120px 0 56px; }
.pw-hero__en { font-family: var(--pw-font-en); font-weight: 600; font-size: 48px; line-height: 1.2; letter-spacing: .02em; }
.pw-hero__ja { font-size: 16px; margin-top: 8px; }

/* layout */
.pw-container { max-width: 1040px; margin: 0 auto; padding: 32px 0 96px; }
.pw-section { padding-top: 96px; }
.pw-section > * + * { margin-top: 24px; }
.pw-en { font-family: var(--pw-font-en); font-weight: 600; font-size: 16px; }
.pw-h2 { font-size: 28px; font-weight: 700; line-height: 1.5; }
.pw-section > .pw-en + .pw-h2 { margin-top: 12px; }

/* breadcrumb */
.pw-breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--pw-sub); }
.pw-breadcrumb li + li::before { content: "＞"; margin-right: 4px; }
.pw-breadcrumb a { color: var(--pw-sub); text-decoration: none; }
.pw-breadcrumb a:hover { text-decoration: underline; }

/* intro */
.pw-intro { margin-top: 32px; }
.pw-intro > * + * { margin-top: 16px; }
.pw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12px; color: var(--pw-sub); }
.pw-pr { border: 1px solid var(--pw-sub); border-radius: 2px; padding: 0 8px; font-weight: 700; font-size: 11px; line-height: 1.8; }
.pw-label { font-family: var(--pw-font-en); font-weight: 600; font-size: 16px; color: var(--pw-blue); }
.pw-h1 { font-size: 32px; font-weight: 700; line-height: 1.5; }
.pw-disclosure, .pw-note, .pw-source { font-size: 12px; color: var(--pw-sub); }

/* compare table */
.pw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--pw-white); border: 1px solid var(--pw-line); border-radius: 8px; }
.pw-table { width: 100%; min-width: 1000px; border-collapse: collapse; font-size: 13px; text-align: center; }
.pw-table thead th { background: var(--pw-ink); color: var(--pw-white); font-weight: 700; padding: 14px 10px; white-space: nowrap; }
.pw-table tbody tr:nth-child(even) > * { background: var(--pw-row); }
.pw-table tbody tr > * { background: var(--pw-white); border-top: 1px solid var(--pw-line); padding: 12px 10px; vertical-align: middle; }
.pw-col-rank { width: 56px; }
.pw-col-name { width: 220px; text-align: left; }
.pw-col-name a { display: flex; align-items: center; gap: 12px; color: var(--pw-ink); text-decoration: none; }
.pw-col-name a:hover .pw-name { text-decoration: underline; }
.pw-name { font-weight: 700; font-size: 14px; line-height: 1.5; }
.pw-name small { display: block; font-weight: 500; font-size: 11px; color: var(--pw-sub); }
.pw-thumb { width: 44px; height: 64px; flex: none; border-radius: 4px; object-fit: contain; }
.pw-rankno { font-family: var(--pw-font-en); font-weight: 600; font-size: 22px; }
.pw-rankno.is-top { color: var(--pw-blue); }
.pw-price { color: var(--pw-blue); font-weight: 700; white-space: nowrap; }
.pw-unconfirmed { color: var(--pw-sub); font-size: 12px; }

/* buttons */
.pw-btn { display: inline-block; background: var(--pw-blue); color: var(--pw-white) !important; font-weight: 700; font-size: 16px; text-decoration: none; text-align: center; border-radius: 32px; padding: 16px 48px; transition: background-color .15s; }
.pw-btn:hover { background: var(--pw-blue-dark); }
.pw-btn--sm { font-size: 12px; padding: 10px 16px; white-space: nowrap; }

/* product */
.pw-product { background: var(--pw-white); border-radius: 8px; padding: 40px 48px; scroll-margin-top: 96px; }
.pw-product + .pw-product { margin-top: 32px; }
.pw-product__rank { font-family: var(--pw-font-en); font-weight: 600; font-size: 16px; color: var(--pw-blue); }
.pw-product__name { font-size: 28px; font-weight: 700; line-height: 1.5; margin-top: 8px; }
.pw-product__catch { font-size: 18px; font-weight: 700; color: var(--pw-blue); margin-top: 8px; line-height: 1.6; }
.pw-product__body { display: grid; grid-template-columns: 300px 1fr; gap: 40px; margin-top: 24px; }
.pw-product__img { width: 100%; aspect-ratio: 300 / 380; border-radius: 8px; object-fit: contain; background: var(--pw-soft); }
.pw-product__detail > * + * { margin-top: 20px; }
.pw-product__detail { font-size: 14px; }
.pw-spec { border: 1px solid var(--pw-line); border-radius: 4px; overflow: hidden; font-size: 13px; }
.pw-spec > div { display: grid; grid-template-columns: 160px 1fr; }
.pw-spec > div + div { border-top: 1px solid var(--pw-line); }
.pw-spec dt { background: var(--pw-soft); font-weight: 700; padding: 10px 16px; }
.pw-spec dd { padding: 10px 16px; }
.pw-points__title { font-weight: 700; color: var(--pw-blue); }
.pw-points__title + .pw-points { margin-top: 8px; }
.pw-points { padding-left: 1.2em; }
.pw-points li + li { margin-top: 2px; }
.pw-caution { font-size: 13px; color: var(--pw-sub); }
.pw-product__cta { text-align: center; margin-top: 32px; }

/* no image */
.pw-noimage { display: flex; align-items: center; justify-content: center; background: var(--pw-soft); color: var(--pw-sub); font-size: 12px; text-align: center; padding: 4px; overflow: hidden; }
.pw-thumb.pw-noimage span { display: none; }

/* cards */
.pw-grid { display: grid; gap: 20px; list-style: none; padding: 0; }
.pw-grid--2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pw-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pw-card { background: var(--pw-white); border-radius: 8px; padding: 28px; font-size: 14px; }
.pw-card > * + * { margin-top: 10px; }
.pw-card__title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.pw-grid--2 .pw-card__title { color: var(--pw-blue); font-size: 20px; }
.pw-card__label { font-size: 13px; font-weight: 700; color: var(--pw-sub); }
.pw-card__img { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: contain; }
.pw-card__name { font-size: 20px; font-weight: 700; }
.pw-card__name a { color: var(--pw-ink); text-decoration: none; }
.pw-card__name a:hover { text-decoration: underline; }
.pw-card__strong { font-weight: 700; }
.pw-card__sub { font-size: 12px; color: var(--pw-sub); }
.pw-card__accent { font-size: 12px; color: var(--pw-blue); }
.pw-criteria { counter-reset: pw-c; }
.pw-criteria .pw-card { counter-increment: pw-c; }
.pw-criteria .pw-card::before { content: counter(pw-c, decimal-leading-zero); display: block; font-family: var(--pw-font-en); font-weight: 600; font-size: 20px; color: var(--pw-blue); }

/* faq */
.pw-faq__item { background: var(--pw-white); border-radius: 8px; }
.pw-faq__item + .pw-faq__item { margin-top: 12px; }
.pw-faq__item summary { cursor: pointer; list-style: none; padding: 24px 56px 24px 32px; position: relative; }
.pw-faq__item summary::-webkit-details-marker { display: none; }
.pw-faq__item summary::after { content: "+"; position: absolute; right: 28px; top: 50%; transform: translateY(-50%); font-family: var(--pw-font-en); font-size: 22px; color: var(--pw-blue); }
.pw-faq__item[open] summary::after { content: "−"; }
.pw-faq__item summary h3 { font-size: 16px; font-weight: 700; line-height: 1.6; display: inline; }
.pw-faq__item p { padding: 0 32px 24px; font-size: 14px; }

/* profile */
.pw-profile { display: flex; align-items: center; gap: 32px; background: var(--pw-white); border-radius: 8px; padding: 32px 40px; }
.pw-profile__avatar { width: 96px; height: 96px; flex: none; border-radius: 50%; background: var(--pw-soft); padding: 16px; object-fit: contain; }
.pw-profile > div > * + * { margin-top: 8px; }
.pw-profile__name { font-size: 22px; font-weight: 700; }
.pw-profile__role { font-size: 13px; color: var(--pw-blue); }
.pw-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pw-tags li { background: var(--pw-soft); color: var(--pw-sub); border-radius: 16px; padding: 2px 12px; font-size: 12px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .pw-hero__inner, .pw-container { padding-left: 24px; padding-right: 24px; }
}

/* ---------- SP ---------- */
@media (max-width: 767px) {
  .pw-ranking { font-size: 14px; }
  .pw-hero__inner { padding: 88px 20px 32px; }
  .pw-hero__en { font-size: 34px; }
  .pw-hero__ja { font-size: 13px; }
  .pw-container { padding: 20px 20px 64px; }
  .pw-section { padding-top: 64px; }
  .pw-section > * + * { margin-top: 16px; }
  .pw-h1 { font-size: 22px; }
  .pw-h2 { font-size: 21px; }
  .pw-intro { margin-top: 20px; }

  /* 比較表：横スクロール＋順位・製品名の列を固定 */
  .pw-table-wrap { margin: 0 -20px; border-radius: 0; border-left: 0; border-right: 0; }
  .pw-table { min-width: 840px; font-size: 12px; }
  .pw-table .pw-col-rank { position: sticky; left: 0; z-index: 2; width: 40px; padding-left: 8px; padding-right: 4px; }
  .pw-table .pw-col-name { position: sticky; left: 40px; z-index: 2; width: 150px; box-shadow: 1px 0 0 var(--pw-line); }
  .pw-table thead .pw-col-rank, .pw-table thead .pw-col-name { z-index: 3; }
  .pw-thumb { width: 32px; height: 46px; }
  .pw-name { font-size: 12px; }
  .pw-rankno { font-size: 18px; }

  .pw-product { padding: 28px 20px; margin-left: -4px; margin-right: -4px; scroll-margin-top: 72px; }
  .pw-product + .pw-product { margin-top: 20px; }
  .pw-product__name { font-size: 22px; }
  .pw-product__catch { font-size: 15px; }
  .pw-product__body { grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
  .pw-product__media { max-width: 240px; width: 100%; margin: 0 auto; }
  .pw-spec > div { grid-template-columns: 112px 1fr; }
  .pw-spec dt, .pw-spec dd { padding: 10px 12px; }
  .pw-product__cta { margin-top: 24px; }
  .pw-product__cta .pw-btn { display: block; padding: 16px 20px; font-size: 15px; }

  .pw-grid--2, .pw-grid--3 { grid-template-columns: 1fr; gap: 12px; }
  .pw-card { padding: 22px 20px; }

  .pw-faq__item summary { padding: 18px 48px 18px 20px; }
  .pw-faq__item summary::after { right: 20px; }
  .pw-faq__item summary h3 { font-size: 15px; }
  .pw-faq__item p { padding: 0 20px 18px; }

  .pw-profile { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 20px; }
  .pw-profile__avatar { width: 72px; height: 72px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-btn { transition: none; }
  .pw-ranking { scroll-behavior: auto; }
}
