/* ky-nippo 共通スタイル
   現場のiPad・社内PC・運営画面で共通に使う */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #1a1d21;
  --sub: #5b636d;
  --line: #c9ced6;
  --line-strong: #7b838e;
  --bg: #eef1f5;
  --paper: #fff;
  --accent: #0b57a4;
  --accent-soft: #e8f0fa;
  --warn: #c62828;
  --ok: #1b7a3d;
  --field: #fffdf2;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); }

/* ---------- ヘッダ ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--accent); color: #fff;
}
.appbar h1 { font-size: 18px; margin: 0; font-weight: 700; }
.appbar h1 .dot { color: #e8622a; }
.appbar .spacer { flex: 1; }
.appbar .who { font-size: 13px; opacity: .9; }
.appbar a { color: #fff; text-decoration: none; font-size: 14px; }
.back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;   /* 手袋でも押せるように44px以上 */
  background: rgba(255,255,255,.15); font-size: 20px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }

.mock-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fff6d8; border: 1px solid #e6cf7a; border-radius: 8px;
  font-size: 13px; color: #6b5300;
}

/* ---------- 紙の帳票を模した枠 ---------- */
.paper {
  background: var(--paper);
  border: 2px solid var(--line-strong);
  padding: 14px 16px 20px;
}
.paper-title {
  text-align: center; font-size: 22px; font-weight: 700;
  letter-spacing: .3em; margin: 4px 0 14px;
}

.sec {
  border: 1px solid var(--line-strong);
  margin-bottom: 10px;
}
.sec > h2 {
  margin: 0; padding: 6px 10px;
  font-size: 14px; font-weight: 700;
  background: #e9edf3; border-bottom: 1px solid var(--line-strong);
}
.sec > .body { padding: 10px; }

/* ---------- 入力 ---------- */
label { font-size: 13px; color: var(--sub); display: block; margin-bottom: 3px; }
/* パスワード・メール・月・時刻などの欄も同じ見た目に（抜けていて、その欄だけ素の見た目になっていた） */
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number],
input[type=month], input[type=time], input[type=tel], input[type=search], input[type=url], input[type=datetime-local], textarea, select {
  width: 100%; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--field);
  font-family: inherit; font-size: 16px; color: var(--ink);
}
textarea { resize: vertical; }
input[type=time] { width: auto; }      /* 時刻は文の中に置くことが多い（GENBAの設定の「時刻」など） */
select { background-color: var(--field); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.grid { display: grid; gap: 10px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* チェック（タップしやすく） */
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 15px; cursor: pointer; user-select: none;
}
.chk input { width: 22px; height: 22px; accent-color: var(--accent); }
.chk:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }

