/* TL-NET お問い合わせ。外のフォント・画像・スクリプトは使わない（CSP は default-src 'none'・style-src 'self'）
   見た目は再デザインの第 2 版（2026-11-26 オーナー「採用して頼む」・HQ-20261126-03）。色・字・余白・部品の値は、
   Claude Design の第 2 版（TLForm）から読み取った。文と動き（:has の出し分け・JS の部品）は前のまま。
   ヘッダーだけは TL-NET（insurance-agency の src/Presentation/View/Layout.php の .site-header と .brand）と同じ形のまま */
:root {
  color-scheme: light;
  /* 色 */
  --ink: #102a43;          /* 文字・題・濃い帯 */
  --ink-sub: #334e68;      /* 説明の文・選択肢と入力欄の枠 */
  --line-soft: #627d98;    /* 破線・区切りの線 */
  --line-faint: #9fb3c8;   /* 表の行の線 */
  --accent: #1f3a8a;       /* リンク・主のボタン・選んだ印 */
  --accent-bg: #eef2fb;    /* 選んだ選択肢の地 */
  --surface: #f0f4f8;      /* 灰色の箱 */
  --danger: #b42318;       /* 至急・エラーの枠・送れない知らせの帯 */
  --danger-ink: #8a1c12;   /* エラーの文・お客さまの情報の注意 */
  --danger-bg: #fef3f2;
  --warn: #9a6700;         /* 期限の前の知らせ・送り直せば済む知らせ */
  --warn-ink: #5c3d00;
  --warn-bg: #fff8e6;
  --white: #ffffff;
  /* 字。説明の文も 16px（13px は札だけ） */
  --ff-base: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --fs-tag: 13px;
  --fs-title: clamp(24px, calc(18px + 1vw), 30px);
  --fs-question: clamp(18px, calc(16px + 0.4vw), 20px);
  /* 形・押す所・幅（フォームは 1280 でも 1 列・幅 720） */
  --radius: 6px;
  --frame: 2px;
  --tap: 52px;
  --tap-small: 44px;
  --tap-main: 56px;
  --gutter: clamp(16px, 4vw, 32px);
  --width: 720px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--ff-base);
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 頭（TL-NET の .site-header と .brand と同じ形。左右の端は本文にそろえる） */
.site-header {
  background: var(--white);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.43);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.site-header-inner {
  max-width: var(--width);
  margin: 0 auto;
  height: 50px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; display: block; border-radius: 7px; box-shadow: 0 1px 2px rgba(31, 91, 158, 0.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title { font-size: 14px; font-weight: 700; color: #102a43; letter-spacing: -0.2px; }
.brand-sub { font-size: 11px; color: #6b6b67; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 本体 */
.page { max-width: var(--width); margin: 0 auto; padding: 20px var(--gutter) 48px; }
/* 改行（ヘルプのページと同じ）: 文節で折り、見出しは行の長さをそろえ、文は 1〜3 字だけの行を作らない。製品の名前は切らない */
.page { word-break: auto-phrase; }
h1, h2, legend, .alert-title, .sendbox-title, .kind-note-title, .caution-title, .manual-first-title { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.nw { white-space: nowrap; }
h1 { margin: 0 0 12px; font-size: var(--fs-title); font-weight: 700; color: var(--ink); line-height: 1.4; }
h2 { margin: 28px 0 10px; font-size: var(--fs-question); font-weight: 700; color: var(--ink); line-height: 1.45; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
/* 題の下の 1 行（返事の目安。A1） */
.lead { margin: 0 0 12px; }
/* 付け足しで開いたとき、題の下の濃い帯（第 2 版。文は今の 1 行のまま） */
.follow-up-lead { margin: 0 0 12px; padding: 8px 14px; background: var(--ink); color: var(--white); border-radius: var(--radius); font-weight: 700; }
.follow-up-lead strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 画面の言葉（ボタン・メニュー）の印（ヘルプのページの .ui と同じ） */
.ui {
  display: inline-block;
  background: var(--surface);
  border-radius: 4px;
  padding: 0 4px;
  margin: 0 2px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
/* 中身のまとまり（第 2 版は面を重ねない。地は白のまま） */
.card { margin: 0 0 16px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* 小さな知らせ（アカウントの申し込みの中の注意） */
.notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--warn-bg);
  border: var(--frame) solid var(--warn);
  border-radius: var(--radius);
  color: var(--warn-ink);
  font-weight: 700;
}
/* 情報が漏れたで受け付けたとき、まずしてほしいこと（送ったあとの赤い帯） */
.notice.notice-incident { padding: 8px 14px; background: var(--danger); border-color: var(--danger); color: var(--white); font-size: 18px; }

/* 送れない状態の知らせ（A6）。題を色の帯にした箱。送れない（時間切れ・上限・開き直し）は赤、送り直せば済む（届かない・送っているところ）は黄 */
.alert { margin: 0 0 20px; padding: 0 0 12px; background: var(--white); border: var(--frame) solid; border-radius: var(--radius); overflow: hidden; }
.alert-stop { border-color: var(--danger); }
.alert-retry { border-color: var(--warn); }
.alert-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.alert > .alert-title { margin: 0 0 10px; padding: 6px 14px; color: var(--white); }
.alert-stop > .alert-title { background: var(--danger); }
.alert-retry > .alert-title { background: var(--warn); }
.alert > :not(.alert-title) { margin: 0 14px 8px; }
.alert > :last-child { margin-bottom: 0; }
/* コピー用の欄（件名と本文をまとめたもの。A6・A12）。送ったあとの控えも同じ形 */
.copy { margin: 0 0 20px; }
.copy label { display: block; margin: 0 0 6px; font-weight: 700; }
.copy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; }
.copy-status { color: var(--ink-sub); }

/* 手順（丸い番号） */
.steps { counter-reset: step; list-style: none; margin: 8px 0 10px; padding: 0; }
.steps > li { counter-increment: step; position: relative; margin: 8px 0; padding-left: 36px; line-height: 1.6; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  text-align: center;
  line-height: 26px;
  font-size: 16px;
  font-weight: 700;
}
/* 案内のページの手順は、番号の列のある表の形（第 2 版） */
.card > .steps { margin: 0 0 20px; border: var(--frame) solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.card > .steps > li { margin: 0; min-height: var(--tap); padding: 12px 14px 12px 62px; font-weight: 600; }
.card > .steps > li + li { border-top: 1px solid var(--line-faint); }
.card > .steps > li::before { top: 0; bottom: 0; width: 48px; height: auto; border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; line-height: 1; }

/* 送る前に、まずマニュアルと FAQ（2026-11-24 オーナー「まずは マニュアルをみよ！って」）。灰色の帯 */
.manual-first {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  margin: 0 0 28px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius);
}
.manual-first-title { margin: 0; font-weight: 400; }
.manual-first ul { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.manual-first li { margin: 0; }
.manual-first li a { display: inline-flex; align-items: center; min-height: var(--tap-small); font-weight: 700; }
.manual-first-note { flex-basis: 100%; margin: 0; color: var(--ink-sub); }

/* エラーの一覧（開いたらここへフォーカス＝A10）。項目は押しやすい行に */
.error-summary {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--danger-bg);
  border: var(--frame) solid var(--danger);
  border-radius: var(--radius);
}
.error-summary:focus { outline: 3px solid var(--danger); outline-offset: 2px; }
.error-summary-title { margin: 0 0 4px; color: var(--danger-ink); font-weight: 700; }
.error-summary ul { margin: 0; padding: 0; list-style: none; }
.error-summary li { margin: 0; }
.error-summary a { display: inline-flex; align-items: center; min-height: var(--tap-small); color: var(--danger-ink); font-weight: 700; }

/* 一緒に送るもの */
.who { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.who dt { color: var(--ink-sub); font-weight: 400; }
.who dd { margin: 0; overflow-wrap: anywhere; }
/* 開いていた案件の添え書き（「一緒に届きます。お客さまの名前は届きません。」） */
.case-note { display: block; color: var(--ink-sub); }

/* 問い（種類・急ぎ）と欄の見出し */
fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
legend, .field > label, .field > span:first-child {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
fieldset.q > legend, form.inquiry > .field > label { margin: 0 0 10px; font-size: var(--fs-question); line-height: 1.45; }
/* 見出しの札: 「必須」と「任意」（2026-11-26 HQ-20261126-07）。第 2 版の形（枠だけ・13px）。色だけ変える。
   必須は赤にしない（エラーの赤・至急の札と見分ける） */
.opt, .req { display: inline-block; margin-left: 10px; padding: 0 6px; border: 1px solid; border-radius: 4px; color: var(--ink-sub); font-size: var(--fs-tag); font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: 0.15em; }
.req { color: var(--accent); }
/* 補足（見出しと欄のあいだ） */
.hint { margin: -2px 0 8px; color: var(--ink-sub); }
.hint p { margin: 0 0 4px; }
.hint ul { margin: 0 0 6px; padding-left: 1.3em; }
.hint li { margin: 1px 0; }
.hint > :last-child { margin-bottom: 0; }

/* 選択肢（第 2 版）。名前＋説明の箱を 1 列に。急ぎは広ければ 2 列 */
.choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* 急ぎは 3 択。1 列か 3 列で並べ、「ふつう」がいつも真ん中に来るようにする（2 つと 1 つに割らない。
   2026-11-30 オーナー「３拓にできませんかね、そしたら真ん中が選ばれやすい」・HQ-20261130-19） */
.choices.urgency { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .choices.urgency { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--tap);
  margin: 0;
  padding: 10px 12px;
  background: var(--white);
  border: var(--frame) solid var(--ink-sub);
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.6;
}
.choice:hover { background: var(--surface); }
.choice:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); }
.choice input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); cursor: inherit; }
/* 選択肢の名前と説明。急ぎは 2 行、種類は 1 行に続けて書く */
.choice-text { display: flex; flex-direction: column; min-width: 0; }
.choice-name { font-weight: 700; }
.choice-hint { color: var(--ink-sub); font-weight: 400; }
.kinds .choice-text { display: block; }
.kinds .choice-hint { margin-left: 0.75em; }
/* 至急の種類（情報が漏れた・誤って送った）は赤い枠と赤い名前（選ぶと、ほかと同じ選んだ印） */
.choice.choice-urgent { border-color: var(--danger); }
.choice-urgent .choice-name { color: var(--danger); }
/* 種類の印（管理者だけ・至急） */
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 4px; background: var(--ink); color: var(--white); font-size: var(--fs-tag); font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: 0.1em; }
.tag.tag-urgent { background: var(--danger); }
/* :has の規則は分けて書く（:has が無いブラウザは、:has を含む規則を丸ごと捨てるため） */
.choice:has(input:disabled) { cursor: not-allowed; }
/* 選べない種類（管理者だけ）は破線の箱 */
.choice.is-disabled { cursor: not-allowed; border-style: dashed; border-color: var(--line-soft); background: var(--surface); color: var(--ink-sub); }
.choice.is-disabled:hover { background: var(--surface); }
.choice.is-disabled:has(input:checked) { background: var(--surface); border-color: var(--line-soft); }
.choice.is-disabled .choice-name { font-weight: 400; }
/* 種類と急ぎのエラー: 選択肢の箱も赤い枠に（入力欄の赤い枠と同じ見つけやすさ。選べない種類の破線はそのまま。#34 のレビュー役） */
fieldset.q.has-error .choice:not(.is-disabled) { border-color: var(--danger); }
/* フォーカスは選択肢の箱ごとに輪（22px のラジオだけでは見つけにくい）。:has が無いブラウザでは、ラジオの輪のまま */
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
@supports selector(:has(a)) {
  .choice input:focus-visible { outline: none; }
}

/* 種類を選んだときの案内（A5・B19）。選んだ種類のものだけを出す。:has が使えないブラウザでは全部を出す（JS を使わない） */
.kind-note { margin: -14px 0 28px; padding: 10px 14px; background: var(--white); border: var(--frame) solid var(--accent); border-radius: var(--radius); }
.kind-note p { margin: 0 0 6px; }
.kind-note-lead { font-weight: 700; }
.kind-note-name { color: var(--ink-sub); font-weight: 700; }
.kind-note-title { font-weight: 700; }
.kind-note ul { margin: 0; padding: 0; list-style: none; }
.kind-note li { margin: 0; }
.kind-note li a { display: inline-flex; align-items: center; min-height: var(--tap-small); font-weight: 600; }
.kind-note > :last-child { margin-bottom: 0; }
@supports selector(:has(a)) {
  .kind-note { display: none; }
  /* 選んだ種類のものだけが出るので、種類の名前は要らない */
  .kind-note-name { display: none; }
  form.inquiry:has(input[name="kind"][value="usage"]:checked) .kind-note-usage,
  form.inquiry:has(input[name="kind"][value="trouble"]:checked) .kind-note-trouble,
  form.inquiry:has(input[name="kind"][value="login"]:checked) .kind-note-login,
  form.inquiry:has(input[name="kind"][value="data_fix"]:checked) .kind-note-data_fix,
  form.inquiry:has(input[name="kind"][value="incident"]:checked) .kind-note-incident { display: block; }
}

/* 本文の書き方の手引き（B14）。:has が使えないブラウザでは、いつもの 1 つだけ */
.write-guide { display: none; }
.write-guide.write-guide-general, .write-guide.write-guide-followup { display: block; }
/* 案件が付いているとき、本文の案内の頭の 1 行（仕上げの点検の 1） */
.hint-case { color: var(--ink); font-weight: 700; }
@supports selector(:has(a)) {
  form.inquiry:has(input[name="kind"][value="usage"]:checked) .write-guide-usage,
  form.inquiry:has(input[name="kind"][value="trouble"]:checked) .write-guide-trouble,
  form.inquiry:has(input[name="kind"][value="request"]:checked) .write-guide-request,
  form.inquiry:has(input[name="kind"][value="data_fix"]:checked) .write-guide-data_fix,
  form.inquiry:has(input[name="kind"][value="login"]:checked) .write-guide-login,
  form.inquiry:has(input[name="kind"][value="incident"]:checked) .write-guide-incident { display: block; }
  form.inquiry:has(input[name="kind"]:is([value="usage"], [value="trouble"], [value="request"], [value="data_fix"], [value="login"], [value="incident"]):checked) .write-guide.write-guide-general { display: none; }
}

/* 時間外・休みに「今日中に困る」を選んだ人への知らせ（C5）。色なしの 1 行。:has があれば今日中を選んだときだけ */
.urgency-note { margin: -14px 0 28px; color: var(--ink); }
.urgency-note strong { white-space: nowrap; }
/* 「今日中に困る」を選んだときだけ出す（:has が無いブラウザでは出さない＝選んでいない人に「先に確かめます」と見せない。
   返事の目安は上の 1 行にある）。種類が「情報が漏れた」のときは出さない（返事の目安が違う。2026-11-26） */
.urgency-note { display: none; }
@supports selector(:has(a)) {
  form.inquiry:has(input[name="urgency"][value="today"]:checked):not(:has(input[name="kind"][value="incident"]:checked)) .urgency-note { display: block; }
}
.kind-note-reply { color: var(--ink); }
/* 題の下の返事の目安: 情報が漏れたを選んだら、この種類の目安に言い換える（:has が無ければ日付のまま。2026-11-26） */
.lead-incident { display: none; }
@supports selector(:has(a)) {
  main:has(input[name="kind"][value="incident"]:checked) .lead-date { display: none; }
  main:has(input[name="kind"][value="incident"]:checked) .lead-incident { display: inline; }
}
/* 題の下の返事の目安: 急ぎで「急がない」を選んだら、5 営業日の目安に言い換える（情報が漏れたが先。:has が無ければ 3 営業日のまま。2026-11-30 HQ-20261130-19） */
.lead-low { display: none; }
@supports selector(:has(a)) {
  main:has(input[name="urgency"][value="low"]:checked):not(:has(input[name="kind"][value="incident"]:checked)) .lead-date { display: none; }
  main:has(input[name="urgency"][value="low"]:checked):not(:has(input[name="kind"][value="incident"]:checked)) .lead-low { display: inline; }
}
/* お客さまの情報の注意（本文の真上に 1 つ。A1・B15・B18）。第 2 版の赤い枠の箱 */
.caution { margin: 0 0 14px; padding: 10px 14px; background: var(--danger-bg); border: var(--frame) solid var(--danger); border-radius: var(--radius); }
.caution p { margin: 0 0 4px; }
.caution > :last-child { margin-bottom: 0; }
.caution-title { color: var(--danger-ink); font-weight: 700; }
/* 2 文目（v2 の印で開いたときだけ。設計 9-1）。お願いの 1 文目より弱く */
.caution-case { color: var(--ink); }

/* 入力欄（枠 2px・高さ 52px 以上） */
.field { display: block; margin: 0 0 28px; }
input[type="text"], input[type="date"], textarea {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  border: var(--frame) solid var(--ink-sub);
  border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: var(--line-soft); opacity: 1; }
textarea { resize: vertical; min-height: 200px; line-height: 1.7; }
input[readonly], textarea[readonly] { background: var(--surface); border-style: dashed; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.error { display: block; margin: 6px 0 0; color: var(--danger); font-weight: 700; line-height: 1.6; }

/* JS の部品（C6）。字数・書きかけを戻した知らせ・期限の知らせ・読み上げだけの文 */
.counter { margin: 4px 0 0; color: var(--ink-sub); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.draft-restored { margin: 0 0 20px; padding: 10px 14px; background: var(--accent-bg); border: var(--frame) solid var(--accent); border-radius: var(--radius); }
.draft-restored p { margin: 0 0 6px; }
.draft-restored > :last-child { margin-bottom: 0; }
/* 送れる期限の知らせ（送るボタンの近く。スマホは画面の下に留める＝下の @media。仕上げの点検の 9） */
.deadline-alert { margin: 0 0 12px; padding: 10px 14px; background: var(--warn-bg); border: var(--frame) solid var(--warn); border-radius: var(--radius); color: var(--warn-ink); font-weight: 700; }
.deadline-alert.over { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-ink); }
.draft-note { margin: 16px 0 0; }
.draft-note p { margin: 0 0 6px; }
.draft-note > :last-child { margin-bottom: 0; }
/* 開き直しの案内に出す書きかけ（JS が作る） */
.draft-rescue { padding: 12px 14px; border: var(--frame) solid var(--accent); border-radius: var(--radius); }
.draft-rescue label { display: block; margin: 0 0 6px; font-weight: 700; }
.draft-rescue textarea { min-height: 160px; }

/* 前の問い合わせに付け足す（開く形。A3） */
.follow-up { margin: 0 0 28px; padding: 4px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.follow-up > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.follow-up > summary::-webkit-details-marker { display: none; }
.follow-up > summary::before { content: "＋"; display: inline-block; width: 1.2em; text-align: center; }
.follow-up[open] > summary::before { content: "－"; }
.follow-up > .field { margin: 4px 0 12px; }
.follow-up input[type="text"] { max-width: 320px; }

/* この内容で送ります（確認の画面の代わり。A2）。灰色の箱に、送るボタンまで */
.sendbox { margin: 0; padding: 14px; background: var(--surface); border-radius: var(--radius); }
.sendbox-title { margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.sendbox-note { margin: 6px 0 0; color: var(--ink-sub); }
.sendbox-note.sendbox-mail { margin-top: 12px; color: var(--ink); }

/* ボタン。主のボタンは濃い青、2 つ目は白地に枠 */
button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 24px;
  background: var(--accent);
  color: var(--white);
  border: var(--frame) solid var(--accent);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}
/* リンクのボタンは inline-block（flex にすると「TL-NET に戻る」の空白が詰まる） */
.button-link { display: inline-block; padding: 14px 24px; line-height: 1.5; text-align: center; }
button:hover, .button-link:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.button-secondary { min-height: var(--tap-small); padding: 0 16px; background: var(--white); color: var(--ink); border-color: var(--ink-sub); letter-spacing: 0; }
.button-secondary:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-sub); }
/* コピーする（期限切れ・送れなかったとき） */
.copy-actions .button-secondary { min-height: var(--tap); color: var(--accent); border-color: var(--accent); }
/* 送る（いちばん大きく） */
.actions { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }
.actions p { margin: 0; }
.actions button { width: 100%; min-height: var(--tap-main); font-size: 18px; }
/* 送れる時刻（送るボタンのところに 1 つ。A1） */
.deadline { color: var(--ink); }
.deadline strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 受け付けました: 題と受付番号を 1 つの箱に（第 2 版。受付番号を大きく。いつもいちばん上＝A7） */
.done-head { margin: 0 0 22px; border: var(--frame) solid var(--ink); border-radius: var(--radius); overflow: hidden; text-align: center; }
.done-head h1 { margin: 0; padding: 10px 14px; background: var(--ink); color: var(--white); font-size: 22px; line-height: 1.4; }
.receipt { margin: 0; padding: 12px 14px 16px; color: var(--ink-sub); }
.receipt strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: clamp(26px, calc(20px + 1.6vw), 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.receipt-note { display: block; margin-top: 4px; }
/* 付け足し・伏せた・メールを送れなかった・もう送った を見分ける帯（A7） */
.bands { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.band { margin: 0; padding: 8px 14px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.band-warn { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn-ink); font-weight: 700; }
/* これからの流れ（受け付け → 受け付けのメール → 返事）。済んだものは塗った丸に ✓、まだのものは白い丸（第 2 版） */
.flow-title { margin-top: 0; }
.flow { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.flow > li { position: relative; margin: 0; padding-left: 40px; min-height: 28px; }
.flow > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: var(--frame) solid var(--line-soft);
  background: var(--white);
  color: var(--white);
  text-align: center;
  line-height: 24px;
  font-size: 16px;
  font-weight: 700;
}
.flow > li.flow-done::before { content: "✓"; border-color: var(--ink); background: var(--ink); }
.flow > li.flow-next::before { border-color: var(--ink); }
.flow-name { margin-right: 0.75em; font-weight: 700; }
.flow > li.flow-next { font-weight: 700; }
/* 次の一手（TL-NET に戻る・付け足す・開き直す） */
.done-actions, .entry-actions { margin: 22px 0 16px; }
.done-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.done-actions .button-link, .entry-actions .button-link { width: 100%; min-height: var(--tap-main); }
.button-link.button-secondary { padding: 14px 24px; color: var(--accent); border-color: var(--accent); letter-spacing: 0; }
.button-link.button-secondary:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
/* 送った内容の控え（灰色の地） */
.copy textarea { min-height: 140px; background: var(--surface); border-style: solid; border-color: var(--line-faint); }

.small { color: var(--ink-sub); }
.form-foot { margin: 16px 0 0; }

@media (max-width: 767px) {
  .who { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .who dd { margin-bottom: 6px; }
  .who dd:last-child { margin-bottom: 0; }
  /* 期限の前の知らせ（soon）は、書いている間も画面の下に留める（フォームの終わりでは、送るボタンの上の元の場所に戻る）。
     留めている間は、選んだ欄が知らせの下に隠れないように、ページの下の余白を足す。過ぎた知らせ（over）は文が長いので留めない */
  .deadline-alert.soon:not([hidden]) { position: sticky; bottom: 0; z-index: 2; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 8px 14px; border-width: var(--frame) 0 0; border-radius: 0; line-height: 1.5; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12); }
  html:has(.deadline-alert.soon:not([hidden])) { scroll-padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* アカウントの追加・削除の欄（2026-11-23）。JS を使わない（CSP）ので、:has が使えるブラウザでは
   選んだものに合う欄だけを見せ、使えないブラウザでは全部を見せる（サーバーが種類と追加／削除で確かめる） */
.account-section { margin: 0 0 28px; padding: 14px; border-radius: var(--radius); background: var(--surface); }
.account-section > legend { float: left; width: 100%; }
.account-section > legend + * { clear: both; }
.account-section .choices { display: block; margin: 8px 0 16px; }
.account-section .choice { margin: 0 0 6px; }
.account-section fieldset.choices { border: 0; padding: 0; }
.account-section fieldset.choices.has-error { border-left: 3px solid var(--danger); padding-left: 8px; }
.account-section .has-error { border-left: 3px solid var(--danger); padding-left: 8px; }
@supports selector(:has(a)) {
  form.inquiry:not(:has(input[name="kind"][value="account"]:checked)) .account-section { display: none; }
  .account-section:has(input[name="acct_action"][value="add"]:checked) .account-remove { display: none; }
  .account-section:has(input[name="acct_action"][value="remove"]:checked) .account-add { display: none; }
  .account-section:not(:has(input[name="acct_action"]:checked)) .account-add,
  .account-section:not(:has(input[name="acct_action"]:checked)) .account-remove { display: none; }
}

/* 問い合わせの管理画面・段 1（docs/admin-console.md の 3。スマホを先に・押す所 44px 以上・横に流れない） */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.admin-who { color: var(--ink-sub); overflow-wrap: anywhere; }
.admin-logout, .admin-logout-all { margin: 0; }
.admin-logout-all { margin-top: 32px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.admin-tab { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-small); padding: 0 14px; border: var(--frame) solid var(--ink-sub); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; }
.admin-tab[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.admin-count { font-weight: 400; }
.admin-cards { list-style: none; margin: 0; padding: 0; }
.admin-card { margin: 0 0 10px; border: var(--frame) solid var(--line-faint); border-radius: var(--radius); }
.admin-card-urgent { border-color: var(--danger); }
.admin-card-link { display: block; min-height: var(--tap); padding: 10px 14px; color: var(--ink); text-decoration: none; }
.admin-card-link:hover { background: var(--surface); }
.admin-card-title { display: block; font-weight: 700; }
.admin-card-line { display: block; color: var(--ink-sub); overflow-wrap: anywhere; }
.admin-mark { color: var(--danger-ink); font-weight: 700; }
.admin-empty { color: var(--ink-sub); }
.admin-pages { display: flex; gap: 12px; margin: 16px 0 0; }
.admin-back { margin: 0 0 4px; }
.admin-status { margin: 0 0 16px; }
.admin-box { margin: 0 0 16px; padding: 14px; border-radius: var(--radius); background: var(--surface); }
.admin-facts { display: grid; grid-template-columns: 7em 1fr; gap: 4px 12px; margin: 0; }
.admin-facts dt { font-weight: 700; }
.admin-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.admin-break { overflow-wrap: anywhere; }
.admin-label { margin: 12px 0 4px; font-weight: 700; }
.admin-label:first-child { margin-top: 0; }
.admin-text { margin: 0; overflow-wrap: anywhere; }
.admin-body { white-space: pre-wrap; }
.admin-thread { margin: 0; padding-left: 1.2em; }
/* 段 2: 状況を変える・メモ・この件につなぐ（押す所 44px 以上） */
.admin-status-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.admin-status-form button { padding: 0 14px; }
.admin-status-now, .admin-status-now:disabled { min-height: var(--tap-small); background: var(--accent); border-color: var(--accent); color: var(--white); cursor: default; opacity: 1; }
.admin-inline-form { margin: 6px 0; }
.admin-warn { margin: 0 0 10px; color: var(--danger-ink); font-weight: 700; }
.admin-notes { list-style: none; margin: 0 0 12px; padding: 0; }
.admin-notes li { margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line-faint); }
.admin-note-at { display: block; color: var(--ink-sub); }
.admin-note-form textarea { min-height: 120px; margin: 0 0 8px; }
/* 段 3: 返事を書く・確かめる */
.admin-fixed { padding: 8px 12px; border: 1px dashed var(--line-faint); border-radius: var(--radius); background: var(--white); color: var(--ink-sub); }
.admin-reply-form textarea { min-height: 240px; margin: 0 0 12px; }
.admin-after { margin: 12px 0; padding: 0; border: 0; }
.admin-after label { display: flex; align-items: center; gap: 8px; min-height: var(--tap-small); }
.admin-reply-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.admin-reply-actions form { margin: 0; }
.admin-alert { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--surface); }
.admin-alert-strong { border-left-color: var(--danger); color: var(--danger-ink); font-weight: 700; }
@media (max-width: 420px) {
  .admin-facts { grid-template-columns: 1fr; }
  .admin-facts dd { margin-bottom: 6px; }
}
