/* KDS SIGNAGE — 画面スタイル（土台は釧路食堂管理システム。色・ログイン画面は KDS STAY DESK・入校売上と同じ）
 *
 * 部品の形はホテル売上（hotel-uriage）を引き継ぎ、色は KDS の共通テーマ（KDS PERFORMANCE と同じ
 * 濃紺 #132330・オレンジ #e96d2f・白）にそろえている（2026-10-08 所有者の指示「色合いも他のアプリと同じに」）。
 * 事務所の PC で毎日使うので、装飾より「読みやすいこと」を優先する。
 * 数字は等幅かつ tabular-nums で桁を揃える。
 */

:root {
  /* ブラウザが描く部品（チェック欄・選択の矢印・スクロールバーなど）もダーク表示に合わせる */
  color-scheme: light dark;
  --bg: #f4f6f7;
  --bg-tint: #eef2f4;
  --panel: #ffffff;
  --panel-raised: #ffffff;
  --border: #dfe5e9;
  --border-strong: #bcc8cf;
  --text: #17212a;
  --text-dim: #71808c;
  --accent: #1f6fb2;
  --accent-hover: #185a91;
  --accent-soft: #e8f1fa;
  --accent-strong: #185a91;
  --good: #24956a;
  --bad: #b02a37;
  --sat: #1a5fb4;
  --sun: #b02a37;
  --warn: #9a6700;
  --warn-bg: #fff8e5;
  --row-alt: #fafbfc;
  --today: #e8f1fa;
  --derived: #f0f4f7;
  --topbar: #132330;
  --topbar-text: #f7fafb;
  --topbar-dim: #aebdc6;
  --chart-1: #e96d2f;
  --chart-2: #2563b0;
  --chart-3: #26996b;
  --chart-4: #8266bb;
  --chart-5: #c44958;
  --chart-6: #c99a24;
  --chart-7: #318db9;
  --chart-other: #7c8998;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --shadow-lg: 0 24px 60px rgba(23, 35, 52, .16);
  --radius: 12px;
  --radius-lg: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101820;
    --bg-tint: #14202a;
    --panel: #18232c;
    --panel-raised: #1c2933;
    --border: #2b3a45;
    --border-strong: #465762;
    --text: #edf2f4;
    --text-dim: #9baab4;
    --accent: #5aa2e6;
    --accent-hover: #7ab6ee;
    --accent-soft: #1a2b3b;
    --accent-strong: #7ab6ee;
    --good: #65c79a;
    --bad: #e5534b;
    --sat: #6aa5ef;
    --sun: #e5534b;
    --warn: #c69026;
    --warn-bg: #2b2416;
    --row-alt: #1b262f;
    --today: #1a2b3b;
    --derived: #1b2933;
    --topbar: #0c171f;
    --topbar-text: #f7fafb;
    --topbar-dim: #aebdc6;
    --chart-1: #f1844d;
    --chart-2: #5b9be6;
    --chart-3: #65c79a;
    --chart-4: #b5a0e2;
    --chart-5: #ef7b87;
    --chart-6: #e0b45d;
    --chart-7: #72b9df;
    --chart-other: #9dafba;
    --shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 12px 28px rgba(0, 0, 0, .18);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .38);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.num, input[type="number"], input[inputmode="numeric"], td.num, th.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* --- 全体レイアウト ------------------------------------------------------ */

header.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  min-height: 64px;
  background: var(--topbar);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 8px 28px rgba(19, 35, 48, .22);
  position: sticky;
  top: 0;
  z-index: 20;
  overflow-x: auto;
}

.topbar .brand {
  color: var(--topbar-text);
  font-weight: 750;
  font-size: 16px;
  letter-spacing: .01em;
  margin-right: 18px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.topbar .brand small { color: var(--topbar-dim); font-weight: 500; margin-left: 8px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12);
}

.topbar nav { display: flex; gap: 2px; }
.topbar nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--topbar-dim);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.topbar nav a:hover { background: rgba(255, 255, 255, .08); color: var(--topbar-text); }
.topbar nav a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; }

.topbar .spacer { flex: 1; }
.topbar .user {
  color: var(--topbar-dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.topbar .user button { color: var(--topbar-dim); }
.topbar .user button:hover { color: #fff; background: rgba(255, 255, 255, .09); border-color: transparent; }
/* ［使い方］はマニュアル（/guide/）を別タブで開くリンク。見た目はほかのボタンにそろえる */
.topbar .user a.ghost { color: var(--topbar-dim); text-decoration: none; padding: 7px 14px; border: 1px solid transparent; border-radius: 8px; font-weight: 600; line-height: 1; }
.topbar .user a.ghost:hover { color: #fff; background: rgba(255, 255, 255, .09); }

main { padding: 26px 28px 42px; max-width: 1540px; margin: 0 auto; }

.empty { padding: 60px 20px; text-align: center; color: var(--text-dim); }

/* --- 部品 ---------------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel h2 { margin: 0 0 14px; font-size: 16px; letter-spacing: .01em; }
.panel h3 { margin: 18px 0 10px; font-size: 14px; color: var(--text-dim); }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar .title { font-size: 20px; font-weight: 750; letter-spacing: -.01em; margin-right: 8px; }
.toolbar .hint { color: var(--text-dim); font-size: 12.5px; }

button, .btn {
  font: inherit;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(31, 111, 178, .22); }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button.ghost { border-color: transparent; color: var(--text-dim); }
button:disabled { opacity: .5; cursor: default; }

/* 型を書いていない入力欄（日報の表・目標・チャネル・権限の種類の名前など）も同じ色にする。前はダーク表示で
   ブラウザの既定の黒い字のままになり、暗い地の上で読めなかった（2026-09-28 所有者の指摘） */
select, input:not([type]), input[type="text"], input[type="password"], input[type="number"], input[type="search"], input[type="file"], textarea {
  font: inherit;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
input:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

/* 目立つ断り書き（自動車学校のダッシュボードと同じ見た目） */
.notice { padding: 13px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; border-left: 4px solid currentColor; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.error { background: #fdeaec; color: var(--bad); }
.notice.ok { background: var(--accent-soft); color: var(--accent); }
@media (prefers-color-scheme: dark) { .notice.error { background: #2b1a1c; } }

.msg { padding: 10px 13px; border-radius: 9px; margin: 8px 0; }
.msg.ok { background: var(--accent-soft); color: var(--accent); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.err { background: rgba(176, 42, 55, .1); color: var(--bad); }

/* --- 表 ------------------------------------------------------------------ */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}
.tablewrap::-webkit-scrollbar { height: 10px; width: 10px; }
.tablewrap::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }

/* 見出しを貼り付けて表を内側で縦スクロールさせる（日報入力で使う）。
 * 月の後半の日を入力しても、上の項目欄が常に見えるようにする。 */
.tablewrap.sticky-head { max-height: 72vh; overflow: auto; }
.sticky-head thead th {
  position: sticky;
  z-index: 3;
  background: var(--panel-raised);
  box-shadow: inset 0 -1px var(--border);
}
.sticky-head thead tr:first-child th { top: 0; }
/* 2 段目は 1 段目の高さぶん下げる。既定 30px、JS が実測値で上書きする */
.sticky-head thead tr:nth-child(2) th { top: 30px; }
.sticky-head thead th.group { z-index: 4; }
/* いま入力している欄を分かりやすく */
.sticky-head tbody input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--accent-soft); }

table.grid {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}
table.grid th, table.grid td {
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 9px;
  text-align: right;
  white-space: nowrap;
}
table.grid th {
  background: var(--derived);
  font-weight: 700;
  text-align: center;
  color: var(--text-dim);
}
table.grid th.group { border-bottom-width: 2px; color: var(--text); }
table.grid td.label, table.grid th.label { text-align: left; }
table.grid td.center { text-align: center; }
table.grid tr:nth-child(even) td { background: var(--row-alt); }
table.grid tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel)); }
table.grid tr.today td { background: var(--today); box-shadow: inset 0 1px color-mix(in srgb, var(--warn) 32%, transparent), inset 0 -1px color-mix(in srgb, var(--warn) 32%, transparent); }
table.grid tr.today td:first-child { box-shadow: inset 4px 0 var(--warn), inset 0 1px color-mix(in srgb, var(--warn) 32%, transparent), inset 0 -1px color-mix(in srgb, var(--warn) 32%, transparent); }
table.grid tr.total td, table.grid td.total {
  font-weight: 700;
  background: var(--accent-soft);
  border-top: 2px solid var(--accent);
}
table.grid td.dim { color: var(--text-dim); }
table.grid td.derived { background: var(--derived) !important; color: var(--text-dim); }

.sat { color: var(--sat); }
.sun { color: var(--sun); }
.pos { color: var(--good); }
.neg { color: var(--bad); }

table.grid input {
  color: var(--text);
  width: 68px;
  min-height: 28px;
  padding: 3px 6px;
  text-align: right;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
}
table.grid input:hover { border-color: var(--border-strong); }
table.grid input:focus { border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
table.grid input.dirty { background: var(--warn-bg); }
table.grid input.saved { background: color-mix(in srgb, var(--good) 15%, transparent); transition: background 1s; }

/* --- ダッシュボード ------------------------------------------------------ */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; margin-bottom: 20px; }
.card {
  min-width: 150px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 17px 18px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: 0 12px 30px rgba(23, 35, 52, .1); }
.card .k { color: var(--text-dim); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.card .v { font-size: 25px; font-weight: 750; line-height: 1.35; letter-spacing: -.02em; margin: 4px 0; }
.card .s { font-size: 12.5px; color: var(--text-dim); }

.chart-note { color: var(--text-dim); font-size: 12px; margin-top: 4px; }

.legend { display: flex; gap: 10px 18px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-dim); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; width: 16px; height: 8px; border-radius: 999px; }
.legend svg { flex: none; }

/* --- ログイン ------------------------------------------------------------ */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background: var(--panel);
}
.login-visual {
  position: relative;
  min-height: 100vh;
  padding: clamp(54px, 9vw, 150px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #132330;
}
.login-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to right, black, transparent);
  display: none;
}
.login-copy { position: relative; z-index: 2; }
.login-eyebrow { margin: 0; color: #f79561; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.login-copy h1 { margin: 22px 0 24px; color: #fff; font-size: clamp(38px, 4.2vw, 66px); line-height: 1.27; letter-spacing: -.055em; }
.login-copy > p:not(.login-eyebrow) { margin: 0; color: #aebdc6; font-size: 15px; line-height: 2; }
.login-pills { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 9px; }
.login-pills span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; color: #c7d1d7; background: rgba(255,255,255,.04); font-size: 13px; }
.login-orb { display: none; position: absolute; border-radius: 50%; filter: blur(2px); }
.login-orb.one { width: 430px; height: 430px; right: -250px; bottom: -170px; background: radial-gradient(circle at 30% 30%, rgba(233,109,47,.55), rgba(233,109,47,0) 68%); }
.login-orb.two { width: 180px; height: 180px; right: 10%; top: 9%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 90px rgba(233,109,47,.09); }
.login-panel { min-width: 0; padding: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--panel); }
.login {
  width: min(420px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 54px; }
.login-brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.login-brand-copy strong { font-size: 17px; }
.login-brand-copy small { margin-top: 6px; color: var(--text-dim); font-size: 11px; letter-spacing: .18em; }
.login-secure { margin: 0 0 10px; color: var(--good); font-size: 13px; font-weight: 700; }
.login h1 { font-size: 28px; line-height: 1.45; letter-spacing: 0; margin: 0 0 7px; }
.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  margin: 0;
  background: var(--accent);
  border-color: var(--accent);
}
.login .sub { color: var(--text-dim); font-size: 15px; margin-bottom: 29px; }
.login label { display: block; margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: color-mix(in srgb, var(--text) 78%, var(--text-dim)); }
.login input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: 15px; }
.login input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.login button { width: 100%; min-height: 50px; margin-top: 22px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-radius: 10px; font-size: 15px; }
.login button::after { content: "\2192"; font-size: 19px; font-weight: 400; }
/* ログイン画面から使い方（マニュアル）へ。初めての人向けに目立たせすぎず中央に置く */
.login-guide { display: block; margin-top: 26px; color: var(--accent-strong); font-size: 13.5px; font-weight: 700; text-align: center; text-decoration: none; }
.login-guide:hover { text-decoration: underline; }
.login-build { margin-top: 42px; color: var(--text-dim); font-size: 12px; text-align: center; }
.login-guide ~ .login-build { margin-top: 16px; }
/* 「このパソコンにアイコンを作る」（2026-10-04。ブラウザが入れられると知らせたときだけ出る・app.js の installButtonHtml）。
   使い方の案内のすぐ下に、小さく真ん中に置く */
.login button.login-install { width: fit-content; min-height: 38px; margin: 12px auto 0; padding: 0 14px; justify-content: center; gap: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 9px; background: var(--accent-soft);
  color: var(--accent-strong); font-size: 13.5px; font-weight: 700; max-width: 100%; }
.login button.login-install:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); }
.login button.login-install::after { content: none; }
.login button.login-install svg { flex: none; }
.login button.login-install[hidden] { display: none; }
/* 名前を選ぶログイン（社内・会社の回線から。2026-09-28） */
.login input[type="search"] { margin-top: 4px; }
.login-names { display: grid; gap: 8px; margin-top: 14px; max-height: min(52vh, 460px); overflow-y: auto; padding: 2px; }
.login .login-names button { margin-top: 0; min-height: 48px; font-weight: 600; }
.login-none { margin: 8px 0; color: var(--text-dim); font-size: 14px; }
.login-chosen { margin-top: 4px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; }
.login button.login-alt { margin-top: 12px; border-color: transparent; background: transparent; color: var(--text-dim); justify-content: center; }
.login button.login-alt:hover { color: var(--accent-strong); background: var(--accent-soft); }
.login button.login-alt::after { content: none; }
.login-passkey-hint { margin: 14px 0 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; }
.login-passkey-hint a { color: var(--accent-strong); }

