/* ネクフィル 共有メール受信 — スタイル (v0.2.0 / ★v0.2.22 Gmail 風・Outlook 風は末尾)
   portal(社内ポータル)の css/style.css をそのままコピーし、末尾に mail 固有分を追記している。
   ★既存クラス名(.toast .modal-bg .modal-head .modal-body .modal-foot .field .btn .btn.primary
     .btn.danger .tbl .empty .chip …)は auth.js が直接吐くので改名しないこと。
   ★ダークモードは実装しない(既存4アプリすべて light 固定)。 */
:root{
  --blue:#1e5fa8; --blue-d:#16497f; --blue-bg:#e8f1fb;
  --bg:#f4f6f9; --card:#ffffff; --border:#e2e6ec;
  --text:#1f2733; --text2:#566073; --text3:#8a93a3;
  --green:#178a52; --green-bg:#e6f6ec;
  --amber:#b76b00; --amber-bg:#fdf3e2;
  --red:#c8332b; --red-bg:#fdecea;
  --radius:12px; --shadow:0 1px 3px rgba(20,40,70,.07),0 1px 2px rgba(20,40,70,.04);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic UI",Meiryo,sans-serif;
  background:var(--bg);color:var(--text);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}

/* ── ログイン ── */
.login-screen{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#1e5fa8 0%,#16497f 100%);padding:20px;z-index:100;overflow:auto}
.login-box{background:#fff;border-radius:16px;padding:34px 30px;width:100%;max-width:380px;box-shadow:0 16px 48px rgba(0,0,0,.22)}
.login-logo{font-size:20px;font-weight:700;color:var(--blue-d);text-align:center;margin-bottom:22px}
.login-logo span{display:block;font-size:12px;color:var(--text3);font-weight:500;margin-top:2px}
.login-box label{display:block;font-size:12px;color:var(--text2);margin:12px 0 4px;font-weight:600}
.login-box input[type=email],.login-box input[type=password]{width:100%;padding:10px 12px;border:1px solid var(--border);
  border-radius:8px;font-size:14px;outline:none}
.login-box input:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-bg)}
.login-box .remember{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text2);font-weight:500;margin-top:12px;cursor:pointer}
.login-box .remember input{width:auto}
.login-error{color:var(--red);font-size:12px;min-height:16px;margin:10px 0 0}
.login-note{font-size:11px;color:var(--text3);text-align:center;margin-top:16px;line-height:1.8}
.login-link{color:var(--blue);font-weight:600;text-decoration:none}
.login-link:hover{text-decoration:underline}
.login-or{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:12px;margin:8px 0}
.login-or span{flex:1;height:1px;background:#e2e8f0}
.btn-webauthn{width:100%;padding:10px;border:1px solid #2563eb;background:#eff6ff;color:#1e40af;
  border-radius:8px;font-weight:600;cursor:pointer;font-size:14px}
.btn-primary{width:100%;margin-top:16px;padding:11px;background:var(--blue);color:#fff;border:none;border-radius:8px;
  font-size:14px;font-weight:600;cursor:pointer;transition:background .15s}
.btn-primary:hover{background:var(--blue-d)}
.btn-primary:disabled{opacity:.6;cursor:default}

/* ── トップバー ── */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:#fff;border-bottom:1px solid var(--border);padding:0 16px;height:52px}
.topbar-left{display:flex;align-items:center;gap:14px;min-width:0}
.brand{font-size:15px;font-weight:700;color:var(--blue-d);white-space:nowrap}
.app-switch{display:flex;align-items:center;gap:5px}
.app-link{display:inline-flex;align-items:center;gap:3px;padding:4px 10px;border-radius:7px;background:var(--bg);
  color:var(--text2);text-decoration:none;font-size:12px;font-weight:600;border:1px solid var(--border);white-space:nowrap}
.app-link:hover{background:var(--blue-bg)}
.app-link.current{background:var(--blue-bg);color:var(--blue-d);border-color:#bcd6f1}
.topbar-right{display:flex;align-items:center;gap:10px}
.auth-name{font-size:13px;color:var(--text2);font-weight:600;white-space:nowrap}
.btn-ghost{padding:6px 12px;background:transparent;border:1px solid var(--border);border-radius:7px;color:var(--text2);
  font-size:12px;font-weight:600;cursor:pointer}
.btn-ghost:hover{background:var(--bg)}

/* ── タブバー ── */
.tabbar{position:sticky;top:52px;z-index:30;display:flex;gap:4px;background:#fff;border-bottom:1px solid var(--border);
  padding:0 12px;overflow-x:auto}
.tab{padding:9px 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text2);
  font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.tab:hover{color:var(--blue)}
.tab.active{color:var(--blue-d);border-bottom-color:var(--blue)}

/* ── メイン ── */
.main{max-width:1080px;margin:0 auto;padding:18px 16px 60px}
.page{display:none}
.page.active{display:block}
.footer{text-align:center;color:var(--text3);font-size:11px;padding:18px}

/* ── カード ── */
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);
  padding:16px 18px;margin-bottom:16px}
.card-title{font-size:14px;font-weight:700;color:var(--text);margin:0 0 12px;display:flex;align-items:center;gap:7px}
.card-title .sub{font-size:11px;color:var(--text3);font-weight:500;margin-left:auto}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}

/* ── 統計タイル ── */
.stat{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow)}
.stat .label{font-size:12px;color:var(--text2);font-weight:600}
.stat .num{font-size:26px;font-weight:800;color:var(--blue-d);margin-top:2px;line-height:1.1}
.stat .num small{font-size:13px;color:var(--text3);font-weight:600}
.stat.warn .num{color:var(--amber)}
.stat.alert .num{color:var(--red)}

/* ── チップ ── */
.chip{display:inline-block;font-size:10px;font-weight:700;padding:1px 7px;border-radius:10px}
.chip.normal{background:var(--blue-bg);color:var(--blue-d)}
.chip.important{background:var(--amber-bg);color:var(--amber)}
.chip.critical{background:var(--red-bg);color:var(--red)}
.chip.pin{background:#eef0f3;color:var(--text2)}

/* ── ボタン/フォーム ── */
.btn{display:inline-flex;align-items:center;gap:5px;padding:7px 13px;border:1px solid var(--border);background:#fff;
  border-radius:8px;font-size:13px;font-weight:600;color:var(--text);cursor:pointer}
.btn:hover{background:var(--bg)}
.btn:disabled{opacity:.55;cursor:default}
.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}
.btn.primary:hover{background:var(--blue-d)}
.btn.danger{color:var(--red);border-color:#f0c4c0}
.btn.sm{padding:4px 9px;font-size:12px}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;font-weight:600;color:var(--text2);margin-bottom:4px}
.field input[type=text],.field input[type=email],.field input[type=password],.field input[type=date],
.field input[type=number],.field input[type=search],.field input[type=datetime-local],
.field select,.field textarea{width:100%;padding:8px 10px;border:1px solid var(--border);
  border-radius:8px;font-size:13px;font-family:inherit;outline:none}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-bg)}
.field textarea{min-height:80px;resize:vertical}
.row{display:flex;gap:10px;flex-wrap:wrap}
.row>*{flex:1;min-width:140px}
.muted{color:var(--text3);font-size:12px}
.empty{text-align:center;color:var(--text3);font-size:13px;padding:28px 10px}

/* ── テーブル ── */
.tbl{width:100%;border-collapse:collapse;font-size:13px}
.tbl th{text-align:left;padding:9px 10px;color:var(--text2);font-weight:700;border-bottom:2px solid var(--border);font-size:12px}
.tbl td{padding:9px 10px;border-bottom:1px solid var(--border)}
.tbl tr:hover td{background:#fafbfc}

/* ── モーダル ── */
.modal-bg{position:fixed;inset:0;background:rgba(20,30,45,.42);display:flex;align-items:center;justify-content:center;
  padding:18px;z-index:80}
.modal{background:#fff;border-radius:14px;width:100%;max-width:520px;max-height:90vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--border)}
.modal-head h3{margin:0;font-size:15px}
.modal-body{padding:16px 18px}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:13px 18px;border-top:1px solid var(--border)}
.x{background:none;border:none;font-size:20px;color:var(--text3);cursor:pointer;line-height:1}

/* ── トースト ── */
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#1f2733;color:#fff;padding:10px 18px;
  border-radius:10px;font-size:13px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.25);z-index:200;opacity:0;transition:.2s}
.toast.show{opacity:1}
.toast.success{background:var(--green)}
.toast.error{background:var(--red)}

/* ═══════════════════════════════════════════════════════════════
   ここから下が mail 固有(portal からの差分)
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   v0.2.4 画面の高さいっぱいを一覧に使う。
   ★直す前は .mm-list{max-height:calc(100vh - 190px)} という「190px」の見込みだったが、
     実際の一覧の開始位置は 344px。差の 154px ぶん一覧が画面の外へはみ出し、
     ページ全体まで一緒に動く二重スクロールになっていた。
     これが「1031×762 のノートPCで 3件しか見えない」大元。
   ★見込みの数字を書き直すのではなく、**器を縦のフレックスにして残りを全部渡す**。
     こうすると上の帯の高さが変わっても二度とずれない。
   ★#app は auth.js:188 が display を直接書くので、そちらも 'flex' に直してある
     (インラインの指定は CSS より強いため、CSS だけでは効かない)。
   ══════════════════════════════════════════════════════════════ */
