/* 服薬（v0.13.50）。入居者の画面（医療・介護タブ）の「服薬」カード、印刷の服薬チェック表、喫食チェック表のグレーのマス。
   画面の色は青緑系にして、入院（黄）・外泊（青）・食事不要の申請（赤）・在所（緑）・配膳（紫）と見分ける。 */
:root{--medication-text:#17655f;--medication-soft:#e6f4f2;--medication-border:#a9d6d0}

/* 入居者の画面の「服薬」カード */
.medication-card .mini-record strong{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.medication-card .badge{margin:0}
.medication-period .medication-state{border:1px solid transparent}
.medication-period.is-current .medication-state{color:var(--medication-text);background:var(--medication-soft);border-color:var(--medication-border);font-weight:700}
.medication-period.is-upcoming .medication-state{color:#285e9c;background:var(--accent-soft)}
.medication-period.is-ended{color:var(--muted)}
.medication-period.is-ended strong{font-size:var(--font-md);font-weight:500}
.medication-slots-text{margin:2px 0;font-weight:700}
.medication-notes{margin:2px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.medication-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.medication-actions button{font-size:var(--font-sm);padding:8px 12px;min-height:38px}
.medication-actions .text-button{min-height:32px;padding:4px 0}
.medication-history{margin-top:6px;border-top:1px solid var(--surface-tint)}
.medication-history summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:var(--link);font-size:var(--font-md)}
.medication-slot-options{display:flex;flex-wrap:wrap;gap:4px 28px}
@media(max-width:700px){.medication-actions button{min-height:44px}}

/* 喫食チェック表（印刷）: 薬のある食事のマスを薄いグレー（2026-10-28 石田さん 案 B）。手書きの ○△× が読める濃さ。 */
.sheet-table td.med-cell{background:#d6d6d6;print-color-adjust:exact;-webkit-print-color-adjust:exact}

/* 服薬チェック表（印刷、A4 縦）。1 行 11mm、15 名で 1 枚。マスに ✓・サイン・小さな印が入る大きさ。
   氏名の欄は、氏名（全角 8 文字＋配膳・入院の印）とメモ（「※ 」＋20 文字）が 1 行ずつ収まる幅。 */
.medication-document .med-table{font-size:9pt}
.medication-document .med-col-room{width:12mm}
.medication-document .med-col-name{width:57mm}
.medication-document .med-table th{padding:1px 2px;text-align:center;font-size:9pt;line-height:1.3;white-space:nowrap}
.medication-document .med-table th small{display:inline;margin-left:4px;font-size:7pt;font-weight:400;color:#000}
.medication-document .med-table tr.med-sub th{font-size:7.5pt;font-weight:600;background:#f5f5f5}
.medication-document .med-table tbody td{height:11mm;padding:1px 4px;line-height:1.2}
.medication-document .med-person{overflow:hidden}
.medication-document .med-name-line{display:flex;align-items:center;gap:4px;min-width:0}
/* 氏名は切らない（長い氏名は折り返す。薬を渡す相手を取り違えないため） */
.medication-document .med-person strong{min-width:0;overflow-wrap:anywhere;font-size:9.5pt}
/* 配膳・入院などの印は氏名の欄の右端（2026-10-28 石田さん） */
.medication-document .med-tags{display:flex;flex:none;gap:3px;margin-left:auto}
.medication-document .med-person small{display:block;font-size:7pt;color:#333;line-height:1.25;white-space:nowrap;overflow:hidden}
.medication-document .med-person small.med-memo{color:#000}
.medication-document .med-tag{display:inline-block;padding:0 3px;border:1px solid #000;border-radius:2px;font-size:7pt;font-weight:700;line-height:1.4;vertical-align:1px;white-space:nowrap}
.medication-document td.med-none{text-align:center;color:#777;background:repeating-linear-gradient(135deg,#f1f1f1 0 3px,#e2e2e2 3px 4px);print-color-adjust:exact;-webkit-print-color-adjust:exact}
.medication-document td.struck{background:linear-gradient(to top right,transparent calc(50% - .6px),#333 calc(50% - .6px),#333 calc(50% + .6px),transparent calc(50% + .6px));print-color-adjust:exact;-webkit-print-color-adjust:exact}
.medication-document .med-notes{margin-top:4mm;break-inside:avoid}
.medication-document .med-notes h3{margin:0 0 3px;padding:1px 6px;border-left:3px solid #333;font-size:9.5pt}
.medication-document .med-col-note-name{width:32mm}
.medication-document .med-col-slot{width:16mm}
.medication-document .med-col-writer{width:20mm}
.medication-document .med-note-table th{padding:1px 4px;text-align:center;font-size:8.5pt}
.medication-document .med-note-table td{height:7mm}
.medication-document .med-empty{margin:6mm 0;font-size:10pt}
