/*
Theme Name: いあり
Theme URI: https://example.com/hairoku
Author: あなた
Description: 日々のさまざまな話題を記録できる雑記ブログ用テーマ。専用投稿タイプでは、スペック欄と判子スタンプ風の評価をあしらった記録が残せます。それ以外の話題は、カテゴリ分けした通常の投稿として同じデザインで書けます。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hairoku
*/

/* ==========================================================================
   トークン
   ========================================================================== */
:root {
  --hr-night: #111111;
  --hr-night-line: #3a3a3a;
  --hr-night-text: #d9d9d9;
  --hr-night-text-dim: #9a9a9a;
  --hr-paper: #fafafa;
  --hr-paper-card: #ffffff;
  --hr-paper-line: #e5e5e5;
  --hr-border: #dcdcdc;
  --hr-ink: #171717;
  --hr-ink-soft: #6e6e6e;
  --hr-stamp: #171717;
  --hr-label: #555555;
  --hr-accent: #e67300;
  --hr-button-bg: #5d5d5d;

  --hr-font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --hr-font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --hr-font-mono: "JetBrains Mono", "Yu Gothic", monospace;

  --hr-radius: 4px;
  --hr-radius-lg: 16px;
  --hr-radius-pill: 999px;
  --hr-max-width: 1200px;
  --hr-sidebar-width: 280px;
}

/* ==========================================================================
   ベース
   ========================================================================== */
* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  /* .hr-headerがposition:stickyなので、コメント返信リンク等のページ内アンカーが
     ヘッダーの下に隠れないよう、ヘッダーの高さ分のスクロールオフセットを確保する */
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hr-paper);
  color: var(--hr-ink);
  font-family: var(--hr-font-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--hr-stamp); text-decoration: none; }
a:hover { color: var(--hr-accent); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.hr-wrap {
  max-width: var(--hr-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   全体レイアウト(本文 + サイドバーの2カラム)
   ========================================================================== */
.hr-layout {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  flex: 1 0 auto;
  width: 100%;
}
.hr-content { flex: 1; min-width: 0; }
.hr-sidebar { width: var(--hr-sidebar-width); flex-shrink: 0; }
/* 一覧ページは見出し(.hr-section-label)の高さぶんサイドバーを下げ、
   一番目の記事と先頭が揃うようにする(単一記事・固定ページには見出しがないため対象外) */
body:not(.wp-singular):not(.singular) .hr-sidebar { margin-top: 77px; }

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.hr-header {
  background: var(--hr-night);
  padding: 12px 0 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.hr-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.hr-header.is-scrolled::after {
  opacity: 1;
}

.hr-header__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.hr-header__row + .hr-tagline,
.hr-header__row + .hr-nav {
  margin-top: 16px;
}

.hr-logo,
.hr-logo a {
  font-family: var(--hr-font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--hr-paper);
  letter-spacing: 0.04em;
}
.hr-logo a:hover { text-decoration: none; opacity: 0.85; }
.hr-logo .custom-logo-link { display: block; }
.hr-logo .custom-logo-link img { max-height: 40px; width: auto; display: block; }

.hr-nav.hr-nav--header {
  margin: 0;
  border-top: none;
  padding-top: 0;
}
.hr-nav--header ul { gap: 16px 24px; }
.hr-nav--header a { color: var(--hr-night-text-dim); }
.hr-nav--header a:hover { color: var(--hr-accent); }

.hr-tagline {
  font-family: var(--hr-font-display);
  font-size: 15px;
  color: var(--hr-night-text);
  line-height: 1.9;
  max-width: 460px;
}

.hr-nav {
  margin-top: 28px;
  border-top: 1px solid var(--hr-night-line);
  padding-top: 16px;
}
.hr-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.hr-nav a {
  font-family: var(--hr-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--hr-night-text);
}
.hr-nav a:hover { color: var(--hr-accent); text-decoration: none; }

/* ==========================================================================
   セクション見出し(帳簿の項目名)
   ========================================================================== */
.hr-section-label {
  font-family: var(--hr-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--hr-label);
  margin: 40px 0 16px;
  text-transform: uppercase;
}

.hr-archive-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--hr-ink-soft);
  margin: -8px 0 24px;
}
.hr-archive-description p { margin: 0 0 8px; }
.hr-archive-description p:last-child { margin-bottom: 0; }

/* ==========================================================================
   横長リスト(一覧)
   ========================================================================== */
.hr-list { margin-bottom: 40px; }

.hr-row {
  position: relative;
  display: flex;
  gap: 28px;
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--hr-paper-line);
}
.hr-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.hr-row__thumb {
  flex-shrink: 0;
  width: 220px;
  height: 150px;
  overflow: hidden;
  border-radius: var(--hr-radius);
  display: block;
}
.hr-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hr-row__thumb--placeholder { background: var(--hr-border); }

.hr-row__body { flex: 1; min-width: 0; }

.hr-row__category {
  font-family: var(--hr-font-mono);
  font-size: 10px;
  color: var(--hr-label);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hr-row__title {
  font-family: var(--hr-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--hr-ink);
  margin: 0 0 8px;
  padding-right: 40px;
  line-height: 1.5;
}
.hr-row__title a { color: inherit; }
.hr-row__title a:hover,
.hr-row__thumb:hover ~ .hr-row__body .hr-row__title a {
  text-decoration: none;
  color: var(--hr-accent);
}

.hr-row__date {
  font-family: var(--hr-font-mono);
  font-size: 11px;
  color: var(--hr-ink-soft);
  margin-bottom: 10px;
}

.hr-row__excerpt {
  font-size: 13.5px;
  color: var(--hr-ink-soft);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* 判子スタンプ(傾きはPHP側でインラインstyleとして付与) */
.hr-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--hr-stamp);
  color: var(--hr-stamp);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hr-font-display);
  font-weight: 700;
  font-size: 15px;
}
.hr-stamp--lg {
  width: 56px;
  height: 56px;
  font-size: 24px;
  border-width: 2px;
  top: 8px;
  right: 8px;
}

