/*
  hearing.css — freehp.jp「ヒアリングから始めるホームページ」3ページ共通（index / form / talk）
  2026-10-16 作り直し（design/UIUX_BRIEF.md の「直し方（決定）」1〜10）。
  色は白・墨・山吹・紙色の4つだけ。灰色は墨の濃さを変えて作る。山吹を文字に使うときは --accent-text。
  例外: 入力の誤りを知らせる赤（--error）。
  角は8pxで丸める。影とグラデーションは使わない。罫線は減らし、余白と紙色の面でまとまりを作る。
*/

:root {
  color-scheme: light;
  --white: #FFFFFF;
  --ink: #121212;
  --accent: #F5B517;
  --accent-text: #765300;
  --paper: #F5F1E4;
  --error: #A1261B;

  --text: var(--ink);
  --sub: rgba(18, 18, 18, .70);
  --faint: rgba(18, 18, 18, .55);
  --rule: rgba(18, 18, 18, .12);
  --field-line: rgba(18, 18, 18, .55);
  --hover: rgba(18, 18, 18, .05);
  --radius: 8px;

  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: 16px;
}
@media (min-width: 600px) { :root { --gutter: clamp(24px, 5vw, 64px); } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.85;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

/* 日本語を文節の途中で折り返さない（budoux.js が <wbr> を入れる。CSS はその組） */
h1, h2, h3, h4, p, li, dt, dd, label, legend, summary, figcaption, button, .bx, .hint, .err, .fb-title, .fb-desc {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.brk { display: inline-block; }

.sr-only {
  position: absolute !important;
  /* .input などの幅・高さより強くする（talk のリンクの欄を見えなくするのに使う） */
  width: 1px !important; height: 1px !important; min-height: 0 !important;
  margin: -1px; padding: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
}

/* おとり欄（人には見えない・読み上げない・tab で入らない） */
.trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- 枠 ---------- */
.wrap { width: min(1120px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.wrap-narrow { width: min(720px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }

/* ---------- ヘッダー（freehp.jp の .site-header と同じ組み: 墨の帯・白い屋号・等幅の書体と字間） ---------- */
.hd { background: var(--ink); color: var(--white); }
.hd-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  text-decoration: none;
}
.brand-name {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--white);
  white-space: nowrap;
}
.hd-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
}
.hd :focus-visible { outline-color: var(--accent); }
@media (max-width: 480px) {
  .brand-name { font-size: 11px; }
}

/* ---------- 見出しまわり ---------- */
.page-title {
  margin: 0;
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(34px, 8.6vw, 60px);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.page-title.is-mid { font-size: clamp(28px, 6.4vw, 44px); }
.lead {
  margin: 16px 0 0;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}
.sec-title {
  margin: 0;
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(26px, 5.6vw, 38px);
  line-height: 1.35;
}
.sec-lead { margin: 12px 0 0; max-width: 36em; font-size: 16px; color: var(--sub); }

/* ページの頭（form / talk）: 見出しの右に小さな絵 */
.page-head { padding: clamp(24px, 6vw, 64px) 0 clamp(20px, 4vw, 40px); }
.page-head.has-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 4px 12px;
  align-items: center;
}
.page-head.has-art .lead { grid-column: 1 / -1; }
.head-art { width: 104px; height: 104px; border-radius: var(--radius); object-fit: cover; }
@media (min-width: 720px) {
  .page-head.has-art { grid-template-columns: minmax(0, 1fr) 176px; gap: 8px 32px; }
  .page-head.has-art .lead { grid-column: 1; }
  .head-art { width: 176px; height: 176px; grid-row: 1 / span 2; grid-column: 2; }
}

/* 紙色の帯（全幅） */
.band { padding: clamp(48px, 9vw, 104px) 0; }
.band-paper { background: var(--paper); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--paper); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #2E2E2E; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #E5A800; border-color: #E5A800; }
.btn-lg { min-height: 60px; font-size: 18px; padding: 14px 28px; }
.btn-wide { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn .arrow { font-weight: 500; }
.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ========== 入口（index） ========== */
.hero { padding: 8px 0 clamp(40px, 7vw, 72px); }
.hero-inner { display: grid; gap: 20px; }
.hero-art {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.hero-art img { width: 100%; aspect-ratio: 10 / 9; object-fit: cover; object-position: 100% 50%; }
.hero-text .lead { font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.hero-cta .btn { flex: 1 1 220px; }
@media (min-width: 900px) {
  .hero { padding-top: 16px; }
  .hero-inner { position: relative; display: block; }
  .hero-art img { aspect-ratio: 12 / 7; object-position: 50% 55%; }
  .hero-text {
    position: absolute;
    left: clamp(24px, 4vw, 56px);
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
  }
  .hero-cta .btn { flex: 0 1 auto; }
}

/* 3つの伝え方 */
.ways-head { margin: 0 0 28px; }
.recommend {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.recommend::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: .62em;
  border-radius: 50%;
  background: var(--accent);
}
.ways {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.way {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "art head"
    "body body";
  gap: 12px 16px;
  padding: 20px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
}
.way.is-recommended { border-color: var(--accent); }
.way-art { grid-area: art; width: 96px; height: 96px; border-radius: 6px; object-fit: cover; }
.way-head { grid-area: head; align-self: center; min-width: 0; }
.way-body { grid-area: body; display: flex; flex-direction: column; }
.way-badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.way-title {
  margin: 0;
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(21px, 5.4vw, 26px);
  line-height: 1.35;
}
.way-time { display: block; margin-top: 4px; font-size: 14px; color: var(--sub); }
.way-for {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--paper);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.6;
}
.way-for-label { display: block; font-size: 13px; font-weight: 500; color: var(--sub); }
.way-desc { margin: 12px 0 20px; font-size: 15px; color: var(--sub); line-height: 1.8; }
.way .btn { width: 100%; }
.way .line-go, .way-body > .btn { margin-top: auto; }

/* LINE を開くボタンの下の案内と、幅900px以上で横に出す QR */
.line-go { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.line-go-main { min-width: 0; }
.line-help { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--sub); }
.line-go-main > .btn + .line-help, .done-line > .btn + .line-help { margin-top: 10px; }
.line-help + .line-help { margin-top: 2px; }
.line-qr { display: none; margin: 0; }
.line-qr .qr { display: block; width: 160px; height: 160px; }
.line-qr figcaption { margin: 6px 0 0; width: 160px; font-size: 12px; line-height: 1.55; color: var(--sub); }
/* 幅900px以上で QR を出す。ボタンと案内2行の下に縦に積む（900〜1199pxでボタンが細くなる不具合の直し・2026-10-16 R3037） */
@media (min-width: 900px) {
  .line-qr { display: block; margin-top: 12px; }
}
@media (min-width: 900px) {
  .ways { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .way {
    grid-template-columns: 1fr;
    grid-template-areas: "art" "head" "body";
    padding: 16px 20px 24px;
  }
  .way-art { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .way-badge { position: absolute; top: 28px; left: 28px; margin: 0; }
}

/* こんな試作が届きます */
.samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.sample {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.sample-frame {
  display: block;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.sample-frame img { width: 100%; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; }
.sample-cap { display: block; margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--sub); }
.sample:hover .sample-frame { border-color: var(--ink); }
.sample-note { margin: 16px 0 0; font-size: 14px; color: var(--sub); }
@media (max-width: 599px) {
  .samples {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
  }
  .samples > li { flex: 0 0 72%; scroll-snap-align: start; }
}
@media (min-width: 720px) {
  .samples { grid-template-columns: repeat(3, minmax(0, 240px)); gap: 24px; }
  .sample-cap { font-size: 14px; }
}

/* 見本を大きく見る（JS があるときだけ。無いときはリンク先の絵が開く） */
.lightbox {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  overflow: auto;
}
.lightbox::backdrop { background: rgba(18, 18, 18, .72); }
.lightbox-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 16px;
  background: var(--white);
  font-size: 14px;
  color: var(--sub);
}
.lightbox img { width: 100%; }

/* 人が見てから届く */
.trust {
  display: grid;
  gap: 24px;
  align-items: center;
}
.trust-art { width: 100%; max-width: 200px; border-radius: var(--radius); }
.trust-person { display: flex; align-items: center; gap: 14px; margin: 20px 0 0; }
.trust-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.trust-name { margin: 0; font-size: 15px; line-height: 1.6; color: var(--sub); }
.trust-name strong { display: block; font-size: 17px; color: var(--ink); }
@media (min-width: 900px) {
  .trust { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; }
  .trust-art { max-width: 280px; }
}

/* このあとの流れ（番号つき・線なし） */
.flow {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  counter-reset: flow;
}
.flow li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--white);
  counter-increment: flow;
}
.flow li::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.flow-text { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.5; padding-top: 3px; }
.flow-sub { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--sub); }
@media (min-width: 900px) {
  .flow.is-row { grid-template-columns: repeat(5, 1fr); }
  .flow.is-row li { grid-template-columns: 1fr; }
}

/* 料金・個人情報などの注記 */
.facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.facts > div { padding: 16px 0; border-top: 1px solid var(--rule); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-weight: 700; color: var(--ink); margin: 0 0 2px; }
.facts dd { margin: 0; color: var(--sub); }
.facts dd a { color: var(--ink); }
@media (min-width: 720px) {
  .facts > div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
}

/* ---------- フッター ---------- */
.ft { margin-top: 0; background: var(--ink); color: rgba(255, 255, 255, .82); padding: 32px 0 48px; }
.ft-row { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; font-size: 14px; }
.ft-brand { font-weight: 700; color: var(--white); }
.ft-row a { display: inline-flex; align-items: center; min-height: 44px; color: rgba(255, 255, 255, .82); }
.ft-note { margin: 12px 0 0; font-size: 13px; color: rgba(255, 255, 255, .7); }
.ft :focus-visible { outline-color: var(--accent); }
main.wrap-narrow { padding-bottom: clamp(48px, 8vw, 96px); }

/* ========== フォーム（form） ========== */
.progress { margin: 0 0 16px; }
.progress-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 10px; }
.progress-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-text);
  font-feature-settings: "tnum" 1;
}
.progress-name { font-weight: 700; color: var(--ink); }
.saved {
  margin: 0 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--sub);
}
.saved::before {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}
.saved.is-off::before { display: none; }
.progress-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.progress-bar span { height: 6px; border-radius: 3px; background: var(--rule); }
.progress-bar span.is-done { background: var(--ink); }
.progress-bar span.is-now { background: var(--accent); }

