/* Zokugo（仮名）検討用モック 共通スタイル
   ブランド名は --brand-name（HTML側の data-brand）1箇所で差し替え可能 */

:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef1f5;
  --text: #16191f;
  --text-sub: #5c6472;
  --line: #dfe3ea;
  --accent: #1a56db;
  --accent-soft: #e8efff;
  --warn-bg: #fff8e1;
  --warn-line: #f0d68a;
  --ok: #0b7a4b;
  --ng: #b42318;
  --radius: 12px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f25;
    --surface-2: #23272f;
    --text: #eceef2;
    --text-sub: #a4adbb;
    --line: #333944;
    --accent: #7aa2ff;
    --accent-soft: #1e2a45;
    --warn-bg: #2a2416;
    --warn-line: #5c4d1f;
    --ok: #4ec38a;
    --ng: #ff8b7e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.75;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 64px; }

/* ---- モック注意帯 ---- */
.mockbar {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-line);
  color: var(--text);
  font-size: 13px;
  padding: 8px 16px;
  text-align: center;
}
.mockbar b { font-weight: 700; }

/* ---- ヘッダ ---- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.logo {
  font-weight: 800; font-size: 20px; letter-spacing: .02em;
  text-decoration: none; color: var(--text);
}
.logo span { color: var(--accent); }
.logo small {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--text-sub); letter-spacing: 0;
}

/* 言語ボタン（プルダウン禁止 → ボタン列） */
.langs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.langs button {
  font: inherit; font-size: 12px; line-height: 1;
  padding: 6px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text-sub);
  cursor: pointer;
}
.langs button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700;
}

/* ---- パンくず ---- */
.crumb { font-size: 13px; color: var(--text-sub); padding: 14px 0 4px; }
.crumb a { color: var(--text-sub); }

h1 { font-size: 30px; line-height: 1.35; margin: 8px 0 4px; letter-spacing: .01em; }
h2 { font-size: 20px; margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
h3 { font-size: 16px; margin: 24px 0 8px; }

.lead {
  font-size: 18px; font-weight: 600; line-height: 1.7;
  background: var(--surface); border-left: 4px solid var(--accent);
  padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0 8px;
}

.readtime { font-size: 12px; color: var(--text-sub); margin: 0 0 24px; }

/* ---- 図解 ---- */
.figure { margin: 24px 0; }
.figure svg { width: 100%; height: auto; display: block; border-radius: var(--radius); background: var(--surface); }
.figcap { font-size: 13px; color: var(--text-sub); margin-top: 8px; }

.switcher {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0;
  padding: 10px; background: var(--surface-2); border-radius: var(--radius);
  align-items: center;
}
.switcher .lbl { font-size: 12px; color: var(--text-sub); margin-right: 4px; }
.switcher button {
  font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer;
}
.switcher button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---- 事実テーブル ---- */
table.facts { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
table.facts th, table.facts td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top;
}
table.facts th { background: var(--surface); width: 34%; font-weight: 700; white-space: nowrap; }
table.facts a { color: var(--accent); }
.src { font-size: 12px; color: var(--text-sub); }

ul.duty { padding-left: 0; list-style: none; }
ul.duty li {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px; background: var(--surface);
}
ul.duty li b { display: block; }
ul.duty li span { font-size: 14px; color: var(--text-sub); }

.myth { border-left: 3px solid var(--ng); padding: 4px 0 4px 14px; margin: 16px 0; }
.myth b { display: block; }
.myth span { font-size: 15px; color: var(--text-sub); }

.related { display: flex; gap: 8px; flex-wrap: wrap; }
.related a {
  display: inline-block; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 999px; text-decoration: none; color: var(--text); font-size: 14px; background: var(--surface);
}

/* ---- 広告枠 ---- */
.ad {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin: 28px 0; overflow: hidden;
}
.ad-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-sub); background: var(--surface-2);
  padding: 4px 10px; display: inline-block; border-bottom-right-radius: 8px;
}
.ad-body { padding: 4px 16px 16px; display: flex; gap: 14px; align-items: flex-start; }
.ad-img {
  width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--accent); text-align: center; font-weight: 700; overflow: hidden;
}
.ad-name { font-weight: 700; font-size: 16px; margin: 0 0 2px; }
.ad-desc { font-size: 14px; color: var(--text-sub); margin: 0 0 8px; }
.ad-link { font-size: 14px; color: var(--accent); text-decoration: none; word-break: break-all; }
.ad-empty { padding: 20px 16px; text-align: center; }
.ad-empty p { margin: 0 0 12px; color: var(--text-sub); font-size: 14px; }

