/* 承認済みの白・黒・赤。画面の高さの中で入力と確認を完結させる。 */
:root { --ink:#050505; --sub:#5c5c5c; --line:#e5e7eb; --soft:#f5f5f5; --red:#e60000; --mono:var(--font-mono),ui-monospace,monospace; --gap:12px; --panel-pad:16px; --input-height:40px; }
* { box-sizing:border-box; }
html,body { margin:0; background:#fff; color:var(--ink); overflow:hidden; }
html { height:100%; }
body { position:fixed; top:var(--app-top,0px); left:0; width:100%; height:var(--app-height,100dvh); display:flex; flex-direction:column; font-size:14px; line-height:1.55; overscroll-behavior:none; }
a { color:inherit; }
button,input,textarea,select { font:inherit; }
button,a,input,textarea,select { touch-action:manipulation; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid var(--red); outline-offset:2px; }
h1 { font-size:26px; line-height:1.2; margin:0; font-weight:900; letter-spacing:-.02em; }
h2 { font-size:17px; line-height:1.3; margin:0; font-weight:900; }
p { margin:0; }
.eyebrow { color:var(--red); font:700 10px/1.3 var(--mono); letter-spacing:.18em; text-transform:uppercase; }
.wrap { width:100%; max-width:1600px; margin:0 auto; padding:16px 20px; flex:1; min-height:0; display:flex; flex-direction:column; gap:var(--gap); }
.narrow { max-width:780px; }
.muted { color:var(--sub); font-size:12px; }
.ell { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.row { display:flex; gap:10px; align-items:center; min-width:0; }
.between { justify-content:space-between; }
.card,.panel { border:1px solid var(--line); padding:var(--panel-pad); background:#fff; display:flex; flex-direction:column; gap:10px; min-width:0; min-height:0; }
.panel-heading { flex:none; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:24px; }
.grow { flex:1; min-height:0; }
.btn { min-height:40px; padding:6px 16px; border:2px solid var(--ink); border-radius:0; background:#fff; color:var(--ink); font-size:13px; line-height:1.3; font-weight:700; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-align:center; }
.btn:hover { background:var(--ink); color:#fff; }
.btn.primary { background:var(--ink); color:#fff; }
.btn.primary::after { content:""; flex:none; width:9px; height:3px; background:var(--red); transform:skewX(-30deg); }
.btn.primary:hover { background:var(--red); border-color:var(--red); }
.btn.primary:hover::after { background:#fff; }
.btn.big { min-height:44px; }
.btn.small { min-height:32px; padding:4px 10px; font-size:12px; }
.btn:disabled { opacity:.35; cursor:default; }
.field { display:flex; flex-direction:column; gap:4px; min-width:0; min-height:0; }
.field label { font-size:12px; font-weight:700; line-height:1.35; }
.field input,.field textarea,.field select { min-width:0; width:100%; font-size:14px; height:var(--input-height); padding:7px 10px; border:1px solid #cfcfcf; border-radius:0; color:var(--ink); background:#fff; }
.field textarea { height:auto; min-height:0; resize:none; overflow:auto; }
.field.grow textarea { flex:1; min-height:32px; }
.field input[type=file] { font-size:12px; }
.req { margin-left:6px; font-size:10px; color:var(--red); }
.stat { padding:10px 14px; border:2px solid var(--ink); font-size:12px; font-weight:700; min-width:0; }
.stat b { display:block; font-size:30px; line-height:1.1; font-weight:900; font-variant-numeric:tabular-nums; }
.stat.ok { background:var(--ink); color:#fff; }
.stat.ng { background:var(--red); border-color:var(--red); color:#fff; }
.stat.q { border-style:dashed; }
.pill { display:inline-block; flex:none; padding:2px 7px; font-size:11px; font-weight:700; border:1px solid var(--ink); white-space:nowrap; }
.pill.sent { background:var(--ink); color:#fff; }
.pill.failed { background:var(--red); border-color:var(--red); color:#fff; }
.pill.unknown { border-style:dashed; }
.tabs { display:flex; flex:none; gap:0; min-width:0; }
.tabs button { flex:1; min-width:0; min-height:34px; padding:5px 7px; border:1px solid var(--line); background:#fff; color:var(--sub); font-size:12px; font-weight:700; cursor:pointer; }
.tabs button + button { border-left:0; }
.tabs button.on { background:var(--ink); border-color:var(--ink); color:#fff; }
.composer-panel { min-height:0; }
.helper { font-size:12px; color:var(--sub); line-height:1.45; }
.notice { flex:none; padding:8px 12px; border-left:3px solid var(--red); background:var(--soft); font-size:12px; }
.page-list { flex:1; min-height:0; display:flex; flex-direction:column; gap:8px; }
.page-list-items { flex:1; min-height:0; overflow:hidden; }
.page-list-item { min-width:0; border-bottom:1px solid var(--line); }
.page-list-item > a,.page-list-item > button { width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; gap:4px; padding:7px 8px; border:0; background:#fff; text-align:left; text-decoration:none; color:var(--ink); cursor:pointer; font:inherit; }
.page-list-item > a:hover,.page-list-item > button:hover { background:var(--soft); }
.page-list-item .row { width:100%; }
.page-list-item .field { padding-right:1px; }
.pager { display:flex; flex:none; align-items:center; justify-content:space-between; gap:8px; min-height:32px; }
.pager .muted { white-space:nowrap; }
.empty-state { height:100%; display:flex; align-items:center; justify-content:center; color:var(--sub); font-size:13px; text-align:center; padding:10px; }
.text-pages { flex:1; min-height:0; display:flex; flex-direction:column; gap:6px; }
.text-pages-content { flex:1; min-height:0; overflow:hidden; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.count { font-size:15px; min-width:44px; text-align:right; font-variant-numeric:tabular-nums; }
a.stat { text-decoration:none; color:inherit; } a.stat:hover { outline:2px solid var(--red); outline-offset:2px; }
a.stat.ng::after,a.stat.q::after { content:"一覧を見る →"; display:block; font-size:11px; }
.photo-open { flex:1; min-height:0; min-width:0; position:relative; width:100%; padding:6px; border:1px solid var(--line); background:var(--soft); cursor:zoom-in; overflow:hidden; }
.screen-photo { display:block; width:100%; height:100%; object-fit:contain; }
.photo-open span { position:absolute; right:8px; bottom:8px; background:var(--ink); color:#fff; padding:3px 8px; font-size:11px; }
.photo-dialog { width:min(1200px,calc(100vw - 16px)); height:calc(var(--app-height,100dvh) - 16px); max-width:none; max-height:none; padding:12px; border:1px solid var(--ink); overflow:hidden; }
.photo-dialog[open] { display:flex; flex-direction:column; gap:10px; }
.photo-dialog::backdrop { background:rgba(5,5,5,.7); }
.photo-dialog-heading { flex:none; }
.photo-canvas { position:relative; flex:1; min-height:0; background:var(--soft); overflow:hidden; }
.photo-canvas img { position:absolute; left:0; top:0; max-width:none; }
.header { flex:none; border-bottom:1px solid var(--line); background:#fff; }
.header .in { max-width:1600px; margin:0 auto; padding:10px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.logo { text-decoration:none; display:flex; flex-direction:column; line-height:1.1; flex:none; }
.logo b { font-size:22px; font-weight:900; letter-spacing:-.02em; }
.logo i { color:var(--red); font-style:normal; }
.logo span { color:var(--sub); font:9px/1.4 var(--mono); letter-spacing:.16em; }
.login-main { justify-content:center; max-width:600px; }
.login-main .card { flex:none; }
.keyboard-toolbar { display:none; }
body[data-keyboard=true] { --gap:6px; --panel-pad:8px; --input-height:32px; }
body[data-keyboard=true] .keyboard-toolbar { display:flex; flex:none; align-items:center; justify-content:space-between; padding:4px 10px; }
body[data-keyboard=true] .header,body[data-keyboard=true] .tabs,body[data-keyboard=true] .panel-heading { display:none; }
body[data-keyboard=true] .composer-panel:not([data-editing=true]) { display:none; }
.okuru-plane { animation:fly 1.5s ease-out infinite; transform-box:fill-box; }
.okuru-plane.p2 { animation-delay:.5s; } .okuru-plane.p3 { animation-delay:1s; }
.okuru-bob { animation:bob 1s ease-in-out infinite; }
.okuru-arm,.okuru-wave { animation:throwArm .8s ease-in-out infinite; transform-box:fill-box; transform-origin:0% 100%; }
@keyframes fly { 0% { transform:translate(0,0) rotate(-8deg); opacity:0; } 15% { opacity:1; } 100% { transform:translate(120px,-70px) rotate(-18deg); opacity:0; } }
@keyframes bob { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-5px); } }
@keyframes throwArm { 0%,100% { transform:rotate(0); } 40% { transform:rotate(-35deg); } }
/* かんたん送信（/）：PCは手順と確認を横並び、狭い画面は今の手順だけ */
/* 担当者・返信先を開いている間は注意書きを隠す。縦が短い画面では本文の欄も隠し、「閉じる」で戻す */
@media (max-height:900px) { .easy-message:has(.easy-sender[open]) .easy-body { display:none; } }
@media (max-width:640px) { .easy-company-row { grid-template-columns:minmax(0,1fr); } .easy-sender-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* キーボードで狭くなった画面では、編集中の欄を広く保つ。終了すると件名・本文・確認操作が戻る。 */
@media (max-width:1099px) {
  .composer-panel[data-active=false] { display:none; }
}
@media (max-width:640px) {
  :root { --gap:8px; --panel-pad:12px; --input-height:38px; }
  .wrap { padding:10px; }
  h1 { font-size:21px; } h2 { font-size:15px; }
  .eyebrow { display:none; }
  .header .in { padding:8px 10px; gap:8px; }
  .logo b { font-size:19px; } .logo span { display:none; }
  .stat { padding:7px 9px; font-size:10px; } .stat b { font-size:24px; }
  .btn { padding:6px 10px; }
  .card,.panel { gap:8px; }
  .photo-dialog-heading { align-items:flex-start; }
  .photo-dialog-heading > b { flex:1; }
  .photo-dialog-heading .row { gap:4px; }
  .photo-dialog-heading .btn { padding:4px 7px; font-size:11px; }
}
@media (max-height:500px) {
  :root { --gap:6px; --panel-pad:8px; --input-height:32px; }
  .wrap { padding:6px 10px; }
  .header .in { padding:5px 10px; }
  .eyebrow { display:none; }
  .tabs button { min-height:30px; padding:4px; }
  .btn { min-height:32px; } .btn.big { min-height:32px; }
  .result-summary .stat { padding:4px 8px; } .result-summary .stat b { display:inline; margin-left:6px; font-size:18px; }
  .panel-heading { min-height:20px; }
  .card,.panel { gap:6px; }
}
@media (prefers-reduced-motion:reduce) { .okuru-plane,.okuru-bob,.okuru-arm,.okuru-wave { animation:none; } .bar > div { transition:none; } }
/* 送信の様子（LiveView）：画面の高さに収め、同時に進めている会社を並べる */
@keyframes live-blink { to { visibility:hidden; } }
@media (max-width:640px) { .live-grid { grid-template-columns:repeat(min(var(--cols),2),minmax(0,1fr)); } .live-meta .muted { display:none; } }
@media (prefers-reduced-motion:reduce) { .live-badge[data-on="true"]::before { animation:none; } }
@media(max-width:640px) { .nav a { padding:6px; font-size:11px; } }
@media (max-width:899px) { .live-panel[data-active=false],.split-view[data-hidden=true] { display:none; } }

/* 現在の処理・今回の結果・開始前確認。ページ全体は既存の固定高さを維持する。 */

@media(max-height:500px) { .email-generation-error { height:56px; } }
/* 関係先への周知（Outreach）：7つのタブを画面の高さに収める */
.outreach-import { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1.2fr) minmax(0,.8fr) auto; gap:8px 10px; align-items:end; flex:none; }
.outreach-tabs button { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.outreach .panel.grow { flex:1; overflow:hidden; }
.outreach .page-list { flex:1; min-height:0; }
.outreach-row { display:flex; align-items:center; gap:10px; height:100%; min-width:0; border-bottom:1px solid var(--line); padding:4px 2px; }
.outreach-row-text { flex:1; min-width:0; }
.outreach-row-text b { display:block; }
.outreach-rows { flex:1; min-height:80px; display:flex; gap:10px; min-width:0; }
.outreach-rows > .page-list { min-width:0; }
.outreach-photo { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.outreach-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; flex:none; }
.outreach-counts.send { grid-template-columns:repeat(5,minmax(0,1fr)); }
.outreach-counts.dry_run.legacy { grid-template-columns:repeat(4,minmax(0,1fr)); }
.outreach-counts.send.legacy { grid-template-columns:repeat(6,minmax(0,1fr)); }
.outreach-actions { align-items:flex-end; flex:none; flex-wrap:wrap; }
.outreach-count { width:200px; }
.outreach-confirm { align-items:flex-start; font-weight:700; font-size:13px; flex:none; }
.outreach-confirm input { margin-top:4px; flex:none; }
.outreach-inserts,.outreach-files { flex:none; flex-wrap:wrap; gap:6px; }
.outreach-files a { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.outreach-sender { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:14px; min-height:0; }
.outreach-sender-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px 10px; align-content:start; min-width:0; }
.outreach-signature { border:1px solid var(--line); padding:10px; min-width:0; min-height:0; overflow:hidden; display:flex; flex-direction:column; gap:6px; }
.outreach-signature textarea { flex:1; min-height:0; width:100%; resize:none; font:inherit; font-size:14px; line-height:1.6; padding:7px 10px; border:1px solid #cfcfcf; border-radius:0; color:var(--ink); background:#fff; }
.outreach-sender-tabs { display:none; flex:none; }
/* ドライラン：道案内・件数の選び方・進み具合。数を押すと絞り込み、行を押すと理由の全文と写真 */
.dry-guide { flex:none; padding:10px 14px; }
.dry-guide .import-guide-next { font-size:14px; }
.panel-heading h2 .muted { margin-left:6px; font-weight:700; }
.dry-controls { display:flex; align-items:flex-end; gap:10px 14px; flex-wrap:wrap; flex:none; }
.dry-count { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.dry-count-label { font-size:12px; font-weight:700; }
.dry-presets { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.dry-presets .btn.on { background:var(--ink); color:#fff; }
.dry-presets input { width:96px; height:32px; padding:4px 8px; font-size:14px; border:1px solid #cfcfcf; border-radius:0; }
.run-progress { flex:none; display:flex; flex-direction:column; gap:4px; font-size:13px; }
.bar { height:8px; background:var(--soft); border:1px solid var(--line); overflow:hidden; }
.bar > div { height:100%; background:var(--red); transition:width .4s ease; }
button.stat { color:var(--ink); text-align:left; cursor:pointer; font-family:inherit; line-height:1.3; }
button.stat:hover { outline:2px solid var(--red); outline-offset:2px; }
button.stat[aria-pressed=true] { outline:3px solid var(--red); outline-offset:2px; }
.page-list-item > button.outreach-row { flex-direction:row; align-items:center; gap:10px; padding:4px 6px; cursor:pointer; }
.outreach-row.on { background:var(--soft); }
.outreach-row-text > span { display:block; }
.outreach-row-open { flex:none; font-size:11px; font-weight:700; color:var(--sub); white-space:nowrap; }
.outreach-reason { flex:0 0 30%; min-height:5.5em; display:flex; flex-direction:column; }
/* 送れなかった行の引き継ぎ：理由ごとの数・案内・ボタン・入れる値のコピー（docs/plan-20261109.md B-2〜B-4） */
.stop-summary { flex:none; font-size:12px; display:flex; gap:8px; align-items:baseline; min-width:0; }
.stop-summary b { color:var(--red); flex:none; }
/* 送れなかった分を AI（ChatGPT）に任せる帯（2026-11-17） */
.assist-bar { flex:none; display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; padding:6px 10px; border:2px solid var(--ink); background:#fff; font-size:13px; }
.assist-text { flex:1 1 260px; min-width:0; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.assist-text .muted { font-size:12px; }
.assist-code { font-size:18px; font-weight:700; letter-spacing:.08em; padding:2px 10px; border:2px dashed var(--ink); background:var(--soft); user-select:all; }
.assist-error { flex-basis:100%; color:var(--red); font-size:12px; }
/* AI に頼む（会話）。会話の欄だけ中でスクロールする */
.chat-log { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:10px; padding:4px 2px; }
.chat-msg { display:flex; flex-direction:column; gap:6px; max-width:82%; align-self:flex-start; }
.chat-msg.user { align-self:flex-end; align-items:flex-end; }
.chat-bubble { padding:8px 12px; border:2px solid var(--ink); background:#fff; font-size:14px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-msg.user .chat-bubble { background:var(--ink); color:#fff; }
.chat-msg.error .chat-bubble { border-color:var(--red); }
.chat-card { display:flex; flex-direction:column; gap:6px; padding:8px 12px; border:1px solid var(--line); background:var(--soft); font-size:13px; min-width:0; }
.chat-card.small { font-size:12px; font-weight:700; }
.chat-card.confirm { border:2px solid var(--red); background:#fff; }
.chat-body { margin:0; max-height:180px; overflow-y:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:12px; line-height:1.6; background:#fff; padding:8px; border:1px solid var(--line); }
.chat-input { flex:none; display:flex; gap:8px; align-items:stretch; }
.chat-input textarea { flex:1; min-width:0; height:64px; resize:none; padding:8px 10px; border:2px solid var(--ink); font:inherit; font-size:14px; }
@media (max-width:700px) { .chat-msg { max-width:94%; } .chat-bubble { font-size:13px; } .chat-input textarea { height:52px; } }
.outreach-hand-head { flex:none; gap:6px; flex-wrap:wrap; align-items:center; }
.outreach-hand-tabs { margin-left:auto; }
.outreach-hand-tabs button { min-height:26px; padding:2px 8px; font-size:12px; white-space:nowrap; }
.handoff-guide { flex:none; font-size:13px; margin:0; }
.outreach-hand-actions { flex:none; gap:6px; flex-wrap:wrap; align-items:center; }
.outreach-manual-mark { gap:6px; font-size:12px; font-weight:700; align-items:center; }
.outreach-photo > .page-list { flex:1; min-height:0; }
.outreach-field-row { display:flex; align-items:center; gap:8px; height:100%; min-width:0; border-bottom:1px solid var(--line); font-size:12px; }
.outreach-field-row > span { flex:1; min-width:0; }
.outreach-field-row .btn { flex:none; }
/* グループごとの本文（docs/plan-20261109.md C）：編集するグループの切り替えと、送るグループの選択（上に重ねて開く） */
.outreach-group-edit { flex:none; gap:8px; align-items:center; min-width:0; flex-wrap:wrap; }
.outreach-group-edit select { max-width:100%; min-width:0; height:32px; font:inherit; font-size:13px; border:1px solid #cfcfcf; border-radius:0; background:#fff; padding:0 6px; }
.outreach-group-edit .muted { font-size:12px; }
.preview-actions { gap:6px; align-items:center; }
.group-picker { position:relative; flex:none; }
.group-picker > .btn { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.group-picker-pop { position:absolute; z-index:20; top:calc(100% + 4px); right:0; min-width:220px; max-width:min(360px, calc(100vw - 32px)); max-height:60vh; overflow:auto; background:#fff; border:2px solid var(--ink); box-shadow:4px 4px 0 var(--ink); padding:8px; display:flex; flex-direction:column; gap:4px; font-size:13px; }
.group-picker-pop label { display:flex; gap:6px; align-items:center; min-width:0; }
.outreach-actions > .muted { font-size:12px; min-width:0; }
@media (max-width:899px) {
  .outreach-import { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .outreach-tabs { flex-wrap:wrap; }
  .outreach-tabs button { flex:1 0 25%; }
  .outreach-sender { grid-template-columns:minmax(0,1fr); }
  .outreach-sender-tabs { display:flex; }
  .outreach-sender > [data-active=false] { display:none; }
  .outreach-sender-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .outreach-photo { position:absolute; inset:60px 8px 8px; background:#fff; padding:8px; border:2px solid var(--ink); z-index:5; }
}
@media (max-width:640px) {
  .outreach-tabs button { font-size:11px; padding:3px; min-height:30px; }
  .outreach-counts.send, .outreach-counts.send.legacy { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .outreach-counts .stat { padding:4px 6px; font-size:9px; } .outreach-counts .stat b { font-size:18px; }
}
@media (max-height:500px) {
  .outreach-counts .stat { padding:2px 8px; } .outreach-counts .stat b { display:inline; margin-left:6px; font-size:16px; }
  .outreach-tabs { flex-wrap:nowrap; }
  .outreach-tabs button { flex:1; font-size:10px; min-height:26px; }
  .outreach-sender-fields { grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px 8px; }
  .outreach-sender-fields .field label { font-size:10px; }
  .outreach .helper:not([role=status]) { display:none; }
  .outreach-import { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
.panel.dropping { outline:2px dashed var(--ink); outline-offset:-6px; background:#f6f8fa; }
.okuru-busy { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.82); cursor:wait; animation:okuru-in .15s ease-out; }
.okuru-busy-card { display:flex; flex-direction:column; align-items:center; gap:14px; padding:28px 36px; background:#fff; border:2px solid var(--ink); box-shadow:6px 6px 0 var(--ink); max-width:calc(100vw - 32px); }
.okuru-busy-text { display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.okuru-busy-text b { font-size:17px; font-weight:900; }
.okuru-busy-text span { font-size:13px; color:var(--red); font-weight:700; }
.okuru-kun { overflow:visible; }
.okuru-body { animation:okuru-hop .9s ease-in-out infinite; transform-origin:80px 112px; }
.okuru-speed { animation:okuru-speed .9s linear infinite; }
.okuru-eyes { animation:okuru-blink 3.2s infinite; transform-origin:80px 92px; }
.okuru-arm-l { animation:okuru-wave-l .9s ease-in-out infinite; transform-origin:34px 80px; }
.okuru-arm-r { animation:okuru-wave-r .9s ease-in-out infinite; transform-origin:126px 80px; }
.okuru-dots i { font-style:normal; animation:okuru-dot 1.2s infinite; opacity:.2; }
.okuru-dots i:nth-child(2) { animation-delay:.2s; } .okuru-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes okuru-in { from { opacity:0; } to { opacity:1; } }
@keyframes okuru-hop { 0%,100% { transform:translateY(0) rotate(-3deg); } 50% { transform:translateY(-10px) rotate(3deg); } }
@keyframes okuru-speed { 0% { transform:translateX(6px); opacity:0; } 40% { opacity:1; } 100% { transform:translateX(-10px); opacity:0; } }
@keyframes okuru-blink { 0%,92%,100% { transform:scaleY(1); } 95% { transform:scaleY(.1); } }
@keyframes okuru-wave-l { 0%,100% { transform:rotate(0); } 50% { transform:rotate(-14deg); } }
@keyframes okuru-wave-r { 0%,100% { transform:rotate(0); } 50% { transform:rotate(14deg); } }
@keyframes okuru-dot { 0%,100% { opacity:.2; } 40% { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .okuru-body,.okuru-speed,.okuru-eyes,.okuru-arm-l,.okuru-arm-r,.okuru-dots i { animation:none; } }
.import-guide { display:flex; flex-direction:column; gap:8px; padding:12px 14px; border:2px solid var(--ink); background:#fff; }
.import-guide ol { display:flex; gap:6px; margin:0; padding:0; list-style:none; flex-wrap:wrap; }
.import-guide li { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:#9a9a9a; padding:4px 10px 4px 4px; border:1px solid var(--line); }
.import-guide li span { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:#e5e7eb; color:#666; font-size:11px; }
.import-guide li.done { color:var(--ink); } .import-guide li.done span { background:var(--ink); color:#fff; }
.import-guide li.now { color:var(--red); border-color:var(--red); } .import-guide li.now span { background:var(--red); color:#fff; }
.import-guide-next { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:15px; font-weight:700; }
.import-guide-next b { color:#fff; background:var(--red); font-size:12px; padding:2px 8px; }
.import-guide-go { display:inline-flex; gap:8px; margin-left:auto; }
.guide-target { outline:3px solid var(--red); outline-offset:3px; animation:guide-pulse 1.4s ease-in-out infinite; }
@keyframes guide-pulse { 0%,100% { outline-color:var(--red); } 50% { outline-color:rgba(230,0,0,.25); } }
@media (prefers-reduced-motion: reduce) { .guide-target { animation:none; } }
/* 道案内（リストの読み込み・ドライラン）の狭い画面・低い画面。基本の見た目より後ろに置く */
@media (max-width:640px) {
  .outreach-row-open { display:none; }
  .import-guide-next,.dry-guide .import-guide-next { font-size:12px; }
  .import-guide li { padding:2px 6px 2px 2px; font-size:11px; }
}
@media (max-height:500px) {
  .import-guide,.dry-guide { padding:4px 8px; gap:4px; }
  .import-guide ol { display:none; }
  .import-guide-next,.dry-guide .import-guide-next { font-size:11px; gap:6px; }
  .dry-count-label { display:none; }
  .run-progress { font-size:11px; flex-direction:row; align-items:center; gap:8px; }
  .run-progress .row { flex:none; gap:6px; } .run-progress .bar { flex:1; }
  .stop-summary { font-size:10px; }
  .outreach-group-edit .muted:last-child { display:none; }
  .outreach-group-edit select { height:26px; font-size:11px; }
  .handoff-guide { font-size:11px; padding:3px 6px; }
  .panel-heading h2 .muted { display:none; }
}
/* 送る先（どのリストに送るか）：上の帯と、選ぶ一覧（2026-11-11） */
.target-bar { flex:none; display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding:6px 10px; border:2px solid var(--ink); background:#fff; font-size:13px; }
.target-bar > span { min-width:0; }
.target-bar b { margin-right:8px; }
.target-row { cursor:pointer; }
.target-row input { width:18px; height:18px; flex:none; }
.preview-part { flex:none; }
/* 送る先：リストと業種を横に並べる（スマホはタブで切り替え）。業種は大分類 → 中分類 → 小分類の順にたどる */
.target-split { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); gap:14px; }
.target-part { min-width:0; min-height:0; display:flex; flex-direction:column; gap:6px; }
.target-part-head { flex:none; display:flex; align-items:center; gap:8px; min-width:0; min-height:32px; }
.target-part-head h3 { margin:0; flex:none; font-size:13px; }
.target-part-head .muted { flex:1; }
.target-tabs { display:none; flex:none; }
.industry-picker { flex:1; min-height:0; display:flex; flex-direction:column; gap:6px; }
.industry-head { flex:none; display:flex; align-items:center; gap:8px; min-width:0; flex-wrap:wrap; }
.industry-trail { flex:1; min-width:0; display:flex; align-items:center; gap:2px; flex-wrap:wrap; font-size:12px; }
.industry-step { display:inline-flex; align-items:center; gap:2px; min-width:0; }
.industry-trail button { border:0; background:none; padding:2px 4px; font:inherit; font-weight:700; color:var(--ink); text-decoration:underline; cursor:pointer; }
.industry-trail button:disabled { color:var(--sub); text-decoration:none; cursor:default; }
.industry-search { width:200px; max-width:100%; height:32px; padding:4px 8px; font:inherit; font-size:13px; border:1px solid #cfcfcf; border-radius:0; background:#fff; color:var(--ink); }
.industry-row { gap:8px; }
.industry-check { flex:1; min-width:0; display:flex; align-items:center; gap:10px; cursor:pointer; }
.industry-check input { width:18px; height:18px; flex:none; }
/* 送る先のタブの下の段：帯は縮めて文字を切り、「プレビューへ」は見えたままにする */
.target-actions { flex:none; }
.target-actions > .target-bar { flex:1 1 auto; }
.target-actions > .btn { flex:none; }
.target-bar .btn { flex:none; white-space:nowrap; }
@media (max-width:899px) {
  .target-split { grid-template-columns:minmax(0,1fr); }
  .target-tabs { display:flex; }
  .target-split > [data-active=false] { display:none; }
  .industry-search { flex:1; width:auto; }
}
@media (max-height:500px) { .target-part-head { min-height:26px; } .industry-search { height:28px; } }
/* スマホ（Safari の見える範囲は 393×659 ほど、iPhone SE は 375×548 ほど）：業種の一覧に高さを残す（2026-11-11 本人「すまほでできなかった」。
   説明文と「送る先」の見出しは出さない。下の段の見出しは選んでいるときだけ（何を選んでいるかと、全部に戻すボタン） */
@media (max-width:640px), (max-height:500px) {
  .target-panel > .target-help { display:none; }
  .target-part-head h3 { display:none; }
  .target-part-head[data-set=false] { display:none; }
  .target-part-head { min-height:0; }
  /* たどった段の名前は 1 行にし、長い名前は「…」で切る（折り返すと一覧の高さが無くなる） */
  .industry-head { flex-wrap:nowrap; }
  .industry-trail { flex-wrap:nowrap; overflow:hidden; white-space:nowrap; }
  .industry-trail > button { flex:none; }
  .industry-step { flex:0 1 auto; min-width:0; }
  .industry-step button { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .industry-search { flex:0 0 40%; width:40%; }
}
/* Decisions で業種を付ける回の帯（リストの読み込みのタブ） */
.auto-industry { flex:none; display:flex; align-items:center; gap:10px; min-width:0; padding:6px 10px; border:1px solid var(--line); background:var(--soft); font-size:12px; }
.auto-industry > span { flex:1; min-width:0; }
.auto-industry b { margin-right:8px; }
.auto-industry .bar { flex:0 0 120px; }
.auto-industry .btn { flex:none; white-space:nowrap; }
@media (max-width:640px) { .auto-industry .bar { display:none; } }
.list-actions { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.list-part { min-width:0; display:flex; flex-direction:column; gap:var(--gap); }
.list-import { flex:none; }
.list-rows { flex:1; min-height:0; }
.recipient-review { display:flex; flex-direction:column; gap:var(--gap); min-height:0; flex:1; }
.recipient-filters { display:flex; flex-wrap:wrap; gap:6px; flex:none; }
.recipient-filters button[aria-pressed=true] { border-color:var(--ink); box-shadow:inset 0 0 0 1px currentColor; }
.recipient-filters strong { margin-left:0.3em; font-variant-numeric:tabular-nums; }
.recipient-rows { overflow:auto; min-height:0; flex:1; }
.recipient-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:8px; border-bottom:1px solid var(--line); }
.recipient-row summary { padding:0.65em 0.3em; cursor:pointer; }
.recipient-row summary span { display:inline-block; margin-inline-start:0.9em; }
.recipient-row-action { justify-self:start; margin-block:0.35em; }
@media (max-width:560px) { .recipient-row { grid-template-columns:minmax(0,1fr); } }
.recipient-evidence { padding:0 0.8em 0.8em; overflow-wrap:anywhere; }
.recipient-evidence ul { padding-left:1.3em; }
.recipient-draft { display:grid; gap:0.6em; margin-top:0.6em; }
.recipient-draft label { display:grid; gap:0.25em; }
.recipient-draft textarea { width:100%; resize:vertical; }
.recipient-draft button { justify-self:start; }
.recipient-pages { display:flex; gap:0.8em; justify-content:center; align-items:center; flex:none; }
.send-results { display:flex; flex-direction:column; flex:1; min-height:0; gap:8px; }
.result-secondary { flex:none; flex-wrap:wrap; }
.result-secondary:empty { display:none; }
.send-result-details { overflow:auto; }
.result-reason, .terra-approval { overflow-wrap:anywhere; }
.terra-approval { display:flex; flex-direction:column; gap:8px; padding:14px; }
.terra-approval textarea { width:100%; }
.terra-approval > .btn { align-self:flex-start; }
.terra-recipients { max-height:360px; overflow:auto; }
.terra-recipients details { border-bottom:1px solid #e6e6e6; padding:8px 0; }
.terra-recipients summary { cursor:pointer; }

#preview { display:flex; flex:1; min-height:0; }
.preview-note { margin:0; padding:6px 20px; border-bottom:1px solid #e5e7eb; background:#fff7ed; color:#652800; }