/* 段ごとの面（紙色） */
.step {
  padding: 4px 20px 28px;
  border-radius: var(--radius);
  background: var(--paper);
}
@media (min-width: 720px) { .step { padding: 8px 36px 36px; } }
.step-title {
  margin: 20px 0 4px;
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(25px, 5.4vw, 32px);
  line-height: 1.35;
}
.step-title:focus { outline: none; }
.step-title:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; }
.step-lead { margin: 0 0 8px; color: var(--sub); font-size: 15px; }

.field { margin: 28px 0 0; padding: 0; border: 0; min-width: 0; }
.field > legend, .field > label, .field-label {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--white);
  vertical-align: 2px;
  white-space: nowrap;
}
.tag-opt { background: transparent; color: var(--sub); font-weight: 500; padding: 0 2px; }
.hint { display: block; margin: -4px 0 10px; font-size: 14px; font-weight: 500; color: var(--sub); line-height: 1.7; }

.input, .textarea, .select {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); font-weight: 400; }
.input:focus, .textarea:focus { border-color: var(--ink); }
.input + .input { margin-top: 10px; }
.input:disabled, .textarea:disabled { background: transparent; border-style: dashed; color: var(--faint); }
.count { display: block; margin-left: auto; font-size: 13px; color: var(--sub); text-align: right; font-feature-settings: "tnum" 1; }

