/* =====================================================================
   site-v6.6c 共通骨格（CLAUDE_DESIGN_DOC.md §2・§4・§6 の再現）
   - PC（960px 以上）：左メニュー 300px ／ 本文 約690px ／ 右カラム 約200px の3カラム
   - 960px 未満：左右カラムは非表示。ハンバーガーで右からドロワー（§2.3）
   このファイルは各ページの <head> の先頭近くで読み込む。
   ・骨格（.sh-*）のルールは「html body.sh …」で詳細度を上げ、ページ側の古い骨格 CSS より優先させる。
   ・本文の書体・リンク色などの既定値は :where() で詳細度 0 にし、ページ側の個別指定（ボタン・チップ等）を壊さない。
   ===================================================================== */
:root {
  --sh-font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sh-accent: #ff9900;      /* §6.1 アクセント */
  --sh-dark: #404040;        /* §6.1 濃い灰（h2 背景・h3 文字） */
  --sh-text: #666666;        /* §6.1 本文 */
  --sh-link: #0066dc;        /* §6.1 リンク */
  --sh-navy: #1c2740;        /* §6.1 紺（ウィジェット・ダークUI）。実測値は未確認のため暗い紺系で代替 */
  --sh-navy-2: #2a3758;
  --sh-bg: #ececec;          /* §6.3 外側の背景は薄い灰色 */
  --sh-card: #ffffff;        /* §6.3 本文カードは白 */
  --sh-line: #d6d6d6;
  --sh-th: #404040;          /* §4.1 見出し行は暗色 */
  --sh-border: #666666;      /* §4.1 罫線は灰色（#666系） */
  --sh-stripe: #f5f5f5;
  --sh-head-bg: #ffffff;
  --sh-menu-bg: #f7f7f7;
  --sh-gold: #d4a017; --sh-silver: #9aa3ad; --sh-bronze: #b26a32; --sh-black: #222222;   /* §6.1 ランク色 */
  --sh-el-water: #2f7fe0; --sh-el-fire: #e0452f; --sh-el-grass: #3aa64b; --sh-el-rock: #9a6b3f; --sh-el-thunder: #e0b000;
  --sh-headh: 56px;
}
html[data-theme="dark"] {
  --sh-dark: #3c5375; --sh-text: #c4ccd8; --sh-link: #6aa8ff; --sh-navy: #0f1a2e; --sh-navy-2: #1d2a44;
  --sh-bg: #0d1420; --sh-card: #172233; --sh-line: #2c3a52; --sh-th: #3c5375; --sh-border: #4b607f; --sh-stripe: rgba(255,255,255,.04);
  --sh-head-bg: #121c2b; --sh-menu-bg: #131d2d;
}

