:root {
  /* 店長画面（はるきシフト）と同じ配色：白・薄いグレー・水色・サーモン */
  --bg: #F7F8FA;
  --panel: #FFFFFF;
  --peach: #EEF6FC;
  --line: #E4E7EC;
  --ink: #333333;
  --sub: #777777;
  --accent: #5AAEE0;
  --accent-dark: #2A7FB8;
  --ok: #159B57;
  --ok-pale: #DFF5E8;
  --ng: #EC6A53;
  --ng-pale: #FDECE8;
  --break: #B8860B;
  --break-pale: #FFF4D6;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: var(--accent-dark); }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.wide { max-width: 1100px; }
header.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.logo small { font-weight: 700; font-size: 11px; color: var(--sub); margin-left: 6px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 12px 0; }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
.hint { font-size: 13px; color: var(--sub); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select {
  width: 100%; padding: 10px 12px; border: 1px solid #D8D8D8; border-radius: 8px; font-size: 16px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
button.sub, .btn.sub { background: #fff; color: var(--accent-dark); }
button.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
button.danger { background: #fff; border-color: var(--ng); color: var(--ng); }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border: 1px solid #D8D8D8; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; user-select: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--peach); color: var(--sub); font-weight: 700; }
.steps span.now { background: var(--accent); color: #fff; }
.steps span.done { background: var(--ok-pale); color: var(--ok); }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
table.list th { font-size: 12px; color: var(--sub); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--peach); color: var(--accent-dark); }
.badge.ok { background: var(--ok-pale); color: var(--ok); }
.badge.ng { background: var(--ng-pale); color: var(--ng); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--peach); border-radius: 8px; padding: 10px; word-break: break-all; font-size: 13px; }
.linkbox code { flex: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; overflow-x: auto; }
.tabs button { background: transparent; color: var(--sub); border: none; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 14px; }
.tabs button.on { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tabs button.back { color: var(--accent-dark); font-weight: 800; margin-right: auto; }   /* 設定画面からシフト表へ戻る */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); z-index: 50; }
#toast.show { opacity: 1; }
#toast.error { background: var(--ng); }
.muted { color: var(--sub); }
.center { text-align: center; }
/* 打刻画面 */
.kiosk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kcard { border-radius: 14px; padding: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; text-align: center; }
.kcard .nm { font-size: 18px; font-weight: 900; }
.kcard .st { margin-top: 6px; font-size: 13px; font-weight: 700; }
.kcard.working { border-color: var(--ok); background: var(--ok-pale); }
.kcard.break { border-color: var(--break); background: var(--break-pale); }
.kcard.done { opacity: .55; }
.clock { font-size: 40px; font-weight: 900; letter-spacing: .02em; }
dialog { border: none; border-radius: 16px; padding: 24px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.35); }
.bigbtns { display: grid; gap: 10px; margin-top: 16px; }
.bigbtns button { padding: 16px; font-size: 18px; }
/* シフト表 */
.gridwrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 70vh; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; text-align: center; white-space: nowrap; }
table.grid thead th { position: sticky; top: 0; background: #fff; z-index: 2; font-size: 12px; }
table.grid .sticky { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; min-width: 110px; }
table.grid thead .sticky { z-index: 3; }
table.grid td.name { font-weight: 700; font-size: 13px; }
table.grid th.day { min-width: 44px; }
table.grid th.day .wd { font-weight: 500; color: var(--sub); }
table.grid th.sun { color: var(--ng); }
table.grid th.sat { color: #2457A8; }
table.grid .closed { background: #F4F1EC; }
table.grid td.cell { cursor: pointer; height: 40px; }
table.grid td.cell:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
table.grid td.work { background: #FFE9DF; color: var(--accent-dark); font-weight: 700; }
table.grid td.off { background: #F1F1F1; color: var(--sub); }
table.grid td.wishok .wish { color: #9C8C80; }
table.grid td.wishng { color: var(--ng); opacity: .55; font-size: 11px; }
table.grid .tm { line-height: 1.2; }
table.grid td.sum { background: var(--peach); font-weight: 700; }
