/*
Theme Name: PowerRoom Ledger
Theme URI: https://powerroom.tokyo/
Author: PowerRoom
Description: 筋トレブログ PowerRoom 用の自作テーマ。目にやさしい紙色の背景と、長文を読み続けられる字組みを土台にした1カラム構成。広告枠は入っていません。
Version: 1.1
Requires at least: 6.0
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: powerroom-ledger
*/

@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Oswald:wght@500;600&display=swap");

/* ============================================================
   1. トークン

   色: 純白と純黒を使わない。背景は少し黄みを含んだ紙色、
       文字は炭色。輝度差を10:1前後に抑えて、長文でも
       目が痛くならないようにする。差し色は落ち着いた緑1色。
       (すべてWCAG AA以上のコントラストを確保)
   ============================================================ */
:root {
  --paper:     #fbfaf7;   /* 背景。純白より少し沈む */
  --paper-2:   #ffffff;
  --ink:       #35393e;   /* 本文 */
  --ink-head:  #23272b;   /* 見出し。本文より一段濃くして芯を出す */
  --ink-2:     #5f676e;
  --ink-3:     #6e767d;
  --line:      #e6e2db;
  --line-2:    #d3ccc2;
  --soft:      #f3f1ec;
  --accent:    #cc4340;   /* 差し色。やわらかい赤 */
  --accent-2:  #b83a35;   /* 押したとき・ホバー */
  --accent-bg: #fbeeed;
  --caution:   #b83a35;
  --caution-bg:#fbeeed;

  /* 見出し: 太くて字面の大きい和文ゴシック */
  --display: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN",
             "Yu Gothic Medium", sans-serif;
  /* 本文: 読み続ける用 */
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN",
          "Yu Gothic Medium", "Noto Sans JP", sans-serif;
  /* 数字・ラベル: 縦長でスポーティな欧文 */
  --label: "Oswald", "Roboto Condensed", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Roboto Mono", monospace;

  --measure: 40rem;
  --gutter:  clamp(1.25rem, 5vw, 3rem);
  --radius:  4px;
  --tap:     44px;
}

/* ============================================================
   2. リセット
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 2;
  letter-spacing: .02em;
  font-feature-settings: "palt" 1;   /* 和文の詰めを自然に */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink-head);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: .005em;
  margin: 0;
}
p, ul, ol { margin: 0; }
button { font: inherit; }

/* キーボード操作のとき、いまどこにいるかが必ず見える */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ============================================================
   3. 骨格
   ============================================================ */
