/* ASPI HR BASE · production UI refresh, 2026-09-07.
   Font licenses are included beside the local font files. */
@font-face {
  font-family: "Noto Sans JP";
  src: url("fonts/NotoSansJP-variable.woff") format("woff");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Josefin Sans";
  src: url("fonts/JosefinSans-variable.woff") format("woff");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-024F;
}
* { box-sizing: border-box; margin: 0; }
:root {
  /* ASPI CRM準拠: 黒サイドバー×白コンテンツ×ブランド黄 */
  --bg: #ffffff; --surface: #ffffff; --elevated: #ffffff; --card2: #f6f7f3;
  --line: #e5e7df; --line2: #cdd1c5;
  /* text3=補助文字の下限。UI部品基準3:1(SC1.4.11)を割らない明度に留める */
  --txt: #22251f; --sub: #62685c; --text3: #707767;
  --brand: #f4df36; --brand-dark: #8b761d;
  --action: #f6edb8; --action-hover: #f0e49e;
  --attention: #fcfbed; --attention-hover: #f8f5df;
  --selected: #f0f2eb; --table-head: #f3f5ef;
  --font-ui: "Josefin Sans", "Futura", "Gotham", "Noto Sans JP", "A1 Gothic", "Hiragino Sans", sans-serif;
  /* warn/dangerは淡色バッジ地(#fdf6d8/#fdf3f2)の上でも本文基準4.5:1を保つ濃さ */
  --accent: #46617e; --ok: #336849; --warn: #88601e; --danger: #ad453d;
  --hover: #f4f6f0;
  /* 申請・届出の区分色(NAK-1340)。白地で 申請 6.42:1・届出 6.53:1 */
  --kind-apply: var(--accent); --kind-notice: var(--ok); --kind-form: var(--txt);
  /* 種類のタイルの罫・受付前のアイコン(NAK-1340)。白地 3.46:1・受付前の地(--table-head)3.15:1・hover地 3.18:1 */
  --line3: #868c7f;
  --side-bg: #22251f;
  /* フラット化(2026-08-18): 角丸は全廃(浮遊レイヤーのみ--shadowで浮く) */
  --r: 0; --shadow: 0 12px 32px rgba(30, 28, 18, .14);
}
body {
  font-family: var(--font-ui);
  background: var(--bg); color: var(--txt);
  font-size: 14px; font-weight: 500; line-height: 1.65; letter-spacing: 0;
  /* 日本語は文節で折る。指定が無いと「駅マッピン/グ」のように語中で切れる */
  word-break: auto-phrase; line-break: strict; text-wrap: pretty;
}
/* 見出しは詰める(本文の1.65を継いで間延びさせない) */
h1, h2, h3 { line-height: 1.35; font-weight: 700; }
button, input, select, textarea { font-family: inherit; }
button { touch-action: manipulation; }
button, a, input, select, textarea { outline-offset: 3px; }
.shell { display: flex; min-height: 100vh; }
table { font-variant-numeric: tabular-nums; }

/* --- サイドバー(黒) --- */
.side {
  width: 218px; flex: none; background: var(--side-bg);
  display: flex; flex-direction: column; padding: 28px 15px 20px; position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.logo { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-weight: 700; font-size: 16px; letter-spacing: .03em; padding: 2px 10px 22px; color: #fff; }
.logo-img { width: 26px; height: 26px; object-fit: contain; filter: invert(1); mix-blend-mode: screen; opacity: .95; }
.logo em { font-style: normal; color: var(--brand); }
.logo span { flex-basis: 100%; font-size: 10px; font-weight: 600; color: #7d7b74; letter-spacing: .22em; }
#nav { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
#nav button {
  display: flex; align-items: center; gap: 9px;
  text-align: left; min-height: 43px; padding: 11px 14px; border: 0; background: none; border-radius: 0;
  font: inherit; font-weight: 600; color: #c8cec0; cursor: pointer; transition: background .12s, color .12s;
}
#nav button svg { flex: none; color: #a0a995; }
#nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
#nav button.on { background: #383e31; color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
#nav button.on svg { color: var(--brand); }
#nav button:focus-visible { outline-color: var(--brand); outline-offset: -3px; }
/* 一般ユーザー(非editor)には申請タブだけを見せる。bootstrap完了(editor判定)前から既定で
   絞ってあるので、全タブが一瞬見えてから隠れる事故が起きない(2026-08-26) */
#nav.gated button:not([data-view="apply"]) { display: none; }
.side-foot { margin-top: auto; font-size: 12px; color: #a6ae9c; padding: 18px 12px 0; border-top: 1px solid #3b4234; }

/* --- ヘッダー --- */
.main { flex: 1; min-width: 0; padding: 0 34px 44px; background: var(--surface); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; padding: 26px 0 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .13em; color: var(--sub); margin-bottom: 7px; }
.top h1 { font-size: 26px; font-weight: 700; letter-spacing: -.04em; position: relative; padding-bottom: 0; }
.top h1::after { content: none; }
.viewer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--sub); }
select, input[type="text"], input[type="email"], input[type="date"], input[type="month"], input[type="number"] {
  font: inherit; padding: 7px 11px; border: 1px solid var(--line2); border-radius: 0;
  background: #fff; color: var(--txt); outline: none; transition: border-color .12s, box-shadow .12s;
}
select:focus, input:focus { border-color: #727b63; box-shadow: 0 0 0 2px #edf0e6; }
input:disabled, select:disabled { background: var(--card2); color: var(--text3); }
input::placeholder { color: var(--text3); }
:focus-visible { outline: 2px solid var(--txt); outline-offset: 3px; }

/* --- ツールバー(クイックフィルタ列) --- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
/* 操作ボタンは行が折り返しても右端に残す(絞り込みの列に混ざると一次アクションを見失う) */
.tb-act { display: flex; gap: 8px; margin-left: auto; }
.seg { display: inline-flex; gap: 18px; }
.seg + .seg { margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--line2); }
.seg button { border: 0; background: none; font: inherit; font-weight: 600; padding: 6px 0; color: var(--sub); cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; white-space: nowrap; }
.seg button:hover { color: var(--txt); }
.seg button.on { background: none; color: var(--txt); font-weight: 700; box-shadow: inset 0 -2px 0 #141414; }
.seg-n { font-style: normal; font-size: 11px; margin-left: 6px; padding: 0 4px; background: none; color: var(--sub); }
.seg button.on .seg-n { background: none; color: var(--txt); }
.count { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 12px; margin: 0 0 8px 4px; }
.fchips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 0; background: var(--selected); border: 1px solid var(--line); color: var(--sub); }
.fchip-remove { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: -6px; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--sub); cursor: pointer; }
.fchip-remove:hover { background: var(--line); color: var(--txt); }
.fclear { border: 0; background: none; font: inherit; font-size: 12px; color: var(--sub); cursor: pointer; text-decoration: underline; }
.fclear:hover { color: var(--txt); }
.fcount { margin-left: auto; color: var(--sub); font-size: 12px; }
/* 数字と単位の大きさの差(NAK-2049・中邑が調整デモで決めた値)。数字=.nu-n・単位=.nu-u */
.nu-n { font-size: inherit; font-weight: inherit; }
.fcount .nu-n { font-size: 14px; }
.fcount .nu-u { font-size: 10px; }
.perm-n .nu-n { font-size: 12.5px; }
.perm-n .nu-u { font-size: 10px; }
.store-card-body dd .nu-n { font-size: 19.5px; }
.store-card-body dd .nu-u { font-size: 14px; }
.d-sec .nu-n { font-size: 14px; }
.d-sec .nu-u { font-size: 11px; }
.cm-total > .nu-n { font-size: 20.5px; }
.cm-total > .nu-u { font-size: 14px; margin-left: .5px; }
.cm-sub2 .nu-n { font-size: 15.5px; }
.cm-sub2 .nu-u { font-size: 11.5px; }
td.at-n .nu-n { font-size: 13.5px; }
td.at-n .nu-u { font-size: 11px; }

/* --- カード・テーブル(淡い灰色ヘッダー) ---
   フラット化: 面は白1枚に乗る「区画」。箱(枠+地色+角丸+影)をやめ、
   セクションは淡い灰色の見出しと細い罫線で区切る。 */