/* ==========================================================================
   単一記事
   ========================================================================== */
.hr-entry {
  margin-top: 40px;
  margin-bottom: 0;
  position: relative;
}
/* 単一記事は全幅サムネイルがヘッダー直下に来るよう、上マージンを打ち消す */
body.single .hr-entry {
  margin-top: 0;
}

.hr-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--hr-font-mono);
  font-size: 12px;
  color: var(--hr-ink-soft);
  margin: 0 0 20px;
}
.hr-entry__meta .hr-entry__type {
  color: var(--hr-label);
  letter-spacing: 0.06em;
}

.hr-entry__title {
  font-family: var(--hr-font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px;
  padding-right: 72px;
}

.hr-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  border-top: 1px solid var(--hr-paper-line);
  border-bottom: 1px solid var(--hr-paper-line);
  padding: 14px 0;
  margin-bottom: 26px;
}
.hr-specs__item {
  font-family: var(--hr-font-mono);
  font-size: 12px;
  color: var(--hr-ink-soft);
}
.hr-specs__item strong {
  color: var(--hr-ink);
  font-weight: 500;
}

.hr-entry__content {
  font-size: 15.5px;
  line-height: 2.1;
  color: var(--hr-ink);
}
.hr-entry__content p { margin: 0 0 38px; }
.hr-entry__content h2,
.hr-entry__content h3 {
  font-family: var(--hr-font-display);
  color: var(--hr-ink);
}
.hr-entry__content blockquote {
  border-left: 3px solid var(--hr-stamp);
  margin: 0 0 38px;
  padding-left: 16px;
  color: var(--hr-ink-soft);
  font-style: normal;
}
.hr-entry__content img {
  border-radius: var(--hr-radius);
  margin: 0 0 12px;
}
.hr-entry__content hr.wp-block-separator {
  border: none;
  border-top: 1px solid var(--hr-paper-line);
  margin: 48px 0;
  width: 100%;
}

/* 広告・PR表記(ステマ規制対応の開示文) */
.hr-pr-notice {
  font-size: 12px;
  line-height: 1.7;
  color: var(--hr-ink-soft);
  background: var(--hr-paper);
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  padding: 10px 14px;
  margin: 0 0 24px;
}

/* 幅広・全幅ブロック(add_theme_support('align-wide'))。
   全幅はサイドバーの無い単一記事(body.single)でのみ画面端までの全幅ブリードにする。 */
.hr-entry__content .alignwide {
  margin-left: -48px;
  margin-right: -48px;
  max-width: calc(100% + 96px);
}
body.single .hr-entry__content .alignfull {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: none;
}

.hr-entry__thumb {
  margin: 0 0 28px;
  overflow: hidden;
  border-radius: var(--hr-radius);
}
.hr-entry__thumb--placeholder {
  background: var(--hr-border);
  aspect-ratio: 16 / 9;
}

/* 単一記事(サイドバーなし)はサムネイルを画面の左右端まで全幅表示 */
body.single .hr-entry__thumb {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: none;
  height: 50vh;
  border-radius: 0;
  overflow: hidden;
}
body.single .hr-entry__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 通常投稿 */
.hr-entry--post .hr-entry__content p { margin: 0 0 20px; }