/* 名前と［使い方］［パスワード変更］［ログアウト］。PC は帯の右に横並び、〜900px は［メニュー］の中に縦に並べる */
.topbar .user-menu { display: flex; align-items: center; gap: 8px; }
.topbar .menu-btn { display: none; }
@media (max-width: 1100px) {
  header.topbar { padding: 0 14px; overflow: visible; }
  .topbar .brand small { display: none; }
  .topbar .user { position: relative; }
  .topbar .menu-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: #fff; background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; font-weight: 700; font-size: 13px; }
  .topbar .menu-btn .ico { width: 18px; height: 18px; }
  .topbar .user-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 90; flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 230px; max-width: calc(100vw - 28px); padding: 8px; background: var(--panel); color: var(--text); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); white-space: normal; }
  .topbar .user.open .user-menu { display: flex; }
  .topbar .user-menu .user-name { padding: 8px 12px 10px; font-weight: 700; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
  .topbar .user .user-menu a.ghost, .topbar .user .user-menu button { display: block; width: 100%; text-align: left; padding: 12px; color: var(--text); font-size: 14px; border-radius: 10px; }
  .topbar .user .user-menu a.ghost:hover, .topbar .user .user-menu button:hover { background: var(--accent-soft, rgba(0, 0, 0, .05)); color: var(--text); }
  main { padding: 18px 14px 32px; }
  .panel { padding: 16px; }
}
/* タブレット（701〜900px）：タブは上の帯のまま。題名はロゴだけにし、タブが収まらないときはタブの所だけ横に送る（［メニュー］を画面の外に出さない） */
@media (min-width: 701px) and (max-width: 1100px) {
  .topbar .brand > span { display: none; }
  .topbar nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar .spacer { display: none; }
}

/*
 * 幅の狭い画面のログイン（2026-09-28 所有者の決定「全てのアプリを、上部にキャッチコピーを出す仕様に」。
 * 見本はグループウェアのスマホのログイン画面）。PC は左右2列のまま。
 *   iPad 縦（〜900px）… キャッチコピーの面を上に小さく積む（説明文・タグも出す）
 *   スマホ（〜600px）… 上に紺の帯：ホテル名（小さな金の字）＋キャッチコピー1行（後半に金の下線）。説明文とタグは隠す
 * ログイン前の画面（名前を選ぶ・ID 入力・2段目の本人確認・初回のパスワード変更）はどれもこの形（.login-wrap）。
 * 全画面のアニメーション（.lv-splash）は、この下の指定で PC と同じ大きさに戻す。
 */
@media (max-width: 900px) {
  /* 縦に積むときはグリッドにしない（行が縮んで紹介の面が切れるため。グループウェアと同じ） */
  .login-wrap { display: block; }
  .login-visual { min-height: auto; padding: 36px 24px 30px; }
  .login-copy h1 { margin: 12px 0 10px; font-size: 30px; }
  .login-copy > p:not(.login-eyebrow) { font-size: 13.5px; line-height: 1.9; }
  .login-pills { margin-top: 16px; }
  .login-panel { min-height: auto; padding: 32px 20px 40px; justify-content: flex-start; }
  .login-brand { margin-bottom: 32px; }
}
@media (max-width: 600px) {
  .login-visual { padding: 18px 20px 16px; }
  .login-eyebrow { font-size: 11px; }
  .login-copy h1 { margin: 6px 0 0; font-size: 20px; line-height: 1.4; letter-spacing: -.03em; }
  .login-copy h1 br { display: none; }
  .login-copy .lv-line { display: inline-block; vertical-align: top; }
  .login-copy > p:not(.login-eyebrow), .login-pills { display: none; }
  .login-panel { padding-top: 22px; }
  .login-brand { margin-bottom: 26px; }
  .login h1 { font-size: 24px; }
}

/* --- 管理 ---------------------------------------------------------------- */

/* 権限の種類（2026-09-28） */
.roles-table td, .roles-table th { white-space: nowrap; }
table.grid.roles-table input.role-name { width: 130px; text-align: left; }
table.grid.roles-table input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.roles-actions { display: flex; gap: 6px; }

/* 職員の一覧（見るだけ。追加・変更はグループウェア。2026-09-28） */
.staff-notice a { color: inherit; font-weight: 700; margin-left: 4px; white-space: nowrap; }
.staff-list td, .staff-list th { white-space: nowrap; }
.staff-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.staff-status.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.staff-status.stopped { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.staff-status.pending { background: var(--warn-bg); color: var(--warn); }
.staff-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-strong); }
.staff-dim { color: var(--text-dim); font-size: 12px; }
/* 非常用の管理者のパスワードを変える（2026-09-28） */
table.grid .staff-pw { margin-left: 8px; min-height: 26px; padding: 2px 10px; font-size: 12px; }
.epw-dialog { width: min(440px, calc(100vw - 32px)); }
.epw-lead { color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.epw-dialog label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 700; }
/* グループウェアの入場券を使うか・切り替えるかの確認（2026-10-02） */
.handoff-dialog { width: min(460px, calc(100vw - 32px)); }
.handoff-lead { margin: 10px 0 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.8; }
.handoff-lead b { color: var(--text); }
.epw-field { position: relative; }
.epw-field input { width: 100%; padding-right: 44px; }
.epw-field .epw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 28px; padding: 0 8px; border-color: transparent; background: transparent; font-size: 14px; }
.staff-remote { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
table.grid .staff-remote input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
@media (max-width: 600px) { .staff-list td, .staff-list th { padding-left: 8px; padding-right: 8px; } }
.staff-hint { margin-top: 12px; color: var(--text-dim); font-size: 12.5px; line-height: 1.8; }

.formrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.formrow label { color: var(--text-dim); font-size: 13px; font-weight: 600; }

dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 24px;
  min-width: 300px;
  box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(8, 21, 30, .58); backdrop-filter: blur(3px); }

/* --- 自動ログアウトの知らせ・書きかけの復元（右下の小窓。入力を邪魔しない） --- */