.wrap {
  width: 100%;
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--wide { max-width: 64rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 99;
  background: var(--accent); color: #fff;
  padding: .7rem 1.1rem; border-radius: var(--radius);
}

/* ---------- ヘッダー ---------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .9rem 0;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.15rem;
  letter-spacing: .01em;
  font-weight: 700;
  margin: 0;
}
.brand a { display: inline-flex; align-items: center; min-height: var(--tap); }
.brand span { color: var(--accent); }

.nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 .9rem;
  border-radius: var(--radius);
  font-size: .92rem;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--soft); color: var(--ink); }

/* ---------- フッター ---------- */
.colophon {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 4rem;
  font-size: .9rem;
  color: var(--ink-3);
}
.colophon__nav { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.colophon__nav a {
  display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 .9rem;
  border-radius: var(--radius);
  color: var(--ink-2);
}
.colophon__nav a:hover { background: var(--soft); color: var(--accent); }

/* ============================================================
   4. 節目の見せ方
   ============================================================ */
.eyebrow {
  display: block;
  font-family: var(--label);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .3rem;
}
.section-head {
  border-bottom: 1px solid var(--line-2);
  padding-bottom: .7rem;
  margin: 4.5rem 0 0;
}
.section-head h2 { font-size: 1.05rem; letter-spacing: .04em; }

/* ============================================================
   5. トップの導入
   ============================================================ */
.lede { padding: 4rem 0 3rem; }
.lede h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -.02em;
  margin-bottom: 1.3rem;
}
.lede p { color: var(--ink-2); max-width: 32rem; }

/* ============================================================
   6. 記事一覧
   1件ずつを面として置き、行間と余白で区切る。
   罫線を減らして、視線が引っかからないようにする。
   ============================================================ */
.ledger { margin-top: .5rem; }
.entry-row {
  display: block;
  padding: 1.5rem 1.3rem;
  margin: .5rem 0;
  border-radius: var(--radius);
  transition: background .15s;
}
.entry-row + .entry-row { border-top: 1px solid var(--line); }
.entry-row:hover { background: var(--soft); }

.entry-row__meta {
  display: flex;
  gap: .9rem;
  align-items: baseline;
  font-family: var(--label);
  font-weight: 500;
  font-size: .84rem;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: .35rem;
}
.entry-row__cat { color: var(--accent); }
.entry-row__title {
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.6;
}
.entry-row__title a { display: block; }
.entry-row:hover .entry-row__title { color: var(--accent); }
.entry-row__excerpt {
  margin-top: .5rem;
  font-size: .93rem;
  line-height: 1.9;
  color: var(--ink-2);
}

/* ---------- ページ送り ---------- */
.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 2.5rem;
}
.pager a {
  display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--ink-2);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   7. 記事ページ
   ============================================================ */
.article-head {
  padding: 3rem 0 1.8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.2rem;
}
.article-head h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -.015em;
}
.article-head__meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-family: var(--label);
  font-weight: 500;
  font-size: .86rem;
  letter-spacing: .07em;
  color: var(--ink-3);
  margin-top: 1rem;
}
.article-head__meta a { color: var(--accent); }

.featured { margin: 0 0 2.5rem; }
.featured img {
  width: 100%;
  max-height: 24rem;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- 本文 ----------
   段落間は1.6em。見出しの前は後ろの3倍あけて、
   どこで話が変わったかを余白だけで分からせる。 */
.entry-content { font-size: 17px; line-height: 2; }
.entry-content > * + * { margin-top: 1.6em; }

.entry-content h2 {
  font-size: 1.42rem;
  font-weight: 900;
  letter-spacing: -.005em;
  padding-left: .9rem;
  border-left: 5px solid var(--accent);
  margin-top: 3.6rem;
  margin-bottom: 1.2rem;
}
.entry-content h3 {
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line);
  margin-top: 2.6rem;
  margin-bottom: 1rem;
}
.entry-content h4 { font-size: 1.02rem; margin-top: 2.2rem; }

.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li { margin: .55em 0; }
.entry-content li::marker { color: var(--accent-2); }

.entry-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(78, 107, 86, .35);
  padding-bottom: 1px;
}
.entry-content a:hover { border-bottom-color: var(--accent); background: var(--accent-bg); }

.entry-content blockquote {
  margin: 2em 0;
  padding: 1rem 1.2rem;
  background: var(--soft);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.entry-content code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--soft);
  padding: .15em .4em;
  border-radius: 3px;
}
.entry-content table {
  width: 100%; border-collapse: collapse; font-size: .93em;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--line);
  padding: .75em .85em;
  text-align: left;
}
.entry-content th { background: var(--soft); }

.entry-content figure { margin: 2.2em 0; }
.pg-figure img,
.entry-content figure img {
  max-height: 440px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius);
}
.pg-figure figcaption,
.entry-content figcaption { display: none; }

/* ---------- 記事の足元 ---------- */
.article-foot {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  font-size: .85rem;
  color: var(--ink-3);
}
.article-foot a { color: var(--accent); }
.related { margin-top: 1rem; display: grid; gap: .4rem; }
.related a {
  display: block;
  padding: .8rem 1rem;
  background: var(--soft);
  border-radius: var(--radius);
  font-size: .93rem;
  color: var(--ink-2);
}
.related a:hover { color: var(--accent); }