/* まとめ記事用アイテムカード([hr_item] ショートコード) */
.hr-entry__content .hr-item {
  position: relative;
  background: var(--hr-paper);
  border: 1px solid var(--hr-border);
  border-left: 3px solid var(--hr-stamp);
  border-radius: 0 var(--hr-radius) var(--hr-radius) 0;
  padding: 18px 56px 18px 20px;
  margin: 0 0 20px;
}
.hr-entry__content .hr-item .hr-stamp {
  position: absolute;
  top: 16px;
  right: 16px;
}
.hr-entry__content .hr-item__type {
  font-family: var(--hr-font-mono);
  font-size: 10px;
  color: var(--hr-label);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.hr-entry__content .hr-item__name {
  font-family: var(--hr-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--hr-ink);
  line-height: 1.5;
  margin-bottom: 4px;
}
.hr-entry__content .hr-item__spec {
  font-family: var(--hr-font-mono);
  font-size: 11px;
  color: var(--hr-ink-soft);
  margin-bottom: 10px;
}
.hr-entry__content .hr-item__note {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--hr-ink);
}
.hr-entry__content .hr-item__note p { margin: 0; }
.hr-entry__content .hr-item__note p + p { margin-top: 10px; }
.hr-entry__content .hr-item + .hr-item { margin-top: 20px; }

/* 感想記事パターン(画像+文章+購入リンク)の購入ボタンをサイトの配色に合わせる */
.hr-entry__content .wp-block-button__link {
  border-radius: var(--hr-radius-pill);
  background: var(--hr-button-bg);
  color: var(--hr-paper-card);
  font-family: var(--hr-font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 22px;
}
.hr-entry__content .wp-block-button__link:hover {
  color: var(--hr-accent);
  text-decoration: none;
}

/* 感想記事パターン: 画像列(固定幅)と文章列(可変)からなる行。
   行の高さは画像・文章のうち自然に高い方で決まり、双方がそれに合わせて伸縮する。 */
.hr-entry__content .wp-block-columns {
  align-items: stretch;
}
.hr-entry__content .wp-block-columns.hr-feature {
  background: #f0f0f0;
  border-radius: var(--hr-radius-lg);
  padding: 40px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.12), 0 2px 6px rgba(60, 64, 67, 0.08);
}
/* コアの「@media (min-width:782px) .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column」
   ルール(flex-basis:0;flex-grow:1)がこのセレクタよりも詳細度が高いため、!importantが必要 */
.hr-entry__content .hr-feature-media-col {
  flex: 0 0 350px !important;
  max-width: 350px;
  min-height: 300px;
  position: relative;
}
.hr-entry__content .hr-feature-media-col .wp-block-gallery {
  position: relative;
  height: 100%;
  margin: 0;
  display: block;
}
/* wp-block-image(figure)自体のposition/marginはこのセレクタで上書きできるが、
   width/heightはコアの「.wp-block-gallery...:not(#individual-image)」ルールが
   :not()の引数にIDセレクタを使っているため詳細度で負けてしまう。!importantが必要 */
.hr-entry__content .hr-feature-media-col .wp-block-gallery .wp-block-image {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hr-entry__content .hr-feature-media-col .wp-block-gallery .wp-block-image.is-active {
  opacity: 1;
}
/* img側も同じ理由(コアの:not(#individual-image)によるID相当の詳細度)でwidth/height/object-fitは!important必須 */
.hr-entry__content .hr-feature-media-col .wp-block-gallery .wp-block-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  margin: 0;
  border-radius: var(--hr-radius-lg);
}
/* 画像が複数ある場合のインジケーター(JSで生成) */
.hr-entry__content .hr-feature-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.hr-entry__content .hr-feature-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.hr-entry__content .hr-feature-dots button.is-active {
  background: #fff;
}
.hr-entry__content .hr-feature-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}
.hr-entry__content .hr-feature-arrow:hover {
  background: var(--hr-accent);
}
.hr-entry__content .hr-feature-arrow--prev { left: 8px; }
.hr-entry__content .hr-feature-arrow--next { right: 8px; }
.hr-entry__content .hr-feature-text-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hr-entry__content .hr-feature-text-col .wp-block-heading {
  margin: 0 0 8px;
}
.hr-entry__content .hr-feature-text-col .wp-block-paragraph {
  margin: 0;
}
.hr-entry__content .hr-feature-text-col .wp-block-buttons {
  margin-top: auto;
  padding-top: 16px;
}

