/* ==========================================================================
   案D ― 販促バナー準拠（パステルのオーロラ背景／白帯に濃赤の極太ゴシック）
   EditStation の販促画像のテイストをそのまま画面に移したもの。
   主役は3つだけ:
     1. 淡い虹色グラデーションの地
     2. 見出しを「白い帯」に載せ、文字を濃赤の極太ゴシックで抜く（行ごとに帯が割れる）
     3. Before=青 / After=朱 のベタ塗り角丸バッジと、細い赤の指示線
   枠線は黒ではなく極細のグレー。影はぼかした淡いもの（C2の硬いオフセット影は使わない）。
   手順本文は白いカードの上に黒で静かに置く。
   ========================================================================== */

/* --------------------------------------------------------------------------
   Zen Kaku Gothic New（SIL Open Font License 1.1）
   Copyright 2022 The Zen Kaku Gothic Project Authors

   ★自分のサーバーから配る。外部CDNは使わない（表示が遅くなる／落ちる要因になる）。
   ★配るのは見出し用の 900 だけ。本文は端末のフォント（游ゴシック / ヒラギノ）に任せる。
     本文の読みやすさは端末側の方が上で、読み込み待ちの差し替えも起きなくなる。
   ★原稿で使う文字だけに切り詰めてある（npm run build:fonts で再生成）。
     原稿に新しい漢字が増えたら作り直すこと。忘れると、その字だけ別のフォントで出る
     （豆腐にはならないので画面では気づけない。npm run check:glyphs で見る）。
   ★local() は書かない。同じ書体が Adobe Fonts でも配られているが、
     そちらは字形が違うことがあり、見え方が端末で割れる。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Zen Kaku Gothic New";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/zenkaku-900.woff2") format("woff2");
}

:root {
  /* 地 ― 淡い虹色 */
  --bg-base: #fbf4f9;
  --bg-pink: rgba(255, 176, 214, 0.8);
  --bg-lilac: rgba(196, 184, 250, 0.72);
  --bg-mint: rgba(168, 226, 242, 0.72);
  --bg-cream: rgba(255, 234, 196, 0.62);

  --plate: #ffffff;
  --plate-soft: #f6f4fa;

  --ink: #1a1a20;
  --ink-soft: #60606e;
  --line: rgba(26, 26, 32, 0.12);
  --line-soft: rgba(26, 26, 32, 0.07);

  /* 販促画像の3色 */
  --crimson: #b3121f;   /* 見出しの濃赤 */
  --blue: #4b7fc4;      /* Before バッジ */
  --coral: #ec7256;     /* After バッジ */
  --danger: #c0362a;

  --shadow-s: 0 2px 6px rgba(60, 40, 80, 0.09);
  --shadow-m: 0 6px 18px rgba(60, 40, 80, 0.12);
  --shadow-l: 0 12px 32px rgba(60, 40, 80, 0.16);

  --radius: 14px;
  --radius-s: 8px;

  /* ★フォント
     本文 = 端末のフォント。見出し = 自前配信の Zen Kaku Gothic New 900。
     太さは書体が持っているウェイトで出す。縁取りで太らせると漢字の内側が
     埋まって潰れるため使わない。--font-head の後ろは配信が届かなかったときの保険。 */
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Yu Gothic", "YuGothic", "Meiryo", "Segoe UI", sans-serif;
  --font-head: "Zen Kaku Gothic New", "Hiragino Sans W8",
    "Hiragino Kaku Gothic StdN W8", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Yu Gothic", "YuGothic", "Meiryo", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;

  /* オーロラ ― 四隅から淡い色を差し込む。スクロールしても動かさない */
  background-color: var(--bg-base);
  background-image:
    radial-gradient(60rem 40rem at 8% 0%, var(--bg-pink) 0%, transparent 62%),
    radial-gradient(52rem 38rem at 96% 6%, var(--bg-lilac) 0%, transparent 60%),
    radial-gradient(48rem 40rem at 100% 88%, var(--bg-mint) 0%, transparent 58%),
    radial-gradient(44rem 34rem at 0% 96%, var(--bg-cream) 0%, transparent 58%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

::selection { background: var(--crimson); color: #ffffff; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: 0.01em;
}

/* ★縁取り（-webkit-text-stroke）で太らせる手は使わない。
   漢字の内側の隙間まで埋まって「潰れて」見えるため（2026-08-13 実機で確認）。
   太さは --font-head の書体が持っているウェイトで出す。 */

p { margin: 0 0 1rem; }

a {
  color: var(--crimson);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(179, 18, 31, 0.4);
}
a:hover {
  text-decoration-color: var(--crimson);
  text-decoration-thickness: 2.5px;
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* ==========================================================================
   ★白帯に濃赤 ― この案の核
   display:inline ＋ box-decoration-break:clone で「行ごとに帯が割れる」。
   販促画像の「動画は、／デザインで差がつく。」と同じ割れ方になる。
   inline なので上下 margin が効かない。前後の間隔は隣接セレクタで作る。
   ========================================================================== */

/* ★行の割れ方を揃える。
   帯は行ごとに割れるので、最後の行が1文字だけ残ると「ぶら下がった箱」になって目立つ。
   h1 は display:inline ＝ 匿名ブロックの中にいるため、balance は親側に指定して継承させる。
   （対応していないブラウザでは、これまでどおり普通に折り返すだけ） */
.triage,
.product-page,
.contact-page { text-wrap: balance; }
.triage > *:not(h1),
.product-page > *:not(h1),
.contact-page > *:not(h1) { text-wrap: wrap; }

.triage > h1,
.product-page > h1,
.contact-page > h1 {
  display: inline;
  margin: 0;
  padding: 0.1em 0.36em 0.16em;
  background: var(--plate);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: var(--shadow-m);
  color: var(--crimson);
  font-size: clamp(1.75rem, 6vw, 2.9rem);
  line-height: 1.9;   /* 帯どうしが重ならない高さ */
  letter-spacing: -0.025em;
}

/* トップの見出しだけ、行ごとに帯を分ける（2行目を右へずらすため）。
   h1 本体の帯を外し、各行の span が帯を持つ。 */
.triage > h1.triage-title {
  display: block;
  padding: 0;
  background: none;
  box-shadow: none;
}

.triage > h1.triage-title > span {
  display: inline;
  padding: 0.1em 0.36em 0.16em;
  background: var(--plate);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: var(--shadow-m);
}

.triage > h1.triage-title > span.is-indent {
  margin-left: clamp(2.6rem, 14vw, 7rem);
}

/* inline 見出しの直後に間隔を作る */
.triage > h1 + .lead { margin-top: 1.9rem; }
.product-page > h1 + .product-meta { margin-top: 1.7rem; }
/* 問い合わせページの導入文。最初に読ませる一文なので、本文より大きく太く。
   配信フォント（900のみ）は使わない。ここは端末のゴシックの太字で足りる。 */
.contact-page > h1 + p {
  margin-top: 1.9rem;
  font-size: clamp(1.06rem, 2.5vw, 1.32rem);
  font-weight: 700;
  line-height: 1.85;
}

/* ==========================================================================
   ヘッダ / フッタ
   ========================================================================== */

/* 販促画像は淡い虹色が天地いっぱいまで届く。ヘッダは白い帯を敷かず、地を透かす。
   ただし素通しだと、スクロールした本文がロゴの裏を通って濁る。
   下へ向かって消える白のグラデーションを敷いて、文字だけ読めるようにする。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 700;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.62) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  backdrop-filter: saturate(1.2) blur(7px);
  -webkit-backdrop-filter: saturate(1.2) blur(7px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-logo::after {
  content: "";
  width: 0.52em;
  height: 0.52em;
  margin-left: 0.55em;
  border-radius: 3px;
  background: var(--crimson);
}
.site-logo:hover { color: var(--crimson); }

.site-footer {
  margin-top: 4rem;
  padding: 1.6rem 1.5rem 6rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.site-footer p { max-width: 46rem; margin: 0 auto; }

.site-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

/* ==========================================================================
   切り分け（トップ）
   ========================================================================== */

/* 販促画像のサブコピー ― 黒の極太ゴシックで、見出しの次に強い */
.lead {
  margin: 0 0 0.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.02rem, 2.6vw, 1.22rem);
  font-weight: 900;
  line-height: 1.75;
  letter-spacing: -0.01em;
}
/* 販促画像の「黄色マーカー」ではなく、朱のアンダーラインで強める */
.lead strong {
  font-weight: 900;
  background: linear-gradient(transparent 62%, rgba(236, 114, 86, 0.42) 62%);
  padding: 0 0.1em;
}

.triage-step { margin-top: 3.5rem; }

/* 小見出しは黒の極太ゴシック＋短い朱の下線（販促画像のサブコピー準拠） */
.triage-step h2,
.triage-result h2 {
  position: relative;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  color: var(--ink);
}
.triage-step h2::after,
.triage-result h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.6rem;
  height: 4px;
  border-radius: 2px;
  background: var(--coral);
}