.session-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(380px, calc(100vw - 32px));
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.session-notice.warn { border-left-color: var(--warn); }
.session-notice h2 { margin: 0 0 6px; font-size: 15px; }
.session-notice p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }
.session-notice .count { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.session-notice .formrow { justify-content: flex-end; margin: 14px 0 0; }
@media (max-width: 640px) {
  .session-notice { right: 16px; bottom: 16px; }
}

/* --- 構成比の積み上げ横棒 ------------------------------------------------ */

.stackrow { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.stackrow .yl { width: 44px; text-align: right; color: var(--text-dim); font-size: 12.5px; flex: none; }
.stack { display: flex; flex: 1; height: 26px; border-radius: 7px; overflow: hidden; background: var(--row-alt); box-shadow: inset 0 0 0 1px var(--border); }
.stack .seg {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 600;
  min-width: 0; white-space: nowrap; overflow: hidden;
}

@media (max-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-width: 0; padding: 14px; }
  .card .v { font-size: 21px; }
  .toolbar .title { flex-basis: 100%; }
}

/* --- 印刷 ---------------------------------------------------------------- */

@media print {
  header.topbar, .toolbar button, .toolbar select, .toolbar input, .toolbar label,
  button, .legend, .msg, .notice, .session-notice { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .tablewrap { overflow: visible; }
  table.grid { font-size: 11px; }
  table.grid th, table.grid td { padding: 2px 5px; }
}

/* 全社共通ログイン（2026-09-26）：顔・指紋・暗証番号でログイン／2段目の「戻る」 */
.login button.login-passkey {
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.login button.login-passkey::after { content: none; }

/*
 * ログインのキャッチコピー（2026-09-26 所有者の依頼「印象付けたい」。入校・売上などとそろえる）。
 * ログイン画面を開くたびに、キャッチコピーの面を全画面（.lv-splash。app.js の playLoginSplash が写しを作る）で
 * 流してから、ログイン画面に切り替える。流れ方:
 *   上の小見出し → 見出しが 1 行ずつ下からせり上がる → 「次の一手へ。」に金の下線が引かれ、光が 1 回走る
 *   → 説明文 → タグが順に出る → 約 3 秒で消えてログイン画面（押す・キーを打つと飛ばせる）
 * 画面の中（PC の左の面）のキャッチコピーは、止まった完成形で出す（同じ動きを二度見せない）。
 * スマホ・iPad では同じ面を上に帯として小さくまとめる（下の「幅の狭い画面のログイン」。2026-09-28〜）。
 * 動きを減らす設定の端末では全画面を出さない（app.js）。
 */
.lv-line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.lv-line > span { display: inline-block; }
.lv-accent { position: relative; }
.lv-accent::after {
  content: "";
  position: absolute;
  left: .02em;
  right: .5em;
  bottom: .02em;
  height: .08em;
  border-radius: 2px;
  background: #f79561;
}

/* 全画面。左の面の写しなので見た目の指定はそのまま使い、画面いっぱいに広げて真ん中に置く */
.login-visual.lv-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex !important;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px clamp(28px, 9vw, 150px);
  cursor: pointer;
  animation: lv-leave .5s ease 3.1s forwards;
}
.login-visual.lv-splash.lv-leave-now { animation: lv-leave-now .35s ease forwards; }
.lv-splash .login-copy { width: min(760px, 100%); }
.lv-splash .login-copy h1 { margin: 22px 0 24px; font-size: clamp(32px, 9vw, 72px); line-height: 1.27; letter-spacing: -.055em; }
/* スマホ・iPad で小さくまとめた面も、全画面のときは PC と同じ大きさで見せる */
.lv-splash .login-eyebrow { font-size: 12px; }
.lv-splash .login-copy .lv-line { display: block; }
.lv-splash .login-copy > p:not(.login-eyebrow) { display: block; font-size: 15px; line-height: 2; }
.lv-splash .login-pills { display: flex; margin-top: 40px; }

.lv-splash .lv-line > span {
  transform: translateY(110%);
  animation: lv-rise .95s cubic-bezier(.2, .8, .2, 1) .25s forwards;
}
/* せり上がる span そのものなので、上の .lv-line > span より強い書き方にして光の動きも足す */
.lv-splash .lv-line > span.lv-accent {
  /* 光が走るぶんの帯。文字の色（白）は帯の両端と同じにしてあるので、止まっていれば白のまま */
  background: linear-gradient(100deg, #fff 38%, #fbc4a6 46%, #f79561 50%, #fbc4a6 54%, #fff 62%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lv-rise .95s cubic-bezier(.2, .8, .2, 1) .43s forwards, lv-shine 1.3s ease-in-out 1.75s forwards;
}
.lv-splash .lv-accent::after {
  transform: scaleX(0);
  transform-origin: left center;
  animation: lv-draw .75s cubic-bezier(.65, 0, .25, 1) 1.2s forwards;
}
.lv-splash .login-eyebrow { animation: lv-fade .7s ease .05s both; }
.lv-splash .login-copy > p:not(.login-eyebrow) { animation: lv-fade .8s ease 1.0s both; }
.lv-splash .login-pills span { animation: lv-fade .6s ease both; }
.lv-splash .login-pills span:nth-child(1) { animation-delay: 1.25s; }
.lv-splash .login-pills span:nth-child(2) { animation-delay: 1.35s; }
.lv-splash .login-pills span:nth-child(3) { animation-delay: 1.45s; }
.lv-splash .login-pills span:nth-child(4) { animation-delay: 1.55s; }

@keyframes lv-rise { to { transform: translateY(0); } }
@keyframes lv-draw { to { transform: scaleX(1); } }
@keyframes lv-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes lv-fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes lv-leave { to { opacity: 0; visibility: hidden; } }
/* 押して飛ばすとき。名前を分けて、途中からでも必ず新しく始まるようにする */
@keyframes lv-leave-now { to { opacity: 0; visibility: hidden; } }

/* ---- 使い方ツアー（2026-10-03）。画面を暗くして、説明する所だけを光らせ、吹き出しで案内する ---- */
.toolbar .tour-btn { margin-left: auto; }
.tour-layer { position: fixed; inset: 0; z-index: 9999; }
.tour-layer.is-center { background: rgba(9, 18, 24, .58); }
.tour-spot {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 6px rgba(233, 109, 47, .35), 0 0 0 9999px rgba(9, 18, 24, .58);
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
}
.tour-spot[hidden] { display: none; }
.tour-pop {
  position: fixed; width: min(342px, calc(100vw - 32px));
  background: var(--panel-raised); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 16px 16px 12px;
}
.tour-pop:focus { outline: none; }
.tour-pop-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.tour-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tour-pop-count { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-strong); }
.tour-pop-bar { height: 4px; border-radius: 999px; background: var(--bg-tint); overflow: hidden; margin-top: 6px; }
.tour-pop-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.tour-pop-title { margin: 11px 0 5px; font-size: 17px; line-height: 1.4; font-weight: 800; }
.tour-pop-text { margin: 0; font-size: 14.5px; line-height: 1.8; }
.tour-pop-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-pop-actions .spacer { flex: 1; }
.tour-pop-actions button { min-height: 38px; }
.tour-pop-actions .tour-next { min-width: 84px; }
.tour-quit { color: var(--text-dim); }
.tour-pop.is-in { animation: tour-in .22s ease; }
@keyframes tour-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
  .tour-pop.is-in { animation: none; }
}

/* ======================================================================
 * 画面の共通部品（2026-10-08。KDS STAY DESK から引き継ぎ）
 * ====================================================================== */

/* アプリの印は画像（紺の角丸にオレンジの K・白の S）。ホテルの文字の印の枠は消す */
img.brand-mark { width: 30px; height: 30px; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 8px; }
.login-brand img.brand-mark { width: 40px; height: 40px; background: none; border: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.page-head .sub { color: var(--text-dim); font-size: 13px; }
.page-head .spacer, .formrow .spacer, .choice-row .spacer { flex: 1; }
.small-note { font-size: 12px; }
.muted { color: var(--text-dim); }
.toolbar-slim:empty { display: none; }
.toolbar-slim { margin: -6px 0 12px; }
.hint { color: var(--text-dim); font-size: 12.5px; }
.empty-line { color: var(--text-dim); margin: 8px 0; }
button.small { padding: 4px 10px; font-size: 12px; }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
button.danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); border-color: var(--bad); }
.pos { color: var(--good); font-weight: 700; }
.neg { color: var(--bad); font-weight: 700; }
.dim { color: var(--text-dim); }

/* 印（状態・知らせ） */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; line-height: 1.7; }
.tag.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.tag.info { background: color-mix(in srgb, var(--sat) 13%, transparent); color: var(--sat); }
.tag.done { background: color-mix(in srgb, var(--text-dim) 14%, transparent); color: var(--text-dim); }
.tag.mute { background: var(--bg-tint); color: var(--text-dim); border: 1px solid var(--border); }

/* 切り替えの並びボタン */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: var(--panel); flex-wrap: wrap; }
.seg button { border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text-dim); font-size: 13px; padding: 7px 13px; box-shadow: none; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-soft); color: var(--accent-strong); }

/* ホームのカードと知らせ */
.shop-cards .card .v small, .day-cards .card .v small, .cards .card .v small { font-size: 13px; color: var(--text-dim); margin-left: 3px; font-weight: 600; }
.cards .card .note { font-size: 12px; color: var(--text-dim); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1050px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.panel h2 .sub { font-weight: 500; color: var(--text-dim); font-size: 12px; margin-left: 6px; }
.panel h2 .right { float: right; display: inline-flex; gap: 6px; }
ul.alerts { list-style: none; margin: 0 -22px -20px; padding: 0; }
ul.alerts li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 22px; border-top: 1px solid var(--border); cursor: pointer; }
ul.alerts li:hover, ul.alerts li:focus-visible { background: var(--accent-soft); outline: none; }
ul.alerts .what { font-weight: 600; overflow-wrap: anywhere; }
ul.alerts .who2 { color: var(--text-dim); font-size: 12px; }
ul.alerts .go { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

/* 一覧の表 */
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { position: sticky; top: 0; background: var(--bg-tint); color: var(--text-dim); font-size: 12px; font-weight: 650; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; z-index: 1; }
table.list td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
table.list th.num, table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list tbody tr:nth-child(even) td { background: var(--row-alt); }
table.list tbody tr[data-id] { cursor: pointer; }
table.list tbody tr[data-id]:hover td, table.list tbody tr[data-id]:focus-visible td { background: var(--accent-soft); outline: none; }
table.list td.name b { display: block; }
table.list td.name small { color: var(--text-dim); font-size: 11.5px; }
table.list tfoot td { font-weight: 700; background: var(--bg-tint); border-top: 2px solid var(--border-strong); }
.panel > .tablewrap { margin: 0 -22px -20px; border-radius: 0 0 var(--radius) var(--radius); }
.panel > h2 + .tablewrap { border-top: 1px solid var(--border); }

/* 絞り込み */
.toolbar.filters { align-items: flex-end; gap: 10px 14px; }
.filters label, label.inline { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 650; color: var(--text-dim); }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
.filters label.grow { flex: 1 1 220px; }
.filters label.grow input { width: 100%; }
.filters .range { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); }
label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
label.check input { width: auto; min-height: 0; margin: 0; }
input[type="date"] { font: inherit; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--panel); color: var(--text); }
.formrow.wrap { flex-wrap: wrap; }

