@charset "UTF-8";

/* =========================================================
   ケアマネのミカタ  共通スタイル
   ねらい：文字を大きく、押す場所を大きく、色はやさしく。
   PC操作が苦手な方でも迷わない画面にする。
   ========================================================= */

:root {
  --cream: #fffaf2;
  --cream-2: #fff4e6;
  --paper: #ffffff;
  --ink: #35423b;
  --ink-soft: #55655c;
  --ink-faint: #55655c;

  --green: #3b7d64;
  --green-d: #2f6650;
  --green-l: #e8f4ef;

  --orange: #f0954a;
  --orange-d: #d9762a;
  --orange-l: #fdeedf;

  --sky: #386c99;
  --sky-l: #eaf3f9;

  --pink-l: #fdeef0;
  --red: #b2453e;

  --line: #ece2d4;
  --line-2: #ddd0bd;

  --radius: 16px;
  --radius-lg: 26px;
  --shadow-s: 0 2px 6px rgba(90, 70, 40, .06);
  --shadow: 0 6px 20px rgba(90, 70, 40, .10);
  --shadow-l: 0 14px 40px rgba(90, 70, 40, .14);

  --maxw: 1080px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium",
          "游ゴシック Medium", YuGothic, "Meiryo", "MS PGothic", sans-serif;
  --font-round: "Hiragino Maru Gothic ProN", "Rounded Mplus 1c", var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-d); }
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

h1, h2, h3, h4 { font-family: var(--font-round); line-height: 1.5; margin: 0; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 40px, 780px); margin-inline: auto; }

.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }
.section--cream { background: var(--cream-2); }
.section--white { background: var(--paper); }
.section--green { background: var(--green-l); }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.nowrap { white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 242, .95);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 8px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo-text { font-family: var(--font-round); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; line-height: 1.2; }
.logo-text small { display: block; font-size: .62rem; letter-spacing: .12em; color: var(--ink-faint); font-weight: 400; margin-top: 1px; }
.logo-ai-badge {
  display: inline-block;
  background: linear-gradient(120deg, #3b7d64, #2b8ab5);
  color: #fff;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 1px 5px 2px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 5px;
  margin-bottom: 3px;
  font-family: var(--font-sans);
}

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: .98rem;
  font-weight: 600;
}
.nav a:hover { background: var(--cream-2); }
.nav a[aria-current="page"] { background: var(--green-l); color: var(--green-d); }
.nav .btn { margin-left: 6px; }

/* 2026-09-12：ヘッダーの簡素化。
   常に出しておくのは「トップへ」「終了する」「メニュー」の3つだけ。
   残りのリンクは幅によらず #mobileNav（もとはスマホ専用の全画面メニュー）にまとめる。 */
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); box-shadow: 0 6px 0 var(--ink), 0 -6px 0 var(--ink); }

/* 2026-09-12：メニューを全画面から、ボタンの下に降りるプルダウンの案内窓に変更。
   トップページの目次（#tocModal）と同じ色分けバッジ（.mnav-icon）を使って、
   どのツールが何色かを、トップと同じ見え方に揃える。
   位置（top/right）は initNav() がボタンの位置から計算して差し込む（app.js）。 */
.mobile-nav {
  position: fixed;
  top: 84px;
  right: 20px;
  width: min(400px, calc(100vw - 32px));
  max-height: min(74vh, 620px);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-l);
  z-index: 49;
  padding: 10px;
  overflow-y: auto;
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: .98rem;
}
.mobile-nav a:hover, .mobile-nav a:focus-visible { background: var(--cream-2); outline: none; }
.mobile-nav a + a { border-top: 1px solid var(--line); }
.mnav-icon {
  flex: none; min-width: 56px; text-align: center; font-size: .68rem; font-weight: 700;
  border-radius: 999px; padding: 3px 8px; letter-spacing: .02em;
}
.mnav-as { background: #e6f1f6; color: #1f5f77; }
.mnav-sk { background: #f7ecd4; color: #6b4d1c; }
.mnav-b1 { background: #efebfa; color: #4d4186; }
.mnav-b2 { background: #e6f1fa; color: #2f5a80; }
.mnav-ai { background: #e8f4ef; color: #2f6650; }
.mnav-yb { background: #e0f2ed; color: #22705a; }
.mnav-sh { background: #fae9ec; color: #8c3a4d; }
.mnav-ks { background: #fdefdf; color: #9a5313; }
.mnav-ab { background: var(--cream-2); color: var(--ink-soft); }
.mnav-group {
  margin: 14px 0 2px; padding: 8px 10px 4px; font-size: .78rem; color: var(--ink-faint);
  letter-spacing: .04em; border-top: 1px solid var(--line);
}
.mnav-group:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  font: inherit;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  text-align: center;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--orange); color:#2a2420; box-shadow: 0 5px 0 var(--orange-d); }
.btn-primary:hover { background: #f5a25e; }
.btn-primary:active { box-shadow: 0 2px 0 var(--orange-d); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 5px 0 var(--green-d); }
.btn-green:hover { background: #4a8f74; }
.btn-green:active { box-shadow: 0 2px 0 var(--green-d); }
.btn-quiet {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line-2);
  box-shadow: var(--shadow-s);
}
.btn-quiet:hover { background: var(--cream-2); }
.btn-lg { padding: 22px 46px; font-size: 1.3rem; }
.btn-sm { padding: 10px 18px; font-size: .95rem; box-shadow: none; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row.center { justify-content: center; }

/* ---------- ヒーロー ---------- */
.hero {
  background:
    radial-gradient(1100px 460px at 82% -8%, var(--orange-l) 0%, rgba(255, 244, 230, 0) 62%),
    radial-gradient(900px 420px at 8% 108%, var(--green-l) 0%, rgba(232, 244, 239, 0) 60%),
    var(--cream);
  padding: 60px 0 70px;
  border-bottom: 2px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: .01em; }
.hero h1 .accent { color: var(--orange-d); }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); margin: 22px 0 30px; }
.eyebrow {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size:15px;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: .04em;
}
.hero-note { margin-top: 20px; font-size: .95rem; color: var(--ink-soft); }

/* ---------- 見出し ---------- */
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
.section-head h2 .marker {
  background: linear-gradient(transparent 62%, var(--orange-l) 62%);
  padding: 0 .1em;
}
.section-head p { color: var(--ink-soft); margin: 14px auto 0; max-width: 640px; }

/* ---------- カード ---------- */
.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-s);
}
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 悩みカード */
.worry-card { position: relative; padding-top: 34px; }
.worry-card .bubble {
  display: inline-block;
  background: var(--pink-l);
  color: var(--red);
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  padding: 5px 16px;
  margin-bottom: 12px;
}

/* ---------- ステップ ---------- */
.steps { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.step {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px 28px;
  position: relative;
  box-shadow: var(--shadow-s);
}
.step-no {
  position: absolute;
  top: -22px;
  left: 26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: 0 4px 0 var(--green-d);
}
.step h3 { margin-top: 4px; font-size: 1.2rem; }
.step-illust { margin: 14px auto 8px; width: 110px; }
.step-illust img { width: 100%; height: auto; display: block; }
.steps-wrap { padding-top: 26px; }

/* ---------- イラスト枠 ---------- */
.illust { margin: 0; position: relative; }
.illust img { margin-inline: auto; }
.illust-fallback { display: none; }
.illust.is-placeholder .illust-fallback { display: block; }
.illust-fallback svg { width: 100%; height: auto; display: block; }
.illust-cap { font-size: .82rem; color: var(--ink-faint); text-align: center; margin-top: 8px; }
.illust-sm { max-width: 190px; margin-inline: auto; }
.illust-md { max-width: 300px; margin-inline: auto; }

/* ---------- 注意ボックス ---------- */
.notice {
  background: var(--paper);
  border: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.notice.notice--soft { border-color: var(--line-2); background: var(--cream-2); }
.notice.notice--danger { border-color: var(--red); background: var(--pink-l); }
.notice h3 { font-size: 1.1rem; margin-bottom: 8px; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice-icon { flex: none; width: 46px; height: 46px; }

/* ---------- FAQ ---------- */
.faq { border: 2px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 14px; overflow: hidden; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 56px 20px 24px;
  font-weight: 700;
  font-family: var(--font-round);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 700;
}
.faq[open] summary::after { content: "－"; }
.faq .faq-body { padding: 0 24px 22px; color: var(--ink-soft); }
.faq .faq-body p:first-child { margin-top: 0; }

/* ---------- フッター ---------- */
.site-footer {
  background: #3d4c44;
  color: #dfe8e3;
  padding: 50px 0 34px;
  margin-top: 0;
}
.site-footer a { color: #cfe4d9; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 1rem; margin-bottom: 12px; color: #fff; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .18);
  margin-top: 32px;
  padding-top: 20px;
  font-size:15px;
  color: #b9c8c0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   ツール画面
   ========================================================= */
.tool-header { background: var(--green-l); border-bottom: 2px solid var(--line); padding: 34px 0 30px; }
.tool-header h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.tool-header p { color: var(--ink-soft); margin: 10px 0 0; }

.tool-body { padding: 34px 0 90px; }

/* ページ内ジャンプ（別ページに移動せず、同じページの中で移動する） */
.jumpnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.jumpnav a {
  display: inline-block;
  background: var(--paper);
  border: 2px solid var(--green);
  color: var(--green-d);
  font-weight: 700;
  font-family: var(--font-round);
  font-size: .95rem;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
}
.jumpnav a:hover { background: var(--green-l); }

/* 1ページの中の区切り（「はじめての方へ」「文例集」「よくある質問」の間） */
.section-divider {
  text-align: center;
  margin: 64px 0 36px;
  padding-top: 40px;
  border-top: 3px solid var(--line);
  scroll-margin-top: 92px;
}
.section-divider.is-first { margin-top: 0; padding-top: 0; border-top: none; }
.section-divider h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.section-divider p { color: var(--ink-soft); margin: 10px auto 0; max-width: 640px; }

.panel {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 30px 34px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-s);
  scroll-margin-top: 92px;
}
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.panel-no {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  background: var(--orange);
  color:#2a2420;
  display: grid; place-items: center;
  font-family: var(--font-round); font-weight: 700; font-size: 1.2rem;
  box-shadow: 0 3px 0 var(--orange-d);
}
.panel-head h2 { font-size: 1.35rem; }
.panel-desc { color: var(--ink-soft); font-size: .98rem; margin: 4px 0 22px 60px; }

@media (max-width: 640px) {
  .panel-desc { margin-left: 0; }
}

.field { margin-bottom: 22px; }
.field > label, .field-label {
  display: block;
  font-weight: 700;
  font-family: var(--font-round);
  margin-bottom: 8px;
}
.field-hint { font-size: .88rem; color: var(--ink-faint); font-weight: 400; margin-left: .4em; }

input[type="text"], input[type="date"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
}
textarea { line-height: 1.8; resize: vertical; }
select { cursor: pointer; }

/* 記録の種類：大きな選択タイル */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.type-tile { position: relative; }
.type-tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.type-tile label {
  display: block;
  height: 100%;
  border: 3px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: border-color .12s, background-color .12s, transform .12s;
}
.type-tile label:hover { transform: translateY(-2px); border-color: var(--line-2); }
.type-tile input:checked + label { border-color: var(--green); background: var(--green-l); }
.type-tile input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.type-tile .t-name { font-family: var(--font-round); font-weight: 700; font-size: 1.05rem; display: block; }
.type-tile .t-form { display: inline-block; font-size: .76rem; background: var(--sky-l); color: #3f6c8b; border-radius: 999px; padding: 2px 10px; margin-top: 6px; }
.type-tile .t-desc { font-size: .86rem; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.6; }

/* ちいさな選択（文体・分量） */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip label {
  display: block;
  border: 2px solid var(--line-2);
  background: var(--paper);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: .98rem;
}
.chip input:checked + label { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }

/* 入力欄まわり */
.memo-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.mic-btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 3px solid var(--green);
  background: var(--paper);
  color: var(--green-d);
  font: inherit; font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
}
.mic-btn:hover { background: var(--green-l); }
.mic-btn.is-recording { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.mic-btn svg { width: 22px; height: 22px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(197, 84, 76, .45); } 50% { box-shadow: 0 0 0 12px rgba(197, 84, 76, 0); } }
.mic-status { font-size: .9rem; color: var(--ink-soft); }
.mic-status.is-error { color: var(--red); }

/* 小さいマイクボタン（返信欄など、横にならぶ場所で使う） */
.mic-btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 48px; height: 48px;
  border: 2px solid var(--green);
  background: var(--paper);
  color: var(--green-d);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}
.mic-btn-sm:hover { background: var(--green-l); }
.mic-btn-sm.is-recording { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.mic-btn-sm svg { width: 20px; height: 20px; }

.counter { text-align: right; font-size: .85rem; color: var(--ink-faint); margin-top: 6px; }

/* 生成されたプロンプト */
.prompt-box {
  background: #f6f8f6;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
  font-size: .92rem;
  line-height: 1.75;
  white-space: pre-wrap;
  max-height: 380px;
  overflow-y: auto;
  color: #2f3b34;
}
.copy-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 20px 0 6px; }
.copy-flash { color: var(--green-d); font-weight: 700; opacity: 0; transition: opacity .2s; }
.copy-flash.is-on { opacity: 1; }

.ai-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.ai-link {
  display: flex; align-items: center; gap: 14px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  font-weight: 700;
  font-family: var(--font-round);
}
.ai-link:hover { border-color: var(--green); background: var(--green-l); }
.ai-link small { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-soft); }
.ai-link .ai-ico { width: 40px; height: 40px; flex: none; }

/* 更問（さらに質問）テンプレート */
.followup-list { display: grid; gap: 12px; }
.followup {
  display: flex; align-items: center; gap: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  background: var(--paper);
}
.followup .fu-text { flex: 1; }
.followup .fu-title { font-weight: 700; font-family: var(--font-round); }
.followup .fu-body { font-size: .88rem; color: var(--ink-soft); }

/* 仕上げ */
.check-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list input[type="checkbox"] { width: 24px; height: 24px; margin-top: 4px; flex: none; accent-color: var(--green); cursor: pointer; }
.check-list label { cursor: pointer; }

.warn-hit {
  background: var(--pink-l);
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  margin-top: 12px;
}
.warn-ok {
  background: var(--green-l);
  border: 2px solid var(--green);
  color: var(--green-d);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  margin-top: 12px;
}
.is-hidden { display: none !important; }

/* はじめての方への確認ポップアップ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(53, 66, 59, .55);
  display: flex;
  /* align-items: center は、中身が画面より高いとき上端を切り落として
     スクロールでも戻れなくなる。margin: auto に任せて安全に中央寄せする。 */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  z-index: 200;
}
.modal-overlay > .modal-box { margin: auto; }
.modal-box {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-l);
}
.modal-box h2 { font-size: 1.35rem; margin-bottom: 12px; }
.modal-box p { color: var(--ink-soft); line-height: 1.8; margin: 0; }

/* 終了確認モーダル */
.exit-modal-box { max-width: 480px; padding: 28px 28px 24px; }
.exit-modal-title { font-size: 1.2rem; margin: 0 0 20px; color: var(--ink); }
.exit-choice { border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.exit-choice--yes-use { background: var(--green-l); border: 2px solid var(--green); }
.exit-choice--shared  { background: var(--cream-2); border: 1px solid var(--line); }
.exit-choice-label { margin-bottom: 10px; }
.exit-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  padding: 2px 9px; border-radius: 99px;
}
.exit-badge--green  { background: var(--green); color: #fff; }
.exit-badge--orange { background: var(--orange-l); color: var(--orange-d); border: 1px solid var(--orange); }
.exit-btn-keep {
  display: flex; align-items: center; gap: 8px;
  width: 100%; justify-content: center;
  background: var(--green); color: #fff;
  font-size: 1.05rem; font-weight: 700;
  padding: 14px 24px; border-radius: 99px;
  box-shadow: 0 4px 0 var(--green-d);
  margin-bottom: 10px;
}
.exit-btn-keep:hover { background: #4a8f74; }
.exit-btn-keep:active { box-shadow: 0 1px 0 var(--green-d); transform: translateY(3px); }
.exit-btn-icon { font-size: 1.1rem; }
.exit-btn-clear {
  display: flex; align-items: center; gap: 8px;
  width: 100%; justify-content: center;
  font-size: .95rem;
  padding: 11px 20px; border-radius: 99px;
  margin-bottom: 8px;
}
.exit-choice-note { font-size: .82rem; color: var(--ink-soft); line-height: 1.7; margin: 0; }
.exit-divider {
  text-align: center; position: relative; margin: 6px 0 14px;
  color: var(--ink-faint); font-size: .82rem;
}
.exit-divider::before, .exit-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 22px); height: 1px; background: var(--line);
}
.exit-divider::before { left: 0; }
.exit-divider::after  { right: 0; }
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: .88rem; text-decoration: underline;
  padding: 4px 8px;
}
.btn-link:hover { color: var(--ink-soft); }
.exit-result { text-align: center; padding: 8px 0 12px; }
.exit-result-icon { font-size: 2.6rem; margin-bottom: 12px; }
.exit-result-title { font-size: 1.15rem; margin: 0 0 10px; color: var(--ink); }
.exit-result-body { font-size: .92rem; color: var(--ink-soft); line-height: 1.8; margin: 0 0 20px; }
.nav-exit-btn { color: var(--ink-soft); border-color: var(--line); }
.nav-exit-btn:hover { color: var(--red); border-color: var(--red); background: var(--pink-l); }

/* キー取得モーダル */
.kg-eyebrow { font-size:15px; font-weight: 700; letter-spacing: .14em; color: var(--green-d); text-transform: uppercase; margin: 0 0 6px; }
.kg-title { font-size: 1.3rem; line-height: 1.35; margin: 0 0 8px; color: var(--ink); }
.kg-lead { font-size: 15px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.75; }
.kg-lead strong { color: var(--ink); }
.kg-steps { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 0; }
.kg-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.kg-step:last-child { border-bottom: none; padding-bottom: 4px; }
.kg-step-no {
  flex: none;
  width: 28px; height: 28px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.kg-step-body { flex: 1; min-width: 0; }
.kg-step-title { font-weight: 700; font-size: .97rem; color: var(--ink); margin: 0 0 4px; line-height: 1.45; }
.kg-step-desc { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.7; }
.kg-step-desc strong { color: var(--ink); }
.kg-studio-btn { font-size: .95rem; padding: 12px 22px; border-radius: 99px; display: inline-flex; }
.kg-key-row { margin-bottom: 8px; }
.kg-key-row input { background: #fff; font-size: 1rem; }
.kg-footer-note { margin-top: 10px; color: var(--ink-faint); }

/* 例文（before/after） */
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.ex-box { border-radius: var(--radius); padding: 22px 24px; border: 2px solid var(--line); background: var(--paper); }
.ex-box h4 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ex-before { background: var(--cream-2); }
.ex-after { border-color: var(--green); background: var(--green-l); }
.ex-tag { font-size: .78rem; border-radius: 999px; padding: 3px 12px; font-weight: 700; }
.ex-before .ex-tag { background: #efe2cd; color: #5c4a2e; }
.ex-after .ex-tag { background: var(--green); color: #fff; }
.ex-box pre {
  white-space: pre-wrap;
  font-family: var(--font);
  font-size: .96rem;
  line-height: 1.85;
  margin: 0;
}

.table-scroll { overflow-x: auto; }
table.plain { border-collapse: collapse; width: 100%; background: var(--paper); }
table.plain th, table.plain td { border: 2px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; font-size: .96rem; }
table.plain th { background: var(--cream-2); font-family: var(--font-round); white-space: nowrap; }

/* 手順リスト */
.howto { list-style: none; counter-reset: h; padding: 0; margin: 0; display: grid; gap: 18px; }
.howto > li {
  counter-increment: h;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 20px 74px;
  position: relative;
}
.howto > li::before {
  content: counter(h);
  position: absolute;
  left: 20px; top: 20px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-round); font-weight: 700;
}
.howto h3 { font-size: 1.1rem; margin-bottom: 6px; }
.howto p:last-child { margin-bottom: 0; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-illust { max-width: 340px; margin-inline: auto; }
  .grid-3, .grid-4, .steps, .type-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap, .wrap-narrow { width: min(100% - 28px, var(--maxw)); }
  .section { padding: 52px 0; }
  .panel { padding: 24px 18px 26px; border-radius: 20px; }
  .grid-2, .grid-3, .grid-4, .steps, .type-grid, .ex-grid, .ai-links { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 20px 28px; font-size: 1.15rem; width: 100%; }
  .notice { flex-direction: column; gap: 12px; }
  .followup { flex-direction: column; align-items: stretch; gap: 12px; }
}

@media print {
  .site-header, .mobile-nav, .site-footer, .btn { display: none !important; }
  body { background: #fff; font-size: 12pt; }
}

/* =========================================================
   スターター（ファーストビューの入力エリア）
   いちばん上で、すぐ入力できるようにするための部品
   ========================================================= */
.starter {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--orange-l) 0%, rgba(255, 244, 230, 0) 60%),
    radial-gradient(700px 380px at 5% 110%, var(--green-l) 0%, rgba(232, 244, 239, 0) 60%),
    var(--cream);
  padding: 26px 0 42px;
  border-bottom: 2px solid var(--line);
}
.starter-lead {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 0 24px;
}
.starter-lead-body { flex: 1; min-width: 0; }
.starter-catch {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 10px;
}
.starter-catch b { color: var(--green); }
.starter-sub {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
}
.starter-illust { width: 170px; flex: none; margin: 0; }

/* 手順の見出し（① ② ③） */
.stepline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.stepline .n {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--orange);
  color:#2a2420;
  display: grid; place-items: center;
  font-family: var(--font-round); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 3px 0 var(--orange-d);
}
.stepline h2 { font-size: 1.3rem; }
.stepline .sub { font-size: 15px; color: var(--ink-faint); font-weight: 400; display: block; }

/* 「ここに入れる」入力枠 */
.inputbox {
  position: relative;
  background: var(--paper);
  border: 4px dashed var(--orange);
  border-radius: 22px;
  padding: 26px 22px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.inputbox::before {
  content: "ここに入れる";
  position: absolute;
  top: -17px; left: 24px;
  background: var(--orange);
  color:#2a2420;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: .95rem;
  padding: 4px 18px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--orange-d);
}
.inputbox.is-filled { border-style: solid; border-color: var(--green); }
.inputbox.is-filled::before { content: "入りました"; background: var(--green); box-shadow: 0 3px 0 var(--green-d); }
.inputbox:focus-within { box-shadow: 0 0 0 6px rgba(240, 149, 74, .18); }
.inputbox textarea {
  border: none;
  background: transparent;
  padding: 6px 4px;
  font-size: 1.08rem;
  min-height: 260px;
}
.inputbox textarea:focus-visible { outline: none; }
.inputbox textarea::placeholder { color: #b6bfb8; }
.inputbox .memo-toolbar { margin: 0 0 12px; }
.inputbox .counter { margin-top: 0; }

/* かんたん選択（記録の種類） */
.pick-row { display: flex; flex-wrap: wrap; gap: 10px; }
.kmode-guide-link { font-size: .85rem; color: var(--ink-soft); margin: 4px 0 2px; }
  .kgroup-h { font-size: .82rem; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px;
  padding-left: 10px; border-left: 4px solid var(--green); line-height: 1.5; }
.kgroup-h:first-of-type { margin-top: 8px; }
.zantei-box { margin: 10px 0 2px; padding: 11px 14px; background: var(--green-l);
  border: 2px solid var(--green); border-radius: 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; }
.chk input { width: 20px; height: 20px; accent-color: var(--green-d); flex: none; }
.chk label { font-size: .95rem; font-weight: 700; color: var(--green-d); cursor: pointer; }
.zantei-note { font-size: .84rem; color: var(--ink-soft); line-height: 1.7; margin: 7px 0 0; }
.taiin-guide { margin: 14px 0 4px; padding: 14px 16px; background: var(--cream-2);
  border: 2px solid var(--line-2); border-radius: 12px; }
.taiin-guide p { font-size: .92rem; line-height: 1.75; margin: 0 0 8px; }
.taiin-guide p:last-child { margin: 12px 0 0; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick label {
  display: block;
  border: 3px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .12s, background-color .12s;
}
.pick label .f { display: block; font-size: .74rem; font-weight: 400; color: var(--ink-faint); }
.pick input:checked + label { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.pick input:checked + label .f { color: var(--green-d); }
.pick input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }

/* たたんでおく詳細設定 */
.more {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  margin-top: 22px;
  overflow: hidden;
}
.more > summary, .as-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  font-family: var(--font-round);
  position: relative;
  color: var(--ink-soft);
}
.more > summary::-webkit-details-marker, .as-more > summary::-webkit-details-marker { display: none; }
.more > summary::after, .as-more > summary::after {
  content: "▼";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: .8rem;
}
.more[open] > summary::after, .as-more[open] > summary::after { content: "▲"; }
.more[open] > summary, .as-more[open] > summary { border-bottom: 2px solid var(--line); }
.more-body { padding: 22px 20px 6px; }

/* 生成ボタン */
.make-row { margin: 26px 0 0; text-align: center; }
.make-row .note { display: block; margin-top: 12px; font-size: .9rem; color: var(--ink-soft); }

/* 結果エリアの見出し */
.result-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.result-head .n {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-round); font-weight: 700; font-size: 1.2rem;
  box-shadow: 0 3px 0 var(--green-d);
}
.result-head h2 { font-size: 1.35rem; }
.result-head .sub { display: block; font-size: 15px; color: var(--ink-faint); font-weight: 400; }

/* 更問（入力後に出てくる） */
.followup-zone { margin-top: 26px; }
.followup-zone > summary {
  cursor: pointer;
  list-style: none;
  background: var(--sky-l);
  border: 2px solid var(--sky);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-round);
  font-weight: 700;
  color: #35617f;
  position: relative;
  padding-right: 48px;
}
.followup-zone > summary::-webkit-details-marker { display: none; }
.followup-zone > summary::after {
  content: "▼"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: .8rem;
}
.followup-zone[open] > summary::after { content: "▲"; }
.followup-zone .followup-list { margin-top: 16px; }

/* 更問の後ろのボタンバー */
.next-record-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--cream-2);
  border-radius: 16px;
  border: 2px solid var(--line);
}
.next-record-divider {
  width: 1px;
  height: 48px;
  background: var(--line);
  flex: none;
}
.next-record-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.next-record-note {
  font-size: .9rem;
  color: var(--ink-soft);
  margin: 0;
  white-space: nowrap;
}
.next-record-reload-note {
  font-size: .75rem;
  color: var(--ink-faint);
  margin: 4px 0 0;
  line-height: 1.5;
}

/* 録音ファイルの取り込み */
.audio-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 3px solid var(--orange);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-round);
  font-weight: 700;
  border-radius: 99px;
  padding: 10px 20px;
  cursor: pointer;
}
.audio-btn:hover { background: var(--orange-l); }
.audio-btn svg { width: 22px; height: 22px; color: var(--orange-d); }
.audio-btn-sub { font-size: 14px; font-weight: 400; color: var(--ink-faint); }

