/* public/css/editor.css — 編集室。パソコンでの作業を主に、タブレットでも崩れないように。
   配色は明るい業務画面に固定する（2026-10 見直し）。端末の暗い設定には追従しない。
   理由：作るものがポスター・告知文・寸劇台本など白い紙の印刷物で、プレビューと編集欄の地を揃えたい／
   役所・警察の端末や審査の場で、誰が開いても同じ見え方にしたい／暗い配色では主ボタン（淡い青に白字）が読みにくかった。 */
:root {
  color-scheme: light;
  --bg: #f3f5f8; --ink: #1f2933; --muted: #56616f; --card: #fff; --line: #dbe1e8; --line-strong: #c3ccd6;
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #e6edfd; --brand: #1e3a5f;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --ng: #b91c1c; --ng-soft: #fee2e2;
  --radius: 12px; font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--ink); }
a.btn.primary { color: #fff; }
.muted { color: var(--muted); }
.err { color: var(--ng); font-weight: 700; }
.btn { border: 1px solid var(--line-strong); background: var(--card); border-radius: 10px; padding: 8px 14px; min-height: 40px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tabs button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
@media (max-width: 760px) { .btn { white-space: normal; text-align: center; } }
.btn.danger { color: var(--ng); }
.btn.danger:hover { color: var(--ng); border-color: var(--ng); background: var(--ng-soft); }
.btn.small { padding: 3px 9px; min-height: 30px; font-size: .85rem; font-weight: 700; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--line-strong); background: var(--card); border-radius: 8px; padding: 7px 9px; width: 100%; }
input::placeholder, textarea::placeholder { color: #7b8794; }
textarea { resize: vertical; min-height: 40px; }
label { display: block; font-weight: 700; font-size: .9rem; margin: 10px 0 4px; }
label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, var(--brand) 0 38%, var(--bg) 38%); }
.login-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: min(420px, 100%); box-shadow: 0 12px 40px rgba(15, 30, 60, .18); border-top: 5px solid var(--accent); }
.login-box h1 { margin: 0 0 6px; }
.login-box .btn { width: 100%; margin-top: 16px; padding: 12px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); border-top: 4px solid var(--brand); flex-wrap: wrap; }
.brand { font-weight: 900; text-decoration: none; color: var(--brand); display: inline-flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); box-shadow: 4px 4px 0 var(--brand); }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { text-decoration: none; font-weight: 700; color: var(--ink); padding: 4px 10px; border-radius: 8px; }
.topnav a:hover { background: var(--accent-soft); color: var(--accent); }
.topnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) {
  .top { position: static; gap: 6px 12px; padding: 8px 12px; }
  .topnav { flex-wrap: nowrap; overflow-x: auto; width: 100%; order: 3; margin: 0 -4px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .topnav a { white-space: nowrap; flex: none; padding: 8px 10px; }
  .view { padding: 14px 12px; }
}
.top .who { margin-left: auto; color: var(--muted); font-size: .9rem; }
.view { padding: 20px; min-width: 0; }
h1.page { margin: 0 0 4px; font-size: 1.5rem; color: var(--brand); }

.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(15, 30, 60, .05); }
.case:has(.pill.pub) { border-top: 4px solid var(--ok); }
.case:has(.pill.draft) { border-top: 4px solid #f59e0b; }
.case h2 { margin: 0; font-size: 1.15rem; }
.case .row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; font-size: .8rem; font-weight: 800; border-radius: 999px; padding: 1px 10px; background: var(--accent-soft); color: var(--accent); }
.pill.pub { background: var(--ok-soft); color: #166534; }
.pill.draft { background: var(--warn-soft); color: #92400e; }
.pill.hidden { background: #e5e7eb; color: #374151; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--ok); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.ed-main { min-width: 0; }
.stage-jump { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 0 0 12px; position: sticky; top: var(--head-h, 64px); z-index: 5; background: var(--bg); padding: 6px 0; }
.stage-jump a { font-size: .82rem; font-weight: 700; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink); }
.stage-jump a:hover { border-color: var(--accent); color: var(--accent); }
.gn-sublabel { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 6px 10px 0; }
@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; } .side, .panel, .rcol { position: static !important; }
  .rcol { max-height: none; }
  /* 狭い画面では左の目次を横一列の帯にする（縦に積むと本文が画面の下に押し出される） */
  .side { display: flex; gap: 4px; overflow-x: auto; padding: 6px; -webkit-overflow-scrolling: touch; }
  .side a { white-space: nowrap; flex: none; }
  .side .side-label, .side .sub { display: none; }
  .panel { max-height: none; }
}
.side { position: sticky; top: calc(var(--head-h, 64px) + 10px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.side a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.side a:hover { background: var(--bg); }
.side a.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.side .sub { font-weight: 500; font-size: .85rem; padding-left: 22px; }
.panel { position: sticky; top: calc(var(--head-h, 64px) + 10px); display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 90px); overflow: auto; }
/* 台詞を直す画面の右の列：上に「体験画面での見え方」、下に公開までの手順と検査 */
.rcol { position: sticky; top: calc(var(--head-h, 64px) + 10px); display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 90px); overflow: auto; }
.rcol .panel { position: static; max-height: none; overflow: visible; }
.pv-box summary { font-weight: 800; cursor: pointer; }
.pv-phone { width: 270px; height: 540px; margin: 10px auto 6px; border-radius: 28px; overflow: hidden; border: 6px solid #111827; background: #0f1720; }
.pv-frame { width: 375px; height: 750px; border: 0; transform: scale(.72); transform-origin: 0 0; display: block; pointer-events: none; }
.pv-cap { font-size: .88rem; margin: 6px 0; }
.pv-ruby { display: flex !important; flex-wrap: nowrap !important; gap: 6px; align-items: flex-start; font-size: .85rem; font-weight: 600; }
.pv-ruby input { margin-top: 3px; flex: none; width: auto; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.box h3 { margin: 0 0 8px; font-size: 1.05rem; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.bar .grow { flex: 1; }
.issue { font-size: .88rem; padding: 6px 8px; border-radius: 8px; margin: 4px 0; }
.issue.e { background: var(--ng-soft); color: #7f1d1d; }
.issue.w { background: var(--warn-soft); color: #78350f; }
.issue.a { background: #e0e7ff; color: #1e3a8a; }
.issue.ok { background: var(--ok-soft); color: #14532d; }

.stage { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; }
.stage-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stage-head .num { font-weight: 900; color: var(--accent); }
.stage-head input.title { font-weight: 800; font-size: 1.05rem; max-width: 320px; }
.stage-body { padding: 10px 14px 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .grid4 { grid-template-columns: 1fr 1fr; } }
.checks { display: flex; gap: 10px; flex-wrap: wrap; font-weight: 400; }
.checks label { font-weight: 500; display: flex; gap: 4px; align-items: center; margin: 0; }
.checks input { width: auto; }
.lines { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.line { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.line-main { display: flex; flex-direction: column; gap: 4px; }
.line-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.line-meta select { width: auto; max-width: 220px; padding: 3px 6px; font-size: .85rem; }
.line .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 12px; background: var(--line); }
.line .dot.has { background: var(--ok); }
.line .tools { display: flex; gap: 4px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tabs button { border: none; background: none; padding: 6px 10px; border-bottom: 3px solid transparent; cursor: pointer; font-weight: 700; color: var(--muted); }
.tabs button.on { color: var(--accent); border-color: var(--accent); }
.tabs .n { font-size: .75rem; background: var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; color: var(--ink); }
.tabhelp { font-size: .88rem; color: var(--muted); margin: 6px 0; }
.flow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0 14px; font-size: .85rem; }
.flow span { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.flow i { color: var(--muted); font-style: normal; }
.sugg { display: flex; flex-direction: column; gap: 6px; }
.sugg button { text-align: left; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; color: var(--brand); }
.kpi small { color: var(--muted); font-size: .85rem; }
.barrow { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 96px; gap: 8px; align-items: center; font-size: .9rem; margin: 6px 0; }
.barrow > :last-child { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 600px) { .barrow { grid-template-columns: 1fr auto; row-gap: 2px; margin: 4px 0 14px; } .barrow .track { grid-column: 1 / -1; grid-row: 2; } }
.barrow .track { height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; }
.barrow .track i { display: block; height: 100%; background: var(--ng); }
.barrow .track i.ok { background: var(--ok); }
.wizard { max-width: 860px; }
.steps { display: flex; gap: 8px; margin: 10px 0 18px; flex-wrap: wrap; }
.steps span { padding: 4px 12px; border-radius: 999px; background: var(--line); font-weight: 700; font-size: .85rem; }
.steps span.on { background: var(--accent); color: #fff; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -4px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 30; padding: 16px; }
.modal-box { background: var(--card); border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal-box h2 { margin-top: 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.qr { display: grid; place-items: center; padding: 10px; background: #fff; border-radius: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 40; font-weight: 700; }
[hidden] { display: none !important; }

/* ---- かんたん編集 ---- */
.side-label { font-size: .78rem; color: var(--muted); font-weight: 800; padding: 12px 10px 2px; letter-spacing: .05em; }
.btn.big { padding: 12px 22px; font-size: 1.05rem; }
.small { font-size: .85rem; }
.todo { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.todo li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg); }
.todo li .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: .8rem; flex: none; }
.todo li.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo li.done .grow { color: var(--muted); text-decoration: line-through; }
.todo li.opt { background: none; }
.grow { flex: 1; }
.easy-title { display: grid; gap: 8px; margin-bottom: 6px; }
.easy-title input.big { font-size: 1.5rem; font-weight: 900; }
.easy .box { margin: 14px 0; }
h2.sec { font-size: 1.15rem; margin: 22px 0 8px; }
.easy-stage { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.easy-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.easy-head .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; flex: none; }
.easy-head input.title { font-weight: 800; max-width: 340px; }
.bubs { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.bub { background: var(--accent-soft); border-radius: 14px 14px 14px 4px; padding: 8px 12px; max-width: 92%; }
.bub.dir { background: none; color: var(--muted); font-size: .88rem; padding-left: 0; }
.bub textarea { min-width: min(560px, 80vw); }
.bub-who { display: block; font-size: .78rem; color: var(--muted); font-weight: 700; }
.bub-text { cursor: text; }
.bub-text:hover { text-decoration: underline dotted; }
.bub-sign { display: inline-block; margin-left: 8px; font-size: .78rem; font-weight: 800; color: #fff; background: var(--ng); border-radius: 6px; padding: 0 6px; cursor: pointer; }
.voice { margin-left: 6px; color: var(--muted); }
.voice.has { color: var(--ok); }
.btn.add { margin-top: 2px; }
.easy-ai { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.easy-ai input { flex: 1; min-width: 240px; }
.sign-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; margin: 6px 0; }
@media (max-width: 760px) { .sign-row { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px dashed var(--line); } .sign-row > :last-child { justify-self: end; } }
details summary { cursor: pointer; color: var(--accent); font-weight: 700; margin-top: 10px; }

/* ---- ポスター・業務の記録 ---- */
.poster { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .poster { grid-template-columns: 1fr; } }
.poster-preview { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 70px; }
.poster-preview svg { width: 100%; height: auto; display: block; box-shadow: 0 4px 18px rgba(0,0,0,.15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
ol.tl { font-size: .82rem; color: var(--muted); margin: 6px 0; }

/* ---- イベント準備物 ---- */
.kit-wrap { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .kit-wrap { grid-template-columns: 1fr; } }
.kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.kit-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.kit-thumb svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; }
.kit-docs { display: grid; gap: 12px; }
.kit-doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius); max-height: 520px; overflow: auto; }
.kit-doc .doc { padding: 16px 20px; }
.kit-doc h1 { font-size: 1.3rem; margin: 0 0 6px; }
.kit-doc h2 { font-size: 1.05rem; border-left: 5px solid #1E3A5F; padding-left: 8px; margin: 16px 0 6px; }
.kit-doc h3 { font-size: .95rem; margin: 10px 0 2px; }
.kit-doc table { border-collapse: collapse; width: 100%; }
.kit-doc th, .kit-doc td { border-bottom: 1px solid #ddd; padding: 5px 8px; text-align: left; vertical-align: top; font-size: .9rem; }
.kit-doc th { white-space: nowrap; color: #1E3A5F; width: 30%; }
.kit-doc .box { border: 1px solid #ccc; border-radius: 8px; padding: 10px; line-height: 1.8; }
.kit-doc ul.check { list-style: none; padding: 0; columns: 2; }
table.t th.num { text-align: right; }
.char-thumbs { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.char-thumb { margin: 0; text-align: center; }
.char-thumb img { width: 96px; height: 96px; object-fit: contain; background: repeating-conic-gradient(var(--line) 0% 25%, transparent 0% 50%) 50% / 16px 16px; border: 1px solid var(--line); border-radius: 8px; }
.char-thumb figcaption { font-size: .78rem; color: var(--muted); }
.basis { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .88rem; }
.basis ul { margin: 2px 0 8px; padding-left: 1.2em; }
.basis li { margin: 2px 0; }

/* ---- 印刷物の大きなプレビュー ---- */
button.kit-thumb { display: block; padding: 0; border: none; background: none; cursor: zoom-in; width: 100%; }
button.kit-thumb:hover svg { outline: 3px solid var(--accent); outline-offset: 2px; }
.pv { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 28, .82); display: grid; grid-template-rows: auto 1fr; padding: 12px 16px 16px; }
.pv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--card); border-radius: 10px; padding: 8px 12px; }
.pv-title { display: flex; flex-direction: column; line-height: 1.3; }
.pv-stage { display: grid; place-items: center; min-height: 0; padding: 12px 56px 0; }
.pv-stage svg { height: min(100%, calc(100vh - 110px)); width: auto; max-width: 100%; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.pv-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: none; border-radius: 10px; background: rgba(255,255,255,.9); font-size: 2rem; cursor: pointer; color: #1f2933; }
.pv-nav.prev { left: 12px; }
.pv-nav.next { right: 12px; }
@media (max-width: 640px) { .pv-stage { padding: 8px 0 0; } .pv-nav { width: 40px; height: 56px; top: auto; bottom: 16px; transform: none; } }
/* 体験コーナーで使う書式 */
.kit-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.kit-form { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; color: var(--ink); text-decoration: none; }
.kit-form:hover { border-color: var(--accent); }
.kit-form b { display: block; }
.kit-form small { display: block; margin: 2px 0 8px; }
.kit-form-thumb { width: 100px; height: 141px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: block; }
.kit-form-thumb iframe { width: 794px; height: 1123px; border: 0; transform: scale(.126); transform-origin: 0 0; pointer-events: none; }
/* デザインのパターン */
.layout-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.layout-opt, .theme-opt { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.layout-opt.on, .theme-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.layout-opt .mini svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.layout-opt small, .theme-opt small { font-size: .72rem; line-height: 1.3; text-align: center; }
.theme-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.theme-opt .sw { width: 100%; height: 34px; border-radius: 6px; border: 1px solid var(--line); display: flex; align-items: flex-end; gap: 4px; padding: 4px; }
.theme-opt .sw i { flex: 1; height: 12px; border-radius: 3px; }
.brand a { text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.brand-home { color: var(--brand); }
.brand-sub { font-weight: 700; color: var(--muted); font-size: .85em; }
.brand a:hover { background: var(--accent-soft); color: var(--accent); }

/* 編集室のトップ：カテゴリごとのカード（アイキャッチ・できること・いまの状況） */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 16px; }
.hub { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); border-top: 5px solid var(--hub, var(--accent)); box-shadow: 0 1px 2px rgba(15, 30, 60, .05); transition: box-shadow .15s ease, transform .15s ease; }
.hub:hover { box-shadow: 0 8px 22px rgba(15, 30, 60, .12); transform: translateY(-2px); }
.hub-eye { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #f4f1ea; }
.hub-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hub h2 { margin: 0; font-size: 1.15rem; color: var(--brand); }
.hub-lead { margin: 0; font-size: .92rem; color: var(--muted); }
.hub-can { margin: 4px 0 0; padding-left: 1.2em; font-size: .9rem; display: grid; gap: 3px; }
.hub-can li::marker { color: var(--hub, var(--accent)); }
.hub-note { margin: auto 0 0; padding-top: 8px; font-size: .82rem; font-weight: 700; color: var(--hub, var(--accent)); }
.hub.g-case { --hub: var(--accent); } .hub.g-event { --hub: var(--warn); } .hub.g-rec { --hub: var(--ok); } .hub.g-line { --hub: #3fae72; } .hub.g-see { --hub: var(--brand); }
@media (prefers-reduced-motion: reduce) { .hub { transition: none; } .hub:hover { transform: none; } }

/* LINE 配信 */
.ln-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-top: 12px; }
@media (max-width: 860px) { .ln-grid { grid-template-columns: 1fr; } }
.ln-phone { position: sticky; top: calc(var(--head-h, 64px) + 12px); background: #8cabd8; border-radius: 18px; padding: 12px; }
.ln-head { color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.ln-bubble { background: #fff; border-radius: 14px; overflow: hidden; max-width: 300px; }
.ln-hero { display: block; width: 100%; background: #fff; }
.ln-body { padding: 12px 14px 6px; display: grid; gap: 4px; }
.ln-body b { font-size: 1.05rem; }
.ln-body p { margin: 0; font-size: .86rem; white-space: pre-wrap; color: #333; }
.ln-kind { font-weight: 800; font-size: .72rem; color: #1e3a5f; }
.ln-kind.k-case { color: #b91c1c; } .ln-kind.k-event { color: #b45309; }
.ln-foot { padding: 6px 14px 12px; display: grid; gap: 6px; text-align: center; }
.ln-btn { background: #1d4ed8; color: #fff; border-radius: 8px; padding: 7px; font-weight: 700; font-size: .88rem; }
.ln-link { color: #1d4ed8; font-size: .85rem; font-weight: 700; }
.ln-step { border-left: 4px solid var(--line-strong); padding: 6px 12px; margin: 6px 0; }
.ln-step.done { border-left-color: var(--ok); }
.ln-step.done > b { color: var(--ok); }
.ln-step p { margin: 4px 0; }

/* 録音の印と、録音が外れるときの注意 */
.vb { display: inline-block; font-size: .74rem; font-weight: 800; border-radius: 999px; padding: 0 8px; line-height: 1.7; vertical-align: middle; white-space: nowrap; }
.vb.rec { background: var(--ok-soft); color: #166534; }
.vb.tts { background: #eef1f4; color: var(--muted); }
.vb.dir { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }
.vwarn { font-size: .82rem; color: var(--muted); background: #f6f8fa; border-radius: 8px; padding: 6px 10px; margin: 4px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vwarn.on { color: #92400e; background: var(--warn-soft); font-weight: 700; }
.vwarn[hidden] { display: none; }

/* 体験の同意文 */
.cs-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; margin: 6px 0; }
.cs-item .num { font-weight: 800; color: var(--muted); padding-top: 8px; text-align: right; }
.cs-item .tools { display: flex; gap: 4px; }
.cs-preview { position: sticky; top: calc(var(--head-h, 64px) + 12px); }
.cs-phone { background: #f6f1e7; border: 1px solid var(--line); border-radius: 22px; padding: 16px; font-size: .86rem; line-height: 1.7; max-height: 78vh; overflow: auto; }
.cs-phone h3 { margin: 0 0 6px; font-size: 1.1rem; }
.cs-phone .cs-lead { color: var(--muted); margin: 0 0 8px; }
.cs-phone ol { padding-left: 1.3em; margin: 0 0 8px; display: grid; gap: 6px; }
.cs-phone .cs-prov { font-weight: 700; color: var(--muted); }
.cs-phone .cs-agree { background: #c2410c; color: #fff; text-align: center; font-weight: 800; border-radius: 12px; padding: 10px; margin-top: 8px; }
.cs-phone .cs-decline { text-align: center; text-decoration: underline; color: var(--muted); padding: 8px; }

/* 集計の前提 */
.sg { margin: 20px 0 16px; }
.sg > summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.sg h4 { margin: 14px 0 6px; }
.sg ol { margin: 0; padding-left: 1.4em; }
.sg-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .sg-flow { grid-template-columns: 1fr; } }
.sg-flow > div { border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 8px; padding: 8px 10px; font-size: .88rem; display: grid; gap: 2px; }
.sg table th { white-space: nowrap; }
.sg table td { font-size: .88rem; }


/* 左のメニュー */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; align-items: start; }
.gnav { position: sticky; top: var(--head-h, 64px); max-height: calc(100vh - var(--head-h, 64px)); overflow-y: auto; padding: 16px 10px 24px 14px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.gnav a { display: block; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .92rem; padding: 6px 10px; border-radius: 8px; }
.gnav a:hover { background: var(--accent-soft); color: var(--accent); }
.gnav a.on { background: var(--accent); color: #fff; }
.gn-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.gn-group > a { padding-left: 22px; font-size: .88rem; font-weight: 600; }
.gn-title { font-size: .95rem; font-weight: 900; color: var(--brand); padding: 2px 10px; border-left: 4px solid var(--hub, var(--accent)); margin-bottom: 4px; }
.gn-group.g-case { --hub: var(--accent); } .gn-group.g-event { --hub: var(--warn); } .gn-group.g-line { --hub: #3fae72; } .gn-group.g-rec { --hub: var(--ok); } .gn-group.g-see { --hub: var(--brand); }
.gn-cur { margin: 2px 0 4px 10px; padding: 4px 0 4px 8px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 1px; }
.gn-cur > span { font-size: .8rem; font-weight: 800; color: var(--brand); padding: 2px 4px; }
.gnav a.sub { font-size: .84rem; padding: 4px 10px; font-weight: 600; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .gnav { position: static; max-height: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; gap: 6px; }
  .gn-group { flex-direction: row; margin-top: 0; gap: 4px; align-items: center; }
  .gn-title { border-left: 0; padding: 0 2px 0 8px; white-space: nowrap; font-size: .8rem; }
  .gn-group { border-top: 0; padding-top: 0; }
  .gn-group > a { padding-left: 10px; }
  .gnav a, .gnav a.sub { white-space: nowrap; flex: none; }
  .gn-cur { flex-direction: row; margin: 0; border-left: 0; padding: 0; align-items: center; }
  .gnav { align-items: center; } .gnav > *, .gn-group > *, .gn-cur > * { flex: none; white-space: nowrap; }
  .gn-sublabel { padding: 0 4px; }
}

/* 実証の書式 */
.fm-intro h3 { margin: 4px 0 6px; color: var(--brand); }
.fm-intro p { margin: 0 0 8px; }
.fm-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
@media (max-width: 1000px) { .fm-flow { grid-template-columns: 1fr; } }
.fm-flow > div { border: 1px solid var(--line); border-top: 4px solid var(--ok); border-radius: 8px; padding: 8px 10px; font-size: .88rem; display: grid; gap: 2px; }
.fm-list { display: grid; gap: 12px; }
.fm-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; color: var(--ink); }
.fm-item:hover { border-color: var(--accent); }
.fm-thumb { width: 150px; height: 212px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.fm-thumb iframe { width: 794px; height: 1123px; border: 0; transform: scale(.189); transform-origin: 0 0; pointer-events: none; }
.fm-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fm-body b { font-size: 1.1rem; color: var(--brand); }
.fm-who { font-size: .78rem; font-weight: 800; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 8px; }
.fm-when { font-size: .85rem; font-weight: 700; color: var(--ok); }
@media (max-width: 560px) { .fm-item { grid-template-columns: 1fr; } }
.form-frame { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.ln-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
@media (max-width: 800px) { .ln-ways { grid-template-columns: 1fr; } }
.ln-ways > div { background: var(--card); border: 1px solid var(--line); border-top: 4px solid #3fae72; border-radius: var(--radius); padding: 12px 14px; }
.ln-ways b { font-size: 1.02rem; margin-right: 8px; }
.ln-ways p { margin: 6px 0 0; font-size: .92rem; }
.ln-ways ul { margin: 8px 0 0; padding-left: 1.2em; font-size: .92rem; display: grid; gap: 4px; }
.ln-ways ul b { font-size: inherit; margin: 0; }
.ln-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: .88rem; font-weight: 700; }
.ln-flow span { background: #ecfdf3; color: #14532d; border: 1px solid #b7ebc9; border-radius: 999px; padding: 3px 10px; }
.ln-flow i { font-style: normal; color: var(--ink); }
.ln-try > p { margin: 4px 0 8px; }
.ln-friend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.ln-friend p { margin: 4px 0; font-size: .92rem; }
.ln-qr { border: 3px solid #3fae72; padding: 8px; }
.ln-code { border: 2px solid #3fae72; border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: #f6fef9; font-size: .92rem; display: grid; gap: 4px; }
.ln-code-num { font-size: 1.9rem; font-weight: 900; letter-spacing: .08em; color: #14532d; user-select: all; }
.ln-wait { font-weight: 700; color: #1e3a8a; }
.ln-push { margin-top: 10px; font-size: .9rem; }
.ln-push summary { cursor: pointer; font-weight: 700; }

.login-back { margin: 14px 0 0; text-align: center; font-size: .92rem; }
.login-back a { font-weight: 700; text-decoration: none; }
.login-back a:hover { text-decoration: underline; }

/* 検査の指摘：押すと直す箇所へ移る */
button.issue.jump { display: flex; width: 100%; align-items: baseline; gap: 8px; text-align: left; border: 0; font: inherit; font-size: .88rem; cursor: pointer; }
button.issue.jump:hover { filter: brightness(.96); text-decoration: underline; }
button.issue.jump .go { margin-left: auto; white-space: nowrap; font-weight: 700; font-size: .8rem; }
.flash { animation: flash 2.4s ease-out; border-radius: 10px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px #f59e0b; background-color: #fff7e0; } 100% { box-shadow: 0 0 0 0 transparent; } }
.easy-missing { border: 1px dashed var(--ng, #b91c1c); border-radius: 10px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 8px; }
.easy-missing .miss-slot { display: grid; gap: 4px; }
.easy-missing .miss-slot label { font-weight: 700; font-size: .9rem; }
.issue-wrap { display: grid; gap: 4px; margin: 4px 0; }
.issue-wrap .issue { margin: 0; }
.issue-wrap .ai-fix { justify-self: end; }
.gn-more { margin-top: 4px; }
.gn-more summary { cursor: pointer; font-size: .82rem; color: var(--muted); padding: 4px 10px; list-style-position: inside; }
.easy-replies { margin-top: 8px; }
.easy-replies summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
.easy-replies .rep-group { margin: 8px 0 0 8px; }
.easy-replies .rep-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.easy-auto { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); color: #78350f; border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: .88rem; }
.easy-auto span { flex: 1 1 260px; }
/* 3択の選択肢は、枠で囲んでひとまとまりに見せる */
.easy-choices { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: stretch; margin: 10px 0; border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px 10px 10px; background: var(--bg); }
.easy-choices legend { font-size: .85rem; font-weight: 800; padding: 0 4px; }
.easy-choices .choice-edit { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; margin: 0; }
.easy-choices .choice-edit small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.easy-choices .choice-edit .line-ta { font-size: .9rem; padding: 6px 8px; }
.line-ta { resize: none; overflow: hidden; line-height: 1.45; min-height: 0; width: 100%; }
.flags-box { border: 2px solid #fca5a5; background: #fff7f7; }
.flag-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.flag-list li { display: flex; gap: 8px; align-items: center; }
.flag-go { flex: 1; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; }
.flag-go:hover { border-color: #b91c1c; }
.flag-go small { display: block; font-size: .75rem; color: var(--muted); }
.board .board-strip { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding: 8px 4px 16px; scroll-snap-type: x proximity; }
.ph-col { flex: 0 0 290px; scroll-snap-align: start; display: grid; gap: 8px; }
.ph-step { font-weight: 800; display: flex; gap: 6px; align-items: center; font-size: .92rem; }
.ph-step .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--staff, #1d4ed8); color: #fff; font-size: .8rem; }
.ph-auto { font-size: .72rem; background: var(--warn-soft); color: #78350f; border-radius: 999px; padding: 1px 8px; }
.ph { background: #0f1720; border-radius: 26px; padding: 10px 10px 14px; box-shadow: 0 6px 18px rgba(15, 23, 32, .25); border: 3px solid #26313d; }
.ph-head { color: #f3f5f7; text-align: center; padding: 6px 0 8px; border-bottom: 1px solid #2b3642; margin-bottom: 8px; }
.ph-head b { display: block; font-size: .95rem; } .ph-head small { color: #9fb0c0; font-size: .75rem; }
.ph-screen { display: grid; gap: 8px; }
.ph-screen .bub { background: #1f2a36; color: #f3f5f7; }
.ph-screen .bub .bub-who { color: #9fb0c0; }
.ph-screen .bub textarea, .ph-screen .bub select { background: #fff; color: #1b2430; }
.ph-screen .bub .vwarn { color: #1b2430; }
.ph-screen .btn.add { background: transparent; color: #cbd5e1; border-color: #3b4757; }
.ph-choices { display: grid; gap: 6px; margin-top: 4px; }
.ph-choice { display: grid; gap: 2px; }

.ph-choice .line-ta, .ph-choice input { background: #26313d; color: #fff; border: 1px solid #3b4757; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: .88rem; }
.ph-choice small { color: #9fb0c0; font-size: .7rem; padding-left: 4px; }
.ph-choice.fixed { background: #26313d; color: #fff; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: .88rem; }
.ph-arrow { align-self: center; color: var(--muted); font-size: 1.4rem; flex: 0 0 auto; padding-top: 120px; }
.ph-screen .bub.editing { background: #fff; color: var(--ink, #1b2430); box-shadow: 0 0 0 3px #60a5fa; }
.ph-screen .bub.editing .btn:not(.primary):not(.danger) { color: var(--ink, #1b2430); }
.ph-step .ph-next { margin-left: auto; color: var(--staff, #1d4ed8); font-size: 1.2rem; font-weight: 900; line-height: 1; }
.ph-divider { display: flex; align-items: center; gap: 8px; color: #9fb0c0; font-size: .72rem; font-weight: 700; margin: 10px 0 2px; }
.ph-divider::before, .ph-divider::after { content: ''; flex: 1; border-top: 1px dashed #3b4757; }
.bub { position: relative; padding-right: 64px; }
.bub.editing { padding-right: 10px; }
.bub-tools { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.bub-ico { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; opacity: .55; }
.bub-ico:hover, .bub-ico:focus-visible { opacity: 1; background: rgba(29, 78, 216, .12); }
.bub-ico.del:hover, .bub-ico.del:focus-visible { background: rgba(185, 28, 28, .14); color: #b91c1c; }
.ph-screen .bub-ico.del:hover { color: #fca5a5; }
.hub-eye.hub-mascot { position: relative; overflow: hidden; background: linear-gradient(135deg, #fff7e0, #f1f5f9); }
.hub-eye.hub-mascot img { position: absolute; left: 50%; top: 6%; height: 88%; width: auto; transform: translateX(-50%); }
.survey-opts { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; display: grid; gap: 4px; }
.survey-opts legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }

/* 集計：ここが大事（色付きの要点）と、折りたたみのまとまり */
.st-key { margin: 6px 0 8px; font-size: 1rem; }
.hl-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-left: 12px; font-size: .8rem; font-weight: 600; color: var(--muted); vertical-align: middle; }
.hl-legend span { display: inline-flex; align-items: center; gap: 4px; }
.hl-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hl-legend i.ng { background: #dc2626; } .hl-legend i.warn { background: #f59e0b; } .hl-legend i.ok { background: #16a34a; } .hl-legend i.info { background: #2563eb; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hl { border: 1px solid var(--line); border-left: 6px solid #64748b; border-radius: 10px; padding: 10px 12px; background: #f8fafc; }
.hl small { display: block; font-weight: 700; font-size: .85rem; }
.hl b { display: block; font-size: 1.35rem; margin: 2px 0; }
.hl p { margin: 0; font-size: .86rem; line-height: 1.55; }
.hl.ng { border-left-color: #dc2626; background: #fef2f2; } .hl.ng b { color: #b91c1c; }
.hl.warn { border-left-color: #f59e0b; background: #fffbeb; } .hl.warn b { color: #92400e; }
.hl.ok { border-left-color: #16a34a; background: #f0fdf4; } .hl.ok b { color: #166534; }
.hl.info { border-left-color: #2563eb; background: #eff6ff; } .hl.info b { color: #1e3a8a; }
.st-group { border-top: 1px solid var(--line); padding: 8px 0; }
.st-group > summary { cursor: pointer; font-weight: 800; font-size: 1rem; padding: 4px 0; }
.st-group h4 { margin: 12px 0 6px; font-size: .95rem; }
.st-help { font-size: .9rem; margin: 6px 0; }
.miss-word { color: #b91c1c; }
tr.miss-hot td { background: #fef2f2; }
tr.miss-hot td.miss { color: #b91c1c; font-weight: 800; }

/* お知らせ：文案を読み込む */
.nd-box { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; border-left: 5px solid #3fae72; }
.nd-box p { margin: 2px 0 0; font-size: .9rem; }
.nd-h { margin: 14px 0 2px; font-size: 1rem; }
.nd-help { margin: 0 0 6px; font-size: .88rem; }
.nd-list { display: grid; gap: 6px; }
.nd-pick { text-align: left; font: inherit; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; cursor: pointer; display: grid; gap: 2px; }
.nd-pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.nd-pick small { font-size: .82rem; color: var(--ink); }
/* 会場の設定のチェック：長い文でも、四角を文の頭の左に置く（折り返しは文の中だけ） */
.survey-opts label.checks { flex-wrap: nowrap; align-items: flex-start; gap: 8px; line-height: 1.5; }
.survey-opts label.checks input { flex: none; margin: .3em 0 0; }
/* 「公開」「配信」など、取り消しにくい最後の一押しのボタン。青い「保存」と見分けがつくよう、緑で大きめにする */
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 1rem; padding: 8px 20px; box-shadow: 0 2px 0 #0f5d2c; }
.btn.go:hover:not(:disabled) { background: #116b33; border-color: #116b33; color: #fff; }
.btn.go:disabled { background: var(--line-strong); border-color: var(--line-strong); box-shadow: none; cursor: not-allowed; }
.link-dest { margin: 6px 0 0; font-size: .9rem; }
.link-dest b { color: var(--accent); }
/* 押せる所は、マウスを乗せると反応する（たたんだ見出し・タブ・一覧の行など） */
details > summary { border-radius: 6px; transition: background .12s; }
details > summary:hover { background: var(--accent-soft); color: var(--accent); }
.st-group > summary { padding: 6px 8px; margin: 0; }
.st-group > summary::after { content: '（押すと開く）'; font-size: .78rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.st-group[open] > summary::after { content: '（押すとたたむ）'; }
.tabs button:hover { color: var(--accent); border-bottom-color: var(--accent-soft); }
.btn:not(:disabled):active { transform: translateY(1px); }
/* LINE：2つの届け方が同時に動くことを示す図 */
.ln-both { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin: 10px 0 14px; }
@media (max-width: 800px) { .ln-both { grid-template-columns: 1fr; } .ln-plus { text-align: center; } }
.ln-lane { background: var(--card); border: 1px solid var(--line); border-top: 4px solid #3fae72; border-radius: var(--radius); padding: 10px 14px; }
.ln-lane-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ln-lane-h b { font-size: 1.02rem; }
.ln-lane p { margin: 6px 0 0; font-size: .92rem; }
.ln-plus { align-self: center; font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.ln-tabs button { font-size: 1rem; padding: 8px 14px; }
.ln-panel { padding-top: 12px; }
/* 集計：5段階の答えの人数の帯グラフ。色は「良い・悪い」ではなく、思う度合いの濃さ（薄い＝思わない、濃い＝思う） */
.bands { display: grid; gap: 12px; margin: 6px 0 12px; }
.band-q > b { display: block; font-size: .92rem; margin-bottom: 4px; }
.band-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 3.5em; gap: 8px; align-items: center; margin: 3px 0; font-size: .85rem; }
.band { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--line); }
.band.empty { background: none; color: var(--muted); align-items: center; }
.band i, .band-legend i { font-style: normal; }
.band i { display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; white-space: nowrap; overflow: hidden; border-right: 1px solid #fff; }
.band i:last-child { border-right: 0; }
.band-n { text-align: right; color: var(--muted); }
.b1 { background: #e8eef9; color: #1e3a8a; } .b2 { background: #bcd0f0; color: #1e3a8a; } .b3 { background: #8aaee6; color: #0f1f4d; }
.b4 { background: #4a7fd6; color: #fff; } .b5 { background: #1d4ed8; color: #fff; }
.band-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.band-legend span { display: inline-flex; align-items: center; gap: 4px; }
.band-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
/* 印刷・PDF（集計の書き出しなど）：画面の枠やボタンを外し、色はそのまま刷る */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top, .gnav, .toast, .modal, .no-print, .btn, .sg, .st-group > summary::after { display: none !important; }
  .print-only { display: block; color: var(--muted); }
  .layout, .view { display: block; padding: 0; margin: 0; max-width: none; }
  .hl, .band-q, .kpi, tr, .barrow { break-inside: avoid; }
  .st-group > summary { color: var(--ink); background: none; }
  h2, h3, h4 { break-after: avoid; }
  .box { max-width: 100%; }
  .tbl { overflow: visible !important; }
  .t { width: 100%; font-size: 9pt; }
  .t th, .t td { padding: 3px 5px; white-space: normal !important; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
/* AI の書き直しの前後の比べ */
.rev-diff { border: 2px solid #f59e0b; background: #fffbeb; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.rd td, .rd th { vertical-align: top; font-size: .9rem; }
.rd .rd-k { white-space: nowrap; color: var(--muted); font-size: .8rem; }
.rd del { background: #fee2e2; color: #b91c1c; text-decoration: line-through; }
.rd ins { background: #dcfce7; color: #166534; text-decoration: none; font-weight: 700; }
/* スマホ画面で編集：選択肢と、それを選んだときの相手の返しを、1組ずつ縦に並べる */
.ph-pair { display: grid; gap: 0; border-left: 3px solid #4a7fd6; padding-left: 6px; }
.ph-pair + .ph-pair { margin-top: 6px; }
.ph-reply { background: #e8eef9; color: var(--ink); border-radius: 0 0 10px 10px; padding: 6px 8px 8px; margin: 0 2px; font-size: .85rem; }
.ph-reply-h { font-size: .74rem; font-weight: 800; color: #1e3a8a; margin-bottom: 2px; }
.ph-reply-next { font-size: .74rem; font-weight: 700; color: var(--ok); margin-top: 2px; }
.ph-reply .bub { max-width: 100%; }
.ph-reply .bub textarea { min-width: 0; }
.ev-usage { font-size: .9rem; margin: 4px 0 2px; }
.ev-usage b { color: var(--ok); }
.ev-usage.none { color: var(--muted); }
/* 言葉の説明（ⓘ） */
.term { border: 0; background: none; color: var(--accent); font-size: .95em; font-weight: 800; cursor: pointer; padding: 0 3px; margin-left: 2px; line-height: 1; vertical-align: baseline; border-radius: 50%; }
.term:hover { background: var(--accent-soft); }
.term-pop { position: fixed; z-index: 60; max-width: 340px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 30, 60, .18); padding: 10px 12px; font-size: .9rem; line-height: 1.6; }
.term-pop b { display: block; color: var(--brand); }
.term-pop p { margin: 4px 0 6px; }
.term-pop a { font-size: .82rem; }
/* はじめての人への「やることは3つ」 */
.first-steps { background: #eef4ff; border: 2px solid #bcd0f0; border-radius: var(--radius); padding: 12px 16px; margin: 10px 0 14px; }
.first-steps h2 { margin: 0 0 6px; font-size: 1.08rem; color: var(--brand); }
.first-steps ol { margin: 0; padding-left: 1.5em; display: grid; gap: 6px; }
.first-steps li b { display: block; font-size: 1rem; }
.first-steps li span { font-size: .9rem; }
.first-steps p { margin: 8px 0; }
.fs-mini { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; background: #eef4ff; border-radius: 10px; padding: 6px 12px; margin: 8px 0 12px; font-size: .9rem; }
.linkish { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }
/* 危険サインの表（たたむ） */
.signs-box > summary { font-weight: 800; font-size: 1.02rem; color: var(--ink); margin: 0; padding: 2px 4px; }
.signs-box .sum-sub { display: block; font-weight: 500; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.signs-box:not([open]) > summary::after { content: '（押すと開く）'; font-size: .78rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.audio-note > summary { font-size: .85rem; margin-top: 8px; }
/* 使い方ガイド（A4 1枚） */
.guide { max-width: 1000px; }
.g-lead { font-size: 1rem; }
.g-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .g-cols { grid-template-columns: 1fr; } }
.guide h2 { font-size: 1.05rem; color: var(--brand); border-bottom: 2px solid var(--line); padding-bottom: 2px; margin: 14px 0 6px; }
.g-map { display: grid; grid-template-columns: 1fr 2fr 1.5fr; gap: 6px; margin: 6px 0; }
.g-map > div { border: 2px solid var(--line-strong); border-radius: 8px; padding: 8px; min-height: 92px; font-size: .88rem; font-weight: 700; display: flex; flex-direction: column; gap: 2px; background: #fff; }
.g-map b { color: var(--accent); }
.g-map small { font-weight: 500; color: var(--muted); }
.g-map .g-c { background: #f8fafc; }
.g-list, .g-steps { margin: 4px 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: .92rem; }
.g-steps b { color: var(--ok); }
.g-terms { width: 100%; border-collapse: collapse; font-size: .85rem; }
.g-terms th { text-align: left; white-space: nowrap; vertical-align: top; padding: 5px 8px 5px 0; color: var(--brand); }
.g-terms td { padding: 5px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.g-foot { margin-top: 14px; font-size: .8rem; color: var(--muted); }
@media print {
  .guide { max-width: none; font-size: 9pt; line-height: 1.45; }
  .guide h1 { font-size: 15pt; margin: 0 0 2px; }
  .g-lead { font-size: 9.5pt; margin: 0 0 4px; }
  .guide h2 { font-size: 10.5pt; margin: 7px 0 3px; }
  .g-cols { grid-template-columns: 1.2fr 1fr; gap: 12px; }
  .g-map > div { min-height: 0; padding: 5px 6px; font-size: 8.5pt; }
  .g-terms { font-size: 8pt; }
  .g-terms th, .g-terms td { padding: 2px 6px 2px 0; line-height: 1.4; }
  .g-list, .g-steps { font-size: 8.5pt; gap: 2px; }
  .guide p { margin: 3px 0; }
  .g-foot { margin-top: 6px; }
  .term { display: none; }
}
/* 新しい手口：速報版／本格版の選択 */
.kind-pick { display: grid; gap: 8px; margin: 12px 0 4px; }
.kind-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #d5dbe3; border-radius: 10px; cursor: pointer; font-weight: 400; }
.kind-opt:has(input:checked) { border-color: #1d4ed8; background: #eef3ff; }
.kind-opt input { margin-top: 4px; flex: none; width: auto; height: auto; }
.kind-opt > span { flex: 1; min-width: 0; }
.kind-opt b { display: block; }
.kind-opt small { display: block; line-height: 1.6; }

/* 速報版の「スマホ画面で編集」：左に台本（段階を縦に並べる）、右に体験画面を固定 */
.board-live { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.board-live-left .board-strip { flex-direction: column; overflow-x: visible; scroll-snap-type: none; align-items: stretch; }
.board-live-left .ph-col { flex: none; max-width: 560px; }
.board-live-left .ph-next { transform: rotate(90deg); }
.live-pane { position: sticky; top: calc(var(--head-h, 64px) + 10px); display: grid; gap: 8px; }
.live-phone { width: 319px; height: 638px; margin: 0 auto; border-radius: 30px; overflow: hidden; border: 6px solid #111827; background: #0f1720; }
.live-frame { width: 375px; height: 750px; border: 0; transform: scale(.85); transform-origin: 0 0; display: block; }
.live-now { min-height: 2.6em; margin: 0; }
.live-on { outline: 3px solid #f59e0b; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(245, 158, 11, .25); transition: outline-color .2s; }
@media (max-width: 1100px) { .board-live { grid-template-columns: 1fr; } .live-pane { position: static; } }
.quick-wait { display: grid; justify-items: center; gap: 6px; margin: 12px 0; }
/* 右の列は幅が狭いので、日本語を文節の切れ目で折り返す（対応するブラウザだけ。それ以外はこれまでどおり） */
.panel, .live-pane { word-break: auto-phrase; }

/* はじめての速報版づくりの案内（光る指とふきだし。押しても素通りする） */
.guide-finger { position: fixed; z-index: 1000; pointer-events: none; width: 0; height: 0; transition: left .35s ease, top .35s ease; }
.guide-finger[hidden] { display: none; }
.guide-ring { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; background: rgba(245, 158, 11, .35); box-shadow: 0 0 0 4px rgba(245, 158, 11, .8), 0 0 24px 8px rgba(245, 158, 11, .55); animation: guide-pulse 1.2s ease-out infinite; }
.guide-hand { position: absolute; left: -6px; top: 4px; font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); animation: guide-tap 1.2s ease-in-out infinite; }
@keyframes guide-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes guide-tap { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(-4px); } }
.guide-tip { position: fixed; z-index: 1001; width: min(360px, calc(100vw - 24px)); background: #fffdf5; color: #111827; border: 3px solid #f59e0b; border-radius: 14px; padding: 12px 14px; box-shadow: 0 0 0 6px rgba(245, 158, 11, .25), 0 12px 32px rgba(0, 0, 0, .45); transition: left .3s ease, top .3s ease; word-break: auto-phrase; }
.guide-tip p { margin: 6px 0 10px; line-height: 1.6; }
.guide-step { font-size: .78rem; color: #b45309; font-weight: 800; }
.guide-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.guide-bar .grow { flex: 1; }
.guide-tip .btn:not(.primary) { background: #fff; color: #374151; border-color: #d1d5db; }
.guide-target { outline: 3px solid #f59e0b !important; outline-offset: 3px; box-shadow: 0 0 0 8px rgba(245, 158, 11, .25) !important; border-radius: 10px; }
/* 案内の間に、指していない場所を押したとき：ふきだしを揺らして知らせる */
.guide-nudge { animation: guide-nudge .4s ease; }
@keyframes guide-nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
/* チェック欄と文を1つにした label.checks：文が長くても、チェック欄の右に並べて折り返す（下の行に落とさない） */
label.checks { flex-wrap: nowrap; align-items: flex-start; gap: 8px; line-height: 1.5; }
label.checks > input { flex: none; margin: .3em 0 0; }

/* 開いている台本の画面は、共通のメニューと分けて、下に白い囲みで出す（どこからがこの台本の画面か分かるように） */
.gn-cur.gn-case { margin: 10px 0 4px; padding: 8px 6px 6px; border: 1px solid var(--line-strong); border-left: 4px solid var(--brand); border-radius: 10px; background: #fff; gap: 2px; }
.gn-case > small { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 0 6px; }
.gn-case > b { font-size: .92rem; color: var(--ink, #1b2430); padding: 0 6px 4px; border-bottom: 1px solid var(--line, #e5e7eb); margin-bottom: 2px; word-break: auto-phrase; }
@media (max-width: 900px) { .gn-cur.gn-case { flex-direction: row; border: 0; padding: 0; background: none; } .gn-case > small, .gn-case > b { border: 0; } }

/* 公開の記録：現行版を目立たせる */
.hist-help { margin: 4px 0 10px; padding-left: 1.2em; font-size: .92rem; }
.t.hist tr.cur td { background: #ecfdf5; font-weight: 700; }
.cur-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ok, #059669); color: #fff; font-size: .78rem; font-weight: 700; }

/* 実証の「使う流れ」：しっかりした枠と、順番がわかる矢印 */
.fm-flow { gap: 22px; counter-reset: fm; }
.fm-flow > div { position: relative; border: 2px solid #15803d; border-top-width: 6px; background: #f6fbf7; counter-increment: fm; }
.fm-flow > div > b::before { content: counter(fm) ". "; }
.fm-flow > div:not(:last-child)::after { content: "▶"; position: absolute; right: -19px; top: 50%; transform: translateY(-50%); color: #15803d; font-size: 1rem; }
@media (max-width: 1000px) { .fm-flow > div:not(:last-child)::after { content: "▼"; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%); } }

.bub-ico.mv { font-weight: 700; font-size: .9rem; line-height: 1; }

/* 左メニューのまとまりを開け閉めする */
details.gn-group > summary.gn-title { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
details.gn-group > summary.gn-title::-webkit-details-marker { display: none; }
details.gn-group > summary.gn-title::after { content: "▾"; margin-left: auto; font-size: .8rem; color: var(--muted); transition: transform .15s; }
details.gn-group:not([open]) > summary.gn-title::after { transform: rotate(-90deg); }
@media (max-width: 900px) { details.gn-group > summary.gn-title::after { display: none; } }

/* 3つのやること：3コマの図 */
.fs-steps { display: flex; align-items: stretch; gap: 8px; margin: 6px 0; }
.fs-step { flex: 1 1 0; display: grid; justify-items: center; text-align: center; gap: 2px; background: #fff; border: 2px solid #bcd0f0; border-radius: 12px; padding: 10px 8px; }
.fs-step .fs-ic { font-size: 1.9rem; line-height: 1.2; }
.fs-step b { font-size: 1rem; color: var(--brand); }
.fs-step span:last-child { font-size: .85rem; color: var(--muted); }
.fs-arrow { align-self: center; color: #7c9cd6; font-size: 1.1rem; }
@media (max-width: 700px) { .fs-steps { flex-direction: column; } .fs-arrow { transform: rotate(90deg); } }

/* 横に長い並びを送るボタン */
.strip-wrap { position: relative; }
.strip-nav { position: sticky; top: 50%; z-index: 5; position: absolute; top: 140px; width: 40px; height: 56px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 1.1rem; color: var(--brand); cursor: pointer; }
.strip-nav.prev { left: -6px; } .strip-nav.next { right: -6px; }
.strip-nav:disabled { opacity: .25; cursor: default; }
