/* =========================================================
   wp-runtime.css — WordPress ランタイム専用の配置調整のみ
   design 正本（common.css）には触れない。デザインは変更しない。
   CSS 依存監査（Task §3）で検出した WordPress 固有事項への最小対応：
   - 管理バー（#wpadminbar）と position:sticky ヘッダーの干渉
   - Search form の器（common.css に定義がないため最小の器スタイル）
   - screen-reader-text（アクセシビリティ・WP 標準）
   ========================================================= */

/* --- 管理バー干渉対策：ログイン時のみ sticky ヘッダー / fixed ドロワーを admin bar 分だけ下げる
   （baseline 784cca5 の Production ルールを完全復元。Production は従来どおり fixed モデルを維持） --- */
.admin-bar .header { top: 32px; }
.admin-bar .header__drawer { top: calc(var(--topbar-h) + var(--header-h) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .header { top: 46px; }
  .admin-bar .header__drawer { top: calc(var(--topbar-h) + var(--header-h) + 46px); }
}

/* --- Search form の器（最小・common.css のトークンを利用） --- */
.search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  max-width: 520px;
  margin: 24px 0;
}
.search-form__label { flex: 1 1 auto; display: block; }
.search-form__field {
  width: 100%;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
}
.search-form__field:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 148, 237, 0.15);
}
.search-form__submit { flex: 0 0 auto; }

/* --- entry list（index/search の最小レイアウト器） --- */
.entry-list { display: grid; gap: 32px; }
.entry__excerpt { color: var(--text-muted); margin-top: 8px; }

/* --- 横溢れガード：WordPress コンテンツ由来の長い連続トークン（例：Local blogname スラッグ
       "yamaichi-renewal-local" や長い URL）が狭幅ビューポートで見出し枠を溢れないよう折り返す。
       日本語の短い見出しには視覚的影響なし（design 正本＝common.css は不変・robustness のみ）。 --- */
.page-hero__title,
.heading-jp,
.entry__excerpt { overflow-wrap: anywhere; word-break: normal; }

/* --- 未移行画像プレースホルダー（Local レビュー用・公開面には出さない） ---
   外部/絶対パス画像を fetch せず、alt を保持した枠で「未移行・正式素材待ち」を明示する。 */
.mig-img {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 180px;
  max-width: 100%;
  min-height: 120px;
  margin: 16px 0;
  padding: 18px 20px;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, var(--gray-100), var(--gray-100) 10px, var(--gray-50) 10px, var(--gray-50) 20px);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.mig-img__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-600);
}
.mig-img__alt {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.5;
}
.mig-img__note {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- PDF Placement Micro UX：Product Header の PDF 補助リンクを本文末尾の補助导线へ再配置した際の
       配置・余白のみの最小調整（デザインは変更しない・.pdf__util の見た目は design 正本のまま流用）。
       情報優先順位＝商品名→商品区分→商品画像→主要仕様→PDF資料。PDF 未登録商品では出力されない。 --- */
.pdf__doclink {
  margin-top: 26px;
}
.pdf__doclink:empty { display: none; }

/* --- Content Integrity Validator：fail-closed 通知（本文は表示しない） --- */
.civ-failclosed {
  display: block;
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid #e6b800;
  border-left: 4px solid #b8860b;
  border-radius: var(--radius-sm);
  background: #fffbe6;
  color: #6b5300;
  font-size: 14px;
  line-height: 1.7;
}
.civ-failclosed strong { display: block; margin-bottom: 6px; color: #8a6d00; letter-spacing: 0.02em; }
.civ-failclosed__body { display: block; }

/* --- accessibility: screen-reader-text（WP 標準） --- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