/* ==========================================================================
   投稿内ギャラリー(タップで拡大表示)
   ========================================================================== */
/* 6列を基準グリッドにして、行ごとに画像枚数で割り切れる幅(3分割=span2、
   2分割=span3、1枚=span6)に差し替える。コンテンツ幅いっぱいに広がり、
   同じ行の画像は常に横幅を均等に分け合う。 */
.hr-entry__content .hr-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 24px 0;
  width: 100%;
}
.hr-gallery__item {
  display: block;
  grid-column: span 2;
  width: 100%;
  aspect-ratio: 2 / 1;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--hr-radius);
  background: var(--hr-border);
  overflow: hidden;
  cursor: zoom-in;
}
.hr-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.hr-gallery__item:hover img {
  transform: scale(1.04);
}

/* 1枚: 全幅 */
.hr-gallery--count-1 .hr-gallery__item {
  grid-column: span 6;
}
/* 2枚: 半分ずつ */
.hr-gallery--count-2 .hr-gallery__item {
  grid-column: span 3;
}
/* 4枚: 上段3枚(既定のspan2)・下段1枚は全幅 */
.hr-gallery--count-4 .hr-gallery__item:nth-child(4) {
  grid-column: span 6;
}
/* 5枚: 上段3枚(既定のspan2)・下段2枚は半分ずつ */
.hr-gallery--count-5 .hr-gallery__item:nth-child(4),
.hr-gallery--count-5 .hr-gallery__item:nth-child(5) {
  grid-column: span 3;
}

/* ==========================================================================
   ギャラリーの拡大表示(ライトボックス)
   ========================================================================== */
.hr-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.9);
}
.hr-lightbox.is-open {
  display: flex;
}
.hr-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--hr-radius);
}
.hr-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.hr-lightbox__close:hover {
  background: var(--hr-accent);
}
body.hr-lightbox-open {
  overflow: hidden;
}

/* ==========================================================================
   関連記事
   ========================================================================== */
.hr-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--hr-paper-line);
}
.hr-related__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.hr-related__item { display: block; color: inherit; }
.hr-related__item:hover .hr-related__item-title,
.hr-related__item:hover {
  text-decoration: none;
  color: var(--hr-accent);
}
.hr-related__item-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--hr-radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.hr-related__item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hr-related__item-thumb--placeholder { background: var(--hr-border); }
.hr-related__item-title {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .hr-related__list { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   ページ送り・関連
   ========================================================================== */
.hr-pagination {
  display: flex;
  justify-content: space-between;
  font-family: var(--hr-font-mono);
  font-size: 13px;
  margin: 32px 0 60px;
}
.hr-pagination a { color: var(--hr-ink); }
.hr-pagination a:hover { color: var(--hr-accent); }
.hr-pagination--comments { margin: 24px 0; }

/* ==========================================================================
   サイドバー / ウィジェット
   ========================================================================== */
.hr-widget {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hr-paper-line);
}
.hr-widget:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.hr-widget h2,
.hr-widget .widgettitle {
  font-family: var(--hr-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--hr-label);
  text-transform: uppercase;
  margin: 0 0 14px;
}
.hr-widget ul { list-style: none; margin: 0; padding: 0; }
.hr-widget li { margin-bottom: 8px; font-size: 13.5px; }

.wp-block-search__input,
.wp-block-search__button {
  border-radius: var(--hr-radius);
  padding-top: 6px;
  padding-bottom: 6px;
}
.wp-block-search__button:hover {
  background: var(--hr-accent);
  border-color: var(--hr-accent);
  color: #fff;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.hr-footer {
  background: var(--hr-night);
  color: var(--hr-night-text-dim);
  padding: 32px 0;
  margin-top: 60px;
  font-family: var(--hr-font-mono);
  font-size: 12px;
}
.hr-footer a { color: var(--hr-night-text); }
.hr-footer a:hover { color: var(--hr-accent); }

/* ==========================================================================
   著者ボックス
   ========================================================================== */
.hr-author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-top: 32px;
  margin: 8px 0 40px;
  border-top: 1px solid var(--hr-paper-line);
}
.hr-author-box__avatar { border-radius: 50%; flex-shrink: 0; }
.hr-author-box__name {
  font-family: var(--hr-font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--hr-ink);
  margin: 0 0 6px;
}
.hr-author-box__bio {
  font-size: 14px;
  line-height: 1.8;
  color: var(--hr-ink-soft);
  margin: 0;
}

/* ==========================================================================
   コメント
   ========================================================================== */
.hr-comments {
  margin-top: 40px;
}