/* 「わからない」（空のまま進める） */
.field-tools { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; }
.skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.skip-btn::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}
.skip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.skip-btn[aria-pressed="true"]::before {
  width: 12px;
  height: 7px;
  margin: 0 2px 4px;
  border-width: 0 0 2.5px 2.5px;
  border-color: var(--accent);
  border-radius: 0;
  transform: rotate(-45deg);
}
.skip-note { margin: 6px 0 0; font-size: 14px; color: var(--sub); }
.field.is-skipped .input, .field.is-skipped .textarea { border-style: dashed; }

/* 7 押すと欄に言葉が足される選択肢 */
.word-picks { margin: 0 0 12px; }
.word-picks-label { margin: 0 0 8px; font-size: 14px; color: var(--sub); }
.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.pick::before { content: "+"; font-weight: 500; color: var(--accent-text); }
.pick:hover { border-color: var(--ink); }

[aria-invalid="true"] { border-color: var(--error) !important; border-width: 2px !important; }
/* 誤りの欄にフォーカスしたときは、枠の色を赤にそろえる（赤い枠と茶色の枠が二重に見えないように） */
[aria-invalid="true"]:focus-visible,
.field.has-error .chip input:focus-visible + span { outline-color: var(--error); }
.err {
  display: block;
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--error);
  line-height: 1.6;
}
.err:empty { display: none; }

