/* 使い方のページ（目次と各ページ）。色・ボタン・画像の枠はトップと同じ（site.css）。 */

.guides-body main { background: var(--light-bg); color: var(--light-text); }
.guides-body main a { color: #0e7490; }

/* 目次の頭・各ページの頭（紺の帯） */
.guides-hero, .guide-hero {
  color: var(--text);
  background: radial-gradient(1000px 420px at 85% 0%, #12307a 0%, var(--navy) 62%);
  padding: 56px 0 44px;
}
.guides-hero .lead, .guide-hero .lead { margin-bottom: 18px; max-width: 760px; }
.guides-title, .guide-title { white-space: normal; }
.guide-title { font-size: clamp(26px, 4vw, 42px); max-width: 900px; }
:lang(ja) .guide-title { font-size: clamp(24px, 3.4vw, 36px); }
.guides-body .guide-hero a, .guides-body .guides-hero a { color: var(--accent); }

.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.guide-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.guide-minutes { color: var(--muted); font-size: 14px; margin-left: 4px; }

/* 印（アプリ・機能） */
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
  padding: 6px 10px; border-radius: 999px; background: rgba(34, 211, 238, 0.16); color: var(--accent);
}
.tag-feature { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.card .tag { background: #e0f7fb; color: #0e7490; }
.card .tag-feature { background: #eef2f8; color: var(--light-muted); }

/* 絞り込み */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; transition: background 0.15s, color 0.15s;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--navy); font-weight: 700; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* カード */
.guides-section { padding: 48px 0 24px; }
.guides-section h2 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 20px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; }
.card[hidden] { display: none; }
.card a {
  display: flex; flex-direction: column; gap: 10px; height: 100%; text-decoration: none; color: var(--light-text) !important;
  background: #fff; border: 1px solid #dbe3f0; border-radius: var(--radius); padding: 22px 22px 18px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11, 26, 64, 0.12); border-color: #9fdcea; }
.card a:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.45; }
.card-desc { color: var(--light-muted); font-size: 15px; }
.card-meta { margin-top: auto; font-size: 13px; color: #0e7490; font-weight: 700; }

/* ページ: 本文と横の目次 */
.guide-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.guide-body { min-width: 0; max-width: 760px; font-size: 17px; }
.guide-body h2 { font-size: clamp(21px, 2.6vw, 26px); margin: 44px 0 12px; scroll-margin-top: 84px; }
.guide-body p, .guide-body li { color: #22304f; }
.guide-body .shot { margin: 20px 0 8px; }

.points { background: #fff; border: 1px solid #dbe3f0; border-left: 4px solid var(--accent-strong); border-radius: 10px; padding: 16px 20px; margin-bottom: 8px; }
.points-title { font-weight: 700; margin: 0 0 6px; font-size: 15px; color: #0e7490 !important; }
.points ul { margin: 0; padding-left: 1.2em; }
.points li { margin: 4px 0; }

.toc details { background: #fff; border: 1px solid #dbe3f0; border-radius: 10px; padding: 12px 16px; }
.toc summary { font-weight: 700; font-size: 14px; cursor: pointer; color: var(--light-muted); }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; }
.toc a { display: block; padding: 6px 10px; border-left: 2px solid transparent; font-size: 14px; color: var(--light-muted) !important; text-decoration: none; }
.toc a:hover { color: var(--light-text) !important; }
.toc a.current { border-left-color: var(--accent-strong); color: #0e7490 !important; font-weight: 700; background: #eefbfe; }

.cta { margin: 48px 0 16px; padding: 26px 26px 28px; border-radius: var(--radius); background: var(--navy); color: var(--text); }
.cta p { color: var(--muted) !important; margin: 0 0 16px; }
.cta .cta-title { color: var(--text) !important; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.guides-body .cta .button.primary { color: var(--navy); }

.next { padding-top: 16px; padding-bottom: 56px; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .guide-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 44px; }
  .toc { position: sticky; top: 84px; align-self: start; }
  .toc details { background: transparent; border: 0; padding: 0; }
  .toc summary { list-style: none; pointer-events: none; margin-bottom: 4px; }
  .toc summary::-webkit-details-marker { display: none; }
}

/* 詳しい人向けのページ: コードと道具の一覧の表 */
.guide-body pre { background: #0b1a40; color: #e6edf7; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.guide-body pre code { color: inherit; background: none; padding: 0; }
.guide-body code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.92em; background: #e8eef7; color: #0b1a40; padding: 1px 5px; border-radius: 4px; }
.tools h2 { margin-top: 48px; }
.tools-wrap { overflow-x: auto; border: 1px solid #dbe3f0; border-radius: 10px; background: #fff; }
.tools-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tools-table th, .tools-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #eef2f8; vertical-align: top; }
.tools-table th { background: #f4f7fb; color: var(--light-muted); font-weight: 700; white-space: nowrap; }
.tools-table tr:last-child td { border-bottom: 0; }
.tools-table td:first-child { white-space: nowrap; }
.tool-kind { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tool-kind.ro { background: #e6f6ec; color: #1d6b3a; }
.tool-kind.ch { background: #eef2f8; color: var(--light-muted); }
.tool-kind.undo { background: #fdecea; color: #9b2c1f; }

/* ---- 日本語の組版（使い方のページだけ。トップは持ち主の判断でそのまま）。2026-11-20 持ち主「改行や行間も美しさにつながる」 ----
   どれも対応していないブラウザでは今までの見た目のまま */
/* 日本語と英数字の間を、表示のときだけわずかに空ける（文は空白なしのまま。Word の表示と同じ考え方） */
html:lang(ja) .guides-body main { text-autospace: ideograph-alpha ideograph-numeric; }
/* 本文: 1 行は 40 字程度まで（日本語は 1 行が長いと読みにくい）。行間は少し広く、字間はわずかに広げる */
html:lang(ja) .guide-body { max-width: 40em; line-height: 1.95; letter-spacing: 0.02em; }
html:lang(ja) .guide-body p { margin: 0 0 1.1em; }
/* 段落の最後の行が「す。」の 1〜2 字だけにならないように */
.guide-body p, .guide-body li, .card-desc, .guides-hero .lead, .guide-hero .lead { text-wrap: pretty; }
/* 見出し・カードの題・要点・目次は文節で折り返す（「ファイ／ル」のような切れ方を防ぐ）。約物（、。「」）を詰めて引き締める */
html:lang(ja) .guide-body h2, html:lang(ja) .card-title, html:lang(ja) .guide-title, html:lang(ja) .points li, html:lang(ja) .toc a {
  word-break: auto-phrase; font-feature-settings: "palt"; letter-spacing: 0.03em;
}
html:lang(ja) .guide-body h2 { line-height: 1.5; }
html:lang(ja) .card-title { line-height: 1.55; }
html:lang(ja) .guide-hero .lead, html:lang(ja) .guides-hero .lead { line-height: 1.9; max-width: 40em; }   /* 文ごとに改行するので、1 文が 1 行に収まりやすい幅（「もう／一度」のような折り返しを減らす） */
/* 見出しの下の説明（リード文）・カードの説明も短い文なので文節で折り返す（「まとめ／る。」のような切れ方を防ぐ）。
   本文の段落は日本語の組版の基本どおり文字の単位で折り返す（文節にすると右端が大きくでこぼこになる） */
html:lang(ja) .guide-hero .lead, html:lang(ja) .guides-hero .lead, html:lang(ja) .card-desc { word-break: auto-phrase; }