/* ---------- テーブル ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: 6px 8px; font-size: 14px; }
th { background: #e9edf3; font-weight: 700; white-space: nowrap; }
td input, td select, td textarea { border: none; background: transparent; padding: 6px 4px; }
td input:focus, td select:focus, td textarea:focus { background: var(--field); }
.num { text-align: center; width: 52px; background: #f4f6f9; font-weight: 700; }

/* リスク評価の結果セル */
.calc { text-align: center; font-weight: 700; background: #f4f6f9; width: 70px; }
.rank { text-align: center; font-weight: 700; width: 70px; }
.rank[data-rank="Ⅴ"], .rank[data-rank="Ⅳ"] { background: #fde8e8; color: var(--warn); }
.rank[data-rank="Ⅲ"] { background: #fff3d9; color: #8a6100; }
.rank[data-rank="Ⅱ"], .rank[data-rank="Ⅰ"] { background: #e8f5ec; color: var(--ok); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.actions .spacer { flex: 1; }

/* ---------- 現場ホームのタイル ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 140px; padding: 20px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  text-decoration: none; color: var(--ink);
}
.tile .ico { display: none; }
.tile .t { font-size: 22px; font-weight: 700; }
.tile .d { font-size: 14px; color: var(--sub); margin-top: 4px; }
.tile.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile.accent .d { color: rgba(255,255,255,.85); }

/* ---------- 広告枠 ---------- */
.ad {
  margin-top: 18px; padding: 14px 16px;
  background: #10375e;
  color: #fff; border-radius: 8px;
  display: flex; align-items: center; gap: 16px;
}
.ad .badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.22); align-self: flex-start;
}
.ad .txt { flex: 1; }
.ad .txt b { display: block; font-size: 17px; margin: 4px 0 2px; }
.ad .txt span { font-size: 13px; opacity: .9; }

/* ---------- 一覧・管理画面 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .meta { font-size: 13px; color: var(--sub); }
.kpi { font-size: 30px; font-weight: 700; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.tag.done { background: #e8f5ec; color: var(--ok); }
.tag.todo { background: #fde8e8; color: var(--warn); }
.tag.draft { background: #eceff3; color: var(--sub); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.toolbar > div { min-width: 160px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.tabs a {
  padding: 10px 18px; text-decoration: none; color: var(--sub);
  font-weight: 700; border-radius: 8px 8px 0 0;
}
/* タブに添える件数（カレンダーの承認待ちなど） */
.tabs .cnt { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.tabs a.on { background: #fff; color: var(--accent); border: 2px solid var(--line); border-bottom: 2px solid #fff; margin-bottom: -2px; }

/* 署名 */
.sign {
  height: 56px; border: 1px dashed var(--line-strong); border-radius: 6px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--sub); font-size: 13px; cursor: pointer;
}
.sign.signed { font-family: "Yu Mincho", serif; font-size: 20px; color: #123; border-style: solid; }

.legend { font-size: 12px; color: var(--sub); }
.legend table { margin-top: 6px; }
.legend th, .legend td { padding: 4px 6px; font-size: 12px; }

.hint { font-size: 12px; color: var(--sub); margin-top: 4px; }

/* ---------- ログイン ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: linear-gradient(160deg, #10375e, #1d6fb8);
}
.login-box {
  width: 100%; max-width: 420px; background: #fff;
  border-radius: 16px; padding: 30px 28px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.login-box h1 { margin: 0 0 4px; font-size: 22px; }

/* ---------- tabana.（入口と会社で src/brand.js が差し込む名前。ＫＹ・作業日報には出ない） ---------- */
.brand-mark { display: inline-flex; align-items: center; }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.brand-name .dot { color: #e8622a; }
.brand-maker { font-size: 12px; font-weight: 400; color: var(--sub); margin-top: 3px; }
.login-box h1 .brand-mark { margin: 2px 0 12px; }
.brand-top { margin-bottom: 14px; }
.brand-top:empty { display: none; }
.login-box .lead { margin: 0 0 22px; font-size: 13px; color: var(--sub); }
.login-box label { margin-top: 14px; }
.login-box .btn { width: 100%; margin-top: 22px; }
.error {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: #fde8e8; color: var(--warn); font-size: 14px;
}
.pw-out {
  margin-top: 10px; padding: 12px 14px; border-radius: 8px;
  background: #e8f5ec; border: 1px solid #9ed3b0;
  font-family: Consolas, monospace; font-size: 18px; letter-spacing: .05em;
}

/* ---------- ダイアログ（追加・編集用） ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20,25,32,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal {
  background: #fff; border-radius: 14px; padding: 24px;
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  box-shadow: 0 16px 50px rgba(0,0,0,.3);
}
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .sub { margin: 0 0 18px; font-size: 13px; color: var(--sub); }
.modal .row { margin-bottom: 12px; }
.modal .actions { margin-top: 20px; }

.danger { color: var(--warn); border-color: #e6a5a5; }
.danger-zone {
  margin-top: 26px; padding: 16px; border: 1px solid #e6a5a5;
  border-radius: 10px; background: #fdf6f6;
}
.danger-zone h3 { margin: 0 0 6px; font-size: 15px; color: var(--warn); }

.ok-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: #e8f5ec; border: 1px solid #9ed3b0; font-size: 14px;
}
.copy-line {
  display: flex; gap: 8px; align-items: center; margin-top: 8px;
  font-family: Consolas, monospace; font-size: 14px; word-break: break-all;
}
.chk-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.chk-row input { width: 20px; height: 20px; accent-color: var(--accent); }

/* 署名パッド */
.sig-pad {
  width: 100%; height: 180px; touch-action: none;
  border: 2px dashed var(--line-strong); border-radius: 10px;
  background: #fff; display: block;
}
.sign img { max-height: 46px; max-width: 100%; display: block; margin: 0 auto; }
.sign.signed { border-style: solid; padding: 2px; }

/* ================= 印刷（元請へ提出するPDF） =================
   画面のヘッダー・ボタン・タブは紙に出さない。
   紙の様式に近い体裁で1枚に収める。 */
@media print {
  @page { size: A4 landscape; margin: 8mm; }

  html, body { background: #fff !important; font-size: 10.5pt; }

  /* 画面のための部品は消す。
     ⚠️ .no-print は「紙の様式に無い欄」に付ける。
        元請へ出す紙に、こちらの都合で足した欄が載らないようにするため
        （入場した協力会社と人数＝集計用の欄など）。 */
  .appbar, .tabs, .toolbar, .actions, .btn, .hint, .mock-note,
  .modal-bg, .back, .ad, #pwOut, .foot, .no-print { display: none !important; }

  .wrap { max-width: none; margin: 0; padding: 0; }

  .paper {
    border: 1.5pt solid #000; padding: 6mm;
    box-shadow: none; break-inside: avoid;
  }
  .paper-title { font-size: 16pt; margin: 0 0 4mm; letter-spacing: .25em; }

  .sec { border: 0.8pt solid #000; margin-bottom: 2.5mm; break-inside: avoid; }
  .sec > h2 {
    background: #eee !important; border-bottom: 0.8pt solid #000;
    font-size: 10pt; padding: 1.2mm 2mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .sec > .body { padding: 2mm; }

  table { border-collapse: collapse; width: 100%; }
  th, td { border: 0.6pt solid #000; padding: 1.2mm 1.8mm; font-size: 9.5pt; }
  th {
    background: #eee !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* 入力欄は枠線を消して、書かれた文字だけが残るようにする */
  input, textarea, select {
    border: 0 !important; background: transparent !important;
    padding: 0 !important; font-size: 9.5pt; color: #000 !important;
    -webkit-appearance: none; appearance: none;
  }
  textarea { resize: none; overflow: visible; height: auto !important; }
  select { background-image: none !important; }

  /* 危険度の色は薄い網掛けに落として、白黒でも読めるようにする */
  .rank, .calc {
    background: #f2f2f2 !important; color: #000 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* チェック項目は □ / ■ で表す */
  .checks { display: block; }
  .chk {
    display: inline-block; border: 0; padding: 0 3mm 0 0;
    min-height: 0; font-size: 9.5pt; background: transparent !important;
  }
  .chk input { display: none; }
  .chk::before { content: '☐ '; }
  .chk:has(input:checked)::before { content: '☑ '; font-weight: 700; }

  .sign { border: 0.6pt solid #000; height: auto; min-height: 10mm; }
  .sign img { max-height: 9mm; }
  .legend { font-size: 8pt; }

  a { text-decoration: none; color: #000; }
}

/* 写真の添付（任意） */
.photo-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.photo-actions .hint { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-item {
  position: relative; aspect-ratio: 4/3; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: #f4f6f9;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item.photo-loading {
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--sub); border-style: dashed;
}
.photo-del {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: rgba(20,25,32,.72); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
}
/* 提出済みの表示 */
.photo-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.photo-view a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.photo-view img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

@media print {
  .photo-actions, .photo-del { display: none !important; }
  .photo-grid, .photo-view { grid-template-columns: repeat(3, 1fr); gap: 3mm; }
  .photo-item, .photo-view a { border: 0.6pt solid #000; break-inside: avoid; }
}

/* ===== 作業員の署名（日報）=====
   1台のiPadを回して1人ずつ書く。タップ先は44px以上を保つ */
.ws-add{display:flex; gap:8px; margin-bottom:10px}
.ws-add .ws-name{flex:1; min-height:44px}
.ws-list{display:flex; flex-direction:column; gap:6px}
.ws-item{display:flex; align-items:center; gap:10px; padding:6px 8px;
  border:1px solid var(--line); border-radius:8px; background:#fff}
.ws-no{flex:none; width:26px; height:26px; border-radius:50%; background:var(--line);
  display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--sub)}
.ws-who{flex:none; width:9em; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ws-img{flex:1; max-height:44px; min-width:0; object-fit:contain; object-position:left center}
@media (max-width:480px){ .ws-who{width:6em; font-size:13px} }

/* 紙に出すときは、消すボタンを出さない */
@media print{
  .ws-add, .ws-del, .ws-hint{display:none !important}
  .ws-item{border:none; padding:2px 0}
}

/* ===== フォーマットの編集モード ===== */
.tpl-edit-bar{margin:0 0 14px; padding:12px 14px; border-radius:10px;
  background:#fff7ed; border:1px solid #fed7aa; color:#7c2d12; line-height:1.7}
.tpl-edit-bar b{display:block; margin-bottom:2px}
.tpl-edit-bar span{font-size:13px}
@media print{ .tpl-edit-bar{display:none !important} }


/* ---------- ホーム（スマホ前提。市販の業務アプリと同じ作り） ----------
   上に「今日やること」の一覧、下に業務の大きなボタン、いちばん下に固定のタブ。 */
.home .wrap { padding: 12px 12px 90px; }
.home .appbar h1 { font-size: 18px; }
.home-sec { font-size: 13px; color: var(--sub); font-weight: 600; margin: 16px 4px 8px; }
.today { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.today .h { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 8px; font-size: 15px; font-weight: 700; }
.today .h span { font-size: 13px; color: var(--sub); font-weight: 400; }
.task { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px; border-top: 1px solid #e6e9ee; text-decoration: none; color: var(--ink); }
.task:active { background: #f4f6f9; }
.task .mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9ced6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.task .mark.ok { background: var(--ok); border-color: var(--ok); }
.task .mark.ok::after { content: ''; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.task .mark.ng { border-color: var(--warn); }
.task .t { flex: 1; font-size: 16px; font-weight: 600; line-height: 1.3; }
.task .s { font-size: 14px; color: var(--sub); white-space: nowrap; }
.task .s.ng { color: var(--warn); font-weight: 700; }
.task .s.ok { color: var(--ok); font-weight: 600; }
.task .chev { color: #aab1ba; font-size: 22px; line-height: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gbtn { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-height: 118px; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); text-align: center; }
.gbtn:active { background: var(--accent-soft); border-color: var(--accent); }
.gbtn svg { width: 36px; height: 36px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gbtn .t { font-size: 16px; font-weight: 700; line-height: 1.3; }
.gbtn .d { font-size: 12px; color: var(--sub); line-height: 1.4; }
.gbtn.accent { background: #fff; border-color: var(--line); color: var(--ink); }
.gbtn.accent svg { stroke: var(--accent); }
.gbtn.accent .d { color: var(--sub); }
.gbtn.wide { grid-column: 1 / -1; min-height: 56px; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 10px 16px; text-align: left; }
.gbtn.wide svg { width: 26px; height: 26px; stroke: var(--sub); }
.gbtn.wide .t { font-size: 15px; font-weight: 600; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; text-decoration: none; color: var(--sub); font-size: 11px; font-weight: 600; }
.tabbar a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--accent); }
@media (max-width: 480px) {
  .appbar h1 { font-size: 16px; }
  .appbar .who { font-size: 12px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- ホーム：LINE のリッチメニューと同じ見え方 ----------
   画面いっぱいに色の面を敷き、大きな字と大きな絵で押す所を示す。細かい文字を置かない。 */
.home .wrap { padding: 6px 6px 70px; max-width: 720px; }
.rmgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; grid-auto-rows: auto; }
.rmenu { position: relative; border-radius: 8px; color: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 8px; text-align: center; min-height: 190px; }
.rmenu:active { filter: brightness(.92); }
.rmenu svg { width: 64px; height: 64px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.rmenu .lbl { font-size: 26px; font-weight: 900; line-height: 1.15; letter-spacing: .02em; }
.rmenu .sub { font-size: 13px; opacity: .9; }
.rmenu .badge { position: absolute; top: 8px; right: 8px; background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.rmenu .badge.ng { color: #c62828; }
.rmenu .badge.ok { color: #1b7a3d; }
.rmenu-green  { background: linear-gradient(180deg, #2e7d32, #1b5e20); }
.rmenu-orange { background: linear-gradient(180deg, #ef6c00, #bf360c); }
.rmenu-blue   { background: linear-gradient(180deg, #1565c0, #0d47a1); }
.rmenu-red    { background: linear-gradient(180deg, #d32f2f, #b71c1c); }
.rmenu-teal   { background: linear-gradient(180deg, #00897b, #00695c); }
.rmenu-purple { background: linear-gradient(180deg, #7b1fa2, #4a148c); }
.rmenu-gray   { background: linear-gradient(180deg, #607d8b, #455a64); }
.rmenu-indigo { background: linear-gradient(180deg, #3949ab, #283593); }
.rmenu.wide { grid-column: 1 / -1; min-height: 100px; flex-direction: row; gap: 16px; }
.rmenu.wide svg { width: 44px; height: 44px; margin: 0; }
.rmenu.wide .lbl { font-size: 22px; }
@media (min-width: 600px) { .rmgrid { grid-template-columns: 1fr 1fr 1fr; } }
/* カレンダーをボタンの下に出すホームは、並び（2つずつ・一番下がカレンダー）を保つため2列のまま */
.rmgrid.two { grid-template-columns: 1fr 1fr; }

/* ---------- ホームのカレンダー（月・週・日） ---------- */
.hc { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.hc-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hc-title { font-weight: 700; font-size: 16px; }
.hc-sw, .hc-nav { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.hc-sw button, .hc-nav button { border: 0; border-right: 1px solid var(--line); background: #fff; padding: 8px 12px; font-size: 14px; min-height: 38px; color: var(--ink); }
.hc-sw button:last-child, .hc-nav button:last-child { border-right: 0; }
.hc-sw button.on { background: var(--accent); color: #fff; font-weight: 700; }
.hc-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.hc-grid .dw { font-size: 12px; text-align: center; padding: 4px 0; background: #f4f6f8; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hc-grid .dw.sun, .hc-cell.sun .dn { color: #c62828; }
.hc-grid .dw.sat, .hc-cell.sat .dn { color: #1565c0; }
.hc-cell { min-height: 64px; padding: 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.hc-cell.out { background: #f7f8fa; }
.hc-cell.out .dn { color: #9aa1a9; }
.hc-cell .dn { font-size: 12px; font-weight: 700; }
.hc-cell.today .dn { display: inline-block; min-width: 20px; text-align: center; border-radius: 10px; background: var(--accent); color: #fff; }
.hc-ev { display: block; font-size: 11px; line-height: 1.35; margin-top: 2px; padding: 1px 3px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-more { font-size: 11px; color: var(--sub); }
.hc-list .hc-day { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.hc-list .hc-day:last-child { border-bottom: 0; }
.hc-list .hc-dl { font-size: 13px; font-weight: 700; }
.hc-list .hc-dl.today { color: var(--accent); }
.hc-list .hc-item { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; margin-bottom: 4px; border-radius: 4px; font-size: 14px; }
.hc-list .hc-item .t { font-size: 12px; white-space: nowrap; }
.hc-empty { font-size: 13px; color: var(--sub); padding: 6px 2px; }

/* ── 画面の中のお知らせ（ベル）────────────────────────
   どの画面の右上にも同じ形で出す。未読は数字で分かるようにする */
.bell-wrap { position: relative; display: inline-block; vertical-align: middle; }
.bell { background: none; border: 0; padding: 4px 6px; cursor: pointer; line-height: 0; color: inherit; }
.bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-n { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #c62828; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-list { position: fixed; right: 12px; top: 56px; width: 320px; max-width: calc(100vw - 24px); max-height: 60vh; overflow-y: auto;
  background: #fff; color: #1a1d21; border: 1px solid #c9ced6; border-radius: 6px; z-index: 60;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); }
/* ⚠️ 画面の右上に固定して出す。ベルの真下に出すと、名前が長い会社では
   画面の左にはみ出して読めなくなる（appbar の中で押し出されるため） */
/* ⚠️ 色は必ずここで決める。上のバーの中に置くので、何も書かないと
   `.appbar a { color: #fff }` が勝って**白い字が白い紙に乗る**（一度やった） */
.bell-list .bell-item { display: block; padding: 10px 12px; border-bottom: 1px solid #e1e5ea; text-decoration: none; color: #1a1d21; }
.bell-list .bell-item:last-child { border-bottom: 0; }
.bell-list .bell-item.unread { background: #e8f0fa; }
.bell-list .bell-item b { display: block; font-size: 14px; }
.bell-list .bell-item .when { font-size: 11px; color: #5b636d; }
.bell-list .bell-item .body { display: block; font-size: 12px; color: #444; margin-top: 2px; }
.bell-empty { padding: 14px 12px; font-size: 13px; color: #5b636d; margin: 0; }