.card { background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
table { width: 100%; border-collapse: collapse; }
table.fixed { table-layout: fixed; }
th { text-align: left; font-size: 12px; color: var(--sub); font-weight: 600; padding: 12px 15px; background: var(--table-head); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
td { padding: 12px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.55; }
td.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .1s; }
tbody tr.click:hover { background: var(--hover); }
/* 役職の視覚コード(2026-08-18中邑指示): 面塗りは却下(帯がカードに見える)。
   欄外の左端3pxマーカーだけで示す。状態色(退職/未配属)はこの下で再宣言し優先させる=信号は職位より強い */
tbody tr:has(.chip.r経営陣) td:first-child { box-shadow: inset 3px 0 0 #7c3aed; }
tbody tr:has(.chip.rUnlimited) td:first-child { box-shadow: inset 3px 0 0 #64748b; }
tbody tr.t-off { background: #f5f6f2; color: var(--sub); }
tbody tr.t-off td:first-child { box-shadow: inset 3px 0 0 #c3c8bc; }
tbody tr.t-un { background: var(--attention); }
tbody tr.t-un td:first-child { box-shadow: none; }
.ths { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: inherit; cursor: pointer; padding: 0; }
.ths i { font-style: normal; font-size: 9px; opacity: .5; margin-left: 3px; }
.ths.on i { opacity: 1; color: var(--txt); }
.thf { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; border: 0; background: none; color: var(--sub); cursor: pointer; margin-left: 3px; width: 28px; height: 30px; padding: 0; border-radius: 0; }
.thf:hover { background: #e5e9de; color: var(--txt); }
.thf.on { background: #dfe5d7; color: var(--txt); }

/* --- 人・チップ・バッジ --- */
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 証明写真: 縁取りなしで面に直接置く角形(丸アバター廃止) */
.ava { width: 24px; height: 24px; border-radius: 0; flex: none; background: #d8d5cd; color: #55534d; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; position: relative; overflow: hidden; box-shadow: none; }
.ava > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
/* チップ/バッジ: 枠・地色なし。色は正方形スウォッチ(.dot)だけが持つ */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 0; background: none; border: 0; color: var(--txt); white-space: nowrap; }
td .chip { padding: 0; gap: 4px; }
.chip .dot { width: 6px; height: 6px; border-radius: 0; background: #a3a19a; flex: none; }
/* 役職ドット: 経営陣(#7c3aed・行マーカーと共有=固定アンカー)のHSB(彩度83%・明度58%)に
   他の役職も揃え、色相だけで役職を分ける(2026-08-26最終審査#2・彩度明度バラバラを解消)。
   ブランド黄は「要対応」シグナル専用なので、オーナーだけは黄との衝突を避け茶のまま例外にする */
.chip.r経営陣 .dot { background: #7c3aed; }
.chip.r本部 .dot, .chip.r本部SD .dot { background: #453bed; }
.chip.rオーナー .dot { background: #8a6d1f; }
.chip.r店長 .dot { background: #3b73ed; }
.chip.rリーダー .dot { background: #3b8bed; }
.chip.rMIGIUDE .dot { background: #3beddd; }
.chip.rエヴァンジェリスト .dot { background: #ed3b8a; }
.chip.r研修生 .dot { background: #3bb0ed; }
.chip.rUnlimited .dot { background: #141414; }
.chip .x { margin-left: 4px; cursor: pointer; opacity: .6; }
.chip .x:hover { opacity: 1; }
/* 店長 = 唯一の反転タグ(黒地白字+「店」マーク)。ひと目で店長と分かる */
.chip.r店長 { background: #141414; padding: 1px 8px 1px 2px; color: #fff; font-weight: 700; }
.chip.r店長 .dot { display: none; }
.chip.r店長::before {
  content: '店'; display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; background: #fff; color: #141414; font-size: 9.5px; font-weight: 800;
}
.badge { font-size: 11px; font-weight: 600; padding: 0; background: none; border: 0; color: var(--sub); white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.off { color: var(--danger); }
.badge.info { color: var(--accent); }
.sub { color: var(--sub); font-size: 12px; }

/* --- ボタン --- 一次アクション(黄の矩形ブロック)=1画面1個。それ以外は枠なしテキスト(hover下線) */
.btn { font: inherit; font-weight: 600; padding: 7px 4px; border-radius: 0; border: 0; background: none; color: var(--txt); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; transition: background .12s, color .12s, border-color .12s; }
.btn:hover { background: none; text-decoration: underline; text-underline-offset: 4px; }
.btn.primary { background: var(--action); border-color: transparent; color: #353114; font-weight: 700; border-radius: 0; padding: 8px 18px; }
.btn.primary:hover { background: var(--action-hover); text-decoration: none; }
.btn.danger { color: var(--danger); border: 0; background: none; }
.btn.sm { padding: 4px 11px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 0; border: 0; background: none; color: var(--sub); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--txt); }
/* 行内の編集はアンダーライン付きリンク扱い */
td .btn { color: var(--sub); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* --- ドロワー・モーダル --- */
.overlay { position: fixed; inset: 0; z-index: 40; }
.overlay.hidden, .hidden { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(20, 18, 10, .4); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 450px; max-width: 92vw; background: #fff; box-shadow: var(--shadow); padding: 24px 26px; overflow-y: auto; animation: drIn .2s ease both; }
@keyframes drIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal { position: absolute; top: 14vh; left: 50%; transform: translateX(-50%); width: 410px; max-width: 92vw; background: #fff; border-radius: 0; padding: 24px 26px; box-shadow: var(--shadow); animation: mdIn .18s ease both; }
@keyframes mdIn { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.modal .btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.modal .btn.danger:hover { filter: brightness(1.08); }
.ov-close { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--text3); cursor: pointer; padding: 4px; width: 36px; height: 36px; z-index: 2; }
.ov-close:hover { color: var(--txt); }
.d-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.d-head .ava { width: 46px; height: 46px; font-size: 18px; }
.d-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.035em; }
.d-store { display: flex; align-items: center; gap: 8px; margin: 10px 0 18px; }
.field { margin-bottom: 17px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 5px; }
/* 必須は濃色+「*」で区別。任意側は現状(--sub)のまま=触らない(2026-08-26 P0) */
.field.req label { color: var(--txt); }
.field.req label::after { content: '*'; margin-left: 3px; }
.field input, .field select { width: 100%; }
.d-sec { font-size: 12px; font-weight: 600; color: var(--sub); margin: 26px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.d-foot { display: flex; gap: 8px; margin-top: 24px; }
.d-foot .grow { flex: 1; }
.hist { font-size: 12px; color: var(--sub); list-style: none; }
.hist li { margin-bottom: 3px; }
/* 人の編集(NAK-1246): ドロワーは読むだけの台帳。変更は行の右の操作から確認画面で */
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger tr { border-bottom: 1px solid var(--line); }
.ledger th, .ledger td { padding: 9px 0; border: 0; vertical-align: baseline; text-align: left; }
.ledger th { width: 104px; font-size: 12px; font-weight: 700; color: var(--sub); padding-right: 12px; white-space: nowrap; background: none; position: static; }
.chg-when .cm-check:focus-within { outline: none; }
.ledger td.act { width: 1%; white-space: nowrap; text-align: right; padding-left: 12px; }
.ledger td.act .btn { text-decoration: underline; text-underline-offset: 3px; }
.ledger-sub { margin-left: 10px; }
.ledger.plans td:nth-child(2) { color: var(--accent); }
.d-sec.sec-act { display: flex; align-items: baseline; justify-content: space-between; }
.d-sec.sec-act .btn { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chg-who { display: flex; gap: 10px; align-items: baseline; margin: 0 0 16px; font-size: 14px; }
.chg-pair { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 14px; align-items: start; }
.chg-now { min-height: 39px; display: flex; align-items: center; margin: 0; font-size: 14px; font-weight: 700; }
.chg-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 39px; }
.chg-month input { max-width: 170px; }
.chg-sum { border-top: 2px solid var(--txt); padding-top: 10px; margin: 6px 0 4px; font-size: 13px; }
.chg-sum-head { font-weight: 700; }
.chg-sum ul { margin: 6px 0 0; padding-left: 18px; }
.chg-sum li { margin-bottom: 2px; }
.chg-sum .warn-text { margin: 0; }
@media (max-width: 560px) { .chg-pair { grid-template-columns: 1fr; } }
.trial-note { font-size: 13px; color: var(--warn); margin: 4px 0 12px; }
.warn-text { font-size: 13px; color: var(--danger); margin: 4px 0 12px; }

/* --- 顔ビュー ---
   タイル群は1pxの罫線グリッド=1枚の表として同一サーフェスに乗せる。
   外枠は持たず、各タイル自身の上辺+左辺のヘアラインだけで区切る */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0; }
.person-card {
  background: #fff; border: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2);
  border-radius: 0; padding: 15px 10px 12px; font: inherit; color: var(--txt); text-align: center; cursor: pointer; transition: outline-color .12s;
}
.person-card:hover { box-shadow: none; outline: 2px solid #141414; outline-offset: -2px; }
/* 役職の視覚コード: 経営陣/Unlimitedは左端3pxマーカー(面塗りは却下=帯がカードに見える) */
.person-card:has(.chip.r経営陣) { box-shadow: inset 3px 0 0 #7c3aed; }
.person-card:has(.chip.rUnlimited) { box-shadow: inset 3px 0 0 #64748b; }
/* 未配属・退職はリスト側と同じ配色・同じ部品で示す(色だけ揃えて形が違うのも反復崩れ)。
   状態色はヘアラインより優先=枠を外して面塗りだけで示す */
.person-card.t-un { background: var(--attention); border: 0; }
.person-card.t-off { background: #f5f6f2; border: 0; }
.person-card.t-off .pc-name { display: block; color: var(--sub); }
.ava-lg { width: 64px; height: 64px; font-size: 24px; margin: 0 auto 8px; display: flex; }
.pc-name { display: block; font-weight: 700; font-size: 14px; letter-spacing: -.035em; }
.pc-store { display: block; color: var(--sub); font-size: 11px; margin: 1px 0 6px; }
.pc-chips { justify-content: center; max-height: 20px; overflow: hidden; }

/* --- 退職手続き・連携 --- */
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0; align-items: start; }
/* グリッド内の区切りは細い罫線へ揃える。 */
.ob-grid > .card { border: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
.ob-head { display: flex; align-items: center; gap: 8px; }
.ob-head h3 { font-size: 14px; font-weight: 700; }
.ob-tasks { list-style: none; margin-top: 4px; }
.ob-tasks li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ob-tasks li:last-child { border-bottom: 0; }
.ob-task { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ob-task.done span { color: var(--text3); text-decoration: line-through; }
.ob-task input { accent-color: #141414; width: 15px; height: 15px; }
.empty { text-align: center; padding: 80px 0; color: var(--sub); }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; }
.link-card { background: #fff; border: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); border-radius: 0; padding: 18px; }
.link-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.link-card p { color: var(--sub); font-size: 12px; margin-bottom: 12px; }

/* --- 検索・コンボ・ポップオーバー --- */
.search { position: relative; display: inline-block; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
/* 検索は絞り込みと同じ高さの角形入力。 */
.search input { border: 1px solid var(--line2); background: var(--surface); padding-left: 37px; border-radius: 0; width: 300px; max-width: 100%; }
.search input:focus { box-shadow: 0 0 0 2px #edf0e6; border-color: #727b63; }
.combo { position: relative; display: inline-block; width: 170px; vertical-align: middle; }
.combo input[type="text"] { width: 100%; padding-right: 26px; cursor: pointer; }
.combo input[type="text"]:not(:disabled):focus { cursor: text; }
.combo .caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; font-size: 9px; }
.combo-list { position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line2); border-radius: 0; box-shadow: var(--shadow); z-index: 80; }
.combo-item { padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.combo-item:hover, .combo-item.hl { background: var(--selected); }
.combo-item.sel { font-weight: 700; color: var(--txt); }
.combo-group { padding: 8px 12px 3px; font-size: 11px; font-weight: 700; color: var(--text3); }
.combo-empty { padding: 10px 12px; color: var(--sub); }
.field .combo { width: 100%; }
.pop { position: fixed; z-index: 90; width: 240px; background: #fff; border: 1px solid var(--line2); border-radius: 0; box-shadow: var(--shadow); overflow: hidden; }
.pop-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.pop-head .search { flex: 1; }
.pop-head .search input { width: 100%; padding-top: 5px; padding-bottom: 5px; }
.pop-list { max-height: 300px; overflow-y: auto; padding: 4px; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 0; cursor: pointer; font-size: 13px; }
.pop-item:hover { background: var(--hover); }
.pop-item input { accent-color: #141414; width: 14px; height: 14px; }
.pop-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item i { font-style: normal; font-size: 11px; color: var(--text3); }
.pop-item.act { font-weight: 600; }
.pop-item.v-new { color: #7a6300; border-top: 1px solid var(--line); border-radius: 0; margin-top: 2px; }
.v-del { cursor: pointer; opacity: .5; padding: 0 3px; }
.v-del:hover { opacity: 1; color: var(--danger); }
.hcard { position: fixed; z-index: 95; width: 280px; background: #fff; border: 1px solid var(--line2); border-radius: 0; box-shadow: var(--shadow); padding: 12px 14px; pointer-events: none; animation: mdInHc .12s ease both; }
@keyframes mdInHc { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hc-top { display: flex; align-items: center; gap: 10px; }
.hc-ava { width: 44px; height: 44px; font-size: 17px; }
.hc-name { font-weight: 700; font-size: 14px; }
.hc-top .badge { margin-left: auto; }
.hc-meta { margin-top: 8px; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- メンバー詳細(フルページ) --- */
.pp-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 16px; }
.pp-ava { width: 72px; height: 72px; font-size: 28px; }
.pp-name { font-size: 22px; letter-spacing: -.035em; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pp-tabs { margin-bottom: 14px; }
.pp-card { padding: 6px 0; max-width: 640px; }
.pp-row { display: flex; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.pp-row:last-child { border-bottom: 0; }
.pp-row span { width: 120px; flex: none; color: var(--sub); font-size: 12px; }
.pp-row b { font-weight: 600; }
.pp-act { margin-top: 14px; }

/* --- トースト --- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #141414; color: #fff; font-weight: 600; padding: 11px 20px; border-radius: 0; z-index: 60; box-shadow: var(--shadow); }

/* --- ログイン(ヒーロー写真・黄アクセント) --- */
#login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-card { position: relative; text-align: center; padding: 54px 70px; border-radius: 0; background: rgba(12,12,10,.55); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: lgIn .5s ease both; }
@keyframes lgIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lg-logo { width: 44px; height: 44px; object-fit: contain; filter: invert(1); mix-blend-mode: screen; opacity: .95; margin-bottom: 14px; }
.lg-mark { font-size: 42px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.lg-mark span { color: var(--brand); }
.lg-tag { color: rgba(255,255,255,.66); font-size: 13px; letter-spacing: .14em; margin: 10px 0 32px; }
.lg-btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: #141200; background: var(--brand); border-radius: 0; padding: 13px 30px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.45); }

/* 日付入力(カレンダー+手入力) */
.datef { position: relative; }
.datef > input { width: 100%; }
.datef-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: 244px; padding: 10px; background: var(--card, #fff); border: 1px solid var(--line2); border-radius: 0; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.datef-pop.hidden { display: none; }
.datef-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.datef-head b { font-size: 12.5px; font-weight: 700; }
.datef-head button { border: 0; background: none; font: inherit; font-size: 15px; line-height: 1; padding: 2px 8px; color: var(--sub); cursor: pointer; border-radius: 0; }
.datef-head button:hover { background: #f2f0ea; color: var(--txt); }
.datef-wd, .datef-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datef-wd span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--sub); padding: 2px 0; }
.datef-wd .sun, .datef-grid button.sun { color: #d64550; }
.datef-wd .sat, .datef-grid button.sat { color: #2563eb; }
.datef-grid button { border: 1px solid transparent; background: none; font: inherit; font-size: 12px; padding: 5px 0; border-radius: 0; cursor: pointer; }
.datef-grid button:hover { background: #f2f0ea; }
.datef-grid button.now { border-color: #b9b6ae; }
.datef-grid button.on { background: #141414; border-color: #141414; color: #fff; }
.datef-foot { display: flex; gap: 6px; margin-top: 8px; }
.datef-foot button { flex: 1; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--sub); padding: 4px 0; border-radius: 0; cursor: pointer; }
.datef-foot button:hover { border-color: #b9b6ae; color: var(--txt); }

/* 日付・年月ピッカー(申請系フォーム11箇所。実inputをtype=textへ拡張したものを包む) */
.dp { position: relative; }
.dp > input { width: 100%; padding-right: 32px; }
.dp-ico {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; background: none; border-radius: 0;
  color: var(--sub); cursor: pointer;
}
.dp-ico:hover { color: var(--txt); }
/* position:fixedでJSが実座標を置く(drawerのoverflow-y:autoに切られない・375px幅で右端から
   はみ出さない。左のみのabsoluteだと画面外に出た) */
.dp-pop { position: fixed; z-index: 92; width: 244px; padding: 10px; background: var(--card, #fff); border: 1px solid var(--line2); border-radius: 0; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.dp-pop.hidden { display: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head b, .dp-hd { font-size: 12.5px; font-weight: 700; }
.dp-hd { border: 0; background: none; font: inherit; padding: 2px 4px; cursor: pointer; color: var(--txt); border-radius: 0; }
.dp-hd:hover { background: #f2f0ea; }
.dp-nav { border: 0; background: none; font: inherit; font-size: 15px; line-height: 1; padding: 6px 8px; min-width: 28px; color: var(--sub); cursor: pointer; border-radius: 0; }
.dp-nav:hover { background: #f2f0ea; color: var(--txt); }
.dp-wd, .dp-grid.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--sub); padding: 2px 0; }
.dp-wd .sun, .dp-days button.sun { color: #d64550; }
.dp-wd .sat, .dp-days button.sat { color: #2563eb; }
.dp-days button { border: 1px solid transparent; background: none; font: inherit; font-size: 12px; padding: 7px 0; min-height: 28px; border-radius: 0; cursor: pointer; }
.dp-days button:hover:not(:disabled) { background: #f2f0ea; }
.dp-grid.dp-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.dp-months button { border: 1px solid transparent; background: none; font: inherit; font-size: 12.5px; padding: 10px 0; border-radius: 0; cursor: pointer; }
.dp-months button:hover:not(:disabled) { background: #f2f0ea; }
.dp-days button.now, .dp-months button.now { border-color: #b9b6ae; }
.dp-days button.hl, .dp-months button.hl { box-shadow: inset 0 0 0 1.5px var(--brand-dark); }
.dp-days button.on, .dp-months button.on { background: #141414; border-color: #141414; color: #fff; }
.dp-days button:disabled, .dp-months button:disabled { color: var(--text3); opacity: .4; cursor: not-allowed; }
.role-from .dp { max-width: 190px; }
.at-range .dp { flex: 1; min-width: 0; }
.toolbar .dp { width: 150px; }
@media (max-width: 480px) {
  .dp-pop { width: calc(100vw - 40px); max-width: 264px; }
  /* アイコンを40pxへ拡大する分、input側のpadding-rightも40pxへ広げないと
     タイプ領域にアイコンが重なる(2026-08-27 UI/UX審査[中]) */
  .dp-ico { width: 40px; height: 40px; }
  .dp > input { padding-right: 40px; }
  .dp-days button, .dp-months button, .dp-nav, .dp-hd { min-height: 40px; }
}

/* Slack紐付け(まとめて) */
.field-note { font-size: 12px; color: var(--sub); margin-top: 6px; line-height: 1.6; }
table.lk { width: 100%; border-collapse: collapse; margin-top: 6px; }
table.lk th { background: var(--table-head); color: var(--sub); font-size: 12px; padding: 11px 12px; text-align: left; }
table.lk td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lk td:nth-child(2) { width: 46%; }
table.lk tr.lk-done { opacity: .5; }
.lk-why { font-size: 11px; color: #188038; font-weight: 700; margin: 3px 0 0 30px; }
.lk-why.none { color: var(--sub); }
.out-list { max-height: 118px; overflow-y: auto; }
.modal.wide { width: 760px; top: 7vh; max-height: 86vh; overflow-y: auto; }

/* --- 通勤定期(定期代) --- */
.cm-now { padding: 18px 0 14px; margin-bottom: 16px; }
.cm-now-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.cm-now-head h3 { font-size: 13px; font-weight: 700; }
.cm-route { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cm-st { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.cm-arrow { color: var(--sub); font-size: 15px; }
.cm-fare { margin-left: auto; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-fare em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--sub); margin-left: 2px; }
.cm-pending { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--warn); font-weight: 600; font-size: 12px; }

.cm-h { font-size: 13px; font-weight: 700; padding: 18px 20px 0; }
.cm-h-sub { margin-left: 12px; font-weight: 500; }
.fee-eff { padding: 7px 0; font-weight: 700; }
.cm-lead { padding: 0 20px; margin-top: 4px; }
.cm-form { padding: 16px 20px 20px; }
.cm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 900px) { .cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cm-grid { grid-template-columns: 1fr; } }
/* 375px実測: 1カラム自体は上のルールで効くが、固定サイドバー210px+.mainの左右60pxで
   申請フォームの実効幅が65pxまで潰れ、日付inputが打てなくなる(2026-08-27 UI/UX審査[中])。
   申請フォームの左右余白だけ狭めて幅を返す(サイドバー・.mainは他画面と共用のため触らない) */
@media (max-width: 480px) {
  .cm-h, .cm-lead { padding-left: 12px; padding-right: 12px; }
  .cm-form { padding: 14px 12px 16px; }
}
/* .hidden は先に定義されているため、後勝ちしないよう詳細度を上げて打ち消す */
.cm-grid.hidden { display: none; }
.cm-method button { padding: 6px 14px; }
.cm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--txt); cursor: pointer; }
.cm-check input { width: 15px; height: 15px; accent-color: var(--brand-dark); }
.wp-effective { min-height: 38px; display: flex; align-items: center; font-weight: 700; }
.wp-salary-warning { border-left: 3px solid var(--warn); padding: 12px 16px; background: var(--attention); }
.wp-salary-warning[hidden] { display: none; }
.wp-warning-title { color: var(--warn); font-weight: 700; margin-bottom: 4px; }
.wp-salary-warning .cm-check { margin-top: 12px; min-height: 44px; }
.cm-moved { padding-top: 4px; }
.cm-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.cm-actions .sub { color: var(--danger); font-weight: 600; }
.cm-form + .card, .card + .card { margin-top: 28px; }

.cm-decide { display: flex; gap: 6px; justify-content: flex-end; }
.cm-sub td { padding-top: 0; border-top: 0; }
.cm-missing td { background: var(--attention); }
.cm-mact { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* この画面の主役は転記する金額。sub扱いだと黄ボタンに負けるので両極端に振る */
.cm-total { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.cm-total em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--sub); margin-right: 6px; letter-spacing: .08em; }
.cm-sub2 { color: var(--sub); font-size: 12px; margin-left: 14px; }
.cm-decide .btn { flex: none; }
#cm-body td .badge { margin-left: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- 開店チェックリスト --- */
.op-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.op-head h2 { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.op-store { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 0; background: var(--hover); border: 1px solid var(--line2); white-space: nowrap; }
.op-sec { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--sub); margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.op-n { font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--txt); background: var(--hover); border: 1px solid var(--line2); border-radius: 0; padding: 1px 8px; }
.op-list { list-style: none; }
.op-item { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.op-item:last-child { border-bottom: 1px solid var(--line); }
.op-mk { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: transparent; margin-top: 1px; }
.op-item.done .op-mk { background: #f0f9f2; border-color: #b5d9c0; color: var(--ok); }
.op-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.op-t { font-weight: 600; }
.op-v { font-size: 13px; font-weight: 600; color: var(--txt); }
.op-d { font-size: 12px; color: var(--sub); line-height: 1.7; }
.op-empty { padding: 26px 0; text-align: center; color: var(--sub); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* --- 勤怠 --- */
.at-range { display: flex; align-items: center; gap: 8px; }
.at-range input { min-width: 0; }
.at-range span { color: var(--sub); flex: none; }
.at-note { margin: 10px 2px 0; }
.at-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 2px 0; }
.at-foot .sub { margin: 0; }
/* 取消済み・処理済みの行(既存 table.lk tr.lk-done と同じ扱い)。
   状態色(.t-off=退職 / .t-un=未配属)は意味が決まっているので流用しない。 */
.t-done { opacity: .5; }

/* --- 指名料 --- */
.fee-opts { flex-wrap: wrap; gap: 6px; }
.fee-opts button { font-variant-numeric: tabular-nums; }
.pp-agg { margin-left: 5px; font-size: 11px; }

/* --- KPIカード ---
   1指標=1タイル(ラベル/値/今期の増分/月次バー)。棒は単一系列なので凡例は置かず、
   直近月だけインク色で強調し、他月は de-emphasis。値は全棒に直付け(色に頼らない)。 */
.k-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.k-bar .sub { margin: 0; }
/* 大項目ごとに5項目なので、広い画面では5列に収まる幅を下限にする。
   タイル群は罫線グリッド=1枚の表として同一サーフェスに乗せる(gap 0・各タイルが上+左のヘアラインを持つ) */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 0; }
.k-tile {
  background: #fff; border: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); border-radius: 0;
  padding: 16px 16px 12px; position: relative; overflow: clip;
  box-shadow: none;
  display: flex; flex-direction: column;
}
/* Lv満了(最高Lv到達)だけ左端にブランド黄の合図を出す。通常タイルは静かに(罫線に埋もれる灰の帯は出さない) */
.k-tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line2); display: none; }
.k-sec { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--sub); margin: 20px 2px 8px; }
.k-sec:first-child { margin-top: 4px; }
.k-top { display: flex; align-items: baseline; gap: 6px; min-height: 20px; }
.k-no { font-size: 10px; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }
.k-label { font-size: 12px; font-weight: 700; color: var(--sub); }
.k-agg { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--sub); margin-left: auto; }
.k-val { display: flex; align-items: baseline; font-size: 29px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; margin-top: 4px; }
/* 取込が無い指標は主数値スロットごと後退させる(実数値と同じ29px/700で並べない) */
.k-val.k-none { font-size: 16px; font-weight: 400; color: var(--text3); }
.k-unit { font-size: 12px; font-weight: 600; color: var(--sub); margin-left: 4px; letter-spacing: 0; }
.k-delta { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ok); white-space: nowrap; }
/* 差分が出せない累計カードも同じ位置に器を置く(色の有無がデータ都合で揺れないように) */
.k-delta.k-delta-none { color: var(--text3); font-weight: 400; }
/* Lv到達度。track=同じランプの明るい段、fill=インク。満了(最高Lv)だけブランド黄 */
.k-lv { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.k-lv b { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 30px; }
/* トラックは「物差し」本体。--line2(白地1.45:1)ではSC1.4.11を満たせないので専用色 */
.k-meter { flex: 1; height: 6px; border-radius: 0; background: #96938c; overflow: hidden; }
.k-scale { font-size: 10px; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-meter i { display: block; height: 100%; background: #1c1c1a; border-radius: 0; }
.k-tile.k-top-lv .k-meter i { background: var(--brand-dark); }
.k-tile.k-top-lv::before { background: var(--brand); display: block; }
/* 「あと◯◯」は行動情報。脚注(出所10px)と同サイズに埋もれさせない */
.k-next { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 500; color: var(--sub); margin-top: 5px; }
.k-next b { margin-left: auto; font-weight: 700; color: var(--ok); white-space: nowrap; }
.k-flat { font-size: 10px; color: var(--sub); margin-top: 6px; }
/* 棒はタイル下端に揃える(タイルごとに文字量が違っても棒の基線が並ぶ) */
/* 棒はタイルの左端から始める(見出し・数値と同じ左の線に乗せる) */
.k-spark { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: auto; padding-top: 12px; }
.k-col { flex: none; width: 44px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; height: 100%; gap: 4px; }
/* 棒の高さは値そのもの。flexに縮められると値の差が消えるので shrink を止める */
.k-n, .k-m, .k-mark { flex: none; }
.k-n { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-mark { width: 18px; background: #8f8c85; border-radius: 0; }
.k-col.k-now .k-mark { background: #1c1c1a; }
.k-col.k-zero .k-mark { background: var(--line2); }
.k-m { font-size: 10px; color: var(--sub); font-variant-numeric: tabular-nums; }
.k-col.k-now .k-m { color: var(--txt); font-weight: 700; }
.k-src { font-size: 10px; color: var(--sub); margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }

/* --- KPIの状態エンコード(2026-08-18指示の②) ---
   スキル5項目/スタンス5項目で階調系統を分ける(黄は要対応専用のままここでは使わない)。
   「進行中」は各系統の中間色のまま・「Lv到達/直近月」はその系統の濃色。
   当期比マイナス・未達だけ、色は変えずdanger系の控えめな縁取りを足す。 */
/* ゲート(Lvメーター)とバー(月次スパーク)が同じ系統に見えるよう、彩度を保ったまま明度だけ上げた
   中間色にする(旧値は彩度が半分以下に落ち、ゲートと別の青に見えていた=2026-08-26最終審査#2) */
.cat-skill { --cat-ink: #24435c; --cat-mid: #407096; }
.cat-stance { --cat-ink: #5c4424; --cat-mid: #967140; }
.k-tile.cat-skill .k-mark, .k-tile.cat-stance .k-mark { background: var(--cat-mid); }
.k-tile.cat-skill .k-col.k-now .k-mark, .k-tile.cat-stance .k-col.k-now .k-mark { background: var(--cat-ink); }
.k-tile.cat-skill .k-meter i, .k-tile.cat-stance .k-meter i { background: var(--cat-ink); }
/* 最高Lv到達の黄合図(既存)は階調系統より優先させる */
.k-tile.k-top-lv.cat-skill .k-meter i, .k-tile.k-top-lv.cat-stance .k-meter i { background: var(--brand-dark); }
.k-col.k-down .k-mark, .kt-b.k-down, .krh.k-down i { box-shadow: inset 0 0 0 1px var(--danger); }
.k-meter.danger { box-shadow: inset 0 0 0 1px var(--danger); }

/* --- 昇給サマリー(通算・上限・半期ごとの積み上がり) --- */
.k-raise { padding: 18px 0 14px; margin-bottom: 14px; }
.kr-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kr-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--sub); }
/* 画面の主役。束ねている10枚のカード主数値(29px)より必ず大きくする */
.kr-val { font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kr-cap { font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
.kr-note { margin-left: auto; font-size: 10px; }
.kr-meter { height: 6px; border-radius: 0; background: #96938c; overflow: hidden; margin-top: 8px; }
.kr-meter i { display: block; height: 100%; background: #1c1c1a; border-radius: 0; }
/* 履歴は横幅を使い切る(左に固まると容器と実描画がずれて空白が出る) */
.kr-hist { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--line); }
.krh { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.krh b { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sub); }
/* データグラフィックなので白地3:1を満たす色にする(--line2 は 1.45:1 で不可) */
.krh i { display: block; width: 100%; background: #96938c; border-radius: 0; }
.krh em { font-style: normal; font-size: 10px; color: var(--sub); }
.krh.on b { color: var(--txt); }
.krh.on i { background: #1c1c1a; }
.k-amt { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--txt);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 上限までの残りは「まだ得ていない額」。成功色(緑)で塗ると信号が逆になる */
/* 上限までの残りは独立行にする(A/B/Cのスケールと同じ行に置くと押し出されて金額が切れる) */
.k-rem { margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--sub); white-space: nowrap; }
/* 「A ¥4,000 ／ B ¥2,000 ／ C ¥0」は1組の単価表。途中で折ると別々の値に見える */
.k-nowrap { white-space: nowrap; }
/* ism体現タイルはスパークラインを持たないことがあるので、出所行を最下部に固定する */
.k-tile.k-ism .k-src { margin-top: auto; }

/* --- 推移(半期をまたぐ全期間の月次) --- */
.k-trend { display: flex; flex-direction: column; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.kt-row { display: flex; align-items: flex-end; gap: 12px; }
.kt-name { flex: none; width: 154px; font-size: 12px; font-weight: 600; padding-bottom: 2px; }
/* バー領域は行幅を使い切る(固定142pxだと右6割が何にも揃わない空白になる) */
.kt-bars { display: flex; align-items: flex-end; gap: 2px; height: 36px; flex: 1; min-width: 400px; }
/* 実バーは欠測(--line2)と3:1以上離す。#8f8c85 では 2.31:1 で判別できない */
.kt-b { position: relative; flex: 1; min-width: 4px; max-width: 48px; background: #6e6c66; border-radius: 0; cursor: default; }
.kt-b.kt-none { background: var(--line2); }
/* スキル/スタンスで階調系統を分ける(KPIカードの.k-markと同じ考え方) */
.kt-row.cat-skill .kt-b:not(.kt-none), .kt-row.cat-stance .kt-b:not(.kt-none) { background: var(--cat-mid); }
/* 値ラベルはホバーで出す(常時は棒の密度が高いバーが読みにくくなる)。原生titleも残し併用可 */
.kt-b:hover::after {
  content: attr(data-v); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: #141414; color: #fff; font-size: 10.5px; font-weight: 600; padding: 2px 6px;
  white-space: nowrap; z-index: 5; font-variant-numeric: tabular-nums;
}
/* 未取込指標は「領域はあるが値がない」ことをハッチで示す(文字の「未取込」だけに頼らない) */
.kt-row.kt-empty .kt-bars {
  background-image: repeating-linear-gradient(-45deg, var(--line2) 0 1px, transparent 1px 7px);
}
.kt-max { flex: none; margin-left: auto; width: 96px; text-align: right; font-size: 10px;
  padding-bottom: 2px; white-space: nowrap; }
/* 最大値の主従を逆転(数値を主役に・「最大」ラベルは薄く添えるだけ) */
.kt-max b { font-size: 13px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; }
.kt-max i { font-style: normal; font-size: 10px; color: var(--text3); margin-left: 4px; }
.kt-axis { height: auto; align-items: flex-start; }
.kt-x { flex: 1; min-width: 4px; max-width: 48px; font-size: 11px; color: var(--sub);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 半期の頭のバーに境界線を引き、いつの区間かを軸ラベルなしでも掴めるようにする */
.kt-b.kt-h { box-shadow: -1px 0 0 var(--line); }
.seg-scroll { max-width: 100%; overflow-x: auto; }

/* --- KPI表ビュー: 昇給列を主役化、未取込行は視線から外す --- */
.k-row-empty { color: var(--text3); }
.k-row-empty td b { color: inherit; }
/* 薄黄地は「黄=要対応専用」原則と衝突する(2026-08-26再々審査#2・ui-review訂正済)ので
   太字+濃罫線(左右の縦罫線)で主役化する */
.k-td-raise { font-weight: 700; box-shadow: inset 1px 0 0 var(--txt), inset -1px 0 0 var(--txt); }
/* 判定値列: 単位の文字幅が項目ごとに違うと、右揃えのまま数字の桁位置がずれる(円/件/時間/pt/ヶ月/回)。
   単位を固定幅の別要素に分離し、数字の右端をセル内で揃える(2026-08-26最終審査#2) */
.k-tv { display: inline-flex; align-items: baseline; justify-content: flex-end; width: 100%; }
.k-tv i { flex: none; min-width: 2.4em; text-align: left; font-style: normal; font-weight: 400; font-size: 11px; color: var(--sub); margin-left: 1px; }

/* --- KPI通期テーブル(半期を横に並べる。表ビューの既定=S.kpiHalf==='all') --- */
.k-hist-wrap { overflow-x: auto; }
table.k-hist { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 920px; }
table.k-hist th, table.k-hist td { padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.k-hist thead th { background: var(--table-head); color: var(--sub); font-size: 12px; font-weight: 600; position: sticky; top: 0; z-index: 2; text-align: right; }
table.k-hist thead th:first-child { text-align: left; z-index: 3; }
/* 先頭列(項目名)は横スクロール中も見えるようsticky。ヘッダーのthead th:first-childが後勝ちで背景を上書きする */
table.k-hist td:first-child, table.k-hist th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 180px; box-shadow: 1px 0 0 var(--line2); }
table.k-hist thead th:first-child { background: var(--table-head); box-shadow: 1px 0 0 var(--line); }
table.k-hist td:not(:first-child), table.k-hist th:not(:first-child) { text-align: right; min-width: 106px; }
td.k-hist-cat { position: static !important; box-shadow: none !important; background: #fbfaf8 !important; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--sub); padding: 12px 14px 8px; }
tr.k-hist-sec-row:first-child td.k-hist-cat { padding-top: 10px; }
.k-hc-num { font-weight: 700; }
.k-hc-num i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--sub); margin-left: 2px; }
.k-hc-dash { font-weight: 400; color: var(--text3); }
/* 期間実績が無いセルは累計/時点値(v_fact_half)を薄字フォールバックで出す。実績と同じ太さで
   出すと「この半期に積んだ実績」と誤読するので、値そのものを弱める */
.k-hc-num.k-hc-fallback { color: var(--sub); }
.k-hc-num.k-hc-fallback b { font-weight: 400; }
.k-hc-lv { display: block; font-size: 10px; color: var(--sub); margin-top: 2px; }
.k-hc-lv0 { color: var(--text3); }
/* Lvが上がった半期だけ状態色(スキル=slate/スタンス=taupeの現行系統。黄は最高Lv到達のみ) */
table.k-hist tbody tr.cat-skill td.k-up { background: rgba(36,67,92,.10); }
table.k-hist tbody tr.cat-stance td.k-up { background: rgba(92,68,36,.10); }
table.k-hist tbody tr.cat-skill td.k-up .k-hc-lv, table.k-hist tbody tr.cat-stance td.k-up .k-hc-lv { color: var(--txt); font-weight: 700; }
table.k-hist td.k-max { box-shadow: inset 0 0 0 1.5px var(--brand-dark); background: #fdf6d8; }
table.k-hist td.k-max .k-hc-lv { color: var(--brand-dark); font-weight: 700; }
/* ism体現は判定(A/B/C)+その期の昇給額の専用セル(汎用10行の判定値/Lvレイアウトに混ぜない) */
table.k-hist .k-hist-ism b { font-weight: 700; }
table.k-hist .k-hist-ism i { font-style: normal; font-size: 10px; color: var(--sub); margin-left: 3px; }
.k-hist-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--sub); align-items: center; }
.k-hist-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: #fff; border: 1px solid var(--line2); }
.k-hist-legend .sw.up-skill { background: rgba(36,67,92,.28); border-color: transparent; }
.k-hist-legend .sw.up-stance { background: rgba(92,68,36,.28); border-color: transparent; }
.k-hist-legend .sw.max { background: #fdf6d8; box-shadow: inset 0 0 0 1.5px var(--brand-dark); border-color: transparent; }
.k-hist-legend .syn { color: var(--text3); }

/* --- 変更履歴: 内容列は要約1行、生ログは<details>展開へ(2026-08-26最終審査#2) --- */
.aud-d summary { cursor: pointer; list-style: none; }
.aud-d summary::-webkit-details-marker { display: none; }
.aud-d summary::after { content: '▸'; margin-left: 5px; font-size: 9px; color: var(--text3); }
.aud-d[open] summary::after { content: '▾'; }
.aud-d p { margin: 4px 0 0; }

/* --- ホーム --- タイル群は罫線グリッド(gap 0・各タイルが上+左のヘアライン) */
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0; }
.hm-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 16px 18px 14px; background: #fff; border: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); border-radius: 0;
  cursor: pointer; text-align: left; transition: outline-color .12s; }
.hm-card:hover { box-shadow: none; outline: 2px solid #141414; outline-offset: -2px; }
.hm-ico { color: var(--sub); line-height: 0; margin-bottom: 6px; }
.hm-n { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hm-l { font-size: 13px; font-weight: 600; color: var(--sub); }
/* 対応待ちはごく薄い黄色の面。完了すると通常の白い面に戻る。 */
.hm-card.hot { background: var(--attention); box-shadow: none; }
.hm-card.hot .hm-ico { color: #797140; }
.hm-card.hot .hm-l { color: var(--txt); }
.hm-quiet { margin-top: 14px; opacity: 1; }
.hm-quiet .hm-card { background: var(--surface); }
.hm-quiet .hm-n { font-size: 22px; font-weight: 600; color: var(--sub); }

/* --- 会社パルス(要対応の下)。在籍/入退社/店舗内訳/異動予約だけを静かに出す。
   説明文は置かない=数字と行き先だけで足りる(ホームは要対応カードだけで空白という指摘への対応) --- */
.hm-pulse { margin-top: 4px; }
.hm-pulse .hm-n { font-size: 26px; }
.hm-card.static { cursor: default; }
.hm-card.static:hover { outline: none; }
.hm-sub { font-size: 11px; color: var(--sub); margin-top: 1px; }
.hm-n em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--sub); margin-left: 2px; }
.hm-n.hm-up { color: var(--ok); }
.hm-n.hm-down { color: var(--warn); }
.hm-done { display: flex; justify-content: center; padding: 26px 0 4px; color: var(--ok); }
.op-cb { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--brand-dark); cursor: pointer; }
.op-item.done .op-t { color: var(--sub); }
/* 予約(適用月がまだ来ていない異動・退職)。現在値の下に置き、切れないよう幅を確保する */
.badge.pend { font-weight: 600; white-space: nowrap; color: var(--accent); }
/* 店舗列は狭い。予約バッジは折り返して全文見せる(店舗名が切れると意味が消える) */
td .badge.pend { display: inline-block; margin: 3px 0 0; white-space: normal; line-height: 1.5; text-align: left; }
.pc-store .badge.pend { display: inline-block; margin-top: 4px; }
.d-store .badge.pend, .hc-top .badge.pend { margin-left: 6px; }
.seg-sub { font-style: normal; font-size: 10px; font-weight: 600; margin-left: 6px; opacity: .75; }
.chip.in { border: 0; background: none; color: var(--ok); }
.chip.out { border: 0; background: none; color: var(--warn); }
.chip.in i, .chip.out i { font-style: normal; font-size: 10.5px; margin-left: 5px; opacity: .8; }
.chip-out { font-style: normal; margin-left: 4px; color: var(--warn); font-weight: 700; }

/* --- 店舗一覧「充足」= 充足率(在籍/最大)のミニバー+%。全店同じ緑バッジだと
   在籍1/最大2の店と5/5の店が同じ見た目になるので置き換える。逼迫店(50%未満)だけwarn色 --- */
.fill-rate { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.fr-meter { width: 56px; height: 6px; background: #e9e7e2; overflow: hidden; }
.fr-meter i { display: block; height: 100%; background: #1c1c1a; }
.fill-rate b { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fill-rate b .nu-u { font-size: 10.5px; }
.fill-rate.warn .fr-meter i { background: var(--warn); }
.fill-rate.warn b { color: var(--warn); }
/* 定員超過(100%超)はwarnと分けてdangerで警告する */
.fill-rate.danger .fr-meter i { background: var(--danger); }
.fill-rate.danger b { color: var(--danger); }

/* 役職の適用月。役職チップのすぐ下に置き、追加ボタンと1つの操作に見せる */
.role-from { margin: 10px 0 0; }
.role-from input { max-width: 190px; }

/* --- 2026-09-07: 一覧と状態表示 --- */
#view { min-width: 0; }
.card:has(> table) { overflow-x: auto; max-height: calc(100dvh - 245px); scrollbar-gutter: stable; }
.card > table { min-width: 640px; }
.search { max-width: 100%; }
#scope-badge { color: var(--sub); font-size: 12px; }
.count { margin: 0 0 14px; }
.seg button { min-height: 36px; }
.seg-n { font-size: 12px; }
.badge, .chip { font-size: 12px; }
.field input, .field select, .toolbar input, .toolbar select { min-height: 39px; }
.btn { min-height: 35px; }
.btn.sm { min-height: 31px; }
td .btn { min-height: 29px; }
.btn:disabled { pointer-events: none; }
.drawer { scrollbar-gutter: stable; }
.cm-decide { align-items: center; }
.cm-decide .btn[data-ok] { color: #353114; background: var(--action); padding: 5px 12px; text-decoration: none; }
.cm-decide .btn[data-ok]:hover { background: var(--action-hover); }
#ap-body:has(#ap-pk-seg) tbody tr, tbody tr.is-pending { background: var(--attention); }
#ap-body:has(#ap-pk-seg) tbody tr:hover, tbody tr.is-pending:hover, tbody tr.t-un:hover { background: var(--attention-hover); }
.cm-sub td { padding-top: 0; padding-bottom: 13px; }
.ob-grid { gap: 24px 28px; }
.ob-grid > .card { border-left: 0; border-top-color: var(--line); }
.ob-grid > .card + .card { margin-top: 0; }
.ob-head h3 { font-size: 18px; letter-spacing: -.035em; }
.ob-tasks { margin-top: 15px; }
.ob-tasks li { min-height: 43px; padding: 10px; }
.ob-tasks li:has(.ob-task:not(.done)) { background: var(--attention); }
.ob-task.done span { color: var(--ok); }
.op-item:not(.done) { background: var(--attention); padding-left: 12px; padding-right: 12px; }
.link-grid { gap: 24px; }
.link-card { border-left: 0; padding-left: 0; }

/* ホームの要対応は、項目名と件数を一行で追える配置。 */
.hm-grid:not(.hm-pulse) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.hm-grid:not(.hm-pulse) .hm-card {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center; gap: 16px; min-height: 78px; padding: 18px;
  border: 0; border-bottom: 1px solid var(--line); font: inherit;
}
.hm-grid:not(.hm-pulse) .hm-ico { grid-column: 1; grid-row: 1; margin: 0; }
.hm-grid:not(.hm-pulse) .hm-l { grid-column: 2; grid-row: 1; color: var(--txt); }
.hm-grid:not(.hm-pulse) .hm-n { grid-column: 3; grid-row: 1; font-size: 28px; }
.hm-card:hover { outline: none; background: var(--hover); }
.hm-card.hot:hover { background: var(--attention-hover); }
.hm-quiet { margin-top: 30px; }
.hm-grid.hm-quiet .hm-card { min-height: 60px; }
.hm-grid.hm-quiet .hm-n { font-size: 20px; color: var(--sub); }
.hm-grid.hm-quiet .hm-l { color: var(--sub); font-size: 12px; }
.hm-pulse { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 8px 0 24px; }
.hm-pulse .hm-card { padding: 20px 24px; gap: 5px; border-top: 0; border-left: 1px solid var(--line); font: inherit; }
.hm-pulse .hm-card:first-child { border-left: 0; padding-left: 0; }
.hm-pulse .hm-l { order: -1; font-size: 12px; }
.hm-pulse .hm-n { margin-top: 6px; font-size: 30px; }
.hm-pulse .hm-sub { font-size: 12px; }

/* 店舗は2列。運営区分、基本情報、操作をそれぞれの面に分ける。 */
.store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 30px; }
.store-card { --store-tint: #eef1ec; --store-line: #c6cec0; --store-ink: #46503d; min-width: 0; background: var(--surface); border-bottom: 1px solid var(--store-line); }
.store-card.direct { --store-tint: #e8eff1; --store-line: #bdcdd1; --store-ink: #3e5861; }
.store-card.franchise { --store-tint: #f2ecdf; --store-line: #d7cbb4; --store-ink: #706047; }
.store-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 22px; background: var(--store-tint); border-top: 1px solid var(--store-line); }
.store-card-head > div { min-width: 0; }
.store-name { display: inline; border: 0; padding: 0; background: transparent; color: var(--store-ink); font: inherit; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.035em; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.store-name:hover { text-decoration: underline; text-underline-offset: 5px; }
.store-kind { color: var(--store-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.store-meta { color: var(--sub); font-size: 12px; line-height: 1.8; margin-top: 5px; overflow-wrap: anywhere; }
.store-card-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 22px; }
.store-card-body > div { min-width: 0; }
.store-card-body > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.store-card-body dt, .store-card-body .store-label { display: block; color: var(--sub); font-size: 12px; margin-bottom: 7px; }
.store-card-body dd { margin: 0; font-size: 15px; font-weight: 600; }
.store-card-body .store-number { font-size: 23px; font-weight: 700; line-height: 1.4; }
.store-card-body .store-number small { font-size: 12px; font-weight: 500; margin-left: 3px; color: var(--sub); }
.store-card-body .fill-rate { flex-wrap: wrap; gap: 5px 8px; }
.store-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 11px 22px; background: #f5f6f2; }
.store-card-foot .btn { border: 1px solid var(--line2); padding: 6px 14px; text-decoration: none; }
.store-card-foot .btn:hover { background: #e9ede3; }
.store-card-foot .btn[data-store-edit] { background: var(--txt); border-color: var(--txt); color: #fff; }
.store-card-foot .btn[data-store-edit]:hover { background: #3a4332; }

/* PCの横幅を保ちながら、狭い画面では入力域を確保する。 */
@media (max-width: 1100px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .top { gap: 16px; }
  .store-grid { gap: 22px; }
  .store-card-head, .store-card-foot { padding-left: 18px; padding-right: 18px; }
  .store-card-body { gap: 12px; padding: 20px 18px; }
  .store-card-body > div + div { padding-left: 12px; }
  .hm-pulse .hm-card { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 760px) {
  .side { width: 184px; padding-left: 10px; padding-right: 10px; }
  #nav button { padding-left: 11px; padding-right: 11px; }
  .top { align-items: flex-start; flex-direction: column; gap: 14px; }
  .viewer { justify-content: flex-start; }
  .store-grid, .hm-grid:not(.hm-pulse) { grid-template-columns: minmax(0, 1fr); }
  .hm-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .hm-pulse .hm-card:nth-child(odd) { border-left: 0; padding-left: 0; }
  .toolbar .search { width: 100%; }
  .toolbar .search input { width: 100%; }
  .ob-grid, .link-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .shell { display: block; }
  .side { position: static; width: 100%; height: auto; padding: 16px; }
  #nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 0; }
  #nav button { min-height: 40px; padding: 9px 8px; gap: 6px; font-size: 12px; }
  #nav button svg { width: 13px; height: 13px; }
  .side-foot { display: none; }
  .main { padding: 0 16px 32px; }
  .top { min-height: auto; margin-bottom: 22px; padding: 22px 0; }
  .top h1 { font-size: 23px; }
  .viewer { gap: 8px; }
  .tb-act { width: 100%; justify-content: flex-end; }
  .seg { gap: 14px; flex-wrap: wrap; }
  .seg + .seg { margin-left: 0; padding-left: 0; border-left: 0; }
  .store-card-body { gap: 10px; }
  .store-card-body > div + div { padding-left: 10px; }
  .drawer { width: 100%; max-width: 100vw; padding: 22px 20px; }
  .pp-row { gap: 14px; }
  .pp-row span { width: 95px; }
}

/* --- 申請フォーム共通(2026-09-25: 種類・選択項目はすべてプルダウン) --- */
.ap-kind.combo { width: 280px; }
.ap-kind.combo input[type="text"] { font-weight: 700; }
.ap-wide { grid-column: 1 / -1; }
.field textarea {
  width: 100%; font: inherit; padding: 7px 11px; border: 1px solid var(--line2); border-radius: 0;
  background: #fff; color: var(--txt); outline: none; resize: vertical; min-height: 64px;
}
.field textarea:focus { border-color: #727b63; box-shadow: 0 0 0 2px #edf0e6; }
.ap-derived { min-height: 39px; display: flex; align-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.ap-check { margin-bottom: 12px; }
/* .field label{display:block} に負けてチェックと文字が2行に割れるのを止める(通勤定期の「引っ越しを伴う」も同じ) */
.field label.cm-check { display: inline-flex; margin-bottom: 0; }
@media (max-width: 620px) { .ap-kind.combo { width: 100%; } }

/* --- リーダーランク(プロフィール・基本情報の行) --- */
.lr-next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lr-seg { gap: 14px; }
.lr-seg button:disabled { color: var(--text3); cursor: default; box-shadow: none; }
.pp-row .lr-b span, .pp-row .lr-next span { width: auto; flex: initial; color: inherit; font-size: inherit; }
.pp-row .lr-b .sub, .pp-row .lr-next .sub { color: var(--sub); font-size: 12px; }

/* --- 申請する(2026-09-26 まとめ入力。bestofn 採用案 d2 = 1行の入力欄＋積み上げ) --- */
.ap2 {
  --font-num: var(--font-ui);
  /* 日付 / 開始 / 終了 / ジム・スクール / 時間 / お客様 / 操作 */
  --ecols: 176px 96px 84px 156px 196px minmax(0, 1fr) 118px;
}
.ap2 [hidden] { display: none !important; }
.ap2 input[type=text], .ap2 textarea { font: inherit; color: inherit; }
/* 画面で1回だけ決めるもの(種類・店舗・部門) */
.ap2-setbar { display: flex; align-items: flex-end; gap: 34px; padding: 0 0 22px; flex-wrap: wrap; }
.ap2-setbar .f { min-width: 0; }
.ap2-setbar .l, .ap2 .ec .l, .ap2 .tile .l { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 2px; white-space: nowrap; }
.ap2-setbar .f-store { width: 150px; }
.ap2-setbar .f-dept { width: 220px; }
.ap2-setbar .combo { width: 100%; }
.ap2-setbar .combo input[type=text] { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; padding: 5px 22px 6px 0; font-size: 15px; font-weight: 600; box-shadow: none; min-height: 0; }
.ap2-setbar .combo input[type=text]:focus { border-bottom-color: var(--txt); box-shadow: 0 1px 0 var(--txt); }
.ap2-setbar .combo .caret { right: 2px; }

/* 入力欄 1行 */
.ap2-sec { border-top: 2px solid var(--txt); }
.ap2 .entry { display: grid; grid-template-columns: var(--ecols); align-items: end; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.ap2 .entry.editing { background: var(--attention); box-shadow: -12px 0 0 var(--attention), 12px 0 0 var(--attention); }
.ap2 .ec { padding-right: 18px; min-width: 0; }
.ap2 .ec:last-child { padding-right: 0; }
.ap2 .ec input[type=text], .ap2 .tile input[type=text] {
  width: 100%; border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; background: transparent;
  padding: 5px 0 6px; font-size: 16px; font-weight: 600; outline: none; min-height: 38px; box-shadow: none;
}
.ap2 .ec input:focus, .ap2 .tile input:focus { border-bottom-color: var(--txt); box-shadow: 0 1px 0 var(--txt); }
.ap2 ::placeholder { color: #a3a99a; font-weight: 500; }
.ap2 .ec.err input[type=text] { border-bottom-color: var(--danger); box-shadow: 0 1px 0 var(--danger); color: var(--danger); }
.ap2 .ec.err .l, .ap2 .tile.err .l { color: var(--danger); }
.ap2 .ec-end .v { display: flex; align-items: baseline; gap: 4px; min-height: 38px; padding: 7px 0 6px; font-size: 16px; font-weight: 600; color: var(--sub); border-bottom: 1px dotted var(--line2); font-variant-numeric: tabular-nums; }
.ap2 .ec-end .v small { font-size: 11px; color: var(--text3); }
.ap2 .namebox { display: flex; align-items: flex-end; }
.ap2 .namebox input { flex: 1; }
.ap2 .namebox .sama { font-size: 14px; font-weight: 600; color: var(--sub); padding: 0 0 8px 6px; border-bottom: 1px solid var(--line2); min-height: 38px; display: flex; align-items: flex-end; }
.ap2 .ec-name.err .sama { border-bottom-color: var(--danger); }
.ap2 .namebox:focus-within .sama { border-bottom-color: var(--txt); box-shadow: 0 1px 0 var(--txt); }
.ap2 .ec-act { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-start; gap: 14px; min-height: 38px; }
.ap2 .entry.editing .addbtn kbd { display: none; }
.ap2 .addbtn { border: 0; background: none; font-weight: 700; font-size: 15px; padding: 6px 0 7px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border-bottom: 1px solid transparent; cursor: pointer; }
.ap2 .addbtn:hover { border-bottom-color: var(--txt); }
.ap2 .addbtn kbd { font: inherit; font-size: 11px; font-weight: 600; color: var(--sub); border: 1px solid var(--line2); padding: 1px 5px 0; line-height: 16px; }
.ap2 .cancel { border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--sub); padding: 0; cursor: pointer; }
.ap2 .cancel:hover { text-decoration: underline; text-underline-offset: 3px; }
.ap2 .emsg { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--danger); padding-top: 8px; display: flex; gap: 18px; }

/* 2択・3択(テキストタブ・キー操作つき) */
.ap-seg { display: flex; gap: 16px; min-height: 38px; align-items: flex-end; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.ap-seg button { border: 0; background: none; padding: 5px 0; margin-bottom: -1px; font: inherit; font-size: 16px; font-weight: 600; color: var(--sub); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.ap-seg button:hover { color: var(--txt); }
.ap-seg button[aria-checked=true] { color: var(--txt); font-weight: 700; border-bottom-color: var(--txt); }
.ap-seg.num button small { font-size: 11px; margin-left: 1px; }
.ap-seg:focus-within { border-bottom-color: var(--txt); }

/* 積み上げリスト */
.ap2 .stack-h { display: flex; align-items: baseline; justify-content: space-between; padding: 26px 0 8px; }
.ap2 .stack-h h2 { font-size: 15px; font-weight: 700; }
.ap2 .stack-h span { font-size: 12px; color: var(--text3); }
.ap2 .dgroup { border-top: 1px solid var(--txt); }
.ap2 .dhead { display: grid; grid-template-columns: var(--ecols); align-items: center; padding: 10px 0 9px; border-bottom: 1px solid var(--line); }
.ap2 .dhead .d { font-size: 18px; font-weight: 700; line-height: 1.2; }
.ap2 .dhead .d small { font-size: 12px; font-weight: 600; color: var(--sub); margin-left: 6px; }
.ap2 .dhead .types { grid-column: 2 / 6; display: flex; gap: 18px; }
.ap2 .dhead .types button { border: 0; background: none; padding: 2px 0 1px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text3); border-bottom: 2px solid transparent; cursor: pointer; }
.ap2 .dhead .types button:hover { color: var(--txt); }
.ap2 .dhead .types button.on { color: var(--txt); font-weight: 700; border-bottom-color: var(--txt); }
.ap2 .dhead .sub { grid-column: 6 / 8; text-align: right; font-size: 13px; color: var(--sub); }
.ap2 .dhead .sub b { color: var(--txt); font-weight: 700; margin: 0 2px; }
.ap2 .item { display: grid; grid-template-columns: var(--ecols); align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 46px; }
.ap2 .item:hover { background: var(--hover); }
.ap2 .item.on { background: var(--attention); }
.ap2 .item > span { padding: 11px 18px 10px 0; min-width: 0; }
.ap2 .item .t, .ap2 .item .m { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ap2 .item .e { font-size: 16px; color: var(--sub); font-variant-numeric: tabular-nums; }
.ap2 .item .m small { font-size: 12px; color: var(--sub); margin-left: 1px; }
.ap2 .item .n { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap2 .item .x { padding-right: 0; text-align: right; }
.ap2 .item .x button { border: 0; background: none; width: 36px; height: 36px; color: var(--text3); line-height: 0; display: inline-flex; align-items: center; justify-content: center; margin-right: -11px; cursor: pointer; }
.ap2 .item .x button:hover { color: var(--danger); }
.ap2 .item .mark { font-size: 11px; font-weight: 700; color: var(--brand-dark); letter-spacing: .04em; }
@keyframes ap2-enter { from { background: var(--attention); } to { background: transparent; } }
.ap2 .item.enter { animation: ap2-enter 1.4s ease-out; }
.ap2-empty { padding: 22px 0; color: var(--sub); border-top: 1px solid var(--line); }

/* 合計と申請 */
.ap2-foot { display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 18px 0 0; border-top: 2px solid var(--txt); margin-top: 22px; }
.ap2-foot .total { font-size: 14px; color: var(--sub); white-space: nowrap; }
.ap2-foot .total b { font-size: 24px; font-weight: 700; color: var(--txt); margin: 0 3px; line-height: 1; font-variant-numeric: tabular-nums; }
.ap2-foot .total .sep { margin: 0 10px; color: var(--line2); }
.ap2-foot .fmsg { font-size: 12px; font-weight: 600; color: var(--danger); margin-right: auto; }
.ap2-foot .btn-primary { min-width: 260px; min-height: 50px; border: 0; border-radius: 0; background: var(--brand); color: var(--txt); font-size: 16px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.ap2-foot .btn-primary:hover { background: #ecd523; }
.ap2-foot .btn-primary:disabled { opacity: .6; cursor: default; }

/* 欠勤・代行・住所変更・育児休業・扶養(タイル) */
.ap2 .fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ap2 .tile { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 12px 16px 14px; min-width: 0; }
.ap2 .fgrid .tile:first-child, .ap2 .fgrid .tile.row-start { border-left: 0; padding-left: 0; }
.ap2 .tile.s2 { grid-column: span 2; } .ap2 .tile.s4 { grid-column: span 4; }
.ap2 .tile textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; background: transparent; padding: 5px 0 6px; outline: none; resize: vertical; min-height: 64px; line-height: 1.6; font-size: 15px; }
.ap2 .tile textarea:focus { border-bottom-color: var(--txt); box-shadow: 0 1px 0 var(--txt); }
.ap2 .tile.err textarea, .ap2 .tile.err input[type=text] { border-bottom-color: var(--danger); box-shadow: 0 1px 0 var(--danger); }
.ap2 .tile .val { font-size: 24px; font-weight: 700; line-height: 1.2; padding: 7px 0 0; font-variant-numeric: tabular-nums; }
.ap2 .tile .val small { font-size: 12px; color: var(--sub); font-weight: 600; margin-left: 4px; }
.ap2 .tile .combo { width: 100%; }
.ap2 .ap2-check { margin-top: 14px; }

/* 日付(カレンダー＋手入力・複数日) */
.ap-datef { position: relative; display: flex; align-items: flex-end; }
.ap-datef input[type=text] { flex: 1; min-width: 0; }
.ap-datef .ico { border: 0; background: none; padding: 0 0 10px 6px; color: var(--sub); line-height: 0; border-bottom: 1px solid var(--line2); min-height: 38px; display: flex; align-items: flex-end; cursor: pointer; }
.ap-datef:focus-within .ico { border-bottom-color: var(--txt); box-shadow: 0 1px 0 var(--txt); }
.ap2 .err .ap-datef .ico { border-bottom-color: var(--danger); }
.ap-datef .ico:hover { color: var(--txt); }
.ap-datef-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 252px; padding: 10px; background: #fff; border: 1px solid var(--line2); box-shadow: var(--shadow); }
.ap-datef-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ap-datef-head b { font-size: 13px; font-weight: 700; }
.ap-datef-head button, .ap-datef-foot button { border: 0; background: none; cursor: pointer; font: inherit; }
.ap-datef-head button { font-size: 16px; line-height: 1; padding: 3px 9px; color: var(--sub); }
.ap-datef-head button:hover { background: var(--hover); color: var(--txt); }
.ap-datef-wd, .ap-datef-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ap-datef-wd span { text-align: center; font-size: 11px; font-weight: 700; color: var(--sub); padding: 2px 0; }
.ap-datef-wd .sun, .ap-datef-grid button.sun { color: #c0392b; }
.ap-datef-wd .sat, .ap-datef-grid button.sat { color: #2d5b9a; }
.ap-datef-grid button { border: 1px solid transparent; background: none; font: inherit; font-size: 13px; padding: 5px 0 3px; cursor: pointer; }
.ap-datef-grid button:hover { background: var(--hover); }
.ap-datef-grid button.now { border-color: var(--txt); }
.ap-datef-grid button.on { background: var(--txt); border-color: var(--txt); color: #fff; }
.ap-datef-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.ap-datef-foot button { font-size: 12px; font-weight: 600; color: var(--sub); padding: 3px 4px; }
.ap-datef-foot button:hover { color: var(--txt); text-decoration: underline; text-underline-offset: 3px; }
.ap-datef.multi input { cursor: pointer; }

/* 異動申請(NAK-1332) */
.ap2 .tr-note { font-size: 13px; color: var(--sub); margin: 0 0 14px; }
.ap2 .tr-pending { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 14px 0 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.ap2 .tr-pending .l { font-size: 12px; font-weight: 600; color: var(--sub); }
.ap2 .tr-pending b { font-size: 16px; }
.ap2 .tile .now { min-height: 38px; padding: 7px 0 6px; font-size: 16px; font-weight: 600; border-bottom: 1px dotted var(--line2); }
.tr-info { margin-bottom: 12px; }
.tr-table td { vertical-align: top; }
.tr-table td:nth-child(1), .tr-table td:nth-child(2) { white-space: nowrap; }
.tr-table .tr-ops { white-space: nowrap; text-align: right; }
.tr-table .tr-ops .btn + .btn { margin-left: 4px; }

@media (max-width: 1280px) {
  .ap2 { --ecols: 150px 84px 72px 138px 176px minmax(0, 1fr) 96px; }
  .ap2 .ec { padding-right: 14px; }
  .ap2 .addbtn kbd { display: none; }
}
@media (max-width: 1100px) {
  .ap2 { --ecols: 104px 70px 64px 104px 84px minmax(0, 1fr) 40px; }
  .ap2 .entry { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 14px; }
  .ap2 .ec { padding-right: 16px; }
  .ap2 .ec-date, .ap2 .ec-start, .ap2 .ec-end, .ap2 .ec-place { grid-column: span 2; }
  .ap2 .ec-min, .ap2 .ec-name { grid-column: span 4; } .ap2 .ec-act { grid-column: span 2; }
  .ap2 .ec-end, .ap2 .ec-min, .ap2 .ec-act { padding-right: 0; }
}
@media (max-width: 760px) {
  .ap2-setbar { gap: 14px 20px; padding-bottom: 18px; }
  .ap2-setbar .f-store { width: calc(40% - 10px); }
  .ap2-setbar .f-dept { width: calc(60% - 10px); }
  .ap2 .entry { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; padding: 12px 0 14px; }
  .ap2 .entry.editing { box-shadow: -16px 0 0 var(--attention), 16px 0 0 var(--attention); }
  .ap2 .ec { padding-right: 0; }
  .ap2 .ec-date, .ap2 .ec-place, .ap2 .ec-min, .ap2 .ec-name, .ap2 .ec-act { grid-column: 1 / -1; }
  .ap2 .ec-start { grid-column: 1; padding-right: 16px; } .ap2 .ec-end { grid-column: 2; }
  .ap-seg { gap: 0; }
  .ap-seg button { flex: 1; text-align: center; font-size: 16px; padding: 7px 0 6px; }
  .ap2 .ec-act { justify-content: flex-start; min-height: 0; }
  .ap2 .dhead { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 12px 0 10px; }
  .ap2 .dhead .types { grid-column: 1 / -1; grid-row: 2; }
  .ap2 .dhead .sub { grid-column: 2; grid-row: 1; }
  .ap2 .item { grid-template-columns: 58px 58px minmax(0, 1fr) 40px; grid-template-areas: "t e pm x" "n n n x"; min-height: 0; }
  .ap2 .item > span { padding: 0 8px 0 0; }
  .ap2 .item .d0, .ap2 .item .m { display: none; }
  .ap2 .item .t { grid-area: t; padding-top: 10px; } .ap2 .item .e { grid-area: e; padding-top: 10px; }
  .ap2 .item .p { grid-area: pm; padding-top: 11px; display: inline; }
  .ap2 .item .p::after { content: attr(data-min); font-weight: 600; margin-left: 10px; }
  .ap2 .item .n { grid-area: n; padding: 0 0 10px; }
  .ap2 .item .x { grid-area: x; align-self: center; }
  .ap2-foot { flex-wrap: wrap; gap: 10px; justify-content: space-between; }
  .ap2-foot .fmsg { width: 100%; order: -1; }
  .ap2-foot .btn-primary { width: 100%; min-width: 0; }
  .ap2 .fgrid { grid-template-columns: minmax(0, 1fr); }
  .ap2 .tile, .ap2 .tile.s2, .ap2 .tile.s4 { grid-column: auto; border-left: 0; padding: 12px 0 14px; }
}

/* 追加勤務(一括の時刻＋1日1行) */
.ap2 .xs-bulk { display: grid; grid-template-columns: minmax(0, 2fr) 120px 120px; align-items: end; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.ap2 .xs-list { border-top: 1px solid var(--txt); margin-top: 22px; }
.ap2 .xs-row { display: grid; grid-template-columns: 110px 90px 32px 90px minmax(0, 1fr) 40px; column-gap: 0; align-items: center; border-bottom: 1px solid var(--line); min-height: 46px; }
.ap2 .xs-row .d { font-size: 16px; font-weight: 700; }
.ap2 .xs-row .d small { font-size: 12px; font-weight: 600; color: var(--sub); margin-left: 6px; }
.ap2 .xs-row .xs-t { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; padding: 6px 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; color: var(--sub); }
.ap2 .xs-row .xs-t.own { color: var(--txt); }
.ap2 .xs-row .xs-t:hover { border-bottom-color: var(--sub); }
.ap2 .xs-row .xs-t:focus { border-bottom-color: var(--txt); color: var(--txt); }
.ap2 .xs-row .to { color: var(--text3); text-align: center; }
.ap2 .xs-row .h { font-size: 14px; color: var(--sub); padding-left: 12px; }
.ap2 .xs-row .h em { font-style: normal; color: var(--danger); font-weight: 600; }
.ap2 .xs-row .x { text-align: right; }
.ap2 .xs-row .x button { border: 0; background: none; width: 36px; height: 36px; color: var(--text3); line-height: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-right: -11px; }
.ap2 .xs-row .x button:hover { color: var(--danger); }
@media (max-width: 760px) {
  .ap2 .xs-bulk { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .ap2 .xs-bulk .xs-dates { grid-column: 1 / -1; }
  .ap2 .xs-row { grid-template-columns: 70px 64px 18px 64px minmax(0, 1fr) 36px; }
}

/* --- 申請: 審査会(2026-09-26)の指摘を反映 --- */
/* 入力欄の下線は白地に3:1以上(#8F9588=3.08:1) */
.ap2 { --uline: #8f9588; }
.ap2 .ec input[type=text], .ap2 .tile input[type=text], .ap2 .tile textarea, .ap2-setbar .combo input[type=text],
.ap-seg, .ap2 .namebox .sama, .ap-datef .ico, .ap2 .xs-row .xs-t { border-bottom-color: var(--uline); }
.ap2 ::placeholder { color: var(--sub); font-weight: 500; }
.ap2-setbar { align-items: flex-start; }
/* エラーは該当欄の直下 */
.ap2 .ec .em { display: block; min-height: 0; font-size: 12px; font-weight: 600; color: var(--danger); margin-top: 4px; line-height: 1.4; }
.ap2 .ec .em:empty { display: none; }
/* 編集中は左端3pxの黒バー(背景の薄塗りに頼らない)。追加直後のフラッシュは一過性のまま */
.ap2 .entry.editing { background: none; box-shadow: inset 3px 0 0 var(--txt); padding-left: 12px; }
.ap2 .item.on { background: none; box-shadow: inset 3px 0 0 var(--txt); }
.ap2 .item .e { color: var(--txt); }
/* 種別タブ非選択はラベルと同じ濃さ(5.75:1) */
.ap2 .dhead .types button { color: var(--sub); }
/* 申請ボタン: 0件の間は押せない見た目 */
.ap2-foot .btn-primary:disabled { background: #ecede8; color: var(--sub); opacity: 1; }
/* カレンダーの土日はアプリの配色に揃える(日曜=アプリの赤・土曜=黒) */
.ap-datef-wd .sun, .ap-datef-grid button.sun { color: var(--danger); }
.ap-datef-wd .sat, .ap-datef-grid button.sat { color: inherit; }
/* 追加勤務: 全日の一括行は日ごとの行と同じ列 */
.ap2 .xs-bulk { grid-template-columns: minmax(0, 420px); border-bottom: 0; padding-bottom: 6px; }
.ap2 .xs-all { border-bottom: 0; }
.ap2 .xs-all .d { font-size: 13px; color: var(--sub); }
.ap2 .xs-all .xs-t { color: var(--txt); }
.ap2 .xs-list { margin-top: 0; }

/* 承認待ち・届出の受付(1件=1行。スマホは縦積みで操作を常に見せる)。
   1列目 = 締切と残り日数・送信日(NAK-1327)。店舗は氏名の下 */
.pd-list { border-top: 2px solid var(--txt); }
.pd-head, .pd-row { display: grid; grid-template-columns: 112px 128px 120px minmax(0, 1fr) 96px 150px; column-gap: 14px; }
.pd-head { font-size: 12px; font-weight: 600; color: var(--text3); border-bottom: 1px solid var(--line); padding: 9px 0 8px; }
.pd-row { border-bottom: 1px solid var(--line); padding: 13px 0 12px; align-items: start; }
.pd-row .ef { font-variant-numeric: tabular-nums; color: var(--sub); }
.pd-row .k { color: var(--sub); }
.pd-row .nm { font-weight: 700; }
.pd-row .nm small { display: block; font-size: 12px; font-weight: 500; color: var(--sub); margin-top: 1px; }
.pd-row .dl { font-variant-numeric: tabular-nums; }
.pd-row .dl b { display: block; font-weight: 700; }
.pd-row .dl b.none { font-weight: 500; color: var(--text3); }
.pd-row .dl .badge { display: block; }
.pd-row .dl small { display: block; font-size: 12px; color: var(--sub); margin-top: 1px; }
.pd-row .ct b { display: block; font-weight: 600; }
.pd-row .ct small { display: block; font-size: 12px; color: var(--sub); margin-top: 3px; line-height: 1.6; }
.pd-row .op { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }
.pd-ok { min-height: 32px; padding: 0 16px; border: 1px solid var(--txt); background: #fff; color: var(--txt); font: inherit; font-weight: 700; cursor: pointer; border-radius: 0; }
.pd-ok:hover { background: var(--hover); }
.pd-ng { border: 0; background: none; color: var(--sub); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; }
.pd-ng:hover { color: var(--txt); text-decoration: underline; text-underline-offset: 3px; }
/* 届出の受付(NAK-1326): 内容の下に定期代の入力とチェックリスト。全部付くまで「反映済み」は押せない */
.pd-ok:disabled { border-color: var(--line2); color: var(--text3); cursor: default; background: #fff; }
.pd-row .ct .nt-fare { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.pd-row .ct .nt-fare input { width: 104px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.pd-row .ct .nt-cl { display: flex; margin-top: 8px; }
.pd-row .ct small.why { color: var(--danger); font-weight: 600; }
.nt-done .op { flex-direction: column; align-items: flex-end; gap: 2px; }
.nt-done .op .sub { font-size: 12px; }

/* 証明の画像(欠勤・遅刻・早退の遅延証明書など・NAK-1328)。写真は枠を付けず面に直接置く。読み込み前・PDFは薄い面だけ */
.ap-proofs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding-top: 6px; }
.ap-proof { position: relative; margin: 0; width: 96px; }
.ap-proof img, .ap-proof .ph { display: flex; width: 96px; height: 96px; object-fit: cover; background: var(--hover); }
.ap-proof .ph, .pd-proof .ph { align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--sub); }
.ap-proof figcaption { margin-top: 4px; font-size: 11px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-proof .x { position: absolute; top: 0; right: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: rgba(255, 255, 255, .92); color: var(--txt); line-height: 0; cursor: pointer; }
.ap-proof .x:hover { color: var(--danger); }
.ap-proof-add { align-self: center; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; padding: 6px 0 7px; border-bottom: 1px solid transparent; white-space: nowrap; cursor: pointer; }
.ap-proof-add:hover { border-bottom-color: var(--txt); }
.ap2 .tile.err .ap-proof-add { color: var(--danger); }
.pd-proofs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pd-proof { display: flex; width: 72px; height: 72px; background: var(--hover); }
.pd-proof img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pd-proof .ph { display: flex; width: 100%; height: 100%; }
.pd-proof.ng .ph { color: var(--danger); }
.pd-proof:hover img { opacity: .85; }
.pd-proof:focus-visible { outline: 2px solid var(--txt); outline-offset: 2px; }

@media (max-width: 760px) {
  /* 押す的は44px */
  .ap-datef-pop { width: min(340px, calc(100vw - 32px)); }
  .ap-datef-grid button { min-height: 44px; font-size: 15px; }
  .ap2 .item .x button, .ap2 .xs-row .x button { width: 44px; height: 44px; margin-right: -12px; }
  .ap-proof .x { width: 44px; height: 44px; }
  .ap-proof-add { min-height: 44px; }
  .ap2 .ec-act { min-height: 44px; }
  .ap2 .addbtn { width: 100%; min-height: 44px; justify-content: center; border: 1px solid var(--txt); }
  .ap2 .addbtn:hover { border-bottom-color: var(--txt); background: var(--hover); }
  .ap2 .item.on .n::after { content: '　編集中'; font-size: 11px; font-weight: 700; color: var(--txt); }
  .ap2 .xs-bulk { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pd-head { display: none; }
  .pd-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dl dl" "k ef" "nm nm" "ct ct" "op op"; row-gap: 4px; }
  .pd-row .dl { grid-area: dl; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .pd-row .dl b, .pd-row .dl .badge, .pd-row .dl small { display: inline; margin: 0; }
  .pd-row .k { grid-area: k; font-size: 12px; } .pd-row .ef { grid-area: ef; font-size: 12px; text-align: right; }
  .pd-row .nm { grid-area: nm; font-size: 15px; } .pd-row .ct { grid-area: ct; }
  .pd-row .nm small { display: inline; margin-left: 8px; }
  .pd-row .op { grid-area: op; justify-content: flex-start; gap: 20px; margin-top: 8px; }
  .pd-ok { min-height: 44px; flex: 1; }
  .pd-ng { min-height: 44px; }
  .nt-done .op { flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
  .pd-row .ct .nt-cl { min-height: 44px; }
}

/* --- 申請: 審査会2回目(79点)の指摘を反映 --- */
/* カレンダーの選択日は曜日に関係なく白文字 */
.ap-datef-grid button.on, .ap-datef-grid button.on.sun, .ap-datef-grid button.on.sat { color: #fff; }
/* 編集中の黒バーは内容の外側に置き、文字の位置を変えない */
.ap2 .entry, .ap2 .item { position: relative; }
.ap2 .entry.editing { box-shadow: none; padding-left: 0; }
.ap2 .item.on { box-shadow: none; }
.ap2 .entry.editing::before, .ap2 .item.on::before { content: ''; position: absolute; left: -12px; top: 0; bottom: 0; width: 3px; background: var(--txt); }
.ap2 .item .mark { margin-left: 10px; font-size: 11px; font-weight: 700; color: var(--txt); }
/* 時刻は折り返さない */
.ap2 .item .t, .ap2 .item .e { white-space: nowrap; }
/* エラー文は欄の下に重ね、行の高さを変えない */
.ap2 .ec { position: relative; }
.ap2 .entry .ec .em { position: absolute; left: 0; top: 100%; margin-top: 3px; white-space: nowrap; }
.ap2 .entry { padding-bottom: 24px; }
/* 追加勤務: 合計に入る時刻は引き継ぎでも黒 */
.ap2 .xs-row .xs-t { color: var(--txt); }
@media (max-width: 760px) {
  .ap2 .item { grid-template-columns: 54px 72px minmax(0, 1fr) 44px; }
  .ap2 .item.on .n::after { content: none; }
  .ap2 .entry.editing::before, .ap2 .item.on::before { left: -10px; }
  .ap2 .entry .ec .em { white-space: normal; }
  .ap2 .entry { padding-bottom: 22px; row-gap: 22px; }
}

/* 人の編集: 編集者でない人に付ける個別権限(閲覧・APIキー発行)。NAK-213 */
.e-access:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.perm-table button[data-pid] { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.perm-table button[data-pid]:hover strong { text-decoration: underline; }
.perm-table td { vertical-align: top; }
/* 変更履歴「人事変更」(NAK-1223) */
.pc-table button[data-pid] { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.pc-table button[data-pid]:hover strong { text-decoration: underline; }
.pc-table td { vertical-align: top; }
.pc-table .pc-date { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 理由の文字数(異動希望・勤務形態の変更・NAK-1355) */
.reason-count { display: block; margin-top: 4px; font-size: 12px; color: var(--sub); }
/* 勤務形態の変更の理由: 書く前に読む案内なので入力欄の上に置く(NAK-2029) */
.wp-note-hint { display: block; margin: 0 0 6px; }
.reason-count.short { color: var(--txt); font-weight: 600; }

/* --- 申請・届出の入口(NAK-1340): 種類のタイル → オーバーレイで種類ごとのフォーム --- */
/* 区分(申請/届出)は色で分ける: 見出し・上の罫・アイコン。タイルはヘアラインの格子(1枚の表)で、箱・影・角丸は使わない。
   格子は各タイルの上・左の罫と、右・下へ1pxはみ出す線(隣のタイルの罫と重なる)で閉じる。空いたマスには線を引かない */
.kc-sec { --kc: var(--kind-apply); border-top: 3px solid var(--kc); }
.kc-sec[data-cls="notice"] { --kc: var(--kind-notice); }
.kc-sec[data-cls="form"] { --kc: var(--kind-form); }
.kc-sec + .kc-sec { margin-top: 48px; }
.kc-h { display: flex; align-items: center; gap: 10px; padding: 14px 0 0; font-size: 20px; letter-spacing: .06em; color: var(--kc); }
.kc-sw { display: inline-block; flex: none; width: 10px; height: 10px; background: var(--kc); }
.kc-th { padding: 18px 0 9px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--txt); }
.kc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 1px 1px 0; }
.kc-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; min-height: 136px;
  padding: 18px 20px 16px; border: 0; border-top: 1px solid var(--line3); border-left: 1px solid var(--line3); border-radius: 0;
  background: #fff; color: var(--txt); font: inherit; text-align: left; cursor: pointer; transition: background .12s, box-shadow .12s;
  --kc-edge: 1px 0 0 var(--line3), 0 1px 0 var(--line3), 1px 1px 0 var(--line3);
  box-shadow: var(--kc-edge);
}
.kc-tile:hover { background: var(--hover); box-shadow: inset 0 3px 0 var(--kc), var(--kc-edge); }
.kc-tile:focus-visible { outline: 2px solid var(--txt); outline-offset: -2px; }
.kc-ico { color: var(--kc); line-height: 0; }
.kc-name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.kc-st { margin-top: auto; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.kc-st i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 2px; background: currentColor; }
.kc-st.warn { color: var(--warn); }
.kc-st.off { color: var(--sub); }
.kc-st.off i { background: none; box-shadow: inset 0 0 0 1px currentColor; }
/* 準備中のバナー: タイル全体に薄く被せ、下端に帯を渡す(種類の名前は読める) */
.kc-prep { position: absolute; inset: 0; display: flex; align-items: flex-end; background: rgba(255, 255, 255, .4); pointer-events: none; }
.kc-prep b { width: 100%; padding: 6px 0; background: var(--sub); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-align: center; }
/* 開いたフォーム(編集者だけ開ける)の上に同じ帯を留める */
.ap-prep { position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; padding: 9px 16px; background: var(--sub); color: #fff; font-size: 13px; }
.ap-prep b { font-weight: 700; letter-spacing: .2em; }
/* 申請の管理の切替プルダウン */
.ap-tab-pick { width: 260px; max-width: 100%; }
.ap-tab-pick .combo-list { max-height: none; } /* 切替先は全部見せる */
/* 指名料タブ: デジム設定のチェックは押しやすく、取消は行の右端に離す(NAK-1815) */
.fc-dg { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.fc-dg input { width: 18px; height: 18px; }
.fc-act { text-align: right; white-space: nowrap; }
/* 準備中(一般メンバー): 押せない。地を沈め、アイコンと名前を退かせる */
.kc-tile:disabled { cursor: not-allowed; background: var(--table-head); color: var(--sub); }
.kc-tile:disabled:hover { box-shadow: var(--kc-edge); }
.kc-tile:disabled .kc-ico { color: var(--line3); }
.kc-tile:disabled .kc-name { font-weight: 600; }

body.apov-lock { overflow: hidden; }
.apov {
  --kc: var(--kind-apply);
  position: absolute; top: 6vh; left: 0; right: 0; margin: 0 auto; width: min(var(--ow, 680px), calc(100vw - 48px)); max-height: 88vh;
  display: flex; flex-direction: column; background: #fff; border-top: 4px solid var(--kc); border-radius: 0; box-shadow: var(--shadow);
  /* 終わった後に transform を残さない(残すと中の固定位置のカレンダーがずれる) */
  animation: apovIn .18s ease backwards;
}
.apov[data-cls="notice"] { --kc: var(--kind-notice); }
.apov[data-cls="form"] { --kc: var(--kind-form); }
.apov:focus { outline: none; }
@keyframes apovIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.apov-head { flex: none; position: relative; padding: 20px 76px 18px 32px; }
.apov-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--kc); }
.apov-eyebrow .kc-sw { width: 8px; height: 8px; }
.apov-head h2 { font-size: 22px; letter-spacing: -.01em; }
.apov-close { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--sub); cursor: pointer; }
.apov-close:hover { color: var(--txt); }
.apov-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 32px 24px; }
.apov-body > .empty { padding: 24px 0; }
.apov-body .trial-note { margin: 0 0 14px; }
.apov-foot { flex: none; padding: 0 32px; }
.apov-foot .ap2-foot { margin-top: 0; padding: 16px 0 22px; }
/* 専用画面(転居・指名料・勤務形態)はオーバーレイの中で左端を揃える */
.apov .cm-h, .apov .cm-form { padding-left: 0; padding-right: 0; }
.apov .card.cm-now { padding-top: 14px; }
@media (max-width: 1100px) {
  .kc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-tile { min-height: 116px; padding: 14px 14px 12px; gap: 10px; }
  .kc-name { font-size: 15px; }
  .kc-sec + .kc-sec { margin-top: 40px; }
  /* 全画面のシート。送信ボタンは下に固定 */
  .apov-wrap .scrim { display: none; }
  .apov { top: 0; bottom: 0; width: 100%; max-height: none; height: 100%; border-top-width: 3px; animation: apovUp .22s ease backwards; }
  @keyframes apovUp { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
  .apov-head { padding: 12px 60px 12px 16px; border-bottom: 1px solid transparent; }
  .apov.scrolled .apov-head { border-bottom-color: var(--line); }
  .apov-head h2 { font-size: 19px; }
  .apov-close { top: 6px; right: 4px; }
  .apov-body { padding: 0 16px 24px; }
  .apov-foot { padding: 0 16px; }
  .apov-foot .ap2-foot { padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); }
  .apov-foot .ap2-foot .fmsg:empty, .apov-foot .ap2-foot .total:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .apov { animation: none; }
}

/* 申請・届出の履歴: 行の操作は内容の下。スマホは表を横に流さず、1件を2段で見せる */
.ap-row-acts { display: flex; gap: 8px; margin-top: 8px; }
@media (max-width: 599px) {
  .card table.ap-mine-table { display: block; width: 100%; min-width: 0; }
  .ap-mine-table tbody { display: block; }
  .ap-mine-table thead { display: none; }
  .ap-mine-table tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kind state" "body body" "sent eff"; gap: 6px 12px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .ap-mine-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ap-mine-table td:nth-child(1) { grid-area: sent; }
  .ap-mine-table td:nth-child(2) { grid-area: kind; }
  .ap-mine-table td:nth-child(3) { grid-area: body; overflow-wrap: anywhere; }
  .ap-mine-table td:nth-child(4) { grid-area: eff; text-align: right; }
  .ap-mine-table td:nth-child(5) { grid-area: state; text-align: right; }
  .ap-row-acts .btn { min-height: 44px; flex: 1; }
}