/* 詳細 */
.panel.detail { padding: 0; overflow: hidden; }
.panel.detail.dirty { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 40%, transparent), var(--shadow); }
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 20px 22px 14px; }
.detail-head .avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: 21px; flex: none; }
.detail-head h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.detail-head .kana { color: var(--text-dim); font-size: 12px; }
.detail-head .tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 260px; justify-content: flex-end; }
.steps { display: flex; flex-wrap: wrap; margin: 0 22px 16px; }
.steps span { padding: 6px 14px; background: var(--bg-tint); color: var(--text-dim); font-size: 12px; font-weight: 650; border: 1px solid var(--border); margin-right: -1px; }
.steps span:first-child { border-radius: 8px 0 0 8px; }
.steps span:last-child { border-radius: 0 8px 8px 0; }
.steps span.done { background: color-mix(in srgb, var(--good) 13%, var(--panel)); color: var(--good); }
.steps span.now { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps span.now.bad { background: var(--bad); border-color: var(--bad); }
.sec-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.sec-tabs button { border: 0; border-radius: 0; background: transparent; padding: 11px 13px; color: var(--text-dim); border-bottom: 2px solid transparent; white-space: nowrap; box-shadow: none; }
.sec-tabs button.on { color: var(--accent-strong); border-bottom-color: var(--accent); }
.sec { padding: 18px 22px 22px; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px 18px; }
.form > label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 650; color: var(--text-dim); margin: 0; }
.form > label.wide { grid-column: 1 / -1; }
.form > label input, .form > label select, .form > label textarea { width: 100%; }
.form textarea { min-height: 64px; resize: vertical; font: inherit; }
.form [disabled] { background: var(--bg-tint); color: var(--text); opacity: 1; border-style: dashed; cursor: default; -webkit-text-fill-color: var(--text); }
.sec-note { margin: 0 0 14px; color: var(--text-dim); }
.sec-h { margin: 18px 0 10px !important; color: var(--text) !important; font-size: 15px !important; }
.sec-h:first-child { margin-top: 0 !important; }
table.legs { border-collapse: collapse; margin: 12px 0 14px; font-size: 13px; min-width: 860px; }
table.legs th { text-align: left; font-size: 11.5px; color: var(--text-dim); padding: 4px 6px; font-weight: 650; }
table.legs td { padding: 3px 4px; }
table.legs input, table.legs select { width: 100%; min-width: 70px; padding: 6px 8px; }
table.legs td:nth-child(3) input { min-width: 150px; }
.costs-wrap { margin-top: 20px; max-width: 560px; }
table.costs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.costs td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
table.costs td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.costs .formula { color: var(--text-dim); font-size: 11px; }
table.costs tr.total td { font-weight: 750; border-top: 2px solid var(--border-strong); }
table.costs tr.profit td { font-weight: 800; color: var(--good); font-size: 15px; }
table.costs tr.profit.minus td { color: var(--bad); }
.legacy { margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.legacy h3 { margin: 0 0 4px !important; }
.legacy dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 13px; }
.legacy dt { color: var(--text-dim); }
.legacy dd { margin: 0; }
.history .h-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.history .h-head { font-size: 13px; }
table.h-diff { margin-top: 6px; font-size: 12.5px; border-collapse: collapse; }
table.h-diff th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 2px 12px 2px 0; white-space: nowrap; vertical-align: top; }
table.h-diff td { padding: 2px 6px; vertical-align: top; overflow-wrap: anywhere; }

/* 集計 */
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
.bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 14px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; }
.bar .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 設定 */
.role-card h2 .role-name { font-size: 15px; font-weight: 700; width: 180px; }
.role-card .body { padding: 0; }
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; }
table.perm { border-collapse: collapse; font-size: 13px; min-width: 420px; }
table.perm th, table.perm td { padding: 6px 14px; border-bottom: 1px solid var(--border); text-align: center; }
table.perm th:first-child, table.perm td:first-child { text-align: left; }
table.perm th { color: var(--text-dim); font-size: 12px; background: var(--bg-tint); }
.choice-list { display: grid; gap: 4px; margin: 10px 0 14px; max-width: 560px; }
.choice-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.choice-row .cv { font-weight: 600; }
.alert-kinds { display: grid; gap: 8px; margin: 12px 0 16px; }

/* 狭い画面 */
@media (max-width: 700px) {
  main { padding: 14px 12px 30px; }
  .panel { padding: 16px 14px; }
  ul.alerts { margin: 0 -14px -16px; }
  ul.alerts li { padding: 10px 14px; }
  .panel > .tablewrap { margin: 0 -14px -16px; }
  .sec { padding: 14px; }
  .detail-head { padding: 16px 14px 10px; }
  .steps { margin: 0 14px 12px; }
}

/* 印刷（ふだんは A4 縦。月報・シフト表は印刷のときに A4 横を差し込む＝app.js の printAs。日報の印刷は 2026-10-21 にやめた） */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  header.topbar, .toolbar, .page-head button, .tour-btn, .session-notice { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  .tablewrap { max-height: none !important; overflow: visible !important; }
}

/* 詳細を 1 画面に（2026-10-08 所有者の指示「詳細画面は 1 画面にして入力しやすく」）
 * 区分をカードにして 2 列に並べる。欄は少し詰める。保存の帯は下に固定 */
.panel.detail.one-page { overflow: visible; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 18px 18px; }
.dcard { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; background: var(--panel); min-width: 0; }
.dcard h3 { margin: 0 0 10px !important; font-size: 13px !important; color: var(--accent-strong) !important; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.dcard h3::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); }
.dcard-basic { grid-row: span 2; }
.dcard-memo { grid-column: 1 / -1; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } .dcard-basic { grid-row: auto; } }
.form.compact { grid-template-columns: repeat(auto-fill, minmax(min(165px, 100%), 1fr)); gap: 9px 12px; }
.form.compact > label { font-size: 11.5px; gap: 3px; }
.form.compact input, .form.compact select { min-height: 34px; padding: 5px 8px; font-size: 14px; }
.form.compact textarea { min-height: 56px; padding: 6px 8px; font-size: 14px; }
.dcard-memo .form.compact { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.dcard-memo .form.compact > label.wide { grid-column: auto; }
.dcard .sec-note { margin: -2px 0 10px; font-size: 12.5px; }
.form [data-key]:focus { background: var(--accent-soft); }
.steps.clickable button { font: inherit; font-size: 12px; font-weight: 650; padding: 6px 14px; margin: 0 -1px 0 0; border: 1px solid var(--border); border-radius: 0; background: var(--bg-tint); color: var(--text-dim); box-shadow: none; cursor: pointer; }
.steps.clickable button:first-child { border-radius: 8px 0 0 8px; }
.steps.clickable button:last-child { border-radius: 0 8px 8px 0; }
.steps.clickable button:hover { background: var(--accent-soft); color: var(--accent-strong); }
.steps.clickable button.done { background: color-mix(in srgb, var(--good) 13%, var(--panel)); color: var(--good); }
.steps.clickable button.now { background: var(--accent); color: #fff; border-color: var(--accent); }
.detail-more { padding: 0 18px 18px; display: grid; gap: 8px; }
.detail-more details { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; }
.detail-more summary { cursor: pointer; font-weight: 650; color: var(--text-dim); font-size: 13px; }
.detail-more details[open] summary { margin-bottom: 8px; }
.legacy-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 4px; font-size: 13px; }
.legacy-dl dt { color: var(--text-dim); }
.legacy-dl dd { margin: 0; }
.save-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; margin: 0 -28px -42px; padding: 10px 28px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--border); box-shadow: 0 -8px 22px rgba(16, 24, 40, .08); }
.save-bar .save-state { flex: 1; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.save-bar .save-state.on { color: var(--warn); }
.save-bar .save-state.ok { color: var(--good); }
.save-bar .save-state.err { color: var(--bad); }
.save-bar .save-hint { color: var(--text-dim); font-size: 11.5px; }
.save-bar button.primary { min-width: 140px; }
@media (max-width: 700px) { .save-bar { margin: 0 -12px -30px; padding: 10px 12px; } .save-bar .save-hint { display: none; } .detail-grid, .detail-more { padding: 0 10px 12px; } }
@media print { .save-bar, .detail-top { display: none !important; } }
.toolbar.tb-inline { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; min-height: 0; }
.toolbar.tb-inline:empty { display: none; }
.one-page .detail-head { padding: 14px 18px 12px; gap: 8px 16px; }
.one-page .detail-head .avatar { width: 44px; height: 44px; font-size: 18px; }
.one-page .detail-head h2 { font-size: 21px; }
.one-page .detail-head .tags { flex: 1 1 200px; }
.one-page .detail-head .steps { margin: 0; flex-basis: 100%; }
.detail-top { margin-bottom: 10px; }
.form small.wareki { color: var(--text-dim); font-size: 11.5px; font-weight: 600; min-height: 1em; }
/* チェック欄は幅いっぱいにしない（「する」が折り返して崩れていた） */
.form > label input[type="checkbox"] { width: auto; min-height: 0; }
.form > label label.check { min-height: 34px; }

/* 前日入り・仮免日と卒検日の変更（2026-10-08） */
.c-pre { background: #9a6700; }
table.life td.c-pre { color: #fff; font-weight: 800; }
@media print { table.life td.c-pre { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.sched-row { display: flex; gap: 6px; align-items: center; }
.sched-row input { flex: 1; min-width: 0; }
.sched-row button { flex: none; }
ul.sched-log { list-style: none; margin: 4px 0 0; padding: 6px 8px; border-radius: 8px; background: var(--bg-tint); font-size: 12px; display: grid; gap: 4px; }
ul.sched-log li { color: var(--text); font-weight: 500; line-height: 1.5; }
ul.sched-log li small { display: block; color: var(--text-dim); font-size: 11px; }
dialog.sched-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 22px; box-shadow: var(--shadow-lg); background: var(--panel); color: var(--text); }
dialog.sched-dialog .field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; font-size: 12px; font-weight: 650; color: var(--text-dim); }
dialog.sched-dialog .field input { width: 100%; }
.sd-reasons { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 2px; }
.form label.under-check { font-size: 12px; font-weight: 600; color: var(--text); min-height: 0 !important; margin-top: 2px; }
.sd-reasons label.check { white-space: nowrap; }
.sd-reasons input[type="radio"], dialog.sched-dialog input[type="radio"] { width: auto; min-height: 0; }
.c-post { background: #6b7a87; }
table.life td.c-post { color: #fff; font-weight: 800; }
@media print { table.life td.c-post { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* 入力の手助け（郵便番号の住所・電話とメールの確認・年齢の確認。2026-10-08） */
.form small.field-help { font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.form small.field-help:empty { display: none; }
.form small.field-help.ok { color: var(--good); }
.form small.field-help.warn { color: var(--warn); }
.form small.field-help button { margin: 2px 4px 0 0; padding: 2px 8px; font-size: 11.5px; }

/* ======================================================================
 * 釧路食堂の画面（2026-10-08）。色は上の変数だけを使う（ほかのアプリと同じ見た目）
 * ====================================================================== */

/* ホーム */
.shop-cards .card { cursor: pointer; }
.meter { height: 6px; border-radius: 999px; background: var(--bg-tint); border: 1px solid var(--border); overflow: hidden; margin: 8px 0 4px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.home-table td.go { cursor: pointer; }
.home-table td.go:hover { background: var(--accent-soft) !important; }
.home-table td small { color: var(--text-dim); }

/* 日報 */
.daily-head h1 { font-size: 22px; }
.toolbar.daily-bar { gap: 8px; }
.toolbar.daily-bar input[type=date] { width: auto; }
.best-note { margin-bottom: 12px; }
.best-note small { color: var(--text-dim); margin-left: 6px; }
.day-cards { margin-bottom: 14px; }
.cards .card.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); background: var(--warn-bg); }
.daily-grid { padding: 0; }
.daily-grid .form.compact { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px 12px; }
.daily-grid .form.compact > label.wide { grid-column: 1 / -1; }
.daily-grid .form.notes { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.daily-grid .form.notes > label.wide { grid-column: auto; }
.daily-grid .form.notes > label:first-child { grid-column: 1 / -1; }
.ros { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 6px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.ro { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--text-dim); }
.ro b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.ro b.neg { color: var(--bad); }
.ro small { font-size: 11px; }
table.mini { border-collapse: collapse; width: 100%; font-size: 13px; }
table.mini th { text-align: left; font-size: 11.5px; color: var(--text-dim); font-weight: 650; padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.mini td { padding: 3px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.mini td.num, table.mini th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.mini input, table.mini select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 13px; }
table.mini tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }
table.coins { max-width: 360px; margin-bottom: 12px; }
table.coins td:nth-child(2) { width: 110px; }
table.buy td:last-child { width: 120px; }
table.buy .vname { font-size: 13px; }
.buy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.buy-grid h4, .work-grid h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--text-dim); }
.buy-grid button.small, .work-grid button.small { margin-top: 6px; }
.work-grid { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2.2fr); gap: 18px; margin-top: 12px; }
.form.wages { grid-template-columns: repeat(4, minmax(min(140px, 100%), 1fr)) !important; }
table.staff td:first-child, table.part td:first-child { width: 26px; text-align: right; }
table.part input.time { width: 74px; text-align: center; }
table.part td:nth-child(2) { min-width: 120px; }
table.part td:nth-child(3) { width: 104px; }
table.part td.num { min-width: 52px; }
table.part tr.not-counted td { color: var(--text-dim); }
table.part tr.not-counted td[data-o=total] { text-decoration: line-through; }
label.check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
label.check input { width: auto; }
@media (max-width: 1100px) { .buy-grid, .work-grid { grid-template-columns: minmax(0, 1fr); } .form.wages { grid-template-columns: repeat(2, minmax(min(140px, 100%), 1fr)) !important; } }
@media print {
  .topbar, .daily-bar, .page-head .seg, .detail-more, button { display: none !important; }
  .daily-grid { grid-template-columns: 1fr 1fr; }
  input, textarea, select { border: 0 !important; }
}

/* 集計 */
.toolbar.report-bar { gap: 10px; }
.toolbar.report-bar input[type=date] { width: auto; }
table.list tr.sep td { background: var(--bg-tint) !important; color: var(--text-dim); font-size: 12px; font-weight: 700; }
table.list tbody tr[data-date], table.list tbody tr[data-ym] { cursor: pointer; }
table.list tbody tr[data-date]:hover td, table.list tbody tr[data-ym]:hover td { background: var(--accent-soft); }
.hbar { position: relative; height: 10px; border-radius: 999px; background: var(--bg-tint); }
.hbar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.hbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-dim); }
.weekday-table td, .weekday-table th { min-width: 84px; }
dialog.month-dialog { width: min(760px, 94vw); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); padding: 22px 24px; }
dialog.month-dialog::backdrop { background: rgba(10, 20, 28, .45); }
.month-form { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)) !important; }

