@charset "UTF-8";

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

:root {
  --cream: #fffaf2;
  --cream-2: #fff4e6;
  --paper: #ffffff;
  --ink: #35423b;
  --ink-soft: #63736a;
  --ink-faint: #8b998f;

  --green: #4f9d80;
  --green-d: #3b7d64;
  --green-l: #e8f4ef;

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

  --sky: #6fa8cf;
  --sky-l: #eaf3f9;

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

  --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, #4f9d80, #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; }
.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; }

.nav-toggle {
  display: none;
  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); }

.mobile-nav {
  position: fixed;
  inset: 74px 0 0 0;
  background: var(--cream);
  z-index: 49;
  padding: 24px 20px 60px;
  overflow-y: auto;
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 18px 16px;
  border-bottom: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---------- ボタン ---------- */
.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: #fff; 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: #5cae90; }
.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: .92rem;
  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: .85rem;
  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: #fff;
  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;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.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: #5cae90; }
.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: .72rem; 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: .93rem; 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: .87rem; 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: #7a6440; }
.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: 860px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

@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: #fff;
  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: .88rem; 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: #fff;
  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; }
.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 {
  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 { display: none; }
.more > summary::after {
  content: "▼";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: .8rem;
}
.more[open] > summary::after { content: "▲"; }
.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: .88rem; 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: .74rem; 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; }
.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: .88rem; color: var(--ink-soft); margin: 12px 4px 0; line-height: 1.8; }
.mini { font-size: .88rem; 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: #fff;
  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);
}
