/* シフト管理。共通フレーム（tokens / shell）の上に乗せる固有分だけ。 */

/* ===== ヘッダの操作 ===== */
.content__title{font-size:18px;font-weight:700;margin:0}
.sh-nav,.sh-btn{font:inherit;font-size:12.5px;padding:5px 10px;border:1px solid var(--ds-border);
  border-radius:var(--ds-radius-sm);background:var(--ds-surface);color:var(--ds-text);cursor:pointer}
.sh-nav:hover,.sh-btn:hover{background:var(--ds-bg)}
.sh-btn{font-weight:600;border-color:var(--ds-accent);color:var(--ds-accent)}
.content__actions input[type=month]{font:inherit;font-size:12.5px;padding:4px 6px;
  border:1px solid var(--ds-border);border-radius:var(--ds-radius-sm)}
.sh-ck{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;white-space:nowrap}

/* ===== 凡例の帯 ===== */
.sh-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;
  padding:8px 16px;font-size:11.5px;color:var(--ds-text-2);
  border-bottom:1px solid var(--ds-border);background:var(--ds-surface-sunk)}
.sh-bar b{color:var(--ds-text)}
.sh-sub{margin-left:auto;white-space:nowrap}
.sh-sub .ng,.sh-tbl td.ng{color:#b91c1c}
/* 名簿に出ない古い記録。凡例の帯の下に、折り返す知らせとして出す（人数が多くても横にはみ出さない）。
   名前に重ねると中身が出る。display は書かない（hidden で隠すため） */
.sh-stale{padding:6px 16px;font-size:12px;line-height:1.7;white-space:normal;
  color:var(--ds-text);background:#fef3f2;border-bottom:1px solid #fecdca}
.sh-stale .ng{color:#b91c1c}
.sh-stale ul{margin:2px 0 0;padding-left:18px}
.sh-stale .sf-stale-n{text-decoration:underline dotted;cursor:help}
.sh-stale .sf-stale-b{font:inherit;font-size:12px;line-height:1.4;padding:0 6px;margin-left:6px;cursor:pointer}
.sh-empty,.sh-err{padding:28px 16px;text-align:center;color:var(--ds-text-2);font-size:13px}
.sh-err{color:#b91c1c}

/* ===== 月の表 ===== */
.sh-wrap{overflow:auto;max-height:calc(100vh - 160px)}
.sh-tbl{border-collapse:separate;border-spacing:0;font-size:11.5px;background:var(--ds-surface)}
.sh-tbl th,.sh-tbl td{border-right:1px solid var(--ds-border);
  border-bottom:1px solid var(--ds-border);padding:0;text-align:center;white-space:nowrap}
/* 氏名の列と日付の行はスクロールしても残す */
.sh-tbl thead th{position:sticky;top:0;z-index:3;background:var(--ds-surface-sunk);
  padding:3px 0;min-width:34px;font-weight:700;line-height:1.25}
.sh-tbl thead th.nm{left:0;z-index:4}
.sh-tbl th.nm{min-width:124px;text-align:left;padding:4px 10px}
.sh-tbl tbody th.nm{position:sticky;left:0;z-index:2;background:var(--ds-surface);font-weight:600}
.sh-tbl .d{font-size:13px;display:block}
.sh-tbl .y{font-size:9.5px;color:var(--ds-text-2);display:block}
/* 日付の下に、その日の出勤人数 */
.sh-tbl .cnt{display:block;font-size:11px;font-weight:700;color:#12275e;
  border-top:1px solid var(--ds-border);margin-top:2px;padding-top:2px}
.sh-tbl .cnt.zero{color:#c0c5cd;font-weight:500}
.sh-tbl th.nm small{display:block;font-size:9.5px;font-weight:500;color:var(--ds-text-2)}
.sh-tbl th.sat,.sh-tbl td.sat{background:#f0f6ff}
.sh-tbl th.sun,.sh-tbl td.sun{background:#fff2f2}
.sh-tbl th.sat .y{color:#1d5fd0}
.sh-tbl th.sun .y{color:#c0392b}
.sh-tbl thead th.today{outline:2px solid var(--ds-accent);outline-offset:-2px}
.sh-tbl th.sum,.sh-tbl td.sum{position:sticky;right:0;background:var(--ds-surface);min-width:44px;
  font-size:11px;color:var(--ds-text-2);padding:0 6px}

/* セル＝確定の入力。上段が希望、下段が確定 */
.sh-tbl .cell{position:relative;display:block;width:100%;min-width:34px;height:36px;border:0;
  background:transparent;cursor:pointer;padding:0;font:inherit;line-height:1.1}
/* 泊まりOK（右上）とひとことあり（右下）。記号と並べると30px幅に収まらない */
.sh-tbl .cell .mk{position:absolute;right:1px;font-style:normal;line-height:1;pointer-events:none}
.sh-tbl .cell .mk.nt{top:0;font-size:8.5px}
.sh-tbl .cell .mk.mm{bottom:1px;font-size:7px;color:#8a5a12}
.sh-tbl .cell:hover{background:rgba(29,95,208,.08)}
.sh-tbl .cell:focus-visible{outline:2px solid var(--ds-accent);outline-offset:-2px}
.sh-tbl .w{display:block;font-size:11px;height:15px;color:var(--ds-text-2)}
.sh-tbl .w.o{color:#1d6b39}
.sh-tbl .w.t{color:#8a5a12}
.sh-tbl .w.x{color:#b91c1c}
.sh-tbl .f{display:block;font-size:11px;font-weight:700;height:16px}
.sh-tbl .f.work{color:#12275e}
.sh-tbl .f.off{color:#b91c1c}
.sh-tbl td.fx-work{background:#e6f4ea}
.sh-tbl td.fx-off{background:#fde8e8}
.sh-tbl td.sat.fx-work,.sh-tbl td.sun.fx-work{background:#dff0e5}
.sh-tbl td.sat.fx-off,.sh-tbl td.sun.fx-off{background:#fbdcdc}
/* 希望と確定が食い違う日 */
.sh-tbl td.ng{box-shadow:inset 0 0 0 2px #e0a800}

/* 提出状況の表 */
.sh-tbl--list td,.sh-tbl--list th{padding:6px 12px}
.sh-tbl--list td{text-align:right;min-width:52px}

/* ===== 入口ページ ===== */
body.sh-entry{display:flex;align-items:center;justify-content:center;min-height:100dvh;
  background:var(--ds-bg);padding:24px 16px}
.shent{max-width:560px;width:100%;text-align:center}
.shent__logo{display:inline-flex;align-items:center;gap:8px;text-decoration:none;
  color:var(--ds-text);font-weight:700;margin-bottom:20px}
.shent h1{font-size:26px;margin:0 0 6px}
.shent__lead{color:var(--ds-text-2);font-size:14px;margin:0 0 24px}
.shent__cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.shent__card{display:flex;flex-direction:column;align-items:center;gap:6px;
  background:var(--ds-surface);border:1px solid var(--ds-border);border-radius:12px;padding:22px 18px;
  text-decoration:none;color:var(--ds-text);transition:border-color .12s,transform .12s}
.shent__card:hover{border-color:var(--ds-accent);transform:translateY(-2px)}
.shent__mark{width:44px;height:44px;border-radius:11px;background:var(--ds-nav-bg);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:700}
.shent__mark--drv{background:var(--ds-accent)}
.shent__card b{font-size:15px}
.shent__card small{color:var(--ds-text-2);font-size:12px;line-height:1.5}
.shent__go{font-size:12px;color:var(--ds-accent);font-weight:600;margin-top:4px}
.shent__note{color:var(--ds-text-2);font-size:12px;margin-top:22px;line-height:1.7}

/* ===== 1人ぶんの入力（ドライバー名を押して開く。調整さんと同じ並び） ===== */
.sh-tbl tbody th.nm{cursor:pointer}
.sh-tbl tbody th.nm:hover{color:var(--ds-accent);text-decoration:underline}
.sh-one-head{display:flex;align-items:center;gap:14px;padding:10px 16px;
  border-bottom:1px solid var(--ds-border)}
.sh-one-head b{font-size:16px}
.sh-note{margin:0;padding:8px 16px;font-size:12px;color:var(--ds-text-2);line-height:1.7}
.sh-btn--pri{background:var(--ds-accent);border-color:var(--ds-accent);color:#fff}
.sh-btn:disabled{background:#e8eaee;border-color:#e8eaee;color:#9aa1ab;cursor:default}
.tblwrap{overflow:auto;max-height:calc(100vh - 290px);padding:0 16px 16px}
.sheet{border-collapse:separate;border-spacing:0;font-size:13px;max-width:720px}
.sheet td{border-bottom:1px solid var(--ds-border);padding:0;vertical-align:middle}
.sheet tr:last-child td{border-bottom:0}
.sheet .dt{position:sticky;left:0;z-index:2;background:var(--ds-surface);
  padding:8px 12px 8px 0;white-space:nowrap;text-align:left;font-weight:700;min-width:64px}
.sheet tr.sun .dt{color:#c0392b}
.sheet tr.sat .dt{color:#1d5fd0}
.sheet tr.sun{background:#fff6f6}
.sheet tr.sat{background:#f5f9ff}
.sheet tr.today .dt::after{content:'今日';display:inline-block;margin-left:6px;font-size:9.5px;
  font-weight:700;color:#fff;background:var(--ds-accent);border-radius:4px;padding:1px 4px;vertical-align:1px}
.sheet .dt small{display:block;font-size:10.5px;font-weight:500;color:var(--ds-text-2)}
.sheet .pk{display:flex;gap:4px;padding:5px 8px 5px 0}
.sheet .pk button{font:inherit;font-size:14px;font-weight:700;width:38px;height:34px;line-height:1;
  border:1px solid var(--ds-border);border-radius:8px;background:var(--ds-surface);
  color:var(--ds-text-2);cursor:pointer;padding:0}
.sheet .pk button[data-v=o].on{background:#1d6b39;border-color:#1d6b39;color:#fff}
.sheet .pk button[data-v=t].on{background:#b8860b;border-color:#b8860b;color:#fff}
.sheet .pk button[data-v=x].on{background:#b91c1c;border-color:#b91c1c;color:#fff}
.sheet .nt{font:inherit;font-size:14px;width:34px;height:34px;border:1px solid var(--ds-border);
  border-radius:8px;background:var(--ds-surface);cursor:pointer;opacity:.35;padding:0}
.sheet .nt.on{opacity:1;background:#eef3ff;border-color:var(--ds-accent)}
.sheet .nt:disabled{opacity:.15;cursor:default}
.sheet .memo{width:240px;font:inherit;font-size:12.5px;padding:6px 8px;margin:0 8px;
  border:1px solid var(--ds-border);border-radius:8px;background:var(--ds-surface)}
/* 確定（この画面では押して変えられる） */
.sheet .fxb{font:inherit;font-size:12px;font-weight:700;min-width:72px;height:34px;
  border:1px solid var(--ds-border);border-radius:8px;background:var(--ds-surface);
  color:var(--ds-text-2);cursor:pointer}
.sheet .fxb.work{background:#e6f4ea;border-color:#9bd3b0;color:#1d6b39}
.sheet .fxb.off{background:#fde8e8;border-color:#eaa9a9;color:#b91c1c}
.sheet tr.dirty .dt{box-shadow:inset 3px 0 0 var(--ds-accent)}
/* 下に貼りつく保存バー */
.savebar{position:fixed;bottom:0;left:var(--ds-sidebar-w);right:0;z-index:10;display:flex;
  align-items:center;gap:12px;padding:10px 16px;background:var(--ds-surface);
  border-top:1px solid var(--ds-border);box-shadow:0 -2px 10px rgba(16,24,40,.06)}
.savebar #dirty{flex:1;font-size:12.5px;color:var(--ds-text-2)}
.savebar #dirty.on{color:var(--ds-accent);font-weight:700}
.sidebar.collapsed ~ .content .savebar,
body:has(.sidebar.collapsed) .savebar{left:var(--ds-sidebar-w-collapsed)}

/* ===== 反映ボタンと再提出のお願い =====
   依頼のある行だけ2段になって、行の高さがバラバラだった。
   1行に収まる幅を取り、高さも決めて、どの行も同じ高さにする。
   さらに、中央寄せだと依頼の札が付いた行だけ反映が左へずれるので、
   左から並べて、反映ボタンの縦を揃える */
.sh-tbl th.act,.sh-tbl td.act{position:sticky;right:0;background:var(--ds-surface);
  padding:3px 8px;white-space:nowrap;width:132px;min-width:132px;height:32px;
  text-align:left}
.sh-tbl .act-in{display:flex;align-items:center;gap:4px}
.sh-tbl th.sum,.sh-tbl td.sum{right:132px}
.sh-tbl .apply{font:inherit;font-size:11px;font-weight:700;padding:4px 9px;
  border:1px solid var(--ds-accent);border-radius:6px;background:var(--ds-surface);
  color:var(--ds-accent);cursor:pointer}
.sh-tbl .apply:hover{background:var(--ds-accent);color:#fff}
/* 1回押したあと。次に押すと希望の逆になるので、色を変えて知らせる */
.sh-tbl .apply.back{border-color:#b8860b;color:#8a5a12;background:#fff8e6}
.sh-tbl .apply.back:hover{background:#b8860b;color:#fff}
.sh-tbl .askb{display:inline-block;font:inherit;font-size:11px;
  font-weight:700;padding:3px 7px;border:1px solid #b8860b;border-radius:6px;
  background:#fff8e6;color:#8a5a12;cursor:pointer;vertical-align:middle}
.sh-tbl .askb:hover{background:#b8860b;color:#fff}
/* すでに送ってある依頼。色を変えて、押せば送り直せる */
.sh-tbl .askb.on{background:#b8860b;color:#fff}
.sh-tbl .askb.on:hover{background:#8a5a12}
/* お願いの入力 */
.ask-ov{position:fixed;inset:0;z-index:50;background:rgba(16,24,40,.45);
  display:flex;align-items:center;justify-content:center;padding:20px}
.ask-box{background:var(--ds-surface);border-radius:14px;padding:22px;width:min(100%,480px);
  box-shadow:0 20px 50px rgba(16,24,40,.3)}
.ask-box h2{font-size:17px;margin:0 0 8px}
.ask-lead{font-size:13px;color:var(--ds-text-2);margin:0 0 16px;line-height:1.7}
.ask-box label{display:block;font-size:12px;font-weight:700;margin-bottom:5px}
.ask-box textarea{width:100%;font:inherit;font-size:13.5px;padding:9px 11px;
  border:1px solid var(--ds-border);border-radius:9px;background:var(--ds-surface);resize:vertical}
.ask-note{font-size:11.5px;color:var(--ds-text-2);line-height:1.7;margin:8px 0 16px}
.ask-btns{display:flex;justify-content:flex-end;gap:8px}
.ask-btns .sh-btn,.ask-btns .sh-nav{padding:8px 16px;font-size:13px}

/* ===== 1人ぶんの画面：希望と違う日と、送ったお願い ===== */
/* 希望と違う確定が入っている行 */
.sheet tr.ng .dt{box-shadow:inset 3px 0 0 #e0a800}
.sheet tr.dirty.ng .dt{box-shadow:inset 3px 0 0 var(--ds-accent),inset 6px 0 0 #e0a800}
.sheet .fxb.ng{border-color:#e0a800;box-shadow:0 0 0 1px #e0a800 inset}
/* 送ったお願い */
.sh-asked{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 16px 10px;
  padding:10px 13px;background:#fff8e6;border:1px solid #e0c36a;border-radius:10px;font-size:13px}
.sh-asked b{font-size:11.5px;font-weight:700;color:#fff;background:#b8860b;
  border-radius:5px;padding:2px 7px}
.sh-asked span{flex:1;min-width:200px;line-height:1.6}
.sh-asked small{width:100%;font-size:11px;color:var(--ds-text-2)}
.sh-one-head .sh-btn{padding:5px 11px}

/* ===== 1人ぶんの表：列の見出しと、確定・食い違いの出し方 ===== */
.sheet thead th{position:sticky;top:0;z-index:3;background:var(--ds-surface-sunk);
  font-size:11px;font-weight:700;color:var(--ds-text-2);text-align:left;
  padding:6px 8px;border-bottom:1px solid var(--ds-border);white-space:nowrap}
.sheet thead th.dt{left:0;z-index:4}
.sheet thead th.h-fx{text-align:center}
.sheet td.c-fx{padding:0 0 0 10px;white-space:nowrap}
/* 確定（配車担当が決めた日程）は、希望の記号と見分けが付くよう枠で囲う */
.sheet .fxb{min-width:84px}
.sheet .fxb.work{background:#e6f4ea;border-color:#9bd3b0;color:#1d6b39}
.sheet .fxb.off{background:#fde8e8;border-color:#eaa9a9;color:#b91c1c}
/* 食い違う日は、色だけでなく文字でも出す */
.sheet .ngtag{display:inline-block;margin-left:7px;font-size:10px;font-weight:700;
  color:#fff;background:#e0a800;border-radius:5px;padding:2px 6px;vertical-align:2px}
.sheet tr.ng{background:#fffbf0}
.sheet tr.ng.sat,.sheet tr.ng.sun{background:#fff7e8}
.sheet .yet{color:var(--ds-text-2)}

/* グループ（車種・拠点）の選択 */
.sh-grp{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ds-text-2)}
.sh-grp select{font:inherit;font-size:12.5px;padding:4px 7px;
  border:1px solid var(--ds-border);border-radius:7px;background:var(--ds-surface);
  color:var(--ds-text)}
/* シフト一覧の上部：締切。状態を出すだけで、変えるのはモーダルの中 */
.sh-due{font:inherit;font-size:12.5px;font-weight:700;white-space:nowrap;cursor:pointer;
  padding:6px 12px;border:1px solid var(--ds-border);border-radius:8px;
  background:var(--ds-surface);color:var(--ds-text)}
.sh-due:hover{background:var(--ds-surface-sunk)}
.sh-due.closed{border-color:#e4a3a0;background:#fff5f5;color:#b42318}
.sh-due.closed:hover{background:#ffeceb}
/* 締切のモーダルの日付欄 */
#dueD{font:inherit;font-size:15px;width:100%;box-sizing:border-box;padding:9px 10px;
  border:1px solid var(--ds-border);border-radius:8px;background:var(--ds-surface)}
#dueD:disabled{background:var(--ds-surface-sunk);color:var(--ds-text-3)}
/* 名前の下の提出状況 */
.sh-tbl th.nm .wsum{display:block;font-size:9.5px;font-weight:500;color:var(--ds-text-3)}
.sh-tbl th.nm .wsum.ng{color:#b42318;font-weight:700}
/* 提出の締切 */
.sh-tbl--list td .small,.sh-tbl--list td.small{font-size:11px;color:var(--ds-text-3)}
.sh-tbl--list input[type=date]{font:inherit;font-size:13px;padding:4px 7px;
  border:1px solid var(--ds-border);border-radius:7px;background:var(--ds-surface)}
.sh-tbl--list tr.closed th.nm,.sh-tbl--list tr.closed td{background:#fff5f5}
/* 「シフトに出さない」人たち（従業員マスタの「早朝予定」「事故分」など） */
.sh-tbl tr.grp.off th.nm,.sh-tbl tr.grp.off td{color:var(--ds-text-3)}
/* 月の表：グループの小計行と、いちばん下の合計行。
   xlsm の CL・DD・DP・DX・EJ・ES（グループごとの休み）と
   EZ（合計）・BR（出勤数）にあたる */
.sh-tbl tr.grp th.nm,.sh-tbl tr.grp td,
.sh-tbl tr.tot th.nm,.sh-tbl tr.tot td{background:var(--ds-surface-sunk);
  font-size:11px;color:var(--ds-text-2);text-align:center;height:26px;white-space:nowrap}
.sh-tbl tr.grp th.nm,.sh-tbl tr.tot th.nm{text-align:left;font-weight:700;font-size:12px}
.sh-tbl tr.grp th.nm small,.sh-tbl tr.tot th.nm small{display:inline;margin-left:6px;
  font-weight:400}
.sh-tbl tr.grp td b,.sh-tbl tr.tot td b{font-weight:700;color:var(--ds-text)}
.sh-tbl tr.grp td i,.sh-tbl tr.tot td i{font-style:normal;color:var(--ds-text-3)}
.sh-tbl tr.tot th.nm,.sh-tbl tr.tot td{background:#eef2f9;border-top:2px solid var(--ds-border)}

/* 休み希望のボタン（1人ぶんの画面）。押すたびに種類が変わる */
.sheet .wk{font:inherit;font-size:13px;font-weight:700;min-width:104px;min-height:32px;
  padding:5px 10px;border:1px solid var(--ds-border);border-radius:8px;
  background:var(--ds-surface);color:var(--ds-text-3);cursor:pointer}
.sheet .wk.on{color:#fff;border-color:transparent}
.sheet .wk.k-kibou{background:#b42318}
.sheet .wk.k-yuu{background:#1f7a4d}
.sheet .wk.k-toku{background:#8a5a12}
.sheet .wk.k-kousyu{background:#4b5fb5}
.sheet .memo:disabled{background:var(--ds-surface-sunk);color:var(--ds-text-3)}
/* 確定（1人ぶんの画面） */
.sheet .fxs{font:inherit;font-size:13px;padding:5px 7px;min-width:132px;
  border:1px solid var(--ds-border);border-radius:7px;background:var(--ds-surface)}
.sheet .fxs.wish{border-color:#e4a3a0;background:#fff5f5;color:#b42318;font-weight:700}
.sheet .wishtag{display:inline-block;margin-left:7px;font-size:10px;font-weight:700;
  color:#fff;background:#b42318;border-radius:5px;padding:2px 6px;vertical-align:2px}
.sheet .fx.off{font-weight:700}
.sheet .fx.wish{color:#b42318}
/* 月の表：公休の過不足 */
.sh-tbl td.sum{font-size:11px;text-align:center}
.sh-tbl td.sum i{font-style:normal;color:var(--ds-text-3)}
.sh-tbl td.sum.short{color:#b42318;font-weight:700}
.sh-tbl td.sum.over{color:#8a5a12;font-weight:700}
.sh-tbl td.sum.ok{color:#1f7a4d}
/* 月の表：本人の希望どおりに入れた休み＝絶対休み（xlsm の赤い1） */
.sh-tbl .cell .f.wish{color:#b42318;font-weight:800}
.sh-tbl td.wish{background:#fff5f5}
.sh-tbl .mk.yet{color:#b42318;font-weight:800}
/* 日付の下：休み人数／出勤人数 */
.sh-tbl thead th .cnt i{font-style:normal;font-weight:400;color:var(--ds-text-3)}

/* サイドバーの足元（shell.css は境界線しか持っていないので、余白はここで） */
.sidebar__foot{margin-top:auto;padding:12px 16px;font-size:10px;
  color:var(--ds-nav-label);line-height:1.6;white-space:nowrap;overflow:hidden}
.sidebar.collapsed .sidebar__foot{display:none}

/* ヘッダの☰（狭い画面だけ出す）と、サイドバーを閉じるための覆い */
.navbtn{display:none;width:32px;height:32px;flex:0 0 auto;margin-right:2px;
  align-items:center;justify-content:center;border:1px solid var(--ds-border);
  background:var(--ds-surface);border-radius:var(--ds-radius-sm);
  font-size:16px;line-height:1;color:var(--ds-text);cursor:pointer}
.navbtn:hover{background:var(--ds-surface-sunk)}
.navmask{display:none}

/* ヘッダの操作は、狭くなっても1文字ずつ縦に潰さない。
   折り返しが効くのは 900px からで、その少し上（900〜1100pxくらい）だと
   「希望を休みに入れる」が縦書きになっていた */
.content__actions{flex-wrap:wrap;row-gap:6px}
.content__actions > *{flex:0 0 auto;white-space:nowrap}

/* ===== 休みの取り方（固定休 / 変形休）のマスター ===== */
.kt-wrap{overflow:auto;padding:0 16px 24px;max-width:620px}
.kt-tbl{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;
  background:var(--ds-surface)}
.kt-tbl th,.kt-tbl td{border-bottom:1px solid var(--ds-border);padding:5px 8px;
  text-align:left;white-space:nowrap;height:34px}
.kt-tbl thead th{position:sticky;top:0;z-index:2;background:var(--ds-surface-sunk);
  font-size:11.5px;color:var(--ds-text-2);font-weight:700}
.kt-tbl .kt-nm{font-weight:600}
.kt-tbl .kt-grp th{background:var(--ds-surface-sunk);font-size:12px;font-weight:700}
.kt-tbl .kt-grp small{margin-left:8px;font-weight:500;color:var(--ds-text-2);font-size:11px}
.kt-tbl .kt-nm{padding-left:18px}
.kt-tbl .kt-c{text-align:right}
.kt-seg{display:inline-flex;border:1px solid var(--ds-border);border-radius:7px;
  overflow:hidden}
.kt-b{font:inherit;font-size:12px;font-weight:600;padding:4px 12px;border:0;
  background:var(--ds-surface);color:var(--ds-text-2);cursor:pointer}
.kt-b + .kt-b{border-left:1px solid var(--ds-border)}
.kt-b:hover{background:var(--ds-bg)}
.kt-b.on{background:var(--ds-accent);color:#fff}
.kt-b.on:hover{background:var(--ds-accent)}
/* 名前の下の提出状況。固定休の人は「未提出」にしない */
.sh-tbl th.nm .wsum.fx{color:#1f7a4d;font-weight:600}

/* ===== 休みの種類を選ぶ一覧 =====
   セルを押すたびに1つずつ回していたら、「振」を入れるのに9回押すことに
   なっていた。押したらここから選ぶ */
.kpick{position:fixed;z-index:60;min-width:168px;padding:5px;
  background:var(--ds-surface);border:1px solid var(--ds-border);border-radius:10px;
  box-shadow:0 10px 28px rgba(16,24,40,.22)}
.kpick__who{padding:5px 8px 6px;font-size:12px;font-weight:700;
  border-bottom:1px solid var(--ds-border);margin-bottom:4px}
.kpick__who small{display:block;font-size:10.5px;font-weight:500;color:var(--ds-text-2)}
.kpick__hd{padding:2px 8px 4px;font-size:10px;color:var(--ds-text-2)}
.kpick__b{display:flex;align-items:center;gap:8px;width:100%;font:inherit;font-size:12.5px;
  text-align:left;padding:5px 8px;border:0;border-radius:6px;background:none;
  color:var(--ds-text);cursor:pointer}
.kpick__b:hover,.kpick__b:focus-visible{background:var(--ds-bg);outline:none}
.kpick__b:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-accent)}
.kpick__b b{flex:0 0 20px;text-align:center;font-size:13px}
.kpick__b span{color:var(--ds-text-2);font-size:11.5px}
.kpick__b.on{background:var(--ds-accent);color:#fff}
.kpick__b.on span{color:rgba(255,255,255,.85)}
.kpick__sep{height:1px;background:var(--ds-border);margin:4px 0}
.kpick__b--off b{color:var(--ds-text-2)}
.kpick__b--off.on b{color:#fff}

/* ===== 画面が狭いとき ===== */
@media (max-width: 900px){
  /* ヘッダの操作は折り返す */
  .content__header{flex-wrap:wrap;row-gap:6px;height:auto;padding:8px 12px}
  .content__actions{flex-wrap:wrap;row-gap:6px}
  .sh-bar{padding:6px 12px}
  .sh-sub{margin-left:0;white-space:normal}
  .tblwrap{padding:0 12px 12px;max-height:none}
  .sh-wrap{max-height:none}
  .sh-one-head{flex-wrap:wrap;row-gap:6px;padding:8px 12px}
  .sh-note,.sh-asked{margin-left:12px;margin-right:12px}
  /* 保存バーはサイドバーの幅に合わせない（サイドバーが畳まれる） */
  .savebar{left:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  /* ひとことは幅を詰める */
  .sheet .memo{width:auto;min-width:110px;margin:0 6px}
  .sheet .fxb{min-width:72px}
}
@media (max-width: 560px){
  /* 1人ぶんの表は、ひとことを行の下に回して横スクロールを無くす */
  .sheet,.sheet tbody,.sheet tr,.sheet td{display:block;width:auto}
  .sheet thead{display:none}
  .sheet tr{border-bottom:1px solid var(--ds-border);padding:8px 0;position:relative}
  .sheet .dt{position:static;display:inline-block;min-width:58px;padding:0 0 4px}
  .sheet .dt small{display:inline;margin-left:4px}
  .sheet td{border:0;padding:0}
  .sheet .pk{padding:2px 0}
  .sheet .pk button{flex:1;width:auto}
  .sheet .nt{position:absolute;top:6px;right:0}
  .sheet .memo{width:100%;margin:6px 0 0;box-sizing:border-box}
  .sheet td.c-tm{padding:5px 0 0}
  .sheet .tm{width:calc(50% - 14px)}
  .sheet td.c-fx{padding:6px 0 0}
  /* 確定は行いっぱい。「希望と違う」は右にぶら下げると画面からはみ出すので下に置く */
  .sheet .fxb{display:block;width:100%;box-sizing:border-box}
  .sheet .ngtag{margin:5px 0 0}
  .ask-box{padding:16px}
}

/* ===== スマホ幅：サイドバーは引き出しにする =====
   220pxのサイドバーが居座ると375pxの画面で本文が130pxしか残らないため、
   画面の上に重ねて出し入れする。 */
@media (max-width: 767px){
  .navbtn{display:inline-flex}
  /* ☰ と見出しを1行目に、操作は2行目へ（両端寄せのままだと見出しが右端へ飛ぶ） */
  .content__header{justify-content:flex-start;gap:8px}
  .content__actions{flex-basis:100%;margin-left:0}
  .sidebar{position:fixed;top:0;bottom:0;left:0;z-index:60;
    width:var(--ds-sidebar-w);transform:translateX(-100%);
    transition:transform .18s ease-out;box-shadow:0 0 24px rgba(0,0,0,.35)}
  .sidebar.collapsed{width:var(--ds-sidebar-w)}   /* 狭いときは畳まず、丸ごと隠す */
  .sidebar.collapsed .sidebar__item-label,
  .sidebar.collapsed .sidebar__item-badge{display:inline}
  .sidebar.collapsed .sidebar__section-label{opacity:1;height:auto;padding:revert}
  .sidebar.collapsed .sidebar__item{justify-content:flex-start;padding:7px var(--ds-sp-4)}
  .sidebar.collapsed .sidebar__foot{display:block}
  body.nav-open .sidebar{transform:none}
  .navmask{display:block;position:fixed;inset:0;z-index:55;background:rgba(16,24,40,.45)}
  .navmask[hidden]{display:none}
  .content{width:100%}
  .content__title{font-size:var(--ds-fs-lg)}
  .savebar{left:0}
  /* 月の表：貼り付く列が 124+108+44=276px もあり、日付が3日ぶんしか見えない。
     名前を詰め、出勤の合計は貼り付けをやめて、反映ボタンだけ右に残す。 */
  .sh-tbl th.nm{min-width:84px;padding:4px 6px;font-size:12px}
  .sh-tbl th.nm small{font-size:9px}
  .sh-tbl th.sum,.sh-tbl td.sum{position:static;min-width:36px}
  .sh-tbl th.act,.sh-tbl td.act{right:0;width:104px;min-width:104px;padding:3px 4px}
  .sh-tbl td.act .apply{padding:4px 5px}
  .sh-tbl .act-in{gap:2px}
  .sh-tbl .askb{padding:3px 4px}
  .sh-tbl .cell{min-width:30px}
}
/* ---- 会社の休日 ---- */
.cal-conf{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;
  padding:10px 16px;font-size:12.5px;background:var(--ds-surface-sunk);
  border-bottom:1px solid var(--ds-border)}
.cal-conf > span:first-child{font-weight:600}
.cal-w{display:inline-flex;align-items:center;gap:4px;cursor:pointer;white-space:nowrap}
.cal-head{display:flex;align-items:center;gap:10px;padding:10px 16px}
.cal-head b{font-size:15px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:0 16px 20px;
  max-width:760px}
.cal-h{text-align:center;font-size:11.5px;font-weight:600;color:var(--ds-text-2);padding:2px 0}
.cal-h.sun{color:#c0392b}
.cal-h.sat{color:#1d5fd0}
.cal-d{font:inherit;min-height:54px;padding:5px 2px;cursor:pointer;text-align:center;
  background:var(--ds-surface);border:1px solid var(--ds-border);
  border-radius:var(--ds-radius-sm);display:flex;flex-direction:column;gap:2px;
  align-items:center;justify-content:flex-start;color:var(--ds-text)}
.cal-d:hover{border-color:var(--ds-accent)}
.cal-d b{font-size:14px;font-weight:600}
.cal-d small{font-size:9.5px;line-height:1.3;color:var(--ds-text-2);
  overflow:hidden;text-overflow:ellipsis;max-width:100%}
.cal-d.sun b{color:#c0392b}
.cal-d.sat b{color:#1d5fd0}
.cal-d.off{background:#fff2f2;border-color:#f3c9c4}
.cal-d.off small{color:#c0392b}
.cal-d.ov{border-width:2px;border-color:var(--ds-accent)}
.cal-d--pad{visibility:hidden;cursor:default;min-height:0}
/* 会社の休日は、月の表の日付にも色を付ける */
.sh-tbl thead th.coff{background:#ffe9e6}
.sh-tbl thead th.coff .y{color:#c0392b;font-weight:600}
/* 固定休で自動的に休みになっている日（確定はまだ入っていない） */
.sh-tbl .cell .f.auto{color:#b06a60;font-weight:400}
.sheet .fx.auto{color:#b06a60}

@media (max-width:860px){
  .cal-grid{gap:3px;padding:0 12px 16px}
  .cal-d{min-height:46px}
  .cal-d small{display:none}
}
@media (prefers-reduced-motion: reduce){
  .sidebar{transition:none}
}