/* 選択肢 = 白い角丸カード。浮かせる（黒枠と硬い影は使わない） */
.triage-choices {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.triage-choice {
  position: relative;
  margin: 0;
  padding: 1.15rem 3rem 1.15rem 1.35rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-s);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

/* 販促画像の ▶▶▶ を「進む」の合図として置く */
.triage-choice::after {
  content: "\25B6";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--coral);
  transition: transform 0.16s ease;
}
.triage-choice:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
  border-color: rgba(236, 114, 86, 0.5);
}
.triage-choice:hover::after { transform: translate(3px, -50%); }
.triage-choice:active { transform: translateY(0); box-shadow: var(--shadow-s); }

.triage-choice-label {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 900;
}
.triage-choice-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.triage-choice.is-selected {
  border-color: var(--coral);
  background: #fff4f1;
  box-shadow: 0 0 0 3px rgba(236, 114, 86, 0.2), var(--shadow-m);
}
.triage-choice.is-selected .triage-choice-label { color: #a8371f; }

/* 製品一覧 = 白いカードの積み重ね */
.triage-result { margin-top: 3.5rem; }

.product-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-s);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }

.product-card > a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 1rem;
  padding: 0.95rem 1.2rem;
  color: inherit;
  text-decoration: none;
}

.product-card-name {
  font-family: var(--font-head);
  font-size: 1.03rem;
  font-weight: 900;
}
.product-card > a:hover .product-card-name { color: var(--crimson); }