.audio-card {
  margin: 12px 0 4px;
  border: 2px solid var(--orange);
  background: var(--orange-l);
  border-radius: 14px;
  padding: 14px 16px;
}
.audio-card-head { display: flex; align-items: center; gap: 10px; }
.audio-card-icon { font-size: 1.2rem; flex: none; }
.audio-card-name {
  font-weight: 700; color: var(--ink); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audio-card-size { font-size: .8rem; color: var(--ink-soft); flex: none; }
.audio-card-remove {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.08); color: var(--ink);
  font-size: 1rem; line-height: 1; cursor: pointer;
}
.audio-card-remove:hover { background: rgba(0,0,0,.16); }
.audio-card-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.audio-status { font-size: .88rem; color: var(--ink-soft); line-height: 1.6; white-space: pre-line; }
.audio-status.is-error { color: var(--red); font-weight: 700; }
.audio-note { font-size: .78rem; color: var(--ink-soft); margin: 10px 0 0; line-height: 1.6; }
/* 短い録音：AI Studio は出さない（サイト内で失敗したときだけ出す） */
.audio-card.is-small .studio-btn { display: none; }
.audio-card.is-small.is-failed .studio-btn { display: inline-flex; }
/* 文字にしている間：ほかの道を隠し、いま何が起きているかだけを見せる */
.audio-card.is-running .studio-btn,
.audio-card.is-running .studio-btn-primary,
.audio-card.is-running .audio-reco { display: none !important; }
.audio-card.is-done .audio-reco--soft,
.audio-card.is-done #audioRunBtn { display: none; }
.audio-hint {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 10px;
  background: #fff7ec; border: 2px solid #f3d5ae; color: var(--ink);
  font-size: .95rem; line-height: 1.8;
}
.audio-reco--soft { background: transparent; border: 0; padding: 0; margin: 8px 0 0; font-size: .92rem; color: var(--ink-soft); }
/* 文字になったあとの2択 */
.audio-next {
  margin: 12px 0 0; padding: 14px 16px; border-radius: 12px;
  background: #e8f4ef; border: 2px solid #bfdccf;
}
.audio-next-q { margin: 0 0 10px; font-weight: 700; color: #2f6650; font-size: 1rem; }
.audio-next-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.audio-next-note { margin: 10px 0 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }
.audio-progress {
  margin-top: 12px; height: 8px; border-radius: 99px;
  background: rgba(0,0,0,.10); overflow: hidden;
}

/* AI Studio へのボタンと案内 */
.studio-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  border-color: var(--sky);
  line-height: 1.3;
}
.studio-btn:hover { background: var(--sky-l); }
.studio-btn-sub { font-size: .72rem; font-weight: 400; color: var(--ink-faint); }
.studio-btn.is-pulse,
.studio-btn-primary.is-pulse {
  border-color: var(--orange);
  animation: studioPulse 1.4s ease infinite;
}
.studio-btn-primary {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  line-height: 1.3;
}
.studio-btn-primary .studio-btn-sub { color: rgba(255,255,255,.9); font-size: .72rem; font-weight: 400; }
.audio-reco {
  margin: 12px 0 0;
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
}
@keyframes studioPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 149, 74, .55); }
  60%      { box-shadow: 0 0 0 10px rgba(240, 149, 74, 0); }
}