/* 選ぶだけの項目（チップ） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px 10px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}
.chip input[type="radio"] + span::before { border-radius: 50%; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input[type="checkbox"]:checked + span::before {
  width: 12px;
  height: 7px;
  margin: 0 2px 4px;
  border-width: 0 0 2.5px 2.5px;
  border-color: var(--accent);
  border-radius: 0;
  transform: rotate(-45deg);
}
.chip input[type="radio"]:checked + span::before { background: var(--accent); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.chips[aria-invalid="true"] .chip span { border-color: var(--error); }
.field.has-error .chip span { border-color: var(--error); }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.note-box {
  margin: 28px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 15px;
  color: var(--ink);
}
.note-box p { margin: 0; }
.note-box p + p { margin-top: 8px; }

.step-nav { display: flex; gap: 12px; margin: 24px 0 0; }
.review-return { margin: 24px 0 0; }
.review-return + .step-nav { margin-top: 12px; }
.step-nav .btn-next { flex: 1; }
.step-nav .btn-back { flex: none; min-width: 96px; }

.draft-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 16px;
  padding: 4px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 14px;
  color: var(--ink);
}

/* ---------- 確認画面 ---------- */
.review-sec { margin: 20px 0 0; padding: 4px 16px 8px; border-radius: var(--radius); background: var(--white); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.review-head h3 { margin: 0; font-size: 17px; color: var(--ink); }
.review-list { margin: 0; }
.review-list > div { padding: 10px 0; border-top: 1px solid var(--rule); }
.review-list dt { font-size: 14px; color: var(--sub); font-weight: 500; }
.review-list dd { margin: 2px 0 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-list dd.is-empty { color: var(--faint); }
@media (min-width: 720px) {
  .review-list > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
  .review-list dd { margin: 0; }
}

/* ---------- 知らせ ---------- */
.alert {
  margin: 24px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--error);
  border-radius: var(--radius);
  background: rgba(161, 38, 27, .06);
  color: var(--ink);
}
.alert p { margin: 0; }
.alert p + p, .alert .alert-actions { margin-top: 10px; }
.alert ul { margin: 8px 0 0; padding-left: 1.2em; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status { margin: 12px 0 0; font-size: 15px; color: var(--sub); }
.status:empty { display: none; }

/* ---------- 完了画面 ---------- */
.done { padding: clamp(24px, 6vw, 56px) 0 0; }
.done-art { width: 160px; height: 160px; border-radius: var(--radius); margin: 0 0 16px; }
.receipt-box {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--paper);
}
.done-label { margin: 0; font-size: 14px; color: var(--sub); }
.receipt {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(32px, 9vw, 48px);
  letter-spacing: .06em;
  color: var(--ink);
  line-height: 1.25;
}
.done-mail { margin: 16px 0 0; font-size: 16px; color: var(--ink); }
.done-email { font-weight: 700; overflow-wrap: anywhere; word-break: break-all; }
.done-mail-help { margin: 6px 0 0; font-size: 14px; color: var(--sub); }
.done-mail-help a { color: var(--ink); }
.done-line { margin: 24px 0 0; }
.done-sub { margin: 48px 0 0; font-family: var(--mincho); font-weight: 600; font-size: 24px; color: var(--ink); line-height: 1.4; }
.done .flow { margin-top: 16px; }
.done .flow li { background: var(--paper); }
.done-back { margin: 28px 0 0; }
@media (min-width: 720px) {
  .done-art { width: 200px; height: 200px; }
}

/* ========== ひとりで話す（talk） ========== */
.recbox {
  padding: 24px 20px 28px;
  border-radius: var(--radius);
  background: var(--paper);
}
@media (min-width: 720px) { .recbox { padding: 36px; } }
.rec { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rec-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.rec-main[disabled] { opacity: .5; cursor: not-allowed; }
.rec-orb { position: relative; display: grid; place-items: center; width: 160px; height: 160px; }
.rec-ring {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(calc(1.06 + var(--lvl, 0) * .42));
  transition: transform .08s linear, opacity .2s ease;
}
.rec-main.is-recording .rec-ring { opacity: .55; }
.rec-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--ink);
}
.rec-main:hover .rec-circle { background: #2E2E2E; }
/* マイクの形（線だけで描く） */
.rec-icon { position: relative; width: 22px; height: 34px; border: 3px solid var(--white); border-radius: 11px; margin-top: -10px; }
.rec-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  width: 34px;
  height: 20px;
  border: 3px solid var(--white);
  border-top: 0;
  border-radius: 0 0 17px 17px;
  transform: translateX(-50%);
}
.rec-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 36px;
  width: 3px;
  height: 8px;
  background: var(--white);
  transform: translateX(-50%);
}
/* 録音中は四角（止める）にする */
.rec-main.is-recording .rec-icon { width: 30px; height: 30px; margin: 0; border: 0; border-radius: 6px; background: var(--accent); }
.rec-main.is-recording .rec-icon::before, .rec-main.is-recording .rec-icon::after { display: none; }
.rec-main:focus-visible { outline-offset: 0; }
.rec-time { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 4px 0 0; }
.rec-clock { font-family: var(--mono); font-size: 34px; color: var(--ink); line-height: 1.2; font-feature-settings: "tnum" 1; }
.rec-left { font-size: 15px; color: var(--sub); }
.rec-voice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.rec-voice::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.rec-voice.is-on::before { background: var(--accent); }
.rec .status { margin-top: 10px; }
.rec-after { width: 100%; margin: 16px 0 0; }
.rec-after audio { display: none; }
.rec-after-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; }
.rec-after-actions .btn-send { grid-column: 1 / -1; }