/* ---------- 全体 ---------- */
html body.sh { margin: 0; background: var(--sh-bg); font-family: var(--sh-font); color: var(--sh-text); }
html:has(body.sh), html body.sh { overflow-x: clip !important; }   /* sticky ヘッダーを効かせるため hidden ではなく clip */
html body.sh .sh-skip { position: absolute; left: -9999px; top: 0; }
html body.sh .sh-skip:focus { left: 8px; top: 8px; z-index: 400; background: #fff; color: var(--sh-link); padding: 6px 10px; border-radius: 6px; }

/* ---------- サイトヘッダー（§2.1：左にアイコン＋サイト名。スクロールしても上部に固定） ---------- */
html body.sh .sh-head { position: sticky; top: 0; z-index: 250; background: var(--sh-head-bg); border-bottom: 1px solid var(--sh-line); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
html body.sh .sh-head-in { max-width: 1238px; margin: 0 auto; height: var(--sh-headh); padding: 0 12px; display: flex; align-items: center; gap: 12px; box-sizing: border-box; }
html body.sh .sh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sh-dark); min-width: 0; }
html[data-theme="dark"] body.sh .sh-brand { color: #e8eef7; }
html body.sh .sh-brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #f3f3f3; border: 2px solid var(--sh-dark); flex: none; }
html body.sh .sh-brand-name { font-weight: 800; font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.sh .sh-brand-name small { display: block; font-size: 11px; font-weight: 600; color: #8a8a8a; }
html body.sh .sh-head .sh-fan { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--sh-accent); border: 1.5px solid var(--sh-accent); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
html body.sh .sh-head .sh-iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--sh-line); background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; color: var(--sh-dark); }
html[data-theme="dark"] body.sh .sh-head .sh-iconbtn { color: #e8eef7; }
html body.sh .sh-head .sh-iconbtn svg { width: 22px; height: 22px; }
html body.sh .sh-head .themebtn .ic-sun { display: none; }
html[data-theme="dark"] body.sh .sh-head .themebtn .ic-sun { display: block; }
html[data-theme="dark"] body.sh .sh-head .themebtn .ic-moon { display: none; }
html body.sh .sh-head .sh-ham { display: none; }

/* ---------- パンくず（§1.2：階層名ベース） ---------- */
html body.sh .sh-crumbs { max-width: 1238px; margin: 0 auto; padding: 8px 12px; box-sizing: border-box; font-size: 13px; color: #888; }
html body.sh .sh-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
html body.sh .sh-crumbs li + li::before { content: "＞"; margin-right: 4px; color: #aaa; }
html body.sh .sh-crumbs a { color: var(--sh-link); text-decoration: none; }
html body.sh .sh-crumbs a:hover { text-decoration: underline; }

/* ---------- 3カラム ---------- */
html body.sh .sh-shell { display: grid; grid-template-columns: 300px minmax(0, 690px) 200px; gap: 12px; justify-content: center;
  max-width: 1238px; margin: 0 auto; padding: 0 12px 28px; box-sizing: border-box; align-items: start; }
html body.sh .sh-main { min-width: 0; }
html body.sh .sh-left, html body.sh .sh-right { position: sticky; top: calc(var(--sh-headh) + 10px); max-height: calc(100vh - var(--sh-headh) - 20px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* ---------- 本文カード（§2.1・§6.3） ---------- */
html body.sh .sh-card { background: var(--sh-card); border-radius: 12px; border: 1px solid var(--sh-line); padding: 16px 16px 18px; box-sizing: border-box; }
html body.sh .sh-cardhead { border-bottom: 1px solid var(--sh-line); padding-bottom: 8px; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
html body.sh .sh-pagename { font-size: 22px; font-weight: 900; font-style: italic; color: var(--sh-dark); letter-spacing: .02em; margin: 0; line-height: 1.35;
  text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 2px 3px 0 rgba(0,0,0,.18); }
html[data-theme="dark"] body.sh .sh-pagename { color: #e8eef7; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
html body.sh .sh-updated { font-size: 13px; color: #888; display: inline-flex; align-items: center; gap: 4px; }
html body.sh .sh-updated svg { width: 14px; height: 14px; }
html body.sh .sh-body { container-type: inline-size; }
html body.sh .sh-share { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--sh-line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html body.sh .sh-share-label { font-size: 13px; color: #888; margin-right: 4px; }
html body.sh .sh-share a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
html body.sh .sh-share a svg { width: 16px; height: 16px; }
html body.sh .sh-share .sh-sh-line { background: #06c755; }
html body.sh .sh-share .sh-sh-fb { background: #1877f2; }
html body.sh .sh-share .sh-sh-x { background: #000; }
html body.sh .sh-footer { margin-top: 12px; }

/* 旧骨格（ページ側の .wrap / .layout / サイドバー）をカード内の1カラムへ */
html body.sh .sh-body .wrap { max-width: none; margin: 0; padding: 0; }
html body.sh .sh-body .layout { display: flex; flex-direction: column; align-items: stretch; gap: 14px; max-width: none; margin: 0; padding: 0; grid-template-columns: none; }
html body.sh .sh-body .layout > .article, html body.sh .sh-body .layout > main { order: 1; min-width: 0; }
html body.sh .sh-body .layout > aside.sidebar { order: 2; position: static; }
html body.sh .sh-body .layout > aside.rail { order: 3; position: static; display: block; }
html body.sh .sh-body .layout > .article { border: 0; padding: 0; background: transparent; }
html body.sh .sh-body > .wrap > .layout, html body.sh .sh-body > .layout { padding: 0; }
/* 本文カードの幅が 728px 未満のときは、横幅 728px の広告枠の代わりに同じ位置のスマホ用広告枠（320px）を表示する（枠の削除・移動はしない） */
@container (max-width: 727px) {
  html body.sh .sh-body .ad-pc { display: none !important; }
  html body.sh .sh-body .ad-sp { display: flex !important; }
  html body.sh .sh-body .ad-slot .ad-pc { display: none !important; }
  html body.sh .sh-body .ad-slot .ad-sp { display: block !important; }
}

/* ---------- 左メニュー（記事メニュー §2.1・§4.4） ---------- */
html body.sh .sh-left { background: var(--sh-menu-bg); border: 1px solid var(--sh-line); border-radius: 12px; padding-bottom: 10px; }
html body.sh .sh-menulabel { background: var(--sh-dark); color: #fff; font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 11px 11px 0 0; letter-spacing: .08em; }
html body.sh .sh-mcat { padding: 0 12px; }
html body.sh .sh-mcat-h { font-size: 20px; font-weight: 800; color: var(--sh-dark); border-left: 2px solid var(--sh-accent); border-bottom: 1px solid var(--sh-line); padding: 0 0 3px 8px; margin: 14px 0 8px; line-height: 1.4; }
html[data-theme="dark"] body.sh .sh-mcat-h { color: #e8eef7; }
html body.sh .sh-icons { display: grid; grid-template-columns: repeat(4, 64px); gap: 6px; margin: 4px 0 8px; }
html body.sh .sh-ibtn { position: relative; display: block; width: 64px; height: 64px; border-radius: 12px; border: 3px solid var(--sh-dark); background: #fff; overflow: hidden; text-decoration: none; box-sizing: border-box; }
html[data-theme="dark"] body.sh .sh-ibtn { background: #24344f; border-color: #0a1220; }
html body.sh .sh-ibtn img { position: absolute; inset: 2px 2px 12px; width: calc(100% - 4px); height: calc(100% - 14px); object-fit: contain; }
html body.sh .sh-ibtn span { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-size: 11px; font-weight: 900; font-style: italic; color: #1d1d1f; line-height: 1.1; white-space: nowrap;
  text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff; }
html body.sh .sh-ibtn:hover, html body.sh .sh-ibtn[aria-current="page"] { border-color: var(--sh-accent); }
html body.sh .sh-banners { display: grid; gap: 6px; margin: 4px 0 8px; }
html body.sh .sh-banner { position: relative; display: flex; align-items: center; gap: 8px; height: 52px; max-width: 274px; border-radius: 10px; border: 2px solid rgba(0,0,0,.35); padding: 0 10px; overflow: hidden; text-decoration: none; box-sizing: border-box; background: var(--bn, #4a5a78); }
html body.sh .sh-banner img { width: 40px; height: 40px; object-fit: contain; flex: none; }
html body.sh .sh-banner b { font-size: 18px; font-weight: 900; font-style: italic; color: #fff; letter-spacing: .03em; line-height: 1.1;
  text-shadow: 2px 2px 0 rgba(0,0,0,.55), -1px -1px 0 rgba(0,0,0,.45), 1px -1px 0 rgba(0,0,0,.45), -1px 1px 0 rgba(0,0,0,.45); }
html body.sh .sh-banner small { display: block; font-size: 10px; font-weight: 700; font-style: normal; color: rgba(255,255,255,.88); text-shadow: none; letter-spacing: .04em; }
html body.sh .sh-banner:hover { filter: brightness(1.08); }
html body.sh .sh-tlinks { list-style: none; margin: 0 0 6px; padding: 0; }
html body.sh .sh-tlinks li { margin: 0; }
/* テキストリンク：通常の太字リンク（atwiki の装飾文字＝影・白フチ・斜体は模倣しない。2026-12-04 オーナー判断）。
   行間・余白・字下げを全項目で同じにし、折り返した行も記号の後ろで揃える */
html body.sh .sh-tlink { display: grid; grid-template-columns: 14px 1fr; align-items: baseline; padding: 4px 2px; font-size: 15px; font-weight: 700; font-style: normal; line-height: 1.5; color: #2b3a55; text-decoration: none; text-shadow: none; }
html body.sh .sh-tlink::before { content: "▸"; color: var(--sh-accent); }
html body.sh .sh-tlink:hover { color: var(--sh-link); text-decoration: underline; }
html body.sh .sh-tlink[aria-current="page"] { color: var(--sh-accent); }
html[data-theme="dark"] body.sh .sh-tlink { color: #dce6f5; }
html body.sh .sh-tlink .sh-ext { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; }

/* ---------- 右カラム（記事メニュー2 §2.1） ---------- */
html body.sh .sh-right { display: grid; gap: 12px; }
html body.sh .sh-widget { background: var(--sh-card); border: 1px solid var(--sh-line); border-radius: 12px; overflow: hidden; }
html body.sh .sh-widget-h { background: var(--sh-dark); color: #fff; font-size: 14px; font-weight: 800; padding: 7px 10px; margin: 0; }
html body.sh .sh-widget-b { padding: 8px 10px 10px; font-size: 13px; line-height: 1.45; }
html body.sh .sh-widget ul, html body.sh .sh-widget ol { list-style: none; margin: 0; padding: 0; }
html body.sh .sh-widget a { color: var(--sh-link); text-decoration: none; }
html body.sh .sh-widget a:hover { text-decoration: underline; }
html body.sh .sh-hist-date { font-weight: 800; color: var(--sh-dark); font-size: 12px; margin: 6px 0 2px; border-bottom: 1px solid var(--sh-line); }
html[data-theme="dark"] body.sh .sh-hist-date { color: #e8eef7; }
html body.sh .sh-hist li { padding: 2px 0 2px 10px; position: relative; }
html body.sh .sh-hist li::before { content: ""; position: absolute; left: 1px; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--sh-accent); }
html body.sh .sh-rank li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
html body.sh .sh-rank .sh-rk { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: #fff; font-weight: 900; font-size: 13px; background: var(--sh-black); }
html body.sh .sh-rank li:nth-child(1) .sh-rk { background: var(--sh-gold); }
html body.sh .sh-rank li:nth-child(2) .sh-rk { background: var(--sh-silver); }
html body.sh .sh-rank li:nth-child(3) .sh-rk { background: var(--sh-bronze); }
html body.sh .sh-rank-note { font-size: 11px; color: #999; margin: 6px 0 0; }
html body.sh .sh-more { display: block; margin-top: 8px; text-align: center; border: 1px solid var(--sh-line); border-radius: 8px; padding: 5px; font-weight: 700; }
html body.sh .sh-recent li { display: flex; gap: 6px; padding: 3px 0; min-width: 0; }
html body.sh .sh-recent time { flex: none; color: #999; font-size: 12px; min-width: 3.6em; }
html body.sh .sh-recent a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- ドロワー（§2.3） ---------- */
html body.sh .drw-backdrop { position: fixed; inset: 0; background: rgba(10, 12, 20, .45); z-index: 300; opacity: 0; transition: opacity .22s ease; }
html body.sh .drw-backdrop.show { opacity: 1; }
html body.sh .drw-backdrop[hidden] { display: none; }
html body.sh .drw { position: fixed; top: 0; right: 0; height: 100dvh; width: min(340px, 90vw); background: var(--sh-menu-bg); color: var(--sh-text); z-index: 310;
  transform: translateX(102%); transition: transform .24s ease, visibility 0s linear .24s; visibility: hidden; box-shadow: none; display: flex; flex-direction: column; }
html body.sh .drw.open { transform: none; visibility: visible; transition: transform .24s ease; box-shadow: -12px 0 32px rgba(0, 0, 0, .22); }
html body.sh .drw-head { display: flex; align-items: center; justify-content: space-between; background: var(--sh-dark); color: #fff; padding: 0 6px 0 14px; height: 52px; flex: none; }
html body.sh .drw-title { font-weight: 800; letter-spacing: .08em; }
html body.sh .drw-x { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
html body.sh .drw-x svg { width: 22px; height: 22px; }
html body.sh .drw-nav { overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 24px; flex: 1; }
html body.sh .drw-cat { border-bottom: 1px solid var(--sh-line); padding: 0 12px; }
html body.sh .drw-cat-head { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 17px; font-weight: 800; color: var(--sh-dark); border-left: 2px solid var(--sh-accent); padding: 10px 4px 10px 8px; margin: 6px 0; text-align: left; }
html[data-theme="dark"] body.sh .drw-cat-head { color: #e8eef7; }
html body.sh .drw-chev { width: 18px; height: 18px; transition: transform .2s; }
html body.sh .drw-cat.open .drw-chev { transform: rotate(180deg); }
html body.sh .drw-cat-body { display: none; padding: 0 0 10px; }
html body.sh .drw-cat.open .drw-cat-body { display: block; }
html body.sh .drw-widgets { display: grid; gap: 12px; padding: 14px 12px 0; }
html body.sh.drw-lock { overflow: hidden; }

/* ---------- 浮動目次ボタン（§2.1） ---------- */
html body.sh .sh-tocbtn { position: fixed; right: 16px; bottom: 20px; z-index: 240; border: 0; border-radius: 999px; background: var(--sh-dark); color: #fff; font: inherit; font-weight: 800; font-size: 14px;
  padding: 10px 16px; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
html body.sh .sh-tocbtn[hidden] { display: none; }
html body.sh .sh-tocpanel { position: fixed; right: 16px; bottom: 70px; z-index: 241; width: min(320px, calc(100vw - 32px)); max-height: min(60vh, 520px); overflow-y: auto; background: var(--sh-card);
  border: 1px solid var(--sh-line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.25); padding: 0 0 8px; }
html body.sh .sh-tocpanel[hidden] { display: none; }
html body.sh .sh-tocpanel .sh-widget-h { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; }
html body.sh .sh-tocpanel .sh-widget-h button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
html body.sh .sh-tocpanel ol { list-style: none; margin: 0; padding: 6px 12px; font-size: 14px; }
html body.sh .sh-tocpanel li { padding: 4px 0; border-bottom: 1px dotted var(--sh-line); }
html body.sh .sh-tocpanel li.lv3 { padding-left: 14px; font-size: 13px; }
html body.sh .sh-tocpanel a { color: var(--sh-link); text-decoration: none; }

/* ---------- 960px 未満：左右カラム非表示・ハンバーガー（§2.3） ---------- */
@media (max-width: 959px) {
  html body.sh .sh-shell { grid-template-columns: minmax(0, 1fr); padding: 0 8px 24px; }
  html body.sh .sh-left, html body.sh .sh-right { display: none; }
  html body.sh .sh-head .sh-ham { display: inline-flex; }
  html body.sh .sh-card { padding: 12px 12px 14px; border-radius: 10px; }
}
@media (max-width: 760px) {
  html body.sh .sh-head .sh-fan { display: none; }
  html body.sh .sh-head .themebtn { margin-left: auto; }
  html body.sh .sh-brand-name { font-size: 15px; }
  html body.sh .sh-pagename { font-size: 19px; }
  html body.sh .sh-tocbtn { bottom: calc(70px + env(safe-area-inset-bottom, 0px) + var(--v66-anchor-h, 0px)); right: 10px; padding: 9px 13px; }
  html body.sh .sh-tocpanel { bottom: calc(118px + env(safe-area-inset-bottom, 0px) + var(--v66-anchor-h, 0px)); right: 10px; }
  html body.sh .sh-crumbs { padding: 6px 10px; font-size: 12px; }
}

/* =====================================================================
   B. タイポグラフィ・コンポーネント（§4・§6 の実測値）
   本文の既定値は :where() で詳細度 0（ページ側の個別スタイルを優先）
   ===================================================================== */
:where(html body.sh .sh-body) { font-size: 16px; line-height: 1.5; color: var(--sh-text); font-family: var(--sh-font); }
:where(html body.sh .sh-body) :where(p, li, dd, dt, td, figcaption, blockquote) { color: var(--sh-text); }
:where(html body.sh .sh-body) :where(td, th) { font-size: 14px; }
:where(html body.sh .sh-body) a:not([class]) { color: var(--sh-link); }
:where(html body.sh .sh-body) :where(button, input, select, textarea) { font-family: var(--sh-font); }
html[data-theme="dark"] :where(body.sh .sh-body) { color: var(--sh-text); }

/* h2 / h3（§4.6）：v6.6b で節見出しに適用済みのものと同じ値。ページ共通の汎用クラス .sh-h2 / .sh-h3 でも使える */
html body.sh .sh-h2 { display: flex; align-items: center; flex-wrap: wrap; width: fit-content; max-width: 100%; box-sizing: border-box; background: var(--sh-dark); color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1.4; border: 0; border-radius: 8px; padding: 6px 14px; margin: 22px 0 10px; }
html body.sh .sh-h3 { color: var(--sh-dark); font-size: 20px; font-weight: 700; line-height: 1.4; border: 0; border-left: 2px solid var(--sh-accent); border-bottom: 1px solid var(--sh-line); padding: 0 0 3px 8px; margin: 18px 0 8px; }
html[data-theme="dark"] body.sh .sh-h3 { color: #e8eef7; }
html body.sh .sh-h4 { font-size: 17px; font-weight: 800; color: var(--sh-dark); margin: 14px 0 6px; }
html body.sh .sh-h4::before { content: "■"; color: var(--sh-accent); margin-right: 4px; }
html[data-theme="dark"] body.sh .sh-h4 { color: #e8eef7; }
html body.sh .sh-maru { display: inline-flex; align-items: center; gap: 6px; }
html body.sh .sh-num { display: inline-block; margin-right: 8px; font-weight: 900; }

/* 表（§4.1） */
html body.sh table.sh-t { border-collapse: collapse; font-size: 14px; background: var(--sh-card); }
html body.sh table.sh-t th, html body.sh table.sh-t td { border: 1px solid var(--sh-border); padding: 5px 8px; font-size: 14px; }
html body.sh table.sh-t thead th, html body.sh table.sh-t tr.sh-hrow > th { background: var(--sh-th); color: #fff; font-weight: 700; }
html body.sh table.sh-t tr.even > td { background: var(--sh-stripe); }
html body.sh .sh-name2 { display: block; font-weight: 700; color: var(--sh-dark); line-height: 1.3; }
html[data-theme="dark"] body.sh .sh-name2 { color: #e8eef7; }
html body.sh .sh-sub { display: block; font-size: 12px; color: #999; font-weight: 400; line-height: 1.25; }
html body.sh .sh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* 進化表：列見出しを段階ごとに黄→赤→マゼンタ、セル中央揃え、横スクロール */
html body.sh table.sh-evo { border-collapse: collapse; min-width: 100%; }
html body.sh table.sh-evo th, html body.sh table.sh-evo td { border: 1px solid var(--sh-border); text-align: center; vertical-align: middle; padding: 6px 8px; font-size: 14px; min-width: 120px; }
html body.sh table.sh-evo th.st2 { background: #f2c200; color: #1d1d1f; }
html body.sh table.sh-evo th.st3 { background: #e0452f; color: #fff; }
html body.sh table.sh-evo th.st4 { background: #c2189b; color: #fff; }
html body.sh table.sh-evo th.st1 { background: var(--sh-th); color: #fff; }
html body.sh table.sh-evo th.rowh { background: var(--sh-stripe); color: inherit; min-width: 80px; }

/* 折りたたみ（§4.7）：<details><summary>、＋⇄− */
html body.sh details.sh-fold { margin: 8px 0; }
html body.sh details.sh-fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #888; font-size: 14px; font-weight: 700; padding: 2px 0; }
html body.sh details.sh-fold > summary::-webkit-details-marker { display: none; }
html body.sh details.sh-fold > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid #999; border-radius: 3px; font-size: 14px; line-height: 1; color: #666; background: #fff; }
html body.sh details.sh-fold[open] > summary::before { content: "−"; }
html body.sh details.sh-fold > .sh-fold-b { padding: 6px 0 2px 4px; }

/* 引用ブロック（§3.2 概要） */
html body.sh blockquote.sh-quote { position: relative; margin: 8px 0 12px; padding: 12px 14px 12px 44px; background: #f2f2f2; border-radius: 8px; color: #555; }
html[data-theme="dark"] body.sh blockquote.sh-quote { background: rgba(255,255,255,.06); color: var(--sh-text); }
html body.sh blockquote.sh-quote::before { content: "“"; position: absolute; left: 10px; top: -4px; font-size: 48px; line-height: 1; color: #bbb; font-family: Georgia, serif; }

/* フィルターチップ（§4.2）：暗い紺の角丸パネル */
html body.sh .sh-fpanel { background: var(--sh-navy); border-radius: 14px; padding: 12px; color: #fff; display: grid; gap: 10px; }
html body.sh .sh-frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
html body.sh .sh-frow-el { border: 2px solid rgba(255,255,255,.55); border-radius: 999px; padding: 4px 8px; width: fit-content; max-width: 100%; box-sizing: border-box; }
html body.sh .sh-fpanel .filter-btn { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.45); background: var(--sh-navy-2); color: #dfe6f3; padding: 5px 12px; line-height: 1.3; }
html body.sh .sh-fpanel .filter-btn[aria-pressed="true"] { background: #fff; color: var(--sh-navy); border-color: #fff; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="水"] { background: var(--sh-el-water); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="火"] { background: var(--sh-el-fire); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="草"] { background: var(--sh-el-grass); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="岩"] { background: var(--sh-el-rock); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="雷"] { background: var(--sh-el-thunder); color: #1d1d1f; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: 2px; color: #fff; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="雷"][aria-pressed="true"] { color: #1d1d1f; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el=""][aria-pressed="true"] { background: #fff; color: var(--sh-navy); }
html body.sh .sh-fchecks { border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
html body.sh .sh-fchecks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #dfe6f3; }
html body.sh .sh-fcount { font-size: 13px; color: #cfd8e8; }
/* 明るい背景版（スキル効果逆引き） */
html body.sh .sh-fpanel.sh-light { background: #e9e9ec; color: #333; }
html[data-theme="dark"] body.sh .sh-fpanel.sh-light { background: #22304a; color: #e8eef7; }
html body.sh .sh-fpanel.sh-light .filter-btn { background: #fff; color: #333; border-color: #c9c9ce; }
html body.sh .sh-fpanel.sh-light .filter-btn[aria-pressed="true"] { background: var(--sh-dark); color: #fff; border-color: var(--sh-dark); }
html body.sh .sh-fpanel.sh-light .filter-btn.sh-debuff { color: #d0312d; }
html body.sh .sh-fpanel.sh-light .filter-btn.sh-debuff[aria-pressed="true"] { background: #d0312d; color: #fff; border-color: #d0312d; }

/* タブ（§4.3） */
html body.sh .sh-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 3px solid #1f6fd1; padding-bottom: 0; margin: 8px 0 12px; }
html body.sh .sh-tabs button { font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid #bfc8d6; border-bottom: 0; background: #fff; color: #333; padding: 7px 12px; border-radius: 8px 8px 0 0; }
html body.sh .sh-tabs button[aria-selected="true"] { background: #1f6fd1; color: #fff; border-color: #1f6fd1; }
html[data-theme="dark"] body.sh .sh-tabs button { background: #1b2840; color: #dce6f5; border-color: #33476b; }
html[data-theme="dark"] body.sh .sh-tabs button[aria-selected="true"] { background: #2f7fe0; color: #fff; }

/* ティア別グリッド（§3.2） */
html body.sh .sh-tier { display: grid; grid-template-columns: 56px minmax(0, 1fr); border: 1px solid var(--sh-line); border-radius: 10px; overflow: hidden; margin: 0 0 8px; }
html body.sh .sh-tier-l { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.35); }
html body.sh .sh-tier-g { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--sh-card); }
html body.sh .sh-tile { display: flex; flex-direction: column; align-items: center; width: 72px; border: 2px solid var(--sh-line); border-radius: 10px; padding: 3px 2px; text-decoration: none; background: var(--sh-card); box-sizing: border-box; }
html body.sh .sh-tile img { width: 56px; height: 56px; object-fit: contain; }
html body.sh .sh-tile span { font-size: 11px; font-weight: 700; color: var(--sh-dark); text-align: center; line-height: 1.2; word-break: break-all; }
html[data-theme="dark"] body.sh .sh-tile span { color: #e8eef7; }
html body.sh a.sh-tile:hover { border-color: var(--sh-accent); }
html body.sh .sh-tier-Sp { background: #b3001b; } html body.sh .sh-tier-S { background: #e0302f; } html body.sh .sh-tier-Am { background: #ef7d22; }
html body.sh .sh-tier-A { background: #f39a1e; } html body.sh .sh-tier-Bp { background: #e2b400; } html body.sh .sh-tier-B { background: #d4b000; }
html body.sh .sh-tier-C { background: #3aa64b; } html body.sh .sh-tier-D { background: #8e8e93; }

/* 計算の内訳（§4.9）・結果リスト型 */
html body.sh .sh-resbox { background: #f3f7fc; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
html[data-theme="dark"] body.sh .sh-resbox { background: rgba(255,255,255,.05); }
html body.sh .sh-resrow { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
html body.sh .sh-resrow b { color: var(--sh-link); font-weight: 800; text-align: right; }
html body.sh .sh-kakko { font-weight: 800; color: var(--sh-dark); }
html body.sh .sh-kakko::before { content: "【"; } html body.sh .sh-kakko::after { content: "】"; }
html[data-theme="dark"] body.sh .sh-kakko { color: #e8eef7; }

/* コピー用ボタン（§4.14） */
html body.sh .sh-copy { font: inherit; font-size: 12px; font-weight: 700; border: 1px solid var(--sh-line); background: #fff; color: #333; border-radius: 6px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
html body.sh .sh-copy.done { background: #3aa64b; color: #fff; border-color: #3aa64b; }
html[data-theme="dark"] body.sh .sh-copy { background: #1b2840; color: #dce6f5; }

/* 外部リンクカード（§4.5） */
html body.sh .sh-lcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html body.sh .sh-lcard { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--sh-card); border: 1px solid var(--sh-line); border-bottom: 4px solid var(--bc, #3aa64b); border-radius: 12px; padding: 12px 8px 10px; text-decoration: none; color: var(--sh-dark); font-weight: 700; font-size: 13px; text-align: center; }
html[data-theme="dark"] body.sh .sh-lcard { color: #e8eef7; }
html body.sh .sh-lcard svg { width: 30px; height: 30px; }
@media (max-width: 760px) { html body.sh .sh-lcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 小アイコン（本文中のキーワード §3.4） */
html body.sh img.sh-kwic { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; margin: 0 2px; }
html body.sh .sh-hist li.sh-hist-more { color: #999; font-size: 12px; }

/* =====================================================================
   B. 既存ページの部品を §4 の形に寄せる（DOM・機能・計算は変えず、見た目だけ）
   ===================================================================== */
/* 標準データ表の既定（余白が無かったページの表も含めて §4.1 の形に。ページ側の指定があればそちらを優先） */
.sh-body table.data th, .sh-body table.data td { padding: 5px 8px; }
html body.sh .sh-body table.data tr.even > td, html body.sh .sh-body table.unit-table tr.even > td { background: var(--wb-stripe, var(--sh-stripe)); }

/* タブ（§4.3）：下線付きタブバー、選択中は青塗り＋白文字、未選択は白地に枠線、折り返し可 */
html body.sh .sh-body .tabs[role="tablist"] { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 3px solid #1f6fd1; margin: 10px 0 14px; padding: 0; }
html body.sh .sh-body .tabs[role="tablist"] button { font-size: 14px; font-weight: 700; border: 1px solid #bfc8d6; border-bottom: 0; border-radius: 8px 8px 0 0; background: #fff; color: #333; padding: 7px 14px; margin: 0; }
html body.sh .sh-body .tabs[role="tablist"] button.active, html body.sh .sh-body .tabs[role="tablist"] button[aria-selected="true"] { background: #1f6fd1; border-color: #1f6fd1; color: #fff; }
html[data-theme="dark"] body.sh .sh-body .tabs[role="tablist"] button { background: #1b2840; color: #dce6f5; border-color: #33476b; }
html[data-theme="dark"] body.sh .sh-body .tabs[role="tablist"] button.active { background: #2f7fe0; color: #fff; border-color: #2f7fe0; }

/* 折りたたみ（§4.7）：＋⇄− の小さな四角と灰色のラベル */
html body.sh .sh-body details.tmore > summary, html body.sh .sh-body details.icx-det > summary, html body.sh .sh-body details.sh-fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #888; font-size: 14px; font-weight: 700; }
html body.sh .sh-body details.tmore > summary::-webkit-details-marker, html body.sh .sh-body details.icx-det > summary::-webkit-details-marker { display: none; }
html body.sh .sh-body details.tmore > summary::before, html body.sh .sh-body details.icx-det > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid #999; border-radius: 3px; font-size: 14px; line-height: 1; color: #666; background: #fff; flex: none; }
html body.sh .sh-body details.tmore[open] > summary::before, html body.sh .sh-body details.icx-det[open] > summary::before { content: "−"; }

/* 数値ステッパー（§4.10）：右寄せの大きめの入力欄、その下に「増やす」（濃い色）・「減らす」（淡い色）の行 */
html body.sh .sh-body :is(.stp, .grp-step, .aa-step) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; width: min(100%, 260px); margin: 4px 0 6px; }
html body.sh .sh-body :is(.stp, .grp-step, .aa-step) input { order: -1; width: 100%; box-sizing: border-box; height: 44px; text-align: right; font-size: 20px; font-weight: 700; padding: 0 12px; border: 1px solid #b9b9be; border-radius: 8px; background: #fff; color: #1d1d1f; }
html[data-theme="dark"] body.sh .sh-body :is(.stp, .grp-step, .aa-step) input { background: #0f1a2b; color: #e8eef7; border-color: #3a4a66; }
html body.sh .sh-body :is(.stp, .grp-step, .aa-step) button { width: 100%; height: 30px; border-radius: 8px; font-size: 16px; font-weight: 800; cursor: pointer; }
html body.sh .sh-body :is(.stp, .grp-step, .aa-step) button[aria-label="増やす"] { order: 1; background: #404040; color: #fff; border: 1px solid #404040; }
html body.sh .sh-body :is(.stp, .grp-step, .aa-step) button[aria-label="減らす"] { order: 2; background: #ececef; color: #404040; border: 1px solid #c9c9ce; }
html[data-theme="dark"] body.sh .sh-body :is(.stp, .grp-step, .aa-step) button[aria-label="増やす"] { background: #3c5375; border-color: #3c5375; }
html[data-theme="dark"] body.sh .sh-body :is(.stp, .grp-step, .aa-step) button[aria-label="減らす"] { background: #1b2840; color: #dce6f5; border-color: #33476b; }

/* セグメント選択（§4.11）：横並びのボタン。選択中は塗り、未選択は淡い塗り＋枠線 */
html body.sh .sh-body .seg { display: inline-flex; flex-wrap: wrap; gap: 6px; background: none; padding: 0; border-radius: 0; }
html body.sh .sh-body .seg .segbtn { border: 1px solid #c9c9ce; background: #f2f2f4; color: #333; border-radius: 8px; padding: 7px 12px; font-weight: 700; box-shadow: none; }
html body.sh .sh-body .seg .segbtn.on, html body.sh .sh-body .seg .segbtn[aria-pressed="true"] { background: #1f6fd1; border-color: #1f6fd1; color: #fff; }
html[data-theme="dark"] body.sh .sh-body .seg .segbtn { background: #1b2840; color: #dce6f5; border-color: #33476b; }
html[data-theme="dark"] body.sh .sh-body .seg .segbtn.on { background: #2f7fe0; border-color: #2f7fe0; color: #fff; }

/* 計算の内訳・結果リスト型（§4.9）：淡色の角丸ボックスに「ラベル：値」、値は右寄せ・ブランド色・太字 */
html body.sh .sh-body :is(.toolres, #rc-out, #ic-farm-out, #ic-fish-out, #bt-out) { background: #f3f7fc; border: 0; border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
html[data-theme="dark"] body.sh .sh-body :is(.toolres, #rc-out, #ic-farm-out, #ic-fish-out, #bt-out) { background: rgba(255,255,255,.05); }
html body.sh .sh-body .tr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 14px; border-bottom: 1px dotted #d5dbe5; }
html body.sh .sh-body .tr-row:last-child { border-bottom: 0; }
html body.sh .sh-body .tr-row > span::after { content: "："; }
html body.sh .sh-body .tr-row > b { color: var(--sh-link); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
html body.sh .sh-body .tr-row.big > b { font-size: 20px; }
html body.sh .sh-body .tr-sub { font-weight: 800; color: var(--sh-dark); margin-top: 6px; }
html body.sh .sh-body .tr-sub::before { content: "【"; } html body.sh .sh-body .tr-sub::after { content: "】"; }
html[data-theme="dark"] body.sh .sh-body .tr-sub { color: #e8eef7; }

/* =====================================================================
   C. タタ図鑑の絞り込みパネル（§4.2）・タタ評価一覧のティア別グリッド（§3.2）
   ===================================================================== */
html body.sh .sh-body .zpanel { margin: 6px 0 12px; }
html body.sh .sh-body .zpanel .zsearch-row { margin: 0; }
html body.sh .sh-body .zpanel .zsearch-row input { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35); background: var(--sh-navy-2); color: #fff; padding: 0 12px; font-size: 15px; }
html body.sh .sh-body .zpanel .zsearch-row input::placeholder { color: #a9b5ca; }
html body.sh .sh-body .zpanel #zcount { color: #cfd8e8; font-weight: 700; font-size: 13px; }
html body.sh .sh-body .zpanel .zprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
html body.sh .sh-body .zpanel .fl { color: #cfd8e8; font-size: 12.5px; font-weight: 700; min-width: 3.6em; }
html body.sh .sh-body .zpanel .zlang { border: 0; border-radius: 0; overflow: visible; display: flex; gap: 6px; }
html body.sh .sh-body .zpanel .filter-btn svg { width: 20px; height: 20px; }
html body.sh .sh-body .zpanel .sh-frow-el .filter-btn { color: #fff; }
html body.sh .sh-body .zpanel .sh-frow-el .filter-btn[data-el=""] { width: auto; padding: 0 14px; border-radius: 999px; background: var(--sh-navy-2); }
html body.sh .sh-body .zpanel .zchecks { margin: 0; }
html body.sh .sh-body .zpanel .zchecks input { accent-color: #fff; }
html body.sh .sh-body a.zpage { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--sh-link); }
html body.sh .sh-body a.zpage-big { display: inline-block; margin-top: 8px; padding: 5px 12px; border: 1px solid var(--sh-link); border-radius: 999px; font-size: 13px; text-decoration: none; }
html body.sh .sh-body .ztable .zname b { display: block; color: var(--sh-dark); }
html[data-theme="dark"] body.sh .sh-body .ztable .zname b { color: #e8eef7; }

html body.sh .sh-body .tband { display: grid; grid-template-columns: 56px minmax(0, 1fr); border: 1px solid var(--sh-line); border-radius: 10px; overflow: hidden; margin: 0 0 8px; }
html body.sh .sh-body .tband-label { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.35); border-radius: 0; min-height: 0; width: auto; }
html body.sh .sh-body .tband-label.tb-s { background: #e0302f; } html body.sh .sh-body .tband-label.tb-a { background: #f08a1c; }
html body.sh .sh-body .tband-label.tb-b { background: #d9b400; } html body.sh .sh-body .tband-label.tb-c { background: #3aa64b; }
html body.sh .sh-body .tband-label.tb-d { background: #8e8e93; }
html body.sh .sh-body .tband-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--sh-card); }
html body.sh .sh-body .tband-chips .tchip { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 76px; min-height: 0; border: 2px solid var(--sh-line); border-radius: 10px; padding: 3px 2px 4px; text-decoration: none; background: var(--sh-card); box-sizing: border-box; gap: 0; }
html body.sh .sh-body .tband-chips .tchip:hover { border-color: var(--sh-accent); }
html body.sh .sh-body .tband-chips .tchip img { width: 56px; height: 56px; object-fit: contain; margin: 0; border-radius: 6px; }
html body.sh .sh-body .tband-chips .tchip span { font-size: 11px; font-weight: 700; color: var(--sh-dark); text-align: center; line-height: 1.2; word-break: break-all; }
html[data-theme="dark"] body.sh .sh-body .tband-chips .tchip span { color: #e8eef7; }
html body.sh .sh-body .tband-chips .tchip .trate { font-size: 10px; color: #888; font-weight: 600; margin-top: 1px; }
html body.sh .sh-body .tier-panel { padding-top: 2px; }
html body.sh .sh-body .zpanel .sh-frow-el .filter-btn[data-el=""][aria-pressed="true"] { background: #fff; color: var(--sh-navy); }
html body.sh .sh-body .tier-panel > h2 { display: flex; align-items: center; flex-wrap: wrap; width: fit-content; max-width: 100%; background: var(--sh-dark); color: #fff; font-size: 20px; font-weight: 700; line-height: 1.4; border: 0; border-left: 5px solid var(--sh-accent); border-radius: 8px; padding: 6px 14px; margin: 22px 0 10px; }
html body.sh .sh-body .tier-panel[hidden] { display: none; }
/* ゾンビ図鑑（§3.2 カードグリッド型）：2列、上辺に属性色の線、左に画像、右に名前（属性色）・属性ラベル */
html body.sh .sh-body .zb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { html body.sh .sh-body .zb-grid { grid-template-columns: minmax(0, 1fr); } }
html body.sh .sh-body .zb-card { border-radius: 12px; }
html body.sh .sh-body .zb-head img { width: 72px; height: 72px; border-radius: 10px; background: #f3f3f5; }
html body.sh .sh-body .zb-card[data-el="水"] h3 { color: var(--sh-el-water); } html body.sh .sh-body .zb-card[data-el="火"] h3 { color: var(--sh-el-fire); }
html body.sh .sh-body .zb-card[data-el="草"] h3 { color: var(--sh-el-grass); } html body.sh .sh-body .zb-card[data-el="雷"] h3 { color: #b38900; }
html body.sh .sh-body .zb-card[data-el="岩"] h3 { color: var(--sh-el-rock); }
html body.sh .sh-body .zb-meta { display: inline-block; margin-top: 4px; padding: 1px 9px; border-radius: 999px; background: #8e8e93; color: #fff; font-size: 12px; font-weight: 700; }
html body.sh .sh-body .zb-card[data-el="水"] .zb-meta { background: var(--sh-el-water); } html body.sh .sh-body .zb-card[data-el="火"] .zb-meta { background: var(--sh-el-fire); }
html body.sh .sh-body .zb-card[data-el="草"] .zb-meta { background: var(--sh-el-grass); } html body.sh .sh-body .zb-card[data-el="雷"] .zb-meta { background: var(--sh-el-thunder); color: #1d1d1f; }
html body.sh .sh-body .zb-card[data-el="岩"] .zb-meta { background: var(--sh-el-rock); }
html body.sh .sh-body .zb-card .zb-boss { color: #fff; }

/* スキル効果逆引き（§4.2 明るい背景版）：灰色パネル・白いチップ・選択中は濃い塗り・妨害系は赤文字 */
html body.sh .sh-body .mswrap .zfilters { background: #e9e9ec; }
html[data-theme="dark"] body.sh .sh-body .mswrap .zfilters { background: #22304a; }
html body.sh .sh-body :is(#sl-kind, #sl-tag, #sl-el) button { background: #fff; color: #333; border: 1px solid #c9c9ce; border-radius: 999px; }
html body.sh .sh-body :is(#sl-kind, #sl-tag, #sl-el) button.on { background: var(--sh-dark); color: #fff; border-color: var(--sh-dark); }
html body.sh .sh-body #sl-tag button.sh-debuff { color: #d0312d; border-color: #e7a3a1; }
html body.sh .sh-body #sl-tag button.sh-debuff.on { background: #d0312d; color: #fff; border-color: #d0312d; }
html[data-theme="dark"] body.sh .sh-body :is(#sl-kind, #sl-tag, #sl-el) button { background: #1b2840; color: #dce6f5; border-color: #33476b; }
html[data-theme="dark"] body.sh .sh-body :is(#sl-kind, #sl-tag, #sl-el) button.on { background: #2f7fe0; color: #fff; }
html[data-theme="dark"] body.sh .sh-body #sl-tag button.sh-debuff { color: #ff8a85; }

/* ===== D トップページ（§3.1・§4.8・§4.5・§4.14） ===== */
html body.sh .sh-body .sh-topnote { display: flex; align-items: center; gap: 6px; margin: 10px 0 12px; padding: 6px 10px; font-size: 14px; line-height: 20px; color: var(--sh-text); background: var(--sh-stripe, #f5f5f5); border-radius: 6px; }
html body.sh .sh-body .sh-topnote svg { width: 18px; height: 18px; flex: none; color: var(--sh-accent); }
html body.sh .sh-body .sh-topsec { margin: 22px 0; }
html body.sh .sh-body .sh-topsec > h2 .ic { color: var(--sh-accent); width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
/* §4.8 ウィジェットの見出し部：紺のカード／開催中イベントは黄色・太字の囲み／カウントダウンはチップ */
html body.sh .sh-body #acc-cal .nowline { background: var(--sh-navy); color: #fff; border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
html body.sh .sh-body #acc-cal .nowline .evname { color: #1c2740; background: #ffd400; border: 2px solid #ffd400; border-radius: 6px; padding: 1px 10px; font-weight: 800; }
html body.sh .sh-body #acc-cal .nowline .pill { margin-left: auto; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 13px; }
html body.sh .sh-body #acc-cal td.cell.today { border-color: #d4a017; border-width: 3px; }
/* §4.5 外部リンクカード：白い角丸、下辺4pxのブランド色（公式＝緑）。4列で折り返す */
html body.sh .sh-body #linklist { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
html body.sh .sh-body #linklist a { background: var(--sh-card, #fff); border: 1px solid var(--sh-line, #ddd); border-bottom: 4px solid #2e9e44; border-radius: 10px; text-align: center; color: var(--sh-dark); }
html[data-theme="dark"] body.sh .sh-body #linklist a { color: #e8eef7; }
/* §4.14 コピー用ボタン（各行） */
html body.sh .sh-body #codelist .copybtn { border-radius: 6px; padding: 5px 14px; }

/* ===== E ガイド記事（§3.4）：h2 に通し番号、h3 に丸数字（CSS の counter。本文の文字は変えない） ===== */
@counter-style sh-circled { system: fixed; symbols: "①" "②" "③" "④" "⑤" "⑥" "⑦" "⑧" "⑨" "⑩" "⑪" "⑫" "⑬" "⑭" "⑮" "⑯" "⑰" "⑱" "⑲" "⑳"; suffix: " "; }
/* 初心者ガイド・育成優先度：節見出し（div.pri-sec）が h2 相当、入れ子の pri-sec が h3 相当 */
html body[data-sh-guide] .sh-body .mswrap { counter-reset: sh-g2; }
html body[data-sh-guide] .sh-body .mswrap > .pri-sec { counter-increment: sh-g2; counter-reset: sh-g3; }
html body[data-sh-guide] .sh-body .mswrap > .pri-sec::before { content: counter(sh-g2) ". "; }
html body[data-sh-guide] .sh-body .mswrap .pri-sec:not(.mswrap > .pri-sec)::before { counter-increment: sh-g3; content: counter(sh-g3, sh-circled); color: var(--sh-accent); margin-right: 4px; }
/* イベント攻略ガイド：h2 の番号は v6.6b の既存 counter。各イベント内の h3 に丸数字 */
html body[data-sh-guide] .sh-body article.event { counter-reset: sh-g3; }
html body[data-sh-guide] .sh-body article.event h3::before { counter-increment: sh-g3; content: counter(sh-g3, sh-circled); color: var(--sh-accent); margin-right: 4px; }
/* イベント攻略ガイド・ルーレット期待値：各節の h2 に通し番号（ガイドの v6.6b と同じ数え方） */
html body[data-sh-guide] .sh-body main.article { counter-reset: sh-g2; }
html body[data-sh-guide] .sh-body main.article article.event > h2::before { counter-increment: sh-g2; content: counter(sh-g2) ". "; margin-right: 4px; }

/* ===== v6.6c 実測値（CLAUDE_DESIGN_DOC.md 末尾の追補 2026-12-04）。設計書本文の概算値より優先する ===== */
:root { --sh-el-water: #448fed; --sh-el-fire: #fd053b; --sh-el-grass: #74c53a; --sh-el-rock: #9e6935; --sh-el-thunder: #ffca3a;
        --sh-fp-bg: #252433; --sh-fp-btn: #181724; --sh-fp-on: #474366; --sh-rot: #1b365d; }
/* h2：両端が半円のピル型の帯（高さ約46px）。§4.6 の「角丸8px」は実測でこちらに置き換え。左の色線は付けない */
html body.sh .sh-body :is(.article > h2, .mswrap > .pri-sec, .mswrap > h2, .tab-panel > h2, article.event > h2, main.article > h2, section.assetbox > h2, section.rel > h2, section.relcards > h2, section.staticsec > h2, .sh-h2, .tier-panel > h2) { border: 0; border-radius: 999px; min-height: 46px; box-sizing: border-box; padding: 8px 22px; align-items: center; }
/* h4：#404040 の素の太字（記号・線・背景なし） */
html body.sh .sh-h4 { font-size: 16px; font-weight: 700; color: #404040; background: none; border: 0; padding: 0; }
html body.sh .sh-h4::before { content: none; }
/* 引用カード：背景 #f2f2f2、ほぼ直角 */
html body.sh blockquote.sh-quote { border-radius: 2px; }
/* フィルターパネル：背景 #252433・角丸約18px、未選択 #181724、選択中 #474366（枠も同色） */
html body.sh .sh-fpanel:not(.sh-light) { background: var(--sh-fp-bg); border-radius: 18px; }
html body.sh .sh-fpanel:not(.sh-light) .filter-btn { background: var(--sh-fp-btn); border-color: var(--sh-fp-on); color: #e6e4f2; }
html body.sh .sh-fpanel:not(.sh-light) .filter-btn[aria-pressed="true"] { background: var(--sh-fp-on); border-color: var(--sh-fp-on); color: #fff; }
html body.sh .sh-body .zpanel .sh-frow-el { background: var(--sh-fp-bg); }
html body.sh .sh-body .zpanel .sh-frow-el .filter-btn[data-el=""] { background: var(--sh-fp-btn); }
html body.sh .sh-body .zpanel .sh-frow-el .filter-btn[data-el=""][aria-pressed="true"] { background: var(--sh-fp-on); color: #fff; }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="水"] { background: var(--sh-el-water); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="火"] { background: var(--sh-el-fire); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="草"] { background: var(--sh-el-grass); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="岩"] { background: var(--sh-el-rock); }
html body.sh .sh-fpanel .sh-frow-el .filter-btn[data-el="雷"] { background: var(--sh-el-thunder); }
html body.sh .sh-body .zpanel .zsearch-row input { background: var(--sh-fp-btn); border-color: var(--sh-fp-on); }
/* イベントローテーション・ウィジェット：外枠・見出し #1b365d、セル #233755、空き・曜日行 #152b4a／#142845、切替ピル #3c5375、角丸約18px。
   トップページ自身のダークテーマがこの配色なので、その変数をウィジェットの中だけに当てる（明暗どちらのテーマでも同じ） */
html body.sh .sh-body #acc-cal { --card: #1b365d; --text: #e8eef7; --sub: #a9b3c2; --faint: #8fa0b8; --accent: #4da3ff; --link: #7ab8ff; --panel: #1b365d; --panel-text: #e8eef7; --panel-head: #a0c4ff; --sched: #a0c4ff; --line: #4b607f; --evo-line: #4b607f; --th-bg: #152b4a; --th-text: #dbe7ff; --cell: #233755; --cell-border: #233755; --cell-hover: #4b607f; --sel: #a0c4ff; --today-bg: rgba(255, 209, 102, .14); --todaybadge: #ffd166; --evname: #ffd166; --subev: #c9d8f2; --note-text: #c9d8f2; --buffrow: #142845; --buff-img-bg: #2c4569; --evocell: #2c4569; --evocell-border: #4b607f; --evo-mt: #c9d8f2; --evo-tr: #a9b3c2; --evo-head: #ffd166; --t4: #ffadad; --pill-bg: #3c5375; --pill-text: #ffffff; --seg-track: #1f3350; --seg-on: #3c5375; --seg-text: #c9d8f2; --seg-on-text: #ffffff; --navbtn-bg: #324a6d; --navbtn-text: #a0c4ff; --filter-border: #3399ff; --filter-text: #a0c4ff; --filter-on-bg: #a0c4ff; --filter-on-text: #1b365d; --input-bg: #233755; --input-border: #4b607f; --th-line: #4b607f; --row-line: #2c4569; --val-hot: #ff6961; --val-good: #30d158; --val-low: #a9b3c2; --evbadge-bg: #324a6d; --evbadge-text: #a0c4ff; --explain-bg: #16283f; --code-bg: #0f2038; --code-border: #4b607f; --expl-cell-bg: #1b365d; --expl-border: #4b607f; --linkcard-bg: #233755; --packcard-bg: #233755; border-radius: 18px; }
html body.sh .sh-body #acc-cal > summary { color: #fff; }
html body.sh .sh-body #acc-cal .nowline { background: var(--sh-rot); padding: 4px 0; }
html body.sh .sh-body #acc-cal .nowline .pill { background: #3c5375; border-color: #3c5375; }
html body.sh .sh-body #acc-cal td.cell.empty { background: #142845; border-color: #142845; }
html body.sh .sh-body #acc-cal > .panel { padding: 2px 14px 16px; }
@media (max-width: 767px) { html body.sh .sh-body #acc-cal > .panel { padding: 2px 8px 12px; } }

/* ===== 画像配置の実測（IMAGE_PLACEMENT_AUDIT.md 2026-12-04） ===== */
/* 左メニュー：キャラクター欄の正方形アイコンは約75px、コンテンツ・イベント欄の横長バナーは約190×50px */
html body.sh .sh-icons { grid-template-columns: repeat(3, 75px); }
html body.sh .sh-ibtn { width: 75px; height: 75px; }
html body.sh .sh-banners { grid-template-columns: 190px; }
html body.sh .sh-banner { width: 190px; height: 50px; max-width: 190px; padding: 0 8px; gap: 6px; }
html body.sh .sh-banner img { width: 34px; height: 34px; }
html body.sh .sh-banner b { font-size: 16px; }
html body.sh .sh-banner small { font-size: 9px; }
/* タタ評価一覧：サムネイル 100×100（画像と種名をまとめて個別ページへのリンクにしている） */
html body.sh .sh-body .tband-chips .tchip { width: 110px; }
html body.sh .sh-body .tband-chips .tchip img { width: 100px; height: 100px; }
html body.sh .sh-body .tband-chips .tchip span { font-size: 12px; }
@media (max-width: 767px) { html body.sh .sh-body .tband-chips .tchip { width: 92px; } html body.sh .sh-body .tband-chips .tchip img { width: 84px; height: 84px; } }
/* スキル効果逆引き：結果は縦並びのカード、左に 66×66 の青枠の正方形サムネイル（画像と種名の両方が種別ページへのリンク） */
html body.sh .sh-body .sl-head { align-items: flex-start; gap: 12px; }
html body.sh .sh-body .sl-thumb { flex: none; display: flex; align-items: center; justify-content: center; width: 66px; height: 66px; box-sizing: border-box; border: 2px solid #448fed; border-radius: 4px; background: #fff; overflow: hidden; text-decoration: none; }
html body.sh .sh-body .sl-thumb img { width: 62px; height: 62px; object-fit: contain; }
html body.sh .sh-body .sl-noimg { font-size: 11px; color: #888; text-align: center; line-height: 1.3; }
html[data-theme="dark"] body.sh .sh-body .sl-thumb { background: #172233; }
/* スキル効果逆引き：効果タグ（.zchip）はこのページに見た目の指定が無く素の文字が続いていたので、小さなチップにする */
html body.sh .sh-body .sl-card .zchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
html body.sh .sh-body .sl-card .zchip { font-size: 12px; line-height: 1.5; border: 1px solid var(--sh-line); border-radius: 999px; padding: 1px 9px; color: var(--sh-dark); background: var(--sh-card); }
html[data-theme="dark"] body.sh .sh-body .sl-card .zchip { color: #dce6f5; }
