/* シフト・清掃表。色は受領した試作品 index.html の CSS（文字#12304d・罫線#cedde8/#d1e0eb・見出し行#e9f2f8・主ボタン#0755ed・ゲージ色）を引き継ぐ。style属性は使わない（CSP）。 */
.board,.bd-zoom,.bd-dialog{--bd-line:#cedde8;--bd-grid:#d1e0eb;--bd-ink:#12304d;--bd-sub:#597286;--bd-main:#0755ed;--bd-btn:#143854;--bd-btn-line:#b6cddd;--bd-soft:#f7fbff;--bd-head:#e9f2f8;--bd-namecell:#f6faff;--bd-normal:#8be3ce;--bd-newbie:#ffe08a;--bd-trainee:#cfb6ff;--hour-w:40px}
.board{display:flex;flex-direction:column;gap:14px;color:var(--bd-ink)}
.board .hidden,.bd-dialog .hidden{display:none!important}
.k-normal{--k:var(--bd-normal)}.k-newbie{--k:var(--bd-newbie)}.k-trainee{--k:var(--bd-trainee)}

/* 日付ナビ */
.bd-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.bd-daynav{display:flex;align-items:center;gap:6px;min-width:0}
.bd-daynav button{min-width:44px;min-height:44px;border:1px solid var(--bd-btn-line);border-radius:7px;background:#fff;color:var(--bd-btn);font-size:1.3rem;font-weight:900}
.bd-datebox{position:relative;display:flex;align-items:center;min-height:44px;padding:0 12px;border:1px solid var(--bd-line);border-radius:10px;background:#fff;font-weight:900;min-width:0}
.bd-date-text{white-space:nowrap}
.bd-date{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.bd-head-actions{display:flex;gap:6px}
.bd-head-actions button,.bd-section-head button,.bd-print summary{min-height:44px}

/* セクション */
.bd-section{background:#fff;border:1px solid var(--bd-line);border-radius:12px;padding:12px;min-width:0}
.bd-section>h3,.bd-section-head h3{margin:0;font-size:1.1rem;color:var(--bd-ink)}
.bd-section-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.bd-section-head h3{min-width:0;flex:1 1 auto}.bd-section-head>button,.bd-section-head>details{flex:none}
.bd-draft{margin:6px 0;padding:6px 10px;border-radius:8px;background:#fff4dc;color:#7a4b00;font-size:.82rem;font-weight:800}
.bd-note{font-size:.8rem;margin:2px 0 8px}
.error-inline{margin:6px 0;padding:8px 10px;border-radius:8px;background:#fde8e8;color:#8a1f1f;font-weight:800;font-size:.85rem}
.bd-me{white-space:nowrap;margin-left:4px;padding:0 6px;border-radius:999px;background:#dcecf3;color:#17546c;font-size:.68rem;font-style:normal;font-weight:900}

/* 凡例・区分の色 */
.bd-legend{display:flex;flex-wrap:wrap;gap:4px 12px;list-style:none;margin:4px 0 8px;padding:0;font-size:.78rem;color:var(--bd-sub)}
.bd-legend li{display:flex;align-items:center;gap:5px}
.bd-sw{display:inline-block;width:22px;height:10px;border-radius:5px;background:var(--k,#aaa)}
.bd-legend .k-normal .bd-sw{background:var(--bd-normal)}.bd-legend .k-newbie .bd-sw{background:var(--bd-newbie)}.bd-legend .k-trainee .bd-sw{background:var(--bd-trainee)}
.bd-sw-break{background:repeating-linear-gradient(135deg,#ff8fb8 0 3px,#fff 3px 6px);border:1px dashed #c0306a}

/* 時間軸の表（横向き・PC・拡大表示）。固定するのは名前だけ */
.bd-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--bd-line);border-radius:10px}
.bd-timeline{--name-w:92px;--end-w:56px;min-width:calc(var(--name-w) + var(--hour-w)*14 + var(--end-w));font-size:.78rem;background:#fff}
.bd-tl-head,.bd-tl-row{display:grid;grid-template-columns:var(--name-w) calc(var(--hour-w)*14) var(--end-w);align-items:stretch}
.bd-tl-row{border-top:1px solid var(--bd-grid);min-height:32px}
.bd-tl-head{background:var(--bd-head);font-weight:900;font-size:.7rem;color:var(--bd-sub)}
.bd-tl-name,.bd-tl-end{display:flex;align-items:center;gap:3px;padding:2px 6px;min-width:0}
.bd-tl-name{position:sticky;left:0;z-index:3;background:var(--bd-namecell);border-right:1px solid var(--bd-line);font-weight:850;flex-wrap:wrap;line-height:1.15;overflow-wrap:anywhere}
.bd-tl-head .bd-tl-name{background:var(--bd-head)}
.bd-tl-head .bd-tl-end{padding:2px 3px;white-space:nowrap} /* 「Kết thúc」なども1行に収め、見出しの行を高くしない */
.bd-tl-end{justify-content:flex-end;font-variant-numeric:tabular-nums}
.bd-tl-track{position:relative;display:block;min-height:30px;background-image:linear-gradient(to right,#b6cfdf 1px,transparent 1px),linear-gradient(to right,#e4edf5 1px,transparent 1px);background-size:var(--hour-w) 100%,calc(var(--hour-w)/4) 100%}
.bd-tl-ruler{min-height:20px}
.bd-tl-ruler b{position:absolute;top:3px;transform:translateX(2px);font-size:.66rem}
.bd-tl-ruler b.bd-tl-last{transform:translateX(-100%) translateX(-2px)}
.bd-bar{position:absolute;top:3px;height:24px;border-radius:4px;background:var(--k,var(--bd-normal));min-width:3px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #ffffff80;color:#073246;font-style:normal}
.bd-bar span{font-size:.62rem;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.bd-break{position:absolute;top:3px;height:24px;box-sizing:border-box;background:repeating-linear-gradient(135deg,#ff8fb8 0 5px,#fff 5px 10px);border:1px dashed #c0306a;border-radius:3px;z-index:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.bd-break-txt{display:block;padding:0;border-radius:2px;background:rgba(255,255,255,.88);color:#8a1f4d;font-size:.58rem;font-weight:900;line-height:1.15;white-space:nowrap;font-style:normal}
.bd-break-bare .bd-break-txt{visibility:hidden}
/* スマホ縦向きの表（拡大表示）では「休憩」を縦書き。横向き・PCは横書き */
@media (max-width:720px) and (orientation:portrait){.bd-break-txt{writing-mode:vertical-rl;padding:0;line-height:1;font-size:.56rem}}
.bd-break-note{padding:4px 8px;border-top:1px solid var(--bd-grid);background:#fff0f6;color:#8a1f4d;font-size:.7rem;font-weight:800;line-height:1.4;position:sticky;left:0}
.bd-tl-row .bd-bar{z-index:1}
.bd-duty{display:inline-block;margin-left:2px;padding:0 5px;border-radius:5px;background:#e6f4ea;color:#1f6b3a;font-size:.64rem;font-weight:900}
.bd-klass{margin-left:3px;padding:0 5px;border-radius:5px;color:#073246;background:var(--k);font-size:.64rem;font-weight:900}

/* 縦向きスマホ：出勤者と勤務時間の一覧 */
.bd-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:4px}
.bd-li{display:grid;grid-template-columns:1fr auto;gap:0 8px;align-items:center;padding:6px 10px;border:1px solid var(--bd-line);border-radius:8px;background:#fff}
.bd-li-name{font-weight:850;font-size:.9rem;overflow-wrap:anywhere;min-width:0}
.bd-li-time{font-size:.9rem;font-variant-numeric:tabular-nums;white-space:nowrap;padding:5px 8px;border-radius:4px;background:var(--k,var(--bd-normal));color:#073246}
.bd-li-break{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin-top:3px;font-size:.78rem;color:#8a1f4d}.bd-li-break b{font-weight:900}.bd-li-brk-t{padding:1px 7px;border-radius:5px;background:#ffe3ee;border:1px dashed #c0306a;font-variant-numeric:tabular-nums;font-weight:800}
/* 縦向きの狭い画面では一覧、それ以外は時間軸の表 */
.bd-only-narrow{display:none}
@media (max-width:720px) and (orientation:portrait){.bd-only-wide{display:none}.bd-only-narrow{display:block}}

/* 印刷／拡大の入口 */
.bd-print{position:relative}
.bd-print summary{list-style:none;display:flex;align-items:center;padding:0 14px;border:1px solid var(--bd-line);border-radius:10px;background:#fff;font-weight:900;color:var(--bd-ink);cursor:pointer}
.bd-print summary::-webkit-details-marker{display:none}
.bd-print-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:20;display:flex;flex-direction:column;gap:4px;min-width:230px;padding:8px;border:1px solid var(--bd-line);border-radius:10px;background:#fff;box-shadow:0 6px 18px rgba(23,52,73,.18)}
.bd-print-menu button{min-height:44px;border:1px solid var(--bd-line);border-radius:8px;background:#fff;font-weight:850;text-align:left;padding:0 10px}
.bd-zoom-open{padding:0 14px;font-weight:900;white-space:nowrap}

/* 管理者の設定（折りたたみ） */
.bd-settings{margin-top:12px;border:1px solid var(--bd-line);border-radius:10px;background:var(--bd-soft);padding:0 10px}
.bd-settings>summary{min-height:44px;display:flex;align-items:center;font-weight:900;color:var(--bd-main);cursor:pointer}
.bd-settings[open]{padding-bottom:10px}
.bd-set-table{width:100%;border-collapse:collapse;font-size:.85rem}
.bd-set-table th{text-align:left;font-size:.72rem;color:var(--bd-sub);padding:4px}
.bd-set-table td{padding:3px 4px;border-top:1px solid #dbe6ea}
.bd-set-table select{width:100%;min-height:40px}
.bd-chips{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:6px 0;padding:0}
.bd-chips li{display:flex;align-items:center;gap:2px;border:1px solid var(--bd-btn-line);border-radius:999px;background:#fff;padding:0 4px 0 12px;min-height:36px;font-weight:800}
.bd-chips button{border:0;background:transparent;color:#802629;font-size:1.1rem;font-weight:900;min-width:36px;min-height:36px}
.bd-add{display:flex;gap:6px}
.bd-add input{flex:1;min-width:0;min-height:44px;padding:0 10px;border:1px solid var(--bd-btn-line);border-radius:8px}
.bd-add button{min-height:44px;padding:0 16px;border:0;border-radius:8px;background:var(--bd-main);color:#fff;font-weight:900}
.bd-chips .bd-trs{margin-left:6px;padding:0 6px;border-radius:5px;background:#e8eef1;color:#526879;font-size:.7rem;font-weight:800;white-space:nowrap}.bd-chips .bd-trs.ok{background:#e3f4ec;color:#1f6b45}
.bd-chips .bd-tr-run{min-width:0;padding:0 8px;color:var(--bd-main);font-size:.78rem}
.bd-tr-choice{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:6px;font-size:.82rem;font-weight:700}.bd-tr-choice label{display:flex;align-items:center;gap:4px;min-height:36px}
.bd-notice{margin:6px 0;padding:8px 10px;border-radius:8px;background:#e8f1fd;color:#123d7a;font-weight:800;font-size:.85rem}

/* 清掃担当表：狭い画面はカード、広い画面は3列（名前｜指定｜自主） */
.bd-people{display:flex;flex-direction:column;gap:10px}
.bd-person{display:grid;grid-template-columns:1fr;gap:8px;padding:10px;border:1px solid var(--bd-line);border-radius:10px;background:#fbfdfe}
.bd-person.me{border-color:#8fc0d3;background:#f1f8fb}
.bd-pname{margin:0;font-size:.98rem;overflow-wrap:anywhere}
.bd-slot{display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:#fff;border:1px solid #e2ebee;min-width:0}
.bd-slot-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.bd-slot-label{font-size:.72rem;color:#fff;background:var(--bd-main);border-radius:5px;padding:1px 7px}
.bd-slot.s2 .bd-slot-label{background:#4d8c6a}
.bd-area{font-weight:900;font-size:1rem;overflow-wrap:anywhere}
.bd-area.none{color:#7b8d98;font-weight:700;font-size:.88rem}
.bd-pick{display:flex;flex-direction:column;gap:6px}
.bd-pick select{min-height:44px;width:100%}
.bd-unset{min-height:44px;padding:0 14px;border:1px solid var(--bd-btn-line);border-radius:10px;background:#fff;color:var(--bd-btn);font-weight:800;align-self:flex-start}
.bd-other{display:flex;gap:6px}.bd-other input{flex:1;min-width:0;min-height:44px;padding:0 10px;border:1px solid var(--bd-btn-line);border-radius:8px}.bd-other button{min-height:44px;padding:0 14px;border:0;border-radius:8px;background:var(--bd-main);color:#fff;font-weight:900}
.bd-status{display:flex;flex-wrap:wrap;gap:4px}
.bd-chip{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:999px;font-size:.74rem;font-weight:850;background:#eef2f4;color:#4a5f6c;border:1px solid #d5dfe4}
.bd-chip small{font-size:.68rem;opacity:.8}
.bd-chip.ph-photo{background:#e0f4ee;color:#16664a;border-color:#a9dcc9}
.bd-chip.ph-missed{background:#fff1d9;color:#8a5200;border-color:#f0cf93}
.bd-chip.ph-none{background:#eef2f4;color:#4a5f6c}
.bd-chip.ok{background:#e0f4ee;color:#16664a;border-color:#a9dcc9}
.bd-open{min-height:44px;border:1px solid var(--bd-btn-line);border-radius:7px;background:#fff;color:var(--bd-btn);font-weight:900}
@media (min-width:900px),(min-width:700px) and (orientation:landscape){
 .bd-person{grid-template-columns:150px 1fr 1fr;align-items:start}
 .bd-pname{padding-top:6px}
}

/* 報告の詳細 */
.bd-dialog{border:0;border-radius:14px;padding:0;width:min(640px,100vw - 16px);max-height:calc(100dvh - 16px);color:var(--bd-ink)}
.bd-dialog::backdrop,.bd-lightbox::backdrop{background:rgba(10,30,45,.55)}
.bd-dialog-in{padding:14px;display:flex;flex-direction:column;gap:12px;--bd-line:#cedde8;--bd-main:#0755ed;--bd-sub:#597286}
.bd-dialog-head{display:flex;justify-content:space-between;gap:8px}
.bd-dialog-head h3{margin:0;font-size:1.05rem;overflow-wrap:anywhere}.bd-dialog-head h3 small{font-size:.85rem;color:var(--bd-sub)}
.bd-dialog-head p{margin:2px 0 0}
.bd-x{min-width:44px;min-height:44px;border:1px solid var(--bd-line);border-radius:10px;background:#fff;font-size:1.4rem;line-height:1}
.bd-dialog h4{margin:0 0 6px;font-size:.95rem;display:flex;align-items:center;gap:8px}
.bd-phase{border:1px solid var(--bd-line);border-radius:10px;padding:10px}
.bd-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.bd-photo{position:relative}
.bd-thumb{display:block;width:100%;aspect-ratio:1;padding:0;border:1px solid var(--bd-line);border-radius:8px;overflow:hidden;background:var(--bd-head)}
.bd-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.bd-photo-del{position:absolute;top:2px;right:2px;min-width:32px;min-height:32px;border:0;border-radius:50%;background:rgba(23,52,73,.82);color:#fff;font-size:1.1rem}
.bd-nophoto{grid-column:1/-1;margin:4px 0}
.bd-phase-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.bd-phase-actions>button,.bd-file{min-height:48px;padding:0 14px;border:1px solid var(--bd-btn-line);border-radius:7px;background:#fff;color:var(--bd-btn);font-weight:900;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;position:relative}
.bd-file input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.bd-file.disabled{opacity:.45;pointer-events:none}
.bd-upload{margin:8px 0 0;font-size:.85rem;font-weight:800;color:#8a5200}
.bd-comment textarea{width:100%;min-height:96px;padding:8px;border:1px solid var(--bd-btn-line);border-radius:8px;resize:vertical}
.bd-comment-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.bd-comment-row button{min-height:44px;padding:0 16px;border:0;border-radius:8px;background:var(--bd-main);color:#fff;font-weight:900}
.bd-comment-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bd-soft,#eef4f6);padding:8px 10px;border-radius:8px}
.bd-saved{color:#16664a;font-weight:800;font-size:.82rem}
.bd-react-row{display:flex;flex-wrap:wrap;gap:8px}.bd-react-row select{flex:1;min-width:160px;min-height:44px}.bd-react-row button{min-height:44px}
.bd-react-sum{margin:6px 0 0;font-size:.95rem}
.bd-react-list{list-style:none;margin:6px 0 0;padding:0;border:1px solid var(--bd-line);border-radius:8px}
.bd-react-list li{display:flex;justify-content:space-between;gap:8px;padding:7px 10px;border-top:1px solid var(--bd-grid)}.bd-react-list li:first-child{border-top:0}
.bd-confirm{border:1px solid var(--bd-line);border-radius:10px;padding:10px;background:#f6fafb}
.bd-confirm button{min-height:44px;padding:0 16px;border-radius:7px;border:1px solid var(--bd-btn-line);background:#fff;color:var(--bd-btn);font-weight:900}
.bd-confirm button.primary{background:var(--bd-main);color:#fff}
.bd-confirmed{margin:0 0 6px;font-weight:900;color:#16664a}
.bd-dialog-foot{display:flex;justify-content:flex-end}
.bd-dialog-foot button{min-height:44px;padding:0 20px}
.bd-lightbox{border:0;padding:8px;background:transparent;max-width:100vw;max-height:100dvh;width:100vw;height:100dvh;display:none;align-items:center;justify-content:center}
.bd-lightbox[open]{display:flex}
.bd-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;background:#000}
.bd-lightbox .bd-x{position:absolute;top:10px;right:10px;background:#fff}

/* キャスト用の拡大表示：全画面。倍率と位置は cleaning.js が transform で設定する */
body.bd-zoom-on{overflow:hidden}
.bd-zoom{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;background:#dce5ec;color:#12304d;touch-action:none} /* 拡大画面のどこでブラウザ自体のピンチ拡大が起きても、アプリの倍率とずれないようにする。ボタンのタップは通常どおり */
.bd-zoom-bar{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px;background:#06334b;color:#fff}
.bd-zoom-bar button{min-height:48px;padding:0 16px;border:1px solid rgba(255,255,255,.7);border-radius:10px;background:transparent;color:#fff;font-weight:900;white-space:nowrap}
.bd-zoom-bar .bd-zoom-back{background:#fff;color:#06334b;border-color:#fff;font-size:1.02rem;margin-right:auto} /* 左上・白地の大きいボタン：右上のアプリ／ブラウザの×とは別物と分かる */
.bd-zoom-bar .bd-zoom-title{flex:1;text-align:center;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-zoom-stage{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;background:#fff}
.bd-zoom-content{position:absolute;left:0;top:0;transform-origin:0 0;width:max-content;padding:6px;background:#fff;--hour-w:44px}
.bd-zoom-content .bd-legend{font-size:.85rem}
.bd-zoom-content .bd-tl-name{position:static}
.bd-zoom-help{flex:none;margin:0;padding:4px 10px;font-size:.74rem;text-align:center;color:#597286;background:#e9f2f8}

/* 「希望の結果・履歴」は、シフト・清掃表の下の補助表示 */
.legacy-wrap{margin-top:14px}
.legacy-wrap.collapsible{border:1px solid var(--bd-line,#d8e5e9);border-radius:10px;padding:0 10px;background:#fff}
.legacy-wrap>summary{min-height:44px;display:flex;align-items:center;font-weight:900;color:var(--bd-ink);cursor:pointer}
.legacy-wrap[open].collapsible{padding-bottom:10px}

/* 印刷（管理者のPDF発行・印刷）。ブラウザの印刷画面からPDF保存もできる */
@media print{
 body.bd-printing header,body.bd-printing .tabs,body.bd-printing .language-bar,body.bd-printing #date-nav,body.bd-printing #compact-nav,body.bd-printing .bd-head,body.bd-printing .bd-settings,body.bd-printing .bd-print,body.bd-printing .bd-open,body.bd-printing .bd-pick,body.bd-printing #legend-panel,body.bd-printing #placement-alert-banner{display:none!important}
 body.bd-printing .bd-only-wide{display:block!important}body.bd-printing .bd-only-narrow{display:none!important}
 body.bd-printing .bd-scroll{overflow:visible;border:0}
 body.bd-print-shift #bd-clean{display:none!important}
 body.bd-printing .bd-section{border:0;padding:0}
 body.bd-printing .bd-person{break-inside:avoid;grid-template-columns:140px 1fr 1fr}
 body.bd-printing .bd-tl-name{position:static}
 body.bd-printing *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* 受領試作品に合わせた補足：状態表示・出勤人数・清掃担当表の見出し行 */
.bd-live{display:inline-block;margin-left:8px;white-space:nowrap;padding:3px 10px;border-radius:30px;background:#d6f5e9;color:#06704b;font-size:.75rem;font-weight:800}
.bd-count{margin-left:6px;font-size:.78rem;font-weight:700;color:var(--bd-sub)}
.bd-people-head{display:none}
@media (min-width:900px),(min-width:700px) and (orientation:landscape){.bd-people-head{display:grid;grid-template-columns:150px 1fr 1fr;gap:8px;padding:8px 10px;border-radius:10px;background:var(--bd-head);font-size:.78rem;font-weight:900;color:var(--bd-sub)}.bd-people-head small{font-weight:700;margin-left:4px}}

/* 拡大表示の上部バー：幅の狭い画面では日付を別の行に出し、省略（…）しない */
@media (max-width:600px){.bd-zoom-bar .bd-zoom-title{order:3;flex:1 0 100%;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3;padding-bottom:2px}}

/* 名前の行は1行に保つ：業務担当・区分・「あなた」は名前の横の小さな札。長い名前は「…」で省略し、行の高さを増やさない */
.bd-tl-name,.bd-li-name{display:flex;align-items:center;flex-wrap:nowrap;gap:3px;min-width:0;overflow:hidden}
.bd-nm{flex:0 1 auto;min-width:2.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-tl-name .bd-me,.bd-li-name .bd-me,.bd-tl-name .bd-duty,.bd-li-name .bd-duty,.bd-li-name .bd-klass{flex:none;margin-left:0;line-height:1.35}
.bd-duty{max-width:6.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
/* 狭い縦画面の管理者設定：名前を1段目、区分・業務担当を2段目に並べ、選択欄の文字を切らない */
@media (max-width:600px){
 .bd-set-table thead tr,.bd-set-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:0 6px}
 .bd-set-table th:first-child{display:none}
 .bd-set-table td:first-child{grid-column:1/-1;border-top:1px solid #dbe6ea;padding-top:6px;font-weight:800;overflow-wrap:anywhere}
 .bd-set-table td:not(:first-child){border-top:0}
 .bd-print-menu{position:static;margin-top:4px;min-width:0;box-shadow:none}
}
/* 時間軸の表（横向き・PC・拡大表示）：名前列が狭いので、名前を1段目に全幅で、札（あなた・業務担当）を2段目に小さく出す。行の高さ（32px）は変えない */
.bd-tl-row .bd-tl-name{flex-wrap:wrap;align-content:center;row-gap:1px;line-height:1.1}
.bd-tl-row .bd-tl-name .bd-nm{flex:1 0 100%}
.bd-tl-row .bd-tl-name .bd-me,.bd-tl-row .bd-tl-name .bd-duty{font-size:.58rem;line-height:1.2;padding:0 4px}
.bd-tl-row .bd-tl-name .bd-duty{max-width:calc(100% - 2px)}
.bd-tl-row .bd-tl-name .bd-me+.bd-duty{max-width:calc(100% - 3.6em)}
/* 省略された名前：タップ・Enter・Spaceで全文の吹き出し（cleaning.js の markCut / toggleName） */
.bd-nm.is-cut{cursor:pointer;text-decoration:underline dotted #8aa3b3;text-underline-offset:3px}
.bd-duty.is-cut{cursor:pointer}
.bd-nm.is-cut:focus-visible,.bd-duty.is-cut:focus-visible{outline:2px solid var(--bd-main,#0755ed);outline-offset:1px;border-radius:3px}
.bd-fullname{position:fixed;z-index:1100;max-width:min(90vw,360px);padding:8px 12px;border-radius:8px;background:#12304d;color:#fff;font-weight:800;font-size:.95rem;line-height:1.35;overflow-wrap:anywhere;box-shadow:0 6px 18px rgba(23,52,73,.28)}
@media print{.bd-fullname{display:none}}
/* スマホ横（高さ500px以下）で「シフト・清掃表」を開いているときだけ：上部を詰めて勤務一覧を早く見せる。
   ヘッダーの余白を減らし、表示言語をタブの横へ、タブと同じ「シフト・清掃表」の見出し（#date-nav）は画面からは消して読み上げ用に残す。ボタンの高さ44pxと日付の全文は維持 */
@media (orientation:landscape) and (max-height:500px){
 body:has(#board-view:not(.hidden)) header,body:has(#board-slot:not(.hidden)) header{padding-top:5px;padding-bottom:5px;margin-bottom:0;flex-wrap:nowrap}
 body:has(#board-view:not(.hidden)) header .account,body:has(#board-slot:not(.hidden)) header .account{width:auto;justify-content:flex-end;white-space:nowrap}
 body:has(#board-view:not(.hidden)) .shell,body:has(#board-slot:not(.hidden)) .shell{padding-top:6px}
 body:has(#board-view:not(.hidden)) #app-shell,body:has(#board-slot:not(.hidden)) #app-shell{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:center}
 body:has(#board-view:not(.hidden)) #app-shell>*,body:has(#board-slot:not(.hidden)) #app-shell>*{grid-column:1/-1}
 body:has(#board-view:not(.hidden)) #app-shell>.tabs,body:has(#board-slot:not(.hidden)) #app-shell>.tabs{grid-column:1;margin-bottom:6px;padding:3px}
 body:has(#board-view:not(.hidden)) #app-shell>.language-bar,body:has(#board-slot:not(.hidden)) #app-shell>.language-bar{grid-column:2;grid-row:1;margin:0 0 6px}
 body:has(#board-view:not(.hidden)) .language-bar label,body:has(#board-slot:not(.hidden)) .language-bar label,
 body:has(#board-view:not(.hidden)) #date-nav,body:has(#board-slot:not(.hidden)) #date-nav{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 body:has(#board-view:not(.hidden)) .language-bar select,body:has(#board-slot:not(.hidden)) .language-bar select{max-width:130px}
 body:has(#board-view:not(.hidden)) header strong,body:has(#board-slot:not(.hidden)) header strong{font-size:.95rem}
 #board-admin-slot{padding:6px}
 .board{gap:6px}
 .bd-section{padding:6px 8px}
 .bd-section-head{margin-bottom:2px}
 .bd-legend{margin:0 0 4px;font-size:.75rem}
 .bd-draft{margin:2px 0}
 body:has(#board-slot:not(.hidden)) #mine-view>.panel{padding:6px 8px}
 body:has(#board-slot:not(.hidden)) .mine-tabs{padding:2px;margin-bottom:6px}
 /* タブ（上部・マイシフト内）は1段の横スクロールにする。文字は縮めず折り返さず、選択中のタブは app.js の keepActiveTabs で見える位置へ */
 body:has(#board-view:not(.hidden)) #app-shell>.tabs,body:has(#board-slot:not(.hidden)) #app-shell>.tabs,body:has(#board-slot:not(.hidden)) .mine-tabs{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;position:relative}
 body:has(#board-view:not(.hidden)) #app-shell>.tabs button,body:has(#board-slot:not(.hidden)) #app-shell>.tabs button,body:has(#board-slot:not(.hidden)) .mine-tabs button{flex:1 0 auto;white-space:nowrap;padding:0 14px;min-height:44px;line-height:1.2}
 body:has(#board-view:not(.hidden)) .language-bar select,body:has(#board-slot:not(.hidden)) .language-bar select{min-height:44px;line-height:1.2}
 .bd-head button,.bd-datebox{line-height:1.2}
 /* 時間軸の名前列：札（あなた・業務担当）は2段目に1行で並べ、入りきらない業務担当は「…」（行の高さを増やさない） */
 .bd-tl-row .bd-tl-name .bd-duty{flex:1 1 0;min-width:1.6em;max-width:max-content}
 /* 見出しとボタンは1行に置き、長い見出し（ミャンマー語など）は見出しの中で折り返す */
 .bd-section-head{flex-wrap:nowrap}
 .bd-section-head h3{line-height:1.2}
 /* 余白をさらに数pxずつ詰める（ボタンの高さ44pxは維持） */
 body:has(#board-view:not(.hidden)) header,body:has(#board-slot:not(.hidden)) header{padding-top:3px;padding-bottom:3px}
 body:has(#board-view:not(.hidden)) .shell,body:has(#board-slot:not(.hidden)) .shell{padding-top:4px}
 body:has(#board-view:not(.hidden)) #app-shell>.tabs,body:has(#board-slot:not(.hidden)) #app-shell>.tabs{padding:2px;margin-bottom:4px}
 body:has(#board-view:not(.hidden)) #app-shell>.language-bar,body:has(#board-slot:not(.hidden)) #app-shell>.language-bar{margin-bottom:4px}
 body:has(#board-slot:not(.hidden)) #mine-view>.panel{padding:4px 6px}
 body:has(#board-slot:not(.hidden)) .mine-tabs{margin-bottom:4px}
 #board-admin-slot{padding:4px 6px}
 .board{gap:4px}
 .bd-section{padding:4px 6px}
 /* 凡例：横幅に余裕があれば見出しの行へ、なければ表の下へ（表の上の1行を空ける） */
 #bd-shift{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px}
 #bd-shift>*{flex:1 0 100%;min-width:0;order:3}
 #bd-shift>.bd-section-head{order:0}
 #bd-shift>.bd-legend{order:4;margin:4px 0 0}
 #bd-shift>.bd-settings{order:5}
}
@media (orientation:landscape) and (max-height:500px) and (min-width:760px){
 #bd-shift>.bd-section-head{flex:1 1 auto}
 #bd-shift>.bd-legend{flex:0 1 auto;order:1;margin:0}
}
}
.bd-history{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;padding:8px;border:1px dashed var(--bd-line);border-radius:8px;background:#f6f8f9}
.bd-history-title{font-size:.85rem;color:#456}
.bd-hist-item{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.bd-hist-item small{color:#567}

/* 作業項目の写真の設定・報告の状態・完了（シフト・作業表） */
.bd-mode{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:.72rem;font-weight:800;line-height:1.5;vertical-align:middle;background:#eef3f5;color:#35505e;border:1px solid #cfdbe1}
.bd-mode.m-both{background:#fff3e0;color:#7a4a00;border-color:#f1c27d}.bd-mode.m-after{background:#fff8e1;color:#6a5600;border-color:#ecd68a}.bd-mode.m-optional{background:#eef5ef;color:#2f5d3a;border-color:#bcd9c2}
.bd-chip.st-none{background:#eef1f3;color:#4b5a63}.bd-chip.st-progress{background:#e7f0fb;color:#1f4f85}.bd-chip.st-photo{background:#e2f4e8;color:#14673a;font-weight:800}.bd-chip.st-done{background:#edf5e1;color:#4b6a12;font-weight:800}.bd-chip.st-missed{background:#fde8e6;color:#9b2c24;font-weight:800}
.bd-req{display:inline-block;margin:0 4px;padding:0 6px;border-radius:6px;font-size:.72rem;font-weight:800}.bd-req.req{background:#fde8e6;color:#9b2c24}.bd-req.opt{background:#eef1f3;color:#4b5a63}
.bd-head-status{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0 0}
.bd-complete{margin:12px 0;padding:10px 12px;border:1px solid #cfe3d6;border-radius:10px;background:#f4faf6}.bd-complete h4{margin:0 0 4px}.bd-complete .bd-mode-hint{margin:2px 0 6px}.bd-complete button{min-height:44px;padding:0 18px;font-size:1rem;font-weight:800}.bd-complete button[disabled]{opacity:.55}.bd-done{margin:6px 0;font-weight:800;color:#14673a}
.bd-area-list{list-style:none;margin:6px 0;padding:0;display:flex;flex-direction:column;gap:6px}.bd-area-item{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:6px 8px;border:1px solid #d9e3e8;border-radius:8px;background:#fff}.bd-area-name{font-weight:800;min-width:6em}.bd-mode-select{min-height:40px;max-width:100%;flex:1 1 11em}
.bd-custom-mode{margin:10px 0 4px;padding-top:8px;border-top:1px solid var(--line,#ddd)}.bd-custom-mode .subtle{margin:2px 0 6px}
.bd-mode-choice{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;margin:8px 0}.bd-mode-choice label{display:inline-flex;align-items:center;gap:5px;min-height:36px}.bd-mode-title{margin-right:4px}
/* 作業項目の行：上の丸い札（.bd-chips li）の形・余白を受け継がず、狭い画面でも枠の中に収める */
.bd-chips li.bd-area-item{border-radius:8px;padding:6px 8px;min-width:0;max-width:100%;font-weight:inherit}.bd-area-item .bd-mode-select{min-width:0;flex:1 1 11em;width:100%}
/* 選択欄の文字が切れても、いまの写真の条件が開かなくても全文で分かるよう、選択欄の下に全文を出す */
.bd-mode-now{display:block;flex:1 0 100%;margin-top:2px;font-size:.82rem;font-weight:700;color:#3a5568;line-height:1.35;overflow-wrap:anywhere}
.bd-custom-mode .bd-mode-now{margin-top:4px}

/* 管理者による報告の削除・閲覧範囲 */
.bd-chip.st-short{background:#fff0d6;color:#8a4b00;font-weight:800;box-shadow:inset 0 0 0 1px #e8b765}
.bd-danger{min-height:44px;padding:8px 14px;border:1px solid #b8392f;border-radius:10px;background:#fff;color:#a02a21;font-weight:700;cursor:pointer}
.bd-danger:hover{background:#fde8e6}
.bd-admin-tools{border-top:1px dashed var(--bd-line);padding-top:10px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.bd-private-note{margin:4px 0;padding:6px 10px;border-radius:8px;background:#fff7e0;color:#7a5200;font-size:13px;font-weight:700}
.bd-hidden-note{padding:8px 10px;border-radius:8px;background:#eef2f5;color:var(--bd-sub)}
.bd-ask .bd-dialog-in{gap:10px}.bd-ask-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}
.bd-ask .bd-dialog-foot{gap:10px;flex-wrap:wrap}.bd-ask .bd-dialog-foot button{min-height:44px;flex:1 1 140px}
.bd-vis-select{max-width:100%}

.bd-area-item .bd-vis-select{min-width:0;flex:1 1 11em;width:100%}
.bd-vis-now{display:block;flex:1 0 100%;font-size:.82rem;font-weight:700;color:#3a5568;line-height:1.35;overflow-wrap:anywhere}
.bd-custom-vis{margin-top:10px;display:flex;flex-direction:column;gap:6px}.bd-custom-vis .bd-mode-select{flex:0 0 auto;align-self:flex-start}

.bd-unpublished{margin:6px 0;padding:10px 12px;border-radius:8px;background:#ffe9c2;border:2px solid #c47b12;color:#5c3500;font-size:.9rem;line-height:1.6}.bd-unpublished b{display:block}
.bd-stale-list{list-style:none;margin:6px 0;padding:0;display:grid;gap:6px}.bd-stale-list li{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 10px;border:1px dashed #c47b12;border-radius:8px;background:#fff9ee}.bd-stale-list button{min-height:44px;min-width:72px;padding:10px 18px;font-size:1rem;margin-left:auto}.bd-stale-list li{gap:10px}.bd-stale-list small{flex:1 1 12em;color:#5c3500}