.product-card-host {
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* Before=青 / After=朱 のベタ塗りバッジ。有料=朱・無料=青で対応づける */
.product-card-tier {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 0.22em 0.8em;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.product-card[data-tier="paid"] .product-card-tier { background: var(--coral); }

/* ==========================================================================
   製品ページ
   ========================================================================== */

.breadcrumb {
  margin: 0 0 1.4rem;
  font-size: 0.8rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.2rem;
}

.badge {
  display: inline-block;
  padding: 0.28em 0.85em;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.badge-tier { background: var(--coral); }
.badge-version {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 700;
}

.product-summary {
  margin: 0 0 0.5rem;
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  border-left: 6px solid var(--coral);
  box-shadow: var(--shadow-s);
  font-size: 1rem;
  font-weight: 500;
}

/* 目次 = 白いカード。番号は濃赤の極太 */
.doc-toc {
  margin: 2.5rem 0 0;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-s);
}

.doc-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.doc-toc li {
  counter-increment: toc;
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid var(--line-soft);
}
.doc-toc li:last-child { border-bottom: 0; }

.doc-toc li::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  margin-right: 1rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--crimson);
}

.doc-toc a {
  flex: 1;
  padding: 0.7rem 0.1rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.97rem;
  color: var(--ink);
  text-decoration: none;
}
.doc-toc a:hover { color: var(--crimson); }

/* ==========================================================================
   章 ― 見出しは白帯（h1 より控えめ）、本文は白いカードの上
   ========================================================================== */

.doc-section { margin-top: 3.25rem; }

/* ★章タイトル（build が section の先頭に置く h2）だけを白帯にする。
   原稿中の ## も同じ h2 なので、区別しないと「章の切れ目」が読み取れなくなる。 */
