/* KOMAWARI（こまわり）体験版 — 白 × 藍 × 若草 */
:root {
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --line: #e2e6ef;
  --line-2: #cfd5e3;
  --ink: #1f2937;
  --muted: #5b6474;
  --ai: #3550a0;
  --ai-d: #283d7c;
  --ai-l: #eaeef8;
  --wk: #7ab27a;
  --wk-d: #4f8a4f;
  --wk-l: #e9f3e9;
  --bad: #c43d3d;
  --bad-l: #fbe3e3;
  --warn: #9a6a00;
  --warn-l: #fbf0cf;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 41, 55, .05), 0 4px 16px rgba(31, 41, 55, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --band-h: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-2); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.7; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h3 { font-size: 18px; margin-bottom: 10px; }
h4 { font-size: 15px; margin: 14px 0 6px; }
[hidden] { display: none !important; }

/* ===== 体験版の帯 ===== */
.demo-band {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  padding: 7px 16px; background: var(--ink); color: #eef1f7; font-size: 12.5px; line-height: 1.55;
}
.demo-band p { flex: 1 1 420px; min-width: 0; }
.demo-band a { white-space: nowrap; text-underline-offset: 3px; }

/* ===== ヘッダー ===== */
.app-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 14px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.brand-logo { font-size: 24px; font-weight: 800; letter-spacing: .14em; color: var(--ai); line-height: 1.2; }
.brand-logo::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border-radius: 2px; background: var(--wk); vertical-align: middle; }
.brand-ja { font-size: 12.5px; color: var(--muted); }
.view-tabs { display: flex; background: var(--ai-l); border-radius: 10px; padding: 4px; gap: 4px; }
.view-tabs button {
  border: 0; background: transparent; border-radius: 8px; padding: 6px 16px; min-height: 44px;
  font-size: 15px; font-weight: 700; display: flex; flex-direction: column; align-items: center; line-height: 1.25; color: var(--ai-d);
}
.view-tabs button small { font-size: 11px; font-weight: 400; color: var(--muted); }
.view-tabs button[aria-selected="true"] { background: var(--ai); color: #fff; }
.view-tabs button[aria-selected="true"] small { color: #dfe5f5; }
.reset-btn { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 8px 14px; min-height: 44px; font-size: 14px; color: var(--muted); }
.reset-btn:hover { border-color: var(--ai); color: var(--ai); }

.app { padding: 20px 16px 64px; max-width: 1280px; margin: 0 auto; }
body[data-view="staff"] .app { max-width: 560px; }

/* ===== 共通部品 ===== */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.hl { border-color: var(--wk); box-shadow: 0 0 0 3px var(--wk-l); }
.muted { color: var(--muted); }
.sm { font-size: 13.5px; }
.center { text-align: center; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mt-s { margin-top: 6px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-between.wrap { flex-wrap: wrap; }
.note { background: var(--ai-l); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }
.warn-line { color: var(--warn); background: var(--warn-l); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin-top: 10px; }
.ok-line { color: var(--wk-d); background: var(--wk-l); border-radius: 8px; padding: 8px 12px; }
.bad-t { color: var(--bad); font-weight: 700; }
.good-t { color: var(--wk-d); font-weight: 700; }
.warn-t { color: var(--warn); font-weight: 700; }

.btn, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border-radius: 8px; font-weight: 700; font-size: 15px; border: 1px solid transparent;
}
.btn { background: var(--ai); color: #fff; }
.btn:hover { background: var(--ai-d); }
.btn:disabled { background: #a8b2cc; }
.btn-ghost { background: #fff; color: var(--ai); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ai); }
.btn-danger { background: #fff; color: var(--bad); border-color: #e7b5b5; margin-right: auto; }
.btn.sm, .btn-ghost.sm { min-height: 38px; padding: 4px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--ai); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; min-height: 32px; }
.linkish.sm { font-size: 13px; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 12px; min-height: 36px; font-size: 13.5px; }
.chip:hover { border-color: var(--ai); color: var(--ai); }

.badge { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12.5px; font-weight: 700; line-height: 1.7; }
.b-ok { background: var(--wk-l); color: var(--wk-d); }
.b-wait { background: var(--warn-l); color: var(--warn); }
.b-ng, .b-miss { background: var(--bad-l); color: var(--bad); }
.b-brk { background: #fde9d6; color: #a14a00; }
.b-ot { background: var(--ai-l); color: var(--ai); }
.b-late { background: #f1f1f1; color: #555; }
.b-info, .b-gray { background: #f1f1f1; color: #555; }
.b-type { background: var(--ai); color: #fff; }
.b-ft { background: var(--ai-l); color: var(--ai); }
.b-pt { background: var(--wk-l); color: var(--wk-d); }
.b-ab { background: #f4ecdf; color: #7a5a1e; }

.sub-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sub-tabs button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 16px; min-height: 44px; font-weight: 700; font-size: 15px; color: var(--ink); }
.sub-tabs button.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.sub-tabs .count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; line-height: 20px; margin-left: 2px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 14px; min-height: 40px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--ai); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.tile .t-l { font-size: 13px; color: var(--muted); }
.tile .t-v { font-size: 22px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.tile .t-s { font-size: 12px; color: var(--muted); }
.tile.accent { border-color: var(--ai); background: var(--ai-l); }
.tile.accent .t-v { color: var(--ai-d); }
.tile.good { border-color: var(--wk); background: var(--wk-l); }
.tile.bad { border-color: #e7a5a5; background: var(--bad-l); }
.tile.bad .t-v { color: var(--bad); }
.tile.warn { border-color: #e6cd84; background: var(--warn-l); }

.form .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.form label, .field-inline label { font-weight: 700; font-size: 14px; }
.form input, .form select, .field-inline input, select, input[type="number"] {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-height: 44px; background: #fff; font-size: 16px; max-width: 100%;
}
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row .field { flex: 1 1 100px; }
.field-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.field-inline input { width: 100px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
label.inline select { min-height: 40px; padding: 4px 8px; }
label.inline input[type="checkbox"] { width: 20px; height: 20px; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.sw { display: inline-block; width: 16px; height: 12px; border-radius: 3px; vertical-align: middle; }
.c-short { background: #e57373; color: #fff; }
.c-ok { background: #a8d3a8; }
.c-spare { background: #dceedc; }
.c-over { background: #f2d27a; }
.c-none { background: #f3f4f7; }
.sw-sales { background: #c8d2ec; }
.sw-cost { background: var(--ai); }

.hm { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; }
.hm-ok { background: var(--wk-l); color: var(--wk-d); }
.hm-time { background: var(--warn-l); color: var(--warn); }
.hm-ng { background: var(--bad-l); color: var(--bad); }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.tbl td:last-child { white-space: normal; min-width: 180px; }
.tbl th { background: var(--bg-2); font-size: 13px; color: var(--muted); }
.tbl.sm th, .tbl.sm td { padding: 6px 8px; font-size: 13px; }
.tbl tr.row-bad td { background: #fff7f7; }
.fixreq { margin-top: 6px; padding: 8px; border: 1px dashed var(--warn); border-radius: 8px; background: #fffdf5; white-space: normal; }

.intro { background: var(--ai-l); border: 1px solid #cdd6ee; border-radius: var(--radius); padding: 14px 18px; margin: 0 auto 16px; }
body[data-view="staff"] .intro { max-width: 560px; }
.intro-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.intro h2 { font-size: 17px; color: var(--ai-d); }
.intro ul { list-style: disc; padding-left: 20px; font-size: 14.5px; }
.intro li + li { margin-top: 3px; }

/* ===== スタッフ：打刻 ===== */
.whoami { display: flex; flex-direction: column; gap: 6px; }
.whoami label { font-weight: 700; font-size: 14px; }
.whoami select { width: 100%; }
.punch { text-align: center; }
.punch-date { font-size: 20px; font-weight: 800; }
.punch-shift { color: var(--muted); }
.punch-now { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px 0; }
.state { display: inline-block; padding: 2px 14px; border-radius: 999px; font-weight: 700; }
.st-before { background: #f1f1f1; color: #555; }
.st-working { background: var(--wk-l); color: var(--wk-d); }
.st-break { background: var(--warn-l); color: var(--warn); }
.st-done { background: var(--ai-l); color: var(--ai); }
.worktime { font-size: 17px; }
.worktime b { font-size: 30px; color: var(--ai-d); margin-left: 4px; }
.punch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pbtn { min-height: 76px; border-radius: 14px; border: 2px solid transparent; font-size: 20px; font-weight: 800; color: #fff; }
.pbtn-in { background: var(--ai); }
.pbtn-out { background: var(--ink); }
.pbtn-bs, .pbtn-be { background: var(--wk-d); }
.pbtn:disabled { background: #eef0f4; color: #a7aebb; border-color: #e3e6ec; }
.punch-log { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.punch-log li { background: var(--bg-2); border-radius: 8px; padding: 4px 10px; font-size: 14px; }
.punch-log li span { color: var(--muted); margin-right: 6px; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.plain li .badge { margin-left: 2px; }

/* ===== スタッフ：希望 ===== */
.deadline { margin: 6px 0; font-size: 15px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 8px 0 12px; }
.cal-h { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cal-h.sat { color: var(--ai); }
.cal-h.sun { color: var(--bad); }
.cal-cell {
  border: 1px solid var(--line-2); background: #fff; border-radius: 8px; min-height: 58px; padding: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; overflow: hidden;
}
.cal-cell .cd { font-size: 12px; color: var(--muted); line-height: 1.4; }
.cal-cell .cm { font-size: 19px; font-weight: 800; line-height: 1.2; }
.cal-cell .ct { font-size: 9.5px; line-height: 1.2; color: var(--warn); letter-spacing: -.03em; }
.cal-cell.closed { background: #f3f4f7; border-style: dashed; color: #a0a6b2; }
.cal-cell.closed .cm { font-size: 11px; font-weight: 400; }
.cal-cell.hm-ok { background: var(--wk-l); border-color: var(--wk); color: var(--wk-d); }
.cal-cell.hm-time { background: var(--warn-l); border-color: #e6cd84; color: var(--warn); }
.cal-cell.hm-ng { background: var(--bad-l); border-color: #e7a5a5; color: var(--bad); }
.bulk { background: var(--bg-2); border-radius: 10px; padding: 10px; }
.b-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.bulk-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bulk-row select { min-height: 40px; padding: 4px 6px; font-size: 15px; }
.bulk-time { display: inline-flex; align-items: center; gap: 2px; }
.sum-line { margin-top: 10px; font-weight: 700; }
.radio-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.rb { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; min-height: 52px; font-weight: 700; cursor: pointer; }
.rb input { width: 20px; height: 20px; }
.rb:has(input:checked) { border-color: var(--ai); box-shadow: 0 0 0 2px var(--ai-l); }

/* ===== スタッフ：シフト ===== */
.shift-list li { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shift-list li.past { opacity: .5; }
.shift-list li.today { background: var(--wk-l); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.sl-d { font-weight: 700; }
.sl-d em { font-style: normal; font-size: 12px; background: var(--wk); color: #fff; border-radius: 4px; padding: 0 4px; }
.sl-t { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.35; }
.sl-t small { font-size: 12px; font-weight: 400; color: var(--muted); }
.req-item { padding: 10px 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cand li { padding: 4px 0; }
.kv { display: grid; gap: 4px; margin-top: 6px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted var(--line-2); padding: 4px 0; font-size: 14.5px; }
.kv dt { color: var(--muted); }

/* ===== 店長：シフト作成 ===== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { font-size: 17px; }
.quick { display: flex; gap: 8px; }
.pub-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.auto-box { border: 2px solid var(--ai); border-radius: 12px; padding: 12px 14px; background: linear-gradient(0deg, #fff, var(--ai-l)); }
.auto-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.auto-main > b { font-size: 17px; color: var(--ai-d); }
.auto-main select { min-height: 40px; padding: 4px 8px; }
.auto-box details { margin-top: 8px; }
.auto-box summary { cursor: pointer; color: var(--ai); font-weight: 700; font-size: 14px; min-height: 32px; }
.auto-box details > * + * { margin-top: 8px; }
.report { margin-top: 14px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; background: #fff; }
.report h3 { margin: 0; font-size: 16px; }
.report > p { margin: 6px 0; }
.rep > li { border-left: 4px solid #e57373; background: #fff8f8; padding: 6px 10px; margin-top: 6px; border-radius: 0 8px 8px 0; }
.rep summary { cursor: pointer; font-weight: 700; }
.rep ul { list-style: disc; padding-left: 20px; font-size: 13.5px; margin-top: 4px; color: var(--muted); }
.rep.info > li { border-left-color: var(--warn); background: #fffcf1; }

.grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: 13.5px; }
.grid th, .grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; text-align: center; vertical-align: middle; }
.grid thead th { background: var(--bg-2); font-size: 13px; padding: 8px 4px; position: sticky; top: 0; }
.grid thead th.sat { color: var(--ai); }
.grid thead th.sun { color: var(--bad); }
.grid thead th.is-today { background: var(--wk-l); color: var(--wk-d); }
.grid .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 118px; white-space: nowrap; }
.grid thead .sticky-col { z-index: 2; background: var(--bg-2); }
.grid tbody th.sticky-col small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-left: 14px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.grid td.closed { background: #f3f4f7; color: #a0a6b2; font-size: 12px; }
.grid .cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 48px; border: 1px dashed transparent; border-radius: 6px; background: transparent; padding: 2px; line-height: 1.25; }
.grid button.cell:hover { border-color: var(--ai); background: var(--ai-l); }
.grid td.on .cell { background: var(--ai-l); border: 1px solid #c8d2ec; }
.grid td.on .cell b { color: var(--ai-d); }
.grid td.bad .cell { border: 2px solid var(--bad); background: #fff3f3; }
.grid td.past .cell { opacity: .55; }
.grid .cell .off { color: #a0a6b2; font-size: 12.5px; }
.grid .cell .lv { color: var(--wk-d); font-weight: 700; font-size: 12.5px; }
.grid .cell .hm { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; font-size: 10px; }
.grid .cell .warn-i { position: absolute; top: 1px; left: 2px; font-style: normal; font-weight: 900; color: var(--bad); font-size: 13px; }
.grid td.tot { font-weight: 700; white-space: nowrap; }
.grid td.tot small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.grid td.tot.over { color: var(--bad); background: var(--bad-l); }
.grid tr.sum th, .grid tr.sum td { background: #fafbfd; font-size: 12.5px; }
.strip { display: flex; height: 16px; border-radius: 3px; overflow: hidden; gap: 1px; }
.strip i { flex: 1 1 0; }
.viol li { padding: 6px 10px; border-left: 4px solid var(--bad); background: #fff7f7; margin-bottom: 6px; border-radius: 0 6px 6px 0; font-size: 14.5px; }

.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.day-chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.day-chips button { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 4px 10px; min-height: 44px; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; line-height: 1.25; flex: 0 0 auto; }
.day-chips button i { font-style: normal; font-size: 11px; color: var(--bad); }
.day-chips button i.tdy { color: var(--wk-d); }
.day-chips button.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.day-chips button.on i { color: #fff; }
.day-chips button.has-short:not(.on) { border-color: #e7a5a5; }
.day-chips button:disabled { opacity: .45; }

.tl { min-width: 900px; font-size: 13px; }
.tl-row { display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid var(--line); min-height: 40px; }
.tl-name { padding: 6px 8px; position: sticky; left: 0; background: #fff; z-index: 1; display: flex; align-items: center; gap: 2px; white-space: nowrap; border-right: 1px solid var(--line); font-weight: 700; }
.tl-name .hm { width: 16px; height: 16px; font-size: 10px; margin-left: 4px; }
.tl-track { position: relative; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 14) 100%; }
.tl-head .tl-track { min-height: 28px; }
.tl-hour { position: absolute; top: 6px; transform: translateX(3px); font-size: 12px; color: var(--muted); }
.tl-avail { position: absolute; top: 6px; bottom: 6px; background: repeating-linear-gradient(45deg, var(--wk-l), var(--wk-l) 6px, #f4f9f4 6px, #f4f9f4 12px); border-radius: 6px; }
.tl-bar { position: absolute; top: 7px; bottom: 7px; border: 0; border-radius: 6px; color: #fff; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; min-height: 26px; }
button.tl-bar:hover { filter: brightness(1.1); box-shadow: 0 0 0 2px var(--ink); }
.tl-add { position: absolute; top: 7px; left: 4px; border: 1px dashed var(--line-2); background: #fff; border-radius: 6px; font-size: 12px; padding: 2px 8px; color: var(--muted); min-height: 26px; }
.tl-num { min-height: 30px; }
.tl-num .tl-name { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.tl-cells { display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.tl-cells span { display: flex; align-items: center; justify-content: center; border-right: 1px solid #fff; font-size: 12px; font-weight: 700; }
.tl-cells .c-g { background: #f2f4fa; color: var(--ai-d); }
.tl-cells .c-n { background: #f7f7f7; }

/* ===== 店長：人件費 ===== */
.bars li, .pair-bars li { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bl { font-weight: 700; font-size: 14px; min-width: 0; }
.bl small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.bt, .pb { background: var(--bg-2); border-radius: 6px; height: 22px; overflow: hidden; position: relative; min-width: 0; }
.bb { display: block; height: 100%; border-radius: 6px; }
.pb { height: 30px; display: flex; flex-direction: column; gap: 2px; background: none; }
.pb .bb { height: 14px; }
.bb.sales { background: #c8d2ec; }
.bb.cost { background: var(--ai); }
.bv { font-weight: 800; text-align: right; white-space: nowrap; font-size: 14.5px; }
.bv small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

/* ===== 店長：申請 ===== */
.bulk-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-left: auto; }
.req-list .req { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.req-chk input { width: 22px; height: 22px; margin-top: 4px; }
.req-body p + p { margin-top: 3px; }
.req-act { display: flex; flex-direction: column; gap: 6px; }
.issue-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.issue-list li { padding: 4px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }

/* ===== モーダル・お知らせ ===== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(17, 24, 39, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.m-title { font-size: 19px; margin-bottom: 8px; }
.m-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.hope-info { background: var(--bg-2); border-radius: 8px; padding: 6px 10px; margin: 8px 0 12px; font-size: 14px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 30px); z-index: 120;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 15px; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 20px; text-align: center; }

/* ===== スマホ ===== */
@media (max-width: 640px) {
  .app-head { padding: 12px 16px; }
  .brand-logo { font-size: 21px; }
  .view-tabs { width: 100%; }
  .view-tabs button { flex: 1 1 0; padding: 6px 8px; }
  .reset-btn { width: 100%; }
  .app { padding: 14px 12px 56px; }
  .card { padding: 14px; }
  .tile .t-v { font-size: 19px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bars li, .pair-bars li { grid-template-columns: 1fr auto; }
  .bars .bt, .pair-bars .pb { grid-column: 1 / -1; grid-row: 2; }
  .req-list .req { grid-template-columns: 28px 1fr; }
  .req-act { grid-column: 2; flex-direction: row; }
  .shift-list li { grid-template-columns: 1fr auto; }
  .shift-list .sl-a { grid-column: 1 / -1; }
  .sub-tabs button { padding: 6px 12px; font-size: 14px; }
  .tl-row { grid-template-columns: 110px 1fr; }
  .bulk-acts { margin-left: 0; }
}