/* 次に話すこと */
.next-card {
  width: 100%;
  margin: 20px 0 0;
  padding: 16px 18px 12px;
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
}
.next-label { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.next-count { font-feature-settings: "tnum" 1; }
.next-text { margin: 6px 0 12px; font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.55; min-height: 3.1em; }
.next-actions { display: flex; align-items: center; gap: 16px; }
.next-actions .btn { flex: 1; }
.next-done-all { margin: 6px 0 12px; font-size: 17px; font-weight: 700; color: var(--ink); }
.next-card.is-idle .next-text { font-size: 16px; font-weight: 500; color: var(--sub); }
.next-ease { margin: 8px 0 0; font-size: 14px; color: var(--sub); }

.ex-list { width: 100%; margin: 12px 0 0; text-align: left; }
.ex-list > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ex-list > summary::-webkit-details-marker { display: none; }
.examples { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: ex; }
.examples li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 15px;
  line-height: 1.6;
  counter-increment: ex;
}
.examples li::before {
  content: counter(ex);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--field-line);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.examples li.is-done { color: var(--sub); }
.examples li.is-done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: var(--accent); }
.examples li.is-now { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 720px) { .examples { grid-template-columns: 1fr 1fr; } }

.rec-explain { margin: 20px 0 0; font-size: 14px; color: var(--sub); text-align: left; }