.doc-section > h2:first-child {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.16em 0.55em 0.22em;
  border-radius: 4px;
  background: var(--plate);
  box-shadow: var(--shadow-m);
  color: var(--crimson);
  font-size: clamp(1.3rem, 4.2vw, 1.7rem);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

/* 原稿中の ## ― 黒の極太＋朱の下線。章タイトルとぶつからない強さにする */
.doc-section h2 {
  position: relative;
  margin: 2.6rem 0 1rem;
  padding-bottom: 0.5rem;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.doc-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(
    to right,
    var(--coral) 0,
    var(--coral) 2.4rem,
    var(--line-soft) 2.4rem,
    var(--line-soft) 100%
  );
}
.doc-section > h2:first-child::after { content: none; }

/* 小見出しは黒の極太＋朱の縦棒（販促画像の注釈ラベル準拠） */
.doc-section h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 2.25rem 0 0.7rem;
  font-size: 1.05rem;
  color: var(--ink);
}
.doc-section h3::before {
  content: "";
  flex: none;
  width: 5px;
  height: 1.05em;
  border-radius: 3px;
  background: var(--coral);
}

/* 手順 = 朱の角丸バッジに白抜き数字（After バッジと同じ見え方） */
.doc-section ol {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  counter-reset: step;
}

.doc-section ol > li {
  counter-increment: step;
  position: relative;
  margin: 0 0 0.85rem;
  padding-left: 2.9rem;
  min-height: 1.9rem;
}

.doc-section ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.28em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  background: var(--coral);
  box-shadow: var(--shadow-s);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.95rem;
  color: #ffffff;
}

/* 入れ子の手順は青にして、親と混ざらないようにする */
.doc-section ol ol > li::before { background: var(--blue); }

.doc-section ul {
  margin: 1rem 0;
  padding-left: 1.3rem;
}
.doc-section ul li::marker { color: var(--coral); }

/* 表 = 白いカード。見出し行は淡い藤色 */
.doc-section table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--plate);
  box-shadow: var(--shadow-s);
  font-size: 0.89rem;
}

.doc-section th {
  padding: 0.7rem 0.9rem;
  background: #efeafb;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.doc-section td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.doc-section tbody tr:last-child td { border-bottom: 0; }
.doc-section tbody tr:hover td { background: #fbf9ff; }

/* 表は横に溢れさせない（スマホ幅で本文まで横スクロールさせないため） */
.doc-section > table { display: block; overflow-x: auto; }

.doc-section pre {
  margin: 1.25rem 0;
  padding: 1rem 1.2rem;
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-s);
  background: #221f2b;
  color: #f2eef8;
  font-family: "Consolas", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
}

.doc-section :not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 4px;
  background: rgba(179, 18, 31, 0.08);
  color: var(--crimson);
  font-family: "Consolas", monospace;
  font-size: 0.88em;
}

/* 注意書き = 細い赤の指示線つきカード（販促画像の注釈の引き出し線） */
.doc-section blockquote {
  position: relative;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem 1rem 1.5rem;
  border: 1px solid rgba(179, 18, 31, 0.28);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-s);
  font-size: 0.95rem;
}
.doc-section blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--crimson);
}
.doc-section blockquote p:last-child { margin: 0; }

/* ==========================================================================
   問い合わせフォーム
   困って焦っている人が書く画面。装飾より「あと何を書けばよいか」が
   一目で分かることを優先する。
   ========================================================================== */

/* 問い合わせページでは、フッタの「お問い合わせへ」は出さない（自分自身への導線） */
body[data-page="contact"] .site-footer { display: none; }

/* ★エージェントのボタンも出さない。
   画面の右下に居座るため、下に貼りつく送信ボタンと重なって押せなくなる。
   このページに来た人は「人に聞く」と決めた人なので、案内役はもう要らない。 */
body[data-page="contact"] #agent-root { display: none; }

.cform { margin: 2.5rem 0 0; }

.cform-block {
  margin: 0 0 1.5rem;
  padding: 1.4rem 1.5rem 1.6rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-s);
}

.cform-h {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.4rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink);
}

/* 章番号は手順の連番と同じ見え方にそろえる */
.cform-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 7px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.9rem;
}

.cform-note {
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.cform-row { margin: 0 0 1.15rem; }
.cform-row:last-child { margin-bottom: 0; }

.cform-label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.94rem;
}