html,body{height:100%}
#app{flex-direction:column;height:100dvh;min-height:0}
/* ★margin:0 auto を必ず打ち消すこと。縦のフレックスの中では左右の auto マージンが
     align-self:stretch を無効にしてしまい、.main が中身の幅まで縮んで中央に寄る
     (1497px の画面で一覧が 757px しか使わず、左右に 370px ずつ余白が出た)。 */
.main{max-width:none;margin:0;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:6px 12px 0}
/* ★overflow-y:auto を必ず入れること。入れないと、中身が画面より高いページ
     (接続設定など)で #app からはみ出し、
       ・フッターが本文の途中に印字される
       ・透明なフッター帯が「保存」「接続テスト」のタップを食う
       ・topbar / tabbar の sticky が #app の高さに閉じ込められ、
         少し下げただけでアプリ切替もタブも画面から消える
     が同時に起きる。一覧のページは .mm-split が中でぴたりと収まるので
     スクロールバーは増えない。 */
.page.active{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto}
.footer{padding:2px 0 3px;flex:0 0 auto}
.topbar,.tabbar{flex:0 0 auto}

/* ビルド番号バッジ */
.build-badge{font-size:10px;font-weight:700;letter-spacing:.02em;color:var(--text3);
  border:1px solid var(--border);border-radius:999px;padding:1px 7px;white-space:nowrap;
  font-variant-numeric:tabular-nums}
