/*
 * ミケとガジェる：記事のスタイル
 * 方眼のノート × 三毛の3色。数字が主役のブログ。
 * WordPress では「追加CSS」か子テーマに読み込む。記事の部品は .mg- で始まるクラスだけに当てる。
 */

:root {
  --mg-paper: #f7f8f5;
  --mg-grid: #e2e7ea;
  --mg-card: #ffffff;
  --mg-ink: #2a2724;
  --mg-sub: #5f646a;
  --mg-line: #d5dbe0;
  --mg-cha: #e3962f;        /* 三毛の茶：強調・蛍光ペン */
  --mg-cha-soft: #fbe7c8;
  --mg-sumi: #2a2724;       /* 三毛の墨 */
  --mg-blue: #2b5fc4;       /* 製図の青：式 */
  --mg-blue-soft: #e8eefb;
  --mg-ok: #2f8a5b;
  --mg-ng: #c63a2f;
  --mg-warn: #9a6a00;
  --mg-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --mg-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", var(--mg-body);
  --mg-num: "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
  --mg-measure: 36em;
}

/* ページ全体（プレビュー用。WordPress ではテーマの外枠に任せる） */
.mg-page {
  margin: 0;
  background-color: var(--mg-paper);
  background-image:
    linear-gradient(var(--mg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--mg-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--mg-ink);
  font-family: var(--mg-body);
  font-size: 17px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}
.mg-page *, .mg-page *::before, .mg-page *::after { box-sizing: border-box; }

/* サイトの頭 */
.mg-site {
  background: var(--mg-card);
  border-bottom: 1px solid var(--mg-line);
}
.mg-site__inner {
  max-width: 46rem; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.mg-logo { display: flex; align-items: center; gap: 10px; color: var(--mg-ink); text-decoration: none; }
.mg-logo__mark { display: inline-flex; gap: 3px; }
.mg-logo__mark i { width: 10px; height: 10px; border-radius: 50%; display: block; border: 1.5px solid var(--mg-sumi); }
.mg-logo__mark i:nth-child(1) { background: #fff; }
.mg-logo__mark i:nth-child(2) { background: var(--mg-sumi); }
.mg-logo__mark i:nth-child(3) { background: var(--mg-cha); }
.mg-logo__name { font-family: var(--mg-head); font-weight: 900; font-size: 1.15rem; letter-spacing: .02em; }
.mg-logo__sub { font-size: .72rem; color: var(--mg-sub); line-height: 1.3; }

/* 記事本体：方眼の上に置いた1枚の紙 */
.mg-article {
  max-width: 46rem; margin: 0 auto; padding: 0 0 48px;
}
.mg-sheet {
  background: var(--mg-card);
  margin: 0 auto;
  padding: 28px 20px 36px;
  border-left: 1px solid var(--mg-line);
  border-right: 1px solid var(--mg-line);
}
@media (min-width: 720px) { .mg-sheet { padding: 44px 56px 56px; } }
.mg-sheet > * { max-width: var(--mg-measure); }

.mg-cat {
  display: inline-block; font-size: .8rem; color: var(--mg-blue);
  border: 1px solid var(--mg-blue); border-radius: 999px; padding: 0 10px; margin-bottom: 10px;
}
/* サムネ画像：紙からはみ出すように、記事の頭いっぱいに置く */
.mg-thumb { margin: -28px -20px 22px; max-width: none; }
.mg-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; }
@media (min-width: 720px) { .mg-thumb { margin: -44px -56px 30px; } }

/* 見出し：大きく、2行以内（見出しは22文字以内で書く。tests/test_render.py で確認） */
.mg-title {
  font-family: var(--mg-head); font-weight: 900;
  font-size: clamp(1.7rem, 7.4vw, 2.7rem); line-height: 1.32; letter-spacing: .01em;
  margin: 0 0 14px; text-wrap: balance;
}
/* 導入：見出しのすぐ下で、読者の困りごとから入る */
.mg-lead {
  font-size: 1.02rem; line-height: 1.95; color: var(--mg-ink);
  margin: 0 0 16px; padding-left: 14px; border-left: 3px solid var(--mg-cha);
}
.mg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .82rem; color: var(--mg-sub); margin-bottom: 22px; }
.mg-pr { font-weight: 700; color: var(--mg-ink); background: var(--mg-cha-soft); border-radius: 4px; padding: 0 8px; }

/* 冒頭の見せ場：表記と現実のギャップ */
.mg-gap {
  margin: 6px 0 26px; padding: 18px 16px 14px;
  border: 2px solid var(--mg-sumi); border-radius: 14px;
  background: var(--mg-card);
  box-shadow: 5px 5px 0 var(--mg-cha);
  max-width: none;
}
.mg-gap__title { font-family: var(--mg-head); font-weight: 700; font-size: 1rem; margin: 0 0 12px; }
.mg-gap__row { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 10px; align-items: center; margin: 8px 0; }
.mg-gap__label { font-size: .82rem; line-height: 1.35; color: var(--mg-sub); }
.mg-gap__track { position: relative; height: 34px; }
.mg-gap__bar {
  height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 8px; font-family: var(--mg-num); font-weight: 700; font-size: 1.35rem; line-height: 1; color: #fff;
  width: var(--w); transform-origin: left center;
}
.mg-gap__bar small { font-size: .7em; font-weight: 600; margin-left: 2px; }
.mg-gap__bar.is-label { background: repeating-linear-gradient(135deg, #8b9096 0 6px, #9ba0a6 6px 12px); }
.mg-gap__bar.is-real { background: var(--mg-blue); }
.mg-gap__bar.is-need { background: var(--mg-sumi); }
.mg-gap__bar.is-good { background: var(--mg-ok); }
.mg-gap__out {
  position: absolute; top: 0; bottom: 0; left: calc(var(--w) + 8px); display: flex; align-items: center;
  font-family: var(--mg-num); font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--mg-ink); white-space: nowrap;
}
.mg-gap__out small { font-size: .7em; font-weight: 600; margin-left: 2px; }
.mg-gap__ref { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed var(--mg-ng); left: var(--x); }
.mg-gap__verdict {
  margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--mg-line);
  font-family: var(--mg-head); font-weight: 900; font-size: 1.12rem; line-height: 1.5;
}
.mg-gap__verdict.is-ng { color: var(--mg-ng); }
.mg-gap__verdict.is-ok { color: var(--mg-ok); }
.mg-gap__note { font-size: .78rem; color: var(--mg-sub); margin: 10px 0 0; line-height: 1.6; }
@media (prefers-reduced-motion: no-preference) {
  .mg-gap__bar { animation: mg-grow .9s cubic-bezier(.2,.7,.2,1) both; }
  .mg-gap__row:nth-of-type(2) .mg-gap__bar { animation-delay: .25s; }
  .mg-gap__row:nth-of-type(3) .mg-gap__bar { animation-delay: .5s; }
  .mg-gap__row:nth-of-type(4) .mg-gap__bar { animation-delay: .75s; }
  @keyframes mg-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* この記事の結論 */
.mg-answer {
  margin: 0 0 30px; padding: 16px 18px 6px;
  background: var(--mg-cha-soft); border-radius: 4px 18px 18px 4px;
  border-left: 6px solid var(--mg-cha);
}
.mg-answer__head { font-family: var(--mg-head); font-weight: 900; font-size: 1.05rem; margin: 0 0 6px; }
.mg-answer ul { margin: 0; padding-left: 1.1em; }
.mg-answer li { margin: 0 0 10px; }
.mg-answer li::marker { color: var(--mg-cha); }

/* 本文 */
.mg-sheet h2 {
  font-family: var(--mg-head); font-weight: 700;
  font-size: 1.32rem; line-height: 1.5; margin: 2.4em 0 .7em;
  padding: 2px 0 6px 14px; position: relative; text-wrap: pretty;
}
.mg-sheet h2::before {
  content: ""; position: absolute; left: 0; top: .28em; bottom: .38em; width: 5px; border-radius: 3px;
  background: linear-gradient(var(--mg-sumi) 0 50%, var(--mg-cha) 50% 100%);
}
.mg-sheet p { margin: 0 0 1.1em; }
.mg-sheet strong { background: linear-gradient(transparent 62%, var(--mg-cha-soft) 62%); font-weight: 700; }
.mg-sheet a { color: var(--mg-blue); text-underline-offset: 3px; }
.mg-sheet a:focus-visible, .mg-page button:focus-visible, .mg-page input:focus-visible, .mg-page select:focus-visible {
  outline: 3px solid var(--mg-cha); outline-offset: 2px;
}
.mg-sheet ul, .mg-sheet ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.mg-sheet li { margin: .3em 0; }

/* 計算式のメモ（本文中の「〇〇 → 〇〇Wh」の箇条書きを、ノートの計算欄にする） */
.mg-calcnote {
  list-style: none; padding: 12px 14px !important; margin: 0 0 1.3em;
  background-color: var(--mg-blue-soft);
  background-image:
    linear-gradient(rgba(43,95,196,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,95,196,.12) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 8px; border: 1px solid rgba(43,95,196,.35);
}
.mg-calcnote li { margin: .35em 0; color: var(--mg-ink); }
.mg-calcnote .mg-n { font-family: var(--mg-num); font-weight: 700; font-size: 1.25em; color: var(--mg-blue); letter-spacing: .01em; }

/* 表（PPIの表など）と「数字と根拠」 */
.mg-tablewrap { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; max-width: none; }
.mg-sheet table { border-collapse: collapse; width: 100%; font-size: .88rem; line-height: 1.55; }
.mg-sheet th, .mg-sheet td { padding: 8px 10px; border-bottom: 1px solid var(--mg-line); text-align: left; vertical-align: top; }
.mg-sheet thead th { border-bottom: 2px solid var(--mg-sumi); font-weight: 700; white-space: nowrap; }
.mg-sheet td.mg-num { font-family: var(--mg-num); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.mg-evidence { margin: 0 0 1.4em; }
.mg-evidence summary {
  cursor: pointer; font-weight: 700; padding: 10px 12px; border: 1px dashed var(--mg-blue); border-radius: 8px;
  color: var(--mg-blue); background: var(--mg-card);
}
.mg-evidence[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mg-evidence .mg-tablewrap { border: 1px dashed var(--mg-blue); border-top: 0; border-radius: 0 0 8px 8px; padding: 4px 6px; }
.mg-evidence td:nth-child(3) { color: var(--mg-blue); }
.mg-evidence td:nth-child(4) { color: var(--mg-sub); font-size: .8rem; }
.mg-tag-assume { display: inline-block; font-size: .72rem; color: var(--mg-warn); border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-left: 4px; }

/* 商品の欄（楽天API接続前は空き枠） */
.mg-products {
  border: 2px dashed var(--mg-line); border-radius: 12px; padding: 18px 16px; color: var(--mg-sub);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(227,150,47,.06) 10px 20px);
}

/* 向かない人：1人ずつの行。誰か（太字）／理由（数字だけ強調）／その人向けの記事へのリンク */
.mg-notfor {
  margin: 0 0 1.6em; background: var(--mg-card);
  border: 1px solid var(--mg-line); border-top: 4px solid var(--mg-sumi); border-radius: 4px 4px 14px 14px;
}
.mg-notfor ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.mg-nf { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 16px; margin: 0 !important; }
.mg-nf + .mg-nf { border-top: 1px dashed var(--mg-line); }
.mg-nf__mark { width: 26px; height: 26px; border-radius: 50%; background: #fbecea; position: relative; margin-top: 2px; }
.mg-nf__mark::before, .mg-nf__mark::after {
  content: ""; position: absolute; left: 7px; top: 12px; width: 12px; height: 2px; background: var(--mg-ng); border-radius: 1px;
}
.mg-nf__mark::before { transform: rotate(45deg); } .mg-nf__mark::after { transform: rotate(-45deg); }
.mg-nf__who { margin: 0 !important; font-family: var(--mg-head); font-weight: 700; font-size: 1.02rem; line-height: 1.5; color: var(--mg-ink); }
.mg-nf__why { margin: 2px 0 0 !important; font-size: .9rem; line-height: 1.7; color: var(--mg-sub); }
.mg-nf__why .mg-n { font-family: var(--mg-num); font-weight: 700; font-size: 1.15em; color: var(--mg-ng); }
.mg-nf__go {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 8px; padding: 6px 12px;
  border: 1px solid var(--mg-blue); border-radius: 8px; background: var(--mg-blue-soft);
  color: var(--mg-blue) !important; text-decoration: none !important; font-weight: 700; font-size: .88rem;
}
.mg-nf__go span { font-weight: 400; font-size: .74rem; color: var(--mg-sub); }
.mg-nf__go em { font-style: normal; font-weight: 400; font-size: .7rem; color: var(--mg-sub); border: 1px solid var(--mg-line); border-radius: 999px; padding: 0 6px; background: var(--mg-card); }
.mg-nf__go:focus-visible { outline: 3px solid var(--mg-cha); outline-offset: 2px; }

/* 著者 */
.mg-author {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start;
  margin-top: 40px; padding-top: 22px; border-top: 2px solid var(--mg-sumi);
  font-size: .9rem; line-height: 1.75;
}
.mg-author__icon { width: 56px; height: 56px; display: block; }
.mg-author__icon svg { width: 100%; height: 100%; display: block; }
.mg-author__name { font-family: var(--mg-head); font-weight: 900; font-size: 1.05rem; }
.mg-author__role { color: var(--mg-sub); font-size: .8rem; }
.mg-author p { margin: 4px 0 0; }

/* 計算ツールを置く枠 */
.mg-toolslot { max-width: none; margin: 0 0 1.6em; }

/* ミケの判断（「私なら」）：著者が何を選ぶかを、理由の数字つきで言い切る欄 */
.mg-pick {
  position: relative; margin: 0 0 1.5em; padding: 16px 18px 14px 18px;
  background: var(--mg-card); border: 2px solid var(--mg-sumi); border-radius: 4px 16px 16px 16px;
}
.mg-pick::before {
  content: "ミケの判断"; position: absolute; top: -12px; left: 12px; padding: 0 8px;
  background: var(--mg-sumi); color: #fff; font-family: var(--mg-head); font-weight: 700; font-size: .78rem; border-radius: 4px;
}
.mg-pick p { margin: .2em 0 .6em; }
.mg-pick p:last-child { margin-bottom: 0; }
.mg-pick strong { background: none; color: var(--mg-blue); }

/* 商品カード：購入根拠（合う人／合わない人など）を価格の横に出す */
.mg-productlist { display: grid; gap: 16px; margin: 0 0 1.4em; max-width: none; }
.mg-product { border: 1px solid var(--mg-line); border-radius: 12px; padding: 16px; background: var(--mg-card); }
.mg-product__name { font-family: var(--mg-head); font-weight: 700; font-size: 1.05rem; line-height: 1.5; margin: 0 0 8px; }
.mg-product__specs { list-style: none; padding: 0 !important; margin: 0 0 10px !important; display: flex; flex-wrap: wrap; gap: 6px; }
.mg-product__specs li { margin: 0; font-size: .78rem; border: 1px solid var(--mg-line); border-radius: 999px; padding: 0 9px; color: var(--mg-sub); }
.mg-product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.mg-product__price b { font-family: var(--mg-num); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.mg-product__price span { font-size: .76rem; color: var(--mg-sub); }
.mg-product__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px; margin-bottom: 12px; }
.mg-product__stat { background: var(--mg-blue-soft); border-radius: 8px; padding: 8px 10px; }
.mg-product__stat span { display: block; font-size: .74rem; color: var(--mg-sub); line-height: 1.4; }
.mg-product__stat b { font-family: var(--mg-num); font-weight: 700; font-size: 1.3rem; color: var(--mg-blue); }
.mg-product__fit { display: grid; gap: 8px; margin-bottom: 12px; }
@media (min-width: 560px) { .mg-product__fit { grid-template-columns: 1fr 1fr; } }
.mg-product__fit > div { border-radius: 8px; padding: 8px 12px; font-size: .86rem; line-height: 1.65; }
.mg-product__fit p { margin: 0 0 4px; font-weight: 700; }
.mg-product__fit ul { margin: 0 !important; padding-left: 1.1em !important; }
.mg-product__fit .is-yes { background: #eaf5ef; } .mg-product__fit .is-yes p { color: var(--mg-ok); }
.mg-product__fit .is-no { background: #fbecea; } .mg-product__fit .is-no p { color: var(--mg-ng); }
.mg-product__unver { font-size: .8rem; color: var(--mg-sub); margin-bottom: 12px; }
.mg-product__unver summary { cursor: pointer; color: var(--mg-warn); }
.mg-product__btn {
  display: block; text-align: center; background: #bf0000; color: #fff !important; text-decoration: none !important;
  font-weight: 700; border-radius: 999px; padding: 10px 16px;
}
.mg-product__btn:focus-visible { outline: 3px solid var(--mg-cha); outline-offset: 2px; }
.mg-product__src { margin: 8px 0 0 !important; font-size: .72rem; color: var(--mg-sub); line-height: 1.5; }

/* 購入ボタンの欄（「今、買っていい？」型の結論のすぐ下） */
.mg-cta {
  margin: 0 0 28px; padding: 14px 16px; border-radius: 12px;
  background: var(--mg-card); border: 2px solid #bf0000; max-width: none;
}
.mg-cta__name { margin: 0 0 6px !important; font-weight: 700; font-size: .92rem; line-height: 1.5; }
.mg-cta__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.mg-cta__price b { font-family: var(--mg-num); font-weight: 700; font-size: 2.2rem; line-height: 1.1; color: #bf0000; }
.mg-cta__price span { font-size: .76rem; color: var(--mg-sub); }
.mg-cta__note { margin: 2px 0 10px !important; font-size: .74rem; color: var(--mg-sub); line-height: 1.5; }

/* ジャンル（種類 → カテゴリ → 製品）と、作成日・更新日 */
.mg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mg-chip { font-size: .78rem; border-radius: 999px; padding: 0 10px; border: 1px solid var(--mg-blue); color: var(--mg-blue); line-height: 1.8; }
.mg-chip.is-type { border-color: var(--mg-sumi); color: var(--mg-ink); }
.mg-chip.is-strong { background: var(--mg-sumi); border-color: var(--mg-sumi); color: #fff; }
.mg-dates { margin: -6px 0 14px !important; font-size: .76rem; color: var(--mg-sub); display: flex; gap: 4px; }

/* 画面の下に出し続ける購入ボタン（1つの商品を勧める記事だけ。記事の中のボタンが見えている間は隠す） */
.mg-float {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: var(--mg-card); border-top: 2px solid var(--mg-sumi);
  box-shadow: 0 -6px 18px rgba(42, 39, 36, .12); font-family: var(--mg-body);
}
.mg-float[hidden] { display: none !important; }
.mg-float__name { flex: 1 1 auto; min-width: 0; font-size: .8rem; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-float__price { flex: 0 0 auto; font-family: var(--mg-num); font-weight: 700; font-size: 1.25rem; color: #bf0000; line-height: 1; text-align: right; }
.mg-float__price small { display: block; font-family: var(--mg-body); font-weight: 400; font-size: .62rem; color: var(--mg-sub); margin-top: 2px; }
.mg-float__btn {
  flex: 0 0 auto; background: #bf0000; color: #fff !important; text-decoration: none !important;
  font-weight: 700; font-size: .85rem; border-radius: 999px; padding: 8px 14px;
}
.mg-float__btn:focus-visible, .mg-float__close:focus-visible { outline: 3px solid var(--mg-cha); outline-offset: 2px; }
.mg-float__close { flex: 0 0 auto; border: 0; background: none; color: var(--mg-sub); font-size: 1.1rem; padding: 4px 6px; cursor: pointer; }
@media (min-width: 720px) {
  .mg-float { left: 50%; right: auto; transform: translateX(-50%); width: min(46rem, 100%); border: 2px solid var(--mg-sumi); border-bottom: 0; border-radius: 12px 12px 0 0; }
}

/* 誰のための記事？（人物のカード） */
.mg-who { list-style: none; padding: 0 !important; margin: 1em 0 !important; display: grid; gap: 8px; }
.mg-who li { margin: 0 !important; padding: 12px 14px 12px 44px; background: var(--mg-card); border: 1px solid var(--mg-line); border-radius: 12px; position: relative; display: flex; flex-direction: column; }
.mg-who li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; border-radius: 50%; background: var(--mg-cha); box-shadow: inset 0 0 0 4px #fff3e2; }
.mg-who__who { font-family: var(--mg-head); font-weight: 700; color: var(--mg-ink); line-height: 1.5; }
.mg-who__val { font-size: .88rem; color: var(--mg-sub); line-height: 1.6; }

/* 使い方ごとに足りるか */
.mg-fit { list-style: none; padding: 0 !important; margin: 1em 0 !important; background: var(--mg-card); border: 1px solid var(--mg-line); border-radius: 14px; overflow: hidden; }
.mg-fit li { margin: 0 !important; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: start; }
.mg-fit li + li { border-top: 1px dashed var(--mg-line); }
.mg-fit__mark { grid-row: span 2; font-family: var(--mg-head); font-weight: 700; font-size: .78rem; padding: 4px 9px; border-radius: 999px; white-space: nowrap; margin-top: 1px; }
.mg-fit__mark.is-ok { background: #eaf5ef; color: var(--mg-ok); }
.mg-fit__mark.is-half { background: #fdf3df; color: var(--mg-warn); }
.mg-fit__mark.is-ng { background: #fbecea; color: var(--mg-ng); }
.mg-fit__who { font-family: var(--mg-head); font-weight: 700; color: var(--mg-ink); line-height: 1.5; }
.mg-fit__val { font-size: .9rem; color: var(--mg-sub); line-height: 1.6; }
.mg-fit__val .mg-n, .mg-spec__val .mg-n { font-family: var(--mg-num); font-weight: 700; font-size: 1.2em; color: var(--mg-ink); }

/* スペックのカード */
.mg-spec { list-style: none; padding: 0 !important; margin: 1em 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-spec li { margin: 0 !important; padding: 12px 14px; background: var(--mg-card); border: 1px solid var(--mg-line); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.mg-spec li:first-child { grid-column: 1 / -1; }
.mg-spec__who { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--mg-cha); }
.mg-spec__val { font-family: var(--mg-head); font-weight: 700; color: var(--mg-ink); line-height: 1.5; font-size: .95rem; }
.mg-spec__note { font-size: .8rem; color: var(--mg-sub); line-height: 1.5; }

/* 小さな注記 */
.mg-note { font-size: .78rem !important; line-height: 1.7 !important; color: var(--mg-sub); margin: .6em 0 1.4em !important; }

/* セールが終わったときの表示（終了時刻にJSが html に mg-sale-ended を付ける。作り直したページでは最初から消えている） */
.mg-ended-only { display: none !important; }
html.mg-sale-ended .mg-ended-only { display: block !important; }
html.mg-sale-ended .mg-sale-only { display: none !important; }
.mg-ended { margin: 0 0 1.6em; padding: 18px 18px 16px; background: var(--mg-card); border: 2px solid var(--mg-sumi); border-radius: 16px; box-shadow: 6px 6px 0 var(--mg-grid); }
.mg-ended__head { margin: 0 0 6px !important; font-family: var(--mg-head); font-weight: 700; font-size: 1.1rem; color: var(--mg-ink); display: flex; align-items: center; gap: 8px; }
.mg-ended__head::before { content: "終了"; font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--mg-sumi); color: #fff; letter-spacing: .06em; }
.mg-ended__body { margin: 0 0 12px !important; font-size: .9rem; line-height: 1.7; color: var(--mg-sub); }
.mg-ended__go { display: block; text-decoration: none; padding: 12px 14px; border-radius: 12px; background: #eef3fc; border: 1px solid #c9d7f2; color: var(--mg-blue); font-family: var(--mg-head); font-weight: 700; }
.mg-ended__go span { display: block; font-size: .75rem; font-weight: 500; color: var(--mg-sub); }
.mg-ended__go em { font-style: normal; font-size: .7rem; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #fff; color: var(--mg-sub); border: 1px solid var(--mg-line); }
.mg-ended__now { display: inline-block; margin-top: 10px; font-size: .82rem; color: var(--mg-sub); }

.mg-sheet { padding: 24px 16px 32px; border: 1px solid var(--mg-line); border-top: 0; }
@media (min-width: 720px) { .mg-sheet { padding: 44px 56px 56px; } }
.mg-wrap { max-width: 46rem; margin: 0 auto; padding: 22px 16px 40px; }
.mg-home__intro { background: var(--mg-card); border: 2px solid var(--mg-sumi); border-radius: 14px; box-shadow: 5px 5px 0 var(--mg-cha); padding: 20px 18px; margin-bottom: 26px; }
.mg-home__intro h1 { display: flex; align-items: center; gap: 12px; font-family: var(--mg-head); font-weight: 900; font-size: clamp(2rem, 9vw, 2.8rem); line-height: 1.2; margin: 0 0 6px; }
.mg-home__intro h1 .mg-logo__mark i { width: 16px; height: 16px; border-width: 2px; }
.mg-home__sub { margin: 0 0 12px; font-family: var(--mg-head); font-weight: 700; font-size: 1.02rem; }
.mg-home__desc { margin: 0; padding-top: 12px; border-top: 1px dashed var(--mg-line); color: var(--mg-sub); font-size: .92rem; line-height: 1.8; }
.mg-home__label { font-family: var(--mg-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 10px; }
.mg-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.mg-cats a { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--mg-blue); color: var(--mg-blue); text-decoration: none; font-size: .85rem; }
.mg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mg-item a { display: block; background: var(--mg-card); border: 1px solid var(--mg-line); border-radius: 10px; padding: 0 16px 12px; color: var(--mg-ink); text-decoration: none; overflow: hidden; }
.mg-item__thumb { display: block; width: calc(100% + 32px); max-width: none; height: auto; aspect-ratio: 1200 / 630; margin: 0 -16px 12px; }
.mg-item a:hover { border-color: var(--mg-sumi); }
.mg-item a:focus-visible { outline: 3px solid var(--mg-cha); outline-offset: 2px; }
.mg-item__title { font-family: var(--mg-head); font-weight: 900; font-size: 1.25rem; line-height: 1.55; margin: 0 0 6px; text-wrap: pretty; }
.mg-item .mg-chips { margin-bottom: 6px; }
.mg-item__date { margin: -2px 0 6px; font-size: .72rem; color: var(--mg-sub); }
.mg-item__verdict { margin: 0; font-size: .88rem; line-height: 1.6; padding-top: 8px; border-top: 1px dashed var(--mg-line); }
.mg-empty { color: var(--mg-sub); font-size: .92rem; }
.mg-doc h1 { font-family: var(--mg-head); font-weight: 900; font-size: 1.7rem; line-height: 1.4; margin: 0 0 16px; }
.mg-doc h2 { font-family: var(--mg-head); font-weight: 700; font-size: 1.15rem; margin: 28px 0 8px; }
.mg-doc p, .mg-doc li { line-height: 1.9; }
.mg-doc .mg-author { margin-top: 0; border-top: 0; padding-top: 0; }
.mg-foot { border-top: 2px solid var(--mg-sumi); margin-top: 32px; padding: 18px 16px 32px; font-size: .8rem; color: var(--mg-sub); line-height: 1.8; }
.mg-foot__inner { max-width: 46rem; margin: 0 auto; }
.mg-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.mg-foot a { color: var(--mg-ink); }