.studio-guide {
  margin-top: 14px;
  border: 2px solid var(--sky);
  background: var(--sky-l);
  border-radius: 14px;
  padding: 16px 18px;
}
.studio-guide-head { display: flex; align-items: center; gap: 10px; }
.studio-guide-title { flex: 1; font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.studio-guide-lead { font-size: .95rem; color: var(--ink); line-height: 1.8; margin: 10px 0 4px; }
.studio-tip {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff8e8;
  border: 2px solid #f0c95e;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 6px;
}
.studio-tip-icon { font-size: 1.3rem; flex: none; }
.studio-tip-body { flex: 1; min-width: 0; }
.studio-tip-title { font-weight: 700; font-size: .95rem; color: var(--ink); margin: 0 0 4px; }
.studio-tip-desc { font-size: .87rem; color: var(--ink-soft); line-height: 1.75; margin: 0; }
.studio-tip-gicon {
  display: inline-block;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #fff;
  font-size: .7rem;
  padding: 0 4px;
  margin: 0 2px;
  color: var(--ink);
}
.studio-steps { margin-bottom: 4px; }
.studio-steps .kg-step { border-bottom-color: rgba(0,0,0,.08); }
.studio-steps .kg-step-no { background: var(--sky-d, #4a86ad); }
.studio-steps .kg-step-title { font-size: 1.02rem; }
.studio-steps .kg-step-desc { font-size: .9rem; }

.studio-paste {
  margin-top: 10px;
  background: #fff;
  border: 2px dashed var(--sky);
  border-radius: 12px;
  padding: 14px 16px;
}
.studio-paste-label { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 8px; }
.studio-paste textarea { width: 100%; font-size: .95rem; }
.studio-paste-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.audio-progress-bar {
  height: 100%; width: 0; border-radius: 99px;
  background: var(--green); transition: width .3s ease;
}

/* 写真ボタンと、えらんだ写真 */
.pic-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 3px solid var(--sky);
  background: var(--paper);
  color: #35617f;
  font: inherit; font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
}
.pic-btn:hover { background: var(--sky-l); }
.pic-btn svg { width: 22px; height: 22px; }
.pic-btn-sub { font-size: .74rem; font-weight: 400; color: var(--ink-faint); }

.pic-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.pic-item { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line-2); }
.pic-item img { width: 100%; height: 100%; object-fit: cover; }
.pic-item--pdf { background: var(--sky-l); border-color: var(--sky); }
.pic-pdf-thumb {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 6px; gap: 4px;
}
.pic-pdf-thumb svg { width: 36px; height: 36px; color: var(--sky-d, #4a86ad); flex: none; }
.pic-pdf-name {
  font-size: .62rem; color: var(--ink-soft); text-align: center;
  word-break: break-all; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pic-item button {
  position: absolute; top: 3px; right: 3px;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}

/* 小さな注意書き */
.mini-note { font-size: 15px; color: var(--ink-soft); margin: 12px 4px 0; line-height: 1.8; }
.mini { font-size: 15px; color: var(--ink-soft); }
.mini.is-error { color: var(--red); font-weight: 700; }
.type-hint {
  margin: 14px 0 0;
  font-size: .9rem;
  color: var(--green-d);
  background: var(--green-l);
  border-radius: 12px;
  padding: 12px 16px;
}

/* やり方えらび（サイト内で作る／貼り付ける） */
.way-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.way { position: relative; }
.way input { position: absolute; opacity: 0; width: 0; height: 0; }
.way label {
  display: block; height: 100%;
  border: 3px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
}
.way label:hover { border-color: var(--line-2); }
.way input:checked + label { border-color: var(--green); background: var(--green-l); }
.way input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.way-badge {
  display: inline-block; background: var(--orange); color:#2a2420;
  font-size: .76rem; font-weight: 700; border-radius: 999px;
  padding: 2px 12px; margin-bottom: 8px;
}
.way-name { display: block; font-family: var(--font-round); font-weight: 700; font-size: 1.12rem; }
.way-desc { display: block; font-size: .88rem; color: var(--ink-soft); line-height: 1.7; margin-top: 6px; }

.zone { margin-bottom: 10px; }
.zone-desc { color: var(--ink-soft); font-size: .95rem; margin: 0 0 12px; }

/* APIキー */
.key-box {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-2);
  padding: 22px 22px 20px;
}
.key-box h3 { font-size: 1.1rem; margin-bottom: 8px; }
.key-row { display: flex; gap: 10px; align-items: stretch; }
.key-row input { flex: 1; min-width: 0; background: #fff; }
.key-row .btn { flex: none; }
.key-ok { margin: 0 0 12px; font-weight: 700; color: var(--green-d); font-family: var(--font-round); }

.save-warn {
  background: var(--orange-l);
  border: 2px solid var(--orange);
  color: var(--orange-d);
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 18px;
  margin: 0 0 16px;
  font-size: .95rem;
}

/* AIの返事の下に出す案内（記録として使えるか／質問への返事が必要か） */
.ai-answer-note {
  padding: 12px 22px;
  font-weight: 700;
  font-family: var(--font-round);
  font-size: .95rem;
  border-top: 2px dashed var(--line-2);
}
.ai-answer-note--ok { color: var(--green-d); background: var(--green-l); }
.ai-answer-note--ask { color: #35617f; background: var(--sky-l); }

/* 「4」の欄に自動で入ったことが分かるよう、一瞬だけ光らせる */
@keyframes finalFlashIn {
  0% { box-shadow: 0 0 0 6px rgba(79, 157, 128, .35); border-color: var(--green); }
  100% { box-shadow: 0 0 0 0 rgba(79, 157, 128, 0); }
}
#finalText.is-flash { animation: finalFlashIn 1.6s ease-out; }

.run-status { font-size: .95rem; color: var(--ink-soft); white-space: pre-line; }
.run-status.is-busy { color: var(--orange-d); font-weight: 700; }
.run-status.is-error { color: var(--red); font-weight: 700; }

/* AIの返事 */
.ai-answer {
  position: relative;
  margin-top: 22px;
  border: 3px solid var(--green);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}
.ai-answer-close {
  position: absolute;
  top: 10px; right: 14px;
  border: none;
  background: none;
  color: var(--green-d);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.ai-answer-close:hover { color: var(--ink); }
.ai-answer-reply { padding: 12px 20px 10px; border-top: 2px dashed var(--line-2); }
.ai-answer-reply-row { display: flex; align-items: flex-start; gap: 8px; }
.ai-answer-reply-row .mic-btn-sm { flex: none; margin-top: 2px; }
.ai-answer-reply-row .btn { flex: none; margin-top: 2px; }
.ai-answer-reply textarea {
  flex: 1;
  min-height: 56px;
  max-height: 120px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  padding: 12px 14px;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  background: var(--cream);
  resize: vertical;
}
/* .ai-answer-reply-btns は削除済み — レイアウトを reply-row に統合 */
.ai-goto-paste {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.ai-goto-paste-btn {
  color: var(--ink-soft);
  font-size: .9rem;
  border-radius: 99px;
  gap: 6px;
}
.ai-goto-paste-btn:hover { color: var(--ink); background: var(--cream-2); }
.ai-goto-paste-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--green);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex: none;
}

.ai-answer-head {
  display: flex; align-items: center; gap: 12px;
  background: var(--green-l);
  padding: 12px 20px;
  font-family: var(--font-round); font-weight: 700; color: var(--green-d);
  border-bottom: 2px solid var(--green);
}
.ai-face { width: 40px; flex: none; margin: 0; }
.ai-answer-body {
  padding: 20px 22px;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 1rem;
  max-height: 460px;
  overflow-y: auto;
}

/* AIの返事：中央オーバーレイ（wrapperがbackdrop＋centering、cardが中身） */
@keyframes aiPanelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-answer-wrap {
  position: fixed;
  inset: 0;
  background: rgba(30, 44, 38, .62);
  z-index: 59;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 40px;
  overflow-y: auto;
  animation: loFadeIn .25s ease both;
}
.ai-answer-wrap.is-hidden { display: none; }
.ai-answer {
  width: min(740px, 95vw);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.30);
  animation: aiPanelIn .3s ease both;
  overflow: hidden;
  position: relative;
  margin: auto;
}
.ai-answer-body {
  flex: 1;
  overflow-y: auto;
  min-height: 60px;
  padding: 24px 28px 20px;
  white-space: pre-wrap;
  font-size: 1.05rem;
  line-height: 2.1;
  color: var(--ink);
  background: var(--paper);
  word-break: break-all;
}
.ai-answer-ok {
  padding: 16px 24px 20px;
  border-top: 2px solid var(--green-l);
  text-align: center;
  background: var(--paper);
}
.ai-answer-ok .btn {
  font-size: 1rem;
  padding: 12px 32px;
  border-radius: 99px;
}
.ai-answer-ok .ai-result-note {
  margin-top: 8px;
  font-size: .80rem;
  color: var(--ink-faint);
}
@media (max-width: 640px) {
  .ai-answer-wrap {
    padding: 16px 8px 24px;
  }
  .ai-answer {
    width: 100%;
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .way-row { grid-template-columns: 1fr; }
  .key-row { flex-direction: column; }
  .pic-item { width: 76px; height: 76px; }
  .starter { padding: 14px 0 32px; }
  .starter-lead { flex-direction: column-reverse; align-items: center; gap: 12px; margin-bottom: 18px; text-align: center; }
  .starter-catch { font-size: 1.18rem; }
  .starter-illust { width: 130px; }
  .stepline h2 { font-size: 1.12rem; }
  .stepline .n { width: 34px; height: 34px; font-size: 1rem; }
  .inputbox { padding: 22px 14px 14px; border-width: 3px; }
  .inputbox textarea { min-height: 210px; font-size: 1rem; }
  .pick label { padding: 11px 14px; font-size: .95rem; }
  .more-body { padding: 18px 14px 4px; }
}

/* =================================================================
   AI結果モーダル（生成完了後に中央に大きく表示）
================================================================= */
.ai-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 44, 38, 0.62);
  z-index: 7500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: loFadeIn 0.25s ease both;
}
.ai-result-overlay.is-hidden { display: none; }

.ai-result-card {
  background: var(--paper);
  border-radius: 20px;
  width: min(720px, 95vw);
  height: min(84vh, 740px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  animation: loSlideUp 0.3s ease both;
  overflow: hidden;
}

.ai-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 2px solid var(--green-l);
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--green-d);
  background: var(--green-l);
}

.ai-result-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.ai-result-close:hover { background: rgba(0,0,0,.08); }

.ai-result-body {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 28px 32px;
  font-size: 1.05rem;
  line-height: 2;
  white-space: pre-wrap;
  color: var(--ink);
  background: var(--cream);
  word-break: break-all;
}

.ai-result-foot {
  padding: 22px 28px;
  border-top: 2px solid var(--green-l);
  text-align: center;
  flex-shrink: 0;
  background: var(--paper);
}
.ai-result-foot .btn-lg {
  font-size: 1.18rem;
  padding: 18px 48px;
  min-width: 260px;
  border-radius: 99px;
}
.ai-result-note {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .ai-result-card {
    width: 100%;
    height: 92vh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
  }
  .ai-result-body { padding: 20px 18px; font-size: .98rem; }
  .ai-result-head { padding: 18px 18px 14px; font-size: 1rem; }
  .ai-result-foot { padding: 16px 18px; }
  .ai-result-foot .btn-lg { min-width: 0; width: 100%; padding: 16px; font-size: 1.05rem; }
  .ai-result-overlay { padding: 0; align-items: flex-end; }
  .next-record-bar { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .next-record-divider { width: 100%; height: 1px; }
  .next-record-right { align-items: stretch; }
  .next-record-right .btn { width: 100%; }
  .next-record-bar > .btn { width: 100%; }
}

/* =================================================================
   ローディングオーバーレイ（AI生成中）
================================================================= */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 44, 38, 0.55);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loFadeIn 0.25s ease both;
}
#loadingOverlay.is-hidden { display: none; }

@keyframes loFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lo-card {
  background: var(--paper);
  border-radius: 20px;
  padding: 36px 40px 32px;
  text-align: center;
  width: min(320px, 88vw);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  animation: loSlideUp 0.3s ease both;
}

@keyframes loSlideUp {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.lo-illust {
  margin: 0 auto 18px;
  width: 120px;
}
.lo-illust img {
  width: 100%;
  height: auto;
}

.lo-text {
  font-size: 1.08rem;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 20px;
  line-height: 1.6;
}

.lo-dots::after {
  content: '';
  animation: loDots 1.4s steps(4, end) infinite;
}
@keyframes loDots {
  0%  { content: ''; }
  25% { content: '・'; }
  50% { content: '・・'; }
  75% { content: '・・・'; }
}

.lo-bar {
  height: 5px;
  background: var(--green-l);
  border-radius: 99px;
  overflow: hidden;
}
.lo-bar-inner {
  height: 100%;
  width: 45%;
  background: var(--green);
  border-radius: 99px;
  animation: loBar 1.6s ease-in-out infinite;
}
@keyframes loBar {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

.lo-sub {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--ink-faint);
}

/* =========================================================
   会議前モード（第4表）
   ========================================================= */
.kstage {
  margin-top: 18px;
  background: var(--green-l);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.kstage-q {
  margin: 0 0 12px;
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--green-d);
  font-size: 1.02rem;
}
.kbefore {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px dashed var(--green);
}
.kbefore-lead {
  margin: 0 0 20px;
  font-size: .94rem;
  line-height: 1.85;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 12px;
  padding: 14px 16px;
}
.kbefore .field { margin-bottom: 18px; }
.kbefore textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.8;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.kbefore textarea:focus-visible,
.kbefore input[type="text"]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}
.kmode-only.is-hidden { display: none; }

/* 印刷ボタンの行 */
.printrow {
  margin-top: 18px;
  background: var(--orange-l);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.printrow-note {
  margin: 10px 0 0;
  font-size: .88rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* 印刷用紙は画面には出さない */
.printsheet { display: none; }

/* =========================================================
   会議前メモの印刷（A4・1枚）
   ========================================================= */
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 14mm; }

  body.is-printing-sheet { background: #fff !important; color: #000 !important; font-size: 10.5pt; line-height: 1.55; }
  body.is-printing-sheet > *:not(.printsheet) { display: none !important; }
  body.is-printing-sheet .printsheet { display: block !important; }

  .psheet-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 6mm; border-bottom: 1.2pt solid #000; padding-bottom: 2mm; margin-bottom: 3mm;
  }
  .psheet-title { font-size: 12.5pt; font-weight: 700; margin: 0; }
  .psheet-note { font-size: 8pt; margin: 0; white-space: nowrap; }

  .pmeta {
    display: grid; grid-template-columns: 20mm 1fr 18mm 1fr;
    border: .7pt solid #000; border-bottom: 0; margin-bottom: 4mm;
  }
  .pmeta > div { border-bottom: .7pt solid #000; padding: 1.6mm 2mm; font-size: 9pt; min-height: 7mm; }
  .pmeta .k { font-weight: 700; border-right: .7pt solid #000; }
  .pmeta .v { border-right: .7pt solid #000; }
  .pmeta .v:last-child { border-right: 0; }
  .pmeta .wide { grid-column: 2 / 5; border-right: 0; }
  .pmeta .hint { font-size: 7.5pt; font-weight: 400; color: #555; }

  .psec { margin-bottom: 4mm; }
  .psec-h {
    font-size: 10pt; font-weight: 700; margin: 0 0 2mm;
    border-left: 2.5pt solid #000; border-bottom: .7pt solid #000;
    padding: .8mm 0 .8mm 2.5mm;
  }
  .psec-h span { font-weight: 400; font-size: 8.5pt; margin-left: 2mm; }

  .pitems { margin: 0; padding-left: 5mm; font-size: 9.5pt; }
  .pitems > li { margin-bottom: 1.6mm; }
  .pitems ul { list-style: none; margin: .6mm 0 0; padding-left: 0; }
  .pitems ul li { font-size: 9pt; padding-left: 1em; text-indent: -1em; }

  .pblock { margin-bottom: 3.5mm; break-inside: avoid; }
  .pto { font-size: 9.5pt; font-weight: 700; margin: 0 0 1mm; border-bottom: .5pt dashed #666; padding-bottom: .6mm; }
  .pq { margin: 0 0 1.5mm; padding-left: 5mm; font-size: 8.5pt; color: #333; }
  .pq li { margin-bottom: .3mm; line-height: 1.5; }
  .wline { border-bottom: .5pt solid #9a9a9a; height: 8.5mm; }

  .praw { white-space: pre-wrap; font-size: 9.5pt; margin: 0 0 2mm; }
  .pfoot { margin-top: 5mm; padding-top: 2mm; border-top: .7pt solid #000; font-size: 8pt; color: #333; }
  .pfoot p { margin: 0; }
}

/* 会議前メモの引き継ぎカード */
.kresume {
  margin-top: 16px;
  background: var(--paper);
  border: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kresume-h {
  margin: 0 0 4px;
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--orange-d);
  font-size: 1.02rem;
}
.kresume-meta {
  margin: 0 0 10px;
  font-size: .86rem;
  color: var(--ink-faint);
}
.kresume-body {
  margin: 0 0 14px;
  font-size: .93rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.kresume-btns {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.kresume-use {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-family: var(--font-round);
  color: var(--ink);
  cursor: pointer;
}
.kresume-use input { width: 20px; height: 20px; accent-color: var(--orange); }

/* ケアプランの取り込み */
.planbox {
  background: var(--sky-l);
  border: 2px solid #cfe0ec;
  border-radius: 14px;
  padding: 16px 18px;
}
.planbox-note {
  margin: 6px 0 12px;
  font-size: .87rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.planbtn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.planbtn-row .kmode-only.is-hidden { display: none; }
.plan-btn { font-size: .93rem; }
.pic-slot {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: #2f5a80;
  text-align: center;
  margin-top: 4px;
}

/* 第4表：欄ごとにコピー */
.fieldcopy {
  margin-top: 20px;
  background: var(--green-l);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.fieldcopy-h {
  margin: 0 0 4px;
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--green-d);
  font-size: 1.02rem;
}
.fieldcopy-note {
  margin: 0 0 14px;
  font-size: .87rem;
  color: var(--ink-soft);
}
.fieldcopy-list { display: flex; flex-direction: column; gap: 10px; }
.fieldcopy-item {
  background: var(--paper);
  border: 1px solid #d5e6de;
  border-radius: 12px;
  padding: 12px 14px;
}
.fc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.fc-name {
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--green-d);
  font-size: .96rem;
}
.fc-btn.is-done { background: var(--green); color: #fff; border-color: var(--green); }
.fc-body {
  margin: 0;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 入力前の見本文字は、入力後とはっきり見分けがつく薄さにする
   （opacity:1 は Firefox が既定で薄くするのを打ち消すため） */
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="date"]::placeholder,
textarea::placeholder {
  color: #b6bfb8;
  opacity: 1;
}

/* ケアプラン取り込みを「いちばん早い道」として見せる */
.planbox { border-width: 3px; }
.planbox .field-label { font-size: 1.04rem; }
.planbox-lead {
  margin: 8px 0 14px;
  font-size: .93rem;
  line-height: 1.9;
  color: var(--ink);
}
.planbox-lead strong { color: #2c6a96; }
.planbox-note {
  margin: 12px 0 0;
  font-size: .85rem;
  line-height: 1.8;
  color: var(--ink-soft);
  border-top: 1px dashed #cfe0ec;
  padding-top: 10px;
}

/* 「または、手で入力する」の区切り */
.or-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 20px;
  color: var(--ink-faint);
  font-size: .88rem;
  font-weight: 700;
}
.or-sep::before, .or-sep::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}

/* 会議前モードの手順ガイド */
.howstrip {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  counter-reset: none;
}
.howstrip li {
  background: var(--paper);
  border: 2px solid var(--green);
  border-radius: 14px;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.howstrip b {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-round);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.howstrip span {
  font-size: .88rem;
  line-height: 1.7;
  font-weight: 700;
  color: var(--ink);
}
.howstrip-note {
  margin: 0 0 18px;
  font-size: .86rem;
  line-height: 1.8;
  color: var(--ink-soft);
  background: var(--orange-l);
  border-radius: 10px;
  padding: 10px 14px;
}
@media (max-width: 620px) {
  .howstrip { grid-template-columns: 1fr; gap: 8px; }
  .howstrip li { flex-direction: row; text-align: left; padding: 11px 14px; }
  .howstrip span br { display: none; }
}

/* ポータルから飛んできたときの着地位置。
   ヘッダーが固定なので、その分だけ手前で止める。 */
#kaigiStage, #step1Block { scroll-margin-top: 88px; }
@media (max-width: 860px) { #kaigiStage, #step1Block { scroll-margin-top: 72px; } }

/* 終了画面の「このあと、どうしますか？」 */
.exit-next-h {
  margin: 20px 0 10px;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink-soft);
  text-align: center;
}
.exit-next {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.exit-next .btn { flex: 1 1 auto; min-width: 180px; text-align: center; }
.exit-close-note {
  margin: 16px 0 0;
  font-size: .85rem;
  line-height: 1.8;
  color: var(--ink-faint);
  text-align: center;
}
.exit-result--cleared .exit-result-body strong { color: var(--green-d); }
@media (max-width: 520px) {
  .exit-next { flex-direction: column; }
  .exit-next .btn { min-width: 0; }
}

/* ===== AIからの質問は「1問1答」で短く見せる ===== */
.ai-answer-head--ask span { color: var(--sky, #386c99); }
.ai-q {
  margin: 4px 0 16px;
  font-size: 1.08rem;
  line-height: 1.85;
  font-weight: 700;
  color: var(--ink);
  background: var(--sky-l, #eaf3f9);
  border-left: 5px solid var(--sky, #386c99);
  border-radius: 10px;
  padding: 14px 16px;
  white-space: pre-wrap;
  /* 長くなっても、答える欄が画面外へ押し出されないようにする */
  max-height: 34vh;
  overflow-y: auto;
}
.ai-q-skip { margin: 12px 0 0; text-align: center; }
.ai-q-skip .btn-link { font-size: .88rem; }

/* 記録本文が長くても、ボタンが隠れないように中だけスクロールさせる */
/* 本文は「抜粋」にする。全文は下の全幅の欄で読むほうがずっと確かめやすい。
   （以前ここで max-height をかけていたが、パネル本来の高さを潰してしまっていた） */
.ai-answer-body {
  max-height: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  flex: none;
  position: relative;
}
.ai-answer-body.is-clipped { position: relative; }
.ai-body-more {
  margin: 0;
  padding: 8px 28px 14px;
  background: var(--paper);
  font-size: .84rem;
  color: var(--ink-faint);
  border-bottom: 1px dashed var(--line);
}
.ai-after-note {
  margin: 0;
  padding: 12px 28px 14px;
  background: var(--paper);
  font-size: .87rem;
  line-height: 1.8;
  color: var(--ink-soft);
  white-space: pre-wrap;
  border-top: 1px dashed var(--line);
  /* 長くても枠からはみ出さない。ここだけスクロールさせ、下のボタンは必ず見えるようにする */
  flex: 0 1 auto;
  min-height: 0;
  max-height: 26vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 560px) {
  .ai-after-note { padding: 10px 16px 12px; max-height: 22vh; }
}

/* ===== 下書きのあと「この文章でよいか」だけを聞く =====
   「作成する」「貼り付ける」と動詞を並べると、どちらを押すのか分からない。
   はい／いいえの二択にして、道筋を1本にする。
   50〜60代の方が主な利用者なので、字は大きめ、押す先は明確に。 */
.ai-decide {
  padding: 18px 22px 20px;
  background: var(--green-l);
  border-top: 2px solid var(--green);
  flex: none;   /* 本文が長くても、ここは縮めない */
}
.ai-decide.is-hidden { display: none; }
.ai-decide-q {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink);
}
.ai-decide-btns { display: flex; flex-direction: column; gap: 10px; }
.ai-decide-btns .btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  border-radius: 14px;
  line-height: 1.5;
}
.ai-decide-btns .btn b {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
}
.ai-decide-btns .btn small {
  display: block;
  margin-top: 3px;
  font-size: .82rem;
  font-weight: 400;
  opacity: .92;
}
.ai-decide-yes { box-shadow: 0 3px 0 var(--green-d); }
.ai-decide-no { background: var(--paper); border: 2px solid var(--line-2); color: var(--ink); }

/* 言い直しの欄（「直したい」を押したときだけ出す） */
.ai-revise {
  padding: 18px 22px 16px;
  background: var(--cream-2);
  border-top: 2px solid var(--orange);
}
.ai-revise.is-hidden { display: none; }
.ai-revise-h {
  margin: 0 0 10px;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--orange-d);
}
.ai-revise-back { margin: 10px 0 0; text-align: center; }
.ai-revise-back .btn-link { font-size: .88rem; }

@media (min-width: 560px) {
  .ai-decide-btns { flex-direction: row; }
  .ai-decide-btns .btn { flex: 1; }
}

/* === キー登録ゲート：安心のための補足（50〜60代の読みやすさを優先） === */
.kg-safe {
  list-style: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--green-l);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.kg-safe li {
  position: relative;
  padding-left: 26px;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink);
}
.kg-safe li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--green-d);
}
/* .modal-box p（要素セレクタ込み）のほうが強いので、同じ強さで上書きする */
.modal-box .kg-escape {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--cream-2);
  border-radius: 10px;
  font-size: .88rem;
  line-height: 1.8;
  color: #55645b;
}
.modal-box .kg-escape strong { color: var(--ink); }
.kg-escape a { font-weight: 700; }
@media (max-width: 520px) {
  .kg-safe li { font-size: .92rem; }
  .modal-box .kg-escape { font-size: .85rem; }
}

/* === 出力が途中で切れたときの警告（印刷・貼り付けの前に必ず気づけるように） === */
.truncwarn {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: #fff4e6;
  border: 3px solid var(--orange, #e08b2f);
  border-radius: var(--radius, 14px);
}
.truncwarn-h {
  margin: 0 0 8px;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.02rem;
  color: #9a5a06;
}
.truncwarn-b {
  margin: 0 0 8px;
  font-size: .93rem;
  line-height: 1.85;
  color: #5c4a33;
}
.truncwarn-b:last-child { margin-bottom: 0; }
.truncwarn-b strong { color: #9a5a06; }

/* ================================================================
   予防プラン専用ページ（body.yb-page）
   支援経過・担当者会議の画面と「別のページで作業している」と分かるよう、
   全体を抹茶・若草色（オリーブ系の緑）にそろえる。会議の青緑・第1表の藤色とは別の色。ほかの記録のボタンは出さない。
================================================================ */
body.yb-page { background: #f4f7ec; }
body.yb-page .site-header { background: rgba(244, 247, 236, .95); border-bottom-color: #d8e2c0; }
body.yb-page .site-nav a[aria-current="page"],
body.yb-page .nav a[aria-current="page"] { background: #e6eed4; color: #4a6420; }
body.yb-page .starter {
  background:
    radial-gradient(900px 400px at 85% -10%, #e3ecc9 0%, rgba(227, 236, 201, 0) 60%),
    radial-gradient(700px 380px at 5% 110%, #edf3de 0%, rgba(237, 243, 222, 0) 60%),
    #f4f7ec;
  border-bottom-color: #d8e2c0;
}
body.yb-page .starter-catch b { color: #4a6420; }
body.yb-page .stepline .n { background: #5c7a2a; box-shadow: 0 3px 0 #4a6420; }
body.yb-page .result-head .n { background: #5c7a2a; }
body.yb-page #rtypeRow, body.yb-page #typeHint { display: none !important; }
body.yb-page .kstage { background: #edf3de; border-color: #a3bb6e; }
body.yb-page .kbefore-lead { background: #fff; }
body.yb-page .howstrip li { border-color: #c6d69c; background: #fff; }
body.yb-page .howstrip b { background: #5c7a2a; }
body.yb-page .planbox { background: #fbfdf6; border-color: #c6d69c; }
body.yb-page .planbox-lead strong { color: #4a6420; }
body.yb-page .pic-slot { color: #4a6420; }
body.yb-page .notice.notice--soft { background: #fff7ec; }
body.yb-page .btn-primary { background: #5c7a2a; box-shadow: 0 5px 0 #4a6420; }
body.yb-page .btn-primary:hover { background: #6b8a35; }
body.yb-page .btn-primary:active { box-shadow: 0 2px 0 #4a6420; }
body.yb-page .btn-green { background: #5c7a2a; box-shadow: 0 5px 0 #4a6420; }
body.yb-page .btn-green:hover { background: #6b8a35; }
body.yb-page .panel, body.yb-page .card { border-color: #d8e2c0; }
body.yb-page .fieldcopy { background: #edf3de; border-color: #a3bb6e; }
body.yb-page .fieldcopy-h { color: #4a6420; }
body.yb-page textarea:focus-visible, body.yb-page input[type="text"]:focus-visible { border-color: #5c7a2a; outline-color: #5c7a2a; }

/* ----------------------------------------------------------------
   アセスメントAI専用ページ（body.as-page）
   トップページの入口カード（.tool-card--as／btn-as）の水色に、着地後の背景も合わせる。
   ---------------------------------------------------------------- */
body.as-page { background: #f3f8fb; }
body.as-page .site-header { background: rgba(243, 248, 251, .95); border-bottom-color: #cfe0e9; }
body.as-page .site-nav a[aria-current="page"],
body.as-page .nav a[aria-current="page"] { background: #e6f1f6; color: #1f5f77; }
body.as-page .kstage { background: #e6f1f6; border-color: #2b7f9e; }
body.as-page .kstage-q { color: #1f5f77; }
body.as-page .howstrip li { border-color: #2b7f9e; }
body.as-page .howstrip b { background: #2b7f9e; }
body.as-page textarea:focus-visible, body.as-page input[type="text"]:focus-visible { border-color: #2b7f9e; outline-color: #2b7f9e; }

/* ----------------------------------------------------------------
   課題整理総括表AI専用ページ（body.sk-page）
   トップページの入口カード（.tool-card--sk／btn-sk）の琥珀色に、着地後の背景も合わせる。
   もとは紫でケアプラン文例集（第1表）の入口と同じ色に見えていたため、
   2026-09-12 に入口・着地先とも琥珀色へ変更した。
   ---------------------------------------------------------------- */
body.sk-page { background: #faf3e2; }
body.sk-page .site-header { background: rgba(250, 243, 226, .95); border-bottom-color: #e8d3a0; }
body.sk-page .site-nav a[aria-current="page"],
body.sk-page .nav a[aria-current="page"] { background: #f7ecd4; color: #6b4d1c; }
body.sk-page .kstage { background: #f7ecd4; border-color: #8f6226; }
body.sk-page .kstage-q { color: #6b4d1c; }
body.sk-page .howstrip li { border-color: #8f6226; }
body.sk-page .howstrip b { background: #8f6226; }
body.sk-page textarea:focus-visible, body.sk-page input[type="text"]:focus-visible { border-color: #8f6226; outline-color: #8f6226; }


/* ================================================================
   キー登録ゲートの「分かれ道」
   ①この画面のまま作る（キー登録・おすすめ）を大きく上に、
   ②いつものAIに貼り付ける（プロンプトをコピー）を下に。
================================================================ */
.kgf-card { position: relative; background: var(--paper); border: 3px solid var(--line); border-radius: 20px; padding: 22px 22px 22px; margin: 22px 0 14px; }
.kgf-card--main { border-color: var(--green); border-width: 4px; box-shadow: 0 8px 26px rgba(79,157,128,.16); }
.kgf-ribbon { position: absolute; top: -15px; left: 18px; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 4px 16px; letter-spacing: .05em; white-space: nowrap; }
.kgf-h { font-family: var(--font-round); font-size: 1.22rem; line-height: 1.5; margin: 4px 0 2px; color: var(--ink); }
.kgf-card--main .kgf-h { color: var(--green-d); font-size: 1.32rem; }
.kgf-sub { font-size: 15px; color: var(--ink-faint) !important; margin: 0 0 10px !important; }
.kgf-p { font-size: .94rem; line-height: 1.8; margin: 0 0 12px !important; }
.kgf-p strong { color: var(--ink); }
.kgf-badges { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.kgf-badges li { background: var(--green-l); color: var(--green-d); font-size: 15px; font-weight: 700; border-radius: 999px; padding: 5px 13px; }
.kgf-badges li::before { content: "✓ "; }
.kgf-video { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--green-l); border: 2px solid var(--green); border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; color: var(--ink); }
.kgf-video:hover { background: #dcefe6; }
.kgf-video-thumb { position: relative; flex: none; width: 132px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-s); }
.kgf-video-thumb img { display: block; width: 132px; height: 74px; object-fit: cover; }
.kgf-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.5rem; background: rgba(0,0,0,.28); }
.kgf-video-text { display: flex; flex-direction: column; line-height: 1.5; }
.kgf-video-text strong { color: var(--green-d); font-size: 1.02rem; }
.kgf-video-text small { font-size: 15px; color: var(--ink-soft); margin-top: 3px; }
.kgf-main-btn { width: 100%; font-size: 1.15rem; padding: 16px 20px; }
.kgf-card--alt { border-color: #cfe0ec; background: var(--sky-l); padding: 18px 20px; }
.kgf-card--alt .kgf-h { color: #31688f; font-size: 1.1rem; }
.kgf-ai { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px !important; }
.kgf-ai span { background: #fff; border: 2px solid #cfe0ec; border-radius: 999px; font-size: 15px; font-weight: 700; color: #31688f; padding: 3px 12px; }
.kgf-steps { margin: 0 0 12px; padding-left: 1.4em; font-size: .9rem; line-height: 1.7; color: var(--ink-soft); }
.kgf-steps li { margin-bottom: 2px; }
.kgf-steps strong { color: var(--ink); }
.btn-sky { background: var(--sky); color: #fff; box-shadow: 0 5px 0 #4b87ae; }
.btn-sky:hover { background: #7fb5d8; }
.btn-sky:active { box-shadow: 0 2px 0 #4b87ae; }
.kgf-alt-btn { font-size: 1rem; padding: 12px 24px; }
.kgf-warn { background: #fff; border: 2px dashed #e3cf9e; border-radius: 12px; padding: 9px 13px; font-size: 15px !important; line-height: 1.7 !important; margin: 12px 0 0 !important; }
.kgf-warn strong { color: var(--ink); }
.kgf-foot { text-align: center; font-size: 15px; margin: 6px 0 0 !important; border-top: 2px solid var(--line); padding-top: 14px; }
.kgf-foot strong { color: var(--green-d); }
.kgf-back { background: none; border: none; color: var(--ink-faint); font-size: 15px; cursor: pointer; padding: 0; margin: 0 0 10px; font-family: inherit; }
.kgf-back:hover { color: var(--ink); text-decoration: underline; }
.kgf-open { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.kgf-open .btn { font-size: .95rem; padding: 11px 18px; }
.kgf-paste-steps { margin-bottom: 16px; }
@media (max-width: 520px) {
  .kgf-card { padding: 18px 14px; }
  .kgf-video { flex-direction: column; align-items: stretch; }
  /* キー画面の動画はボタン（.kgf-video-btn）で包んでいるので、そちらも縦に並べる。
     これが無いと、サムネが幅いっぱいに広がって文字が1文字ずつ縦に落ちる（2026-09-13に発見） */
  .kgf-video-btn { flex-direction: column; align-items: stretch; }
  .kgf-video-thumb, .kgf-video-thumb img { width: 100%; height: auto; }
}

/* 分かれ道の案内役：ロボットの吹き出し */
.kgf-robot { display: flex; align-items: flex-end; gap: 14px; margin: 4px 0 6px; }
.kgf-robot-img { flex: none; width: 104px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 4px 8px rgba(90,70,40,.12)); }
.kgf-bubble { position: relative; flex: 1; background: #fff; border: 3px solid var(--green); border-radius: 20px; padding: 14px 18px 14px; }
.kgf-bubble::before { content: ""; position: absolute; left: -15px; bottom: 26px; width: 22px; height: 22px; background: #fff; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(45deg); border-radius: 0 0 0 5px; }
.kgf-bubble-hi { font-family: var(--font-round); font-weight: 700; color: var(--green-d); font-size: .95rem; margin: 0 0 2px !important; }
.kgf-bubble-title { font-family: var(--font-round); font-size: 1.32rem; line-height: 1.45; margin: 0 0 6px; color: var(--ink); }
.kgf-bubble-lead { font-size: .9rem; line-height: 1.7; margin: 0 !important; }
.kgf-bubble-lead strong { color: var(--ink); }
@media (max-width: 520px) {
  .kgf-robot { gap: 10px; }
  .kgf-robot-img { width: 72px; }
  .kgf-bubble { padding: 12px 14px; }
  .kgf-bubble-title { font-size: 1.04rem; }
  .kgf-bubble-title br { display: none; }
}

.kgf-robot--sm { margin: 0 0 10px; }
.kgf-robot--sm .kgf-robot-img { width: 64px; }
.kgf-robot--sm .kgf-bubble { padding: 10px 14px 10px; }
.kgf-robot--sm .kgf-bubble::before { bottom: 18px; }
.kgf-robot--sm .kgf-bubble-title { font-size: 1.08rem; margin-bottom: 4px; }
.kgf-robot--sm .kgf-bubble-lead { font-size: .86rem; }

/* ================================================================
   予防プラン：様式と同じ並びの「欄ごとにコピー」
================================================================ */
.ybform-lead { font-size: .9rem; line-height: 1.75; color: var(--ink-soft); margin: 0 0 14px; }
.ybform-sec { margin: 0 0 18px; }
.ybform-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 1rem; margin: 0 0 8px; color: var(--ink); }
.ybform-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #5c7a2a; color: #fff; font-size: .82rem; font-weight: 700; }
.ybform-hint { flex-basis: 100%; font-size: .8rem; font-weight: 400; color: var(--ink-faint); margin-left: 36px; }
.ybform-row { display: grid; gap: 8px; }
.ybform-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ybform-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ybform-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ybform-row--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ybc { background: var(--paper); border: 2px solid #c6d69c; border-radius: 12px; padding: 8px 10px 10px; min-width: 0; display: flex; flex-direction: column; }
.ybc.is-copied { background: #f4f7ec; border-color: #5c7a2a; }
.ybc--empty { border-style: dashed; opacity: .75; }
.ybc-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.ybc-name { font-size: .78rem; font-weight: 700; color: #4a6420; line-height: 1.4; }
.ybc-btn { flex: none; font-size: .78rem; padding: 4px 10px; }
.ybc-btn.is-done { background: #5c7a2a; color: #fff; border-color: #5c7a2a; }
.ybc-b { font-size: .86rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.ybc--empty .ybc-b { color: var(--ink-faint); font-size: .8rem; }
/* 4領域の表 */
.ybform-table { display: grid; gap: 6px; }
.ybform-tr { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.ybform-tr--head { font-size: .78rem; font-weight: 700; color: #4a6420; }
.ybform-th { background: #e6eed4; border-radius: 8px; padding: 6px 8px; text-align: center; }
.ybform-rh { background: #e6eed4; border-radius: 8px; padding: 8px; font-size: .8rem; font-weight: 700; color: #4a6420; display: grid; place-items: center; text-align: center; line-height: 1.4; }
.ybform-tr--head .ybform-rh { background: transparent; }
.ybc--td .ybc-name { display: none; }
@media (max-width: 760px) {
  .ybform-row--3, .ybform-row--4, .ybform-row--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ybform-tr { grid-template-columns: 1fr; }
  .ybform-tr--head { display: none; }
  .ybform-rh { padding: 6px; }
  .ybc--td .ybc-name { display: inline; }
}
@media (max-width: 480px) {
  .ybform-row--2, .ybform-row--3, .ybform-row--4, .ybform-row--6 { grid-template-columns: 1fr; }
}

.yb-req { color: #b8452f !important; font-weight: 700 !important; }
.yb-start input[type="date"] { font-size: 1.05rem; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.yb-start input[type="date"]:focus-visible { border-color: #5c7a2a; outline: none; }
/* 貼り戻したあと、仕分け画面へ目を向けさせる */
.fieldcopy.is-flash { animation: fcFlash 1.8s ease-out; }
@keyframes fcFlash { 0% { box-shadow: 0 0 0 0 rgba(122,154,60,.55); } 60% { box-shadow: 0 0 0 14px rgba(122,154,60,0); } 100% { box-shadow: none; } }
.fc-arrived { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid #5c7a2a; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-weight: 700; color: #4a6420; }
.fc-arrived span { font-size: 1.3rem; }

/* ================================================================
   操作性の配色ルール（2026-09-05）
   「読む」「選ぶ」「押す」を形と色で分ける。50〜60代のPCが苦手な方が迷わないための決まり。
================================================================ */
/* ---- 読む：説明は左線つきの注記。押せない見た目にする ---- */
.kbefore-lead, .planbox-lead, .planbox-note, .mini-note, .howstrip-note, .type-hint, .kresume-body {
  background: #faf7f2; border-left: 6px solid #ddd0bd; border-radius: 0 10px 10px 0;
  padding: 10px 14px; color: #5f5a56;
}
.planbox-lead strong { color: #3c3a37; }
.notice.notice--soft { background: #fff4e6; border: 0; border-left: 6px solid var(--orange); border-radius: 0 10px 10px 0; box-shadow: none; }

/* ---- 入れる場所：点線の枠＋「ここに入れる」の札（ステップ1と同じ目印） ---- */
.planbox { background: #fff; border: 3px dashed var(--green); border-radius: 16px; position: relative; padding-top: 30px; }
.planbox::before { content: "ここに入れる"; position: absolute; top: -16px; left: 16px; background: var(--green); color: #fff;
  font-weight: 700; font-size: .9rem; border-radius: 999px; padding: 5px 16px; line-height: 1.4; }
.planbox .field-label { color: var(--green-d); }
body.yb-page .planbox { border-color: #5c7a2a; }
body.yb-page .planbox::before { background: #5c7a2a; }
body.yb-page .planbox .field-label { color: #4a6420; }

/* ---- 押す（入れる）：緑の塗りつぶし。入れ終わると白地＋✓ に変わる ---- */
.plan-btn, .btn-quiet.plan-btn {
  background: var(--green); color: #fff; border: 2px solid var(--green-d);
  box-shadow: 0 4px 0 var(--green-d); font-weight: 700; padding: 12px 22px; font-size: 1rem;
}
.plan-btn:hover { background: #4a8f74; }
.plan-btn:active { box-shadow: 0 2px 0 var(--green-d); transform: translateY(2px); }
.plan-btn.is-done { background: #fff; color: var(--green-d); border-color: var(--green); box-shadow: none; }
.plan-btn.is-done::before { content: "✓ "; }
.plan-btn .pb-count { font-weight: 700; margin-left: .3em; }
body.yb-page .plan-btn { background: #5c7a2a; border-color: #4a6420; box-shadow: 0 4px 0 #4a6420; }
body.yb-page .plan-btn:hover { background: #6b8a35; }
body.yb-page .plan-btn.is-done { background: #fff; color: #4a6420; border-color: #5c7a2a; box-shadow: none; }
.pic-btn.is-done, .audio-btn.is-done { background: var(--green-l); }
.pic-btn.is-done::before { content: "✓ "; font-weight: 700; color: var(--green-d); }

/* ---- 選ぶ：四角い選択肢。選ぶと緑塗り＋✓（ピル型は「押す」専用） ---- */
.pick label { border-radius: 10px; border: 2px solid #cfc6b8; background: #fff; }
.pick input:checked + label { background: var(--green); color: #fff; border-color: var(--green-d); }
.pick input:checked + label .f { color: #ffffff; }
.pick input:checked + label::before { content: "✓ "; font-weight: 700; }
body.yb-page .pick input:checked + label { background: #5c7a2a; border-color: #4a6420; }

/* ---- 補助：消す・変える・もう一度 は文字リンク ---- */
#kDropSheet, #changeKeyBtn, #clearKeyBtn, #audioRunBtn, #studioCopyBtn {
  background: transparent; border: 0; color: var(--green-d); text-decoration: underline; box-shadow: none; padding: 4px 8px;
}
#clearKeyBtn { color: var(--red); }

/* ---- 進む：オレンジは1画面に1つ。会議前モードの結果は「印刷」が主役、コピーは緑 ---- */
body.kb-before [data-copy="finalText"].btn-primary { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
body.kb-before [data-copy="finalText"].btn-primary:hover { background: #4a8f74; }

@media (max-width: 520px) {
  .plan-btn { width: 100%; text-align: center; }
  .planbox::before { font-size: .84rem; }
}

/* ---- ステップ1の「入れる」3つも塗りつぶしに揃える ---- */
.mic-btn, .pic-btn, .audio-btn { background: var(--green); color: #fff; border: 3px solid var(--green-d); box-shadow: 0 4px 0 var(--green-d); }
.mic-btn:hover, .pic-btn:hover, .audio-btn:hover { background: #4a8f74; }
.mic-btn svg, .pic-btn svg, .audio-btn svg { fill: #fff; }
.pic-btn-sub, .audio-btn-sub { color: rgba(255,255,255,.92); background: transparent; border-color: transparent; padding-left: 0; padding-right: 0; }
.mic-btn.is-on { background: var(--red); border-color: #a2433d; box-shadow: 0 4px 0 #a2433d; }
.pic-btn.is-done, .audio-btn.is-done { background: #fff; color: var(--green-d); border-color: var(--green); box-shadow: none; }
.pic-btn.is-done svg, .audio-btn.is-done svg { fill: var(--green-d); }
.pic-btn.is-done .pic-btn-sub, .audio-btn.is-done .audio-btn-sub { color: var(--green-d); background: var(--green-l); border-color: var(--green); }
/* 会議前メモの印刷ボタン（.btn-orange の定義が抜けていた） */
.btn-orange { background: var(--orange); color:#2a2420; box-shadow: 0 5px 0 var(--orange-d); }
.btn-orange:hover { background: #f5a25e; }

h1.starter-catch { font-size: 1.4rem; margin: 0 0 10px; }

/* 予防プラン画面の「進む」は若草の地なので文字は白 */
body.yb-page .btn-primary { color: #fff; }

/* ================================================================
   毎日使う導線（ホーム画面／デスクトップに追加・お気に入り）
   ================================================================ */
.daily-card { margin-top: 22px; background: #e8f4ef; border: 2px solid #bfdccf; border-radius: 16px; padding: 16px 18px; }
.daily-card-head { display: flex; align-items: flex-start; gap: 12px; }
.daily-card-icon { font-size: 1.5rem; line-height: 1; flex: none; margin-top: 2px; }
.daily-card-title { margin: 0 0 4px; font-family: var(--round); font-weight: 700; font-size: 1.08rem; color: #2f6650; }
.daily-card-lead { margin: 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.7; }
.daily-card-close { margin-left: auto; background: transparent; border: 0; font-size: 1.2rem; color: var(--ink-soft); cursor: pointer; padding: 4px 8px; font-family: inherit; }
.daily-card-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.daily-card-btns .btn { min-height: 44px; }
.daily-card-note { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.7; }
.daily-card-note b { color: var(--ink); }
.daily-kbd { display: inline-block; border: 1.5px solid #bfb3a8; border-bottom-width: 3px; border-radius: 6px; padding: 0 8px; font-family: inherit; font-weight: 700; background: #fff; color: var(--ink); }

/* ================================================================
   アセスメントAI（/ai/assessment/）
   ================================================================ */
.pick > a.pick-go { display: block; border: 3px dashed var(--line); background: var(--paper); border-radius: 14px; padding: 12px 20px; font-family: var(--font-round); font-weight: 700; font-size: 1rem; line-height: 1.4; color: var(--ink); text-decoration: none; transition: border-color .12s, background-color .12s; }
.pick > a.pick-go .f { display: block; font-size: .74rem; font-weight: 400; color: var(--green-d); }
.pick > a.pick-go:hover { border-color: var(--green); background: var(--green-l); }
body.as-page .starter-catch b { color: #2b6f8a; }
body.as-page .btn-primary { background: #2b7f9e; color: #fff; box-shadow: 0 5px 0 #1f5f77; }
body.as-page .btn-primary:hover { background: #3690b0; }
body.as-page .btn-primary:active { box-shadow: 0 2px 0 #1f5f77; }
body.as-page .fieldcopy { background: #e9f3f7; border-color: #9fc6d6; }
body.as-page .fieldcopy-h { color: #1f5f77; }
body.as-page .planbox { border-color: #9fc6d6; }
.as-more { border: 2px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-top: 22px; overflow: hidden; }
.as-more .as-sheets { padding: 4px 20px 16px; }
.as-scene { margin: 6px 0 18px; }
.as-scene .pick label { padding: 10px 16px; }
.as-sheets { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; font-size: .9rem; color: var(--ink-soft); }
.as-sheets li { padding-left: 1.3em; text-indent: -1.3em; line-height: 1.6; }
.as-sheets li::before { content: '□ '; color: #2b7f9e; }
.as-consent { background: #fff7ec; border: 2px solid #f0d9b5; border-radius: 12px; padding: 10px 14px; font-size: .92rem; line-height: 1.7; margin: 0 0 14px; }

/* 「毎日使うなら」はポップアップ（1度だけ） */
.daily-modal-box { max-width: 560px; padding: 26px 26px 22px; }
.daily-modal-box .daily-card { margin-top: 0; border: 0; background: transparent; padding: 0; }
.daily-modal-box .daily-card-title { font-size: 1.22rem; }
.daily-modal-foot { margin-top: 18px; text-align: center; }
.daily-modal-foot .btn-link { font-size: .95rem; }

/* ================================================================
   印刷／PDF・Word の出力（欄ごとコピーの下）
   ================================================================ */
.docexport { margin-top: 18px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.docexport-h { margin: 0 0 4px; font-family: var(--font-round); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.docexport-note { margin: 0 0 12px; font-size: .93rem; color: var(--ink-soft); line-height: 1.75; }
.docexport-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.docexport-row label { font-weight: 700; font-size: .95rem; }
.docexport-row label .field-hint { font-weight: 400; color: var(--ink-faint); font-size: .85rem; margin-left: 6px; }
.docexport-row input { flex: 1 1 260px; max-width: 420px; min-height: 42px; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font-family: inherit; font-size: 1rem; }
.docexport .btn-row { gap: 10px; }
.docexport-small { margin: 8px 0 0; font-size: .9rem; color: var(--green-d); min-height: 1.2em; }
body.as-page .docexport { border-color: #9fc6d6; }
#docPrint { display: none; }
@media print {
  body.is-printing-doc { background: #fff !important; color: #000 !important; font-family: "游ゴシック", "Yu Gothic", "Hiragino Sans", "Meiryo", sans-serif; font-size: 10.5pt; line-height: 1.6; }
  body.is-printing-doc > *:not(#docPrint) { display: none !important; }
  body.is-printing-doc #docPrint { display: block !important; }
  #docPrint .dp-head { text-align: center; margin: 0 0 4mm; }
  #docPrint .dp-title { font-size: 16pt; margin: 0; }
  #docPrint .dp-sub { font-size: 9.5pt; color: #555; margin: 1mm 0 0; }
  #docPrint .dp-meta { width: 100%; border-collapse: collapse; margin: 0 0 5mm; font-size: 10pt; }
  #docPrint .dp-meta th, #docPrint .dp-meta td { border: .6pt solid #9fc6d6; padding: 1.4mm 2.5mm; text-align: left; vertical-align: top; }
  #docPrint .dp-meta th { width: 28%; background: #eaf2f6; font-weight: 700; }
  #docPrint .dp-meta td { min-height: 6mm; }
  #docPrint .dp-group { margin: 0 0 4mm; }
  #docPrint .dp-group h2 { font-size: 12pt; color: #1f5f77; border-bottom: .9pt solid #1f5f77; padding: 0 0 1mm; margin: 5mm 0 2mm; break-after: avoid; }
  #docPrint .dp-field { break-inside: avoid; margin: 0 0 2.5mm; }
  #docPrint .dp-field h3 { font-size: 10.5pt; margin: 2mm 0 1mm; break-after: avoid; }
  #docPrint .dp-body { white-space: pre-wrap; margin: 0; }
  #docPrint .dp-foot { font-size: 8pt; color: #555; margin: 8mm 0 0; border-top: .5pt solid #999; padding-top: 2mm; }
}

/* 課題整理総括表AI
   2026-09-12：もとは紫（ケアプラン文例集＝第1表の入口と同じ色で見分けにくかった）。
   トップページの入口カード・着地後のページ全体（body.sk-page）と同じ琥珀色に揃えた。 */
.tosoukatsu { margin-top: 16px; background: #f7ecd4; border: 2px solid #e8d3a0; border-radius: 16px; padding: 16px 18px; }
.tosoukatsu p { margin: 0 0 12px; font-size: .93rem; color: var(--ink-soft); line-height: 1.75; }
/* .tosoukatsu-h も <p> なので、上の「.tosoukatsu p」に負けないよう詳細度を上げる
   （2026-09-12 に発見：もとの紫のときからずっと、見出しの色が効いていなかった） */
.tosoukatsu .tosoukatsu-h { margin: 0 0 4px; font-family: var(--font-round); font-weight: 700; color: #6b4d1c; font-size: 1.05rem; }
.btn-sk { background: #8f6226; color: #fff; box-shadow: 0 5px 0 #6b4d1c; }
.btn-sk:hover { background: #a8752e; }
body.sk-page .starter-catch b { color: #6b4d1c; }
.sk-assess textarea { min-height: 200px; font-size: .95rem; }
#docPrint .dp-rows { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 1mm 0 3mm; }
#docPrint .dp-rows th, #docPrint .dp-rows td { border: .5pt solid #9fc6d6; padding: 1mm 1.6mm; vertical-align: top; text-align: left; }
#docPrint .dp-rows th { background: #eaf2f6; }
#docPrint .dp-rows tr { break-inside: avoid; }

/* 課題整理総括表（様式5）の印刷紙面 */
/* 用紙の向き（A4横）は、印刷の直前に JS が @page を差し込んで決める */
#docPrint.dp-landscape { font-size: 7.6pt; line-height: 1.3; }
#docPrint .sk-title { position: relative; text-align: center; margin: 0 0 2mm; }
#docPrint .sk-title h1 { font-size: 12pt; margin: 0; }
#docPrint .sk-form { position: absolute; right: 0; top: 0; font-size: 8pt; }
#docPrint table.sk-head, #docPrint table.sk-top, #docPrint table.sk-main { width: 100%; border-collapse: collapse; table-layout: fixed; }
#docPrint .sk-head td { padding: .6mm 1.5mm; font-size: 8pt; vertical-align: bottom; }
#docPrint .sk-head .sk-lab { width: 18mm; white-space: nowrap; }
#docPrint .sk-head .sk-lab-w { width: 30mm; white-space: nowrap; }
#docPrint .sk-head .sk-line { border-bottom: .5pt solid #000; }
#docPrint .sk-head .sk-dono { width: 6mm; }
#docPrint .sk-head .sk-gap, #docPrint .sk-top .sk-gap, #docPrint .sk-main .sk-gap { width: 3mm; border: 0 !important; }
#docPrint table.sk-top { margin: 1.5mm 0 2mm; }
#docPrint .sk-top td { border: .5pt solid #000; padding: .6mm 1.2mm; vertical-align: top; height: 6mm; }
#docPrint .sk-top .sk-lab2 { width: 32mm; text-align: center; vertical-align: middle; }
#docPrint .sk-top .sk-lab2 small { font-size: 7pt; }
#docPrint .sk-top .sk-ikou { width: 68mm; }
/* 列の幅（合計283mm＝A4横の印刷できる幅）。table-layout:fixed は colgroup の幅を使う */
#docPrint .sk-main .c-grp  { width: 9mm; }
#docPrint .sk-main .c-item { width: 31mm; }
#docPrint .sk-main .c-now  { width: 42mm; }
#docPrint .sk-main .c-fac  { width: 15mm; }
#docPrint .sk-main .c-poss { width: 26mm; }
#docPrint .sk-main .c-note { width: 68mm; }
#docPrint .sk-main .c-gap  { width: 3mm; }
#docPrint .sk-main .c-mit  { width: 41mm; }
#docPrint .sk-main .c-need { width: 41mm; }
#docPrint .sk-main .c-pri  { width: 7mm; }
#docPrint .sk-main th, #docPrint .sk-main td { border: .5pt solid #000; padding: .35mm 1mm; vertical-align: middle; }
#docPrint .sk-main th { font-weight: 700; text-align: center; font-size: 8pt; background: #f2f2f2; }
#docPrint .sk-main th small { font-weight: 400; font-size: 6.5pt; }
#docPrint .sk-main .sk-grp { text-align: center; font-weight: 700; font-size: 7.2pt; }
#docPrint .sk-main .sk-item { font-weight: 700; font-size: 7.2pt; }
#docPrint .sk-main .sk-now { text-align: center; white-space: nowrap; }
#docPrint .sk-main .sk-poss { text-align: center; white-space: nowrap; }
#docPrint .sk-main .sk-fac { text-align: center; white-space: nowrap; font-size: 7pt; }
#docPrint .sk-main .sk-note { font-size: 6.9pt; line-height: 1.25; }
#docPrint .sk-main .sk-mit, #docPrint .sk-main .sk-need { vertical-align: top; font-size: 7pt; }
#docPrint .sk-main .sk-pri { text-align: center; font-weight: 700; }
#docPrint .dp-opts { display: inline-flex; gap: 1.8mm; justify-content: center; font-size: 6.9pt; }
#docPrint .dp-opt { display: inline-block; padding: 0 .6mm; border: .6pt solid transparent; border-radius: 50%; }
#docPrint .dp-opt.is-on { border-color: #000; font-weight: 700; }
#docPrint .sk-notes { margin-top: 1.5mm; columns: 2; column-gap: 6mm; }
#docPrint .sk-notes p { margin: 0 0 .4mm; font-size: 6pt; line-height: 1.3; break-inside: avoid; }
#docPrint.dp-landscape .dp-foot { margin-top: 1.5mm; font-size: 6.5pt; }

/* ================================================================
   AIの返事の画面：どの場面でも、枠からはみ出さないようにする
   （質問／下書き＋補足／言い直し、パソコンもスマホも、縦に短い画面も）
   ================================================================ */
.ai-answer > .ai-answer-head,
.ai-answer > .ai-answer-reply,
.ai-answer > .ai-q-skip,
.ai-answer > .ai-body-more,
.ai-answer > .ai-decide,
.ai-answer > .ai-revise,
.ai-answer > .ai-answer-ok { flex: none; }

/* 長くなりうる3つだけを、縮んでスクロールする場所にする */
.ai-answer > .ai-q,
.ai-answer > .ai-answer-body,
.ai-answer > .ai-after-note { flex: 0 1 auto; min-height: 0; }
.ai-answer > .ai-q { overflow-y: auto; overscroll-behavior: contain; }

/* 縦に短い画面（ノートPCや横向きのスマホ）では、見せる量を減らす */
@media (max-height: 780px) {
  .ai-answer { max-height: 94vh; }
  .ai-answer-body { -webkit-line-clamp: 4; }
  .ai-after-note { max-height: 18vh; }
  .ai-q { max-height: 30vh; }
}
@media (max-height: 620px) {
  .ai-answer-body { -webkit-line-clamp: 3; }
  .ai-after-note { max-height: 14vh; }
  .ai-q { max-height: 24vh; }
  .ai-decide { padding: 12px 16px 14px; }
}

/* キーの設定画面に置く動画の案内（分かれ道の画面と同じ見た目で、余白だけ調える） */
.kgf-video--key { margin: 14px 0 6px; }

/* --- キー画面：その場で再生する動画と、キーなしで使う道 --- */
.kgf-video-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.kgf-video-player { width: 100%; border-radius: 12px; border: 1px solid var(--line-2); background: #000; display: block; }
.kg-alt {
  margin: 18px 0 4px; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fbfaf8;
}
.kg-alt-title { margin: 0 0 4px; font-weight: 700; font-size: .98rem; }
.kg-alt-desc  { margin: 0 0 10px; font-size: .9rem; line-height: 1.7; color: #5c4f51; }
.kg-alt-btn   { width: 100%; }

/* 2026-09-13：ヘッダーの「トップへ」「ケアマネのミカタ」を、ミカタのロゴ＋文字の入口にそろえる。
   高さはとなりの「メニュー」ボタン（44px前後）に合わせる。色はトップのロゴと同じローズ。 */
.home-brand {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 15px 6px 9px;
  border: 2px solid #f0dcda; border-radius: 999px; background: #fff;
  color: #8c3a4d; text-decoration: none; white-space: nowrap;
  font-family: var(--font-round); font-weight: 700; font-size: .95rem; line-height: 1.2; letter-spacing: .02em;
  transition: background-color .12s ease, border-color .12s ease;
}
.home-brand:hover { background: #fae9ec; border-color: #e0c3c0; }
.home-brand:focus-visible { outline: 3px solid #a8465c; outline-offset: 2px; }
.home-brand-mark { width: 28px; height: 28px; flex: none; }

/* スマホ幅ではロゴだけにする（文字は読み上げ用に残す）。
   文字まで出すと、左のロゴ文字が「ケアプラ｜ン文例集」と折れて見出しが崩れるため（2026-09-13 実測）。 */
@media (max-width: 600px) {
  .home-brand { padding: 6px; gap: 0; }
  .home-brand-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* キー登録の完了メッセージ：ロボットの吹き出し（2026-09-13） */
.kd-box { max-width: 560px; padding: 34px 26px 24px; }
.kd-box .kgf-robot { margin: 0 0 14px; }
.kd-box .kgf-robot-img { width: 104px; animation: kd-hop .8s cubic-bezier(.3, 1.4, .5, 1) both; }
.kd-box .kgf-bubble { animation: kd-pop .45s ease-out .25s both; }
.kd-box .kgf-bubble-title { font-size: 1.32rem; margin: 0 0 8px; }
.kd-box .kgf-bubble-lead { font-size: .95rem; }
.modal-box .kd-note { font-size: .86rem; color: var(--ink-soft); line-height: 1.7; margin: 0 0 16px; }
.kd-go { width: 100%; padding: 18px 20px; font-size: 1.15rem; }
@keyframes kd-hop {
  0%   { opacity: 0; transform: translateY(14px) rotate(-6deg); }
  70%  { opacity: 1; transform: translateY(-6px) rotate(3deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes kd-pop {
  0%   { opacity: 0; transform: scale(.94); }
  100% { opacity: 1; transform: none; }
}
@media (max-width: 520px) {
  .kd-box { padding: 46px 16px 18px; }
  .kd-box .kgf-robot-img { width: 72px; }
  .kd-box .kgf-bubble-title { font-size: 1.1rem; }
  /* 共通の吹き出しはスマホで改行を消すが、ここでは「むずかしい準備を、｜やりきりましたね」で切りたい */
  .kd-box .kgf-bubble-title br { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .kd-box .kgf-robot-img, .kd-box .kgf-bubble { animation: none; }
}

/* キーなしで試す入口（?start=paste）の手順（2026-09-14） */
.paste-hint { background: #e8f4ef; border: 2px solid #b9dccb; border-radius: 14px; padding: 14px 18px; margin: 0 0 18px; }
.paste-hint-h { margin: 0 0 6px; font-weight: 700; color: #2f6650; font-family: var(--font-round); font-size: 1.02rem; }
.paste-hint ol { margin: 0 0 6px; padding-left: 1.3em; line-height: 1.85; }
.paste-hint-note { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* 録音から始める入口（?start=audio）の手順（2026-09-15）。50〜60代の方でも読みやすく、押しやすく */
.audio-start { background: #e8f4ef; border: 2px solid #b9dccb; border-radius: 16px; padding: 18px 20px; margin: 0 0 20px; }
.audio-start-h { margin: 0 0 8px; font-weight: 700; color: #2f6650; font-family: var(--font-round); font-size: 1.12rem; }
.audio-start-steps { margin: 0 0 14px; padding-left: 1.4em; line-height: 1.9; font-size: 1.02rem; }
.audio-start-steps li { margin: 0 0 6px; }
.audio-start-s { display: block; font-size: .9rem; color: var(--ink-soft); }
.audio-start-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 26px; border: 0; border-radius: 999px; background: #3b7d64; color: #fff; font-family: inherit; font-weight: 700; font-size: 1.12rem; cursor: pointer; box-shadow: 0 4px 0 #2a5c49; }
.audio-start-btn:hover { background: #2f6650; }
.audio-start-btn:focus-visible { outline: 3px solid #f0b93a; outline-offset: 3px; }
.audio-start-note { margin: 12px 0 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.8; }
.audio-start-note a { color: #2f6650; font-weight: 700; }
.audio-btn.is-glow { box-shadow: 0 0 0 4px rgba(59, 125, 100, .35); }

/* 貼り付け忘れの確認・締めのひとこと・自分専用の端末（2026-09-16） */
.exit-unpasted { background: #fff4e0; border: 2px solid #f0c77a; border-radius: 14px; padding: 14px 16px; margin: -6px 0 16px; text-align: left; }
.exit-unpasted-h { margin: 0 0 4px; font-weight: 700; color: #8a5a00; font-size: 1.05rem; }
.exit-unpasted-b { margin: 0 0 10px; font-size: .95rem; line-height: 1.8; color: var(--ink); }
.exit-unpasted-btn { min-height: 48px; font-size: 1rem; }
.exit-mikata { margin: -4px 0 12px; font-family: var(--font-round); font-weight: 700; color: #2f6650; font-size: 1.02rem; }
.exit-own-note { display: none; margin: 10px 0 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.8; }
#exitChoiceView.is-own-device .exit-own-note { display: block; }
#exitChoiceView.is-own-device .exit-choice--shared,
#exitChoiceView.is-own-device .exit-divider { display: none; }
.leave-card { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(92vw, 440px); box-sizing: border-box; background: #fff; border: 2px solid #f0c77a; border-radius: 16px; box-shadow: 0 12px 36px rgba(0, 0, 0, .22); padding: 20px 20px 16px; z-index: 10050; text-align: center; }
.leave-card.is-hidden { display: none; }
.leave-card-x { position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.2rem; color: var(--ink-soft); cursor: pointer; }
.leave-card-h { margin: 0 0 4px; font-weight: 700; color: #8a5a00; font-size: 1.1rem; }
.leave-card-b { margin: 0 0 12px; font-size: .98rem; color: var(--ink); }
.leave-card-btn { min-height: 50px; font-size: 1.05rem; padding: 10px 28px; }
.leave-card-mikata { margin: 12px 0 0; font-family: var(--font-round); font-weight: 700; color: #2f6650; font-size: 1rem; }

/* 「できた文章」が枠に入りきらないときの案内（2026-09-16） */
.final-scroll-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 0; padding: 10px 14px; background: #fff4e0; border: 2px solid #f0c77a; border-radius: 12px; color: #6b4600; font-weight: 700; font-size: .98rem; line-height: 1.7; }
.final-scroll-hint.is-hidden { display: none; }
.final-scroll-hint.is-end { background: #e8f4ef; border-color: #b9dccb; color: #2f6650; }
.final-scroll-hint .fsh-msg { flex: 1 1 260px; }
.final-scroll-hint .fsh-expand { min-height: 44px; font-size: .95rem; }

/* 下書きの抜粋の案内（2026-09-16）：「できた文章」の案内と同じオレンジにそろえる */
.ai-body-more { margin: 0; padding: 10px 22px; background: #fff4e0; border-top: 2px solid #f0c77a; border-bottom: 2px solid #f0c77a; color: #6b4600; font-weight: 700; font-size: .92rem; line-height: 1.7; }

/* typepick-0919 */
.tp-src, .tp-off, .tp-empty { display: none !important; }
.tp-pick { margin-top: 4px; }
.tp-lead { font-size: 15px; color: var(--ink-soft); margin: 0 0 12px; }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tp-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 78px; text-align: left; background: #fff; border: 2px solid #cfc6b8; border-radius: 14px; padding: 14px 16px; font-family: inherit; color: var(--ink); cursor: pointer; transition: border-color .12s, background-color .12s; }
.tp-card:hover { border-color: var(--green); }
.tp-card.is-on { border: 3px solid var(--green-d); background: var(--green-l); padding: 13px 15px; }
.tp-card:focus-visible, .tp-opt:focus-visible, .tp-lock-ch:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tp-ic { flex: 0 0 auto; font-size: 1.7rem; line-height: 1; }
.tp-t { display: block; font-family: var(--font-round); font-weight: 700; font-size: 1.08rem; line-height: 1.4; }
.tp-card.is-on .tp-t { color: var(--green-d); }
.tp-d { display: block; font-size: .86rem; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }
.tp-sub { margin-top: 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tp-q { font-weight: 700; margin: 0 0 10px; }
.tp-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-opt { min-height: 48px; font-family: inherit; font-size: 1rem; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: 2px solid #cfc6b8; background: #fff; color: var(--ink); cursor: pointer; }
.tp-opt:hover { border-color: var(--green); }
.tp-opt.is-on { background: var(--green); border-color: var(--green-d); color: #fff; }
.tp-opt.is-on::before { content: "✓ "; }
.tp-res { margin: 12px 0 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.7; }
.tp-res b { color: var(--ink); }
.tp-links { margin: 10px 0 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.7; }
.tp-lock { display: flex; align-items: center; gap: 14px; background: var(--green-l); border: 2px solid var(--green); border-radius: 14px; padding: 14px 16px; margin: 0 0 22px; }
.tp-lock-ic { flex: 0 0 auto; font-size: 1.8rem; line-height: 1; }
.tp-lock-tx { flex: 1 1 auto; min-width: 0; }
.tp-lock-cap { display: block; font-size: .82rem; font-weight: 700; color: var(--green-d); }
.tp-lock-tx b { display: block; font-family: var(--font-round); font-size: 1.12rem; line-height: 1.45; }
.tp-lock-tx small { display: block; font-size: .88rem; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }
.tp-lock-ch { flex: 0 0 auto; min-height: 44px; font-family: inherit; font-size: .92rem; font-weight: 700; background: #fff; border: 2px solid #cfc6b8; border-radius: 999px; padding: 9px 16px; color: var(--ink); cursor: pointer; }
.tp-lock-ch:hover { border-color: var(--green); }
#step2Line + .tp-lock { margin-top: 4px; }
body.yb-page .tp-lock { background: #edf3de; border-color: #a3bb6e; }
@media (max-width: 560px) {
  .tp-grid { gap: 8px; }
  .tp-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 0; }
  .tp-card.is-on { padding: 11px; }
  .tp-lock { flex-wrap: wrap; }
  .tp-lock-ch { width: 100%; }
}
#step1Block.tp-moved { margin-top: 34px; }
/* /typepick-0919 */

/* dai1-input-0919 */
.d1-field > label { display: flex; align-items: center; gap: 8px; font-size: 1.12rem; }
.d1-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-size: .9rem; flex: 0 0 auto; }
.d1-hint { font-size: .95rem; color: var(--ink-soft); margin: 4px 0 10px; line-height: 1.7; }
.d1-mic-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.d1-mic-row .mic-btn { padding: 10px 20px; }
.d1-more { margin: 4px 0 22px; background: #fff; border: 2px solid var(--line); border-radius: 14px; }
.d1-more > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ink); list-style-position: inside; }
.d1-more[open] > summary { border-bottom: 1px solid var(--line); }
.d1-more-body { padding: 14px 18px 18px; }
body.yb-page .d1-no { background: #5c7a2a; }
@media (max-width: 560px) { .d1-mic-row .mic-btn { width: 100%; justify-content: center; } }
/* /dai1-input-0919 */

/* kg-calm-0919 */
.kg-calm { margin: 18px 0 12px; background: #eef6f1; border: 2px solid #b9d8c7; border-radius: 14px; padding: 14px 18px; }
.kg-calm-h { margin: 0 0 6px; font-weight: 700; color: var(--green-d); }
.kg-calm-list { margin: 0; padding-left: 1.2em; line-height: 1.8; font-size: .95rem; }
.kg-calm-list li { margin: 2px 0; }
.kg-key-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.kg-tool { min-height: 44px; font-family: inherit; font-size: .92rem; font-weight: 700; background: #fff; color: var(--ink); border: 2px solid #cfc6b8; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.kg-tool:hover { border-color: var(--green); }
.kg-tool:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.kg-live { min-height: 1.4em; margin: 10px 0 0; font-size: .95rem; font-weight: 700; line-height: 1.6; }
.kg-live.is-ok { color: var(--green-d); }
.kg-live.is-warn { color: #9a4a12; }
.kg-other { margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.kg-other > summary { cursor: pointer; font-size: .95rem; color: var(--ink-soft); font-weight: 700; padding: 6px 0; }
.kg-other-body { margin-top: 10px; }
.kg-other-body .kg-alt { margin-top: 0; }
@media (max-width: 560px) { .kg-tool { flex: 1 1 100%; } }
/* /kg-calm-0919 */

/* tp-ex-0919 */
.tp-ex { margin: 12px 0 16px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.tp-ex-h { margin: 0 0 10px; font-weight: 700; color: var(--green-d); line-height: 1.6; }
.tp-ex-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 10px; align-items: stretch; }
.tp-ex-col { background: #faf6ef; border-radius: 10px; padding: 8px 12px; }
.tp-ex-col.is-after { background: var(--green-l); }
.tp-ex-l { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 2px; }
.tp-ex-col.is-after .tp-ex-l { color: var(--green-d); }
.tp-ex-col p { margin: 0; font-size: .92rem; line-height: 1.7; }
.tp-ex-arw { align-self: center; font-weight: 700; color: var(--green-d); font-size: 1.2rem; }
@media (max-width: 640px) { .tp-ex-row { grid-template-columns: 1fr; } .tp-ex-arw { transform: rotate(90deg); justify-self: center; } }
/* /tp-ex-0919 */

/* tp-demo-0919 */
.tp-ex-try { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.tp-demo-btn { min-height: 48px; font-family: inherit; font-size: 1rem; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--green-d); background: var(--green); color: #fff; cursor: pointer; }
.tp-demo-btn:hover { background: var(--green-d); }
.tp-demo-btn:disabled { opacity: .8; cursor: progress; }
.tp-demo-btn:focus-visible, .tp-demo-copy:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tp-ex-try-s { font-size: .9rem; color: var(--ink-soft); }
.tp-demo { margin: 0 0 18px; background: #fff; border: 3px solid var(--green); border-radius: 16px; padding: 16px 18px; }
.tp-demo-h { margin: 0 0 12px; font-weight: 700; font-size: 1.08rem; color: var(--green-d); }
.tp-demo-kind { font-size: .85rem; font-weight: 700; color: var(--ink-soft); margin-left: 6px; }
.tp-demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; }
.tp-demo-col { background: #faf6ef; border-radius: 12px; padding: 10px 14px; }
.tp-demo-col.is-out { background: var(--green-l); }
.tp-demo-l { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.tp-demo-col.is-out .tp-demo-l { color: var(--green-d); }
.tp-demo-col pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .95rem; line-height: 1.8; }
.tp-demo-copy { margin-top: 10px; min-height: 44px; font-family: inherit; font-size: .92rem; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--green); background: #fff; color: var(--green-d); cursor: pointer; }
.tp-demo-copied { display: block; margin-top: 6px; font-size: .88rem; color: var(--green-d); font-weight: 700; }
.tp-demo-note { margin: 12px 0 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.7; }
.tp-demo-cta { margin-top: 14px; background: #fff7ec; border: 2px solid #f3d5ae; border-radius: 12px; padding: 12px 16px; }
.tp-demo-cta-h { margin: 0 0 4px; font-weight: 700; }
.tp-demo-cta-p { margin: 0 0 10px; font-size: .95rem; line-height: 1.7; }
@media (max-width: 640px) { .tp-demo-grid { grid-template-columns: 1fr; } .tp-demo-btn, .tp-demo-go { width: 100%; } }
/* /tp-demo-0919 */

/* demo2-0919 */
.d2-try { margin: 4px 0 16px; }
.d2-demo { margin-top: 4px; }
.d2-step { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-weight: 700; }
.d2-step:first-of-type { margin-top: 4px; }
.d2-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-size: .85rem; flex: 0 0 auto; }
.d2-in + .d2-in { margin-top: 8px; }
.d2-in p, .d2-f p { margin: 0; line-height: 1.8; font-size: .95rem; }
.d2-chat { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.d2-q, .d2-a { margin: 0; line-height: 1.8; font-size: .95rem; display: flex; gap: 10px; }
.d2-a { margin-top: 6px; }
.d2-q b, .d2-a b { flex: 0 0 auto; display: inline-block; min-width: 3.4em; font-size: .8rem; text-align: center; border-radius: 999px; padding: 2px 8px; height: fit-content; margin-top: 3px; }
.d2-q b { background: var(--green); color: #fff; }
.d2-a b { background: #f3ece2; color: #5a4636; }
.d2-f + .d2-f { margin-top: 10px; }
.d2-fh { display: block; font-size: .85rem; font-weight: 700; color: var(--green-d); margin-bottom: 2px; }
.d2-tw { overflow-x: auto; }
.d2-table { width: 100%; min-width: 520px; border-collapse: collapse; background: #fff; font-size: .88rem; }
.d2-table th, .d2-table td { border: 1px solid #cfe3d8; padding: 5px 8px; text-align: left; line-height: 1.5; vertical-align: top; }
.d2-table thead th { background: #e3f0e9; font-weight: 700; }
.d2-more { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.7; }
body.yb-page .d2-no, body.yb-page .d2-q b { background: #5c7a2a; }
@media (max-width: 640px) { .d2-q, .d2-a { flex-direction: column; gap: 2px; } }
/* /demo2-0919 */

/* icf-0919 */
body.icf-page { background: #f4f1fa; }
body.icf-page .site-header { background: rgba(244, 241, 250, .95); border-bottom-color: #d9d0ec; }
body.icf-page .site-nav a[aria-current="page"], body.icf-page .nav a[aria-current="page"] { background: #ebe6f5; color: #46397d; }
body.icf-page .kstage { background: #ebe6f5; border-color: #5d4fa0; }
body.icf-page .kstage-q { color: #46397d; }
body.icf-page .howstrip li { border-color: #5d4fa0; }
body.icf-page .howstrip b { background: #5d4fa0; }
body.icf-page textarea:focus-visible, body.icf-page input[type="text"]:focus-visible { border-color: #5d4fa0; outline-color: #5d4fa0; }
body.icf-page .starter-catch b { color: #46397d; }
body.icf-page .btn-primary { background: #5d4fa0; color: #fff; box-shadow: 0 5px 0 #46397d; }
body.icf-page .btn-primary:hover { background: #6d5fb3; }
body.icf-page .btn-primary:active { box-shadow: 0 2px 0 #46397d; }
body.icf-page .fieldcopy { background: #efebf7; border-color: #c9bde3; }
body.icf-page .fieldcopy-h { color: #46397d; }
body.icf-page .planbox { border-color: #c9bde3; }
body.icf-page .docexport { border-color: #c9bde3; }
body.icf-page .stepline .n { background: #5d4fa0; box-shadow: 0 3px 0 #46397d; }
body.icf-page .result-head .n { background: #5d4fa0; }
body.icf-page .chip input:checked + label { background: #5d4fa0; border-color: #46397d; color: #fff; }
body.icf-page .tp-demo, body.icf-page .tp-demo-btn { border-color: #5d4fa0; }
body.icf-page .tp-demo-btn { background: #5d4fa0; }
body.icf-page .tp-demo-btn:hover { background: #46397d; }
body.icf-page .tp-demo-h, body.icf-page .d2-fh, body.icf-page .tp-demo-col.is-out .tp-demo-l { color: #46397d; }
body.icf-page .tp-demo-col.is-out { background: #efebf7; }
body.icf-page .d2-no, body.icf-page .d2-q b { background: #5d4fa0; }
.icf-boxes-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 14px; }
.icf-boxes-mini span { background: #fff; border: 2px solid #c9bde3; border-radius: 10px; padding: 8px 10px; font-size: .86rem; line-height: 1.5; color: var(--ink-soft); }
.icf-boxes-mini b { display: block; color: #46397d; font-size: .95rem; }
.toicf { background: #efebf7; border-color: #c9bde3; }
.toicf .tosoukatsu-h { color: #46397d; }
.btn-icf { background: #5d4fa0; color: #fff; }
.btn-icf:hover { background: #46397d; }
/* 6つの箱の図 */
.icf-figwrap { margin: 4px 0 18px; }
.icf-fig { background: #fff; border: 2px solid #c9bde3; border-radius: 14px; padding: 14px; }
.icf-row { display: grid; gap: 10px; align-items: stretch; }
.icf-row-top { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin: 0 auto; }
.icf-row-mid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
.icf-row-bot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.icf-lr, .icf-arrows { display: flex; align-items: center; justify-content: center; color: #8a7db8; font-weight: 700; font-size: 1.2rem; }
.icf-arrows { height: 22px; }
.icf-box { border: 2px solid #c9bde3; border-radius: 12px; padding: 10px 12px; background: #faf8fd; min-width: 0; }
.icf-health { background: #fff4f4; border-color: #e6b8b8; }
.icf-body { background: #f0f7fb; border-color: #b9d6e6; }
.icf-act { background: #eef7f0; border-color: #b7d9c3; }
.icf-part { background: #fff7e9; border-color: #ecd3a6; }
.icf-env { background: #f2f2f2; border-color: #cfcfcf; }
.icf-person { background: #f6eef7; border-color: #dcbfe0; }
.icf-h { margin: 0 0 6px; font-size: .98rem; font-family: var(--font-round); display: flex; flex-direction: column; gap: 1px; }
.icf-h small { font-size: .74rem; font-weight: 400; color: var(--ink-soft); line-height: 1.4; }
.icf-list { list-style: none; margin: 0; padding: 0; }
.icf-it { display: flex; gap: 6px; align-items: flex-start; font-size: .9rem; line-height: 1.55; padding: 3px 0; border-top: 1px dashed rgba(0,0,0,.08); }
.icf-it:first-child { border-top: none; }
.icf-it.is-empty { color: var(--ink-faint); }
.icf-sign { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #3b7d64; color: #fff; font-size: .8rem; font-weight: 700; margin-top: 2px; }
.icf-it.is-minus .icf-sign, .icf-sign.is-minus { background: #b2453e; }
.icf-links, .icf-mitate { margin-top: 12px; background: #f4f1fa; border-radius: 10px; padding: 10px 14px; }
.icf-links-h { margin: 0 0 4px; font-weight: 700; color: #46397d; font-size: .92rem; }
.icf-links ul { margin: 0; padding-left: 1.2em; font-size: .92rem; line-height: 1.7; }
.icf-mitate p:last-child { margin: 0; font-size: .95rem; line-height: 1.8; }
.icf-legend { margin: 10px 0 0; font-size: .85rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .icf-row-mid { grid-template-columns: 1fr; }
  .icf-lr { transform: rotate(90deg); height: 18px; }
  .icf-row-bot { grid-template-columns: 1fr; }
  .icf-boxes-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 印刷（A4横1枚） */
#docPrint .icf-fig { border: 1.5px solid #333; border-radius: 6px; padding: 4mm; font-size: 9.5pt; }
#docPrint .icf-box { border-color: #555; background: #fff; border-radius: 4px; padding: 2mm 3mm; }
#docPrint .icf-h { font-size: 10pt; }
#docPrint .icf-h small { font-size: 7.5pt; }
#docPrint .icf-it { font-size: 9pt; padding: 1px 0; }
#docPrint .icf-sign { width: 14px; height: 14px; font-size: 8pt; }
#docPrint .icf-links, #docPrint .icf-mitate { background: #f5f5f5; padding: 2mm 3mm; margin-top: 2mm; }
#docPrint .icf-links ul, #docPrint .icf-mitate p { font-size: 9pt; }
#docPrint .icf-arrows { height: 12px; }
/* /icf-0919 */

/* icf-sheet-0919 */
.icf-fig.icf-sheet { padding: 12px 14px 14px; }
.icf-sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 0 0 4px; font-size: .9rem; flex-wrap: wrap; }
.icf-sheet-title { font-weight: 700; color: #46397d; }
.icf-name { border-bottom: 1.5px solid #333; min-width: 13em; padding: 0 4px 2px; color: var(--ink-soft); }
.icf-sheet .icf-row { gap: 12px; }
.icf-sheet .icf-row-top { max-width: 460px; }
.icf-sheet .icf-row-mid { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1.25fr) 30px minmax(0, 1fr); gap: 0; }
.icf-sheet .icf-row-bot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10%; }
.icf-sheet .icf-box { position: relative; border: 2px solid #555; border-radius: 6px; padding: 14px 10px 10px; margin-top: 14px; }
.icf-sheet .icf-h { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: block; margin: 0; background: #fff; border: 2px solid #555; border-radius: 4px; padding: 2px 12px; font-size: .95rem; font-weight: 700; white-space: nowrap; line-height: 1.3; }
.icf-hint { margin: 0 0 6px; font-size: .74rem; color: var(--ink-soft); text-align: center; line-height: 1.4; }
.icf-sub { border: 1.5px solid #555; border-radius: 4px; background: #fff; margin-top: 8px; padding: 4px 8px 6px; }
.icf-sub h5, .icf-act-cols h5 { margin: 0 0 2px; font-size: .8rem; font-weight: 700; font-family: var(--font-round); }
.icf-sub h5 { color: #b2453e; }
.icf-act-cols { display: grid; grid-template-columns: 1fr 1fr; }
.icf-act-cols > div { min-width: 0; }
.icf-act-cols > div + div { border-left: 1px dashed #777; padding-left: 8px; }
.icf-act-cols > div:first-child { padding-right: 8px; }
.icf-act-cols h5 { color: #3b7d64; text-align: center; }
.icf-con { position: relative; height: 32px; }
.icf-hl { position: absolute; top: 50%; border-top: 2px solid #555; margin-top: -1px; }
.icf-vl { position: absolute; width: 0; border-left: 2px solid #555; margin-left: -1px; }
.icf-ah { position: absolute; width: 0; height: 0; }
.icf-ah.is-up, .icf-ah.is-dn { border-left: 5px solid transparent; border-right: 5px solid transparent; margin-left: -5px; }
.icf-ah.is-up { border-bottom: 8px solid #555; top: 0; }
.icf-ah.is-dn { border-top: 8px solid #555; bottom: 0; }
.icf-sheet .icf-lr { display: flex; align-items: center; margin-top: 14px; padding: 0 2px; }
.icf-hl2 { flex: 1 1 auto; height: 0; border-top: 2px solid #555; }
.icf-ah.is-l, .icf-ah.is-r { position: static; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.icf-ah.is-l { border-right: 8px solid #555; }
.icf-ah.is-r { border-left: 8px solid #555; }
.icf-sheet .icf-links { margin-top: 16px; }
@media (max-width: 700px) {
  .icf-sheet .icf-row-mid, .icf-sheet .icf-row-bot { grid-template-columns: 1fr; gap: 0; }
  .icf-sheet .icf-con, .icf-sheet .icf-lr { height: auto; display: block; text-align: center; color: #555; font-weight: 700; font-size: 1.1rem; line-height: 1; padding: 6px 0 0; margin: 0; }
  .icf-sheet .icf-con > *, .icf-sheet .icf-lr > * { display: none; }
  .icf-sheet .icf-con::after, .icf-sheet .icf-lr::after { content: "⇅"; }
  .icf-sheet .icf-row-bot .icf-box + .icf-box { margin-top: 18px; }
  .icf-sheet .icf-h { font-size: .9rem; }
  .icf-sheet-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .icf-sheet .icf-legend span { white-space: nowrap; }
  .icf-act-cols { grid-template-columns: 1fr; }
  .icf-act-cols > div + div { border-left: none; border-top: 1px dashed #777; padding: 6px 0 0; }
  .icf-act-cols > div:first-child { padding-right: 0; }
}
#docPrint .icf-sheet { border: none; padding: 0; }
#docPrint .icf-sheet-head { font-size: 9.5pt; margin-bottom: 2mm; }
#docPrint .icf-sheet-title { color: #000; }
#docPrint .icf-sheet .icf-box { border-color: #333; background: #fff; padding: 11px 6px 5px; margin-top: 11px; }
#docPrint .icf-sheet .icf-h { top: -11px; border-color: #333; font-size: 9.5pt; padding: 1px 8px; }
#docPrint .icf-hint { font-size: 7.5pt; margin-bottom: 1mm; }
#docPrint .icf-sub { border-color: #333; padding: 1mm 2mm; margin-top: 2mm; }
#docPrint .icf-sub h5, #docPrint .icf-act-cols h5 { font-size: 8pt; }
#docPrint .icf-con { height: 24px; }
#docPrint .icf-sheet .icf-lr { margin-top: 11px; }
#docPrint .icf-sheet .icf-links { margin-top: 3mm; }
/* /icf-sheet-0919 */

/* icf-print-0919 */
.icf-date { margin-left: 12px; color: var(--ink-soft); font-size: .9rem; }
.icf-paper-row .chip-row { margin-top: 4px; }
#docPrint .icf-sheet-head { justify-content: flex-start; gap: 8mm; align-items: flex-end; margin-bottom: 1mm; }
#docPrint .icf-sheet-title { margin-right: auto; }
#docPrint .icf-name { min-width: 50mm; color: #000; }
#docPrint .icf-date { color: #000; font-size: 9pt; margin-left: 0; }
#docPrint .dp-foot { margin-top: 2mm; padding-top: 1mm; font-size: 7pt; }
/* /icf-print-0919 */

/* case-line-0920 */
.caserail { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0 10px; }
.cr-h { width: min(100% - 32px, 1040px); margin: 0 auto 4px; font-size: .78rem; color: var(--ink-soft); }
.cr-list { width: min(100% - 32px, 1040px); margin: 0 auto; padding: 0; list-style: none; display: flex; align-items: stretch; gap: 4px; overflow-x: auto; }
.cr-i { flex: 1 1 0; min-width: 96px; position: relative; }
.cr-i + .cr-i::before { content: ""; position: absolute; left: -4px; top: 50%; width: 4px; border-top: 2px solid var(--line); }
.cr-in { display: flex; align-items: center; justify-content: center; gap: 5px; height: 100%; padding: 7px 6px; border: 2px solid var(--line); border-radius: 10px; background: #fbf9f6; color: var(--ink-soft); font-size: .82rem; text-decoration: none; line-height: 1.3; text-align: center; }
a.cr-in:hover { border-color: var(--green); color: var(--green-d); background: #fff; }
.cr-no { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: #e4ded4; color: #6b6560; font-size: .72rem; font-weight: 700; }
.cr-i.is-done .cr-in { border-color: #b7d9c3; background: #f2f9f4; color: var(--green-d); }
.cr-i.is-done .cr-no { background: var(--green); color: #fff; }
.cr-i.is-now .cr-in { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; }
.cr-i.is-now .cr-no { background: #fff; color: var(--green-d); }
.cr-i.is-soon .cr-in { opacity: .55; }
.cr-soon { font-size: .66rem; border: 1px solid currentColor; border-radius: 999px; padding: 0 4px; }
body.icf-page .cr-i.is-now .cr-in { border-color: #5d4fa0; background: #5d4fa0; }
body.icf-page .cr-i.is-now .cr-no { color: #46397d; }
.cr-short { display: none; }
@media (max-width: 860px) {
  .caserail { padding: 6px 0 8px; }
  .cr-h { display: none; }
  .cr-list { gap: 3px; }
  .cr-i { min-width: 62px; }
  .cr-in { flex-direction: column; gap: 2px; padding: 5px 3px; font-size: .7rem; }
  .cr-name { display: none; }
  .cr-short { display: inline; }
  .cr-soon { display: none; }
  .cr-no { width: 17px; height: 17px; font-size: .68rem; }
}
.carry { background: #f2f9f4; border: 2px solid #b7d9c3; border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; }
.carry-h { margin: 0 0 6px; font-weight: 700; color: var(--green-d); font-size: .95rem; }
.carry-list { list-style: none; margin: 0; padding: 0; }
.carry-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 0; border-top: 1px dashed rgba(0,0,0,.08); }
.carry-list li:first-child { border-top: none; }
.carry-name { font-weight: 700; font-size: .9rem; }
.carry-size { font-size: .82rem; color: var(--ink-soft); }
.carry-see, .carry-off { font-size: .82rem; }
.carry-body { flex: 1 1 100%; white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 4px 0 2px; font-size: .85rem; line-height: 1.7; max-height: 240px; overflow: auto; }
.carry-note { margin: 6px 0 0; font-size: .8rem; color: var(--ink-soft); }
.btn-dai1 { background: #2f7d8c; color: #fff; border-color: #2f7d8c; }
.btn-dai1:hover { background: #266673; border-color: #266673; }
/* /case-line-0920 */

/* quota-0920 */
.quota-note { margin: 10px 0 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.7; text-align: center; }
.quota-note b { color: var(--ink); }
.q-sub { display: block; font-size: .8rem; }
.q-sub .btn-link { margin-left: 6px; }
.q-help { background: #fbf7ee; border: 2px solid #e6d9bd; border-radius: 12px; padding: 12px 16px; margin: 10px 0 0; text-align: left; }
.q-help.is-hidden { display: none; }
.q-help p { margin: 0 0 8px; font-size: .9rem; line-height: 1.8; }
.q-help-h { font-weight: 700; color: #8a6d1f; }
.q-tips { margin: 0 0 8px; padding-left: 1.2em; font-size: .9rem; line-height: 1.85; }
.q-tips li + li { margin-top: 2px; }
/* /quota-0920 */

/* carry-replace-0920 */
.carry.is-warn { background: #fff7ec; border-color: #e6c288; }
.carry.is-warn .carry-h { color: #a86a12; }
.carry-i { align-items: baseline; }
.carry-state { font-size: .8rem; color: var(--ink-soft); }
.carry-i.is-skip .carry-state { color: #a8501a; font-weight: 700; }
.carry-i.is-swap .carry-state { color: var(--green-d); }
.carry-i.is-off { opacity: .65; }
/* /carry-replace-0920 */

/* dai2-0920 */
body.d2-page { background: #f4f9fc; }
body.d2-page .site-header { background: rgba(244, 249, 252, .95); border-bottom-color: #dce8f0; }
body.d2-page .kstage { background: #e9f2f8; border-color: #2f5a80; }
body.d2-page .kstage-q { color: #26496a; }
body.d2-page .howstrip li { border-color: #2f5a80; }
body.d2-page .howstrip b { background: #2f5a80; }
body.d2-page .starter-catch b { color: #26496a; }
body.d2-page .btn-primary { background: #2f5a80; color: #fff; box-shadow: 0 5px 0 #26496a; }
body.d2-page .btn-primary:hover { background: #3a6c96; }
body.d2-page .btn-primary:active { box-shadow: 0 2px 0 #26496a; }
body.d2-page .fieldcopy { background: #e9f2f8; border-color: #b9d6e6; }
body.d2-page .fieldcopy-h { color: #26496a; }
body.d2-page textarea:focus-visible, body.d2-page input[type="text"]:focus-visible { border-color: #2f5a80; outline-color: #2f5a80; }
body.d2-page .cr-i.is-now .cr-in { border-color: #2f5a80; background: #2f5a80; }
body.d2-page .cr-i.is-now .cr-no { color: #26496a; }
.btn-dai2 { background: #2f5a80; color: #fff; border-color: #2f5a80; }
.btn-dai2:hover { background: #3a6c96; border-color: #3a6c96; }
#docPrint .d2-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 7.4pt; margin: 2mm 0 2mm; }
#docPrint .d2-table th, #docPrint .d2-table td { border: .5pt solid #000; padding: .5mm 1mm; vertical-align: top; line-height: 1.3; }
#docPrint .d2-table th { background: #f2f2f2; text-align: center; font-weight: 700; }
#docPrint .d2-table .ce { text-align: center; }
#docPrint .d2-table .c-need { width: 17%; }
#docPrint .d2-table .c-lg, #docPrint .d2-table .c-sg { width: 13%; }
#docPrint .d2-table .c-term { width: 7%; }
#docPrint .d2-table .c-sv { width: 15%; }
#docPrint .d2-table .c-m { width: 3%; }
#docPrint .d2-table .c-kind { width: 10%; }
#docPrint .d2-table .c-who { width: 8%; }
#docPrint .d2-table .c-fr { width: 5%; }
#docPrint .d2-note { font-size: 6.6pt; color: #333; margin: 0 0 1mm; line-height: 1.4; }
/* /dai2-0920 */

/* hoshin-0920 */
#d1modeRow { margin-bottom: 14px; }
#d1modeRow.is-hidden { display: none; }
.tohoshin .btn-b1 { background: #4d4186; color: #fff; border-color: #4d4186; }
.tohoshin .btn-b1:hover { background: #5c4f9c; border-color: #5c4f9c; }
/* /hoshin-0920 */

/* fmfig-0920 */
.fmfig { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.fmfig-h { margin: 0 0 8px; font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.fmfig-in { overflow-x: auto; }
.fmfig .fm-svg { width: 100%; min-width: 430px; height: auto; display: block; }
.fmfig-note { margin: 8px 0 0; font-size: .85rem; line-height: 1.8; color: var(--ink-soft); }
.fmfig-note b { color: var(--ink); }
.fmfig--d2 { border-color: #b9d6e6; background: #fbfdff; }
.fmfig--d2 .fmfig-h { color: #26496a; }
.fmfig--d1 { border-color: #ded6ee; background: #fdfcff; }
.fmfig--d1 .fmfig-h { color: #4d4186; }
.fm-where { display: inline-block; font-size: .74rem; font-weight: 400; color: #5d7b96; background: #eef4f9; border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: middle; }
body.d2-page .fm-where { background: #e3eef7; }
@media (max-width: 640px) { .fm-where { display: block; margin: 4px 0 0; width: fit-content; } }
/* /fmfig-0920 */

/* simple-0920 */
.nextstep { position: sticky; top: 0; z-index: 30; background: #fffaf0; border-bottom: 2px solid #e8cf9a; }
.nextstep.is-hidden { display: none; }
.ns-in { width: min(100% - 32px, 1040px); margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.ns-no { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #c8860d; color: #fff; font-weight: 700; font-size: .85rem; }
.ns-what { flex: 1 1 auto; font-size: .92rem; color: #6b4d1c; line-height: 1.5; }
.ns-what b { color: #4a3510; }
.ns-go { flex: 0 0 auto; border: 2px solid #c8860d; background: #fff; color: #8a5c08; border-radius: 999px; padding: 5px 14px; font-size: .85rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.ns-go:hover { background: #c8860d; color: #fff; }
details.guide { background: #fbfaf7; border: 2px solid var(--line); border-radius: 12px; margin: 0 0 14px; }
details.guide > summary { cursor: pointer; padding: 10px 14px; font-size: .9rem; font-weight: 700; color: var(--ink-soft); list-style: none; display: flex; align-items: center; gap: 8px; }
details.guide > summary::-webkit-details-marker { display: none; }
details.guide > summary::before { content: "？"; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--ink-soft); font-size: .76rem; flex: 0 0 auto; }
details.guide[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
details.guide > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.guide > :last-child { margin-bottom: 12px; }
.slimnote { background: #fff7ec; border-left: 4px solid #e0a53c; border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 0 0 14px; font-size: .88rem; line-height: 1.7; color: #6b4d1c; }
.slimnote b { color: #8a5c08; }
@media (max-width: 640px) {
  .ns-in { gap: 8px; padding: 7px 0; }
  .ns-what { font-size: .85rem; }
  .ns-go { padding: 5px 10px; font-size: .8rem; }
}
/* /simple-0920 */

/* loop-0920 */
.ratebox { background: #fffaf0; border: 2px solid #e8cf9a; border-radius: 12px; padding: 14px 16px; margin: 16px 0 0; }
.rate-q { margin: 0 0 10px; font-weight: 700; color: #6b4d1c; font-size: .98rem; }
.rate-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rate-b { flex: 1 1 auto; min-width: 150px; border: 2px solid #e0a53c; background: #fff; color: #6b4d1c; border-radius: 999px; padding: 9px 14px; font-size: .92rem; font-weight: 700; font-family: inherit; cursor: pointer; }
.rate-b:hover { background: #e0a53c; color: #fff; }
.rate-note { margin: 10px 0 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.7; }
.rate-note b { color: #8a5c08; }
.rate-thanks { margin: 0; font-weight: 700; color: var(--green-d); }
@media (max-width: 520px) { .rate-b { min-width: 100%; } }
/* /loop-0920 */

/* MARK inputbox_tag_0921 */
.inputbox::before {
  top: -15px; left: 22px;
  background: #fff; color: #8a4410;
  border: 2px solid var(--orange); border-radius: 8px;
  box-shadow: none;
  font-size: .88rem; letter-spacing: .06em; line-height: 1.5;
  padding: 1px 12px;
}
.inputbox.is-filled::before { background: #fff; color: var(--green-d); border-color: var(--green); box-shadow: none; }
.inputbox .memo-toolbar { gap: 12px; align-items: stretch; }
.inputbox .memo-toolbar .mic-btn,
.inputbox .memo-toolbar .audio-btn,
.inputbox .memo-toolbar .pic-btn {
  min-height: 54px; padding: 0 22px; gap: 10px;
  font-family: inherit; font-size: 1.02rem; font-weight: 700; line-height: 1.3;
  border-width: 2px; border-radius: 999px;
  box-shadow: 0 3px 0 var(--green-d);
}
.inputbox .memo-toolbar .mic-btn svg,
.inputbox .memo-toolbar .audio-btn svg,
.inputbox .memo-toolbar .pic-btn svg { width: 22px; height: 22px; flex: none; }
.inputbox .memo-toolbar .audio-btn-sub,
.inputbox .memo-toolbar .pic-btn-sub { font-size: .8rem; font-weight: 400; margin-left: 2px; }
.inputbox .memo-toolbar .mic-btn.is-on { box-shadow: 0 3px 0 #a2433d; }
.inputbox .memo-toolbar .pic-btn.is-done,
.inputbox .memo-toolbar .audio-btn.is-done { box-shadow: none; }
@media (max-width: 640px) {
  .inputbox::before { left: 14px; }
  .inputbox .memo-toolbar .mic-btn,
  .inputbox .memo-toolbar .audio-btn,
  .inputbox .memo-toolbar .pic-btn { width: 100%; justify-content: flex-start; flex-wrap: wrap; row-gap: 0; padding: 8px 18px; text-align: left; }
}
/* /MARK inputbox_tag_0921 */

/* MARK key_merit_0922 */
.kgf-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 12px; }
.kgf-cmp { border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.kgf-cmp-h { font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.kgf-cmp-b { font-size: .95rem; text-wrap: balance; }
.kgf-cmp--paste .kgf-cmp-b { font-size: .88rem; }
.kgf-cmp--key { background: var(--green-l); color: var(--green-d); border: 2px solid var(--green); }
.kgf-cmp--key .kgf-cmp-b strong { font-size: 1.05rem; }
.kgf-cmp--paste { background: #f6f3ef; color: #6b635c; border: 2px solid #e4ddd3; }
.kgf-merits { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.kgf-merits li { display: flex; gap: 8px; align-items: flex-start; font-size: .93rem; line-height: 1.6; }
.kgf-merits li strong { color: var(--green-d); }
.kgf-mi { flex: none; width: 1.4em; text-align: center; }
@media (max-width: 520px) { .kgf-compare { grid-template-columns: 1fr; } }
/* /MARK key_merit_0922 */

/* MARK ai_steps_0922 */
.steps .step-illust { width: auto; height: 150px; margin: 18px auto 12px; display: flex; align-items: flex-end; justify-content: center; }
.steps .step-illust img { width: auto; height: auto; max-height: 150px; max-width: 190px; object-fit: contain; }
.nb-seg { display: inline-block; }
.steps .step p { word-break: auto-phrase; text-wrap: pretty; }
/* /MARK ai_steps_0922 */

/* riyu-0922 */
body.ry-page { background: #f2faf8; }
body.ry-page .site-header { background: rgba(242, 250, 248, .95); border-bottom-color: #d3ebe6; }
body.ry-page .kstage { background: #e6f4f1; border-color: #1d6660; }
body.ry-page .kstage-q { color: #17524d; }
body.ry-page .howstrip li { border-color: #1d6660; }
body.ry-page .howstrip b { background: #1d6660; }
body.ry-page .starter-catch b { color: #17524d; }
body.ry-page .btn-primary { background: #1d6660; color: #fff; box-shadow: 0 5px 0 #17524d; }
body.ry-page .btn-primary:hover { background: #237a73; }
body.ry-page .btn-primary:active { box-shadow: 0 2px 0 #17524d; }
body.ry-page .fieldcopy { background: #e6f4f1; border-color: #b5ddd6; }
body.ry-page .fieldcopy-h { color: #17524d; }
body.ry-page textarea:focus-visible, body.ry-page input[type="text"]:focus-visible { border-color: #1d6660; outline-color: #1d6660; }
.ry-q { margin: 0 0 6px; font-weight: 700; color: #17524d; }
.ry-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.ry-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.ry-kinds label { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid #b5ddd6; border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; color: #17524d; line-height: 1.35; }
.ry-kinds label small { font-weight: 400; font-size: .82rem; color: #4a5a58; }
.ry-kinds input:checked + label { border-color: #1d6660; background: #1d6660; color: #fff; }
.ry-kinds input:checked + label small { color: #e6f4f1; }
.ry-kinds input:focus-visible + label { outline: 3px solid #f0a33a; outline-offset: 2px; }
/* /riyu-0922 */

/* kaishu-0922 */
body.ks-page { background: #faf6f1; }
body.ks-page .site-header { background: rgba(250, 246, 241, .95); border-bottom-color: #ecdfd0; }
body.ks-page .kstage { background: #f5ece2; border-color: #7a4f2a; }
body.ks-page .kstage-q { color: #5f3d20; }
body.ks-page .howstrip li { border-color: #7a4f2a; }
body.ks-page .howstrip b { background: #7a4f2a; }
body.ks-page .starter-catch b { color: #5f3d20; }
body.ks-page .btn-primary { background: #7a4f2a; color: #fff; box-shadow: 0 5px 0 #5f3d20; }
body.ks-page .btn-primary:hover { background: #8c5c33; }
body.ks-page .btn-primary:active { box-shadow: 0 2px 0 #5f3d20; }
body.ks-page .fieldcopy { background: #f5ece2; border-color: #e0cbb4; }
body.ks-page .fieldcopy-h { color: #5f3d20; }
body.ks-page textarea:focus-visible, body.ks-page input[type="text"]:focus-visible { border-color: #7a4f2a; outline-color: #7a4f2a; }
body.ks-page .ry-q { color: #5f3d20; }
body.ks-page .ry-kinds label { border-color: #e0cbb4; color: #5f3d20; }
body.ks-page .ry-kinds input:checked + label { border-color: #7a4f2a; background: #7a4f2a; color: #fff; }
body.ks-page .ry-kinds input:checked + label small { color: #f5ece2; }
/* /kaishu-0922 */

/* formout-0922 */
.fo-file { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; background: #fff; border: 2px solid #b5ddd6; border-radius: 12px; }
.fo-file.is-hidden { display: none; }
.fo-file-ic { font-size: 1.5rem; line-height: 1; }
.fo-file-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; word-break: break-all; }
.fo-file-t small { color: #4a5a58; font-size: .82rem; }
.fo-file-x { border: 0; background: #eef3f2; color: #333; width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex: none; }
body.ks-page .fo-file { border-color: #e0cbb4; }
.fo-preview { margin-top: 12px; border: 1px solid #d8d2c8; border-radius: 10px; background: #fff; }
.fo-preview.is-hidden { display: none; }
.fo-preview summary { cursor: pointer; padding: 10px 12px; font-weight: 700; }
.fo-preview-in { padding: 0 12px 12px; overflow-x: auto; }
.fo-preview .fo-table { min-width: 560px; }
.fo-title { font-size: 1.05rem; text-align: center; margin: 4px 0 8px; }
.fo-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .82rem; }
.fo-table td { border: 1px solid #333; padding: 4px 6px; vertical-align: top; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.fo-table .fo-h { background: #f3f3f3; font-weight: 700; }
#docPrint .fo-title { font-size: 13pt; margin: 0 0 3mm; }
#docPrint .fo-table { font-size: 8.6pt; }
#docPrint .fo-table td { border: .6pt solid #000; padding: 1mm 1.3mm; line-height: 1.35; }
/* /formout-0922 */

/* tenken-0928 */
body.tn-page { background: #f4f5fb; }
body.tn-page .site-header { background: rgba(244, 245, 251, .95); border-bottom-color: #dde1f2; }
body.tn-page .kstage { background: #eceffa; border-color: #3f4f9a; }
body.tn-page .kstage-q { color: #2f3c78; }
body.tn-page .howstrip li { border-color: #3f4f9a; }
body.tn-page .howstrip b { background: #3f4f9a; }
body.tn-page .starter-catch b { color: #2f3c78; }
body.tn-page .btn-primary { background: #3f4f9a; color: #fff; box-shadow: 0 5px 0 #2f3c78; }
body.tn-page .btn-primary:hover { background: #4a5bab; }
body.tn-page .btn-primary:active { box-shadow: 0 2px 0 #2f3c78; }
body.tn-page .fieldcopy { background: #eceffa; border-color: #c9cfea; }
body.tn-page .fieldcopy-h { color: #2f3c78; }
body.tn-page textarea:focus-visible, body.tn-page input[type="text"]:focus-visible { border-color: #3f4f9a; outline-color: #3f4f9a; }
.tn-focus { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-focus input { position: absolute; opacity: 0; pointer-events: none; }
.tn-focus label { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 38px; border: 2px solid #c9cfea; border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; color: #2f3c78; line-height: 1.35; position: relative; }
.tn-focus label::before { content: ""; position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; border: 2px solid #3f4f9a; border-radius: 5px; background: #fff; }
.tn-focus input:checked + label { border-color: #3f4f9a; background: #eceffa; }
.tn-focus input:checked + label::before { background: #3f4f9a; box-shadow: inset 0 0 0 3px #fff; }
.tn-focus label small { font-weight: 400; font-size: .82rem; color: #4a5070; }
.tn-focus input:focus-visible + label { outline: 3px solid #f0a33a; outline-offset: 2px; }
.tn-result { display: grid; gap: 12px; }
.tn-sum { background: #fff; border: 2px solid #3f4f9a; border-radius: 14px; padding: 14px 16px; }
.tn-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tn-c { font-size: .88rem; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.tn-c b { font-size: 1.05rem; }
.tn-c--hi { background: #fbe7e5; color: #a6372d; }
.tn-c--mid { background: #fdf0dc; color: #8a5a12; }
.tn-c--lo { background: #e8eef8; color: #3a5a86; }
.tn-sum-t { margin: 0 0 10px; white-space: pre-wrap; line-height: 1.8; }
.tn-card { background: #fff; border: 1.5px solid #dde1f2; border-radius: 14px; padding: 12px 14px; }
.tn-card--hi { border-color: #eab3ad; }
.tn-card--mid { border-color: #efd3a4; }
.tn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.tn-no { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background: #3f4f9a; color: #fff; font-weight: 700; font-size: .85rem; }
.tn-sev { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: #e8eef8; color: #3a5a86; }
.tn-card--hi .tn-sev { background: #fbe7e5; color: #a6372d; }
.tn-card--mid .tn-sev { background: #fdf0dc; color: #8a5a12; }
.tn-where { font-weight: 700; color: #2f3c78; line-height: 1.5; }
.tn-line { display: grid; grid-template-columns: 3.2em 1fr; gap: 6px; margin: 4px 0; line-height: 1.75; font-size: .94rem; }
.tn-line b { color: #6a7090; font-size: .86rem; padding-top: 2px; }
.tn-line span { white-space: pre-wrap; }
.tn-fix { margin-top: 8px; background: #f2f7f3; border-radius: 10px; padding: 10px 12px; }
.tn-fix b { display: block; font-size: .84rem; color: #2f6650; margin-bottom: 2px; }
.tn-fix p { margin: 0 0 8px; white-space: pre-wrap; line-height: 1.8; }
.tn-fix--none { background: #f4f5fb; }
.tn-fix--none b { color: #4a5070; }
.tn-fix--none p { margin: 0; }
/* /tenken-0928 */
/* case-next-1001：下書きのあと、下からせり上がる「次はどうしますか」カード */
.casenext { position: fixed; left: 50%; bottom: 16px; z-index: 70; width: min(94vw, 520px); box-sizing: border-box;
  background: #fff; border: 2px solid var(--green, #3b7d64); border-radius: 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  padding: 16px 18px 12px; transform: translate(-50%, 130%); opacity: 0; visibility: hidden;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .25s, visibility 0s .38s; }
.casenext.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.cn-x { position: absolute; top: 4px; right: 6px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.1rem; color: var(--ink-soft); cursor: pointer; }
.cn-h { margin: 0 34px 2px 0; font-weight: 700; font-size: 1.05rem; color: var(--green-d, #2f6650); }
.cn-q { margin: 0 0 10px; font-size: .9rem; line-height: 1.7; color: var(--ink); }
.cn-btns { display: grid; gap: 8px; }
.cn-go { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 700; font-size: .97rem; line-height: 1.4;
  padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line, #dfe6ea); background: #fff; color: var(--ink); cursor: pointer; }
.cn-go:hover { border-color: var(--green, #3b7d64); }
.cn-go.is-main { background: var(--green, #3b7d64); border-color: var(--green, #3b7d64); color: #fff; }
.cn-go.is-main:hover { background: var(--green-d, #2f6650); }
.cn-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .08); display: grid; place-items: center; font-size: .82rem; }
.cn-go.is-main .cn-n { background: rgba(255, 255, 255, .25); }
.cn-t { flex: 1 1 auto; }
.cn-a { flex: none; }
.cn-later { display: block; margin: 8px auto 0; font-size: .86rem; }
@media (prefers-reduced-motion: reduce) { .casenext, .casenext.is-on { transition: none; } }
/* 移った先：入っていることを、カードと欄の両方で見せる */
.carry.is-arrive { border-width: 3px; border-color: var(--green, #3b7d64); background: #eef8f1; padding: 14px 16px; box-shadow: 0 6px 20px rgba(47, 102, 80, .14); }
.carry.is-arrive .carry-h { font-size: 1.08rem; }
.carry-cta { margin: 10px 0 4px; padding: 12px 14px; background: #fff; border: 1px solid #b7d9c3; border-radius: 12px; }
.carry-cta-t { margin: 0 0 8px; font-size: .92rem; line-height: 1.7; }
.carry-cta .carry-make { width: 100%; white-space: normal; line-height: 1.4; }
.carry-cta-s { margin: 8px 0 0; font-size: .82rem; color: var(--ink-soft); }
.carried-tag { display: inline-block; margin: 0 0 4px; padding: 2px 10px; border-radius: 999px; background: #e3f3e8; color: var(--green-d, #2f6650); font-size: .8rem; font-weight: 700; }
textarea.is-carried { border-color: var(--green, #3b7d64) !important; box-shadow: 0 0 0 3px rgba(59, 125, 100, .18); background: #f8fcf9; }
@keyframes carryPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 125, 100, .0); } 50% { box-shadow: 0 0 0 10px rgba(59, 125, 100, .22); } }
.btn.is-carry-pulse { animation: carryPulse 1.5s ease-in-out 6; }
@media (prefers-reduced-motion: reduce) { .btn.is-carry-pulse { animation: none; outline: 3px solid rgba(59, 125, 100, .5); } }
/* /case-next-1001 */
/* case-back-1001：戻ってきたとき、前につくった下書きを戻した案内 */
.caseback { margin: 0 0 14px; padding: 12px 16px; border: 2px solid #b7d9c3; border-radius: 14px; background: #f2f9f4; }
.caseback.is-stale { border-color: #e6c288; background: #fff9ef; }
.cb-h { margin: 0 0 4px; font-weight: 700; color: var(--green-d, #2f6650); font-size: 1rem; }
.cb-n { margin-left: 8px; font-weight: 400; font-size: .82rem; color: var(--ink-soft); }
.cb-warn { margin: 4px 0; font-size: .9rem; line-height: 1.7; color: #8a5a00; font-weight: 700; }
.cb-t { margin: 0 0 8px; font-size: .9rem; line-height: 1.75; }
.cb-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cb-go { font: inherit; font-weight: 700; font-size: .92rem; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--green, #3b7d64); background: #fff; color: var(--green-d, #2f6650); cursor: pointer; }
.cb-go:hover { background: var(--green, #3b7d64); color: #fff; }
.cb-go.cb-back { border-color: var(--line, #dfe6ea); color: var(--ink); font-weight: 400; }
.cb-go.cb-back:hover { background: #f3f5f6; color: var(--ink); border-color: var(--ink-soft); }
.cn-back { display: block; width: 100%; margin: 8px 0 0; font: inherit; font-size: .9rem; text-align: left; padding: 9px 14px; border-radius: 12px; border: 1px dashed var(--ink-soft, #7a8a93); background: #fafbfb; color: var(--ink); cursor: pointer; }
.cn-back:hover { border-style: solid; border-color: var(--green, #3b7d64); }
/* /case-back-1001 */
/* d2table-1002：第2表AIの結果を、様式と同じ表で */
.d2form { margin: 4px 0 14px; }
.d2form-lead { margin: 0 0 8px; font-size: .92rem; line-height: 1.75; }
.d2form-tw { overflow-x: auto; border: 2px solid #9fb9cc; border-radius: 10px; background: #fff; }
.d2form-t { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: .86rem; line-height: 1.55; table-layout: fixed; }
.d2form-t th, .d2form-t td { border: 1px solid #b9cbd8; padding: 6px 8px; vertical-align: top; text-align: left; word-break: break-word; }
.d2form-t thead th { background: #e6f0f7; color: #24465f; font-weight: 700; text-align: center; vertical-align: middle; font-size: .82rem; }
.d2form-t .c-need { width: 15%; } .d2form-t .c-g { width: 13%; } .d2form-t .c-term { width: 7%; } .d2form-t .c-sv { width: 15%; }
.d2form-t .c-m { width: 3.5%; } .d2form-t .c-kind { width: 10%; } .d2form-t .c-who { width: 8%; } .d2form-t .c-fr { width: 6%; }
.d2form-t td.ce { text-align: center; }
.d2form-t tr.d2-first td { border-top: 2px solid #7f9db3; }
.d2form-t td.d2c { cursor: pointer; position: relative; transition: background .15s; }
.d2form-t td.d2c:hover, .d2form-t td.d2c:focus-visible { background: #fff6e6; outline: 2px solid #e0a54a; outline-offset: -2px; }
.d2form-t td.d2c.is-copied { background: #eef8f1; }
.d2form-t td.d2c.is-copied::before { content: "✓"; color: var(--green-d, #2f6650); font-weight: 700; margin-right: 3px; }
.d2form-t td.d2c.is-just::after { content: "コピーしました"; position: absolute; left: 4px; bottom: 4px; background: var(--green-d, #2f6650); color: #fff; font-size: .72rem; border-radius: 6px; padding: 1px 6px; white-space: nowrap; z-index: 1; }
.d2form-t td.d2e, .d2form-t td.d2m { background: #fafbfc; }
.d2form-more { margin: 6px 0 0; padding: 7px 12px; font-size: .88rem; font-weight: 700; color: #6b4600; background: #fff4e0; border: 2px solid #f0c77a; border-radius: 10px; }
.d2form-more.is-hidden { display: none; }
.d2form-note { margin: 6px 0 0; font-size: .8rem; color: var(--ink-soft); line-height: 1.7; }
/* 広い画面では、表だけを枠の外まで広げて、横スクロールなしで全部の列を見せる（様式は横長のため） */
@media (min-width: 1000px) {
  .d2form { position: relative; left: 50%; transform: translateX(-50%); width: min(1240px, calc(100vw - 64px)); box-sizing: border-box;
    background: #fff; border: 2px solid #9fb9cc; border-radius: 14px; padding: 12px 14px 10px; box-shadow: 0 6px 20px rgba(36, 70, 95, .10); }
  .d2form .d2form-tw { border-width: 1px; }
  .d2form-t { min-width: 900px; }
}
.d2cards { margin: 12px 0 0; }
.d2cards > summary { cursor: pointer; font-weight: 700; padding: 8px 12px; border: 2px solid var(--line, #dfe6ea); border-radius: 10px; background: #fff; list-style-position: inside; }
.d2cards[open] > summary { margin-bottom: 10px; }
/* /d2table-1002 */
/* d1form-1002：第1表AIの結果を、様式と同じ並びで */
.d1form { margin: 4px 0 6px; }
.d1form-lead { margin: 0 0 8px; font-size: .92rem; line-height: 1.75; }
.d1f-sheet { background: #fff; border: 2px solid #b3a6d6; border-radius: 12px; overflow: hidden; }
.d1f-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 10px 14px 8px; background: #f3effb; border-bottom: 1px solid #d5cbea; }
.d1f-no { font-size: .8rem; font-weight: 700; color: #4d4186; border: 1px solid #b3a6d6; border-radius: 6px; padding: 0 8px; background: #fff; }
.d1f-title { font-weight: 700; font-size: 1.02rem; color: #3b3170; letter-spacing: .04em; }
.d1f-chk { margin-left: auto; font-size: .78rem; color: var(--ink-soft); }
.d1f-head { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; font-size: .74rem; color: #7a8590; }
.d1f-head span { border-right: 1px solid #e3e6ea; border-bottom: 1px solid #e3e6ea; padding: 5px 8px 14px; min-width: 0; }
.d1f-head .w2 { grid-column: span 2; } .d1f-head .w3 { grid-column: span 3; }
.d1f-headnote { margin: 0; padding: 4px 10px; font-size: .76rem; color: var(--ink-soft); background: #fafbfc; border-bottom: 2px solid #b3a6d6; }
.d1f-row { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid #c9bfe2; }
.d1f-row:last-child { border-bottom: 0; }
.d1f-lab { padding: 12px 12px; font-weight: 700; font-size: .9rem; line-height: 1.6; color: #3b3170; background: #f3effb; border-right: 1px solid #c9bfe2; }
.d1f-cell { padding: 12px 14px; min-width: 0; }
.d1f-cell p { margin: 0; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.d1f-mute { background: #fafbfc; }
.d1f-mute p { font-size: .84rem; color: var(--ink-soft); }
.d1f-copy { position: relative; cursor: pointer; background: #fffdf6; transition: background .15s; min-height: 84px; }
.d1f-copy:hover, .d1f-copy:focus-visible { background: #fff4dc; outline: 2px solid #e0a54a; outline-offset: -2px; }
.d1f-copy.is-copied { background: #eef8f1; }
.d1f-copy.is-copied .d1f-body::before { content: "✓ "; color: var(--green-d, #2f6650); font-weight: 700; }
.d1f-btn { float: right; margin: 0 0 6px 10px; }
.d1f-rest { margin-top: 12px; border: 2px solid var(--line, #dfe6ea); border-radius: 12px; overflow: hidden; background: #fff; }
.d1f-rest-h { margin: 0; padding: 8px 12px; font-weight: 700; font-size: .88rem; background: #f6f7f8; border-bottom: 1px solid var(--line, #dfe6ea); }
@media (max-width: 640px) {
  .d1f-row { grid-template-columns: 1fr; }
  .d1f-lab { border-right: 0; border-bottom: 1px solid #c9bfe2; padding: 8px 12px; }
  .d1f-head { grid-template-columns: repeat(2, 1fr); }
  .d1f-head .w2, .d1f-head .w3 { grid-column: span 2; }
  .d1f-chk { margin-left: 0; }
}
/* /d1form-1002 */
/* tn-plan-1002：点検AIの「修正後のケアプラン」。直したところは赤字 */
.tn-red { color: #c62828; font-weight: 700; background: #fdecea; border-radius: 3px; padding: 0 2px; }
.tn-plan { margin-top: 22px; padding-top: 16px; border-top: 3px solid #3f4f9a; }
.tn-plan-h { margin: 0 0 6px; font-size: 1.12rem; color: #2f3c78; }
.tn-plan-lead { margin: 0 0 6px; font-size: .93rem; line-height: 1.8; }
.tn-plan-warn { margin: 0 0 12px; padding: 8px 12px; font-size: .88rem; line-height: 1.7; color: #6b4600; background: #fff4e0; border: 2px solid #f0c77a; border-radius: 10px; }
.tn-plan-sub { margin: 18px 0 6px; font-weight: 700; color: #2f3c78; display: flex; align-items: baseline; gap: 8px; }
.tn-plan-sub small { font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
.tn-plan .d1form + .tn-plan-sub { margin-top: 20px; }
.tn3-tw { overflow-x: auto; }
.tn3-t { width: 100%; min-width: 700px; border-collapse: collapse; table-layout: fixed; font-size: .84rem; background: #fff; }
.tn3-t th { background: #e6f0f7; color: #24465f; border: 1px solid #b9cbd8; padding: 5px 4px; text-align: center; }
.tn3-t td { border: 1px solid #b9cbd8; padding: 6px 5px; vertical-align: top; }
.tn3-i { margin: 0 0 6px; padding: 4px 6px; border-radius: 8px; background: #f2f6fa; line-height: 1.45; }
.tn3-i.is-red { background: #fdecea; outline: 1px solid #f1b5ae; }
.tn3-time { display: block; font-size: .76rem; color: var(--ink-soft); }
.tn3-svc { display: block; font-weight: 700; }
.tn3-none { color: #b5bcc3; }
.tn3-loose { margin: 6px 0 0; font-size: .86rem; line-height: 1.7; }
.tn-plan .d1form { margin-top: 0; }
.tn-plan .d1form .tn3-tw + .d1f-sheet, .tn-plan .d1form .tn3-loose + .d1f-sheet { margin-top: 10px; }
/* /tn-plan-1002 */
/* tn-json-1002：点検AIの修正後の表。マスの中の改行（箇条書き）はそのまま見せる */
.d2form-t--tn td, .tn-plan .d1f-body { white-space: pre-wrap; }
.tn-fix p .tn-red, .tn-line .tn-red { background: transparent; padding: 0; }
/* /tn-json-1002 */
/* dai1-to-dai2-1004 */
.cninline { margin: 22px 0 18px; padding: 18px 22px; border: 3px solid #e9a15c; border-radius: 18px; background: #fff6ea; }
.cninline.is-end { border-color: #b7d9c3; background: #f2f9f4; }
.cninline.is-hidden { display: none; }
.cni-h { margin: 0 0 6px; font-weight: 700; font-size: 1.18rem; line-height: 1.5; display: flex; align-items: center; gap: 10px; }
.cni-no { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: #d9832e; color: #fff; font-size: .92rem; }
.cninline.is-end .cni-no { background: #3b7d64; }
.cni-t { margin: 0 0 14px; line-height: 1.9; }
.cni-s { margin: 12px 0 0; font-size: .88rem; color: var(--ink-soft, #6b6560); line-height: 1.8; }
.cninline .cni-go { min-height: 56px; }
@media (max-width: 700px) { .cninline { padding: 16px; } .cninline .cni-go { width: 100%; } }
/* /dai1-to-dai2-1004 */