/* ============================================================
   8. 記事本文の装飾 (fit_blocks.py が出力する pr- クラス)
   ============================================================ */
.pr-marker {
  background: linear-gradient(transparent 62%, #f4e6a8 62%);
  font-weight: 700;
}

/* タイプ帯 */
.pr-type-head {
  background: var(--accent);
  font-family: var(--display);
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.2rem;
  font-size: .98rem;
  border-radius: var(--radius) var(--radius) 0 0;
}
.pr-type-body {
  background: var(--soft);
  padding: 1rem 1.3rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.pr-type-body ul { margin: 0; padding-left: 1.4em; }
.pr-type-body li { margin: .5em 0; font-size: .95rem; }
.pr-type-head + .pr-type-body { margin-top: 0; }

/* 箇条書きボックス */
.pr-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.pr-box-title {
  display: flex; align-items: center; gap: .65rem;
  font-weight: 700; font-size: 1rem;
  margin-bottom: .8em;
}
.pr-box-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 50%;
  font-size: .85rem;
}
.pr-box ul { margin: 0; padding-left: 1.4em; }

/* 注意 */
.pr-warn {
  background: var(--caution-bg);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.pr-warn-title { font-weight: 700; color: var(--caution); margin-bottom: .5em; }

/* 手順 */
.pr-steps { counter-reset: st; list-style: none; padding-left: 0; }
.pr-steps li {
  counter-increment: st;
  position: relative;
  padding-left: 2.8rem;
  margin: 1.2em 0;
}
.pr-steps li::before {
  content: counter(st);
  position: absolute; left: 0; top: .25em;
  width: 1.9rem; height: 1.9rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 50%;
  font-family: var(--label); font-size: .95rem; font-weight: 600;
}

/* Q&A */
.pr-q, .pr-a { position: relative; padding-left: 1.9rem; }
.pr-q { font-weight: 700; margin-top: 2.2em !important; }
.pr-a { color: var(--ink-2); margin-top: .5em !important; }
.pr-q::before, .pr-a::before {
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-weight: 700;
}
.pr-q::before { content: "Q"; color: var(--accent); font-family: var(--label); font-size: 1.05em; }
.pr-a::before { content: "A"; color: var(--ink-3); }

/* 商品カード */
.pr-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  margin: 3rem 0;
}
.pr-card-brand { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; color: var(--ink-3); }
.pr-card-name { font-size: 1.28rem; margin: .25em 0 .9em; line-height: 1.5; }
.pr-card-img { text-align: center; margin: 1rem 0 .3rem; }
.pr-card-img img { max-height: 230px; width: auto; margin: 0 auto; }
.pr-card-credit { text-align: right; font-size: .75rem; color: var(--ink-3); }
.pr-price { font-size: .9rem; color: var(--ink-3); }
.pr-price b { color: var(--accent); font-size: 1.6em; margin-left: .4em; font-family: var(--label); font-weight: 600; }

.pr-procon { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5em 0; }
.pr-pro, .pr-con { border-radius: var(--radius); overflow: hidden; }
.pr-pro { background: var(--accent-bg); }
.pr-con { background: var(--caution-bg); }
.pr-pc-head { font-weight: 700; padding: .7rem 1rem; font-size: .92rem; }
.pr-pro > .pr-pc-head { color: var(--accent); }
.pr-con > .pr-pc-head { color: var(--caution); }
.pr-procon ul { margin: 0; padding: 0 1rem 1rem 2.1em; font-size: .92rem; }

.pr-spec, .pr-nut, .pr-rank, .pr-quick {
  width: 100%; border-collapse: collapse; font-size: .92rem;
}
.pr-spec th, .pr-spec td, .pr-nut th, .pr-nut td,
.pr-rank th, .pr-rank td, .pr-quick th, .pr-quick td {
  border: 1px solid var(--line); padding: .75em .85em;
}
.pr-spec th, .pr-nut th, .pr-quick thead th, .pr-rank th.pr-rank-label {
  background: var(--soft); font-weight: 700; white-space: nowrap;
}
.pr-rank th, .pr-rank td { text-align: center; vertical-align: middle; }
.pr-rank img { max-height: 120px; width: auto; margin: 0 auto; }
.pr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pr-rank { min-width: 34rem; }
.pr-quick { min-width: 44rem; }
.pr-nut td b { font-family: var(--label); font-weight: 600; font-size: 1.35em; }
.pr-nut-note, .pr-pr, .pg-pr, .pr-tag { font-size: .76rem; color: var(--ink-3); }

.pr-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--soft); color: var(--ink-2);
  font-family: var(--label); font-size: .92rem; font-weight: 600;
}

