/* ECナビ（PRJ-236）画面側の見た目
   土台＝PRJ-218デモ。配色・部品は画面イメージ v2（2026-08-28）を正とする */

:root {
  --brand: #1F2850;        /* ECC紺（主役） */
  --brand-light: #2E3A69;  /* 紺の明るめ */
  --accent: #249CA8;       /* 青緑（差し色） */
  --bg: #ECEEF0;
  --card: #ffffff;
  --text: #414D58;
  --sub: #8A97A0;
  --line: #E1E8EE;
  --ok: #186C54;           /* 緑（承認・成功） */
  --ng: #E03862;           /* 赤（必須・差し戻し・バッジ） */
  /* 画面イメージ v2 の部品トークン */
  --teal-l: #EAF6F8;       /* 青緑のうす地 */
  --teal-text: #157E8C;    /* 青緑の文字色 */
  --green-l: #E9F2EE;      /* 緑のうす地 */
  --orange: #D97E22;       /* 期限間近など */
  --tx2: #515A61;          /* 本文の2番目の濃さ */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* ★hidden を付けた要素は必ず隠す。
   下の .modal / .ios-guide で display を指定しているため、これが無いと常に開いたままになる */
[hidden] { display: none !important; }

/* ★画面を固定する（アプリらしい挙動にする）
   ・body を固定して、iPhoneの「ゴムのように跳ね返る」動きを止める
   ・中身のスクロールは main の中だけで起きる（必要なスクロールは残る）
   ・touch-action: manipulation でダブルタップの拡大を止める
   ・文字欄は16px以上にする＝これが「タップすると勝手に拡大する」の唯一の直し方 */
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  background: #fff; /* 画面の外側（iPhone の下の余り等）に地の色が塗られても、灰色でなく白＝タブ帯の続きに見える（2026-09-10） */
}
body {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* 本体は「見えている高さ」いっぱいの縦並び。キーボードが出たら --vh が縮む（app.jsが更新） */
#app-shell {
  position: absolute;
  inset: 0;
  height: 100%; /* ふだんは画面いっぱい。キーボードが出ている間だけ --vh（末尾の kb-open 節） */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; touch-action: manipulation; }
input, textarea, select { touch-action: manipulation; }

