/* 夢花スタッフと同じデザイン（落ち着いた緑・白いカード・大きな文字） */
:root {
  --bg: #f3f5f2;
  --card: #ffffff;
  --ink: #1d2b27;
  --muted: #5b6b65;
  --line: #d7dfda;
  --green: #2f6b5a;
  --green-dark: #24564a;
  --green-soft: #e4efea;
  --plum: #a8476a;
  --plum-soft: #f6e6ec;
  --warn: #9a5a00;
  --warn-soft: #fbf0dc;
  --ok: #2e7d4f;
  --radius: 16px;
  --width: 680px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "BIZ UDPGothic", "BIZ UDGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; }

/* ---------- 上の緑のバー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--green); color: #fff;
  padding-top: env(safe-area-inset-top);
}
.topbar .in {
  max-width: var(--width); margin: 0 auto; min-height: 66px; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}
.topbar .title { flex: 1; font-size: 1.3rem; font-weight: bold; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back {
  border: 2px solid #fff; background: transparent; color: #fff; border-radius: 14px;
  padding: 6px 14px; font-weight: bold; font-size: 1rem; min-height: 44px; white-space: nowrap;
}
.topbar .back:active { background: rgba(255,255,255,.15); }
.topbar .link { background: none; border: none; color: #fff; text-decoration: underline; text-underline-offset: 4px; font-size: 1rem; padding: 8px 4px; white-space: nowrap; }

main { max-width: var(--width); margin: 0 auto; padding: 22px 16px 32px; }
.hello { margin: 4px 0 18px; }
.hello .who { font-size: 1.5rem; }
.hello .sub { color: var(--muted); }
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
.muted { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }

/* ---------- 白いタイル（ホームのボタン） ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 18px;
  min-height: 150px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 1.15rem; font-weight: bold; color: var(--ink); text-align: center; line-height: 1.4;
}
.tile:active { background: var(--green-soft); }
.tile .icon { color: var(--green); line-height: 0; }
.tile .icon svg.ic { width: 46px; height: 46px; }
.tile.wide { grid-column: 1 / -1; min-height: 110px; flex-direction: row; gap: 14px; }
.tile .badge {
  position: absolute; top: 12px; right: 14px; background: var(--plum); color: #fff;
  border-radius: 999px; min-width: 34px; height: 34px; padding: 0 9px;
  display: grid; place-items: center; font-size: 1rem;
}

/* ---------- 一覧（白いカード） ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-height: 76px; color: var(--ink);
}
.item:active { background: var(--green-soft); }
.item .room { min-width: 64px; text-align: center; font-weight: bold; background: var(--green-soft); color: var(--green-dark); border-radius: 10px; padding: 6px 8px; }
.item .name { flex: 1; font-size: 1.25rem; font-weight: bold; }
.item .name small { display: block; font-size: .85rem; color: var(--muted); font-weight: normal; }
.item .go { color: var(--muted); line-height: 0; }
.item.inactive { opacity: .55; }
.marks { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mark { border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: bold; white-space: nowrap; background: var(--green-soft); color: var(--green-dark); }
.mark.off { background: #eef1ef; color: #9aa7a2; }

.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap svg.ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search { width: 100%; font-size: 1.05rem; padding: 14px 14px 14px 44px; border: 2px solid var(--line); border-radius: 14px; background: #fff; min-height: 56px; }

/* ---------- 注意事項 ---------- */
.caution { background: var(--plum-soft); border: 2px solid var(--plum); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.caution > b { color: var(--plum); display: flex; align-items: center; gap: 6px; }
.caution ul { margin: 6px 0 0; padding-left: 1.3em; }
.caution li { font-weight: bold; }
.caution.info { background: var(--green-soft); border-color: var(--green); }
.caution.info > b { color: var(--green-dark); }

/* ---------- 記録カード ---------- */
.rec { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 16px; width: 100%; text-align: left; color: var(--ink); }
.rec:active { background: var(--green-soft); }
.rec .head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.rec .head b { color: var(--green-dark); font-size: 1rem; display: inline-flex; align-items: center; gap: 4px; }
.rec .body { font-size: 1.05rem; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.rec .tag { display: inline-block; background: var(--plum-soft); color: var(--plum); border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: bold; margin-top: 6px; }

.datebar { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.datebar button { min-height: 52px; padding: 0 14px; border: 2px solid var(--line); background: #fff; border-radius: 14px; font-weight: bold; display: inline-flex; align-items: center; gap: 2px; }
.datebar .d { flex: 1; text-align: center; font-weight: bold; font-size: 1.15rem; white-space: nowrap; }

/* ---------- 入力 ---------- */
.field { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.field > label, .field > .label { display: block; font-weight: bold; font-size: 1.1rem; margin-bottom: 10px; }
.field .hint { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.choices.small { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
.choice {
  min-height: 60px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 1.05rem; font-weight: bold; padding: 6px; white-space: pre-line; line-height: 1.3;
}
.choice.on { background: var(--green); border-color: var(--green); color: #fff; }
input[type=text], input[type=search], input[type=password], input[type=month], input[type=time], input[type=tel], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; min-height: 56px;
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--green-soft); border-color: var(--green); }
textarea { min-height: 180px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.sub-list .entry { border: 2px dashed var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }

/* ---------- ボタン ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 72px; border: none; border-radius: 22px; margin: 10px 0;
  font-size: 1.3rem; font-weight: bold; color: #fff; background: var(--green);
}
.btn:active { background: var(--green-dark); }
.btn.sub { background: #fff; color: var(--ink); border: 2px solid var(--line); min-height: 60px; font-size: 1.05rem; border-radius: 16px; }
.btn.sub:active { background: var(--green-soft); }
.btn.sub svg.ic { color: var(--green); }
.btn.danger { background: #fff; color: var(--plum); border: 2px solid var(--plum); min-height: 60px; font-size: 1.05rem; border-radius: 16px; }
.btn.small { min-height: 52px; font-size: 1rem; }
.btn:disabled { opacity: .5; }
.savebar { position: sticky; bottom: 0; background: linear-gradient(rgba(243,245,242,0), var(--bg) 30%); padding: 14px 0 calc(6px + env(safe-area-inset-bottom)); }
.mini { padding: 8px 14px; min-height: 46px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: bold; font-size: .95rem; }

/* ---------- 情報 ---------- */
.info { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info .r { display: flex; border-bottom: 1px solid var(--line); }
.info .r:last-child { border-bottom: none; }
.info .k { width: 34%; background: #f7f9f7; padding: 12px; font-weight: bold; font-size: .95rem; color: var(--muted); }
.info .v { flex: 1; padding: 12px; word-break: break-word; }
.info a { color: var(--green); font-weight: bold; display: inline-flex; align-items: center; gap: 4px; }
.med { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.med b { font-size: 1.1rem; }

/* ---------- 申し送り ---------- */
.notice { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.notice.important { border-color: var(--plum); background: #fffafb; }
.notice .head { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.notice .body { font-size: 1.1rem; white-space: pre-wrap; margin: 6px 0; word-break: break-word; }
.notice .who { font-weight: bold; color: var(--green-dark); }
.notice .imp { color: var(--plum); font-weight: bold; }
.notice .del { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 14px; font-weight: bold; min-height: 44px; }

/* ---------- お知らせ ---------- */
.toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); pointer-events: none; /* 出ているあいだも下のボタンを押せる */
  background: var(--green); color: #fff; font-size: 1.4rem; font-weight: bold;
  padding: 24px 36px; border-radius: 22px; z-index: 100; box-shadow: 0 10px 30px rgba(29,43,39,.3);
  text-align: center; max-width: 90vw; white-space: pre-line;
}
.toast.error { background: var(--plum); font-size: 1.1rem; }
.empty { background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); }
.loading { text-align: center; padding: 40px; color: var(--muted); }

/* ログイン画面の見出し */
.brand { text-align: center; margin: 10px 0 22px; }
.brand .mark-ic { width: 96px; height: 96px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 8px; }
.brand .mark-ic svg.ic { width: 52px; height: 52px; }
.brand h1 { font-family: "Zen Maru Gothic", "BIZ UDPGothic", sans-serif; font-size: 1.8rem; margin: 0; }

@media (max-width: 420px) {
  html { font-size: 17px; }
  .tile { min-height: 132px; font-size: 1.05rem; }
  .tile .icon svg.ic { width: 40px; height: 40px; }
}
@media print {
  .topbar, .btn, .savebar { display: none !important; }
}

/* ---------- 記録をつける：フロアを選んで、利用者をアイコンで並べる ---------- */
main.wide { max-width: 1180px; }
.floor-tabs { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; }
.ftab { flex: 0 0 auto; min-height: 46px; padding: 6px 18px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: bold; }
.ftab.on { background: var(--green); border-color: var(--green); color: #fff; }
.split2 { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: start; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.rtile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  justify-content: center; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 6px; min-height: 84px; text-align: center;
}
.rtile:active { background: var(--green-soft); }
.rtile.sel { background: var(--green); border-color: var(--green); color: #fff; }
.rroom { font-weight: bold; font-size: .8rem; background: var(--green-soft); color: var(--green-dark); border-radius: 8px; padding: 1px 8px; }
.rtile.sel .rroom { background: rgba(255,255,255,.22); color: #fff; }
.rtile { container-type: inline-size; }
/* 6文字までは1行に収まるよう、アイコンの幅に合わせて文字の大きさを自動で決める */
.rname {
  width: 100%; font-weight: bold; line-height: 1.25; letter-spacing: -.02em;
  font-size: min(1.15rem, calc((100cqw - 2px) / 6));
  white-space: nowrap; overflow: hidden;
}
/* 7文字以上（表示名が空で氏名が長いとき）は2行まで */
.rname.long { white-space: normal; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dots { display: flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #dfe5e1; display: inline-block; }
.dot.on { background: var(--plum); }
.rtile.sel .dot { background: rgba(255,255,255,.35); }
.rtile.sel .dot.on { background: #fff; }
.mdot { font-style: normal; font-size: .68rem; font-weight: bold; line-height: 1; width: 18px; height: 18px; border-radius: 6px; display: inline-grid; place-items: center; background: #eef1ef; color: #a9b4ae; }
.mdot.on { background: var(--green); color: #fff; }
.rtile.sel .mdot { background: rgba(255,255,255,.25); color: rgba(255,255,255,.7); }
.rtile.sel .mdot.on { background: #fff; color: var(--green); }

/* 右の細い列：食事・排泄・支援経過を縦に */
.actions { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 8px; }
.a-who { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px; text-align: center; line-height: 1.3; font-size: .9rem; }
.a-who b { display: block; font-size: 1.05rem; margin-top: 2px; word-break: break-all; }
.a-caution { display: flex; gap: 4px; background: var(--plum-soft); border: 2px solid var(--plum); color: var(--plum); border-radius: 12px; padding: 6px; font-size: .78rem; font-weight: bold; line-height: 1.35; }
.a-caution svg.ic { flex: none; }
.abtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 84px; background: #fff; border: 2px solid var(--line); border-radius: 16px; font-weight: bold; font-size: 1rem;
}
.abtn .icon { color: var(--green); line-height: 0; }
.abtn .icon svg.ic { width: 30px; height: 30px; }
.abtn:active { background: var(--green-soft); }
.abtn:disabled { opacity: .45; }
#day h2 { margin-top: 18px; }

/* 携帯など狭い画面：利用者は3列、右の列はさらに細く */
@media (max-width: 700px) {
  main.wide { padding: 12px 6px 24px; }
  .split2 { grid-template-columns: 1fr 78px; gap: 6px; }
  .rgrid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .rtile { min-height: 72px; padding: 6px 1px; border-radius: 12px; gap: 4px; }
  .actions { top: 72px; gap: 6px; }
  .a-who { padding: 6px 4px; font-size: .78rem; }
  .a-who b { font-size: .9rem; }
  .abtn { min-height: 72px; font-size: .88rem; border-radius: 12px; }
  .abtn .icon svg.ic { width: 24px; height: 24px; }
  .datebar { gap: 6px; }
  .datebar button { padding: 0 8px; min-height: 46px; }
  .datebar .lbl { display: none; }
  .datebar .d { font-size: .95rem; white-space: nowrap; }
}

/* 携帯・iPadのトップ：名前と「申し送り」「利用者の情報」 */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.topnav .me { display: flex; flex-direction: column; line-height: 1.4; }
.topnav .me b { font-size: 1.15rem; }
.navbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.navbtn {
  white-space: nowrap;
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 14px; min-height: 50px; font-weight: bold;
}
.navbtn:active { background: var(--green-soft); }
.navbtn svg.ic { color: var(--green); }
.nbadge { background: var(--plum); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; font-size: .8rem; }
@media (max-width: 700px) {
  .topnav { margin-bottom: 8px; }
  .topnav .me { flex-basis: 100%; }
  .navbtns { flex-basis: 100%; }
  .navbtn { flex: 1 1 auto; justify-content: center; font-size: .9rem; padding: 6px 8px; gap: 4px; }
}

/* 上の帯の「管理」（ログアウトの左） */
.topbar .tb-admin { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
/* 複数選択中の名前と「選択をはずす」 */
.a-names { font-size: .78rem; margin-top: 4px; line-height: 1.45; text-align: left; max-height: 9.5em; overflow-y: auto; }
.a-clear { min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: .85rem; font-weight: bold; color: var(--muted); }
/* 操作の履歴 */
.audit { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.audit.warn { border-color: var(--plum); background: #fffafb; }
.audit .ahead { font-size: 1rem; }
.audit .aact { color: var(--green-dark); }
.audit.warn .aact { color: var(--plum); }
.audit .adetail { font-size: .9rem; margin-top: 2px; word-break: break-all; }
.audit .awho { font-size: .82rem; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }

/* 日時：年/月/日　時:分 を横一列で選ぶ（矢印は出さず、数字を大きく） */
.dtfield { padding: 10px 12px; }
.dtfield > .label { margin-bottom: 6px; }
.dtpick { display: flex; flex-wrap: nowrap; align-items: center; gap: 3px; }
.dtpick select {
  -webkit-appearance: none; appearance: none; background: #fff;
  flex: 1 1 0; width: 0; min-width: 0; min-height: 52px; padding: 6px 0; font-size: 1.2rem; font-weight: bold;
  text-align: center; text-align-last: center; border-radius: 10px; cursor: pointer;
}
.dtpick select[data-k="y"] { flex-grow: 1.7; }
.dtpick .sep { font-weight: bold; color: var(--muted); }
.dtpick .gap { width: 10px; flex: none; }
@media (max-width: 380px) {
  .dtpick select { font-size: 1.1rem; }
  .dtpick .gap { width: 6px; }
}

/* 申し送り：「〇/△（曜）まで表示」を押すと日付を変えられる */
.ho-until { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.until-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--green-soft); color: var(--green-dark); border: 2px solid var(--green); border-radius: 12px;
  padding: 8px 14px; min-height: 50px; font-weight: bold; font-size: 1.1rem;
}
.until-btn input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; min-height: 0; padding: 0; border: none; cursor: pointer; }
/* 記録カード（押すと直す画面へ）と「申し送りに出す」ボタン */
.rec { cursor: pointer; }
.ho-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; min-height: 38px;
  font-size: .85rem; font-weight: bold; color: var(--green-dark);
}
.ho-btn:active { background: var(--green-soft); }
/* 支援経過：日ごとの見出し */
.day-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; padding: 6px 12px; background: var(--green); color: #fff; border-radius: 10px; font-weight: bold; }
.day-h .today { background: #fff; color: var(--green-dark); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.day-h .cnt { margin-left: auto; font-size: .85rem; opacity: .9; }
/* 支援経過の画面：時刻・部屋・名前だけのすっきりしたカード */
.rec.simple { padding: 10px 14px; border-left: 6px solid var(--green); }
.rec.simple .head { color: var(--ink); font-size: .95rem; }
.rec.simple .head b { color: var(--ink); }
.rec.simple .head .t { color: var(--green-dark); }
.rec.simple .head > span:last-child { color: var(--muted); font-size: .82rem; }
.rec.simple .body { margin-top: 2px; }

/* 右の列のボタン：絵なし・文字だけ */
.abtn { min-height: 64px; font-size: 1.05rem; }
@media (max-width: 700px) { .abtn { min-height: 56px; font-size: .95rem; } }

/* 食事：1食1行（食事名・主食・副食・欠食）＋備考。欠食にチェックすると暗くなって選べない */
.meal-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.meal-box { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.meal-box:last-child { border-bottom: none; }
.meal-line { display: flex; align-items: center; gap: 8px; }
.mname { flex: 0 0 auto; width: 3.2em; font-size: 1.05rem; }
.mcol { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: bold; }
.mcol select { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; min-height: 48px; padding: 4px; text-align: center; text-align-last: center; font-size: 1.25rem; font-weight: bold; background: #fff; }
.skip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-weight: bold; font-size: .85rem; padding: 6px 8px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.skip input { width: 20px; height: 20px; }
.m-memo { margin-top: 8px; min-height: 42px !important; padding: 6px 10px !important; font-size: .95rem !important; }
.meal-box.skipped { background: #eceeed; }
.meal-box.skipped .mcol { opacity: .45; }
.meal-box.skipped .mcol select { background: #dfe2e0; color: transparent; }
.meal-box.skipped .skip { border-color: var(--plum); color: var(--plum); background: #fff; }

/* 右の列：高さを固定して、ボタンの位置が動かないようにする */
.a-clear { min-height: 44px; }
.a-clear:disabled { opacity: .35; }
.a-who { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.a-who b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.a-caution-mark { height: 30px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; background: var(--plum-soft); color: var(--plum); font-size: .8rem; font-weight: bold; }
.a-caution-mark.off { background: transparent; }
.a-caution-mark svg.ic { width: 1em; height: 1em; }
@media (max-width: 700px) { .a-who { height: 58px; } .a-caution-mark { height: 26px; font-size: .72rem; } }
.a-who.off { background: transparent; border-color: transparent; }


/* 申し送り：「表示する・表示しない」と「〇/△まで表示」を横一列に */
.ho-field { padding: 10px 12px; }
.ho-field > .label { margin-bottom: 6px; }
.ho-row { display: flex; gap: 6px; align-items: stretch; }
.ho-row .choices { display: flex; gap: 6px; flex: 0 0 auto; }
.ho-row .choice { min-height: 50px; padding: 4px 8px; font-size: .9rem; }
.ho-row .choice.on::before { content: none; }
.ho-row .ho-until { margin: 0; flex: 1 1 0; min-width: 0; display: flex; }
.ho-row .until-btn { flex: 1; min-width: 0; justify-content: center; min-height: 50px; padding: 4px 4px; font-size: .9rem; white-space: nowrap; overflow: hidden; }
/* 右の列：文字は1行に収める */
.abtn, .a-clear { white-space: nowrap; }
@media (max-width: 700px) {
  .abtn { font-size: .9rem; padding: 0 2px; }
  .a-clear { font-size: .8rem; padding: 0 2px; }
  .a-who small { font-size: .7rem; }
}
.rec.simple .head > span.until-r { color: var(--plum); font-weight: bold; font-size: .85rem; white-space: nowrap; }

/* 支援経過の画面：業務連絡（書いた日の一番上） */
.rec.simple.nrec { border-left-color: var(--warn); background: var(--warn-soft); cursor: default; }
.rec.simple.nrec .nlabel { color: var(--warn); }
.rec.simple.nrec.imp { border-left-color: var(--plum); background: var(--plum-soft); }
.rec.simple.nrec.imp .nlabel { color: var(--plum); }

/* 一覧のカードを小さくすっきり（内容は2行まで。全部はタップして見る） */
.rec.simple { padding: 8px 12px; border-radius: 12px; }
.rec.simple .head { font-size: .9rem; line-height: 1.4; }
.rec.simple .body { font-size: 1rem; line-height: 1.45; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.rec.simple .ho-btn { margin-top: 4px; min-height: 32px; padding: 2px 10px; }
.list:has(> .rec.simple) { gap: 8px; }
.rec.simple.nrec { cursor: pointer; }
/* 1行目（時刻・名前）と期限を同じ行に収める */
.rec.simple .head { flex-wrap: nowrap; align-items: baseline; }
.rec.simple .head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec.simple .head > span.until-r { flex: none; }

/* 申し送り：確認済みの印、編集した人 */
.readmark { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 6px; color: var(--ok); font-weight: bold; font-size: .78rem; white-space: nowrap; }
.readmark svg.ic { width: 1em; height: 1em; }
.rec.simple.read { opacity: .55; }
.rec.simple.read .readmark { opacity: 1; }
.edited { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.notice .edited { margin-top: 4px; }
.rec.simple .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; }
.rec.simple .foot .edited { margin: 0; }
.rec.simple .foot .readmark { margin: 0; font-size: .8rem; }
/* 確認済みの職員：名前と日時を小さな札で横に並べる */
.reads { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reads-h { width: 100%; display: flex; align-items: center; gap: 4px; font-weight: bold; color: var(--ok); font-size: .95rem; }
.rchip { display: inline-flex; align-items: baseline; gap: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .78rem; color: var(--muted); }
.rchip b { color: var(--ink); font-size: .88rem; }
/* 支援経過：日付で探す */
.search-day .row { gap: 6px; align-items: center; }
.search-day .dtpick { flex: 1 1 auto; }
.search-day .mini { flex: none; min-height: 50px; }

/* 期限を選ぶカレンダー（いちばん上に「無期限」） */
.until-btn.wide { width: 100%; }
button.until-btn { font-family: inherit; }
.cal-ov { position: fixed; inset: 0; z-index: 200; background: rgba(29,43,39,.45); display: flex; align-items: flex-end; justify-content: center; }
.cal { width: 100%; max-width: 420px; background: #fff; border-radius: 20px 20px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .cal-ov { align-items: center; } .cal { border-radius: 20px; } }
.cal-forever { width: 100%; min-height: 52px; border: 2px solid var(--green); border-radius: 14px; background: var(--green-soft); color: var(--green-dark); font-weight: bold; font-size: 1.1rem; }
.cal-forever.on { background: var(--green); color: #fff; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.cal-h b { font-size: 1.15rem; }
.cal-h button { width: 48px; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.4rem; font-weight: bold; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-w span { font-size: .8rem; color: var(--muted); font-weight: bold; }
.cal-w span:first-child { color: var(--plum); }
.cal-d { height: 44px; border: none; border-radius: 10px; background: #f3f5f2; font-size: 1.05rem; font-weight: bold; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--green); }
.cal-d.on { background: var(--green); color: #fff; }
.cal-d:disabled { background: transparent; color: #c5ccc8; }
.cal-cancel { width: 100%; min-height: 48px; margin-top: 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: bold; }

/* 利用者をスクロールしても、フロアの行までは上に止める */
.sticky-top { position: sticky; top: var(--bar-h, 66px); z-index: 5; background: var(--bg); padding-top: 4px; margin-top: -4px; }
.sticky-top .floor-tabs { margin-bottom: 0; padding-bottom: 10px; }
.actions { top: calc(var(--stick-h, 160px) + 4px); }
@media (max-width: 700px) { .actions { top: calc(var(--stick-h, 160px) + 4px); } }
/* いちばん上の緑の帯も止める */
#top { position: sticky; top: 0; z-index: 10; }
/* 確認済みの職員：2列で、札の中では改行しない */
.reads { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reads-h { grid-column: 1 / -1; }
.rchip { justify-content: space-between; white-space: nowrap; overflow: hidden; min-width: 0; padding: 4px 10px; border-radius: 10px; }
.rchip b { overflow: hidden; text-overflow: ellipsis; }
/* 札の中は「名前」と「日時」の2段（6文字の名前が切れないように） */
.rchip { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
.rchip b { font-size: .95rem; max-width: 100%; }
/* 確認済み（緑）と未確認（薄い赤） */
.reads-h { justify-content: space-between; }
.reads-h .ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.reads-h .ng { color: var(--plum); font-size: .9rem; }
.rchip.done { background: #e6f2ea; border-color: #9fcdb0; color: var(--ok); }
.rchip.yet { background: var(--plum-soft); border-color: #e3b8c7; color: var(--plum); }
.abtn.sub { min-height: 48px; color: var(--muted); }
.abtn.sub:not(:disabled) { color: var(--green-dark); }

/* 申し送り：業務連絡／利用者のタブ */
.ho-tabs { position: sticky; top: var(--bar-h, 66px); z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: -4px 0 12px; padding: 6px 0; background: var(--bg); }
.ho-tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; border: 2px solid var(--green); background: #fff; color: var(--green-dark); font-weight: bold; font-size: 1.05rem; }
.ho-tab:first-child { border-radius: 14px 0 0 14px; }
.ho-tab:last-child { border-radius: 0 14px 14px 0; border-left: none; }
.ho-tab.on { background: var(--green); color: #fff; }
.ho-tab .cnt { font-size: .85rem; opacity: .8; }
.ho-tab .nbadge { margin-left: 2px; }
#tab-notice .btn { margin-top: 0; }

/* PDFをアプリの中で見る */
.pdf-bar { gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.pdf-bar .mini { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.pdf-bar .mini:disabled { opacity: .4; }
.pdfview { display: flex; flex-direction: column; gap: 10px; }
.pdfview canvas { background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.mcol { flex-direction: column; align-items: stretch; gap: 2px; }
.mcol span { text-align: center; font-size: .72rem; white-space: nowrap; line-height: 1; }
.mcol select { min-height: 44px; }

/* 記録画面：不在者はいちばん下に別の枠 */
.rleft { min-width: 0; }
.absent-box { margin-top: 12px; border: 2px dashed var(--line); border-radius: 14px; padding: 8px; background: #eceeed; }
.absent-h { font-weight: bold; color: var(--muted); font-size: .9rem; margin: 0 0 6px 2px; }
.rtile.absent { background: #f6f7f6; color: var(--muted); }
.rtile.absent.sel { background: var(--muted); color: #fff; }
.abs-until { font-size: .72rem; font-weight: bold; color: var(--plum); white-space: nowrap; }
.rtile.absent.sel .abs-until { color: #fff; }

/* 食事：一覧の行（押すと入力の画面） */
.meal-row-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: none; border-bottom: 1px solid var(--line); padding: 14px 12px; min-height: 64px; }
.meal-row-btn:last-child { border-bottom: none; }
.meal-row-btn:active { background: var(--green-soft); }
.meal-row-btn .msum { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: .95rem; color: var(--muted); }
.meal-row-btn .msum b { color: var(--ink); font-size: 1.2rem; }
.meal-row-btn .mskip { color: var(--plum) !important; }
.meal-row-btn .mmemo { flex-basis: 100%; color: var(--muted); font-size: .85rem; }
.meal-row-btn .go { color: var(--muted); line-height: 0; }
.meal-row-btn.done .mname { color: var(--green-dark); }
.meal-sheet { display: flex; flex-direction: column; gap: 10px; }
.sheet-h { display: flex; align-items: baseline; justify-content: space-between; }
.sheet-h b { font-size: 1.3rem; }
.meal-sheet .btn { margin: 4px 0 0; }
.meal-sheet .row { gap: 8px; }
.meal-sheet .cal-cancel { margin-top: 0; }
.meal-sheet.skipped .mcol { opacity: .45; }
.meal-sheet.skipped .mcol select { background: #dfe2e0; color: transparent; }
.meal-sheet.skipped .skip { border-color: var(--plum); color: var(--plum); }

/* 記録確認 */
.chk { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.chk-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; background: var(--plum-soft); }
.chk-h b { font-size: 1.15rem; }
.chk-h .cnt { margin-left: auto; font-weight: bold; color: var(--plum); display: inline-flex; align-items: center; gap: 4px; }
.chk-h.ok { background: var(--green-soft); }
.chk-h.ok .cnt { color: var(--ok); }
.chk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 10px; }
.chk-item { display: flex; align-items: center; gap: 8px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 48px; font-weight: bold; }
.chk-item:active { background: var(--green-soft); }
.chk-item .rroom { font-size: .78rem; }
.chk-floor { display: flex; align-items: center; gap: 8px; padding: 8px 14px 0; font-weight: bold; color: var(--green); font-size: .95rem; }
.chk-floor span { color: var(--muted); font-weight: normal; font-size: .85rem; }
.chk-list { padding: 6px 10px 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.chk-item { min-width: 0; min-height: 44px; padding: 6px 8px; }
.chk-item .cname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-item .rroom { flex: none; }

/* 拠点を変える（歯車マーク。ログアウトの右） */
.topbar .tb-gear { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: 2px; background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.55); border-radius: 50%; color: #fff; padding: 0; }
.topbar .tb-gear .ic { width: 22px; height: 22px; }
.topbar .tb-gear:active { background: rgba(255,255,255,.3); }

/* カレンダー（社内のカレンダーアプリをアプリの中で開く） */
.cal-frame { display: block; width: 100%; height: calc(100dvh - 90px); border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
.chk-meal { display: flex; align-items: center; gap: 8px; margin: 10px 14px 0; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: bold; }
.chk-meal:first-of-type { border-top: none; }
.chk-meal span { color: var(--plum); font-size: .9rem; }
.chk-tabs { position: sticky; top: var(--bar-h, 66px); z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr) 1.1fr; gap: 6px; margin: -4px 0 12px; padding: 6px 0; background: var(--bg); }
.chk-tab { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; border: 2px solid var(--green); border-radius: 14px; background: #fff; color: var(--green-dark); font-weight: bold; font-size: 1.02rem; padding: 0 4px; white-space: nowrap; }
.chk-tab.on { background: var(--green); color: #fff; }
.chk-tab.past { border-color: var(--plum); color: var(--plum); }
.chk-tab.past.on { background: var(--plum); color: #fff; }
.chk-tab .nbadge { margin-left: 0; }
.chk-tab.on .nbadge { background: #fff; color: var(--plum); }

/* バイタル */
.vital-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin-bottom: 14px; }
.vrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: none; }
.vrow .vname { flex: 0 0 64px; font-weight: bold; font-size: 1.1rem; }
.vrow input { flex: 0 1 96px; min-width: 0; width: 96px; text-align: center; font-size: 1.3rem; font-weight: bold; padding: 10px 6px; }
.vrow em { font-style: normal; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.vrow .vsl { font-size: 1.3rem; color: var(--muted); }

/* ひとつ前に戻る・TOPへ戻る（アイコンのボタン2つ） */
.topbar .navic { display: flex; gap: 6px; flex: none; }
.topbar .nav-ic { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 52px; height: 50px; padding: 0; border: 2px solid rgba(255,255,255,.85); border-radius: 14px; background: transparent; color: #fff; }
.topbar .nav-ic .ic { width: 22px; height: 22px; }
.topbar .nav-ic small { font-size: .68rem; font-weight: bold; line-height: 1; }
.topbar .nav-ic:active { background: rgba(255,255,255,.18); }
@media (max-width: 420px) { .topbar .in { gap: 10px; } .topbar .title { font-size: 1.12rem; } }

/* 排泄の入力（縦に伸びないよう、ボタンを小さく横に並べる） */
.excard { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 4px 12px; margin-bottom: 14px; }
.exrow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.exrow:last-child { border-bottom: none; }
.exlabel { font-weight: bold; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.choices.compact { display: flex; flex-wrap: wrap; gap: 6px; }
.choices.compact .choice { min-height: 40px; padding: 4px 12px; font-size: .95rem; border-radius: 10px; border-width: 1.5px; }
.excard input[type=text] { padding: 8px 10px; min-height: 42px; }

/* 排泄の場所（管理） */
.plist { display: grid; gap: 8px; margin-bottom: 12px; }
.prow { display: flex; gap: 6px; align-items: center; }
.prow input { flex: 1; min-width: 0; }
.prow .mini { flex: none; width: 46px; padding: 0; display: inline-grid; place-items: center; }
.prow .mini .ic { width: 20px; height: 20px; }

/* カレンダー（スタッフの氏名の右） */
.topnav .me-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topnav .cal-btn { flex: none; min-height: 40px; padding: 4px 12px; font-size: .92rem; border-radius: 12px; }
/* カレンダーは名前の行の右端 */
.topnav .me { flex-basis: 100%; }
.topnav .me-row { flex-wrap: nowrap; }
.topnav .cal-btn { margin-left: auto; }

/* 誰が記録したか（小さく、うすく） */
.who { flex: none; font-size: .75rem; color: var(--muted); font-weight: normal; white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.daylist { margin-top: 14px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dl-h { padding: 8px 12px; font-weight: bold; font-size: .9rem; background: var(--green-soft); }
.dl-row { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: #fff; border: none; border-top: 1px solid var(--line); padding: 8px 12px; font-size: .9rem; }
.dl-row .t { flex: none; font-weight: bold; }
.dl-row .v { flex: 1; min-width: 0; }
.dl-row.cur { background: #fffbe8; }
/* 支援経過のバイタル（押すと入力欄が出る） */
.vt-toggle { margin-bottom: 10px; }
.vt-toggle.on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
#vt-box .vital-card { margin-bottom: 12px; }
.rec.simple .body { white-space: pre-line; } /* バイタルは1行目、本文は2行目 */

/* 右の列：その他 */
.abtn.a-more { display: flex; align-items: center; justify-content: center; gap: 2px; color: var(--green-dark); background: var(--green-soft); }
.abtn.a-more .ic { width: 18px; height: 18px; }
.a-more-h { text-align: center; font-weight: bold; font-size: .85rem; color: #fff; background: var(--green); border-radius: 10px; padding: 6px 4px; }
.abtn.a-less { display: flex; align-items: center; justify-content: center; gap: 2px; }
.abtn.a-less .ic { width: 18px; height: 18px; }
.abtn.a-less, .abtn.a-more { flex-direction: row; }

/* 記録確認：体重（名前の下に前回の体重） */
.chk-item.w .cname { display: flex; flex-direction: column; line-height: 1.25; }
.chk-item.w .cname small { font-size: .7rem; font-weight: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .chk-tab { font-size: .9rem; min-height: 48px; } .chk-tabs { gap: 4px; } }

/* 入力画面のいちばん上：どなたの記録か */
.who-band { position: sticky; top: var(--bar-h, 66px); z-index: 5; display: flex; align-items: center; gap: 10px; margin: -6px 0 12px; padding: 10px 14px; background: var(--green-soft); border: 2px solid var(--green); border-radius: 14px; }
.who-band b { font-size: 1.25rem; color: var(--green-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-band .rroom { flex: none; }
.who-band .wb-names { font-size: .9rem; color: var(--green-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 利用者アイコンの下の注意事項（「注意事項」ボタンで出す） */
.rtile .tcaut { display: none; }
.rgrid.show-caut .rtile .tcaut { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: .72rem; line-height: 1.3; font-weight: bold; color: #c0392b; text-align: center; word-break: break-all; }
.rgrid.show-caut .rtile .tcaut.none { color: #a9b4ae; font-weight: normal; }
.rtile.sel .tcaut, .rtile.sel .tcaut.none { color: #fff !important; }
.navbtn.caut-btn svg.ic { color: #c0392b; }
.navbtn.caut-btn.on { background: #fdecea; border-color: #c0392b; color: #c0392b; }

/* 曜日を選ぶボタン */
.daypick { display: flex; flex-wrap: wrap; gap: 6px; }
.daypick .dp { width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: bold; font-size: 1rem; }
.daypick .dp.sun { color: #c0392b; } .daypick .dp.sat { color: #1f5fa8; }
.daypick .dp.on { background: var(--green); border-color: var(--green); color: #fff; }
.daypick .dp.all { width: auto; padding: 0 12px; font-size: .9rem; color: var(--green-dark); }
.entry.other .daypick { margin-top: 8px; }

/* 本日の必要事項 */
.chk.tt .tt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 10px; }
.tt-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 48px; }
.tt-row .tt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-row .tt-label { flex: none; font-size: .78rem; font-weight: bold; color: #7a4b00; background: #fff3d6; border-radius: 8px; padding: 2px 6px; }
.tt-st { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; font-weight: bold; border-radius: 8px; padding: 3px 7px; white-space: nowrap; }
.tt-st .ic { width: 14px; height: 14px; }
.tt-st.ok { background: var(--green-soft); color: var(--green-dark); }
.tt-st.ng { background: #fdecea; color: #c0392b; }
.tt-st.abs { background: #eef1ef; color: var(--muted); }
.tt-row.absent { opacity: .6; }
.tt-none { padding: 12px 14px; color: var(--muted); font-size: .9rem; }
.chk.tt .chk-h b { white-space: nowrap; }
.chk.tt .cnt { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; white-space: nowrap; }
.chk.tt .cnt em { font-style: normal; font-size: .82rem; border-radius: 8px; padding: 2px 7px; display: inline-flex; align-items: center; gap: 2px; }
.chk.tt .cnt .tt-ng { background: #c0392b; color: #fff; }
.chk.tt .cnt .tt-ok { background: var(--green); color: #fff; }
.chk.tt .cnt em .ic { width: 13px; height: 13px; }

/* 体重：今月の体重と再測定 */
.wt-now { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-size: .95rem; line-height: 1.6; }
.wt-now b { font-size: 1.15rem; color: var(--green-dark); }
.wt-now.need { border-color: #c0392b; background: #fff7f6; }
.wt-need { margin-top: 4px; color: #c0392b; font-weight: bold; }
.chk-item.w .cname small.re { color: #c0392b; font-weight: bold; }

/* 確認事項：日付の切りかえ */
.tt-days { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tt-days .mini { flex: none; width: 48px; padding: 0; display: inline-grid; place-items: center; }
.tt-days .mini .ic { width: 22px; height: 22px; }
.tt-date { flex: 1; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tt-date b { font-size: 1.2rem; }
.tt-dn { font-size: .8rem; font-weight: bold; color: #fff; background: var(--plum); border-radius: 999px; padding: 2px 10px; }
.tt-dn.now { background: var(--green); }
.tt-quick { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.tt-quick .mini { min-height: 40px; padding: 4px 14px; }
.tt-quick .mini.on { background: var(--green); border-color: var(--green); color: #fff; }
.tt-quick input[type=date] { flex: 1; min-width: 140px; min-height: 40px; padding: 4px 8px; }

/* デイサービスの準備 */
.tt-row { cursor: default; }
.tt-row[data-ci] { cursor: pointer; }
.tt-prep { flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: 36px; padding: 4px 14px; border-radius: 10px; border: 2px solid var(--plum); background: #fff; color: var(--plum); font-weight: bold; font-size: .9rem; white-space: nowrap; }
.tt-prep.done { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-size: .8rem; padding: 4px 8px; max-width: 13em; overflow: hidden; text-overflow: ellipsis; }
.tt-prep .ic { width: 14px; height: 14px; }
.ask-msg { font-size: 1.2rem; font-weight: bold; text-align: center; margin: 14px 0 16px; }
.tt-row.has-prep { flex-wrap: wrap; row-gap: 6px; }
.tt-row.has-prep .tt-name { min-width: 6em; }
.tt-row.has-prep .tt-prep { margin-left: auto; }
.tt-prep.done { max-width: none; }
.tt-vgo { border: 1.5px solid #c0392b; cursor: pointer; } .tt-vgo .ic { width: 13px; height: 13px; }
.tt-row.has-prep .tt-st { margin-left: auto; }
/* 準備完了は「完了｜スタッフ名」の小さな1つの印 */
.tt-prep.done { padding: 0; gap: 0; min-height: 30px; font-size: .78rem; overflow: hidden; border-width: 1.5px; }
.tt-prep.done b { background: var(--green); color: #fff; padding: 6px 7px; }
.tt-prep.done .pst { padding: 6px 7px; max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-row.has-prep { flex-wrap: nowrap; }
.tt-row.has-prep .tt-name { min-width: 3em; }
/* 確認事項：測ったバイタルの値（名前の下に小さく） */
.tt-row.has-prep:has(.tt-vals) { flex-wrap: wrap; row-gap: 2px; }
.tt-vals { flex-basis: 100%; order: 9; padding-left: 2px; font-size: .8rem; font-weight: bold; color: var(--green-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 居室番号：幅を詰めて小さく */
.rroom { padding: 0 5px; border-radius: 5px; font-size: .74rem; line-height: 1.55; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tt-row .rroom, .chk-item .rroom, .dl-row .rroom { padding: 0 4px; font-size: .68rem; flex: none; }
.who-band .rroom { font-size: .8rem; }

/* 右の列：全員選択 */
.a-clear.a-all { color: var(--green-dark); border-color: var(--green); background: var(--green-soft); }

/* 食事のまとめ入力 */
.mb-timing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.mb-timing .mini { min-height: 48px; font-size: 1.05rem; }
.mb-timing .mini.on { background: var(--green); border-color: var(--green); color: #fff; }
.mb-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.mb-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; background: var(--green-soft); font-weight: bold; font-size: .9rem; position: sticky; top: var(--bar-h, 66px); z-index: 3; }
.mb-cols { display: grid; grid-template-columns: 58px 58px 40px; gap: 6px; text-align: center; font-size: .78rem; color: var(--muted); }
.mb-row { display: grid; grid-template-columns: auto 1fr 58px 58px 40px; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--line); }
.mb-row .mb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.mb-row .mb-name small { margin-left: 4px; font-size: .68rem; font-weight: bold; color: var(--green-dark); background: var(--green-soft); border-radius: 6px; padding: 1px 5px; }
.mb-row select { width: 58px; min-height: 40px; padding: 2px 4px; font-size: 1.05rem; font-weight: bold; text-align: center; }
.mb-skip { display: grid; place-items: center; }
.mb-skip input { width: 24px; height: 24px; }
.mb-row.skipped { background: #f1f1f1; }
.mb-row.skipped select { opacity: .4; }
.mb-row.done { background: #f7fbf8; }

/* まとめ入力：主食・副食・欠食・支援経過 */
.mb-cols { grid-template-columns: 54px 54px 36px 40px; }
.mb-row { grid-template-columns: auto 1fr 54px 54px 36px 40px; }
.mb-row select { width: 54px; }
.mb-prog { width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--green); padding: 0; }
.mb-prog .ic { width: 20px; height: 20px; }
@media (max-width: 420px) { .mb-row { gap: 4px; padding: 6px 8px; } .mb-cols { gap: 4px; } }

.ask-msg { white-space: pre-line; font-size: 1.05rem; }

/* 記録の入力：日時・申し送りは「見出し＋入力」の1行（縦に伸びないように） */
.field.one-line { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.field.one-line > .label { flex: none; width: 2.6em; margin: 0; font-size: .85rem; line-height: 1.2; text-align: center; }
.field.one-line .dtpick { flex: 1; min-width: 0; }
.field.one-line .dtpick select { min-height: 42px; font-size: 1.05rem; }
.field.one-line .dtpick .gap { width: 6px; }
.field.one-line .ho-row { flex: 1; min-width: 0; }
.field.one-line .ho-row .choice { min-height: 42px; padding: 2px 10px; font-size: .9rem; }
.field.one-line .ho-row .until-btn { min-height: 42px; font-size: .88rem; }
/* 支援経過：見出しの右にバイタルのボタン */
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.label-row label { margin: 0; }
.vt-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 4px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--green-dark); font-weight: bold; font-size: .9rem; margin: 0; }
.vt-toggle .ic { width: 18px; height: 18px; color: #c0392b; }
.vt-toggle.on { background: var(--green-soft); border-color: var(--green); }
#vt-box .vital-card { margin-bottom: 10px; }
/* バイタルの入力欄：縦を詰める（体温・血圧・脈拍・SpO2・体重） */
.vital-card { padding: 2px 12px; }
.vrow { padding: 4px 0; gap: 6px; }
.vrow .vname { flex: 0 0 52px; font-size: 1rem; }
.vrow input { min-height: 40px; height: 40px; padding: 2px 6px; font-size: 1.15rem; width: 84px; flex: 0 1 84px; }
.vrow em { font-size: .85rem; }
.mb-head { position: static; }
.who-band > b { flex: none; } .who-band .wb-names { flex: 1; min-width: 0; }
.mb-row.locked { background: #ececec; color: var(--muted); } .mb-row.locked select, .mb-row.locked input, .mb-row.locked .mb-prog { pointer-events: none; opacity: .45; }
.a-more-h { display: flex; align-items: center; justify-content: center; gap: 2px; width: 100%; border: none; min-height: 40px; cursor: pointer; } .a-more-h .ic { width: 16px; height: 16px; }
/* 右のメニュー：ボタンの高さを全部そろえる（選択解除・その他・食事…PDF・もどる） */
#actions .abtn, #actions .a-clear, #actions .a-more-h { height: 56px; min-height: 56px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
@media (max-width: 700px) { #actions .abtn, #actions .a-clear, #actions .a-more-h { height: 50px; min-height: 50px; } }
.caut-sheet .sheet-h { display: flex; align-items: center; gap: 8px; } .caut-sheet .caution { margin: 12px 0; } .caut-sheet .caution li { font-size: 1.1rem; margin: 4px 0; }
.caut-sheet .sheet-h { justify-content: flex-start; } .caut-sheet .sheet-h b { font-size: 1.2rem; }

/* 利用者情報：トップと同じアイコンで3列（スマホ） */
.ri-group { margin-top: 10px; }
.ri-group .chk-floor { padding: 4px 2px 6px; }
.ri-group .rgrid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
@media (max-width: 700px) { .ri-group .rgrid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.ri-tile .ri-sub { font-size: .7rem; color: var(--muted); font-weight: normal; }
.ri-tile.inactive { opacity: .55; }
.search-wrap .search { padding-left: 42px; }

/* お薬手帳のQRをまとめて読む */
.mq-shot { margin-bottom: 8px; }
.mq-log { display: grid; gap: 6px; margin-top: 10px; }
.mq-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-weight: bold; font-size: .95rem; }
.mq-row .ic { flex: none; width: 20px; height: 20px; }
.mq-row.ok { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.mq-row.ng { border-color: #e6b0aa; color: #c0392b; background: #fff7f6; }
.mq-sheet { max-height: 85vh; display: flex; flex-direction: column; }
.mq-list { overflow-y: auto; display: grid; gap: 6px; margin: 8px 0; max-height: 55vh; }
.mq-pick { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: bold; }
.mq-pick small { margin-left: auto; font-weight: normal; color: var(--muted); font-size: .78rem; }
.mq-pick.hit { border-color: var(--green); background: var(--green-soft); }

/* お薬：QRの中身（処方ごと、最新から3回分） */
.rx-list { display: grid; gap: 8px; margin-bottom: 10px; }
.rx { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rx[open] { border-color: var(--green); }
.rx summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.rx summary::-webkit-details-marker { display: none; }
.rx summary span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.rx summary em { font-style: normal; font-size: .75rem; font-weight: bold; color: #fff; background: var(--green); border-radius: 999px; padding: 1px 8px; }
.rx-body { padding: 0 12px 10px; border-top: 1px solid var(--line); }
.rx-r { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.rx-r .k { flex: 0 0 4.5em; color: var(--muted); font-size: .82rem; }
.rx-rp { margin-top: 8px; padding: 8px 10px; background: #f7faf8; border-radius: 10px; }
.rx-rp-h { font-size: .85rem; color: var(--green-dark); font-weight: bold; margin-bottom: 4px; }
.rx-drug { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.rx-note { margin-top: 6px; font-size: .85rem; color: #7a4b00; background: #fff8e6; border-radius: 8px; padding: 4px 8px; }
.rx-other { margin-top: 6px; font-size: .75rem; color: var(--muted); word-break: break-all; }
.rx-foot { margin-top: 8px; font-size: .75rem; color: var(--muted); text-align: right; }
.rx-sub { font-size: .95rem; color: var(--muted); margin: 6px 0; }

/* 利用者情報：その日のまとめ */
.rd { background: var(--card); border: 2px solid var(--green); border-radius: var(--radius); padding: 8px 10px 10px; margin-bottom: 14px; }
.rd-nav { display: flex; align-items: center; gap: 8px; }
.rd-nav .mini { flex: none; width: 44px; min-height: 40px; padding: 0; display: inline-grid; place-items: center; }
.rd-nav .mini .ic { width: 20px; height: 20px; }
.rd-date { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rd-date b { font-size: 1.1rem; }
.rd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.rd-c { background: #f7faf8; border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rd-c .k { font-size: .75rem; color: var(--muted); font-weight: bold; }
.rd-c .v { font-size: .92rem; overflow-wrap: anywhere; }
.rd-c.w { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
.rd-c.w .k { flex: 0 0 4em; }
.rd-ph { margin: 10px 0 4px; font-weight: bold; font-size: .9rem; color: var(--green-dark); }
.rd-prog { display: grid; gap: 4px; }
.rd-p { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .9rem; }
.rd-p .t { font-weight: bold; }
.rd-p .b { white-space: pre-line; }
.rd-p .att-thumbs { grid-column: 2; margin-top: 2px; }
.rd-p small { grid-column: 2; color: var(--muted); font-size: .75rem; text-align: right; }
/* 注意事項のある方のアイコンは、枠を少し赤みのある色に */
.rtile.has-caut { border-color: #e6a8a0; background: #fffafa; }
.rtile.has-caut.sel { border-color: var(--green); background: var(--green); }

/* 添付（写真・スクショ・PDF） */
.att-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att-th { width: 64px; height: 64px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.att-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-th.pdf { width: auto; max-width: 180px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; color: #c0392b; font-size: .78rem; font-weight: bold; }
.att-th.pdf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #222); }
.att-th.pdf .ic { width: 18px; height: 18px; flex: none; }
.att-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-item { position: relative; width: 72px; height: 72px; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .7rem; color: #c0392b; padding: 2px; text-align: center; }
.att-item img { width: 100%; height: 100%; object-fit: cover; }
.att-item span { color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.att-item.new { border-color: var(--green); border-style: dashed; }
.att-x { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-weight: bold; line-height: 1; padding: 0; }
.att-add { width: 72px; height: 72px; border: 2px dashed var(--green); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--green-dark); font-size: .72rem; font-weight: bold; cursor: pointer; background: var(--green-soft); }
.att-add .ic { width: 22px; height: 22px; }
.att-del { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.att-view { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
/* 写真を横にスライド（1枚ずつぴたっと止まる） */
.att-slides { width: 100%; height: 82vh; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.att-slides::-webkit-scrollbar { display: none; }
.att-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
.att-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.att-nav { position: absolute; top: 45%; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.85); color: #222; display: flex; align-items: center; justify-content: center; }
.att-nav.prev { left: 10px; } .att-nav.next { right: 10px; }
.att-nav svg { width: 24px; height: 24px; }
.att-count { color: #fff; font-size: .95rem; }
@media (hover: none) { .att-nav { display: none; } }
.att-close { border: 2px solid #fff; background: transparent; color: #fff; border-radius: 12px; padding: 8px 24px; font-weight: bold; }

/* 排便の対応 */
.bw-now { margin: 4px 0 8px; font-size: .95rem; }
.bw-now b { color: #c0392b; font-size: 1.1rem; }
.bw-now small { display: block; color: var(--muted); font-size: .78rem; }
.bw-edit { display: grid; gap: 8px; margin-bottom: 12px; }
.bw-row { display: flex; gap: 6px; align-items: center; }
.bw-row select { flex: 0 0 96px; min-height: 44px; }
.bw-row input { flex: 1; min-width: 0; }
.bw-row .mini { flex: none; width: 44px; padding: 0; display: inline-grid; place-items: center; }
.bw-tt { flex-wrap: wrap !important; row-gap: 4px; }
.bw-tt .bw-d { flex: none; font-weight: bold; color: #c0392b; font-size: .9rem; }
.bw-tt .bw-text { flex-basis: 100%; order: 9; font-size: .88rem; font-weight: bold; color: #7a4b00; background: #fff8e6; border-radius: 8px; padding: 4px 8px; }
/* 名前の行：申し送り・カレンダー（右寄せ・絵なし） */
.topnav .cal-btn.ho-top { margin-left: auto; }
.topnav .cal-btn.ho-top + .cal-btn { margin-left: 0; }
.topnav .cal-btn .nbadge { min-width: 20px; height: 20px; font-size: .72rem; }
.chk-tabs { grid-template-columns: repeat(3, 1fr); }

/* フォルダを選ぶ（参照） */
.fp-row { gap: 6px; }
.fp-row input { flex: 1; min-width: 0; }
.fp-sheet { max-height: 88vh; display: flex; flex-direction: column; }
.fp-path { display: flex; gap: 6px; margin: 6px 0; }
.fp-path input { flex: 1; min-width: 0; font-size: .9rem; }
.fp-bar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.fp-bar .mini { min-height: 40px; display: inline-flex; align-items: center; gap: 2px; }
.fp-list { overflow-y: auto; max-height: 48vh; display: grid; gap: 4px; margin-bottom: 8px; }
.fp-item { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: bold; }
.fp-item .ic { width: 18px; height: 18px; color: var(--green); flex: none; }
.fp-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 容量と保存期間 */
.disk { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.disk.warn { border-color: #c0392b; }
.disk-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .9rem; margin-bottom: 6px; }
.disk-bar { height: 14px; border-radius: 7px; background: #eef1ef; overflow: hidden; }
.disk-bar i { display: block; height: 100%; background: var(--green); }
.disk.warn .disk-bar i { background: #c0392b; }
.disk-warn { color: #c0392b; font-weight: bold; font-size: .85rem; margin-top: 6px; }
.chk-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: normal; }
.chk-line input { width: 20px; height: 20px; }
.all-sites { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); font-weight: bold; } .all-sites .ic { width: 20px; height: 20px; }

/* 確認事項：カレンダーでその日だけ変わった方 */
.tt-once { flex: none; font-size: .74rem; font-weight: bold; color: #0b5cad; background: #e3f0ff; border-radius: 8px; padding: 2px 6px; }
.tt-once.cx { color: #b42318; background: #fde8e6; }
.tt-why { flex: none; font-size: .74rem; color: var(--muted); background: #eef1ef; border-radius: 8px; padding: 2px 6px; }
.tt-row.absent .tt-once.cx { opacity: 1; }

/* パスワードを ●●●● で隠す（パスワード欄にしないので、携帯が保存しない） */
.pw-mask { -webkit-text-security: disc; text-security: disc; }
/* 確認事項：カレンダーの予定（1件を横いっぱいに） */
.chk.tt .tt-list:has(.cal-tt) { grid-template-columns: 1fr; }
.cal-tt { flex-wrap: wrap !important; row-gap: 4px; cursor: default; }
.cal-tt .tt-name { flex: 1 1 auto; min-width: 0; white-space: normal; }
.cal-tt .tt-label { white-space: normal; }
.cal-tt .bw-text { flex-basis: 100%; order: 9; font-size: .88rem; color: #555; background: #f4f7f5; border-radius: 8px; padding: 4px 8px; }
.cal-tt .tt-prep { margin-left: auto; }

/* モニタリング：作成済みの月 */
.mo-made { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.mo-made .mini.on { background: var(--green); color: #fff; }

/* 右の列：長い名前のボタン（モニタリング）は2行にして、枠からはみ出さない */
.abtn.two { font-size: .82em; line-height: 1.15; white-space: normal; overflow: hidden; }

/* 確認事項のモニタリングの見出し：せまい画面では2行に */
.chk-h.mon-h { flex-wrap: wrap; row-gap: 2px; }
.chk-h.mon-h b small { font-weight: normal; font-size: .8em; }

/* モニタリングの定型文を選ぶ */
.tpl-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; margin: 8px 0; }
.tpl-item { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .95rem; line-height: 1.4; }
.tpl-item:active { background: #eef6f0; }

/* モニタリングの実施日：1行で低く */
.mo-date { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.mo-date label { font-weight: bold; margin: 0; white-space: nowrap; }
.mo-date input { width: auto; flex: 0 0 auto; min-height: 40px; padding: 4px 10px; }

/* 必須の印 */
.req { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: bold; color: #fff; background: #c0392b; border-radius: 6px; padding: 1px 6px; vertical-align: middle; }

/* PDFの出力：利用者を3列で小さく */
.x-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.x-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; min-height: 44px; }
.x-item input { width: 22px; height: 22px; flex: none; margin: 0; }
.x-item .x-name { display: flex; flex-direction: column; font-size: .95rem; font-weight: bold; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.x-item .x-name small { font-size: .72rem; font-weight: normal; color: var(--muted); }
.x-item:has(input:checked) { border-color: var(--green); background: #eef6f0; }
.x-item.inactive { opacity: .7; }
@media (max-width: 520px) { .x-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* モニタリング：支援経過から選ぶ */
.mo-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pg-item { white-space: pre-line; }
.pg-item small { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; white-space: normal; }
.pg-item.used { border-color: var(--green); background: #eef6f0; }
.pg-item.used small::after { content: '　✓ 足しました'; color: var(--green); font-weight: bold; }

/* モニタリング：支援経過も載せる */
.mo-pon { display: flex; align-items: center; gap: 8px; font-weight: bold; cursor: pointer; }
.mo-pon input { width: 24px; height: 24px; margin: 0; }
.mo-plist { margin-top: 8px; max-height: 360px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; background: #fafcfb; }
.mo-pitem { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: normal; }
.mo-pitem:last-child { border-bottom: none; }
.mo-pitem input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.mo-pitem span { white-space: pre-line; font-size: .92rem; line-height: 1.4; }
.mo-pitem small { display: block; font-size: .75rem; color: var(--muted); }
.mo-pitem:has(input:checked) { background: #eef6f0; }

/* 送迎（到着・発車）の入力 */
.tr-box { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; margin: 8px 0 12px; }
.tr-label { font-weight: bold; font-size: 1.05rem; margin-bottom: 8px; }
.tr-box input[type=time] { font-size: 2rem; font-weight: bold; width: auto; min-width: 180px; text-align: center; padding: 6px 12px; }
.tr-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.tt-row .tt-tr { margin-left: 4px; }

/* 確認事項の送迎：1行に1人（名前が切れないように） */
.chk.tt .tt-list.tr-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tr-list .tt-name { flex: 1 1 auto; }

/* 確認事項：この日だけ追加 */
.tt-add { padding: 0 10px 10px; }
.tt-add { display: flex; gap: 6px; }
.tt-add .mini { flex: 1; border-style: dashed; }

/* 通所型のトップ：曜日のタブと、利用追加・中止 */
.floor-tabs .ftab small { display: block; font-size: .7rem; font-weight: normal; opacity: .85; line-height: 1.1; }
.use-btns { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 6px 0 8px; }
.use-btns .muted { margin-right: auto; font-weight: bold; }
.rtile.once-add { box-shadow: inset 0 0 0 2px #2b7bd6; }

/* トップの上のボタン：絵なしで小さく、1列（狭い画面は2段）に並べて縦を詰める */
.topnav { margin-bottom: 6px; row-gap: 6px; }
.topnav .me { line-height: 1.25; }
.navbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; flex-basis: 100%; }
.navbtn { justify-content: center; min-height: 38px; padding: 4px 6px; font-size: .9rem; border-radius: 10px; white-space: nowrap; }
.navbtn.caut-btn { background: #fff4f2; border-color: #f0b7ae; color: #b42318; }
.navbtn.caut-btn.on { background: #fde2dd; border-color: #c0392b; color: #a3221a; }
.topnav .cal-btn { min-height: 36px; }
.floor-tabs { gap: 6px; }
.ftab { min-height: 38px; padding: 3px 14px; }
.sticky-top .floor-tabs { padding-bottom: 6px; }
.use-btns { margin: 4px 0 6px; }
.use-btns .mini { min-height: 34px; padding: 2px 10px; }
@media (max-width: 520px) { .navbtns { grid-template-columns: repeat(3, 1fr); } .navbtn { font-size: .85rem; min-height: 34px; } }
.use-btns .mini { white-space: nowrap; flex: none; }
.use-btns .muted { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* 確認事項：済んだ方（入浴済・実施）はたたんでおく */
.tt-done { margin: 0 10px 10px; border: 1px dashed var(--line); border-radius: 10px; background: #fafcfb; }
.tt-done summary { cursor: pointer; padding: 8px 10px; font-weight: bold; color: var(--muted); font-size: .9rem; }
.tt-done summary small { margin-left: 8px; font-weight: normal; font-size: .78rem; }
.tt-done .tt-list { padding-top: 0; }

/* トップの見出し（拠点名）：切らずに全部出す。長いときは字を小さくして2行まで */
.topbar .title.home { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 520px) { .topbar .title.home { font-size: 1rem; letter-spacing: 0; } }
@media (max-width: 520px) {
  .topbar .in { gap: 8px; }
  .topbar .title.home { flex: 1 1 auto; min-width: 8.5em; }
  .topbar .link { font-size: .82rem; padding-left: 0; padding-right: 0; white-space: nowrap; }
  .topbar .link svg.ic { width: 14px; height: 14px; }
}
@media (max-width: 520px) { .topbar .tb-gear { width: 34px; height: 34px; min-width: 34px; flex: none; padding: 0; } .topbar .tb-gear svg.ic { width: 18px; height: 18px; } }

/* 確認事項の見出し：せまい画面では折り返して、横にはみ出さない */
.chk.tt .chk-h { flex-wrap: wrap; row-gap: 2px; }
.chk.tt .chk-h .cnt { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .chk.tt .tt-list.tr-list { grid-template-columns: 1fr; } .tt-row .tt-st, .tt-row .tt-prep { flex: none; } }
@media (max-width: 520px) { .tr-list .tt-row { flex-wrap: wrap; row-gap: 6px; } .tr-list .tt-row .tt-name { flex: 1 1 60%; } .tr-list .tt-row .tt-st { margin-left: 0; } }
.chk.tt .tt-list.tr-list { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }

/* 確認事項：見出しの右の「入浴済 〇人」ボタン（押すと済んだ方の一覧を開く） */
.tt-donebtn { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 3px 9px; border: 1.5px solid #9cc7a8; border-radius: 999px; background: #eef6f0; color: #2E6B3A; font-size: .78rem; font-weight: bold; white-space: nowrap; }
.tt-donebtn .ic { width: 14px; height: 14px; }
.tt-donebtn.on { background: #2E6B3A; border-color: #2E6B3A; color: #fff; }
.chk-h .tt-donebtn + .cnt { margin-left: auto; }
div.tt-done { margin: 0 10px 10px; border: 1px dashed var(--line); border-radius: 10px; background: #fafcfb; }

/* 確認事項の行：名前とボタンを1行に（ボタンは右へ寄せる） */
.chk.tt .tt-row { min-height: 40px; padding: 5px 8px; flex-wrap: nowrap; }
.chk.tt .tt-row .tt-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk.tt .tt-row > .tt-st, .chk.tt .tt-row > .tt-prep { margin-left: auto; flex: none; }
.chk.tt .tt-row.bw-tt { flex-wrap: wrap; }
/* 排便の対応：パソコン・iPadは1行に（対応の内容は名前の右に小さく）。携帯は読めるように2段のまま */
@media (min-width: 521px) {
.chk.tt .tt-row.bw-tt { flex-wrap: nowrap !important; }
.bw-tt .tt-name { flex: 0 1 auto !important; max-width: 40%; }
.bw-tt .bw-text { flex: 1 1 auto !important; order: 0 !important; flex-basis: auto !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 6px !important; font-size: .8rem !important; }
.bw-tt .tt-prep, .bw-tt .tt-st { order: 1; margin-left: 4px; }
}

/* 支援経過の探す欄：1段ずつ低く、横に並べる（スマホでも小さく） */
.psearch { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ps-row { display: flex; align-items: center; gap: 6px; }
.ps-l { flex: none; width: 3.6em; font-size: .85rem; font-weight: bold; color: var(--muted); }
.ps-row input, .ps-row select { flex: 1 1 auto; min-width: 0; min-height: 36px; height: 36px; padding: 4px 8px; font-size: .95rem; }
.ps-row .mini { flex: none; min-height: 36px; padding: 2px 12px; }
.ps-btns { justify-content: flex-end; }
.ps-btns .mini.on { background: var(--green); color: #fff; border-color: var(--green); }



.tt-donebtn.zero { border-style: dashed; background: #fff; color: var(--muted); }
.chk.tt .chk-h .tt-donebtn { margin-left: auto; }
/* 確認事項：バイタル未測定と準備のボタンを並べる（2つ目はすぐ横に） */
.chk.tt .tt-row > .tt-st + .tt-prep, .chk.tt .tt-row > .tt-vals + .tt-prep { margin-left: 4px; }
@media (max-width: 520px) { .chk.tt .tt-row .tt-vgo { font-size: .78rem; padding: 3px 6px; } .chk.tt .tt-row .tt-prep { padding: 3px 8px; } }

/* ボタンが2つある行（バイタル未測定・準備）：スマホでは名前の下にボタンを並べる */
@media (max-width: 520px) {
  .chk.tt .tt-row.two-act { flex-wrap: wrap; row-gap: 4px; }
  .chk.tt .tt-row.two-act .tt-name { flex: 1 1 55%; overflow: visible; white-space: normal; }
  .chk.tt .tt-row.two-act > .tt-st:not(.abs) { margin-left: auto; }
  .chk.tt .tt-row.two-act .tt-prep .pst { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 確認事項：なるべく1行（名前は長いと「…」、ボタンは小さく。だれが済ませたかの名前は短く） */
.chk.tt .tt-row { flex-wrap: nowrap; gap: 6px; }
.chk.tt .tt-row .tt-name { min-width: 3.5em; }
.chk.tt .tt-row .tt-st, .chk.tt .tt-row .tt-prep { font-size: .8rem; padding: 3px 7px; min-height: 30px; white-space: nowrap; }
.chk.tt .tt-row .tt-prep .pst { max-width: 4.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.chk.tt .tt-row .tt-once, .chk.tt .tt-row .tt-why { font-size: .7rem; padding: 1px 5px; white-space: nowrap; }
@media (max-width: 520px) {
  .chk.tt .tt-row .tt-prep.done { padding: 0; overflow: hidden; }
  .chk.tt .tt-row .tt-prep.done b { padding: 4px 7px; }
  .chk.tt .tt-row .tt-prep.done .pst { display: none; }
  .chk.tt .tt-row .tt-name { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 520px) {
  .chk.tt .tt-row { gap: 4px; padding: 5px 6px; }
  .chk.tt .tt-row .tt-name { min-width: 2.5em; }
  .chk.tt .tt-row .tt-once { flex: 0 1 auto; min-width: 2.2em; overflow: hidden; text-overflow: ellipsis; }
  .chk.tt .tt-row .rroom { padding: 1px 4px; }
}

/* 確認事項：その日だけ追加した方は、居室の下に小さく「追加」 */
.rroom-w { display: inline-flex; flex-direction: column; align-items: center; flex: none; line-height: 1.1; }
.add-mk { font-size: .62rem; font-weight: bold; color: #fff; background: #2b7bd6; border-radius: 4px; padding: 0 4px; margin-top: 1px; }
/* 確認事項：タブは4つを1段に。日付まわりも低く */
.chk-tabs { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.chk-tabs .chk-tab { min-height: 38px; padding: 4px 2px; font-size: .88rem; white-space: nowrap; }
.tt-days { margin-bottom: 4px; }
.tt-days .mini { min-height: 34px; padding: 2px 10px; }
.tt-quick { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; }
.tt-quick .mini { min-height: 34px; padding: 2px 10px; flex: none; }
.tt-quick input[type=date] { flex: 1 1 auto; min-width: 0; min-height: 34px; height: 34px; padding: 2px 6px; font-size: .9rem; }
.tt-quick { flex-wrap: nowrap !important; } .tt-quick input[type=date] { width: auto !important; max-width: none; } .chk-tabs .chk-tab { font-size: .82rem; letter-spacing: 0; }
@media (max-width: 520px) { .tt-quick .mini { padding: 2px 7px; font-size: .85rem; } .tt-quick input[type=date] { font-size: .82rem; padding: 2px 4px; } }

/* 確認事項：しぼり込みのボタン（横に並べ、はみ出す分は横にずらして見る） */
.tt-fs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 8px; padding-bottom: 2px; scrollbar-width: none; }
.tt-fs::-webkit-scrollbar { display: none; }
.tt-f { flex: none; min-height: 32px; padding: 2px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: .85rem; font-weight: bold; color: #333; }
.tt-f.on { background: var(--green-dark, #2E6B3A); border-color: var(--green-dark, #2E6B3A); color: #fff; }

/* 確認事項：食事の未入力は3列（押すと食事の入力へ） */
.tt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 8px; }
.tt-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 48px; padding: 4px 2px; border: 1.5px solid #e9b4ae; border-radius: 10px; background: #fff6f5; color: #333; }
.tt-cell .rroom { font-size: .7rem; }
.tt-cell .cn { font-weight: bold; font-size: .88rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 確認事項のタブ：「モニタリング」だけ幅を広く（文字が枠からはみ出さないように） */
.chk-tabs { grid-template-columns: 1fr 1fr 1.8fr 1fr !important; }
.chk-tabs .chk-tab { overflow: hidden; gap: 2px; }
.chk-tabs .chk-tab .nbadge { min-width: 18px; height: 18px; font-size: .68rem; padding: 0 4px; }

/* 確認事項のタブ（すべて・朝食・昼食・夕食・入浴・デイ・バイタル・体重・モニタリング・過去）：小さく並べて、入りきらなければ折り返す */
.tt-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.tt-tab { min-height: 34px; padding: 2px 2px; border: 1.5px solid var(--green); border-radius: 10px; background: #fff; color: var(--green-dark, #2E6B3A); font-weight: bold; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-tab.on { background: var(--green); color: #fff; }
.tt-tab.past { border-color: var(--plum); color: var(--plum); }
.tt-tab.past.on { background: var(--plum); color: #fff; }
@media (min-width: 700px) { .tt-tabs { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.tt-tabs { display: flex !important; flex-wrap: wrap; }
.tt-tab { flex: 1 1 auto; padding: 2px 8px; overflow: visible; text-overflow: clip; }

.tt-cell.done { border-color: #9cc7a8; background: #eef6f0; }
.tt-cell .mv { font-size: .7rem; color: #2E6B3A; font-weight: bold; }
div.tt-done .tt-grid3 { padding: 6px; }

/* 確認事項のタブ：体重から下の段。未記入の人数 */
.tt-br { flex-basis: 100%; height: 0; }
.tt-tab .nbadge { margin-left: 3px; min-width: 18px; height: 18px; font-size: .68rem; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.tt-tab .nbadge[hidden] { display: none; }
.tt-tab.on .nbadge { background: #fff; color: var(--plum); }

/* 確認事項のタブ：上の段（食事・バイタル・入浴…）と下の段（体重・モニタリング・過去）にきっちり2段 */
.tt-tabs2 { margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.tt-row1 { display: grid; gap: 4px; }
.tt-row2 { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 4px; }
.tt-tabs2 .tt-tab { padding: 2px 1px; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; flex-wrap: nowrap; }
.tt-tabs2 .tt-tab .nbadge { margin-left: 2px; min-width: 16px; height: 16px; font-size: .62rem; padding: 0 3px; }

/* 確認事項のタブ：人数の印は右上に重ねる（タブの幅をとらない） */
.tt-tabs2 .tt-tab { position: relative; overflow: visible; }
.tt-tabs2 .tt-tab .nbadge { position: absolute; top: -6px; right: -3px; margin: 0; z-index: 1; box-shadow: 0 0 0 1.5px #fff; }
.tt-tabs2 { padding-top: 5px; }
.tt-row1, .tt-row2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important; }

/* 確認事項のその他：時間（カレンダーと同じ）と予定の名前 */
.ot-row .ot-what { display: inline-flex; align-items: center; gap: 4px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.ot-row .ot-what .tt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ot-time { flex: none; font-size: .78rem; font-weight: bold; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 1px 5px; }
.ot-row .tt-prep { margin-left: auto; }

.ot-tag { flex: none; font-size: .72rem; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: 0 6px; }
/* 管理：カレンダーのタグ */
.ctag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ctag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #fef3c7; border: 1px solid #fcd34d; font-weight: bold; }
.ctag.fixed small { font-size: .7rem; color: #92400e; font-weight: normal; }
.ctag-x { border: 0; background: none; color: #b91c1c; font-size: 1rem; padding: 0 2px; cursor: pointer; }
.ctag-add input { flex: 1; min-width: 0; }
/* カレンダー・その他：済にした人の名前は携帯でも出す */
.chk.tt .ot-row .tt-prep.done .pst { display: inline-block !important; max-width: 5em; }
.ot-row .tt-label { font-size: .85rem; }

/* TOPの「更新」「ログアウト」：少し離して、大きく押しやすく */
.topbar #tb-reload, .topbar #tb-logout { flex: none; text-decoration: none; border: 1.5px solid rgba(255,255,255,.75); border-radius: 10px; padding: 7px 10px !important; min-height: 40px; font-size: .9rem !important; font-weight: bold; }
.topbar #tb-reload { margin-right: 10px; }
.topbar #tb-logout { margin-left: 6px; }
.topbar .tb-admin { margin-right: 0 !important; }
.topbar .title.home { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 確認事項：測ったバイタルを小さく・未測定のタグ */
.tt-vmini { flex: none; display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-size: .68rem; font-weight: bold; color: #2E6B3A; margin-left: auto; white-space: nowrap; }
.tt-cell .tt-vmini { align-items: center; margin-left: 0; font-size: .66rem; }
.tt-vtag { flex: none; margin-left: auto; border: 1.5px solid #c0392b; color: #c0392b; background: #fff5f4; border-radius: 999px; font-size: .74rem; font-weight: bold; padding: 3px 8px; white-space: nowrap; }
.tt-row .tt-vmini + .tt-prep, .tt-row .tt-vtag + .tt-prep { margin-left: 6px !important; }

/* 確認事項：今日に戻る・明日以降の予定のマス */
.tt-quick { display: flex; gap: 8px; align-items: center; }
.tt-quick #tt-pick { flex: 1; min-width: 0; }
.tt-today { flex: none; width: auto !important; min-height: 38px; padding: 4px 12px; font-size: .9rem; }
.tt-cell.plan { border-color: #cbd5e1; background: #fff; }
/* 確認事項のタブ：押しやすく（高さを出す・数字のバッジは押すのをじゃましない） */
.tt-tabs2 { gap: 7px; padding-top: 7px; }
.tt-row1, .tt-row2 { gap: 5px; }
.tt-tabs2 .tt-tab { min-height: 44px; font-size: .86rem; padding: 2px 1px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tt-tabs2 .tt-tab .nbadge { pointer-events: none; }
.tt-row2 { display: flex !important; }
.tt-row2 .tt-tab { flex: 1 1 0; min-width: 0; }
.tt-row2 .tt-tab[data-ttab="mon"] { flex-grow: 1.8; }
.tt-row2 .tt-tab[data-ttab="f:kinou"] { flex-grow: 1.5; }
.tt-quick .tt-today { flex: 1; width: 100% !important; }

/* 入浴の準備中（氏名　準備中）。入浴の準備は携帯でも氏名を出す */
.tt-prep.wip { padding: 0; gap: 0; min-height: 30px; overflow: hidden; border: 1.5px solid #d97706; background: #fffbeb; color: #92400e; font-size: .78rem; }
.tt-prep.wip .pst { padding: 6px 6px; max-width: 5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block !important; }
.tt-prep.wip b { background: #d97706; color: #fff; padding: 6px 7px; }
.chk.tt .tt-row .tt-prep[data-kind="bath"].done .pst { display: inline-block !important; max-width: 5em; }
/* 入浴の行：バイタルの「未測定」と測った値を同じ横幅に */
.chk.tt .tt-row .tt-vmini, .chk.tt .tt-row .tt-vtag { width: 84px; box-sizing: border-box; justify-content: center; text-align: center; }
.chk.tt .tt-row .tt-vmini { align-items: center; border: 1.5px solid #9cc7a8; background: #eef6f0; border-radius: 10px; padding: 2px 0; }
.chk.tt .tt-row .tt-vtag { border-radius: 10px; padding: 0; min-height: 30px; display: inline-flex; align-items: center; }
/* 入浴の行：「未入浴」「入浴済 氏名」「準備中」なども同じ横幅に */
.chk.tt .tt-row .tt-prep[data-kind="bath"] { width: 100px; box-sizing: border-box; justify-content: center; padding-left: 0; padding-right: 0; }
.chk.tt .tt-row .tt-prep[data-kind="bath"].done b, .chk.tt .tt-row .tt-prep[data-kind="bath"].wip b { flex: none; }
.chk.tt .tt-row .tt-prep[data-kind="bath"] .pst { flex: 1 1 auto; min-width: 0; max-width: none !important; }
/* カレンダー・その他：カレンダーの予定は青っぽい枠で上に */
.chk.tt .tt-row.ot-cal { border: 1.5px solid #93c5fd; background: #f0f7ff; }
.chk.tt .tt-row.ot-cal::before { content: ''; flex: none; width: 4px; align-self: stretch; margin: -2px 2px -2px -4px; border-radius: 3px; background: #3b82f6; }
/* 確認事項：カレンダーの予定（ウィジェットと同じく 時間・表題・詳細・利用者名） */
.ot-cards { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 2px; }
.ot-card { border: 1.5px solid #93c5fd; border-left: 5px solid #3b82f6; background: #f0f7ff; border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.ot-card.fin { opacity: .75; }
.ot-c1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ot-ctime { flex: none; font-size: .8rem; font-weight: bold; color: #1d4ed8; background: #fff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 1px 6px; }
.ot-ctitle { flex: 1 1 auto; min-width: 0; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-c1 .tt-prep { margin-left: auto; flex: none; }
.ot-cdetail { font-size: .82rem; color: #475569; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ot-cwho { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ot-person { display: inline-flex; align-items: center; gap: 3px; font-size: .82rem; font-weight: bold; background: #fff; border: 1px solid #cbd5e1; border-radius: 999px; padding: 1px 8px 1px 2px; }
.ot-person .rroom { font-size: .68rem; }
.chk.tt .ot-card .tt-prep.done .pst { display: inline-block !important; max-width: 5em; }
/* TOPのボタンも確認事項のタブと同じ高さ */
.topnav .navbtn { min-height: 44px; touch-action: manipulation; }
.navbtn.nb-cnt { position: relative; overflow: visible; }
.navbtn.nb-cnt .nbadge { position: absolute; top: -7px; right: -4px; min-width: 20px; height: 20px; font-size: .7rem; padding: 0 5px; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.navbtn.nb-cnt .nbadge[hidden] { display: none; }
/* デイサービスの行：「バイタル済／未」と「未／出発済」を同じ横幅にして縦にそろえる */
.chk.tt .tt-row .tt-st.vs { width: 96px; box-sizing: border-box; justify-content: center; margin-left: auto; flex: none; }
.chk.tt .tt-row .tt-prep[data-kind="day"] { width: 100px; box-sizing: border-box; justify-content: center; padding-left: 0; padding-right: 0; margin-left: 6px !important; }
.chk.tt .tt-row .tt-prep[data-kind="day"] .pst { display: inline-block !important; flex: 1 1 auto; min-width: 0; max-width: none !important; }
.chk.tt .tt-row .tt-prep[data-kind="day"].done b { flex: none; }

/* 利用者情報のその他：バイタル測定が必要 */
.o-vital { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .92rem; }
.o-vital input { width: 22px; height: 22px; }
/* デイサービスの出発済は氏名を出さない */
.chk.tt .tt-row .tt-prep[data-kind="day"] .pst { display: none !important; }
.chk.tt .tt-row .tt-prep[data-kind="day"].done b { flex: 1; }
/* その他の行：バイタル済／未 と 未／済 */
.chk.tt .ot-row .tt-st.vs { width: 92px; }
.chk.tt .ot-row .tt-st.vs + .tt-prep { margin-left: 6px !important; }
/* 申し送り（利用者）：すべて・フロアで選ぶ */
.ho-floors { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ho-fl { min-height: 40px; padding: 4px 14px; border: 1.5px solid var(--green); border-radius: 999px; background: #fff; color: var(--green-dark, #2E6B3A); font-weight: bold; font-size: .9rem; display: inline-flex; align-items: center; gap: 5px; touch-action: manipulation; }
.ho-fl small { font-size: .72rem; background: var(--green-soft); color: var(--green-dark, #2E6B3A); border-radius: 999px; padding: 0 6px; }
.ho-fl.on { background: var(--green); color: #fff; }
.ho-fl.on small { background: #fff; }

.n-all { margin-left: 6px; font-size: .72rem; font-weight: bold; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 0 7px; }
/* デイサービスの「未／出発済」は小さめ（氏名を出さないので） */
.chk.tt .tt-row .tt-prep[data-kind="day"] { width: 64px; font-size: .78rem; }
.chk.tt .tt-row .tt-prep[data-kind="day"].done b { padding: 6px 4px; }
/* 体重（3列）：前回の体重・再測定の差を小さく */
.tt-cell .wsub { font-size: .64rem; color: #64748b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-cell .wsub.re { color: #b42318; font-weight: bold; }
/* TOP：1段目 利用者情報・申し送り・カレンダー／2段目 注意事項・確認事項・支援経過。氏名の右に今日の日付 */
.topnav .navbtns.nav3 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.topnav .me-row { display: flex; align-items: baseline; gap: 10px; }
.topnav .me-date { font-size: .95rem; font-weight: bold; color: var(--green-dark, #2E6B3A); }

/* 送迎：自己送迎 */
.tr-self { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 4px; font-size: 1rem; font-weight: bold; }
.tr-self input { width: 26px; height: 26px; }
.pdf-bar .btn.small { width: auto !important; white-space: nowrap; flex: none; }

.fp-now { font-size: .88rem; color: #334155; background: #f1f5f9; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; overflow-wrap: anywhere; }

/* PDFの出力：下にスクロールしないで済むように詰める */
.xp .field { padding: 10px 14px; margin-bottom: 8px; }
.xp .field .label, .xp .field > label { margin-bottom: 6px; }
.xp .choices button, .xp .choice { min-height: 44px; }
.xp .hint { font-size: .82rem; margin-top: 4px; }
.xp .xp-hint { margin: -2px 4px 8px; }
.xp #x-go { margin-top: 4px; }
@media (min-width: 700px) { .xp .xp-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .xp .xp-top .field { margin-bottom: 4px; } }

.pdf-bar b { white-space: nowrap; }

/* TOP：管理はアイコン（歯車の左） */
.topbar .tb-adm { margin-left: 8px; }
.topbar #tb-logout + .tb-adm, .topbar .tb-adm + .tb-gear { margin-left: 6px; }
/* TOPの「管理」：更新・ログアウトと同じ形の文字ボタン（歯車の左） */
.topbar #tb-admin.tb-adm { flex: none; text-decoration: none; border: 1.5px solid rgba(255,255,255,.75); border-radius: 10px; padding: 7px 10px !important; min-height: 40px; font-size: .9rem !important; font-weight: bold; margin-left: 6px; margin-right: 0; }

.xp .choices button { white-space: nowrap; }
.xp .xp-top + .xp-top { margin-top: 0; }
/* 入浴（当日・過ぎた日）：「未入浴／入浴済」は氏名なしで細く、バイタルを大きく見やすく */
.chk.tt .tt-row .tt-prep[data-kind="bath"].bath-day { width: 66px; font-size: .78rem; }
.chk.tt .tt-row .tt-prep[data-kind="bath"].bath-day.done b { flex: 1; padding: 6px 2px; }
.chk.tt .tt-row .tt-vmini, .chk.tt .tt-row .tt-vtag { width: 112px; }
.chk.tt .tt-row .tt-vmini { font-size: .8rem; line-height: 1.2; padding: 3px 0; }
.chk.tt .tt-row .tt-vtag { font-size: .82rem; }
.chk.tt .tt-row .tt-vmini, .chk.tt .tt-row .tt-vtag { width: 100px; }
.chk.tt .tt-row .tt-vmini { font-size: .76rem; }
.chk.tt .tt-row .tt-prep[data-kind="bath"].bath-day { width: 60px; }
.chk.tt .tt-row.has-prep { gap: 4px; }
.chk.tt .tt-row .tt-vmini, .chk.tt .tt-row .tt-vtag { width: 88px; }
.chk.tt .tt-row .tt-vmini { font-size: .78rem; }
.chk.tt .tt-done .tt-list { padding-left: 0; padding-right: 0; }
/* 通所型TOP：利用追加・利用休みを左に寄せて色を付ける（人数は右） */
.use-btns { justify-content: flex-start; }
.use-btns .muted { order: 3; margin-left: auto; margin-right: 0; }
.use-btns #use-add { order: 1; background: #e8f1fd; border-color: #93b7e8; color: #1d4ed8; font-weight: bold; }
.use-btns #use-cancel { order: 2; background: #fdeceb; border-color: #eab0aa; color: #b42318; font-weight: bold; }

/* 通所型TOP：その日だけ追加した方に「追加」、利用休みの方（下の枠）に「休み」の印 */
.rtile.once-add, .rtile.cx-tile { position: relative; }
.rtile.once-add::after, .rtile.cx-tile::after { position: absolute; top: -7px; right: -4px; font-size: .68rem; font-weight: bold; color: #fff; border-radius: 999px; padding: 1px 7px; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.rtile.once-add::after { content: '追加'; background: #2b7bd6; }
.rtile.cx-tile::after { content: '休み'; background: #c0392b; }
.rtile.cx-tile { opacity: .85; }
/* TOPの右メニュー：最初の位置で止める */
.split2 > .actions { top: var(--act-top, calc(var(--stick-h, 160px) + 4px)) !important; }
/* 知らせ：画面の半分の幅で折り返さないように（横いっぱいまで広がる） */
.toast { width: max-content; max-width: min(92vw, 560px); box-sizing: border-box; }
.toast.long { font-size: 1.05rem; line-height: 1.5; padding: 18px 22px; }

.uc-cal { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: bold; }
.uc-cal input { width: 24px; height: 24px; }

.end-now { font-size: 1.05rem; color: #b42318; }

.tt-prep.done.bw-cx { border-color: #9ca3af; background: #f3f4f6; color: #374151; }
.tt-prep.done.bw-cx b { background: #6b7280; }
/* 確認事項：この日だけ追加・中止を横に並べる */
.tt-add { display: flex; gap: 6px; }
.tt-add .mini { flex: 1 1 0; min-width: 0; }
.tt-add .tt-cxbtn { color: #b42318; border-color: #eab0aa; background: #fff7f6; }

/* 見た目の検証（第1回）で直したところ */
.tt-add .mini { white-space: nowrap; font-size: .85rem; padding-left: 4px; padding-right: 4px; } /* 「この日だけ追加」が2行に割れないように */
.info a[href^="tel:"] { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; } /* 電話番号を押しやすく */
.chk.tt .tt-list:not(.tr-list) { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); } /* 管理PCの幅でも名前が「サン…」と切れないように */
.row.date2 { flex-wrap: wrap; align-items: center; } /* 認定期間：幅がないときは2行に */
.row.date2 input { flex: 1 1 150px; min-width: 150px; }
.row.date2 span { flex: 0 0 auto; }
@media (max-width: 520px) { .row.site-row { flex-wrap: wrap; } .row.site-row input[type=text] { flex: 1 1 100%; } } /* 拠点の名前が切れないように */
.mb-row .mb-name { white-space: normal; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; } /* まとめて食事：名前を2行まで出す */
.chk.tt .tt-row .tt-prep, .chk.tt .tt-row .tt-vgo, .chk.tt .tt-row button.tt-st { min-height: 34px; } /* 確認事項の「未入浴」「未測定」などを押しやすく */
/* AIで下書き */
.ai-btn { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; margin-right: 6px; }
.ai-sheet .ai-list { display: grid; gap: 4px; } /* 中だけのスクロールはやめて、シート全体を1つでスクロール */
.ai-gobar { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); margin: 10px -14px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255,255,255,.6), #fff 30%); }
.ai-sheet .mo-pitem small { display: block; color: var(--muted); }
.ai-result { white-space: pre-wrap; background: #f5f3ff; border: 1.5px solid #c4b5fd; border-radius: 10px; padding: 10px; margin: 10px 0 8px; line-height: 1.6; }

/* TOP：だれも選ばずに右のメニューを押したとき、アイコンに内容を重ねる */
.abtn.on { background: var(--green); color: #fff; border-color: var(--green); }
.rleft.mode-on .rtile .tcaut { display: none !important; }
.rtile .tov { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 2px; line-height: 1.15; }
.rtile .tinfo { font-size: .72rem; font-weight: bold; color: #2E6B3A; white-space: nowrap; }
.rtile .tinfo.v { font-size: .68rem; }
.rtile .tinfo.mute { color: #94a3b8; font-weight: normal; }
.rtile .tinfo .stool { color: #c0392b; }
.ttag { display: inline-block; font-size: .68rem; font-weight: bold; border-radius: 999px; padding: 1px 7px; border: 1.5px solid; white-space: nowrap; }
.ttag.ng { color: #b42318; border-color: #f0a8a0; background: #fff4f2; }
.ttag.ok { color: #1f6b35; border-color: #9cc7a8; background: #eef6f0; }
.ttag.mute { color: #64748b; border-color: #cbd5e1; background: #f8fafc; }
.rtile.sel .tinfo, .rtile.sel .tinfo .stool { color: #fff; }
.hm-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; margin-bottom: 6px; border: 1.5px solid #9cc7a8; border-radius: 10px; background: #eef6f0; font-size: .9rem; }
.hm-bar b { flex: 1 1 auto; }
.hm-bar .mini { flex: 0 0 auto; min-height: 32px; }
.hm-sw { display: inline-flex; gap: 4px; margin-left: 6px; }
.hm-sw .mini.on { background: var(--green); color: #fff; border-color: var(--green); }
.hp-list { display: grid; gap: 6px; }
.hp-item { display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.hp-h { display: flex; gap: 6px; align-items: baseline; font-size: .8rem; color: var(--muted); }
.hp-h b { color: #222; font-size: .9rem; }
.hp-h small { margin-left: auto; }
.hp-t { font-size: .92rem; white-space: pre-wrap; word-break: break-word; color: #222; }
/* 排泄：その日の一覧で、排便のある記録は赤字 */
.dl-row .v .stool-t { color: #c0392b; font-weight: bold; } /* 排便のところだけ赤 */
.hm-bar { padding: 4px 6px; gap: 4px; }
.hm-bar .mini { min-height: 32px; padding: 2px 8px; font-size: .8rem; }
.hm-bar .hm-x { min-width: 36px; font-size: .95rem; }
.hm-sw { margin-left: 4px; }
#home-prog .day-h { margin: 8px 0 6px; padding: 4px 10px; font-size: .88rem; gap: 6px; } /* TOPの枠の中の支援経過：日付の帯を少し小さく */
#home-prog .day-h:first-child { margin-top: 0; }
.hm-bar b { flex: 1 1 0; min-width: 0; font-size: .85rem; line-height: 1.3; } /* 見出しと「ほかの方」「✕」を1行に */
.hm-bar { flex-wrap: nowrap; }
.hm-bar:has(.hm-sw) { flex-wrap: wrap; }
/* フロアの固定 */
.floor-tabs { align-items: center; }
.ffix { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 6px; font-size: .9rem; font-weight: bold; color: var(--green-dark); white-space: nowrap; cursor: pointer; }
.ffix input { width: 22px; height: 22px; margin: 0; }
.ftab.locked { opacity: .4; }
.tpl-item.used { background: #eef6f0; border-color: #9cc7a8; } /* 定型文：選んだ文に色 */

/* 下から出るシートが画面より高いときは、シート全体をスクロール（上が切れて動かせないことがないように） */
.cal-ov > .cal { max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* モニタリング：選ぶところを縦にせまく（見出しとボタンを1つの枠に） */
.mo-crow { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: #fff; border: 1.5px solid var(--line); border-top-width: 0; }
.mo-date + .mo-crow, .mo-crow:first-of-type { border-top-width: 1.5px; border-radius: 12px 12px 0 0; }
.mo-crow:has(+ .field) { border-radius: 0 0 12px 12px; margin-bottom: 10px; }
.mo-crow .mo-cl { font-size: .85rem; font-weight: bold; color: var(--muted); }
.mo-crow .choices.compact { gap: 6px; flex-wrap: nowrap; }
.mo-crow .choices.compact .choice { flex: 1 1 0; min-height: 36px; padding: 4px 6px; font-size: .9rem; white-space: nowrap; }
.tt-days .tt-date { white-space: nowrap; }
.tt-days .tt-date b { font-size: 1.05rem; }
.tt-days .tt-date .tt-dn { white-space: nowrap; }
.field:has(.mo-pon) { padding-top: 8px; padding-bottom: 8px; } /* 「支援経過も載せる」の枠を低く */
.field:has(.mo-pon) .mo-pon { margin: 0; }
.label-row:has(.mo-tools) label { white-space: nowrap; }
.mo-tools { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.mo-tools .vt-toggle { padding: 4px 8px; font-size: .82rem; margin: 0; }
.ai-sheet .ai-head { position: sticky; top: -14px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: -14px -14px 6px; padding: 12px 14px 8px; background: #fff; border-bottom: 1px solid var(--line); }
.ai-sheet .ai-head b { flex: 1 1 auto; }
.ai-sheet .ai-x { flex: 0 0 auto; min-height: 36px; padding: 4px 10px; font-size: .85rem; }

/* AIの一括の下書き */
.bm-list { display: grid; gap: 4px; margin: 6px 0; max-height: none; }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: .92rem; cursor: pointer; }
.bm-st { font-size: .8rem; color: var(--muted); text-align: right; }
.bm-st.ok { color: #1f6b35; font-weight: bold; }
.bm-st.ng { color: #b42318; }
.ai-note { margin: 0 0 8px; padding: 8px 10px; border: 1.5px solid #c4b5fd; border-radius: 10px; background: #f5f3ff; color: #4c1d95; font-size: .85rem; line-height: 1.5; }
.ai-note .mini { margin-left: 6px; }

/* どの画面でも今の拠点を出す */
.topbar .tb-site { flex: 0 1 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 12px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; font-size: .9rem; font-weight: bold; background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 420px) { .topbar .tb-site { max-width: 34%; padding: 4px 8px; font-size: .78rem; } }
/* 上の緑のバーは画面いっぱいに広げ、「もどる」「TOP」を画面の左はしに固定する（右はしに拠点名） */
.topbar .in { max-width: none; padding-left: 16px; padding-right: 20px; }
@media (min-width: 900px) { .topbar .in { padding-left: 20px; } }
/* ログアウトを少し左へ（右どなりの「管理」との間をあける） */
.topbar #tb-logout { margin-right: 28px; }
@media (max-width: 520px) { .topbar #tb-logout { margin-right: 14px; } }
/* 拠点名のボタン（ピンのアイコン）。押すと所属している拠点を選べる */
.topbar .tb-site { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; cursor: default; }
.topbar .tb-site .ic { width: 18px; height: 18px; flex: none; }
.topbar .tb-site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar .tb-site.can { cursor: pointer; }
.topbar .tb-site.can:active { background: rgba(255,255,255,.3); }
.topbar .title.home { display: flex; align-items: center; }
.topbar .tb-site.big { max-width: 100%; font-size: 1.15rem; padding: 7px 16px 7px 12px; border-width: 2px; }
.topbar .tb-site.big .ic { width: 20px; height: 20px; }
@media (max-width: 520px) { .topbar .tb-site.big { font-size: .95rem; padding: 5px 10px 5px 8px; } }
.site-sheet { max-width: 480px; width: 100%; }
.site-sheet .item small { margin-left: 6px; color: var(--green); font-weight: bold; }
/* PCの広い画面：上の帯（拠点名・更新・ログアウト・管理）を、本文と同じ幅で中央にまとめる */
body:has(main.wide) .topbar .in { max-width: 1180px; padding-left: 16px; padding-right: 16px; } /* TOPだけ（ほかの画面の「もどる」「TOP」は左はしのまま） */
body:has(main.wide) .topbar #tb-logout { margin-right: 8px; }
.ffix { margin-left: 6px; } /* 「固定」はフロアのタブのすぐ右に */

/* 確認事項の3列のアイコン：どの欄・どのタブでも同じ決まりで並べる
   ・幅：同じ欄の「まだ」と「済」で同じ幅・同じ位置（済の枠の内側の余白をなくし、点線は上の区切りだけ）
   ・高さ：同じ段のアイコンは同じ高さ（中身がちがっても）
   ・中身：上から 居室 → 名前 → 値 の順に、どのアイコンも同じ高さの位置から並べる */
.tt-grid3 { gap: 6px; padding: 8px; grid-auto-rows: 1fr; align-items: stretch; }
.tt-cell { justify-content: flex-start; min-height: 56px; padding: 6px 4px; gap: 2px; }
.tt-cell .rroom { display: inline-block; height: 16px; line-height: 16px; padding: 0 6px; }
.tt-cell .cn { line-height: 1.25; }
.tt-cell .mv, .tt-cell .wsub, .tt-cell .tt-vmini { line-height: 1.2; }
div.tt-done:has(> .tt-grid3) { margin: 0 8px 8px; border: 0; border-top: 1px dashed var(--line); border-radius: 0; background: transparent; }
div.tt-done > .tt-grid3 { padding: 8px 0 0; }

/* 確認事項：すべて済の欄（排便の対応・デイサービス）は、見出しだけに小さくする。見出しを押すと開く */
.chk.can-min > .chk-h { cursor: pointer; }
.chk.can-min > .chk-h::after { content: '▲'; margin-left: 8px; font-size: .7rem; color: var(--muted); }
.chk.can-min.min > .chk-h::after { content: '▼ 開く'; }
.chk.min > :not(.chk-h) { display: none !important; }
.chk.min > .chk-h { border-radius: 14px; }
.chk-h .min-tag { margin-left: auto; font-style: normal; }

/* TOPの重ね表示（だれも選ばずに右のメニュー）：どのモードでも、居室・名前は上づめで同じ位置、値は下の決まった場所（2行分）に出す。
   段の高さはモードを切りかえても変わらない */
.rleft.mode-on .rgrid { grid-auto-rows: 1fr; }
.rleft.mode-on .rtile { justify-content: flex-start; min-height: 96px; }
.rleft.mode-on .rtile .tov { min-height: 30px; justify-content: flex-start; }
.rleft.mode-on .rtile .tinfo { max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
@media (max-width: 700px) { .rleft.mode-on .rtile { min-height: 92px; } }
/* 不在者の枠：中のアイコンを、上の利用者のアイコンと同じ幅・同じ列にする（枠の線と余白の分だけ外に広げる） */
.absent-box { margin-left: -10px; margin-right: -10px; padding: 8px 8px 10px; border-width: 2px; }
/* 確認事項の「済」の行（一覧の形）：「まだ」の行と同じ左右の位置にそろえる */
div.tt-done:has(> .tt-list) { margin: 0 10px 10px; border: 0; border-top: 1px dashed var(--line); border-radius: 0; background: transparent; }
div.tt-done > .tt-list { padding: 8px 0 0; }
/* 確認事項の行のボタン（未・完了・出発済・入浴済など）：同じ幅にそろえる */
.chk.tt .tt-row .tt-prep { min-width: 64px; justify-content: center; }
/* 名前を選ぶ枠（利用追加・PDF出力など）：画面の幅ではなく、枠の入る幅で列の数を決める（PCで細くならないように）。同じ段は同じ高さ・名前は上づめ */
.x-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 1fr; }
.x-item { align-items: flex-start; }
.x-item input { margin-top: 1px; }

/* 確認事項の「未／済」「対応／完了／中止」「未入浴／入浴済」などのボタン：どの欄（予定のカード・行）でも同じ形・同じ大きさ。
   名前は出さない（「準備中」だけは、だれが準備しているかを出す） */
.chk.tt .tt-prep { min-width: 56px; min-height: 36px; padding: 4px 10px !important; justify-content: center; gap: 0; border-radius: 10px; font-size: .85rem; font-weight: bold; }
.chk.tt .tt-prep.done { background: var(--green) !important; border-color: var(--green) !important; color: #fff !important; overflow: visible; }
.chk.tt .tt-prep.done b { background: none !important; color: inherit !important; padding: 0 !important; }
.chk.tt .tt-prep.done .pst { display: none !important; }
.chk.tt .tt-prep.wip .pst { display: inline-block !important; }
.chk.tt .tt-prep.bw-cx { background: #94a3b8 !important; border-color: #94a3b8 !important; } /* 排便の対応の「中止」は灰色（中止＝灰の決まり） */
.chk.tt .ot-card .tt-prep, .chk.tt .cal-tt .tt-prep { margin-left: auto; }
/* 済んだ予定のカード：カード全体を薄くせず、中の文字だけ少し薄くする（「済」のボタンはほかと同じ濃さ） */
.ot-card.fin { opacity: 1; }
.ot-card.fin > :not(.tt-prep):not(:has(.tt-prep)) { opacity: .7; }
/* TOP：拠点名を右上に（ほかの画面と同じ）。スマホでは、更新・ログアウト・管理を少し小さくして、拠点名が読めるようにする */
body:has(main.wide) .topbar .title.home { flex: 0 0 0; min-width: 0; padding: 0; }
body:has(main.wide) .topbar .in { justify-content: flex-end; }
body:has(main.wide) .topbar .tb-site { flex: 0 1 auto; max-width: none; min-width: 0; }
@media (max-width: 520px) {
  body:has(main.wide) .topbar .in { gap: 6px; padding-left: 8px; padding-right: 8px; }
  body:has(main.wide) .topbar .link { font-size: .82rem; padding: 6px 7px; }
  body:has(main.wide) .topbar #tb-logout { margin-right: 4px; }
  body:has(main.wide) .topbar .tb-site { font-size: .8rem; padding: 5px 8px; }
}
.chk.tt .tt-prep { min-width: 64px; } /* 済・未・完了などのボタンは、カードでも行でも同じ幅 */
/* 上の緑の帯：どの画面でも同じ幅（TOPと同じ1180px）で中央にそろえる。拠点名は右はし、もどる・TOPは左はし（PCの広い画面でも位置が画面ごとに変わらない） */
.topbar .in { max-width: 1180px !important; margin: 0 auto; padding-left: 16px !important; padding-right: 16px !important; }
html { scrollbar-gutter: stable; } /* 画面の長さでスクロールバーが出たり消えたりしても、上の帯の位置が動かないように */
/* 上の帯の高さと拠点名の大きさ：TOPもほかの画面も同じ（スマホ・PCとも） */
.topbar .in { min-height: 70px; }
@media (max-width: 520px) {
  .topbar .in { min-height: 64px; gap: 6px; padding-left: 8px !important; padding-right: 8px !important; }
  .topbar .tb-site { font-size: .8rem !important; padding: 5px 8px !important; max-width: 46%; }
}
@media (max-width: 520px) {
  .topbar .in { min-height: 70px; }
  .topbar .tb-site { flex: 0 0 134px !important; width: 134px; max-width: 134px !important; } /* スマホ：拠点名はどの画面でも同じ幅・同じ位置 */
  body:has(main.wide) .topbar .link { font-size: .78rem; padding: 6px 6px; }
}
@media (max-width: 520px) {
  /* スマホのTOP：更新・ログアウト・管理を少し小さくして、拠点名（同じ幅・同じ位置）と1行に収める */
  .topbar #tb-reload, .topbar #tb-logout, .topbar #tb-admin.tb-adm { padding: 6px 7px !important; font-size: .8rem !important; min-height: 36px; margin-left: 0 !important; margin-right: 0 !important; }
}
/* 確認事項の未／済などのボタン：どの欄・どの日も同じ幅（いちばん長い「準備完了」に合わせる） */
.chk.tt .tt-prep { width: 80px !important; min-width: 80px !important; max-width: 80px !important; padding: 4px 4px !important; font-size: .82rem !important; white-space: nowrap; flex: 0 0 80px !important; }

/* 一覧を直す画面（排泄の場所・タグ・定型文）：縦を詰めてすっきり */
.plist { gap: 6px; margin-bottom: 10px; }
.prow input[type=text] { min-height: 44px; padding: 8px 12px; font-size: 1rem; border-radius: 10px; }
.prow .mini { min-height: 44px; width: 42px; border-radius: 10px; }
.prow .mini.fx { display: inline-grid; place-items: center; font-size: .75rem; color: #92400e; background: #fffbeb; border-color: #fcd34d; }
.prow input[readonly] { background: #f8fafc; color: #475569; }
#add.btn.small { margin-bottom: 8px; }
.ai-site { margin-top: 18px; }
.ai-site textarea { font-size: 1rem; line-height: 1.6; }
/* タグの色：カレンダーと同じ色（いつもの色＝緑） */
.tchip { display: inline-block; font-size: .8rem; font-weight: 800; color: #fff; padding: 3px 10px; border-radius: 6px; background: #43A047; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tq-r { background: #E53935 !important; color: #fff !important; border-color: #E53935 !important; }
.tq-o { background: #F57C00 !important; color: #fff !important; border-color: #F57C00 !important; }
.tq-y { background: #F9A825 !important; color: #3b2a00 !important; border-color: #F9A825 !important; }
.tq-g, .tq-n { background: #43A047; color: #fff; border-color: #43A047; }
.tq-b { background: #1E88E5 !important; color: #fff !important; border-color: #1E88E5 !important; }
.tq-p { background: #8E24AA !important; color: #fff !important; border-color: #8E24AA !important; }
.tq-k { background: #757575 !important; color: #fff !important; border-color: #757575 !important; }
.prow .mini.tcbtn { width: auto; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; }
.prow .mini.tcbtn.on { border-color: var(--green); }
.tdot { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
.tpal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; padding: 8px; margin: -2px 0 4px; background: #f8fafc; border: 2px solid var(--line); border-radius: 10px; }
.tpick { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; background: #fff; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 0; }
.tpick.on { border-color: var(--green); outline: 2px solid var(--green-soft); }
.tpick small { font-size: .72rem; color: #475569; }

/* 定型文は長いので、文の長さに合わせて欄が伸びる */
.prow textarea { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; font-size: 1rem; line-height: 1.5; border-radius: 10px; resize: none; field-sizing: content; }
.prow:has(textarea) { align-items: flex-start; }

/* 見出し：赤い「未〇」と「済〇人」を並べる */
.chk.tt .chk-h .cnt + .tt-donebtn { margin-left: 6px; }

/* 「この日は中止」は済と同じ扱いなので灰色（排便の中止と同じ） */
.tt-once.cx { color: #475569; background: #e2e8f0; }

/* TOPの食事：朝・昼・夕のボタンだけ。横に広げて押しやすく */
.hm-bar .hm-sw { margin-left: 0; gap: 8px; flex: 1; display: flex; min-width: 0; }
.hm-bar .hm-sw .mini { flex: 1 1 0; min-width: 0; max-width: 120px; padding: 6px 8px; font-size: 1rem; }

/* スマホ：画面の名前は省略せず2行まで */
@media (max-width: 520px) {
  .topbar .title:not(.home) { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 1rem; line-height: 1.2; letter-spacing: 0; overflow-wrap: anywhere; word-break: keep-all; } /* 折るのは区切り（wbr・空白）だけ。入りきらないときだけ途中で折る */
}

/* 右メニュー：2人以上を選んだときの見出し */
.a-multi { font-size: .78rem; font-weight: bold; color: var(--green); text-align: center; padding: 2px 0; }

/* 選んだ方の表示はボタンに見えないよう、枠なしの文字だけ（選択解除のすぐ下） */
.actions .a-who, .a-who { background: transparent !important; border: 0 !important; height: auto !important; padding: 0 2px 4px !important; color: var(--muted); }
.a-who b { color: var(--text, #1f2937); font-size: .95rem; }
.a-who small { font-size: .7rem; }
.a-multi { font-size: .85rem; }

/* 「4名」と「まとめて」は、いつも2行に分けて出す（変なところで切れないように） */
.a-multi b, .a-multi span { display: block; white-space: nowrap; line-height: 1.25; }
.a-multi b { font-size: .95rem; }
.a-multi span { font-size: .78rem; }

/* 拠点のAI指示：ボタンは折り返して並べる */
.ai-site .row { flex-wrap: wrap; }
.ai-site .row .btn { flex: 1 1 140px; width: auto; }
.ai-now { margin: 4px 0 6px; }
.chk-h .cnt + .cnt { margin-left: 6px; }

/* 利用者情報のまとめ：排尿・排便は1回ずつ「時間　内容」の箇条書き */
.rd-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rd-ex li { display: flex; gap: 10px; align-items: baseline; line-height: 1.45; }
.rd-ex li::before { content: "・"; color: var(--muted); margin-right: -6px; }
.rd-ex .t { flex: none; font-weight: bold; font-variant-numeric: tabular-nums; }
.rd-ex small { margin-left: 8px; color: var(--muted); font-size: .8rem; }
.rd-ex .stool { color: #c0392b; }

/* 排泄の経過：便は赤、メモは小さく */
.dl-row .v .stool { color: #c0392b; }
.exm { display: block; color: var(--muted); font-size: .78rem; }

/* 排泄の入力：排尿は「パット内／の排尿」を左に2段、右に あり・なし・尿汚染あり（縦を詰める） */
.exrow.side { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.exrow.side .exlabel { flex: 0 0 4.2em; margin: 0; line-height: 1.25; font-size: .85rem; }
.exrow.side .choices { flex: 1; min-width: 0; margin: 0; flex-wrap: nowrap; gap: 6px; }
.exrow.side .choice { flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.exrow.side .choices:has(.choice:nth-child(2):last-child) .choice { flex: 0 1 auto; min-width: 5.5em; }
#ex-place .choices { flex-wrap: wrap; }
#ex-place .choice { flex: 0 1 auto; }
#ex-place { align-items: flex-start; }
#ex-place .exlabel { padding-top: 8px; }
/* 左に名前の行は、どの行もボタンは文字に合わせた幅（そろえる） */
.exrow.side .choices .choice { flex: 0 1 auto !important; min-width: 3.4em !important; }
#ex-amt .choices, #ex-type .choices { flex-wrap: wrap; }
#ex-amt, #ex-type { align-items: flex-start; }
#ex-amt .exlabel, #ex-type .exlabel { padding-top: 4px; }
.exrow.side .exlabel small { display: block; font-size: .68rem; font-weight: normal; }
@media (max-width: 520px) { .exrow.side .choices { gap: 5px; } .exrow.side .choices .choice { min-width: 2.6em !important; padding: 6px 8px; font-size: .92rem; } }
@media (max-width: 520px) { #ex-place .choices { gap: 4px; } #ex-place .choices .choice { font-size: .8rem; padding: 6px 7px; min-width: 0 !important; } .exrow.side .exlabel { flex-basis: 3.8em; } }
.exrow.side .exlabel small { white-space: nowrap; letter-spacing: -.02em; }
@media (max-width: 520px) { .exrow.side .exlabel small { font-size: .6rem; } }

/* 入力画面の名前：「〇〇様」と「食事」。スマホは2行、PCは1行 */
.topbar .title .tl1 { margin-left: .6em; }
@media (max-width: 520px) {
  .topbar .title:has(.tl0) { display: flex !important; flex-direction: column; justify-content: center; line-height: 1.2; }
  .topbar .title .tl0 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .title .tl1 { margin-left: 0; font-size: .85rem; opacity: .9; }
}
/* 「支援経過」（左）と「保存（上書き）」（右）を同じ行に */
.save2 { display: flex; gap: 8px; align-items: stretch; }
.save2 > .btn { margin: 0; }
.save2 > .btn.sub { flex: 0 0 38%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.save2 > .btn:not(.sub) { flex: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.save2 > .btn small { font-size: .78rem; font-weight: bold; }

/* 食事の1食シート：「欠食」を主食・副食の枠と同じ高さ・同じ下の位置にそろえる */
.meal-sheet .meal-line { align-items: flex-end; }
.meal-sheet .meal-line .skip { min-height: 44px; height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; margin: 0; }

/* 入力画面：本文・保存の行・その日の経過の間の隙間を詰める */
.excard { margin-bottom: 6px; }
.savebar.save2 { padding-top: 6px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
.savebar.save2 > .btn { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.savebar.save2 + #daylist .daylist { margin-top: 4px; }
.excard .exrow:has(+ #stool-more[hidden]), .excard .exrow:has(+ #stool-more[style*="none"]) { border-bottom: none; }

/* 支援経過：保存の左に「申し送り する・しない」（「する」のときは、いつまでのボタンも同じ所に） */
.savebar.hobar { flex-wrap: wrap; align-items: center; }
.savebar.hobar .ho-field { flex: 1 1 auto; margin: 0; padding: 4px 8px; min-width: 0; }
.savebar.hobar .ho-row { flex-wrap: wrap; }
.savebar.hobar .ho-row .choice { min-height: 44px; }
.savebar.hobar .ho-row .until-btn { min-height: 44px; }
.savebar.hobar > .btn { flex: 0 0 30%; min-height: 56px; }
.savebar.hobar { flex-wrap: nowrap; align-items: stretch; }
.savebar.hobar .ho-field { flex: 1 1 0; }
.savebar.hobar .ho-row .ho-until { flex: 1 1 100%; }
.savebar.hobar > .btn { flex: 0 0 28%; min-height: 0; }

/* 長い場所名は、ボタンの中で折り返す（画面からはみ出さない） */
#ex-place .choices .choice { white-space: normal !important; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
/* 申し送りの枠は中身の幅だけ。残りは保存ボタンに */
.savebar.hobar .ho-field { flex: 0 1 auto; }
.savebar.hobar > .btn { flex: 1 1 auto; }
.savebar.hobar .ho-row .ho-until .until-btn { width: 100%; }
.savebar.hobar .ho-field { flex: 0 0 auto; min-width: auto; }
.savebar.hobar > .btn { flex: 1 1 0; min-width: 80px; }
.savebar.hobar .ho-row .choice { padding: 4px 10px; }

/* 申し送りの日付：いつも出す。「しない」のときは暗く */
.ho-until.off { opacity: .35; filter: grayscale(1); }
.ho-until.off .until-btn { cursor: default; }
.savebar.hobar .ho-row { flex-wrap: nowrap; align-items: center; }
.savebar.hobar .ho-row .ho-until { flex: 0 0 auto; }
.savebar.hobar .ho-row .ho-until .until-btn { width: auto; padding: 4px 8px; font-size: .82rem; }
@media (max-width: 520px) { .savebar.hobar .ho-field { padding: 4px 6px; } .savebar.hobar .ho-field > .label { width: 2.2em; font-size: .78rem; } .savebar.hobar .ho-row { gap: 4px; } .savebar.hobar .ho-row .choice { padding: 4px 7px; font-size: .85rem; } .savebar.hobar .ho-row .ho-until .until-btn { padding: 4px 5px; font-size: .76rem; } }
@media (max-width: 520px) { .savebar.hobar { gap: 6px; } .savebar.hobar > .btn { min-width: 0; flex: 1 1 0; padding-left: 4px; padding-right: 4px; } .savebar.hobar .ho-field { padding: 4px 4px; gap: 4px; } }

/* 支援経過の検索：ボタンが多いときは折り返す（はみ出さない） */
.ps-btns { flex-wrap: wrap; gap: 6px; }
.ps-btns .mini { flex: 0 1 auto; white-space: nowrap; }

/* 長い英数字なども、欄の中で折り返す */
.dl-row .v, .rd-p .b, .rec .body { overflow-wrap: anywhere; }
/* 利用者情報のまとめ：排泄は名前と時間の間を詰め、・は付けない */
.rd-ex li::before { content: none; }
.rd-ex li { gap: 6px; }
.rd-c.w .k { flex-basis: 3em; }
.rd-c.w { gap: 6px; }
@media (max-width: 520px) { .rd-ex li { font-size: .85rem; gap: 5px; } .rd-c.w .k { flex-basis: 2.6em; } }
.rd-c.w .k { flex: 0 0 3rem !important; white-space: nowrap; }

/* 確認事項「その他」：スマホでは 1段目＝部屋・名前（右に未測定・未）、2段目＝内容。名前と内容が重ならない */
@media (max-width: 520px) {
  .chk.tt .ot-row[data-rid] { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 6px; row-gap: 2px; align-items: center; }
  .chk.tt .ot-row[data-rid] > .rroom, .chk.tt .ot-row[data-rid] > .rroom-w { grid-column: 1; grid-row: 1; }
  .chk.tt .ot-row[data-rid] > .tt-name { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chk.tt .ot-row[data-rid] > .ot-what { grid-column: 1 / 3; grid-row: 2; justify-self: start; max-width: 100%; }
  .chk.tt .ot-row[data-rid] > .ot-what .tt-label { white-space: normal; overflow: visible; }
  .chk.tt .ot-row[data-rid] > .tt-st { grid-column: 3; grid-row: 1 / 3; margin: 0 !important; }
  .chk.tt .ot-row[data-rid] > .tt-prep { grid-column: 4; grid-row: 1 / 3; margin: 0 !important; }
  .chk.tt .ot-row[data-rid] > .tt-st.abs { grid-column: 3 / 5; justify-self: end; }
}
@media (max-width: 520px) { .chk.tt .ot-row[data-rid] > .tt-st.vs { width: 70px !important; min-width: 0; padding: 4px 2px; font-size: .8rem; } .chk.tt .ot-row[data-rid] > .tt-st.vs .ic { width: 12px; height: 12px; } .chk.tt .ot-row[data-rid] { column-gap: 4px; } }

/* 未・済などのボタン：どの欄も「出発済」の3文字がちょうど入る幅にそろえる */
.chk.tt .tt-prep { width: 58px !important; min-width: 58px !important; max-width: 58px !important; flex: 0 0 58px !important; padding: 4px 2px !important; font-size: .82rem !important; letter-spacing: 0; white-space: nowrap; }

/* ヒヤリハット・事故報告書 */
.exlabel .req, .exlabel .opt { margin-left: 6px; font-size: .68rem; font-weight: bold; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.exlabel .req { background: #fde8e6; color: #b42318; }
.exlabel .opt { background: #eef2f0; color: #475569; }
.inc-card .exrow { padding: 6px 0; }
.inc-card .exlabel { margin-bottom: 4px; }
.inc-card .choices.compact { gap: 6px; }
.inc-note { margin: 4px 0 0; font-size: .82rem; }
.inc-item { display: flex; align-items: center; gap: 6px; }
.inc-item .name { flex: 1; min-width: 0; }
.inc-item .name small { display: block; margin-top: 2px; }
#im-all { margin: 8px 0; }
/* いちばん上の「ヒヤリハット／事故」は大きく、横いっぱいに */
.inc-card .exrow:first-child .choices { display: flex; flex-wrap: nowrap; }
.inc-card .exrow:first-child .choice { flex: 1 1 0; min-height: 50px; font-size: 1.1rem; }
@media (max-width: 520px) { .topbar .title .tl1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.inc-badge { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 8px; border-radius: 999px; background: #fde8e6; color: #b42318; font-size: .75rem; font-weight: bold; }

/* 「その他」の中身を書く欄 */
.inc-other { margin-top: 6px; min-height: 42px !important; padding: 6px 10px !important; font-size: .95rem !important; }

/* ヒヤリハット・事故報告書を「1枚の用紙」の形で */
.inc-sheet { background: #fff; border: 1.5px solid #9aa5a0; border-radius: 6px; padding: 10px 10px 8px; margin: 6px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.inc-h { text-align: center; font-weight: bold; font-size: 1.05rem; letter-spacing: .15em; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 2px solid #333; color: #111; }
.inc-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.inc-tbl th, .inc-tbl td { border: 1px solid #b9c2be; padding: 4px 6px; vertical-align: top; text-align: left; }
.inc-tbl th { width: 6.5em; background: #f1f5f2; color: #333; font-weight: bold; font-size: .8rem; white-space: nowrap; }
.inc-tbl td { white-space: pre-wrap; overflow-wrap: anywhere; color: #111; }
.inc-ph { margin-top: 6px; }
.inc-ph-hint { margin: 0 0 8px; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 6px 8px; display: flex; gap: 6px; align-items: flex-start; }
.inc-ph-hint .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }
/* ヒヤリハット・事故報告書は、支援経過の一覧でも省略せず全部出す（改行もそのまま） */
.rec.simple.inc .body { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: pre-wrap; }
.rec.simple.inc .head { flex-wrap: wrap; row-gap: 0; }
.rec.simple.inc .head > span:first-child { flex: 1 1 auto; min-width: 0; white-space: normal; overflow: visible; }
.rec.simple.inc .head .until-r { font-size: .8rem; margin-left: auto; }

/* TOP：ヒヤリハット・事故報告書の一覧（用紙の形。3列の幅いっぱい） */
.hp-inc { display: grid; gap: 10px; }
.hp-inc-item { cursor: pointer; }
.hp-inc-item .inc-sheet { margin: 0; }
.hp-inc-top { text-align: right; font-size: .78rem; font-weight: bold; color: var(--plum); margin-bottom: 2px; }
.inc-ph .att-th { cursor: zoom-in; }

/* 誕生日リスト */
.bd-tabs { margin: 0 0 8px; }
.bd-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bd-card { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.bd-n { display: flex; align-items: center; gap: 6px; font-size: 1.05rem; margin-bottom: 4px; flex-wrap: wrap; }
.bd-r { display: flex; align-items: baseline; gap: 6px 8px; font-size: .92rem; flex-wrap: wrap; }
.bd-r .k { color: var(--muted); font-size: .75rem; font-weight: bold; min-width: 4em; }
.bd-month { background: #fff; border: 2px solid var(--line); border-radius: 12px; margin: 6px 0 12px; overflow: hidden; }
.bd-m { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--line); }
.bd-m:first-child { border-top: 0; }
.bd-m .bd-d { flex: 0 0 3em; text-align: right; color: var(--green-dark); }
.bd-m small { margin-left: auto; color: var(--muted); }
.bd-none { padding: 8px 10px; }
.bd-r .k { flex: 0 0 4em; min-width: 0; }
.bd-age { min-width: 4.5em; }
#bd-born .bd-m small { text-align: right; line-height: 1.3; }
#bd-born .bd-m small b { margin-left: 6px; color: var(--ink); }
#bd-born .bd-d { flex-basis: 1.6em; color: var(--muted); font-size: .85rem; }
.bd-b { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--line); }
.bd-b:first-child { border-top: 0; }
.bd-b .bd-d { flex: 0 0 1.6em; text-align: right; color: var(--muted); font-size: .85rem; }
.bd-bm { flex: 1; min-width: 0; }
.bd-b1 { display: flex; align-items: center; gap: 6px; }
.bd-bn { flex: 1; min-width: 0; }
.bd-ba { flex: none; }
.bd-bm small { color: var(--muted); }
/* 右にボタンのある見出し（排便の対応・お薬）も、ほかの見出しと同じ上の間隔 */
.label-row.h2row { margin: 26px 0 10px; align-items: center; }

/* TOP：右のメニューで出した見出し（朝・昼・夕／直近の排泄／バイタル一覧／支援経過など）は、利用者をスクロールしても上に止めておく */
#home-mode { position: sticky; top: var(--tbh, 70px); z-index: 6; background: var(--bg); }
#home-mode:empty { display: none; }
#home-mode .hm-bar { margin-bottom: 6px; box-shadow: 0 2px 4px rgba(0,0,0,.06); }

/* すべて済でたたんだ欄：「▼ 開く」は見出しと同じ行に（スマホで下に落ちないように） */
.chk.can-min > .chk-h { flex-wrap: nowrap; }
.chk.can-min > .chk-h > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk.can-min > .chk-h > .cnt { flex: none; }
.chk.can-min > .chk-h::after { flex: none; white-space: nowrap; }
@media (max-width: 520px) { .chk.can-min.min > .chk-h::after { content: "▼開く"; margin-left: 6px; } .chk.can-min > .chk-h::after { margin-left: 6px; } }
@media (max-width: 520px) { .chk.can-min > .chk-h > b { font-size: 1rem; letter-spacing: 0; } .chk.can-min > .chk-h .tt-ok { padding: 2px 6px; font-size: .78rem; } .chk.can-min > .chk-h::after { font-size: .68rem; } }

/* 確認事項の見出しの文字の大きさ：スマホでは、たたんだ欄もそうでない欄も同じ大きさ */
@media (max-width: 520px) { .chk.tt > .chk-h > b { font-size: 1rem; letter-spacing: 0; } }

/* 確認事項：日付を押すと一覧から選ぶ */
.tt-pick { background: none; border: 0; padding: 4px 8px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.tt-pick:hover { background: rgba(0,0,0,.04); }
.tt-pick-ic { font-size: .7rem; color: var(--muted); }
.day-pick .dp-list { max-height: 60vh; overflow-y: auto; display: grid; gap: 4px; margin: 6px 0; }
.dp-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 1rem; cursor: pointer; }
.dp-item small { color: var(--green-dark); font-weight: bold; }
.dp-item.today { border-color: #9cc7a8; }
.dp-item.on { background: var(--green); color: #fff; border-color: var(--green); }
.dp-item.on small { color: #fff; }
.datebar .d.tt-pick { flex: 1; justify-content: center; font-weight: bold; font-size: 1.15rem; }
@media (max-width: 520px) { .datebar .d.tt-pick { font-size: .95rem; } }
.rd-date.tt-pick { flex: 1; justify-content: center; }
.mo-date .tt-pick { border: 2px solid var(--line); background: #fff; padding: 8px 12px; }

/* 「済N人」ボタンも、ほかのボタンと同じく押しやすい高さに */
.tt-donebtn { min-height: 32px; padding: 4px 10px; }
/* 入力画面の画面名：長い氏名は文字を小さくして切れないように */
@media (max-width: 520px) { .topbar .title .tl0 { font-size: clamp(.78rem, 4.2vw, 1rem); } }

/* ===== 第1回 総点検の統一 ===== */
/* 未・済・出発済・準備などのボタンと「未測定」：どの欄も同じ高さ（36px） */
.chk.tt .tt-prep { height: 36px !important; min-height: 36px !important; }
.chk.tt .tt-st.vs, .chk.tt .tt-vtag { height: 36px; min-height: 36px; box-sizing: border-box; }
/* 「未測定」：その他の欄・デイの欄で同じ幅 */
.chk.tt .tt-row .tt-st.vs { width: 92px !important; }
@media (max-width: 520px) { .chk.tt .tt-row .tt-st.vs { width: 72px !important; } }
/* 居室番号のタグ：どこでも同じ高さ（18px） */
.rroom { height: 18px; line-height: 18px; box-sizing: border-box; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.att-miss { display: grid; place-items: center; width: 100%; height: 100%; font-size: .7rem; color: var(--muted); background: #f1f5f2; }

/* ===== 第1回 総点検の統一（その2） ===== */
/* 見出し・ボタン・タイルの文字は、言葉の途中で折り返しにくく（行の長さをそろえる）。文章は最後の行に1文字だけ残らないように */
.topbar .title, .tile span, .btn, .mini, h2, .chk-h b, .label, label, .day-h, .tt-date b { text-wrap: balance; }
p, .muted, .hint, .body, .rd-p .b, .dl-row .v { text-wrap: pretty; }
/* 確認事項の見出しの高さをそろえる。「過去」のタブも同じ文字の大きさ */
.chk.tt > .chk-h, .chk > .chk-h { min-height: 50px; box-sizing: border-box; }
.chk > .chk-h > b { font-size: 1.06rem; }
@media (max-width: 520px) { .chk > .chk-h > b { font-size: 1rem; } }
/* 一覧の行（入浴・デイ・明日の入浴など）の高さの下限をそろえる */
.chk.tt .tt-list > .tt-row { min-height: 48px; box-sizing: border-box; }
/* 小さいタグ（その他の予定のタグ・再測定など）を同じ形に：高さ22px・角丸・文字12px */
.ot-tag, .ttag { display: inline-flex; align-items: center; height: 22px; box-sizing: border-box; font-size: .75rem; border-radius: 999px; padding: 0 8px; line-height: 1; }
/* PCでもたたんだ欄に「▼ 開く」を出す */
.chk.can-min.min > .chk-h::after { content: '▼ 開く'; }
@media (max-width: 520px) { .chk.can-min.min > .chk-h::after { content: '▼開く'; } }

/* ===== 第2回 総点検の統一 ===== */
/* 入力画面（画面名が「〇〇 様」と「食事」の2段）では、スマホは拠点名を出さずに氏名の場所を広くする（拠点は前の画面で分かる） */
@media (max-width: 520px) { .topbar .in:has(.title .tl0) .tb-site { display: none; } .topbar .in:has(.title .tl0) .title { flex: 1 1 auto; } }
/* 確認事項のカレンダーの予定名は、切らずに折り返して全部出す */
.ot-ctitle { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* まとめて入力の名前の帯は、切らずに2行まで */
.who-band .wb-names { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 画面名「〇〇 様」：氏名だけ縮めて、「様」は必ず見せる */
.topbar .title .tl-sama { display: flex; min-width: 0; white-space: nowrap; }
.topbar .title .tl-sama .tln { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* TOPの「確認事項」の左上：体重・モニタリング・過去のまだの数（オレンジ） */
.navbtn.nb-cnt .nbadge.nb-l { right: auto; left: -4px; background: #e07b1f; }
/* 見出しの「済N人」は、ほかのボタン（準備・未・済）と同じ高さ36px にそろえる */
.tt-donebtn { min-height: 36px; box-sizing: border-box; }
/* 「未測定」ボタンは同じ幅（文字の数で 70〜72px と揺れないように） */
.tt-st.tt-vgo { min-width: 72px; justify-content: center; box-sizing: border-box; }
/* 右メニューの「モニタリング」：PCの幅では1行（スマホは「モニタ／リング」の2行） */
@media (min-width: 900px) { .abtn .sp-br { display: none; } }
/* 記録の一覧：いま直している行は、はっきり分かるように（左に太い線と「直している記録」の印） */
.dl-row.cur { background: #fff4d6; box-shadow: inset 5px 0 0 var(--green); font-weight: bold; }
.dl-now { flex: none; font-size: .72rem; font-weight: bold; color: #fff; background: var(--green); border-radius: 999px; padding: 2px 8px; align-self: center; }
/* 体重：直している行の中で数字を直す */
.dl-row.dl-edit { align-items: center; }
.dl-row.dl-edit .v { flex: none; }
.dl-row.dl-edit #w-kg { width: 5.2em; font-size: 1.15rem; font-weight: bold; text-align: center; padding: 6px 4px; border: 2px solid var(--green); border-radius: 10px; }
.dl-row.dl-edit .dl-kg { font-style: normal; color: var(--muted); margin-right: auto; }
/* 確認事項：測定済のバイタル（マス・行の欄・「測定済」）は押すと直せる。ボタンの見た目の差を消す */
button.tt-vmini, button.tt-cell.done, button.tt-st.ok { font: inherit; color: inherit; cursor: pointer; }
button.tt-cell.done { text-align: center; }
/* TOPの排泄：排便の対応がある方の「-〇日」（オレンジ） */
.rtile .tinfo .bwl { color: #fff; background: #e07b1f; border-radius: 6px; padding: 0 6px; font-weight: bold; margin-left: 4px; }
.rtile .tinfo .bwl:first-child { margin-left: 0; }
/* ===== 見た目のそろえ（確認事項の見出し・札・ボタン） =====
   見出しの右の「未N」（赤い札）と「済N人」（ボタン）を同じ高さ32pxに → 見出しの高さは全部52px */
.chk.tt .chk-h { align-items: center; min-height: 52px; box-sizing: border-box; }
.chk.tt .chk-h .cnt .tt-ng { min-height: 32px; box-sizing: border-box; display: inline-flex; align-items: center; }
.chk.tt .chk-h .tt-donebtn { min-height: 32px; height: 32px; }
/* 「未測定」は、行の中でも見出しの下でも同じ幅 */
.chk .chk-h .cnt > * { min-height: 32px; box-sizing: border-box; display: inline-flex; align-items: center; }
.chk .chk-h { align-items: center; min-height: 52px; box-sizing: border-box; }
/* 「未測定」「測定済」は、どの欄でも同じ幅（スマホ72px・PC92px） */
.chk.tt .tt-vtag.tt-vgo { width: 92px; justify-content: center; }
@media (max-width: 520px) { .chk.tt .ot-row[data-rid] > .tt-st.vs, .chk.tt .tt-row .tt-st.vs, .chk.tt .tt-vtag.tt-vgo { width: 72px !important; justify-content: center; } }
/* 居室番号の札は、どこでも同じ高さ（18px）・同じ角の丸さ */
.rroom { min-height: 18px; line-height: 18px; border-radius: 5px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
/* 管理の端末：だれの端末か（選び直せる） */
.dv-who { display: block; margin-top: 4px; }
.dv-who select { font-size: .9rem; padding: 4px 6px; border-radius: 8px; max-width: 100%; }
/* 確認事項：中止にして、まだ確かめていない方（バイタルの欄） */
.tt-cell.tt-cxcell { border-color: #e2a3a3; }
.tt-cell .tt-cxnote { display: block; font-size: .72rem; color: #c0392b; font-weight: bold; }
.tt-cell .tt-cxnote.ok { color: #2f6b4f; }
/* iPhoneの日付・時刻の欄：枠からはみ出さない（iOSは中の文字の幅で欄が広がるため、決まった幅より広げない） */
input[type=date], input[type=datetime-local], input[type=time], input[type=month] { min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) { /* iPhone・iPadだけ（Androidの日付の印は消さない） */
  input[type=date], input[type=datetime-local], input[type=time], input[type=month] { -webkit-appearance: none; appearance: none; }
}
/* 画面の上の題名：決めた所（「様の」「を」などのあと）だけで折り返す。入りきらないときだけ、どこでも折り返す */
.topbar .title { word-break: keep-all; overflow-wrap: anywhere; }
/* 利用者情報・利用者情報を直す：縦を詰めて見やすく（この2つの画面だけ） */
#app[data-view="rinfo"] h2, #app[data-view="redit"] h2 { font-size: 1rem; margin: 14px 0 6px; }
#app[data-view="rinfo"] .h2row { margin: 14px 0 6px; }
#app[data-view="rinfo"] .info .k, #app[data-view="rinfo"] .info .v { padding: 7px 10px; line-height: 1.45; }
#app[data-view="rinfo"] .info .k { width: 30%; font-size: .85rem; }
#app[data-view="rinfo"] .med { padding: 8px 10px; margin-bottom: 6px; }
#app[data-view="rinfo"] .med b { font-size: 1rem; }
#app[data-view="redit"] .field { padding: 8px 12px; margin-bottom: 8px; }
#app[data-view="redit"] .field > label, #app[data-view="redit"] .field > .label { font-size: .9rem; margin-bottom: 4px; }
#app[data-view="redit"] .field .hint { font-size: .78rem; margin-top: 4px; line-height: 1.45; }
#app[data-view="redit"] input[type=text], #app[data-view="redit"] input[type=tel], #app[data-view="redit"] input[type=date], #app[data-view="redit"] select, #app[data-view="redit"] textarea { min-height: 44px; padding: 8px 10px; font-size: 1rem; border-radius: 10px; }
#app[data-view="redit"] .choice { min-height: 40px; padding: 4px 8px; font-size: .92rem; }
#app[data-view="redit"] .choices { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; } /* 介護度などは3列 */
#app[data-view="redit"] .sub-list .entry { padding: 8px; gap: 6px; margin-bottom: 6px; }
/* 1行で入る欄（氏名・ふりがな・居室・生年月日など）は、名前を左・入力を右に並べる */
#app[data-view="redit"] .field:has(> input[type=text]), #app[data-view="redit"] .field:has(> input[type=tel]), #app[data-view="redit"] .field:has(> input[type=date]) { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); align-items: center; column-gap: 10px; }
#app[data-view="redit"] .field:has(> input[type=text]) > label, #app[data-view="redit"] .field:has(> input[type=tel]) > label, #app[data-view="redit"] .field:has(> input[type=date]) > label { margin: 0; font-size: .85rem; line-height: 1.3; }
#app[data-view="redit"] .field:has(> input[type=text]) > :not(label):not(input), #app[data-view="redit"] .field:has(> input[type=tel]) > :not(label):not(input), #app[data-view="redit"] .field:has(> input[type=date]) > :not(label):not(input) { grid-column: 1 / -1; }
/* 確認事項：体重・モニタリングのタブの数はオレンジ（TOPの左上の印と同じ色） */
.tt-tab .nbadge[data-cnt="weight"], .tt-tab .nbadge[data-cnt="mon"] { background: #e07b1f; color: #fff; }
.tt-tab.on .nbadge[data-cnt="weight"], .tt-tab.on .nbadge[data-cnt="mon"] { background: #fff; color: #e07b1f; }
/* 送迎の画面：入力済みかどうか */
.tr-state { margin: 4px 0 8px; padding: 8px 12px; border-radius: 10px; font-weight: bold; font-size: .95rem; }
.tr-state.ok { background: #e8f4ec; color: #1f6b35; }
.tr-state.ng { background: #fdecea; color: #b42318; }
.tr-state svg { width: 1em; height: 1em; vertical-align: -2px; margin-right: 4px; }
/* ヒヤリハット・事故報告書：何人・対象者なし */
.inc-who { display: flex; gap: 10px; align-items: baseline; margin: 2px 0 8px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.inc-who b { flex: none; font-size: .85rem; color: var(--muted); }
.inc-who span { font-weight: bold; }
.inc-who .nw { font-style: normal; white-space: nowrap; }
.inc-none-btn { margin: 0 0 10px; }
.inc-who-l { word-break: keep-all; overflow-wrap: anywhere; }
.hm-bar b { word-break: keep-all; overflow-wrap: anywhere; }
/* 利用者情報の日付：折り返さない（10月22日(木)・今日） */
.rd-date b, .rd-date .tt-dn { white-space: nowrap; flex: none; }
.rd-date { min-width: 0; }
/* 通所型：ご利用の人数（休みは2行目） */
.use-btns #use-cnt { white-space: normal; overflow: visible; text-overflow: clip; text-align: right; line-height: 1.2; }
.use-btns #use-cnt small { display: block; font-size: .75rem; font-weight: normal; }
/* 幅360px未満（320pxの小さいスマホ）：はみ出し・文字切れを防ぐ */
@media (max-width: 359px) {
  .topbar .in { gap: 3px !important; padding-left: 4px !important; padding-right: 4px !important; }
  .topbar .link { padding: 6px 1px; font-size: .8rem; }
  .topbar #tb-reload, .topbar #tb-logout, .topbar #tb-admin.tb-adm { padding: 5px 4px !important; font-size: .74rem !important; min-height: 34px; }
  .topbar .tb-site { max-width: 27% !important; padding: 3px 5px !important; font-size: .7rem !important; }
  .topbar .title { font-size: .95rem; }
  .topbar .nav-ic { width: 44px; }
  .tt-row1, .tt-row2 { display: flex !important; flex-wrap: wrap; }
  .tt-row1 .tt-tab, .tt-row2 .tt-tab { flex: 1 1 auto; min-width: 0; padding: 4px 2px; }
  .tt-date { gap: 4px; }
  .tt-date b { font-size: 1.02rem; white-space: nowrap; }
  .tt-row .tt-name { font-size: .88rem; }
  .tt-st { padding: 3px 4px; font-size: .72rem; }
  .dtpick { gap: 2px; }
  .dtpick select, .field.one-line .dtpick select { font-size: .95rem; }
  .dtpick .gap, .field.one-line .dtpick .gap { width: 4px; }
}
/* AI下書き：作れないときの理由 */
.ai-limit { margin: 8px 0 4px; padding: 8px 12px; border-radius: 10px; background: #fdecea; color: #b42318; font-weight: bold; font-size: .92rem; }
.bm-chk .bm-ng { color: #b42318; }
/* 確認事項「その他」：広い画面では名前の欄を一定の幅にして、札（透析・受診など）を縦一列にそろえる */
@media (min-width: 521px) {
  .chk.tt .ot-row[data-rid] > .tt-name { flex: 0 1 9.5em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chk.tt .ot-row[data-rid] > .ot-what { flex: 1 1 auto; justify-content: flex-start; } /* 狭い列では、名前も札も今までどおり縮む */
}

/* パスワード（数字4桁）の数字ボタン：入力欄を使わない（ブラウザにパスワードを保存させない） */
.pin-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin: 4px 0 14px; min-height: 26px; align-items: center; }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--green); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1rem; color: #fff; }
.pin-empty { color: var(--muted); font-style: normal; font-size: .9rem; }
.pin-dots span.on { background: var(--green); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 0 auto; }
.pin-k { min-height: 58px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 1.55rem; font-weight: bold; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.pin-k:active { background: var(--green-soft); border-color: var(--green); }
.pin-k.sub { font-size: .95rem; color: var(--muted); }
.pin-k:disabled { opacity: .5; }
.ask-err { color: var(--plum); font-weight: bold; min-height: 1.4em; margin: 8px 0 0; text-align: center; }
.kn-list .v { font-size: .9rem; }
.kn-ok { color: var(--green); }
/* スマホ用QRコード（管理） */
.app-qr-img svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 8px auto; }
.app-qr-url { font-size: 1.15rem; font-weight: bold; word-break: break-all; }
.app-qr-steps { margin: 0; padding-left: 1.3em; line-height: 1.9; }
@media print {
  .app-qr-img svg { max-width: 360px; }
  #qr-print { display: none !important; }
}