.cform-req,
.cform-opt {
  display: inline-block;
  margin-left: 0.35em;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  vertical-align: 0.1em;
}
.cform-req { background: var(--crimson); color: #ffffff; }
.cform-opt { background: var(--plate-soft); color: var(--ink-soft); }

.cform-input {
  display: block;
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--plate);
  color: var(--ink);
  font: inherit;
  font-size: 0.97rem;
  line-height: 1.6;
}
textarea.cform-input { resize: vertical; min-height: 3rem; }

.cform-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(236, 114, 86, 0.22);
}

.cform-hint {
  margin: 0.35rem 0 0;
  font-size: 0.79rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Windows / Mac の2択 */
.cform-choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--plate);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.cform-chip:hover { border-color: var(--coral); }
.cform-chip:has(input:checked) {
  border-color: var(--coral);
  background: #fff4f1;
  box-shadow: 0 0 0 2px rgba(236, 114, 86, 0.2);
}

/* ---- 添付 ---- */

.cform-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.8rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--plate-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.cform-drop:hover,
.cform-drop:focus-visible,
.cform-drop.is-over {
  border-color: var(--coral);
  background: #fff4f1;
}

.cform-drop-main { font-family: var(--font-head); font-weight: 900; font-size: 1rem; }
.cform-drop-sub { font-size: 0.85rem; color: var(--ink-soft); }
.cform-drop-limit { margin-top: 0.4rem; font-size: 0.75rem; color: var(--ink-soft); }

.cform-files { list-style: none; margin: 0.9rem 0 0; padding: 0; }

.cform-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.cform-file-thumb {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-s);
  object-fit: cover;
  background: var(--plate-soft);
}
.cform-file-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
}

.cform-file-meta { flex: 1; min-width: 0; }
.cform-file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}
.cform-file-size { display: block; font-size: 0.76rem; color: var(--ink-soft); }

.cform-file-del {
  flex: none;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--plate);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.cform-file-del:hover { border-color: var(--danger); color: var(--danger); }

.cform-file-total {
  padding-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: right;
}

/* ---- 送信 ---- */

.cform-foot {
  position: sticky;
  bottom: 0;
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-m);
  text-align: center;
}

/* ★あと何を書けばよいかを、送信ボタンのすぐ上に出す。
   押せない理由が離れた場所にあると「ボタンが壊れている」と思われて、
   そのまま閉じられてしまう。 */
.cform-remain {
  margin: 0 0 0.7rem;
  font-size: 0.84rem;
  line-height: 1.7;
}
.cform-remain.is-waiting { color: var(--crimson); font-weight: 700; }
.cform-remain.is-ready { color: var(--ink-soft); }

.cform-send {
  width: 100%;
  max-width: 22rem;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--coral);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.02rem;
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.cform-send:hover:not(:disabled) { background: #d95c40; }
.cform-send:disabled {
  background: var(--plate-soft);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.cform-progress { margin-top: 0.9rem; }
.cform-progress-track {
  height: 8px;
  border-radius: 4px;
  background: var(--plate-soft);
  overflow: hidden;
}
.cform-progress-fill {
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 0.2s ease;
}
.cform-progress-text { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--ink-soft); }

.cform-error {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(179, 18, 31, 0.3);
  border-radius: var(--radius-s);
  background: #fdf1f1;
  color: var(--danger);
  font-size: 0.85rem;
  line-height: 1.75;
  text-align: left;
}

/* ---- 送信後 ---- */

.cform-done {
  margin: 2.5rem 0 0;
  padding: 1.75rem;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--coral);
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-m);
}
.cform-done h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--crimson);
}
.cform-ticket {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-s);
  background: var(--plate-soft);
  font-size: 0.95rem;
}
.cform-ticket strong {
  font-family: "Consolas", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.cform-done-warn {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(179, 18, 31, 0.3);
  border-radius: var(--radius-s);
  background: #fdf1f1;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.8;
}

@media (max-width: 560px) {
  .cform-block { padding: 1.1rem 1rem 1.2rem; }
  .cform-foot { padding: 0.9rem 1rem; }
  .cform-send { max-width: none; }
}

/* ==========================================================================
   案内エージェント
   ========================================================================== */

#agent-root {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 800;
  width: min(24rem, calc(100vw - 2rem));
  font-size: 0.9rem;
}