.talk-form { margin: 40px 0 0; }
.talk-form .sec-title { font-size: clamp(24px, 5vw, 30px); }
.talk-form .note-box { background: var(--paper); }
.send-hint {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border-left: 4px solid var(--accent);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.send-summary { margin: 24px 0 0; font-size: 16px; color: var(--ink); }
.send-summary + .step-nav { margin-top: 8px; }
.send-summary-label { margin-right: 1em; font-size: 14px; font-weight: 700; color: var(--sub); }

.fallback { margin: 0 0 8px; padding: 20px; border-radius: var(--radius); background: var(--white); text-align: left; }
.fallback h3 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.fallback > p { margin: 0 0 8px; font-size: 15px; }
.fallback ol { list-style: none; margin: 0; padding: 0; }
.fallback li { padding: 16px 0 0; }
.fallback li + li { border-top: 1px solid var(--rule); margin-top: 16px; }
.fallback .fb-title { display: block; font-weight: 700; color: var(--ink); }
.fallback .fb-desc { display: block; margin: 2px 0 10px; font-size: 15px; color: var(--sub); }
.copy-row { display: flex; flex-direction: column; gap: 8px; }
.copy-row .input { min-width: 0; font-size: 16px; font-family: var(--mono); }

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* 声の大きさの輪は動かさない（「声が届いています」の表示だけにする） */
  .rec-ring { transform: scale(1.12) !important; }
}

/* フォーム5段目の小見出し・同意の下のリンク */
.step-sub {
  margin: 40px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.check-after { margin: 4px 0 0 36px; }
.check-after a { display: inline-flex; align-items: center; min-height: 44px; }

/* 同意の行は本文と同じ太さにする（.field > label の太字を打ち消す） */
.field > label.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; margin: 0; }

/* フォーム5段目「くわしく入れる（任意）」の畳んだ欄 */
.more { margin: 36px 0 0; border-radius: var(--radius); background: var(--white); }
.more > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-height: 60px;
  padding: 16px 48px 16px 16px;
  position: relative;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 14px;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
}
.more[open] > summary::after { content: "−"; }
.more-sub { font-size: 14px; font-weight: 500; color: var(--sub); }
.more-body { padding: 0 16px 24px; }
.more-body > .field:first-child { margin-top: 8px; }

/* Turnstile の部品の置き場（TURNSTILE_SITEKEY が空のときは hidden のまま） */
.ts-box { margin: 24px 0 0; min-height: 65px; }
.more + .step-sub { margin-top: 36px; }

/* フォームの2画面目からと確認の画面では、リードと絵を隠して見出しだけにする（hearing.js が body に data-step を付ける） */
body[data-page="form"][data-step]:not([data-step="1"]) #form-head { display: block; padding-bottom: clamp(16px, 3vw, 28px); }
body[data-page="form"][data-step]:not([data-step="1"]) #form-head .lead,
body[data-page="form"][data-step]:not([data-step="1"]) #form-head .head-art { display: none; }