/* 設定 */
.store-card .body, .orphan .body { padding: 0; }
.store-card .form.compact { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.store-card .form.compact > label.wide { grid-column: 1 / -1; }
.orphan blockquote { margin: 8px 0 12px; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--bg-tint); border-radius: 6px; max-height: 160px; overflow: auto; }

/* 仕入・棚卸・予約（2026-10-09） */
table.buyrows td:nth-child(2) input, table.stockrows td:nth-child(2) input { min-width: 220px; }
table.buyrows select, table.stockrows select, table.products select { max-width: 200px; }
table.products td:nth-child(2) input { min-width: 200px; }
table.products input.num { width: 90px; }
table.vendors td:nth-child(2) input { width: 100%; }
table.list.yoyaku tr.today td { background: var(--accent-soft) !important; }
table.list.yoyaku td.note-cell { white-space: normal; min-width: 160px; max-width: 320px; }
table.list.yoyaku tbody tr { cursor: pointer; }
.yoyaku-mini { margin-bottom: 14px; }
/* 表のすぐ下のボタン・説明（.panel > .tablewrap は下に食い込ませているので、間をあける） */
.panel > .tablewrap + button, .panel > .tablewrap + p, .panel > .tablewrap + div { margin-top: 32px; }

/* ===================================================================================
 * デザインの見直し（2026-10-20 所有者の依頼「初めて使う人でもわかりやすく・見やすく。店舗ごとにテーマカラーを」）
 * 形はステイ管理（kds-stay-desk）の 2026-10-18 の見直しと同じ。データ・計算・権限は変えていない。
 *
 * ■ 店舗のテーマカラー（--store）
 *    色は店舗の設定（server/lib/stores.js の color）から画面が .st-<店舗>{--store:…} を作る（app.js の applyStoreColors）。
 *    店舗を選んで見る画面では body にも .st-<店舗> が付くので、帯・切り替え・カードの線・区分の線・グラフがその店の色になる。
 *    --store-ink（文字）・--store-bg（うすい地）・--store-line（線）は --store から作るので、暗い画面でも読める
 * ■ KDS のオレンジ（--accent）は「大事な操作（保存など）」の色のまま
 * =================================================================================== */
:root { --store: #5d6d7a; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 8px rgba(16, 24, 40, .06); --shadow-hover: 0 10px 28px rgba(23, 35, 52, .12); --radius: 14px; }
body, [class*="st-"] {
  --store-ink: var(--store);
  --store-bg: color-mix(in srgb, var(--store) 10%, var(--panel));
  --store-line: color-mix(in srgb, var(--store) 38%, var(--border));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body, :root:not([data-theme="light"]) [class*="st-"] {
    --store-ink: color-mix(in srgb, var(--store) 62%, #fff);
    --store-bg: color-mix(in srgb, var(--store) 22%, var(--panel));
  }
  :root:not([data-theme="light"]) { --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 14px rgba(0, 0, 0, .22); --shadow-hover: 0 14px 34px rgba(0, 0, 0, .4); }
}

/* 絵 */
svg.ico { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
button svg.ico { width: 16px; height: 16px; vertical-align: -3px; }
button:has(> svg.ico) { display: inline-flex; align-items: center; gap: 6px; }
svg.h-ico { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--store-bg); color: var(--store-ink); margin-right: 8px; vertical-align: middle; }

/* 文字・ボタン・入力欄 */
body { letter-spacing: .01em; }
.panel h2 { font-size: 15.5px; font-weight: 750; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.panel h2 .right { margin-left: auto; float: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
button { border-radius: 10px; font-weight: 650; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
button.primary { box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 26%, transparent); }
button:active:not(:disabled) { transform: translateY(1px); }
select, input:not([type]), input[type="text"], input[type="password"], input[type="search"], input[type="date"], textarea { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* 上の帯：タブに絵。今の画面は下にオレンジの線 */
.topbar nav { gap: 2px; }
.topbar nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; position: relative; }
.topbar nav a svg.ico { width: 17px; height: 17px; opacity: .85; }
.topbar nav a.active { background: rgba(255, 255, 255, .13); }
.topbar nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.topbar nav a.active svg.ico { opacity: 1; color: #ffb48c; }

/* 画面の見出し：左に絵、題、「この画面でできること」 */
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 4px 0 16px; }
.ph-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--border)); }
.ph-icon svg.ico { width: 24px; height: 24px; }
.ph-text { min-width: 0; flex: 1 1 320px; }
.page-head h1 { font-size: 23px; font-weight: 800; }
.page-head .sub { font-size: 13px; line-height: 1.7; max-width: 80ch; margin-top: 2px; }
.page-head .sub b { color: var(--text); }
.ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ph-actions:empty { display: none; }
.hello .ph-actions:empty { display: flex; }

/* 店舗：いま見ている店舗の帯・切り替え・小さな札 */
.store-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; padding: 10px 14px 10px 16px; border-radius: 14px;
  background: var(--store-bg); border: 1px solid var(--store-line); border-left: 6px solid var(--store); }
.sb-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); font-weight: 650; }
.sb-label svg.ico { color: var(--store-ink); width: 22px; height: 22px; }
.sb-label b { font-size: 19px; color: var(--store-ink); font-weight: 800; letter-spacing: .04em; }
.store-banner .store-seg { margin-left: auto; }
.store-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.store-seg button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--store-line);
  background: var(--panel); color: var(--text); box-shadow: none; font-size: 13.5px; }
.store-seg button i { width: 10px; height: 10px; border-radius: 50%; background: var(--store); }
.store-seg button:hover { background: var(--store-bg); border-color: var(--store); }
.store-seg button.on { background: var(--store); border-color: var(--store); color: #fff; font-weight: 800; box-shadow: 0 4px 12px color-mix(in srgb, var(--store) 35%, transparent); }
.store-seg button.on i { background: #fff; }
.store-chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 8px; border-radius: 999px; background: var(--store-bg); color: var(--store-ink);
  border: 1px solid var(--store-line); font-weight: 750; font-size: 12.5px; white-space: nowrap; line-height: 1.7; }
.store-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--store); }
table.list th .store-chip { font-size: 12px; }
.day-status { margin: -4px 0 14px; font-size: 13px; color: var(--text-dim); }