/* ---------- ヘッダー ---------- */
.app-header {
  flex: none;      /* 固定レイアウトなので sticky は不要 */
  z-index: 20;
  background: var(--brand);
  color: #fff;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-header-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
/* ★ECナビのマーク（羅針盤・白い角丸タイル）。ヘッダーの紺の上でも読める */
.logo-mark {
  width: 26px; height: 26px; flex: none;
  background: url("ecnavi_mark.svg") center/contain no-repeat;
}
.app-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.company { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-badge {
  flex: none; font-size: 10px; letter-spacing: .05em; background: var(--accent);
  padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.app-header-side { display: flex; align-items: center; gap: 8px; flex: none; }
.points { font-size: 12px; background: rgba(255,255,255,.16); padding: 3px 8px; border-radius: 999px; }
.who-switch {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.14); color: #fff; border: 0;
  padding: 3px 8px 3px 3px; border-radius: 999px;
}
.who-name { font-size: 12px; max-width: 5.5em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.caret { font-size: 10px; opacity: .8; }

.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #8aa; color: #fff; font-size: 12px; font-weight: 700;
}
.avatar.big { width: 52px; height: 52px; font-size: 22px; }

.who-sheet {
  position: fixed; top: calc(var(--safe-top) + 52px); right: 10px; z-index: 30;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 10px; width: 240px;
}
.who-sheet-title { margin: 2px 4px 8px; font-size: 12px; color: var(--sub); }
.who-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; padding: 8px; border-radius: 9px; text-align: left;
}
.who-item:hover { background: #f4f6f5; }
.who-item.is-on { background: #eaf1ef; }
.who-item .nm { font-weight: 600; font-size: 14px; }
.who-item .rl { font-size: 11px; color: var(--sub); }

/* ---------- 本体 ---------- */
/* スクロールするのはここだけ。外へスクロールが伝わらないようにして跳ね返りを消す */
main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 20px;
  width: 100%;
  max-width: none; /* スクロール箱は窓いっぱい＝縦スクロールのバーが窓の右端に付く（2026-09-11 要望）。中身の幅は下の .tab-panel で絞る */
  margin: 0 auto;
}
.section-title {
  font-size: 13px; color: var(--sub); font-weight: 700; margin: 18px 2px 8px;
  display: flex; align-items: center; gap: 8px;
}
.count-badge { background: var(--accent); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 999px; }
.loading, .hint { color: var(--sub); font-size: 12px; margin: 6px 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; word-break: break-all; }

.filter-row { display: flex; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 0 8px; }
.chip {
  flex: none; background: #fff; border: 1px solid var(--line); color: var(--sub);
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
}
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.post-box { margin-bottom: 10px; }
.post-open {
  width: 100%; background: #fff; border: 1px dashed #c6d1ce; color: var(--sub);
  padding: 12px; border-radius: 12px; text-align: left;
}

.card-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border-radius: 12px; padding: 13px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.card-head .nm { font-weight: 600; font-size: 14px; }
.card-head .meta { font-size: 11px; color: var(--sub); }
.tag {
  margin-left: auto; flex: none; font-size: 11px; font-weight: 700;
  background: #eef3f1; color: var(--brand-light); padding: 2px 8px; border-radius: 6px;
}
.card-body { white-space: pre-wrap; word-break: break-word; }
/* 長文欄が複数ある申請は見出しを付けて区切って出す */
.card-body .body-sec { margin: 0 0 10px; }
.card-body .body-sec:last-child { margin-bottom: 0; }
.card-body .body-lb { display: block; font-size: 11px; font-weight: 700; color: var(--teal-text); margin-bottom: 2px; }

/* ---------- タイムラインの投稿カード（ホーム画面イメージの形） ---------- */
.post .p-head { display: flex; align-items: center; gap: 9px; }
.post .who { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-tag { font-size: 10px; font-weight: 700; color: var(--teal-text); background: var(--teal-l); border-radius: 5px; padding: 1px 6px; flex: none; }
.post .meta { font-size: 11px; color: var(--sub); }
.p-act { font-size: 12px; color: var(--tx2); margin: 8px 0 2px; }
.p-act a { color: var(--teal-text); font-weight: 700; text-decoration: none; }
.fields { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.fields .f .k { font-size: 11px; font-weight: 700; color: var(--sub); margin-bottom: 1px; }
.fields .f .v { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.65; }
.p-foot { display: flex; align-items: center; gap: 7px; margin-top: 11px; }
.stamp {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--tx2);
}
.stamp.mine { background: var(--teal-l); border-color: var(--accent); color: var(--teal-text); font-weight: 700; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 4px; }
.kv div { font-size: 13px; }
.kv b { font-weight: 700; }
.kv span { color: var(--sub); font-size: 11px; margin-right: 4px; }
.card-foot {
  display: flex; align-items: center; gap: 14px; margin-top: 10px;
  padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; color: var(--sub);
}
.react-btn { background: none; border: 0; color: var(--sub); padding: 0; font-size: 13px; }
.react-btn.is-on { color: var(--accent); font-weight: 700; }

.status {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; flex: none;
}
.status.pending { background: #fff3e2; color: #a2650f; }
.status.approved { background: #e6f4ec; color: var(--ok); }
.status.rejected { background: #fbeceb; color: var(--ng); }

/* ---------- チャット ---------- */
.room-list { display: flex; flex-direction: column; gap: 1px; border-radius: 12px; overflow: hidden; }
.room {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 0; padding: 13px 14px;
}
.room .nm { font-weight: 600; }
.room .last { font-size: 12px; color: var(--sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.room .col { min-width: 0; flex: 1; }
.room .badge { background: var(--accent); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; flex: none; }

/* チャットは「入れ物の高さいっぱい」にする。高さを計算で決めるとキーボードが出たときにずれる */
main.chat-mode { padding-bottom: 0; }
main.chat-mode > .tab-panel[data-tab="chat"] { height: 100%; display: flex; flex-direction: column; min-height: 0; }
main.chat-mode #room-list { overflow-y: auto; overscroll-behavior: contain; }
.chat-view { display: flex; flex-direction: column; flex: 1 1 auto; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.back { background: none; border: 0; color: var(--brand-light); padding: 0; font-size: 13px; }
.chat-room-name { font-weight: 700; }
.chat-messages {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: #fff; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
/* 吹き出し（画面イメージS-01-2：名前・店舗・時刻の1行＋白吹き出し。自分は青緑のうす地で右） */
.msg { display: flex; gap: 8px; max-width: 88%; }
.msg .mcol { min-width: 0; }
.msg .mh { font-size: 11px; color: var(--tx2); margin-bottom: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.msg .mh b { font-size: 12px; }
.msg .mh-store { color: var(--sub); }
.msg .mh-time { color: var(--sub); font-size: 10.5px; }
.msg .mh.is-mine { justify-content: flex-end; }
/* 吹き出しの色（2026-10-31 ECC さん要望⑯：PC で相手も自分も白い背景に同化して見づらい）
   相手＝薄い灰色の地、自分＝青緑の地。どちらも白い画面の上で縁が分かる濃さにする */
.msg .bubble {
  background: #F1F4F6; border: 1px solid #D5DDE3; padding: 9px 12px;
  border-radius: 0 12px 12px 12px; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.msg .time { font-size: 10px; color: var(--sub); margin-top: 3px; }
/* メッセージの下のスタンプ（F-01-04）。ポップはこの行を基準に上へ出す */
.msg .msg-stamps { position: relative; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.msg .msg-stamps .stamp { padding: 2px 8px; font-size: 11px; }
.msg.mine .msg-stamps { justify-content: flex-end; }
.msg.mine .msg-stamps .stamp-pop { left: auto; right: 0; }
.stamp-pop.below { bottom: auto; top: calc(100% + 6px); }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg.mine .bubble { background: #D4ECF0; border-color: #9FCFD7; border-radius: 12px 0 12px 12px; }
.msg.mine .time { text-align: right; }
.read-mark { font-size: 10px; color: var(--sub); text-align: right; margin-top: -4px; }
/* 宛先のあとに改行して本文を書けるよう、入力欄は複数行（textarea）。
   高さは中身に合わせて app.js が伸ばす（1行のときは丸い枠のまま見えるよう半径を21pxに） */
.chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.chat-form textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 21px; padding: 10px 14px;
  font-size: 16px; line-height: 1.4; background: #fff; resize: none; overflow-y: auto;
  font-family: inherit; min-height: 42px; max-height: 132px;
}
.chat-form button {
  flex: none; border: 0; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 0 18px; height: 42px; font-weight: 700;
}

/* ---------- 制度 ---------- */
.template-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tpl {
  background: #fff; border: 0; border-radius: 12px; padding: 12px; text-align: left;
  display: flex; flex-direction: column; gap: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tpl .ic { font-size: 20px; }
.tpl .nm { font-weight: 700; font-size: 14px; }
.tpl .cat { font-size: 11px; color: var(--sub); }
.tpl .anon { font-size: 10px; color: var(--accent); font-weight: 700; }

.approval-inbox { background: #fff8ee; border: 1px solid #f2dfc4; border-radius: 12px; padding: 10px 12px; }
.approval-inbox .section-title { margin-top: 4px; }
.approval-item { background: #fff; border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; }
.approval-actions { display: flex; gap: 8px; margin-top: 9px; }
.approval-actions button { flex: 1; border: 0; border-radius: 8px; padding: 9px; font-weight: 700; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ng { background: #fff; color: var(--ng); border: 1px solid var(--ng) !important; }

/* ---------- 通知 ---------- */
.notice-card { background: #fff; border-radius: 12px; padding: 14px; }
.notice-card.small p { font-size: 12px; color: var(--sub); margin: 4px 0; }
.notice-state { font-weight: 600; margin: 0 0 10px; }
.primary-btn {
  width: 100%; border: 0; background: var(--brand); color: #fff; font-weight: 700;
  padding: 13px; border-radius: 10px;
}
.primary-btn:disabled { background: #b9c6c3; }
.ghost-btn {
  width: 100%; margin-top: 8px; background: #fff; color: var(--brand);
  border: 1px solid var(--brand); font-weight: 700; padding: 11px; border-radius: 10px;
}
.mini-btn { margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 2px 9px; font-size: 11px; color: var(--sub); }

.log-list { display: flex; flex-direction: column; gap: 4px; }
.log-row {
  background: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px;
  display: flex; gap: 9px; align-items: baseline;
}
.log-row .at { color: var(--sub); font-variant-numeric: tabular-nums; flex: none; font-size: 11px; }
.log-row .kd { font-weight: 700; flex: none; }
.log-row .kd.sent { color: var(--brand-light); }
.log-row .kd.recv { color: var(--ok); }
.log-row .kd.err { color: var(--ng); }
.log-row .dt { color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mypage-head { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 12px; padding: 14px; }
.my-name { margin: 0; font-weight: 700; font-size: 17px; }
.my-role { margin: 0; font-size: 12px; color: var(--sub); }
.pt-line { margin: 0; }
.pt-line strong { font-size: 20px; color: var(--accent); margin-left: 6px; }

/* ---------- 下のタブ ---------- */
.tabbar {
  flex: none; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  display: flex;
}
.tab {
  flex: 1; background: none; border: 0; color: var(--sub);
  font-size: 10px; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative;
}
.tab .ic { font-size: 19px; line-height: 1; }

/* ★いま見ているタブをはっきり見せる（2026-07-27 要望）
   色と太字だけの違いだと、どのタブを見ているのか一目で分からなかった。
   選択中はアイコンを「濃い緑の帯」で囲い、アイコンを白く抜く。文字も濃く太くする。 */
.tab::before {
  content: ''; position: absolute; top: 3px; left: 50%;
  width: 44px; height: 30px; margin-left: -22px; border-radius: 999px;
  background: transparent; transition: background .15s ease;
}
.tab .ic { position: relative; z-index: 1; }   /* アイコンを帯より前に出す */
.tab.is-on::before { background: var(--brand); }
.tab.is-on { color: var(--brand); font-weight: 700; }
.tab.is-on .ic { color: #fff; }

/* メニューの印＝赤いバッジ（2026-09-10 ：気づかないので目立たせる）。件数が入る。空のときは大きめの赤い点 */
.tab .dot {
  position: absolute; top: 1px; right: 50%; margin-right: -26px;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  background: #E0413A; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; letter-spacing: 0;
  box-shadow: 0 0 0 2px #fff;          /* 帯の上に乗っても見えるように白フチ */
  z-index: 2; animation: badge-in .25s ease-out;
}
.tab .dot:empty { min-width: 12px; width: 12px; height: 12px; padding: 0; margin-right: -22px; top: 3px; }
@keyframes badge-in { from { transform: scale(.5); } to { transform: scale(1); } }

/* ★チャットを打っているあいだは下のタブを隠す（2026-07-27 指摘）
   入力欄とキーボードの間にタブが挟まって邪魔だったため。入力欄から離れれば戻る。

   ⚠️ 「キーボードが出ているか」を画面の高さの差（kb-open）で見る手は、
     Safariのタブでは効かない（キーボードが出ると window.innerHeight のほうも一緒に縮むため
     差がほとんど出ない）。なので “入力欄にカーソルがあるか” で判定している。 */
/* ★「> 」＝画面の下に置かれているときだけ。ヘッダーの中へ移したパソコン表示では隠さない */
#app-shell.typing > .tabbar { display: none; }

/* ---------- 入力画面・お知らせ ---------- */
/* ★入力画面は「実際に見えている範囲」に合わせる。
   position:fixed の inset:0 は“キーボードに隠れている分も含めた”画面全体を指すので、
   そのままだとカードがキーボードの裏に潜り込む（2026-07-27 報告）。
   --vh（見えている高さ）と --vv-top（ずれた分）は app.js が実時間で更新している。 */
.modal {
  position: fixed; left: 0; right: 0;
  top: var(--vv-top, 0px);
  height: 100%; /* キーボードが出ている間だけ --vh（末尾の kb-open 節） */
  z-index: 40; background: rgba(20,28,26,.45);
  /* 窓はページの中央に（2026-09-10 ：下から出てくるのをやめる）。スマホは下の節で全画面 */
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.modal-card {
  background: #fff; width: 100%; max-width: 560px; border-radius: 16px;
  padding: 16px 16px calc(var(--safe-bottom) + 16px);
  max-height: calc(100% - 8px); overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-shadow: 0 18px 48px rgba(0,0,0,.25);
  animation: md-in .18s ease-out;
}
@keyframes md-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
/* キーボードが出ている間は、下の余白（ホームバーぶん）が二重になるので詰める */
.modal.kb-open .modal-card { padding-bottom: 12px; }
.modal-head { display: flex; align-items: center; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.modal-close { margin-left: auto; background: none; border: 0; font-size: 18px; color: var(--sub); }
.modal-desc { font-size: 12px; color: var(--sub); margin: 0 0 12px; }
.modal-form label { display: block; margin-bottom: 12px; }
.modal-form .lb { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; font-weight: 600; }
.modal-form input, .modal-form textarea, .modal-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-size: 16px; font-family: inherit; background: #fcfdfd;
}
.modal-form textarea { min-height: 88px; resize: vertical; }
.modal-form .row-suffix { display: flex; align-items: center; gap: 7px; }
.modal-form .row-suffix input { flex: 1; }
.modal-form .sfx { font-size: 13px; color: var(--sub); }
/* 入力欄ごとの「ここには何を書くか」の説明文（F-03-04） */
.modal-form .fld-help { display: block; font-size: 11px; color: var(--sub); margin-top: 4px; line-height: 1.5; }

/* ---------- 承認待ち箱（S-05-2） ---------- */
.app-card { display: flex; gap: 9px; align-items: flex-start; padding: 12px 13px; margin-bottom: 8px; }
.app-card.is-stale { border-left: 3px solid var(--ng); }
.app-chk { flex: none; padding-top: 2px; margin: 0; }
.app-chk input { width: 17px; height: 17px; accent-color: var(--ok); }
.app-main { flex: 1; min-width: 0; }
.app-tt { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-sub { font-size: 11.5px; color: var(--sub); margin-top: 3px; }
.stale-note { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ng); background: #FCE9EE; border-radius: 6px; padding: 2px 8px; margin-top: 6px; }
.app-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.app-acts button { border: 0; border-radius: 8px; padding: 7px 13px; font-size: 12px; font-weight: 700; }
.bulk-bar {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
  background: var(--teal-l); border: 1px solid var(--accent); border-radius: 10px;
  padding: 9px 12px; margin-top: 4px;
}
.bulk-bar .btn-ok { margin-left: auto; border: 0; border-radius: 8px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; }
/* 承認の流れ（S-05-2 自分の申請：どの段で止まっているか） */
.route { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.rstep { font-size: 11px; font-weight: 700; color: var(--sub); background: #F1F4F3; border-radius: 999px; padding: 4px 10px; }
.rstep.done { color: var(--ok); background: var(--green-l); }
.rstep.now { color: #fff; background: var(--brand-light); }
.rarr { color: var(--sub); font-size: 11px; }

/* ---------- 通知タブ（S-11-2「あなたがやること」） ---------- */
.todo-card { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; text-align: left; font-size: 13px; }
.todo-card.is-stale { border-left: 3px solid var(--ng); }
.todo-kind { flex: none; font-size: 10.5px; font-weight: 700; color: var(--teal-text); background: var(--teal-l); border-radius: 6px; padding: 3px 8px; }
.todo-card.is-stale .todo-kind { color: var(--ng); background: #FCE9EE; }
.todo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-arrow { flex: none; color: var(--sub); }

/* タスクの束（複数宛先）の完了状況・宛先選びの人数 */
.task-progress { flex: none; font-size: 11px; font-weight: 700; color: var(--teal-text); background: var(--teal-l); border-radius: 6px; padding: 3px 8px; }
.pick-count { font-size: 12px; font-weight: 700; color: var(--teal-text); margin: 4px 0 10px; }

/* ---------- 称賛ポイント（F-06） ---------- */
/* 選択肢チップ（ポイントの 50/100/200。S-06-1 の錠剤型） */
.fld-choice { margin-bottom: 12px; }
.fld-choice .lb { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; font-weight: 600; }
.choice-row { display: flex; gap: 8px; }
.choice-chip input { position: absolute; opacity: 0; }
.choice-chip { position: relative; flex: 1; }
.choice-chip span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 4px; background: #fff; color: var(--tx2);
}
.choice-chip span b { font-size: 17px; }
.choice-chip span i { font-style: normal; font-size: 10.5px; color: var(--sub); }
.choice-chip input:checked + span { border-color: var(--accent); background: var(--teal-l); color: var(--teal-text); }
.choice-chip input:checked + span i { color: var(--teal-text); }
/* タイムラインのポイント表示・記録の一覧 */
.pt-chip { display: inline-block; font-size: 11px; font-weight: 800; color: var(--teal-text); background: var(--teal-l); border-radius: 6px; padding: 1px 7px; vertical-align: 1px; }
.pt-balance { font-size: 13px; margin: 0 0 12px; }
.pt-balance b { font-size: 17px; color: var(--teal-text); }
.pt-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.pt-row:last-child { border-bottom: 0; }
.pt-kind { flex: none; font-size: 10.5px; font-weight: 700; color: var(--sub); background: #F1F4F3; border-radius: 6px; padding: 2px 7px; }
.pt-kind.received { color: var(--teal-text); background: var(--teal-l); }
.pt-kind.gave { color: var(--ok); background: var(--green-l); }
.pt-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-amt { flex: none; }
.pt-amt.is-minus { color: var(--ng); }
.pt-at { flex: none; font-size: 10.5px; color: var(--sub); }

/* ---------- マイページ（S-00-4：入口のまとめ） ---------- */
.mypage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.my-name { font-size: 15px; font-weight: 800; margin: 0; }
.my-role { font-size: 11.5px; color: var(--sub); margin: 2px 0 0; }
.mypage-pt { width: 100%; border: 0; text-align: left; margin-bottom: 10px; }
.mypage-pt .v { color: var(--ok); }
.menu-card { padding: 4px 6px; }
.menu-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: 0; text-align: left; font-size: 13.5px; font-weight: 600;
  color: var(--text); padding: 12px 9px; border-bottom: 1px solid #F0F3F2;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:hover { background: #F7FAF9; }
.menu-row .mi {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-l); color: var(--teal-text);
}
.menu-row .mi .ic { width: 17px; height: 17px; }
.menu-row .arr { margin-left: auto; color: var(--sub); font-size: 15px; }
.menu-row.is-danger { color: var(--ng); }
.menu-row.is-danger .mi { background: #FCE9EE; color: var(--ng); }

/* ---------- 相談窓口（S-07-1/2） ---------- */
.cs-safe {
  display: block; font-size: 12.5px; line-height: 1.7;
  background: var(--teal-l); border: 1.5px solid var(--accent); border-radius: 10px;
  padding: 11px 13px; margin: 10px 0 4px; color: var(--tx2);
}
.cs-opt { display: block; position: relative; margin-bottom: 8px; }
.cs-opt input { position: absolute; opacity: 0; }
.cs-opt-in {
  display: block; background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 13px;
}
.cs-opt input:checked + .cs-opt-in { border-color: var(--accent); background: var(--teal-l); }
.cs-t1 { display: block; font-size: 13px; font-weight: 700; }
.cs-t2 { display: block; font-size: 11px; color: var(--sub); margin-top: 2px; }
.whosee {
  font-size: 12px; line-height: 1.7; background: #FBF6E9; border: 1px solid #E7D9AE;
  border-radius: 9px; padding: 9px 12px; color: var(--tx2);
}
.cs-thread { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
/* 吹き出し（2026-09-19 作り直し）：本文だけを .cs-text に入れて改行を保つ。
   以前は吹き出し全体が pre-wrap だったので、部品の字下げと空行まで表示されて上下に大きな空白ができていた */
.cs-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; align-self: flex-start; }
.cs-msg.is-me { align-items: flex-end; align-self: flex-end; }
.cs-bubble {
  background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px;
  padding: 9px 13px; font-size: 14px; line-height: 1.65; word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.cs-msg.is-me .cs-bubble { background: var(--teal-l); border-color: #bcdde3; border-radius: 14px 4px 14px 14px; }
.cs-bubble.is-consult { border-left: 3px solid var(--accent); }
.cs-text { white-space: pre-wrap; }
.cs-tag { display: block; font-size: 11px; font-weight: 700; color: var(--teal-text); margin-bottom: 3px; }
.cs-at { font-size: 10.5px; color: var(--sub); margin: 3px 4px 0; }
.cs-empty { text-align: center; padding: 18px 0; }
/* 返信欄：入力が主役。送信は小さなボタン（以前は .btn-sub の幅100%が効いて、ボタンが幅を取り入力欄が潰れていた） */
.cs-compose {
  display: flex; gap: 8px; align-items: flex-end;
  position: sticky; bottom: 0; z-index: 2;
  background: var(--bg); padding: 8px 0 10px; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.cs-compose textarea {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 16px; line-height: 1.5; background: #fff; color: var(--text);
  min-height: 64px; max-height: 40vh; resize: none; font-family: inherit;
}
.cs-compose textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60,160,175,.15); }
.cs-send-btn {
  flex: none; width: 64px; height: 44px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer;
}
.cs-send-btn .ic { width: 18px; height: 18px; vertical-align: 0; }
.cs-send-btn:disabled { opacity: .5; }
/* 受付担当（本社）の名前 */
.cs-safe b { display: block; }
.cs-safe-sub { display: block; }
.cs-rcps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cs-rcp {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #bcdde3;
  border-radius: 999px; padding: 3px 11px 3px 3px; font-size: 12.5px; font-weight: 600; color: var(--tx2);
}
.cs-rcp.is-more { padding-left: 11px; font-weight: 400; color: var(--sub); }
.cs-rcp .avatar { width: 22px; height: 22px; font-size: 11px; flex: none; }
/* 新しく相談する */
.cs-h { font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--tx2); }
.cs-form { padding: 14px; margin: 0 0 12px; }
.cs-form label { display: block; margin: 0 0 12px; }
.cs-form .lb { display: block; font-size: 12.5px; color: var(--sub); font-weight: 600; margin-bottom: 4px; }
.cs-form .req { font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--ng); border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.cs-form textarea, .cs-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 16px; line-height: 1.6; background: #fff; color: var(--text); font-family: inherit;
}
.cs-form textarea { min-height: 150px; resize: vertical; }
.cs-form select { min-height: 44px; }
.cs-form .photo-pick { margin-top: 2px; }
/* 受付箱 */
.cs-tabs .count-badge { margin-left: 5px; }
.cs-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; border: 1px solid transparent; }
.cs-row.is-wait { border-color: #f0c9c4; background: #fffafa; }
.cs-row .avatar { flex: none; }
.cs-anon-av { background: #9aa7a4; }
.cs-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.cs-mask { font-size: 10.5px; font-weight: 700; color: #8a6d1f; background: #FBF6E9; border: 1px solid #E7D9AE; border-radius: 5px; padding: 0 6px; }
.cs-row-last { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.cs-state { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px; color: var(--sub); background: #eef1f0; }
.cs-state.is-wait { color: #fff; background: var(--ng); }
.cs-row-at { font-size: 10.5px; color: var(--sub); }
.cs-store { padding: 12px 14px; margin-bottom: 8px; }
.cs-store .cs-text { margin-top: 6px; font-size: 14px; line-height: 1.65; }
.cs-thead { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.cs-thead-who { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cs-thead-who b { display: block; font-size: 15px; }
.cs-thead-who span:not(.avatar) { font-size: 12px; color: var(--sub); }
/* PC では読みやすい幅に（窓いっぱいだと吹き出しが間延びする） */
.cs-thead .back { align-self: flex-start; }
@media (min-width: 900px) {
  /* 「‹ 制度へ戻る」と中身の左端をそろえるため、パネルごと読みやすい幅にして中央へ */
  main > .tab-panel[data-tab="consult"] { max-width: 760px; margin-left: auto; margin-right: auto; }
  .cs-bubble { font-size: 15px; }
  .cs-send-btn { width: 76px; height: 48px; font-size: 12.5px; }
}

/* ---------- 週報（S-04-1） ---------- */
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 6px; }
.wk-head b { font-size: 13px; color: var(--tx2); }
.wk-store { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 13px; background: #fff; color: var(--text); }
.wk-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wk-nav .btn-tiny { margin-left: 0; flex: none; }
.wk-range { font-size: 13px; flex: 1; text-align: center; }
.wk-status { font-size: 12px; color: var(--sub); margin: 4px 0 10px; }
.wk-status.is-ok { color: var(--ok); font-weight: 600; }
.wk-status.is-late { color: var(--ng); font-weight: 600; }
.wk-day { margin-bottom: 10px; }
.wk-day-title { font-size: 13px; }
.wk-day-title.is-sat { color: #3b6ea5; }
.wk-day-title.is-sun { color: var(--ng); }
.wk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.wk-grid label { display: block; margin: 0; }
.wk-grid .lb { display: block; font-size: 11px; color: var(--sub); font-weight: 600; margin-bottom: 3px; }
.wk-grid input, .wk-grid select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 9px; font-size: 16px; background: #fff; color: var(--text); min-height: 38px;
}
.wk-cell .lb { display: block; font-size: 11px; color: var(--sub); font-weight: 600; margin-bottom: 3px; }
.wk-cell b { font-size: 15px; }
.wk-auto { font-size: 11.5px; margin-top: 8px; background: #F7FAF9; border-radius: 7px; padding: 6px 10px; color: var(--tx2); }
.wk-auto b { font-weight: 800; }
.wk-total { background: #FBFDFC; }
.wk-imp { margin-bottom: 10px; }
.wk-imp label { display: block; margin: 0; }
.wk-imp .lb { display: block; font-size: 12px; color: var(--sub); font-weight: 600; margin-bottom: 4px; }
.wk-imp textarea, .wk-imp input, .wk-imp select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; font-size: 16px; background: #fff; color: var(--text);
}
.wk-imp select { min-height: 42px; }
.wk-imp textarea { min-height: 72px; resize: vertical; }
.wk-hint { font-size: 11px; color: var(--sub); margin: 2px 0 12px; }
.wk-hint a { color: var(--teal-text); font-weight: 700; text-decoration: none; }
/* 書きかけの自動保存の表示（S-03-1「✓ 自動保存 21:02」） */
.modal-save { margin-left: auto; margin-right: 8px; font-size: 11px; font-weight: 600; color: var(--teal-text); white-space: nowrap; }
.modal-save:not([hidden]) ~ .modal-close { margin-left: 0; }
.anon-row { display: flex; align-items: center; gap: 8px; background: #fff8ee; padding: 9px 11px; border-radius: 9px; margin-bottom: 12px; }
.anon-row input { width: auto; }
.anon-row span { font-size: 13px; }

.ios-guide { position: fixed; inset: 0; z-index: 50; background: rgba(20,28,26,.5); display: flex; align-items: center; justify-content: center; padding: 14px; overflow-y: auto; overscroll-behavior: contain; }
.ios-guide-inner { background: #fff; border-radius: 14px; padding: 18px; max-width: 360px; width: 100%; }
.ios-guide-title { font-weight: 700; margin: 0 0 8px; }
.ios-guide-body { font-size: 13px; color: var(--sub); margin: 0 0 14px; }
.share-mark { background: #eef3f1; border-radius: 5px; padding: 1px 6px; color: var(--brand-light); font-weight: 700; }
.ios-guide-close { width: 100%; border: 0; background: var(--brand); color: #fff; padding: 11px; border-radius: 9px; font-weight: 700; }

/* アプリを開いている最中の通知の帯（iPhone は前に出ているアプリに OS の通知を出さないため・2026-09-06） */
.notice-banner {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 62px); z-index: 70;
  display: flex; align-items: center; gap: 10px; width: min(92vw, 420px); text-align: left; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); cursor: pointer;
}
.notice-banner.is-in { animation: nb-in .25s ease-out; }
@keyframes nb-in { from { transform: translate(-50%, -12px); } to { transform: translate(-50%, 0); } } /* 透明度は動かさない（動きが止まる状況でも帯が見えるように） */
.notice-banner .nb-ic { font-size: 20px; flex: none; }
.notice-banner .nb-col { display: flex; flex-direction: column; min-width: 0; }
.notice-banner .nb-col b { font-size: 13px; }
.notice-banner .nb-col span { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + 84px); z-index: 60;
  background: rgba(24,32,30,.92); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; max-width: 88%; text-align: center;
}

@media (min-width: 700px) {
  .template-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } /* 幅があるぶん列を増やす（2026-09-11） */
  .chat-view { height: 60vh; }
}

/* ================= パソコンなど画面が広いとき =================
   下のタブを上の緑のヘッダーの中へ移す（要素の移動は app.js の placeTabbar が行う）。
   ヘッダーは濃い緑なので、白抜き文字・半透明の帯に着替えさせる。
   スマホ（900px未満）は今までどおり画面の下のまま。
   高さの条件も付けてあるのは、スマホを横向きにしただけで切り替わらないようにするため
   （iPhoneを横にすると幅は900pxを超えるが、高さが足りない）。 */
@media (min-width: 900px) and (min-height: 500px) {
  .app-header .tabbar {
    flex: 1 1 auto; justify-content: center; gap: 4px;
    background: none; border-top: 0; padding: 0;
  }
  .app-header .tab {
    flex: 0 0 auto; flex-direction: row; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px; font-size: 13px;
    color: rgba(255,255,255,.75);
  }
  .app-header .tab::before { display: none; }          /* 縦並び用の帯は使わない */
  .app-header .tab:hover { color: #fff; background: rgba(255,255,255,.10); }
  .app-header .tab.is-on { color: #fff; background: rgba(255,255,255,.18); font-weight: 700; }
  .app-header .tab.is-on .ic { color: #fff; }
  .app-header .tabbar .ic { width: 18px; height: 18px; margin-bottom: 0; }
  /* 未読の印は文字の右上へ。緑の上に乗るので、フチも緑にして輪郭を出す */
  .app-header .tab .dot {
    top: -4px; right: 2px; margin-right: 0; min-width: 18px; height: 18px; line-height: 18px;
    box-shadow: 0 0 0 2px var(--brand);
  }
  .app-header .tab .dot:empty { min-width: 11px; width: 11px; height: 11px; top: 0; right: 4px; }
  /* 会社名が長くてもタブを押しつぶさないように */
  .app-header-main { flex: 0 1 auto; }
}

/* ================= ログイン画面 ================= */
.login-screen {
  position: fixed; inset: 0; z-index: 60; background: linear-gradient(160deg, #1F2850, #12172E);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  overflow-y: auto; overscroll-behavior: contain;
}
.login-card { background: #fff; border-radius: 16px; padding: 22px 20px; width: 100%; max-width: 380px; box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
/* ログイン画面は白いカードの上。ECナビのマーク（色つき） */
.logo-mark.big {
  width: 44px; height: 44px;
  background: url("ecnavi_mark.svg") center/contain no-repeat;
}
.login-company { margin: 0; font-weight: 700; font-size: 17px; }
.login-sub { margin: 0; font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; white-space: nowrap; row-gap: 2px; } /* 会社名・社内アプリ・札をそれぞれ1行のまま折り返す（スマホ幅で「イーシークリエイ／ト」と折れていた・2026-09-27） */
.login-form label { display: block; margin-bottom: 12px; }
.login-form .lb { display: block; font-size: 12px; color: var(--sub); font-weight: 600; margin-bottom: 4px; }
.login-form input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font-size: 16px; background: #fcfdfd;
}
.login-error { background: #fbeceb; color: var(--ng); font-size: 13px; padding: 8px 11px; border-radius: 8px; margin: 0 0 12px; }
.login-note { font-size: 11px; color: var(--sub); margin: 14px 0 0; text-align: center; word-break: auto-phrase; }

/* ================= 人型メニュー ================= */
.icon-btn { background: rgba(255,255,255,.14); border: 0; border-radius: 999px; width: 30px; height: 30px; font-size: 15px; color: #fff; }
.sheet-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 8px; border-radius: 8px; font-size: 14px; color: var(--text);
}
.sheet-item:hover { background: #f4f6f5; }
.sheet-item.danger { color: var(--ng); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px; }

/* ================= 管理画面 ================= */
.admin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin-title { font-size: 17px; margin: 0; }
.admin-head .back { margin-left: auto; }
.admin-actions { margin-bottom: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-item {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 11px 12px;
}
.admin-item.is-off { opacity: .55; }
.admin-item.is-picked { box-shadow: inset 0 0 0 2px var(--brand); }
.admin-item .col { flex: 1; min-width: 0; }
.admin-item .nm { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-item .sub { font-size: 11px; color: var(--sub); }
.mini-btn.danger { color: var(--ng); border-color: #e8c9c6; }

.perm-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; background: #fff; border-radius: 10px; margin-bottom: 14px; }
.perm-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.perm-table th, .perm-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.perm-table th { background: #f4f6f5; font-weight: 700; }
.perm-table .ct { text-align: center; font-size: 14px; color: var(--brand-light); }
.perm-table .perm-group td { background: #eef3f1; font-weight: 700; color: var(--brand-light); }

.field-row { display: flex; gap: 6px; align-items: center; margin-bottom: 7px; }
.field-row input, .field-row select { padding: 8px 9px; font-size: 16px; }
.field-row .narrow { max-width: 68px; }
.field-row .req { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--sub); white-space: nowrap; }
.field-row .req input { width: auto; }
.two-col { display: flex; gap: 9px; }
.two-col label { flex: 1; }

.route-line { font-size: 12px; color: var(--brand-light); background: #eef3f1; padding: 5px 9px; border-radius: 7px; margin: 8px 0 0; }
details.hist { margin-top: 8px; font-size: 12px; color: var(--sub); }
details.hist summary { cursor: pointer; color: var(--brand-light); }
details.hist div { padding: 6px 2px 0; line-height: 1.8; }

.secret-box { background: #f4f6f5; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.secret-box .lb { font-size: 11px; color: var(--sub); font-weight: 600; margin: 0 0 4px; }
.secret { background: #fff; border-radius: 7px; padding: 9px; font-size: 13px; letter-spacing: .05em; margin: 0 0 12px; word-break: break-all; }
.secret-box a.ghost-btn { display: block; text-align: center; text-decoration: none; }

/* ---------- チャットのグループ管理 ---------- */
.room-tools { margin-bottom: 10px; }
.btn-sub {
  width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 10px;
  background: #fff; color: var(--brand); font-weight: 600; font-size: 13px;
}
.btn-tiny {
  margin-left: auto; border: 1px solid var(--line); background: #fff; color: var(--sub);
  border-radius: 8px; padding: 4px 10px; font-size: 12px;
}
.member-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.member-pick label {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px;
  font-size: 13px; background: #fff;
}
.member-pick input { width: auto; }
.member-pick label:has(input:checked) { background: #e8f1ef; border-color: var(--brand-light); }

/* ---------- メッセージからタスク化 ---------- */
.msg .to-task {
  border: 0; background: none; color: var(--sub); font-size: 11px;
  padding: 2px 4px; opacity: .75;
}
.msg .to-task:hover { opacity: 1; color: var(--brand); }

/* ---------- タスク ---------- */
.task-card {
  background: var(--card); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px;
  border-left: 4px solid var(--brand-light);
}
.task-card.is-done { opacity: .6; border-left-color: var(--ok); }
.task-card.is-late { border-left-color: var(--ng); }
.task-top { display: flex; align-items: flex-start; gap: 8px; }
.task-title { font-weight: 700; font-size: 15px; flex: 1; }
.task-card.is-done .task-title { text-decoration: line-through; }
.task-meta { font-size: 12px; color: var(--sub); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 10px; }
.task-due { font-weight: 600; }
.task-due.is-late { color: var(--ng); }
.task-note { font-size: 13px; margin-top: 8px; white-space: pre-wrap; }
.task-src {
  font-size: 12px; color: var(--sub); margin-top: 8px; padding: 7px 10px;
  background: #f4f6f5; border-radius: 8px; border-left: 2px solid var(--line);
}
.task-actions { display: flex; gap: 8px; margin-top: 10px; }
.task-actions button { flex: 1; border-radius: 9px; padding: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.task-actions .primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* タスク追加などのお知らせ行（吹き出しにしない） */
.msg-system {
  align-self: center; max-width: 88%; margin: 4px auto 10px;
  background: #eef3f1; color: #4a5a56; border: 1px solid #dde5e3;
  border-radius: 10px; padding: 7px 12px; font-size: 12px; line-height: 1.6;
  text-align: center; white-space: pre-wrap;
}
.msg-system .t { display: block; font-size: 10px; color: var(--sub); margin-top: 3px; }
/* 詳細は長くなることがあるので、折り返して全部見せる */
.task-title { word-break: break-word; white-space: pre-wrap; }

/* ---------- 宛先（@メンション） ---------- */
/* 入力欄まわり。宛先の候補は「この枠の上ぶち」を基準に開くので、
   TOボタンや宛先の札が増えて枠が高くなっても、位置がずれない */
.chat-compose { position: relative; flex: none; }
.mention-pop {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 25;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.14); overflow-y: auto;
  /* 人数が増えても画面の外へ伸びないように。--vh は「キーボードで隠れていない高さ」を
     app.js が実時間で入れている（42vh だとキーボードが出たとき上へはみ出す） */
  max-height: calc(var(--vh, 100vh) * 0.42);
}

/* ★入力欄の上の「TO」ボタン（2026-07-27 要望）
   スマホでは @ を出すのにキーボードを切り替える必要があって面倒なので、
   Chatworkと同じように、押すだけで宛先を選べる口をここに置く。中身は @ と同じ。 */
.mention-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 2px 0; }
.to-btn {
  flex: none; min-height: 34px; padding: 0 16px;
  border: 1.5px solid var(--brand); background: #fff; color: var(--brand);
  border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .06em;
}
.to-btn.is-on, .to-btn:active { background: var(--brand); color: #fff; }
.mention-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px;
}
.mention-item:last-child { border-bottom: 0; }
.mention-item:hover { background: #f4f6f5; }
.mention-item .nm { font-weight: 600; font-size: 14px; }
.mention-item .rl { font-size: 11px; color: var(--sub); margin-left: auto; text-align: right; }
.mention-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; }
.mention-chips .to { font-size: 11px; color: var(--sub); }
.mention-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  background: #e8f1ef; color: var(--brand); border: 1px solid #cfe0dc;
  border-radius: 999px; padding: 2px 4px 2px 9px;
}
.mention-chip button { border: 0; background: none; color: var(--sub); font-size: 13px; padding: 0 3px; }
.mention { color: var(--brand); font-weight: 700; }
.mention.is-me { background: #ffe9c9; color: #8a5a10; border-radius: 4px; padding: 0 3px; }
.bubble.to-me { box-shadow: inset 0 0 0 2px var(--accent); }
/* 候補を出す基準にするため、チャット画面を位置の基準にする */
.chat-view { position: relative; }

/* ---------- メンバー選び（組織・役職ごと） ---------- */
.pick-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pick-chip {
  font-size: 12px; background: #fff; border: 1px solid var(--line);
  color: var(--brand); border-radius: 999px; padding: 4px 11px;
}
.pick-group { margin-bottom: 12px; }
.pick-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.pick-title { font-size: 12px; font-weight: 700; color: var(--sub); }
.member-pick label .rl { font-size: 10px; color: var(--sub); margin-left: 4px; }

/* ---------- タスクの2段タブ ---------- */
#task-done-filter { padding-top: 0; margin-top: -2px; }
#task-done-filter .n {
  display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 4px;
  background: rgba(0,0,0,.10); border-radius: 999px; font-size: 11px;
}
#task-done-filter .chip.is-on .n { background: rgba(255,255,255,.25); }

/* ---------- 管理画面：ユーザー一覧 ---------- */
.admin-group-head {
  font-size: 12px; font-weight: 700; color: var(--brand);
  margin: 12px 2px 5px; padding-bottom: 3px; border-bottom: 1px solid var(--line);
}
.admin-group-head .n { color: var(--sub); font-weight: 400; margin-left: 5px; }
.toggle-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--sub); margin: 4px 2px 10px; }
.toggle-row input { width: auto; }
.admin-item.is-off { opacity: .55; }


/* ---------- オリジナルのアイコン ----------
   絵文字だと見た目が安っぽくなるので、自作のフラットアイコン（SVG）に差し替えている。
   ★CSSのマスクとして敷き、色は currentColor で塗る。
     こうすると「選択中のタブだけ色が変わる」がアイコンにもそのまま効く。
   ※チャットの本文に打った絵文字は、これとは無関係でそのまま表示される。 */
[data-icon] {
  display: inline-block;
  width: 1.5em; height: 1.5em;
  background-color: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  vertical-align: -0.3em;
}
[data-icon="timeline"] { -webkit-mask-image: url("icons/timeline.svg"); mask-image: url("icons/timeline.svg"); }
[data-icon="chat"] { -webkit-mask-image: url("icons/chat.svg"); mask-image: url("icons/chat.svg"); }
[data-icon="task"] { -webkit-mask-image: url("icons/task.svg"); mask-image: url("icons/task.svg"); }
[data-icon="apply"] { -webkit-mask-image: url("icons/apply.svg"); mask-image: url("icons/apply.svg"); }
[data-icon="history"] { -webkit-mask-image: url("icons/history.svg"); mask-image: url("icons/history.svg"); }
[data-icon="mypage"] { -webkit-mask-image: url("icons/mypage.svg"); mask-image: url("icons/mypage.svg"); }
[data-icon="doc"] { -webkit-mask-image: url("icons/doc.svg"); mask-image: url("icons/doc.svg"); }
[data-icon="clock"] { -webkit-mask-image: url("icons/clock.svg"); mask-image: url("icons/clock.svg"); }
[data-icon="meal"] { -webkit-mask-image: url("icons/meal.svg"); mask-image: url("icons/meal.svg"); }
[data-icon="praise"] { -webkit-mask-image: url("icons/praise.svg"); mask-image: url("icons/praise.svg"); }
[data-icon="consult"] { -webkit-mask-image: url("icons/consult.svg"); mask-image: url("icons/consult.svg"); }
[data-icon="org"] { -webkit-mask-image: url("icons/org.svg"); mask-image: url("icons/org.svg"); }
[data-icon="shop"] { -webkit-mask-image: url("icons/shop.svg"); mask-image: url("icons/shop.svg"); }
[data-icon="key"] { -webkit-mask-image: url("icons/key.svg"); mask-image: url("icons/key.svg"); }
[data-icon="lock"] { -webkit-mask-image: url("icons/lock.svg"); mask-image: url("icons/lock.svg"); }
[data-icon="bell"] { -webkit-mask-image: url("icons/bell.svg"); mask-image: url("icons/bell.svg"); }
[data-icon="warn"] { -webkit-mask-image: url("icons/warn.svg"); mask-image: url("icons/warn.svg"); }
[data-icon="gear"] { -webkit-mask-image: url("icons/gear.svg"); mask-image: url("icons/gear.svg"); }
[data-icon="logout"] { -webkit-mask-image: url("icons/logout.svg"); mask-image: url("icons/logout.svg"); }
[data-icon="calendar"] { -webkit-mask-image: url("icons/calendar.svg"); mask-image: url("icons/calendar.svg"); }

/* ヘッダー右上の丸ボタン（管理画面）に入れる歯車。丸の中に収まる大きさにする */
.icon-btn .ic { width: 17px; height: 17px; vertical-align: -3px; }
.admin-title .ic { width: 20px; height: 20px; vertical-align: -3px; }

.tabbar .ic { width: 22px; height: 22px; margin-bottom: 1px; vertical-align: 0; }
/* 制度カードのアイコン */
.tpl-icon { width: 26px; height: 26px; color: var(--brand-light); }

/* 履歴の種別チップの件数 */
#history-kind .n {
  display: inline-block; min-width: 15px; margin-left: 3px; padding: 0 4px;
  background: rgba(0,0,0,.09); border-radius: 999px; font-size: 11px;
}
#history-kind .chip.is-on .n { background: rgba(255,255,255,.25); }

/* 制度のアイコン選び（管理画面） */
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-opt { margin: 0; }
.icon-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.icon-opt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--sub); cursor: pointer;
}
.icon-opt .ic { width: 21px; height: 21px; }
.icon-opt:has(input:checked) { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #eef3f1; }

/* ---------- タスクの切り替えを押しやすく ----------
   2択しかないので、幅いっぱいの「切り替えスイッチ」にする。
   Appleの目安（指で押す的は44pt以上）に合わせて高さを確保した。 */
#task-filter, #task-done-filter {
  display: flex; gap: 6px; overflow: visible; padding: 0 0 8px;
}
#task-filter .chip, #task-done-filter .chip {
  flex: 1 1 0; min-height: 46px; border-radius: 12px;
  font-size: 15px; font-weight: 600; padding: 6px 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
#task-done-filter .chip { min-height: 42px; font-size: 14px; }
#task-done-filter .n {
  min-width: 22px; padding: 1px 7px; font-size: 12px; margin-left: 0;
}
/* 押した瞬間に反応が分かるように */
#task-filter .chip:active, #task-done-filter .chip:active { transform: scale(.97); }

/* ================================================================
   パソコン幅のレイアウト（ホーム画面イメージのPC版・2026-08-28）
   下タブをやめて上部ナビ、タイムラインは左にショートカット列の2カラム。
   ================================================================ */
.gnav { display: none; }
.tl-cols { display: block; }
.tl-side { display: none; }

@media (min-width: 900px) {
  /* 上部ナビ（紺地・白文字。行き先は下タブと同じ） */
  .app-header { padding: 12px 22px; gap: 18px; }
  .gnav { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; min-width: 0; }
  .gnav a {
    position: relative; display: flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 600;
    padding: 9px 15px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  }
  .gnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
  .gnav a.is-on { color: #fff; background: rgba(255,255,255,.15); }
  .gnav a .ic { width: 18px; height: 18px; }
  .gnav .dot { position: absolute; top: 8px; right: 9px; }
  .tabbar { display: none !important; }

  /* 中身の幅：タイムラインだけ広く、他は読みやすい幅で中央。main 自体は窓いっぱい（スクロールのバーを窓の右端に・2026-09-11） */
  main { max-width: none; padding: 18px 28px 28px; }
  /* 横幅に余裕があるときは中身を窓いっぱいまで（ 2026-09-11「必要以上にスクロールさせない」）。読みものの行の長さは各部品側で抑える */
  main > .tab-panel { max-width: none; margin: 0 auto; }
  main > .tab-panel[data-tab="timeline"] { max-width: none; }
  main.chat-mode > .tab-panel[data-tab="chat"] { max-width: 860px; }

  /* タイムラインの2カラム（左＝会社・pt・ショートカット／右＝流れ） */
  .tl-cols { display: flex; gap: 18px; align-items: flex-start; }
  .tl-side { display: flex; width: 252px; flex: none; flex-direction: column; gap: 10px; position: sticky; top: 4px; }
  .tl-main { flex: 1; min-width: 0; max-width: none; } /* 流れも窓いっぱい（2026-09-11） */

  /* モーダルはダイアログらしく中央に */
  .modal-card { max-width: 520px; }
}

/* 左カラムの部品（ホーム画面イメージ準拠） */
.co-card .co-name { font-weight: 800; font-size: 14.5px; color: var(--brand); letter-spacing: .02em; }
.co-card .me-line { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.co-card .me-line .nm { font-size: 13.5px; font-weight: 700; }
.co-card .me-line .st { font-size: 11px; color: var(--sub); }
.pt-card { display: flex; align-items: center; justify-content: space-between; }
.pt-card .l { font-size: 12px; color: var(--sub); }
.pt-card .v { font-size: 17px; font-weight: 800; color: var(--ok); }
.sc-list { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.sc {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; text-align: left; font-size: 13px; font-weight: 600;
  color: var(--text); padding: 8px 9px; border-radius: 9px;
}
.sc:hover { background: #F3F6F5; }
.tile {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 800;
}
.tile.t-navy { background: var(--brand); }
.tile.t-teal { background: var(--accent); }
.tile.t-green { background: var(--ok); }
.tile.t-red { background: var(--ng); }
.tile.t-gray { background: #7d8b95; }

/* ================================================================
   見た目合わせ第2陣（2026-08-28）：チャット3カラム・スタンプ・全画面フォーム
   ================================================================ */

/* ---------- スタンプの種類選択（S-02-2） ---------- */
.p-foot { position: relative; flex-wrap: wrap; }
.stamp-add { color: var(--sub); }
.stamp-pop {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 15;
  display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 7px 9px; box-shadow: 0 8px 24px rgba(0,0,0,.16);
  max-width: min(92vw, 380px); /* スマホ幅で画面からはみ出さない（2026-09-06：分類つきの選択が横一列で崩れていた） */
}
.stamp-pop button {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: 0; border-radius: 9px; padding: 6px 8px; font-size: 19px;
}
.stamp-pop button span { font-size: 9px; color: var(--sub); }
.stamp-pop button:hover { background: var(--teal-l); }

/* ---------- チャットの右パネル（S-01-1。PCのみ） ---------- */
.chat-info { display: none; }
.chat-left { display: flex; flex-direction: column; min-height: 0; }
.chat-left[hidden] { display: none !important; }

@media (min-width: 900px) {
  main.chat-mode > .tab-panel[data-tab="chat"] {
    flex-direction: row; gap: 14px; max-width: 1120px; align-items: stretch;
  }
  .chat-left {
    width: 262px; flex: none; overflow-y: auto;
    background: #fff; border-radius: 12px; padding: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  .chat-left .room-tools { margin-bottom: 8px; }
  #chat-view { flex: 1; min-width: 0; }
  #chat-view .chat-head .back { display: none; } /* PCは一覧が常に見えている */
  .chat-info {
    display: flex; flex-direction: column; gap: 6px;
    width: 236px; flex: none; overflow-y: auto;
    background: #fff; border-radius: 12px; padding: 13px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
}
.ci-title { font-size: 12.5px; color: var(--brand); }
.ci-h { font-size: 11px; color: var(--sub); font-weight: 700; margin: 10px 0 4px; }
.ci-mem { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ci-mem .nm { font-size: 12.5px; font-weight: 600; }
.ci-mem .st { font-size: 10px; color: var(--sub); }
.ci-task { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; }
.ci-task .ci-chk {
  width: 15px; height: 15px; flex: none; margin-top: 2px;
  border: 1.6px solid #b8c4c0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px; color: #fff;
}
.ci-task.is-done { opacity: .55; }
.ci-task.is-done .ci-chk { background: var(--ok); border-color: var(--ok); }
.ci-task.is-done .nm { text-decoration: line-through; }
.ci-task .nm { font-size: 12px; font-weight: 600; line-height: 1.5; }
.ci-task .st { font-size: 10px; color: var(--sub); }
.ci-add { background: none; border: 0; color: var(--teal-text); font-size: 11px; font-weight: 700; text-align: left; padding: 6px 0; }

/* PCではルーム一覧の選択中を強調 */
.room.is-on { background: var(--teal-l); border-radius: 10px; }

/* ---------- 入力フォームをスマホでは全画面に（S-03-1/S-05-1の型） ---------- */
@media (max-width: 899px) {
  .modal { align-items: stretch; padding: 0; }
  .modal-card {
    max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none; animation: none;
    padding: 0; display: flex; flex-direction: column;
  }
  .modal-head {
    background: var(--brand); color: #fff; margin: 0;
    padding: calc(var(--safe-top) + 12px) 16px 12px;
    font-size: 15px;
  }
  .modal-head .modal-close { color: rgba(255,255,255,.85); }
  .modal-save { color: #9fdce4; }
  .modal-desc { padding: 10px 16px 0; margin: 0 0 4px; }
  .modal-form { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 16px calc(var(--safe-bottom) + 16px); }
  .modal.kb-open .modal-card { border-radius: 0; }
}

/* ---------- コメント（S-02-2） ---------- */
.cmt-box { margin-top: 10px; border-top: 1px solid #F0F3F2; padding-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; }
.cmt .avatar { width: 26px; height: 26px; font-size: 11px; }
.cmt-h { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.cmt-h b { font-size: 12px; }
.cmt-h span { color: var(--sub); font-size: 10px; }
.cmt-t { font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.cmt-form { display: flex; gap: 7px; }
.cmt-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px;
  font-size: 16px; background: #F7FAF9; color: var(--text);
}
.cmt-form button { flex: none; border: 0; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 0 15px; }

/* ---------- ルーム一覧の情報（S-01-1） ---------- */
.room { position: relative; }
.room .rn { font-weight: 700; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .rn-n { font-weight: 400; font-size: 11px; color: var(--sub); }
.room .col { min-width: 0; flex: 1; }
.room .last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .rmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.room .tm { font-size: 10px; color: var(--sub); }
.room .ucnt {
  min-width: 18px; height: 18px; border-radius: 999px; background: var(--ng); color: #fff;
  font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- 週報の提出状況マス目（S-04-2）・閲覧人数・絞り ---------- */
.wg-table { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
.wg-table th { font-size: 11px; color: var(--sub); font-weight: 700; padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.wg-table td { padding: 9px 10px; border-bottom: 1px solid #F0F3F2; cursor: pointer; }
.wg-table tr:last-child td { border-bottom: 0; }
.wg-org { font-weight: 700; }
.wg-ok { color: var(--ok); font-weight: 600; }
.wg-now { color: var(--sub); }
.wg-miss { color: var(--ng); font-weight: 700; background: #FDF3F6; border-radius: 6px; }
.seen-n { margin-left: auto; font-size: 11px; color: var(--sub); flex: none; }
.fdiv { width: 1px; align-self: stretch; background: var(--line); margin: 2px 3px; flex: none; }
#timeline-filter .sw.is-on { background: var(--accent); border-color: var(--accent); }

/* 承認の流れを縦に（S-05-3。「くわしく見る」の中） */
.vflow { margin-top: 10px; display: flex; flex-direction: column; gap: 0; }
.vstep { display: flex; gap: 9px; align-items: flex-start; position: relative; padding-bottom: 12px; }
.vstep:last-child { padding-bottom: 0; }
.vstep::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: #E4EAE8; }
.vstep:last-child::before { display: none; }
.vdot { width: 12px; height: 12px; border-radius: 50%; background: #D3DCD9; flex: none; margin-top: 3px; position: relative; z-index: 1; }
.vstep.done .vdot { background: var(--ok); }
.vstep.now .vdot { background: var(--brand-light); box-shadow: 0 0 0 3px rgba(46,58,105,.18); }
.vstep b { font-size: 12px; display: block; color: var(--text); }
.vstep span { font-size: 11px; color: var(--sub); display: block; }

/* ---------- チャット検索（S-01-4）・ホーム画面追加の案内（S-00-3） ---------- */
.room-search {
  width: 100%; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; font-size: 16px; background: #F4F7F6; color: var(--text); margin-bottom: 8px;
}
.chat-search-bar { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; }
.chat-search-bar input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 13px; font-size: 16px; background: #fff; color: var(--text);
}
.chat-search-bar .hint { flex: none; margin: 0; }
.ios-guide-lead { font-size: 12px; color: var(--sub); margin: 4px 0 12px; }
.ios-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.ios-no {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.ios-ic { width: 30px; height: 30px; flex: none; color: var(--teal-text); background: var(--teal-l); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.ios-ic svg { width: 18px; height: 18px; }

/* ---------- 働く方の一覧（S-09-1：フリガナ・雇用区分） ---------- */
.admin-item .kana { font-weight: 400; font-size: 11px; color: var(--sub); margin-left: 4px; }
.emp-badge {
  display: inline-block; font-size: 10px; font-weight: 700; vertical-align: 1px;
  color: var(--teal-text); background: var(--teal-l); border-radius: 5px; padding: 1px 6px; margin-left: 5px;
}
.emp-badge.is-pt { color: #7a5d1e; background: #F7EFD8; }

/* ---------- 管理画面：PCは左メニュー（S-05-5の型）・人と権限の逆引き（S-08-1） ---------- */
.ro-y { color: var(--ok); font-weight: 800; }
.ro-n { color: #C9D2CF; }
.acc-table td.c { text-align: center; }
.acc-table .kana { font-weight: 400; font-size: 10.5px; color: var(--sub); margin-left: 3px; }
.miss { font-size: 10px; color: var(--orange); font-weight: 700; margin-left: 4px; }

@media (min-width: 900px) {
  main > .tab-panel[data-tab="admin"] { max-width: none; }
  .adm-cols { display: flex; gap: 16px; align-items: flex-start; }
  .adm-cols #admin-nav {
    flex-direction: column; width: 196px; flex: none; overflow: visible;
    position: sticky; top: 4px; padding: 8px;
    background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  .adm-cols #admin-nav .chip {
    width: 100%; text-align: left; border-radius: 9px; padding: 10px 12px;
    display: flex; align-items: center; gap: 9px; border: 0; font-weight: 600;
  }
  .adm-cols #admin-nav .chip .ic { width: 17px; height: 17px; }
  .adm-cols #admin-nav .chip.is-on { background: var(--brand); color: #fff; }
  .adm-cols #admin-body { flex: 1; min-width: 0; }
}

/* 制度の種類の設定（S-05-5）：範囲チップと説明文の欄 */
.vis-chip { cursor: pointer; }
.vis-chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.field-row { flex-wrap: wrap; }
.field-row .field-help { width: 100%; font-size: 12px; margin-top: 2px; }

/* ===== 写真（F-03-06 投稿の写真／S-01-3 拡大表示） ===== */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line, #e3e8ec); cursor: zoom-in; display: block; }
.photos img[src=""] , .photos img:not([src]) { opacity: .5; }
.photo-pick { margin: 10px 0 4px; }
.photo-pick .pp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-pick .pp-btns button { flex: 1; min-width: 120px; }
.photo-pick .pp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 8px; }
.photo-pick .pp-item { position: relative; }
.photo-pick .pp-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.photo-pick .pp-item.is-busy img { opacity: .4; }
.photo-pick .pp-rm { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #1e2a44; color: #fff; font-size: 13px; line-height: 22px; cursor: pointer; }
.photo-pick .hint { margin-top: 6px; }
.photo-viewer { position: fixed; inset: 0; background: rgba(10, 16, 28, .92); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.photo-viewer img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.photo-viewer .pv-close { position: absolute; top: calc(var(--safe-top) + 14px); right: calc(env(safe-area-inset-right, 0px) + 14px); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff; font-size: 24px; line-height: 44px; padding: 0; cursor: pointer; } /* iPhone の時計の帯より下に（2026-09-10 ：上過ぎて押せない） */

/* チャットの写真（F-01-03／F-01-08） */
.chat-form { flex-direction: column; align-items: stretch; }
.chat-form .chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-form .chat-row textarea { flex: 1; }
.chat-photos { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0 4px; }
.chat-photos .pp-item { position: relative; width: 56px; }
.chat-photos .pp-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.chat-photos .pp-item.is-busy img { opacity: .4; }
.chat-photos .pp-rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #1e2a44; color: #fff; font-size: 12px; line-height: 20px; cursor: pointer; }
.msg .photos { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-width: 380px; margin: 6px 0 2px; }
.msg .photo-exp { font-size: 10.5px; color: var(--sub, #6b7a88); margin: 2px 0 0; }
.task-card .photos, .task-src .photos { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); max-width: 420px; }
.photo-exp { font-size: 10.5px; color: var(--sub, #6b7a88); margin: 2px 0 0; }

/* 顔写真（F-14）：頭文字の丸に重ねる。表示URLが取れないときは頭文字が見える */
.avatar { position: relative; overflow: hidden; }
.avatar .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar .avatar-img[hidden] { display: none; }
.my-avatar-acts { display: flex; gap: 8px; justify-content: center; margin: 8px 0 4px; }

/* ===== 通知の一覧・設定（F-11） ===== */
.ntf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ntf-head .section-title { margin-bottom: 0; }
.ntf-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; border: 1px solid var(--line, #e3e8ec); background: #fff; cursor: pointer; }
.ntf-item .ntf-ic { font-size: 18px; line-height: 1.2; flex: 0 0 auto; }
.ntf-item .ntf-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ntf-item .ntf-body b { font-size: 13.5px; }
.ntf-item .ntf-text { font-size: 12.5px; color: var(--sub, #6b7a88); white-space: pre-wrap; word-break: break-word; }
.ntf-item .ntf-time { font-size: 11px; color: var(--sub, #6b7a88); }
.ntf-item .ntf-dot { width: 9px; height: 9px; border-radius: 50%; background: #b9c3cc; flex: 0 0 auto; margin-top: 5px; visibility: hidden; }
.ntf-item.is-unread .ntf-dot { visibility: visible; }
.ntf-item.is-unread.is-red .ntf-dot { background: #d64545; }
.ntf-item.is-unread b { color: #1d2b3a; }
.ntf-item:not(.is-unread) { opacity: .78; }
.ntf-pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line, #e3e8ec); cursor: pointer; }
.ntf-pref:last-of-type { border-bottom: 0; }
.ntf-pref .np-lb { display: flex; flex-direction: column; gap: 2px; }
.ntf-pref .np-lb small { font-size: 11px; color: var(--sub, #6b7a88); }
.ntf-pref input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent, #1e2a44); }
.ntf-pref.is-fixed { cursor: default; }
.ntf-pref .np-fixed { color: #2c7a4b; font-weight: 800; font-size: 16px; }

/* ===== プロフィール（F-14） ===== */
.prof-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.prof-head .avatar.big { width: 64px; height: 64px; font-size: 26px; flex: 0 0 auto; }
.prof-intro { white-space: pre-wrap; word-break: break-word; line-height: 1.7; font-size: 14px; background: var(--bg2, #f4f6f8); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; min-height: 48px; }
.people-q { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line, #d7dee5); border-radius: 12px; font-size: 15px; margin-bottom: 8px; }
.people-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; margin-top: 8px; }
.people-row { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line, #e3e8ec); border-radius: 12px; background: #fff; cursor: pointer; }
.people-row .pr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.people-row .pr-body span { font-size: 12px; color: var(--sub, #6b7a88); }
.avatar[data-profile] { cursor: pointer; }

/* ===== スタンプ（F-10）：選択画面の分類・管理・集計 ===== */
.stamp-pop .sp-cat { font-size: 10.5px; color: var(--sub, #6b7a88); margin: 6px 4px 2px; font-weight: 700; }
.stamp-pop .sp-row { display: flex; flex-wrap: wrap; gap: 4px; }
.stamp-big { font-size: 26px; width: 40px; text-align: center; flex: 0 0 auto; }
.admin-item.is-off { opacity: .6; }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e8ec); }
.stat-row:last-child { border-bottom: 0; }
.stat-row.is-off { opacity: .55; }
.stat-row .stat-lb { width: 120px; font-weight: 700; font-size: 13.5px; }
.stat-row .stat-lb small { font-weight: 400; color: var(--sub, #6b7a88); }
.stat-row .stat-bar { flex: 1; height: 10px; background: var(--line, #e3e8ec); border-radius: 5px; overflow: hidden; }
.stat-row .stat-bar i { display: block; height: 100%; background: var(--accent, #1e2a44); border-radius: 5px; }
.stat-row .stat-n { width: 48px; text-align: right; font-size: 14px; }

/* ===== お祝いカード（S-06-1） ===== */
/* お祝いカード（2026-09-19 作り直し）：背景は画像（web/cards/<絵柄>.jpg・16:9・画像生成AI製・文字なし）。
   「旧システムのカード背景くらいのクオリティに」。カードは 16:9 の決まった形（横に間延びさせない）＝背景の飾り（四隅・縁）が切れない。
   画像が届くまで・読めないときは下の色（グラデーション）が出る。文字と顔写真はアプリが上から載せる */
.celeb {
  position: relative; border-radius: 16px; overflow: hidden; margin: 6px auto;
  width: 100%; max-width: 560px; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  color: #1d2b3a; text-align: center;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(31,40,80,.12);
  container-type: inline-size; /* 中の文字・顔写真をカードの幅に合わせて伸び縮みさせる */
}
.celeb-clap { background-color: #ffe9a8; background-image: url("cards/clap.jpg"), linear-gradient(135deg, #fff6d5, #ffd166); }
.celeb-confetti { background-color: #ffe3ee; background-image: url("cards/confetti.jpg"), linear-gradient(135deg, #ffe3ee, #ffb8cc 55%, #cfe6ff); }
.celeb-flower { background-color: #fff0f6; background-image: url("cards/flower.jpg"), linear-gradient(135deg, #fff0f6, #ffd3e6 55%, #fff6b3); }
.celeb-pop { background-color: #d5f1fb; background-image: url("cards/pop.jpg"), linear-gradient(135deg, #e3f7ff, #b7e6fb 50%, #ffe9b3); }
.celeb-gold { background-color: #f3dfa6; background-image: url("cards/gold.jpg"), linear-gradient(135deg, #fff3cf, #e9c46a); }
.celeb-star { background-color: #1F2850; background-image: url("cards/star.jpg"), linear-gradient(135deg, #2E3A69, #151c3b); }
/* 中身：ほめ言葉 → 顔写真 → 宛名。幅に応じて伸び縮み（cqi＝カードの幅の1%） */
.celeb-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(4px, 1.6cqi, 10px); padding: 4cqi 6cqi; width: 100%; }
.celeb-word {
  font-size: clamp(12px, 7.2cqi, 40px); font-weight: 900; letter-spacing: .06em; line-height: 1.15; white-space: nowrap;
  color: #1F2850;
  /* どの背景でも読めるように、文字のまわりに白いにじみを重ねる（縁取り＋やわらかい光） */
  text-shadow: 0 0 2px #fff, 0 0 6px rgba(255,255,255,.95), 0 0 14px rgba(255,255,255,.85), 0 2px 0 rgba(255,255,255,.7);
}
.celeb .avatar.celeb-av {
  width: clamp(32px, 20cqi, 104px); height: clamp(32px, 20cqi, 104px); font-size: clamp(13px, 8cqi, 40px);
  border: clamp(2px, .8cqi, 4px) solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.celeb-to {
  font-weight: 800; font-size: clamp(9px, 3.9cqi, 17px); color: #1F2850; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255,255,255,.82); border-radius: 999px; padding: .25em 1em;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
/* 濃い背景（星空）は白い文字 */
.celeb.is-dark .celeb-word { color: #fff; text-shadow: 0 0 2px rgba(10,14,40,.9), 0 0 10px rgba(10,14,40,.85), 0 2px 12px rgba(0,0,0,.6); }
.celeb.is-dark .celeb-to { background: rgba(255,255,255,.92); }
.celeb-to .pt-chip { font-size: .78em; padding: .05em .55em; vertical-align: .08em; }
.celeb-pick { margin: 10px 0 4px; }
.celeb-pick .choice-chip span i { display: block; font-style: normal; font-size: 11px; }
/* 絵柄は背景の見本つきのタイルから選ぶ */
.celeb-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.celeb-tile { display: block; position: relative; cursor: pointer; margin: 0 !important; text-align: center; }
.celeb-tile input { position: absolute; opacity: 0; pointer-events: none; }
.celeb-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background-size: cover; background-position: center; border: 2px solid transparent; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.celeb-tile i { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--tx2); margin-top: 4px; }
.celeb-tile input:checked + .celeb-thumb { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36,156,168,.25), 0 1px 3px rgba(0,0,0,.12); }
.celeb-tile input:checked ~ i { color: var(--teal-text); }
.celeb-tile input:focus-visible + .celeb-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (min-width: 900px) { .celeb-tiles { grid-template-columns: repeat(6, 1fr); } }


/* ================================================================
   2026-09-10 UI刷新（要望）
   ① パソコン幅は文字を2pt大きく・余白をゆったり（スマホの寸法は変えない）
   ② チャットを 旧システムの並びで全幅化（左＝チャットルーム一覧／中＝やり取り／右＝チャットルーム情報）
   ③ スタンプ・タスク化の押し口を吹き出しの横に（下に置くと縦に伸びてスクロールが増えるため）
   ④ 写真ボタンを TO と同じ行に・本文の入力欄を広く
   ⑤ チャットルームのアイコン（画像）・会社ロゴ・URL の下見カード・別タブで開くリンク
   スマホにも同じ機能を載せる（右パネルは ⓘ で全画面に開く）
   ================================================================ */

/* ---- チャットルームのアイコン（画像が無ければ頭文字の角丸タイル） ---- */
.ricon { width: 44px; height: 44px; border-radius: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 18px; background: #2f6f6a; overflow: hidden; }
.ricon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ricon.big { width: 76px; height: 76px; border-radius: 20px; font-size: 30px; }
.chat-room-ic { flex: none; display: inline-flex; }
.chat-room-ic .ricon { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.ricon-pick { margin-bottom: 12px; }
.ricon-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ricon-row .mini-btn { margin-left: 0; }
.ricon-prev { width: 64px; height: 64px; border-radius: 16px; background: #EEF2F4; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ricon-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ricon-none { font-size: 11px; color: var(--sub); }
.ricon-pick .hint { margin-top: 6px; }

/* ---- チャットルーム一覧 ---- */
.room { gap: 12px; padding: 12px 14px; }
.cl-head { display: none; }

/* ---- 吹き出しの横の押し口（スタンプ・タスク化） ---- */
.msg { max-width: 92%; gap: 10px; }
.msg .avatar { width: 34px; height: 34px; font-size: 14px; }
.msg .mrow { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.msg.mine .mrow { flex-direction: row-reverse; }
.msg .bubble { min-width: 0; }
.macts { position: relative; display: flex; gap: 2px; flex: none; opacity: .6; }
.msg:hover .macts { opacity: 1; }
.mact { position: relative; border: 0; background: none; font-size: 17px; line-height: 1; padding: 5px; border-radius: 9px; cursor: pointer; }
.mact i { position: absolute; right: 0; bottom: 1px; font-style: normal; font-size: 9px; font-weight: 800; color: var(--brand); background: #fff; border-radius: 999px; line-height: 1; padding: 1px 2px; }
.mact:hover { background: var(--teal-l); }
.macts .stamp-pop { bottom: calc(100% + 6px); left: 0; width: max-content; max-width: min(92vw, 380px); } /* 押し口の幅（細い）に合わせて縦長に潰れないよう、中身の幅で出す */
.macts .stamp-pop.below { bottom: auto; top: calc(100% + 6px); }
.msg.mine .macts .stamp-pop { left: auto; right: 0; }
.macts .stamp-pop.flip { left: auto; right: 0; }
.macts .stamp-pop.unflip { left: 0; right: auto; }
.msg .msg-stamps { margin-top: 4px; }
.msg .time { display: none; }

/* ---- 本文のリンク（別タブで開く）と下見カード（OGP） ---- */
.bubble a.lnk { color: var(--teal-text); text-decoration: underline; word-break: break-all; }
.msg.mine .bubble a.lnk { color: var(--brand); }
.link-card { display: flex; margin-top: 6px; width: min(100%, 420px); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; }
.msg.mine .link-card { margin-left: auto; }
.link-card .lc-img { width: 104px; min-height: 78px; object-fit: cover; flex: none; background: #EEF2F4; }
.link-card .lc-col { padding: 9px 12px; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.link-card .lc-t { font-size: 13.5px; font-weight: 700; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-card .lc-d { font-size: 12px; color: var(--sub); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-card .lc-s { font-size: 11px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card.is-loading { min-height: 38px; opacity: .55; }
.link-card:hover { border-color: #C9D5D2; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* ---- 入力欄：TO と 📷 を同じ行に。本文欄はその分だけ広く ---- */
.mention-bar { gap: 8px; padding: 8px 2px 6px; }
.chat-photo-btn { flex: none; min-height: 34px; padding: 0 12px; border: 1.5px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; font-size: 16px; line-height: 1; cursor: pointer; }
.chat-form .chat-row textarea { min-height: 44px; }

/* ---- チャットの頭（アイコン・部屋名・検索・ⓘ） ---- */
.chat-head { gap: 8px; }
.chat-head .back { font-size: 26px; line-height: 1; padding: 0 4px; }
.chat-room-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }
.chat-head-acts { display: flex; gap: 4px; flex: none; margin-left: auto; }
.icon-act { border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 34px; height: 34px; font-size: 15px; color: var(--tx2); display: inline-flex; align-items: center; justify-content: center; }
.icon-act:hover { background: var(--teal-l); }

/* ---- 右パネル「チャットルーム情報」 ---- */
.chat-info { display: none; }
.ci-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.ci-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ci-close { border: 0; background: none; font-size: 20px; color: var(--sub); padding: 0 4px; }
.ci-room { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.ci-rname { font-weight: 700; font-size: 15px; word-break: break-word; }
.ci-rsub { font-size: 12px; color: var(--sub); }
.ci-racts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.ci-racts .mini-btn { margin-left: 0; }
.ci-sec { border-bottom: 1px solid var(--line); }
.ci-sh { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; }
.ci-sh-t { flex: 1; text-align: left; background: none; border: 0; font-weight: 700; font-size: 14px; color: var(--text); padding: 0; display: flex; align-items: center; gap: 6px; }
.ci-n { font-size: 11px; font-weight: 700; color: var(--sub); background: #EEF2F4; border-radius: 999px; padding: 1px 7px; }
.ci-n:empty { display: none; }
.ci-sh-pm { background: none; border: 0; color: var(--sub); font-size: 20px; width: 28px; height: 28px; line-height: 1; padding: 0; }
.ci-sh-pm::before { content: '−'; }
.ci-sec.is-closed .ci-sh-pm::before { content: '+'; }
.ci-add { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 13px; padding: 4px 6px; text-align: left; }
.ci-body { padding: 2px 16px 14px; }
.ci-sec.is-closed .ci-body { display: none; }
.seg { display: flex; background: #EEF2F4; border-radius: 999px; padding: 3px; margin: 4px 0 10px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 6px; font-size: 13px; color: var(--sub); font-weight: 600; }
.seg button.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ci-switch { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 8px; cursor: pointer; position: relative; }
.ci-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ci-switch i { width: 42px; height: 24px; border-radius: 999px; background: #C9D2D8; position: relative; transition: background .15s; flex: none; }
.ci-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.ci-switch input:checked + i { background: var(--accent); }
.ci-switch input:checked + i::after { left: 21px; }
.ci-task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #F0F3F2; opacity: 1; }
.ci-task:last-child { border-bottom: 0; }
.ci-task .ci-chk { width: 20px; height: 20px; flex: none; margin-top: 1px; border: 1.6px solid #b8c4c0; border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; padding: 0; cursor: pointer; }
.ci-task .ci-chk.ro { cursor: default; }
.ci-task .ci-chk.on { background: var(--accent); border-color: var(--accent); }
.ci-task.is-done { opacity: 1; }
.ci-task.is-done .nm { text-decoration: line-through; color: var(--sub); }
.ci-task .ci-task-b { min-width: 0; flex: 1; }
.ci-task .nm { font-size: 13px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.ci-task .st { font-size: 11.5px; color: var(--sub); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ci-task .st .avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.ci-task .st .is-late { color: var(--ng); font-weight: 700; }
.ci-mem { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ci-mem .avatar { width: 34px; height: 34px; font-size: 14px; }
.ci-mem .nm { font-size: 13.5px; font-weight: 600; }
.ci-mem .st { font-size: 11px; color: var(--sub); }
.ci-files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ci-file { margin: 0; }
.ci-file img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: #EEF2F4; cursor: zoom-in; display: block; }
.ci-file figcaption { font-size: 10px; color: var(--sub); text-align: center; margin-top: 2px; }
.ci-empty { font-size: 12.5px; color: var(--sub); text-align: center; padding: 14px 0 6px; margin: 0; }

/* スマホ：ⓘ を押すと右パネルを全画面で開く（PCでは常に右の列） */
@media (max-width: 899px) {
  .chat-info.is-open {
    display: flex; flex-direction: column; position: fixed; left: 0; right: 0;
    top: var(--vv-top, 0px); height: 100%; z-index: 45; background: #fff;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: var(--safe-top) 0 var(--safe-bottom);
  }
}

/* ---- 会社ロゴ（管理画面「会社設定」で登録。タイムライン左上・スマホは細い帯・ログイン画面） ---- */
.co-logo { display: block; max-width: 100%; max-height: 72px; object-fit: contain; margin: 2px auto 6px; }
.co-name.has-logo { display: none; }
.co-banner-m { background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; display: flex; justify-content: center; }
.co-banner-m img { max-height: 44px; max-width: 100%; object-fit: contain; }
/* スマホ用の帯は、左カード（ロゴ入り）が出る机上幅では隠す（二重に出さない） */
@media (min-width: 900px) { .co-banner-m { display: none !important; } }
.login-logo { display: block; max-width: 220px; max-height: 64px; object-fit: contain; margin: -6px auto 16px; }
.logo-pick { margin-bottom: 8px; }
.logo-prev { min-height: 64px; background: #F4F7F6; border: 1px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.logo-prev img { max-height: 80px; max-width: 100%; object-fit: contain; }

/* ================= パソコン幅：チャットの全幅3カラム（旧システムの並び） ================= */
@media (min-width: 900px) {
  main.chat-mode { max-width: none; padding: 0; }
  main.chat-mode > .tab-panel[data-tab="chat"] { max-width: none; gap: 0; height: 100%; }
  .chat-left { width: 320px; border-radius: 0; box-shadow: none; padding: 0; border-right: 1px solid var(--line); }
  .cl-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
  .cl-head b { font-size: 16px; }
  .chat-left .room-search { width: auto; margin: 0 14px 10px; }
  .chat-left .room-tools { margin: 0 14px 10px; }
  .room-list { border-radius: 0; gap: 0; }
  .room { padding: 14px 16px; border-bottom: 1px solid #F0F3F2; }
  .room.is-on { border-radius: 0; box-shadow: inset 3px 0 0 var(--accent); }
  #chat-view { background: #fff; height: 100%; } /* 古い「60vh」の指定を打ち消して、真ん中の列を下まで使う */
  .chat-head { margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); }
  .chat-head .back { display: none; }
  .chat-head #chat-info-toggle { display: none; }
  .chat-room-name { text-align: center; font-size: 17px; }
  .chat-search-bar { padding: 8px 20px; border-bottom: 1px solid var(--line); }
  .chat-messages { border-radius: 0; padding: 20px 28px; gap: 14px; }
  .chat-compose { padding: 10px 20px 16px; border-top: 1px solid var(--line); background: #fff; }
  .chat-form .chat-row textarea { min-height: 96px; max-height: 240px; } /* 本文欄は3行ぶんの高さから */
  .chat-info { display: flex; flex-direction: column; gap: 0; width: 320px; flex: none; overflow-y: auto; background: #fff; border-radius: 0; padding: 0; box-shadow: none; border-left: 1px solid var(--line); }
  .ci-close { display: none; }
}

/* ================= パソコン幅：文字を2pt大きく・余白をゆったり =================
   スマホの寸法は今までどおり（実機で検品済みのため）。ここはパソコンで見たときだけ効く。 */
@media (min-width: 900px) {
  body { font-size: 17px; }
  .app-header { padding: 14px 28px; }
  .company { font-size: 17px; }
  .gnav a { font-size: 15.5px; padding: 10px 18px; }
  .gnav a .ic { width: 20px; height: 20px; }
  .points { font-size: 13.5px; padding: 4px 10px; }
  .avatar { width: 28px; height: 28px; font-size: 13.5px; }
  .avatar.big { width: 64px; height: 64px; font-size: 26px; }
  main { padding: 26px 32px 36px; }
  .section-title { font-size: 15px; margin: 26px 2px 12px; }
  .count-badge { font-size: 12.5px; padding: 1px 9px; }
  .loading, .hint { font-size: 13.5px; }
  .chip { font-size: 15px; padding: 7px 15px; }
  .filter-row { gap: 9px; padding: 2px 0 12px; }
  .post-open { padding: 16px; font-size: 16px; }
  .card-list { gap: 14px; }
  .card { padding: 18px 20px; border-radius: 14px; }
  .card-head .nm { font-size: 16px; }
  .card-head .meta { font-size: 12.5px; }
  .tag { font-size: 12.5px; }
  .card-body .body-lb { font-size: 12.5px; }
  .post .who { font-size: 15.5px; }
  .shop-tag { font-size: 11.5px; }
  .post .meta { font-size: 12.5px; }
  .p-act { font-size: 13.5px; }
  .fields { gap: 10px; }
  .fields .f .k { font-size: 12.5px; }
  .fields .f .v { font-size: 15.5px; }
  .p-foot { margin-top: 14px; gap: 9px; }
  .stamp { font-size: 13.5px; padding: 5px 14px; }
  .kv div { font-size: 15px; }
  .kv span { font-size: 12.5px; }
  .card-foot { font-size: 13.5px; margin-top: 14px; padding-top: 12px; }
  .react-btn { font-size: 15px; }
  .status { font-size: 12.5px; }
  .cmt .avatar { width: 30px; height: 30px; }
  .cmt-h { font-size: 12.5px; }
  .cmt-h b { font-size: 14px; }
  .cmt-t { font-size: 15px; }
  .cmt-form input { font-size: 16px; padding: 10px 15px; }
  .tpl { padding: 16px; gap: 5px; }
  .tpl .nm { font-size: 16px; }
  .tpl .cat { font-size: 12.5px; }
  .template-list { gap: 12px; }
  .approval-inbox { padding: 14px 16px; }
  .app-tt { font-size: 15.5px; }
  .app-sub { font-size: 13.5px; }
  .app-acts button { font-size: 13.5px; padding: 9px 15px; }
  .rstep { font-size: 12.5px; }
  .todo-card { font-size: 15px; }
  .todo-kind { font-size: 12px; }
  .ntf-item .ntf-body b { font-size: 15.5px; }
  .ntf-item .ntf-text { font-size: 14.5px; }
  .ntf-item .ntf-time { font-size: 12.5px; }
  .task-card { padding: 18px 20px; margin-bottom: 14px; }
  .task-title { font-size: 17px; }
  .task-meta { font-size: 13.5px; }
  .task-note { font-size: 15px; }
  .task-src { font-size: 13.5px; }
  .task-actions button { font-size: 15px; padding: 10px; }
  #task-filter .chip { font-size: 16px; }
  #task-done-filter .chip { font-size: 15px; }
  .menu-row { font-size: 15.5px; padding: 15px 12px; }
  .menu-row .mi { width: 36px; height: 36px; }
  .menu-row .mi .ic { width: 19px; height: 19px; }
  .my-name { font-size: 18px; }
  .my-role { font-size: 13.5px; }
  .pt-card .l { font-size: 13.5px; }
  .pt-card .v { font-size: 19px; }
  .co-card .co-name { font-size: 16.5px; }
  .co-card .me-line .nm { font-size: 15.5px; }
  .co-card .me-line .st { font-size: 12.5px; }
  .sc { font-size: 15px; padding: 10px 11px; }
  .tile { width: 38px; height: 38px; font-size: 12.5px; }
  .tl-cols { gap: 24px; }
  .tl-side { width: 272px; gap: 14px; }
  .tl-main { max-width: none; }
  .notice-card { padding: 18px; }
  .notice-card.small p { font-size: 13.5px; }
  .primary-btn { padding: 15px; font-size: 16px; }
  .ghost-btn { padding: 13px; font-size: 15.5px; }
  .mini-btn { font-size: 13px; padding: 4px 11px; }
  .btn-sub { font-size: 15px; padding: 12px; }
  .btn-tiny { font-size: 13.5px; padding: 5px 12px; }
  .modal-card { padding: 24px 24px 28px; max-width: 600px; border-radius: 18px; }
  .modal-head { font-size: 18px; }
  .modal-desc { font-size: 13.5px; }
  .modal-form label { margin-bottom: 15px; }
  .modal-form .lb { font-size: 13.5px; }
  .modal-form input, .modal-form textarea, .modal-form select { font-size: 17px; padding: 12px 14px; }
  .modal-form .fld-help { font-size: 12.5px; }
  .member-pick label { font-size: 14.5px; padding: 7px 13px; }
  .pick-chip { font-size: 13.5px; }
  .pick-title { font-size: 13.5px; }
  .admin-item { padding: 14px 16px; }
  .admin-item .nm { font-size: 16px; }
  .admin-item .sub { font-size: 13px; }
  .admin-list { gap: 10px; }
  .admin-title { font-size: 19px; }
  .admin-group-head { font-size: 13.5px; }
  .adm-cols #admin-nav .chip { font-size: 15px; padding: 12px 14px; }
  .adm-cols #admin-nav { width: 212px; }
  .perm-table { font-size: 13.5px; }
  .perm-table th, .perm-table td { padding: 9px 11px; }
  .wg-table { font-size: 13.5px; }
  .wg-table th { font-size: 12.5px; }
  .ntf-pref { padding: 13px 2px; }
  .log-row { font-size: 13.5px; }
  .who-sheet { width: 264px; }
  .sheet-item { font-size: 15.5px; padding: 11px 10px; }
  .toast { font-size: 14.5px; }
  .wk-head b, .wk-store, .wk-range, .wk-day-title { font-size: 15px; }
  .wk-status { font-size: 13.5px; }
  .wk-grid .lb, .wk-cell .lb { font-size: 12.5px; }
  .wk-cell b { font-size: 17px; }
  .wk-auto { font-size: 13.5px; }
  .wk-imp .lb { font-size: 13.5px; }
  .wk-hint { font-size: 12.5px; }
  .cs-safe { font-size: 14.5px; }
  .cs-t1 { font-size: 15px; }
  .cs-t2 { font-size: 12.5px; }
  .cs-bubble { font-size: 14.5px; }
  .whosee { font-size: 13.5px; }
  .pt-row { font-size: 14.5px; }
  .pt-kind { font-size: 12px; }
  .pt-balance { font-size: 15px; }
  .pt-balance b { font-size: 19px; }
  .prof-intro { font-size: 16px; }
  .people-row .pr-body span { font-size: 13.5px; }
  .stat-row .stat-lb { font-size: 15px; }
  /* チャット */
  .room { padding: 14px 16px; gap: 12px; }
  .room .rn { font-size: 15px; }
  .room .rn-n { font-size: 12.5px; }
  .room .last { font-size: 13.5px; }
  .room .tm { font-size: 11.5px; }
  .room-search { font-size: 16px; padding: 10px 16px; }
  .msg { gap: 12px; }
  .msg .avatar { width: 38px; height: 38px; font-size: 15px; }
  .msg .mh { font-size: 13px; }
  .msg .mh b { font-size: 14.5px; }
  .msg .mh-time { font-size: 12px; }
  .msg .bubble { padding: 12px 16px; font-size: 16.5px; line-height: 1.75; }
  .msg .msg-stamps .stamp { font-size: 13px; padding: 3px 10px; }
  .mact { font-size: 19px; padding: 6px; }
  .msg-system { font-size: 13.5px; }
  .link-card .lc-t { font-size: 14.5px; }
  .link-card .lc-d { font-size: 13px; }
  .link-card .lc-s { font-size: 12px; }
  .chat-form textarea { font-size: 17px; padding: 12px 16px; }
  .chat-form button { height: 46px; padding: 0 22px; font-size: 16px; }
  .to-btn { font-size: 14.5px; min-height: 38px; padding: 0 18px; }
  .chat-photo-btn { min-height: 38px; padding: 0 14px; font-size: 18px; }
  .mention-item .nm { font-size: 15.5px; }
  .mention-item .rl { font-size: 12.5px; }
  .mention-chip { font-size: 13.5px; }
  .stamp-pop button { font-size: 22px; padding: 7px 10px; }
  .stamp-pop button span { font-size: 10.5px; }
  .icon-act { width: 38px; height: 38px; font-size: 17px; }
  .ci-title { font-size: 16px; }
  .ci-rname { font-size: 16px; }
  .ci-rsub { font-size: 13px; }
  .ci-sh-t { font-size: 15px; }
  .ci-add { font-size: 14px; }
  .seg button { font-size: 14px; padding: 7px; }
  .ci-switch { font-size: 14px; }
  .ci-task .nm { font-size: 14.5px; }
  .ci-task .st { font-size: 12.5px; }
  .ci-mem .nm { font-size: 14.5px; }
  .ci-mem .st { font-size: 12px; }
  .ci-empty { font-size: 13.5px; }
}


/* ================================================================
   2026-09-10 第2陣（15件）
   ・チャットの左右パネルの出し入れ／宛先の複数選択・TO ALL／左上の ECナビ→タイムライン
   ・チャット画面の絵文字を自作アイコン（Codex 手描き・線画）へ／画面内の確認ダイアログ
   ・「制度」タブ：左にカテゴリ・制度の詳細ページ・入力は別ページ（PC幅は2列）・下書き保存
   ・会社設定の入力欄
   ================================================================ */

/* ---- 追加の自作アイコン（stamp-add・info・chevron-left・close・plus は 2026-09-10 Codex 作） ---- */
[data-icon="stamp-add"] { -webkit-mask-image: url("icons/stamp-add.svg"); mask-image: url("icons/stamp-add.svg"); }
[data-icon="info"] { -webkit-mask-image: url("icons/info.svg"); mask-image: url("icons/info.svg"); }
[data-icon="chevron-left"] { -webkit-mask-image: url("icons/chevron-left.svg"); mask-image: url("icons/chevron-left.svg"); }
[data-icon="close"] { -webkit-mask-image: url("icons/close.svg"); mask-image: url("icons/close.svg"); }
[data-icon="plus"] { -webkit-mask-image: url("icons/plus.svg"); mask-image: url("icons/plus.svg"); }
[data-icon="camera"] { -webkit-mask-image: url("icons/camera.svg"); mask-image: url("icons/camera.svg"); }
[data-icon="search"] { -webkit-mask-image: url("icons/search.svg"); mask-image: url("icons/search.svg"); }
[data-icon="image"] { -webkit-mask-image: url("icons/image.svg"); mask-image: url("icons/image.svg"); }
[data-icon="user"] { -webkit-mask-image: url("icons/user.svg"); mask-image: url("icons/user.svg"); }
[data-icon="emoji"] { -webkit-mask-image: url("icons/emoji.svg"); mask-image: url("icons/emoji.svg"); }
[data-icon="members"] { -webkit-mask-image: url("icons/members.svg"); mask-image: url("icons/members.svg"); }
[data-icon="edit"] { -webkit-mask-image: url("icons/edit.svg"); mask-image: url("icons/edit.svg"); }
[data-icon="check"] { -webkit-mask-image: url("icons/check.svg"); mask-image: url("icons/check.svg"); }
[data-icon="send"] { -webkit-mask-image: url("icons/send.svg"); mask-image: url("icons/send.svg"); }
[data-icon="comment"] { -webkit-mask-image: url("icons/comment.svg"); mask-image: url("icons/comment.svg"); }
.icon-act .ic { width: 18px; height: 18px; vertical-align: 0; }
.mact .ic { width: 20px; height: 20px; vertical-align: 0; display: block; }
.mact i { display: none; }
.chat-photo-btn .ic { width: 18px; height: 18px; vertical-align: -4px; }
.back .ic { width: 22px; height: 22px; vertical-align: -6px; }
.ci-close .ic { width: 20px; height: 20px; }
.modal-head .ic { width: 20px; height: 20px; vertical-align: -4px; margin-right: 5px; }
.ghost-btn .ic, .mini-btn .ic, .stamp .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
.nb-ic .ic { width: 22px; height: 22px; color: var(--accent); }
.hint .ic { width: 15px; height: 15px; vertical-align: -3px; }
#brand-home { cursor: pointer; }

/* ---- チャット：左右パネルの出し入れ（PCだけ。スマホは今までどおり） ---- */
.pc-only { display: none; }
@media (min-width: 900px) {
  .pc-only { display: inline-flex; }
  .chat-head #chat-info-toggle { display: inline-flex; }
  .tab-panel[data-tab="chat"].hide-list .chat-left { display: none !important; }
  .tab-panel[data-tab="chat"].hide-info .chat-info { display: none !important; }
  .icon-act.is-off { opacity: .4; }
  .icon-act.is-off:hover { opacity: .8; }
}

/* ---- 宛先（TO）：複数を選んで「宛先にする」。全員（TO ALL）も ---- */
.mention-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 12.5px; font-weight: 700; color: var(--sub); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.mention-x { border: 0; background: none; color: var(--sub); padding: 2px; display: inline-flex; cursor: pointer; }
.mention-x .ic { width: 18px; height: 18px; }
.mention-item .mi-chk { width: 20px; height: 20px; flex: none; border: 1.6px solid #b8c4c0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.mention-item.is-on { background: var(--teal-l); }
.mention-item.is-on .mi-chk { background: var(--accent); border-color: var(--accent); }
.mention-item.is-on .mi-chk::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }
.mention-all .nm { color: var(--brand); }
.mention-all .avatar .ic { width: 14px; height: 14px; }
.mention-foot { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
.mention-foot .ghost-btn { margin: 0; flex: 1; padding: 9px; }
.mention-foot .primary-btn { flex: 2; padding: 9px; }
.mention-foot .primary-btn:disabled { background: #b9c6c3; }
.mention.is-all { background: #E9F2EE; color: var(--ok); border-radius: 4px; padding: 0 3px; }
.mention.is-all.is-me { background: #ffe9c9; color: #8a5a10; }

/* ---- 画面内の確認（ブラウザの confirm は環境によって出ない・固まるので使わない） ---- */
.confirm-box { position: fixed; inset: 0; z-index: 90; background: rgba(20,28,26,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirm-card { background: #fff; border-radius: 16px; padding: 22px 20px 18px; width: min(92vw, 400px); box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.confirm-text { margin: 0 0 16px; white-space: pre-wrap; line-height: 1.75; font-weight: 600; font-size: 14.5px; word-break: auto-phrase; } /* 語の途中で折らない（「取り／下げ」を防ぐ。対応ブラウザのみ・2026-09-26） */
.confirm-acts { display: flex; gap: 10px; }
.confirm-acts .ghost-btn { margin: 0; flex: 1; padding: 12px; }
.confirm-acts .primary-btn { flex: 1; padding: 12px; }
.confirm-acts .primary-btn.danger { background: var(--ng); }

/* ---- 「制度」タブ：カテゴリ（スマホは横並びのチップ・PCは左の列） ---- */
.template-list { display: block; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tpl-cat { font-size: 13px; color: var(--sub); font-weight: 700; margin: 16px 2px 8px; }
.tpl-group:first-child .tpl-cat { margin-top: 2px; }
.sd-cats { display: flex; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 0 10px; }
.sd-cat { flex: none; background: #fff; border: 1px solid var(--line); color: var(--sub); padding: 6px 12px; border-radius: 999px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.sd-cat .n { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 6px; }
.sd-cat.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.sd-cat.is-on .n { background: rgba(255,255,255,.25); }
.tpl .tpl-desc { color: var(--sub); font-size: 11.5px; font-weight: 400; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tpl .tpl-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tpl .draft { font-size: 10.5px; font-weight: 700; color: var(--orange); background: #FBF0E3; border-radius: 5px; padding: 1px 6px; }

/* ---- 制度の詳細ページ（旧システムの形：絵→名前→説明→利用者→大きなボタン→「制度の詳細」→最近の投稿） ---- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 2px 12px; color: var(--sub); }
.crumb a { color: var(--teal-text); font-weight: 700; cursor: pointer; }
.crumb b { color: var(--text); }
.tpl-page { padding: 0; overflow: hidden; margin-bottom: 14px; }
.tp-hero { background: var(--teal-l); display: flex; align-items: center; justify-content: center; padding: 34px 20px; }
.tp-hero .ic, .tp-hero .tpl-icon { width: 96px; height: 96px; color: var(--brand); font-size: 72px; }
.tp-main { padding: 18px 20px 20px; text-align: center; }
.tp-name { margin: 0 0 8px; font-size: 20px; }
.tp-desc { margin: 0 0 14px; white-space: pre-wrap; line-height: 1.8; text-align: left; }
.tp-kv { display: flex; justify-content: center; gap: 10px; font-size: 13.5px; margin-bottom: 16px; }
.tp-kv .k { color: var(--sub); font-weight: 700; }
.tp-go { max-width: 320px; margin: 0 auto; display: block; }
.tp-main .hint { text-align: center; margin-top: 8px; }
.acc { border-top: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; padding: 14px 20px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; color: var(--sub); font-size: 20px; line-height: 1; }
.acc[open] summary::after { content: '−'; }
.acc-body { padding: 0 20px 18px; }
.tp-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid #F0F3F2; font-size: 14px; }
.tp-row .k { color: var(--sub); font-weight: 700; font-size: 13px; }
.tp-fields { list-style: none; margin: 0; padding: 0; }
.tp-field { padding: 8px 0; border-bottom: 1px solid #F0F3F2; }
.tp-field:last-child { border-bottom: 0; }
.tp-field b { display: block; font-size: 14px; margin-bottom: 4px; }
.fb-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fb { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; border: 1px solid; background: #fff; }
.fb-share { color: var(--teal-text); border-color: var(--accent); }
.fb-req { color: var(--ng); border-color: var(--ng); }
.tp-help { display: block; font-size: 12px; color: var(--sub); margin-top: 4px; }

/* ---- 入力画面を「別ページ」の形で（ポップアップの外側の誤タップで閉じない・PC幅は広く2列） ---- */
#modal.is-page { background: var(--bg); align-items: flex-start; }
#modal.is-page .modal-card { max-width: 960px; margin: 20px auto 0; border-radius: 16px; max-height: calc(100% - 40px); padding: 20px 26px 28px; }
#modal.is-page .modal-close { display: none; }
#modal-back { flex: none; margin-right: 10px; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }
#modal-back .ic { width: 20px; height: 20px; vertical-align: 0; }
.form-acts { display: flex; gap: 10px; margin-top: 8px; }
.form-acts .primary-btn { flex: 2; }
.form-acts .draft-btn { flex: 1; margin-top: 0; }
.form-acts .ghost-btn { flex: 1; margin-top: 0; width: auto; } /* 「削除」「元に戻す」など横並びの副ボタン（2026-09-11：幅100%のままだと主ボタンが潰れていた） */
@media (max-width: 899px) {
  #modal.is-page .modal-card { margin: 0; max-width: none; max-height: none; border-radius: 0; padding: 0; }
  #modal-back { color: rgba(255,255,255,.9); }
}
@media (min-width: 900px) {
  #modal.is-page .modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
  #modal.is-page .modal-form > * { grid-column: 1 / -1; }
  #modal.is-page .modal-form > label:not(:has(textarea)) { grid-column: auto; }
  #modal.is-page .modal-form > .fld-choice { grid-column: 1 / -1; }
  main > .tab-panel[data-tab="apply"], main > .tab-panel[data-tab="tpl"] { max-width: none; }
  .sd-cols { display: flex; gap: 20px; align-items: flex-start; }
  .sd-cats { flex-direction: column; width: 220px; flex: none; gap: 2px; padding: 8px; background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); position: sticky; top: 4px; overflow: visible; }
  .sd-cat { border: 0; border-radius: 9px; padding: 11px 12px; font-size: 15px; justify-content: space-between; text-align: left; width: 100%; }
  .sd-cat .n { font-size: 12px; }
  .sd-main { flex: 1; min-width: 0; }
  .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } /* 横幅に余裕があれば4〜6列＝縦のスクロールが減る（2026-09-11） */
  .tpl-cat { font-size: 14.5px; }
  .tp-name { font-size: 23px; }
  .tp-desc { font-size: 16px; }
  .tp-row { font-size: 15px; grid-template-columns: 120px 1fr; }
  .tp-field b { font-size: 15px; }
  .crumb { font-size: 14px; }
  .confirm-text { font-size: 16px; }
  .mention-item .mi-chk { width: 22px; height: 22px; }
}

/* ---- 管理画面「会社設定」の入力欄（素っ気なさの解消） ---- */
.setting-form { padding: 18px 20px 20px; }
.setting-form label { display: block; margin-bottom: 16px; }
.setting-form .lb { display: block; font-size: 12.5px; color: var(--sub); font-weight: 700; margin-bottom: 6px; }
.setting-form input[type="text"], .setting-form input:not([type]) { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; font-family: inherit; background: #fcfdfd; }
.setting-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36,156,168,.15); }
.setting-form .fld-help { display: block; font-size: 12px; color: var(--sub); margin-top: 5px; }
.setting-form .primary-btn { max-width: 320px; }
@media (min-width: 900px) { .setting-form { padding: 22px 26px 26px; } .setting-form .lb { font-size: 13.5px; } .setting-form input[type="text"], .setting-form input:not([type]) { font-size: 17px; } }

/* ================================================================
   2026-09-10 第3陣（5件）：ヘッダーの配色とロゴ／左右パネルの矢印／部屋の概要文／記録ボタンの余白
   ================================================================ */
:root { --header: #33383F; } /* 上のメニューバー＝濃いめのグレー */
.app-header { background: var(--header); }
.app-header { position: relative; }
.app-header-main { gap: 10px; }
/* キーカラーの縦線＝メニューバーの左端にくっつけて、バーと同じ高さ（2026-09-10 指示） */
.brand-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 0; background: var(--accent); }
.logo-mark { width: 34px; height: 34px; }
.company { font-size: 18px; }
.app-header .tab .dot, .gnav .dot { box-shadow: 0 0 0 2px var(--header); }
@media (min-width: 900px) {
  .brand-bar { width: 7px; }
  .logo-mark { width: 38px; height: 38px; }
  .company { font-size: 20px; }
}

/* 左右のパネルの矢印（PC）：隠すのは各パネルの見出しの矢印、出すのは真ん中の端に出る矢印 */
.pane-handle, .pane-tab { display: none; }
@media (min-width: 900px) {
  .pane-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--sub); cursor: pointer; padding: 0; flex: none; }
  .pane-handle:hover { background: var(--teal-l); color: var(--teal-text); }
  .pane-handle .ic { width: 18px; height: 18px; vertical-align: 0; }
  .ic-flip { transform: scaleX(-1); }
  .cl-head { justify-content: space-between; }
  .ci-top .pane-handle { margin-right: 8px; }
  .ci-top .ci-title { flex: 1; }
  .pane-tab { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 22px; height: 56px; border: 1px solid var(--line); background: #fff; color: var(--sub); cursor: pointer; padding: 0; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
  .pane-tab.left { left: 0; border-left: 0; border-radius: 0 10px 10px 0; }
  .pane-tab.right { right: 0; border-right: 0; border-radius: 10px 0 0 10px; }
  .pane-tab .ic { width: 16px; height: 16px; vertical-align: 0; }
  .pane-tab:hover { background: var(--teal-l); color: var(--teal-text); }
  .tab-panel[data-tab="chat"].hide-list #list-expand { display: flex; }
  .tab-panel[data-tab="chat"].hide-info #info-expand { display: flex; }
  .chat-head #chat-info-toggle { display: none; } /* PCは右パネルの矢印で */
}

/* 部屋の概要文（右パネル） */
.ci-rdesc { font-size: 12.5px; color: var(--tx2); white-space: pre-wrap; line-height: 1.65; margin: 6px 0 0; text-align: left; width: 100%; }
@media (min-width: 900px) { .ci-rdesc { font-size: 13.5px; } }

/* 制度の一覧の下の「記録を見る」ボタンは、制度のカードから離す */
.sd-main > .post-box { margin-top: 28px; }
.tpl-group:last-child { margin-bottom: 6px; }
/* 概要文の中のリンク */
.ci-rdesc a.lnk { color: var(--teal-text); text-decoration: underline; word-break: break-all; }

/* 上のメニュー：開いているタブは文字とアイコンをキーカラーに（2026-09-10 案。濃いグレーの上で読めるよう少し明るい青緑） */
:root { --key-on-dark: #5ED0DB; }
.gnav a.is-on { color: var(--key-on-dark); background: rgba(36,156,168,.16); } /* 下線は無し（判断） */
.gnav a.is-on:hover { color: var(--key-on-dark); background: rgba(36,156,168,.22); }
.gnav a.is-on .ic { color: var(--key-on-dark); }

/* ---- チャットの「タスクを追加しました」カード（2026-09-10） ---- */
.msg-task { align-self: center; width: min(100%, 460px); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-light); border-radius: 12px; padding: 12px 14px; margin: 4px auto 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); text-align: left; }
.mt-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx2); }
.mt-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--teal-l); color: var(--teal-text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mt-ic .ic { width: 16px; height: 16px; vertical-align: 0; }
.mt-head b { font-size: 13px; color: var(--text); }
.mt-time { margin-left: auto; font-size: 11px; color: var(--sub); flex: none; }
.mt-title { font-size: 14.5px; font-weight: 700; margin: 8px 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.mt-kv { display: inline-flex; align-items: center; gap: 5px; }
.mt-kv .k { color: var(--sub); font-weight: 700; font-size: 11px; }
.mt-person { display: inline-flex; align-items: center; gap: 4px; }
.mt-person .avatar { width: 20px; height: 20px; font-size: 10px; }
.mt-more { color: var(--sub); font-size: 11.5px; }
.mt-kv b.is-late { color: var(--ng); }
.mt-photo { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--sub); margin-top: 6px; }
.mt-go { display: block; margin: 10px 0 0 auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--brand); font-weight: 700; cursor: pointer; }
.mt-go:hover { background: var(--teal-l); }
@media (min-width: 900px) {
  .msg-task { padding: 14px 18px; width: min(100%, 520px); }
  .mt-head b { font-size: 14.5px; }
  .mt-title { font-size: 16px; }
  .mt-meta { font-size: 13.5px; }
  .mt-kv .k { font-size: 12px; }
  .mt-person .avatar { width: 22px; height: 22px; font-size: 11px; }
  .mt-go { font-size: 13.5px; padding: 6px 14px; }
}

/* ================================================================
   2026-09-10 第4陣：要件で未実装だった機能（投稿の修正削除・ピン留め・予約投稿・画像スタンプ・相談の写真・
   入口の並べ替え・組織の階層・設定の控え・一覧上のチェック 等）
   ================================================================ */
/* 投稿の道具（本人・管理者だけ）とピン留め */
.p-head { position: relative; }
.p-tools { margin-left: auto; display: flex; gap: 4px; flex: none; align-self: flex-start; }
.p-tools button { border: 1px solid var(--line); background: #fff; color: var(--sub); border-radius: 999px; font-size: 11px; padding: 3px 9px; cursor: pointer; }
.p-tools button:hover { background: var(--teal-l); color: var(--teal-text); }
.p-tools button.is-on { background: var(--teal-l); color: var(--teal-text); border-color: var(--accent); }
.post.is-pinned { border: 1.5px solid var(--accent); }
.pin-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--teal-text); background: var(--teal-l); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.pin-badge .ic { width: 14px; height: 14px; vertical-align: 0; }
[data-icon="pin"] { -webkit-mask-image: url("icons/pin.svg"); mask-image: url("icons/pin.svg"); }
[data-icon="box"] { -webkit-mask-image: url("icons/box.svg"); mask-image: url("icons/box.svg"); }
[data-icon="clip"] { -webkit-mask-image: url("icons/clip.svg"); mask-image: url("icons/clip.svg"); }
/* 予約中の投稿（本人だけに見える） */
.sched-card { display: flex; align-items: center; gap: 10px; background: #FBF6E9; border: 1px solid #E7D9AE; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: 13px; }
.sched-card .sc-when { font-weight: 700; color: #8a5a10; flex: none; }
.sched-card .sc-body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-card .mini-btn { margin-left: 0; flex: none; }
/* 画面内の入力（差し戻しの理由など） */
.confirm-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 16px; font-family: inherit; margin: -6px 0 14px; resize: vertical; background: #fcfdfd; }
/* 画像スタンプ */
.stamp-img { width: 22px; height: 22px; object-fit: contain; vertical-align: -6px; display: inline-block; }
.stamp-pop button .stamp-img { width: 30px; height: 30px; vertical-align: 0; }
.msg .msg-stamps .stamp-img { width: 18px; height: 18px; vertical-align: -5px; }
.stamp-big .stamp-img, .stat-row .stamp-img { width: 32px; height: 32px; vertical-align: -8px; }
.stamp-prev { width: 64px; height: 64px; border-radius: 12px; background: #EEF2F4; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.stamp-prev img { width: 56px; height: 56px; object-fit: contain; }
/* 入口の並べ替え */
.tab-order { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tab-order .to-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.tab-order .to-row .ic { width: 20px; height: 20px; color: var(--brand); }
.tab-order .to-row b { flex: 1; font-size: 14px; }
.tab-order .to-row button { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 30px; font-size: 14px; }
.tab-order .to-row button:disabled { opacity: .3; }
/* 組織の階層（管理画面） */
.org-tree .admin-item.depth-1 { margin-left: 22px; }
.org-tree .admin-item.depth-2 { margin-left: 44px; }
.org-tree .admin-item.depth-3 { margin-left: 66px; }
.org-tree .admin-item .parent { font-size: 11px; color: var(--sub); }
/* 人と権限：押して付け外しできる升 */
.acc-table td.tog { cursor: pointer; }
.acc-table td.tog:hover { background: var(--teal-l); }
.acc-table td.tog .ro-n { color: #A7B4BD; }
/* 相談の写真 */
.cs-bubble .photos { margin: 8px 0 2px; max-width: 300px; }
/* 設定の控え */
.backup-box { display: grid; gap: 12px; }
.backup-box .card { padding: 16px 18px; }
.backup-box .card h3 { margin: 0 0 6px; font-size: 15px; }
.backup-box .card p { margin: 0 0 10px; font-size: 13px; color: var(--tx2); }
@media (min-width: 900px) { .p-tools button { font-size: 12.5px; padding: 4px 11px; } .sched-card { font-size: 14.5px; } .tab-order .to-row b { font-size: 15.5px; } }

.emp-badge.is-ext { color: #4b5563; background: #E9ECEF; }
/* タスク完了のお知らせ（依頼者宛・緑） */
.msg-task.is-done { border-left-color: var(--ok); }
.msg-task.is-done .mt-ic { background: var(--green-l); color: var(--ok); }

/* チャットの左右パネルを薄いグレーに（真ん中の白いやり取りと差をつける・2026-09-10 要望） */
@media (min-width: 900px) {
  .chat-left, .chat-info { background: #F3F5F7; }
  .room { background: transparent; border-bottom: 1px solid #E6EAEE; }
  .room:hover { background: #EBEFF2; }
  .room.is-on { background: #fff; box-shadow: inset 3px 0 0 var(--accent); }
  .chat-left .room-search { background: #fff; }
  .chat-left .btn-sub { background: #fff; }
  .cl-head, .ci-top, .ci-room, .ci-sec { border-color: #E6EAEE; }
  .seg { background: #E6EAEE; }
  .ci-task, .ci-mem { border-color: #E6EAEE; }
}

/* タスク完了のカード：グレーで「終わった感」＋依頼した本人には「あなた宛」の帯（2026-09-10 要望） */
.msg-task.is-done { background: #F1F3F5; border-color: #E1E6EA; border-left-color: var(--ok); }
.msg-task.is-done .mt-title { text-decoration: line-through; color: var(--sub); font-weight: 600; }
.msg-task.is-done .mt-meta, .msg-task.is-done .mt-head b { color: var(--sub); }
.msg-task.is-done .mt-ic { width: 30px; height: 30px; background: var(--ok); color: #fff; }
.msg-task.is-done .mt-ic .ic { width: 18px; height: 18px; }
.mt-donetag { font-size: 11px; font-weight: 800; color: var(--ok); background: var(--green-l); border-radius: 999px; padding: 2px 9px; margin-left: 2px; }
.msg-task.is-done .mt-go { color: var(--sub); }
.msg-task.is-tome { border-left-color: #E28A1D; }
.mt-tome { display: flex; align-items: center; gap: 6px; margin: -4px -6px 8px; padding: 6px 10px; border-radius: 8px; background: #FFE9C9; color: #8a5a10; font-size: 12.5px; font-weight: 800; }
.mt-tome .ic { width: 15px; height: 15px; vertical-align: 0; }
@media (min-width: 900px) { .mt-tome { font-size: 14px; } .mt-donetag { font-size: 12px; } }

/* 依頼の取り下げ（2026-09-26 要望）：完了と同じ「終わった」グレー。緑ではなく灰色で見分ける */
.task-card.is-withdrawn { opacity: .6; border-left-color: #9AA5AE; }
.task-card.is-withdrawn .task-title { text-decoration: line-through; }
.task-wd { font-size: 12px; color: var(--sub); margin-top: 6px; }
.status.withdrawn { background: #EEF2F4; color: var(--sub); }
.task-actions .danger { color: var(--ng); border-color: #e8c9c6; font-weight: 600; }
.msg-task.is-withdrawn:not(.is-tome) { border-left-color: #9AA5AE; }
.msg-task.is-withdrawn .mt-ic { background: #9AA5AE; color: #fff; }
.mt-donetag.is-wd { color: var(--sub); background: #E6EAEE; }

/* 未読の始まり：Chatwork風の赤い線「未読メッセージ」（2026-09-10 要望）。部屋を開いたとき、自分が最後に読んだ所より後の最初のやり取りの上に出る */
.unread-line { display: flex; align-items: center; gap: 12px; align-self: stretch; margin: 4px 0 2px; color: #E0413A; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; user-select: none; }
.unread-line::before, .unread-line::after { content: ''; flex: 1; height: 1px; background: #E0413A; }
.unread-line span { flex: none; line-height: 1; }
@media (min-width: 900px) { .unread-line { font-size: 12.5px; } }

/* 制度のくわしい説明（旧システムの説明文を丸ごと載せる欄・2026-09-10）。改行そのまま・URLはリンク */
.tp-guide { margin: -4px 0 16px; padding: 12px 14px; border-radius: 12px; background: #F7F9FA; border: 1px solid #E6EAEE; white-space: pre-wrap; line-height: 1.8; font-size: 13.5px; text-align: left; overflow-wrap: anywhere; }
.tp-guide a.lnk { color: var(--accent); word-break: break-all; }
@media (min-width: 900px) { .tp-guide { font-size: 15px; } }

/* 画面の高さ（2026-09-10 報告：iPhone のホーム画面から開いた版で、下のタブの下に灰色の余りが出る）
   「見えている高さ（--vh）」を高さに使うのはキーボードが出ている間（html.kb-open）だけ。ふだんは 100%＝画面いっぱい。
   キーボードが閉じたあとに古い高さが残っても、下に余りが出ない */
html.kb-open #app-shell, html.kb-open .modal { height: var(--vh, 100%); }
@media (max-width: 899px) { html.kb-open .chat-info.is-open { height: var(--vh, 100%); } }
.login-screen { overflow-x: hidden; }

/* スマホの「チャットルーム情報」全画面：‹ 戻る（2026-09-10 ：概要画面から戻れない）。開いている間は body 直下に出す（app.js setChatInfoOpen） */
.ci-back { display: none; border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 15px; padding: 4px 8px 4px 0; align-items: center; gap: 2px; cursor: pointer; }
.ci-back .ic { width: 20px; height: 20px; vertical-align: 0; }
@media (max-width: 899px) {
  .ci-back { display: inline-flex; }
  .ci-top .ci-title { flex: 1; }
  body > .chat-info.is-open { z-index: 80; } /* 上のヘッダー・下のタブより前 */
}

/* 写真を付けるときの「×」は必ず丸に（2026-09-10 ：iPhone で楕円になっていた＝入力欄まわりのボタンの一般則が padding を足していた） */
.chat-form .chat-photos .pp-item .pp-rm, .photo-pick .pp-item .pp-rm {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 22px; height: 22px; min-width: 0; min-height: 0; padding: 0; margin: 0; border-radius: 50%; line-height: 1; font-size: 13px;
  -webkit-appearance: none; appearance: none;
}

/* スマホの下のタブ：線とアイコンの間に余白（2026-09-10 ：線ギリギリで窮屈）。帯の中で選択中の丸い帯も同じぶん下げる */
@media (max-width: 899px) {
  .tab { padding: 12px 0 8px; gap: 3px; }
  .tab::before { top: 8px; }
  .tab .dot { top: 4px; }
  .tab .dot:empty { top: 7px; }
}

/* チャットのスタンプ（LINE のように、それ1つで投稿になる画像・2026-09-10 要望）。反応（リアクション）とは別物 */
.sticker-tray { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -6px 24px rgba(0,0,0,.14); padding: 10px; max-height: 250px; overflow-y: auto; overscroll-behavior: contain; z-index: 8; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.st-grid button { border: 1px solid transparent; background: #fff; border-radius: 10px; padding: 4px; cursor: pointer; }
.st-grid button:hover, .st-grid button:active { border-color: var(--accent); background: var(--teal-l); }
.st-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.st-loading { margin: 6px 4px; font-size: 12.5px; color: var(--sub); text-align: center; }
.chat-sticker-btn.is-on { border-color: var(--accent); color: var(--teal-text); background: var(--teal-l); }
.msg-sticker img { width: 140px; height: 140px; object-fit: contain; display: block; }
.msg-sticker.is-none { font-size: 12px; color: var(--sub); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
@media (min-width: 900px) { .msg-sticker img { width: 160px; height: 160px; } }
.sticker-prev img { width: 56px; height: 56px; object-fit: contain; display: block; }
.sticker-prev.big img { width: 120px; height: 120px; }

/* 机上幅の上メニュー（.gnav）の印も同じ赤いバッジ（2026-09-10） */
@media (min-width: 900px) {
  .gnav a { position: relative; }
  .gnav .dot {
    position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
    background: #E0413A; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--header); z-index: 2; animation: badge-in .25s ease-out;
  }
  .gnav .dot:empty { min-width: 11px; width: 11px; height: 11px; padding: 0; top: 5px; right: 6px; }
}

/* 人を探す＝組織の木（アコーディオン・2026-09-11 要望） */
.ptree { margin-top: 4px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.pt { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.pt > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.pt > summary::-webkit-details-marker { display: none; }
.pt > summary::before { content: '›'; display: inline-block; width: 14px; text-align: center; color: var(--sub); transition: transform .15s; font-weight: 800; }
.pt[open] > summary::before { transform: rotate(90deg); }
.pt .pt-kind { font-size: 10.5px; color: var(--sub); font-weight: 500; }
.pt .pt-n { margin-left: auto; font-size: 11px; color: var(--sub); font-weight: 700; background: #EEF2F4; border-radius: 999px; padding: 1px 8px; }
.pt .pt-body { padding: 0 8px 8px; }
.pt .pt-body .pt { margin: 0 0 6px 8px; background: #FAFBFC; }
.pt .people-row { margin: 0 0 6px; }
@media (min-width: 900px) { .ptree { max-height: 62vh; } .pt > summary { font-size: 15px; } }

/* 管理画面のメニュー：見出し（社員設定・その他）と、その下の項目の入れ子（2026-09-11 指定の並び） */
#admin-nav .admin-group { flex-basis: 100%; font-size: 11.5px; color: var(--sub); font-weight: 800; letter-spacing: .04em; padding: 6px 6px 0; }
#admin-nav .chip.is-sub { position: relative; }
#admin-nav .chip { word-break: auto-phrase; } /* 「働く人の登録と編／集」のような語の途中の折れを防ぐ（2026-09-27） */
@media (min-width: 900px) {
  .adm-cols #admin-nav .admin-group { padding: 12px 12px 4px; font-size: 12px; }
  .adm-cols #admin-nav .chip.is-sub { margin-left: 16px; width: calc(100% - 16px); }
  .adm-cols #admin-nav .chip.is-sub::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; border-left: 2px solid #E1E6EA; }
}

/* 管理画面のメニューの見出し（社員設定・その他）＝押すと開くアコーディオン。閉じているときは他の項目と同じ見た目（2026-09-11） */
#admin-nav .chip.is-group { position: relative; }
#admin-nav .chip.is-group .grp-arrow { margin-left: auto; font-size: 12px; color: var(--sub); padding-left: 8px; }
#admin-nav .chip.is-group.is-open { background: #EEF2F4; }
@media (max-width: 899px) { #admin-nav .chip.is-group .grp-arrow { margin-left: 4px; } }

/* スマホの文字を全体に一段大きく（2026-09-11「スマホの文字サイズもう少しずつ大きく」）。机上幅の「+2pt」の節と同じ場所を +1pt で。机上幅の指定はそのまま */
@media (max-width: 899px) {
  body { font-size: 16px; }
  .company { font-size: 16px; }
  .gnav a { font-size: 14.5px; }
  .points { font-size: 12.5px; }
  .avatar { font-size: 12.5px; }
  .avatar.big { font-size: 25px; }
  .section-title { font-size: 14px; }
  .count-badge { font-size: 11.5px; }
  .loading, .hint { font-size: 12.5px; }
  .chip { font-size: 14px; }
  .post-open { font-size: 15px; }
  .card-head .nm { font-size: 15px; }
  .card-head .meta { font-size: 11.5px; }
  .tag { font-size: 11.5px; }
  .card-body .body-lb { font-size: 11.5px; }
  .post .who { font-size: 14.5px; }
  .shop-tag { font-size: 10.5px; }
  .post .meta { font-size: 11.5px; }
  .p-act { font-size: 12.5px; }
  .fields .f .k { font-size: 11.5px; }
  .fields .f .v { font-size: 14.5px; }
  .stamp { font-size: 12.5px; }
  .kv div { font-size: 14px; }
  .kv span { font-size: 11.5px; }
  .card-foot { font-size: 12.5px; }
  .react-btn { font-size: 14px; }
  .status { font-size: 11.5px; }
  .cmt-h { font-size: 11.5px; }
  .cmt-h b { font-size: 13px; }
  .cmt-t { font-size: 14px; }
  .cmt-form input { font-size: 15px; }
  .tpl .nm { font-size: 15px; }
  .tpl .cat { font-size: 11.5px; }
  .app-tt { font-size: 14.5px; }
  .app-sub { font-size: 12.5px; }
  .app-acts button { font-size: 12.5px; }
  .rstep { font-size: 11.5px; }
  .todo-card { font-size: 14px; }
  .todo-kind { font-size: 11px; }
  .ntf-item .ntf-body b { font-size: 14.5px; }
  .ntf-item .ntf-text { font-size: 13.5px; }
  .ntf-item .ntf-time { font-size: 11.5px; }
  .task-title { font-size: 16px; }
  .task-meta { font-size: 12.5px; }
  .task-note { font-size: 14px; }
  .task-src { font-size: 12.5px; }
  .task-actions button { font-size: 14px; }
  #task-filter .chip { font-size: 15px; }
  #task-done-filter .chip { font-size: 14px; }
  .menu-row { font-size: 14.5px; }
  .my-name { font-size: 17px; }
  .my-role { font-size: 12.5px; }
  .pt-card .l { font-size: 12.5px; }
  .pt-card .v { font-size: 18px; }
  .co-card .co-name { font-size: 15.5px; }
  .co-card .me-line .nm { font-size: 14.5px; }
  .co-card .me-line .st { font-size: 11.5px; }
  .sc { font-size: 14px; }
  .tile { font-size: 11.5px; }
  .notice-card.small p { font-size: 12.5px; }
  .primary-btn { font-size: 15px; }
  .ghost-btn { font-size: 14.5px; }
  .mini-btn { font-size: 12px; }
  .btn-sub { font-size: 14px; }
  .btn-tiny { font-size: 12.5px; }
  .modal-head { font-size: 17px; }
  .modal-desc { font-size: 12.5px; }
  .modal-form .lb { font-size: 12.5px; }
  .modal-form input, .modal-form textarea, .modal-form select { font-size: 16px; }
  .modal-form .fld-help { font-size: 11.5px; }
  .member-pick label { font-size: 13.5px; }
  .pick-chip { font-size: 12.5px; }
  .pick-title { font-size: 12.5px; }
  .admin-item .nm { font-size: 15px; }
  .admin-item .sub { font-size: 12px; }
  .admin-title { font-size: 18px; }
  .admin-group-head { font-size: 12.5px; }
  .adm-cols #admin-nav .chip { font-size: 14px; }
  .perm-table { font-size: 12.5px; }
  .wg-table { font-size: 12.5px; }
  .wg-table th { font-size: 11.5px; }
  .log-row { font-size: 12.5px; }
  .sheet-item { font-size: 14.5px; }
  .toast { font-size: 13.5px; }
  .wk-head b, .wk-store, .wk-range, .wk-day-title { font-size: 14px; }
  .wk-status { font-size: 12.5px; }
  .wk-grid .lb, .wk-cell .lb { font-size: 11.5px; }
  .wk-cell b { font-size: 16px; }
  .wk-auto { font-size: 12.5px; }
  .wk-imp .lb { font-size: 12.5px; }
  .wk-hint { font-size: 11.5px; }
  .cs-safe { font-size: 13.5px; }
  .cs-t1 { font-size: 14px; }
  .cs-t2 { font-size: 11.5px; }
  .cs-bubble { font-size: 13.5px; }
  .whosee { font-size: 12.5px; }
  .pt-row { font-size: 13.5px; }
  .pt-kind { font-size: 11px; }
  .pt-balance { font-size: 14px; }
  .pt-balance b { font-size: 18px; }
  .prof-intro { font-size: 15px; }
  .people-row .pr-body span { font-size: 12.5px; }
  .stat-row .stat-lb { font-size: 14px; }
  .room .rn { font-size: 14px; }
  .room .rn-n { font-size: 11.5px; }
  .room .last { font-size: 12.5px; }
  .room .tm { font-size: 10.5px; }
  .room-search { font-size: 15px; }
  .msg .avatar { font-size: 14px; }
  .msg .mh { font-size: 12px; }
  .msg .mh b { font-size: 13.5px; }
  .msg .mh-time { font-size: 11px; }
  .msg .bubble { font-size: 15.5px; }
  .msg .msg-stamps .stamp { font-size: 12px; }
  .mact { font-size: 18px; }
  .msg-system { font-size: 12.5px; }
  .link-card .lc-t { font-size: 13.5px; }
  .link-card .lc-d { font-size: 12px; }
  .link-card .lc-s { font-size: 11px; }
  .chat-form textarea { font-size: 16px; }
  .chat-form button { font-size: 15px; }
  .to-btn { font-size: 13.5px; }
  .chat-photo-btn { font-size: 17px; }
  .mention-item .nm { font-size: 14.5px; }
  .mention-item .rl { font-size: 11.5px; }
  .mention-chip { font-size: 12.5px; }
  .stamp-pop button { font-size: 21px; }
  .stamp-pop button span { font-size: 10px; }
  .icon-act { font-size: 16px; }
  .ci-title { font-size: 15px; }
  .ci-rname { font-size: 15px; }
  .ci-rsub { font-size: 12px; }
  .ci-sh-t { font-size: 14px; }
  .ci-add { font-size: 13px; }
  .seg button { font-size: 13px; }
  .ci-switch { font-size: 13px; }
  .ci-task .nm { font-size: 13.5px; }
  .ci-task .st { font-size: 11.5px; }
  .ci-mem .nm { font-size: 13.5px; }
  .ci-mem .st { font-size: 11px; }
  .ci-empty { font-size: 12.5px; }
}

/* 下のタブの文字も一段大きく（スマホ） */
@media (max-width: 899px) { .tab { font-size: 11px; } .tab .ic { width: 23px; height: 23px; } }

/* 制度タブと制度の詳細ページの文字をスマホで一段大きく（2026-09-11「制度の説明文がまだ小さい」） */
@media (max-width: 899px) {
  .tpl .nm { font-size: 16px; }
  .tpl .tpl-desc { font-size: 13.5px; line-height: 1.55; -webkit-line-clamp: 3; }
  .tpl .cat { font-size: 12.5px; }
  .tpl-cat { font-size: 15px; margin: 18px 2px 8px; }
  .sd-cat { font-size: 14.5px; padding: 7px 13px; }
  .sd-cat .n { font-size: 12px; }
  .tab-panel[data-tab="apply"] .section-title { font-size: 15.5px; }
  .tp-name { font-size: 22px; }
  .tp-desc { font-size: 16px; }
  .tp-guide { font-size: 15px; }
  .tp-kv { font-size: 14.5px; }
  .tp-row .k, .tp-row .v { font-size: 14.5px; }
  .tp-fields li { font-size: 14.5px; }
  .tp-help { font-size: 13px; }
  .acc > summary { font-size: 15.5px; }
}

/* 管理画面：チャットルームの参加者の選択（2026-09-11）。利用者側の .member-pick（部屋を作る画面のチップ）とは別物 */
.adm-mp { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; margin-top: 6px; }
.adm-mp .mp-st { font-size: 11.5px; color: var(--sub); font-weight: 800; margin: 8px 2px 4px; }
.adm-mp .mp-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.adm-mp .mp-row:hover { background: #F3F5F7; }
.adm-mp .mp-row:has(input:checked) { background: #E8EEF7; }
.adm-mp .mp-row input { width: auto; margin: 0; }
.adm-mp .mp-row .avatar { width: 26px; height: 26px; font-size: 11px; }
.adm-mp .mp-nm { font-size: 14px; font-weight: 600; }
.adm-mp .mp-rl { font-size: 11px; color: var(--sub); margin-left: auto; }
.adm-mp-f { padding: 6px 0 0; flex-wrap: wrap; overflow: visible; }  /* 所属・役割の絞り込み（折り返して全部見せる） */
.adm-mp-f .chip { flex: none; white-space: nowrap; }
.mp-shown { font-size: 11px; color: var(--sub); margin-left: 8px; font-weight: 500; }

/* 通知から飛んできた「その申請」を光らせる（2026-09-11） */
.card.is-hit, .approval-item.is-hit { box-shadow: 0 0 0 3px var(--brand), 0 10px 30px rgba(0, 0, 0, .12); animation: hit-pulse 1.2s ease-in-out 3; }
@keyframes hit-pulse { 50% { box-shadow: 0 0 0 7px rgba(31, 40, 80, .28), 0 10px 30px rgba(0, 0, 0, .12); } }


/* 通知タブ「さらに見る」（2026-09-11） */
.ntf-more { margin-top: 4px; padding: 10px; font-size: 13.5px; }

/* ================= PC のタイムライン：投稿は読みやすい幅に・「すべて」は制度ごとの横スクロール列（旧システムの形・2026-09-11） ================= */
@media (min-width: 900px) {
  /* 縦の一覧（制度を1つ選んだとき）は 760px まで。区分・店舗のチップは横に長いまま */
  #timeline-list:not(.is-rows) > .card, .tl-main .post-box, #scheduled-box { max-width: 760px; }
  #timeline-list.is-rows { gap: 18px; }
  .tl-sec { background: #fff; border-radius: 14px; padding: 14px 16px 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
  .tl-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .tl-sec-head .sec-ic { width: 28px; height: 28px; flex: none; }
  .tl-sec-t b { font-size: 16px; }
  .tl-sec-n { font-size: 12px; color: var(--sub); margin-left: 8px; }
  .tl-more { margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--teal-text); font-weight: 700; }
  .tl-more:hover { background: var(--teal-l); }
  .tl-row-wrap { position: relative; }
  .tl-row { display: flex; align-items: stretch; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: thin; }
  .tl-row > .card { flex: 0 0 300px; width: 300px; scroll-snap-align: start; margin: 0; display: flex; flex-direction: column;
    border: 1.5px solid #C9D2DB; box-shadow: none; } /* 白い箱の上に白いカード＝枠線をはっきり（2026-09-11「どこまでが1人分か分かりにくい」） */
  .tl-row > .card.is-pinned { border-color: #F2C48A; }
  .tl-row > .card .p-head .who { font-size: 13.5px; }
  .tl-row > .card .fields { max-height: 200px; overflow: hidden; position: relative; }
  .tl-row > .card .fields.is-clip::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
  /* 横並びの小さなカードの中のお祝いカードは、幅に応じて自動で縮む（cqi）ので個別の上書きは不要になった（2026-09-19） */
  .tl-row > .card .photos { grid-template-columns: repeat(3, 1fr); }
  .tl-row > .card .p-foot { margin-top: auto; padding-top: 8px; }
  .tl-row > .card .seen-n { display: none; }
  .p-open { align-self: flex-start; background: none; border: 0; color: var(--teal-text); font-weight: 700; font-size: 12.5px; padding: 8px 0 0; }
  .p-open:hover { text-decoration: underline; }
  .tl-row-more { flex: 0 0 140px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; color: var(--teal-text); font-weight: 700; font-size: 13px; line-height: 1.6; }
  .tl-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 22px; line-height: 1; color: var(--tx2); padding: 0 0 3px; }
  .tl-arrow.l { left: -10px; }
  .tl-arrow.r { right: -10px; }
  .tl-arrow:hover { background: var(--teal-l); color: var(--teal-text); }
  .tl-row-wrap.no-scroll .tl-arrow { display: none; }
}

/* タイムライン：投稿ボックスが上のチップ列（横スクロールのバー）に密着していた → 余白（2026-09-11） */
.tl-main .post-box { margin-top: 12px; }
#nippo-filter:not([hidden]) { margin-bottom: 2px; }

/* 制度の編集：入力項目を1つずつ枠で囲む（2026-09-11「どこからどこまでが1つのブロックか分かりづらい」） */
.field-row { border: 1px solid #CBD3DB; border-radius: 10px; background: #F6F8FA; padding: 10px 10px 9px; margin-bottom: 10px; position: relative; }
.field-row .fi-no { width: 100%; font-size: 11px; font-weight: 800; color: var(--sub); letter-spacing: .04em; margin: -2px 0 2px; }
.field-row input, .field-row select { background: #fff; }
.field-row .mini-btn.danger { margin-left: auto; }

/* ---------- 2026-09-19：テスターのレビュー反映 ---------- */
/* 入力の窓はすべて「ページの形」（ポップアップをやめる）。見るだけの窓（プロフィール・人を探す・ポイントの記録）と
   管理画面の入力も同じ形で開く。PC は 2列の格子だが、管理画面の入力は項目の並びが決まっているので 1列のまま読みやすい幅に */
#modal.is-page .modal-card { width: 100%; }
@media (min-width: 900px) {
  #modal.is-page .modal-head { position: sticky; top: -20px; background: #fff; z-index: 3; padding: 6px 0 10px; margin: -6px 0 6px; border-bottom: 1px solid var(--line); }
  #modal.is-page .modal-form > label:has(input[type=checkbox]), #modal.is-page .modal-form > label:has(input[type=radio]) { grid-column: 1 / -1; }
  #modal.is-page .modal-form > .primary-btn, #modal.is-page .modal-form > .form-acts { max-width: 420px; margin-left: auto; margin-right: auto; width: 100%; }
}

/* タイムラインの週報カード */
.post.is-weekly { border-left: 3px solid var(--accent); }
.wkc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.wkc-num { background: var(--teal-l); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wkc-num .k { font-size: 11px; color: var(--sub); font-weight: 600; }
.wkc-num b { font-size: 17px; line-height: 1.3; }
.wkc-diff { font-size: 11px; font-weight: 700; }
.wkc-diff.is-up { color: var(--ok); }
.wkc-diff.is-down { color: var(--ng); }
.post.is-weekly .seen-n { display: inline-flex; align-items: center; gap: 4px; margin-left: 0; }
.post.is-weekly .seen-n .ic { width: 13px; height: 13px; vertical-align: 0; }
.post.is-weekly:not(.is-compact) .p-open { display: block; width: 100%; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.post.is-weekly.is-compact .wkc-num b { font-size: 15px; }

/* 管理画面：組織の並べ替え（▲▼） */
.org-move { display: inline-flex; flex-direction: column; gap: 2px; flex: none; }
.org-move button { width: 30px; height: 22px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 10px; line-height: 1; color: var(--tx2); cursor: pointer; padding: 0; }
.org-move button:disabled { opacity: .3; cursor: default; }
.org-move button:not(:disabled):hover { border-color: var(--accent); color: var(--teal-text); }
.tpl-fixed-note { background: #FBF6E9; border: 1px solid #E7D9AE; border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.7; color: var(--tx2); margin: 4px 0 12px; }

/* 管理画面のメニュー（2026-09-19 テスター：スマホで見出し「社員設定」「その他」を開くと、中身が右の画面の外に出て気づけなかった）
   スマホ＝上の横スクロールの列＋開いた見出しの中身は「すぐ下の段」に折り返して全部見せる／PC＝今までどおり左の縦メニューの中に入れ子 */
#admin-nav .adm-nav-main { display: contents; }
#admin-nav .adm-nav-sub { display: none; }
@media (max-width: 899px) {
  #admin-nav { display: block; overflow: visible; padding-bottom: 6px; }
  #admin-nav .adm-nav-main {
    display: flex; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 24px 8px 0;
    /* 右端を薄くして「まだ右に続きがある」ことを示す */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  #admin-nav .adm-nav-main .chip.is-sub { display: none; } /* 中身は下の段に出す */
  #admin-nav .adm-nav-sub { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 0 0 6px; }
  #admin-nav .adm-sub-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  #admin-nav .adm-sub-grp + .adm-sub-grp { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
  #admin-nav .adm-sub-lb { flex-basis: 100%; font-size: 11.5px; font-weight: 700; color: var(--sub); display: inline-flex; align-items: center; gap: 4px; }
  #admin-nav .adm-sub-lb .ic { width: 14px; height: 14px; vertical-align: 0; }
}

/* 見えない選択用の丸（radio）が、入力欄の「幅100%」を引き継いで枠の外へはみ出し、ページの形の入力画面に横スクロールが出ていた（2026-09-19）。
   見えない丸は 1px にして左上に固定する（選ぶ動き・キーボード操作はそのまま） */
.modal-form .choice-chip input, .modal-form .celeb-tile input, #consult-body .cs-opt input {
  width: 1px; height: 1px; left: 0; top: 0; padding: 0; margin: 0; border: 0; min-height: 0;
}

/* ---------- 2026-09-19 午後：追加レビュー ---------- */
/* チャット右のタスク欄：自分以外のタスクにはチェックの箱を出さず、「依頼中」の札だけ */
.ci-req { display: inline-block; font-size: 10px; font-weight: 700; color: var(--sub); background: #EEF2F4; border-radius: 4px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; }
/* 相談窓口：終了の印（まん中の細い1行）・利用停止の人・返信せずに終了 */
.cs-sys { align-self: center; max-width: 92%; text-align: center; }
.cs-sys span { display: inline-block; font-size: 11.5px; color: var(--sub); background: #E4E9EC; border-radius: 999px; padding: 3px 12px; line-height: 1.5; }
.cs-mask.is-stop { color: #fff; background: #7b8790; border-color: #7b8790; margin-left: 6px; vertical-align: 2px; }
.cs-stopped { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 6px; font-size: 13.5px; line-height: 1.7; color: var(--tx2); }
.cs-stopped b { color: var(--text); }
.cs-stopped .primary-btn { margin-top: 2px; }
.cs-closed-note { font-weight: 700; color: var(--ok); }
.cs-close-link { display: block; margin: 2px 0 10px auto; background: none; border: 0; padding: 6px 2px; font-size: 12.5px; color: var(--sub); text-decoration: underline; cursor: pointer; }
.cs-close-link:hover { color: var(--ng); }
/* 週報：見るだけの画面（提出した本人以外） */
#weekly-body.is-readonly input:disabled, #weekly-body.is-readonly textarea:disabled, #weekly-body.is-readonly select:disabled { background: #F4F6F7; color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; }
/* 役割設定：付けられる雇用区分 */
.role-emp { background: #F7F9FA; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }

/* ---------- 2026-10-06：ECC さんの修正要望7件（使う方に高齢の方が多い＝分かりやすく・押しやすく） ---------- */
/* ① ログイン：キーボードが出ている間は、見えている高さに合わせて上詰め＋ボタンまでスクロールできるように */
html.kb-open .login-screen { bottom: auto; top: var(--vv-top, 0px); height: var(--vh, 100%); align-items: flex-start; padding-bottom: 40px; }
@media (max-width: 899px) { .login-screen { align-items: flex-start; padding-top: calc(var(--safe-top) + 28px); } }
.login-form .primary-btn { min-height: 52px; font-size: 17px; }

/* ② タイムラインの絞り込み：段の頭に札（種類／お店／期間）。選んだときの色を段ごとに変える */
.frow-lb { flex: none; align-self: center; font-size: 12px; font-weight: 800; color: #fff; border-radius: 6px; padding: 4px 8px; letter-spacing: .04em; }
.frow-lb.lb-kind { background: var(--brand); }
.frow-lb.lb-store { background: var(--teal-text); }
.frow-lb.lb-days { background: var(--orange); }
#nippo-filter .chip { border-color: #BFDDE2; color: var(--teal-text); }
#nippo-filter .chip.is-on { background: var(--teal-text); border-color: var(--teal-text); color: #fff; }
#nippo-filter .chip.is-days { border-color: #EBCBA8; color: #A65D12; }
#nippo-filter .chip.is-days.is-on { background: var(--orange); border-color: var(--orange); color: #fff; }
#timeline-filter .chip:not(.sw) { border-color: #C5CAD9; color: var(--brand); }
#timeline-filter .chip.is-on:not(.sw) { color: #fff; }
#nippo-filter { margin-top: -2px; }

/* ③ 戻るボタン：どの画面でも同じ形の大きな「‹ 戻る」（枠つき・押しやすい高さ） */
.back.page-back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 6px 16px 6px 8px; margin: 0 0 12px;
  background: #fff; border: 1.5px solid var(--brand); border-radius: 999px; color: var(--brand); font-size: 15px; font-weight: 700; cursor: pointer;
}
.back.page-back .ic { width: 22px; height: 22px; vertical-align: 0; }
.back.page-back:active { background: var(--teal-l); }
.admin-head .back.page-back { margin: 0 0 0 auto; }
@media (min-width: 900px) { #mypage-back { display: none; } } /* PC は上のメニューがいつも見えている */
/* 入力ページ（プロフィール等）の左上「‹ 戻る」も、紺の帯の上で白い枠つきのボタンに */
@media (max-width: 899px) {
  #modal-back { min-height: 40px; padding: 4px 14px 4px 6px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 999px; color: #fff; font-size: 15px; font-weight: 700; }
  /* チャットの部屋の「‹ 一覧」 */
  #chat-back { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px 4px 4px; border: 1.5px solid var(--brand); border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--brand); flex: none; }
  #chat-back .bk-t { font-size: 15px; }
  /* チャットルーム情報の「‹ 戻る」 */
  .ci-back { min-height: 40px; padding: 4px 14px 4px 6px; border: 1.5px solid var(--brand); border-radius: 999px; margin-right: 8px; }
}
@media (min-width: 900px) { #chat-back .bk-t { display: none; } }

/* ④ スマホの下のメニュー：うすい紺の地＋上に影＝中身と同化させない。文字も濃く */
@media (max-width: 899px) {
  .tabbar { background: #E6EAF4; border-top: 1px solid #C9D0E3; box-shadow: 0 -3px 10px rgba(31,40,80,.10); }
  .tab { color: #4A5677; }
  html { background: #E6EAF4; } /* iPhone の下の余りもメニューの続きに見える色 */
  .tab .dot { box-shadow: 0 0 0 2px #E6EAF4; }
}

/* ⑤ 左上の「ホーム」札（押すとホーム＝タイムラインに戻る） */
.home-badge {
  flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.55); color: #fff; padding: 2px 9px 2px 6px; border-radius: 999px;
}
.home-badge .ic { width: 15px; height: 15px; vertical-align: 0; }

/* ⑦ 拡大表示：写真は指で拡大・移動、チャットの文章は全画面で大きく。下に＋／−のボタン */
.photo-viewer { touch-action: none; overflow: hidden; }
.photo-viewer .pv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.photo-viewer .pv-stage img { max-width: 96vw; max-height: 82vh; object-fit: contain; border-radius: 6px; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.photo-viewer .pv-close { z-index: 3; }
.photo-viewer .pv-zoom {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 18px);
  display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.16); border-radius: 999px; padding: 6px 8px;
}
.photo-viewer .pv-zoom button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--brand); font-size: 28px; font-weight: 800; line-height: 52px; padding: 0; cursor: pointer; }
.photo-viewer .pv-zoom span { min-width: 84px; text-align: center; color: #fff; font-size: 15px; font-weight: 700; }
.photo-viewer.is-text { background: rgba(10, 16, 28, .97); }
.photo-viewer .pv-text {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--safe-top) + 70px); bottom: calc(var(--safe-bottom) + 96px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 0 18px;
}
.photo-viewer .pv-text-head { color: rgba(255,255,255,.8); font-size: 15px; margin: 0 auto 10px; max-width: 760px; display: flex; gap: 10px; align-items: baseline; }
.photo-viewer .pv-text-head b { color: #fff; font-size: 17px; }
.photo-viewer .pv-text-body {
  max-width: 760px; margin: 0 auto; background: #fff; color: var(--text); border-radius: 16px; padding: 20px 22px;
  line-height: 1.7; word-break: break-word; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text;
}
.photo-viewer .pv-text-body a { color: var(--teal-text); text-decoration: underline; }
#chat-messages .bubble[data-mid] { cursor: zoom-in; }
/* 札は横にスクロールしても左端に残す（どの段の絞り込みか常に分かる） */
.frow-lb { position: sticky; left: 0; z-index: 2; box-shadow: 6px 0 0 var(--bg); }
/* 自動投稿（タスクのカード・お知らせの行）も押すと拡大表示（2026-10-06）。カードは見た目ごと写す */
#chat-messages [data-sysmid] { cursor: zoom-in; }
.photo-viewer .pv-text-body.is-card { background: transparent; padding: 0; }
.photo-viewer .pv-text-body.is-card .msg-task { width: auto; margin: 0; box-shadow: none; }
/* リアクションの選択（スマホ）：押した場所の横ではなく、画面の下から出る板（2026-10-06 ：短い吹き出しで左右とも見切れた） */
body > .stamp-pop.is-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 900; width: auto; max-width: none;
  border-radius: 18px 18px 0 0; border: 0; padding: 10px 14px calc(var(--safe-bottom) + 14px);
  max-height: 62vh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -10px 30px rgba(0,0,0,.22);
}
.stamp-pop.is-sheet .sp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; position: sticky; top: -10px; background: #fff; z-index: 1; }
.stamp-pop.is-sheet .sp-head b { font-size: 16px; color: var(--text); }
.stamp-pop.is-sheet .sp-close { min-height: 40px; padding: 4px 16px; border: 1.5px solid var(--brand); border-radius: 999px; background: #fff; color: var(--brand); font-size: 15px; font-weight: 700; }
.stamp-pop.is-sheet .sp-cat { font-size: 13px; margin: 10px 2px 4px; }
.stamp-pop.is-sheet .sp-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stamp-pop.is-sheet button[data-pick-emoji] { font-size: 30px; padding: 10px 2px; background: #F6F8FA; border-radius: 12px; min-height: 72px; justify-content: center; }
.stamp-pop.is-sheet button[data-pick-emoji] span { font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stamp-pop.is-sheet button .stamp-img { width: 36px; height: 36px; }
.stamp-pop.is-sheet .sp-head + .sp-cat { margin-top: 8px; }
/* 「閉じる」の文字が上に寄っていた（2026-10-06）＝選択欄のボタンの共通指定（縦並び）を引き継いでいた。横並びで上下左右まんなかに */
.stamp-pop.is-sheet .sp-close { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; line-height: 1; gap: 0; }

/* ======================================================================
   2026-10-31 試運転の修正要望（No.9〜29）
   ====================================================================== */
/* 文字装飾（鈴木社長⑨）：本文の **太字** __下線__ !!赤文字!! を見た目に */
.tx-b { font-weight: 800; }
.tx-u { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.tx-red { color: #D6362E; font-weight: 700; }
.deco-bar { display: inline-flex; gap: 4px; align-items: center; }
.deco-btn { min-width: 34px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 13px; color: var(--text); padding: 0 8px; cursor: pointer; line-height: 1; }
.deco-btn:hover { background: var(--teal-l); border-color: var(--accent); }
.modal-form .deco-bar { display: flex; margin: 2px 0 6px; }
.mention-bar .deco-bar { margin-left: 4px; }
/* 消された発言（石坂様㉙） */
.msg-system.is-deleted { color: var(--sub); opacity: .85; }
.mact.mact-del { font-size: 11.5px; color: var(--sub); padding: 5px 7px; line-height: 1; }
.mact.mact-del:hover { color: var(--ng); background: #FDEEF1; }
/* だれがリアクションしたか（山岸様⑰） */
.react-who { border: 0; background: none; color: var(--sub); font-size: 11.5px; padding: 2px 4px; cursor: pointer; text-decoration: underline dotted; align-self: center; white-space: nowrap; }
.react-who:hover { color: var(--teal-text); }
.react-who-pop { min-width: 230px; }
.react-who-pop .sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.react-who-pop .sp-head b { font-size: 13px; color: var(--text); }
.react-who-pop .sp-close { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand); font-size: 12px; font-weight: 700; padding: 3px 10px; line-height: 1; }
.react-who-pop .rw-list { display: flex; flex-direction: column; }
.rw-row { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: 13px; }
.rw-row .rw-nm { font-weight: 700; }
.rw-row .rw-lb { color: var(--sub); font-size: 11px; margin-left: auto; }
.rw-row .stamp-img { width: 24px; height: 24px; }
/* コメントの「直す」「消す」（浅野様㉒） */
.cmt-h .cmt-tools { margin-left: auto; display: inline-flex; gap: 6px; }
.cmt-tools button { border: 0; background: none; color: var(--sub); font-size: 11px; padding: 0 3px; cursor: pointer; text-decoration: underline; }
.cmt-tools button:hover { color: var(--teal-text); }
.cmt > div { min-width: 0; flex: 1; }
/* 承認の箱：□ の説明（浅野様㉕）・承認せずコメントだけ（山岸様⑬） */
.inbox-hint { font-size: 12px; color: var(--sub); margin: 0 0 8px; }
.app-acts .btn-cmt, .approval-actions .btn-cmt { background: #fff; color: var(--brand); border: 1px solid var(--brand) !important; }
.app-cmts { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.app-cmt { background: #F6F8FA; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; margin-top: 6px; }
.app-cmts .app-cmt { margin-top: 0; }
.app-cmt b { font-size: 12px; margin-right: 6px; }
.app-cmt span { color: var(--sub); font-size: 11px; }
.app-cmt p { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; }
/* 写真が必須の制度（浅野様⑳）：無いまま出そうとしたら赤い枠で知らせる */
.photo-pick.is-missing { outline: 2px solid var(--ng); outline-offset: 4px; border-radius: 8px; }