/* ボタン: 指で押せる高さを確保する */
.pr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5em; }
.pr-btn, .pr-cta a {
  font-family: var(--display);
  display: flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: .8rem 1.2rem;
  background: var(--accent); color: #fff !important;
  border: none !important;
  border-radius: var(--radius);
  font-weight: 700; letter-spacing: .02em;
  text-align: center;
  transition: background .15s;
}
.pr-btn:hover, .pr-cta a:hover { background: var(--accent-2); }
.pr-cta { text-align: center; margin: 2.2em 0; }
.pr-cta a { display: inline-flex; min-width: 17rem; }
.pr-rank .pr-btn { min-height: 40px; font-size: .84rem; margin: .3rem 0; }

/* 見出し風・補足 */
.pr-rank-title, .pr-subhead {
  font-weight: 700; font-size: 1.12rem; margin: 3em 0 .9em;
}
.pr-fukidashi {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 3em 0 1.6em;
}
.pr-supp {
  background: var(--soft); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; font-size: .93rem;
}
.pr-supp p { margin: 0 0 .6em; }
.pr-supp p:last-child { margin: 0; }
.pr-banner { text-align: center; }
.pr-banner img { margin: 0 auto; }

/* 管理人記入欄 */
.pr-note, .pg-note {
  background: var(--accent-bg);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: .94rem;
}

/* プロフィール */
.pr-profile {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  font-size: .93rem;
  margin: 3em 0 0;
}
.pr-profile-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .4em;
}

/* ============================================================
   9. 検索・404
   ============================================================ */
.notice { padding: 4rem 0 2rem; }
.notice h1 { font-size: 1.5rem; margin-bottom: .8rem; }
.notice p { color: var(--ink-2); }

.searchform { display: flex; gap: .6rem; margin-top: 1.5rem; }
.searchform input[type="search"] {
  flex: 1;
  min-height: var(--tap);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 0 .9rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
}
.searchform input[type="search"]:focus { border-color: var(--accent); }
.searchform button {
  min-height: var(--tap);
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--radius);
  padding: 0 1.4rem;
  font-size: .92rem; font-weight: 700;
  cursor: pointer;
}
.searchform button:hover { background: var(--accent-2); }

/* ============================================================
   10. スマホ
   ============================================================ */
@media (max-width: 640px) {
  body { font-size: 16.5px; line-height: 1.95; }
  .entry-content { font-size: 16.5px; line-height: 1.95; }
  .entry-content h2 { font-size: 1.16rem; margin-top: 2.8rem; }
  .lede { padding: 2.5rem 0 2rem; }
  .entry-row { padding: 1.2rem .8rem; }
  .pr-procon, .pr-btns { grid-template-columns: 1fr; }
  .masthead__in { padding: .5rem 0; }
  .nav { gap: 0; }
  .nav a { padding: 0 .7rem; font-size: .88rem; }
}

@media print {
  .masthead, .colophon, .pager, .related, .pr-cta { display: none; }
  body { background: #fff; font-size: 11pt; }
}