.agent-toggle {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--coral);
  box-shadow: var(--shadow-l);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.agent-toggle:hover { background: #d95c40; }

.agent-panel {
  border: 1px solid var(--line-soft);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: var(--plate);
  box-shadow: var(--shadow-l);
}
.agent-panel[hidden] { display: none; }

.agent-log {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 15rem;
  overflow-y: auto;
  padding: 1rem;
}

.agent-msg {
  max-width: 88%;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-size: 0.87rem;
  line-height: 1.75;
}
.agent-msg p { margin: 0; }

.agent-msg-bot { align-self: flex-start; background: var(--plate-soft); }
.agent-msg-user { align-self: flex-end; background: var(--blue); color: #ffffff; }
.agent-msg-pending { align-self: flex-start; background: var(--plate-soft); opacity: 0.55; }
.agent-msg-error {
  align-self: flex-start;
  background: #fdf0ee;
  color: var(--danger);
}

.agent-section {
  margin-top: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-s);
  background: var(--plate-soft);
}

.agent-section-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--crimson);
}

.agent-section ol { margin: 0.4rem 0; padding-left: 1.4rem; }
.agent-section-link { margin: 0.4rem 0 0; font-size: 0.82rem; }

.agent-form {
  display: flex;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line-soft);
}

.agent-form textarea {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--plate);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.agent-form button {
  padding: 0 1.15rem;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--crimson);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 900;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.agent-form button:hover { background: #8f0e18; }

.agent-note {
  margin: 0;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ==========================================================================
   ユーティリティ
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   モバイル
   ========================================================================== */

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .site-main { padding: 2.5rem 1rem 3rem; }
  .triage-step,
  .triage-result { margin-top: 2.75rem; }
  .doc-section { margin-top: 2.5rem; }
  .doc-toc { padding: 0.25rem 1rem; }
  .triage-choice { padding: 1rem 2.6rem 1rem 1.1rem; }
  #agent-root { right: 0.75rem; bottom: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ==========================================================================
   ダークモード
   淡い虹色は暗い紫紺に置き換える。白帯は「生成り色の帯」にして、
   帯に濃赤で抜く関係だけは崩さない。
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #16131d;
    --bg-pink: rgba(120, 45, 90, 0.34);
    --bg-lilac: rgba(70, 60, 140, 0.32);
    --bg-mint: rgba(40, 90, 110, 0.3);
    --bg-cream: rgba(110, 80, 40, 0.24);

    --plate: #211d2b;
    --plate-soft: #2a2537;

    --ink: #f1edf7;
    --ink-soft: #a49db4;
    --line: rgba(241, 237, 247, 0.18);
    --line-soft: rgba(241, 237, 247, 0.1);

    --crimson: #ff7f74;
    --coral: #f0876c;
    --blue: #7aa6e0;

    --shadow-s: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-m: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-l: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  /* 帯は暗い面のままだと沈むので、明るい生成りにして濃赤で抜く */
  .triage > h1,
  .product-page > h1,
  .doc-section h2 {
    background: #f5f0e9;
    color: #a8121f;
  }

  .site-header {
    background: linear-gradient(
      to bottom,
      rgba(22, 19, 29, 0.88) 0%,
      rgba(22, 19, 29, 0.66) 55%,
      rgba(22, 19, 29, 0) 100%
    );
  }
  .doc-section th { background: #322b45; }
  .doc-section tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }
  .doc-section pre { background: #100e16; }
  .doc-section :not(pre) > code { background: rgba(255, 127, 116, 0.14); }
  .doc-section blockquote { border-color: rgba(255, 127, 116, 0.34); }
  .triage-choice.is-selected { background: #33222a; }
  .triage-choice.is-selected .triage-choice-label { color: #ffb0a2; }
  .agent-toggle { color: #1a1a20; }
  .agent-toggle:hover { background: #ff9d85; }
  .agent-msg-user { color: #12101a; }
  .agent-msg-error { background: #33222a; }
  .agent-form button { color: #1a1a20; }
  .agent-form button:hover { background: #ff9d85; }
  .lead strong { background: linear-gradient(transparent 62%, rgba(240, 135, 108, 0.34) 62%); }
}