/* 一覧 */
.hr-comments .comment-list,
.hr-comments .children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hr-comments .children {
  margin-left: 32px;
}
.hr-comments .comment-body {
  border-top: 1px solid var(--hr-paper-line);
  padding: 24px 0;
}
.hr-comments .comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.hr-comments .comment-author .avatar {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.hr-comments .comment-author .fn {
  font-family: var(--hr-font-body);
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  color: var(--hr-ink);
}
.hr-comments .comment-author .says {
  display: none;
}
.hr-comments .comment-metadata {
  font-family: var(--hr-font-mono);
  font-size: 11px;
  color: var(--hr-ink-soft);
  margin-bottom: 10px;
}
.hr-comments .comment-metadata a {
  color: inherit;
}
.hr-comments .comment-metadata a:hover {
  color: var(--hr-accent);
}
.hr-comments .comment-content {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--hr-ink);
}
.hr-comments .comment-content p {
  margin: 0 0 12px;
}
.hr-comments .comment-content p:last-child {
  margin-bottom: 0;
}
.hr-comments .reply {
  margin-top: 10px;
}
.hr-comments .comment-reply-link,
.hr-comments .edit-link a {
  font-family: var(--hr-font-mono);
  font-size: 12px;
  color: var(--hr-ink-soft);
}
.hr-comments .comment-reply-link:hover,
.hr-comments .edit-link a:hover {
  color: var(--hr-accent);
}

/* フォーム */
.hr-comments .comment-respond {
  margin-top: 40px;
}
.hr-comments .comment-reply-title {
  font-family: var(--hr-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--hr-ink);
  margin: 0 0 16px;
}
.hr-comments .comment-reply-title small a {
  font-family: var(--hr-font-mono);
  font-size: 12px;
  margin-left: 12px;
}
.hr-comments .comment-notes {
  font-size: 13px;
  color: var(--hr-ink-soft);
  margin: 0 0 16px;
}
.hr-comments .comment-form p {
  margin: 0 0 16px;
}
.hr-comments .comment-form label {
  display: block;
  font-family: var(--hr-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--hr-ink-soft);
  margin-bottom: 6px;
}
.hr-comments .comment-form input[type="text"],
.hr-comments .comment-form input[type="email"],
.hr-comments .comment-form input[type="url"],
.hr-comments .comment-form textarea {
  width: 100%;
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  padding: 10px 12px;
  font-family: var(--hr-font-body);
  font-size: 14px;
  color: var(--hr-ink);
  background: var(--hr-paper-card);
}
.hr-comments .comment-form textarea {
  min-height: 120px;
  resize: vertical;
}
.hr-comments .comment-form input:focus,
.hr-comments .comment-form textarea:focus {
  outline: none;
  border-color: var(--hr-ink);
}
.hr-comments .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--hr-ink-soft);
}
.hr-comments .form-submit {
  margin-bottom: 0;
}
.hr-comments #submit {
  display: inline-block;
  border: none;
  border-radius: var(--hr-radius-pill);
  background: var(--hr-button-bg);
  color: var(--hr-paper-card);
  font-family: var(--hr-font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 28px;
  cursor: pointer;
}
.hr-comments #submit:hover {
  color: var(--hr-accent);
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 860px) {
  .hr-layout { flex-direction: column; }
  .hr-sidebar { width: 100%; }
}

@media (max-width: 600px) {
  .hr-entry__title { font-size: 24px; padding-right: 60px; }
  .hr-entry__thumb { margin: 0 0 20px; }
  .hr-header { padding: 10px 0 12px; }
  .hr-author-box { flex-direction: column; align-items: center; text-align: center; }
  .hr-row { flex-direction: column; }
  .hr-row__thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}

/* アクセシビリティ: フォーカスリング */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--hr-stamp);
  outline-offset: 2px;
}

/* アクセシビリティ: スキップリンク(キーボード操作時のみ表示) */
.skip-link {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.skip-link:focus-visible {
  background: var(--hr-paper-card);
  clip: auto !important;
  clip-path: none;
  color: var(--hr-ink);
  display: block;
  font-family: var(--hr-font-mono);
  font-size: 13px;
  height: auto;
  left: 8px;
  top: 8px;
  padding: 12px 20px;
  width: auto;
  z-index: 10000;
  border-radius: var(--hr-radius);
}

/* アクセシビリティ: モーション抑制設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  .hr-header::after,
  .hr-entry__content .hr-feature-media-col .wp-block-gallery .wp-block-image,
  .hr-gallery__item img {
    transition: none;
  }
}
