/* グループホーム記録AIデモ：追加スタイル */
.steps { grid-template-columns: repeat(9, 1fr); gap: 6px; }
.step { flex-direction: column; gap: 4px; padding: 9px 4px; font-size: 12px; position: relative; }
.step em { position: absolute; top: -7px; right: -3px; min-width: 20px; text-align: center; }
mark { background: #fff1b3; padding: 0 2px; border-radius: 3px; }
.mini { margin: 14px 0 6px; font-size: 13px; color: var(--navy); border-left: 3px solid var(--accent); padding-left: 7px; }
.trow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.trow.end { justify-content: flex-end; margin-top: 12px; }
.tl2 { min-width: 44px; font-weight: 700; color: var(--ink2); }
.btn.big { padding: 11px 18px; font-size: 15px; }

/* タブレット枠 */
.tablet { border: 10px solid #1c232b; border-radius: 22px; background: #fff; padding: 12px 14px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tab-h { background: var(--accent-bg); border-radius: 9px; padding: 8px 12px; margin-bottom: 8px; font-size: 15px; }
.tab-h small { color: var(--ink2); font-size: 12px; margin-left: 6px; }
.tsec { border-bottom: 1px dashed #dde3ea; padding: 6px 0 4px; }
.tsec h4 { margin: 4px 0; font-size: 13px; color: var(--navy); }
.tsec h4 small { font-weight: 400; color: var(--muted); }
.tchip { border: 1.5px solid #c9d2dc; background: #fff; color: var(--ink2); border-radius: 99px; padding: 9px 15px; font-size: 14px; cursor: pointer; min-height: 40px; }
.tchip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.tchip.ng { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.tchip.phr { font-size: 12.5px; padding: 7px 11px; min-height: 34px; background: #f4f7fa; }
.tin { width: 74px; border: 1.5px solid #c9d2dc; border-radius: 9px; padding: 9px 8px; font-size: 16px; text-align: right; }
.tmemo { width: 100%; border: 1.5px solid #c9d2dc; border-radius: 9px; padding: 9px 11px; font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.6; }
.btn.mic { background: #c0392b; border-color: #c0392b; }
.ustats { display: grid; gap: 6px; }
.ustat { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 12px; cursor: pointer; text-align: left; }
.ustat.on { border-color: var(--navy); box-shadow: 0 2px 0 var(--navy); }
.ustat small { display: block; color: var(--muted); font-size: 11.5px; }

/* AI原案 */
.tbl.kv th { width: 90px; }
.memo-raw { background: #fbfcfd; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.8; min-height: 56px; }
.dl-wrap { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fbfcfd; margin-bottom: 4px; }
.dl { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #e3e8ee; font-size: 13px; }
.dl:last-child { border-bottom: 0; }
.src { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; height: 20px; line-height: 18px; white-space: nowrap; }
.src.a { background: var(--blue-bg); color: var(--navy2); } .src.b { background: var(--violet-bg); color: var(--violet); }
.chk-box { border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.chk-box.warn { background: var(--amber-bg); } .chk-box.ok { background: var(--accent-bg); }
.chk-box ul { margin: 4px 0 0; padding-left: 18px; }
.agree { display: block; font-size: 12.5px; color: var(--ink2); margin: 6px 0; }
.big-chk { width: 20px; height: 20px; }

/* 帳票 */
.sheet-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.stab { border: 1px solid #c9d2dc; background: #f1f4f7; color: var(--ink2); border-radius: 7px 7px 0 0; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.stab.on { background: #fff; color: var(--navy); font-weight: 700; border-bottom-color: #fff; box-shadow: 0 -2px 0 var(--accent) inset; }
.tbl.xl th.xlh { background: #e3ecdf; color: #2d4a22; }
.tbl.xl td { text-align: center; border-right: 1px solid #edf0f3; min-width: 78px; height: 44px; line-height: 1.25; }
.tbl.xl td small { display: block; color: var(--muted); font-size: 10.5px; }
.tbl.xl td.miss { background: var(--amber-bg); } .tbl.xl td.pend { background: #eceff2; color: var(--muted); font-size: 11px; } .tbl.xl td.fut { background: #fafbfc; }
.tbl.xl td.flash { animation: flash 1.6s ease-out; }
.legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin: 0 3px 0 8px; }
.legend.miss { background: var(--amber-bg); border: 1px solid #e8c77a; } .legend.pend { background: #eceff2; border: 1px solid #c9d2dc; }

/* 分析 */
.bar-row { display: grid; grid-template-columns: 74px 1fr 28px; gap: 8px; align-items: center; font-size: 12.5px; margin: 4px 0; }
.bt { background: #eef2f6; border-radius: 99px; height: 14px; overflow: hidden; }
.bt i { display: block; height: 100%; background: var(--navy2); border-radius: 99px; } .bt i.r { background: var(--red); }
.bn { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.insight { background: var(--amber-bg); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-top: 12px; }
.sim { display: inline-block; width: 46px; height: 8px; background: #eef2f6; border-radius: 99px; overflow: hidden; vertical-align: middle; } .sim i { display: block; height: 100%; background: var(--accent); }
.detail { background: #fbfcfd; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 8px; font-size: 13px; } .detail p { margin: 4px 0; }
.material { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mpage { background: #fff; border: 1px solid #c9d2dc; border-top: 4px solid var(--navy); border-radius: 6px; padding: 10px 12px; font-size: 12.5px; box-shadow: 2px 3px 0 rgba(0,0,0,.05); }
.mpage h4 { margin: 0 0 6px; font-size: 13px; color: var(--navy); } .mpage p { margin: 4px 0; } .small { font-size: 11.5px; color: var(--ink2); line-height: 1.7; }

/* 書類 */
.paper { background: #fff; border: 1px solid #c9d2dc; border-radius: 4px; padding: 18px 20px; box-shadow: 2px 3px 0 rgba(0,0,0,.06); }
.paper h3 { text-align: center; letter-spacing: .3em; margin: 0 0 4px; font-size: 18px; }
.pmeta { text-align: center; color: var(--muted); font-size: 11.5px; margin-bottom: 10px; }
.ptbl { width: 100%; border-collapse: collapse; }
.ptbl th { width: 24%; background: #f0ece0; border: 1px solid #888; padding: 6px 8px; font-size: 12.5px; text-align: left; vertical-align: top; }
.ptbl td { border: 1px solid #888; padding: 3px; }
.dfield { width: 100%; border: 0; padding: 5px 7px; font: inherit; font-size: 13px; background: transparent; resize: vertical; }
.dfield:focus { outline: 2px solid var(--accent); background: #fcfffe; }
.req { background: var(--red); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.chk { padding: 8px 4px; border-bottom: 1px solid #edf0f3; font-size: 13px; } .chk:last-child { border-bottom: 0; }

/* 承認・履歴 */
.diff { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; padding: 6px 0; font-size: 13px; }
.diff > div { padding: 2px 12px; } .diff .add { background: #e1f5e8; color: #14633a; } .diff .del { background: var(--red-bg); color: var(--red); text-decoration: line-through; }
.cmt { width: 100%; border: 1px solid #c9d2dc; border-radius: 7px; padding: 7px 10px; margin-top: 10px; }
ul.plain { margin: 0 0 10px; padding-left: 18px; font-size: 13px; } ul.plain li { margin: 5px 0; }
.notice { border-left: 3px solid var(--accent); background: #f6fbfa; padding: 6px 10px; margin: 6px 0; font-size: 12.5px; }

/* 構成図 */
.arch, .arch2 { display: flex; align-items: stretch; gap: 8px; margin: 6px 0 10px; }
.arch2 > .ab { flex: 1; }
.ab { flex: 1; border: 1.5px solid #b9c6d3; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 13px; text-align: center; }
.ab small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.5; }
.ab.main { border-color: var(--navy); background: #eef3f9; } .ab.ai { border-color: var(--violet); background: var(--violet-bg); } .ab.ext { border-style: dashed; }
.aa { display: grid; place-items: center; color: var(--navy2); font-weight: 700; }
.anon-out { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; padding: 8px 12px; font-size: 13px; min-height: 40px; }
.anon-out.ok { background: var(--accent-bg); }

/* デモ用：静的表示（?static=1）はアニメ・トースト非表示 */
body.static * { animation: none !important; transition: none !important; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .material { grid-template-columns: 1fr 1fr; }
  .arch { flex-direction: column; } .aa { transform: rotate(90deg); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step { flex-direction: row; justify-content: flex-start; }
  .material { grid-template-columns: 1fr; }
  .tablet { border-width: 6px; padding: 8px; }
  .arch2 { flex-direction: column; }
}