/* サーバの版と画面の版が食い違っているとき(?v= の上げ忘れ)。JS が付ける。 */
.build-badge.warn{color:#fff;background:var(--red);border-color:var(--red)}

/* 状態チップ */
.chip.st-open {background:var(--red-bg);   color:var(--red)}
.chip.st-doing{background:var(--amber-bg); color:var(--amber)}
.chip.st-done {background:var(--green-bg); color:var(--green)}
.chip.st-na   {background:#eef0f3;         color:var(--text2)}

/* ── フィルタ帯 ──
   ★v0.2.4 で薄くした。ここが 150px あったせいで一覧が画面の下へ押し出され、
     1031×762 のノートPCで 3件しか見えていなかった。 */
/* ★v0.2.4: 状態タブの列と絞り込みの列を**1行**にまとめる(画面が狭ければ自然に2行へ折り返す)。
     2列に分けていた分の 29px がそのまま一覧の高さになる = ほぼ1件分。 */
.mm-filters{padding:4px 8px;margin-bottom:4px;flex:0 0 auto;
  display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mm-filters>[id^="mmf-health-"],.mm-filters>[id^="mmf-markread-"]{flex:0 0 100%}
/* ★中身が空のときは display:none にすること。高さ0でも flex の gap(6px)は
     そのまま効くので、空の入れ物2つで 12px を無駄にする(ほぼ半行分)。 */
.mm-filters>[id^="mmf-health-"]:empty,.mm-filters>[id^="mmf-markread-"]:empty{display:none}
/* ★個人箱(mymail.js の mpSkeletonHtml)の子にも同じ扱いを与えること。
     忘れると「接続先の帯」「取り込み中・停止・エラーの帯」「署名などの設定」が
     横一列の部品に化け、いちばん強い告知(⛔管理者により停止されています)が
     見出しの右端に貼り付いて読み飛ばされる。 */
.mm-filters>#mp-head,.mm-filters>#mp-banner,.mm-filters>#mp-tabs,
.mm-filters>.mp-settings,.mm-filters>[id^="mp-note"]{flex:0 0 100%}
.mm-filters>#mp-banner:empty,.mm-filters>#mp-head:empty{display:none}
.mm-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:0}
.mm-tab{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border:1px solid var(--border);
  background:#fff;border-radius:999px;font-size:12.5px;font-weight:700;color:var(--text2);cursor:pointer;white-space:nowrap}
.mm-tab:hover{background:var(--bg)}
.mm-tab.active{background:var(--blue-bg);color:var(--blue-d);border-color:#bcd6f1}
.mm-badge{display:inline-block;min-width:18px;text-align:center;font-size:10.5px;font-weight:800;
  padding:0 5px;border-radius:999px;background:#eef0f3;color:var(--text2);font-variant-numeric:tabular-nums}
.mm-badge.alert{background:var(--red);color:#fff}
.mm-frow{display:flex;gap:8px;flex-wrap:wrap;align-items:center;flex:1 1 380px;min-width:0}
.mm-fl{display:flex;flex-direction:column;gap:3px;font-size:11px;font-weight:600;color:var(--text2)}
/* ★v0.2.4: 見出しを上に積まず横に並べる(1つあたり 17px 節約できる) */
.mm-fl-in{flex-direction:row;align-items:center;gap:5px}
.mm-fl select,.mm-fl input[type=search],.mm-fl input[type=date]{padding:4px 8px;border:1px solid var(--border);border-radius:8px;
  font-size:13px;font-family:inherit;outline:none;background:#fff;color:var(--text)}
.mm-fl select:focus,.mm-fl input:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-bg)}
.mm-fl-q{flex:1 1 220px;min-width:180px}
.mm-fl-q input{width:100%}
.mm-fl-chk{flex-direction:row;align-items:center;gap:6px;font-weight:500;cursor:pointer}
.mm-fl-chk input{width:auto}
.mm-updated{margin-left:auto;white-space:nowrap}
/* ★v0.2.4 『絞り込み』の折りたたみ。並び順・期間・消えたメールをこの中へ入れた。
     一覧の上に居座らせないよう、開いたときは浮かせる(下の行を押し下げない)。 */
.mm-more{position:relative}
.mm-more>summary{list-style:none;cursor:pointer;user-select:none;
  display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border:1px solid var(--border);
  border-radius:8px;background:#fff;font-size:12px;font-weight:700;color:var(--text2);white-space:nowrap}
.mm-more>summary::-webkit-details-marker{display:none}
.mm-more>summary::after{content:'▾';font-size:10px}
.mm-more[open]>summary{background:var(--blue-bg);color:var(--blue-d);border-color:#bcd6f1}
/* 既定と違う条件が入っているときは色を変えて数を出す(閉じていても分かるように) */
.mm-more[data-on]:not([data-on=""])>summary{background:var(--amber-bg);color:var(--amber);border-color:#f0d9a8}
.mm-more[open]>summary::after{content:'▴'}
.mm-more-body{position:absolute;z-index:20;top:calc(100% + 6px);left:0;
  display:flex;flex-direction:column;gap:8px;padding:10px 12px;
  background:var(--card);border:1px solid var(--border);border-radius:10px;
  box-shadow:0 10px 28px rgba(0,0,0,.12);white-space:nowrap}
/* 既読の告知帯を閉じるボタン(v0.2.4) */
.mm-note{position:relative;padding-right:30px}
.mm-note-x{position:absolute;top:4px;right:6px;border:none;background:none;cursor:pointer;
  font-size:15px;line-height:1;color:var(--text3);padding:4px}
.mm-note-x:hover{color:var(--text)}
/* 閉じたあとに残す読み返しの導線(帯ではなく1行のリンク) */
/* 同じ件のもう1通(横浜市の「本文」と「パスワード」の相方) */
.mm-sibs{padding:10px 12px}
.mm-sib{display:flex;align-items:baseline;gap:8px;width:100%;text-align:left;
  border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer;
  padding:8px 10px;margin-top:6px;font-family:inherit;font-size:13px;color:var(--text)}
.mm-sib:hover{background:var(--blue-bg);border-color:#bcd6f1}
.mm-sib-dot{color:var(--red);font-size:10px;flex:0 0 auto}
.mm-sib-sub{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.mm-sib-meta{margin-left:auto;flex:0 0 auto;font-size:11.5px;color:var(--text3);white-space:nowrap}
@media(max-width:900px){ .mm-sib{min-height:44px} .mm-sib-meta{display:none} }

.mm-empty-note{margin-top:10px;font-size:12px;color:var(--text2);line-height:1.7;
  max-width:520px;margin-left:auto;margin-right:auto}
.mm-note-link{border:none;background:none;cursor:pointer;padding:2px 0;margin-top:2px;
  font-size:11.5px;font-family:inherit;color:var(--text3);text-decoration:underline}
.mm-note-link:hover{color:var(--blue-d)}

/* ── 2ペイン ──
   ★.page 自体を display:grid にしてはいけない(直下の子が全部格子に流し込まれる)。
     必ず内側にこの .mm-split を1枚挟む。
   ★スクロール容器は .mm-list / .mm-detail 自身。祖先(.main / .page)を容器にしない。 */
/* ★メールを選んでいないときは一覧を全幅に使う(右の 700px が空のまま
     一覧が 380px に押し込められていた)。選んだ瞬間だけ 2 ペインにする。
     切り替えは body.mm-has-sel(inbox.js / mymail.js が付け外しする)。 */
.mm-split{display:grid;grid-template-columns:1fr;gap:10px;align-items:stretch;
  flex:1 1 auto;min-height:0}
body.mm-has-sel .mm-split{grid-template-columns:minmax(420px,44%) 1fr}
.mm-list{overflow-y:auto;min-height:0;padding-right:2px}
.mm-detail{overflow-y:auto;min-height:0;display:none}
body.mm-has-sel .mm-detail{display:block}
.mm-item{border:1px solid var(--border);border-left:3px solid transparent;border-radius:10px;
  background:var(--card);padding:9px 11px;margin-bottom:7px;cursor:pointer}
.mm-item:hover{border-color:#bcd6f1}
.mm-item:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.mm-item.st-open{border-left-color:var(--red)}
.mm-item.active{border-left-color:var(--blue);background:var(--blue-bg)}
.mm-item .mm-sub{font-weight:700;font-size:13.5px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mm-item .mm-from,.mm-item .mm-prev,.mm-item .mm-asg{font-size:12px;color:var(--text2);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mm-item .mm-prev{color:var(--text3)}
.mm-item .mm-asg-none{color:var(--text3)}
.mm-item.removed .mm-sub,.mm-item.removed .mm-from{color:var(--text3)}
.mm-item .mm-top{display:flex;align-items:center;gap:6px;margin-bottom:2px}
.mm-item .mm-date{font-size:11.5px;color:var(--text3);font-variant-numeric:tabular-nums}
.mm-item .mm-clip{margin-left:auto;font-size:12px}

/* ══════════════════════════════════════════════════════════════
   v0.2.4 一覧の1行(共有箱・個人箱の共通)。1行 32px。
   組み立ては js/maillist.js の mlRowHtml。
   ══════════════════════════════════════════════════════════════ */
.ml-daysep{position:sticky;top:0;z-index:1;background:var(--bg);
  font-size:11px;font-weight:800;color:var(--text3);letter-spacing:.03em;
  padding:5px 6px 3px}
.ml-row{display:grid;grid-template-columns:3px 118px minmax(0,1fr) auto 72px;
  align-items:center;gap:8px;height:32px;padding:0 8px 0 0;
  border-bottom:1px solid var(--border);cursor:pointer;background:var(--card)}
.ml-row.has-prev{height:auto;min-height:32px;padding-top:4px;padding-bottom:4px;align-items:start}
.ml-row:hover{background:var(--bg)}
.ml-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.ml-row.active{background:var(--blue-bg)}
.ml-bar{align-self:stretch;background:transparent}
.ml-row.st-open  .ml-bar{background:var(--red)}
.ml-row.st-doing .ml-bar{background:var(--amber)}
.ml-row.st-done  .ml-bar{background:var(--green)}
.ml-row.st-na    .ml-bar{background:var(--text3)}
.ml-from{font-size:12px;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ml-row.unread .ml-from{font-weight:800;color:var(--text)}
/* ★件名は「頭」と「末尾」に分けて出す。縮むのは頭だけで、末尾は必ず残る。
     川崎市からの 2769 通は先頭 38 字が全部同じで、違いが末尾にしか無いため。 */
/* ★gap を 0 にすること。頭と末尾は元は1つの文なので、すき間が空くと
     「…工事の施 行承認申込み…」のように単語の途中が割れて見える。
     すき間が要るのはバッジと抜粋の側だけ。 */
.ml-sub{display:flex;align-items:baseline;gap:0;min-width:0;font-size:13px}
.ml-sub-h{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ml-sub-t{flex:0 0 auto;white-space:nowrap}
.ml-row.unread .ml-sub-h,.ml-row.unread .ml-sub-t{font-weight:700}
.ml-row.removed .ml-sub-h,.ml-row.removed .ml-sub-t,.ml-row.removed .ml-from{color:var(--text3)}
.ml-prev{flex:1 1 auto;min-width:0;color:var(--text3);font-size:12px;font-weight:400;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:10px}
.ml-tag{flex:0 0 auto;font-size:10.5px;font-weight:800;line-height:1.7;padding:0 5px;border-radius:4px;
  background:#eef0f3;color:var(--text2);white-space:nowrap;margin-right:6px}
.ml-tag.rm{background:var(--red-bg);color:var(--red)}
.ml-badges{display:flex;align-items:center;gap:4px;white-space:nowrap}
.ml-b{font-size:11px;color:var(--text3)}
.ml-b.hi{color:var(--red);font-weight:900}
.ml-asg{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;
  border-radius:999px;background:var(--blue-bg);color:var(--blue-d);font-size:11px;font-weight:800}
.ml-date{font-size:11.5px;color:var(--text3);text-align:right;white-space:nowrap;
  font-variant-numeric:tabular-nums}
.mm-pager{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 0 4px;
  font-size:12px;color:var(--text2);font-variant-numeric:tabular-nums}

/* ── 詳細ペイン ── */
.mm-back{display:none;margin-bottom:10px}
.mm-h2{margin:0 0 8px;font-size:16.5px;font-weight:700;line-height:1.5;word-break:break-word}
.mm-kv{display:flex;gap:8px;font-size:12.5px;color:var(--text2);padding:1px 0;word-break:break-word}
.mm-kv b{flex:0 0 72px;color:var(--text3);font-weight:700;font-size:11.5px;padding-top:1px}
.mm-warn{background:var(--red-bg);color:var(--red);border-radius:8px;padding:8px 10px;font-size:12.5px;
  font-weight:600;margin:8px 0 0}
.mm-note{background:var(--amber-bg);color:var(--amber);border-radius:8px;padding:8px 10px;font-size:12.5px;
  font-weight:600;margin:8px 0 0}
.mm-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.mm-actions .btn[aria-pressed="true"]{background:var(--blue);color:#fff;border-color:var(--blue);opacity:1}
.mm-asg-wrap{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.mm-asg-wrap select{padding:7px 9px;border:1px solid var(--border);border-radius:8px;font-size:13px;
  font-family:inherit;background:#fff;color:var(--text);min-width:180px}
.mm-att{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);font-size:13px}
.mm-att:last-child{border-bottom:none}
.mm-att .mm-att-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mm-att .mm-att-size{color:var(--text3);font-size:11.5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.mm-att a.btn{text-decoration:none}
.mm-ev{display:flex;gap:10px;font-size:12.5px;padding:6px 0;border-bottom:1px solid var(--border)}
.mm-ev:last-child{border-bottom:none}
.mm-ev .mm-ev-t{flex:0 0 132px;color:var(--text3);font-size:11.5px;font-variant-numeric:tabular-nums}
.mm-ev .mm-ev-b{flex:1;min-width:0}
.mm-ev .mm-ev-who{font-weight:700}
.mm-ev .mm-ev-note{white-space:pre-wrap;color:var(--text2);margin-top:2px;padding-left:10px;
  border-left:2px solid var(--border)}

/* ── 本文 ── */
.mm-body-frame{width:100%;height:420px;border:1px solid var(--border);border-radius:10px;background:#fff;display:block}
.mm-body-frame.expanded{height:75vh}
.mm-body-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:12px;color:var(--text2)}
.mm-body-bar .mm-spacer{margin-left:auto}
.mm-body-text{width:100%;max-height:420px;overflow:auto;margin:0;padding:12px;border:1px solid var(--border);
  border-radius:10px;background:#fff;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;
  font-family:inherit;font-size:13.5px;line-height:1.7}
.mm-body-text.expanded{max-height:75vh}
.mm-links{margin-top:10px;font-size:12.5px}
.mm-links summary{cursor:pointer;font-weight:700;color:var(--text2)}
.mm-links ul{margin:8px 0 0;padding-left:18px}
.mm-links li{margin-bottom:5px;word-break:break-all}
.mm-links .mm-link-label{color:var(--text2)}
.mm-links a{color:var(--blue)}
/* 表示されている文字と実際の行き先が食い違うリンク(フィッシングの典型) */
.mm-links.has-warn summary{color:#b4341f}
.mm-links .mm-link-warn{color:#b4341f;font-weight:700}

/* ── 設定画面 ── */
.mm-kvtable{width:100%;border-collapse:collapse;font-size:13px}
.mm-kvtable th{text-align:left;padding:5px 10px 5px 0;color:var(--text2);font-weight:600;font-size:12px;
  white-space:nowrap;vertical-align:top;width:1%}
.mm-kvtable td{padding:5px 0;word-break:break-word}
.mm-pre{background:#f7f9fb;border:1px solid var(--border);border-radius:8px;padding:10px;font-size:11.5px;
  white-space:pre-wrap;word-break:break-all;margin:0 0 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.mm-ok{color:var(--green);font-weight:700}
.mm-ng{color:var(--red);font-weight:700}

/* ── スマホ: 1ペイン切替(≤900px)── */
@media(max-width:900px){
  /* ══════════════════════════════════════════════════════════════
     v0.2.4 一覧の1行をスマホ用に2段へ置き直す。
       1段目: 差出人 …… 添付など …… 日付
       2段目: バッジ + 件名(頭は縮み、末尾は必ず残る)
     ★横に並びきらないと件名の末尾が日付欄を押し出して**日付が消える**。
       PC と同じ1行のままにしないこと。
     ★高さ 52px = タップ領域 44px 以上。
     ══════════════════════════════════════════════════════════════ */
  .ml-row{grid-template-columns:3px minmax(0,1fr) auto;grid-template-rows:auto auto;
    height:auto;min-height:52px;padding:5px 8px 5px 0;gap:2px 8px;align-items:center}
  .ml-bar{grid-row:1 / 3}
  .ml-from{grid-column:2;grid-row:1;font-size:11.5px}
  .ml-badges{grid-column:3;grid-row:1}
  .ml-date{grid-column:3;grid-row:1;font-size:11px}
  .ml-sub{grid-column:2 / 4;grid-row:2;overflow:hidden}
  .ml-row.has-prev .ml-prev{display:none}   /* 個人箱の抜粋はスマホでは畳む */
  .ml-daysep{padding:6px 8px 4px}
  /* ★差出人が空(直前の行と同じ)のときは1段目を潰して、行を低く保つ */
  .ml-from:empty{display:none}

  /* ★display:block にしないこと。block にすると一覧に高さの制限が無くなり、
       中身の分だけ縦に伸びて**ページ全体が動く**(実測で 3915px はみ出した)。
       1ペインでも「残りの高さを一覧に渡す」縦フレックスにする。 */
  .mm-split{display:flex;flex-direction:column;gap:0}
  /* ★min-height を必ず入れること。0 のままだと、上の帯が伸びた分だけ
       一覧が削られ、スマホ横向き(844×390)で告知帯と警告帯が同時に出ると
       一覧が 23px になり**スクロールしても1通も出てこない**。
       最低3行ぶんを確保し、あふれる分はページ側(.page.active の overflow)で送る。 */
  .mm-list{flex:1 1 auto;min-height:156px;overflow-y:auto}
  .mm-detail{display:none;flex:1 1 auto;min-height:0;overflow-y:auto}
  /* ★1ペインでは「選んでいる」だけでは詳細を出さない。出す合図は mm-detail-open だけ。
       両方が同時に出ると画面が上下に割れる。 */
  body.mm-has-sel .mm-detail{display:none}
  body.mm-has-sel .mm-list{flex:1 1 auto}
  /* ── 状態タブ6個を横に流せる1行にする(2段に折り返すと 35px 損する) ── */
  .mm-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .mm-tabs::-webkit-scrollbar{display:none}
  .mm-tab{flex:0 0 auto}
  .mm-frow{flex:1 1 100%}
  body.mm-detail-open .mm-list{display:none}
  body.mm-detail-open .mm-filters{display:none}
  body.mm-detail-open .mm-detail{display:block}
  .mm-back{display:inline-flex}
  .mm-body-frame{height:320px}
  .mm-body-text{max-height:320px}

  /* ── 押しやすさ(タップ領域 44px)──
     ★1ペイン化と同じ 900px から効かせる。640px からにすると、
       スマホ横向き(844px)や iPad 縦(768px)で全ボタンが 27〜35px のままになり、
       1ペイン時に一覧へ戻る唯一の導線「← 一覧へ戻る」まで 27px になる。
     ★16px フォント強制(iOS のズーム対策)だけは 640px のままでよい。 */
  .btn{min-height:44px}
  .btn.sm{min-height:44px}
  .mm-tab{min-height:44px}
  .mm-more>summary{min-height:44px}   /* ★『絞り込み』も指で押す(v0.2.4 で足した) */
  /* ★告知帯を消せる唯一の導線。23px のままだと押し損ねてメールを開いてしまい、
       共有箱では開いた瞬間に6人全員にとって既読になる。 */
  .mm-note-x{min-width:44px;min-height:44px}
  .mm-note{padding-right:48px}
  /* ★『絞り込み』の中身が画面幅からはみ出さないようにする(横スクロールが出る) */
  .mm-filters{position:relative}
  .mm-more{position:static}
  .mm-more-body{left:8px;right:8px;width:auto;white-space:normal;max-height:60vh;overflow-y:auto}
  /* ★v0.2.11: 受信箱の「🔄 同期」(管理者だけ)が1行を丸ごと使い、一覧が 331px しか残らなかった。
       担当の選択の横に並べ、検索と『絞り込み』は次の行へ(390px で一覧 331→383px)。
       担当の選択が無いページ(自分の担当)は、もともと 検索+絞り込み が1行なので触らない。 */
  .mm-frow:has(> .mm-fl-in) > .mm-fl-q, .mm-frow:has(> .mm-fl-in) > .mm-more{order:2}
  .mm-frow:has(> .mm-fl-in) > [id^="mmf-sync-"]{order:1;flex:1 1 90px}
  .btn-ghost{min-height:44px}
  .app-link{min-height:44px}
  .field input, .field select, .field textarea{min-height:46px}
  .field textarea{min-height:88px}
  .mm-fl select, .mm-fl input[type=search], .mm-fl input[type=date], .mm-asg-wrap select{min-height:46px}
  /* チェックボックス本体(13px)を狙わせない。ラベル全体を的にする(label で包んである) */
  .mm-fl-chk{min-height:44px; display:inline-flex; align-items:center}
  .modal-head .x{min-width:44px; min-height:44px}
}

/* ★画面の高さが極端に狭いとき(スマホ横向き)は、常設の帯を畳んで一覧に高さを渡す。
     消しているのは案内文だけで、警告(取り込みが止まっている)は残す。 */
@media(max-height:520px){
  .mm-filters>[id^="mmf-markread-"]{display:none}
  .mm-note{display:none}
}

@media(max-width:640px){
  .topbar{padding:6px 10px;height:auto;flex-wrap:wrap;gap:6px 8px}
  /* ★flex-basis は 0 にすること。auto のままだと、折り返しの判定は
       「縮める前の幅(7リンクぶん≒500px)」で行われるため、右側の名前と
       ログアウトが必ず次の段に落ちて 45px 損する。 */
  .topbar-left{flex-wrap:nowrap;gap:6px 8px;min-width:0;flex:1 1 0}
  /* ★v0.2.4: 折り返して3段(156px)になっていたのを、横に流せる1段にする。
       畳んでいるのは見た目だけで、7つのリンクはすべて残っている。 */
  .app-switch{flex-wrap:nowrap;gap:5px;overflow-x:auto;min-width:0;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .app-switch::-webkit-scrollbar{display:none}
  .app-link{flex:0 0 auto}
  .brand{display:none}
  /* ★v0.2.4: width:100% をやめる。ここだけで 45px(ほぼ1件分)使っていた。
       アプリ切替は横に流せるので、狭くなっても全部たどれる。 */
  .topbar-right{width:auto;justify-content:flex-end;gap:8px;flex:0 0 auto}
  .mm-updated{display:none}          /* 「表示更新 HH:MM」は狭い画面では畳む */
  .auth-name{max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .main{padding:6px 8px 0}
  .tabbar{top:auto}

  /* ── タブ帯: 折り返して縦に伸びるのを、横に流せる1行にする ── */
  .tabbar{flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
          scrollbar-width:none; padding-bottom:2px}
  .tabbar::-webkit-scrollbar{display:none}
  .tabbar .tab{flex:0 0 auto; min-height:44px; font-size:13.5px; white-space:nowrap}

  /* ── 表をカードにする ──
     見出しは隠し、各セルの前に「項目名: 」を出す。
     項目名は JS が data-label で入れる(mailCardTables)。 */
  .tbl thead{display:none}
  .tbl, .tbl tbody{display:block; width:100%}
  .tbl tr{display:block; border:1px solid var(--border); border-radius:10px;
          padding:10px 12px; margin-bottom:8px; background:var(--card,#fff)}
  .tbl tr:hover td{background:transparent}
  .tbl td{display:flex; gap:10px; align-items:flex-start; justify-content:space-between;
          border:none; padding:4px 0; font-size:14px}
  .tbl td::before{content:attr(data-label); color:var(--text2); font-size:12px;
                  font-weight:700; flex:0 0 34%; min-width:0}
  .tbl td:empty{display:none}
  /* 見出しが空の列(操作ボタンなど)は、ラベルを出さず全幅で */
  .tbl td[data-label=""]{display:block; padding-top:8px}
  .tbl td[data-label=""]::before{display:none}
  /* 「該当なし」のような1行だけの案内。カードの枠を付けず、中央に置く */
  .tbl tr[data-plain]{border:none; background:transparent; padding:10px 0;
                      text-align:center; color:var(--text2)}
  .tbl tr[data-plain] td{display:block; padding:0}
  .tbl tr[data-plain] td::before{display:none}
  .tbl td > *{min-width:0}

  /* ── 入力しやすさ ──
     ★タップ領域 44px の指定は @media(max-width:900px) 側にまとめてある(1ペイン化と同じ境界)。
       ここは 640px 以下だけで必要な「文字サイズ」を扱う。
     ★16px 未満は iOS Safari が勝手にズームする */
  .btn{font-size:14px}
  .field input, .field select, .field textarea{font-size:16px}
  /* ★上の1行だけでは効かない。ベース側が `.field input[type=text]{font-size:13px}` と
     属性セレクタで書いてあり、そちらの方が詳細度が高いため 13px のまま残る
     (= iOS Safari がフォーカスのたびに勝手にズームする)。同じ形で指定し直す。
     段2 の作成モーダル(宛先・件名)と設定画面のテキスト欄が対象。 */
  .field input[type=text], .field input[type=email], .field input[type=password],
  .field input[type=date], .field input[type=number], .field input[type=search],
  .field input[type=datetime-local]{font-size:16px}
  .mm-fl select, .mm-fl input[type=search], .mm-fl input[type=date], .mm-asg-wrap select{font-size:16px}
  .card .btn{flex:1 1 auto}
  .mm-kv b{flex-basis:64px}
  .mm-ev{display:block}
  .mm-ev .mm-ev-t{flex:none}
  /* 設定画面のキー/値表は縦積みにする(値が長いと横並びでは潰れるため) */
  .mm-kvtable,.mm-kvtable tbody,.mm-kvtable tr{display:block;width:100%}
  .mm-kvtable th,.mm-kvtable td{display:block;width:auto;padding:1px 0}
  .mm-kvtable tr{padding:6px 0;border-bottom:1px solid var(--border)}
}

/* ═══════════════════════════════════════════════════════════════
   段2: 個人メール(📬 自分のメール)
   ★新しい @media を書かない。レイアウトは .mm-split / .mm-list / .mm-detail /
     .card / .field / .row / .mm-tabs / .mm-frow / .mm-item を使うので、
     上の @media(max-width:900px)(1ペイン化・タップ領域 44px)と
     @media(max-width:640px)(16px フォント)がそのまま効く。
     独自クラスで組み直すと 44px の指定から漏れる。
   ═══════════════════════════════════════════════════════════════ */
.mp-conn{max-width:560px;margin:0 auto;text-align:center}
.mp-conn ul{text-align:left;display:inline-block;margin:12px 0;color:var(--text2);font-size:13px;line-height:1.9}
.mp-head{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;font-size:13px}
.mp-upn{font-weight:700}
.mp-note{color:var(--text2);font-size:12px}
.mp-to{background:var(--bg,#f4f6f9);border:1px solid var(--border);border-radius:8px;
       padding:8px 10px;font-size:13px;line-height:1.8;word-break:break-all}
.mp-err{background:var(--red-bg,#fdecea);color:var(--red);border-radius:8px;padding:8px 10px;
        font-size:13px;margin-bottom:10px}
/* 設定(署名・通知・解除)の折りたたみ。summary は .btn ではないので 44px を自前で確保する */
.mp-settings{margin-top:10px;border-top:1px solid var(--border);padding-top:4px}
.mp-settings>summary{display:flex;align-items:center;min-height:44px;cursor:pointer;
       font-size:12.5px;font-weight:700;color:var(--text2)}
/* 署名のプレビュー(textContent で入れる) */
.mp-sig-prev{margin:4px 0 0;padding:8px 10px;background:#f7f9fb;border:1px solid var(--border);
       border-radius:8px;font-family:inherit;font-size:12.5px;line-height:1.7;color:var(--text2);
       white-space:pre-wrap;word-break:break-word;max-height:150px;overflow:auto}
.mp-sig-prev:empty{display:none}


/* ══════════════════════════════════════════════════════════════
   ★★2026-08-30(Ⅳ㉔) 印刷。ここには印刷用の指定が1つも無かった。

   この画面は #app{height:100dvh} の器に固定され、スクロールは
   .mm-list / .mm-detail の **中だけ** で起きる。
   印刷は「画面に見えている高さ」で切るので、**紙になるのは最初の1ページぶんだけ**。
   実測(2026-08-30): 一覧200行のうち **24行しか出ず**、残りは警告も出ずに消えていた。

   直し方の考え方:
     ・高さの固定と overflow を全部外し、中身を紙の上に流す。
     ・画面のための飾り(上の帯・タブ・ボタン・チェック欄)は紙に出さない。
     ・行が紙の切れ目で分断されないようにする。
   ★画面側の指定には一切触っていない(印刷のときだけ効く)。
   ══════════════════════════════════════════════════════════════ */
@media print {
  /* 高さの固定とスクロールを全部外す ── これをしないと1ページで切れる */
  html, body, #app, .main, .page, .page.active,
  .mm-split, .mm-list, .mm-detail {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: block !important;
    flex: none !important;
  }
  #app { background: #fff !important; }
  .main { padding: 0 !important; margin: 0 !important; max-width: none !important; }

  /* 画面のための飾りは紙に出さない */
  #auth-bar, .topbar, .tabbar, .footer, #z-bottom-nav,
  .btn, button, .mm-toolbar, .mm-search, input[type=checkbox],
  .mm-actions, .page:not(.active) {
    display: none !important;
  }

  /* 一覧は表として全部出す。行が紙の切れ目で割れないようにする */
  .mm-list, .mm-detail { width: 100% !important; }
  .mm-row, tr, li { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }   /* 2ページ目以降にも見出しを出す */

  /* 紙は白地・黒字で。画面の淡い色は印刷すると読めない */
  * { color: #000 !important; background: transparent !important;
      box-shadow: none !important; }
  a { text-decoration: none !important; }
  body { font-size: 10.5pt; line-height: 1.5; }

  @page { margin: 12mm 10mm; }
}

/* ★v0.2.15(2026-10-06): PC の画面では上部のアプリ切替(EDI/在庫/ポータル/地図/…/⬇PCアプリ)を出さない。
   施主「PCアプリの使用を推奨しているので、このボタンは不要」。アプリの切り替えは PC アプリの左のサイドバーで行う。
   スマホ(640px 以下)では今までどおり出す(施主「スマホでは残す」)。 */
@media(min-width:641px){ .app-switch{display:none !important} }

/* ══════════════════════════════════════════════════════════════
   ★v0.2.22 Gmail 風 / Outlook 風(施主 2026-10-18「両方進めてほしい」)
   ここから下は「枠と見た目」だけ。配線(id・onclick)は上の部品のまま。
   ・形は body のクラス: lay-gmail / lay-outlook(js/shell.js が付ける。既定は PC アプリなら Outlook 風)
   ・本文の出し方: pane-full(本文を全面)/ 付いていなければ一覧の右
   ・EDI の中に埋め込んだとき: gm-embed
   ・左のメニュー: スマホは引き出し(gm-rail-open)・PC は細くできる(gm-rail-mini)
   ★901px 以上の並べ方は @media(min-width:901px) の中だけに書く。900px 以下は上の
     「スマホ: 1ペイン切替」(mm-detail-open で一覧と本文を切り替える)がそのまま効く。
   ★一覧と本文の並べ方は .page を格子にして、.mm-split を display:contents で抜く。
     .mm-split の中の .mm-list / .mm-detail がそのまま格子の升に入る(スクロールの器は今までどおり各自)。
     格子にするのは .mm-split を持つページだけ(:has)。接続前の自分のメールなど、カード 1 枚のページは触らない。
   ══════════════════════════════════════════════════════════════ */
:root{--gm-bg:#f3f6fa;--gm-line:#e9edf2;--gm-sel:#d3e3f6;--gm-sel-t:#0c447c;--gm-text2:#545961;
  --gm-read:#f6f8fb;--gm-row-sel:#e3edf8;--gm-search:#e3eaf3;--ol-band:#0c447c;--ol-pane:#f6f8fa}
body{background:var(--gm-bg)}
#app{background:var(--gm-bg)}
.gm-i{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0;font-style:normal}
.gm-svg{display:block}

/* ── 上の帯 ── */
.topbar{position:relative;top:auto;height:64px;background:transparent;border-bottom:none;padding:0 12px 0 8px;gap:12px;
  justify-content:flex-start}
.topbar-left{flex:0 0 244px;gap:6px;min-width:0}
.gm-ibtn{width:44px;height:44px;border:none;border-radius:22px;background:transparent;color:#444950;display:inline-flex;
  align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto;list-style:none;padding:0}
.gm-ibtn:hover{background:rgba(60,64,67,.08)}
.gm-ibtn::-webkit-details-marker{display:none}
.gm-ibtn:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.brand{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:500;color:#2c3036}
.gm-logo{width:30px;height:30px;border-radius:8px;background:var(--blue);color:#fff;font-weight:700;font-size:15px;
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.gm-search{flex:1 1 360px;max-width:720px;height:48px;border-radius:24px;background:var(--gm-search);display:flex;
  align-items:center;gap:10px;padding:0 16px;color:#444950;min-width:0;cursor:text}
.gm-search:focus-within{background:#fff;box-shadow:0 1px 3px rgba(60,64,67,.3),0 4px 8px 3px rgba(60,64,67,.15)}
.gm-search input{flex:1;min-width:0;border:none;outline:none;background:transparent;font-size:15px;font-family:inherit;color:var(--text)}
.gm-search input::-webkit-search-cancel-button{cursor:pointer}
.gm-search.off{opacity:.55;cursor:default}
.topbar-right{margin-left:auto;gap:6px}

/* 表示の設定(details) */
.gm-set{position:relative}
.gm-set>summary{list-style:none}
.gm-set[open]>summary{background:var(--gm-sel);color:var(--gm-sel-t)}
.gm-set-body{position:absolute;right:0;top:calc(100% + 6px);z-index:70;width:310px;background:#fff;color:var(--text);
  border:1px solid var(--border);border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.16);padding:10px 14px 12px;
  display:flex;flex-direction:column;gap:2px}
.gm-set-h{font-size:12px;font-weight:700;color:var(--gm-text2);margin-top:8px}
.gm-set-o{display:flex;align-items:center;gap:8px;font-size:13px;min-height:36px;cursor:pointer}
.gm-set-o:has(input:disabled){opacity:.5;cursor:default}   /* ★v0.2.23 input:disabled+* は文字に当たらず効いていなかった */
.gm-set-note{font-size:11.5px;color:var(--gm-text2);margin-top:6px;line-height:1.6}

/* ── 左のメニュー ── */
.gm-body{flex:1 1 auto;min-height:0;display:flex;position:relative}
.tabbar.gm-rail{position:static;top:auto;z-index:auto;flex:0 0 256px;display:flex;flex-direction:column;align-items:stretch;
  gap:2px;background:transparent;border-bottom:none;padding:4px 12px 12px 8px;overflow-x:hidden;overflow-y:auto;min-height:0}
.gm-compose{align-self:flex-start;display:inline-flex;align-items:center;gap:12px;height:56px;padding:0 24px 0 18px;
  margin:4px 0 12px 4px;border:none;border-radius:16px;background:#cfe2f7;color:#0c447c;font-size:15px;font-weight:600;
  font-family:inherit;cursor:pointer;box-shadow:0 1px 2px rgba(20,40,70,.12);flex:0 0 auto}
.gm-compose:hover{box-shadow:0 1px 3px rgba(20,40,70,.3),0 4px 8px 3px rgba(20,40,70,.12)}
.gm-compose:disabled,.gm-fab:disabled{opacity:.55;cursor:default;box-shadow:none}
.gm-sec{font-size:12px;font-weight:700;color:var(--gm-text2);padding:12px 16px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gm-rail .tab,.gm-nav{display:flex;align-items:center;gap:14px;height:34px;padding:0 12px 0 16px;border:none;border-radius:17px;
  background:transparent;color:#2c3036;font-size:14px;font-weight:500;font-family:inherit;text-align:left;cursor:pointer;
  white-space:nowrap;border-bottom:none;flex:0 0 auto;position:relative}
.gm-rail .tab:hover,.gm-nav:hover{background:rgba(60,64,67,.08);color:#2c3036}
.gm-rail .tab.active{background:var(--gm-sel);color:var(--gm-sel-t);font-weight:700;border-bottom-color:transparent}
.gm-rail .tab:focus-visible,.gm-nav:focus-visible,.gm-compose:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.gm-lbl{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.gm-cnt{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.gm-cnt:empty{display:none}
.gm-rail-foot{margin-top:auto;padding-top:12px}
.gm-rail-foot .app-switch{flex-wrap:wrap;gap:6px;padding:4px 12px}
@media(min-width:641px){ .gm-rail-foot{display:none} }

/* ── 白い板(一覧と本文)── */
.main{flex:1 1 auto;min-width:0;min-height:0;margin:0 16px 16px 0;padding:0;background:#fff;border-radius:16px;
  overflow:hidden;display:flex;flex-direction:column}
.footer{display:none}
.page>.card:not(.mm-filters){margin:16px}
#page-settings.active{padding:8px 16px 24px}
#page-settings.active>.card{margin:0 0 16px}

/* 一覧の上の帯(状態のタブ・担当・絞り込み) */
.page .mm-filters{border:none;border-bottom:1px solid var(--gm-line);border-radius:0;box-shadow:none;margin:0;
  padding:4px 12px 0;gap:4px 8px;background:#fff}
.mm-filters>.mm-frow{order:0;flex:1 1 100%;min-height:44px}
.mm-filters>.mm-tabs{order:1;flex:1 1 100%;gap:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.mm-filters>.mm-tabs::-webkit-scrollbar{display:none}
.mm-filters>[id^="mmf-health-"],.mm-filters>[id^="mmf-markread-"]{order:2}
.mm-filters>.mp-settings{order:3}
.mm-filters>#mp-head{order:-1;font-size:12px;color:var(--gm-text2);padding:6px 4px 0}
.mm-filters .mm-tab{border:none;border-radius:0;background:transparent;min-height:44px;padding:0 16px;font-size:13.5px;
  font-weight:600;color:var(--gm-text2);box-shadow:inset 0 -3px 0 transparent;flex:0 0 auto}
.mm-filters .mm-tab:hover{background:rgba(60,64,67,.06)}
.mm-filters .mm-tab.active{background:transparent;color:var(--gm-sel-t);box-shadow:inset 0 -3px 0 var(--blue)}
/* ★検索は上の帯(#gm-q)に移した。ページの検索欄は配線のために残し、見せない(shell.js が文字を写す) */
.mm-filters .mm-fl-q{display:none}
/* ★「新規作成」は左のメニューの「作成」(スマホは右下)と同じ。二つ並べない */
#mp-new{display:none !important}
.es-note{font-size:12px;color:var(--gm-text2);flex:1 1 300px;min-width:0}

/* ── 一覧の行(Gmail 風: 全幅のときは 1 行)── */
.ml-row{height:40px;grid-template-columns:4px 200px minmax(0,1fr) auto 76px;gap:0 12px;padding:0 16px 0 0;
  background:var(--gm-read);border-bottom:1px solid var(--gm-line);position:relative}
.ml-row.unread{background:#fff}
.ml-row:hover{background:var(--gm-read);box-shadow:inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0,0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15);z-index:2}
.ml-row.unread:hover{background:#fff}
.ml-row.active,.ml-row.active:hover{background:var(--gm-row-sel)}
.ml-bar{width:4px}
.ml-av{display:none}
.ml-from{font-size:14px;color:#2c3036}
.ml-row.unread .ml-from{font-weight:700;color:#1b1d21}
.ml-sub{font-size:14px}
.ml-row.unread .ml-sub-h,.ml-row.unread .ml-sub-t{font-weight:700;color:#1b1d21}
.ml-prev{color:var(--gm-text2);font-size:13px}
.ml-prev:not(:empty)::before{content:'— '}
.ml-date{font-size:12px;color:var(--gm-text2)}
.ml-row.unread .ml-date{font-weight:700;color:#1b1d21}
.ml-daysep{background:#fff;font-size:12px;font-weight:700;color:var(--gm-text2);padding:10px 16px 6px;border-bottom:1px solid var(--gm-line)}
.ml-asg{background:var(--blue);color:#fff}

/* 2 段の行(一覧の右に本文があるとき・Outlook 風・スマホ)。中身の部品は同じで並べ方だけ変える */
.ml-row.gm2,
body.mm-has-sel .ml-row,
body.lay-outlook .ml-row{grid-template-columns:4px 34px minmax(0,1fr) auto;grid-template-rows:auto auto;
  grid-template-areas:"bar av from date" "bar av sub badges";height:auto;min-height:58px;padding:8px 14px 8px 0;
  gap:2px 10px;align-items:center}
body.mm-has-sel .ml-row .ml-bar,body.lay-outlook .ml-row .ml-bar{grid-area:bar;align-self:stretch}
body.mm-has-sel .ml-row .ml-av,body.lay-outlook .ml-row .ml-av{grid-area:av;display:inline-flex;align-self:start;margin-top:2px}
body.mm-has-sel .ml-row .ml-from,body.lay-outlook .ml-row .ml-from{grid-area:from;font-size:13.5px}
body.mm-has-sel .ml-row .ml-date,body.lay-outlook .ml-row .ml-date{grid-area:date}
body.mm-has-sel .ml-row .ml-sub,body.lay-outlook .ml-row .ml-sub{grid-area:sub;font-size:13.5px}
body.mm-has-sel .ml-row .ml-badges,body.lay-outlook .ml-row .ml-badges{grid-area:badges}
body.mm-has-sel .ml-row.has-prev .ml-prev,body.lay-outlook .ml-row.has-prev .ml-prev{display:block;padding-left:0;font-size:12.5px}
body.mm-has-sel .ml-prev::before,body.lay-outlook .ml-prev::before{content:none}
body.mm-has-sel .ml-row.same .ml-av,body.lay-outlook .ml-row.same .ml-av{visibility:hidden}
.ml-av{width:32px;height:32px;border-radius:50%;color:#fff;font-size:13px;font-weight:600;align-items:center;justify-content:center}
/* ★2 段の行の件名: 格子にする(バッジ | 頭(縮む)| 末尾(必ず残す)/ 抜粋は次の行)。
     flex の折り返しにすると、頭と末尾が別の行に割れる(川崎市の件名は違いが末尾にしか無い)。 */
body.mm-has-sel .ml-row .ml-sub,body.lay-outlook .ml-row .ml-sub{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:baseline}
body.mm-has-sel .ml-sub>.ml-tag.rm,body.lay-outlook .ml-sub>.ml-tag.rm{grid-column:1}
body.mm-has-sel .ml-sub>.ml-tag:not(.rm),body.lay-outlook .ml-sub>.ml-tag:not(.rm){grid-column:2}
body.mm-has-sel .ml-sub>.ml-sub-h,body.lay-outlook .ml-sub>.ml-sub-h{grid-column:3}
body.mm-has-sel .ml-sub>.ml-sub-t,body.lay-outlook .ml-sub>.ml-sub-t{grid-column:4}
body.mm-has-sel .ml-sub>.ml-prev,body.lay-outlook .ml-sub>.ml-prev{grid-column:1 / -1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── 本文 ── */
.mm-detail{padding:0 28px 28px;background:#fff}
.mm-detail>.empty{padding-top:120px;color:var(--gm-text2)}
.mm-detail .card{border:none;border-bottom:1px solid var(--gm-line);border-radius:0;box-shadow:none;margin:0;padding:14px 0;background:transparent}
.mm-detail .card:last-child{border-bottom:none}
.mm-detail .card-title{font-size:12.5px;color:var(--gm-text2);margin-bottom:8px}
.mm-c-head .mm-h2{font-size:22px;font-weight:500;line-height:1.45;margin:6px 0 14px}
.gm-from{display:flex;gap:12px;align-items:flex-start}
.gm-av{width:40px;height:40px;flex:0 0 40px;border-radius:50%;color:#fff;font-size:16px;font-weight:600;display:inline-flex;align-items:center;justify-content:center}
.gm-from-t{flex:1;min-width:0}
.gm-from-l{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:14px}
.gm-addr{font-size:12px;color:var(--gm-text2);word-break:break-all}
.gm-when{margin-left:auto;font-size:12px;color:var(--gm-text2);white-space:nowrap;font-variant-numeric:tabular-nums}
.gm-to{font-size:12px;color:var(--gm-text2);word-break:break-word;margin-top:2px}
.gm-to b{font-weight:600;margin-right:4px;color:#3c4047}
.gm-head-links{margin-top:10px}
.mm-c-ops .mm-actions{display:inline-flex;gap:0;border:1px solid #c9ced5;border-radius:18px;overflow:hidden;flex-wrap:nowrap}
.mm-c-ops .mm-actions .btn{border:none;border-radius:0;border-right:1px solid #c9ced5;background:#fff;min-height:34px}
.mm-c-ops .mm-actions .btn:last-child{border-right:none}
.mm-c-ops .mm-actions .btn[aria-pressed="true"]{background:var(--blue);color:#fff;opacity:1}
.mm-c-att .mm-att{display:inline-flex;width:300px;max-width:100%;vertical-align:top;margin:0 8px 8px 0;border:1px solid var(--gm-line);
  border-radius:10px;padding:8px 10px;gap:8px}
.mm-c-att .mm-att:last-child{border-bottom:1px solid var(--gm-line)}
.mm-detail .mm-body-text{border:none;padding:4px 0;max-height:none;font-size:14px;line-height:1.85}
.mm-detail .mm-body-frame{border:1px solid var(--gm-line)}
.mm-c-send .card-title{display:none}
.mm-c-send .mm-actions .btn{min-height:40px;padding:0 18px;border:1px solid #8f959d;border-radius:20px;font-size:14px;font-weight:500}

/* ── 作成の窓(Gmail のように右下に出す。後ろの画面は見えたまま押せる)── */
.modal-bg.mm-dock{background:transparent;pointer-events:none;align-items:flex-end;justify-content:flex-end;padding:0 24px 0 0}
.modal-bg.mm-dock .modal{pointer-events:auto;max-width:600px;max-height:calc(100dvh - 72px);border-radius:12px 12px 0 0;
  box-shadow:0 8px 28px rgba(20,40,70,.32)}
.modal-bg.mm-dock .modal-head{background:#e8eef6;padding:10px 14px;border-radius:12px 12px 0 0}

/* ── Outlook 風の上の帯 ── */
.gm-ribbon{display:none;flex:0 0 auto;align-items:stretch;gap:2px;padding:6px 10px;background:#f4f6f9;border-bottom:1px solid #dde2e8;overflow-x:auto}
.gm-rb{min-width:64px;height:64px;padding:0 10px;border:none;border-radius:6px;background:transparent;color:#2c3036;font-size:12px;
  font-family:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.gm-rb:hover:not(:disabled){background:#e3e8ee}
.gm-rb:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.gm-rb:disabled{color:#9aa0a8;cursor:default}
.gm-rb .gm-rb-i{color:var(--blue)}
.gm-rb:disabled .gm-rb-i{color:#b4b9c0}
.gm-rb.primary{background:var(--blue);color:#fff;padding:0 16px}
.gm-rb.primary .gm-rb-i{color:#fff}
.gm-rb.primary:hover{background:var(--blue-d)}
.gm-rb-sep{width:1px;background:#dde2e8;margin:6px 4px;flex:0 0 1px}

.gm-fab{display:none}
.gm-scrim{display:none}

/* ═════ PC(901px 以上)の並べ方 ═════ */
@media(min-width:901px){
  /* ★v0.2.23 overflow はスクロールにする。hidden だと、帯が高くなったとき(自分のメールの「⚙ 設定」・案内と警告が同時)に
     下が切れて押せなかった。一覧の段は最低 180px 残し、それを超える分はページごと送る。 */
  .page.active:has(> .mm-split){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(180px,1fr);overflow-y:auto}
  /* ★v0.2.23 PC では状態のタブを折り返す(1 行の横スクロールは見えない所に「対象外」「すべて」が隠れていた。スマホは 1 行のまま) */
  .mm-filters>.mm-tabs{flex-wrap:wrap;overflow-x:visible}
  .page.active:has(> .mm-split)>.mm-filters{grid-column:1;grid-row:1}
  .page.active:has(> .mm-split)>.mm-split{display:contents}
  .page.active:has(> .mm-split) .mm-list{grid-column:1;grid-row:2;min-height:0;overflow-y:auto;padding-right:0}
  .page.active:has(> .mm-split) .mm-detail{grid-column:2;grid-row:1 / 3;min-height:0;overflow-y:auto;border-left:1px solid var(--gm-line)}
  /* 一覧の右に本文(Gmail 風でメールを選んだとき) */
  body.mm-has-sel .page.active:has(> .mm-split){grid-template-columns:minmax(360px,40%) minmax(0,1fr)}
  /* 本文を全面に(Gmail 風・pane-full) */
  body.lay-gmail.pane-full.mm-has-sel .page.active:has(> .mm-split){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  body.lay-gmail.pane-full.mm-has-sel .page.active>.mm-filters,
  body.lay-gmail.pane-full.mm-has-sel .page.active .mm-list{display:none}
  body.lay-gmail.pane-full.mm-has-sel .page.active .mm-detail{grid-column:1;grid-row:1;border-left:none}
  body.lay-gmail.pane-full .mm-back{display:inline-flex;margin-top:12px}
  /* 本文を全面に出すときは 1 行の一覧のまま(2 段にしない) */
  body.lay-gmail.pane-full.mm-has-sel .ml-row{grid-template-columns:4px 200px minmax(0,1fr) auto 76px;grid-template-rows:none;grid-template-areas:none}

  /* 左のメニューを細く(☰) */
  body.gm-rail-mini .gm-rail{flex-basis:76px;padding:4px 10px 12px}
  body.gm-rail-mini .gm-lbl,body.gm-rail-mini .gm-sec,body.gm-rail-mini .gm-cnt{display:none}
  body.gm-rail-mini .gm-compose{padding:0;width:56px;justify-content:center;margin-left:0}
  body.gm-rail-mini .gm-rail .tab,body.gm-rail-mini .gm-nav{justify-content:center;padding:0;width:56px;height:40px;border-radius:20px}
  body.gm-rail-mini .gm-rail .mm-badge{position:absolute;top:2px;right:2px;min-width:16px;font-size:9.5px}
  body.gm-rail-mini .topbar-left{flex-basis:auto}

  /* ── Outlook 風 ── */
  body.lay-outlook,body.lay-outlook #app{background:#fff}
  body.lay-outlook .topbar{height:48px;background:var(--ol-band);color:#fff}
  body.lay-outlook .topbar .gm-ibtn{color:#fff}
  body.lay-outlook .topbar .gm-ibtn:hover,body.lay-outlook .gm-set[open]>summary{background:rgba(255,255,255,.16);color:#fff}
  body.lay-outlook .brand{color:#fff;font-size:15px}
  body.lay-outlook .gm-logo{background:#fff;color:var(--ol-band);width:26px;height:26px;font-size:13px}
  body.lay-outlook .gm-search{height:34px;border-radius:6px;background:#fff;max-width:560px;margin:0 auto}
  body.lay-outlook .gm-search:focus-within{box-shadow:0 0 0 2px #9cc3ec}
  body.lay-outlook .build-badge{color:#e3ecf7;border-color:rgba(255,255,255,.45)}
  body.lay-outlook .auth-name{color:#fff}
  body.lay-outlook .btn-ghost{color:#fff;border-color:rgba(255,255,255,.45)}
  body.lay-outlook .btn-ghost:hover{background:rgba(255,255,255,.12)}
  body.lay-outlook .gm-ribbon{display:flex}
  body.lay-outlook .gm-rail{flex-basis:232px;background:var(--ol-pane);border-right:1px solid #e2e6eb;padding:8px 6px}
  body.lay-outlook.gm-rail-mini .gm-rail{flex-basis:68px}
  body.lay-outlook .gm-compose{display:none}
  body.lay-outlook .gm-rail .tab,body.lay-outlook .gm-nav{border-radius:4px;height:32px;padding:0 10px 0 12px;font-size:13.5px}
  body.lay-outlook .gm-rail .tab.active{background:#d6e6f7;box-shadow:inset 3px 0 0 var(--blue)}
  body.lay-outlook .gm-sec{padding:12px 12px 4px;color:#2c3036}
  body.lay-outlook .main{margin:0;border-radius:0}
  body.lay-outlook .page.active:has(> .mm-split){grid-template-columns:minmax(320px,400px) minmax(0,1fr)}
  body.lay-outlook .page.active:has(> .mm-split) .mm-detail{display:block}
  body.lay-outlook .ml-row,body.lay-outlook .ml-row:hover,body.lay-outlook .ml-row.unread{background:#fff}
  body.lay-outlook .ml-row.active,body.lay-outlook .ml-row.active:hover{background:#cfe0f5}
  body.lay-outlook .ml-row.unread .ml-sub-h,body.lay-outlook .ml-row.unread .ml-sub-t{color:var(--blue-d)}
  body.lay-outlook .mm-filters .mm-tab{padding:0 12px;font-size:13px}

  /* ── ★v0.2.26 列の幅を境目のドラッグで変える(施主 10-19「幅をいじれるようにしてほしい」・shell.js の gmCols*)──
     動かした列だけ body に印(gm-rail-sized / mm-list-sized)と幅の変数を立てる。動かしていない列は今までの幅のまま。
     ★一覧の幅は clamp で「最小 260px・本文に最低 360px 残す」(窓を狭めても本文が潰れない)。左のメニューを細くしているときは効かせない */
  body.gm-rail-sized:not(.gm-rail-mini) .gm-rail{flex-basis:var(--gm-rail-w)}
  body.mm-list-sized.mm-has-sel:not(.pane-full) .page.active:has(> .mm-split),
  body.lay-outlook.mm-list-sized .page.active:has(> .mm-split){grid-template-columns:var(--mm-list-w) minmax(0,1fr)}
  /* 境目に乗ったとき(動かせる印)・動かしている間 */
  body.gm-rz-rail .gm-rail{box-shadow:inset -3px 0 0 #9cc3ec}
  body.gm-rz-list .page.active .mm-detail{box-shadow:inset 3px 0 0 #9cc3ec}
  body.gm-rz-rail,body.gm-rz-rail *,body.gm-rz-list,body.gm-rz-list *{cursor:col-resize !important}
  body.gm-resizing{user-select:none;-webkit-user-select:none}
}
.gm-set-reset{margin-top:8px}

/* ═════ スマホ・小さな画面(900px 以下)═════ */
@media(max-width:900px){
  .topbar{height:60px;padding:0 8px;gap:6px;flex-wrap:nowrap}
  .topbar-left{flex:0 0 auto}
  .brand{display:none}
  .gm-search{height:46px;flex:1 1 auto;padding:0 12px}
  .gm-set{display:none}
  .auth-name{display:none}
  .gm-rail.tabbar{position:fixed;top:0;left:0;bottom:0;z-index:90;width:288px;max-width:86vw;background:#fff;
    transform:translateX(-105%);transition:transform .2s ease;box-shadow:2px 0 14px rgba(0,0,0,.2);padding:14px 10px 16px;
    flex-wrap:nowrap;overflow-x:hidden;overflow-y:auto}
  body.gm-rail-open .gm-rail.tabbar{transform:none}
  body.gm-rail-open .gm-scrim{display:block;position:fixed;inset:0;z-index:85;background:rgba(20,30,45,.38)}
  .gm-compose{display:none}
  .gm-rail .tab,.gm-nav,.tabbar .tab{min-height:44px;height:44px;border-radius:22px;font-size:14.5px}
  .main{margin:0;border-radius:0}
  .gm-fab{display:inline-flex;position:fixed;right:16px;bottom:20px;z-index:50;height:56px;padding:0 20px 0 16px;border:none;
    border-radius:16px;background:#cfe2f7;color:#0c447c;font-size:15px;font-weight:600;font-family:inherit;align-items:center;gap:10px;
    box-shadow:0 3px 10px rgba(20,40,70,.28);cursor:pointer}
  body.mm-detail-open .gm-fab{display:none}
  .gm-ribbon{display:none !important}
  /* 一覧はいつも 2 段(丸・差出人・日付 / 件名) */
  .ml-row{grid-template-columns:4px 40px minmax(0,1fr) auto;grid-template-rows:auto auto;
    grid-template-areas:"bar av from date" "bar av sub badges";height:auto;min-height:64px;padding:8px 12px 8px 0;gap:2px 10px;align-items:center}
  .ml-row .ml-bar{grid-area:bar;align-self:stretch}
  .ml-row .ml-av{grid-area:av;display:inline-flex;width:40px;height:40px;font-size:15px;align-self:start}
  .ml-row .ml-from{grid-area:from;font-size:14.5px}
  .ml-row .ml-date{grid-area:date;font-size:12px}
  .ml-row .ml-sub{grid-area:sub;font-size:14px}
  .ml-row .ml-badges{grid-area:badges}
  .ml-row.has-prev .ml-prev{display:block;padding-left:0;font-size:13px}
  .ml-prev::before{content:none}
  .ml-row.same .ml-av{visibility:hidden}
  .ml-row .ml-sub{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:baseline}
  .ml-sub>.ml-tag.rm{grid-column:1}
  .ml-sub>.ml-tag:not(.rm){grid-column:2}
  .ml-sub>.ml-sub-h{grid-column:3}
  .ml-sub>.ml-sub-t{grid-column:4}
  .ml-sub>.ml-prev{grid-column:1 / -1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ml-from:empty{display:block}
  .mm-detail{padding:0 16px 96px}
  .mm-c-head .mm-h2{font-size:19px}
  .mm-c-ops .mm-actions{display:flex;flex-wrap:wrap;border-radius:12px}
  .mm-c-ops .mm-actions .btn,.mm-c-send .mm-actions .btn{min-height:44px}   /* ★v0.2.23 900px 以下はタップ 44px */
  .mm-list{padding-bottom:88px}   /* ★v0.2.23 右下の「作成」が最後の行と「次へ」に重ならないように */
  .mm-c-ops .mm-actions .btn{flex:1 1 40%}
  .mm-back{margin-top:10px}
  /* 作成の窓はスマホでは全面 */
  .modal-bg.mm-dock{padding:0;align-items:stretch;justify-content:stretch;pointer-events:auto;background:rgba(20,30,45,.3)}
  .modal-bg.mm-dock .modal{max-width:none;max-height:none;height:100%;border-radius:0}
  .modal-bg.mm-dock .modal-head{border-radius:0}
}
@media(max-width:640px){
  .topbar{padding:0 6px;height:58px;flex-wrap:nowrap}
  .topbar-left{flex:0 0 auto}
  .topbar-right{gap:4px}
  .gm-search input{font-size:16px}   /* ★16px 未満は iOS Safari が勝手にズームする */
  .gm-logout{display:none}
  .gm-rail-foot{display:block}
  .main{padding:0}
}

/* ── EDI の中に埋め込んだとき ── */
body.gm-embed .gm-logout,body.gm-embed .gm-rail-foot,body.gm-embed .footer{display:none !important}
body.gm-embed #login-webauthn-wrap{display:none !important}   /* ★v0.2.23 枠の中では顔認証が使えない */

/* 印刷: 新しい枠の飾りも紙に出さない */
@media print{
  .gm-rail,.gm-ribbon,.gm-fab,.gm-scrim,.gm-set,.gm-search{display:none !important}
  .main{margin:0 !important;border-radius:0 !important}
  .gm-body{display:block !important}   /* ★v0.2.23 */
}

/* ══════════════════════════════════════════════════════════════
   ★v0.2.24 作成の窓の添付(js/compose_att.js)・下書き(js/drafts.js・アプリの中だけ)・
     アプリの中での添付の「開く」「保存」(message.js)・メールソフトを入れる案内(shell.js)
   ══════════════════════════════════════════════════════════════ */
.mpc-att{margin:12px 0 4px;padding:10px 12px;border:1px dashed #c6cfda;border-radius:10px;background:#f8fafc}
.mpc-att-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.mpc-att-hint{font-size:12px;min-width:0}
.mpc-att-list:empty{display:none}
.mpc-att-list{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.mpc-ai{background:#fff;border:1px solid var(--gm-line,#e9edf2);border-radius:8px;padding:6px 8px 6px 10px;font-size:13px}
.mpc-ai-row{display:flex;align-items:center;gap:8px;min-width:0}
.mpc-ai-ic{flex:0 0 auto}
.mpc-ai-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mpc-ai-size{flex:0 0 auto;color:var(--text3);font-size:11.5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.mpc-ai-bar{flex:0 0 96px;height:6px;border-radius:3px;background:#e3e8ef;overflow:hidden}
.mpc-ai-bar>i{display:block;height:100%;width:0;background:var(--blue);transition:width .2s ease}
.mpc-ai-pct{flex:0 0 auto;min-width:34px;text-align:right;font-size:11.5px;color:var(--text2);font-variant-numeric:tabular-nums}
.mpc-ai-ok{flex:0 0 auto;color:var(--green);font-weight:700}
.mpc-ai-x{flex:0 0 auto;width:30px;height:30px;border:none;border-radius:15px;background:transparent;color:var(--text2);
  font-size:14px;line-height:1;cursor:pointer;font-family:inherit}
.mpc-ai-x:hover:not(:disabled){background:rgba(60,64,67,.1);color:var(--text)}
.mpc-ai-x:disabled{opacity:.4;cursor:default}
.mpc-ai.st-error{border-color:#f0c4c0;background:var(--red-bg)}
.mpc-ai-err{margin-top:4px;color:var(--red);font-size:12px;line-height:1.6}
.mpc-ai-err .btn{margin-left:6px;vertical-align:middle}
.mpc-att-note:empty{display:none}
.mpc-att-note{margin-top:8px}
.mpc-att-note .mp-err{font-size:12px}
.mpc-conf-att{font-size:12px;word-break:break-all}
/* ファイルを作成の窓に重ねている間の目印 */
.modal.mpc-drag{outline:3px dashed var(--blue);outline-offset:-6px}
.modal.mpc-drag .mpc-att{background:var(--blue-bg);border-color:var(--blue)}

/* 下書きの一覧(窓の中) */
.mpd-list{display:flex;flex-direction:column;gap:8px}
.mpd-row{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--border);border-radius:10px;padding:10px 12px}
.mpd-main{flex:1 1 auto;min-width:0}
.mpd-top{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mpd-to,.mpd-prev{font-size:12.5px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mpd-when{font-size:11.5px;color:var(--text3);margin-top:2px}
.mpd-btns{flex:0 0 auto;display:flex;flex-direction:column;gap:6px}

/* アプリの中の添付の「開く」「保存」 */
.mm-att-acts{display:inline-flex;gap:6px;flex:0 0 auto}

/* 表示の設定の中の「Necfil メール」を入れる案内(ブラウザだけ) */
.gm-set-app{display:flex;align-items:center;min-height:36px;font-size:13px;font-weight:600;color:var(--blue);text-decoration:none}
.gm-set-app:hover{text-decoration:underline}

@media(max-width:900px){
  .mpc-ai-x{width:44px;height:44px;border-radius:22px}   /* ★タップ 44px */
  .mpc-ai-bar{flex-basis:64px}
  .mpd-row{flex-direction:column}
  .mpd-btns{flex-direction:row}
  .mpd-btns .btn{min-height:44px;flex:1 1 auto}
  .mm-att-acts .btn{min-height:40px}
}