.btn {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
  padding: 12px 20px; border-radius: 10px; text-decoration: none; text-align: center;
}
.btn.sub { background: var(--bg); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.btn.wide { display: block; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.foot {
  margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-sub);
}
.foot ul { padding-left: 18px; margin: 6px 0; }
.foot a { color: var(--accent); }

/* ---- 申込フロー ---- */
.steps { display: flex; gap: 6px; margin: 20px 0 24px; flex-wrap: wrap; }
.steps div {
  flex: 1 1 0; min-width: 56px; font-size: 11px; text-align: center;
  padding: 8px 4px; border-radius: 8px; background: var(--surface-2); color: var(--text-sub);
}
.steps div[data-on="1"] { background: var(--accent); color: #fff; font-weight: 700; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-sub); font-weight: 400; }
.field input[type=text], .field input[type=url], .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.field textarea { min-height: 76px; resize: vertical; }
.count { font-size: 12px; color: var(--text-sub); text-align: right; }
.count.over { color: var(--ng); font-weight: 700; }

.priceopt {
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; cursor: pointer; background: var(--bg);
  display: block; width: 100%; text-align: left; font: inherit; color: var(--text);
}
.priceopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.priceopt .yen { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.priceopt .per { font-size: 14px; font-weight: 600; color: var(--text-sub); }
.priceopt .cond { font-size: 13px; color: var(--text-sub); margin-top: 6px; }
.priceopt.small .yen { font-size: 20px; }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; background: var(--surface); margin: 16px 0;
}
.card h3 { margin-top: 0; }
.copybox {
  display: flex; gap: 8px; align-items: stretch; margin: 8px 0 4px;
}
.copybox code {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 12px; overflow-x: auto; white-space: nowrap; color: var(--text);
}
.copybox button {
  font: inherit; font-size: 13px; font-weight: 700; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; cursor: pointer;
}
.note { font-size: 13px; color: var(--text-sub); }
.result { border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.result.ok { background: rgba(11,122,75,.10); border: 1px solid var(--ok); }
.result.ng { background: rgba(180,35,24,.08); border: 1px solid var(--ng); }
.result b { display: block; margin-bottom: 4px; }

.preview-wrap { position: sticky; top: 12px; }
.preview-title { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; font-weight: 700; }

.cols { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 880px) {
  .cols { grid-template-columns: 1fr 320px; align-items: start; }
}

.testbadge {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 999px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--text);
}

/* 図解3案の見比べ */
.compare { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 900px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.compare .item h3 { margin-top: 0; }
.compare .item p { font-size: 14px; color: var(--text-sub); margin: 8px 0 0; }

.navcards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 20px 0 8px; }
@media (min-width: 700px) { .navcards { grid-template-columns: 1fr 1fr; } }
.navcards a {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--text); background: var(--surface);
}
.navcards a b { display: block; font-size: 16px; }
.navcards a span { font-size: 13px; color: var(--text-sub); }

/* ---- 図解SVG用（図中テキストはSVG<text>＝言語ごとに差し替え可能） ---- */
.dg-bg   { fill: var(--surface); }
.dg-box  { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.dg-chip { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.dg-fill { fill: var(--accent); }
.dg-line { stroke: var(--text-sub); stroke-width: 2.5; fill: none; }
.dg-thin { stroke: var(--line); stroke-width: 2; fill: none; }
.dg-t    { fill: var(--text); font-weight: 700; }
.dg-ts   { fill: var(--text-sub); font-weight: 500; }
.dg-on   { fill: #ffffff; font-weight: 700; }
.dg-ac   { fill: var(--accent); font-weight: 800; }
.dg-skin { fill: var(--surface-2); stroke: var(--text-sub); stroke-width: 2; }
svg text { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }

/* ---- リンク戦略の部品（2026-07-29追加） ---- */
.linktools { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.linktools button {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.linktools button[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 14px 16px; margin: 10px 0 18px;
}
.panel h4 { margin: 0 0 8px; font-size: 14px; }
.panel .rule { font-size: 13px; color: var(--text-sub); margin: 0 0 10px; }
textarea.code {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.5; padding: 10px 12px; min-height: 96px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical;
}
mark.term {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; padding: 1px 3px; border-radius: 4px;
}
.rankrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rankrow .no { width: 28px; font-weight: 800; color: var(--accent); font-size: 18px; text-align: center; flex: none; }
.rankrow .word { width: 40%; min-width: 130px; }
.rankrow .word a { color: var(--text); font-weight: 700; text-decoration: none; }
.rankrow .word span { display: block; font-size: 11px; color: var(--text-sub); }
.rankrow .barwrap { flex: 1; height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.rankrow .bar { height: 100%; background: var(--accent); border-radius: 7px; }
.rankrow .pct { width: 64px; text-align: right; font-weight: 700; font-size: 14px; flex: none; }
.checker-out { margin-top: 16px; }
.checker-out .preview {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); padding: 14px 16px; font-size: 15px; line-height: 1.9;
}
.badge-count {
  display: inline-block; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; margin-left: 6px;
}

/* ---- トップページ（辞典の顔） ---- */
.hero { padding: 30px 0 10px; }
.hero h1 { font-size: 32px; margin: 0 0 10px; border: none; }
.hero p { color: var(--text-sub); margin: 0 0 18px; font-size: 16px; }
.search input {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 16px;
  border: 2px solid var(--accent); border-radius: 12px;
  background: var(--bg); color: var(--text);
}
a.wordrow { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
a.wordrow b { font-size: 17px; }
a.wordrow .g {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: 2px;
}
a.wordrow span.d { display: block; font-size: 13px; color: var(--text-sub); }
.seeall { font-size: 14px; }

/* ---- 用語ページ完成形（2026-07-29） ---- */
.mockbar .mini {
  font: inherit; font-size: 11px; padding: 3px 8px; margin: 0 1px;
  border: 1px solid var(--warn-line); border-radius: 6px;
  background: var(--bg); color: var(--text); cursor: pointer;
}
.mockbar .mini[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 700; }
.yomi { font-size: 14px; color: var(--text-sub); font-weight: 500; margin-left: 8px; }
.example {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 12px 16px; margin: 10px 0; font-size: 15px;
}
.example span { display: block; font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.videoph {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 28px 16px; text-align: center; color: var(--text-sub); font-size: 14px;
}
.videoph .play {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.videoph .play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }

/* ---- 完全版用語ページ: 目次・沿革 ---- */
html { scroll-behavior: smooth; }
h2[id] { scroll-margin-top: 14px; }
.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 14px 18px; margin: 24px 0;
}
.toc b { font-size: 14px; }
.toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc li { font-size: 14px; margin: 3px 0; break-inside: avoid; }
.toc a { color: var(--accent); text-decoration: none; }
.abbr-box {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 20px; font-weight: 800; margin: 14px 0 4px;
}
.abbr-box .seg { padding: 4px 2px; }
.abbr-box .seg.hit { color: var(--accent); border-bottom: 3px solid var(--accent); }
.abbr-box .eq { color: var(--text-sub); font-weight: 500; font-size: 16px; margin: 0 6px; }
.totoc { font-size: 12px; margin-left: 10px; font-weight: 400; }
.totoc a { color: var(--text-sub); text-decoration: none; }

/* 基準表など、横に広い表はスマホで横スクロールさせる（本文は絶対に横に溢れさせない） */
table.facts { display: block; overflow-x: auto; white-space: normal; }
table.facts th { width: auto; white-space: normal; }