/* カード：左の線は店舗の色 */
.cards { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.card { border-radius: var(--radius); box-shadow: var(--shadow); }
.card::before { background: var(--store); width: 4px; }
.cards .card .v { font-size: 28px; font-weight: 800; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--store-bg); color: var(--store-ink); flex: none; }
.card-top .k { font-size: 15px !important; font-weight: 800 !important; color: var(--store-ink) !important; flex: 1; }
.store-card { border-top: 4px solid var(--store); }
.store-card::before { display: none; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.store-card .card-actions button.primary { background: var(--store); border-color: var(--store); box-shadow: 0 4px 12px color-mix(in srgb, var(--store) 30%, transparent); }
.meter span, .hbar span { background: var(--store); }
.card.warn::before { background: var(--warn); }

/* ホーム：あいさつ・はじめての方へ */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin: 4px 0 18px; padding: 22px 26px; border-radius: 18px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, var(--topbar) 0%, color-mix(in srgb, var(--topbar) 78%, #2d4b61) 100%);
  color: #f3f7f9; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .04); pointer-events: none; }
.hello-text { flex: 1 1 420px; min-width: 0; position: relative; z-index: 1; }
.hello-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: #c3d2db; background: rgba(255, 255, 255, .08); padding: 3px 10px; border-radius: 999px; }
.hello h1 { margin: 8px 0 4px; font-size: 25px; font-weight: 800; color: #fff; }
.hello-sum { margin: 0; color: #d6e1e7; font-size: 14px; line-height: 1.9; }
.hello-sum b { color: #fff; font-size: 16px; margin: 0 1px; }
.hello .bad-text { color: #ffb3b8; font-weight: 700; }
.intro { padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.intro-head { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-bottom: 12px; }
.intro-head svg.ico { color: var(--accent); }
.intro-head b { font-size: 15px; }
.intro-head .sub { color: var(--text-dim); font-size: 12.5px; }
.intro-head .spacer { flex: 1; }
.intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.intro-step { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; min-height: 66px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); box-shadow: none; }
.intro-step:hover { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); border-color: var(--accent); transform: translateY(-1px); }
.intro-step svg.ico { color: var(--accent-strong); width: 22px; height: 22px; }
.intro-step b { display: block; font-size: 14px; }
.intro-step small { display: block; color: var(--text-dim); font-size: 12px; font-weight: 500; line-height: 1.5; }
.intro-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; flex: none; }
.home-table td.go { border-radius: 8px; }
.home-table tr td:first-child { box-shadow: inset 4px 0 var(--store); }

/* 日報：区分の目次（帯のすぐ下に付いてくる）・番号・説明・欄の一言 */
.sec-nav { position: sticky; top: 62px; z-index: 15; display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 10px; border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sec-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 13px; border: 1px solid transparent; }
.sec-nav a:hover { background: var(--store-bg); border-color: var(--store-line); }
.sec-nav a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.sec-nav a.done .dot { background: var(--good); }
.sec-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--store); color: #fff; font-size: 12px; font-weight: 800; margin-right: 6px; }
.sec-nav .sec-n { margin-right: 0; width: 20px; min-width: 20px; height: 20px; font-size: 11px; }
.dcard { border-radius: 14px; border-top: 3px solid var(--store); padding-top: 14px; scroll-margin-top: 120px; }
.dcard h3 { color: var(--text) !important; font-size: 15px !important; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.dcard h3::before { display: none; }
.dcard h3 svg.h-ico { width: 26px; height: 26px; margin-right: 6px; }
.sec-done { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--good); font-weight: 700; }
.sec-done svg.ico { width: 16px; height: 16px; }
.sec-guide { margin: -4px 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.f-label { font-weight: 700; color: var(--text); }
.f-hint { font-size: 11px; color: var(--text-dim); font-weight: 500; line-height: 1.4; }
.save-bar { border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(16, 24, 40, .08); }
.save-bar button.primary { min-height: 44px; font-size: 15px; min-width: 170px; justify-content: center; }
.ro b { color: var(--store-ink); }
.ro b.neg { color: var(--bad); }

/* 表の見出し */
table.list th { background: var(--bg-tint); font-size: 11.5px; letter-spacing: .03em; }
table.list thead th { border-bottom: 2px solid var(--store-line); }
.seg button.on { font-weight: 750; }

/* 設定：テーマカラーの選択 */
.color-pick { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--border); cursor: pointer; font-weight: 650; color: var(--text); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch:has(input:checked) { border-color: var(--sw); background: color-mix(in srgb, var(--sw) 12%, var(--panel)); box-shadow: inset 0 0 0 1px var(--sw); }
.swatch:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--sw) 45%, transparent); }

/* スマホ（〜700px）：タブは画面の下に絵つきで並べる（親指で届く） */
@media (max-width: 700px) {
  header.topbar nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; justify-content: space-around; gap: 0; overflow-x: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--topbar) 96%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); }
  header.topbar nav a { flex: 1 0 auto; min-width: 56px; flex-direction: column; gap: 2px; padding: 5px 6px; font-size: 10.5px; }
  header.topbar nav a svg.ico { width: 21px; height: 21px; }
  header.topbar nav a.active::after { left: 30%; right: 30%; top: -6px; bottom: auto; height: 3px; border-radius: 0 0 3px 3px; }
  main { padding-bottom: 96px; }
  .save-bar { bottom: 64px; }
  .hello { padding: 18px 16px; border-radius: 14px; }
  .hello h1 { font-size: 20px; }
  .page-head h1 { font-size: 20px; }
  .ph-icon { width: 40px; height: 40px; border-radius: 12px; }
  .store-banner .store-seg { margin-left: 0; }
  .sec-nav { top: 56px; overflow-x: auto; flex-wrap: nowrap; }
  .sec-nav a { white-space: nowrap; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards .card .v { font-size: 22px; }
  .intro-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  header.topbar nav, .sec-nav, .intro, .store-seg { display: none !important; }
  .hello { background: none; color: #000; box-shadow: none; padding: 0; } .hello h1, .hello-sum, .hello-sum b { color: #000; }
  .store-banner { border: 0; background: none; padding: 0; }
}

/* 使い方ツアーのボタン（見出しの右・あいさつの帯の中） */
.tour-btn { color: var(--text-dim); border-color: var(--border) !important; background: var(--panel) !important; }
.tour-btn:hover { color: var(--accent-strong); border-color: var(--accent) !important; }
.hello .tour-btn { background: rgba(255, 255, 255, .08) !important; color: #e3ebf0; border-color: rgba(255, 255, 255, .22) !important; position: relative; z-index: 1; }
.hello .tour-btn:hover { background: rgba(255, 255, 255, .16) !important; color: #fff; }
.ph-actions:has(.tour-btn) { display: flex; }

/* 便利な機能（2026-10-20 提案 1〜26・28・31） */
/* 1 保存前の確かめ */
.check-dialog h2 { display: flex; align-items: center; gap: 8px; }
.check-dialog h2 svg.ico { color: var(--warn); width: 22px; height: 22px; }
.check-list { margin: 8px 0; padding-left: 20px; line-height: 1.8; }
.check-list li { margin: 2px 0; }
/* 2 レジの数え方 */
table.coins { max-width: 520px; }
td.coin-btns { white-space: nowrap; }
td.coin-btns button { padding: 3px 9px; margin-right: 3px; min-width: 40px; }
.cash-check { margin: 4px 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-tint); color: var(--text-dim); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.cash-check.ok { background: color-mix(in srgb, var(--good) 12%, var(--panel)); color: var(--good); font-size: 15px; font-weight: 700; }
.cash-check.ng { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); color: var(--bad); font-size: 15px; font-weight: 700; }
.cash-check svg.ico { width: 22px; height: 22px; }
/* 4 写す */
.copy-opts { display: grid; gap: 8px; margin: 8px 0; }
/* 5 下書き・11 保存後の知らせ */
.draft-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.saved-news { font-size: 14px; line-height: 1.9; }
.saved-news .sep { color: var(--text-dim); margin: 0 6px; }
.big-news { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; color: var(--accent-strong); }
/* 9 今日の目標 */
.goal-card .v { color: var(--store-ink); }
/* 10 天気と印 */
.day-marks { display: grid; gap: 10px; margin-bottom: 12px; }
.pill-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.pill { display: inline-flex; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); font-size: 13px; font-weight: 650; color: var(--text-dim); }
.pill input:checked + span { background: var(--store-bg); border-color: var(--store); color: var(--store-ink); box-shadow: inset 0 0 0 1px var(--store); }
.pill input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--store) 40%, transparent); }
#dy-tag-new { width: 160px; min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 999px; }
/* 12 グラフ */
.chart-wrap { overflow-x: auto; }
svg.chart { display: block; max-width: none; }   /* 幅と高さは描いたときの数字（app.js の barChart）。ゆがめない */
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-ax { fill: var(--text-dim); font-size: 10px; }
.ch-bar { fill: var(--store); opacity: .85; }
.ch-bar:hover { opacity: 1; }
.ch-click { cursor: pointer; }
.ch-line { fill: none; stroke: var(--text-dim); stroke-width: 1.6; stroke-dasharray: 4 3; }
.ch-dot { fill: var(--text-dim); }
.ch-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.ch-legend i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.lg-bar { width: 12px; height: 10px; border-radius: 2px; background: var(--store); }
.lg-line { width: 16px; height: 0; border-top: 2px dashed var(--text-dim); }
.chart-panel h2 { margin-bottom: 8px; }
/* 13 期間 */
.preset-seg { margin-bottom: 12px; }
/* 14 損益 */
.pl-table tr.pl-strong td { font-weight: 800; background: var(--bg-tint); }
.pl-pct { display: block; font-size: 11px; font-weight: 500; }
/* 16 印刷用の月報（A4 横 1 枚） */
@media print {
  body.print-month .page-head, body.print-month .toolbar, body.print-month .store-banner .store-seg, body.print-month .notice.warn { display: none !important; }
  body.print-month .chart-panel svg.chart { width: 100% !important; height: auto !important; }
  body.print-month table.list { font-size: 10px; }
  body.print-month table.list td, body.print-month table.list th { padding: 3px 5px; }
  body.print-month .cards .card .v { font-size: 18px; }
  body.print-month .tablewrap { max-height: none !important; overflow: visible !important; }
}
/* 18 棚卸の数え方・20 発注の目安 */
td.qty-cell { white-space: nowrap; display: flex; align-items: center; gap: 4px; }
td.qty-cell input { width: 70px; }
.qbtn { min-width: 34px; min-height: 32px; font-size: 16px; padding: 0 8px; }
.stock-tools { margin-bottom: 8px; }
table.list tr.due td { background: color-mix(in srgb, var(--warn) 7%, var(--panel)) !important; }
/* 21 予約のカレンダー */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-dim); padding: 4px 0; }
.cal-cell { min-height: 84px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); text-align: left; box-shadow: none; font-weight: 500; }
.cal-cell.empty { border: 0; background: transparent; }
.cal-cell:hover { border-color: var(--store); }
.cal-cell.lv1 { background: color-mix(in srgb, var(--store) 8%, var(--panel)); }
.cal-cell.lv2 { background: color-mix(in srgb, var(--store) 16%, var(--panel)); }
.cal-cell.lv3 { background: color-mix(in srgb, var(--store) 26%, var(--panel)); }
.cal-cell.lv4 { background: color-mix(in srgb, var(--store) 38%, var(--panel)); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d { font-weight: 800; font-size: 14px; }
.cal-cell.sat .cal-d { color: var(--sat); } .cal-cell.sun .cal-d { color: var(--sun); }
.cal-n { font-size: 12px; font-weight: 700; color: var(--store-ink); }
.cal-p, .cal-c { font-size: 11.5px; color: var(--text-dim); }
@media (max-width: 700px) { .cal-cell { min-height: 60px; padding: 4px; } .cal-p, .cal-c { display: none; } }
/* 7・8 知らせ */
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); display: flex; gap: 8px; align-items: center; }
.notice.bad svg { width: 18px; height: 18px; flex: none; }
.home-table td.late { background: color-mix(in srgb, var(--bad) 8%, transparent); }
label.check.inline { display: inline-flex; gap: 2px; margin-right: 6px; font-size: 13px; }
td.nowrap, .nowrap { white-space: nowrap; }
/* 3・28 スマレジ・商品別 */
.good-text { color: var(--good, #15803d); font-weight: 700; }
.bad-text2 { color: var(--bad); font-weight: 700; }
.sub-h { margin: 22px 0 8px; font-size: 14px; }
.sub-h .sub { font-weight: 500; color: var(--text-dim); font-size: 12px; margin-left: 6px; }
.card .v.small-v { font-size: 18px; line-height: 1.3; }
.items-table .hbar span { background: var(--store, var(--accent)); }
.abc { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 800; font-size: 12px; }
.abc-A { background: var(--store, var(--accent)); color: #fff; }
.abc-B { background: var(--store-bg, var(--accent-soft)); color: var(--store-ink, var(--accent)); }
.abc-C { background: var(--bg-tint); color: var(--text-dim); }
#dy-from-smaregi { margin-left: 8px; }
/* 31 見出しの「？」（マニュアルの その画面の所を開く） */
.help-q { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 10px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--text-dim); font-size: 13px; font-weight: 800; text-decoration: none; vertical-align: 3px; background: var(--panel); }
.help-q:hover { border-color: var(--accent); color: var(--accent); }
.hello .help-q { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
@media print { .help-q { display: none; } }

/* 会計日報（FileMaker の会計日報の写し。A4 縦 1 枚） */
.kaikei-sheet { background: #fff; color: #000; max-width: 820px; margin: 0 auto 30px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 8px; font-family: "Hiragino Sans", "Yu Gothic", sans-serif; }
.kk-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.kk-title { flex: 1; text-align: center; padding-left: 120px; }
.kk-t1 { display: inline-block; font-size: 22px; letter-spacing: .3em; border-bottom: 2px solid #000; padding: 0 12px 4px; }
.kk-store { font-size: 40px; font-weight: 800; margin-top: 14px; }
.kk-right { font-size: 13px; width: 228px; }
.kk-stamp { border-collapse: collapse; width: 100%; margin-top: 2px; table-layout: fixed; }
.kk-stamp th, .kk-stamp td { border: 1px solid #000; font-weight: 400; font-size: 12px; text-align: center; width: 33.333%; }
.kk-stamp td { height: 72px; }   /* 押印の欄（3 つとも同じ大きさの正方形に近い形） */
.kk-date { font-size: 20px; margin-top: 12px; }
.kk-cap { font-size: 12px; margin: 8px 0 1px; }
table.kk { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
table.kk th, table.kk td { border: 1px solid #000; padding: 2px 5px; height: 21px; color: #000; background: #fff; }
table.kk th { font-weight: 400; text-align: center; white-space: nowrap; }
table.kk td.n { text-align: right; font-variant-numeric: tabular-nums; }
table.kk td.c { text-align: center; white-space: nowrap; }
table.kk td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-funds th:nth-child(6) { width: 22%; } .kk-funds th:nth-child(7), .kk-funds th:nth-child(8) { width: 5%; }
.kk-kinko { text-align: right; font-size: 13px; margin-top: 4px; }
.kk-kinko span { display: inline-block; min-width: 100px; border: 1px solid #000; padding: 1px 6px; text-align: right; margin-left: 6px; }
@media print {
  body.print-kaikei header.topbar, body.print-kaikei .no-print, body.print-kaikei .bottom-tabs, body.print-kaikei nav { display: none !important; }
  body.print-kaikei main, body.print-kaikei #main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.print-kaikei .kaikei-sheet { border: 0; padding: 0; margin: 0; max-width: none; page: kaikei; }
  /* A4 縦（余白 10mm＝使える高さ 277mm）を下まで使う。行の高さはどれも同じ（2026-10-21 所有者「下の余白をなくし、行の高さを均一に大きく」） */
  body.print-kaikei table.kk th, body.print-kaikei table.kk td { height: 5.55mm; padding: 0 4px; font-size: 10.5px; line-height: 1.15; }
  body.print-kaikei .kaikei-sheet { max-height: 272mm; overflow: hidden; }
  body.print-kaikei .kk-head { margin-bottom: 2mm; }
  body.print-kaikei .kk-store { font-size: 30px; margin-top: 6px; }
  body.print-kaikei .kk-right { width: 66mm; font-size: 11.5px; }
  body.print-kaikei .kk-stamp th { height: 5mm; font-size: 10.5px; }
  body.print-kaikei .kk-stamp td { height: 20mm; }   /* 押印の欄：3 つとも 22mm × 20mm */
  body.print-kaikei .kk-date { font-size: 17px; margin-top: 2mm; }
  body.print-kaikei .kk-cap { margin: 1.5mm 0 0.5mm; font-size: 10.5px; }
  body.print-kaikei .kk-kinko { margin-top: 1.5mm; font-size: 11.5px; }
}
/* 会計日報だけ A4 縦（ほかの印刷の @page を変えない名前つきのページ） */
@page kaikei { size: A4 portrait; margin: 10mm; }

/* 月の設定の一覧（2026-10-21） */
.mg-wrap { overflow-x: auto; }
.mg-table { min-width: 1500px; }
.mg-table.mg-basic { min-width: 0; }
.mg-table th, .mg-table td { white-space: nowrap; }
.mg-table th.mg-group { text-align: center; background: var(--bg-tint); color: var(--store-ink, var(--text)); font-size: 12px; }
.mg-table .mg-month { position: sticky; left: 0; background: var(--panel); z-index: 1; text-align: left; }
.mg-table .mg-month small { display: block; font-size: 10px; color: var(--text-dim); font-weight: 400; }
.mg-in { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.mg-table td.mg-sum, .mg-table th.mg-sum { background: var(--bg-tint); font-weight: 700; }
.mg-table tr.mg-cur > th.mg-month { box-shadow: inset 4px 0 var(--store, var(--accent)); }
.mg-table tr.mg-none .mg-in { background: color-mix(in srgb, var(--bg-tint) 60%, transparent); }
.mg-table tr.mg-dirty > th.mg-month { color: var(--warn); }
.mg-table tr.mg-dirty .mg-in { border-color: var(--warn); }

/* 棚卸表の印刷（2026-10-21） */
.stock-sheet { background: #fff; color: #000; max-width: 820px; margin: 0 auto 30px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 8px; }
.sp-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--c); padding-bottom: 8px; margin-bottom: 8px; }
.sp-t { font-size: 22px; font-weight: 800; letter-spacing: .2em; }
.sp-store { font-size: 15px; margin-top: 4px; }
.sp-stamp { border-collapse: collapse; }
.sp-stamp th, .sp-stamp td { border: 1px solid #000; font-size: 11px; font-weight: 400; text-align: center; width: 62px; }
.sp-stamp td { height: 40px; }
.sp-note { font-size: 11.5px; color: #333; margin: 4px 0 8px; } .sp-note.r { text-align: right; }
.sp-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.sp-table th { border-top: 1px solid #000; border-bottom: 1px solid #000; font-weight: 600; padding: 4px; background: #f2f4f8; }
.sp-table td { border-bottom: 1px solid #d8dce4; padding: 3px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-table td small { margin-left: 6px; color: #666; font-size: 10px; }
.sp-table td.n { text-align: right; font-variant-numeric: tabular-nums; } .sp-table td.c { text-align: center; }
.sp-table td.dim { color: #8a93a5; }
.sp-table td.w { border-left: 1px solid #d8dce4; }
.sp-table tr.sp-vendor td { background: color-mix(in srgb, var(--c) 12%, #fff); font-weight: 700; border-bottom: 1px solid #999; }
.sp-table tr.sp-vendor span { float: right; font-weight: 400; font-size: 11px; }
.sp-table tr.sp-sub td { font-weight: 700; border-bottom: 1px solid #999; }
.sp-table tbody.sp-group { break-inside: auto; }
.sp-table thead { display: table-header-group; }
.sp-table tr { break-inside: avoid; }
.sp-total { margin: 10px 0 0 auto; border-collapse: collapse; font-size: 13px; }
.sp-total th, .sp-total td { border: 1px solid #000; padding: 4px 10px; } .sp-total th { font-weight: 400; background: #f2f4f8; } .sp-total td { text-align: right; min-width: 140px; font-variant-numeric: tabular-nums; }
.sp-total tr.b th, .sp-total tr.b td { font-weight: 800; }
.sp-foot { margin-top: 10px; font-size: 10px; color: #8a93a5; text-align: right; }
@media print {
  body.print-stock header.topbar, body.print-stock .no-print, body.print-stock .bottom-tabs, body.print-stock nav { display: none !important; }
  body.print-stock main, body.print-stock #main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.print-stock .stock-sheet { border: 0; padding: 0; margin: 0; max-width: none; page: stock; }
}
@page stock { size: A4 portrait; margin: 12mm; }

/* アイコンを作る（2026-10-21 グループウェアと同じ手順の小窓・ホームの帯） */
dialog.install-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); padding: 22px 24px; }
dialog.install-dialog h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 18px; }
dialog.install-dialog h3 { margin: 16px 0 6px; font-size: 14px; }
.inst-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; line-height: 1.6; }
.inst-mark { display: inline-flex; vertical-align: -3px; margin: 0 2px; }
.inst-mark .ico { width: 16px; height: 16px; }
.inst-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.inst-more summary { cursor: pointer; font-weight: 650; color: var(--text-dim); }
.inst-rule { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.inst-rule .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.inst-rule.warn { color: var(--warn, #b45309); }
.install-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.install-banner .install-banner-text { flex: 1 1 260px; }

/*
 * iPhone・iPad の Safari は、文字が 16px より小さい入力欄を押すと画面を拡大し、そのまま戻らないことがある。
 * 拡大されると下のタブ（ホーム・日報…）や右の［メニュー］が見える範囲の外に出る（2026-10-21 所有者「iPhone で見ると下にメニューが出てこない」）。
 * 指で操作する端末では、入力欄の文字を 16px 以上にして拡大させない
 */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1em) !important; }
}

/*
 * スマホで画面が左右に揺れる・右上の［メニュー］が切れる（2026-10-21 所有者のスクリーンショット）。
 * 上の帯の題名と［メニュー］、下のタブの最小幅の合計が画面より広く、ページ全体が横にはみ出していた（320px で 349px）。
 * 題名は収まらなければ「…」で省き、下のタブは画面の幅を 6 等分する。念のためページ全体は横に動かさない（表は表の中で横に送る）
 */
html, body { overflow-x: clip; }
@media (max-width: 700px) {
  header.topbar { gap: 8px; }
  .topbar .brand { flex: 1 1 auto; min-width: 0; margin-right: 0; overflow: hidden; }
  .topbar .brand img { flex: none; }
  .topbar .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .user { flex: none; }
  .topbar .menu-btn { padding: 8px 10px; }
  header.topbar nav { overflow-x: hidden; padding-left: 2px; padding-right: 2px; }
  header.topbar nav a { flex: 1 1 0; min-width: 0; padding: 5px 2px; }
  header.topbar nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 狭い画面ではチェックの説明文を折り返す（右へはみ出さない。2026-10-21） */
@media (max-width: 700px) {
  label.check:not(.sd-reasons label.check) { white-space: normal !important; max-width: 100%; }
  .f-hint, small.dim { overflow-wrap: anywhere; }
  /* 選ぶ欄は中身の長さで広がらない。権限の表は表の中で横に送る */
  .toolbar select, .toolbar label, .formrow select, .formrow input { max-width: 100%; min-width: 0; }
  table.perm { min-width: 0; width: 100%; }
  table.perm th, table.perm td { padding: 6px 6px; }
}

/* 更新のお知らせ（2026-10-23。グループウェアと同じ見た目の考え方） */
dialog.updates-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 900px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); padding: 22px 24px; }
dialog.updates-dialog h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 18px; }
.up-list { display: grid; gap: 12px; margin-top: 10px; }
.up-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.up-item.is-new { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: inset 4px 0 0 var(--accent); }
.up-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-dim); }
.up-kind { padding: 1px 8px; border-radius: 999px; font-weight: 700; background: var(--panel-2, rgba(0,0,0,.05)); }
.up-kind.is-new { color: #fff; background: #2563b0; }
.up-kind.is-improve { color: #fff; background: #15965a; }
.up-kind.is-fix { color: #fff; background: #a16a07; }
.up-new { color: var(--accent-strong, var(--accent)); font-weight: 700; }
.up-title { margin: 6px 0 4px; font-size: 15px; line-height: 1.5; }
.up-body { margin: 4px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.up-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.up-actions .small-link { font-size: 13px; color: var(--accent-strong, var(--accent)); }
.topbar .up-open { position: relative; }
.up-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.up-badge[hidden], .up-dot[hidden] { display: none; }
.topbar .menu-btn { position: relative; }
.up-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--topbar); }

/* ［スマレジから入れる］のすぐ下の知らせ（2026-10-23） */
.api-msg { flex-basis: 100%; margin-top: 8px; }
.api-msg .msg { margin: 0; }

/* ================================================================ KDS SIGNAGE の画面 */

.ico.flip { transform: scaleX(-1); }
.btnlike { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btnlike:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.btnlike.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btnlike.ghost { border-color: transparent; color: var(--text-dim); background: transparent; }
.btnlike.small { padding: 4px 10px; font-size: 12px; }
button.danger, .btnlike.danger { color: var(--bad); }
button.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: none; }
.warn-text { color: var(--warn); font-weight: 700; }
.bad-text2 { color: var(--bad); }
.dim { color: var(--text-dim); }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.empty-line { color: var(--text-dim); padding: 10px 4px; list-style: none; }
.f-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.f-label.inline { flex-direction: row; align-items: center; margin: 0; }
.f-label textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--panel); color: var(--text); }
.sub-h { margin: 22px 0 10px; font-size: 14px; color: var(--text-dim); }
ol.steps { padding-left: 20px; line-height: 1.8; }

/* 状態の印（つながっている＝緑・届いていない＝赤・つないでいない＝灰） */
.sg-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.sg-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.sg-status.online { color: var(--good); }
.sg-status.online i { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.sg-status.offline { color: var(--bad); }
.sg-status.offline i { background: var(--bad); }

/* モニターのカード */
.sg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 14px; }
.sg-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.sg-card-top { display: flex; justify-content: space-between; align-items: center; }
.sg-card h2 { margin: 6px 0 0; font-size: 18px; }
.sg-card h2 a { color: var(--text); text-decoration: none; }
.sg-card h2 a:hover { color: var(--accent-strong); }
.sg-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; font-size: 13px; }
.sg-facts dt { color: var(--text-dim); }
.sg-facts dd { margin: 0; }
.sg-card .card-actions { display: flex; gap: 8px; margin-top: auto; }

/* 緊急のお知らせの帯 */
.sg-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; color: #fff; background: #c62828; font-size: 15px; }
.sg-alert .ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.sg-alert .dim { color: rgba(255, 255, 255, .8); }
.sg-alert.tone-yellow { background: #f2b705; color: #1d1600; }
.sg-alert.tone-yellow .dim { color: rgba(0, 0, 0, .6); }
.sg-alert.tone-blue { background: #1f5fa8; }
.sg-alert button.primary { background: #fff; color: #222; border-color: #fff; box-shadow: none; }
.sg-alert-off { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; color: var(--text-dim); }
.sg-alert-off .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* モニター 1 台の設定：左が編集・右が下見 */
.sg-back { margin-bottom: 6px; font-size: 13px; }
.sg-back a { color: var(--text-dim); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sg-back .ico { width: 14px; height: 14px; }
.sg-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.sg-preview { position: sticky; top: 74px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.sg-preview-h { font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.sg-preview-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.sg-preview-frame iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; transform: scale(calc(354 / 1920)); }
@media (max-width: 1100px) {
  .sg-split { grid-template-columns: 1fr; }
  .sg-preview { position: static; max-width: 520px; }
  .sg-preview-frame iframe { transform: scale(calc(494 / 1920)); }
}
@media (max-width: 560px) {
  .sg-preview-frame iframe { transform: scale(calc((100vw - 58px) / 1920px)); }
}

.sg-scenes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pill-pick { border-radius: 999px; padding: 6px 14px; }
.pill-pick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-pick small { font-size: 10.5px; opacity: .8; margin-left: 4px; }
.sg-zones { display: grid; gap: 14px; }
.sg-zones.left-right { grid-template-columns: 2fr 1fr; }
@media (max-width: 760px) { .sg-zones.left-right { grid-template-columns: 1fr; } }
.sg-zone h2 { display: flex; align-items: center; gap: 6px; }
.sg-zone h2 .right { margin-left: auto; }
ol.sg-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ol.sg-items > li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--row-alt); }
ol.sg-items > li.off { opacity: .5; }
.sg-thumb { flex: none; width: 72px; height: 42px; border-radius: 6px; background: var(--bg-tint); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--text-dim); }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-thumb .ico, .sg-kind-ico .ico { width: 22px; height: 22px; }
.sg-kind-ico.big .ico { width: 40px; height: 40px; }
.sg-what { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; overflow: hidden; }
.sg-what b { font-size: 11.5px; color: var(--accent-strong); }
.sg-what small { color: var(--text-dim); font-size: 12px; }
.sg-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.save-bar.sg-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; margin-top: 12px; background: linear-gradient(transparent, var(--bg) 30%); }

/* 小窓 */
dialog.sg-dialog { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 22px; box-shadow: var(--shadow-lg); background: var(--panel); color: var(--text); }
dialog.sg-dialog.wide { width: min(680px, calc(100vw - 32px)); }
dialog.sg-dialog h2 { margin-top: 0; }
dialog.sg-dialog input[type="text"], dialog.sg-dialog input[type="url"], dialog.sg-dialog select { width: 100%; }
.sg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; margin-bottom: 12px; }
.sg-pick-item { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 12.5px; }
.sg-pick-item input { display: none; }
.sg-pick-item .sg-thumb { width: 100%; height: 80px; }
.sg-pick-item small { display: block; color: var(--text-dim); }
.sg-pick-item.on { border-color: var(--accent); background: var(--accent-soft); }
.sg-period { margin: 6px 0 12px; font-size: 13px; }
.sg-period summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* 時間割・点ける時間 */
table.sg-sched, table.sg-hours { border-collapse: collapse; width: 100%; font-size: 13px; }
table.sg-sched th, table.sg-sched td, table.sg-hours th, table.sg-hours td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.sg-hours { width: auto; margin-bottom: 12px; }
.sg-days { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-days label.check { font-weight: 500; }
.sg-staff { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sg-staff small { color: var(--text-dim); font-weight: 500; }

/* 素材 */
.sg-drop { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-dim); margin-bottom: 14px; font-size: 13px; }
.sg-drop.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
#md-progress .msg { margin-bottom: 6px; }
.sg-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sg-media-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.sg-media-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--bg-tint); color: var(--text-dim); }
.sg-media-thumb img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.sg-media-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sg-media-name { word-break: break-all; }
.sg-media-body .card-actions { display: flex; gap: 6px; margin-top: 6px; }

/* 休校日 */
.sg-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sg-month h2 { margin-bottom: 8px; }
.sg-week, .sg-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.sg-week span { color: var(--text-dim); font-weight: 700; padding-bottom: 4px; }
.sg-week .sun, .sg-day.sun { color: var(--sun); }
.sg-week .sat, .sg-day.sat { color: var(--sat); }
.sg-day { padding: 5px 0; border: 1px solid transparent; border-radius: 6px; background: transparent; font-size: 12.5px; min-height: 0; box-shadow: none; }
.sg-day:disabled { cursor: default; opacity: 1; }
.sg-day.today { border-color: var(--accent); }
.sg-day.hol { background: var(--bad); color: #fff; font-weight: 700; }
ul.sg-hol-list { columns: 2 240px; margin: 0; padding-left: 18px; line-height: 1.9; font-size: 13px; }
