/* デザイン「ダーク」(2026-10-19 ユーザー: 見本 docs/samples/dark_design.html の案B=黒に近いグレー)。
   個人設定の「画面のデザイン」でダークを選んだ端末だけ(Cookie design=dark → <html class="theme-dark">)。当面は管理者だけ。
   見やすさ(老眼の人が多い): 字は真っ白にせず明るいグレー・薄い字も読める明るさ・線と入力欄の枠ははっきり。
   印刷には効かない(@media screen の中だけ。印刷の画面は別のレイアウトなので印も付かない)。
   色は :root の変数を入れ替え、白などを直に書いている所だけ下で上書きする */
@media screen {
  .theme-dark {
    color-scheme: dark;
    --color-bg: #141517;
    --color-surface: #1d1f22;
    --color-border: #3a3e44;
    --color-text: #e6e9ee;
    --color-muted: #aab3bf;
    --color-text-muted: #aab3bf;
    --color-primary: #2f6fb5;
    --color-primary-dark: #8cb8ee;
    --band: #26292d;
    --frame: #8cb8ee;
    --color-accent: #e0a46e;
    --color-danger: #f09a92;
    --color-warning: #e8c06a;
    --input-border: #8a95a5;
    --side-bg: #101113;
    --dk-row: #212327;
    --dk-hover: #2b2e33;
    --dk-input: #17181b;
  }
  .theme-dark body { background: var(--color-bg); color: var(--color-text); }
  .theme-dark a { color: var(--frame); }
  .theme-dark input::placeholder, .theme-dark textarea::placeholder { color: #7d8794; }

  /* ---- 左のメニュー・下の帯 ---- */
  .theme-dark .app-shell { --side-bg: #101113; --side-line: rgba(255, 255, 255, 0.12); --side-hover: rgba(255, 255, 255, 0.07); }
  .theme-dark .app-shell .sidebar { border-right: 1px solid var(--color-border); }
  .theme-dark .app-shell .sidebar .font-scale__option.is-active { background: var(--color-text); color: #101113; }
  .theme-dark .tab-bar { background: rgba(20, 21, 23, 0.92); border-top-color: var(--color-border); box-shadow: none; }
  .theme-dark .tab-bar { border-color: #3a3d42; }
  .theme-dark .tab-bar__item { color: var(--color-text); }

  /* ---- 見出し・項目名 ---- */
  .theme-dark .page-title { color: var(--frame); }
  .theme-dark .section-title { color: var(--frame); }
  .theme-dark .field label { color: var(--color-text); }
  .theme-dark .search-form .field label { color: var(--color-muted); }
  .theme-dark .tabs__count { background: #3a3e44; color: var(--color-text); }
  .theme-dark .mail-folders__item .tabs__count { background: #3b7be8; color: #fff; } /* メールのフォルダの未読の数(2026-10-27)は青の地に白 */
  .theme-dark .mail-folders__item.is-active .tabs__count { background: #fff; color: #1f2933; }

  /* ---- 窓・帯・表 ---- */
  .theme-dark .card,
  .theme-dark .toast,
  .theme-dark .delete-reason,
  .theme-dark dialog { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
  .theme-dark dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
  .theme-dark .table th { background: var(--band); color: var(--color-text); }
  .theme-dark .table td { border-color: var(--color-border); }
  .theme-dark .table tbody tr:hover td,
  .theme-dark tr[data-href]:hover td { background: var(--dk-hover); }
  .theme-dark .search-form { background: var(--band); }
  .theme-dark .flash--notice { background: #1f3350; color: #cfe0f7; }
  .theme-dark .flash--alert, .theme-dark .errors { background: #3b1f1f; color: #f6c0bb; border-color: #7a3b36; }
  .theme-dark .toast__close:hover { background: var(--dk-hover); }

  /* ---- ボタン ---- */
  .theme-dark .btn { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
  .theme-dark .btn--secondary { background: transparent; color: var(--frame); border-color: var(--frame); }
  .theme-dark .btn--secondary:hover { background: #22303f; }
  .theme-dark .btn--danger { background: #a8413a; border-color: #a8413a; color: #fff; }
  .theme-dark .btn--danger-outline { background: transparent; color: var(--color-danger); border-color: #e07a72; }
  .theme-dark .font-scale__option { background: transparent; color: var(--color-text); border-color: var(--color-border); }
  .theme-dark .font-scale__option.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

  /* ---- 入力欄(中を一段暗く・枠は明るいグレー) ---- */
  .theme-dark input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]),
  .theme-dark select,
  .theme-dark textarea { background-color: var(--dk-input); color: var(--color-text); border-color: var(--input-border); }
  /* 時刻の箱と、押すと出る時・分の窓(time_picker_controller.js) */
  .theme-dark .tp-box, .theme-dark .tp-panel { background: var(--dk-input); color: var(--color-text); }
  .theme-dark .tp-box__clock { color: var(--color-muted); }
  .theme-dark .tp-item:hover { background: #2a3038; }
  .theme-dark .tp-item.is-on { background: #3d8bf0; }
  .theme-dark input[type=file] { color: var(--color-text); }
  .theme-dark .search-form .field input[type=text], .theme-dark .search-form .field input[type=date],
  .theme-dark .search-form .field input[type=number], .theme-dark .search-form .field select { background-color: var(--dk-input); border-color: var(--input-border); color: var(--color-text); }

  /* ---- 見積書・請求書の明細の表 ---- */
  .theme-dark .items-table thead th { background: var(--band); color: var(--color-muted); }
  .theme-dark .items-table tbody tr:hover td { background: var(--dk-hover); }

  /* ---- 損益計算書の「営業損益」の行は Excel と同じ黄色の帯のまま、字を濃い色に(2026-11-24: 黄色に白い字で読めなかった) ---- */
  .theme-dark .pl-row--result td { color: #222020; }

  /* ---- 書類の見本(請求書・見積書の画面の下の紙)は白い紙のまま。中の色の決まりを元に戻す ---- */
  .theme-dark .print-page {
    --color-surface: #ffffff; --color-border: #c9d2de; --color-text: #222020; --color-muted: #5c5852; --color-text-muted: #5c5852;
    --color-primary: #113961; --color-primary-dark: #0d2d4e; --band: #edf0f5; --frame: #2f5f93; --color-accent: #a06a3c; --color-danger: #b3453d;
    /* 行の交互色などもノーマルの色に(2026-11-23 ユーザー: 請求書の明細が1行おきに黒くなり、料理などの品名が読めなかった。design.css.erb の
       「1行おきに色を付ける」がダークの色のまま紙の中にも効いていた) */
    --rn-row-alt: #f8fafc; --rn-row-hover: #eaf1f8; --rn-cell-line: #e3e8ee; --rn-amount: #f1f4f8;
    background: #fff; color: #222020; border-color: #c9d2de;
  }
  .theme-dark .print-page .table th { background: var(--band); color: var(--color-primary); }
  .theme-dark .print-page .table td { border-color: var(--color-border); }
  .theme-dark .print-page .table tbody tr:hover td, .theme-dark .print-page tr[data-href]:hover td { background: #f3f6fa; }
  .theme-dark .print-page .page-title, .theme-dark .print-page .section-title { color: inherit; }

  /* ---- スケジュール ---- */
  .theme-dark .schedule-week__name { background: #1a1c1f; }
  .theme-dark .schedule-week__funerals td { background: #2a2418; }
  .theme-dark .schedule-week__funerals th { background: #33291a; }
  .theme-dark .schedule-week tr.is-me th { background: #1f2a3a; }
  .theme-dark .schedule-week thead th.is-sat, .theme-dark .schedule-month thead th.is-sat { background: #1d2a3d; }
  .theme-dark .schedule-week thead th.is-sun, .theme-dark .schedule-month thead th.is-sun { background: #3a2222; }
  .theme-dark th.is-sat, .theme-dark td.is-sat .schedule-day__date, .theme-dark th.is-sat .schedule-day__date { color: #8cb8ee; }
  .theme-dark th.is-sun, .theme-dark td.is-sun .schedule-day__date, .theme-dark th.is-sun .schedule-day__date { color: #f09a92; }
  .theme-dark .schedule-week tbody td.is-today, .theme-dark .schedule-month td.is-today { background: #2a2a1c; }
  .theme-dark .schedule-week thead th.is-today, .theme-dark .schedule-month td.is-today { box-shadow: inset 0 0 0 2px #8cb8ee; }
  .theme-dark .schedule-week td.is-conflict { background: #3a2422; }
  .theme-dark .schedule-item { background: #26303d; color: var(--color-text); }
  .theme-dark .schedule-item:hover { background: #2f3b4b; }
  .theme-dark .schedule-item--funeral { background: #3a2f1c; }
  .theme-dark .schedule-item--kind-0 { background: #1f3344; }
  .theme-dark .schedule-item--colored { background: color-mix(in srgb, var(--menu-color) 26%, #1d1f23); }
  .theme-dark .schedule-item--colored:hover { background: color-mix(in srgb, var(--menu-color) 36%, #1d1f23); }
  .theme-dark .schedule-item--funeral:hover { background: #46391f; }
  .theme-dark .schedule-item--provisional { background: #2a2618; }
  .theme-dark .dash-table tr.is-today td { background: #2a2a1c; }

  /* ---- ホームのお知らせ ---- */
  .theme-dark .home__notice { background: #3a2f17; border-color: #8a6b2a; color: #f4dfae; }
  .theme-dark .home__notice:hover { background: #45381c; }
  .theme-dark .home__notice-icon { background: #1d1f22; }
  .theme-dark .home__notice-text strong { color: #ffcf6b; }
  .theme-dark .home__notice-arrow { color: #c9b98d; }
  .theme-dark .home__notice--error { background: #3b1f1f; border-color: #7a3b36; color: #f6c0bb; }
  .theme-dark .home__notice--error:hover { background: #462424; }
  .theme-dark .home__notice--error .home__notice-text strong { color: #ffb3ab; }
  /* スマホのホームの小さな札(2026-11-20)。ホームの帯と同じ色に・丸の中の絵が見えるように・会員確認は赤い縞のまま */
  .theme-dark .home__tile { background: #3a2f17; border-color: #8a6b2a; color: #f4dfae; }
  .theme-dark .home__tile-icon { background: #1d1f22; color: #ffcf6b; }
  .theme-dark .home__tile-text strong { color: #ffcf6b; }
  .theme-dark .home__tile--error { background: #3b1f1f; border-color: #7a3b36; color: #f6c0bb; }
  .theme-dark .home__tile--error .home__tile-icon { color: #ff8f84; }
  .theme-dark .home__tile--error strong { color: #ffb3ab; }
  .theme-dark .home__tile--member { background: repeating-linear-gradient(-45deg, #b3271a 0 14px, #c2382a 14px 28px); border-color: #e04a3a; color: #fff; }
  .theme-dark .home__tile--member .home__tile-icon { background: rgba(255, 255, 255, 0.2); color: #fff; }
  .theme-dark .home__tile--member strong { color: #fff; }

  /* ---- 色の印(バッジ)。暗い下地に明るい字 ---- */
  .theme-dark .badge--pre_consultation, .theme-dark .badge--estimate_target, .theme-dark .badge--new_consultation { background: #1f3b61; color: #a9cdf7; }
  .theme-dark .badge--funeral_customer, .theme-dark .badge--deceased_target, .theme-dark .badge--set, .theme-dark .badge--following_up { background: #4a3218; color: #f6c48f; }
  .theme-dark .badge--member_only, .theme-dark .badge--member, .theme-dark .badge--issued, .theme-dark .badge--paid,
  .theme-dark .badge--contracted, .theme-dark .badge--ok, .theme-dark .badge--added { background: #1d4430; color: #9fe0b5; }
  .theme-dark .badge--retail_customer, .theme-dark .badge--partially_paid, .theme-dark .badge--considering, .theme-dark .badge--retail_target,
  .theme-dark .badge--warn, .theme-dark .badge--name-change { background: #45391a; color: #f0d58a; }
  .theme-dark .badge--deceased, .theme-dark .badge--muted, .theme-dark .badge--draft, .theme-dark .badge--completed { background: #33363b; color: #c7ccd3; }
  .theme-dark .badge--legacy { background: #352d4d; color: #cbbcf2; }
  .theme-dark .badge--voided, .theme-dark .badge--unpaid, .theme-dark .badge--complaint { background: #4d2222; color: #f6a6a0; }

  /* ---- ホーム ---- */
  .theme-dark .home-card__title a { color: var(--color-text); }

  /* ---- 白を直に書いている部品 ---- */
  .theme-dark .file-list__eye:hover, .theme-dark .schedule-files__photo { background: var(--dk-hover); }
  .theme-dark .m-list { background: var(--color-surface); border-color: var(--color-border); }
  /* メールの本文(HTML)はお客様のメールの色のまま読めるよう白い紙のまま */
  .theme-dark .mail-html { background: #fff; }
}

/* アイコン(2026-10-19 ユーザー: ガラスのように線の枠にして、色ではなく白に)。左のメニューと下の帯。
   今いる画面はうすく白で塗って枠を明るく(下の帯は枠を太く) */
@media screen {
  .theme-dark .sidebar__top-link > .icon-tile,
  .theme-dark .sidebar__group > summary > .icon-tile,
  .theme-dark .tab-bar__item > .icon-tile {
    background: transparent; border: 1.8px solid #c9ced6; color: #e6e9ee; stroke: #e6e9ee; border-radius: 9px; box-shadow: none;
  }
  .theme-dark .sidebar__top-link > .icon-tile [stroke="#fff"],
  .theme-dark .sidebar__group > summary > .icon-tile [stroke="#fff"],
  .theme-dark .tab-bar__item > .icon-tile [stroke="#fff"] { stroke: #e6e9ee; }
  .theme-dark .sidebar__top-link--current > .icon-tile,
  .theme-dark .sidebar__group--current > summary > .icon-tile { background: rgba(255, 255, 255, 0.14); border-color: #ffffff; }
  .theme-dark .tab-bar__item { color: #c9ced6; }
  .theme-dark .tab-bar__item.is-active { color: #ffffff; font-weight: 700; }
  .theme-dark .tab-bar__item.is-active > .icon-tile { border-width: 2.4px; border-color: #ffffff; background: rgba(255, 255, 255, 0.14); }
}

/* スマホの上の帯の「…」の中の気をつける項目(2026-10-27) */
.theme-dark .mbar-pop__item--danger { color: #f0a39c; }
.theme-dark .mobile-bar.mobile-bar--page.is-scrolled { background: rgba(30, 29, 27, 0.97); }

/* メモ(2026-10-28 ノートの形): 題名・本文・やることの欄は地の色のまま(枠のない紙に書く形) */
.theme-dark :is(.memo-b__title, .memo-b__body, .memo-b__item-text, .memo-b__add-item input) { background: transparent !important; } /* 入力欄の決まり(.theme-dark input:not(...))より強く */
.theme-dark .memo-b__row.is-active { background: #34322e; }
@media (hover: hover) { .theme-dark .memo-b__row:hover, .theme-dark .memo-b__row.is-active:hover { background: #2e2c29; } }
.theme-dark .memo-b__tool:hover { background: #2e2c29; }
/* 顧客の画面の請求書の売上区分の見出し(2026-10-29): 紺などの暗い色の線が黒地で見えないので白を混ぜる */
.theme-dark .invoice-group-row > td:first-child { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--group-color, #8a8f96) 60%, #ffffff); }
.theme-dark .invoice-actions.is-floating { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
/* スマホのメニューの窓の題名(2026-11-14): 紺の字が黒地で見えないので明るく */
.theme-dark .mobile-menu__head { color: #d7e2ee; }
.theme-dark .mobile-menu__group.is-on { box-shadow: 5px 6px 10px rgba(0, 0, 0, 0.65), 2px 2px 3px rgba(0, 0, 0, 0.5), inset 1px 1px 0 rgba(255, 255, 255, 0.12); }

/* TODO の「灰」は白のカードと見分けやすく少し明るく(2026-11-18) */
.theme-dark .todo-card--gray { background: #313338; }

/* スマホのホームの「今日」「明日」の押している方(2026-11-18) */
.theme-dark .home-day__btn.is-active { background: #a2c0e1; color: #14171c; }
/* 自動で作ったファイル(tools/dark_theme/generate.rb)。手で直さない。手で合わせる所は dark.css に */
@media screen {
.theme-dark :is(.sidebar__toggle:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.sidebar__sub > summary):where(:not(.print-page *)) { color: var(--side-ink, #d0d4da); }
.theme-dark :is(.font-scale__option.is-active):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.account-font .font-scale__option):where(:not(.print-page *)) { color: var(--color-text, #dadada); }
.theme-dark :is(.toast):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.toast__close:hover):where(:not(.print-page *)) { background: #282725; }
.theme-dark :is(.flash--notice):where(:not(.print-page *)) { background: #22242b; }
.theme-dark :is(.flash--alert):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.btn--secondary):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.btn--secondary:hover):where(:not(.print-page *)) { background: #1e2229; }
.theme-dark :is(.btn--danger-outline:hover):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.search-form .field input[type=text], .search-form .field input[type=date], .search-form .field input[type=month], .search-form .field input[type=number], .search-form .field select):where(:not(.print-page *)) { background-color: #1d1d1d; border-color: #494744; }
.theme-dark :is(.tabs__tab:hover):where(:not(.print-page *)) { background: #282725; }
.theme-dark :is(.tabs__count):where(:not(.print-page *)) { background: #2e2d2a; }
.theme-dark :is(.field label):where(:not(.print-page *)) { color: #dddad7; }
.theme-dark :is(.tp-box):where(:not(.print-page *)) { background: #1d1d1d; color: var(--color-text, #dfdddd); }
.theme-dark :is(.tp-box__clock):where(:not(.print-page *)) { color: #c5c8cd; }
.theme-dark :is(.tp-panel):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.tp-item:hover):where(:not(.print-page *)) { background: #20252b; }
.theme-dark :is(.scroll-hint):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.table tr:hover td):where(:not(.print-page *)) { background: #22221f; }
.theme-dark :is(.table tr[data-href]:hover td):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.badge--pre_consultation):where(:not(.print-page *)) { background: #20252c; color: #a3bbe4; }
.theme-dark :is(.badge--funeral_customer):where(:not(.print-page *)) { background: #2d2826; }
.theme-dark :is(.badge--member_only):where(:not(.print-page *)) { background: #252b25; color: #b6dfbf; }
.theme-dark :is(.badge--retail_customer):where(:not(.print-page *)) { background: #322f25; color: #e6d5a8; }
.theme-dark :is(.badge--member):where(:not(.print-page *)) { background: #242d27; color: #aee0c0; }
.theme-dark :is(.badge--deceased):where(:not(.print-page *)) { background: #292929; color: #c7c7c7; }
.theme-dark :is(.badge--muted):where(:not(.print-page *)) { background: #282725; color: #bdbdbd; }
.theme-dark :is(.badge--draft):where(:not(.print-page *)) { background: #292929; color: #c7c7c7; }
.theme-dark :is(.badge--legacy):where(:not(.print-page *)) { background: #25222b; color: #b4aad1; }
.theme-dark :is(.badge--voided):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.alert-box):where(:not(.print-page *)) { background: #2b1e1d; color: #e5aaa7; }
.theme-dark :is(.notice-bar):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.badge--set):where(:not(.print-page *)) { background: #2d2826; }
.theme-dark :is(.badge--unpaid):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.badge--partially_paid):where(:not(.print-page *)) { background: #322f25; color: #e6d5a8; }
.theme-dark :is(.badge--paid):where(:not(.print-page *)) { background: #242d27; color: #aee0c0; }
.theme-dark :is(.badge--estimate_target):where(:not(.print-page *)) { background: #20252c; color: #a3bbe4; }
.theme-dark :is(.badge--deceased_target):where(:not(.print-page *)) { background: #2d2826; }
.theme-dark :is(.badge--new_consultation):where(:not(.print-page *)) { background: #20252c; color: #a3bbe4; }
.theme-dark :is(.badge--considering):where(:not(.print-page *)) { background: #322f25; color: #e6d5a8; }
.theme-dark :is(.badge--contracted):where(:not(.print-page *)) { background: #242d27; color: #aee0c0; }
.theme-dark :is(.badge--following_up):where(:not(.print-page *)) { background: #2d2826; }
.theme-dark :is(.badge--completed):where(:not(.print-page *)) { background: #292929; color: #c7c7c7; }
.theme-dark :is(.badge--retail_target):where(:not(.print-page *)) { background: #322f25; color: #e6d5a8; }
.theme-dark :is(.level-tag--member):where(:not(.print-page *)) { color: #aee0c3; }
.theme-dark :is(.similar-box):where(:not(.print-page *)) { border: 1px solid #5d503b; background: #2b261b; }
.theme-dark :is(.similar-box summary):where(:not(.print-page *)) { color: #ebd7b9; }
@media (max-width: 860px) { .theme-dark :is(.similar-box .table tr):where(:not(.print-page *)) { background: #1d1d1d; border: 1px solid #5d503b; } }
.theme-dark :is(.merge-group__head):where(:not(.print-page *)) { background: #1e2026; }
.theme-dark :is(.merge-group__table tr.is-kept td):where(:not(.print-page *)) { background: #202621; }
.theme-dark :is(.member-check--ok):where(:not(.print-page *)) { background: #212a24; border: 1px solid #435348; color: #bae5ca; }
.theme-dark :is(.member-check--alert):where(:not(.print-page *)) { background: #281c1a; }
.theme-dark :is(.member-check__step):where(:not(.print-page *)) { color: #ebbeb8; }
.theme-dark :is(.member-check__cand):where(:not(.print-page *)) { border: 1px solid #523c38; background: #1d1d1d; }
.theme-dark :is(.member-check__ng):where(:not(.print-page *)) { color: #e3a39d; }
.theme-dark :is(.badge--warn):where(:not(.print-page *)) { background: #322b20; color: #e9d3b3; }
.theme-dark :is(.use-existing):where(:not(.print-page *)) { border: 1px solid #384253; background: #1a1f28; }
.theme-dark :is(.use-existing__warn):where(:not(.print-page *)) { background: #322e20; }
.theme-dark :is(.use-existing__warn--strong):where(:not(.print-page *)) { background: #2b1d1c; color: #e7afac; }
.theme-dark :is(.similar-name-hint):where(:not(.print-page *)) { color: #e9d6b3; background: #2e291e; border: 1px solid #5b523a; }
.theme-dark :is(.master-edit-row--unconfirmed):where(:not(.print-page *)) { background: #2e291e; }
.theme-dark :is(.master-edit-row.is-dragging):where(:not(.print-page *)) { background: var(--color-bg, #242422); }
.theme-dark :is(.help-tip):where(:not(.print-page *)) { border: 1px solid #4e4d4b; }
.theme-dark :is(.permission-group):where(:not(.print-page *)) { border-bottom: 1px solid var(--color-border, #464441); color: var(--color-muted, #bfbfbf); }
.theme-dark :is(.permission-check__note, .perm-matrix__note):where(:not(.print-page *)) { color: var(--color-muted, #bdbdbd); }
.theme-dark :is(.perm-table th, .perm-table td):where(:not(.print-page *)) { border: 1px solid var(--color-border, #464441); }
.theme-dark :is(.perm-table thead th):where(:not(.print-page *)) { background: #1f2024; }
.theme-dark :is(.perm-table tbody tr:not(.perm-table__group):nth-child(even) th, .perm-table tbody tr:not(.perm-table__group):nth-child(even) td):where(:not(.print-page *)) { background: #1d2022; }
.theme-dark :is(.perm-table__group th):where(:not(.print-page *)) { background: #1f2328 !important; color: #bbc3d6; }
.theme-dark :is(.perm-table__part.is-on):where(:not(.print-page *)) { background: #242f27; }
.theme-dark :is(.perm-table__part.is-off):where(:not(.print-page *)) { background: #2e1e1d; }
.theme-dark :is(.perm-table__everyone):where(:not(.print-page *)) { color: #baccba; }
.theme-dark :is(.perm-matrix-wrap):where(:not(.print-page *)) { border: 1px solid var(--color-border, #464441); }
.theme-dark :is(.perm-matrix th, .perm-matrix td):where(:not(.print-page *)) { border-bottom: 1px solid var(--color-border, #464441); background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.perm-matrix thead th):where(:not(.print-page *)) { background: #1f2024; }
.theme-dark :is(.perm-matrix__role-name):where(:not(.print-page *)) { color: var(--color-primary, #bac5de); }
.theme-dark :is(.perm-matrix__role-meta):where(:not(.print-page *)) { color: var(--color-muted, #bdbdbd); }
.theme-dark :is(.perm-matrix__group th):where(:not(.print-page *)) { background: #1f2328 !important; color: #bbc3d6; }
.theme-dark :is(.perm-matrix tbody tr:not(.perm-matrix__group):hover th, .perm-matrix tbody tr:not(.perm-matrix__group):hover td):where(:not(.print-page *)) { background: #1a1f25; }
.theme-dark :is(.perm-matrix__cell.is-on, .perm-matrix tbody tr:hover .perm-matrix__cell.is-on):where(:not(.print-page *)) { background: #242f27 !important; }
.theme-dark :is(.perm-matrix__cell.is-off, .perm-matrix tbody tr:hover .perm-matrix__cell.is-off):where(:not(.print-page *)) { background: #2e1e1d !important; }
.theme-dark :is(.perm-matrix__actions):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.perm-matrix__status--dirty):where(:not(.print-page *)) { color: #e2ad9a; }
.theme-dark :is(.dash .is-up):where(:not(.print-page *)) { color: #ade1c2; }
.theme-dark :is(.dash-diff.is-up):where(:not(.print-page *)) { color: #b2e9ca; }
.theme-dark :is(.dash-diff.is-down):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.period-views__radio:checked + .period-views__tab):where(:not(.print-page *)) { background: #22272d; }
.theme-dark :is(.dash-table tr.is-today td):where(:not(.print-page *)) { background: #2e291e; }
.theme-dark :is(.dash-fold > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.dash-map__scroll tr.is-hot td):where(:not(.print-page *)) { background: #22242b; }
.theme-dark :is(.dash-map__hall):where(:not(.print-page *)) { border: 2px solid #3d3d3d; }
.theme-dark :is(.leaflet-tooltip.dash-map__hall-label.dash-map__hall-label--other):where(:not(.print-page *)) { color: #b3e9d1; }
.theme-dark :is(.case-type-select--estimate_target):where(:not(.print-page *)) { background: #20252c; color: #a3bbe4; border-color: #3a434e; }
.theme-dark :is(.case-type-select--deceased_target):where(:not(.print-page *)) { background: #2d2826; border-color: #4d443f; }
.theme-dark :is(.case-type-select--retail_target):where(:not(.print-page *)) { background: #322f25; color: #e6d5a8; border-color: #514c3d; }
.theme-dark :is(.family-prefill > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(input.is-prefilled, select.is-prefilled):where(:not(.print-page *)) { background: #322e20; }
.theme-dark :is(.move-options):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.split-warning):where(:not(.print-page *)) { background: #322e20; }
.theme-dark :is(.errors):where(:not(.print-page *)) { background: #2b1e1d; border: 1px solid #4f3b3a; }
.theme-dark :is(input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"]):where(:not(.print-page *)) { background-color: #271a19; }
.theme-dark :is(.use-existing__estimate):where(:not(.print-page *)) { background: #1e2126; }
.theme-dark :is(.use-existing__estimate-pick):where(:not(.print-page *)) { background: #29241a; }
.theme-dark :is(.web-tabs__tab):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); color: var(--frame, #a2c0e1); }
@media (max-width: 860px) { .theme-dark :is(.web-shops tbody tr):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); } }
.theme-dark :is(.items-table tr.line-item-row--plan-head td):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.items-table tr.line-item-row--plan-head td.col-del):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.items-table thead th):where(:not(.print-page *)) { background: #282725; }
.theme-dark :is(.items-table tbody tr:hover td):where(:not(.print-page *)) { background: #22221f; }
.theme-dark :is(.items-table thead th.col-del):where(:not(.print-page *)) { background: #282725; }
.theme-dark :is(.items-table tbody tr:hover td.col-del):where(:not(.print-page *)) { background: #22221f; }
.theme-dark :is(.items-table tr.hidden-price .unit-price-input):where(:not(.print-page *)) { background: #282725; }
.theme-dark :is(.items-table tr.line-item--pick-first input:disabled, .items-table tr.line-item--pick-first select:disabled):where(:not(.print-page *)) { background: #282725; border-color: #464542; }
.theme-dark :is(.items-table tr.line-item--pick-first .code-search-input):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.icon-btn:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.icon-btn.remove-row):where(:not(.print-page *)) { border-color: #4f3b3a; }
.theme-dark :is(.icon-btn.remove-row:hover):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.subtotal-row td):where(:not(.print-page *)) { background: #262521; }
.theme-dark :is(.product-suggestion-item:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.modal-product-item:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.modal-category-selects #modal-name-change-select):where(:not(.print-page *)) { background-color: #2b271c; border-color: #564e3a; }
.theme-dark :is(.modal-pagination button:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.modal-footer):where(:not(.print-page *)) { background: #22221f; }
.theme-dark :is(.badge--added):where(:not(.print-page *)) { background: #273029; color: #b3e9c3; }
.theme-dark :is(.line-item-row--flash td, tr.line-item-row--flash, .line-item-row--flash):where(:not(.print-page *)) { background: #383324 !important; }
.theme-dark :is(.test-account-bar):where(:not(.print-page *)) { background: #322d20; color: #ece0be; }
.theme-dark :is(.receipt-slip):where(:not(.print-page *)) { color: #d6d6d6; }
.theme-dark :is(.receipt-slip__title h1):where(:not(.print-page *)) { color: #d6d6d6; }
.theme-dark :is(.receipt-slip__to small):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.receipt-slip__amount .yen):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.receipt-slip__ok):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.receipt-slip__company):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.receipt-slip__company-name):where(:not(.print-page *)) { color: #d6d6d6; }
.theme-dark :is(.payment-slip__head h1):where(:not(.print-page *)) { color: #d6d6d6; }
.theme-dark :is(.payment-slip__to small):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.unit-price-input--needed):where(:not(.print-page *)) { background: #2e2a1e; }
.theme-dark :is(.row--inactive td):where(:not(.print-page *)) { background: #242422; }
.theme-dark :is(.price-update-table tr.row--changed td):where(:not(.print-page *)) { background: #2e2a1e; }
.theme-dark :is(.price-update-table tr.row--error td):where(:not(.print-page *)) { background: #2b1b1b; }
.theme-dark :is(.field-error):where(:not(.print-page *)) { color: var(--color-danger, #e29e9a); }
.theme-dark :is(.price-change-up):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.price-change-down):where(:not(.print-page *)) { color: #b2e9ca; }
.theme-dark :is(.badge--name-change):where(:not(.print-page *)) { background: #322b20; color: #e9d6b3; }
.theme-dark :is(.name-change-badge):where(:not(.print-page *)) { color: #e9d6b3; background: #322b20; }
.theme-dark :is(.field--needed):where(:not(.print-page *)) { background: #2e2a1e; }
.theme-dark :is(.import-summary__item):where(:not(.print-page *)) { background: #22221f; }
.theme-dark :is(.import-summary__item--new strong):where(:not(.print-page *)) { color: #b2e9ca; }
.theme-dark :is(.pager__link:hover):where(:not(.print-page *)) { background: #272825; }
.theme-dark :is(.theme-liquid .case-list th:nth-child(2)):where(:not(.print-page *)) { background: #1f2125; }
@media (hover: hover) { .theme-dark :is(button.check-mark:hover):where(:not(.print-page *)) { color: #b6dfbe; } }
@media (hover: hover) { .theme-dark :is(button.check-mark.is-on:hover):where(:not(.print-page *)) { background: #291b1a; } }
.theme-dark :is(.case-list__doc.is-missing .quick-upload__button):where(:not(.print-page *)) { border-color: #53403d; background: #291b1a; }
.theme-dark :is(.survey-none__mark):where(:not(.print-page *)) { color: #daa9a0; }
.theme-dark :is(.case-upload-menu button:hover, .case-upload-menu button:focus-visible):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.quick-upload__button):where(:not(.print-page *)) { border: 1px dashed #4e4d4b; }
.theme-dark :is(.quick-upload.is-drag .quick-upload__button):where(:not(.print-page *)) { background: #1d222a; }
.theme-dark :is(.case-list__doc.is-drag .quick-upload__button):where(:not(.print-page *)) { background: #1d222a; }
.theme-dark :is(.pdf-pages img):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.lightbox__stage iframe):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.sales-department td):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.sales-subtotal td):where(:not(.print-page *)) { background: #262521; border-top: 1px solid #484744; }
.theme-dark :is(.sales-total td):where(:not(.print-page *)) { background: #282725; border-top: 2px solid #4e4d4b; }
.theme-dark :is(.case-checks__done):where(:not(.print-page *)) { color: #b6dfbe; }
.theme-dark :is(.badge--ok):where(:not(.print-page *)) { background: #232c25; color: #b6dfbe; }
.theme-dark :is(.survey-reading__tag):where(:not(.print-page *)) { background: #202428; color: #abc5e0; }
.theme-dark :is(.badge--complaint):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(.check-mark.is-on):where(:not(.print-page *)) { background: #252d26; color: #b6dfbe; border-color: #465348; }
.theme-dark :is(.import-details tr.row--error td):where(:not(.print-page *)) { background: #2b1b1b; }
.theme-dark :is(.schedule-week__name):where(:not(.print-page *)) { background: #282620; }
.theme-dark :is(.schedule-week__funerals td):where(:not(.print-page *)) { background: #29241a; }
.theme-dark :is(.schedule-week__funerals th):where(:not(.print-page *)) { background: #312b1f; }
.theme-dark :is(.schedule-week tr.is-me th):where(:not(.print-page *)) { background: #20232b; }
.theme-dark :is(.schedule-week thead th.is-sat, .schedule-month thead th.is-sat):where(:not(.print-page *)) { background: #1d242d; }
.theme-dark :is(.schedule-week thead th.is-sun, .schedule-month thead th.is-sun):where(:not(.print-page *)) { background: #2c1d1d; }
.theme-dark :is(.schedule-week tbody td.is-today):where(:not(.print-page *)) { background: #2c2a1c; }
.theme-dark :is(.schedule-item):where(:not(.print-page *)) { background: #1d1f26; border-left: 3px solid #40454f; }
.theme-dark :is(.schedule-item:hover):where(:not(.print-page *)) { background: #20242c; }
.theme-dark :is(.schedule-item--colored):where(:not(.print-page *)) { background: color-mix(in srgb, var(--menu-color) 16%, #1d1d1d); }
.theme-dark :is(.schedule-item--shift:hover):where(:not(.print-page *)) { background: color-mix(in srgb, var(--menu-color) 16%, #1d1d1d); }
.theme-dark :is(.schedule-item--colored:hover):where(:not(.print-page *)) { background: color-mix(in srgb, var(--menu-color) 28%, #1d1d1d); }
.theme-dark :is(.schedule-item--funeral):where(:not(.print-page *)) { background: #2f291e; }
.theme-dark :is(.schedule-item--funeral:hover):where(:not(.print-page *)) { background: #3a3225; }
.theme-dark :is(.schedule-add:hover, .schedule-add:focus):where(:not(.print-page *)) { background: #232b26; }
.theme-dark :is(.schedule-month td.is-other-month):where(:not(.print-page *)) { background: #25231e; }
.theme-dark :is(.schedule-form__swatch):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.schedule-form__copied):where(:not(.print-page *)) { background: #2e3224; border: 1px solid #4c523f; color: #d3eab9; }
.theme-dark :is(.schedule-item--provisional):where(:not(.print-page *)) { background: #272419; }
.theme-dark :is(.schedule-item--kind-0):where(:not(.print-page *)) { background: #1d262d; }
.theme-dark :is(.schedule-item--kind-0:hover, .schedule-item--kind-0[open]):where(:not(.print-page *)) { background: #212c34; }
.theme-dark :is(.schedule-item--kind-0.schedule-item--provisional):where(:not(.print-page *)) { background: #1a2228; }
.theme-dark :is(.schedule-item__provisional):where(:not(.print-page *)) { color: #e3c79f; }
.theme-dark :is(.badge-recommend):where(:not(.print-page *)) { background: #322b20; color: #e3c79f; }
.theme-dark :is(tr.is-overdue td):where(:not(.print-page *)) { background: #281c1a; }
.theme-dark :is(.schedule-week td.is-conflict):where(:not(.print-page *)) { background: #291d1b; }
.theme-dark :is(.board-cats):where(:not(.print-page *)) { background: #282620; }
.theme-dark :is(.board-cats__item:hover):where(:not(.print-page *)) { background: #2f2e29; }
.theme-dark :is(.board-post__cat):where(:not(.print-page *)) { background: #202328; }
.theme-dark :is(.workflow-route__step):where(:not(.print-page *)) { background: #23211e; }
.theme-dark :is(.workflow-route__step.is-done):where(:not(.print-page *)) { background: #202722; }
.theme-dark :is(.workflow-route__step.is-current):where(:not(.print-page *)) { background: #29241a; }
.theme-dark :is(.workflow-route__done):where(:not(.print-page *)) { color: #aee0c0; }
.theme-dark :is(.workflow-route__now):where(:not(.print-page *)) { color: #e3c79f; }
.theme-dark :is(.workflow-act):where(:not(.print-page *)) { border: 1px solid #594d39; background: #29241a; }
.theme-dark :is(.workflow-history__item--approve .workflow-history__label, .workflow-history__item--confirm .workflow-history__label):where(:not(.print-page *)) { color: #aee0c0; }
.theme-dark :is(.workflow-route-table tr.is-blank input[type=text]):where(:not(.print-page *)) { background: #23211e; }
.theme-dark :is(.workflow-form__grid .field input[type=time]):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.workflow-form__summary):where(:not(.print-page *)) { background: #1b212a; border: 1px solid #374150; }
.theme-dark :is(.workflow-rows__cell input, .workflow-rows__cell select):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.workflow-rows__note):where(:not(.print-page *)) { border: 1px solid #594d39; background: #29241a; }
.theme-dark :is(.workflow-form__grid .field input[type=month]):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.recipient-picker__ui):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.recipient-picker__count):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.recipient-picker__chip):where(:not(.print-page *)) { background: #1e242c; border: 1px solid #3d4651; color: #b6cfea; }
.theme-dark :is(.recipient-picker__remove):where(:not(.print-page *)) { color: #adbdd0; }
.theme-dark :is(.recipient-picker__remove:hover, .recipient-picker__remove:focus-visible):where(:not(.print-page *)) { background: #282e36; color: #c2d7ed; }
.theme-dark :is(.recipient-picker__option):where(:not(.print-page *)) { background: #1d1d1d; color: var(--color-text, #dfdddd); }
.theme-dark :is(.recipient-picker__option[aria-selected="true"]):where(:not(.print-page *)) { background: #1e242c; color: #c2d7ed; }
.theme-dark :is(.message-replies__no):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.message-replies__quote):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.message-replies__quote:hover, .message-replies__quote:focus-visible):where(:not(.print-page *)) { background: #1e2229; }
.theme-dark :is(.payment-calendar__item):where(:not(.print-page *)) { background: #232723; }
.theme-dark :is(.payment-calendar__item:hover):where(:not(.print-page *)) { background: #293029; }
.theme-dark :is(.payment-calendar__item--cybozu, .payment-calendar__item--cybozu:hover):where(:not(.print-page *)) { background: #292925; }
.theme-dark :is(button.payment-calendar__item--manual):where(:not(.print-page *)) { background: #25241d; }
.theme-dark :is(button.payment-calendar__item--manual:hover):where(:not(.print-page *)) { background: #2c2b25; }
.theme-dark :is(.payment-calendar__count):where(:not(.print-page *)) { background: #2c322c; }
.theme-dark :is(.payment-calendar__sub):where(:not(.print-page *)) { border-left: 2px solid #434b43; }
.theme-dark :is(.payment-calendar__sub:hover):where(:not(.print-page *)) { background: #232723; }
.theme-dark :is(.file-tree__link:hover):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.file-tree__link.is-current):where(:not(.print-page *)) { background: #22272d; }
.theme-dark :is(.folder-list__item:hover):where(:not(.print-page *)) { background: #1f2228; }
.theme-dark :is(.mail-body):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.mail-html):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.mail-compose__grid input, .mail-compose__grid select):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.mail-compose__signature textarea):where(:not(.print-page *)) { background: #1f2023; }
.theme-dark :is(.mail-folders__item:hover):where(:not(.print-page *)) { background: var(--color-bg-subtle, #282725); }
.theme-dark :is(.mail-folders__item.is-active .tabs__count):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.mail-body a, .mail-head a.mail-address-link, a.mail-address-link):where(:not(.print-page *)) { color: #9bbbe2; }
.theme-dark :is(.home__notice):where(:not(.print-page *)) { background: #332c21; border: 1px solid #574a37; }
.theme-dark :is(.home__notice:hover):where(:not(.print-page *)) { background: #3b3326; }
.theme-dark :is(.home__notice-icon):where(:not(.print-page *)) { background: #1d1d1d; color: #e7cfae; }
.theme-dark :is(.home__notice-text strong):where(:not(.print-page *)) { color: #e9d2b3; }
.theme-dark :is(.notices__alert):where(:not(.print-page *)) { background: #2b1d1c; border: 1px solid #533a37; color: #e4a6a1; }
.theme-dark :is(.notices__alert--info):where(:not(.print-page *)) { background: #232b25; border-color: #414d45; color: #b4e9c8; }
.theme-dark :is(.home__notice--error):where(:not(.print-page *)) { background: #2b1d1c; border-color: #533a37; }
.theme-dark :is(.home__notice--error:hover):where(:not(.print-page *)) { background: #30201f; }
.theme-dark :is(.home__notice--error .home__notice-text strong):where(:not(.print-page *)) { color: #e3a6a0; }
.theme-dark :is(.home__more > summary):where(:not(.print-page *)) { border: 1px dashed #5d503b; background: #2b251c; color: #e9d2b3; }
.theme-dark :is(.home-day__btn):where(:not(.print-page *)) { background: #1d1d1d; color: var(--frame, #a2c0e1); }
.theme-dark :is(.home-list li > a:hover):where(:not(.print-page *)) { background: #262622; }
.theme-dark :is(.home-list__tag):where(:not(.print-page *)) { background: #20252c; color: #a3bbe4; }
.theme-dark :is(.home-list__tag--warn):where(:not(.print-page *)) { background: #2b1b1b; }
.theme-dark :is(.mf-bookmarklet):where(:not(.print-page *)) { border: 1px dashed #40454f; background: #1c1f26; }
@media (max-width: 860px) { .theme-dark :is(.tab-bar__item):where(:not(.print-page *)) { color: #c5c9c6; } }
@media (max-width: 860px) { .theme-dark :is(.tab-bar__item.is-active):where(:not(.print-page *)) { color: #b8d6e8; } }
@media (max-width: 860px) { .theme-dark :is(.tab-bar__badge):where(:not(.print-page *)) { border: 1px solid #47443b; } }
@media (max-width: 860px) { .theme-dark :is(.tab-bar__dot):where(:not(.print-page *)) { border: 2px solid #47443b; } }
@media (max-width: 760px) { .theme-dark :is(.m-chip--warn):where(:not(.print-page *)) { color: #e29e9a; } }
@media (max-width: 760px) { .theme-dark :is(.mail-page .mail-list tbody tr):where(:not(.print-page *)) { background: #1d1d1d; } }
@media (max-width: 760px) { .theme-dark :is(.mail-page .mail-list tbody td.mail-list__subject-cell):where(:not(.print-page *)) { color: var(--color-text-muted, #b8bbc4); } }
@media (max-width: 760px) { .theme-dark :is(.mail-page .mail-list tbody tr:has(input:checked)):where(:not(.print-page *)) { background: #1d222a; } }
@media (max-width: 760px) { .theme-dark :is(.is-swiped):nth-child(n) > td:not(.mail-swipe__actions)):where(:not(.print-page *)) { background: var(--mail-row-bg, #1d1d1d); } }
@media (max-width: 760px) { .theme-dark :is(.m-list):where(:not(.print-page *)) { background: #1d1d1d; } }
@media (max-width: 760px) { .theme-dark :is(.m-list li + li):where(:not(.print-page *)) { border-top: 1px solid #3e3e43; } }
@media (max-width: 760px) { .theme-dark :is(.m-list__warn):where(:not(.print-page *)) { color: #e29e9a; } }
@media (max-width: 760px) { .theme-dark :is(.m-error):where(:not(.print-page *)) { background: #2b1d1c; color: #e29e9a; } }
.theme-dark :is(.app-shell .sidebar .font-scale__option.is-active):where(:not(.print-page *)) { background: #1d1d1d; border-color: #3d3d3d; }
.theme-dark :is(.srs__table th):where(:not(.print-page *)) { background: #312e1f; }
.theme-dark :is(.srs__table tr.srs__all td):where(:not(.print-page *)) { background: #242421; }
.theme-dark :is(.srs__items td.srs__group):where(:not(.print-page *)) { background: #312e1f; }
.theme-dark :is(.srs__items tr.srs__group-start > *):where(:not(.print-page *)) { border-top: 2px solid #524e3d; }
.theme-dark :is(.srs__items td.num:last-child, .srs__items th.srs__all-col):where(:not(.print-page *)) { background: #242421; }
.theme-dark :is(.workflow-overtime-detail__sum td):where(:not(.print-page *)) { background: #242421; }
.theme-dark :is(.wfa th):where(:not(.print-page *)) { background: #323232; }
.theme-dark :is(.wfa-sum th):where(:not(.print-page *)) { background: #323232; }
.theme-dark :is(.datalist-picker__toggle):where(:not(.print-page *)) { background: #272623; color: #c7c7c7; }
.theme-dark :is(.datalist-picker__toggle:hover, .datalist-picker.is-open .datalist-picker__toggle):where(:not(.print-page *)) { background: #302f2a; }
.theme-dark :is(.datalist-picker__menu):where(:not(.print-page *)) { background: #1d1d1d; border: 1px solid var(--color-border, #444444); }
.theme-dark :is(.datalist-picker__menu li:hover):where(:not(.print-page *)) { background: #1e2127; }
.theme-dark :is(.datalist-picker__menu li.is-current):where(:not(.print-page *)) { background: #1d212a; }
.theme-dark :is(.datalist-picker__menu li.is-active):where(:not(.print-page *)) { background: #22272f; }
.theme-dark :is(.dm-label):where(:not(.print-page *)) { color: #ededed; }
.theme-dark :is(.dm-label__note):where(:not(.print-page *)) { color: #d6d6d6; }
@media screen { .theme-dark :is(.dm-label):where(:not(.print-page *)) { outline: 0.2mm dashed #494744; } }
@media screen { .theme-dark :is(.dm-label.is-blank):where(:not(.print-page *)) { background: repeating-linear-gradient(45deg, #24231e, #24231e 2mm, #2a2925 2mm, #2a2925 4mm); } }
.theme-dark :is(.report-text):where(:not(.print-page *)) { background: #24231e; }
.theme-dark :is(.report-kind--transport):where(:not(.print-page *)) { background: #2f1f1e; color: #e4a7a1; }
.theme-dark :is(.report-kind--meeting):where(:not(.print-page *)) { background: #20252d; color: #a8c0e4; }
.theme-dark :is(.report-kind--other):where(:not(.print-page *)) { background: #2c2b28; color: #cdcbc6; }
.theme-dark :is(.report-filters__item.is-active):where(:not(.print-page *)) { background: #2c2b28; }
.theme-dark :is(.report-list__link:hover):where(:not(.print-page *)) { background: #24231e; }
.theme-dark :is(.report-list__item.is-confirmed .report-list__state):where(:not(.print-page *)) { color: #b6dfbe; }
.theme-dark :is(.mort-now__item):where(:not(.print-page *)) { background: #2e2b23; }
.theme-dark :is(.mort-table thead th):where(:not(.print-page *)) { background: #272623; }
.theme-dark :is(.mort-table thead th.is-today):where(:not(.print-page *)) { background: #353122; }
.theme-dark :is(.mort-table thead th.is-holiday):where(:not(.print-page *)) { color: #e4a7a1; }
.theme-dark :is(.mort-table__room):where(:not(.print-page *)) { background: #24231e; }
.theme-dark :is(.mort-track__day):where(:not(.print-page *)) { border-right: 1px dashed #474540; }
.theme-dark :is(.mort-track__day.is-today):where(:not(.print-page *)) { background: #2b281b; }
.theme-dark :is(a.mort-track__day:hover):where(:not(.print-page *)) { background: #1d222a; }
.theme-dark :is(.mort-bar--open):where(:not(.print-page *)) { border-right: 2px dashed #3d3d3d; }
@media (max-width: 700px) { .theme-dark :is(.mort-days__date.is-today):where(:not(.print-page *)) { color: #e7d5ad; } }
.theme-dark :is(.mail-suggest li.is-active, .mail-suggest li:hover):where(:not(.print-page *)) { background: #1d222a; }
.theme-dark :is(.invoice-group-row > td):where(:not(.print-page *)) { background: #1d2025; color: #bcd3eb; }
.theme-dark :is(.invoice-actions__count):where(:not(.print-page *)) { color: #bcd3eb; }
.theme-dark :is(.invoice-actions.is-floating):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.supplier-office-totals__item):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.supplier-office-totals__item.is-current):where(:not(.print-page *)) { background: #21252b; }
.theme-dark :is(.supplier-office-totals__name):where(:not(.print-page *)) { color: #bcd3eb; }
.theme-dark :is(.supplier-slip-excel tr.is-this-slip td):where(:not(.print-page *)) { background: #383324; }
.theme-dark :is(.supplier-slip-excel__title):where(:not(.print-page *)) { color: #bcd3eb; }
.theme-dark :is(.receipt-history > summary:hover):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.memo-b__row.is-active):where(:not(.print-page *)) { background: #222428; }
@media (hover: hover) { .theme-dark :is(.memo-b__row:hover):where(:not(.print-page *)) { background: #1f2125; } }
@media (hover: hover) { .theme-dark :is(.memo-b__row.is-active:hover):where(:not(.print-page *)) { background: #222428; } }
@media (hover: hover) { .theme-dark :is(.memo-b__tool:hover):where(:not(.print-page *)) { background: #222428; } }
.theme-dark :is(.duplicate-weak > summary):where(:not(.print-page *)) { color: var(--color-text-muted, #bfbfbf); }
.theme-dark :is(tr.is-current > td):where(:not(.print-page *)) { background: var(--color-primary-soft, #1f2328); }
.theme-dark :is(.wf-icon--blue):where(:not(.print-page *)) { background: #1c232c; }
.theme-dark :is(.wf-icon--green):where(:not(.print-page *)) { background: #222b24; color: #aee0c0; }
.theme-dark :is(.wf-icon--sky):where(:not(.print-page *)) { background: #1d282d; color: #9acae2; }
.theme-dark :is(.wf-icon--amber):where(:not(.print-page *)) { background: #2f291e; color: #e3c79e; }
.theme-dark :is(.wf-icon--purple):where(:not(.print-page *)) { background: #231e2b; }
.theme-dark :is(.wf-icon--teal):where(:not(.print-page *)) { background: #232d2c; color: #ade7e1; }
.theme-dark :is(.wf-icon--orange):where(:not(.print-page *)) { background: #2e241d; }
.theme-dark :is(.wf-icon--rose):where(:not(.print-page *)) { background: #2b1d20; }
.theme-dark :is(.wf-icon--red):where(:not(.print-page *)) { background: #2c1d1d; }
.theme-dark :is(.wf-icon--indigo):where(:not(.print-page *)) { background: #1d1f2b; }
.theme-dark :is(.wf-icon--gray):where(:not(.print-page *)) { background: #282725; color: #bec1c5; }
.theme-dark :is(.wf-stamp-table th, .wf-stamp-table td):where(:not(.print-page *)) { border: 1px solid #494743; }
.theme-dark :is(.wf-stamp-table th):where(:not(.print-page *)) { background: #272621; }
.theme-dark :is(.wf-stamp--rejected):where(:not(.print-page *)) { color: #bec1c5; }
.theme-dark :is(.wf-stamp--waiting):where(:not(.print-page *)) { color: #e4c6a0; background: #29241a; }
.theme-dark :is(.wf-stamp--returned):where(:not(.print-page *)) { color: #e4c6a0; }
.theme-dark :is(.wf-stamp--future, .wf-stamp--void):where(:not(.print-page *)) { border: 1.5px dashed #4b4946; }
.theme-dark :is(.wf-fields__grid):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.wf-field):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.wf-field__label):where(:not(.print-page *)) { background: #222428; color: #cbced3; }
.theme-dark :is(.wf-field--section):where(:not(.print-page *)) { background: #272621; }
.theme-dark :is(.wf-field--sum .wf-field__label):where(:not(.print-page *)) { background: #202730; }
.theme-dark :is(.wf-route__num):where(:not(.print-page *)) { background: #2b2927; color: #c0bfbd; }
.theme-dark :is(.wf-route__comment):where(:not(.print-page *)) { background: #272621; }
.theme-dark :is(.wf-pill):where(:not(.print-page *)) { background: #2b2927; color: #c0bfbd; }
.theme-dark :is(.wf-pill--done):where(:not(.print-page *)) { background: #232d26; color: #aee0c0; }
.theme-dark :is(.wf-pill--waiting, .wf-pill--returned):where(:not(.print-page *)) { background: #30291f; color: #e4c7a4; }
.theme-dark :is(.wf-pill--rejected):where(:not(.print-page *)) { background: #2e1e1e; }
.theme-dark :is(.wf-history__item--approve .wf-history__label, .wf-history__item--confirm .wf-history__label):where(:not(.print-page *)) { color: #aee0c0; }
.theme-dark :is(.wf-history__comment):where(:not(.print-page *)) { color: #cbced3; }
.theme-dark :is(.wf-actbar):where(:not(.print-page *)) { border: 1px solid #594d39; }
.theme-dark :is(.wf-chip):where(:not(.print-page *)) { background: #1d1d1d; color: #cbced3; }
.theme-dark :is(.wf-chip span):where(:not(.print-page *)) { background: #292825; }
.theme-dark :is(.wf-list tr[data-href]:hover td):where(:not(.print-page *)) { background: #24231e; }
.theme-dark :is(.wf-list__title):where(:not(.print-page *)) { color: #d5d8de; }
.theme-dark :is(.wf-list__meta):where(:not(.print-page *)) { color: #d3d1cd; }
@media (max-width: 700px) { .theme-dark :is(.wf-list__figure):where(:not(.print-page *)) { color: #c5c8cd; } }
.theme-dark :is(.wf-form-card):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.wf-form-card__desc):where(:not(.print-page *)) { color: #c0c3c8; }
.theme-dark :is(.pl-tile):where(:not(.print-page *)) { background: #272621; }
.theme-dark :is(.pl-left__after):where(:not(.print-page *)) { color: #9acae2 !important; }
.theme-dark :is(.pl-note--warn, .pl-warn):where(:not(.print-page *)) { color: #e4c6a0; }
.theme-dark :is(.pl-ok):where(:not(.print-page *)) { color: #aee0c0; }
.theme-dark :is(.pl-alert):where(:not(.print-page *)) { background: #2f291e; border: 1px solid #594d39; }
.theme-dark :is(.wf-chip--leave):where(:not(.print-page *)) { border-color: #3e4e56; color: #9acae2; }
.theme-dark :is(.pl-not-taken):where(:not(.print-page *)) { border: 1px dashed #494743; background: #24221d; }
.theme-dark :is(tr.is-prefilled > td):where(:not(.print-page *)) { background: #202722; }
@media (max-width: 860px) { .theme-dark :is(.mobile-bar):where(:not(.print-page *)) { color: #d2d7df; } }
@media (max-width: 860px) { .theme-dark :is(.mobile-bar__menu):where(:not(.print-page *)) { color: #d2d7df; } }
@media (max-width: 860px) { .theme-dark :is(.mobile-bar__dot):where(:not(.print-page *)) { border: 2px solid #3d3d3d; } }
@media (max-width: 860px) { .theme-dark :is(.mobile-bar__title):where(:not(.print-page *)) { color: #d2d7df; } }
@media (max-width: 860px) { .theme-dark :is(.schedule-mo .schedule-month td:active):where(:not(.print-page *)) { background: #1d222a; } }
@media (max-width: 860px) { .theme-dark :is(.day-sheet__grip):where(:not(.print-page *)) { background: #313234; } }
@media (max-width: 860px) { .theme-dark :is(.day-sheet__item):where(:not(.print-page *)) { border-left: 5px solid #40454f; background: #1c1e25; } }
@media (max-width: 860px) { .theme-dark :is(.day-sheet__item--funeral):where(:not(.print-page *)) { background: #2c271c; } }
@media (max-width: 860px) { .theme-dark :is(.day-sheet__item--kind-0):where(:not(.print-page *)) { background: #1d262d; } }
@media (max-width: 860px) { .theme-dark :is(.day-sheet__item.is-provisional):where(:not(.print-page *)) { background: #272419; } }
.theme-dark :is(.schedule-item--toggle[open]):where(:not(.print-page *)) { background: #383024; }
.theme-dark :is(.schedule-item--kind-0.schedule-item--toggle[open]):where(:not(.print-page *)) { background: #212c34; }
.theme-dark :is(.schedule-item__more):where(:not(.print-page *)) { border-top: 1px dashed #594f3e; }
@media (max-width: 860px) { .theme-dark :is(.mbar-btn):where(:not(.print-page *)) { color: #d2d7df; } }
@media (max-width: 860px) { .theme-dark :is(.mbar-pop__item):where(:not(.print-page *)) { color: #d2d7df; } }
.theme-dark :is(.master-nav):where(:not(.print-page *)) { border: 1px solid var(--color-border, #464441); background: #1b1e23; }
.theme-dark :is(.master-nav__item):where(:not(.print-page *)) { color: var(--color-text, #dadada); }
.theme-dark :is(.master-nav__item:hover):where(:not(.print-page *)) { background: #1f2328; }
.theme-dark :is(.mail-state-badge--open):where(:not(.print-page *)) { background: #2e1e1d; color: #e4a7a1; border-color: #563a37; }
.theme-dark :is(.mail-state-badge--claimed):where(:not(.print-page *)) { background: #353022; color: #ebdcb9; border-color: #5b523a; }
.theme-dark :is(.mail-state-badge--composing):where(:not(.print-page *)) { background: #1c222c; color: #a2bbe4; border-color: #364154; }
.theme-dark :is(.mail-state-badge--replied):where(:not(.print-page *)) { background: #232d26; color: #b3e9c3; border-color: #3f5044; }
.theme-dark :is(.mail-state-badge--done):where(:not(.print-page *)) { background: #232527; color: #bec2c9; border-color: #424447; }
.theme-dark :is(.mail-state):where(:not(.print-page *)) { background: #1d2025; }
.theme-dark :is(.mail-state--open):where(:not(.print-page *)) { background: #271b19; border-color: #533a37; }
@media (max-width: 600px) { .theme-dark :is(.roles-table tr):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); } }
.theme-dark :is(.order-buttons__btn):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); color: var(--color-text, #dfdddd); }
.theme-dark :is(.order-buttons__btn:hover:not(:disabled)):where(:not(.print-page *)) { background: #20242b; }
.theme-dark :is(.offering-table thead th):where(:not(.print-page *)) { background: #212225; }
.theme-dark :is(.offering-table__no):where(:not(.print-page *)) { color: #c7c7c7; }
.theme-dark :is(.offering-table tfoot th):where(:not(.print-page *)) { background: #1f2023; }
.theme-dark :is(.offering-table__extra td):where(:not(.print-page *)) { background: #27261d; }
.theme-dark :is(.offering-table__mark):where(:not(.print-page *)) { color: #e7ddae; }
.theme-dark :is(.offering-table tr.is-dragging td):where(:not(.print-page *)) { background: #1c222c; }
.theme-dark :is(.area__hall-mark):where(:not(.print-page *)) { border: 2px solid #3d3d3d; }
.theme-dark :is(.area-table tbody tr:hover td):where(:not(.print-page *)) { background: #1d2027; }
.theme-dark :is(.area-table tbody tr.is-selected td):where(:not(.print-page *)) { background: #1f252d; }
.theme-dark :is(.area__bar-mini):where(:not(.print-page *)) { background: #27292d; }
.theme-dark :is(.cfi-status):where(:not(.print-page *)) { background: #27292d; color: #b5bed9; }
.theme-dark :is(.cfi-status--matched, .cfi-status--manual, .cfi-status--created):where(:not(.print-page *)) { background: #262f27; color: #b3e9c7; }
.theme-dark :is(.cfi-status--ambiguous):where(:not(.print-page *)) { background: #332c21; color: #e7ccac; }
.theme-dark :is(.cfi-status--none):where(:not(.print-page *)) { background: #2f1e1e; }
.theme-dark :is(.cfi-progress):where(:not(.print-page *)) { background: #27292d; }
.theme-dark :is(.driving-form__leg-head):where(:not(.print-page *)) { background: #212328; }
.theme-dark :is(.driving-step):where(:not(.print-page *)) { background: #1b2027; }
.theme-dark :is(.driving-road__item):where(:not(.print-page *)) { background: #1b2027; }
.theme-dark :is(.schedule-files__photo):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.schedule-files__doc):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.critter__say):where(:not(.print-page *)) { background: #1d1d1d; border: 1px solid #414347; color: #c7ccd6; }
.theme-dark :is(.file-picked__remove):where(:not(.print-page *)) { color: #e2a19c; }
.theme-dark :is(.file-list__eye:hover, .file-list__eye:focus-visible):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.file-preview__body):where(:not(.print-page *)) { background: #1f2125; }
.theme-dark :is(.file-preview__body iframe):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.form-invalid-notice):where(:not(.print-page *)) { border: 1px solid #543f3f; background: #291a1a; color: #e29d9d; }
.theme-dark :is(.wf-reuse-note):where(:not(.print-page *)) { background: #302a1e; }
.theme-dark :is(.order-form-photo):where(:not(.print-page *)) { border: 1px solid var(--color-border, #41454b); background: #1b1e23; }
.theme-dark :is(.order-form-photo__image):where(:not(.print-page *)) { border: 1px solid var(--color-border, #41454b); }
.theme-dark :is(.case-list th + th, .case-list td + td):where(:not(.print-page *)) { border-left: 1px solid #3e4147; }
.theme-dark :is(.case-staff-ask):where(:not(.print-page *)) { background: #2b271c; }
.theme-dark :is(.pl-table td.lbl--group-sales):where(:not(.print-page *)) { background: #2d241d; }
.theme-dark :is(.pl-table td.lbl--group-cost):where(:not(.print-page *)) { background: #212a2e; }
.theme-dark :is(.pl-table__col.is-total):where(:not(.print-page *)) { background: #20252d; }
.theme-dark :is(.pl-table td.lbl--flower):where(:not(.print-page *)) { background: #3a2531; }
.theme-dark :is(.pl-table td.lbl--food):where(:not(.print-page *)) { background: #253639; }
.theme-dark :is(.pl-table td.lbl--gift):where(:not(.print-page *)) { background: #37402a; }
.theme-dark :is(.pl-table td.lbl--other):where(:not(.print-page *)) { background: #383524; }
.theme-dark :is(.pl-row--subtotal td, .pl-row--total td):where(:not(.print-page *)) { background: #2d241d; }
.theme-dark :is(.pl-row--grand td):where(:not(.print-page *)) { background: #1e2229; }
.theme-dark :is(.pl-blank):where(:not(.print-page *)) { background: #323232 !important; }
.theme-dark :is(.pl-input-cell--manual):where(:not(.print-page *)) { background: #383524; }
.theme-dark :is(.pl-input-cell--mf):where(:not(.print-page *)) { background: #20252d; }
.theme-dark :is(.pl-input-cell--uriage, .pl-input-cell--honbu, .pl-input-cell--kaki):where(:not(.print-page *)) { background: #232d25; }
.theme-dark :is(.pl-input-cell--sheet):where(:not(.print-page *)) { background: #221e29; }
.theme-dark :is(.pl-input-table .pl-input-total, .pl-input-table tr.pl-input-total td, .pl-input-table tr.pl-input-total th):where(:not(.print-page *)) { background: #1e2229; }
.theme-dark :is(.pl-adjust-table__head th):where(:not(.print-page *)) { background: var(--band, #222428); }
.theme-dark :is(.pl-adjust-table tr.is-adjusted td):where(:not(.print-page *)) { background: #383524; }
.theme-dark :is(tr.is-changed td):where(:not(.print-page *)) { background: #383524; }
.theme-dark :is(.supplement__table .is-sum):where(:not(.print-page *)) { background: var(--band, #222428); }
.theme-dark :is(.sales-supp td.is-off):where(:not(.print-page *)) { background: #323232; }
.theme-dark :is(.critter-card):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.home-photo__band):where(:not(.print-page *)) { border: 2px solid #3d3d3d; }
.theme-dark :is(.home-scenes__preview-title):where(:not(.print-page *)) { color: var(--color-heading, #b9d0ea); }
.theme-dark :is(.home-scene-pick):where(:not(.print-page *)) { color: #bcd3eb; }
.theme-dark :is(.critter-props__row):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.critter-ball i):where(:not(.print-page *)) { background: #2e3134; }
@media (max-width: 860px) { .theme-dark :is(.mbar-btn.mbar-back):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); } }
@media (max-width: 860px) { .theme-dark :is(.mbar-pop__item--danger):where(:not(.print-page *)) { color: #e29e9a; } }
.theme-dark :is(.supplier-slip-reading):where(:not(.print-page *)) { background: #1d232a; color: #a2c0e1; }
.theme-dark :is(.supplier-slip-errors):where(:not(.print-page *)) { border: 1px solid #4f3b3a; background: #281c1a; }
.theme-dark :is(.supplier-slip-thumb--pdf):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.badge.supplier-slip-badge--read):where(:not(.print-page *)) { background: #232c26; color: #ade0c2; }
.theme-dark :is(.badge.supplier-slip-badge--check):where(:not(.print-page *)) { background: #312b1f; color: #e8d4af; }
.theme-dark :is(.badge.supplier-slip-badge--duplicate):where(:not(.print-page *)) { background: #232527; color: #c9c7c3; }
.theme-dark :is(.badge.supplier-slip-badge--ignored):where(:not(.print-page *)) { background: #232527; }
.theme-dark :is(tr.supplier-slip-row--check td):where(:not(.print-page *)) { background: #29241a; }
.theme-dark :is(.cc-flag-chip--yes):where(:not(.print-page *)) { background: #232c25; border-color: #445348; color: #bce9c8; }
.theme-dark :is(.cc-flag-chip--no):where(:not(.print-page *)) { background: #2c1d1d; border-color: #553d3d; color: #e5a7a7; }
.theme-dark :is(.duty-cal th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.duty-cal th.is-sat):where(:not(.print-page *)) { color: #a0b8e3; }
.theme-dark :is(.duty-cal__out):where(:not(.print-page *)) { background: #222325; }
.theme-dark :is(.duty-cal__date.is-sat):where(:not(.print-page *)) { color: #a0b8e3; }
.theme-dark :is(.duty-cal__no):where(:not(.print-page *)) { background: #1f2731; color: #bcd3eb; }
.theme-dark :is(.duty-cal__duty + .duty-cal__duty .duty-cal__no):where(:not(.print-page *)) { background: #363122; color: #ece0be; }
.theme-dark :is(.duty-stamp__person):where(:not(.print-page *)) { background: #1d1d1d; color: #dfdddd; }
.theme-dark :is(.duty-stamp__person.is-active):where(:not(.print-page *)) { background: #413d2a; }
@media (hover: hover) { .theme-dark :is(.duty-cal__slot:hover):where(:not(.print-page *)) { background: #1d2025; } }
.theme-dark :is(.duty-cal__slot.is-picked):where(:not(.print-page *)) { background: #413d2a; }
.theme-dark :is(.duty-cal__day.is-dup):where(:not(.print-page *)) { background: #2f201e; }
.theme-dark :is(.duty-table--edit thead th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.duty-counts thead th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.holiday-history__save):where(:not(.print-page *)) { background: #1d1d1d; }
@media screen and (max-width: 860px) { .theme-dark :is(.duty-cal__duty):where(:not(.print-page *)) { background: #1f2731; color: #bcd3eb; } }
@media screen and (max-width: 860px) { .theme-dark :is(.duty-cal__duty + .duty-cal__duty):where(:not(.print-page *)) { background: #363122; color: #ece0be; } }
.theme-dark :is(.shift-table):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.shift-table thead th, .shift-table tfoot th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.shift-table .is-sat):where(:not(.print-page *)) { color: #a0b8e3; }
.theme-dark :is(.shift-table__note-tomobiki):where(:not(.print-page *)) { color: #b7dfbe; }
.theme-dark :is(.shift-table__off.is-off, .shift-legend__chip.is-off, .shift-palette__kind.is-off):where(:not(.print-page *)) { background: #2e1d1d; color: #e29e9a; }
.theme-dark :is(.shift-table__off.is-paid, .shift-legend__chip.is-paid, .shift-palette__kind.is-paid):where(:not(.print-page *)) { background: #262f27; color: #b3e9c2; }
.theme-dark :is(.shift-table__off.is-swap, .shift-legend__chip.is-swap, .shift-palette__kind.is-swap):where(:not(.print-page *)) { background: #383224; color: #ebdab9; }
.theme-dark :is(.shift-table__off.is-half, .shift-legend__chip.is-half, .shift-palette__kind.is-half):where(:not(.print-page *)) { background: linear-gradient(135deg, #1f2731 50%, #1d1d1d 50%); color: #a0b8e3; }
.theme-dark :is(.shift-table__duty.is-conflict):where(:not(.print-page *)) { background: #2f201e; color: #e29e9a; }
.theme-dark :is(.shift-table__slash):where(:not(.print-page *)) { background: linear-gradient(to top right, transparent calc(50% - 0.6px), #9aa4b2 50%, transparent calc(50% + 0.6px)), #222325; }
.theme-dark :is(.shift-table__slash span):where(:not(.print-page *)) { background: #222325; }
.theme-dark :is(.shift-table__blank):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.shift-table__duty.is-picked):where(:not(.print-page *)) { background: #413d2a; }
.theme-dark :is(.shift-table--edit .shift-table__event input):where(:not(.print-page *)) { background: #191d24; }
.theme-dark :is(.shift-table--edit .shift-table__event input:focus):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.shift-palette):where(:not(.print-page *)) { background: #1d2025; }
.theme-dark :is(.shift-palette__kind span):where(:not(.print-page *)) { color: #dfdddd; }
.theme-dark :is(.shift-wish-banner):where(:not(.print-page *)) { background: #302c1e; }
.theme-dark :is(.shift-wish__deadline.is-closed):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.shift-wish__left):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.shift-wish__left.is-done):where(:not(.print-page *)) { background: #262f27; color: #b3e9c2; }
.theme-dark :is(.shift-table tfoot td.is-mismatch):where(:not(.print-page *)) { background: #383224; color: #ebdab9; }
.theme-dark :is(.shift-palette__must):where(:not(.print-page *)) { background: #1d1d1d; color: #e5d5a5; }
.theme-dark :is(.shift-wish__day.is-must):where(:not(.print-page *)) { background: #2b281b; }
.theme-dark :is(.shift-legend__must):where(:not(.print-page *)) { color: #e5d5a5; }
.theme-dark :is(.shift-table tr.is-all-hands > td.shift-table__day, .shift-table tr.is-all-hands > td.shift-table__event):where(:not(.print-page *)) { background: #1e252e; }
.theme-dark :is(.shift-table__all):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.shift-wish__day.is-all-hands):where(:not(.print-page *)) { background: #1e252e; }
.theme-dark :is(.shift-wish__mark.is-off):where(:not(.print-page *)) { background: #2e1d1d; color: #e29e9a; }
.theme-dark :is(.shift-wish__mark.is-paid):where(:not(.print-page *)) { background: #262f27; color: #b3e9c2; }
.theme-dark :is(.shift-wish__mark.is-swap):where(:not(.print-page *)) { background: #383224; color: #ebdab9; }
.theme-dark :is(.shift-wish__mark.is-half):where(:not(.print-page *)) { background: linear-gradient(135deg, #1f2731 50%, #1d1d1d 50%); color: #a0b8e3; }
@media (hover: hover) { .theme-dark :is(.shift-wish__cell:not(:disabled):hover):where(:not(.print-page *)) { background: #1d2025; } }
@media screen and (max-width: 860px) { .theme-dark :is(.shift-table td.shift-table__day, .shift-table tfoot th):where(:not(.print-page *)) { background: #1d1d1d; } }
@media screen and (max-width: 860px) { .theme-dark :is(.shift-table tfoot th):where(:not(.print-page *)) { background: #222428; } }
.theme-dark :is(.cc-duties):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.cc-legend__more):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.cc-week__more):where(:not(.print-page *)) { border-top: 1px dashed #41454b; }
@media screen and (max-width: 860px) { .theme-dark :is(.cc-week-list__day):where(:not(.print-page *)) { background: #1d1d1d; } }
@media screen and (max-width: 860px) { .theme-dark :is(.cc-week-list__day.is-sat .schedule-day__date):where(:not(.print-page *)) { color: #a0b8e3; } }
.theme-dark :is(.cc-table__note):where(:not(.print-page *)) { color: #ebd7b9; }
.theme-dark :is(.badge.supplier-match--ok):where(:not(.print-page *)) { background: #232c26; color: #ade0c2; }
.theme-dark :is(.badge.supplier-match--diff):where(:not(.print-page *)) { background: #312b1f; color: #e8d4af; }
.theme-dark :is(.badge.supplier-match--no_invoice):where(:not(.print-page *)) { background: #20262d; color: #a2c0e1; }
.theme-dark :is(.badge.supplier-match--no_slip):where(:not(.print-page *)) { background: #2b1e1d; }
.theme-dark :is(tr.supplier-match-row--diff td):where(:not(.print-page *)) { background: #29241a; }
.theme-dark :is(tr.supplier-match-row--no_invoice td):where(:not(.print-page *)) { background: #1a1f27; }
.theme-dark :is(tr.supplier-match-row--no_slip td):where(:not(.print-page *)) { background: #271a19; }
.theme-dark :is(.supplier-match-card--ok .supplier-match-card__count):where(:not(.print-page *)) { color: #ade0c2; }
.theme-dark :is(.supplier-match-card--diff .supplier-match-card__count):where(:not(.print-page *)) { color: #e8d4af; }
.theme-dark :is(.supplier-match-card--no_invoice .supplier-match-card__count):where(:not(.print-page *)) { color: #a2c0e1; }
.theme-dark :is(.supplier-match-ok):where(:not(.print-page *)) { color: #ade0c2; }
.theme-dark :is(.office-preview__doc):where(:not(.print-page *)) { background: #1d1d1d; color: #dfdddd; }
.theme-dark :is(.office-preview__table):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.manual-reader__page):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.yotei-page):where(:not(.print-page *)) { background: #1d1d1d; color: #e6e6e6; }
.theme-dark :is(.yotei-title):where(:not(.print-page *)) { color: #e6e6e6; }
.theme-dark :is(.yotei-band):where(:not(.print-page *)) { background: linear-gradient(180deg, #27282b, #313336); }
.theme-dark :is(.yotei-preview):where(:not(.print-page *)) { background: #25272a; }
.theme-dark :is(.fuho-title):where(:not(.print-page *)) { color: #e6e6e6; }
.theme-dark :is(.yotei-edit__band):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.cover-sheet):where(:not(.print-page *)) { color: #dfdddd; }
.theme-dark :is(.cs-code):where(:not(.print-page *)) { color: #c9c7c3; }
.theme-dark :is(.cs-table tr.is-undecided td):where(:not(.print-page *)) { color: #e5afa5; }
.theme-dark :is(.cs-note):where(:not(.print-page *)) { color: #c9c7c3; }
@media screen { .theme-dark :is(.cover-sheet):where(:not(.print-page *)) { border: 1px solid #444444; background: #1d1d1d; } }
.theme-dark :is(.acct-sum):where(:not(.print-page *)) { color: #dfdddd; }
.theme-dark :is(.acct-sum__date):where(:not(.print-page *)) { color: #c9c7c3; }
.theme-dark :is(.acct-sum__table thead th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.acct-sum__table th.acct-sum__supplier):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.acct-sum__table thead th.acct-sum__supplier):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.acct-sum__code):where(:not(.print-page *)) { color: #c9c7c3; }
.theme-dark :is(.acct-sum__count):where(:not(.print-page *)) { color: #c9c7c3; }
.theme-dark :is(.acct-sum__supplier-total td):where(:not(.print-page *)) { background: #1f2123; }
.theme-dark :is(.acct-sum__totals-head th):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.acct-sum__grand td):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.acct-sum__table tr.is-undecided td):where(:not(.print-page *)) { color: #e5afa5; }
.theme-dark :is(.acct-sum__note):where(:not(.print-page *)) { color: #c9c7c3; }
@media screen { .theme-dark :is(.acct-sum):where(:not(.print-page *)) { background: #1d1d1d; border: 1px solid #444444; } }
.theme-dark :is(.acct-items__warn):where(:not(.print-page *)) { color: #e5afa5; }
.theme-dark :is(.acct-items__table tr.is-undecided td):where(:not(.print-page *)) { color: #e5afa5; }
.theme-dark :is(.twin-box__same--ok):where(:not(.print-page *)) { color: #aee7c1; }
.theme-dark :is(.twin-box__same--warn):where(:not(.print-page *)) { color: #e2a19c; }
.theme-dark :is(.sort-link.is-active):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.bank-choice__warn):where(:not(.print-page *)) { background: #302c1e; color: #ece0be; }
.theme-dark :is(.bank-choice-note):where(:not(.print-page *)) { background: #302c1e; color: #ece0be; }
.theme-dark :is(.bank-choice__label):where(:not(.print-page *)) { color: var(--color-text, #dfdddd); }
.theme-dark :is(.qe-minus):where(:not(.print-page *)) { color: #e2a19c; }
.theme-dark :is(.qe-preview):where(:not(.print-page *)) { background: #25272a; }
.theme-dark :is(.fav-picker__slot):where(:not(.print-page *)) { border: 1.5px dashed #44484e; background: #1d2025; }
.theme-dark :is(.fav-picker__slot.is-full):where(:not(.print-page *)) { background: #1e2229; }
.theme-dark :is(.fav-picker__head[aria-expanded="true"]):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.fav-picker__item):where(:not(.print-page *)) { border-bottom: 1px solid #3c4147; }
.theme-dark :is(.fav-picker__item.is-on):where(:not(.print-page *)) { background: #2b281b; }
.theme-dark :is(.fav-picker__msg):where(:not(.print-page *)) { background: #322d20; }
.theme-dark :is(.pt-deploy):where(:not(.print-page *)) { color: #ebd7b9; background: #3c3526; }
.theme-dark :is(.pt-strained):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.driving-paper__row.is-error td):where(:not(.print-page *)) { background: #2b1d1c; }
.theme-dark :is(.driving-paper__msg td):where(:not(.print-page *)) { color: #e29e9a; background: #2b1d1c; }
.theme-dark :is(.web-report__notice):where(:not(.print-page *)) { background: #322d20; }
.theme-dark :is(.web-report__alert):where(:not(.print-page *)) { background: #2b1d1c; color: #e29e9a; }
.theme-dark :is(.web-report__learn):where(:not(.print-page *)) { background: #322d20; color: #ebd7b9; }
.theme-dark :is(.web-cmp.is-good):where(:not(.print-page *)) { color: #ade7be; }
.theme-dark :is(.web-cmp.is-bad):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.web-budget):where(:not(.print-page *)) { background: #25282b; }
@media (max-width: 860px) { .theme-dark :is(.web-q tbody tr:nth-child(even)):where(:not(.print-page *)) { background: var(--band, #222428); } }
@media (max-width: 860px) { .theme-dark :is(.web-q tbody tr:nth-child(even) .web-rank):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); } }
.theme-dark :is(.web-share__bar):where(:not(.print-page *)) { background: #25282b; }
.theme-dark :is(.web-ai__error):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.web-pill.is-good):where(:not(.print-page *)) { background: #232c25; color: #ade7be; }
.theme-dark :is(.web-pill.is-normal):where(:not(.print-page *)) { background: #222428; color: #c6ccd4; }
.theme-dark :is(.web-pill.is-caution):where(:not(.print-page *)) { background: #312b1f; color: #e7d2ae; }
.theme-dark :is(.web-prio.is-high):where(:not(.print-page *)) { background: #2b1d1c; color: #e29e9a; }
.theme-dark :is(.web-prio.is-mid):where(:not(.print-page *)) { background: #312b1f; color: #e7d2ae; }
.theme-dark :is(.voice-filter a.is-on):where(:not(.print-page *)) { color: var(--color-text, #dfdddd); }
.theme-dark :is(.voice-card):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.voice-card__scale):where(:not(.print-page *)) { color: #bcd3eb; background: #222428; }
.theme-dark :is(.voice-article > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.voice-article__preview):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.voice-article__tags span):where(:not(.print-page *)) { color: #bcd3eb; }
.theme-dark :is(.badge--done):where(:not(.print-page *)) { background: #20252c; color: #aac6e6; }
.theme-dark :is(.column-topics label:has(input:checked)):where(:not(.print-page *)) { background: #1d2127; }
.theme-dark :is(.column-writing):where(:not(.print-page *)) { background: #1d2127; }
.theme-dark :is(.column-preview):where(:not(.print-page *)) { background: #1d1d1d; color: #dedede; }
.theme-dark :is(.saijo-table tr.is-weekend .saijo-date):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.saijo-cell.is-open):where(:not(.print-page *)) { color: #a1c3e4; }
.theme-dark :is(.saijo-cell.is-outside):where(:not(.print-page *)) { background: #323020 !important; }
.theme-dark :is(.saijo-cell.is-off):where(:not(.print-page *)) { color: #e5cca6; }
.theme-dark :is(.saijo-cal th.is-sun, .saijo-cal__date.is-sun):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.saijo-cal th.is-sat, .saijo-cal__date.is-sat):where(:not(.print-page *)) { color: #a1c3e4; }
.theme-dark :is(.saijo-cal__day):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.saijo-cal__day.is-level1):where(:not(.print-page *)) { background: #1d232a; }
.theme-dark :is(.saijo-cal__day.is-level2):where(:not(.print-page *)) { background: #232b33; }
.theme-dark :is(.saijo-cal__day.is-level3):where(:not(.print-page *)) { background: #2d3741; }
.theme-dark :is(.saijo-cal__day.is-closed):where(:not(.print-page *)) { background: #252525; }
.theme-dark :is(.saijo-cal__sub):where(:not(.print-page *)) { color: var(--color-text, #dfdddd); }
.theme-dark :is(.web-ai__group--good):where(:not(.print-page *)) { color: #ade1af; }
.theme-dark :is(.saijo-cal__day.is-upcoming):where(:not(.print-page *)) { background: #191d24; }
.theme-dark :is(.saijo-cal__tag):where(:not(.print-page *)) { color: #e9d6b3; background: #302a1e; }
.theme-dark :is(.saijo-limit):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.saijo-cal__closed):where(:not(.print-page *)) { color: #e5cca6; }
.theme-dark :is(.todo-chip):where(:not(.print-page *)) { background: #222428; color: var(--color-text, #dfdddd); }
.theme-dark :is(.todo-card--white):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.todo-card--yellow):where(:not(.print-page *)) { background: #373323; }
.theme-dark :is(.todo-card--green):where(:not(.print-page *)) { background: #273223; }
.theme-dark :is(.todo-card--blue):where(:not(.print-page *)) { background: #1e2630; }
.theme-dark :is(.todo-card--pink):where(:not(.print-page *)) { background: #2e212c; }
.theme-dark :is(.todo-card--orange):where(:not(.print-page *)) { background: #352c22; }
.theme-dark :is(.todo-card--gray):where(:not(.print-page *)) { background: #282829; }
.theme-dark :is(.todo-check__box):where(:not(.print-page *)) { background: #1d1d1d; }
.theme-dark :is(.todo-due.is-late):where(:not(.print-page *)) { background: #2b1d1c; color: #e4a6a1; }
.theme-dark :is(.todo-due.is-soon):where(:not(.print-page *)) { background: #322b20; color: #e9d6b3; }
.theme-dark :is(.todo-color):where(:not(.print-page *)) { border: 1px solid #41454b; }
.theme-dark :is(.schedule-bar):where(:not(.print-page *)) { background: #232d36; color: #bbd3eb; }
.theme-dark :is(.schedule-bar--colored):where(:not(.print-page *)) { background: color-mix(in srgb, var(--menu-color) 22%, #1d1d1d); color: #dedede; }
.theme-dark :is(.shop-live):where(:not(.print-page *)) { background: #322e20; border: 1px solid #5b533b; color: #ece2be; }
.theme-dark :is(.shop-concept):where(:not(.print-page *)) { background: #202722; }
.theme-dark :is(.shop-tile):where(:not(.print-page *)) { border: 1px solid var(--color-border, #41454b); background: #1d1d1d; }
.theme-dark :is(.shop-tile.is-alert):where(:not(.print-page *)) { border-color: #55403e; background: #291c1b; }
.theme-dark :is(.shop-tile__lab):where(:not(.print-page *)) { color: var(--color-muted, #c9c7c3); }
.theme-dark :is(.shop-bar):where(:not(.print-page *)) { background: #25282b; }
.theme-dark :is(.shop-box__title):where(:not(.print-page *)) { background: var(--band, #222428); }
.theme-dark :is(.shop-todo li):where(:not(.print-page *)) { border-bottom: 1px dashed #404348; }
.theme-dark :is(.shop-todo li.is-overdue .shop-todo__due):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.shop-events li, .shop-changes li):where(:not(.print-page *)) { border-bottom: 1px dashed #404348; }
.theme-dark :is(.shop-tag):where(:not(.print-page *)) { background: #222428; }
.theme-dark :is(.shop-tag--now):where(:not(.print-page *)) { background: #322b20; color: #e9d6b3; }
.theme-dark :is(.shop-tag--done):where(:not(.print-page *)) { background: #232528; }
.theme-dark :is(.shop-quick):where(:not(.print-page *)) { border: 1px solid #41454b; background: #1d1d1d; color: #c9c7c3; }
.theme-dark :is(.shop-table__memo):where(:not(.print-page *)) { color: #cfcdcb; }
.theme-dark :is(.shop-table tr.is-overdue td.shop-table__date):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.shop-table tr.is-now td):where(:not(.print-page *)) { background: #2b281b; }
.theme-dark :is(.shop-table__total td):where(:not(.print-page *)) { border-top: 2px solid #41454b; }
.theme-dark :is(.shop-table__sub td):where(:not(.print-page *)) { color: #c9c7c3; background: #1f2023; }
.theme-dark :is(.shop-table td.is-minus):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.shop-table__note):where(:not(.print-page *)) { color: var(--color-muted, #c9c7c3); }
.theme-dark :is(.shop-list__item):where(:not(.print-page *)) { border: 1px solid #41454b; }
.theme-dark :is(.shop-doc):where(:not(.print-page *)) { border: 1px solid #41454b; background: #1d1d1d; }
.theme-dark :is(.shop-doc__h):where(:not(.print-page *)) { border-bottom: 2px solid #41454b; }
@media (max-width: 860px) { .theme-dark :is(.shop-table--tasks tr):where(:not(.print-page *)) { border-bottom: 1px solid var(--color-border, #41454b); } }
.theme-dark :is(.saijo-big > div):where(:not(.print-page *)) { border: 1px solid var(--color-border, #41454b); background: #1d1d1d; }
.theme-dark :is(.saijo-big__lab):where(:not(.print-page *)) { color: var(--color-muted, #c9c7c3); }
.theme-dark :is(.saijo-big__val):where(:not(.print-page *)) { color: #b6ceea; }
.theme-dark :is(.saijo-big__val--own):where(:not(.print-page *)) { color: #a6e1bd; }
.theme-dark :is(.saijo-big__val--hall):where(:not(.print-page *)) { color: #e9d6b3; }
.theme-dark :is(.shop-agenda li):where(:not(.print-page *)) { border-bottom: 1px dashed #404348; }
.theme-dark :is(.shop-agenda__at):where(:not(.print-page *)) { color: #a2c0e1; }
.theme-dark :is(.shop-agenda--task .shop-agenda__at, .shop-agenda--task):where(:not(.print-page *)) { color: #e9d6b3; }
.theme-dark :is(.shop-agenda--shop_event .shop-agenda__at):where(:not(.print-page *)) { color: #e4a6a1; }
.theme-dark :is(.shop-agenda__who):where(:not(.print-page *)) { color: var(--color-muted, #c9c7c3); }
.theme-dark :is(.shop-agenda__bar):where(:not(.print-page *)) { background: #273223; color: #b9e8c3; }
.theme-dark :is(.shop-agenda__due):where(:not(.print-page *)) { color: #e9d6b3; }
.theme-dark :is(.shop-agenda li.is-late .shop-agenda__due):where(:not(.print-page *)) { color: #e4a6a1; }
.theme-dark :is(.shop-agenda__check):where(:not(.print-page *)) { color: #cfcdcb; }
.theme-dark :is(.shop-changes__more > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.shop-bookmark):where(:not(.print-page *)) { border-left: 6px solid #41454b !important; }
.theme-dark :is(.shop-bookmark--white):where(:not(.print-page *)) { border-left-color: #41454b !important; }
.theme-dark :is(.shop-todo__from):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.shop-week__marks td):where(:not(.print-page *)) { background: #2b281b; }
.theme-dark :is(.shop-mark):where(:not(.print-page *)) { color: #e9d6b3; }
.theme-dark :is(.shop-mark--event):where(:not(.print-page *)) { color: #e4a6a1; }
.theme-dark :is(.cost-table > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.payment-calendar__recent > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.shop-stock__cats > summary):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.stock-sheet__table tr.is-damaged td[data-label="状態"] select):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.stock-sheet__total td):where(:not(.print-page *)) { border-top: 2px solid #41454b; }
.theme-dark :is(.stock-sheet__actions):where(:not(.print-page *)) { background: var(--color-surface, #1d1d1d); }
.theme-dark :is(.stock-sheet__status):where(:not(.print-page *)) { color: #e29e9a; }
@media (max-width: 860px) { .theme-dark :is(.stock-sheet__table tr.stock-sheet__row):where(:not(.print-page *)) { border-bottom: 1px solid #41454b; } }
.theme-dark :is(.member-pick__done):where(:not(.print-page *)) { color: #b6dfbe; }
.theme-dark :is(.member-pick__cand.is-on):where(:not(.print-page *)) { background: #252d26; }
.theme-dark :is(.member-pick__chosen):where(:not(.print-page *)) { color: #b6dfbe; }
@media (max-width: 860px) { .theme-dark :is(.home__tile):where(:not(.print-page *)) { background: #332c21; border: 1px solid #574a37; } }
@media (max-width: 860px) { .theme-dark :is(.home__tile-icon):where(:not(.print-page *)) { color: #e5caa5; } }
@media (max-width: 860px) { .theme-dark :is(.home__tile-text strong):where(:not(.print-page *)) { color: #e9d2b3; } }
@media (max-width: 860px) { .theme-dark :is(.home__tile--error):where(:not(.print-page *)) { background: #2b1d1c; border-color: #533a37; } }
@media (max-width: 860px) { .theme-dark :is(.home__tile--error strong):where(:not(.print-page *)) { color: #e3a6a0; } }
.theme-dark :is(.dash-compare__btn):where(:not(.print-page *)) { color: var(--frame, #a2c0e1); }
.theme-dark :is(.dash-cum__change.is-up):where(:not(.print-page *)) { color: #aee7c0; }
.theme-dark :is(.dash-cum__change.is-down):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.plan-cmp__meter):where(:not(.print-page *)) { background: var(--band, #222428); }
.theme-dark :is(.plan-cmp .is-up):where(:not(.print-page *)) { color: #aee7c0; }
.theme-dark :is(.plan-cmp .is-down):where(:not(.print-page *)) { color: #e29e9a; }
.theme-dark :is(.dash-catch):where(:not(.print-page *)) { background: var(--band, #222428); }
.theme-dark :is(.dash-catch .is-up):where(:not(.print-page *)) { color: #aee7c0; }
.theme-dark :is(.dash-catch .is-down):where(:not(.print-page *)) { color: #e29e9a; }
}
/* デザインの刷新(2026-10-21 ユーザー: Codex の見本。docs/design_renewal.md)。素材は app/assets/images/design/(tools/design_assets/extract.py)。
   ここは画像を使う所だけ(asset_path で digest の付いた URL にするため .erb)。印刷の画面(print レイアウト)には読ませない */


/* ---------- ノーマル・ダークの刷新(2026-10-21。Codex の基本の見本 v06 + 枠・表・明細の仕上げ v07) ----------
   v07 は「明細の行の高さ・上下の余白・1画面に見える件数を今のまま」の条件でユーザー了承(README_CLAUDE_HANDOFF.md)。
   なのでここでは padding・height・line-height・font-size を変えない(色・線・影・角だけ)。
   ガラスは liquid.css(グレージュ + v10)。共通の「行の交互色(ノーマル・ダーク)・金額欄の淡い色・桁ぞろえ」はここ。印刷には効かない(@media screen) */
@media screen {
  /* ノーマル: 白を土台に、細いグレーの枠・青灰色の見出し(左に細い線)・弱い影・角12px。今いる画面は白い札に紺の字 */
  html:not(.theme-liquid):not(.theme-dark) {
    --rn-row-alt: #f8fafc;
    --rn-row-hover: #eaf1f8;
    --rn-head: linear-gradient(90deg, #eaf0f6, #f3f6f9);
    --rn-accent-line: #7e9ab4;
    --rn-cell-line: #e3e8ee;
    --rn-amount: #f1f4f8;
  }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .card { border-radius: 8px; box-shadow: 0 2px 8px rgba(32, 57, 81, 0.04); }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .search-form { border: 1px solid var(--color-border); border-radius: 8px; }
  html:not(.theme-liquid):not(.theme-dark) .home-card__title { background: var(--rn-head); box-shadow: inset 3px 0 var(--rn-accent-line); }
  /* ノーマルの左のメニューは白にそろえる(2026-10-28 ユーザー: 下の帯と同じ感じに。前は紺 #113961 に白い文字)。
     中身との境目は少し濃い線と薄い影(白一色だと境目が分かりにくい)。今いる所は下の帯と同じ濃いめの青グレーの面・アイコンを少し浮かせる */
  html:not(.theme-liquid):not(.theme-dark) .app-shell { --side-bg: #ffffff; --side-ink: #1f2a36; --side-line: #e1e6ed; --side-hover: #eef2f7; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar { border-right: 1px solid #b7c3d2; box-shadow: 3px 0 14px rgba(17, 57, 97, 0.10); }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__action { color: #113961; border-color: rgba(17, 57, 97, 0.3); background: #fff; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar .font-scale__option.is-active { background: #113961; color: #fff; border-color: #113961; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__fav { background: #f1f4f8; color: #1f2a36; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body a { color: #1f2a36; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body a:hover { background: #eef2f7; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body a[aria-current="page"] { background: #e3eaf3; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body .sidebar__sub > summary { color: #1f2a36; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body .sidebar__sub > summary:hover { background: #eef2f7; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group-body .sidebar__sub-body { border-left-color: #d3dbe5; }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__top-link--current,
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group--current > summary {
    background: linear-gradient(145deg, #c3d1e3, #d3deeb) !important; color: #113961 !important; font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(17, 57, 97, 0.25) !important; border-radius: 10px;
  }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__top-link--current > .sidebar__icon,
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group--current > summary > .sidebar__icon { position: relative; transform: translateY(-2px); }
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__top-link--current > .sidebar__icon::after,
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group--current > summary > .sidebar__icon::after {
    content: ""; position: absolute; left: 50%; bottom: -6px; width: 24px; height: 6px; transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 70%);
  }

  /* ダーク: チャコール(2026-10-21 ユーザー: 紺グレーより暗く。Codex v31)。全部を黒にせず、背景・窓・見出し・入力欄を濃淡と枠で分ける */
  .theme-dark {
    --color-bg: #111315;
    --color-surface: #1b1e22;
    --band: #25292e;
    --color-border: #555e69;
    --color-text: #e6e9ee;
    --color-muted: #b8c0ca;
    --color-text-muted: #b8c0ca;
    --color-primary: #477aa8;
    --color-primary-dark: #b6c9dc;
    --frame: #b6c9dc;
    --input-border: #8a95a5;
    --side-bg: #101214;
    --dk-row: #202428;
    --dk-hover: #2a3036;
    --dk-input: #15181b;
    --rn-row-alt: #202428;
    --rn-row-hover: #2a3036;
    --rn-head: linear-gradient(90deg, #2a2e34, #25292e);
    --rn-accent-line: #8a95a5;
    --rn-cell-line: #33383f;
    --rn-amount: #22262b;
  }
  .theme-dark .app-shell { --side-bg: #101214; }
  .theme-dark .app-shell .card { border-radius: 8px; }
  .theme-dark .app-shell .search-form { border: 1px solid var(--color-border); border-radius: 8px; }
  .theme-dark .home-card__title { background: var(--rn-head); box-shadow: inset 3px 0 var(--rn-accent-line); }
  .theme-dark .app-shell .sidebar__top-link--current,
  .theme-dark .app-shell .sidebar__group--current > summary { background: #2a3036 !important; color: #f1f3f6 !important; border-radius: 6px; }

  /* 窓の一番上の見出しの帯は、上の角を窓と同じ丸みに(2026-10-21 ユーザー: ホームのスケジュールの帯の角が四角くはみ出していた。
     窓の角を 12px/18px にしたのに、帯は四角いままだった) */
  html:not(.theme-liquid) .app-shell .card > .home-card__title:first-child { border-radius: 7px 7px 0 0; }
  .theme-liquid .app-shell .card > .home-card__title:first-child { border-radius: calc(var(--liq-radius) - 1px) calc(var(--liq-radius) - 1px) 0 0; }

  /* ---- 表・明細(ノーマル・ダーク): うすい行の交互色・控えめな縦の区切り線 ---- */
  html:not(.theme-liquid) .app-shell .table tbody tr:nth-child(even) td { background: var(--rn-row-alt); }
  html:not(.theme-liquid) .app-shell .table tbody tr:hover td { background: var(--rn-row-hover); }
  html:not(.theme-liquid) .items-table tbody tr:nth-child(even) td { background: var(--rn-row-alt); }
  html:not(.theme-liquid) .items-table tbody tr:hover td { background: var(--rn-row-hover); }
  html:not(.theme-liquid) .items-table thead th { background: var(--band); }
  html:not(.theme-liquid) .items-table td + td, html:not(.theme-liquid) .items-table th + th { border-left: 1px solid var(--rn-cell-line); }
  html:not(.theme-liquid) .items-table td.col-amount { background: var(--rn-amount); }

  /* ---- 3つのデザイン共通: 金額は右寄せ・桁をそろえる(幅のそろった数字) ---- */
  .app-shell .items-table td.col-amount { text-align: right; }
  .app-shell .items-table, .app-shell .table td { font-variant-numeric: tabular-nums; }
  .theme-liquid .items-table td.col-amount { background: rgba(237, 241, 245, 0.75); }
}

/* ---------- ページ見出しの立体アイコン(29種類・明暗。<body data-title-icon>) ---------- */
:root { --title-icon-size: 64px; } /* 2026-10-21 ユーザー: 64・48(見本は 76・58) */
@media (max-width: 860px) { :root { --title-icon-size: 48px; } }
body[data-title-icon] main h1.page-title::before {
  content: ""; display: inline-block; width: var(--title-icon-size); height: var(--title-icon-size);
  margin: -4px 12px -2px 0; vertical-align: middle; background: var(--title-icon) center / contain no-repeat;
}
body[data-title-icon="home"] { --title-icon: url(/assets/design/title/home_light-c50137a763157650a082a7a5bc81da2edb6c4b2788af4102ae740e6638222ffe.webp); }
.theme-dark body[data-title-icon="home"] { --title-icon: url(/assets/design/title/home_dark-52ba1ddee794e2d9273bda282421ee20d2cbae0c279b2a0b6206fb226b536462.webp); }
body[data-title-icon="apps"] { --title-icon: url(/assets/design/title/apps_light-3967e532db607aae99cb394b4b5c1ea848e81769f718bdbf7d9247b4e46c0453.webp); }
.theme-dark body[data-title-icon="apps"] { --title-icon: url(/assets/design/title/apps_dark-68ea3af673387d261ab8b2c77d0c7a085754d06b58e2b1aab050c8516db1a506.webp); }
body[data-title-icon="settings"] { --title-icon: url(/assets/design/title/settings_light-a2ca22cf2446cb9b9fce0ac441f52ba24aa1c2a360a5b13294cd42bdc930e610.webp); }
.theme-dark body[data-title-icon="settings"] { --title-icon: url(/assets/design/title/settings_dark-dcd6c55eb046a018a24be6828b56f44f359d2eddf58e887acb42c240d7ac83d0.webp); }
body[data-title-icon="company"] { --title-icon: url(/assets/design/title/company_light-a91f4ebc0b5890f76f0009dca84f5b26ebb6d200eda18267a47501205b64d482.webp); }
.theme-dark body[data-title-icon="company"] { --title-icon: url(/assets/design/title/company_dark-97242d9ed896af40b619aa630362ba4639425ab13ca05dc66e72eb2510c33790.webp); }
body[data-title-icon="admin"] { --title-icon: url(/assets/design/title/admin_light-261cfd1c6c902f3e76c459394aaf11388ee8699c8bd0eca97cbd31975b352609.webp); }
.theme-dark body[data-title-icon="admin"] { --title-icon: url(/assets/design/title/admin_dark-39594470a1a93aa47057675c070331859f08e702fa779238266bcfa1a7223c65.webp); }
body[data-title-icon="customers"] { --title-icon: url(/assets/design/title/customers_light-537ae621beb9a901bd7dfafab839a8dc2b70d3585822cce23408e15f06d83473.webp); }
.theme-dark body[data-title-icon="customers"] { --title-icon: url(/assets/design/title/customers_dark-5bbf34a796d52ebe1d22a536b92ed25a3fb02be7bcac42a5b634ff2bdd214120.webp); }
body[data-title-icon="funeral"] { --title-icon: url(/assets/design/title/funeral_light-5311775b5dd63bc5c941d58dff9f466c5999da0a648ee44301551563d8299783.webp); }
.theme-dark body[data-title-icon="funeral"] { --title-icon: url(/assets/design/title/funeral_dark-098d0f909b0f32d8a14c77c2c5ba0807b1c2b8d38e31b2083e982b6a8c636916.webp); }
body[data-title-icon="consultation"] { --title-icon: url(/assets/design/title/consultation_light-9b5ef741c09f9db900a3efb46390ff9c9070d9273a20180088378e5a613e28c0.webp); }
.theme-dark body[data-title-icon="consultation"] { --title-icon: url(/assets/design/title/consultation_dark-70f96c48cd18a7c33b083ff271134b6e1683d7b896109e58b931a1646531618f.webp); }
body[data-title-icon="staff"] { --title-icon: url(/assets/design/title/staff_light-3410abdc3d05271064bf6d54be90ad0e32e7916186a6cf04d9ffe3076c466aa1.webp); }
.theme-dark body[data-title-icon="staff"] { --title-icon: url(/assets/design/title/staff_dark-2fcfe056ce526424ed8f485a8f20a54b92845cc5c0863e808de724a4432c8db4.webp); }
body[data-title-icon="estimate"] { --title-icon: url(/assets/design/title/estimate_light-f4390d65ece7fef9db360747515f6750d0ed17f14f0778c00566d72f85968e41.webp); }
.theme-dark body[data-title-icon="estimate"] { --title-icon: url(/assets/design/title/estimate_dark-42a21f4922474b132bf29a0bd670069ce19d07033b110d98defb9563672f91eb.webp); }
body[data-title-icon="billing"] { --title-icon: url(/assets/design/title/billing_light-2195fdbdbb3052ecdb950d88113b09699dc30a5eab732e7cfabe05ee66f33d52.webp); }
.theme-dark body[data-title-icon="billing"] { --title-icon: url(/assets/design/title/billing_dark-666e2080fc78f2648df19d43372f758e82d46b01b2adbae2c83b649cf9389209.webp); }
body[data-title-icon="receipt"] { --title-icon: url(/assets/design/title/receipt_light-d544f8cfcf4597d3468978a457c06d3b2220d7477e01f96d19414bf5e1252782.webp); }
.theme-dark body[data-title-icon="receipt"] { --title-icon: url(/assets/design/title/receipt_dark-a2f46224c3f523701c07656ab7092812ab173ae7bc9afc31ab4a68cf80f9006b.webp); }
body[data-title-icon="payment"] { --title-icon: url(/assets/design/title/payment_light-40ea34d50fff7bff5a8f7e86eb2edeffcf503f818aedcfc03d873126a47b3022.webp); }
.theme-dark body[data-title-icon="payment"] { --title-icon: url(/assets/design/title/payment_dark-623c96f4472933eb1c6baa6b6cb07e0aad9c59799c4d1005d2b4a97e4f4244b0.webp); }
body[data-title-icon="calendar"] { --title-icon: url(/assets/design/title/calendar_light-558aa5e941f287f435b2b79dd0198f43e02694ded916a2f67c079cfa806eca7b.webp); }
.theme-dark body[data-title-icon="calendar"] { --title-icon: url(/assets/design/title/calendar_dark-0c8f2f26b9f8707bf1fe67e859463e33c02b158a3edecf92c62fc092c3df1d07.webp); }
body[data-title-icon="message"] { --title-icon: url(/assets/design/title/message_light-931726359e1a1794f85f482a4f27b7c73a648d7fc7b3398464af1ab8a9459f7f.webp); }
.theme-dark body[data-title-icon="message"] { --title-icon: url(/assets/design/title/message_dark-20df663d8e44a91aee02a275eddf91ef72d0316f9ec6418000bbdd07a671435a.webp); }
body[data-title-icon="mail"] { --title-icon: url(/assets/design/title/mail_light-de79b1340174a7dd0f69b20a378a2deb283f5194f9081396f59d7be1155de4b1.webp); }
.theme-dark body[data-title-icon="mail"] { --title-icon: url(/assets/design/title/mail_dark-2bb0602513daaeeabb441045f5ff16d2dfc3f9880216e8a7b2ec21b4972e5a48.webp); }
body[data-title-icon="board"] { --title-icon: url(/assets/design/title/board_light-3bf2e517259ec438490157eca7c746a04daee2bc7228e994a7b903dedbc4a7ba.webp); }
.theme-dark body[data-title-icon="board"] { --title-icon: url(/assets/design/title/board_dark-a73c7497881c623c89c6e6668b02bd0a3c3426cd38fb3da62826b101dc8c2a92.webp); }
body[data-title-icon="workflow"] { --title-icon: url(/assets/design/title/workflow_light-a050b2651eb11bf0ecc7e0a395199920f8f0a2329d4453b25fe9dffee1988d91.webp); }
.theme-dark body[data-title-icon="workflow"] { --title-icon: url(/assets/design/title/workflow_dark-dfac6cef304985915bc27b7e5009094fd1470090489cb07bd91c42c7bedf4467.webp); }
body[data-title-icon="memo"] { --title-icon: url(/assets/design/title/memo_light-77708666250293a559579bed3a8e3efc052b34496e22562d157469912e56aacd.webp); }
.theme-dark body[data-title-icon="memo"] { --title-icon: url(/assets/design/title/memo_dark-853d564cdaca032e73c7533913b0c349be383e77b160afdbed03c5bd94b713ce.webp); }
body[data-title-icon="files"] { --title-icon: url(/assets/design/title/files_light-2b84d381011be06471efd86c7e7cba91de9f27bc03315c5eff616faf51119d26.webp); }
.theme-dark body[data-title-icon="files"] { --title-icon: url(/assets/design/title/files_dark-61fdffd214bdf9ad4b7816de2c51b933df540e951652337262b26c0a785f261f.webp); }
body[data-title-icon="links"] { --title-icon: url(/assets/design/title/links_light-ee11d47fff966d48799bdab98b3e65af799a614fab38e9860b46d97d7b19668f.webp); }
.theme-dark body[data-title-icon="links"] { --title-icon: url(/assets/design/title/links_dark-efc32191b72b2e8d6ee13950e1692c123ab953b5c3f0aa20d7e5a33746be9932.webp); }
body[data-title-icon="driving"] { --title-icon: url(/assets/design/title/driving_light-593ba875bb0e82a1595e3e9b20652bb9835c4f206820bbb5f52e9adf4de42e9b.webp); }
.theme-dark body[data-title-icon="driving"] { --title-icon: url(/assets/design/title/driving_dark-3a7de1a150d8265bc9ae38a7f3ab9e26441e7db74775405f8c056ecc96035fc0.webp); }
body[data-title-icon="mortuary"] { --title-icon: url(/assets/design/title/mortuary_light-9dcc2c839eb3cc8b2cf48f986a0cc8b305fb5e4aa0960d0e92acaccf11f947ab.webp); }
.theme-dark body[data-title-icon="mortuary"] { --title-icon: url(/assets/design/title/mortuary_dark-791bc736f803cbdc1030e011308d5ad1e89f7a2fa25a7ddfbde75b07786a1302.webp); }
body[data-title-icon="analytics"] { --title-icon: url(/assets/design/title/analytics_light-5941405d33616382f5312d3b09353d8125ae3efc2f507aa1ba4c5a1e88c673de.webp); }
.theme-dark body[data-title-icon="analytics"] { --title-icon: url(/assets/design/title/analytics_dark-93d24b7f1ea30b71fe40145bbc1bb11cfdf7c9d24fbcbbb1f4f0379b4c434950.webp); }
body[data-title-icon="survey"] { --title-icon: url(/assets/design/title/survey_light-5c58d32012299554d1017fb905223491c54b10a2ae1018a4a6d0a7e417aff64b.webp); }
.theme-dark body[data-title-icon="survey"] { --title-icon: url(/assets/design/title/survey_dark-1f4b828c90254a590cbf00226048cc0828b1e81b68f67d07a73ddd51173d4903.webp); }
body[data-title-icon="products"] { --title-icon: url(/assets/design/title/products_light-ca8423736924a35f5f19e08d6f24feb759ef26d76fad2b9e99bafea883631196.webp); }
.theme-dark body[data-title-icon="products"] { --title-icon: url(/assets/design/title/products_dark-44a7a8f715e17b72d18778abb14963448d7d2d25154eba9085db41ed7b44aa39.webp); }
body[data-title-icon="data"] { --title-icon: url(/assets/design/title/data_light-4946a8f37153d9924a36ff8b91eff86d1ea45e3b611375256986dd472e4622fe.webp); }
.theme-dark body[data-title-icon="data"] { --title-icon: url(/assets/design/title/data_dark-1a422efc15cc3af6315624666316a42133f2ab6d6e1633a32066c1eaa880039d.webp); }
body[data-title-icon="import"] { --title-icon: url(/assets/design/title/import_light-9c4994fee25d002e00b49e6669f0d9c0403d5cfb52746b82ae4dfbee0b05d970.webp); }
.theme-dark body[data-title-icon="import"] { --title-icon: url(/assets/design/title/import_dark-a3c55e79bb3e9af56f0a9e1286a218a5aff96690b7d9124e2fd728b53cfcbb52.webp); }
body[data-title-icon="logs"] { --title-icon: url(/assets/design/title/logs_light-b15842c44b117e54032de81ce90df795315a488f75a5c2b0bfaef736a8d3557d.webp); }
.theme-dark body[data-title-icon="logs"] { --title-icon: url(/assets/design/title/logs_dark-c48e208848022b35aadd9c04918e02c9b2add17618379390306895bffb28a7f1.webp); }

/* ---------- 申請の種類ごとの陶器アイコン 17種(Codex v30。WorkflowRequestsHelper#workflow_form_icon)。大きさ(sm/md/lg)は今のまま ---------- */
.wf-icon.wf-icon--porcelain { background: var(--wf-porcelain) center / contain no-repeat; border: 0; box-shadow: none; }
.wf-porcelain--accident { --wf-porcelain: url(/assets/design/workflow/accident_light-056bb22530145cec5c5916276e2116010ca4cfba3ebeaa1a75d205606620ce73.webp); }
.theme-dark .wf-porcelain--accident { --wf-porcelain: url(/assets/design/workflow/accident_dark-92d0dcd20802241d5416050914e6f70db2a515d145f7a19b92042b1b121c6c21.webp); }
.wf-porcelain--apology { --wf-porcelain: url(/assets/design/workflow/apology_light-b863e68e709d1fbc3606f9dd13520bb0e2352d6c04bef432d112dd91939f9357.webp); }
.theme-dark .wf-porcelain--apology { --wf-porcelain: url(/assets/design/workflow/apology_dark-f83079ff4376f75e50fd420d1003bc37ca2a7dad0e683948c21843cee8c4ba1d.webp); }
.wf-porcelain--asset_disposal { --wf-porcelain: url(/assets/design/workflow/asset_disposal_light-7e9b272724ce4050b78381d56808f8a5aa69c9b98337e68864496c8b3565da28.webp); }
.theme-dark .wf-porcelain--asset_disposal { --wf-porcelain: url(/assets/design/workflow/asset_disposal_dark-0257f3511bab03c056918fdfb9405b2aa9f27bf5c06d832e8ea5df9a46843ccb.webp); }
.wf-porcelain--congratulation { --wf-porcelain: url(/assets/design/workflow/congratulation_light-71074c67657c96564b73869e2284f097d77b2480e73a1b6cfda982ac7eba2766.webp); }
.theme-dark .wf-porcelain--congratulation { --wf-porcelain: url(/assets/design/workflow/congratulation_dark-6f816c582dc46b6f5c6928f9b83ff7723ce221874620d1ada4b93e0d195cc9e4.webp); }
.wf-porcelain--discount { --wf-porcelain: url(/assets/design/workflow/discount_light-ceea46fde530d5d512b0e76a5be11d57bb69708c4dc15302beae1128befa4458.webp); }
.theme-dark .wf-porcelain--discount { --wf-porcelain: url(/assets/design/workflow/discount_dark-773552c95d2d6127c1badb6badab070c16c240d7a4e3b7d54d5fd460e3cc786b.webp); }
.wf-porcelain--funeral_discount { --wf-porcelain: url(/assets/design/workflow/funeral_discount_light-ed6bad5315e4169db402255a24bf0d74964bafc9402f90e124f3ba5aa5ddecce.webp); }
.theme-dark .wf-porcelain--funeral_discount { --wf-porcelain: url(/assets/design/workflow/funeral_discount_dark-2f8b593189e3521a508cd0615ffb757bdc4831ee9ebc6a68c3d0daced82ddb41.webp); }
.wf-porcelain--late_early { --wf-porcelain: url(/assets/design/workflow/late_early_light-8a2f208eebd7aa0e109a0ef2aa973963a633592f182cdb9901f18ad1cc550a7d.webp); }
.theme-dark .wf-porcelain--late_early { --wf-porcelain: url(/assets/design/workflow/late_early_dark-ad9efabc2d494ad67852f7f4a2480936081b108a4740eda1c2e35c12af2f4707.webp); }
.wf-porcelain--leave { --wf-porcelain: url(/assets/design/workflow/leave_light-4d56a9e5cda113154115baa7d02216bd0c2e507b9954848dba3a2502875e2233.webp); }
.theme-dark .wf-porcelain--leave { --wf-porcelain: url(/assets/design/workflow/leave_dark-f9c32fbf8b8cbc41e95d12d266fa42cdd4c7977c43da0b2ec9d70e501104899b.webp); }
.wf-porcelain--market_research { --wf-porcelain: url(/assets/design/workflow/market_research_light-fbbfc071a540398f3d8b4a9715ac6acac00d78c8d7123dd6cc3f95df84a3ec9a.webp); }
.theme-dark .wf-porcelain--market_research { --wf-porcelain: url(/assets/design/workflow/market_research_dark-25e23a0724461e7d36281f936b36659cd7c926e15ab072880857e7d75367492d.webp); }
.wf-porcelain--overtime { --wf-porcelain: url(/assets/design/workflow/overtime_light-0fc902838ecbdcd0728bc006c7f986d474b45c18a72f5254f0b41f80d4f4983f.webp); }
.theme-dark .wf-porcelain--overtime { --wf-porcelain: url(/assets/design/workflow/overtime_dark-62fb0ce4b4df587d17179260afd94e3a7d9a14c7a5f9cc58bbc43c6579334735.webp); }
.wf-porcelain--paid_leave { --wf-porcelain: url(/assets/design/workflow/paid_leave_light-d76334fcafee626946b16e9df85c717828dcee0a9d25dce5b547fe539de9c71b.webp); }
.theme-dark .wf-porcelain--paid_leave { --wf-porcelain: url(/assets/design/workflow/paid_leave_dark-d7db5655f2cb00d70dfae14bb2384293e7ad2680935bc3dd65d5444cc6b58dbc.webp); }
.wf-porcelain--purchase { --wf-porcelain: url(/assets/design/workflow/purchase_light-4099586956e2d52a809fa37bbea1373d59890dbcb84bd8f1ea953586adf43d98.webp); }
.theme-dark .wf-porcelain--purchase { --wf-porcelain: url(/assets/design/workflow/purchase_dark-f440ee9980e55cba9bcf0e1996010b594500b5c4a379ca71a8f6c2d80643fa6e.webp); }
.wf-porcelain--referral { --wf-porcelain: url(/assets/design/workflow/referral_light-2e2ad267055c673fe23ac9c0d710b6734c94ea35f8226a60a14e88f0dd071f01.webp); }
.theme-dark .wf-porcelain--referral { --wf-porcelain: url(/assets/design/workflow/referral_dark-611c25eed4afd5526f51a7438d1271db54ee83523bf9d877b127a8fe6f96ee6a.webp); }
.wf-porcelain--ringi { --wf-porcelain: url(/assets/design/workflow/ringi_light-eb5030e648ff2ef5ff145e686f5127fbdf7b0d21c3bcf974912cb627c3f9e58e.webp); }
.theme-dark .wf-porcelain--ringi { --wf-porcelain: url(/assets/design/workflow/ringi_dark-60a11803b7eed19caac27af832fa71a67e3ad65c8599270da36d360dde3ba268.webp); }
.wf-porcelain--ringi_sales { --wf-porcelain: url(/assets/design/workflow/ringi_sales_light-ec36d8a4b90c7fda831edcadb34fe70bf45eab47f74b5dcdc6cd656f86e22a8d.webp); }
.theme-dark .wf-porcelain--ringi_sales { --wf-porcelain: url(/assets/design/workflow/ringi_sales_dark-8c61125eaccfa227f48c71f7b3abc66d8291effa76cc0b83d9d57b2fa916747b.webp); }
.wf-porcelain--sales_allowance { --wf-porcelain: url(/assets/design/workflow/sales_allowance_light-b898f95792e6db7d7deef3b2da15ed7ef47113a85ccb030d5688e3db6f2edf54.webp); }
.theme-dark .wf-porcelain--sales_allowance { --wf-porcelain: url(/assets/design/workflow/sales_allowance_dark-1c9b8b95b03405b79ec8242c0243be342af03ccb278f98dc6deb534c7f50a302.webp); }
.wf-porcelain--travel { --wf-porcelain: url(/assets/design/workflow/travel_light-6452c36c5d95ae92cd479681a583d214b359b5d1f7ee1d89d0141f326d2fd06c.webp); }
.theme-dark .wf-porcelain--travel { --wf-porcelain: url(/assets/design/workflow/travel_dark-a6af14e4a2eb0eca62e5753cbbc64baae20f576eb47737b2e13c964fd311e068.webp); }

/* ---------- スケジュールの天気のイラスト 5種(Codex v33。全デザイン共通の絵。SchedulesHelper#schedule_day_head) ----------
   字の高さに合わせて出す(日付の欄・行の高さは変えない)。2つ並ぶときは 1px あける */
.schedule-day__weather { display: inline-flex; align-items: center; gap: 1px; vertical-align: -0.15em; line-height: 1; }
.wx { display: inline-block; width: 1.25em; height: 1.25em; flex: none; background: center / contain no-repeat; }
.wx--sun { background-image: url(/assets/design/weather/sun-1edf196defcfc8688c08a4a1fde12185b1f41b97bd083d6d720a0d08c1a276c5.webp); }
.wx--cloud { background-image: url(/assets/design/weather/cloud-2e1c60e048a7074e8c5b74dd0953cb2fd240832b7cf1ed174778c9422e7169d6.webp); }
.wx--rain { background-image: url(/assets/design/weather/rain-8d129a0165fee244c995dbed553d213898568c43ff4a4064a9ce6297cb6e004b.webp); }
.wx--thunder { background-image: url(/assets/design/weather/thunder-30ca791439f25134f7bcb19830daa881cf9eed03d24531b11fce7604f0ea9da5.webp); }
.wx--snow { background-image: url(/assets/design/weather/snow-91ac2c47daf627dbde2076af9d53782d11038947d83556e4ea9b46d880a91ea2.webp); }

/* ---------- 左のメニューと下の帯の陶器調アイコン(正面向き) ---------- */
.porcelain { display: inline-block; background: var(--porcelain) center / contain no-repeat; flex: none; }
.porcelain--address { --porcelain: url(/assets/design/nav/address_light-5588b0b763c29984b353f6a83144b6f7b75e90602bead9f38bab3deba701e86c.webp); }
.theme-dark .porcelain--address { --porcelain: url(/assets/design/nav/address_dark-b94f54b7693e4587d436ed3a0107cbfe31f9a1a9eb8bc557617a7cf41654cf41.webp); }.porcelain--admin_docs { --porcelain: url(/assets/design/nav/admin_docs_light-45ad6e896c19ba6b94d3f1da9314dee9dc29500e28484df4b8b0e1bdaa85469e.webp); }
.theme-dark .porcelain--admin_docs { --porcelain: url(/assets/design/nav/admin_docs_dark-f0383826ff23bc059081b96a37cb30b35b961db779cef7caad061c00260e9d39.webp); }.porcelain--apps { --porcelain: url(/assets/design/nav/apps_light-b546a159bad972fddec7cae3bf6c66d9e1e66c8111731771859dac2ebea40171.webp); }
.theme-dark .porcelain--apps { --porcelain: url(/assets/design/nav/apps_dark-5c0445d32fc16d97d5cf0cf3ae68ea8594ec148103a25a884e7513989c79e43b.webp); }.porcelain--bell { --porcelain: url(/assets/design/nav/bell_light-8faab0c415bfe6e27302da1311160e1d42267ac02847f230d69ceb278cf8b7ce.webp); }
.theme-dark .porcelain--bell { --porcelain: url(/assets/design/nav/bell_dark-d18ce21cadd6f49ff7ff8500cf9db667a97d946dc327464169b83a32b6d96467.webp); }.porcelain--bill { --porcelain: url(/assets/design/nav/bill_light-77aace8a43b5fcfa2aea46708a1e5aabc46bcab47f31c634814583c4bffe29ce.webp); }
.theme-dark .porcelain--bill { --porcelain: url(/assets/design/nav/bill_dark-87d594ef6f4c86142d681d2038a59eeaa6a8e91f941be9226dca00d3bcd2b8cb.webp); }.porcelain--board { --porcelain: url(/assets/design/nav/board_light-5bd255b7915310fea0d60b8543a3b01ef68e78dd40bec0940bd4bcafb39d29bc.webp); }
.theme-dark .porcelain--board { --porcelain: url(/assets/design/nav/board_dark-5da963573c44fce23490e13d007f44c62a7778d1715fa254dd81dd1b1ab1eb8c.webp); }.porcelain--calendar { --porcelain: url(/assets/design/nav/calendar_light-c881aad53e270b1fedce41f06361df8ebd40d91e9815956c66430c142baaa7fe.webp); }
.theme-dark .porcelain--calendar { --porcelain: url(/assets/design/nav/calendar_dark-1a8c386ff7a5766e1401d7762c07c720267646044fe4189fac7571f67600760a.webp); }.porcelain--chart { --porcelain: url(/assets/design/nav/chart_light-467d501666415b92218a9901f8281ca25355158a5b1a98b177bd34e1e4556a44.webp); }
.theme-dark .porcelain--chart { --porcelain: url(/assets/design/nav/chart_dark-2b49e3c3f8f98278f447191459b00906dc4ce28c704963b51a914fc3a764f7bf.webp); }.porcelain--chat { --porcelain: url(/assets/design/nav/chat_light-07219a27b52e2b69412aeffccd86ce6e49e07851e9b6651e29743b9b5d1a5c95.webp); }
.theme-dark .porcelain--chat { --porcelain: url(/assets/design/nav/chat_dark-3a9873e4a4826979116c7e0997806498574901e3dc152cb8e0bcfbdd58f96548.webp); }.porcelain--check { --porcelain: url(/assets/design/nav/check_light-bd86bd166452f53b954b42c0d2d1967c7133645f1a4dd5bfeb9ec07c90e47ef1.webp); }
.theme-dark .porcelain--check { --porcelain: url(/assets/design/nav/check_dark-239119989bb67214d498d803baa11c086ddf9c81c60e3dd77df1fcb1897d957a.webp); }.porcelain--consultation { --porcelain: url(/assets/design/nav/consultation_light-c964c7563d714ab7210a9ed475f1b219abd0deb88df7ccfff731009b084dbd22.webp); }
.theme-dark .porcelain--consultation { --porcelain: url(/assets/design/nav/consultation_dark-cc81f163450001000c2d9b75ad427eafe0f0990e8f892f5e163cf187cc028ed7.webp); }.porcelain--driving_log { --porcelain: url(/assets/design/nav/driving_log_light-97323e14104489bcce263f9ff2cd001f46b08ab42864ba5da29822b1dcd57190.webp); }
.theme-dark .porcelain--driving_log { --porcelain: url(/assets/design/nav/driving_log_dark-f9a8007cfc4e053214309d1f7a9b9bc2732c1590a5fd06ecdd95c3a34ecba454.webp); }.porcelain--duty { --porcelain: url(/assets/design/nav/duty_light-cebcf5ecc4d3d2b20340ccd681a72bfd21d6d13f395129111bb1551ecb41b7a7.webp); }
.theme-dark .porcelain--duty { --porcelain: url(/assets/design/nav/duty_dark-61f4d96c2e1b2e14f905e2764c4d46e84006ec1d10f716137d8fe5c8bdd70dff.webp); }.porcelain--folder { --porcelain: url(/assets/design/nav/folder_light-3420e528274356d64722eaa7415abf12121063173ab5ed07b5996506def457c4.webp); }
.theme-dark .porcelain--folder { --porcelain: url(/assets/design/nav/folder_dark-843f1947719744d11adeec0d2fe2f143d748b883e2002377b52fc8accfb5f33e.webp); }.porcelain--funeral_reports { --porcelain: url(/assets/design/nav/funeral_reports_light-fd515602d07cb6929c964c7fea37dfd9d43604a4cf715068b5bf5e4bb9451490.webp); }
.theme-dark .porcelain--funeral_reports { --porcelain: url(/assets/design/nav/funeral_reports_dark-596f2470fd62e9c3ec22c73dcafa25cbb7da71033496dfde0b2693a4b95680aa.webp); }.porcelain--hikkou { --porcelain: url(/assets/design/nav/hikkou_light-cc6c6b73b8cdc01d7876d9c76f634b39adff3b87d063783d4f97c39ebefc7b43.webp); }
.theme-dark .porcelain--hikkou { --porcelain: url(/assets/design/nav/hikkou_dark-33271a001966c9c260539d14498646b426e673a3cebea0cd7f758577b1146537.webp); }.porcelain--home { --porcelain: url(/assets/design/nav/home_light-79ac232a75e8094f050d2c82be2cf4568e2956d5cfcb407dc766b5093b14bfe6.webp); }
.theme-dark .porcelain--home { --porcelain: url(/assets/design/nav/home_dark-6840a2ab6159a5858ddb0b805610d2993aa77f864db639dfc4cb11de86c266f8.webp); }.porcelain--links { --porcelain: url(/assets/design/nav/links_light-ea1f84c28666e1bd9d9e002c3ab67f404d0caa25a0d173cb32d9bca6074e4511.webp); }
.theme-dark .porcelain--links { --porcelain: url(/assets/design/nav/links_dark-7221f6e3e69a7818997798d56f07365e8fafaa8a8600f417aeebb9ae1f4ae958.webp); }.porcelain--mail { --porcelain: url(/assets/design/nav/mail_light-55bd43ec0240646be00d1c3cc7ab466ed854111da51b54a4caa363605a5c41b5.webp); }
.theme-dark .porcelain--mail { --porcelain: url(/assets/design/nav/mail_dark-e44016d0d3051749b18f52d7c1763b994fe899a03aece59b97bc749bfc552a2c.webp); }.porcelain--memo { --porcelain: url(/assets/design/nav/memo_light-097a806207e289e6dd0338485617f2c960d37501d0440ade9dc05df55dbf4e2f.webp); }
.theme-dark .porcelain--memo { --porcelain: url(/assets/design/nav/memo_dark-21317093d6ea27fd5640a52f3ea75cec703f60cca642125324007ce153c69b2c.webp); }.porcelain--menu { --porcelain: url(/assets/design/nav/menu_light-ae512ebf33f3562866dbdadf315bcd913c22a1adae063c0662fa7f2f8342f411.webp); }
.theme-dark .porcelain--menu { --porcelain: url(/assets/design/nav/menu_dark-df3f4d56a469086ef06e5f569996e9713f8831d2ab5f891b930ad1341abed8aa.webp); }.porcelain--mortuary { --porcelain: url(/assets/design/nav/mortuary_light-2aa097cad38ce0b06043af879cb1544e13585ac28fadb62f0a725bdd0b63b794.webp); }
.theme-dark .porcelain--mortuary { --porcelain: url(/assets/design/nav/mortuary_dark-01498d21341e28404355877ea1ff51752a130cd9e3806be2a32311c8f4266def.webp); }.porcelain--settings { --porcelain: url(/assets/design/nav/settings_light-1ce07ae961c38df54a139e1ab36d7a540dbef34d1642ba79f730add2a7155911.webp); }
.theme-dark .porcelain--settings { --porcelain: url(/assets/design/nav/settings_dark-0b8abd0624865f7be666835376039f637f3e0d179c6fdb985b0f468f248f442e.webp); }.porcelain--shift { --porcelain: url(/assets/design/nav/shift_light-718e332dc235367c6a793c01f4aece31fc2b459807c8bb81b8f29ca74fcc2938.webp); }
.theme-dark .porcelain--shift { --porcelain: url(/assets/design/nav/shift_dark-a1bc8624f2c789f9095ae603d008ff28e7f82ab95eeedf801afbcf196ad17e37.webp); }.porcelain--shop { --porcelain: url(/assets/design/nav/shop_light-690884fe9888086d92f12a8ab1dac79c3cf963a5660b059fe11569156b0c36ac.webp); }
.theme-dark .porcelain--shop { --porcelain: url(/assets/design/nav/shop_dark-9ae9a2085da03aa2cbe6dd8ecee5f0b391f904fabc208ba77e1339945a62651a.webp); }.porcelain--site_management { --porcelain: url(/assets/design/nav/site_management_light-c3bb6fbc11e69eb10a3d609621fd07d8352bb3b9f4c4abeaa9b71e73dc87f7ca.webp); }
.theme-dark .porcelain--site_management { --porcelain: url(/assets/design/nav/site_management_dark-92b107cc210386cb098e90329ec2ec4f754892e329d55d293699b8fa80b47bed.webp); }.porcelain--star { --porcelain: url(/assets/design/nav/star_light-140d8363fa12b36dabb79b67a8ed34839b40a23604662c849bee12554f831f65.webp); }
.theme-dark .porcelain--star { --porcelain: url(/assets/design/nav/star_dark-41b25bfd5d72499495df9036be2673119b8b46c5f9783154952d5216bb1c004c.webp); }.porcelain--supplier_slip { --porcelain: url(/assets/design/nav/supplier_slip_light-2a2e4c7aad5350868f3ca60e520095ef3d0fee36106b0154ad3cb125c8e95e7f.webp); }
.theme-dark .porcelain--supplier_slip { --porcelain: url(/assets/design/nav/supplier_slip_dark-aca4caeae3644e62ea2d96386e99fced6ad35b3f04ac9272f2cf2c9853346786.webp); }.porcelain--survey_request { --porcelain: url(/assets/design/nav/survey_request_light-cb7a45e8ce8bfe642cae01215173c87cbbce1a1e10a505ff6f459cc507cdf095.webp); }
.theme-dark .porcelain--survey_request { --porcelain: url(/assets/design/nav/survey_request_dark-63ac118080d1347e70b958fa1ba60eb0b0bcceb83522dcf6efb22527c512cd18.webp); }.porcelain--todo { --porcelain: url(/assets/design/nav/todo_light-a1f861a6603f2e56e2b46344de82309f3e895101312b20326f180d74d470efd9.webp); }
.theme-dark .porcelain--todo { --porcelain: url(/assets/design/nav/todo_dark-135c1689c96aee5abffd555dacd8a6475dafc14c43e45dd6729737e78eed364a.webp); }.porcelain--user { --porcelain: url(/assets/design/nav/user_light-5ab7821095ac33332278726ae0fd8073b5a71347aea482e06568a4baa3ff9242.webp); }
.theme-dark .porcelain--user { --porcelain: url(/assets/design/nav/user_dark-b448c0f30d84188375eda04f4db66c2eb887e7bb403a8b2252f89febf312bb16.webp); }.porcelain--users { --porcelain: url(/assets/design/nav/users_light-1217be34d8f133e0f48d1bccd69da0e85902f2bd6c2fe40c1de17f5c247b948d.webp); }
.theme-dark .porcelain--users { --porcelain: url(/assets/design/nav/users_dark-e1450638b037b969114de27a7959bcf50e00eba44d4c4f00c61127cacd76c1de.webp); }.porcelain--weekly_night { --porcelain: url(/assets/design/nav/weekly_night_light-6308294a648180004d0ef7e2588c38f09947aa364add6aa0ff0b3ca072202547.webp); }
.theme-dark .porcelain--weekly_night { --porcelain: url(/assets/design/nav/weekly_night_dark-8e305634d4662d9b6335e132997c58f20f536dcb1d473d70115231e0ab9be631.webp); }.porcelain--workflow { --porcelain: url(/assets/design/nav/workflow_light-0dba96b010447c1d8131581eae69451f8728ee54bcbc4bfb904d5d0709b787dc.webp); }
.theme-dark .porcelain--workflow { --porcelain: url(/assets/design/nav/workflow_dark-3e1911d7375fed6f1576f199480edb1d675c796d487b0a7b87da0a57c7fbc7dd.webp); }.sidebar .porcelain.sidebar__icon { width: 32px; height: 32px; flex-basis: 32px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18)); transition: transform 0.15s ease; }
.sidebar__top-link:hover > .porcelain, .sidebar__group > summary:hover > .porcelain { transform: translateY(-1px) scale(1.06); }
.tab-bar__item > .porcelain.sidebar__icon { width: 32px; height: 32px; margin-bottom: 1px; }
/* 押している項目: 項目全体でなく、アイコンの後ろだけ小さな淡い青緑の面(2026-10-24 Codex v80) */
.tab-bar__item.is-active::before { content: ""; position: absolute; left: 50%; top: 1px; width: 48px; height: 36px; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(145deg, #e0e7e6, #e9ece7); border: 1px solid rgba(201, 212, 208, 0.5); border-radius: 6px; }
.theme-dark .tab-bar__item.is-active::before { background: rgba(225, 223, 219, 0.14); border-color: rgba(225, 223, 219, 0.2); }
/* ノーマル(白い画面)は下の帯・上の帯も白に合わせる(2026-10-27 ユーザー: アイボリーはガラスと同じで、白い画面だと浮く)。押している項目の面は帯の色の薄い青グレー。
   2026-10-28 ユーザー: v90(グレーのすりガラス)をやめてこの形に戻した(ガラス・ダークも v90 の前の形) */
@media (max-width: 860px) {
  html:not(.theme-liquid):not(.theme-dark) .tab-bar { background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.99)); border-color: #c9d2de; box-shadow: 0 3px 10px rgba(17, 57, 97, 0.1); }
  html:not(.theme-liquid):not(.theme-dark) .tab-bar__item.is-active::before { background: linear-gradient(145deg, #e6ebf2, #eef1f6); border-color: rgba(185, 199, 216, 0.6); }
  html:not(.theme-liquid):not(.theme-dark) .mobile-bar.mobile-bar--page.is-scrolled { background: rgba(255, 255, 255, 0.97); }
}
/* スマホの下の帯の色(2026-10-28 ユーザー: 見本 Artifact「下の帯の透け感」で決めた。プライムビデオの下の帯のように透かす)。
   ノーマル = A(白・透けない)・ガラス = C(よく透ける白いすりガラス・ふちに光)・ダーク = D(暗いすりガラス・名前は白)。
   押している所は項目全体に面を敷く(前はアイコンの後ろの小さな面): ノーマルは濃いめの青グレー・ガラスは白い面に銀の縁(C-5)・ダークは黒っぽい面に白い細い縁。
   形・位置・大きさは今のまま(application.css) */
@media (max-width: 860px) {
  .tab-bar .tab-bar__item.is-active::before { content: none; }
  .tab-bar .tab-bar__item { border-radius: 12px; }
  html:not(.theme-liquid):not(.theme-dark) .tab-bar .tab-bar__item { color: #3a3f44; }
  html:not(.theme-liquid):not(.theme-dark) .tab-bar .tab-bar__item.is-active {
    background: linear-gradient(145deg, #c3d1e3, #d3deeb); color: #113961; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(17, 57, 97, 0.25);
  }
  html.theme-liquid .tab-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.18)); border-color: rgba(255, 255, 255, 0.65);
    -webkit-backdrop-filter: blur(12px) saturate(200%) brightness(1.06); backdrop-filter: blur(12px) saturate(200%) brightness(1.06);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 1px rgba(255, 255, 255, 0.35), 0 6px 20px rgba(17, 27, 37, 0.18);
  }
  html.theme-liquid .tab-bar .tab-bar__item { color: #15202b; text-shadow: 0 0 8px rgba(255, 255, 255, 0.95), 0 0 2px rgba(255, 255, 255, 0.9); }
  html.theme-liquid .tab-bar .tab-bar__item.is-active {
    color: #113961; font-weight: 750; text-shadow: none; border: 1.5px solid transparent;
    background: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)) padding-box,
                linear-gradient(135deg, #fbfcfd 0%, #a4adb8 28%, #f2f4f7 50%, #8e98a4 74%, #e9edf1 100%) border-box;
    box-shadow: 0 2px 8px rgba(17, 27, 37, 0.16);
  }
  html.theme-dark .tab-bar {
    background: rgba(34, 38, 46, 0.48); border-color: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 20px rgba(0, 0, 0, 0.25);
  }
  html.theme-dark .tab-bar .tab-bar__item { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
  html.theme-dark .tab-bar .tab-bar__item.is-active { background: rgba(0, 0, 0, 0.55); color: #fff; font-weight: 750; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
  /* 押している所のアイコンは少し浮かせて、下に影(2026-10-28 ユーザー: 見本の「浮かせる」)。iPhone で影(filter)の付いた絵が
     描き直されずに消えることがあったので(2026-10-26 左のメニュー)、影は filter を使わず、絵の下に置いたぼかした楕円で */
  .tab-bar .tab-bar__item > .sidebar__icon { position: relative; transition: transform 0.2s ease; }
  .tab-bar .tab-bar__item.is-active > .sidebar__icon { transform: translateY(-3px); }
  .tab-bar .tab-bar__item.is-active > .sidebar__icon::after {
    content: ""; position: absolute; left: 50%; bottom: -7px; width: 26px; height: 7px; transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 70%);
  }
  html.theme-dark .tab-bar .tab-bar__item.is-active > .sidebar__icon::after { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 70%); }
  @media (prefers-reduced-motion: reduce) { .tab-bar .tab-bar__item > .sidebar__icon { transition: none; } }
  /* すりガラスが使えない端末・透け感を減らす設定は、読みやすい不透明の色 */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html.theme-liquid .tab-bar { background: rgba(250, 251, 252, 0.96); }
    html.theme-dark .tab-bar { background: #2a2e35; }
  }
  @media (prefers-reduced-transparency: reduce) {
    html.theme-liquid .tab-bar { background: rgba(250, 251, 252, 0.97); }
    html.theme-dark .tab-bar { background: #2a2e35; }
  }
}
@media (max-width: 860px) {
  /* 2026-10-26 ユーザー(iPhone): メニューのまとまりを1つ開くと、ほかのまとまりのアイコンが消えた(場所は空いたまま)。
     iPhone の Safari は、影(filter)の付いた絵が、まとまりを開いて並びが動いたときに描き直されないことがある
     → スマホは影と動きを付けない(下の帯の絵は影なしで消えていない) */
  .sidebar .porcelain.sidebar__icon { width: 36px; height: 36px; flex-basis: 36px; filter: none; transition: none; }
  .sidebar__top-link:hover > .porcelain, .sidebar__group > summary:hover > .porcelain { transform: none; }
  .tab-bar__item > .porcelain.sidebar__icon { width: 32px; height: 32px; }
}

/* ---------- ホームの背景(個人設定「ホームの背景」。home-hero--<背景> home-hero--band-<高さ>) ---------- */
.home-hero { position: relative; isolation: isolate; margin: -6px 0 14px; padding: 12px 18px 12px; border-radius: 8px; overflow: hidden;
  background-color: var(--hero-base, #f3f1ec); background-repeat: no-repeat; box-shadow: 0 1px 3px rgba(30, 40, 50, 0.12); }
.home-hero > * { position: relative; z-index: 1; }
/* 左は字が読めるように少し白く(右の絵は見える) */
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0, rgba(255, 255, 255, 0.45) 38%, rgba(255, 255, 255, 0) 72%); }
.home-hero .home__head { justify-content: flex-start; min-height: var(--hero-head, 72px); margin-bottom: 6px; gap: 8px 18px; }
.home-hero--band-compact { --hero-head: 40px; }
@media (max-height: 850px) { .home-hero--band-auto { --hero-head: 40px; } }
.home-hero { min-height: calc(var(--hero-head, 72px) + 44px); }
.home-hero .home__leave { background: rgba(255, 255, 255, 0.9); }
/* お知らせは小さな札に(2026-10-21 見本: 横に並べる・長い文は折り返す) */
.home-hero .home__notices { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; margin-bottom: 0; max-width: min(820px, 68%); }
.home-hero .home__notice { display: inline-flex; max-width: 100%; padding: 4px 12px 4px 5px; gap: 8px; border-radius: 8px;
  background: rgba(255, 246, 232, 0.94); box-shadow: 0 2px 6px rgba(60, 50, 30, 0.12); }
.home-hero .home__notice:hover { background: #fff1db; }
.home-hero .home__notice--error { background: rgba(253, 235, 234, 0.95); }
.home-hero .home__notice-icon { width: 26px; height: 26px; }
.home-hero .home__notice-icon svg { width: 15px; height: 15px; }
.home-hero .home__more { max-width: 100%; }
.home-hero .home__more > summary { border-radius: 8px; padding: 4px 14px; background: rgba(255, 250, 240, 0.92); }
.home-hero .home__more-list { flex-direction: row; flex-wrap: wrap; }

.home-hero--none { background: none; box-shadow: none; padding: 0; min-height: 0; margin-top: 0; overflow: visible; }
.home-hero--none::before { display: none; }
.home-hero--none .home__head { min-height: 0; justify-content: space-between; margin-bottom: 12px; }
.home-hero--none .home__notices { max-width: none; }

/* 絵の背景(2026-10-22 Codex v39: 4800×300 の横長の絵14種類。主役は右・左は文字が乗る淡い景色・上下30pxは切れてよい余白)。
   右をそろえて cover(ふつうの幅は高さに合わせて左が切れる・とても広い窓は横に合わせて上下が少し切れる)。
   前の猫・犬・小鳥の「右の絵の左のふちをぼかしてつなぐ」形は、絵が横長になったので要らなくなった */
.home-hero--spring { background-image: url(/assets/design/home/spring-3338ad812e9e88e55c4abdc7aab6a0b3fcfd2aa470658532c16aec30e65b434d.webp); }
.home-hero--summer { background-image: url(/assets/design/home/summer-2c1a2b5248cf1378142d792631876303234c78d0623810c4a8d8b4fa0ef8318e.webp); }
.home-hero--autumn { background-image: url(/assets/design/home/autumn-818649e5bd93cc356d85911e24a1d9a1d9df95adf675b70444497ff98ed9b564.webp); }
.home-hero--winter { background-image: url(/assets/design/home/winter-53ec0dbbe4104292639ff141dad5301c12f04186a26084a14312eee23446f217.webp); }
.home-hero--goldfish { background-image: url(/assets/design/home/goldfish-948ebf7683ec065809c805f3431e59518d88ec07c5fb789a0568831d97c8a1cb.webp); }
.home-hero--cat { background-image: url(/assets/design/home/cat-39e3e66563cfb0b256a8f67aa556bb53eefd84efa1dcbb7b5fd3025cec0b4475.webp); }
.home-hero--dog { background-image: url(/assets/design/home/dog-da87d37248c16df96dc5e48bfb8bb5f356dbfb86f59da09b9246d5a989e12755.webp); }
.home-hero--bird { background-image: url(/assets/design/home/bird-bab3a759f3a09a60bc1edc1058720ae1be13c8b942854cb19e98e7b3e0a66b50.webp); }
.home-hero--owl_night { background-image: url(/assets/design/home/owl_night-c82c22692f81555dce8e7f86631ebb92d759fa99b197803b8cfc2c0304509847.webp); }
.home-hero--moon_susuki { background-image: url(/assets/design/home/moon_susuki-88096b952f33f131914eefce7380061ba05df6df9790492123178709c47a6202.webp); }
.home-hero--hydrangea_rain { background-image: url(/assets/design/home/hydrangea_rain-5f39166a8a7386557ea27ae28aea1d9db4033c6a72d6514117e09150b3236200.webp); }
.home-hero--whale_shark { background-image: url(/assets/design/home/whale_shark-07259c54e1d99b572e68729e48c89f6dfd80938f55d3c0254218ec7cee56f75b.webp); }
.home-hero--fox_family { background-image: url(/assets/design/home/fox_family-0df30fa9138eabf3771c75aa216d7bddd88821ab950f9371c507b689991118a6.webp); }
.home-hero--arowana { background-image: url(/assets/design/home/arowana-6654e76ea317b816da502f3537570a671d53088d5b7425935e4b8781a8be9817.webp); }
.home-hero--space { background-image: url(/assets/design/home/space-55e0f8e33ecc5c0200c951e77df20a5789066cfd13205d170e51aa1fce8ed9e0.webp); }
.home-hero--fuji { background-image: url(/assets/design/home/fuji-5796dd76727f88f548e87fae5295bb4a54640e6b272e8791038f888e1a406f2a.webp); }
.home-hero--yakushima { background-image: url(/assets/design/home/yakushima-85e8d6b13c8f85408022fe8ffc4500669a76084dec8078604af3b5c0ef0da3ce.webp); }
.home-hero--shirakawa_snow { background-image: url(/assets/design/home/shirakawa_snow-bec2a83fbb4dbb313062f6b2e3debf6eecee5e1ab74518b16f47f916bf17f8ae.webp); }
.home-hero--mont_saint_michel_day { background-image: url(/assets/design/home/mont_saint_michel_day-ceab93cbcdf1cb3187cf3be576213557aae57c6616248f307e268b23636ef49e.webp); }
.home-hero--mont_saint_michel_night { background-image: url(/assets/design/home/mont_saint_michel_night-1be9686510e571f6a52cee3ee091c0c336f668720d7979a61d21b116b089348e.webp); }
.home-hero--westminster { background-image: url(/assets/design/home/westminster-0b8367eb2a1a20324fbcc172f64eb6d666d3e4bd8e10846f00e1f63d6e1db801.webp); }
.home-hero--machu_picchu { background-image: url(/assets/design/home/machu_picchu-704dba4b57b8be368021e6159186182e9efeae4e525610bcf527a28349f9b59a.webp); }
.home-hero--blue_waves { background-image: url(/assets/design/home/blue_waves-6c0889d48d76c251655f0503866758dce74199262763bcb3737b22cc2221e8a0.webp); }
.home-hero--pink_circles { background-image: url(/assets/design/home/pink_circles-6d8b7efcb700a95f147c375110b4fcee455d1c88e0acb6094882896fc409ff0a.webp); }
.home-hero--apricot_shapes { background-image: url(/assets/design/home/apricot_shapes-c01b4372576efd7bde8670afae30bc19e2e02dab38a99747425c24f6fb9e14cb.webp); }
.home-hero--sage_weave { background-image: url(/assets/design/home/sage_weave-f0492ae54af6212490b70931320c6b0da063b9df671ad11f64df76378608c737.webp); }
.home-hero--blue_cats { background-image: url(/assets/design/home/blue_cats-349ef3432a5562205bb0af60702e7ecf9fe075e4df39f4cfd5ed1b723f36bf0a.webp); }
.home-hero--sage_birds { background-image: url(/assets/design/home/sage_birds-4067f8251477609714f4f0fd8130da72795b3e500e79a31ccc0848bb68ad5dae.webp); }
.home-hero--apricot_dog { background-image: url(/assets/design/home/apricot_dog-742914c7cc5481cfa4abfb256e6c482dadeb2cc8d7ffdc1e80efbae3ff9cb5ed.webp); }
.home-hero--rose_flowers { background-image: url(/assets/design/home/rose_flowers-43f9dd05240de7c6b3913e0e32a8a14f47f6604422dbe7916ef5311efab1e609.webp); }
.home-hero--greige_curves { background-image: url(/assets/design/home/greige_curves-cf03478d1b36564fbe1d4a6c7756583d97cbd353e286b95880b84e6aebddf920.webp); }
.home-hero--lavender_geometry { background-image: url(/assets/design/home/lavender_geometry-10101322fbc3f2dc2561799a306c218f1809e20f26b47845c491f2a9e64c3c56.webp); }
.home-hero--greige_town { background-image: url(/assets/design/home/greige_town-8c1325f6e1c9289dfc85042ae35b05629602ea28680583ab5f972eac54da1729.webp); }
.home-hero--ivory_arches { background-image: url(/assets/design/home/ivory_arches-f502045426ba395b22d7c3e20fa4a38af89d6353ab01be125613a1207f61ba09.webp); }
.home-hero--sumi_landscape { background-image: url(/assets/design/home/sumi_landscape-af5f31190782632721db28206901cd7a5399ca7ddaafec59b5901402671bf754.webp); }
.home-hero--sumi_bamboo { background-image: url(/assets/design/home/sumi_bamboo-6cc845b72d5f29f1cb8d9bac41e04f6312c9f0b3f4a0fdc3c68025bc81a975d9.webp); }
.home-hero--sumi_garden { background-image: url(/assets/design/home/sumi_garden-79d54b11a822037a9ebb4d6fabbafbbc18c7cfc8b7b9d16eba2e7ba839b6beeb.webp); }
.home-hero--sumi_tiger { background-image: url(/assets/design/home/sumi_tiger-18970397172aa5bf31eba0807c38eac58f7339e103c4013118dc8b7afba2ecc1.webp); }
.home-hero--polar_bear { background-image: url(/assets/design/home/polar_bear-0210c5ba499b0bd490c82ece0bf3acdf3c06f5dcd8b8d834d95f7b00fa804417.webp); }
.home-hero--coelacanth { background-image: url(/assets/design/home/coelacanth-413e1598ff0c9855cf266f44439e69d04d3d4461131942f8b6e34a4c824d3e2a.webp); }
.home-hero--giza { background-image: url(/assets/design/home/giza-7f0d5b7a877f267b68ca6d0d4cb2061201c5171b98784a9d7d2a6506a60b4642.webp); }
:is(.home-hero--spring, .home-hero--summer, .home-hero--autumn, .home-hero--winter, .home-hero--goldfish, .home-hero--cat, .home-hero--dog, .home-hero--bird, .home-hero--owl_night, .home-hero--moon_susuki, .home-hero--hydrangea_rain, .home-hero--whale_shark, .home-hero--fox_family, .home-hero--arowana, .home-hero--space, .home-hero--fuji, .home-hero--yakushima, .home-hero--shirakawa_snow, .home-hero--mont_saint_michel_day, .home-hero--mont_saint_michel_night, .home-hero--westminster, .home-hero--machu_picchu, .home-hero--blue_waves, .home-hero--pink_circles, .home-hero--apricot_shapes, .home-hero--sage_weave, .home-hero--blue_cats, .home-hero--sage_birds, .home-hero--apricot_dog, .home-hero--rose_flowers, .home-hero--greige_curves, .home-hero--lavender_geometry, .home-hero--greige_town, .home-hero--ivory_arches, .home-hero--sumi_landscape, .home-hero--sumi_bamboo, .home-hero--sumi_garden, .home-hero--sumi_tiger, .home-hero--polar_bear, .home-hero--coelacanth, .home-hero--giza) { background-size: cover; background-position: right center; }
/* 自分の写真(2026-10-23。HomePhotosController で 10:1 に切ったもの。URL は style の --home-photo)。選んだ部分が見えるよう真ん中に合わせる */
.home-hero--photo { background-image: var(--home-photo); background-size: cover; background-position: center; background-color: #eef1f4; }
/* 夜の背景は左が濃い紺なので、字の下を少し強く白くする */
:is(.home-hero--owl_night, .home-hero--moon_susuki, .home-hero--space, .home-hero--mont_saint_michel_night, .home-hero--coelacanth)::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0.6) 34%, rgba(255, 255, 255, 0) 62%); }
/* 色だけの背景(見本の4つ) */
.home-hero--pink { background-image: linear-gradient(110deg, #fff4f7 35%, #f5dae5 73%, #edbfd2); }
.home-hero--orange { background-image: radial-gradient(ellipse 95% 210% at 110% 145%, #edbd99 0 38%, transparent 38.5%), radial-gradient(ellipse 100% 210% at 107% 175%, #f7ddc4 0 65%, transparent 65.5%); --hero-base: #fff4e9; }
.home-hero--lavender { background-image: linear-gradient(115deg, #f4effa 42%, #e5daf2 72%, #d4c4e8); }
.home-hero--mint { background-image: radial-gradient(circle at 85% 55%, transparent 0 42px, #a1c5b370 43px 44px, transparent 45px), radial-gradient(circle at 97% 120%, #c6e0d2 0 100px, transparent 101px); --hero-base: #eef7f1; }

/* ダーク: 絵を暗く沈める(字は明るいまま) */
.theme-dark .home-hero { box-shadow: none; }
.theme-dark .home-hero::before { background: linear-gradient(90deg, rgba(24, 28, 34, 0.86) 0, rgba(24, 28, 34, 0.7) 40%, rgba(24, 28, 34, 0.5) 100%); }
.theme-dark .home-hero .home__leave { background: rgba(40, 44, 50, 0.92); }
.theme-dark .home-hero .home__notice { background: rgba(58, 47, 23, 0.94); }
.theme-dark .home-hero .home__notice--error { background: rgba(59, 31, 31, 0.95); }
.theme-dark .home-hero .home__more > summary { background: rgba(43, 37, 28, 0.94); }

/* スマホは背景を出さない(見出し・お知らせはそのまま) */
@media (max-width: 860px) {
  .home-hero:not(.home-scene-choice) { background: none !important; box-shadow: none; padding: 0; min-height: 0; margin-top: 0; overflow: visible; }
  .home-hero:not(.home-scene-choice)::before { display: none; }
  .home-hero .home__head { min-height: 0; margin-bottom: 12px; }
  .home-hero .home__notices { max-width: none; flex-direction: column; flex-wrap: nowrap; }
  .home-hero .home__notice { display: flex; border-radius: 8px; padding: 8px 12px; background: #feecd2; }
  .home-hero .home__notice--error { background: #fdebea; }
}

/* 個人設定の背景の見本 */
.home-scene-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.home-scene-choice { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 64px; padding: 6px 8px;
  border: 1px solid var(--color-border); border-radius: 8px; cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: #222020; }
.home-scene-choice::before { content: none; }
.home-scene-choice span { position: relative; z-index: 1; align-self: flex-start; background: rgba(255, 255, 255, 0.88); border-radius: 6px; padding: 0 6px; font-size: 0.9rem; font-weight: 600;
  color: #222020; } /* 白い札の上なので字はいつも濃い色(2026-11-24: ダークで白い字になり読めなかった) */
.home-scene-choice.is-active { outline: 3px solid var(--frame, #2f5f93); outline-offset: 1px; }
.home-scene-choice.home-hero { margin: 0; min-height: 64px; padding: 6px 8px; box-shadow: none; }
/* 小さな見本は主役(絵の右の方)が見えるように少し左へずらす(2026-10-22 v39。右端だけだと水や木しか見えなかった) */
.home-scene-choice.home-hero { background-position: 80% center; }
.home-scene-choice.home-hero--none { border-style: dashed; background: #fff; color: #222020; }

/* ---------- ドット絵: ホームの背景の上を歩く(奥は小さく・足もとに影。critters_controller.js の field) ---------- */
.critters-field { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.critter--field { left: 0; top: 0; bottom: auto; transform-origin: 50% 100%; will-change: translate; }
.critter--field .critter__body { display: block; position: relative; }
.critter--field .critter__body::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -3px; height: 5px; border-radius: 50%; background: rgba(40, 35, 25, 0.22); z-index: -1; }
@media print { .home-hero { background: none !important; } .critters-field { display: none; } }

/* ---------- スマホ・ダークの白い面の直し(Codex v28。スケジュールの右上のメニュー・メールの上の帯・メモの操作の帯) ----------
   白い半透明の背景が直に書いてあり、ダークで字だけ明るくなって読めなかった。位置・高さ・操作は変えない */
@media screen {
  .theme-dark :is(.mbar-actions, .mbar-pop, .m-head__bar, .m-head__more, .memo__bar):where(:not(.print-page, .print-page *)) {
    background: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
    box-shadow: 0 6px 20px rgb(0 0 0 / 24%); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .theme-dark :is(.mbar-btn, .mbar-pop__item, .memo__bar-item, .memo__bar-icon, .m-head__title):where(:not(.print-page, .print-page *)) { color: var(--color-text); }
  .theme-dark :is(.m-head__btn, .m-chip):where(:not(.print-page, .print-page *)) {
    background: var(--band); color: var(--color-text); border-color: var(--color-border); box-shadow: none;
  }
  .theme-dark .m-chip.is-on:where(:not(.print-page, .print-page *)) { background: #2f3a46; color: #f1f3f6; border-color: #b6c9dc; }
  .theme-dark .m-chip--warn:where(:not(.print-page, .print-page *)) { color: #ffb0b0; }
  .theme-dark .m-head__title small:where(:not(.print-page, .print-page *)) { color: var(--color-muted); }
  .theme-dark .m-search input:where(:not(.print-page, .print-page *)) { background: var(--dk-input); color: var(--color-text); border-color: var(--color-border); }
  .theme-dark .m-search input::placeholder { color: var(--color-muted); opacity: 1; }
  .theme-dark :is(.mbar-pop__item, .memo__bar-item, .m-head__btn, .m-chip):where(:not(.print-page, .print-page *)):not(:disabled):not([aria-disabled=true]):active,
  .theme-dark .mbar-menu[open] > .mbar-btn:where(:not(.print-page, .print-page *)) { background: var(--dk-hover); }
  .theme-dark :is(.mbar-btn, .mbar-pop__item, .memo__bar-item, .m-head__btn, .m-chip):where(:not(.print-page, .print-page *)):focus-visible { outline: 2px solid var(--frame); outline-offset: 2px; }
  @media (hover: hover) {
    .theme-dark :is(.mbar-pop__item, .memo__bar-item, .m-head__btn, .m-chip):where(:not(.print-page, .print-page *)):not(:disabled):not([aria-disabled=true]):hover { background: var(--dk-hover); }
  }
}

/* ---------- スマホのメール一覧の段違いの塗りの直し(Codex v29。3つのデザインとも) ----------
   760px 以下は行を grid にしているので、セルごとの背景(交互色・hover)が段違いに見えた → 背景は行(tr)だけに */
@media screen and (max-width: 760px) {
  .mail-page .table.mail-list { --mail-row-bg: var(--color-surface, #fff); --mail-row-selected: #e8f0fb; --mail-row-hover: #f2f6fc; }
  .theme-dark .mail-page .table.mail-list { --mail-row-selected: #2f3a46; --mail-row-hover: var(--dk-hover); }
  .mail-page .table.mail-list tbody > tr:where(:not(.print-page *)) { background: var(--mail-row-bg); border-bottom: 1px solid var(--color-border, #c5ced8); }
  :is(.theme-dark, .theme-liquid) .mail-page .table.mail-list tbody > tr:nth-child(n) > td:where(:not(.print-page *)),
  .mail-page .table.mail-list tbody > tr > td:where(:not(.print-page *)),
  .mail-page .table.mail-list tbody > tr:nth-child(even) > td:where(:not(.print-page *)),
  .mail-page .table.mail-list tbody > tr[data-href]:hover > td:where(:not(.print-page *)),
  .mail-page .table.mail-list tbody > tr:is(:active, :focus-within) > td:where(:not(.print-page *)) { background: transparent; border: 0; box-shadow: none; }
  .mail-page.is-editing .table.mail-list tbody > tr:has(input[type=checkbox]:checked):where(:not(.print-page *)) { background: var(--mail-row-selected); }
  .mail-page .table.mail-list tbody > tr[data-href]:active:where(:not(.print-page *)) { background: var(--mail-row-selected); }
  .mail-page .table.mail-list tbody > tr[data-href]:focus-visible:where(:not(.print-page *)) { outline: 2px solid var(--frame, #2f5f93); outline-offset: -2px; }
  @media (hover: hover) and (pointer: fine) {
    .mail-page .table.mail-list tbody > tr[data-href]:hover:where(:not(.print-page *)) { background: var(--mail-row-hover); }
    .mail-page.is-editing .table.mail-list tbody > tr:has(input[type=checkbox]:checked):hover:where(:not(.print-page *)) { background: var(--mail-row-selected); }
  }
}
/* 牛と UFO の場面(2026-10-22 Codex v49。critters_controller.js#playCowUfo)。押せない飾り・印刷しない */
.critters-event { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
@media print { .critters-event { display: none; } }
@media (max-width: 860px) { .critters-event { display: none; } }
/* スマホのメニュー: 開いたまとまりを色の箱に(2026-10-30 ユーザー: 開いている所が分かりづらい → 案A)。
   見出しを紺に塗り、中身は薄い色の箱に入れて左に紺の線。今いる画面は白く浮かせる。開けるのは1つだけ(sidebar_group_controller.js) */
@media (max-width: 860px) {
  .app-shell .sidebar__nav > .sidebar__group[open] { border-bottom-color: transparent; }
  .sidebar__spacer { flex: none; } /* 開いた見出しを上まで動かすための空白(sidebar_group_controller.js#bringToTop) */
  .app-shell .sidebar__group[open] > summary,
  html:not(.theme-liquid):not(.theme-dark) .app-shell .sidebar__group[open] > summary {
    background: #113961 !important; color: #fff !important; font-weight: 700; border-radius: 10px 10px 0 0 !important; box-shadow: none !important;
  }
  .app-shell .sidebar__group[open] > summary::after { opacity: 1; }
  .app-shell .sidebar__group[open] > summary > .sidebar__icon::after { display: none; }
  .app-shell .sidebar__group[open] > .sidebar__group-body {
    margin: 0 0 6px; padding: 6px 6px 8px 8px; border-left: 5px solid #113961; border-radius: 0 0 10px 10px; background: #e8eef6;
  }
  .app-shell .sidebar__group[open] > .sidebar__group-body a { color: #1f2a36; border-radius: 8px; }
  .app-shell .sidebar__group[open] > .sidebar__group-body a[aria-current="page"] {
    background: #fff; color: #113961; font-weight: 800; box-shadow: 0 1px 4px rgba(17, 57, 97, 0.18);
  }
  /* ガラス: 箱はすりガラスの白・見出しは紺 */
  .theme-liquid .app-shell .sidebar__group[open] > summary { background: rgba(17, 57, 97, 0.92) !important; }
  .theme-liquid .app-shell .sidebar__group[open] > .sidebar__group-body {
    background: rgba(255, 255, 255, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-left-color: rgba(17, 57, 97, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  }
  .theme-liquid .app-shell .sidebar__group[open] > .sidebar__group-body a[aria-current="page"] { background: #fff; box-shadow: 0 0 0 1px #c9d0d8, 0 1px 4px rgba(17, 57, 97, 0.18); }
  /* ダーク: 見出しは明るめの青灰・箱は少し明るいチャコール */
  .theme-dark .app-shell .sidebar__group[open] > summary { background: #3c5675 !important; color: #fff !important; }
  .theme-dark .app-shell .sidebar__group[open] > .sidebar__group-body { background: #2a2f35; border-left-color: #6f93bd; }
  .theme-dark .app-shell .sidebar__group[open] > .sidebar__group-body a { color: #e8ebef; }
  .theme-dark .app-shell .sidebar__group[open] > .sidebar__group-body a[aria-current="page"] { background: #47505b; color: #fff; box-shadow: none; }
}
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(/images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(/images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(/images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
/* 新しいデザイン「リキッド」(2026-10-17 ユーザー: リキッド(すりガラス)感がありつつ見やすく)。
   個人設定の「画面のデザイン」で「新しいデザイン」を選んだ端末だけ(Cookie design=liquid → <html class="theme-liquid">)。
   見本は docs/samples/liquid_design.html。決まったこと:
   - 背景: 斜めのグラデーション 青→空色→ミント(ミントは右下だけ)。動かさない
   - 窓(カード・左のメニュー): 白いすりガラス。透け20%(2026-10-18 に35%から下げ、背景も薄くした)・ぼかし軽め・ふちの線なし(影だけ)・角を大きく丸く
   - 左のメニュー: 明るいガラス。今いる画面(とそのまとまり)だけ紺。アイコンは色の線の枠(塗らない)
   - まとまりの窓(パソコン): 白いガラスで透け65%
   - 表の明細行: 1行ずつ白い板・すき間3px(字の下は透かさない)。入力欄も白
   - 印刷には効かない(@media screen の中だけ)。見やすさの決まり(本文の色・線の濃さ・入力欄の枠)はそのまま
   2026-10-21 ユーザー(Codex の見本 v10「質感でましたね」): 後ろは落ち着いたグレージュ、手前の窓に厚み(下の影)と見出しの左上の短い反射。
   表・入力欄は白いまま。ここより下の「グレージュ」の所 */
@media screen {
  .theme-liquid {
    --liq-glass: rgba(255, 253, 248, 0.66);   /* グレージュの上で少し透ける白(2026-10-21。前は 0.8 の白) */
    --liq-glass-side: rgba(247, 244, 237, 0.88); /* 左のメニューは字が多いので白め */
    --liq-blur: 10px;
    --liq-radius: 8px; /* 2026-10-24 Codex v82: 角丸を抑える(18→8) */
    --liq-shadow: 0 22px 34px -19px rgba(56, 54, 48, 0.5), 0 5px 10px -5px rgba(58, 56, 50, 0.28), inset 0 -2px 3px rgba(94, 92, 84, 0.12);
    --liq-outline: #a5a29a;
    --band: rgba(255, 255, 255, 0.55);
  }
  .theme-liquid body {
    /* 2026-10-18 ユーザー: 背景を強調すると見づらい → 同じ色の流れのまま薄く(前は #b8d2f6 → #c1e0f4 → #c3e6f3 → #c4eadc) */
    /* 2026-10-21 ユーザー: グレージュ(Codex v10。少し明るめ)。前は 青→空色→ミント */
    background: #cdc8c0 linear-gradient(135deg, #c9c4bc 0%, #dad6cf 58%, #c8c4be 100%) fixed;
  }
  /* 2026-10-23 ユーザー: スマホ(iPhone の Safari)でホームの上が白く霞む。Safari は画面の上のふち(時計の所)を、ページの背景の
     「色」でぼかして重ねる。グラデーションだけで色が無いと白になるので、同じグレージュの色を下地に置く */
  html.theme-liquid { background-color: #cdc8c0; }

  /* ---- 窓(カード) ---- */
  .theme-liquid .card {
    background: var(--liq-glass);
    -webkit-backdrop-filter: blur(var(--liq-blur)) saturate(150%);
    backdrop-filter: blur(var(--liq-blur)) saturate(150%);
    border: 1px solid var(--liq-outline);
    border-radius: var(--liq-radius);
    box-shadow: var(--liq-shadow);
  }
  .theme-liquid .home-card__title { margin-top: 0; border-radius: 0; position: relative; isolation: isolate;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 253, 248, 0.45) 30%, rgba(229, 224, 214, 0.35) 72%, rgba(255, 255, 254, 0.6) 100%);
    box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.7), inset 0 -6px 9px -7px rgba(93, 90, 75, 0.45); }
  /* 見出しの左上の短い白い反射(全体を光らせない) */
  .theme-liquid .card > .home-card__title:first-child::before {
    content: ""; position: absolute; top: 3px; left: 3px; width: 105px; height: 30px; border-radius: 7px 0 0 0; z-index: -1; pointer-events: none;
    border-top: 2px solid rgba(255, 255, 255, 0.94); border-left: 2px solid rgba(255, 255, 255, 0.88);
    -webkit-mask: linear-gradient(130deg, #000 12%, transparent 78%); mask: linear-gradient(130deg, #000 12%, transparent 78%);
  }
  .theme-liquid .search-form { border-radius: 8px; }

  /* ---- ボタン(丸い形) ---- */
  .theme-liquid .btn { border-radius: var(--radius-control); } /* 2026-10-24 v82: 丸いボタンをやめる */
  /* 赤い枠のボタン(ログアウト・対象外にする・削除)は紺で塗らない(2026-10-18 ユーザー: スマホの個人設定のログアウトが紺の塗りになっていた) */
  .theme-liquid .btn:not(.btn--secondary):not(.btn--danger):not(.btn--danger-outline) {
    background: linear-gradient(180deg, #1d4d80, #113961);
    box-shadow: 0 4px 12px rgba(17, 57, 97, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  .theme-liquid .btn--secondary { background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 236, 228, 0.9)); box-shadow: 0 6px 10px -6px rgba(53, 53, 46, 0.45), inset 0 -2px 3px rgba(124, 120, 99, 0.1); }
  .theme-liquid .btn--danger-outline { background: transparent; } /* 赤い枠のボタンは背景なし(ノーマルと同じ。パソコンもスマホも) */
  .theme-liquid .btn--danger-outline:hover { background: #fbeceb; }

  /* ---- 入力欄は白(透かさない) ---- */
  .theme-liquid input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button]),
  .theme-liquid select, .theme-liquid textarea { background-color: #fff; }

  /* ---- 表: 明細行を1行ずつの白い板に(すき間3px) ---- */
  .theme-liquid .table { background: transparent; border-collapse: separate; border-spacing: 0 3px; }
  .theme-liquid .table th { background: transparent; border-bottom: 0; padding-top: 6px; padding-bottom: 4px; }
  .theme-liquid .table td { background: #fff; border-bottom: 1px solid #dfe5ee; border-top: 1px solid #dfe5ee; }
  .theme-liquid .table td:first-child { border-left: 1px solid #dfe5ee; border-radius: 6px 0 0 6px; }
  .theme-liquid .table td:last-child { border-right: 1px solid #dfe5ee; border-radius: 0 6px 6px 0; }
  .theme-liquid .table td:only-child { border-radius: 6px; }
  /* 対象者(施行)の枠の中は、白い値の枠が白い地に溶けて見づらかった(2026-10-27 ユーザー) → 地を外の枠と同じ生成り色にして白い枠を浮かせる */
  .theme-liquid .funeral-case-panel { background: rgba(240, 236, 228, 0.7); }
  .theme-liquid .funeral-case-panel__summary { background: rgba(255, 255, 255, 0.55); border-radius: var(--radius) var(--radius) 0 0; }
  .theme-liquid .funeral-case-panel:not([open]) > .funeral-case-panel__summary { border-radius: var(--radius); }
  /* 項目名(th)の隣の値(td)は、左にも線と角丸(2026-10-27 ユーザー: 顧客・施行の詳細で白い枠の左に線が無く、背景にまぎれて見づらい) */
  .theme-liquid .table th + td { border-left: 1px solid #dfe5ee; border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
  .theme-liquid .table tr:hover td { background: #f6f9fd; }
  .theme-liquid .table tr[data-href]:hover td { background: #eaf2fc; }
  /* 下へ進めたときに上に残る見出し(sticky_thead_controller.js)は字が読めるように白っぽく */
  /* 2026-11-20 ユーザー(iPhone・請求書一覧): 少しでも透けると後ろの行の字が見えた → 透かさない */
  .theme-liquid .table-wrap.sticky-thead { background: #f4f1eb; border-radius: 0 0 8px 8px; }

  /* ---- 左のメニュー: 明るいガラス ---- */
  .theme-liquid .app-shell {
    --side-bg: rgba(247, 244, 237, 0.97); /* 上に止めたホームの行の下地(下の行が透けて重ならないように) */
    --side-ink: #222020;
    --side-line: transparent;
    --side-hover: rgba(255, 255, 255, 0.75);
  }
  /* ガラスは ::before に描く(.sidebar 自体に backdrop-filter を付けると、右に出すまとまりの窓(position: fixed)の位置がずれるため) */
  /* position は付けない(パソコンは sticky・スマホは横から出る fixed のまま。relative にするとスマホのメニューが切れた。2026-10-18) */
  .theme-liquid .app-shell .sidebar { background: transparent; color: var(--side-ink); isolation: isolate; }
  .theme-liquid .app-shell .sidebar::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px;
    background: var(--liq-glass-side);
    -webkit-backdrop-filter: blur(var(--liq-blur)) saturate(150%);
    backdrop-filter: blur(var(--liq-blur)) saturate(150%);
    box-shadow: var(--liq-shadow);
  }
  .theme-liquid .app-shell .sidebar__nav > .sidebar__top-link--home { background: transparent; }
  .theme-liquid .app-shell .sidebar__nav > .sidebar__top-link--home:hover { background: var(--side-hover); }
  .theme-liquid .app-shell .sidebar__nav a,
  .theme-liquid .app-shell .sidebar__top-link,
  .theme-liquid .app-shell .sidebar__group > summary { border-radius: 6px; font-weight: 600; }
  .theme-liquid .app-shell .sidebar__action { color: #113961; border-color: rgba(17, 57, 97, 0.25); background: rgba(255, 255, 255, 0.7); }
  .theme-liquid .app-shell .sidebar .font-scale__option { color: #113961; border-color: rgba(17, 57, 97, 0.25); background: rgba(255, 255, 255, 0.7); }
  .theme-liquid .app-shell .sidebar .font-scale__option.is-active { background: #113961; color: #fff; border-color: #113961; }
  .theme-liquid .app-shell .sidebar__close { background: rgba(255, 255, 255, 0.8); color: #113961; }

  /* 今いる画面(Home)と、今いる画面が入っているまとまり: スマホの下の帯と同じ「白に銀の縁」・アイコンを浮かせて下に影
     (2026-10-29 ユーザー: 下の帯とそろえる。前は紺) */
  .theme-liquid .app-shell .sidebar__top-link--current,
  .theme-liquid .app-shell .sidebar__group--current > summary {
    color: #113961 !important; font-weight: 750; border: 1.5px solid transparent !important;
    background: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)) padding-box,
                linear-gradient(135deg, #fbfcfd 0%, #a4adb8 28%, #f2f4f7 50%, #8e98a4 74%, #e9edf1 100%) border-box !important;
    box-shadow: 0 2px 8px rgba(17, 27, 37, 0.16) !important;
  }
  .theme-liquid .app-shell .sidebar__top-link--current > .sidebar__icon,
  .theme-liquid .app-shell .sidebar__group--current > summary > .sidebar__icon { position: relative; transform: translateY(-2px); }
  .theme-liquid .app-shell .sidebar__top-link--current > .sidebar__icon::after,
  .theme-liquid .app-shell .sidebar__group--current > summary > .sidebar__icon::after {
    content: ""; position: absolute; left: 50%; bottom: -6px; width: 24px; height: 6px; transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 70%);
  }

  /* アイコン: 色の四角に白い線 → 色の線の枠(中は塗らない)。黄色など明るい色は白の上で見えるよう濃く */
  .theme-liquid .icon-tile--dashboard { --tile: #2a8fc9; }
  .theme-liquid .icon-tile--customers { --tile: #3e9a59; }
  .theme-liquid .icon-tile--billing { --tile: #c99a0e; }
  .theme-liquid .icon-tile--consultation { --tile: #9a4fc0; }
  .theme-liquid .icon-tile--chart { --tile: #d04545; }
  .theme-liquid .icon-tile--admin_docs { --tile: #5530a3; }
  .theme-liquid .icon-tile--admin { --tile: #6a7686; }
  .theme-liquid .icon-tile--home { --tile: #e07a2e; }
  .theme-liquid .sidebar__top-link > .icon-tile,
  .theme-liquid .sidebar__group > summary > .icon-tile {
    background: rgba(255, 255, 255, 0.55); border: 1.8px solid var(--tile); color: var(--tile); stroke: var(--tile); border-radius: 9px;
  }
  .theme-liquid .sidebar__top-link > .icon-tile [stroke="#fff"],
  .theme-liquid .sidebar__group > summary > .icon-tile [stroke="#fff"] { stroke: var(--tile); }
}

/* パソコン: メニューを浮かせる・まとまりの窓は白いガラス(透け65%) */
@media screen and (min-width: 861px) {
  .theme-liquid .sidebar { top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; }
  .theme-liquid .sidebar__toggle { left: 220px; }
  .theme-liquid .app-shell .sidebar__group[open] > summary { background: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 8px rgba(17, 57, 97, 0.12); }
  .theme-liquid .app-shell .sidebar__group-body {
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    border: 0; border-radius: 8px; padding: 10px;
    box-shadow: 0 18px 40px rgba(17, 40, 80, 0.22), 0 3px 8px rgba(17, 40, 80, 0.10);
  }
  .theme-liquid .app-shell .sidebar__group-body a { color: #222020; border-radius: 6px; font-weight: 600; }
  .theme-liquid .app-shell .sidebar__group-body a:hover { background: rgba(17, 57, 97, 0.08); }
  .theme-liquid .app-shell .sidebar__group-body a[aria-current="page"] { background: rgba(17, 57, 97, 0.12); }
  .theme-liquid .app-shell .sidebar__group-body .sidebar__sub > summary { color: #222020; opacity: 0.75; }
  .theme-liquid .app-shell .sidebar__group-body .sidebar__sub > summary:hover { background: rgba(17, 57, 97, 0.08); opacity: 1; }
  .theme-liquid .app-shell .sidebar__group-body .sidebar__sub-body { border-left-color: rgba(17, 57, 97, 0.18); }
}

/* スマホの下の帯(2026-10-18 ユーザー: ガラスのデザインに合わせる)。左のメニューと同じく色の線の枠(中は塗らない)。
   開いている画面も線のアイコンで、その色の枠を太く・中をうすくその色に */
@media screen and (max-width: 860px) {
  .theme-liquid .tab-bar { border-top-color: var(--liq-outline); }
  .theme-liquid .tab-bar__item { color: #3a3f44; }
  .theme-liquid .tab-bar__item > .icon-tile {
    background: rgba(255, 255, 255, 0.6); border: 1.8px solid var(--tile); color: var(--tile); stroke: var(--tile); border-radius: 10px;
  }
  .theme-liquid .tab-bar__item > .icon-tile [stroke="#fff"] { stroke: var(--tile); }
  /* 開いている画面: ほかと同じ線の枠のまま、その色(スケジュールは紫)で枠を太く・中をうすくその色に・名前もその色(2026-10-18 ユーザー) */
  .theme-liquid .tab-bar__item.is-active > .icon-tile {
    border-width: 2.4px; background: color-mix(in srgb, var(--tile) 16%, #fff); box-shadow: 0 4px 12px color-mix(in srgb, var(--tile) 35%, transparent);
  }
  .theme-liquid .tab-bar__item.is-active[class*="icon-tile--"] { color: #1f4962; font-weight: 750; } /* 2026-10-24 Codex v80: 文字は濃い青(前はアイコンの色) */
}

/* スマホ: メニューは引き出しなので白っぽく(後ろの画面が透けて読みにくくならないように)。
   ガラスは ::before でなくメニューそのものに塗る(引き出しは中でたてに動くので、::before だと下へ進めたところで切れていた。2026-10-18 ユーザーの写真) */
@media screen and (max-width: 860px) {
  .theme-liquid { --liq-glass-side: rgba(247, 244, 237, 0.98); }
  /* スマホのメールの箱はガラスにしない(backdrop-filter があると、中の固定の上の帯(.m-head)が箱を基準に置かれて両脇が11pxずれ、右が切れた。2026-10-25)。
     背景・枠・影も無し(application.css の html .app-shell .card.mail-page) */
  .theme-liquid .card.mail-page { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .theme-liquid .mail-body { background: #fff; } /* 本文は白い紙に(2026-11-11 ユーザー) */
  .theme-liquid .app-shell .sidebar { background: var(--liq-glass-side); border-radius: 0 8px 8px 0; }
  .theme-liquid .app-shell .sidebar::before { content: none; }
  /* 顧客の画面の請求書で選ぶと下に浮く段(2026-10-29): ほかの窓と同じすりガラス */
  .theme-liquid .invoice-actions.is-floating { background: var(--liq-glass); -webkit-backdrop-filter: blur(var(--liq-blur)) saturate(160%); backdrop-filter: blur(var(--liq-blur)) saturate(160%);
    border-color: transparent; box-shadow: var(--liq-shadow); }
}
/*


 */

:root {
  /* 色の決まり(2026-10-08 ユーザー): 背景は白、左のメニューは紺(#113961。会社の色 C100 M90 Y50)に白い文字、
     今まで背景だった薄い青グレー(#edf0f5)は「帯」(絞り込みの欄・表の見出し・ホームのカードの見出し)にだけ使う。
     白いボタンの枠・リンクの文字は紺より少し明るい青(--frame)。主なボタンは紺で塗る */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  /* 2026-10-13 ユーザー: 老眼の人も多いので全体を見やすく(くどすぎない程度に)。線・本文・薄い字をそれぞれ少し濃く
     (前は線 #d9e1ec・本文 #2b2926・薄い字 #75716a) */
  --color-border: #c9d2de;
  --color-text: #222020;
  --color-muted: #5c5852;
  --color-primary: #113961;
  --color-primary-dark: #0d2d4e;
  --band: #edf0f5;
  --frame: #2f5f93;
  --color-accent: #a06a3c;
  --color-danger: #b3453d;
  --color-warning: #b98a2e;
  --radius: 8px; /* 大枠・小枠・開いたメニュー・通知枠(2026-10-24 Codex v82: 角丸を抑える。入力欄・ボタン・メニューの項目は --radius-control) */
  --radius-control: 6px;
  /* 入力欄の枠(2026-10-13 ユーザー: 登録画面の枠の線が見づらい。前は --color-border の薄い線) */
  --input-border: #6f7680; /* 2026-10-13 ユーザー: 濃いグレー(濃い青も試したが「しつこい」) */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: var(--frame); }
/* 入力欄の薄い例文(placeholder)も読める濃さに(2026-10-13) */
input::placeholder, textarea::placeholder { color: #8c887f; }

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* 幅は 220→200 に詰めた(2026-09-27 ユーザー希望。一番長い項目「旧データの取り込み」が標で1行に収まる幅) */
.sidebar {
  /* パソコンも 220px(2026-10-05 ユーザー: スマホと同じに。前は 200px) */
  flex: 0 0 220px;
  width: 220px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}
/* 左のメニューの開閉(2026-09)。ノートパソコンで画面を横に広く使えるように。
   閉じると細い帯だけ残し、左上のボタンで開き直す。スマホ幅(860px以下)では☰から出す形なので使わない */
.sidebar__toggle {
  position: fixed;
  top: 14px;
  left: 206px; /* メニューの幅 220px の右の縁に半分かかる位置 */
  z-index: 50;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.sidebar__toggle:hover { background: #eef0ec; }
@media (min-width: 861px) {
  /* 左のメニューは画面に固定する(2026-09-26)。商品など長い一覧を下までスクロールしても、下の
     文字の大きさ・システム切替・パスワード変更・ログアウトのボタンがいつも見えるように。メニューが長いときはメニューの中だけ動く */
  .sidebar { position: sticky; top: 0; height: 100vh; align-self: flex-start; overflow: hidden; }
  .sidebar__nav { min-height: 0; overflow-y: auto; }
  .sidebar__footer { flex: 0 0 auto; margin-top: 12px; }
  /* たたむとアイコンだけの細い列(2026-11-06 ユーザー: 前は細い帯だけでメニューが選べなかった)。
     名前は隠し、マウスを重ねると出る(title)。まとまりは押すと今と同じ右の窓で中身を選ぶ */
  .app-shell--collapsed .sidebar { flex-basis: 64px; width: 64px; padding: 14px 6px; }
  .app-shell.app-shell--collapsed .sidebar__toggle { left: 50px; }
  .app-shell--collapsed .sidebar__favs,
  .app-shell--collapsed .sidebar__me-text,
  .app-shell--collapsed .sidebar__group-label,
  .app-shell--collapsed .sidebar__top-link > span:not(.sidebar__icon),
  .app-shell--collapsed .sidebar__group > summary::after { display: none; }
  .app-shell--collapsed .sidebar__me { flex-direction: column; gap: 6px; padding: 2px 0 10px; }
  .app-shell--collapsed .sidebar__me-name { flex: 0 0 auto; justify-content: center; padding: 4px; }
  .app-shell--collapsed .sidebar__me-initial { display: inline-flex; }
  .app-shell--collapsed .sidebar__me-actions { flex-direction: column; align-items: center; }
  .app-shell--collapsed .sidebar__top-link,
  .app-shell--collapsed .sidebar__group > summary { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
  .app-shell--collapsed .sidebar__count--group { position: absolute; top: 0; right: 2px; font-size: 0.65rem; padding: 0 4px; }
  .app-shell--collapsed .sidebar__nav { overflow-x: visible; }
}
/* 名前の頭文字(たたんだときだけ出す) */
.sidebar__me-initial { display: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
                       background: rgba(255, 255, 255, 0.18); font-weight: 700; font-size: 0.95rem; }
@media (max-width: 860px) {
  .sidebar__toggle { display: none; }
}
@media print {
  .sidebar__toggle { display: none; }
}

.sidebar__title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  margin-bottom: 24px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sidebar__nav a {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.sidebar__nav a:hover { opacity: 1; background: rgba(255,255,255,0.14); }
/* サイドバーのまとまり(顧客管理・請求管理・管理者メニュー)とピクトグラム(2026-09-25) */
.sidebar__icon { width: 22px; height: 22px; flex: 0 0 22px; } /* 2026-10-07 ユーザー: 少し大きめに(前は20) */
.sidebar__top-link, .sidebar__group > summary {
  color: #fff;
  opacity: 0.9;
  padding: 7px 8px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500; /* 中くらい(2026-09-29 ユーザー: 太字は太く見える) */
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.sidebar__nav a.sidebar__top-link { font-weight: 500; font-size: 0.95rem; display: flex; padding-left: 8px; padding-right: 8px; } /* ホームのアイコンが他と同じ位置に来るように(2026-10-07) */
.sidebar__group { margin-top: 0; }
/* 大きな項目(ダッシュボード・顧客管理・請求管理・管理者メニュー)の間に区切りの線(2026-09-27。スマート葬儀を参考に) */
.sidebar__nav > .sidebar__top-link, .sidebar__nav > .sidebar__group { border-bottom: 1px solid rgba(255,255,255,0.18); padding-bottom: 3px; margin-bottom: 3px; }
.sidebar__nav > .sidebar__top-link { border-radius: 0; }
.sidebar__group > summary::-webkit-details-marker { display: none; }
.sidebar__group-label { flex: 1; }
.sidebar__group > summary::after {
  content: "▸";
  font-size: 0.75rem;
  opacity: 0.8;
  transition: transform 0.15s;
}
.sidebar__group[open] > summary::after { transform: rotate(90deg); }
.sidebar__group > summary:hover, .sidebar__top-link:hover { opacity: 1; background: rgba(255,255,255,0.14); }
.sidebar__group-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 16px;
  margin: 0 0 4px;
}
.sidebar__group-body a { padding: 4px 10px; font-size: 0.9rem; }
/* Settings の中の小さなまとまり(2026-10-04 ユーザー)。見出しは少し小さく薄く、中は一段下げる */
.sidebar__sub { margin: 1px 0; }
.sidebar__sub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 0.84rem; font-weight: 600; color: var(--side-ink, #2f343c); opacity: 0.75; border-radius: 6px; white-space: nowrap; }
.sidebar__sub > summary::-webkit-details-marker { display: none; }
.sidebar__sub > summary::before { content: "▸"; font-size: 0.7rem; transition: transform 0.15s; }
.sidebar__sub[open] > summary::before { transform: rotate(90deg); }
.sidebar__sub > summary:hover { background: rgba(255,255,255,0.35); }
.sidebar__sub-body { display: flex; flex-direction: column; padding-left: 14px; margin-bottom: 2px; border-left: 1px solid rgba(60, 70, 90, 0.18); margin-left: 14px; }
.sidebar__sub-body a { padding: 3px 10px; font-size: 0.88rem; }
/* グループウェアの「リンク」(2026-10-04 ユーザー: 押すと下に広がる)。見出しはほかの項目と同じ見た目、右に ▸ */
.sidebar__sub--item > summary { font-size: 0.9rem; font-weight: 400; opacity: 1; padding: 4px 10px; color: inherit; }
.sidebar__sub--item > summary::before { content: none; }
.sidebar__sub--item > summary::after { content: "▸"; font-size: 0.7rem; margin-left: auto; transition: transform 0.15s; opacity: 0.7; }
.sidebar__sub--item[open] > summary::after { transform: rotate(90deg); }
.sidebar__sub--item .sidebar__sub-body { margin-left: 12px; padding-left: 2px; }
.sidebar__ext { font-size: 0.75em; opacity: 0.6; }
.sidebar__sub-manage { opacity: 0.7; font-size: 0.8rem !important; }
.sidebar__sub-empty { padding: 3px 10px; font-size: 0.8rem; opacity: 0.6; }
/* 文字の大きさの切り替え(2026-09)。ノートパソコンで字が小さいという声に備え、利用者が選べる。
   2026-10-23 ユーザー: 小さめ・標準・大 に(特大はやめて、全体を見渡せる「小さめ」を足した) */
html.font-small { font-size: 84.375%; } /* 13.5px。1段で2.5pxずつ(2026-10-23 ユーザー) */
html.font-large { font-size: 115.625%; } /* 18.5px */
/* サイドバーの幅は決まっているので、左上のシステム名は大きくせず1行に収める */
html.font-large .sidebar__title { font-size: 17.6px; }
/* 左のメニューの一番上: 会社名(2026-09-27)。明朝体(欧文のセリフ体 Cormorant Garamond)で。読めないときは游明朝・ヒラギノ明朝 */
.sidebar__brand { display: block; color: #fff; text-decoration: none; margin: 0 0 12px; padding: 2px 4px 12px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.sidebar__brand-name {
  font-family: "Cormorant Garamond", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-weight: 600; font-size: 20px; letter-spacing: 0.05em; line-height: 1.15; white-space: nowrap;
  display: block; overflow: hidden; text-overflow: clip; /* 明朝体の読み込みが遅いときの代わりの字体で、はみ出さないように */
}
.font-scale { margin-bottom: 10px; }
.font-scale__options { display: flex; gap: 6px; justify-content: center; }
/* 標・大・特の1文字。枠も文字も同じ大きさ(2026-09-25)。3つ分の幅(40×3+6×2=132px)に下のボタンの幅を合わせる */
.font-scale__option {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 34px; padding: 0; box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.45); background: transparent; color: #fff;
  border-radius: 6px; cursor: pointer; line-height: 1;
  font-size: 14px; font-weight: 400;
}
.font-scale__option.is-active { background: #fff; color: var(--color-primary); }

/* 左のメニューの一番上: 自分の名前(押すと個人設定)と、文字の大きさ・ログアウト(2026-10-04 ユーザー: 会社名をやめてまとめた) */
.sidebar__me { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 2px 2px 10px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.sidebar__me-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.sidebar__me-name:hover { background: rgba(255,255,255,0.15); }
.sidebar__me-name .sidebar__icon { flex: 0 0 auto; width: 22px; height: 22px; }
.sidebar__me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sidebar__me-staff { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__me-role { font-size: 0.7rem; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__me-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.sidebar__me-actions .sidebar__action { width: 32px; height: 32px; font-size: 14px; }
.sidebar__me-actions .sidebar__icon { width: 18px; height: 18px; }
.sidebar__me-logout { display: flex; margin: 0; }
/* 個人設定 */
.account-section { padding: 12px 0; border-top: 1px solid var(--color-border); }
.account-section:first-of-type { border-top: 0; padding-top: 0; }
.account-section .section-title { margin: 0 0 8px; font-size: 0.95rem; }
/* たためる節(メールの署名。2026-10-29 ユーザー) */
.account-section.account-section--fold { border-top: 1px solid var(--color-border); padding-top: 12px; } /* details は :first-of-type で線が消えるので */
.account-section--fold > summary { cursor: pointer; list-style: none; width: max-content; max-width: 100%; }
.account-section--fold > summary::-webkit-details-marker { display: none; }
.account-section--fold > summary .section-title { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.account-section--fold > summary .section-title::before { content: "▶"; font-size: 0.7em; color: var(--color-muted); }
.account-section--fold[open] > summary .section-title::before { content: "▼"; }
.account-section--fold[open] > summary { margin-bottom: 8px; }
.account-section__count { font-size: 0.8rem; font-weight: normal; color: var(--color-muted); }
.account-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 6px; font-size: 0.9rem; }
.account-info dt { color: var(--color-muted); }
.account-info dd { margin: 0; }
.account-font { justify-content: flex-start; }
.account-font .font-scale__option { width: auto; padding: 0 16px; border-color: var(--color-border); color: var(--color-text, #2b2b2b); }
.account-font .font-scale__option.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.account-list { margin: 0 0 6px; padding-left: 1.2em; font-size: 0.9rem; }

.sidebar__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.22);
  text-align: center;
}
.sidebar__footer form { display: flex; justify-content: center; margin-top: 6px; }
.sidebar__user {
  color: #fff;
  opacity: 0.85;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
/* 文字の大きさの下に並べるアイコン(システム切替・パスワード変更・ログアウト)。枠は標・大・特と同じ大きさ */
.sidebar__actions { display: flex; gap: 6px; justify-content: center; }
.sidebar__footer .sidebar__actions form { display: flex; margin: 0; }
.sidebar__action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 34px; padding: 0; box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.45); background: transparent; color: #fff;
  border-radius: 6px; cursor: pointer; text-decoration: none;
}
.sidebar__action:hover { background: rgba(255,255,255,0.15); }

.site-header-plain {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 20px;
}
.site-header-plain__title {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.page {
  flex: 1;
  min-width: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
/* .app-shell(サイドバー)内では、横方向のauto marginがflexアイテムの
   クロス軸サイズ計算に干渉し、中の表などの内容量に応じて.page自体が
   ビューポート幅を超えて広がってしまう(特にモバイル幅でapp-shellが
   縦並びになったとき顕著)。サイドバーレイアウトでは中央寄せは不要なため、
   marginを外して明示的に幅いっぱいに広げる。 */
.app-shell .page {
  margin: 0;
  width: 100%;
  /* ノートパソコン(15.6インチ・横1366〜1536px程度)で右側に余白が余らないよう、
     サイドバーのある画面は1100pxより広く使う(2026-09) */
  max-width: 1400px;
}
/* 一覧の画面とホームは、大きいモニター(28・32インチ)では窓の幅いっぱいに広げる(2026-10-14 ユーザー: 2000pxまで →
   2026-10-21 ユーザー: 上限なしで窓の幅に合わせる)。ノートパソコンは元から1400pxに届かないので変わらない */
.app-shell .page.page--wide { max-width: none; }

/* スマホ幅(860px以下)のメニュー(2026-09-27 ユーザー希望。スマート葬儀と同じ形)。
   上に「☰・システム名・名前」の細い帯だけを出し、☰を押すと左からメニューが出る(中身はパソコンの左のメニューと同じ)。
   メニューの外(暗い部分)・✕・Esc で閉じる。ページを移ると閉じた状態で開く */
.mobile-bar, .sidebar-backdrop, .sidebar__close { display: none; }
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .mobile-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 900;
    background: var(--color-primary); color: #fff;
    padding: 8px 12px; min-height: 48px; box-sizing: border-box;
  }
  .mobile-bar__menu {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 36px; padding: 0; border: 0; border-radius: 6px;
    background: transparent; color: #fff; cursor: pointer;
  }
  .mobile-bar__menu:hover, .mobile-bar__menu:focus-visible { background: rgba(255,255,255,0.15); }
  .mobile-bar__title { color: #fff; font-weight: 700; text-decoration: none; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bar__user { font-size: 0.8rem; opacity: 0.9; white-space: nowrap; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1001;
    /* 幅は中身に合わせて 270→220(2026-09-27 に測り直した。文字の大きさ「特」でも1行に収まり、✕ と会社名が重ならない) */
    width: 220px; max-width: 85vw; height: 100%; box-sizing: border-box;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(-105%); transition: transform 0.2s ease;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell--menu-open .sidebar { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.25); }
  .app-shell--menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.4); }
  html.menu-open { overflow: hidden; }
  .sidebar__close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
    border: 0; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.1rem; cursor: pointer;
  }
  .sidebar__brand { padding-right: 44px; }
  .sidebar__me { padding-right: 40px; }
  /* 行間はパソコンと同じく詰める(2026-09-27)。指で押しやすいよう中の項目は少しだけ広め */
  .sidebar__group-body a { padding: 6px 10px; }
  .sidebar__footer { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
@media print { .mobile-bar, .sidebar-backdrop { display: none !important; } }

/* 事前相談管理システムのメニューも同じ青(2026-10-07 ユーザー: ペールピンクはやめる。前は .app-shell--consultation で色を変えていた) */

/* 一時的な案内のポップアップ(2026-09-27)。画面の上に場所を取らないよう重ねて出す。
   2026-11-02 ユーザー: 右上だと画面の上のボタン(編集・削除など)と重なって邪魔 → 画面の下のまん中に出す(スマホは下の帯の上) */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px; font-size: 0.9rem; line-height: 1.5;
  background: #fff; color: var(--color-text); border: 1px solid var(--color-border); border-left-width: 5px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15); animation: toast-in 0.2s ease-out;
}
.toast--notice { border-left-color: #3f8f5a; }
.toast--alert { border-left-color: var(--color-danger); }
.toast__icon { flex: 0 0 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; margin-top: 1px; }
.toast--notice .toast__icon { background: #3f8f5a; }
.toast--alert .toast__icon { background: var(--color-danger); }
/* 長い案内は折り返し、画面の4割を超える分は枠の中でスクロール(下の画面を隠しすぎないように) */
.toast__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; max-height: 40vh; overflow-y: auto; }
.toast__close { flex: 0 0 auto; border: 0; background: transparent; color: var(--color-muted); cursor: pointer; font-size: 0.85rem; padding: 2px 4px; border-radius: 4px; }
.toast__close:hover { background: #f0efec; }
.toast--leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast--leaving { transition: none; } }
@media (max-width: 860px) { .toasts { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 10px); left: 12px; right: 12px; transform: none; width: auto; } }
@media print { .toasts { display: none; } }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.flash--notice { background: #e7eaf5; color: var(--color-primary-dark); }
.flash--alert { background: #fbeceb; color: var(--color-danger); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.page-title {
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: var(--color-primary);
}

.section-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  color: var(--color-primary-dark);
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}
/* ボタン(button・送るボタン)も、リンクのボタンと同じ字体・行の高さに(2026-11-21 ユーザー: メッセージの画面の上のボタンで
   「一覧から外す」「削除する」だけ枠が低かった。button は画面の字体と行の高さを受け継がず、Arial・低い行になっていた)→ どの画面も枠の高さがそろう */
button.btn, input.btn { font-family: inherit; line-height: inherit; vertical-align: middle; }
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn--secondary {
  background: #fff;
  color: var(--frame);
  border-color: var(--frame);
}
.btn--secondary:hover { background: #eef3fa; }
.btn--danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
}
.btn--danger-outline { background: transparent; color: var(--color-danger); border-color: var(--color-danger); }
.btn--danger-outline:hover { background: #fbeceb; }
.btn--sm { padding: 5px 10px; font-size: 0.82rem; }
.btn:disabled, .btn:disabled:hover {
  opacity: 0.4; cursor: not-allowed; background: transparent; color: var(--color-muted); border-color: var(--color-border);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 20px;
}
/* 横に並べる入力欄とボタンの上下をそろえる(2026-09-26)。.field の下の余白があるとボタンだけ下にずれるため消し、
   ボタンの高さも入力欄(38px)に合わせる */
.search-form .field, .compact-list .search-form .field { margin-bottom: 0; }
.search-form .btn:not(.btn--sm) { height: 38px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center; }
/* 一覧の絞り込み欄をコンパクトに(2026-09-27 ユーザー希望)。薄い地の帯にまとめ、入力欄は高さ32px・小さめの文字、
   幅は中身に合わせる。見出し(label)は小さく、細かい説明は入力欄の薄い文字(placeholder)にした。
   期間は「開始 〜 終了」を1つの欄に(SearchFormHelper#search_date_range) */
.search-form {
  background: var(--band);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.compact-list .search-form { margin-bottom: 12px; gap: 8px 12px; }
.search-form .field { gap: 2px; }
.search-form .field label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; color: var(--color-primary); }
.search-form .field input[type=text],
.search-form .field input[type=date],
.search-form .field input[type=month],
.search-form .field input[type=number],
.search-form .field select {
  height: 30px;
  padding: 2px 8px;
  font-size: 0.8rem;
  min-width: 0;
  background-color: #fff;
  border-color: #d6d3cc;
  border-radius: 7px;
}
.search-form .field input[type=text] { width: 180px; }
.search-form .field select { width: auto; min-width: 110px; max-width: 220px; padding-right: 24px; }
.search-form .field input[type=date] { width: 118px; font-variant-numeric: tabular-nums; }
.search-form .field input::placeholder { color: #8c887f; }
.search-form .field input:focus, .search-form .field select:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(79, 95, 140, 0.15);
}
.search-form input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.45; cursor: pointer; }
.search-form input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 0.8; }
.date-range { display: flex; align-items: center; gap: 4px; }
.date-range__sep { color: var(--color-muted); font-size: 0.8rem; }
.search-form .btn:not(.btn--sm) { height: 30px; padding: 0 14px; font-size: 0.8rem; border-radius: 7px; }
.search-form__actions { display: flex; align-items: center; gap: 10px; }
.search-form__submit { gap: 5px; }
.search-form__icon { flex: none; }
.search-form__clear { font-size: 0.8rem; color: var(--color-muted); text-decoration: none; white-space: nowrap; }
.search-form__clear:hover { color: var(--color-danger); text-decoration: underline; }
/* 施行一覧の「詳しい条件」(よく使わない絞り込みをしまう) */
.search-more { flex-basis: 100%; }
.search-more > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 0.8rem; color: var(--color-primary-dark); font-weight: 600; user-select: none;
}
.search-more > summary::-webkit-details-marker { display: none; }
.search-more > summary::before { content: "▸"; font-size: 0.75rem; transition: transform 0.15s; }
.search-more[open] > summary::before { transform: rotate(90deg); }
.search-more__count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--color-primary); color: #fff; font-size: 0.7rem;
}
.search-more__body { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 8px; }
@media (max-width: 600px) {
  /* スマホでは欄を横いっぱいにして縦に並べる(期間は開始・終了を半分ずつ) */
  .search-form .field, .search-more__body .field { flex: 1 1 100%; }
  .search-form .field input[type=text], .search-form .field select { width: 100%; max-width: none; }
  .date-range input[type=date] { flex: 1 1 0; width: auto; min-width: 0; }
}
/* 顧客詳細のタブ(2026-09-27。GitHub のタブの形。選んでいるタブは下に橙の線) */
.tabs {
  display: flex; gap: 2px; margin: 16px 0 14px; border-bottom: 1px solid var(--color-border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 9px; margin-bottom: -1px;
  color: var(--color-muted); text-decoration: none; font-size: 0.9rem; white-space: nowrap;
  border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0;
}
.tabs__tab:hover { color: var(--color-text); background: #f1f0ec; }
.tabs__tab.is-active { color: var(--color-primary); font-weight: 600; border-bottom-color: var(--color-primary); }
.tabs__icon { flex: none; opacity: 0.8; }
.tabs__count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 9px; background: #e9e7e1; color: var(--color-text); font-size: 0.72rem; font-weight: 600;
}
.tabs__panel > .table-wrap:first-child, .tabs__panel > .funeral-case-panel:first-child { margin-top: 0; }
.tabs__label--short { display: none; }
@media (max-width: 600px) {
  .tabs__tab { padding: 8px 9px 9px; gap: 5px; }
  .tabs__icon { display: none; }
  .tabs__label { display: none; }
  .tabs__label--short { display: inline; }
}
/* 発行時のPDF(写し)の一覧(請求書・領収書の詳細) */
.issued-pdfs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 0.82rem; }
.issued-pdfs__label { font-weight: 600; color: var(--color-muted); }
.issued-pdfs__item { text-decoration: none; border: 1px solid var(--color-border); border-radius: 6px; padding: 2px 8px; background: #fbfaf8; }
.issued-pdfs__item:hover { border-color: var(--color-primary); }
/* 選択肢のまとめ: まとめ先 ← 消す方 の矢印(入力欄の高さの真ん中に置く) */
.merge-arrow { height: 38px; display: inline-flex; align-items: center; font-size: 1.3rem; color: var(--color-muted); }
[hidden] { display: none !important; }

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
/* 項目名は濃い字で少し太く(2026-10-13 ユーザー: 薄いグレーで見づらい) */
.field label { font-size: 0.85rem; color: #2f2c28; font-weight: 600; }
/* 入力欄の見た目は種類を問わず揃える。type別に指定しているため、
   新しい種類の入力欄を使うときはここに追加すること
   (色見本のcolorとファイル選択のfileは、専用の見た目のままにする)。 */
.field input[type=text],
.field input[type=tel],
.field input[type=date],
.field input[type=month],
.field input[type=datetime-local],
.field input[type=number],
.field input[type=email],
.field input[type=url],
.field input[type=password],
.field select,
.field textarea {
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-control);
  font-size: 0.95rem;
  min-width: 220px;
  /* 日時やプルダウンはブラウザが独自に余白を足すため、高さを明示して揃える */
  height: 38px;
}
.field textarea { min-height: 80px; height: auto; }

/* 時刻の欄(2026-10-23 ユーザー: 5分刻みで選べるように。time_picker_controller.js)。
   日付の箱はブラウザのカレンダーの窓と同じくらいの幅・時刻の箱はそのすぐ隣。押すと下に「時」「分」の2列(時刻の箱と同じ幅) */
.tp { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
/* 日時の欄は、狭い所(顧客登録の表の1マスなど)でも時刻の箱が日付のすぐ隣に来るよう、日付の箱を少し縮める(広い所では 218px まで) */
.tp--datetime { display: flex; flex-wrap: nowrap; width: 100%; max-width: 336px; }
.field .tp input.tp-date, .tp input.tp-date { flex: 1 1 218px; width: auto; min-width: 128px; max-width: 218px; }
.tp-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; min-width: 0 !important; height: 1px !important;
  padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.tp-box { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; width: 112px; height: 38px; box-sizing: border-box;
  padding: 0 10px 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius); background: #fff; color: var(--color-text, #222020);
  font: inherit; font-size: 0.95rem; font-variant-numeric: tabular-nums; cursor: text; }
.tp-box.is-disabled { opacity: 0.55; cursor: default; }
.tp-box:focus-within { border-color: var(--frame); box-shadow: 0 0 0 2px rgba(47, 95, 147, 0.2); }
/* 時刻の箱の中の打てる欄(2026-10-23 ユーザー: 手で打ちたい)。枠は外の箱が持つ */
.field .tp .tp-box input.tp-box__text, .tp .tp-box input.tp-box__text {
  flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; padding: 0 !important; border: 0 !important; background: transparent !important;
  box-shadow: none !important; outline: none; font: inherit; color: inherit; font-variant-numeric: tabular-nums; cursor: text; }
.tp-box__clock { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; border: 0; background: none; cursor: pointer; color: #4a4f57; }
.tp-box svg { width: 17px; height: 17px; flex: none; }
.tp-panel { position: fixed; z-index: 3500; box-sizing: border-box; padding: 6px; background: #fff; border: 1px solid var(--color-border);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(20, 30, 45, 0.18); }
.tp-cols { display: flex; gap: 6px; }
.tp-col { flex: 1 1 0; min-width: 0; height: 252px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.tp-col::-webkit-scrollbar { display: none; }
.tp-item { height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 15px;
  font-variant-numeric: tabular-nums; cursor: pointer; user-select: none; }
.tp-item:hover { background: #e8eef7; }
.tp-item.is-on { background: #0b6fe0; color: #fff; font-weight: 700; }
.tp-clear { display: block; width: 100%; margin-top: 6px; padding: 4px 0; border: 0; border-top: 1px solid var(--color-border); background: none;
  color: var(--frame); font: inherit; font-size: 0.85rem; cursor: pointer; }
@media (max-width: 860px) { .tp-box { height: 44px; font-size: 17px; } }

/* auto-fitではなくauto-fillを使う。auto-fitは項目が少ないと空いた列が潰れて
   残りの入力欄が引き伸ばされるため、施行ステータスによって欄の幅が変わってしまう。
   auto-fillなら空き列がそのまま残り、項目数に関係なく幅が揃う(右側は空白になる)。 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 20px;
}
/* 件名のように長い文字列を入れる項目は2列分の幅を使う */
.field--wide { grid-column: span 2; }

/* 件名の入力欄と「他候補」を横に並べる */
.title-input-row { display: flex; gap: 8px; align-items: center; }
.title-input-row input[type=text],
.title-input-row textarea { flex: 1 1 auto; min-width: 0; }
.title-input-row--note { align-items: flex-start; }
.title-input-row--note textarea { min-height: 80px; }
.title-input-row .title-picker {
  flex: 0 0 120px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  height: 38px;
}

.required-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.register-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.register-menu__card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s;
}
.register-menu__card:hover { border-color: var(--color-accent); }
.register-menu__card strong { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.register-menu__card p { margin: 0; }

/* チェックボックスは初期状態だと小さくて押しにくいため、大きめにする */
input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 0.9rem;
}

/* 列数の多い表は狭い画面(スマホ等)で収まりきらないことがあるため、
   .table-wrapで囲んでおくと、その部分だけ横スクロールできるようになる
   (ページ全体が横に広がってしまうのを防ぐ)。 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* 横に続く表の知らせ(2026-11-17 ユーザー。application.js の setupScrollHints)。右の端をぼかす・上に小さく「→ 横に続きます」 */
.table-wrap.is-scrollx { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), rgba(0, 0, 0, 0.25)); mask-image: linear-gradient(to right, #000 calc(100% - 36px), rgba(0, 0, 0, 0.25)); }
.scroll-hint { text-align: right; font-size: 0.8rem; color: var(--frame, #2f5f93); margin: 4px 2px 2px; font-weight: 600; }
.scroll-hint[hidden] { display: none; }
@media print { .scroll-hint { display: none !important; } .table-wrap.is-scrollx { -webkit-mask-image: none; mask-image: none; } }
/* 横に長い表のスクロールバーを画面の下に貼り付ける(sticky_scrollbar_controller.js)。表の本来のバーは隠す */
.table-wrap--sticky-scroll { scrollbar-width: none; }
.table-wrap--sticky-scroll::-webkit-scrollbar { display: none; }
.sticky-hscroll {
  position: sticky; bottom: 0; z-index: 5; overflow-x: auto; overflow-y: hidden; height: 16px;
  background: var(--color-surface); border-top: 1px solid var(--color-border);
}
.sticky-hscroll > div { height: 1px; }
/* スマホは下の帯の上に出す(帯に隠れないように。2026-10-19) */
@media (max-width: 860px) { .sticky-hscroll { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px); } }
/* 指で横にすべらせる端末(スマホ・タブレット)では出さない(iPhone はスクロールバーを出さないので、白い帯だけが残っていた。2026-10-25 ユーザー) */
@media (hover: none) and (pointer: coarse) { .sticky-hscroll { display: none; } }
/* 一覧を下へ進めても見出しの行を画面の上に残す(sticky_thead_controller.js。2026-10-14)。見出しの写しを画面の上に重ねる */
.table-wrap.sticky-thead { position: fixed; z-index: 40; overflow: hidden; margin: 0; padding: 0; box-shadow: 0 3px 6px -3px rgba(17, 57, 97, 0.35); }
.sticky-thead > table { margin: 0; table-layout: fixed; min-width: 0; }
/* 写しは右はしを薄くしない(薄くすると後ろの行の字が透けて見えた。2026-11-20 ユーザー) */
.table-wrap.sticky-thead.is-scrollx { -webkit-mask-image: none; mask-image: none; }
@media print { .sticky-thead { display: none !important; } }
/* 横スクロールできる表は、見出しを折り返さない(スマホで見出しが1文字ずつ縦に並ぶのを防ぐ。2026-09-26) */
.table-wrap .table th { white-space: nowrap; }
/* 画面上部の「見出し ⇔ ボタン」の行(style で display:flex; justify-content:space-between と書いているもの)は、
   幅が足りないときにボタンを次の行へ回す(スマホで見出しが縦に潰れるのを防ぐ。2026-09-26) */
.card > [style*="justify-content:space-between"], .card > [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 8px 12px; }
/* 文中のファイル名などの長い英数字は、途中で折り返す(スマホで横にはみ出さないように) */
main code { overflow-wrap: anywhere; }
/* 「項目名 | 中身」を縦に並べた表(顧客詳細の喪主情報・対象者情報など)は、スマホでは横スクロールにせず中身を折り返す。
   一覧の表(見出しが上に並ぶもの)はこれまでどおり横スクロール */
@media (max-width: 600px) {
  /* 2026-11-08 ユーザー(スマホ): 行の頭に見出しがある3列以上の表(プラン別の件数・補足資料・担当者設定など)にも効いて、
     列がつぶれて文字が1文字ずつ縦に並んでいた → 2列(項目名|中身)の表だけにする */
  .table-wrap .table:has(tr > th + td):not(:has(tr > :nth-child(3))) { min-width: 0; }
  /* 項目名の列は細めに・字も少し小さく(2026-11-20 ユーザー: 中身の枠がせまく改行が多い。前は 8.5em)。
     対象者の枠の中の表は、外の表と中身の枠の左・項目名の書き出しがそろうように、枠の内側の余白の分だけ項目名の列を細くし、左の余白も減らす(--kv-label-shift) */
  .table-wrap .table:has(tr > th + td):not(:has(tr > :nth-child(3))) th { width: calc(6.4rem - var(--kv-label-shift, 0px)) !important; white-space: normal; font-size: 0.85rem; padding-left: max(0px, calc(6px - var(--kv-label-shift, 0px))); padding-right: 6px; }
  .table-wrap .table:has(tr > th + td):not(:has(tr > :nth-child(3))) td { white-space: normal; overflow-wrap: anywhere; }
  .funeral-case-panel__summary { padding: 10px 12px; }
  /* 後ろの .funeral-case-panel__body の決まりに負けないよう、1段くわしく書く */
  .funeral-case-panel > .funeral-case-panel__body { padding: 12px 6px 12px; --kv-label-shift: 7px; }
}
/* 長い名前のボタン(「スマート葬儀のユーザー一覧からまとめて登録」など)は、スマホでは折り返して画面に収める */
@media (max-width: 600px) { main .btn { white-space: normal; max-width: 100%; } }
/* 表の中のボタン(「編集」「無効化する」など)は折り返さない(2026-11-08 ユーザー: 商品マスタで「編集」が縦に・「無効化する」が2行に) */
main .table .btn { white-space: nowrap; }
/* ファイルを選ぶ欄は画面の幅まで(スマホで「ファイル未選択」の白い帯が右にはみ出していた。2026-11-08) */
input[type=file] { max-width: 100%; }

.table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  background: var(--color-surface);
}
.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.92rem;
}
.table th { background: var(--band); color: var(--color-primary); font-weight: 600; }
.table tr:hover td { background: #fafaf8; }
/* 押すと開く行(2026-09-27。row_link_controller.js)。乗せると色が変わり、指の形になる */
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #eef1f8; }
.table tr[data-href]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--pre_consultation { background: #e6edf7; color: #2a5090; }
.badge--funeral_customer { background: #efe6e2; color: var(--color-accent); }
.badge--member_only { background: #e7f1e8; color: #2f6b3c; }
.badge--retail_customer { background: #f2ecd8; color: #8a6d1f; }
.badge--member { background: #e4f2e8; color: #2f7a4a; }
.badge--deceased { background: #e9e9e9; color: #555; }
.badge--muted { background: #f0efec; color: #6b6b6b; }
.badge--draft { background: #e9e9e9; color: #555; }
.badge--legacy { background: #ece7f5; color: #5a4a8a; }
.badge--issued { background: #e4f2e8; color: #2f7a4a; }
.badge--voided { background: #fbeceb; color: var(--color-danger); }
/* 取消(未回収)の領収書の知らせ(2026-09-30) */
.alert-box { padding: 10px 12px; border-radius: var(--radius); background: #fbeceb; color: #8a2a24; font-size: 0.85rem; line-height: 1.6; }
.notice-bar { padding: 8px 12px; border-radius: var(--radius); background: #edf0f5; border-left: 4px solid var(--frame, #2f5f93); font-size: 0.9rem; } /* 待っているものの知らせ(2026-11-04 事前相談一覧) */
.badge--set { background: #efe6e2; color: var(--color-accent); }
.badge--unpaid { background: #fbeceb; color: var(--color-danger); }
.badge--partially_paid { background: #f2ecd8; color: #8a6d1f; }
.badge--paid { background: #e4f2e8; color: #2f7a4a; }
.badge--estimate_target { background: #e6edf7; color: #2a5090; }
.badge--deceased_target { background: #efe6e2; color: var(--color-accent); }
.badge--new_consultation { background: #e6edf7; color: #2a5090; }
.badge--considering { background: #f2ecd8; color: #8a6d1f; }
.badge--contracted { background: #e4f2e8; color: #2f7a4a; }
.badge--following_up { background: #efe6e2; color: var(--color-accent); }
.badge--completed { background: #e9e9e9; color: #555; }
.badge--retail_target { background: #f2ecd8; color: #8a6d1f; }

.line-item-block {
  border-top: 1px dashed var(--color-border);
  padding-top: 16px;
  margin-top: 16px;
}
.line-item-block:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.duplicate-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.duplicate-item {
  border: 1px solid var(--color-border);
  border-left-width: 5px;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--color-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.duplicate-item--strong { border-left-color: var(--color-danger); }
.duplicate-item--medium { border-left-color: var(--color-warning); }
.duplicate-item--weak { border-left-color: var(--color-border); }
.duplicate-item--member { border-left-color: #2f8f5b; }
.duplicate-item__detail { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 2px; } /* 電話・住所(2026-11-07 番地まで出す) */

.level-tag { font-size: 0.78rem; font-weight: 700; }
.level-tag--strong { color: var(--color-danger); }
.level-tag--medium { color: var(--color-warning); }
.level-tag--weak { color: var(--color-muted); }
.level-tag--member { color: #2f7a4f; }

/* 重複の統合(2026-10-02): 顧客詳細の「似た顧客」・重複の候補・比べてまとめる */
.similar-box { margin: 8px 0 12px; border: 1px solid #f0c27a; background: #fff8ea; border-radius: 8px; padding: 6px 12px; }
.similar-box summary { cursor: pointer; font-size: 0.9rem; color: #7a4a00; }
.similar-box .table { margin: 6px 0 2px; background: transparent; }
.similar-box .table td { padding: 4px 8px; vertical-align: middle; }
/* 2026-10-27 ユーザー(スマホ): 似た顧客を開くと表が右へはみ出して画面が横に長くなった(.table の min-width: max-content)。
   枠の中で折り返し、スマホでは1人を縦に並べる */
.similar-box .table { min-width: 0; width: 100%; }
@media (max-width: 860px) {
  .similar-box .table, .similar-box .table tbody, .similar-box .table tr, .similar-box .table td { display: block; width: auto; }
  .similar-box .table tr { margin-top: 6px; padding: 6px 10px; background: #fff; border: 1px solid #f0c27a; border-radius: 6px; }
  .similar-box .table td { padding: 2px 0; border: 0 !important; border-radius: 0 !important; white-space: normal !important; background: transparent !important; }
}
.merge-group { border: 1px solid var(--color-border); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.merge-group__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: #f3f5fa; }
.merge-group__table { margin: 0; font-size: 0.8rem; }
.merge-group__table td, .merge-group__table th { padding: 5px 8px; }
.merge-group__table tr.is-kept td { background: #f2f8f3; }
.merge-compare td, .merge-compare th { vertical-align: top; }
.merge-compare__same td { color: var(--color-muted); }
.merge-compare__pick { display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
.merge-compare__pick input { margin-top: 3px; }
/* 会員価格の確認(2026-10-02。ユーザー: 注意は派手目に) */
.member-check { border-radius: 8px; margin: 10px 0 14px; }
.member-check--ok { padding: 8px 12px; background: #eaf6ee; border: 1px solid #9fd2ae; color: #24603a; font-size: 0.85rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.member-check__ok-mark { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #2f8a50; color: #fff; align-items: center; justify-content: center; font-weight: 700; }
.member-check--alert { border: 3px solid #d62f1f; background: #fff4f2; box-shadow: 0 0 0 4px rgba(214, 47, 31, 0.12); animation: member-check-glow 1.6s ease-in-out infinite; overflow: hidden; }
.member-check__head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; color: #fff;
  background: repeating-linear-gradient(-45deg, #d62f1f 0 18px, #e2452f 18px 36px); }
.member-check__siren { font-size: 2rem; line-height: 1; animation: member-check-blink 1s steps(2, start) infinite; }
.member-check__title { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.02em; }
.member-check__sub { font-size: 0.85rem; opacity: 0.95; }
.member-check__body { padding: 10px 16px 14px; font-size: 0.88rem; }
.member-check__step { margin: 10px 0 6px; font-weight: 600; color: #6b1a10; }
.member-check__cand { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border: 1px solid #f0c4bd; border-radius: 8px; background: #fff; margin-bottom: 6px; cursor: pointer; }
.member-check__cand.is-disabled { opacity: 0.6; cursor: not-allowed; }
.member-check__ng { color: #b0281a; font-size: 0.8rem; }
.member-check__search { display: flex; gap: 6px; margin: 6px 0 4px; }
.member-check__search input[type=text] { max-width: 340px; }
.member-check__join { background: #d62f1f; border-color: #d62f1f; font-weight: 700; }
.member-check__join:hover { background: #b8261a; }
.badge--warn { background: #fff1d6; color: #8a5200; }
.member-check-badge { display: inline-block; background: #d62f1f; color: #fff; font-size: 0.72rem; font-weight: 700; border-radius: 99px; padding: 1px 8px; animation: member-check-blink-soft 1.4s ease-in-out infinite; white-space: nowrap; }
.home__notice--member { background: repeating-linear-gradient(-45deg, #d62f1f 0 14px, #e2452f 14px 28px) !important; color: #fff !important; border-color: #d62f1f !important; font-weight: 700; }
@keyframes member-check-glow { 0%, 100% { box-shadow: 0 0 0 4px rgba(214, 47, 31, 0.12); } 50% { box-shadow: 0 0 0 8px rgba(214, 47, 31, 0.25); } }
@keyframes member-check-blink { to { visibility: hidden; } }
@keyframes member-check-blink-soft { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .member-check--alert, .member-check__siren, .member-check-badge { animation: none; } }
@media print { .member-check { display: none; } }
.use-existing { margin: 12px 0; padding: 10px 12px; border: 1px solid #b9cdf0; background: #f3f7fe; border-radius: 8px; }
.use-existing__title { margin: 0 0 8px; font-weight: 600; }
.use-existing__form { display: inline-block; margin: 0 8px 6px 0; }
.use-existing__note { margin: 0 0 8px; font-size: 0.9rem; }
.use-existing__warn { margin: 4px 0; padding: 4px 8px; border-left: 4px solid #d9a400; background: #fff7d6; font-size: 0.9rem; border-radius: 4px; }
.use-existing__warn--strong { border-left-color: #b3261e; background: #fdecea; color: #8a1c15; font-weight: 600; }

.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.master-edit-row__color { display: flex; align-items: center; gap: 6px; min-width: 0; }
.master-edit-row__color label,
.master-edit-row__toggle { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.master-edit-row__toggle input[type=checkbox] { width: 15px; height: 15px; }
.master-edit-row__color input[type=checkbox] { width: 15px; height: 15px; }
.master-edit-row__color input[type=color] { flex: 0 0 44px; }

/* 選択肢マスタ・寺院名の一覧。1行は「編集フォーム(保存まで)」と「操作ボタン(並び替え・削除)」の
   2つに分かれている。削除ボタンをフォームの中に置くと<form>の入れ子になり、ブラウザが
   内側のフォームを無視して削除が効かなくなるため、必ず兄弟要素として並べること。
   同じ理由で、<tr>の中にフォームを置く形(表組み)も使えない。 */
/* 一覧全体で列の幅を共有する(subgrid)。行ごとに操作ボタンの幅(「記録N件」「初期値にする」など)が違うと、
   見出しと各行の入力欄の位置がずれるため(2026-09-26)。 */
.master-edit-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; }
.master-edit-list--sortable { grid-template-columns: 18px minmax(0, 1fr) auto; }
.master-edit-list > * { grid-column: 1 / -1; }
.master-edit-row {
  display: grid;
  grid-template-columns: subgrid;
  gap: 12px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--color-border);
}
.master-edit-row__form {
  display: grid;
  gap: 8px;
  align-items: center;
}
.master-edit-row__actions { display: flex; gap: 6px; align-items: center; }
/* 「記録N件」は件数の桁で幅が変わると行ごとに入力欄の位置がずれるので、幅をそろえる(記録9999件まで) */
.usage-btn { min-width: 7.2em; text-align: center; }
.similar-name-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 8px; font-size: 0.82rem; color: #8a5a00; background: #fff6e0; border: 1px solid #f0d48a; border-radius: var(--radius); }
.unregistered-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.unregistered-row__value { flex: 0 1 auto; min-width: 8em; overflow-wrap: anywhere; }
.unregistered-row__note { flex-basis: 100%; margin: 0; }
.inline-form { display: flex; align-items: center; gap: 6px; }
.inline-form select { padding: 5px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.85rem; max-width: 220px; }
/* 行をつかんで並べ替えられる一覧(左端につまみ「⠿」の列を足す) */
.drag-handle { cursor: grab; color: var(--color-muted); font-size: 1.1rem; line-height: 1; user-select: none; text-align: center; }
.drag-handle:hover { color: var(--color-primary); }
.master-edit-row--unconfirmed { background: #fff6e0; }
/* スマホ幅では1行を縦に積む(入力欄 → 操作ボタンの順。見出し行は隠す) */
@media (max-width: 860px) {
  .master-edit-list, .master-edit-list--sortable { display: flex; flex-direction: column; }
  .master-edit-row, .master-edit-list--sortable .master-edit-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; }
  .master-edit-list:not(.master-edit-list--sortable) .master-edit-row { grid-template-columns: minmax(0, 1fr); }
  .master-edit-row--header { display: none !important; }
  .master-edit-row__form { grid-template-columns: minmax(0, 1fr) !important; }
  .master-edit-row__actions { grid-column: 1 / -1; flex-wrap: wrap; }
}
.master-edit-row.is-dragging { opacity: 0.5; background: var(--color-bg, #f6f6f4); }
.master-edit-row--header {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
}
.master-edit-row__form input[type=text],
.master-edit-row__form select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.master-edit-row__form input[type=color] { width: 100%; min-width: 44px; height: 32px; }

/* 一覧テーブルの操作列(編集・削除など)を横並びでコンパクトに表示する。
   button_toが生成する<form>は既定でdisplay:blockのため、並べないと
   ボタンごとに改行されてしまう。 */
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.attachment-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.attachment-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

/* 商品マスタ〜ログイン履歴など、設定・管理系の一覧画面をコンパクトに
   表示するためのスコープ付きクラス(他画面の.table/.cardには影響しない)。 */
.compact-list.card { padding: 14px 16px; }
.compact-list .page-title { font-size: 1.2rem; margin-bottom: 10px; }
.compact-list .hint { font-size: 0.8rem; }
.compact-list .section-title { font-size: 0.95rem; }
.compact-list .table th, .compact-list .table td { padding: 5px 10px; font-size: 0.9rem; } /* 2026-10-13: 0.85rem → 0.9rem(見やすく) */
.compact-list .field { margin-bottom: 8px; }
.compact-list .form-grid { row-gap: 4px; }
/* 一覧・詳細の画面の中の入力欄(入金の記録など)も小さめに(2026-09-27) */
.compact-list .field label { font-size: 0.8rem; }
.compact-list .field input[type=text], .compact-list .field input[type=tel], .compact-list .field input[type=date],
.compact-list .field input[type=datetime-local], .compact-list .field input[type=number], .compact-list .field input[type=email], .compact-list .field input[type=url],
.compact-list .field select {
  height: 32px; padding: 4px 8px; font-size: 0.85rem;
}
.compact-list .field textarea { font-size: 0.85rem; }
/* 一覧の右上の「顧客登録」などのボタンも、検索ボタンと同じ大きさにする(2026-09-27 ユーザー希望) */
.compact-list .btn:not(.btn--sm) {
  height: 30px; padding: 0 14px; font-size: 0.8rem; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
/* 個人設定のログアウト(2026-10-18 ユーザー: 赤い枠に赤い字のまま、アイコンを付ける。紺の枠に赤い字は見づらい) */
.account-logout .line-icon { width: 16px; height: 16px; }

.hint { color: var(--color-muted); font-size: 0.85rem; }
/* マウスを乗せると説明が出る「?」(ApplicationHelper#help_tip) */
.help-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 50%;
  border: 1px solid #b8b5ae; color: var(--color-muted); background: var(--color-surface);
  font-size: 0.7rem; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; user-select: none;
}
.help-tip:hover, .help-tip:focus { border-color: var(--color-primary); color: var(--color-primary); outline: none; }
@media print { .help-tip, .help-tip-bubble { display: none !important; } }
/* 「?」の説明の吹き出し(help_tip_controller.js) */
.help-tip-bubble {
  position: absolute; z-index: 3000; padding: 8px 10px; border-radius: 8px;
  background: #2f3441; color: #fff; font-size: 0.8rem; font-weight: 400; line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); white-space: pre-wrap; text-align: left;
  max-height: 60vh; overflow-y: auto;
}
/* 数字そのものに付ける吹き出し(detail_tip)。丸の「?」ではなく点線の下線 */
.help-tip.detail-tip {
  display: inline; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; background: none;
  font-size: inherit; font-weight: inherit; color: inherit; line-height: inherit; vertical-align: baseline; user-select: text;
  border-bottom: 1px dotted currentColor; cursor: help;
}
.help-tip.detail-tip:hover, .help-tip.detail-tip:focus { color: var(--color-primary); border-color: var(--color-primary); }
@media print { .help-tip.detail-tip { display: inline !important; border: 0; } }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.dashboard-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.dashboard-stat__label { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 6px; }
.dashboard-stat__value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-chart__row {
  display: grid;
  grid-template-columns: 96px 1fr 52px;
  align-items: center;
  gap: 10px;
}
.bar-chart__label {
  font-size: 0.85rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-chart__track {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  height: 14px;
  overflow: hidden;
}
.bar-chart__fill {
  background: var(--color-primary);
  height: 100%;
  border-radius: 4px;
  min-width: 4px;
  transition: background 0.15s ease;
}
.bar-chart__row:hover .bar-chart__fill { background: var(--color-primary-dark); }
.bar-chart__value {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px 20px;
  margin-bottom: 14px;
}
/* 役割・権限管理のまとまりの見出し(左のメニューの名前) */
.permission-group { font-size: 0.85rem; font-weight: 600; margin: 14px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--color-border, #e3e1dc); color: var(--color-muted, #666); }
.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.permission-check__text { display: flex; flex-direction: column; line-height: 1.35; }
.permission-check__note, .perm-matrix__note { font-size: 0.75rem; color: var(--color-muted, #6b6b6b); font-weight: 400; }

/* 役割ごとの権限の表(ページ × 表示/作成・更新/削除。2026-10-04 ユーザー: スマート葬儀の権限の画面が参考) */
.perm-table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
.perm-table th, .perm-table td { border: 1px solid var(--color-border, #e3e1dc); padding: 6px 10px; }
.perm-table thead th { background: #f5f6f9; font-weight: 600; text-align: center; vertical-align: bottom; }
.perm-table thead .perm-table__page { text-align: left; }
.perm-table__page { text-align: left; font-weight: 500; min-width: 170px; }
.perm-table tbody tr:not(.perm-table__group):nth-child(even) th, .perm-table tbody tr:not(.perm-table__group):nth-child(even) td { background: #fafbfc; }
.perm-table__col { width: 15%; }
.perm-table__col--extra { width: 26%; }
.perm-table__all { display: block; margin-top: 4px; cursor: pointer; }
.perm-table__group th { background: #eef2f8 !important; text-align: left; font-size: 0.8rem; font-weight: 600; color: #3d4a66; padding: 5px 10px; }
.perm-table__cell { text-align: center; }
.perm-table__cell--extra { text-align: left; }
.perm-table__cell--span { background-image: linear-gradient(90deg, transparent 0, transparent 100%); }
.perm-table__part { display: inline-flex; align-items: center; gap: 5px; margin: 2px 6px; padding: 3px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.perm-table__part input { width: 17px; height: 17px; cursor: pointer; }
.perm-table__cell--extra .perm-table__part { display: flex; white-space: normal; margin: 2px 0; }
.perm-table__part.is-on { background: #dff3e4; }
.perm-table__part.is-off { background: #fde6e4; }
.perm-table__none { color: #b8bcc4; }
.perm-table__everyone { font-size: 0.78rem; color: #4f6b4f; }
.perm-table__incl { display: inline-block; margin: 2px 6px; font-size: 0.78rem; color: #b8bcc4; white-space: nowrap; }
.perm-table__incl.is-active { color: #4f5f8c; }
@media (max-width: 860px) {
  .perm-table { font-size: 0.8rem; }
  .perm-table th, .perm-table td { padding: 5px 6px; }
  .perm-table__page { min-width: 110px; }
  .perm-table__cell--extra { min-width: 150px; }
  .perm-table__incl { margin: 2px 0; }
  .perm-matrix__actions.is-dirty a.btn { display: none; }
}

/* 役割・権限管理の一覧表(行=機能・列=役割。2026-10-04) */
.perm-matrix-wrap { max-height: calc(100vh - 230px); overflow: auto; border: 1px solid var(--color-border, #e3e1dc); border-radius: 8px; }
.perm-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.85rem; }
.perm-matrix th, .perm-matrix td { border-bottom: 1px solid var(--color-border, #e3e1dc); padding: 6px 10px; background: var(--color-surface, #fff); }
.perm-matrix thead th { position: sticky; top: 0; z-index: 2; background: #f5f6f9; vertical-align: bottom; }
.perm-matrix .perm-matrix__feature { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; min-width: 230px; max-width: 320px; }
.perm-matrix thead .perm-matrix__feature { z-index: 3; font-weight: 600; }
.perm-matrix__label { display: block; font-weight: 500; }
.perm-matrix__note { display: block; margin-top: 1px; }
.perm-matrix__role { text-align: center; min-width: 92px; white-space: nowrap; }
.perm-matrix__role-name { display: block; font-weight: 600; color: var(--color-primary, #2f3e63); text-decoration: underline; text-underline-offset: 2px; }
.perm-matrix__role-meta { display: block; font-size: 0.72rem; color: var(--color-muted, #6b6b6b); font-weight: 400; margin-top: 2px; }
.perm-matrix__group th > span { position: sticky; left: 10px; }
.perm-matrix__group th { text-align: left; background: #eef2f8 !important; font-size: 0.8rem; font-weight: 600; color: #3d4a66; padding: 5px 10px; }
.perm-matrix tbody tr:not(.perm-matrix__group):hover th, .perm-matrix tbody tr:not(.perm-matrix__group):hover td { background: #f8fafd; }
.perm-matrix__cell { text-align: center; padding: 0 !important; }
.perm-matrix__hit { display: flex; align-items: center; justify-content: center; min-height: 40px; cursor: pointer; }
.perm-matrix__hit input { width: 18px; height: 18px; cursor: pointer; }
.perm-matrix__cell.is-on, .perm-matrix tbody tr:hover .perm-matrix__cell.is-on { background: #dff3e4 !important; }
.perm-matrix__cell.is-off, .perm-matrix tbody tr:hover .perm-matrix__cell.is-off { background: #fde6e4 !important; }
.perm-matrix__actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 10px 0 2px; background: var(--color-surface, #fff); }
.perm-matrix__status--dirty { color: #b4471f; font-weight: 600; }
@media (max-width: 860px) {
  /* スマホは表の中でなくページ全体をたてに動かす。保存の帯は変えたときだけ下の帯の上に出す */
  .perm-matrix-wrap { max-height: none; }
  .perm-matrix thead th { position: static; }
  .perm-matrix .perm-matrix__feature { min-width: 140px; max-width: 160px; }
  .perm-matrix__note { display: none; }
  .perm-matrix__role { min-width: 70px; }
  /* ボタンの字が縦に折れないように、「変更はありません」は1行目・ボタンは2行目に(2026-10-18 ユーザーのスマホの写真) */
  .perm-matrix__actions { position: static; flex-wrap: wrap; }
  .perm-matrix__actions > .hint { flex-basis: 100%; }
  .perm-matrix__actions .btn { white-space: nowrap; padding: 9px 14px; }
  .perm-matrix__actions.is-dirty { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px); z-index: 30;
    padding: 10px 12px; border-radius: 8px; box-shadow: 0 4px 18px rgba(30, 40, 70, 0.22); flex-wrap: wrap; }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px 28px;
}

/* ダッシュボード(2026-09-26 作り直し)。情報量が多いので文字を小さめにしてカードを詰めて並べる */
.dash { font-size: 0.82rem; }
.dash__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dash__head .page-title { font-size: 1.15rem; }
.dash-grid--fixed { margin-top: 12px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.dash-kpi { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 10px; background: var(--color-surface); }
.dash-kpi__label { color: var(--color-muted); font-size: 0.78rem; }
.dash-kpi__value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-kpi__sub { display: block; font-size: 0.74rem; color: var(--color-muted); }
.dash .is-up { color: #2e7d4f; }
.dash .is-down { color: var(--color-danger); font-weight: 700; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.dash-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 10px; background: var(--color-surface); min-width: 0; overflow-x: auto; }
.dash-card--wide { grid-column: span 2; }
/* 今月のポイント(2026-10-21 ユーザー: レポートのように文章で) */
.dash-points { border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: var(--radius); padding: 8px 14px 10px; margin: 10px 0 4px; background: var(--color-surface); }
.dash-points__title { font-size: 1rem; margin: 0 0 6px; }
.dash-points__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dash-points__item { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; line-height: 1.6; } /* 「平均客単価(税込) ↑」が1行に入る幅(2026-11-06) */
.dash-points__label { font-weight: 700; color: var(--color-primary-dark); }
.dash-points__item.is-up .dash-points__label::after { content: " ↑"; color: #2e7d32; }
.dash-points__item.is-down .dash-points__label::after { content: " ↓"; color: #c62828; }
@media (max-width: 860px) { .dash-points__item { grid-template-columns: 1fr; gap: 0; } }
.dash-notes { margin-top: 14px; font-size: 0.88rem; }
/* 担当者別の成績(2026-10-21) */
.staff-perf__table { width: auto; min-width: 100%; }
.staff-perf__table th, .staff-perf__table td { white-space: nowrap; }
.staff-perf__table .is-sum { background: var(--band); font-weight: 600; }
.staff-perf__total td { font-weight: 700; border-top: 2px solid var(--color-border); }
.staff-perf__input { width: 6em; text-align: right; }
/* アンケート集計の担当者別・会館別など(2026-10-21) */
.srs-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 12px; grid-column: 1 / -1; }
/* プラン別の葬儀件数(2026-10-21) */
.plan-count__table { width: auto; font-size: 0.85rem; }
.plan-count__table th, .plan-count__table td { white-space: nowrap; padding: 2px 6px; text-align: center; }
.plan-count__table td.num { text-align: right; min-width: 2.6em; }
.plan-count__table .is-sum { background: var(--band); font-weight: 600; }
.plan-count__group { writing-mode: vertical-rl; letter-spacing: 2px; }
.plan-count__name { text-align: left !important; position: sticky; left: 0; background: var(--color-surface); }
.plan-count__total td, .plan-count__total th { font-weight: 700; border-top: 2px solid var(--color-border); }
.dash-notes summary { cursor: pointer; font-weight: 600; }
.dash-notes ul { margin: 6px 0 0; padding-left: 1.2em; }
/* 売上の増減の理由(2026-10-09)。表が多いので横いっぱいに */
.dash-card--full { grid-column: 1 / -1; }
.dash-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 6px 20px; }
.dash-span { font-size: 0.68rem; font-weight: 400; color: var(--color-muted); }
.dash-breakdown > div { min-width: 0; overflow-x: auto; }
.dash-breakdown > .dash-breakdown__wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .dash-breakdown { grid-template-columns: minmax(0, 1fr); } }
.dash-breakdown h4 { margin: 8px 0 4px; font-size: 0.82rem; }
.dash-diff { white-space: nowrap; }
.dash-diff.is-up { color: #1f6f43; }
.dash-diff.is-down { color: #b3261e; }
.dash-total td { font-weight: 600; border-top: 1px solid var(--color-border); }
.dash-reasons { margin: 6px 0 0; padding-left: 18px; font-size: 0.8rem; line-height: 1.6; }
.dash-details { margin-top: 4px; }
.dash-details summary { cursor: pointer; }
.period-bars .chart-legend { margin-top: 2px; }
/* 出す区分の切り替え(ラジオボタンで JS なし) */
.period-views { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.period-views__radio { position: absolute; opacity: 0; pointer-events: none; }
.period-views__tab { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 0.76rem; cursor: pointer; background: var(--color-surface); }
.period-views__radio:checked + .period-views__tab { border-color: var(--frame, #2f5f93); background: #e3eaf5; font-weight: 600; }
.period-views__radio:focus-visible + .period-views__tab { outline: 2px solid var(--frame, #2f5f93); }
.period-views__panel { display: none; width: 100%; margin-top: 4px; }
.period-views__radio:nth-of-type(1):checked ~ .period-views__panel--0 { display: block; }
.period-views__radio:nth-of-type(2):checked ~ .period-views__panel--1 { display: block; }
.period-views__radio:nth-of-type(3):checked ~ .period-views__panel--2 { display: block; }
.period-views__radio:nth-of-type(4):checked ~ .period-views__panel--3 { display: block; }
.period-views__radio:nth-of-type(5):checked ~ .period-views__panel--4 { display: block; }
.period-views__radio:nth-of-type(6):checked ~ .period-views__panel--5 { display: block; }
.period-views__radio:nth-of-type(7):checked ~ .period-views__panel--6 { display: block; }
.period-views__radio:nth-of-type(8):checked ~ .period-views__panel--7 { display: block; }
.period-views__radio:nth-of-type(9):checked ~ .period-views__panel--8 { display: block; }
.period-views__radio:nth-of-type(10):checked ~ .period-views__panel--9 { display: block; }
.period-views__radio:nth-of-type(11):checked ~ .period-views__panel--10 { display: block; }
.period-views__radio:nth-of-type(12):checked ~ .period-views__panel--11 { display: block; }
.dash-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; align-items: start; }
.dash-card h3 { font-size: 0.85rem; margin: 0 0 6px; color: var(--color-text); }
.dash-table { font-size: 0.78rem; margin: 0; }
.dash-table th, .dash-table td { padding: 3px 6px !important; }
.dash-table tr.is-today td { background: #fff6e0; }
.dash .bar-chart { gap: 4px; }
.dash .bar-chart__row { grid-template-columns: 9.5em 1fr 48px; gap: 6px; } /* 「羽生きらら会館 安置室」も入る幅(2026-11-06) */
.dash .bar-chart__label, .dash .bar-chart__value { font-size: 0.76rem; }
.dash .bar-chart__track { height: 10px; }
/* 施行場所などの長い名前がスマホで切れないように(2026-11-06 ユーザー)。名前の欄を広げて2行まで折り返し、棒は短く */
@media (max-width: 860px) {
  .dash .bar-chart__row { grid-template-columns: 10.5em 1fr 3.2em; }
  .dash .bar-chart__label { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; font-size: 0.8rem; }
}
.dash-option-minors { margin: 2px 0 6px; padding-left: 1em; font-size: 0.8rem; color: var(--color-muted); }
.dash-option-minors li { display: flex; justify-content: space-between; gap: 8px; }
.dash-fold > summary { cursor: pointer; font-size: 0.85rem; color: var(--frame, #2f5f93); margin-top: 6px; }
.dash-tag { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 0.72rem; color: #fff; background: #888; }
.dash-tag--wake { background: #7d6bb0; }
.dash-tag--funeral { background: #4f5f8c; }
.dash-tag--cremation { background: #b85c6b; }
.dash-meter { display: inline-block; width: 50px; height: 7px; margin-right: 4px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.dash-meter > span { display: block; height: 100%; background: var(--color-primary); }
/* 横の棒の右の数字は幅をそろえて右寄せ(2026-11-04 ユーザー: 13% と 6% で棒の位置がずれていた) */
.dash-meter__num { display: inline-block; min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: #e6e4dc; stroke-width: 1; }
.chart-base { stroke: #bbb; stroke-width: 1; }
.chart-axis { font-size: 10px; fill: #777; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.74rem; color: var(--color-muted); }
.chart-legend__item { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: 0 0 10px; }
.chart-legend__swatch--dashed { height: 3px; }
.chart-legend__swatch--dotted { opacity: 0.75; }
.chart-donut-wrap { display: flex; align-items: center; gap: 10px; }
.chart-donut { width: 110px; height: 110px; flex: 0 0 110px; }
.chart-donut__legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: 0.76rem; }
.chart-donut__legend li { display: flex; align-items: center; gap: 5px; padding: 1px 0; }
.chart-donut__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-donut__value { color: var(--color-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .dash-card--wide { grid-column: auto; } }
/* ダッシュボードの枠の並び(2026-09-26 ユーザー指定)。3列に固定して、決めた順に左上から並べる。
   売上の枠が出ない人は空いたところを後ろの枠で詰める(dense)。少し狭い画面は2列、スマホは1列 */
.dash-grid--fixed { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; }
@media (max-width: 1100px) { .dash-grid--fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .dash-grid--fixed { grid-template-columns: minmax(0, 1fr); } }
/* 住所の分布の地図(2026-09-26)。一番下に横幅いっぱい。左が地図、右が町ごとの件数(表の中でスクロール) */
#address_map { display: block; margin-top: 10px; }
.dash-map--loading { min-height: 120px; }
.dash-map { overflow: visible; }
.dash-map__head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dash-map__head h3 { margin: 0; }
.dash-map__controls { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.8rem; }
.dash-map__seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; }
.dash-map__seg button { font: inherit; border: 0; background: transparent; color: var(--color-text); padding: 4px 10px; cursor: pointer; }
.dash-map__seg button + button { border-left: 1px solid var(--color-border); }
.dash-map__seg button[aria-pressed="true"] { background: var(--color-primary); color: #fff; }
.dash-map__seg button:disabled { color: var(--color-muted); opacity: 0.45; cursor: default; }
/* 施行地図の「期間を指定」の日付欄(2026-09-28) */
.dash-map__range { display: inline-flex; align-items: center; gap: 4px; }
.dash-map__range input[type="date"] { font: inherit; font-size: 0.85rem; padding: 2px 6px; height: 28px; border: 1px solid var(--color-border); border-radius: 6px; }
.dash-switch { font-size: 0.74rem; margin-bottom: 6px; }
.dash-map__check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.dash-map__check--off { color: var(--color-muted); cursor: default; }
.dash-map__body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.dash-map__map { height: 520px; border: 1px solid var(--color-border); border-radius: 6px; z-index: 0; }
.dash-map__side h4 { font-size: 0.8rem; margin: 0 0 4px; }
.dash-map__side h4 + .dash-map__scroll { margin-bottom: 10px; }
.dash-map__scroll { max-height: 330px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 6px; }
.dash-map__scroll thead th { position: sticky; top: 0; z-index: 1; }
.dash-map__scroll tbody tr { cursor: pointer; }
.dash-map__scroll tr.is-hot td { background: #e7eaf5; }
.dash-map__off { margin: 0 0 6px; padding-left: 1.2em; font-size: 0.8rem; line-height: 1.7; }
.dash-map__unknown { font-size: 0.78rem; margin-bottom: 6px; }
.dash-map__unknown summary { cursor: pointer; color: var(--color-primary); }
.dash-map__unknown ul { max-height: 160px; overflow-y: auto; margin: 4px 0 0; padding-left: 1.2em; }
.dash-map__total { font-size: 0.8rem; margin: 0; font-variant-numeric: tabular-nums; }
.dash-map__hall { background: #b5602c; border: 2px solid #fff; border-radius: 2px; box-sizing: border-box; }
.dash-map__hall--other { background: #23855a; }
.leaflet-tooltip.dash-map__hall-label.dash-map__hall-label--other { color: #1c6e4a; }
.dash-map__venue { display: inline-flex; align-items: center; gap: 4px; }
.dash-map__venue select { font: inherit; padding: 3px 6px; max-width: 220px; }
.leaflet-tooltip.dash-map__hall-label { background: transparent; border: 0; box-shadow: none; padding: 0; color: #b5602c; font-weight: 700; font-size: 11px; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-tooltip.dash-map__hall-label::before { display: none; }
.dash-map__tip-sub { color: #6b6f7a; font-size: 0.72rem; }
/* 大きく表示: 画面いっぱいに広げる(Esc か「元に戻す」で戻る) */
.dash-map--expanded { position: fixed; inset: 12px; z-index: 2000; overflow: auto; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.4); }
.dash-map--expanded .dash-map__map { height: calc(100vh - 150px); }
.dash-map--expanded .dash-map__scroll { max-height: calc(100vh - 380px); }
@media (max-width: 860px) {
  .dash-map__body { grid-template-columns: minmax(0, 1fr); }
  .dash-map__map { height: 380px; }
}

/* 施行ステータスの選択欄。対象者ブロックの見出しを兼ねるため、選んだ区分の色で塗る。
   色はbadge--<区分>と揃えている(切り替え時のclass差し替えはcustomer_form_controller.js)。 */
.case-type-header { display: flex; align-items: center; gap: 8px; }
.case-type-header__label { font-size: 0.9rem; color: var(--color-muted); }
.case-type-select {
  /* 対象者ごとに切り替える項目なので、他の入力欄と同じ高さにして押しやすくする */
  padding: 6px 16px;
  height: 38px;
  min-width: 190px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.case-type-select--estimate_target { background: #e6edf7; color: #2a5090; border-color: #cbdaee; }
.case-type-select--deceased_target { background: #efe6e2; color: var(--color-accent); border-color: #e2d0c6; }
.case-type-select--retail_target { background: #f2ecd8; color: #8a6d1f; border-color: #e5dab6; }

.funeral-case-block {
  border-top: 1px dashed var(--color-border);
  padding-top: 16px;
  margin-top: 16px;
}
.funeral-case-block:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

/* 対象者(施行)情報: 対象者数が増えても縦に伸びすぎないよう、折りたたみパネルにする */
/* 家族の葬儀(2026-11-05。顧客の画面の対象者のタブの下) */
.family-box { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--color-border); border-left: 4px solid var(--frame, #2f5f93); border-radius: var(--radius); }
.family-box__people { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; }
.family-box__person { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* 対象者を別の顧客へ移す・前に関わった家から入れる: 入れておいた欄は薄い黄色 */
.family-prefill { margin: 4px 0 12px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.family-prefill > summary { cursor: pointer; font-weight: 700; color: var(--frame, #2f5f93); }
input.is-prefilled, select.is-prefilled { background: #fff7d6; }
.move-options { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 8px 12px; background: #edf0f5; border-radius: var(--radius); }
.split-warning { margin: 0 0 8px; padding: 6px 10px; border-left: 4px solid #d9a400; background: #fff7d6; border-radius: var(--radius); font-size: 0.9rem; }

.funeral-case-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 12px;
  background: var(--color-surface);
}
.funeral-case-panel__summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* スマホで名前・担当者などが縦に潰れないよう、入りきらなければ次の行へ(2026-09-26) */
  gap: 6px 10px;
  font-size: 0.98rem;
}
.funeral-case-panel__summary::-webkit-details-marker { display: none; }
.funeral-case-panel__summary::before {
  content: "▶";
  font-size: 0.7rem;
  color: var(--color-muted);
  transition: transform 0.15s ease;
}
.funeral-case-panel[open] > .funeral-case-panel__summary::before {
  transform: rotate(90deg);
}
.funeral-case-panel__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.errors {
  background: #fbeceb;
  border: 1px solid #eecac7;
  color: var(--color-danger);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* 足りない・おかしい欄(2026-11-15 ユーザー: どこが足りないか分かるように)。config/initializers/field_error_proc.rb が
   入力欄に aria-invalid と下の文(.field-error)を付ける。項目名も赤く・対象者の枠は赤い線・自動で移ってきた欄は少し光る */
.field:has([aria-invalid="true"]) > label,
.field:has([aria-invalid="true"]) > .field_with_errors > label { color: var(--color-danger); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--color-danger) !important;
  background-color: #fff6f5;
  box-shadow: 0 0 0 2px rgba(179, 38, 30, 0.18);
}
/* 包みの箱は並びに関わらせない(赤くした欄の幅・並びを前と同じにする) */
.field_with_errors { display: contents; }
.field_with_errors > .field-error { display: block; }
.funeral-case-block.has-errors { outline: 2px solid var(--color-danger); outline-offset: 6px; border-radius: 4px; }
.errors__jump { color: inherit; text-decoration: underline; }
.field--flash { animation: field-flash 0.9s ease-in-out 2; border-radius: 6px; }
@keyframes field-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0); }
  50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, 0.28); }
}

/* 登録の確認の画面: 前からいる見積の対象者を故人にするか(2026-11-15) */
.use-existing__estimate { margin: 6px 0; padding: 8px 10px; border-left: 4px solid var(--frame, #2f5f93); background: #f3f6fa; font-size: 0.92rem; }
.use-existing__estimate-pick { margin: 8px 0; padding: 10px 12px; border: 2px solid #d39b27; border-radius: var(--radius-control, 6px); background: #fffaf0; }
.use-existing__estimate-pick legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-weight: 700; }
.use-existing__estimate-pick label { clear: both; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-weight: 400; cursor: pointer; }

/* ホームページ・広告: お店ごとのタブ(2026-11-16) */
.web-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.web-tabs__tab { padding: 6px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); background: var(--color-surface, #fff); color: var(--frame, #2f5f93); text-decoration: none; font-weight: 600; }
.web-tabs__tab.is-on { background: var(--frame, #2f5f93); border-color: var(--frame, #2f5f93); color: #fff; }
.web-settings__sub { font-size: 1rem; margin: 18px 0 4px; }
.web-shops input, .web-shops textarea { width: 100%; min-width: 9em; padding: 6px 8px; border: 1px solid var(--input-border, #6f7680); border-radius: var(--radius-control, 6px); font: inherit; }
/* スマホ: お店ごとに縦の枠(2026-11-17 ユーザー: 横に続いているのが分からなかった)。項目名は data-label */
@media (max-width: 860px) {
  .web-shops, .web-shops tbody { display: block; width: 100%; }
  .web-shops thead { display: none; }
  .web-shops tbody tr { display: block; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--color-border); border-radius: var(--radius, 8px); background: var(--color-surface, #fff); }
  .web-shops tbody td { display: block; padding: 0 0 8px !important; border: 0 !important; background: transparent !important; }
  .web-shops tbody td::before { content: attr(data-label); display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
  .web-shops input, .web-shops textarea { min-width: 0; }
}

/* ---- Estimate items table ---- */
/* 明細の表は箱の中でスクロールせず、ページごとスクロールする(2026-09-25。葬儀の請求書は中央値33行)。
   見出し行は画面上部に貼り付く。横幅が足りないときだけ items-table-wrap--scroll で横スクロール */
.items-table-wrap {
  overflow: visible;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.items-table-wrap--scroll { overflow-x: auto; }
/* プランの内訳の折りたたみ */
.items-table tr.line-item-row--collapsed { display: none; }
.breakdown-toggle {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--color-primary); border-radius: 999px; background: var(--color-primary); color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.breakdown-toggle:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
/* プランの行は薄い色を付けて、内訳のまとまりの見出しだと分かるようにする */
.items-table tr.line-item-row--plan-head td { background: #eef1f8; }
.items-table tr.line-item-row--plan-head td.col-del { background: #eef1f8; }
.items-table tr.line-item-row--plan-head .name-input { font-weight: 700; }
/* 画面の下に貼り付く保存の帯 */
.form-sticky-bar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 16px -20px -20px; padding: 10px 20px;
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.form-sticky-bar__total { margin-right: auto; font-weight: 700; font-size: 1.0rem; white-space: nowrap; }
.form-sticky-bar__total span { font-variant-numeric: tabular-nums; }
/* ボタンは大きさをそろえて細めに */
.form-sticky-bar .btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 108px; height: 32px; padding: 0 10px; font-size: 0.85rem; line-height: 1.2; white-space: nowrap;
}
.form-sticky-bar__check { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; white-space: nowrap; padding: 0 4px; }
.form-sticky-bar__check input { margin: 0; }
/* パソコンはボタンを今までどおり1列に並べる(まとまりの枠は無いのと同じ) */
.form-sticky-bar__tools { display: contents; }
.fsb-short { display: none; }
@media print { .form-sticky-bar { display: none; } }
.items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  font-size: 0.86rem;
}
.items-table th, .items-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}
.items-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0efec;
  color: var(--color-muted);
  font-weight: 600;
  white-space: nowrap;
}
.items-table tbody tr:hover td { background: #fafaf8; }
.items-table input[type=text],
.items-table input[type=number],
.items-table textarea.tagname-input,
.items-table select {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--input-border); /* 明細の入力欄も登録画面と同じ濃い青の枠(2026-10-13 ユーザー) */
  border-radius: 6px;
  font-size: 0.86rem;
}
.items-table .col-select { width: 44px; text-align: center; }
.items-table .col-search { min-width: 160px; }
.items-table .col-name { min-width: 170px; }
.items-table .col-qty { width: 70px; }
.items-table .col-unit { width: 70px; }
.items-table .col-price { width: 110px; }
.items-table .col-amount { width: 100px; white-space: nowrap; }
.items-table .col-note { min-width: 120px; }
.items-table .col-hide { width: 56px; text-align: center; }
.items-table .col-tax { width: 90px; }
.items-table .col-del {
  width: 60px;
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--color-surface);
  box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.items-table thead th.col-del {
  z-index: 3;
  background: #f0efec;
}
.items-table tbody tr:hover td.col-del { background: #fafaf8; }
.items-table tr.hidden-price .unit-price-input { background: #f0efec; color: var(--color-muted); }
/* 明細はマスタから選ぶ(2026-09-27)。商品を選ぶ前の行は、商品検索の欄だけ打てる */
.items-table tr.line-item--pick-first input:disabled,
.items-table tr.line-item--pick-first select:disabled { background: #f0efec; border-color: #e2e0db; cursor: not-allowed; }
.items-table tr.line-item--pick-first .code-search-input { border-color: var(--color-primary, #2b4a6f); background: #fff; }

.name-input { margin-bottom: 4px; }
.tagname-input { display: block; font-size: 0.78rem; color: var(--color-muted); resize: none; overflow: hidden; min-height: 0; line-height: 1.45; white-space: pre-wrap; }
/* 明細の行は上でそろえ、名札名の欄は下の空いた所を単価の列の右まで広げる(2026-10-28 ユーザー: ノートパソコンだと名札名が10文字ほどで折り返す)。
   広げる幅 --tag-extend は estimate-form#layoutTagNames が測って入れる。負の余白で打ち消して、列の幅は変えない */
.items-table tr[data-row-type="item"] > td { vertical-align: top; }
.items-table tr[data-row-type="item"] .amount-display { display: inline-block; padding-top: 6px; }
.items-table tr[data-row-type="item"] > td.col-select input,
.items-table tr[data-row-type="item"] > td.col-hide input { margin-top: 8px; }
.items-table tr[data-row-type="item"] > td.col-del .row-controls { margin-top: 2px; }
.items-table textarea.tagname-input { position: relative; z-index: 1; width: calc(100% + var(--tag-extend, 0px)); margin-right: calc(-1 * var(--tag-extend, 0px)); }

.row-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.move-row { display: flex; flex-direction: column; gap: 1px; }
.items-table tr.line-item-row--dragging td { opacity: 0.45; }
.icon-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  padding: 2px 5px;
  color: var(--color-muted);
}
.icon-btn:hover { background: #eef0ec; color: var(--color-text); }
.icon-btn.remove-row { color: var(--color-danger); border-color: #eecac7; }
.icon-btn.remove-row:hover { background: #fbeceb; }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.amount-display, .subtotal-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num, .table td.num { text-align: right; }

.subtotal-row td { background: #f6f5f1; font-weight: 600; }
.subtotal-row .subtotal-label-input { max-width: 220px; display: inline-block; width: auto; font-weight: 600; }

.line-sub-text {
  font-size: 0.76rem;
  color: var(--color-muted);
  margin-top: 2px;
}
/* 名札名が何行かあるときは「名札名:」の右にそろえて並べる */
.tag-lines { display: inline-block; vertical-align: top; }

/* ---- Product search combobox ---- */
.product-combobox { position: relative; }
.search-row { display: flex; align-items: center; gap: 4px; }
.search-row .code-search-input { flex: 1; }
.search-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  color: #7fa8cc;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-icon-btn:hover { color: #4a7fb5; }
.search-icon-btn svg { width: 17px; height: 17px; }

.product-suggestions {
  position: fixed;
  z-index: 200;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-height: 220px;
  overflow-y: auto;
}
.product-suggestion-item {
  padding: 7px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}
.product-suggestion-item:last-child { border-bottom: none; }
.product-suggestion-item:hover { background: #eef0ec; }
.product-suggestion-empty {
  padding: 10px;
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius);
  width: 640px;
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.modal-header h3 { margin: 0 0 10px; font-size: 1.02rem; }
.modal-header input[type=text] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
}
.modal-close:hover { color: var(--color-text); }
.modal-category-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-category-selects select {
  flex: 1 1 150px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.modal-body {
  padding: 12px 20px 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-product-item {
  padding: 5px 8px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.3;
}
.modal-product-item .mp-main { min-width: 0; }
.modal-product-item:hover { background: #eef0ec; }
.modal-product-item:last-child { border-bottom: none; }
.modal-product-item .mp-name { font-weight: 600; }
.modal-product-item .mp-code { color: var(--color-muted); font-size: 0.74rem; }
.modal-product-item .mp-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 金額と「追加済み」はいつも右の列に(2026-11-20 ユーザー: 名前の長さで印の位置がばらつく)。
   右の列は幅を決めておき、名前の折り返す所をそろえる */
.modal-product-item .mp-side { flex: 0 0 auto; min-width: 6.2em; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
/* 「プラン」などの印と「追加済み」は金額の下の1行に並べる(2026-11-20 ユーザー: 名前の後ろだと位置がばらつく) */
.modal-product-item .mp-tags { display: flex; justify-content: flex-end; align-items: center; gap: 3px; white-space: nowrap; }
.modal-product-item .mp-tags:not(:has(.badge)) { display: none; }
.modal-product-item .mp-tags .badge { margin-left: 0; font-size: 0.7rem; padding: 0 6px; line-height: 1.45; }
.modal-product-item .mp-added:empty { display: none; }
.modal-result-count { color: var(--color-muted); font-size: 0.8rem; margin-bottom: 4px; }
/* 名前変更用の欄(絞り込みの並びの一番右。2026-10-12 ユーザー) */
.modal-category-selects #modal-name-change-select { flex: 1.4 1 0; background-color: #fff8e8; border-color: #ecd7a6; }
.modal-category-selects #modal-name-change-select[hidden] { display: none; }
/* パソコンは1件を1行に(商品名・コードと分類・金額を横に並べる)。スマホは今までどおり2行 */
@media (min-width: 861px) {
  .modal-product-item .mp-main { display: flex; align-items: baseline; gap: 10px; flex: 1 1 auto; }
  .modal-product-item .mp-name { flex: 0 1 auto; max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .modal-product-item .mp-code { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .modal-product-item .mp-side { flex-direction: row-reverse; align-items: center; gap: 8px; }
}
/* スマホは名前を2行まで(長い名前は「…」)。1行目の高さがそろう */
@media (max-width: 860px) {
  .modal-product-item .mp-main { flex: 1 1 auto; }
  .modal-product-item .mp-side { min-width: 7em; } /* 「税込38,500円」「追加済み ×2」が入る幅。100万円台だけ少し広がる */
  .modal-product-item .mp-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  /* どの行も2行分の高さにそろえる(2026-11-20 ユーザー: 名前の長さや印で行の高さがばらつく)。
     右は金額+印の行(印が無くても場所は空けておく)。同じ名前の商品の下の行があるときだけ高くなる */
  .modal-box--panel .modal-product-item { padding: 4px 8px; }
  .modal-product-item { min-height: calc(2.6em + 8px); }
  .modal-product-item .mp-name { line-height: 1.3; }
  .modal-product-item .mp-side { gap: 0; }
  .modal-product-item .mp-tags { display: flex; height: 1.35em; }

}
.modal-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
}
.modal-pagination__gap { color: var(--color-muted); padding: 0 2px; }
.modal-pagination button:disabled { opacity: 0.4; cursor: default; }
.modal-pagination button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--color-text);
}
.modal-pagination button:hover { background: #eef0ec; }
.modal-pagination button.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 商品検索の窓(2026-09-25): 右に寄せて後ろの明細を見えるようにし、10件を1画面に収める */
.modal-overlay--panel { justify-content: flex-end; align-items: stretch; background: rgba(0,0,0,0.18); }
.modal-box--panel {
  width: 600px;
  max-width: 96vw;
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  box-shadow: -4px 0 18px rgba(0,0,0,0.18);
}
.modal-box--panel .modal-header { padding: 10px 18px; }
.modal-box--panel .modal-header h3 { margin-bottom: 6px; font-size: 0.98rem; }
.modal-box--panel .modal-header h3 .hint { font-weight: 400; font-size: 0.76rem; margin-left: 4px; }
.modal-box--panel .modal-header input[type=text] { padding: 5px 10px; margin-bottom: 6px; font-size: 0.88rem; }
/* 大分類〜発注先の4つを1行に並べる(2行になると10件が画面に収まらない) */
.modal-box--panel .modal-category-selects { flex-wrap: nowrap; gap: 6px; }
.modal-box--panel .modal-category-selects select { flex: 1 1 0; padding: 4px 6px; font-size: 0.8rem; }
.modal-category-selects #modal-sort-select { flex: 0 0 auto; }
.modal-box--panel .modal-body { padding: 6px 18px 8px; }
.modal-box--panel .modal-result-count { margin-bottom: 2px; font-size: 0.76rem; }
.modal-box--panel .modal-product-item { padding: 3px 8px; font-size: 0.86rem; line-height: 1.25; }
.modal-box--panel .modal-product-item .mp-code { font-size: 0.72rem; }
.modal-box--panel .modal-pagination { padding-top: 4px; }
.modal-box--panel .modal-pagination button { padding: 3px 8px; font-size: 0.78rem; }
.modal-box--panel .modal-footer { padding: 6px 18px; }
.modal-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 18px; border-top: 1px solid var(--color-border); background: #fafaf8;
}
.modal-footer__added { flex: 1; min-width: 0; font-size: 0.8rem; }
/* 窓で選んだ商品の印(2026-10-10 ユーザー: スマホでは選んだ感じがしない) */
.badge--added { background: #dcefe0; color: #1f6b35; margin-left: 4px; }
@keyframes modal-item-added { from { background: #cfe9d6; } to { background: transparent; } }
.modal-product-item--added { animation: modal-item-added 1.2s ease-out; }
/* ×が説明の文字と重ならないよう、見出しの右を空ける */
.modal-header h3 { padding-right: 32px; }
/* 検索の窓から入れた行を一瞬だけ色を付けて、どこに入ったか分かるようにする */
.line-item-row--flash td, tr.line-item-row--flash, .line-item-row--flash { background: #fff3c4 !important; transition: background 0.6s; }
@media (max-width: 860px) {
  /* スマホは下の帯(z-index 950)より上に出し、画面の本当の高さ(dvh)に合わせてページ送り・閉じるが帯やブラウザのバーに隠れないようにする */
  .modal-overlay { z-index: 1000; }
  .modal-overlay--panel { justify-content: center; }
  .modal-box--panel { width: 100%; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
  .modal-box--panel .modal-header { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .modal-box--panel .modal-footer { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  /* 2026-11-20 ユーザー: スマホは画面がせまいので「選ぶと明細の末尾に追加…」の説明は出さない */
  .modal-box--panel .modal-header h3 .hint { display: none; }
  /* 商品検索の窓は下の帯にかぶらない所まで(2026-11-20 ユーザー)。帯は押せるまま */
  .modal-overlay--panel { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 6px); align-items: flex-start; }
  .modal-box--panel { height: 100%; max-height: 100%; border-radius: 0 0 12px 12px; }
  .modal-box--panel .modal-footer { padding-bottom: 8px; }
  .modal-footer__added { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 2行になるとページ送りが押しにくくなる */
  .mp-uses { display: none; } /* スマホは「この1年で◯回」を出さない(2026-10-10 ユーザー。並びはよく使う順のまま) */
  .mp-supplier { display: none; } /* スマホは結果の発注先を出さない(絞り込みの欄は残す。2026-10-10 ユーザー) */
  /* スマホは下の行(コード・分類)も出さない。同じ名前の商品が商品マスタにあるときだけ、見分けるために発注先まで出す(2026-11-20 ユーザー) */
  .modal-product-item:not(.modal-product-item--same-name) .mp-code { display: none; }
  .modal-product-item--same-name .mp-supplier { display: inline; }
  .modal-close { padding: 6px; top: calc(6px + env(safe-area-inset-top, 0px)); right: 8px; font-size: 1.5rem; }
}

/* 窓(.modal-overlay)が開いている間(2026-11-20 ユーザー: スマホの請求書の商品検索)
   - 後ろのページが指で動いたり止まったりしない(ページを止める・窓の中の一覧が端まで行っても後ろへ伝えない)
   - ガラスのデザインは枠(.card)のすりガラス(backdrop-filter)があると、窓が画面ではなく枠を基準に置かれ、
     下の方で開くとページの上まで戻らないと見えなかった → 開いている間だけ枠のすりガラスを止める */
/* (ページを止めるのはスマホだけ。パソコンは窓を右に出したまま後ろの明細を動かして見られるように) */
@media (max-width: 860px) {
  html:has(.modal-overlay:not([hidden])) { overflow: hidden; }
  html:has(.modal-overlay:not([hidden])) body { overflow: hidden; }
}
.modal-overlay, .modal-overlay .modal-body { overscroll-behavior: contain; }
.theme-liquid:has(.modal-overlay:not([hidden])) .card { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ---- Print document ---- */
.copy-label {
  display: inline-block;
  font-size: 0.85em;
  color: inherit; /* タイトルと同じ色(2026-10-13 ユーザー。前は薄いグレー) */
  margin-left: 10px;
  letter-spacing: 0.15em;
}
.print-page { padding: 30px 0; }
.print-page + .print-page { border-top: 2px dashed var(--color-border); margin-top: 20px; }

.doc-compact { font-size: 0.85rem; }
.doc-compact .page-title { font-size: 1.15rem; }
.doc-compact .section-title { font-size: 0.95rem; }
.doc-compact .table th, .doc-compact .table td { padding: 3px 8px; font-size: 0.82rem; }
/* 明細の中身はもう少しだけ小さく(2026-10-13 ユーザー。見出しはそのまま) */
.doc-compact .doc-items-table td { font-size: 0.76rem; }

/* 帳票の上段。左に宛名・振込先・合計金額、右に発行情報・自社情報・備考を並べる。 */
.doc-top {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  /* 左右の列を同じ高さにし、それぞれの一番下(合計金額と備考)の位置をそろえる */
  align-items: stretch;
}
.doc-top__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.doc-top__col--left { flex: 1 1 56%; }
/* 右(発行情報・自社情報)は詰めて上に寄せる。宛名が5行でも合計金額が宛名のすぐ下に来る高さ(2026-10-13 ユーザー) */
.doc-top__col--right { gap: 4px; }
.doc-top__col--right { flex: 1 1 44%; }

/* 宛名は枠なし(2026-10-13 ユーザー)。住所は言葉の途中で折り返さず、空白(建物名の前など)で改行する。
   空白が無くて入りきらないときだけ途中で折り返す。 */
.doc-recipient-box {
  box-sizing: border-box;
  line-height: 1.8;
  padding: 4px 20px 0;
  font-size: 1.05em;
}
.doc-recipient-box__address { word-break: keep-all; overflow-wrap: anywhere; }
.doc-recipient-box__name { font-size: 1.2em; font-weight: 700; line-height: 1.5; }
.doc-recipient-box__deceased { margin-top: 10px; }
.doc-meta-info {
  min-width: 0;
  text-align: right;
  line-height: 1.5;
  font-size: 0.8em;
  color: var(--color-muted);
}

/* 振込先・備考の枠。登録が無くても枠と見出しだけ出す(手書きで書き込めるように)。 */
.doc-framed-box {
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85em;
  line-height: 1.6;
}
.doc-framed-box__label { font-weight: 700; }
/* 振込先と合計金額は左の列いっぱいに広げ、横幅を宛名の枠とそろえる */
/* 振込先とお知らせは上段の下に横に並べる(振込先 1/3・お知らせ 2/3) */
.doc-boxes { display: flex; gap: 20px; margin-top: 16px; }
.doc-bank-box { flex: 1 1 33%; min-height: 62px; min-width: 0; }
/* 備考と合計金額はそれぞれの列の一番下に置く(下端がそろう) */
.doc-note-box { flex: 2 1 67%; min-height: 62px; min-width: 0; }
.doc-note-box__body p { margin: 2px 0 0; }
/* 下の備考(印鑑の枠の手前に横長で) */
.doc-remarks-box { margin-top: 20px; }
.doc-remarks-box__body p { margin: 2px 0 0; }

.doc-total-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-top: auto;
  /* 枠の太さは前(10px のころ)と同じくらいに(2026-10-13) */
  padding: 9px 20px;
  line-height: 1.3;
  border-radius: var(--radius);
  background: #f0efec;
  color: var(--color-text);
  font-weight: 700;
}
/* 2026-10-13 ユーザー: 字を 1em に大きくしたが、数字は前の大きさ(1.3em)に戻した */
.doc-total-box__label { font-size: 1.1em; }
.doc-total-box__amount { font-size: 1.55em; } /* 2026-10-13 ユーザー: もう少し大きく(1.3em → 1.55em) */
/* 「※は軽減税率対象です。」は小さく(2026-10-13 ユーザー) */
.doc-compact p.doc-reduced-note { margin-top: 6px; font-size: 0.7rem; }

/* 自社情報。ロゴは社名の上、社判は右横に置く。 */
/* ロゴ・自社情報・社判をひとまとまりで右端に寄せる(見積書・請求書で共通)。 */
/* 社判の下は電話番号の行にそろえる(2026-10-13 ユーザー。前は上下の真ん中) */
.doc-issuer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}
.doc-issuer__body {
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.35;
  font-size: 0.85em;
}
.doc-issuer .doc-seal { height: 16mm; }

.doc-company-block {
  flex: 1 1 220px;
  min-width: 0;
  line-height: 1.4;
}
.doc-company-block > div + div { margin-top: 1px; }
.doc-company-name {
  color: var(--color-text);
  font-weight: 600;
}
.doc-company-stamps {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-logo { display: block; max-height: 42px; max-width: 130px; object-fit: contain; margin-bottom: 4px; }
.doc-seal { height: 18mm; width: auto; object-fit: contain; flex-shrink: 0; }
.doc-seal--overlap {
  margin-left: -14px;
  vertical-align: middle;
  position: relative;
  z-index: 1;
}

.doc-col-name { width: auto; }
/* 書類(見積書・請求書・領収書)の表は紙の幅に収める。名札名・備考が長くても品名の欄で折り返し、金額の列を右へ押し出さない
   (2026-10-28 ユーザー: 長い名札名で金額が右で切れないか → 切れていた。.table の min-width: max-content のため) */
.print-page .table { min-width: 0; }
.print-page .doc-col-name { overflow-wrap: anywhere; }
.doc-item-name { font-size: 1em; }
.doc-lined-table th, .doc-lined-table td { border-right: 1px solid var(--color-border); }
/* 左右の外側にも縦線を付けて四角く囲む(2026-10-13 ユーザー。前は中の縦線だけ) */
.doc-lined-table th:first-child, .doc-lined-table td:first-child { border-left: 1px solid var(--color-border); }
/* ページをまたぐとき、行の途中で切らない(2026-10-13 ユーザー: 1ページ目の一番下の行の下線が出ず、縦線だけが下まで伸びていた) */
.doc-lined-table tr { break-inside: avoid; page-break-inside: avoid; }

/* 帳票の表は見出しを中央揃えにする(中身の金額などは右揃えのまま)。
   合計行の見出し(「合計」)も中央に揃え、その行の金額は右揃えのまま残す。
   .table th.num より詳細度を上げる必要があるため、.num側も明示して指定する。 */
.doc-lined-table thead th,
.doc-lined-table thead th.num,
.doc-lined-table tfoot th:not(.num) {
  text-align: center;
}

.doc-signature-box {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.doc-fill-blank {
  display: inline-block;
  border-bottom: 1px solid var(--color-text);
  width: 36px;
  height: 1em;
  vertical-align: bottom;
}
.doc-fill-blank--wide { width: 220px; }

.doc-seal-boxes {
  margin-top: 34px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
/* 印鑑の枠の左の空きに出す通夜・葬儀・火葬の日時(2026-10-13) */
.doc-schedule {
  margin: 0 auto 0 0;
  align-self: flex-end;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  font-size: 0.75rem;
  line-height: 1.5;
}
.doc-schedule dt { color: var(--color-muted); }
.doc-schedule dd { margin: 0; }
.doc-seal-box {
  width: 76px;
  height: 76px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
}
/* 2026-10-16 ユーザー: ハンコの枠の字(担当者・責任者・確認者)をもっと小さく。ハンコの邪魔にならないよう下の端に小さく */
.doc-seal-box__label {
  font-size: 0.56rem;
  line-height: 1;
  color: var(--color-muted);
}

/* 売上区分に色が設定されている場合、書類内の薄いグレー(枠線・見出し背景・
   小計行の背景)をすべてその色に置き換える。--doc-accentは
   shared/_billing_document.html.erbでこの要素に直接設定される。 */
/* 帳票は既定では色を使わず、売上区分に色が設定されているときだけその色を使う。
   (色の無い売上区分の請求書と、売上区分を持たない見積書はすべてグレーになる) */
.print-page .section-title { color: var(--color-text); }

.doc-accent.card { border-color: var(--doc-accent); }
.doc-accent .doc-framed-box { border-color: var(--doc-accent); }
.doc-accent .doc-total-box { color: #fff; }
.doc-accent .doc-lined-table thead th { border-right-color: rgba(255, 255, 255, 0.35); }
.doc-accent .doc-lined-table thead th:last-child { border-right-color: var(--doc-accent); }
.doc-accent .doc-total-box { background: var(--doc-accent); }
.doc-accent .table th { background: var(--doc-accent); color: #fff; }
.doc-accent .doc-lined-table th, .doc-accent .doc-lined-table td { border-right-color: var(--doc-accent); border-left-color: var(--doc-accent); }
.doc-accent .table th, .doc-accent .table td { border-bottom-color: var(--doc-accent); }
.doc-accent .subtotal-row td { background: var(--doc-accent); color: #fff; }
.doc-accent .doc-seal-box { border-color: var(--doc-accent); }

/* 色の付かない書類(見積書・事前相談の見積書・売上区分に色の無い請求書)は、合計金額の欄と同じベージュで統一し、字は黒
   (2026-10-13 ユーザー。前は画面と同じ薄い青グレーの帯に紺の字) */
/* タイトル・「税率ごとの内訳」の見出しは、どの書類も黒(2026-10-13 ユーザー: 請求書も紺や売上区分の色より黒。見本で比べた) */
.doc-compact .page-title,
.doc-compact .section-title { color: #222; }
.doc-compact:not(.doc-accent) .table th { background: #f0efec; color: #222; }
.doc-compact:not(.doc-accent) .table th,
.doc-compact:not(.doc-accent) .table td { border-bottom-color: #d9d4ca; }
.doc-compact:not(.doc-accent) .doc-lined-table th,
.doc-compact:not(.doc-accent) .doc-lined-table td { border-right-color: #d9d4ca; border-left-color: #d9d4ca; }
.doc-compact:not(.doc-accent) .subtotal-row td { background: #f0efec; }
.doc-compact:not(.doc-accent) .doc-framed-box,
.doc-compact:not(.doc-accent) .doc-seal-box { border-color: #d9d4ca; }

/* ほかの端末でログインされてはじかれた・時間切れのとき、画面の上に出す知らせ(session_watch_controller.js。2026-09-28) */
.session-kicked { position: fixed; inset: 0 0 auto 0; z-index: 3000; display: flex; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.25); }
.session-kicked__box { max-width: 520px; width: 100%; background: #fff; border: 2px solid var(--color-danger); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); font-size: 0.9rem; }
.session-kicked__box strong { color: var(--color-danger); display: block; margin-bottom: 4px; }
.session-kicked__box p { margin: 0 0 10px; color: #555; }
@media print { .session-kicked { display: none; } }

/* テスト用アカウントでログインしているときの帯(2026-09-28) */
.test-account-bar { margin: 0 0 12px; padding: 6px 12px; border-radius: var(--radius); background: #fff4d6; border: 1px solid #e8c56a; color: #6b4e00; font-size: 0.8rem; }
@media print { .test-account-bar { display: none; } }

/* 領収書: A4 を3等分(1枚 210×99mm。長3封筒にそのまま入る。2026-09-28 ユーザー決定)。上=正本・真ん中=控え・下=空白。
   印刷では紙の端から端まで使い(名前付きのページ receipt-sheet は余白0)、各枠を紙の 0・99・198mm に合わせる
   (ミシン目入りの3分割用紙を使うので切り取り線は刷らない)。
   枠は各枠の端から6mm内側(プリンターが印刷できない端を避ける)。見た目は見本の形(淡い色の縁・四隅の四角。色は売上区分の色) */
.receipt-sheet { position: relative; width: 210mm; height: 297mm; margin: 0 auto; background: #fff; box-sizing: border-box; page: receipt-sheet; }
@media screen { .print-page.receipt-sheet { padding: 0; box-shadow: 0 0 0 1px var(--color-border); } }
.receipt-slip { position: relative; height: 99mm; box-sizing: border-box; color: #333; font-size: 3mm; overflow: hidden; }
.receipt-slip__frame { position: absolute; inset: 0; width: 210mm; height: 99mm; }
.receipt-slip__frame .rf-band { fill: var(--rf-band); stroke: var(--rf-line); stroke-width: 0.2; }
.receipt-slip__frame .rf-rule { fill: none; stroke: var(--rf-main); stroke-width: 0.35; }
.receipt-slip__frame .rf-paper { fill: #fff; stroke: var(--rf-line); stroke-width: 0.2; }
.receipt-slip .rf-corner { fill: var(--rf-corner); }
.receipt-slip__inner { position: absolute; left: 18mm; right: 18mm; top: 13.5mm; bottom: 13.5mm; display: flex; flex-direction: column; }
.receipt-slip__title { display: flex; align-items: center; justify-content: center; gap: 3mm; height: 8mm; }
.receipt-slip__title h1 { margin: 0; font-family: "Shippori Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Noto Serif JP", serif; font-weight: 600; font-size: 5.6mm; letter-spacing: 3.2mm; padding-left: 3.2mm; line-height: 1; color: #333; }
.receipt-slip__title small { font-size: 5mm; letter-spacing: 0.5mm; } /* 「(控)」は大きく(2026-09-28 ユーザー希望) */
.receipt-slip__squares { width: 8.8mm; height: 3mm; }
.receipt-slip__squares .rf-sq-light { fill: var(--rf-line); }
.receipt-slip__squares .rf-sq-mid { fill: var(--rf-corner); }
.receipt-slip__squares .rf-sq-dark { fill: var(--rf-main); }
.receipt-slip__cols { flex: 1; display: flex; gap: 6mm; margin-top: 2mm; min-height: 0; }
.receipt-slip__left { flex: 0 0 80mm; min-width: 0; display: flex; flex-direction: column; }
.receipt-slip__row { display: flex; align-items: flex-end; gap: 2mm; border-bottom: 0.3mm solid var(--rf-line); min-height: 7mm; padding: 0 1mm 0.6mm; box-sizing: border-box; }
.receipt-slip__row .key { color: var(--rf-main); font-weight: 500; flex: 0 0 auto; }
.receipt-slip__to { position: relative; justify-content: space-between; font-size: 4.6mm; font-weight: 500; border-bottom-width: 0.55mm; margin-bottom: 1.2mm; line-height: 1.25; }
.receipt-slip__to::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.3mm; border-bottom: 0.2mm solid var(--rf-line); }
.receipt-slip__to small { font-size: 3.6mm; font-weight: 700; color: #555; flex: 0 0 auto; }
.receipt-slip__amount { min-height: 10mm; }
.receipt-slip__amount .yen { font-size: 4.4mm; font-weight: 700; color: #555; }
.receipt-slip__amount b { font-size: 5.8mm; letter-spacing: 0.3mm; line-height: 1.2; }
.receipt-slip__amount .note { margin-left: auto; font-size: 2.4mm; color: #777; }
.receipt-slip__desc { line-height: 1.35; }
.receipt-slip__ok { text-align: center; font-size: 2.5mm; color: #555; letter-spacing: 0.8mm; border-bottom: 0.3mm solid var(--rf-line); padding: 1mm 0 0.6mm; }
.receipt-slip__tax { border-collapse: collapse; font-size: 2.9mm; margin-top: auto; width: 100%; }
.receipt-slip__tax th, .receipt-slip__tax td { border-bottom: 0.2mm solid var(--rf-line); padding: 0.4mm 1mm; text-align: right; }
.receipt-slip__tax th { font-weight: 400; color: var(--rf-main); border-bottom-width: 0.3mm; }
.receipt-slip__tax th:first-child, .receipt-slip__tax td:first-child { text-align: left; }
.receipt-slip__right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.receipt-slip__right .receipt-slip__row { font-size: 2.6mm; min-height: 5.6mm; }
.receipt-slip__right .receipt-slip__row .key { width: 10mm; font-size: 2.3mm; font-weight: 400; }
.receipt-slip__company { margin-top: auto; position: relative; font-size: 2.9mm; line-height: 1.45; color: #555; min-height: 14mm; }
.receipt-slip__company-name { font-size: 4mm; font-weight: 700; color: #333; display: flex; align-items: center; gap: 1.2mm; margin-bottom: 0.4mm; line-height: 1.3; }
.receipt-slip__logo { display: block; max-height: 9mm; max-width: 30mm; object-fit: contain; margin-bottom: 0.8mm; }
/* 社判は 17mm(2026-10-05 ユーザー: もう少し大きく)。会社名・住所の右に、本物の押印のように少し重ねて置く(文字が透けるよう multiply)。
   下は最後の行(TEL・登録番号)にそろえる(2026-10-13 ユーザー: 請求書と同じに) */
.receipt-slip__seal { position: absolute; right: 0; bottom: 0; height: 17mm; width: auto; max-width: 17mm; mix-blend-mode: multiply; }
.receipt-slip__side { flex: 0 0 27mm; display: flex; flex-direction: column; align-items: center; gap: 2mm; }
.receipt-slip__box { box-sizing: border-box; border: 0.25mm dashed var(--rf-line); color: var(--rf-line); font-size: 2.2mm; display: flex; justify-content: center; padding-top: 1mm; }
.receipt-slip__box--stamp { width: 27mm; height: 32mm; }
.receipt-slip__box--seal { width: 18mm; height: 18mm; margin-top: auto; } /* 係印は下にそろえる(以前の形。ユーザー希望) */
/* 入金伝票(2026-09-30。A4 の一番下の3分の1) */
.payment-slip__inner { position: absolute; left: 14mm; right: 14mm; top: 11mm; bottom: 11mm; display: flex; flex-direction: column; }
.payment-slip__head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 0.5mm double var(--rf-main); padding-bottom: 1.2mm; }
.payment-slip__head h1 { margin: 0; font-size: 5.4mm; letter-spacing: 1.5mm; color: #333; font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif; font-weight: 600; }
.payment-slip__meta { display: flex; gap: 6mm; font-size: 3mm; }
.payment-slip .key { color: var(--rf-main); font-size: 2.4mm; margin-right: 1.5mm; }
.payment-slip__body { flex: 1; display: flex; gap: 5mm; margin-top: 2.5mm; min-height: 0; }
.payment-slip__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.8mm; }
.payment-slip__to { display: flex; align-items: flex-end; gap: 2mm; border-bottom: 0.3mm solid var(--rf-line); padding: 0 1mm 0.6mm; }
.payment-slip__to .name { font-size: 4.2mm; font-weight: 500; flex: 1; min-width: 0; }
.payment-slip__to small { font-size: 3.2mm; font-weight: 700; color: #555; }
.payment-slip__methods { display: flex; align-items: center; gap: 4mm; font-size: 3mm; padding: 0 1mm; }
.payment-slip__check { white-space: nowrap; }
.payment-slip__table { width: 100%; border-collapse: collapse; font-size: 2.8mm; table-layout: fixed; }
.payment-slip__table th, .payment-slip__table td { border: 0.25mm solid var(--rf-line); padding: 1mm 1.5mm; height: 6.2mm; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-slip__table thead th { background: var(--rf-band); color: var(--rf-main); font-weight: 500; font-size: 2.5mm; height: 5mm; }
.payment-slip__table .c-subject { width: 26mm; }
.payment-slip__table tbody td:nth-child(2) { white-space: normal; line-height: 1.3; font-size: 2.6mm; }
.payment-slip__table .c-amount { width: 34mm; text-align: right; }
.payment-slip__table tfoot th { text-align: right; font-weight: 500; color: var(--rf-main); }
.payment-slip__table tfoot b { font-size: 3.6mm; }
.payment-slip__note { flex: 0 0 62mm; display: flex; flex-direction: column; border: 0.25mm solid var(--rf-line); box-sizing: border-box; }
.payment-slip__note-head { font-size: 2.5mm; color: var(--rf-main); background: var(--rf-band); border-bottom: 0.25mm solid var(--rf-line); padding: 0.8mm 2mm; }
.payment-slip__note-body { flex: 1; padding: 0 2mm; overflow: hidden; display: flex; flex-direction: column; }
.payment-slip__note-line:last-child { border-bottom: 0; }
.payment-slip__note-line { flex: 1 1 0; min-height: 0; border-bottom: 0.2mm solid var(--rf-line); font-size: 2.6mm; line-height: 7mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media print {
  /* 印刷/PDF出力ソフトによっては既定の余白が0になり、右端の枠線が
     ページ端で切れてしまうことがあるため、明示的に余白を確保する。 */
  @page { margin: 12mm; }

  /* body既定のうっすらしたグレー背景(--color-bg)が、印刷時に本文より
     下の余白部分まで帯状に見えてしまうため、印刷時は白背景にする。 */
  body { background: #fff; }

  /* 領収書は紙の端から端まで使う(各枠をミシン目の 99mm・198mm に合わせるため) */
  @page receipt-sheet { size: A4 portrait; margin: 0; }
  .receipt-sheet { margin: 0; }

  .no-print { display: none !important; }

  /* 通常レイアウト(サイドバーあり)の画面を直接印刷する場合、
     サイドバーは不要なので隠し、本文だけが印刷されるようにする。 */
  .app-shell .sidebar { display: none !important; }
  .app-shell { display: block !important; }
  .app-shell .page { margin: 0 !important; width: 100% !important; }
  .print-page { padding: 0; }
  .print-page + .print-page {
    border-top: none;
    margin-top: 0;
    page-break-before: always;
  }

  /* 明細が長く複数ページにまたがる場合、.cardの角丸+枠線がページの
     区切り目に余分な水平線として出てしまう(ブラウザの印刷時のページ分割の
     仕様上の挙動)。印刷時はページの余白自体が境界の役割を果たすため、
     枠線・角丸は不要として取り除く。 */
  .print-page.card {
    border: none;
    border-radius: 0;
  }
}

/* 価格未設定の商品を明細に入れたとき、単価の入力を促す */
.unit-price-input--needed {
  background: #fff7e0;
  border-color: var(--color-warning);
  box-shadow: 0 0 0 2px rgba(185, 138, 46, 0.25);
}

/* 商品一覧: まとめて無効化/有効化のバーと、無効な商品の行 */
.bulk-status-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.bulk-status-bar__label { font-size: 0.9rem; }
.row--inactive td { color: var(--color-muted); background: #f6f6f4; }

/* 商品価格の更新画面(2026-09 案B) */
.price-update-table .price-input { width: 7.5em; text-align: right; }
.price-update-table tr.row--changed td { background: #fff7e0; }
.price-update-table tr.row--error td { background: #fdecec; }
.field-error { color: var(--color-danger, #b3261e); font-size: 0.82rem; margin-top: 2px; }
.price-save-bar {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; margin-top: 8px; background: var(--color-surface); border-top: 1px solid var(--color-border);
}
.price-save-bar__pending { font-weight: 600; color: var(--color-warning); }
.price-change-up { color: #b3261e; }
.price-change-down { color: #1f6f43; }

/* 名前変更用の商品(2026-09) */
.badge--name-change { background: #fff1d6; color: #8a5a00; margin-left: 4px; }
.name-change-badge { font-size: 0.75rem; color: #8a5a00; background: #fff1d6; border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; display: inline-block; }
.name-change-badge[hidden] { display: none; }
.field--needed {
  background: #fff7e0;
  border-color: var(--color-warning);
  box-shadow: 0 0 0 2px rgba(185, 138, 46, 0.25);
}

/* プランの内訳の金額を印刷する(2026-09) */
.breakdown-row td { font-size: 0.95em; }
.breakdown-hint { color: var(--color-muted); font-size: 0.8rem; white-space: nowrap; }

/* 商品マスタのExcel一括登録(2026-09) */
.import-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.import-summary__item { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 14px; background: #fafaf8; }
.import-summary__item strong { font-size: 1.2rem; }
.import-summary__item--new strong { color: #1f6f43; }
.import-summary__item--changed strong { color: var(--color-warning); }
.import-summary__item--error strong { color: var(--color-danger); }

/* 一覧のページ送り(2026-09) */
.list-count { margin: 4px 0 8px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.pager__count { color: var(--color-muted); font-size: 0.85rem; margin-right: 6px; }
.pager__link { border: 1px solid var(--color-border); border-radius: 6px; padding: 3px 10px; font-size: 0.85rem; text-decoration: none; color: var(--color-text); background: var(--color-surface); }
.pager__link:hover { background: #eef0ec; }
.pager__link--current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pager__gap { color: var(--color-muted); }

/* 商品マスタの一覧: 画面の幅に収める(2026-09) */
/* 施行一覧と「自分の印(付箋)」(2026-09-25) */
.case-list th, .case-list td { vertical-align: top; }
.table.case-list th, .table.case-list td { padding: 8px 6px; }
.case-list td:nth-child(-n+5), .case-list td:nth-child(7) { white-space: nowrap; }
.case-list th { white-space: nowrap; }
/* 対象者の列は、右にずらしても左に残す(2026-11-16 ユーザー・事務: 写真を貼るとき右へ進むと、どの家か分からなくなる)。
   見出しの写し(sticky_thead_controller.js)も左に残る。下が透けないよう背景を塗る(偶数行・重ねたときは表の決まりの色) */
.case-list th:nth-child(2), .case-list td:nth-child(2) { position: sticky; left: 0; z-index: 2; box-shadow: 2px 0 0 var(--color-border); }
.case-list td:nth-child(2) { background: var(--color-surface); }
.case-list th:nth-child(2) { z-index: 3; }
.theme-liquid .case-list th:nth-child(2) { background: #f4f6f9; } /* ガラスは見出しが透けるので塗る */
.case-list__center { text-align: center; }
.case-list__repeat { cursor: help; }
button.case-list__repeat { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.case-list__repeat.is-manual::after { content: " ✎"; font-size: 0.75em; } /* 手で直したもの */
.case-list__repeat.is-address, button.case-list__repeat.is-address { color: #9aa0a8; } /* 住所だけ同じ(リピーターに数えない)は薄く */
.case-list__course { min-width: 80px; max-width: 170px; font-size: 0.85rem; }
/* プラン名も備考と同じく1行で、入りきらない分は「…」(2026-10-23 ユーザー。全部はマウスを重ねると出る) */
.case-list td.case-list__course { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 備考は見えるところまで1行で(2026-10-06 ユーザー。全部は行に乗せると出る) */
.case-list td.case-list__note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 90px; max-width: 160px; }
/* 受・ア・写真の列(2026-09-27)。書類の絵で手前に大きく出す、＋でその場で貼る(2026-10-06 から横に並べて1段) */
.case-list td.case-list__doc, .case-list td.case-list__photo, .case-list th.case-list__photo { text-align: center; white-space: nowrap; padding-left: 3px; padding-right: 3px; }
.case-list th.case-list__photo { font-size: 0.78rem; }
/* 2026-10-06 ユーザー: 書類の絵と＋を横に並べて、行の高さを1段にする(書類が無い行も絵の場所を空けて＋の位置をそろえる) */
/* 事前相談一覧: 枚数(2 など)が無い行も同じ幅を空けて、「確」の位置をそろえる(2026-11-20 ユーザー: 1枚の行だけ「確」が左にずれる) */
.consult-sheet-cell__count { display: inline-block; min-width: 1.4em; text-align: left; } /* 10枚以上(2けた)でもずれない幅 */
.case-list__doc-inner { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 2px; }
/* 確認(ア・写)は押してその場で付け外しする(2026-09-27)。2026-10-06 から横に並べる */
.case-list__checks .check-mark-form { display: inline-block; margin: 0; vertical-align: middle; }
button.check-mark { padding: 0; cursor: pointer; font-family: inherit; }
/* マウスを乗せたときの色はマウスのある端末だけ(2026-09-30 ユーザー: スマホで押すと赤→よそを押すと緑に変わって分かりにくかった。
   タッチの端末は押した後も「乗せている」扱いが残るため) */
@media (hover: hover) {
  button.check-mark:hover { border-color: #2f6b3a; color: #2f6b3a; }
  button.check-mark.is-on:hover { border-color: var(--color-danger); color: var(--color-danger); background: #fdf3f2; }
  .doc-peek:hover { background: #eef0ec; border-color: var(--color-border); }
  .quick-upload__button:hover { border-color: var(--color-primary); color: var(--color-primary); }
}
.case-list__doc.is-missing .quick-upload__button { border-color: #e4b4ae; color: var(--color-danger); background: #fdf3f2; }
.doc-peek {
  display: inline-flex; align-items: center; gap: 1px; border: 1px solid transparent; background: none; cursor: pointer;
  padding: 2px 4px; border-radius: 6px; font-size: 1rem; line-height: 1; height: 26px;
}
/* 施行一覧では絵の場所の幅を決めて、どの行も絵と＋の縦の線がそろうようにする(2026-10-06 ユーザー。枚数の数字があっても同じ幅) */
.case-list .doc-peek { width: 36px; justify-content: flex-start; padding: 2px 3px; } /* 2026-10-23 絵が 20×20 になったので 32→36px */
.doc-peek:focus-visible { background: #eef0ec; border-color: var(--color-border); }
.doc-peek--empty { cursor: default; visibility: hidden; }
/* 「アンケートなし」の印 ○不(2026-10-23 ユーザー: 直葬・回収できない・お断りなど)。添付の絵と同じ場所・同じ大きさの丸 */
.survey-none__mark {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; box-sizing: border-box;
  border: 1.5px solid #9a4a3c; border-radius: 50%; color: #9a4a3c; font-size: 0.8rem; font-weight: 700; line-height: 1; font-family: inherit;
}
span.survey-none { cursor: help; }
/* 「ア」の＋の小さな窓(ファイルを貼る・アンケートなしの理由。case_upload_controller.js) */
.case-upload-menu {
  position: fixed; z-index: 1000; min-width: 190px; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(17, 30, 50, 0.18); display: flex; flex-direction: column; gap: 2px;
}
.case-upload-menu button {
  text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 0.9rem; color: var(--color-text); cursor: pointer;
}
.case-upload-menu button:hover, .case-upload-menu button:focus-visible { background: #edf0f5; outline: none; }
.case-upload-menu__file { font-weight: 700; }
.case-upload-menu__head { margin: 4px 4px 0; padding-top: 6px; border-top: 1px solid var(--color-border); font-size: 0.78rem; color: var(--color-muted); }
.case-upload-menu__reason { padding-left: 18px !important; }
.case-upload-menu__head:first-child { margin-top: 0; padding-top: 2px; border-top: 0; }
.doc-icon { display: block; width: 20px; height: 20px; filter: none; } /* 青い添付の絵(ダークでも同じ青・白黒にしない) */
.doc-peek small { font-size: 0.7rem; color: var(--color-muted); font-weight: 700; }
.quick-upload { display: inline-block; margin: 0; position: relative; }
.quick-upload__button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px;
  border: 1px dashed #b9b6ae; border-radius: 6px; color: var(--color-muted); background: var(--color-surface);
  cursor: pointer; font-size: 0.85rem; font-weight: 700; white-space: nowrap;
}
.quick-upload__button:focus-within { border-color: var(--color-primary); color: var(--color-primary); }
.quick-upload.is-drag .quick-upload__button { border-style: solid; border-color: var(--color-primary); background: #eef3fb; color: var(--color-primary); }
.quick-upload.is-busy .quick-upload__button { cursor: progress; opacity: 0.7; }
/* 施行一覧の「＋」(case_upload_controller.js。2026-10-14 からフォームなしのボタン) */
button.quick-upload__button { font-family: inherit; line-height: 1; }
.case-list__doc.is-drag .quick-upload__button { border-style: solid; border-color: var(--color-primary); background: #eef3fb; color: var(--color-primary); }
.quick-upload__button.is-busy { cursor: progress; opacity: 0.7; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 顧客詳細の書類・施行写真の枠(種類ごと) */
.doc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.doc-slot { border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 8px; background: var(--color-surface); min-width: 0; }
.doc-slot__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.doc-slot__title { font-weight: 600; font-size: 0.88rem; }
.doc-slot__items { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; align-items: center; }
/* 葬儀受注書・アンケートの「カメラで撮る」とピンぼけのお知らせ(2026-10-14)。カメラのボタンはスマホ・タブレットだけ */
.doc-slot__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.quick-upload__button--camera { border-style: solid; }
@media (hover: hover) and (pointer: fine) { .quick-upload__button--camera { display: none; } }
.quick-upload__button--primary { border: 1px solid var(--color-primary); background: var(--color-primary); color: #fff; height: 30px; padding: 0 14px; }
.quick-upload__button--primary:focus-within, .quick-upload__button--primary:hover { color: #fff; }
.doc-blur-warning { background: #fff4dc; border: 1px solid #e0a43a; border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; font-size: 0.88rem; line-height: 1.6; }
.doc-blur-warning__actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.doc-slot__note { margin: 6px 0 0; }
.doc-thumb { position: relative; width: 64px; height: 64px; }
.doc-thumb__open { width: 64px; height: 64px; padding: 0; border: 1px solid var(--color-border); border-radius: 6px; background: #f4f3ef; overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
.doc-thumb__open img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb__icon { font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.doc-thumb form { position: absolute; top: -6px; right: -6px; margin: 0; }
.doc-thumb__delete {
  width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--color-border); background: #fff;
  color: var(--color-danger); font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.doc-card__preview { border: 0; width: 100%; cursor: zoom-in; padding: 0; }
/* 書類・写真を手前に大きく出す(lightbox_controller.js) */
body.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(12, 12, 14, 0.95); display: flex; flex-direction: column; color: #fff; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: rgba(0, 0, 0, 0.45); flex: none; }
.lightbox__title { min-width: 0; display: flex; flex-direction: column; font-size: 0.9rem; }
.lightbox__title strong, .lightbox__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__sub { color: #c9c9cf; font-size: 0.8rem; }
.lightbox__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.lightbox__tool {
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); color: #fff; border-radius: 6px;
  padding: 5px 10px; font-size: 0.82rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.lightbox__tool:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.lightbox__close { font-size: 1rem; padding: 4px 10px; }
.lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px 56px; overflow: hidden; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); }
.lightbox__stage.is-actual { overflow: auto; display: block; text-align: center; }
.lightbox__stage.is-actual img { max-width: none; max-height: none; cursor: zoom-out; }
/* スマホ・タブレットの PDF はページの絵を幅ぴったりに縦に並べる・押すと2倍(2026-11-15。pdf_pages.js。書類の窓・ファイル管理・仕入伝票) */
.pdf-pages { display: block !important; overflow: auto; -webkit-overflow-scrolling: touch; }
.pdf-pages img { display: block; width: 100%; max-width: 900px; max-height: none !important; margin: 0 auto 10px; background: #fff; cursor: zoom-in; object-fit: initial; }
.pdf-pages.is-zoom img { width: 200%; max-width: none; cursor: zoom-out; }
.pdf-pages__wait { color: var(--color-muted); text-align: center; margin-top: 20vh; }
.lightbox__stage.pdf-pages { padding: 8px 10px; }
.lightbox__stage .pdf-pages__wait { color: #ddd; }
.file-preview__body.pdf-pages { padding: 8px; }
.lightbox__stage iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 4px; }
.lightbox__note { background: rgba(255, 255, 255, 0.1); padding: 16px 20px; border-radius: 8px; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }
/* 葬儀受注書・アンケート: 写真の下に「四隅を合わせて直す」「元の写真に戻す」、四隅を合わせる画面(2026-10-14) */
.lightbox__actions { display: flex; justify-content: center; gap: 10px; padding: 8px 12px 14px; flex: none; }
.lightbox__actions[hidden] { display: none; }
.lightbox__tool--primary { background: #2f5f93; border-color: #2f5f93; color: #fff; }
.lightbox__corners { position: relative; display: inline-block; max-width: 100%; max-height: 100%; touch-action: none; }
.lightbox__stage .lightbox__corners img { display: block; max-width: 100%; max-height: calc(100vh - 150px); cursor: default; }
.lightbox__corners svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lightbox__handle { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: rgba(255, 255, 255, 0.9);
  border: 4px solid #4da3ff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); cursor: grab; touch-action: none; }
.lightbox__handle:active { cursor: grabbing; }
@media (max-width: 640px) {
  .lightbox__stage { padding: 6px; }
  .lightbox__nav { width: 36px; height: 52px; font-size: 1.8rem; background: rgba(0, 0, 0, 0.35); }
  .lightbox__tool { padding: 5px 7px; }
  .lightbox__bar { flex-wrap: wrap; }
}
/* 売上分析(2026-09-25) */
.sales-summary th.num, .sales-summary td.num, .sales-detail th.num, .sales-detail td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table.sales-detail td, .table.sales-detail th { white-space: nowrap; }
.sales-department td { background: #eef1f8; font-weight: 700; }
.sales-subtotal td { background: #f7f6f2; font-weight: 600; border-top: 1px solid #d8d5cf; }
.sales-total td { background: #f0efec; font-weight: 700; border-top: 2px solid #b8b5ae; }
/* 確認の記録(アンケート確認・施行写真確認・クレームあり) */
.case-checks { display: flex; flex-direction: column; gap: 6px; }
.case-checks__item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-checks__item form { margin: 0; }
.case-checks__label { min-width: 110px; font-weight: 600; font-size: 0.9rem; }
.case-checks__done { color: #2f6b3a; font-weight: 600; font-size: 0.88rem; }
.case-checks__form { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.case-checks__toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; }
.case-checks__note { width: 260px; max-width: 100%; padding: 4px 8px; font-size: 0.85rem; }
.case-checks__item--complaint.is-on .case-checks__label { color: var(--color-danger); }
/* パソコンは 項目名・今の状態・ボタン の3列にして、ボタンを左にそろえて1列に(2026-11-01 ユーザー) */
@media (min-width: 861px) {
  .case-checks__item { display: grid; grid-template-columns: 110px 19em auto; justify-content: start; column-gap: 10px; }
  .case-checks__item > .inline-form { display: contents; }
  .case-checks__item > .inline-form > select { width: 100%; }
  .case-checks__item > :nth-child(n+4) { grid-column: 3; }
}
/* クレーム管理(2026-09-28) */
.case-complaints { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.case-complaints__item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.85rem; }
.complaint-case { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 16px; padding: 8px 12px; margin-bottom: 12px; background: var(--color-bg); border-radius: var(--radius); font-size: 0.85rem; }
.complaint-categories { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.complaint-categories__item { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.complaint-summary { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; font-size: 0.82rem; }
.complaint-summary > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.complaint-summary__chip { display: inline-block; padding: 1px 8px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: inherit; text-decoration: none; }
.complaint-content { min-width: 260px; max-width: 520px; }
.complaint-content div { margin: 0; }
/* アンケートの AI 読み取り(2026-09-28) */
.badge--ok { background: #e6f3e8; color: #2f6b3a; }
.sidebar__count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 999px; background: #d9534f; color: #fff; font-size: 0.7rem; text-align: center; line-height: 1.5; }
.survey-reading { border: 1px solid var(--color-border); border-left: 4px solid #8aa5c4; border-radius: var(--radius); padding: 8px 10px; margin: 4px 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; background: var(--color-surface); }
.survey-reading--alert { border-left-color: var(--color-danger); }
.survey-reading__head, .survey-reading__complaint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.survey-reading__tag { font-size: 0.72rem; padding: 1px 6px; border-radius: 4px; background: #eef2f7; color: #2f5680; }
.survey-reading__reread, .survey-reading__inline { display: inline; margin: 0 0 0 auto; }
.survey-reading__inline { margin: 0; }
.survey-reading__label { font-weight: 600; }
.survey-reading__textarea { width: 100%; font-size: 0.85rem; }
.survey-reading__table td { padding: 2px 8px; font-size: 0.8rem; }
.survey-reading__table td.is-bad { color: var(--color-danger); font-weight: 600; }
.survey-list__item { border-bottom: 1px solid var(--color-border); padding: 10px 0; }
.survey-list__case { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.badge--complaint { background: #fbeceb; color: var(--color-danger); }
/* クレームの分類(2026-10-08 分類ごとの色。ComplaintsHelper)。色の上に白い文字 */
.badge--category { color: #fff; font-weight: 600; }
.complaint-summary__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.check-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 2px;
  border-radius: 50%; border: 1px solid var(--color-border); color: #c4c1ba; font-size: 0.75rem; font-weight: 700; background: var(--color-surface);
}
.check-mark.is-on { background: #e3f1e5; color: #2f6b3a; border-color: #9fcaa6; }
.case-list td.case-list__checks { white-space: nowrap; }
.table--fit { min-width: 0; table-layout: auto; }
.table--fit td { white-space: normal; }
.product-list td { vertical-align: top; }
.product-list__name { color: var(--color-text); text-decoration: none; font-weight: 600; }
.product-list__name:hover { text-decoration: underline; }
.product-list__sub { color: var(--color-muted); font-size: 0.78rem; margin-top: 2px; }
.product-list__actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.product-list__actions form, .product-list__actions .btn { width: 100%; }

/* 対象者ごとの書類(受注書・注文書など)(2026-09) */
.doc-kind-group { margin: 6px 0 10px; }
.doc-kind-group__title { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.doc-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-card { width: 170px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); overflow: hidden; display: flex; flex-direction: column; }
.doc-card__preview { display: flex; align-items: center; justify-content: center; height: 130px; background: #f4f3ef; }
.doc-card__preview img { max-width: 100%; max-height: 130px; object-fit: contain; }
.doc-card__icon { font-weight: 700; color: var(--color-muted); border: 2px solid var(--color-border); border-radius: 6px; padding: 10px 14px; }
.doc-card__meta { padding: 6px 8px; font-size: 0.82rem; display: flex; flex-direction: column; gap: 3px; }
.doc-card__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.doc-upload select, .doc-upload input[type=text] { width: auto; min-width: 150px; }
.doc-missing { color: var(--color-danger); }
.invoice-list td { vertical-align: top; }

/* 横幅に合わせて縮める一覧(施行一覧・請求書一覧・商品マスタ)は、スマホでは1文字ずつ縦に潰れるので
   横スクロールにする(2026-09-25)。.table--fit の指定より後に置く必要がある */
@media (max-width: 860px) {
  .table-wrap .table--fit { min-width: max-content; }
  .table-wrap .table--fit td, .table-wrap .table--fit th { white-space: nowrap; }
  .table-wrap .case-list td.case-list__note { white-space: nowrap; min-width: 160px; max-width: 220px; }
  /* プラン名は1行に(2026-11-20 ユーザー: 2行に折り返すと行が高くなる)。たいていのプラン名(16字ほど)は入る幅・それより長いと「…」 */
  .table-wrap .case-list td.case-list__course { white-space: nowrap; min-width: 120px; max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
  /* 絞り込みの選択肢が長くてもカードからはみ出さない */
  .search-form select, .search-form input { max-width: 100%; }
  /* 「2列分」の欄(件名など)は、1列しか無いスマホ幅で2列目を作らせない(作ると画面が横に広がり縮小表示になる) */
  .field--wide { grid-column: 1 / -1; }
  /* 明細の表はJSが動く前から表の中で横スクロールにする(最初の描画で横に広がるのを防ぐ) */
  .items-table-wrap { overflow-x: auto; }
}

/* 会員名簿の取り込みの確認画面(2026-09-27) */
.import-details { margin-top: 14px; }
.import-details > summary { cursor: pointer; }
.import-details tr.row--error td { background: #fdecec; }

/* ログイン画面。2026-11-21 ガラスの形に仕上げた(Codex の見本 docs/samples/lumina_login_final_v01/glass-opening.html。前は 2026-11-18 の筆記体)。
   紺の星空(右上に丸い青白い光。光は動かさない)の上に、クリスタルの星・角張った「Lumina System」・その下にすりガラスの窓。
   背景は各自の端末で変えられる(login_background_controller.js が background-image を入れる)。写真が無いときは紺 */
.login-screen {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  /* 窓の上の端が画面のまん中より少し上(70px)に来るように、上を空ける(2026-11-21 ユーザー: 窓を今より下げ、星とタイトルも窓の方へ) */
  padding: max(24px, calc(50vh - 208px)) 16px 72px; padding-top: max(24px, calc(50dvh - 208px)); box-sizing: border-box;
  background-color: #060d19;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  font-family: "Noto Sans JP", system-ui, sans-serif; color: #f6f9ff;
}
/* 星・タイトル・窓の縦の並び。幅はタイトルの幅(357px=前の窓の幅。2026-11-21 ユーザー: タイトルは前の窓の外側くらいに) */
.login-glass { width: min(357px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
/* パソコン・タブレットは全体を1.3倍に(2026-11-23 ユーザー: 小さく感じる。前の筆記体の形の6〜8割だった → 1.3倍で字は前と同じくらい)。
   星から窓までのまとまりは画面の縦のまん中に(margin: auto なので、画面が低くても上が切れない) */
@media (min-width: 481px) {
  .login-screen { padding-top: 24px; padding-bottom: 72px; }
  .login-glass { zoom: 1.3; margin: auto 0; }
}

/* 上の星(淡い青灰色で縁だけやわらかく光るクリスタルの星。前と同じくらいの小さめ)。タイトルが出終わったら一度だけ、
   縁がそっと光り、細い光の輪が外へ広がって消える(2026-11-21 ユーザー: 前の筆記体のときのリングの動きの方がよい) */
.login-lumina-star { position: relative; display: block; width: 60px; height: 60px; margin: 0 0 10px; }
.login-lumina-star__img { position: relative; z-index: 1; display: block; width: 60px; height: 60px; object-fit: contain;
  animation: login-glass-star 1.5s ease-in-out 4.35s both; }
.login-lumina-star__ring { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; box-sizing: border-box;
  border: 1px solid #dbf3ff; border-radius: 50%; opacity: 0; pointer-events: none;
  animation: login-glass-ring 1.5s linear 4.35s both; }
@keyframes login-glass-star {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(197, 236, 255, 0)); }
  50% { filter: drop-shadow(0 0 6px #c5ecff); }
}
@keyframes login-glass-ring {
  0% { opacity: 0; transform: scale(1); }
  30% { opacity: 0.49; transform: scale(1.57); }
  50% { opacity: 0.42; transform: scale(1.95); }
  75% { opacity: 0.15; transform: scale(2.43); }
  100% { opacity: 0; transform: scale(2.9); }
}
/* 星の上に出る名前の意味(マウスを重ねる・キーで選ぶ・スマホは長押し=JS が is-tip を付ける) */
.login-lumina-star { outline: none; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.login-lumina-star__img { pointer-events: none; }
.login-lumina-star__tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 2; width: max-content; max-width: min(260px, 80vw); box-sizing: border-box;
  padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(216, 234, 255, 0.45);
  background: rgba(8, 22, 44, 0.88); color: #eaf4ff; font-size: 0.75rem; line-height: 1.6; text-align: left; letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); transition: opacity 0.25s, transform 0.25s, visibility 0.25s; pointer-events: none;
}
.login-lumina-star:hover .login-lumina-star__tip, .login-lumina-star:focus-visible .login-lumina-star__tip, .login-lumina-star.is-tip .login-lumina-star__tip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

/* 角張った「Lumina System」。細い縦の光と一緒に、左から右へ4秒で出る(0.3秒待ってから) */
.login-glass-title { position: relative; width: 100%; margin: 0; line-height: 0; }
.login-glass-title__ink { display: block; animation: login-glass-reveal 4s linear 0.3s both; }
.login-glass-title__svg { display: block; width: 100%; height: auto; aspect-ratio: 513 / 52; }
.login-glass-title__scan { position: absolute; top: -10%; bottom: -10%; left: 0; width: 1px; background: #cdeaff;
  box-shadow: 0 0 8px 2px rgba(143, 202, 255, 0.9); opacity: 0; pointer-events: none;
  animation: login-glass-scan 4s linear 0.3s both; }
@keyframes login-glass-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes login-glass-scan { 0% { left: 0; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* すりガラスの窓: タイトルの幅の約7割(250px)・高さは中身なり(2026-11-21 ユーザー: 再発行の案内を Login の近くに)。
   角丸は控えめ・細い半透明の線。四隅の白いにじみ(内側の白い影)は付けない。後ろの星空がぼけてうっすら透ける */
.login-card {
  width: 70%; min-width: min(250px, 100%); box-sizing: border-box; margin: 32px 0 0; padding: 20px 20px 16px;
  display: flex; flex-direction: column; color: #f6f9ff; text-align: left;
  border-radius: 10px; border: 1px solid rgba(231, 239, 255, 0.66); /* 縁を少し明るく(2026-11-21 ユーザー: ガラスの板があると分かるように。0.44 → 0.66) */
  background: linear-gradient(155deg, rgba(213, 232, 255, 0.10), rgba(213, 232, 255, 0.04));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}

/* 窓の上のまん中: 白い線のロゴと DAIRIN Inc.(横に並べる。前の「Login」の見出しの位置) */
/* 2026-11-21 ユーザー: ロゴと文字は8割の大きさに(19px → 15px・ロゴ 25×28 → 20×22) */
.login-lumina-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 20px;
  font-family: "Lato", "Noto Sans JP", sans-serif; font-size: 15px; letter-spacing: 0.03em; line-height: 1; }
.login-lumina-brand__logo { display: block; width: 20px; height: 22px; object-fit: contain; }

.login-card__message { margin: 0 0 14px; padding: 8px 10px; border-radius: 7px; font-size: 0.8rem; line-height: 1.5; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35); }
.login-card__message--alert { background: rgba(160, 30, 30, 0.55); border-color: rgba(255, 190, 190, 0.7); }

/* ID・PW・Login は同じ幅で細め。ID と PW の間は2つの枠が離れて見える隙間、PW から Login までは広め */
.login-form { display: flex; flex-direction: column; }
.login-field { display: block; }
.login-field + .login-field { margin-top: 15px; }
.login-field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login-field__box { position: relative; display: flex; align-items: center; }
.login-field__box input {
  width: 100%; box-sizing: border-box; height: 42px; padding: 0 13px; border-radius: 7px;
  border: 1px solid rgba(220, 236, 255, 0.4); background: rgba(182, 217, 255, 0.05); color: #fff;
  font-size: 13px; font-family: "Poppins", "Noto Sans JP", sans-serif; outline: none; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.login-field__box input[type="password"], .login-field__box input[data-password-visibility-target] { padding-right: 42px; }
/* 欄の中の「Email address」「Password」は Poppins の小さめの字(2026-11-21 ユーザー) */
.login-field__box input::placeholder { color: rgba(238, 244, 255, 0.85); font-size: 12px; letter-spacing: 0.01em; }
.login-field__box input:focus { border-color: rgba(255, 255, 255, 0.85); background: rgba(182, 217, 255, 0.1); box-shadow: 0 0 0 3px rgba(188, 231, 255, 0.25); }
/* ブラウザの自動入力で欄が黄色・白にならないように */
.login-field__box input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px rgba(24, 38, 60, 0.95) inset; caret-color: #fff; }
.login-field__toggle svg { width: 20px; height: 20px; }
.login-field__toggle { position: absolute; right: 6px; display: flex; padding: 5px; border: 0; background: none; color: rgba(255, 255, 255, 0.8); cursor: pointer; border-radius: 6px; }
.login-field__toggle:hover, .login-field__toggle:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.14); outline: none; }
.login-form__submit {
  /* ボタンは英語の「Login」(2026-09-28 ユーザー指定)。青い塗り(2026-11-21 ガラスの形) */
  margin-top: 43px; height: 42px; border: 1px solid #459bff; border-radius: 7px; cursor: pointer; color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 0.03em; font-family: "Lato", "Noto Sans JP", sans-serif;
  background: linear-gradient(#087bea, #0846bc);
  box-shadow: 0 6px 16px rgba(0, 30, 90, 0.35); transition: filter 0.15s, transform 0.05s;
}
.login-form__submit:hover { filter: brightness(1.08); }
.login-form__submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.login-form__submit:active { transform: translateY(1px); }
/* 窓の一番下に小さく、まん中に */
.login-card__foot { margin: 12px 0 0; font-size: 12px; text-align: center; opacity: 0.9; line-height: 1.5; }

.login-screen__tools { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.login-screen__tool {
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.45); cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.8rem; font-family: inherit;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.login-screen__tool:hover { background: rgba(255, 255, 255, 0.2); }

/* 動きを減らす設定の端末・まちがえて出し直した画面は、最初から完成の形 */
.login-screen--still .login-glass-title__ink, .login-screen--still .login-lumina-star__img, .login-screen--still .login-lumina-star__ring { animation: none; }
.login-screen--still .login-glass-title__scan { display: none; }
@media (prefers-reduced-motion: reduce) {
  .login-glass-title__ink, .login-lumina-star__img, .login-lumina-star__ring { animation: none; }
  .login-glass-title__scan { display: none; }
}
@media (max-width: 480px) {
  /* スマホは右上の光が見える所を出す(自分の写真のときは JS が真ん中にする)。光はタイトルの右上に来る */
  .login-screen { background-position: 88% center; }
  /* 星からログインの窓までのまとまりを画面の縦のまん中に(2026-11-22 ユーザー: スマホで下に寄っていた。下の「背景を変える」の分だけ下を空ける) */
  .login-screen { padding-top: 24px; padding-bottom: 72px; }
  .login-glass { margin: auto 0; }
  .login-lumina-brand { font-size: 14px; }
  /* タイトルは画面の8割(2026-11-21 ユーザー: 幅いっぱいすぎたので左右に余白を。パソコンは 357px のまま) */
  .login-glass { width: min(357px, 80vw); }
  /* 窓はタイトルの8〜9割(2026-11-21 ユーザー。パソコンは7割)。小さいスマホでも入力欄が狭くなりすぎないよう 230px より細くしない */
  .login-card { width: 85%; min-width: min(230px, 100%); }
}

/* 権限の無いボタン(鍵付き。押すとその場で「権限がありません」と出す。2026-09-28) */
.btn--locked { opacity: 0.55; cursor: not-allowed; }
.btn--locked:hover { opacity: 0.7; }
.btn__lock { font-size: 0.85em; }

/* 事前相談の分析(2026-09-28)。月/年度の切り替えはリンク、割合の帯(share_bars)で今期と前年同期を並べる */
.dash-map__seg .dash-seg-link { padding: 4px 12px; color: var(--color-text); text-decoration: none; }
.dash-map__seg .dash-seg-link + .dash-seg-link { border-left: 1px solid var(--color-border); }
.dash-map__seg .dash-seg-link[aria-pressed="true"] { background: var(--color-primary); color: #fff; }
.dash-table tr.is-muted td { color: var(--color-muted); }
.share-bars { display: grid; gap: 5px; }
.share-bars__row { display: grid; grid-template-columns: 78px 1fr 40px; gap: 6px; align-items: center; font-size: 0.76rem; }
.share-bars__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-bars__bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--color-bg); border: 1px solid var(--color-border); }
.share-bars__seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.7rem; white-space: nowrap; overflow: hidden; }
.share-bars__empty { color: var(--color-muted); font-size: 0.72rem; padding-left: 6px; line-height: 18px; }
.share-bars__total { text-align: right; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.share-bars .chart-legend { margin-top: 2px; }
.consult-table .dash-meter { width: 36px; }
.consult-table td, .consult-table th { white-space: nowrap; }
.consult-table td:first-child { white-space: normal; }

/* スケジュール(2026-09-28。サイボウズのスケジュールの置き換え)。週表示は 名前 + 7日、月表示は 日〜土。
   2026-10-07 ユーザー: 予定(時間・葬家名・件名)の文字を2割大きく・社員名も大きく */
.schedule { font-size: 0.8rem; }
.schedule__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.schedule__head .page-title { font-size: 1.15rem; }
.schedule__controls select, .schedule__jump input { font: inherit; height: 30px; padding: 0 6px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); }
.schedule__nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.schedule__jump { display: inline-flex; }
.schedule-week, .schedule-month { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--color-surface); }
.schedule-week { min-width: 900px; }
.schedule-month { min-width: 760px; }
.schedule-week th, .schedule-week td, .schedule-month th, .schedule-month td { border: 1px solid var(--color-border); vertical-align: top; padding: 3px 4px; }
.schedule-week thead th, .schedule-month thead th { background: var(--band); font-weight: 600; text-align: center; }
.schedule-week__name { width: 112px; font-size: 0.92rem; text-align: left !important; background: #f7f5ef; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; z-index: 1; }
.schedule-week__name .hint { font-weight: normal; font-size: 0.7rem; margin-left: 2px; }
.schedule-week tbody td { height: 58px; position: relative; padding-bottom: 18px; }
/* 予定が1つも無い行は低く(ホームと同じ。2026-10-23 ユーザー) */
.schedule-week tbody tr.is-empty td { height: 34px; }
.schedule-week__funerals td { background: #fffaf0; }
.schedule-week__funerals th { background: #fbf1dc; }
.schedule-week tr.is-me th { background: #e9eef8; }
.schedule-day { line-height: 1.3; }
.schedule-day__date { display: block; font-weight: 700; }
.schedule-day__rokuyo { font-size: 0.7rem; color: var(--color-muted); font-weight: normal; }
.schedule-day__rokuyo.is-tomobiki { color: #b85c6b; font-weight: 700; }
.schedule-day__weather { margin-left: 4px; font-size: 0.8rem; }
.schedule-day__link { color: inherit; text-decoration: none; display: block; }
th.is-sat, td.is-sat .schedule-day__date, th.is-sat .schedule-day__date { color: #2f5fa8; }
th.is-sun, td.is-sun .schedule-day__date, th.is-sun .schedule-day__date { color: #c0392b; }
.schedule-week thead th.is-sat, .schedule-month thead th.is-sat { background: #e8f0fb; }
.schedule-week thead th.is-sun, .schedule-month thead th.is-sun { background: #fbeaea; } /* 月の曜日の行も週と同じ色に(2026-10-28 ユーザー) */
.schedule-week thead th.is-today, .schedule-month td.is-today { box-shadow: inset 0 0 0 2px var(--color-primary); }
.schedule-week tbody td.is-today { background: #fffbe6; }
.schedule-item { display: block; margin: 1px 0 3px; padding: 2px 3px; border-radius: 4px; color: var(--color-text); text-decoration: none; line-height: 1.35; font-size: 0.95rem; background: #f4f6fb; border-left: 3px solid #b8c4dd; overflow-wrap: anywhere; }
.schedule-item:hover { background: #e7ecf7; }
/* 種類の色で帯の背景も薄く塗る(2026-10-26 ユーザー: 登録の色とそろえる。--menu-color は _event.html.erb が入れる) */
.schedule-item--colored { background: color-mix(in srgb, var(--menu-color) 16%, #fff); border-left-color: var(--menu-color); }
/* シフト表の休み(スケジュールに自動で出す。押して開く予定ではないので手の形にしない) */
.schedule-item--shift { cursor: default; }
.schedule-item--shift:hover { background: color-mix(in srgb, var(--menu-color) 16%, #fff); }
.schedule-item__shift-note { color: var(--color-muted); font-size: 0.8rem; }
.schedule-item--colored:hover { background: color-mix(in srgb, var(--menu-color) 28%, #fff); }
.schedule-item--funeral { background: #fdf3e1; border-left-color: #e0a64a; }
.schedule-item--funeral:hover { background: #f9e6c4; }
.schedule-item__time { display: block; font-variant-numeric: tabular-nums; color: var(--color-muted); font-size: 0.88rem; }
.schedule-item__tag { display: inline-block; padding: 0 4px; margin-right: 3px; border-radius: 3px; color: #fff; font-size: 0.8rem; line-height: 1.5; vertical-align: 1px; }
/* 施行の印の色(2026-10-07 ユーザー: サイボウズの色見本に合わせる。告別・ワン・直葬は同じ色。字は白) */
.schedule-tag--0 { background: #7dbbe8; color: #fff; } /* 通夜 */
.schedule-tag--1, .schedule-tag--2, .schedule-tag--3 { background: #e3973a; color: #fff; } /* 告別・ワン・直葬 */
.schedule-item__title { font-weight: 500; }
.schedule-add { position: absolute; left: 4px; bottom: 2px; width: 18px; height: 16px; line-height: 14px; text-align: center; border-radius: 4px; color: #5f9e7d; font-weight: 700; text-decoration: none; opacity: 0.55; }
.schedule-add:hover, .schedule-add:focus { opacity: 1; background: #e8f3ec; }
.schedule-month td { height: 96px; position: relative; padding-bottom: 18px; }
.schedule-month td.is-other-month { background: #faf9f5; }
.schedule-month td.is-other-month .schedule-day { opacity: 0.55; }
.schedule-month .schedule-day { margin-bottom: 2px; }
.schedule-month .schedule-day__date { display: inline; margin-right: 4px; }
.schedule-form__title { display: flex; gap: 6px; flex-wrap: wrap; }
.schedule-form__title select { flex: 0 0 auto; width: auto; max-width: 150px; }
/* 種類の横の色の四角(2026-10-26。menu_color_controller.js が選んだ種類の色に変える) */
.schedule-form__swatch { flex: none; width: 18px; height: 18px; border-radius: 4px; align-self: center; background: #fff; box-shadow: inset 0 0 0 1px #c9c6bf; }
.schedule-form__title input { flex: 1 1 220px; }
.schedule-form__when { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.schedule-form__when input { width: auto; }
.schedule-form__copied { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #eaf3d8; border: 1px solid #cfe0ae; color: #3f5f1c; font-size: .85rem; }
.schedule-form__staffs { display: grid; gap: 4px; margin-top: 6px; }
/* 葬儀発生の連絡の「行く人」(名前だけ。2026-10-15) */
.report-form__staffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px 8px; margin-top: 6px; }
.report-form__staffs .schedule-form__check { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-form__role { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.schedule-form__role .hint { min-width: 72px; }
/* 予定の登録の参加者(2026-10-08 ユーザー: 並びをきれいに)。所属の列 + 名前は同じ幅の列にそろえる */
.schedule-form__staffs .schedule-form__role { display: grid; grid-template-columns: 104px repeat(auto-fill, 128px); gap: 6px 8px; align-items: center; }
.schedule-form__staffs .schedule-form__check { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  /* スマホは所属を1行に、その下に名前を2列 */
  .schedule-form__staffs .schedule-form__role { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 6px; margin-bottom: 10px; }
  .schedule-form__staffs .schedule-form__role .hint { grid-column: 1 / -1; min-width: 0; font-weight: 600; }
}
.schedule-form__check { display: inline-flex; align-items: center; gap: 4px; font-weight: normal; cursor: pointer; }
.schedule-detail { min-width: 0; } /* 2026-10-27 ユーザー: 添付の写真を横に並べたとき表が枠からはみ出した(.table の min-width: max-content) */
.schedule-detail th { width: 90px; white-space: nowrap; }
@media (max-width: 860px) { .schedule-week__name { width: 72px; } }
/* 施行の仮予定(2026-09-28)。営業の顧客登録待ち。点線の枠と「仮」 */
.schedule-item--provisional { background: #fffdf6; border: 1px dashed #e0a64a; border-left-width: 3px; }
/* 通夜の帯は薄い水色(2026-10-26 ユーザー: サイボウズと同じく、帯の後ろの背景も種類の薄い色。告別・ワン・直葬は上の薄い橙のまま) */
.schedule-item--kind-0 { background: #e8f3fb; border-left-color: #7dbbe8; }
.schedule-item--kind-0:hover, .schedule-item--kind-0[open] { background: #d6eaf8; }
.schedule-item--kind-0.schedule-item--provisional { background: #f4f9fd; border-color: #7dbbe8; }
.schedule-item__provisional { display: inline-block; margin-left: 3px; padding: 0 3px; border: 1px solid #c98a2b; border-radius: 3px; color: #a86f1c; font-size: 0.66rem; line-height: 1.3; vertical-align: 1px; }
.provisional-form__names, .provisional-form__times { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.provisional-form__inline { display: flex; align-items: center; gap: 6px; }
.badge-recommend { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; background: #fdf0d8; color: #a86f1c; font-size: 0.7rem; font-weight: normal; }
.provisional-overdue { color: var(--color-danger); font-size: 0.75rem; font-weight: 700; }
tr.is-overdue td { background: #fff4f2; }
.provisional-resolve { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.provisional-resolve select { max-width: 280px; font: inherit; height: 30px; }
.btn.is-attention { border-color: #e0a64a; }
/* 祝日(2026-09-29。サイボウズと同じく日曜と同じ赤) */
.schedule-day__holiday { display: block; font-size: 0.68rem; color: #c0392b; font-weight: normal; }
.schedule-month .schedule-day__holiday { display: inline; margin-right: 4px; }
/* 会館(施設)の表示(2026-09-29) */
.schedule-item__facility { display: block; font-size: 0.8rem; color: var(--color-muted); }
.schedule-week td.is-conflict { background: #fff1ee; }
.schedule-conflict { display: block; font-size: 0.68rem; color: var(--color-danger); font-weight: 700; margin-bottom: 2px; }
.schedule-week__name { white-space: normal; overflow-wrap: anywhere; }

/* 掲示板(2026-09-29。サイボウズの掲示板の置き換え)。左にカテゴリ、右に一覧 */
.board-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
/* 検索欄は幅に合わせて縮む(2026-09-30 ユーザー: スマホで検索ボタンが画面の外に出ていた) */
.board-search { display: flex; gap: 6px; align-items: center; flex: 1 1 260px; max-width: 420px; min-width: 0; }
.board-search input { font: inherit; height: 30px; padding: 0 8px; border: 1px solid var(--color-border); border-radius: 6px; flex: 1 1 auto; width: 100%; min-width: 0; }
.board-search .btn { flex: none; }
@media (max-width: 640px) { .board-search { flex-basis: 100%; max-width: none; } }
.board-main { min-width: 0; }
.board-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 860px) { .board-layout { grid-template-columns: minmax(0, 1fr); } }
.board-cats { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f7f5ef; padding: 6px; font-size: 0.8rem; }
.board-cats__head { margin: 8px 6px 2px; font-size: 0.72rem; color: var(--color-muted); font-weight: 700; }
.board-cats__item { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 5px; color: var(--color-text); text-decoration: none; }
.board-cats__item:hover { background: #ebe8de; }
.board-cats__item.is-current { background: var(--color-primary); color: #fff; }
.board-cats__lock { font-size: 0.65rem; opacity: 0.6; }
.board-cats__admin { margin: 8px 6px 2px; font-size: 0.74rem; }
.board-list tr.is-unread .board-list__title { font-weight: 700; }
.board-list tr.is-hidden-post td { color: var(--color-muted); }
.board-list__meta { margin-left: 4px; font-size: 0.72rem; color: var(--color-muted); }
.board-list__cat, .board-list__date { white-space: nowrap; font-size: 0.76rem; }
.board-post__title { font-size: 1.15rem; margin: 4px 0; }
.board-post__cat { font-size: 0.75rem; font-weight: normal; padding: 1px 6px; border-radius: 4px; background: #eef1f7; color: var(--color-primary); vertical-align: 2px; }
.board-post__meta { font-size: 0.78rem; color: var(--color-muted); margin-bottom: 10px; }
.board-post__off { color: var(--color-danger); }
.board-post__body { font-size: 0.9rem; line-height: 1.8; padding: 10px 0; border-top: 1px solid var(--color-border); overflow-wrap: anywhere; }
.board-post__files { list-style: none; padding: 0; margin: 6px 0; font-size: 0.85rem; }
.board-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.board-reactions form { margin: 0; }
/* 字の色をはっきり決める(2026-11-20 ユーザー: iPhone で4つのボタンの字が消えて白い丸だけに。色を書いていないと、Safari のボタンの色(白)になることがある) */
.board-reaction { font: inherit; font-size: 0.8rem; padding: 3px 10px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text); -webkit-appearance: none; appearance: none; cursor: pointer; }
.board-reaction.is-mine { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.board-reactions__who { font-size: 0.75rem; }
.board-readers { margin: 10px 0; font-size: 0.8rem; }
.board-readers summary { cursor: pointer; color: var(--color-primary); }
.board-comments { margin-top: 14px; }
.board-comment { border-top: 1px dotted var(--color-border); padding: 6px 0; font-size: 0.85rem; }
.board-comment__meta { font-size: 0.74rem; color: var(--color-muted); display: flex; gap: 8px; align-items: center; }
.board-comment-form { display: flex; gap: 6px; align-items: flex-end; margin-top: 8px; }
.board-comment-form textarea { flex: 1; font: inherit; }
.btn--xs { padding: 1px 6px; font-size: 0.7rem; }
/* ワークフロー(2026-09-29) */
.workflow-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.workflow-filter select, .workflow-filter input { width: auto; height: 30px; font-size: 0.8rem; }
.workflow-list__date { white-space: nowrap; }
.workflow-forms { list-style: none; padding: 0; display: grid; gap: 8px; }
.workflow-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.workflow-form__field--textarea, .workflow-form__field--text { grid-column: 1 / -1; }
.workflow-detail { max-width: 640px; min-width: 0; margin: 10px 0 16px; }
.workflow-detail td { overflow-wrap: anywhere; }
.workflow-detail th { width: 100px; white-space: nowrap; }
.workflow-route { list-style: none; padding: 0; margin: 6px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.workflow-route__step { border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 10px; min-width: 150px; background: #fbfaf8; font-size: 0.85rem; }
.workflow-route__step.is-done { border-color: #9cc7a8; background: #f1f8f3; }
.workflow-route__step.is-current { border-color: #e0a64a; background: #fffaf0; box-shadow: 0 0 0 2px #fbe3bb; }
.workflow-route__kind { display: block; font-size: 0.7rem; color: var(--color-muted); }
.workflow-route__done { color: #2f7a4a; font-size: 0.78rem; margin-top: 2px; }
.workflow-route__now { color: #a86f1c; font-size: 0.78rem; font-weight: 700; margin-top: 2px; }
.workflow-act { border: 1px solid #f0cf96; background: #fffaf0; border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.workflow-act textarea { width: 100%; }
.workflow-history { list-style: none; padding: 0; margin: 6px 0 12px; }
.workflow-history__item { border-bottom: 1px solid var(--color-border); padding: 6px 0; font-size: 0.85rem; }
.workflow-history__when { color: var(--color-muted); margin-right: 6px; }
.workflow-history__label { margin-left: 4px; }
.workflow-history__item--return .workflow-history__label, .workflow-history__item--reject .workflow-history__label { color: var(--color-danger); font-weight: 700; }
.workflow-history__item--approve .workflow-history__label, .workflow-history__item--confirm .workflow-history__label { color: #2f7a4a; font-weight: 700; }
.workflow-history__comment p { margin: 4px 0 0; }
.workflow-route-edit { margin-bottom: 22px; }
.workflow-route-table td { vertical-align: top; }
/* スマホは1段ずつ縦に並べる(2026-11-08 ユーザー: 入力欄が右にはみ出していた) */
@media (max-width: 600px) {
  .workflow-route-table { min-width: 0; width: 100%; }
  .workflow-route-table thead { display: none; }
  .workflow-route-table, .workflow-route-table tbody, .workflow-route-table tr, .workflow-route-table td { display: block; width: auto; }
  .workflow-route-table tr { margin-bottom: 8px; }
  .workflow-route-table td { border: 0 !important; padding: 4px 10px; }
  .workflow-route-table td input[type=text], .workflow-route-table td select { width: 100%; }
}
.workflow-route-table__kind { white-space: nowrap; color: var(--color-muted); }
.workflow-route-table tr.is-blank input[type=text] { background: #fbfaf8; }
.workflow-route-table__people summary { cursor: pointer; }
.workflow-route-table__people[open] summary { margin-bottom: 6px; }
.workflow-form__grid .field input, .workflow-form__grid .field select, .workflow-form__grid .field textarea { min-width: 0; width: 100%; }
.workflow-form__grid .field input[type=time] {
  height: 32px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.85rem; background: #fff;
}
.workflow-form__field--table { grid-column: 1 / -1; }
/* 慶弔事届の区切り(結婚・出生・家族死亡・傷病・災害)と、計算した値(取得期間・手当)。2026-10-03 */
.workflow-form__section { grid-column: 1 / -1; margin: 10px 0 6px; padding: 6px 0 2px; border-top: 2px solid var(--color-border); font-weight: 700; font-size: .9rem; color: var(--color-primary); }
.workflow-form__summary { grid-column: 1 / -1; margin: 4px 0 10px; padding: 8px 12px; border-radius: 8px; background: #eef4fd; border: 1px solid #cddcf3; font-size: .9rem; }
.workflow-detail__section th, .wf-print__fields .workflow-detail__section th { background: transparent; border-top: 2px solid var(--color-border); padding-top: 10px; color: var(--color-primary); text-align: left; }
.workflow-form__rules p { margin: 0 0 2px; }
.workflow-form__rules { margin-bottom: 10px; line-height: 1.6; }
.workflow-rows { width: auto; }
.workflow-rows td, .workflow-rows th { padding: 3px 6px; }
.workflow-rows__cell input, .workflow-rows__cell select { height: 30px; padding: 3px 6px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
/* 表の中の欄は欄ごとの幅にする(2026-10-23 ユーザー: どの欄も同じ幅で並んでいた。申請の画面の .workflow-form__grid .field input の width:100% と
   .field input の最小 220px が表の中にも効いていたため。.workflow-rows を付けて強くする)。スマホ(下の @media)は今までどおり縦に並べる */
.field .workflow-rows__cell input, .field .workflow-rows__cell select { min-width: 0; }
.workflow-rows .workflow-rows__cell--text input { width: 150px; }
.workflow-rows .workflow-rows__cell--number input { width: 100px; text-align: right; }
.workflow-rows .workflow-rows__cell--vendor input { width: 120px; }
.workflow-rows .workflow-rows__cell--detail input { width: 290px; } /* 営業手当の「詳細」(2026-11-11) */
.workflow-rows--show td.workflow-rows__show-cell--detail { white-space: normal; overflow-wrap: anywhere; min-width: 12em; max-width: 26em; }
.workflow-rows .workflow-rows__cell--name input { width: 150px; }
.workflow-rows .workflow-rows__cell--order_no input { width: 90px; }
.workflow-rows .workflow-rows__cell--quantity input { width: 56px; }
.workflow-rows .workflow-rows__cell--unit_price input { width: 90px; }
.workflow-rows__add { align-self: flex-start; }
.workflow-rows__note { height: 28px; padding: 2px 6px; font-size: 0.82rem; width: 160px; border: 1px solid #f0cf96; border-radius: var(--radius); background: #fffaf0; }
.workflow-tables .section-title { margin-top: 14px; }
.workflow-form__grid .field input[type=month] {
  height: 32px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.85rem; background: #fff;
}
.workflow-rows__label { display: none; }
/* スマホでは表の1行を折り返して並べる(見出しの代わりに各欄の上に項目名) */
@media (max-width: 600px) {
  .workflow-form .workflow-rows thead { display: none; }
  .workflow-form .workflow-rows, .workflow-form .workflow-rows tbody { display: block; width: 100%; min-width: 0; }
  .workflow-form .workflow-rows tr { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
  .workflow-form .workflow-rows tr[hidden] { display: none; }
  .workflow-form .workflow-rows td { display: flex; flex-direction: column; border: 0; padding: 0; background: none; }
  .workflow-form .workflow-rows td.num { width: 100%; font-weight: 600; text-align: left; }
  .workflow-form .workflow-form__field--table .table-wrap { overflow: visible; }
  .workflow-form .workflow-rows__cell input, .workflow-form .workflow-rows__cell select { box-sizing: border-box; max-width: 100%; }
  .workflow-rows__label { display: block; font-size: 0.7rem; color: var(--color-muted); }
  .workflow-form .workflow-rows__cell--text input, .workflow-form .workflow-rows__cell--datetime input { width: 100%; }
  .workflow-form .workflow-rows__cell--text, .workflow-form .workflow-rows__cell--datetime { flex: 1 1 100%; min-width: 0; }
}
/* メッセージ(2026-09-29) */
.message-recipients__org { font-weight: 600; min-width: 110px; }
/* 宛先の小さな選び方(recipient_picker_controller.js。2026-11-21) */
.recipient-picker__ui { border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 10px; background: #fff; }
.recipient-picker__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--color-border); }
.recipient-picker__count { font-weight: 700; color: var(--frame, #2f5f93); margin-right: 2px; }
.recipient-picker__chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #e8f0fa; border: 1px solid #b9cde6; color: #163f6b; font-size: 0.9rem; line-height: 1.3; }
.recipient-picker__remove { border: 0; background: none; padding: 0 6px; font-size: 1.05rem; line-height: 1; color: #4b6584; cursor: pointer; border-radius: 999px; }
.recipient-picker__remove:hover, .recipient-picker__remove:focus-visible { background: #cfdcee; color: #0e2f52; outline: none; }
.recipient-picker__empty { color: var(--color-muted); font-size: 0.88rem; }
.recipient-picker__bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.recipient-picker__search { flex: 1 1 160px; min-width: 0; max-width: 240px; }
.recipient-picker__org { flex: 0 1 200px; min-width: 0; }
.recipient-picker__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 4px; max-height: 220px; overflow-y: auto; padding: 2px; align-content: start; }
.recipient-picker__group { grid-column: 1 / -1; font-size: 0.8rem; font-weight: 700; color: var(--color-muted); padding: 6px 2px 0; }
.recipient-picker__option { text-align: left; padding: 6px 10px 6px 28px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; color: var(--color-text, #222020); font: inherit; font-size: 0.9rem; cursor: pointer; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipient-picker__option::before { content: ""; position: absolute; left: 9px; top: 50%; width: 12px; height: 12px; margin-top: -7px; border: 1.5px solid #8a96a6; border-radius: 3px; box-sizing: content-box; }
.recipient-picker__option[aria-selected="true"] { background: #e8f0fa; border-color: #7fa3cf; color: #0e2f52; font-weight: 600; }
.recipient-picker__option[aria-selected="true"]::before { background: var(--frame, #2f5f93); border-color: var(--frame, #2f5f93); }
.recipient-picker__option[aria-selected="true"]::after { content: ""; position: absolute; left: 13px; top: 50%; width: 4px; height: 8px; margin-top: -7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.recipient-picker__option:hover { border-color: #7fa3cf; }
.recipient-picker__none { margin: 6px 2px; color: var(--color-muted); font-size: 0.88rem; }
@media (max-width: 860px) {
  .recipient-picker__search { max-width: none; flex-basis: 100%; }
  .recipient-picker__org { flex: 1 1 100%; }
  .recipient-picker__list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 260px; }
}
.message-people { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; }
.message-people .is-unread { color: var(--color-muted); }
.message-add { margin-top: 8px; }
.message-add summary { cursor: pointer; color: var(--color-primary); }
.message-reply-form { flex-direction: column; align-items: stretch; }
/* 返信はサイボウズと同じ形(2026-11-21): 書く欄が上・返信は新しい順・番号・「返信する」 */
.message-replies .message-reply-form { margin: 0 0 14px; }
.message-replies__no { font-weight: 700; color: var(--frame, #2f5f93); }
.message-replies__quote { margin-top: 4px; padding: 2px 6px; border: 0; background: none; color: var(--frame, #2f5f93); font: inherit; font-size: 0.85rem; cursor: pointer; border-radius: 4px; }
.message-replies__quote:hover, .message-replies__quote:focus-visible { background: #eef3fa; text-decoration: underline; outline: none; }
/* 返信の枠は大きめ・右下のつまみで下へ伸ばせる(2026-11-21 ユーザー: 枠が小さく、つまみで伸ばそうとしても伸びなかった。
   縦に並べた枠の中で flex: 1 だと高さが決められてしまうので、返信の欄だけ外す) */
.message-reply-form textarea { flex: none; min-height: 7.5em; resize: vertical; line-height: 1.6; }
/* 新規のメッセージの本文も、パソコンでは高めに(2026-11-21 ユーザー: デスクトップは特に枠が小さい)。右下のつまみで伸ばせる */
.message-compose__body { resize: vertical; line-height: 1.6; }
@media (min-width: 861px) {
  .field textarea.message-compose__body, textarea.message-compose__body { min-height: 20em; }
  .message-reply-form textarea { min-height: 10em; }
}
.message-reply-form__foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.board-comment.is-new { border-left: 3px solid #e0a64a; padding-left: 8px; }
/* アドレス帳・リンク集(2026-09-29) */
.address-rows { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.address-rows__item { padding: 2px 9px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 0.8rem; text-decoration: none; color: var(--color-text); }
.address-rows__item.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.address-rows__item.is-empty { color: #bbb; }
.address-list__memo { max-width: 240px; white-space: normal; }
.link-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.link-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; }
.link-list li.is-off { opacity: 0.6; }
.link-list__name { font-weight: 600; }
.link-roles { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* 入金カレンダー(2026-09-29) */
.payment-calendar__item { display: block; font-size: 0.74rem; line-height: 1.35; padding: 1px 3px; margin-top: 2px; border-radius: 3px; background: #eef4ee; color: var(--color-text); text-decoration: none; }
.payment-calendar__item:hover { background: #dcebdc; }
/* サイボウズの入金カレンダーから入れた分(2026-10-19。押しても開かない) */
.payment-calendar__item--cybozu, .payment-calendar__item--cybozu:hover { background: #f1f1ea; }
/* 手入力の分(2026-10-19。押すと直す窓) */
.payment-calendar__manual { display: block; }
button.payment-calendar__item--manual { width: 100%; text-align: left; border: 1px dashed #b9b4a6; background: #fbfaf5; color: var(--color-text); font: inherit; font-size: 0.74rem; cursor: pointer; }
button.payment-calendar__item--manual:hover { background: #f1efe4; }
.payment-calendar__name { display: block; overflow-wrap: anywhere; }
.payment-calendar__amount { display: block; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; } /* 金額は右にそろえる(2026-10-27 ユーザー) */
.payment-calendar__staff { display: block; font-size: 0.68rem; color: var(--color-muted); }
.payment-calendar__method { display: block; text-align: right; font-size: 0.68rem; color: var(--color-muted); }
.schedule__nav .segmented { display: inline-flex; gap: 0; margin-left: 4px; }
.schedule__nav .segmented .btn { border-radius: 0; }
.schedule__nav .segmented .btn:first-child { border-radius: 6px 0 0 6px; }
.schedule__nav .segmented .btn:last-child { border-radius: 0 6px 6px 0; }
.payment-calendar__total { font-size: 0.72rem; color: var(--color-muted); text-align: right; margin-top: 2px; }
/* 同じ日・同じお客様の現金などを1行にまとめた行(2026-11-19)。押すと請求書ごとの中身 */
.payment-calendar__group > summary { list-style: none; cursor: pointer; }
.payment-calendar__group > summary::-webkit-details-marker { display: none; }
.payment-calendar__count { display: inline-block; margin-left: 2px; padding: 0 4px; border-radius: 8px; background: #d7e6d7; font-size: 0.68rem; font-weight: 700; }
.payment-calendar__sub { display: block; margin: 1px 0 0 6px; padding: 1px 3px; border-left: 2px solid #c7d9c7; font-size: 0.7rem; color: var(--color-text); text-decoration: none; }
.payment-calendar__sub:hover { background: #eef4ee; }
/* ファイル管理(2026-09-29) */
.file-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
/* パソコンは左にフォルダの木・右に中身(2026-10-09 ユーザー: サイボウズと同じ形)。スマホは木を出さず「フォルダを選ぶ」 */
.file-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.file-layout > .card { margin: 0; }
.file-layout__tree { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 10px 8px; }
.file-tree { font-size: 0.88rem; }
.file-tree__list { list-style: none; margin: 0; padding: 0 0 0 14px; }
.file-tree > .file-tree__list { padding-left: 0; }
.file-tree__row { display: flex; align-items: center; gap: 2px; list-style: none; cursor: pointer; }
.file-tree__row::-webkit-details-marker { display: none; }
.file-tree__toggle { flex: none; width: 14px; height: 14px; position: relative; }
.file-tree__toggle::before { content: ""; position: absolute; left: 4px; top: 3px; border: 4px solid transparent; border-left: 5px solid var(--color-muted); }
.file-tree__node[open] > summary .file-tree__toggle::before { transform: rotate(90deg); transform-origin: 2px 4px; left: 5px; top: 3px; }
.file-tree__toggle--none::before { display: none; }
.file-tree__link { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; padding: 4px 6px; border-radius: 6px; color: var(--color-text); text-decoration: none; }
.file-tree__link:hover { background: #eef1f8; }
.file-tree__link.is-current { background: #e3eaf5; color: var(--color-primary); font-weight: 600; }
.file-tree__top { margin-bottom: 4px; font-weight: 600; }
.file-tree__icon { width: 17px; height: 17px; flex: none; color: #c89b2c; }
.file-tree__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tree__count { flex: none; font-size: 0.75rem; color: var(--color-muted); }
@media (max-width: 860px) {
  .file-layout { display: block; }
  .file-layout__tree { display: none; }
}
/* パソコンは横に並べるタイル(2026-10-09 ユーザー: 縦に長い) */
.folder-list { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 1fr; }
.folder-list li { display: block; min-width: 0; }
.folder-list__item { display: flex; align-items: center; gap: 8px; height: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 8px; text-decoration: none; color: var(--color-text); }
.folder-list__item:hover { background: #eef1f8; border-color: var(--frame, #2f5f93); }
.folder-list__icon { width: 20px; height: 20px; flex: none; color: #c89b2c; vertical-align: middle; }
.folder-list__text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.folder-list__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-list__meta { font-size: 0.74rem; color: var(--color-muted, #6b7280); }
.folder-list__lock { flex: none; color: #b0892a; }
.folder-list__lock-icon { width: 14px; height: 14px; vertical-align: middle; }
.breadcrumb { font-size: 0.9rem; }
.file-list__title { font-weight: 600; }
/* ファイルの並び(2026-10-19) */
.file-sort { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.file-sort .hint { margin: 0; }
.file-sort__links { display: flex; gap: 12px; font-size: 0.9rem; }
.file-upload { margin-top: 16px; border-top: 1px solid var(--color-border); padding-top: 8px; }
.file-replace { flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
.file-replace input[type=text] { flex: 1 1 180px; }
/* メール(2026-09-29) */
.mail-list tr.is-unread td { font-weight: 700; }
.mail-list__from { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-status__error { color: var(--color-danger); }
.mail-accounts__form { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.mail-account__intake { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; white-space: nowrap; }
.mail-accounts__form input[type=email], .mail-accounts__form input[type=password] { height: 28px; padding: 2px 6px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); width: 210px; }
.mail-accounts__state { max-width: 240px; white-space: normal; font-size: 0.8rem; }
.mail-staffs { display: grid; gap: 10px; }
.mail-staff { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; }
.mail-staff__name { font-size: 0.92rem; margin: 0 0 6px; }
.mail-account { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--color-border); }
.mail-account__side { display: flex; gap: 6px; align-items: center; }
.mail-accounts__form input.mail-accounts__label { height: 28px; padding: 2px 6px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); width: 130px; }
.mail-account-add { margin-top: 6px; }
.mail-account-add summary { cursor: pointer; color: var(--color-primary); font-size: 0.85rem; margin-bottom: 4px; }
.mail-list__to { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 本文は白い紙に(2026-11-11 ユーザー: 字の所は白抜きのほうが見やすい。前は薄いベージュ #fbfaf8) */
.mail-body { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 0.9rem; line-height: 1.7; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.mail-html { display: block; width: 100%; min-height: 120px; height: 480px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; margin: 8px 0; }
.mail-body-switch summary { cursor: pointer; }
.mail-list__subject { color: inherit; text-decoration: none; }
.mail-compose__grid { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; align-items: center; margin-bottom: 10px; }
.mail-compose__grid label { font-size: 0.8rem; color: var(--color-muted); }
.mail-compose__grid input, .mail-compose__grid select { height: 32px; padding: 4px 8px; font-size: 0.88rem; border: 1px solid var(--color-border); border-radius: var(--radius); width: 100%; box-sizing: border-box; background: #fff; }
.mail-compose__body { width: 100%; font-size: 0.92rem; line-height: 1.6; font-family: inherit; }
.mail-compose__signature textarea { background: #f7f8fa; }
/* 個人設定の「メールの署名」(2026-10-28) */
.account-signature { display: grid; gap: 6px; max-width: 640px; padding: 4px 0 8px; }
.account-signature + .account-signature { border-top: 1px dashed var(--color-border); padding-top: 8px; }
.account-signature__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.account-signature__address { font-weight: 700; }
.account-signature__name { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.account-signature__name input { width: 11em; }
.account-signature input[type=text], .account-signature textarea { padding: 6px 10px; border: 1px solid var(--input-border); border-radius: var(--radius-control); font-size: 0.95rem; }
.account-signature textarea { width: 100%; font-family: inherit; line-height: 1.5; }
.mail-account__more { flex-basis: 100%; }
.mail-account__more summary { cursor: pointer; }
.mail-account__more { flex-basis: 100%; }
.mail-account__more[open] { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 6px; }
.mail-account__field { display: flex; flex-direction: column; gap: 2px; }
.mail-accounts__form input.mail-accounts__sender { width: 260px; max-width: 100%; height: 28px; padding: 2px 6px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.mail-accounts__signature { width: 100%; max-width: 520px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); }

/* メール: アドレス帳から選ぶ(2026-09-29) */
.mail-picker { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 6px 10px; margin: 4px 0 10px; font-size: 0.85rem; }
.mail-picker > summary { cursor: pointer; color: var(--color-primary); font-weight: 600; }
.mail-picker__books { display: grid; gap: 4px; margin: 8px 0; }
.mail-picker__book > summary { cursor: pointer; }
.mail-picker__all { margin: 4px 0 2px 14px; font-weight: 600; }
.mail-picker__entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; margin: 0 0 6px 14px; max-height: 260px; overflow-y: auto; }
.mail-picker__entries .hint { word-break: break-all; }

/* メール: フォルダ・まとめて操作・フォルダと振り分け(2026-09-29) */
.mail-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.mail-folders { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; position: sticky; top: 8px; }
.mail-folders__item { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius); color: inherit; text-decoration: none; }
.mail-folders__item:hover { background: var(--color-bg-subtle, #f1f0ec); }
.mail-folders__item.is-active { background: var(--color-primary); color: #fff; font-weight: 600; }
/* 未読の数(2026-10-27 ユーザー: パソコンで黒い字の横に黒い数字で見づらい)→ 未読の青い丸と同じ青の地に白い数字。選んでいるフォルダ(紺の地)では白い地に紺の数字 */
.mail-folders__item .tabs__count { background: #3b7be8; color: #fff; }
.mail-folders__item.is-active .tabs__count { background: #fff; color: var(--color-primary); }
/* 線のアイコン(2026-10-03 ユーザー: 絵文字をやめて下の帯と同じ見た目に。ApplicationHelper#line_icon) */
.line-icon { width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex: none; }
.mail-folders__label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.mail-folders__icon { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.btn__icon, .m-chip__icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.btn .btn__icon + *, .mail-side__compose .btn__icon { margin-right: 5px; }
.m-chip__icon { margin-right: 4px; }
.mail-attach { display: inline-flex; align-items: center; gap: 2px; color: var(--color-text-muted, #6b6f7a); }
.mail-attach__icon { width: 14px; height: 14px; flex: none; }
.m-head__icon { width: 21px; height: 21px; }
.mail-folders__manage { margin-top: 8px; padding: 4px 10px; font-size: 0.78rem; color: var(--color-primary); }
.mail-main { min-width: 0; }
.mail-folder-title { font-size: 0.95rem; margin: 0 0 6px; }
.mail-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.82rem; }
.mail-bulk select { height: 26px; font-size: 0.8rem; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0 4px; }
.mail-bulk--single { margin: 6px 0 10px; justify-content: flex-end; }
.mail-empty-trash { margin: 0 0 6px; }
.mail-list__check { width: 40px; text-align: center; }
.mail-list td.mail-list__check { padding: 0; }
.mail-list__check-hit { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 8px; cursor: pointer; }
.mail-bulk__all input { width: 20px; height: 20px; cursor: pointer; }
.mail-swipe__actions { display: none; } /* スライドのボタンはスマホだけ */
.mail-list__check input { width: 20px; height: 20px; margin: 0; cursor: pointer; }
.mail-folder-admin { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; max-width: 520px; }
.mail-folder-admin li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px dashed var(--color-border); font-size: 0.85rem; }
.mail-folder-admin__actions { display: inline-flex; gap: 4px; align-items: center; }
.mail-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; font-size: 0.85rem; }
.mail-inline-form input[type=text], .mail-inline-form select { height: 30px; padding: 2px 6px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.mail-inline-form input[type=text] { width: 240px; max-width: 100%; }
.mail-rules tr.is-muted td { color: var(--color-text-muted, #8a8f99); }
.mail-folders-mobile { display: none; }
@media (max-width: 760px) {
  .mail-layout { grid-template-columns: 1fr; }
  .mail-folders { display: none; }
  .mail-folders-mobile { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .mail-folders-mobile select { flex: 1; min-width: 0; height: 36px; font-size: 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0 6px; }
  .mail-folders-mobile .mail-folders__manage { margin: 0; padding: 0; white-space: nowrap; font-size: 0.78rem; }
}
/* スマホではメールの一覧を2行(送信者・日時 / 件名)にして件名が切れないようにする */
@media (max-width: 760px) {
  .mail-list { min-width: 0; }
  .mail-list thead { display: none; }
  .mail-list tbody tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "check from date" "check subject subject"; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
  .mail-list tbody td { border: 0; padding: 1px 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mail-list tbody td.mail-list__check { grid-area: check; align-self: center; }
  .mail-list tbody td.mail-list__from { grid-area: from; }
  .mail-list tbody td.board-list__date { grid-area: date; font-size: 0.72rem; }
  .mail-list tbody td.mail-list__subject-cell { grid-area: subject; white-space: normal; }
  .mail-list tbody td.num, .mail-list tbody td.mail-list__to { display: none; }
  .mail-list tbody td[colspan] { grid-column: 1 / -1; }
}
.mail-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 4px; }
/* メールの一覧の列: 件名・送信者・受信日時・宛先・大きさ(2026-09-29 ユーザー指定) */
.mail-list .mail-list__from { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .mail-list__to { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .mail-list__account { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 表の欄の max-width は効かないので、中の span で切る(2026-10-19 ユーザーの写真: 送信者の名前がとても長いメールがあると、送信者の列が広がって件名が右に押し出された) */
.mail-list .mail-list__clip { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .mail-list__to .mail-list__clip { max-width: 170px; }
.mail-list .mail-list__account .mail-list__clip { max-width: 140px; }
.mail-list .mail-list__subject-cell { overflow-wrap: anywhere; min-width: 200px; }
@media (max-width: 860px) { .mail-list .mail-list__clip { max-width: none; } .mail-list .mail-list__subject-cell { min-width: 0; } }
.mail-body a, .mail-head a.mail-address-link, a.mail-address-link { color: #1a5fb4; text-decoration: underline; word-break: break-all; }
/* メールを開いた画面の操作を1列に(2026-09-29 ユーザー指定) */
.mail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.mail-toolbar__form { display: contents; }
.mail-toolbar select { height: 30px; font-size: 0.8rem; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0 4px; }
.mail-toolbar__where { margin-left: auto; white-space: nowrap; font-size: 0.8rem; }
/* メールの左の列(2026-09-29 ユーザー: Yahoo!メールのように左置き。アドレス13個・フォルダ13個) */
.mail-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; }
.mail-side__compose { justify-content: center; border-radius: 999px; padding: 8px 12px; font-weight: 600; }
.mail-side__account { display: flex; align-items: center; gap: 4px; }
.mail-side__account select { flex: 1; min-width: 0; height: 32px; font-size: 0.82rem; font-weight: 600; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0 4px; }
.mail-side__address { flex: 1; min-width: 0; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-side__fetch-form { display: inline; margin: 0; }
.mail-side__fetch { min-width: 32px; padding: 4px 8px; }
.mail-side .mail-folders { position: static; }
.mail-folders__heading { margin: 10px 0 2px; padding: 0 4px; font-size: 0.75rem; color: var(--color-text-muted, #6b6f7a); display: flex; justify-content: space-between; align-items: center; }
.mail-folders__add { font-size: 1rem; text-decoration: none; color: var(--color-primary); padding: 0 4px; }
.mail-folders__none { margin: 2px 8px; font-size: 0.75rem; }
.mail-side__links { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 0 4px; font-size: 0.78rem; }
.mail-side__links a { color: var(--color-primary); }
.mail-main .mail-status { margin-top: 0; }
@media (max-width: 760px) {
  .mail-side { position: static; gap: 6px; }
  .mail-side__compose { align-self: stretch; }
  .mail-side__account select { height: 38px; font-size: 0.95rem; }
  .mail-side .mail-folders { display: none; }
  .mail-side__links { flex-direction: row; gap: 14px; }
}
.workflow-direct { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }

/* ワークフローの申請書の印刷(A4 縦。2026-09-29) */
.wf-print { max-width: 190mm; margin: 0 auto; padding: 8mm 6mm; background: #fff; color: #222; font-size: 10pt; }
.wf-print__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; margin-bottom: 5mm; }
.wf-print__title { font-size: 16pt; margin: 0 0 3mm; letter-spacing: 0.2em; white-space: nowrap; }
.wf-print__who { display: block; font-size: 7.5pt; line-height: 1.2; }
.wf-print__meta th { text-align: left; font-weight: 400; color: #555; padding: 0.5mm 4mm 0.5mm 0; }
.wf-print__meta td { padding: 0.5mm 0; }
.wf-print__stamps { border-collapse: collapse; }
.wf-print__stamp-rows { display: flex; flex-direction: column; align-items: flex-end; gap: 1.5mm; }
.wf-print__stamps th, .wf-print__stamps td { border: 0.3mm solid #444; width: 20mm; text-align: center; font-weight: 400; font-size: 9pt; }
.wf-print__stamps th { padding: 1mm 0; }
.wf-print__stamps td { height: 20mm; }
.wf-print__stamps--done td { vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* 紙の大きさ(mm・pt)に合わせて、ハンコの中の文字を小さくする */
.wf-print__stamps--done .wf-stamp { width: 17mm; height: 17mm; border-width: 0.6mm; }
.wf-print__stamps--done .wf-stamp__top { font-size: 5pt; max-width: 13mm; padding: 0 1mm 0.2mm; }
.wf-print__stamps--done .wf-stamp__date { font-size: 6pt; width: 14mm; padding: 0.2mm 0; }
.wf-print__stamps--done .wf-stamp__name { font-size: 7.5pt; padding-top: 0.2mm; }
.wf-print__fields { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
.wf-print__fields th, .wf-print__fields td { border: 0.3mm solid #888; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
.wf-print__fields th { width: 32mm; background: #f3f3f3; font-weight: 600; }
.wf-print__section { font-size: 11pt; margin: 4mm 0 1.5mm; }
.wf-print__rows { width: 100%; border-collapse: collapse; font-size: 9pt; }
.wf-print__rows th, .wf-print__rows td { border: 0.3mm solid #888; padding: 1mm 1.5mm; }
.wf-print__rows th { background: #f3f3f3; }
.wf-print__rows .num { text-align: right; }
@media print {
  /* 表の右の線がページの端で切れないよう内側に(2026-10-12 ユーザー: 営業手当申請書の右の線・ハンコの枠が切れた。売上分析と同じ直し) */
  .wf-print { padding: 0 1.5mm; max-width: none; }
  .wf-print__fields, .wf-print__rows { width: calc(100% - 1mm); margin-left: 0.5mm; }
  .wf-print__head { padding-right: 0.5mm; }
  /* 長い英数字(URL・型番など)で表が右にはみ出さないよう、セルの中で折り返す */
  .wf-print__fields td, .wf-print__rows td, .sum-print__table td { overflow-wrap: anywhere; }
  .wf-print__fields th, .wf-print__rows th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ホーム(2026-09-29。ログイン後の最初の画面。お知らせ) */
.home__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.home__notices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
/* お知らせ(2026-10-03 ユーザー: 絵文字とベージュをやめ、線のアイコン(白い丸)・右に ›。少し色を入れる=ふつうは淡い橙(M10Y20 #FEECD2。
   ユーザーが橙色系の色チップから選んだ。その前は淡い黄緑、青は背景にかぶるので不可)、急ぎは淡い赤) */
.home__notice { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #feecd2; border: 1px solid #f6d5a6;
  border-left: 4px solid #e48e00; color: inherit; text-decoration: none; font-size: 0.88rem; }
.home__notice:hover { background: #fde2bb; }
.home__notice-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #9a5800; }
.home__notice-icon svg { width: 18px; height: 18px; }
.home__notice-text { flex: 1 1 auto; min-width: 0; }
.home__notice-text strong { color: #8a4f00; }
.home__notice-arrow { flex: none; color: #6f7d96; font-size: 1.3rem; line-height: 1; }
.web-place { margin-left: auto; }
.web-place select { width: auto; max-width: 260px; font-size: 0.9rem; }
.receivable-late { color: var(--color-danger); font-weight: 700; }
.notices__alert { display: block; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #fdebea; border: 1px solid #f2c4bf; border-left: 4px solid #d0453b; color: #a3261c; font-weight: 600; text-decoration: none; }
/* 新しい入金(2026-11-18)。急ぎではないので赤ではなく緑 */
.notices__alert--info { background: #e8f4ec; border-color: #bfdcc8; border-left-color: #2f8a52; color: #1f6a3c; }
/* 入金カレンダーの「新」(前に開いたあとに入った入金。2026-11-18) */
.payment-calendar__new { display: inline-block; margin-right: 3px; padding: 0 4px; border-radius: 4px; background: #2f8a52; color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1.5; }
.home__notice--error { background: #fdebea; border-color: #f2c4bf; border-left-color: #d0453b; }
.home__notice--error:hover { background: #fbe0de; }
.home__notice--error .home__notice-icon { color: #c0392b; }
.home__notice--error .home__notice-text strong { color: #a5281c; }
.home__notice--member { border-left-color: #a51f12; }
.home__notice--member .home__notice-icon { background: rgba(255, 255, 255, 0.25); color: #fff; }
.home__notice--member .home__notice-text strong, .home__notice--member .home__notice-arrow { color: #fff; }
/* たたんだお知らせ(押すと開く) */
.home__more > summary { list-style: none; cursor: pointer; text-align: center; padding: 8px 12px; border-radius: 8px; border: 1px dashed #f0c27a;
  background: #fff6e9; color: #8a4f00; font-size: 0.88rem; }
.home__more > summary::-webkit-details-marker { display: none; }
.home__more > summary b { font-weight: 700; white-space: nowrap; }
.home__more[open] > summary .home__more-arrow { display: inline-block; transform: rotate(180deg); }
.home__more-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.home__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; align-items: start; }
/* 見出しの行だけ細い帯(2026-10-08 ユーザー: C案。帯は細めに) */
.home-card { margin: 0; padding: 0 16px 14px; min-width: 0; overflow: hidden; }
.home-card__title { font-size: 0.92rem; margin: 0 -16px 8px; padding: 3px 16px; background: var(--band); display: flex; align-items: center; gap: 6px; }
.home-card__title a { color: var(--color-primary-dark); text-decoration: none; }
.home-card__title a:hover { text-decoration: underline; }
.home-card__day { font-size: 0.82rem; margin: 8px 0 2px; color: var(--color-text-muted, #6b6f7a); }
.home-card__title--date > a { font-size: 1.12em; } /* 2026-11-14 ユーザー: 今日の日付を見出しに・一回り大きく */
.home-card__title--date .hint { font-weight: 400; font-size: 0.8rem; margin-left: 4px; }
/* スマホのホームの予定の「今日」「明日」(2026-11-18 ユーザー)。見出しの右に小さな切り替え */
.home-day__switch { margin-left: auto; display: inline-flex; border: 1px solid var(--frame, #2f5f93); border-radius: 6px; overflow: hidden; flex: none; }
.home-day__btn { border: 0; background: #fff; color: var(--frame, #2f5f93); font: inherit; font-size: 0.82rem; font-weight: 600; padding: 3px 12px; cursor: pointer; }
.home-day__btn + .home-day__btn { border-left: 1px solid var(--frame, #2f5f93); }
.home-day__btn.is-active { background: var(--frame, #2f5f93); color: #fff; }
.home-list { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.home-list li { border-bottom: 1px dashed var(--color-border); }
.home-list li:last-child { border-bottom: 0; }
.home-list li > a, .home-list li.hint, .home-list__funeral > span { display: block; padding: 6px 2px; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-list li > a:hover { background: #f5f4f0; }
/* 商品の分類のマスタ(2026-11-13)。大分類 > 中分類 > 小分類を字下げで */
.cat-tree { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cat-major { border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 6px 10px; }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 0; border-bottom: 1px dashed var(--color-border); }
.cat-row--l1 { font-weight: 700; font-size: 1.02rem; }
.cat-row--l2 { padding-left: 1.6em; }
.cat-row--l3 { padding-left: 3.2em; font-size: 0.92rem; }
.cat-row__name { min-width: 8em; }
.cat-row__actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; font-weight: 400; }
.cat-inline { display: inline; margin: 0; }
.cat-rename { display: inline-block; }
.cat-rename > summary { list-style: none; cursor: pointer; }
.cat-rename > summary::-webkit-details-marker { display: none; }
.cat-rename__form { display: inline-flex; gap: 4px; align-items: center; margin: 4px 0; }
.cat-rename__form input[type=text] { width: 14em; }
.cat-add { padding: 4px 0; }
.cat-add > summary { cursor: pointer; }
.cat-add--l2 { padding-left: 1.6em; }
.cat-add--l3 { padding-left: 3.2em; }
/* 施行の分析の期間の選び方(2026-11-13): 月の行と期間の行。今選んでいるボタンは紺 */
.funeral-period { flex-wrap: wrap; gap: 8px 16px; }
.funeral-period__rows { display: flex; flex-direction: column; gap: 6px; }
.funeral-period__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.funeral-period__label { min-width: 2.5em; font-size: 0.85rem; font-weight: 700; color: var(--color-muted); }
.funeral-period__row input[type=month], .funeral-period__row input[type=date] { width: auto; padding: 3px 6px; }
.funeral-period .btn.is-current { background: var(--color-primary, #113961); color: #fff; border-color: var(--color-primary, #113961); }
/* 時刻の幅は「00:00-00:00」の長さにそろえる(2026-11-12 ユーザー: 「10:00-11:00」と「10:00」で後ろの印・名前がでこぼこしていた) */
.home-list__time { display: inline-block; min-width: 11ch; font-variant-numeric: tabular-nums; color: var(--color-primary-dark); margin-right: 2px; }
.home-list__tag { display: inline-block; font-size: 0.72rem; padding: 0 6px; border-radius: 999px; background: #e6edf7; color: #2a5090; margin-right: 2px; }
.home-list__tag--warn { background: #fdecec; color: #a33; }
@media (max-width: 760px) { .home__grid { grid-template-columns: minmax(0, 1fr); } }
/* 銀行明細の取り込み: MF のボタン(ブックマーク)(2026-09-29) */
.mf-bookmarklet { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border: 1px dashed #b8c4dc; border-radius: 8px; background: #f6f8fc; }
.mf-bookmarklet__button { white-space: nowrap; cursor: grab; }
.mf-bookmarklet .hint { line-height: 1.7; }
@media (max-width: 640px) { .mf-bookmarklet { flex-direction: column; } }
.bank-guide { max-width: 760px; }
.bank-guide ol { padding-left: 1.4em; line-height: 1.9; }
.bank-guide h2 { font-size: 1.05rem; margin: 18px 0 6px; }
@media print {
  .bank-guide__actions { display: none !important; }
  .bank-guide { max-width: none; font-size: 11pt; }
}
/* スマホの下の帯(2026-09-30 ユーザー: サイボウズのアプリのような、すりガラスの半透明で下に固定・アイコンを並べる)。
   上の「葬儀顧客管理システム」の帯は出さない(☰ は下の帯の「メニュー」)。860px 以下だけ。
   2026-10-25 ユーザー(Codex v83。v80 の「画面の端まで」を上書き): **独立した枠に戻す**。左右 6px・角丸 16px・枠線 1px・淡いアイボリーのグラデーション。
   できるだけ下に: bottom は iPhone のホームバーの余白(safe area)だけ(余白が0の端末では画面の下端ぴったり)。帯の中に safe area の padding は入れない。
   ホームバーの余白の線は無し(2026-10-25 ユーザー: 線は要らないので帯を下げる)。
   押している項目はアイコンの後ろだけ小さな淡い青緑の面・文字は濃い青(design.css.erb)。
   帯の高さは tab_bar_controller.js が測って --tab-bar-h に入れる(文字を大きくすると名前が折り返して高くなるため。上に乗る帯・中身の下の余白が追従) */
.tab-bar { display: none; }
@media (max-width: 860px) {
  /* 帯の下端の位置(2026-10-25 ユーザー「下の線は無くていいので、その付近まで下げて」): iPhone のホームバーの余白(34px)の中まで下げ、
     ホームバー(下から約8〜13px)の少し上(下から約22px。サイボウズのアプリと同じくらい)に。余白が無い端末では下から6px */
  :root { --tab-bar-bottom: max(6px, calc(env(safe-area-inset-bottom, 0px) - 12px)); } /* 2026-10-25 ユーザー「もうちょい上」: 22→12(iPhone で下から約22px=サイボウズと同じくらい) */
  .app-shell .page { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 16px); }
  .tab-bar {
    display: flex; gap: 1px; align-items: stretch; overflow: hidden;
    position: fixed; left: 6px; right: 6px; bottom: var(--tab-bar-bottom, 0px); z-index: 950; width: auto; max-width: none; margin: 0;
    padding: 4px 5px; border: 1px solid #aaa79e; border-radius: 16px;
    background: linear-gradient(180deg, rgba(247, 245, 239, 0.97), rgba(240, 237, 229, 0.99));
    -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 3px 10px rgba(77, 73, 61, 0.13);
  }
  .tab-bar__item {
    position: relative; isolation: isolate; flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    padding: 2px 0 3px; border: 0; border-radius: 6px; background: transparent; color: #525854;
    font: inherit; font-size: 0.68rem; font-weight: 550; letter-spacing: -0.02em; line-height: 1.25; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tab-bar__item .sidebar__icon { width: 28px; height: 28px; margin: 0; opacity: 1; }
  .tab-bar__label { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
  .tab-bar__item.is-active { color: #1f4962; font-weight: 750; }
  .tab-bar__badge {
    position: absolute; top: 0; left: calc(50% + 9px); min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
    border-radius: 12px; background: #c94f48; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
    border: 1px solid #f2efe7; box-shadow: 0 1px 2px rgba(115, 55, 44, 0.1);
  }
  .tab-bar__item .sidebar__icon { flex: none; }
  .tab-bar__dot { position: absolute; top: 3px; left: calc(50% + 12px); width: 9px; height: 9px; border-radius: 50%; background: #c94f48; border: 2px solid #f2efe7; }
}
@media print { .tab-bar { display: none !important; } }
/* スマホのメール(2026-09-30 ユーザー: iPhone のメールのように)。
   上の帯はすりガラスで上に固定(‹ 題名 編集 ✎)。検索と「未読」「↻ 受信」の段は下へスクロールすると隠れる(m_head_controller.js)。
   メールボックス(/mails/boxes)はアドレス → フォルダを縦に並べる。「最後に見に行った時刻」などの説明文・左の列は出さない。
   「ゴミ箱へ」などは「編集」を押したときだけ、下の帯の上に出す(mail_edit_controller.js) */
.m-head, .m-head-spacer, .d-short { display: none; }
@media (max-width: 760px) {
  /* ガラス・ダークの .card の決まりより強く(html から書く)。2026-10-25 ユーザーの写真: ガラスで箱の背景と枠が出て、上の帯の下に空のガラスの箱が見えていた */
  .card.mail-page, html .app-shell .card.mail-page { background: transparent; border: 0; padding: 0; margin-bottom: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mail-page .board-head, .mail-page .mail-side, .mail-page .mail-status, .mail-page .mail-folder-title, .mail-page .mail-foot-hint { display: none; }
  /* 上の帯は画面に固定し(高さが変わらないので、隠しても一覧がずれない)、検索の段は帯の裏へ滑り込ませて隠す。
     一覧の上には帯と同じ高さの空き(m-head-spacer。高さは m_head_controller.js が測る) */
  .page:has(> .mail-page .m-head), .app-shell .page:has(.m-head) { padding-top: 0; }
  .m-head { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 800; }
  .m-head__bar, .m-head__more { -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); background: rgba(246, 246, 243, 0.82); }
  /* 2026-10-25 ユーザー: 帯の行間をスケジュールの上の帯と同じ細めに(前は min-height 40・上8下6・ボタン38px) */
  .m-head__bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 0; padding: calc(4px + env(safe-area-inset-top, 0px)) 10px 4px; }
  .m-head__title { flex: 1 1 auto; min-width: 0; margin: 0; text-align: center; font-size: 1.05rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-head__title small { display: block; font-size: 0.7rem; font-weight: 400; color: var(--color-text-muted, #6b6f7a); overflow: hidden; text-overflow: ellipsis; }
  .m-head__btn {
    flex: none; min-width: 36px; height: 36px; padding: 0 12px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.07); background: rgba(255, 255, 255, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: var(--color-text); font: inherit; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  }
  .m-head__back { font-size: 1.6rem; line-height: 1; padding: 0 12px 3px; }
  .m-head__spacer { visibility: hidden; }
  /* 検索の段は上下の余白をそろえる(2026-10-25 ユーザー: ずれている) */
  .m-head__more { position: relative; z-index: 1; padding: 8px 10px 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); transition: transform 0.22s ease, opacity 0.22s ease; }
  .m-head.is-collapsed .m-head__more { transform: translateY(-100%); opacity: 0; pointer-events: none; }
  .m-head.is-collapsed .m-head__bar, .m-head--plain .m-head__bar { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
  .m-head-spacer { display: block; height: 150px; }
  .m-search { margin: 0; }
  .m-search input { width: 100%; box-sizing: border-box; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(118, 118, 128, 0.12); font: inherit; font-size: 0.95rem; }
  .m-chips { display: flex; gap: 8px; margin: 8px 0 0; overflow-x: auto; scrollbar-width: none; }
  .m-chip-form { display: inline; margin: 0; }
  .m-chip {
    flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(255, 255, 255, 0.9); color: #3b5ba5; font: inherit; font-size: 0.85rem; text-decoration: none; cursor: pointer;
  }
  .m-chip.is-on { background: #3b5ba5; color: #fff; border-color: #3b5ba5; }
  .m-chip--warn { color: #b3261e; }
  /* 一覧: 2行(送信者・日時 / 件名)。未読は青い丸 */
  /* 2026-10-25 ユーザー: 両脇に余白(前は iPhone のメールのように画面いっぱい)。一覧は角丸の箱に */
  .mail-page .table-wrap { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.07); }
  .mail-page .mail-list tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "from date" "subject subject"; padding: 9px 18px; background: #fff; }
  .mail-page .mail-list tbody td { line-height: 1.4; font-weight: 400; padding: 1px 0; }
  .mail-page .mail-list .mail-list__from { max-width: none; }
  .mail-page .mail-list tr.is-unread td.mail-list__from { font-weight: 700; }
  .mail-page .mail-list tbody td.board-list__date { font-size: 0.78rem; color: var(--color-text-muted, #6b6f7a); padding-left: 8px; }
  .mail-page .mail-list tbody td.mail-list__check { display: none; }
  .mail-page .mail-list tbody td.mail-list__from { font-size: 0.95rem; }
  .mail-page .mail-list tbody td.mail-list__subject-cell { color: var(--color-text-muted, #5f6472); font-size: 0.88rem; }
  .mail-page .mail-list tbody td.mail-list__subject-cell a { color: inherit; text-decoration: none; }
  .mail-page .mail-list tr.is-unread td.mail-list__from::before { content: ""; display: inline-block; width: 9px; height: 9px; margin: 0 7px 1px 0; border-radius: 50%; background: #3b7be8; vertical-align: middle; }
  .mail-page .mail-list tr.is-unread td.mail-list__subject-cell { color: var(--color-text); }
  /* 編集: 選ぶ欄を出し、「ゴミ箱へ」などを下の帯の上に */
  .mail-page .mail-bulk { display: none; }
  .mail-page.is-editing .mail-list tbody tr { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "check from date" "check subject subject"; }
  .mail-page.is-editing .mail-list tbody td.mail-list__check { display: flex; align-items: center; overflow: visible; }
  .mail-page.is-editing .mail-list tbody td.mail-list__check input { width: 20px; height: 20px; margin: 0; }
  .mail-page .mail-list tr[data-href]:hover td { background: transparent; }
  .mail-page .mail-list tbody tr:has(input:checked) { background: #eef3fb; }
  /* 左にスライドで「未読/既読」「ゴミ箱」(2026-10-27 ユーザー。mail_swipe_controller.js)。行の中身を --swipe だけ左へずらし、後ろのボタンを見せる */
  .mail-page .mail-list tbody tr[data-swipe] { position: relative; overflow: hidden; }
  .mail-page .mail-list tbody tr[data-swipe] > td:not(.mail-swipe__actions) { position: relative; z-index: 1; transform: translateX(var(--swipe, 0px)); transition: transform 0.2s ease; }
  /* 2026-10-27 ついでに: 偶数の行の文字の後ろだけ灰色の四角が出ていた(ノーマルのデザインの表の縞模様が欄だけに付く。design.css.erb の縞の決まりの方が強かった)・
     未読の青い丸の後ろで名前が次の行に落ちていた */
  html .app-shell .mail-page .table.mail-list tbody tr:nth-child(n) > td { background: transparent; }
  html .app-shell .mail-page .table.mail-list tbody tr:is(.is-swiping, .is-swiped):nth-child(n) > td:not(.mail-swipe__actions) { background: var(--mail-row-bg, #fff); }
  .mail-page .mail-list tbody td.mail-list__from { display: flex; align-items: center; }
  .mail-page .mail-list tbody td.mail-list__from .mail-list__clip { min-width: 0; }
  .mail-page .mail-list tbody tr[data-swipe].is-swiping > td { transition: none; }
  .mail-page .mail-list tbody td.mail-swipe__actions { display: flex; visibility: hidden; position: absolute; top: 0; right: 0; bottom: 0; z-index: 0; width: 148px; padding: 0; gap: 0; }
  .mail-page .mail-list tbody tr.is-swiping > td.mail-swipe__actions, .mail-page .mail-list tbody tr.is-swiped > td.mail-swipe__actions { visibility: visible; }
  .mail-page .mail-list tbody tr[data-swipe] > td.mail-swipe__actions { transform: none; }
  .mail-swipe__btn { flex: 1; border: 0; color: #fff; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
  .mail-swipe__btn--read { background: #3b7be8; }
  .mail-swipe__btn--trash { background: #d9534f; }
  .mail-page.is-editing .mail-list tbody td.mail-swipe__actions { display: none; }
  .mail-page.is-editing .mail-bulk {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px); z-index: 940;
    padding: 10px 12px; border-radius: 8px; gap: 8px;
    background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 6px 24px rgba(20, 30, 50, 0.16);
  }
  .mail-page.is-editing .mail-bulk .btn { height: 34px; font-size: 0.85rem; }
  .mail-page.is-editing .mail-pager { margin-bottom: 110px; }
  .mail-page .d-long { display: none; }
  .mail-page .d-short { display: inline; }
  /* メールボックス */
  .m-list { list-style: none; margin: 4px 0 14px; padding: 0; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid rgba(0, 0, 0, 0.06); }
  .m-list li + li { border-top: 1px solid #ececf0; }
  .m-list__item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: var(--color-text); text-decoration: none; font-size: 1rem; }
  .m-list__icon { width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #3b5ba5; }
  .m-list__icon svg { width: 24px; height: 24px; }
  .m-list__icon--trash, .m-list__icon--junk { color: #6b6f7a; }
  .m-head__btn { padding: 0 9px; }
  .m-search input { padding-left: 38px; background: rgba(118, 118, 128, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d96' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20.5 20.5'/%3E%3C/svg%3E") no-repeat 13px center / 18px 18px; }
  .m-list__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-list__name small { display: block; font-size: 0.72rem; color: var(--color-text-muted, #6b6f7a); overflow: hidden; text-overflow: ellipsis; }
  .m-list__count { flex: none; color: var(--color-text-muted, #6b6f7a); font-size: 0.9rem; }
  .m-list__warn { flex: none; color: #b3261e; }
  .m-list__chevron { flex: none; color: #b0b3bc; font-size: 1.3rem; line-height: 1; }
  .m-list__item--action { color: #3b5ba5; }
  .m-list__heading { margin: 14px 6px 4px; font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted, #6b6f7a); }
  .m-error { margin: 4px 0 10px; padding: 10px 12px; border-radius: 8px; background: #fdecea; color: #b3261e; font-size: 0.85rem; }
}
@media (min-width: 761px) { .m-list { list-style: none; padding: 0; } .m-list__item { display: flex; gap: 10px; padding: 8px 4px; } }
/* まとまりの見出しの数(グループウェアの未読の合計。2026-09-30)。開いているときは中の項目に数が出るので見出しでは出さない */
.sidebar__group > summary .sidebar__group-label { white-space: nowrap; }
.sidebar__group[open] .sidebar__count--group { display: none; }
/* 幅220px(パソコン)に収めるため、見出しの数はアイコンの右上に重ねる(スマホの下の帯と同じ形) */
.sidebar__group > summary { position: relative; }
.sidebar__count--group { position: absolute; left: 20px; top: 2px; font-size: 0.62rem; min-width: 1.3em; padding: 0 4px; line-height: 1.45; }
/* 「グループウェア」は7文字あるので、文字の大きさ「大」「特」では少し小さくして1行に収める */
.font-large .sidebar__group--long .sidebar__group-label { font-size: 0.88em; } /* 2026-10-23 大は18.5px */
/* 左のメニュー(2026-10-03 ユーザー: 前の透明に近いガラス(青い光のぼかし・ツヤ・斜めの光)は柄に見えるのでやめ、
   青みの1色に(2026-10-03 ユーザー: 紫を薄めて青寄りに)。「よく使う」も同じ色。文字は濃いめのグレー)。事前相談だけの人のメニュー(ペールピンク)はそのまま */
/* 2026-10-08 ユーザー: 紺(#113961)に白い文字。前は薄い青(#d5e2f6)に濃いグレーの文字 */
.app-shell {
  --side-bg: #113961;
  --side-ink: #ffffff;
  --side-line: rgba(255, 255, 255, 0.22);
  --side-hover: rgba(255, 255, 255, 0.12);
}
.app-shell .sidebar {
  background: var(--side-bg);
  border-right: 0;
  box-shadow: none;
  color: var(--side-ink);
}
.app-shell .sidebar__brand,
.app-shell .sidebar__title,
.app-shell .sidebar__nav a,
.app-shell .sidebar__top-link,
.app-shell .sidebar__group > summary,
.app-shell .sidebar__user { color: var(--side-ink); opacity: 1; }
.app-shell .sidebar__brand,
.app-shell .sidebar__me { border-bottom-color: var(--side-line); }
.app-shell .sidebar__me-name { color: var(--side-ink); }
.app-shell .sidebar__me-name:hover { background: var(--side-hover); }
.app-shell .sidebar__nav > .sidebar__top-link,
.app-shell .sidebar__nav > .sidebar__group,
.app-shell .sidebar__nav > a { border-bottom-color: var(--side-line); }
.app-shell .sidebar__nav a:hover,
.app-shell .sidebar__top-link:hover,
.app-shell .sidebar__group > summary:hover { background: var(--side-hover); }
.app-shell .sidebar__footer { border-top-color: var(--side-line); }
/* Home はメニューの一番上に止めておく(2026-10-09 ユーザー: Favorites と同じく、下のメニューをスクロールしても動かないように) */
.app-shell .sidebar__nav > .sidebar__top-link--home { position: sticky; top: 0; z-index: 2; background: var(--side-bg); }
.app-shell .sidebar__nav > .sidebar__top-link--home:hover { background: linear-gradient(var(--side-hover), var(--side-hover)), var(--side-bg); }
/* スマホの引き出しでは Home を上に残さない(2026-10-25 ユーザーの写真: ガラスのデザインで透けて、下の項目と重なって見えた) */
@media (max-width: 860px) { .app-shell .sidebar__nav > .sidebar__top-link--home { position: static; } }
/* 紺のメニューの中のボタンだけ白抜きにする(2026-10-10: .app-shell 全体に効いて、個人設定の白い画面の「文字の大きさ」などの
   ボタンが白地に白い文字で見えなくなっていた) */
.app-shell .sidebar .font-scale__option,
.app-shell .sidebar__action { color: var(--side-ink); border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.10); }
.app-shell .sidebar__action:hover { background: var(--side-hover); }
.app-shell .sidebar .font-scale__option.is-active { background: #fff; color: var(--side-bg); border-color: #fff; }
.app-shell .sidebar__close { background: var(--side-hover); color: var(--side-ink); }

/* アンケート依頼書の印刷(2026-09-30。今までの Excel の用紙と同じ並び。FAX でも読めるよう線は黒・■□は文字) */
.srq { max-width: 186mm; margin: 0 auto; padding: 8mm 6mm; background: #fff; color: #111; font-size: 10.5pt; line-height: 1.5; }
.srq__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.srq__title { font-size: 20pt; margin: 0; letter-spacing: 0.25em; border-bottom: 0.6mm solid #111; padding-bottom: 1mm; }
.srq__to { text-align: right; font-size: 11pt; }
.srq__to-name { font-size: 13pt; font-weight: 600; }
.srq__meta { margin: 4mm 0 0 auto; border-collapse: collapse; }
.srq__meta th, .srq__meta td { border: 0.3mm solid #111; padding: 1mm 3mm; font-weight: 400; }
.srq__meta th { background: #eee; }
.srq__meta td { min-width: 45mm; }
.srq__section { font-size: 12pt; margin: 6mm 0 1.5mm; border-left: 1.5mm solid #111; padding-left: 2mm; }
.srq__table { width: 100%; border-collapse: collapse; }
.srq__table + .srq__table { margin-top: -0.3mm; }
.srq__table th, .srq__table td { border: 0.3mm solid #111; padding: 1.8mm 2.5mm; text-align: left; vertical-align: middle; }
.srq__table th { width: 22mm; background: #eee; font-weight: 600; white-space: nowrap; }
.srq__table .srq__th-narrow { width: 20mm; }
.srq__opt { display: inline-block; margin-right: 4mm; white-space: nowrap; }
.srq__rel { margin-left: 4mm; }
.srq__kana { font-size: 9.5pt; }
.srq__name { font-size: 14pt; }
.srq__tel { margin-top: 1mm; font-size: 12pt; }
.srq__services th { width: 20mm; }
.srq__services td { white-space: nowrap; }
.srq__by { margin-left: 3mm; padding-left: 3mm; border-left: 0.3mm solid #999; }
.srq__note { border: 0.3mm solid #111; min-height: 38mm; padding: 2mm 3mm; }
.srq__note p { margin: 0 0 1mm; }
.srq__from { margin-top: 8mm; text-align: right; font-size: 11pt; }
@media print { .srq { padding: 0; max-width: none; } }
/* アンケート依頼書の入力画面 */
.srq-choices { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-height: 30px; }
.srq-form .srq-choices label { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; font-size: 0.85rem; color: var(--color-text); margin: 0; cursor: pointer; white-space: nowrap; }
.srq-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 8px; }
.srq-service { border: 1px solid var(--color-border, #e3e1dc); border-radius: 8px; padding: 6px 10px; }
.srq-service__label { font-weight: 600; font-size: 0.85rem; }
.srq-service__by { display: inline-flex; margin-left: 6px; padding-left: 10px; border-left: 1px solid #ddd; }
.srq-service__by .srq-choices { display: inline-flex; }
.srq-service > div:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; }
.srq-service__hint { font-size: 0.72rem; color: var(--color-muted, #888); overflow-wrap: anywhere; }
.srq-send { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.srq-send select { height: 30px; }
.srq-skip { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.srq-skip select { height: 30px; font-size: 0.8rem; }

/* アンケート集計表(2026-09-30。今までの手作りの集計表の形。左に評価の表、右に回答数と良い点・悪い点) */
.srs { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
@media (max-width: 1120px) { .srs { grid-template-columns: minmax(0, 1fr); } }
.srs__col { min-width: 0; }
.srs__block { margin-bottom: 12px; }
.srs__title { font-size: 0.95rem; margin: 0 0 6px; }
.srs__sub { font-size: 0.85rem; margin: 10px 0 4px; }
.srs__table { width: auto; min-width: 100%; }
/* スマホは表ごとに横に動かす・会館名は折り返さない(2026-11-08 ユーザー: 会館名が縦に並び、画面も右にはみ出していた) */
@media (max-width: 860px) {
  table.srs__table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; max-width: 100%; }
  .srs__table td:first-child, .srs__table th:first-child { white-space: nowrap; }
}
.srs__table th { background: #fbf6dc; white-space: nowrap; }
.srs__table td.num, .srs__table th.num { text-align: right; min-width: 4.5em; }
.srs__table .srs__center { text-align: center; }
.srs__table td.is-low { color: var(--color-danger, #c0392b); font-weight: 600; }
.srs__table tr.srs__all td { font-weight: 600; background: #f7f7f4; }
.srs__scale { margin-top: 8px; }
.srs__scale th, .srs__scale td { text-align: center; }
.srs__points { margin: 0; padding-left: 1.2em; font-size: 0.85rem; }
.srs__points li { margin: 2px 0; }
.srs__points--good li::marker { color: #2f7a4a; }
.srs__points--bad li::marker { color: var(--color-danger, #c0392b); }
.srs__items td.srs__group { background: #fbf6dc; vertical-align: top; width: 1px; font-weight: 600; white-space: nowrap; }
.srs__items td.srs__item { white-space: nowrap; }
.srs__items tr.srs__group-start > * { border-top: 2px solid #e6dcb4; }
.srs__items td.num:last-child, .srs__items th.srs__all-col { background: #f7f7f4; font-weight: 600; }
.srs__items td, .srs__items th { padding-left: 8px; padding-right: 8px; }
.srs__items td.num, .srs__items th.num { min-width: 3.2em; }
@media (max-width: 600px) {
  .srs__items td.srs__group, .srs__items tr:first-child th:first-child { display: none; }
  .srs__items td.num, .srs__items th.num { min-width: 3em; }
}
@media print { .srs { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
/* 残業の集計の明細(2026-09-30。今までの Excel の集計表の形) */
.workflow-overtime-detail td, .workflow-overtime-detail th { white-space: nowrap; }
.workflow-overtime-detail__sum td { font-weight: 700; background: #f7f7f4; }
@media print { .workflow-overtime-detail { font-size: 9pt; } .workflow-overtime-detail td, .workflow-overtime-detail th { padding: 1px 4px; } }
/* 営業手当申請書の印刷(2026-09-30。今までのサイボウズの印刷の並び) */
.wfa { margin-bottom: 3mm; font-size: 9pt; }
.wfa th { background: #d9d9d9; font-weight: 700; white-space: nowrap; width: 1px; }
.wfa--grid th, .wfa--grid td { border: 0.3mm solid #555; padding: 1mm 1.5mm; height: 6mm; }
.wfa--grid td { white-space: nowrap; }
.wfa--grid td.wfa-wrap { white-space: normal; height: auto; }
/* 左の列(見出し)の幅をどの表でもそろえる(2026-10-26 ユーザー: 左の列がそろうようにバランスを)。
   表の形を固定にして、待機と出動の表は中の列の幅も同じに(列の線が縦にそろう) */
.wfa { table-layout: fixed; }
.wfa th, .wfa td { padding: 1mm 1.5mm; }
.wfa th { text-align: left; }
.wfa tr > th:first-child { width: 24mm; }
.wfa--grid tr > :nth-child(3) { width: 14mm; }
.wfa--grid tr > :nth-child(5) { width: 17mm; }
.wfa--grid tr > :nth-child(7) { width: 14mm; }
.wfa--sales tr:first-child > :nth-child(3) { width: 14mm; }
.wfa--sales tr:first-child > :nth-child(5) { width: 20mm; }
.wfa-info tr > :nth-child(3) { width: 24mm; }
.wfa-sum { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 3mm; }
.wfa-sum th, .wfa-sum td { border: 0.3mm solid #555; text-align: center; }
.wfa-sum th { background: #d9d9d9; font-size: 8.5pt; font-weight: 700; padding: 0.5mm 1mm; line-height: 1.2; }
.wfa-sum th small { font-size: 7pt; font-weight: 400; margin-left: 1mm; }
.wfa-sum td { font-size: 9pt; padding: 0.8mm 1mm; white-space: nowrap; }
.wfa-sum td strong { font-size: 11pt; margin-right: 0.5mm; }
.wfa-sum .wfa-sum__money { width: 24%; }

/* 選択肢マスタの候補が付いた欄の「▾」と一覧(2026-09-30。datalist_picker_controller.js) */
.datalist-picker { position: relative; display: block; }
.datalist-picker > input { width: 100%; padding-right: 30px; }
.datalist-picker__toggle { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 28px; border: 0; border-left: 1px solid var(--input-border, #6f7680);
  background: #f4f3ef; color: #555; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 0.9rem; padding: 0; }
.datalist-picker__toggle:hover, .datalist-picker.is-open .datalist-picker__toggle { background: #e9e6dc; }
.datalist-picker__menu { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--color-border, #ddd); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.datalist-picker__menu li { padding: 8px 12px; cursor: pointer; font-size: 0.9rem; }
.datalist-picker__menu li:hover { background: #f1f4fa; }
.datalist-picker__menu li.is-current { font-weight: 600; background: #eef2fb; }
.datalist-picker__menu li.is-active { background: #dfe7f5; outline: 2px solid var(--frame, #2f5f93); outline-offset: -2px; }
.datalist-picker__menu li.datalist-picker__empty { color: #888; cursor: default; }
.datalist-picker__menu li small { display: block; color: #888; font-size: 0.75rem; }
/* 顧客一覧の「お盆DM(初盆)の宛名ラベル」(2026-10-01) */
/* お盆DM(初盆)の宛名ラベル: タイトルの横のボタンを押すと、下に条件の枠が開く(2026-10-07 ユーザー: 一覧の枠の高さを他の一覧とそろえる) */
.obon-dm { position: relative; }
.obon-dm > summary { list-style: none; }
.obon-dm > summary::-webkit-details-marker { display: none; }
.obon-dm .obon-dm__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: max-content; max-width: min(760px, calc(100vw - 32px));
  margin: 0; background: var(--color-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
@media (max-width: 860px) {
  /* スマホはボタンが左に寄るので、枠は画面の幅いっぱい(縦の位置はボタンのすぐ下のまま) */
  .obon-dm .obon-dm__panel { position: fixed; top: auto; left: 16px; right: 16px; width: auto; max-width: none; margin-top: 6px; }
}
/* DM の宛名ラベル(2026-10-01。DmLabelSheet。アスクル 399-8582 A4 18面) */
.dm-labels__tools { margin: 0 16px 12px; }
.dm-labels__form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.85rem; }
.dm-labels__form input[type=number] { width: 5em; }
.label-sheet { position: relative; width: 210mm; height: 297mm; margin: 0 auto 12px; background: #fff; overflow: hidden; page: dm-labels; break-after: page; }
.label-sheet:last-child { break-after: auto; }
.dm-label {
  position: absolute; box-sizing: border-box; padding: 4mm 4.5mm 3mm 5mm; overflow: hidden; color: #000;
  transform: translate(var(--dx, 0mm), var(--dy, 0mm)); font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
}
.dm-label__postcode { font-size: 3.4mm; letter-spacing: 0.3mm; margin-bottom: 1.2mm; }
.dm-label__address { font-size: 3.4mm; line-height: 1.35; }
.dm-label__address.is-small { font-size: 2.9mm; }
.dm-label__address.is-tiny { font-size: 2.5mm; }
.dm-label__name { font-size: 5mm; margin-top: 2.5mm; text-align: center; letter-spacing: 0.4mm; white-space: nowrap; }
.dm-label__name.is-small { font-size: 4.2mm; letter-spacing: 0; }
.dm-label__name.is-tiny { font-size: 3.4mm; letter-spacing: 0; }
.dm-label__honorific { margin-left: 2.5mm; }
.dm-label__note { position: absolute; right: 4mm; bottom: 2.5mm; font-size: 2.4mm; color: #333; font-family: sans-serif; }
@media screen {
  .label-sheet { box-shadow: 0 0 0 1px var(--color-border); }
  .dm-label { outline: 0.2mm dashed #d6d3cc; }
  .dm-label.is-blank { background: repeating-linear-gradient(45deg, #faf9f6, #faf9f6 2mm, #f1efe9 2mm, #f1efe9 4mm); }
}
@media print {
  @page dm-labels { size: A4 portrait; margin: 0; }
  .label-sheet { margin: 0; }
}
/* 料金後納ゆうメールのマークは宛名ラベルの右上に小さく入れる(2026-10-01 ユーザー: 会員DM・お盆DMとも) */
/* 丸の直径は郵便の決まりで 2〜3cm(ユーザー)なので 21mm のまま縮めない。住所は左、マークは右、名前はその下 */
.dm-label .yumail-mark { float: right; width: 22mm; height: 28.4mm; margin: -2.6mm -2.6mm 0 1.2mm; }
.dm-label__name { clear: right; margin-top: 0.6mm; }
.dm-label__note { position: static; font-size: 2.4mm; margin-top: 0.6mm; }

/* 葬儀発生の連絡(2026-10-01) */
.report-kinds { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.report-kinds__item { padding: 6px 14px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text); text-decoration: none; font-size: 0.85rem; background: var(--color-surface); }
.report-kinds__item.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.report-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.report-form__wide { grid-column: 1 / -1; }
.report-form__head { font-size: 0.82rem; color: var(--color-muted); margin: 12px 0 4px; padding-bottom: 2px; border-bottom: 1px solid var(--color-border); font-weight: 600; }
.report-text { white-space: pre-wrap; font-family: inherit; font-size: 0.9rem; line-height: 1.7; background: #faf9f6; border: 1px solid var(--color-border); border-radius: 8px; padding: 12px 14px; margin: 8px 0 12px; }
.report-kind { display: inline-block; font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; font-weight: 600; vertical-align: middle; }
.report-kind--transport { background: #fbe3e1; color: #9b2c22; }
.report-kind--meeting { background: #e6eef8; color: #2a4f86; }
.report-kind--other { background: #eceae4; color: #55524a; }
.report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.report-filters__item { padding: 3px 10px; border-radius: 6px; color: var(--color-text); text-decoration: none; font-size: 0.82rem; }
.report-filters__item.is-active { background: #eceae4; font-weight: 600; }
.report-filters__night { margin-left: auto; }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list__item { border-bottom: 1px solid var(--color-border); }
.report-list__link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 4px; color: var(--color-text); text-decoration: none; }
.report-list__link:hover { background: #faf9f6; }
.report-list__time { font-size: 0.8rem; color: var(--color-muted); min-width: 8.5em; }
.report-list__night { font-size: 0.68rem; background: #2f3b52; color: #fff; padding: 0 5px; border-radius: 4px; }
.report-list__by { margin-left: auto; }
.report-list__state { font-size: 0.72rem; color: var(--color-danger); font-weight: 600; }
.report-list__item.is-confirmed .report-list__state { color: #2f6b3a; font-weight: 400; }
/* 安置表 */
.mort-now { font-size: 0.82rem; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mort-now__item { background: #f4efe2; padding: 1px 8px; border-radius: 6px; }
.mort-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; font-size: 0.8rem; }
.mort-table th, .mort-table td { border: 1px solid var(--color-border); }
.mort-table thead th { background: #f4f3ef; font-weight: 600; padding: 4px; text-align: center; }
.mort-table thead th.is-today { background: #fff4cc; }
.mort-table thead th.is-holiday { color: #9b2c22; }
.mort-table__room { width: 120px; text-align: left !important; padding: 4px 8px; background: #faf9f6; font-weight: 600; line-height: 1.3; position: sticky; left: 0; z-index: 1; } /* 2026-10-27 ユーザー: 横に進めても部屋の名前の列を左に残す */
.mort-track { --lane-h: 24px; position: relative; padding: 0; height: calc(var(--lanes) * var(--lane-h) + 10px); min-height: 34px; }
.mort-track__days { position: absolute; inset: 0; display: flex; }
.mort-track__day { flex: 1; border-right: 1px dashed #e4e1d9; }
.mort-track__day:last-child { border-right: 0; }
.mort-track__day.is-today { background: #fffbea; }
a.mort-track__day:hover { background: #eef3fb; }
.mort-bar { position: absolute; height: calc(var(--lane-h) - 4px); box-sizing: border-box; padding: 0 6px; border-radius: 5px; background: #2f3b52; color: #fff;
  font-size: 0.74rem; line-height: calc(var(--lane-h) - 4px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.mort-bar--linked { background: #2f6b3a; }
.mort-bar--open { background-image: linear-gradient(90deg, transparent 85%, rgba(255,255,255,0.35) 85%); border-right: 2px dashed #fff; }
.mort-days { display: none; }
@media (max-width: 700px) {
  .mort-days { display: block; margin-top: 12px; }
  .mort-days__date { font-size: 0.9rem; margin: 12px 0 4px; }
  .mort-days__date.is-today { color: #9b6b00; }
  .mort-days__list { margin: 0; padding-left: 18px; font-size: 0.85rem; }
}
.report-form__datetime { max-width: 15em; }
.report-sent { border: 0; border-radius: 8px; padding: 18px 20px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
.report-sent::backdrop { background: rgba(30, 34, 44, 0.35); }
.report-sent__title { font-weight: 600; margin: 0 0 6px; }
.report-sent .actions-row form { display: inline; margin: 0; }
/* メールの宛先の候補(「,」の後ろの打ちかけの部分で出す。2026-10-01) */
.mail-suggest { position: absolute; z-index: 60; list-style: none; margin: 0; padding: 4px 0; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); max-height: 260px; overflow-y: auto; font-size: 0.85rem; }
.mail-suggest li { padding: 6px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-suggest li.is-active, .mail-suggest li:hover { background: #eef3fb; }

/* 顧客の画面の対象者の見積書・請求書・領収書の宛名(2026-10-28)。名札名や会社名が長くても、金額などの列を右へ押し出さないように折り返す */
/* 顧客の画面の請求書の行: 「請求書」「領収書」を並べる(2026-10-28 事務員さん) */
.doc-open-buttons { white-space: nowrap; }
.doc-open-buttons .btn + .btn { margin-left: 4px; }
.with-receipts-check { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; }
/* 顧客の画面の請求書: 売上区分の見出しの行・選ぶと下に浮くボタンの段(2026-10-29 ユーザー) */
.invoice-group-row > td { background: #f6f8fb; font-weight: 600; font-size: 0.86rem; color: #113961; padding-top: 4px; padding-bottom: 4px; }
.invoice-group-row > td:first-child { box-shadow: inset 4px 0 0 var(--group-color, #8a8f96); }
.invoice-group-row__count { font-weight: normal; color: var(--color-muted); margin-left: 6px; }
.invoice-actions__count { font-weight: 600; color: #113961; margin-right: 4px; }
.invoice-actions.is-floating { position: sticky; bottom: 10px; z-index: 30; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius, 8px);
  box-shadow: 0 6px 20px rgba(17, 57, 97, 0.18); padding: 8px 12px; }
@media (max-width: 860px) { .invoice-actions.is-floating { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px); }
  .invoice-actions.is-floating > a.btn { display: none; } } /* スマホは選んでいる間は印刷だけ(段が3行になるため) */
/* 仕入伝票の部門ごとの金額(2026-10-29 ユーザー)。押すとその部門で絞る */
.supplier-office-totals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.supplier-office-totals__item { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px);
  background: #fff; color: inherit; text-decoration: none; font-size: 0.86rem; }
.supplier-office-totals__item:hover { border-color: var(--frame, #2f5f93); }
.supplier-office-totals__item.is-current { border-color: #113961; background: #e8eef6; box-shadow: inset 0 0 0 1px #113961; }
.supplier-office-totals__name { font-weight: 600; color: #113961; }
.supplier-office-totals__amount { font-variant-numeric: tabular-nums; }
.supplier-office-totals__count { color: var(--color-muted); font-size: 0.8rem; }
.supplier-office-totals__rates { color: var(--color-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.supplier-slip-upload__password { width: 18em; max-width: 100%; }
.supplier-slip-excel { max-height: 520px; overflow: auto; margin-bottom: 8px; }
.supplier-slip-excel td { font-size: 0.8rem; padding: 3px 6px; white-space: nowrap; }
.supplier-slip-excel tr.is-this-slip td { background: #fff3c4; font-weight: 600; }
.supplier-slip-excel__title { margin: 0 0 4px; font-weight: 600; color: #113961; }
.supplier-slip-excel--this { max-height: none; }
.supplier-slip-excel--this th { font-size: 0.78rem; padding: 3px 6px; white-space: nowrap; }
.supplier-slip-excel__all { margin-top: 6px; }
.supplier-slip-excel__all > summary { cursor: pointer; font-size: 0.85rem; color: var(--color-muted); margin-bottom: 6px; }
.supplier-filtered-total { margin: 0 0 8px; font-size: 0.9rem; }
.doc-open-note { margin-left: 4px; font-size: 0.8rem; color: var(--color-muted); }
/* 顧客の画面の請求書の行のボタン(請求書・複　製・領収書)と、その下の4つのボタンは、同じ大きさにそろえて小さめに(2026-11-02 ユーザー) */
.doc-open-btn { display: inline-flex; justify-content: center; align-items: center; width: 4.6em; padding: 3px 0; font-size: 0.85rem; line-height: 1.4; }
.invoice-act-btn { display: inline-flex; justify-content: center; align-items: center; width: 7em; padding: 5px 0; font-size: 0.88rem; line-height: 1.4; }
/* 4つとも同じ見た目に(2026-11-20 ユーザー: スマホで「請求書作成」「供物一覧表」だけ2行・左寄せ・細い字で、下の「請求書印刷」「領収書印刷」と違った)。
   リンクと button で字体が違っていた(button は画面の字体を受け継がない)→ 字体を受け継がせ、少し太く・まん中・1行に */
main .invoice-act-btn { font-family: inherit; font-weight: 600; text-align: center; white-space: nowrap; padding-left: 4px !important; padding-right: 4px !important; }
/* 取り消した領収書などはたたんでおく(2026-10-29 ユーザー: かさばる) */
.receipt-history { margin-top: 10px; }
.receipt-history > summary { cursor: pointer; font-size: 0.88rem; color: var(--color-muted); width: max-content; }
.receipt-history > summary:hover { color: var(--frame, #2f5f93); }
.receipt-history .table-wrap { margin-top: 6px; }
.doc-addressee { max-width: 18em; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 860px) { .doc-addressee { max-width: 10em; } }

/* 見積書・請求書の割合計算の窓(2026-10-28。足す/引く(割引)を選ぶ) */
.pct-dialog { border: 0; border-radius: var(--radius, 8px); padding: 18px 20px; width: calc(100% - 32px); max-width: 400px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); background: var(--color-surface); color: var(--color-text); }
.pct-dialog::backdrop { background: rgba(30, 34, 44, 0.35); }
.pct-dialog__form { display: grid; gap: 10px; margin: 0; }
.pct-dialog h3 { margin: 0; font-size: 1.05rem; }
.pct-dialog .hint { margin: 0; }
.pct-dialog__kind { display: grid; gap: 6px; }
.pct-dialog__kind label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.pct-dialog__field { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.pct-dialog__field input[type=number] { width: 6em; }
.pct-dialog__field input[type=text] { flex: 1; min-width: 0; }
.pct-dialog__preview { font-size: 1.05rem; font-weight: 700; color: var(--color-text); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.pct-dialog__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 自分用のメモ(2026-10-01 → 2026-10-28 ユーザー: 見本の B「ノート」の形。左に一覧・右に中身。スマホは一覧 → 中身) */
.memo-b__head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.memo-b__head form { margin: 0; }
.memo-b__panes { display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); margin-top: 10px; background: var(--color-surface); }
.memo-b__list { border-right: 1px solid var(--color-border); max-height: calc(100vh - 170px); overflow-y: auto; position: sticky; top: 12px; align-self: start; }
.memo-b__search { display: block; width: calc(100% - 20px); margin: 10px; box-sizing: border-box; height: 40px; padding: 6px 10px; font: inherit; border: 1px solid var(--input-border); border-radius: var(--radius-control, 6px); background: var(--color-surface); color: var(--color-text); }
.memo-b__group { padding: 6px 14px 2px; font-size: 0.8rem; color: var(--color-muted); letter-spacing: 0.05em; }
.memo-b__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; padding: 9px 14px; border-top: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; }
.memo-b__row strong, .memo-b__row > span:not(.memo-b__row-clip) { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-b__row > span:not(.memo-b__row-clip) { color: var(--color-muted); font-size: 0.86rem; }
.memo-b__row-clip { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--color-muted); line-height: 0; }
.memo-b__row-clip svg { width: 16px; height: 16px; }
.memo-b__row.is-active { background: #edf0f5; }
@media (hover: hover) { .memo-b__row:hover { background: #f4f6f9; } .memo-b__row.is-active:hover { background: #edf0f5; } }
.memo-b__empty { padding: 14px; margin: 0; }
.memo-b__editor { padding: 12px 20px 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.memo-b.compact-list .btn.memo-b__back { display: none; align-self: flex-start; } /* .compact-list .btn より強く */
.memo-b__meta { display: flex; gap: 10px; align-items: center; font-size: 0.82rem; color: var(--color-muted); min-height: 1.4em; }
.memo-b__meta .is-error { color: var(--color-danger); }
.memo-b__pinned { border: 1px solid var(--color-border); border-radius: 999px; padding: 0 8px; }
.memo-b__title, .memo-b__body, .memo-b__item-text { border: 0; background: transparent; color: var(--color-text); font: inherit; width: 100%; box-sizing: border-box; padding: 2px 0; }
.memo-b__title { font-size: 1.3rem; font-weight: 700; }
.memo-b__body { resize: none; line-height: 1.8; min-height: 120px; overflow: hidden; }
.memo-b__title:focus, .memo-b__body:focus, .memo-b__item-text:focus { outline: none; box-shadow: inset 0 -1px 0 var(--color-border); }
.memo-b__items { list-style: none; margin: 0; padding: 0; }
.memo-b__item, .memo-b__add-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.memo-b__check { width: 22px; height: 22px; flex: none; border: 2px solid var(--input-border); border-radius: 5px; background: var(--color-surface); cursor: pointer; padding: 0; position: relative; }
.memo-b__check--ghost { border-style: dashed; cursor: default; opacity: 0.6; }
.memo-b__item.is-done .memo-b__check { background: var(--color-primary); border-color: var(--color-primary); }
.memo-b__item.is-done .memo-b__check::after { content: ""; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.memo-b__item.is-done .memo-b__item-text { color: #9aa3ad; text-decoration: line-through; }
.memo-b__item-delete { background: none; border: 0; color: #8a9099; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
@media (hover: hover) { .memo-b__item-delete { visibility: hidden; } .memo-b__item:hover .memo-b__item-delete, .memo-b__item:focus-within .memo-b__item-delete { visibility: visible; } }
.memo-b__add-item input { flex: 1; min-width: 0; border: 0; border-bottom: 1px dashed var(--color-border); background: transparent; padding: 4px 0; font: inherit; color: var(--color-text); }
.memo-b__files { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.memo-b__file { position: relative; width: 120px; }
.memo-b__file form { position: absolute; top: 4px; right: 4px; margin: 0; }
.memo-b__file-link { display: grid; gap: 4px; color: var(--color-text); text-decoration: none; font-size: 0.8rem; }
.memo-b__thumb, .memo-b__file-icon { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--color-border); display: grid; place-items: center; color: var(--color-muted); box-sizing: border-box; }
.memo-b__file-icon svg { width: 30px; height: 30px; }
.memo-b__file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-b__file-delete { background: rgba(0,0,0,0.55); color: #fff; border: 0; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 0.75rem; }
.memo-b__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; border-top: 1px solid var(--color-border); padding-top: 8px; margin-top: 8px; }
.memo-b__tool-form { margin: 0; display: inline-flex; }
.memo-b__tool { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--frame); font: inherit; font-size: 0.92rem; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
@media (hover: hover) { .memo-b__tool:hover { background: #edf0f5; } }
.memo-b__tool--danger { color: var(--color-danger); }
.memo-b__tools-gap { flex: 1; }
@media (max-width: 860px) {
  .memo-b__panes { grid-template-columns: minmax(0, 1fr); }
  .memo-b__list { border-right: 0; max-height: none; position: static; }
  .memo-b.is-picked .memo-b__list, .memo-b:not(.is-picked) .memo-b__editor { display: none; }
  .memo-b.compact-list.is-picked .btn.memo-b__back { display: inline-flex; }
  .memo-b__editor { padding: 10px 14px 14px; }
  .memo-b__item-delete { visibility: visible; }
  .memo-b__file, .memo-b__thumb, .memo-b__file-icon { width: 100px; }
  .memo-b__thumb, .memo-b__file-icon { height: 76px; }
}

/* ワークフローの表の自動計算(金額 = 数量×単価)と添付ファイル(2026-10-01) */
.workflow-rows__computed { display: inline-block; min-width: 5em; text-align: right; font-variant-numeric: tabular-nums; }
.workflow-rows tfoot th { text-align: right; }
.workflow-files { list-style: none; padding: 0; margin: 4px 0 8px; }
.workflow-files li { margin: 2px 0; }
.wf-print__files { font-size: 10pt; margin-top: 8px; }
@media (max-width: 860px) {
  .workflow-rows tfoot tr { display: flex; justify-content: flex-end; gap: 12px; }
  .workflow-rows tfoot th { display: block; background: none; padding: 4px 0; }
}

/* スケジュールの一覧(2026-10-01。サイボウズのスマホの形) */
.schedule-list__controls { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; flex-wrap: wrap; }
.schedule-list__staff { font-weight: 600; color: var(--color-primary, #2f62b5); max-width: 12em; }
.schedule-list__month { font-weight: 700; }
.schedule-list__today { margin-left: auto; font-weight: 600; text-decoration: none; }
.schedule-list__sub { display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 0.8rem; margin: 0 0 6px; }
.schedule-list__subhead { color: var(--color-muted); }
.schedule-list__toggle { display: inline-flex; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; }
.schedule-list__toggle a { padding: 2px 12px; text-decoration: none; color: var(--color-muted); }
.schedule-list__toggle a.is-on { background: var(--color-primary); color: #fff; font-weight: 600; }
.schedule-list__monthnav { display: inline-flex; align-items: center; gap: 2px; }
.schedule-list__arrow { text-decoration: none; font-size: 1.3rem; line-height: 1; padding: 2px 8px; color: var(--color-primary); }
.schedule-list__day { scroll-margin-top: 70px; padding-top: 6px; }
.schedule-list__date { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 1.05rem; margin: 10px 0 6px; }
.schedule-list__day.is-sat .schedule-list__date > span:first-child { color: #2f7ad6; }
.schedule-list__day.is-sun .schedule-list__date > span:first-child { color: #d83b3b; }
.schedule-list__day.is-today .schedule-list__date > span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.schedule-list__dayinfo { font-size: 0.75rem; font-weight: 400; color: var(--color-muted); display: inline-flex; gap: 6px; }
.schedule-list__dayinfo .schedule-day__date { display: none; }
.schedule-list__add { margin-left: auto; font-size: 1.2rem; text-decoration: none; padding: 0 8px; }
.schedule-list__none { color: var(--color-muted); font-size: 0.85rem; margin: 0 0 6px; }
.schedule-list .schedule-item { font-size: 0.95rem; padding: 8px 12px; margin: 0 0 8px; border-radius: 8px; border-left-width: 4px; }
.schedule-list .schedule-item__time { font-size: 0.9rem; color: var(--color-text); margin-bottom: 2px; }
.schedule-list .schedule-item__tag { font-size: 0.85rem; padding: 1px 6px; }
.schedule-list .schedule-item__title { font-size: 1rem; }
.schedule-list .schedule-item__facility { font-size: 0.8rem; margin-top: 2px; }

/* 重複の候補の「参考」(名字が同じだけ)はたたむ(2026-10-02) */
.duplicate-weak > summary { cursor: pointer; color: var(--color-text-muted, #666); font-size: 0.9em; padding: 4px 0; }
.duplicate-weak > .duplicate-list { margin-top: 8px; }
.duplicate-item > .btn { white-space: nowrap; flex-shrink: 0; } /* スマホで「既存を見る」が縦書きのように折れていた */
tr.is-current > td { background: var(--color-primary-soft, #eef2f8); font-weight: 600; } /* 事前相談の「この方の相談の記録」で今の相談 */

/* ===== ワークフローの見た目(2026-10-02 作り直し。ユーザーの参考の画面から) ===== */
.wf-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 10px; }
.wf-icon svg { width: 20px; height: 20px; }
.wf-icon--md { width: 38px; height: 38px; }
.wf-icon--lg { width: 52px; height: 52px; border-radius: 14px; }
.wf-icon--lg svg { width: 26px; height: 26px; }
.wf-icon--blue { background: #e8f0fc; color: #2f63b8; }
.wf-icon--green { background: #e7f5ea; color: #2f7a4a; }
.wf-icon--sky { background: #e6f4fb; color: #2b7fa8; }
.wf-icon--amber { background: #fdf3e1; color: #b07216; }
.wf-icon--purple { background: #f1ebfa; color: #6a45a8; }
.wf-icon--teal { background: #e3f4f2; color: #23786f; }
.wf-icon--orange { background: #fdeee4; color: #b8582a; }
.wf-icon--rose { background: #fbecf0; color: #b0405f; }
.wf-icon--red { background: #fbeaea; color: #b53a3a; }
.wf-icon--indigo { background: #eceefb; color: #3f4aa8; }
.wf-icon--gray { background: #f0efec; color: #5b5f66; }

/* 申請の画面 */
.wf-page { padding-bottom: 8px; }
.wf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wf-head__title { min-width: 0; }
.wf-head__h1 { margin: 8px 0 2px; font-size: 1.35rem; overflow-wrap: anywhere; }
.wf-head__sub { color: var(--color-muted); font-size: 0.85rem; letter-spacing: 0.02em; }
/* 申請者(2026-11-11 ユーザー: 誰の申請かわかりやすく) */
.wf-head__who { margin: 2px 0 4px; font-size: 1.05rem; color: var(--color-text); }
.wf-head__who strong { font-size: 1.2rem; }
.wf-head__who-label { display: inline-block; font-size: 0.75rem; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: var(--radius-control); padding: 0 6px; margin-right: 8px; vertical-align: 2px; }
.wf-head__who-org { color: var(--color-muted); font-size: 0.95rem; margin-left: 2px; }
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wf-main, .wf-side { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.wf-main > .card, .wf-side > .card { margin: 0; }
/* 申請書の箱の上の細い帯(2026-10-24 ユーザー: 状況・数字・申請者の箱は場所を取りすぎ): 絵・申請書・状況・大きな数字・申請者・進み具合 */
.wf-brief { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.wf-brief__main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wf-brief__kind { font-size: 0.85rem; color: var(--color-muted); }
.wf-brief__figure { font-size: 1.3rem; margin-left: 4px; white-space: nowrap; }
.wf-brief__who { font-size: 0.88rem; margin-left: auto; text-align: right; }
.wf-brief__progress { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; }
.wf-brief__progress .wf-bar { flex: 0 0 140px; margin: 0; }
.wf-brief__caption { font-size: 0.82rem; font-weight: 700; }
.wf-brief__caption .hint { font-weight: 400; }
.wf-stamp-table { border-collapse: collapse; margin-left: auto; }
.wf-stamp-table th, .wf-stamp-table td { border: 1px solid #d9d5cc; text-align: center; width: 96px; padding: 6px 4px; }
.wf-stamp-table th { background: #f6f4ef; font-size: 0.82rem; font-weight: 600; }
.wf-stamp-table th span { display: block; font-size: 0.68rem; color: var(--color-muted); font-weight: 400; }
.wf-stamp-table__foot td { font-size: 0.78rem; line-height: 1.3; }
.wf-stamp-table__foot td span { display: block; font-size: 0.68rem; color: var(--color-muted); }
.wf-stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px;
  border-radius: 50%; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; line-height: 1.1; }
.wf-stamp--done, .wf-stamp--rejected { border: 2.5px solid #c8352f; color: #c8352f; box-shadow: inset 0 0 0 1px rgba(200, 53, 47, 0.25); transform: rotate(-4deg); }
.wf-stamp--rejected { border-color: #5b5f66; color: #5b5f66; }
.wf-stamp__top { font-size: 0.62rem; border-bottom: 1px solid currentColor; padding: 0 4px 1px; max-width: 60px; overflow: hidden; white-space: nowrap; }
.wf-stamp__date { font-size: 0.72rem; font-weight: 700; padding: 1px 0; border-bottom: 1px solid currentColor; width: 62px; text-align: center; }
.wf-stamp__name { font-size: 0.86rem; font-weight: 700; padding-top: 1px; }
.wf-stamp--waiting { border: 2px dashed #e39a2d; color: #b06a10; background: #fffaf0; }
.wf-stamp--returned { border: 2px solid #e39a2d; color: #b06a10; }
.wf-stamp--future, .wf-stamp--void { border: 1.5px dashed #cfcbc2; color: #aaa69d; }
.wf-stamp__label { font-size: 0.72rem; font-weight: 700; font-family: inherit; }
/* 申請の項目(2026-10-24 ユーザー: 見本B=紙の申請書のような枠の表。左に項目名の帯・幅があれば2列): 入力の画面と同じ並び。長い文は1行に。空の項目はたたむ */
.wf-fields__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; background: #fff; }
.wf-field { display: grid; grid-template-columns: 118px minmax(0, 1fr); min-width: 0; border-bottom: 1px solid var(--color-border); border-right: 1px solid var(--color-border); background: #fff; }
.wf-field__label { background: #edf0f5; padding: 8px 10px; font-size: 0.82rem; color: #3d4148; display: flex; align-items: center; }
.wf-field__value { padding: 8px 10px; font-size: 0.98rem; overflow-wrap: anywhere; line-height: 1.5; }
.wf-field__value div p { margin: 0 0 4px; } .wf-field__value div p:last-child { margin-bottom: 0; }
.wf-field--wide { grid-column: 1 / -1; }
.wf-field--table { grid-column: 1 / -1; display: block; padding: 6px 10px 10px; }
.wf-field--table .section-title { margin: 6px 0 6px; }
.wf-field--section { grid-column: 1 / -1; display: block; background: #f6f4ef; padding: 6px 10px; font-weight: 700; font-size: 0.88rem; color: var(--color-primary); }
.wf-field--sum .wf-field__label { background: #dfe9f8; }
.wf-field--sum .wf-field__value { font-weight: 700; font-size: 1.05rem; }
.wf-field.is-empty { display: none; }
.wf-fields:has(.wf-fields__toggle input:checked) .wf-field.is-empty { display: grid; }
.wf-fields:has(.wf-fields__toggle input:checked) .wf-field--section.is-empty { display: block; }
.wf-fields:has(.wf-fields__toggle input:checked) .wf-field.is-empty .wf-field__value { color: var(--color-muted); }
.wf-fields__toggle { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; cursor: pointer; font-size: 0.8rem; }
.wf-fields__toggle input { width: auto; height: auto; margin: 0; }
.wf-body .section-title { margin-top: 16px; }
/* ハンコの欄(右の列の一番上。2026-10-24 ユーザー) */
.wf-side__stamps { overflow-x: auto; }
.wf-side__stamps .wf-stamp-table { margin: 0 auto; }
.wf-side__stamps .wf-stamp-table + .wf-stamp-table { margin-top: 8px; }
.wf-side__stamps .wf-stamp-table th, .wf-side__stamps .wf-stamp-table td { width: 88px; }
/* ハンコ5つ以上(4段以上の経路): 右の列を広げ(400px)、ハンコは少し小さく(2026-10-24 ユーザー: 決裁→確認→確認→確認の4人のとき) */
.wf-layout--wide-side { grid-template-columns: minmax(0, 1fr) 400px; }
.wf-side__stamps .wf-stamp-table--dense th, .wf-side__stamps .wf-stamp-table--dense td { width: 70px; padding: 4px 2px; }
.wf-side__stamps .wf-stamp-table--dense th { font-size: 0.78rem; } .wf-side__stamps .wf-stamp-table--dense th span { font-size: 0.62rem; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp { width: 62px; height: 62px; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp__top { font-size: 0.56rem; max-width: 54px; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp__date { font-size: 0.64rem; width: 54px; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp__name { font-size: 0.78rem; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp__label { font-size: 0.64rem; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp-table__foot td { font-size: 0.7rem; }
.wf-side__stamps .wf-stamp-table--dense .wf-stamp-table__foot td span { font-size: 0.6rem; }
.wf-side__title { font-size: 1rem; margin: 0 0 10px; }
.wf-route { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.wf-route__step { display: flex; gap: 10px; }
.wf-route__num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; background: #eeece7; color: #6b6a66; }
.wf-route__step--done .wf-route__num { background: #3f9a5e; color: #fff; }
.wf-route__step--waiting .wf-route__num, .wf-route__step--returned .wf-route__num { background: #e39a2d; color: #fff; }
.wf-route__step--rejected .wf-route__num { background: #c94b4b; color: #fff; }
.wf-route__body { min-width: 0; flex: 1; }
.wf-route__name { font-weight: 700; }
.wf-route__people { font-size: 0.85rem; margin-top: 2px; }
.wf-route__comment { margin-top: 6px; background: #f6f4ef; border-radius: 8px; padding: 6px 9px; font-size: 0.82rem; overflow-wrap: anywhere; }
.wf-pill { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eeece7; color: #6b6a66; vertical-align: 1px; }
.wf-pill--done { background: #e4f3e8; color: #2f7a4a; } .wf-pill--waiting, .wf-pill--returned { background: #fdf0dc; color: #a8620f; }
.wf-pill--rejected { background: #fbe4e4; color: #b53a3a; }
.wf-history { list-style: none; padding: 0; margin: 0 0 10px; }
.wf-history__item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--color-border); font-size: 0.83rem; }
.wf-history__when { color: var(--color-muted); white-space: nowrap; }
.wf-history__label { margin-left: 1px; }
.wf-history__item--approve .wf-history__label, .wf-history__item--confirm .wf-history__label { color: #2f7a4a; font-weight: 700; }
.wf-history__item--return .wf-history__label, .wf-history__item--reject .wf-history__label { color: var(--color-danger); font-weight: 700; }
.wf-history__comment { margin-top: 3px; color: #3d4148; overflow-wrap: anywhere; }
.wf-history__comment p { margin: 0; }
.wf-comment-form textarea { width: 100%; margin-bottom: 6px; }
.wf-side__dates { margin-top: 10px; font-size: 0.75rem; }
.wf-actbar { position: sticky; bottom: 0; z-index: 20; margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid #f0cf96; border-radius: 8px; background: rgba(255, 250, 240, 0.96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 -4px 18px rgba(20, 30, 50, 0.1); }
.wf-actbar__who { font-size: 0.85rem; white-space: nowrap; }
.wf-actbar__comment { flex: 1 1 220px; min-width: 0; min-height: 34px; resize: vertical; }
.wf-actbar__buttons { display: flex; gap: 6px; margin-left: auto; }
.wf-actbar__ok { background: #3f9a5e; border-color: #3f9a5e; }
.wf-actbar__ok:hover { background: #34834f; }
@media (max-width: 960px) {
  .wf-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .wf-actbar { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px); padding: 8px 10px; gap: 6px; }
  /* 2026-10-25 ユーザー: 却下する・差し戻す・承認する を横に3つ並べる(絵の記号と「しました」はスマホでは出さない) */
  .wf-actbar__who { font-size: 0.8rem; }
  .wf-actbar__comment { flex: 1 1 100%; min-height: 40px; }
  .wf-actbar__buttons { flex: 1 1 100%; margin-left: 0; gap: 6px; flex-wrap: nowrap; }
  .wf-actbar__buttons .btn { flex: 1 1 0; min-width: 0; padding: 0 4px; min-height: 42px; font-size: 0.95rem; white-space: nowrap; }
  .wf-actbar__icon, .wf-actbar__long { display: none; }
  /* 上の大きな題(日時・内容)は中身と同じなので出さない(2026-10-25 ユーザー)。申請書の名前と番号だけ残す */
  .wf-head__h1 { display: none; }
  .wf-head__sub { font-size: 1rem; font-weight: 700; color: var(--color-text); margin-top: 6px; }
  .wf-stamp-table th, .wf-stamp-table td { width: 78px; }
  .wf-stamp { width: 60px; height: 60px; }
  .wf-fields__grid { grid-template-columns: minmax(0, 1fr); }
  .wf-field { grid-template-columns: 100px minmax(0, 1fr); }
  .wf-brief__who { margin-left: 0; text-align: left; flex: 1 1 100%; }
  .wf-brief__progress { flex-wrap: wrap; }
  .wf-brief__progress .wf-bar { flex: 1 1 100%; }
}
/* アンケート(AI 読み取り)の「まとめて読む」(2026-10-25) */
.survey-bulk { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--band); }
.survey-bulk__form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.survey-bulk__form input[type=date] { width: auto; height: 32px; font-size: 0.85rem; }
/* 担当者設定マスタ(2026-10-26) */
.staff-pick th.staff-pick__org { writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap; padding: 8px 4px; font-weight: 500; }
.staff-pick__cell { text-align: center; } .staff-pick__cell input { width: 20px; height: 20px; margin: 0; }
/* ワークフローの一覧 */
.wf-status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.wf-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border);
  background: #fff; color: #3d4148; font-size: 0.8rem; text-decoration: none; }
.wf-chip span { font-size: 0.72rem; color: var(--color-muted); background: #f1efea; border-radius: 999px; padding: 0 6px; }
.wf-chip.is-active { border-color: var(--color-primary); color: var(--color-primary); font-weight: 700; box-shadow: inset 0 -2px 0 var(--color-primary); }
.wf-list { width: 100%; border-collapse: separate; border-spacing: 0; }
.wf-list tr[data-href] { cursor: pointer; }
.wf-list td { padding: 11px 8px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.wf-list tr[data-href]:hover td { background: #faf9f6; }
.wf-list__icon { width: 46px; }
.wf-list__main { min-width: 0; }
.wf-list__title { font-weight: 700; color: #262a31; text-decoration: none; overflow-wrap: anywhere; }
.wf-list__meta { font-size: 0.92rem; color: #45423d; margin-top: 3px; } /* 2026-11-11 ユーザー: 名前・日付が小さい(前は 0.78rem・薄い字) */
.wf-list__who { font-size: 1rem; color: var(--color-text); }
.wf-list__org { color: var(--color-muted); }
.wf-list__figure { text-align: right; font-weight: 700; white-space: nowrap; font-size: 0.95rem; }
.wf-list__date { text-align: right; white-space: nowrap; font-size: 0.82rem; width: 96px; }
.wf-list__date span { display: block; font-size: 0.66rem; color: var(--color-muted); }
.wf-list__status { width: 1px; white-space: nowrap; text-align: right; }
.wf-list__chev { width: 14px; color: #b9b6af; font-size: 1.2rem; }
.wf-list__empty { text-align: center; padding: 24px; }
@media (max-width: 700px) {
  .wf-list__date, .wf-list__chev { display: none; }
  /* スマホは1件を2段に(2026-10-03 ユーザー: 題名が細い列で何行にも折り返していた)。
     左にアイコン、真ん中に題名(2行まで)と申請書名、右の上に状況・下に金額や日付 */
  .wf-list, .wf-list tbody { display: block; }
  .wf-list tr { display: block; }
  .wf-list tr[data-href] { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "icon main status" "icon main figure";
    column-gap: 10px; row-gap: 4px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--color-border); }
  .wf-list tr[data-href] td { padding: 0; border: 0; width: auto; }
  .wf-list__icon { grid-area: icon; align-self: center; }
  .wf-list__icon .wf-icon--md { width: 34px; height: 34px; }
  .wf-list__main { grid-area: main; }
  .wf-list__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.95rem; line-height: 1.35; overflow-wrap: normal; word-break: normal; }
  .wf-list__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.82rem; }
  .wf-list__who { font-size: 0.86rem; }
  .wf-list__status { grid-area: status; align-self: end; }
  .wf-list__figure { grid-area: figure; align-self: start; font-size: 0.8rem; color: #4a4f57; }
}
/* 申請書を選ぶ・入力 */
.wf-form-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.wf-form-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 8px;
  background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.wf-form-card:hover { border-color: var(--color-primary); box-shadow: 0 2px 10px rgba(30, 50, 90, 0.08); }
.wf-form-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wf-form-card__desc { font-size: 0.8rem; color: #555a62; }
.wf-form-title { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.wf-form-title .wf-head__h1 { margin: 0; }
/* 有給(2026-10-02) */
.pl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pl-tile { background: #f6f4ef; border-radius: 8px; padding: 8px 6px; text-align: center; }
.pl-tile span { display: block; font-size: 0.68rem; color: var(--color-muted); }
.pl-tile strong { font-size: 1.05rem; }
.pl-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.pl-left span { font-size: 0.8rem; color: var(--color-muted); }
.pl-left strong { font-size: 1.5rem; }
.pl-left__after { margin-left: auto; font-weight: 700; color: #2b7fa8 !important; }
.pl-left__after.is-short { color: var(--color-danger) !important; }
.pl-note { margin: 6px 0 0; }
.pl-note--warn, .pl-warn { color: #b06a10; font-weight: 700; }
.pl-ok { color: #2f7a4a; }
.pl-alert { background: #fdf3e1; border: 1px solid #f0cf96; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 0.85rem; }
.pl-table tr.is-muted td { color: var(--color-muted); }
.pl-days { width: 80px; }
.pl-add { margin-top: 12px; border-top: 1px solid var(--color-border); padding-top: 10px; }
.pl-add__title { font-size: 0.9rem; margin: 0 0 6px; }
.pl-add__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.pl-add__row label { display: flex; flex-direction: column; font-size: 0.75rem; color: var(--color-muted); gap: 2px; }
.pl-add__row input { height: 32px; }
.pl-add__note input { width: 220px; max-width: 100%; }
.wf-chip--leave { border-color: #9ccbe2; color: #2b7fa8; }
.pl-not-taken { margin-top: 14px; padding: 10px 12px; border: 1px dashed #d9d5cc; border-radius: 8px; background: #fbfaf7; font-size: 0.85rem; }
.pl-not-taken__row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pl-not-taken__row input { flex: 1 1 220px; min-width: 0; height: 32px; }
/* 会員名簿の確認: 記入した Excel の読み込み(2026-10-02) */
.member-fill { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border: 1px dashed var(--color-border); border-radius: 8px; margin: 8px 0 12px; }
tr.is-prefilled > td { background: #f1f8f3; }

/* スマホを見やすく(2026-10-02 ユーザー: 全体的に文字・アイコンを大きく。サイボウズのアプリと比べて)。パソコンは変えない */
@media (max-width: 860px) {
  /* 全体の文字を一回り大きく(16px → 17px 相当)。「小・標・大」もそれぞれ一段上に */
  html { font-size: 106.25%; }
  html.font-small { font-size: 90.625%; } /* 14.5px */
  html.font-large { font-size: 121.875%; } /* 19.5px */
  /* 画面の幅を広く使う(外の余白とカードの内側の余白を詰める) */
  .app-shell .page { padding-left: 10px; padding-right: 10px; }
  .card { padding: 14px 14px; }
  /* ホームのカードは見出しの帯をカードの上の角までぴったり付ける(2026-10-23 ユーザー: スマホで見出しの帯と白い光が角からずれて見えた。
     上の行の余白 14px が帯の上に入っていた。パソコンと同じく上は 0) */
  .card.home-card { padding: 0 14px 14px; }
  .card.home-card > .home-card__title { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  /* 一覧・詳細の小さい文字(表・説明)をスマホでは大きめに */
  .compact-list .table th, .compact-list .table td { font-size: 0.95rem; padding: 8px 10px; }
  /* 一覧の表(見出しのある表)は行を低く(2026-11-20 ユーザー: スマホで行が高く、1画面に入る件数が少ない)。字の大きさはそのまま、行の間と上下の余白だけ詰める */
  .compact-list .table:has(> thead) td { line-height: 1.35; padding-top: 6px; padding-bottom: 6px; }
  /* 請求書一覧の「状態・入金」は「発行済み 未入金」を1行に(2行だと行が倍の高さになる) */
  .invoice-status > div { display: inline-block; margin-left: 4px; }
  /* 顧客の画面の請求書の行の「請求書・複製・領収書」のボタンは少し低く(ボタンの高さで行が高くなっていた) */
  .doc-open-buttons .doc-open-btn { min-height: 32px; }
  .hint, .compact-list .hint { font-size: 0.9rem; }
  .page-title, .compact-list .page-title { font-size: 1.35rem; }
  .field label { font-size: 0.92rem; }
  .btn { min-height: 42px; }
  .btn--sm { min-height: 36px; font-size: 0.9rem; }
  /* 下の帯: アイコン 28→32px、文字 10.5→12px、色を濃く */
  /* 上下の隙間を詰めた(2026-10-03 ユーザー) */
  /* 2026-10-25: 下の padding にホームバーの余白(safe area)を残す(前はここで上書きされて消えていた)。色と文字の大きさは v80 の値(上の .tab-bar__item) */
  .tab-bar { padding: 3px 4px; }
  .tab-bar__item { gap: 1px; padding-top: 3px; padding-bottom: 2px; }
  .tab-bar__item .sidebar__icon { width: 32px; height: 32px; }
  .tab-bar__label { overflow: visible; text-overflow: clip; max-width: none; letter-spacing: -0.02em; }
  /* 5つ並べる(2026-10-03 ユーザー)。小さい iPhone(SE・mini は幅375)でも「スケジュール」「メッセージ」が隣とくっつかないように、
     帯の左右と内側の余白を詰め、名前の文字を少し小さくする */
  @media (max-width: 400px) {
    /* 2026-10-25 ユーザーの写真: ここの left/right 6px が残っていて、帯の両脇にすき間ができていた(帯は画面の端まで。v80) */
    .tab-bar { padding: 3px 2px; }
    .tab-bar__item { padding-left: 0; padding-right: 0; font-size: 0.65rem; }
    .tab-bar__label { letter-spacing: -0.05em; }
  }
  @media (max-width: 340px) {
    .tab-bar__item .sidebar__icon { width: 28px; height: 28px; }
  }
  .app-shell .page { padding-bottom: calc(var(--tab-bar-h, 76px) + var(--tab-bar-bottom, 0px) + 20px); }
  /* メニュー: 文字を大きく・押しやすく。会社名は1行に収める */
  /* 「ホーム」(と事前相談だけの人の 事前相談一覧・見積書一覧)も同じ大きさに(2026-10-04 ユーザー: ホームだけ小さかった。a.sidebar__top-link の 0.95rem が勝っていた) */
  .sidebar__top-link, .sidebar__nav a.sidebar__top-link, .sidebar__group > summary { font-size: 1.12rem; padding-top: 12px; padding-bottom: 12px; }
  .sidebar__group-body a { font-size: 1.05rem; padding: 9px 12px; }
  .sidebar__sub > summary { font-size: 0.98rem; padding: 9px 12px; }
  .sidebar__sub-body a { font-size: 1.02rem; }
  .sidebar__sub--item > summary { font-size: 1.05rem; padding: 9px 12px; font-weight: 400; }
  .sidebar .sidebar__icon { width: 26px; height: 26px; flex-basis: 26px; } /* 幅が 20 のままだと小さく出ていた・少し大きめに(2026-10-07) */
  .sidebar__group--long .sidebar__group-label { font-size: 0.94em; } /* 「グループウェア」の ▸ が他とそろうように */
  .sidebar__brand-name { font-size: 18px; }
  .home-list { font-size: 0.98rem; }
  /* 入力欄は16px以上(2026-10-02 ユーザー: 文字を入れると拡大される。iPhone は16pxより小さい欄を押すと画面を拡大する) */
  input, select, textarea { font-size: 1rem !important; }
  /* メモ(2026-10-02 ユーザー: 小さい) */
  .memo__chip { font-size: 1rem; padding: 7px 16px; }
  .memo__folder-name { font-size: 1.35rem; }
  .memo__item { padding: 10px 0; gap: 10px; }
  .memo__check { width: 36px; height: 36px; font-size: 1.15rem; flex: none; }
  .memo__body { font-size: 1.12rem; }
  .memo__icon svg { width: 24px; height: 24px; }
  .memo__add input { height: 48px; }
  .memo__add .btn { min-height: 48px; }
  .memo__bar { bottom: calc(var(--tab-bar-h, 76px) + var(--tab-bar-bottom, 0px) + 8px); }
  .memo__bar-item { font-size: 0.9rem; }
  .memo__bar-icon { width: 30px; height: 30px; }
  .memo { padding-bottom: 110px; }
  .home-list li > a, .home-list li.hint, .home-list__funeral > span { padding: 9px 2px; }
  .home-list__tag { font-size: 0.82rem; }

  /* スケジュールの一覧: サイボウズのアプリの形(画面いっぱい・日付・時刻・家名を大きく太く) */
  .schedule-list.card { margin: -4px 0 0; padding: 4px 14px 14px; } /* 2026-10-25 ユーザー: 両脇に余白(前は画面いっぱい) */
  .schedule-list__controls { gap: 6px; }
  .schedule-list__staff { font-size: 1rem; max-width: 9em; }
  .schedule-list__month { font-size: 1.05rem; }
  .schedule-list__today { font-size: 1.05rem; }
  .schedule-list__sub { font-size: 0.85rem; }
  .schedule-list__date { font-size: 1.18rem; font-weight: 700; margin: 16px 0 8px; }
  .schedule-list__dayinfo { font-size: 0.85rem; align-items: center; }
  .schedule-list__dayinfo .schedule-day__weather { font-size: 1rem; }
  .schedule-list__add { font-size: 1.45rem; padding: 0 6px; }
  .schedule-list__none { font-size: 0.95rem; }
  .schedule-list .schedule-item { padding: 8px 12px; margin: 0 0 8px; border-left-width: 5px; }
  .schedule-list .schedule-item__time { font-size: 1.06rem; font-weight: 600; margin-bottom: 3px; }
  .schedule-list .schedule-item__tag { font-size: 0.92rem; padding: 1px 7px; vertical-align: 2px; }
  .schedule-list .schedule-item__title { font-size: 1.12rem; font-weight: 700; }
  .schedule-list .schedule-item__facility { font-size: 0.9rem; margin-top: 3px; }
}

/* 左のメニューの「よく使う」(2026-10-02 ユーザー。3つまで。パソコンとスマホ) */
.sidebar__favs { margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.sidebar__favs-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.88rem; opacity: 0.8; margin: 0 4px 2px; }
.sidebar__favs-edit { background: none; border: 1px solid currentColor; border-radius: 999px; color: inherit; font: inherit; font-size: 0.72rem; padding: 1px 10px; cursor: pointer; }
.sidebar__favs-hint { font-size: 0.75rem; line-height: 1.5; margin: 4px 4px 6px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 214, 102, 0.25); }
.sidebar__favs-list { display: flex; flex-direction: column; gap: 0; }
/* 文字の大きさ・太さはまとまりの中の項目(グループウェアの「スケジュール」など)と同じ(2026-10-03 ユーザー)。行の間は詰める */
.sidebar__fav { display: block; padding: 4px 10px; border-radius: var(--radius); color: inherit; text-decoration: none; font-size: 0.9rem; font-weight: 400; background: rgba(255,255,255,0.10); }
.sidebar__fav::before { content: "★"; color: #e0a64a; margin-right: 6px; font-size: 0.85em; }
.sidebar__fav:hover { background: rgba(255,255,255,0.2); }
.app-shell .sidebar__favs { border-bottom-color: var(--side-line); }
.app-shell .sidebar__fav { color: var(--side-ink); background: rgba(255, 255, 255, 0.10); }
/* 編集中: メニューの項目の右に ☆/★ */
.sidebar.is-fav-editing .sidebar__nav a[href^="/"]:not([target="_blank"])::after { content: "☆"; margin-left: auto; padding-left: 8px; opacity: 0.6; }
.sidebar.is-fav-editing .sidebar__nav a.is-fav[href^="/"]:not([target="_blank"])::after { content: "★"; color: #e0a64a; opacity: 1; }
.sidebar.is-fav-editing .sidebar__nav a { display: flex; align-items: center; }
.sidebar__collapsed .sidebar__favs, .app-shell--collapsed .sidebar__favs { display: none; }

/* スマホの上の帯(2026-10-02 ユーザー: 左上に ☰・真ん中に画面の名前。下の帯と同じすりガラス) */
@media (max-width: 860px) {
  .mobile-bar {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 900;
    padding: calc(4px + env(safe-area-inset-top, 0px)) 8px 4px; min-height: 0;
    background: transparent; border-bottom: 1px solid transparent; color: #262b35;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  /* 一番上にいる間は透明、下へ動かしたらすりガラス(2026-10-02 ユーザー。mobile_bar_controller.js) */
  .mobile-bar.is-scrolled {
    background: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border-bottom-color: rgba(0, 0, 0, 0.06);
  }
  .mobile-bar__menu { position: relative; width: 44px; height: 44px; color: #262b35; border-radius: 8px; }
  .mobile-bar__menu:hover, .mobile-bar__menu:focus-visible { background: rgba(0, 0, 0, 0.05); }
  .mobile-bar__dot { position: absolute; top: 8px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: #e0443c; border: 2px solid #fff; }
  .mobile-bar__title { flex: 1 1 auto; text-align: center; color: #262b35; font-size: 1.05rem; font-weight: 700; }
  /* 大きなタイトルが見えている間は、帯の小さな名前を出さない(2026-10-07 ユーザー。mobile_bar_controller.js) */
  .mobile-bar.has-page-title .mobile-bar__title { opacity: 0; transition: opacity 0.2s ease; }
  .mobile-bar.has-page-title.is-title-hidden .mobile-bar__title { opacity: 1; }
  .mobile-bar__side { flex: none; width: 44px; }
  /* 上の帯はスケジュールの画面だけ(2026-10-07)。帯の無い画面は iPhone の上の時計の分を空ける */
  .app-shell .page { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .app-shell:has(.mobile-bar) .page { padding-top: 10px; }
  /* 2026-10-04: 一番上を会社名から自分の名前に変えたので、ホームはスマホでもメニューの「ホーム」から */
  .sidebar__fav { font-size: 1.05rem; padding: 6px 12px; }
  .sidebar__favs-head { font-size: 1rem; }
  .sidebar__favs-edit { font-size: 0.85rem; padding: 3px 12px; }
}
/* メールの画面は自分の上の帯(m-head)を持つので、共通の上の帯は出さない(メールボックスの一番上に ☰ を置く) */
@media (max-width: 760px) {
  .app-shell:has(.m-head) .mobile-bar { display: none; }
}

/* 掲示板のカテゴリ(スマホ): 横にすべらせる1行のボタン(2026-10-02 ユーザー: 部署の一覧が画面の半分を取っていた。開いてすぐ最新の掲示が見えるように) */
@media (max-width: 860px) {
  .board-cats { flex-direction: row; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; border: 0; background: transparent; padding: 2px 0 8px; font-size: 0.95rem; }
  .board-cats::-webkit-scrollbar { display: none; }
  .board-cats__head { display: none; }
  .board-cats__item, .board-cats__admin { flex: none; white-space: nowrap; padding: 7px 14px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); margin: 0; }
  .board-cats__item.is-current { border-color: var(--color-primary); }
  .board-cats__admin { color: var(--color-muted); font-size: 0.85rem; text-decoration: none; }
}
/* ファイル管理(スマホ): フォルダは「フォルダを選ぶ」で下から出す一覧に。開いた画面は検索と最近更新されたファイル(2026-10-02 ユーザー) */
.folder-picker__open, .folder-sheet { display: none; }
@media (max-width: 860px) {
  .file-sections--inline { display: none; }
  .folder-picker__open { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 4px 0 12px; padding: 12px 16px;
    border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 1rem; cursor: pointer; }
  .folder-sheet[open] { display: block; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 78vh; overflow-y: auto;
    box-sizing: border-box; border: 0; border-radius: 8px 8px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0,0,0,0.2); }
  .folder-sheet::backdrop { background: rgba(30, 34, 44, 0.35); }
  .folder-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .folder-sheet__head h2 { margin: 0; font-size: 1.1rem; }
  .folder-sheet__close { background: rgba(0,0,0,0.06); color: var(--color-text); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
  .folder-sheet .folder-list__item { padding: 10px 6px; font-size: 1.02rem; border: 0; border-radius: 0; }
  .folder-sheet .folder-list { gap: 0; grid-template-columns: 1fr; grid-auto-rows: auto; }
  .folder-sheet .folder-list li { border-bottom: 1px solid var(--color-border); }
}

/* ダッシュボードの地図の説明(2026-10-02 ユーザー: 短く箇条書きに) */
.dash-map__help { margin: 8px 0 0; padding-left: 1.2em; line-height: 1.6; }
.dash-map__help li { margin: 1px 0; }

/* スケジュールの月表示(2026-10-02 ユーザー: サイボウズのアプリのように)。上の切り替えは1行に小さく、会社/自分。
   スマホは1か月全体を画面の幅で出し、マスには頭の1文字+名前だけ。日を押すと下からその日の予定(day-sheet) */
.schedule-mo__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.schedule-mo__bar .segmented { display: inline-flex; gap: 0; align-items: center; }
.schedule-mo__scope-label { margin-right: 4px; font-size: 0.8rem; }
.schedule-mo__bar .segmented .btn { border-radius: 0; }
.schedule-mo__bar .segmented .btn:first-child { border-radius: 6px 0 0 6px; }
.schedule-mo__bar .segmented .btn:last-child { border-radius: 0 6px 6px 0; }
.schedule-mo__month { display: inline-flex; align-items: center; gap: 2px; font-size: 1.05rem; }
.schedule-mo__arrow { text-decoration: none; font-size: 1.35rem; line-height: 1; padding: 0 8px; color: var(--color-primary); }
.schedule-mo__today { text-decoration: none; font-weight: 600; }
.schedule-mo__bar .schedule-views { margin-left: auto; }
.schedule-mo__staff select { font: inherit; height: 30px; padding: 0 6px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); max-width: 10em; }
.schedule-mo__num, .schedule-mo__chips { display: none; }
.day-sheet { display: none; }
@media (max-width: 860px) {
  .schedule-mo.card { margin: -4px 0 0; padding: 4px 4px 10px; } /* 2026-10-25 ユーザー: 両脇に余白 */
  .schedule-mo__bar { gap: 6px; padding: 0 6px; }
  .schedule-mo__bar .btn--sm { min-height: 30px; padding: 0 7px; font-size: 0.85rem; white-space: nowrap; }
  .schedule-mo__month { font-size: 0.95rem; white-space: nowrap; }
  .schedule-mo__arrow { padding: 0 5px; }
  .schedule-mo__today { font-size: 0.9rem; white-space: nowrap; }
  .schedule-mo__staff { flex: 1 1 100%; order: 9; }
  .schedule-mo__staff select { width: 100%; max-width: none; height: 34px; font-size: 1rem !important; }
  .schedule-mo .schedule-month { min-width: 0; }
  .schedule-mo .schedule-month th { padding: 2px 0; font-size: 0.75rem; }
  .schedule-mo .schedule-month td { height: 64px; padding: 1px 1px 3px; cursor: pointer; overflow: hidden; }
  .schedule-mo .schedule-month td:active { background: #eef3fb; }
  .schedule-mo .schedule-mo__pc, .schedule-mo .schedule-day, .schedule-mo .schedule-add { display: none; }
  .schedule-mo__num { display: block; text-align: center; font-size: 0.8rem; font-weight: 600; line-height: 1.5; }
  .schedule-mo td.is-sat .schedule-mo__num { color: #2f5fa8; }
  .schedule-mo td.is-sun .schedule-mo__num, .schedule-mo td.is-holiday .schedule-mo__num { color: #c0392b; }
  .schedule-mo td.is-other-month .schedule-mo__num, .schedule-mo td.is-other-month .schedule-mo__chips { opacity: 0.5; }
  .schedule-mo td.is-today .schedule-mo__num { color: #fff; background: var(--color-primary); border-radius: 999px; width: 1.7em; margin: 0 auto; }
  .schedule-mo__chips { display: block; }
  .mchip { display: flex; align-items: center; gap: 1px; margin: 0 0 1px; font-size: 0.6rem; line-height: 1.35; white-space: nowrap; overflow: hidden; }
  .mchip__tag { flex: none; padding: 0 1px; border-radius: 2px; font-size: 0.56rem; line-height: 1.4; }
  .mchip__tag:not([class*="schedule-tag--"]):not([style]) { background: #888; color: #fff; }
  .mchip__name { overflow: hidden; text-overflow: clip; letter-spacing: -0.03em; }

  .day-sheet[open] { display: block; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 78vh; overflow-y: auto;
    box-sizing: border-box; border: 0; border-radius: 8px 8px 0 0; padding: 0; background: var(--color-surface); box-shadow: 0 -8px 30px rgba(0,0,0,0.2); }
  .day-sheet::backdrop { background: rgba(30, 34, 44, 0.35); }
  .day-sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: #d4d7dd; margin: 8px auto 0; }
  .day-sheet__close { position: absolute; top: 10px; right: 12px; background: rgba(0,0,0,0.06); color: var(--color-text); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
  .day-sheet [data-month-sheet-target="body"] { padding: 6px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .day-sheet__head { padding-right: 40px; margin-bottom: 10px; }
  .day-sheet__head h2 { margin: 0 0 2px; font-size: 1.15rem; }
  .day-sheet__info { font-size: 0.9rem; margin-right: 8px; }
  .day-sheet__info .schedule-day__date { display: none; }
  .day-sheet__info .schedule-day__holiday { display: inline; font-size: 0.9rem; margin-right: 4px; }
  .day-sheet__info .schedule-day__rokuyo { font-size: 0.9rem; }
  .day-sheet__item { border: 1px solid var(--color-border); border-left: 5px solid #b8c4dd; border-radius: 8px; margin: 0 0 8px; background: #f7f8fc; }
  .day-sheet__item--funeral { border-left-color: #e0a64a; background: #fdf6e8; }
  .day-sheet__item--kind-0 { border-left-color: #7dbbe8; background: #e8f3fb; }
  .day-sheet__item.is-provisional { border-style: dashed; border-left-style: solid; background: #fffdf6; }
  .day-sheet__item summary { list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 1.05rem; }
  .day-sheet__item summary::-webkit-details-marker { display: none; }
  .day-sheet__item summary::after { content: "▾"; margin-left: auto; color: var(--color-muted); font-size: 0.9rem; }
  .day-sheet__item[open] summary::after { content: "▴"; }
  .day-sheet__time { flex: none; min-width: 3.2em; font-variant-numeric: tabular-nums; color: var(--color-muted); font-size: 0.95rem; }
  .day-sheet__line { min-width: 0; overflow-wrap: anywhere; }
  .day-sheet__line .schedule-item__tag { font-size: 0.85rem; padding: 1px 6px; vertical-align: 2px; }
  .day-sheet__more { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; padding: 0 12px 10px 12px; font-size: 0.98rem; }
  .day-sheet__more dt { color: var(--color-muted); }
  .day-sheet__more dd { margin: 0; overflow-wrap: anywhere; }
  .day-sheet__open { display: inline-block; margin: 0 12px 10px; font-size: 0.95rem; }
  .day-sheet__add { width: 100%; margin-top: 4px; }
}

/* 施行の予定は押すとその場で故人名・場所・担当を開く(2026-10-02 ユーザー: 対象者の画面へは飛ばない) */
.schedule-item--toggle > summary { list-style: none; cursor: pointer; }
.schedule-item--toggle > summary::-webkit-details-marker { display: none; }
.schedule-item--toggle[open] { background: #fbe9c8; }
.schedule-item--kind-0.schedule-item--toggle[open] { background: #d6eaf8; }
.schedule-item__more { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; margin: 3px 0 0; padding-top: 3px; border-top: 1px dashed #e3c48c; font-size: 0.72rem; }
.schedule-item__more dt { color: var(--color-muted); }
.schedule-item__more dd { margin: 0; overflow-wrap: anywhere; }
.schedule-item__open { display: inline-block; margin-top: 2px; font-size: 0.72rem; }
.schedule-list .schedule-item__more { font-size: 0.9rem; gap: 3px 12px; margin-top: 6px; padding-top: 6px; }
.schedule-list .schedule-item__open { font-size: 0.88rem; margin-top: 4px; }

/* スマホの右上のボタン(2026-10-02 ユーザー: サイボウズのアプリのように右上にまとめる)。表示の切り替え・予定を登録・そのほか */
@media (max-width: 860px) {
  .mobile-bar .mobile-bar__side--actions { width: auto; }
  .mobile-bar:has(.mobile-bar__side--actions) .mobile-bar__title { text-align: left; padding-left: 2px; }
  .mbar-actions { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
  /* 上の帯がほかの画面と同じ細さになるよう、ボタンは低めに(2026-10-03 ユーザー) */
  .mbar-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 28px; color: #262b35; border-radius: 999px; cursor: pointer; list-style: none; text-decoration: none; }
  .mbar-btn::-webkit-details-marker { display: none; }
  .mbar-btn svg { width: 21px; height: 21px; }
  .mobile-bar__side--actions, .mbar-menu { display: flex; align-items: center; }
  .mbar-actions { height: 30px; box-sizing: border-box; line-height: 1; }
  .mbar-btn:active, .mbar-menu[open] > .mbar-btn { background: rgba(0, 0, 0, 0.06); }
  .mbar-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000; min-width: 220px; padding: 6px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18); }
  .mbar-pop__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 6px; background: none;
    color: #262b35; font: inherit; font-size: 1.05rem; text-align: left; text-decoration: none; cursor: pointer; }
  .mbar-pop__item:active { background: rgba(0, 0, 0, 0.06); }
  .mbar-pop__item.is-current { font-weight: 700; }
  .mbar-pop__check { flex: none; width: 1em; font-weight: 700; }
  .schedule-hide-sp, .schedule .schedule-views { display: none !important; }
  .schedule-mo__today { margin-left: auto; }
  .mbar-pop__item { white-space: nowrap; }
  /* 週(スマホ): 上を詰める(前日・翌日はしまう) */
  .schedule:not(.schedule-list):not(.schedule-mo).card { margin: -4px 0 0; padding: 4px 8px 12px; } /* 2026-10-25 ユーザー: 両脇に余白(前は画面いっぱい) */
  .schedule__head { gap: 6px; margin-bottom: 6px; }
  .schedule__nav { gap: 4px; flex-wrap: nowrap; }
  .schedule__nav.schedule__nav--wrap { flex-wrap: wrap; row-gap: 6px; }
  .schedule__nav .btn--sm { min-height: 34px; padding: 0 9px; white-space: nowrap; }
  .schedule__jump input { height: 34px; max-width: 150px; }
}

/* 選択肢マスタ: 左に項目のまとまり・右に選んだ項目(2026-10-04 ユーザー: 数が多くて分かりにくい) */
.master-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.master-nav { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--color-border, #e3e1dc); border-radius: 8px; padding: 8px; background: #fafbfd; }
.master-nav__search { width: 100%; height: 32px; font-size: 0.8rem; margin-bottom: 6px; }
.master-nav__group + .master-nav__group { margin-top: 8px; }
.master-nav__group-title { font-size: 0.72rem; font-weight: 600; color: #5b6a8c; padding: 4px 6px 2px; letter-spacing: 0.04em; }
.master-nav__item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: var(--color-text, #2b2b2b); text-decoration: none; font-size: 0.82rem; line-height: 1.3; }
.master-nav__item:hover { background: #eef2f8; }
.master-nav__item.is-current { background: var(--color-primary, #4f5f8c); color: #fff; }
.master-nav__name { flex: 1; min-width: 0; }
.master-nav__name small { display: block; font-size: 0.68rem; color: var(--color-muted, #777); }
.master-nav__item.is-current .master-nav__name small { color: rgba(255,255,255,0.8); }
.master-nav__count { font-size: 0.7rem; color: var(--color-muted, #888); font-variant-numeric: tabular-nums; }
.master-nav__item.is-current .master-nav__count { color: rgba(255,255,255,0.85); }
.master-nav__alert { font-size: 0.66rem; font-weight: 700; color: #fff; background: #d9822b; border-radius: 9px; padding: 0 6px; line-height: 16px; }
.master-main__picker { display: none; }
.master-main__head { margin-bottom: 10px; }
.master-main__head h2 { font-size: 1.15rem; margin: 0; }
.master-main__head h2 small { font-size: 0.78rem; font-weight: 400; color: var(--color-muted, #777); margin-left: 6px; }
.master-main__head p { margin: 2px 0 0; font-size: 0.8rem; color: #4f5f8c; }
.master-main { min-width: 0; }
.card.master-tool { padding: 10px 16px; }
/* 左の一覧の分だけ横がせまくなるので、行の入力欄がつぶれて重ならないよう、収まらないときは表を横に動かす */
@media (min-width: 861px) {
  .master-main .master-edit-list { grid-template-columns: minmax(max-content, 1fr) auto; overflow-x: auto; }
  .master-main .master-edit-list--sortable { grid-template-columns: 18px minmax(max-content, 1fr) auto; }
  .master-main .master-edit-row__actions { flex-wrap: wrap; }
}
.master-help { margin: 6px 0 12px; }
.master-help > summary, .master-tool > summary { cursor: pointer; font-size: 0.8rem; color: #4f5f8c; }
.master-help[open] > summary { margin-bottom: 4px; }
.master-tool > summary { margin-bottom: 0; }
.master-tool[open] > summary { margin-bottom: 10px; }
@media (max-width: 860px) {
  .master-layout { display: block; }
  .master-nav { display: none; }
  .master-main__picker { display: block; margin-bottom: 10px; }
  .master-main__picker label { display: block; font-size: 0.8rem; color: var(--color-muted, #777); margin-bottom: 2px; }
  .master-main__picker select { width: 100%; }
}

/* 死亡場所の区分で候補を絞る(2026-10-04 ユーザー。顧客登録の対象者) */
.death-place-row { display: flex; gap: 6px; align-items: stretch; }
.field .death-place-row select.death-place-row__kind { flex: none; width: 8.8em; min-width: 0; }
.death-place-row .datalist-picker { flex: 1 1 auto; min-width: 0; }
.field .death-place-row .datalist-picker > input { min-width: 0; }

/* スマホの見積書・請求書の下の帯(2026-10-04 ユーザー: 3段に折り返して下の帯に重なっていた)。
   2段にする: 上=合計・キャンセル・保存、下=商品検索・明細・小計・計算・内訳印刷を横に1列(スマホでは名前を短く。幅の狭い iPhone で内訳印刷(管理者だけ)が収まらなければ次の行へ)。
   下の帯(タブ)の上に浮かせる */
@media (max-width: 860px) {
  .form-sticky-bar {
    bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 8px);
    margin: 12px -8px 0; padding: 8px 10px; gap: 6px 6px; flex-wrap: wrap;
    border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 4px 18px rgba(30, 40, 70, 0.18);
  }
  .form-sticky-bar__total { order: 1; font-size: 1.05rem; }
  .form-sticky-bar .form-sticky-bar__cancel { order: 2; }
  .form-sticky-bar .form-sticky-bar__submit { order: 3; }
  .form-sticky-bar .form-sticky-bar__cancel, .form-sticky-bar .form-sticky-bar__submit {
    min-width: 0; height: 38px; min-height: 38px; padding: 0 14px; font-size: 0.95rem;
  }
  .form-sticky-bar__tools {
    order: 4; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 3px; align-items: center;
  }
  .form-sticky-bar__tools .btn { flex: 1 0 auto; min-width: 0; height: 34px; min-height: 34px; padding: 0 6px; font-size: 0.82rem; }
  .form-sticky-bar__tools .form-sticky-bar__check { flex: none; font-size: 0.82rem; padding: 0 2px; gap: 2px; }
  .fsb-long { display: none; }
  .fsb-short { display: inline; }
}

/* 共有の受信箱(2026-10-04 ユーザー: 問い合わせを6名で見る。二重の返信を防ぐ。docs/mail_spec.md 8.14) */
.mail-state-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.mail-state-badge small { font-weight: 400; font-size: 0.72rem; }
.mail-state-badge--open { background: #fde6e4; color: #a3271b; border-color: #f3b8b1; }
.mail-state-badge--claimed { background: #fff2cc; color: #7a5600; border-color: #f0d68a; }
.mail-state-badge--composing { background: #e6efff; color: #1f4f9c; border-color: #b9cff5; }
.mail-state-badge--replied { background: #e3f4e8; color: #1f6b35; border-color: #b6dfc1; }
.mail-state-badge--done { background: #eef0f3; color: #555c66; border-color: #d5d9df; }
.mail-list__state { width: 1px; white-space: nowrap; } /* 1% だと表が100倍に広がり件名が右に押し出された(2026-10-19 ユーザーの写真。下の 3877 行と同じ) */
.mail-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 4px; padding: 8px 12px; border-radius: 8px; background: #f6f8fb; border: 1px solid var(--color-border); }
.mail-state--open { background: #fff5f4; border-color: #f3c6c0; }
.mail-state__label { font-weight: 600; font-size: 0.85rem; }
.mail-state__detail { font-size: 0.8rem; }
.mail-state__actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.mail-state__actions form { margin: 0; }
.mail-members { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 8px; width: 100%; }
.mail-members legend { padding: 0 4px; }
.mail-accounts__fixed { font-weight: 600; padding: 0 4px; }
.mail-account--shared { border-left: 3px solid #5b7fc4; }

/* 並び順の ↑↓(役割・ユーザー。2026-10-04) */
/* 1% にすると表の min-width: max-content と合わさって表が100倍に広がる(2026-10-06 ユーザー管理で 7,400px)。1px+折り返さないで中身の幅にする */
.order-col { width: 1px; white-space: nowrap; }
/* 役割・権限管理: スマホは「使える主なもの」を役割名の下の行に(2026-11-08 ユーザー: 長い文の列で行がとても高く・役割名が折れていた) */
@media (max-width: 600px) {
  .roles-table thead { display: none; }
  .roles-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 8px; margin-bottom: 6px; }
  .roles-table tr { background: var(--color-surface, #fff); border: 1px solid var(--color-border); border-radius: var(--radius, 8px); }
  .roles-table td { display: block; border: 0 !important; border-radius: 0 !important; padding: 6px 10px; background: transparent !important; }
  .roles-table td.order-col { width: auto; }
  .roles-table td:nth-child(4) { grid-column: 1 / -1; padding-top: 0; }
  .roles-table td[colspan] { grid-column: 1 / -1; }
}
.order-buttons { display: inline-flex; gap: 2px; }
.order-buttons__form { margin: 0; display: inline; }
.order-buttons__btn { width: 26px; height: 24px; padding: 0; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface, #fff); cursor: pointer; font-size: 0.8rem; line-height: 1;
  /* iPhone で押せる方の ↑↓ が見えず空の四角になっていた(2026-11-08 ユーザー)。文字の色をはっきり決める */
  color: var(--color-text, #222020); -webkit-text-fill-color: var(--color-text, #222020); -webkit-appearance: none; appearance: none; }
.order-buttons__btn:hover:not(:disabled) { background: #e9eef7; }
.order-buttons__btn:disabled { opacity: 0.3; cursor: default; }
/* スマホのメールの一覧: 共有の受信箱の対応の札は、件名の行の右に(2026-10-04) */
@media (max-width: 760px) {
  .mail-list tbody tr { grid-template-areas: "check from date" "check subject state" "check account ."; }
  .mail-page .mail-list tbody tr { grid-template-areas: "from date" "subject state" "account ."; }
  .mail-page.is-editing .mail-list tbody tr { grid-template-areas: "check from date" "check subject state" "check account ."; }
  /* まとめたフォルダの「アドレス」は件名の下に小さく(2026-10-10) */
  .mail-list tbody td.mail-list__account { grid-area: account; font-size: 0.72rem; max-width: none; }
  .mail-list tbody td.mail-list__state { grid-area: state; width: auto; justify-self: end; align-self: center; overflow: visible; padding-left: 8px; }
  .mail-list tbody td.mail-list__state:empty { display: none; }
  .mail-list tbody td.board-list__date { justify-self: end; }
}

/* 供物一覧表(2026-10-05 ユーザー。会社の手書き用紙の形: 番号・商品・数・名前・金額。印刷は A4 縦・20行に満たなければ空の行) */
.offering-title { font-size: 1.05rem; margin: 6px 0 2px; }
.offering-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 0.9rem; }
.offering-table th, .offering-table td { border: 1px solid #555; padding: 6px 8px; vertical-align: middle; }
.offering-table thead th { background: #f3f4f7; font-weight: 600; text-align: center; }
.offering-table__no { width: 2.6em; text-align: center; color: #555; }
.offering-table__qty { width: 3.5em; text-align: center; }
.offering-table__amount { width: 8em; text-align: right; white-space: nowrap; }
.offering-table tfoot th { background: #f7f8fa; text-align: left; }
.offering-table tfoot th.offering-table__qty { text-align: center; }
.offering-table tfoot th.offering-table__amount { text-align: right; }
.offering-table__extra td { background: #fbfaf3; }
.offering-table__mark { display: inline-block; padding: 0 6px; border: 1px solid #b9a75a; border-radius: 4px; color: #7a6a20; font-size: 0.78rem; }
.offering-table__del { display: inline; margin-left: 4px; }
.offering-extra-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.offering-extra-form input[type=text] { flex: 1 1 180px; min-width: 0; height: 34px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.offering-extra-form .offering-extra-form__amount { width: 9em; height: 34px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.offering-extra-form .offering-extra-form__qty { width: 5em; height: 34px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.offering-print { max-width: 190mm; margin: 0 auto; padding: 8mm 0; }
/* 「様」は名前のすぐ後ろに(2026-10-13 ユーザー: 右端に離れすぎ)。短い名前でも位置がそろうよう名前の欄は8文字分とる */
.offering-print__title { display: flex; flex-wrap: wrap; column-gap: 1em; white-space: nowrap; font-size: 20pt; font-weight: 500; margin: 0 4mm 6mm; letter-spacing: 0.05em; }
.offering-print__title > span:first-child { min-width: 8em; }
.offering-print .offering-table { font-size: 11pt; }
.offering-print .offering-table td, .offering-print .offering-table th { height: 11mm; border-color: #222; }
.offering-print .offering-table thead { display: table-header-group; }
.offering-print .offering-table tfoot { display: table-row-group; }
.offering-print .offering-table tr { page-break-inside: avoid; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  .offering-print { padding: 0; }
  .offering-table thead th, .offering-table tfoot th, .offering-table__extra td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* 供物一覧表の並び替え(2026-10-05) */
.offering-table__sort { width: 1px; white-space: nowrap; text-align: center; }
.offering-table__grip { display: inline-block; padding: 2px 4px; margin-right: 4px; color: #8a8f99; cursor: grab; user-select: none; letter-spacing: -2px; }
.offering-table tr.is-dragging td { background: #e6efff; opacity: 0.8; }
@media (max-width: 860px) { .offering-table__grip { display: none; } }
@media print { .offering-table__sort { display: none; } }

/* ---------- エリア分析(2026-10-05。area_analysis_controller.js) ---------- */
.area { display: grid; gap: 10px; }
.area__bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.area__cities { flex-wrap: wrap; }
.area__main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.area__panel { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); padding: 10px 12px; min-width: 0; }
.area__h { font-size: 0.95rem; font-weight: 700; margin: 0 0 6px; }
.area__map { height: 480px; border-radius: 6px; }
.area__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 0.75rem; color: var(--color-muted); margin-top: 6px; }
.area__ramp { display: inline-block; width: 110px; height: 9px; border-radius: 3px; vertical-align: middle; margin: 0 4px; }
.area__hall-mark { display: inline-block; width: 10px; height: 10px; background: #b5602c; border: 2px solid #fff; box-shadow: 0 0 0 1px #b5602c; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.area__town { font-size: 1.05rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.area__kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 1px 10px; margin: 6px 0 8px; font-size: 0.8rem; }
.area__kv dt { color: var(--color-muted); }
.area__kv dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.area__pyramid { width: 100%; max-width: 420px; height: auto; display: block; }
.area__pyramid text { fill: var(--color-muted); font-size: 10px; }
.area-flag { display: inline-block; font-size: 0.72rem; padding: 0 7px; border-radius: 8px; background: #e0782f; color: #fff; font-weight: 700; white-space: nowrap; }
.area-table th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.area-table th button.is-sorted::after { content: " ▼"; font-size: 0.7em; }
.area-table th button.is-sorted.is-asc::after { content: " ▲"; }
.area-table tbody tr { cursor: pointer; }
.area-table tbody tr:hover td { background: #f3f6fb; }
.area-table tbody tr.is-selected td { background: #e6eef9; }
.area-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 #3a4870; }
.area__bar-mini { display: inline-block; width: 56px; height: 7px; border-radius: 4px; background: #e3e7ee; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.area__bar-mini i { display: block; height: 100%; }
.area-period { display: inline-flex; align-items: center; gap: 6px; }
.area-period select { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.82rem; }
.area-empty { padding: 16px 4px; }
.area-notes { margin-top: 10px; font-size: 0.8rem; }
.area-notes summary { cursor: pointer; color: var(--color-muted); }
.area-notes ul { margin: 6px 0 0; padding-left: 1.2em; }
.area-steps { margin: 4px 0 8px; padding-left: 1.4em; display: grid; gap: 2px; }
.area-url { user-select: all; }
.area-import { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; margin: 8px 0; }
.area-import .field { margin: 0; }
.area-years { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0; }
.area-year { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.area-settings__inputs { white-space: nowrap; }
.area-settings__year { width: 72px; }
.area-settings__num { width: 96px; }
@media (max-width: 860px) {
  .area__main { grid-template-columns: minmax(0, 1fr); }
  .area__map { height: 360px; }
  .area__kv { grid-template-columns: auto 1fr; }
  .area .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- サイボウズの施行管理の取り込み(2026-10-05) ---------- */
.cfi-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.cfi-tab { border: 1px solid var(--color-border); border-radius: 16px; padding: 3px 12px; font-size: 0.8rem; text-decoration: none; color: var(--color-text); background: var(--color-surface); }
.cfi-tab b { font-variant-numeric: tabular-nums; }
.cfi-tab.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cfi-table td { vertical-align: top; }
.cfi-table td.cfi-link { white-space: normal; }
.cfi-link__box { width: 380px; }
.cfi-search { display: flex; gap: 4px; margin-top: 4px; }
.cfi-search input { width: 180px; padding: 3px 6px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.8rem; }
.cfi-status { display: inline-block; font-size: 0.72rem; padding: 0 7px; border-radius: 8px; background: #e3e7ee; color: #3a4870; font-weight: 700; margin-bottom: 2px; }
.cfi-status--matched, .cfi-status--manual, .cfi-status--created { background: #dff0e2; color: #1c6e3a; }
.cfi-table td.cfi-link, .cfi-table td.cfi-link a, .cfi-table td.cfi-link label { white-space: normal !important; overflow-wrap: anywhere; }
.cfi-status--ambiguous { background: #feecd2; color: #8a5414; }
.cfi-status--none { background: #fbe1e1; color: #a23a3a; }
.cfi-status--applied { background: #3a4870; color: #fff; }
.cfi-choose { display: grid; gap: 2px; margin: 4px 0; font-size: 0.8rem; justify-items: start; }
.cfi-choose label { display: flex; gap: 6px; align-items: baseline; }
.cfi-score { display: block; color: var(--color-text-muted, #777); font-size: 0.72rem; }
.cfi-actions { display: flex; gap: 6px; margin-top: 4px; }
.cfi-marks { white-space: nowrap; }
.cfi-progress { height: 8px; border-radius: 4px; background: #e3e7ee; overflow: hidden; margin: 8px 0; max-width: 520px; }
.cfi-progress i { display: block; height: 100%; width: 0; background: var(--color-primary); transition: width 0.2s; }
.cfi-log { max-height: 160px; overflow-y: auto; margin: 4px 0 0; padding-left: 1.2em; }

/* 運転日報(2026-10-06)。スマホで押しやすい輸送内容のボタン・「今」ボタン・年度のまとめの数字 */
.driving-form__kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.driving-form__kind { display: inline-flex; align-items: center; }
.driving-form__kind input { position: absolute; opacity: 0; pointer-events: none; }
.driving-form__kind span { padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); cursor: pointer; font-size: 0.92rem; }
.driving-form__kind input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
.driving-form__kind input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.driving-form__now { display: flex; gap: 6px; align-items: center; }
.driving-form__now input { flex: 1; min-width: 0; }
.driving-form__toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -4px 0 10px; }
.driving-form__toggle .hint { margin: 0; }
.driving-form__toggle-btn { border: 0; background: none; padding: 4px 0; color: var(--color-primary); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.driving-form__full { border: 0; margin: 0; padding: 0; min-width: 0; }
.driving-form__km { margin: -6px 0 10px; font-weight: 600; color: var(--color-text); }
/* 出庫・迎え先・搬送先・帰庫を左の見出しでそろえる(2026-10-07 ユーザー「出 庫:時刻・メーター」の形) */
.driving-form__leg { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); column-gap: 12px; row-gap: 0; padding: 10px 0 4px; border-top: 1px solid var(--color-border); }
.driving-form__leg > * { grid-column: 2; }
.driving-form__leg-head { grid-column: 1; grid-row: 1 / span 6; align-self: start; margin-top: 2px; padding: 4px 0; border-radius: 6px; background: #eef0f6; color: var(--color-primary-dark); font-weight: 700; font-size: 0.92rem; text-align: center; letter-spacing: 0.1em; }
.driving-form__leg + .driving-form__extra { margin-top: 10px; }
.driving-form__leg .driving-form__toggle { margin: -2px 0 8px; }
@media (max-width: 860px) {
  .driving-form__leg { display: block; }
  .driving-form__leg-head { display: inline-block; margin: 0 0 4px; padding: 3px 14px; }
}
.driving-form__extra { margin: 6px 0 12px; border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 10px; }
.driving-form__extra summary { cursor: pointer; font-size: 0.88rem; color: var(--color-muted); padding: 4px 0; }
.driving-form__extra[open] summary { margin-bottom: 8px; }
.driving-show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .driving-show { grid-template-columns: minmax(0, 1fr); } }
/* 運賃の表は画面の幅に収める(2026-11-14 ユーザー: スマホではみ出す)。項目名は折り返し、金額は1行のまま */
.driving-fare .table { width: 100%; min-width: 0; }
.driving-fare .table td, .driving-fare .table th { white-space: normal; overflow-wrap: anywhere; }
.driving-fare .table .num { white-space: nowrap; }
.driving-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.driving-totals div { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; background: var(--color-surface); }
.driving-totals span { display: block; font-size: 0.75rem; color: var(--color-muted); }
.driving-totals strong { font-size: 1.15rem; }
.driving-report__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.table tr.is-muted td { color: var(--color-muted); }
.driving-cards { display: none; }
@media (max-width: 860px) {
  .driving-table { display: none; }
  .driving-cards { display: flex; flex-direction: column; gap: 8px; }
  .driving-card { display: block; border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; background: var(--color-surface); color: inherit; text-decoration: none; }
  .driving-card__top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 0.9rem; }
  .driving-card__top .badge { margin-left: auto; }
  .driving-card__name { margin: 4px 0 2px; }
}
/* 運転日報の続き(2026-10-07。着地・帰庫をスマホで大きく) */
.driving-step { border: 2px solid var(--color-primary); border-radius: 8px; padding: 12px 14px; margin: 8px 0 16px; background: #f4f7fc; }
.driving-step__title { font-size: 1.05rem; margin: 0 0 8px; }
.driving-step__meter { font-size: 1.4rem !important; font-weight: 700; }
.driving-step__time { margin: 0 0 10px; font-size: 0.85rem; color: var(--color-muted); }
.driving-step__time summary { cursor: pointer; padding: 4px 0; }
.driving-step__btn { width: 100%; padding: 12px; font-size: 1.05rem; }
.driving-road { margin: 0 0 14px; }
.driving-road__item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 2px solid var(--color-primary); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; background: #f4f7fc; color: inherit; text-decoration: none; }
.driving-road__next { white-space: nowrap; color: var(--color-primary); font-weight: 700; }

/* 売上分析の印刷(2026-10-07。今までエクセルで作っていた表の形・A4横・売上区分ごとに改ページ) */
.sales-print { padding: 4mm; }
.sales-print__section { page: sales-print; }
.sales-print__section + .sales-print__section { break-before: page; }
.sales-print__title { font-size: 11pt; margin: 0 0 2mm; }
.sales-print__table { width: 100%; border-collapse: collapse; font-size: 7.5pt; line-height: 1.25; table-layout: fixed; }
.sales-print__table td { overflow-wrap: anywhere; }
.sales-print__table th, .sales-print__table td { border: 0.2mm solid #333; padding: 0.6mm 1.2mm; }
.sales-print__table th { background: #eee; font-weight: 600; font-size: 7pt; text-align: center; overflow-wrap: anywhere; }
.sales-print__table td.num { text-align: right; white-space: nowrap; }
.sales-print__table td.nowrap { white-space: nowrap; }
.sales-print__table thead { display: table-header-group; }
.sales-print__table tr { break-inside: avoid; }
/* 葬儀は列が多く A4横の幅に入りきらず右端が切れたので、文字と余白を少し小さく(2026-10-07 ユーザー) */
.sales-print__section--funeral .sales-print__table { font-size: 6.6pt; }
.sales-print__section--funeral .sales-print__table th { font-size: 6.3pt; }
.sales-print__section--funeral .sales-print__table th, .sales-print__section--funeral .sales-print__table td { padding: 0.5mm 0.8mm; }
/* 供物・法要・その他・お盆は1行に収めて枚数を減らす(2026-11-09 ユーザー: 供物が19枚になった・名札などを折り返さず1列で・法要も2段にならないように)。はみ出す分は切る */
.sales-print__section--compact .sales-print__table { font-size: 7pt; line-height: 1.15; }
.sales-print__section--compact .sales-print__table th { font-size: 6.5pt; }
.sales-print__section--compact .sales-print__table th, .sales-print__section--compact .sales-print__table td { padding: 0.35mm 0.8mm; }
.sales-print__section--compact .sales-print__table td { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.sales-print__subtotal td { font-weight: 700; background: #f6f6f6; }
.sales-print__grand td { font-weight: 700; border-top: 0.5mm solid #333; background: #ececec; }
.sales-print__minus { color: #c0262d; }
@media print {
  @page sales-print { size: A4 landscape; margin: 8mm; }
  /* 表の左右の線がページの端で切れないよう内側に(2026-10-07 ユーザー: ブラウザの「印刷する」で左の線が出なかった) */
  .sales-print { padding: 0 1.5mm; }
  .sales-print__table { width: calc(100% - 1mm); margin-left: 0.5mm; }
}

/* 予定の添付(チラシ・案内など。2026-10-07) */
.schedule-files { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.schedule-files__photo { display: block; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; background: #fff; }
.schedule-files__photo img { display: block; max-width: 220px; max-height: 300px; object-fit: contain; }
.schedule-files__doc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 6px; text-decoration: none; color: var(--color-text); background: #fff; }
.schedule-files__doc .line-icon { width: 16px; height: 16px; }
.schedule-item__clip { display: inline-flex; margin-left: 2px; vertical-align: -2px; opacity: 0.75; }
.schedule-item__clip .line-icon { width: 12px; height: 12px; }
.mail-folders__sep { border: 0; border-top: 1px solid var(--color-border); margin: 8px 6px; }

/* 画面の上を歩く小さな生き物(2026-10-07 ユーザー。critters_controller.js)。パソコンは一覧の枠の上のすき間、
   スマホは上にすき間が無いので下の帯の上を歩く。押せるのは生き物だけ(まわりの画面の操作はじゃましない) */
.app-shell .page { position: relative; }
.critters { position: absolute; left: 0; right: 0; top: 0; height: 37px; pointer-events: none; overflow: hidden; z-index: 5; }
/* 2026-10-23 ユーザー: ほかの画面で頭や耳が切れるキャラがいた(帯が画面の一番上より 12px 上にはみ出していた)。
   帯を画面の中に入れ、そのぶん生き物が出る画面だけ上のすき間を 10px 広げる(足もとは今までどおり枠の上のふち) */
.app-shell .page:has(> .critters) { padding-top: 36px; } /* 2026-10-23 コウモリ1.3倍(Codex v76)が入るよう 34→36 */
/* スマホはドット絵が下の帯の上を歩く(position: fixed)ので、上の余白はいつもどおり。メールの画面(上に固定の帯)は 0
   (2026-10-25 ユーザーの写真: 上の帯の下に 36px の空きができていた。この決まりが後ろにあって 3028 行の 0 に勝っていた) */
@media (max-width: 860px) {
  .app-shell .page:has(> .critters) { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .app-shell .page:has(.m-head) { padding-top: 0; }
  /* 2026-10-27 ユーザー(iPhone): ホームと入金カレンダーのタイトルの上半分がかすむ = iPhone(iOS 26)の Safari が画面の一番上に
     かけるぼかしの範囲にタイトルがかかっていた。ユーザー「一番上の文字だけ下げられないか」→ 中身の始まりは変えず、
     見出しの文字だけを立体アイコンの下の端にそろえて下げる(アイコンの方が文字より高いので、行の高さも下の中身の位置も変わらない) */
  body[data-title-icon] main.page--edge-gap h1.page-title::before { vertical-align: text-bottom; margin-bottom: -3px; }
  /* 2026-10-27 ユーザー「前よりはいいけど、まだちょっとかすむ」→ 中身の始まりも 8px だけ下げる */
  .app-shell .page.page--edge-gap, .app-shell .page.page--edge-gap:has(> .critters) { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
}
.critter { position: absolute; left: 0; bottom: -1px; will-change: translate; pointer-events: auto; cursor: pointer; line-height: 0; transition: transform 0.12s ease; }
.critter canvas { display: block; image-rendering: pixelated; }
.critter.is-jump { transform: translateY(-9px) !important; }
.critter__say {
  position: absolute; bottom: 2px; left: 100%; margin-left: 4px; padding: 2px 7px; border-radius: 9px; white-space: nowrap;
  background: #fff; border: 1px solid #d9dce3; color: #39404f; font-size: 11px; line-height: 1.5; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
@media (max-width: 860px) {
  .critters { position: fixed; top: auto; left: 18px; right: 18px; bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 4px); height: 40px; z-index: 948; }
}
@media print { .critters { display: none !important; } }
/* イルカ・モグラの場面(2026-11-09。critters_controller.js の playScene)。細い帯の中・ホームの背景の中に重ねる */
.critters-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
@media print { .critters-scene { display: none; } }

/* ファイルを引っぱって落とせる所(2026-10-08 ユーザー。file_drop_controller.js)。ふだんは何も出さず、ファイルを持ってきたときだけ点線の枠と案内 */
.is-file-over { position: relative; outline: 2px dashed var(--frame); outline-offset: 6px; border-radius: 8px; background: rgba(47, 95, 147, 0.05); }
.is-file-over::after {
  content: "Drag & Drop"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  padding: 10px 18px; border-radius: 10px; background: var(--frame); color: #fff; font-weight: 700; font-size: 0.95rem; box-shadow: 0 6px 20px rgba(17, 57, 97, 0.25);
}
.file-drop__hint { display: inline-block; align-self: flex-start; width: max-content; margin: 4px 0 0 0; padding: 1px 8px; border: 1px dashed var(--color-border); border-radius: 8px; font-size: 0.72rem; color: var(--color-muted); white-space: nowrap; vertical-align: middle; }
@media (hover: none), (pointer: coarse) { .file-drop__hint { display: none; } }
/* 選んだファイルの一覧(2026-11-09 ユーザー: 何回も選んで足す・1つずつ外す。file_drop_controller.js) */
.file-picked { list-style: none; margin: 6px 0 0; padding: 0; flex-basis: 100%; width: 100%; }
.file-picked li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 2px 0; font-size: 0.9rem; }
.file-picked__name { overflow-wrap: anywhere; }
.file-picked__remove { border: none; background: none; padding: 0 2px; color: #b42318; cursor: pointer; font-size: 0.85rem; text-decoration: underline; }

/* ファイル管理の一覧: その場で見る(目のアイコン)と中のフォルダの行(2026-10-09 ユーザー) */
.file-list .file-list__eye-col { width: 34px; padding-right: 0; text-align: center; }
.file-list__eye { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--frame); cursor: pointer; }
.file-list__eye:hover, .file-list__eye:focus-visible { border-color: var(--frame); background: #fff; }
.file-list__eye .line-icon, .file-list__folder-icon { width: 20px; height: 20px; }
.file-list__folder-icon { color: #c89b2c; vertical-align: middle; }
.file-list__folder .file-list__title { font-weight: 600; }
.file-preview { width: min(1100px, 94vw); height: min(90vh, 1000px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 20px 60px rgba(17, 57, 97, 0.3); }
.file-preview[open] { display: flex; flex-direction: column; }
.file-preview::backdrop { background: rgba(17, 30, 50, 0.55); }
.file-preview__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--color-border); background: var(--band); }
.file-preview__head strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-primary); }
.file-preview__close { border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--color-muted); padding: 2px 6px; }
.file-preview__body { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f4f6f9; }
.file-preview__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.file-preview__body img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* メールの設定: アドレスの並びの ↑↓(2026-10-10) */
.mail-account__move { display: inline-flex; gap: 4px; }
.mail-account__move form { display: inline; }
.upload-limit__over { color: var(--color-danger); font-weight: 600; }

/* パソコンの左のメニュー: 大きなまとまりは押すと右に中身を出す(2026-10-11 ユーザー。sidebar_group_controller.js が位置を決める)。スマホは今までどおり下に開く */
@media (min-width: 861px) {
  .app-shell .sidebar { z-index: 40; } /* 右に出す中身が本文の下に隠れないように(固定の位置のメニューは自分の重なりの中でしか前に出られない) */
  .app-shell .sidebar__group > summary::after { transform: none !important; }
  .app-shell .sidebar__group[open] > summary { background: var(--side-hover); }
  .app-shell .sidebar__group--current > summary { box-shadow: inset 3px 0 0 #fff; background: rgba(255, 255, 255, 0.08); }
  /* 窓の色はメニューと同じ紺(2026-10-11 ユーザー: 白・ふち付き・明るい紺と見比べて B を選んだ) */
  .app-shell .sidebar__group-body {
    position: fixed; z-index: 60; min-width: 230px; max-width: 300px; max-height: calc(100vh - 24px); overflow-y: auto;
    margin: 0; padding: 8px; background: var(--side-bg); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }
  .app-shell .sidebar__group-body a { color: #fff; opacity: 1; padding: 7px 12px; font-size: 0.92rem; border-radius: 6px; }
  .app-shell .sidebar__group-body a:hover { background: rgba(255, 255, 255, 0.12); }
  .app-shell .sidebar__group-body a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); font-weight: 600; }
  .app-shell .sidebar__group-body .sidebar__sub > summary { color: #fff; opacity: 0.8; }
  .app-shell .sidebar__group-body .sidebar__sub > summary:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
  .app-shell .sidebar__group-body .sidebar__sub-body { border-left-color: rgba(255, 255, 255, 0.3); }
}
/* ワークフローの重なりの候補(2026-10-11) */
.wf-dup { margin: 14px 0 6px; }
.wf-dup__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.98rem; margin: 0 0 4px; }
.wf-dup__table td, .wf-dup__table th { padding: 5px 8px; }
.wf-dup__table { min-width: 0; }
.wf-dup__actions { text-align: right; white-space: nowrap; }
.wf-dup__actions form { display: inline; }
.wf-icon--sm { width: 28px; height: 28px; border-radius: 8px; }
.wf-icon--sm svg { width: 16px; height: 16px; }
.wf-dup__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wf-dup__bar form { margin: 0; }

/* 左のメニューと下の帯のアイコン: 色の四角に白い線(2026-10-12 ユーザー: 案B。ApplicationHelper::ICON_TILES)。
   下の帯で開いている画面は、白く塗ったアイコン+同じ色の輪+名前をその色に */
/* 13色とも色の系統が重ならないように(2026-10-12 ユーザー: 左のメニューと下の帯で色が被らないように。
   前はホームと掲示板がオレンジ、顧客とメッセージが緑、事前相談と申請が紫、Settings とメニューが灰色で似ていた) */
.icon-tile--home { --tile: #f2994a; }         /* オレンジ */
.icon-tile--dashboard { --tile: #4fc3f7; }    /* 水色(アプリ管理) */
.icon-tile--customers { --tile: #66bb6a; }    /* 緑 */
.icon-tile--billing { --tile: #ffca28; }      /* 黄色 */
.icon-tile--consultation { --tile: #ba68c8; } /* 紫 */
.icon-tile--chart { --tile: #ef5350; }        /* 赤(Analytics) */
.icon-tile--admin_docs { --tile: #5e35b1; }   /* 濃い紫(管理者用資料。2026-10-21。事前相談の紫より青く濃い) */
.icon-tile--admin { --tile: #90a4ae; }        /* 灰色(Settings) */
.icon-tile--calendar { --tile: #3f51b5; }     /* 藍(スケジュール) */
.icon-tile--message { --tile: #26a69a; }      /* 青緑(メッセージ) */
.icon-tile--board { --tile: #ec407a; }        /* ピンク(掲示板) */
.icon-tile--workflow { --tile: #8d6e63; }     /* 茶色(申請) */
.icon-tile--memo { --tile: #c0ca33; }         /* 黄緑(メモ。顧客の緑・請求の黄色の間) */
.icon-tile--menu { --tile: #113961; }         /* 紺(メニュー。会社の色) */
/* 2026-10-12 ユーザー: 四角の大きさはそのままで、中の白い線のアイコンを大きく(四角との間のすき間を狭くした) */
.sidebar__top-link > .icon-tile, .sidebar__group > summary > .icon-tile {
  width: 30px; height: 30px; flex: 0 0 30px; padding: 3px; box-sizing: border-box; border-radius: 8px;
  background: var(--tile); color: #fff; stroke: #fff;
}
.tab-bar__item > .icon-tile { padding: 3px; box-sizing: border-box; border-radius: 9px; background: var(--tile); color: #fff; }
.tab-bar__item > .icon-tile { margin-bottom: 5px; }
.tab-bar__item.is-active > .icon-tile { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3.5px var(--tile); }
.tab-bar__item.is-active > .icon-tile [stroke="#fff"] { stroke: var(--tile); }
.tab-bar__item.is-active[class*="icon-tile--"] { color: var(--tile); }
/* マウスを重ねると少し浮いて、その色でふんわり光る。押した瞬間は少し沈む(2026-10-12 ユーザー)。
   スマホは指を離したあとも「重ねた」ままになるので、浮くのはマウスのある端末だけ(押した瞬間の沈みはスマホも) */
.sidebar__top-link > .icon-tile, .sidebar__group > summary > .icon-tile, .tab-bar__item > .icon-tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) {
  .sidebar__top-link:hover > .icon-tile, .sidebar__group > summary:hover > .icon-tile, .tab-bar__item:hover > .icon-tile {
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--tile) 55%, transparent), 0 0 14px color-mix(in srgb, var(--tile) 60%, transparent);
  }
  .tab-bar__item.is-active:hover > .icon-tile {
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3.5px var(--tile), 0 4px 12px color-mix(in srgb, var(--tile) 55%, transparent);
  }
}
.sidebar__top-link:active > .icon-tile, .sidebar__group > summary:active > .icon-tile, .tab-bar__item:active > .icon-tile {
  transform: scale(0.93); box-shadow: 0 0 10px color-mix(in srgb, var(--tile) 60%, transparent); transition-duration: 0.05s;
}
@media (max-width: 860px) {
  .sidebar .sidebar__top-link > .icon-tile, .sidebar .sidebar__group > summary > .icon-tile { width: 34px; height: 34px; flex-basis: 34px; padding: 3.5px; }
  .tab-bar__item > .icon-tile { width: 34px; height: 34px; padding: 3.5px; }
}
@media (max-width: 340px) {
  .tab-bar__item > .icon-tile { width: 30px; height: 30px; padding: 3px; }
}

/* 残業・営業手当の集計の印刷(2026-10-12 ユーザー: ボタンが出ない・右が切れない形で。A4 縦) */
.sum-print { max-width: 190mm; margin: 0 auto; padding: 8mm 6mm; background: #fff; color: #222; font-size: 9.5pt; }
.sum-print__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; margin-bottom: 4mm; border-bottom: 0.5mm solid #333; padding-bottom: 2mm; }
.sum-print__title { font-size: 15pt; margin: 0; }
.sum-print__meta { font-size: 8.5pt; color: #555; text-align: right; line-height: 1.5; }
.sum-print__section { font-size: 11pt; margin: 6mm 0 2mm; }
.sum-print__table { width: 100%; border-collapse: collapse; }
.sum-print__table th, .sum-print__table td { border: 0.3mm solid #888; padding: 1.2mm 1.8mm; text-align: left; vertical-align: top; }
.sum-print__table th { background: #f0f0f0; font-weight: 600; white-space: nowrap; }
.sum-print__table .num { text-align: right; }
.sum-print__table .nowrap { white-space: nowrap; }
.sum-print__table--detail { font-size: 8.5pt; }
.sum-print__table thead { display: table-header-group; }
.sum-print__table tr { break-inside: avoid; page-break-inside: avoid; }
.sum-print__subtotal td { font-weight: 700; background: #f6f6f6; }
.sum-print__grand td { font-weight: 700; border-top: 0.5mm solid #333; background: #ececec; }
.sum-print__note { font-size: 8pt; color: #555; margin: 1.5mm 0 0; }
@media print {
  .sum-print { padding: 0 1.5mm; max-width: none; }
  .sum-print__table { width: calc(100% - 1mm); margin-left: 0.5mm; }
  .sum-print__table th, .sum-print__subtotal td, .sum-print__grand td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* スマホは絞り込みの欄が狭いので、名前変更用の欄だけ次の行に広く */
@media (max-width: 860px) {
  .modal-box--panel .modal-category-selects { flex-wrap: wrap; }
  .modal-category-selects #modal-name-change-select { flex: 1 1 100%; }
}
/* 商品検索の窓: パソコンは行の間を少し広く(2026-10-12 ユーザー: ノートで13件ほど入れば十分) */
@media (min-width: 861px) {
  .modal-box--panel .modal-product-item { padding: 7px 8px; }
}

/* 顧客登録で登録を押して止まったときの知らせ(customer_form_controller。2026-10-13) */
.form-invalid-notice { margin: 12px 0 0; padding: 8px 12px; border: 1px solid #e0a3a3; border-radius: var(--radius); background: #fdf1f1; color: #a12a2a; font-size: 0.9rem; }

/* ワークフローの「再利用する」で開いたときの案内(2026-10-14) */
.wf-reuse-note { background: #fff4dc; border: 1px solid #e0a43a; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 0.92rem; line-height: 1.6; }

/* 請求書・見積書を消すときの理由の窓(2026-10-14) */
.delete-reason { border: 1px solid var(--color-border); border-radius: 8px; padding: 18px 20px; width: min(420px, calc(100vw - 32px)); box-sizing: border-box; }
.delete-reason::backdrop { background: rgba(17, 24, 39, 0.45); }
.delete-reason__title { margin: 0 0 8px; font-size: 1.1rem; color: var(--color-primary); }
.delete-reason__message { margin: 0 0 10px; white-space: pre-line; }
.delete-reason__choices { border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.delete-reason__choices label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.delete-reason__detail { width: 100%; box-sizing: border-box; }
.delete-reason__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
/* 銀行明細の取り込みの削除の窓(2026-10-18) */
.bank-import-delete { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
dialog.delete-reason { white-space: normal; text-align: left; font-weight: normal; } /* 表の中に置いても折り返す */

/* メールの振り分けの条件(2026-10-15 サイボウズの「振り分け保存」の形) */
.mail-filter-form { max-width: 820px; }
.mail-filter-conditions { display: grid; gap: 6px; margin-bottom: 6px; }
.mail-filter-condition { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mail-filter-condition[hidden] { display: none; }
.mail-filter-condition input[type=text] { flex: 1 1 260px; min-width: 0; }
.mail-filter-condition select { width: auto; }
.table.mail-rules { min-width: 0; }
.mail-rules td { white-space: normal; overflow-wrap: anywhere; }
.mail-rules td:first-child, .mail-rules td:last-child { white-space: nowrap; }
/* フォルダの名前を変える(2026-10-15) */
.mail-folder-rename { display: inline-block; }
.mail-folder-rename summary { list-style: none; cursor: pointer; }
.mail-folder-rename summary::-webkit-details-marker { display: none; }
.mail-folder-rename[open] { display: block; flex-basis: 100%; }
.mail-folder-rename .mail-inline-form { margin: 6px 0 4px; }
.mail-folder-admin li { flex-wrap: wrap; }
.mail-folder-admin__actions { flex-wrap: wrap; justify-content: flex-end; }

/* 葬儀受注書の写真から顧客登録(2026-10-15) */
.order-form-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.order-form-photo { margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--color-border, #c9d2de); border-radius: 8px; background: #fafbfd; }
.order-form-photo summary { cursor: pointer; font-weight: 600; }
.order-form-photo__image { display: block; max-width: 100%; max-height: 50vh; margin: 8px auto 0; border: 1px solid var(--color-border, #c9d2de); }

/* 受注書が2枚以上あるときの「最新」「古い受注書」の印(2026-10-15) */
.doc-version { position: absolute; z-index: 1; left: 2px; top: 2px; padding: 1px 6px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; color: #fff; pointer-events: none; }
.doc-version--new { background: #1f7a3a; }
.doc-version--old { background: #8a8580; }
.doc-thumb--old img { opacity: 0.55; filter: grayscale(0.6); }
.lightbox__badge { display: inline-block; align-self: flex-start; margin: 2px 0; padding: 1px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; color: #fff; vertical-align: middle; }
.lightbox__badge--new { background: #1f7a3a; }
.lightbox__badge--old { background: #b3261e; }

/* ホームの自分の1週間の予定(2026-10-16。パソコンだけ。スマホは「今日・明日の予定」の欄) */
.home-week { margin: 0 0 14px; padding: 0 16px 14px; }
.home-week__table { min-width: 0; }
.home-week__table .schedule-week__name { width: 110px; }
.home-week__table tbody td { height: 96px; }
.home-week__table tbody tr.is-empty td { height: 34px; }
.home-week__title { flex-wrap: wrap; }
.home-week__views { margin-left: auto; }
.home-week__rows { display: inline-flex; margin: 0; }
.home-week__rows select { width: auto; padding: 2px 28px 2px 8px; font-size: 0.85rem; min-height: 0; }
.home-week__views .btn { min-width: 3.2em; }
/* 前週・前日・今日・翌日・翌週(2026-10-29 ユーザー: サイボウズのようにその場で切り替える) */
.home-week__nav .btn { min-width: 0; padding-left: 8px; padding-right: 8px; font-weight: 500; }
.home-week__nav .btn.is-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
turbo-frame#home-week { display: block; }
turbo-frame#home-week[busy] .home-week__table { opacity: 0.55; transition: opacity 0.15s; }
/* 年・月の切り替えの段(2026-10-21 ユーザー: サイボウズのように表の下で) */
.month-jump { margin: 8px 0 2px; }
.month-jump__year { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.month-jump__year[hidden] { display: none; }
.month-jump__months { display: flex; flex-wrap: wrap; gap: 2px 4px; flex: 1; justify-content: center; }
.month-jump__month { padding: 2px 8px; border-radius: 6px; color: var(--frame); }
.month-jump__month.is-current { background: var(--color-primary); color: #fff; text-decoration: none; }
.month-jump__step { background: none; border: 0; color: var(--frame); text-decoration: underline; cursor: pointer; font: inherit; padding: 2px 4px; min-width: 5.5em; }
span.month-jump__step { cursor: default; } /* 予定が無い行は低く(2026-10-21 ユーザー) */
@media (min-width: 861px) { .home-card--sp-only { display: none; } }
@media (max-width: 860px) { .home-week { display: none; } }

/* 見積書・請求書の税率ごとの内訳〜印鑑の枠をページの境目で切らない(2026-10-16) */
.doc-closing, .doc-closing .doc-framed-box, .doc-closing .doc-signature-box, .doc-closing .doc-seal-boxes { break-inside: avoid; page-break-inside: avoid; }
@media print { .doc-closing .table-wrap { overflow: visible; } }

/* 施行一覧に薄いグレーの縦線(2026-10-16 ユーザー: 列の区切りが分かりやすいように) */
.case-list th + th, .case-list td + td { border-left: 1px solid #dfe3ea; }

/* スケジュールの表の上のタブ(人の予定 / 当社の会館 / 公営斎場など。2026-10-16) */
.schedule-tabs { margin: 10px 0 8px; }

/* メッセージの宛先の「全員を選ぶ」(2026-10-16) */
.message-recipients__all { font-weight: 600; padding-bottom: 4px; border-bottom: 1px dashed var(--color-border); margin-bottom: 4px; }

/* 会社情報のドット絵モーションの出やすさ(2026-10-16) */
.critter-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin: 4px 0 6px; }
.critter-levels__row { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.critter-levels__name { flex: 1; }
.critter-levels select { width: auto; min-width: 110px; }
.critter-levels__words { width: 100%; margin: -2px 0 6px; font-size: 0.9rem; }
#company_setting_critter_interval { max-width: 320px; }
.critter-levels__group { font-weight: 600; margin-top: 10px; padding-bottom: 2px; border-bottom: 1px solid var(--color-border); }

/* 印刷の画面は色をそのまま刷る(2026-10-16 ユーザー: Edge で請求書の色が出ない。Edge は「背景のグラフィック」が初めは切れていて、
   表の見出しや合計の枠の色が消える。Chrome・Edge とも、この指定があれば設定にかかわらず色を刷る) */
.print-body, .print-body * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* 安置室の帯のメモ(2026-10-16) */
.mort-bar__note { opacity: 0.85; font-weight: normal; margin-left: 4px; padding-left: 6px; border-left: 1px solid rgba(255,255,255,0.5); }

/* 地図(Leaflet)は中で z-index 400〜1000 を使うので、地図の中に閉じ込める(左のメニューの右に出す窓が地図の後ろに隠れていた。2026-10-16 ユーザー) */
.leaflet-container { isolation: isolate; z-index: 0; }
.area__sub { margin-left: 2px; color: var(--color-muted); font-size: 0.85em; } /* エリア分析の表: 65歳以上の人数の横の割合 */
/* 葬儀の請求書: 施行担当者を自分に変えるか(2026-10-16) */
.case-staff-ask { margin: 12px 0; padding: 10px 14px; border: 1px solid #e3b65c; background: #fff8e8; border-radius: 8px; }
.case-staff-ask p { margin: 0 0 6px; }
.case-staff-ask__choices { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.case-staff-ask__choices label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }

/* 売上分析の商品の分析(2026-10-18): 大分類ごとの表の列の幅をそろえる */
.product-sales { table-layout: fixed; width: 100%; }
/* スマホは列を詰めずに横に動かす(2026-11-08 ユーザー: 商品名が1文字ずつ縦に並んでいた) */
@media (max-width: 860px) { .product-sales { table-layout: auto; min-width: max-content; } .product-sales td:nth-child(2) { white-space: nowrap; } }
.product-sales td:nth-child(2) { overflow-wrap: anywhere; }
/* 商品の分析の印刷(2026-10-18。A4たて・大分類ごとの表) */
.product-print { padding: 4mm; }
.product-print__title { font-size: 12pt; margin: 0 0 1mm; }
.product-print__note { font-size: 8pt; margin: 0 0 3mm; color: #444; }
.product-print__table { font-size: 8.5pt; margin-bottom: 4mm; }
.product-print__table th.product-print__cat { text-align: left; font-size: 9pt; background: #dfe6ef; }
@media print {
  @page product-print { size: A4 portrait; margin: 10mm; }
  .product-print { page: product-print; padding: 0 1.5mm; }
}
/* メールの印刷(2026-10-19。A4たて・本文は文字) */
.mail-print { padding: 6mm; font-size: 10.5pt; color: #222; }
.mail-print__subject { font-size: 14pt; margin: 0 0 3mm; }
.mail-print__head { border-collapse: collapse; width: 100%; margin-bottom: 5mm; font-size: 9.5pt; }
.mail-print__head th { width: 18mm; text-align: left; vertical-align: top; padding: 1mm 2mm 1mm 0; color: #555; font-weight: 600; }
.mail-print__head td { padding: 1mm 0; border-bottom: 0.2mm solid #ccc; overflow-wrap: anywhere; }
.mail-print__body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 10.5pt; line-height: 1.7; margin: 0; }
@media print { @page mail-print { size: A4 portrait; margin: 12mm; } .mail-print { page: mail-print; padding: 0; } }


/* 部門別月次損益計算書(2026-10-20。冊子と同じ色分け。単位は千円・マイナスは赤い▲) */
.pl-sheet { margin: 14px 0 22px; }
.pl-sheet__head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 4px; }
.pl-table { font-size: 0.82rem; min-width: 900px; }
.pl-table th, .pl-table td { padding: 3px 6px; border: 1px solid var(--color-border); white-space: nowrap; }
.pl-table thead th { text-align: center; }
.pl-table td.lbl { text-align: center; }
.pl-table td.lbl--group { width: 28px; font-weight: 600; line-height: 1.35; padding: 0; white-space: normal; }
.pl-table td.lbl--group-sales { background: #fbefe6; }
.pl-table td.lbl--group-cost { background: #e3f1f6; }
.pl-table td.lbl--sub { width: 40px; }
.pl-table td.lbl--name { min-width: 110px; }
.pl-table td.lbl--total { text-align: right; letter-spacing: 3px; padding-right: 14px; }
.pl-table td.lbl--wide { text-align: left; }
.pl-table td.lbl--even { text-align: justify; text-align-last: justify; padding: 3px 14px; min-width: 170px; }
.pl-table tr.pl-gap td { border: none; height: 8px; padding: 0; background: none; }
.pl-table th.is-current, .pl-table td.is-current { border-left: 2px solid #d62f1f; }
.pl-table th.is-current-end, .pl-table td.is-current-end { border-right: 2px solid #d62f1f; }
.pl-table__col.is-total { background: #e6eef8; }
.pl-table td.lbl--flower { background: #f7c6e3; }
.pl-table td.lbl--food { background: #c9f0f5; }
.pl-table td.lbl--gift { background: #d8f2b5; }
.pl-table td.lbl--other { background: #fff6c4; }
.pl-row--subtotal td, .pl-row--total td { background: #fbefe6; font-weight: 600; }
.pl-row--grand td { background: #eef3fa; font-weight: 700; }
.pl-row--result td { background: #fff36b; font-weight: 700; }
/* 冊子の PDF と同じ色分けを、画面では薄めに(2026-11-12 ユーザー: PDF みたいに色分け・薄めの色で)。
   ガラスのデザイン(表の中は白)・ノーマルの1行おきの色に負けないよう、少し強めの書き方にしている(ダークは今までどおり) */
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--group-sales { background: #fdf1e8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--group-cost { background: #e8f4f8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--flower { background: #fbe1f0; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--food { background: #dcf5f8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--gift { background: #e9f7d6; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.lbl--other { background: #fffadb; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--subtotal td,
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--total td { background: #fdf3ea; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--sales_a td { background: #f9e9e8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--cost_b td { background: #e7f3f8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--gross_profit td { background: #eef5e4; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--sga_total td { background: #fdf1e8; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr.pl-row--result td { background: #fff7bf; }
html:not(.theme-dark) body .app-shell .pl-sheet .pl-table tbody tr td.pl-blank { background: #e4e4e4; }
.pl-blank { background: #d9d9d9 !important; }
.pl-neg { color: #d62f1f; }
.board-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* 損益の月の入力・調整(2026-10-20) */
.pl-input-grid { margin-top: 12px; }
.pl-input-table { width: auto; }
.pl-input-section__title { font-size: 1rem; margin: 12px 0 4px; }
.pl-input-section .hint { margin: 0 0 4px; }
.pl-input-table th[scope="row"] { font-weight: 500; white-space: nowrap; }
.pl-input-table td.pl-input-cell { padding: 2px 4px; }
.pl-input { width: 130px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 6px; }
.pl-input-cell--manual { background: #fff6c4; }
.pl-input-cell--mf { background: #e6eef8; }
.pl-input-cell--uriage, .pl-input-cell--honbu, .pl-input-cell--kaki { background: #e3f4e6; }
.pl-input-cell--sheet { background: #f3eefa; }
.pl-input-legend { display: inline-block; padding: 0 6px; border: 1px solid var(--color-border); border-radius: 3px; }
/* 合計(2026-11-12 ユーザー)。打つたびにその場で出す */
.pl-input-table .pl-input-total, .pl-input-table tr.pl-input-total td, .pl-input-table tr.pl-input-total th { font-weight: 700; background: #eef3fa; font-variant-numeric: tabular-nums; padding: 3px 8px; min-width: 7em; text-align: right; }
.pl-input-table tr.pl-input-total th { text-align: left; }
/* 合計の列が画面に収まるように、合計を出す表の欄は少し細く */
.pl-input-table[data-pl-input-sum] .pl-input { width: 108px; }
.pl-adjust-table .pl-input { max-width: 140px; }
.pl-adjust-table__head th { background: var(--band, #edf0f5); text-align: left; }
.pl-adjust-table tr.is-adjusted td { background: #fff6c4; }
tr.is-changed td { background: #fff6c4; }
.pl-mapping-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.pl-import { margin-top: 18px; }
/* 損益計算書の上の列: 月・単位と読み込み2つ(2026-11-12 ユーザー) */
.pl-toolbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 12px; }
.pl-toolbar > form { margin: 0; }
.pl-toolbar__import { flex: 0 1 auto; }
.pl-toolbar__file { display: flex; align-items: center; gap: 6px; }
.pl-toolbar__file input[type=file] { max-width: 15em; font-size: 0.85rem; }

/* プラン別の件数・担当者別の成績の印刷(2026-10-21 ユーザー。2026-10-22 今の Excel の形に。plan_counts/print・staff_performances/print)。A4よこ */
@page plan-print { size: A4 landscape; margin: 8mm; }
.plan-print { page: plan-print; color: #000; }
.plan-print__top { display: flex; align-items: baseline; gap: 6mm; margin: 0 0 2mm; }
.plan-print__title { font-size: 13pt; margin: 0; }
.plan-print__period { font-size: 10pt; }
.plan-print__date { font-size: 8pt; margin-left: auto; }
.plan-print__note { font-size: 8pt; margin: 2mm 0 0; }
.plan-print__table { font-size: 8pt; }
.plan-print__table th, .plan-print__table td { padding: 0.5mm 1mm; }
.plan-print__g { width: 18mm; }
.plan-print__n { width: 26mm; }
.plan-print__group { writing-mode: vertical-rl; letter-spacing: 1mm; background: #f4f4f4; }
.plan-print__name { white-space: nowrap; }
.plan-print__grid tr.is-group-start > * { border-top: 0.45mm solid #000; }
.plan-print__grid .is-sum { background: #f2f2f2; }
.plan-print__total > * { font-weight: 700; border-top: 0.5mm solid #000; background: #ececec; }
.staff-print__page + .staff-print__page { break-before: page; }
.staff-print__table { margin-bottom: 3mm; font-size: 7.5pt; }
.staff-print__table th { font-size: 6.6pt; }
.staff-print__name { width: 24mm; }
.staff-print__table th.staff-print__head { font-size: 9pt; }
.staff-print__table td:first-child { white-space: nowrap; }

/* 損益の補足資料(2026-10-22。supplements)。画面と印刷(A4よこ1枚) */
.supplement__head { font-size: 1rem; margin: 18px 0 6px; }
.supplement__bands { margin-top: 10px; }
.supplement-print .supplement__wrap { display: flex; gap: 2mm; align-items: flex-start; }
.supplement-print .supplement__wrap > .table-wrap { flex: 1 1 auto; min-width: 0; }
.supplement-print .supplement__bands { margin-top: 0; }
.supplement-print .supplement__wrap > .supplement__bands-wrap { flex: none; }
.supplement__table th, .supplement__table td { text-align: center; white-space: nowrap; }
.supplement__table td.num { text-align: right; }
.supplement__table .supplement__row { text-align: left; font-weight: 600; }
.supplement__table .is-sum { background: var(--band, #edf0f5); }
.supplement__total > * { font-weight: 700; border-top: 2px solid var(--color-border); }
.supplement__bands { width: auto !important; flex: none; }
.supplement__note { font-size: 0.85rem; margin: 4px 0 0; }
.supplement-print .supplement__head { font-size: 10pt; margin: 2mm 0 1mm; }
.supplement-print .supplement__table { font-size: 6pt; table-layout: auto; width: 100%; }
.supplement-print .supplement__table th { font-size: 5.8pt; }
.supplement-print .supplement__table th, .supplement-print .supplement__table td { padding: 0.15mm 0.6mm; }
.supplement-print .supplement__bands { width: auto; }
.supplement-print .supplement__table .is-sum { background: #f2f2f2; }
.supplement-print .supplement__total > * { border-top: 0.4mm solid #000; }
.supplement-print .supplement__note { font-size: 7pt; }
.supplement-print .table-wrap { overflow: visible; }
/* 2026-10-27 ユーザー: 2列の格子だと表が横に切れ、横スクロールのバー(sticky-hscroll。表のすぐ後ろに入る)が右の列に出ていた → 1列に縦に並べ、表を横いっぱいに出す */
.share__grid { display: flex; flex-direction: column; gap: 12px; }
.share__table .share__city { font-size: 1rem; }
@page share-print { size: A4 landscape; margin: 10mm; } /* 2026-11-13 ユーザー: たてでなく横に */
.share-print { page: share-print; color: #000; }
.share-print .supplement__head { font-size: 12pt; margin: 0 0 1.5mm; }
/* よこにしたので高さが足りない(3市 × 12か月 + 計)。行を少し詰めて1枚に(2026-11-13) */
.share-print .share__table { font-size: 7.2pt; line-height: 1.12; table-layout: fixed; width: calc(100% - 1mm); margin: 0 0 2mm 0.5mm; }
.share-print .share__table th, .share-print .share__table td { padding: 0.35mm 1mm; }
.share-print .share__table .share__city { font-size: 10pt; width: 13mm; }
.share-print .supplement__total > * { border-top: 0.4mm solid #000; }
.sales-supp td.is-off { background: #d9d9d9; }
.sales-supp .sales-supp__dept { line-height: 1.15; }
.sales-supp .sales-supp__group { text-align: left; }
.sales-supp tr.is-group-start > * { border-top: 2px solid #555; }
.supplement-print .sales-supp { font-size: 5.2pt; table-layout: fixed; width: calc(100% - 1mm); margin-left: 0.5mm; }
.supplement-print .sales-supp__c1 { width: 5mm; }
.supplement-print .sales-supp__c2 { width: 10mm; }
.supplement-print .sales-supp__c3 { width: 15mm; }
.supplement-print .sales-supp th { font-size: 5pt; }
.supplement-print .sales-supp th, .supplement-print .sales-supp td { padding: 0.1mm 0.4mm; }
/* 営業・ケータリング部の印刷(2026-11-13 ユーザー: 行間が狭すぎる)。A4よこ1枚の高さいっぱいまで行を広げ、字も少し大きく */
.supplement-print--sales .supplement__head { font-size: 12pt; margin: 0 0 2mm; }
.supplement-print--sales .sales-supp { font-size: 7.6pt; line-height: 1.2; }
.supplement-print--sales .sales-supp th { font-size: 7.2pt; }
.supplement-print--sales .sales-supp th, .supplement-print--sales .sales-supp td { padding: 0.85mm 0.8mm; }
.supplement-print--sales .sales-supp__c1 { width: 6mm; }
.supplement-print--sales .sales-supp__c2 { width: 14mm; }
.supplement-print--sales .sales-supp__c3 { width: 21mm; }
.supplement-print--sales.is-mid .sales-supp { font-size: 6.6pt; }
.supplement-print--sales.is-mid .sales-supp th { font-size: 6.2pt; }
.supplement-print--sales.is-mid .sales-supp th, .supplement-print--sales.is-mid .sales-supp td { padding: 0.95mm 0.5mm; }
.supplement-print--sales.is-wide .sales-supp { font-size: 5.6pt; }
.supplement-print--sales.is-wide .sales-supp th { font-size: 5pt; }
.supplement-print--sales.is-wide .sales-supp th, .supplement-print--sales.is-wide .sales-supp td { padding: 1.1mm 0.3mm; }
.supplement-print--sales.is-wide .sales-supp__c1 { width: 5mm; }
.supplement-print--sales.is-wide .sales-supp__c2 { width: 11mm; }
.supplement-print--sales.is-wide .sales-supp__c3 { width: 17mm; }
.supplement-print .sales-supp .sales-supp__dept { font-size: 6pt; }

/* 新しく登録された予定の印(2026-10-22。schedule_new_badge。薄い青の小さな点) */
.schedule-item__new { display: inline-block; margin-left: 4px; color: #7fa6d1; font-size: 0.6em; vertical-align: 1px; }

/* ドット絵の設定(2026-10-22。critter_settings)。横から見た絵の4コマを CSS で動かす(1コマ 100×72 → 50×36) */
.critter-settings__interval { max-width: 320px; }
/* 2026-10-23 ユーザー: 「出してみる」が縦に1字ずつ折り返していた → 1行のまま・カードを少し広く */
.critter-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px 14px; }
.critter-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface, #fff); }
/* 見本は実際の大きさ(--cw・--ch。DesignHelper#critter_card_style)。見本の枠(stage)の下にそろえて比べやすく(2026-11-09 ユーザー) */
.critter-card__stage { flex: none; width: 64px; height: 50px; display: flex; align-items: flex-end; justify-content: center; }
.critter-card__sprite { flex: none; width: var(--cw, 50px); height: var(--ch, 36px); background: no-repeat 0 0 / calc(var(--cw, 50px) * 4) var(--ch, 36px); animation: critter-card-walk 0.48s steps(4) infinite; }
@keyframes critter-card-walk { to { background-position: calc(var(--cw, 50px) * -4) 0; } }
@media (prefers-reduced-motion: reduce) { .critter-card__sprite { animation: none; } }
.critter-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.critter-card__head { display: flex; align-items: center; gap: 8px; }
.critter-card__name { flex: 1 1 auto; min-width: 0; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 出やすさの欄は細めに(名前が「クリスマス」「とんがり水色」でも1行に収まるように。2026-11-12) */
.critter-settings .critter-card__head select { flex: none; width: 96px; min-width: 0; padding-left: 4px; padding-right: 2px; }
.field .critter-card__head select, .critter-card__head select { flex: none; width: 108px; min-width: 0; }
.critter-card__head a { flex: none; white-space: nowrap; }
.critter-card__words { width: 100%; font-size: 0.9rem; }
/* 出る時間帯(2026-11-11) */
.critter-card__times { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; margin-top: 4px; font-size: 0.82rem; }
.critter-card__times input[type=checkbox] { width: 15px; height: 15px; margin: 0; }
.critter-card__times label { display: inline-flex; align-items: center; gap: 3px; font-weight: 400; cursor: pointer; }
.critter-settings .critter-card__day { width: 5.2em; min-width: 0; padding: 2px 6px; font-size: 0.85rem; height: 28px; }

/* ホームの背景を選ぶ(2026-10-22。home_scenes) */
.home-scenes__preview { margin: 10px 0 14px; }
/* 自分の写真を背景に(2026-10-23。home_photo_controller.js)。写真の上の横長の枠を動かす。枠の外は暗くする */
.home-photo__pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.home-photo__layout, .home-photo__slots { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.home-photo__stage { position: relative; display: inline-block; max-width: 100%; overflow: hidden; border-radius: 8px; line-height: 0; user-select: none; }
.home-photo__stage img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; }
.home-photo__band { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); cursor: move; touch-action: none; }
.home-photo__zoom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.home-photo__zoom label { font-weight: 600; font-size: 0.9rem; }
.home-photo__zoom input[type=range] { width: 220px; max-width: 100%; }
.home-photo .form-error { color: var(--color-danger); font-weight: 600; margin: 8px 0; }
.home-scene-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-scene-photo .home-scene-choice { width: 220px; }
.home-scenes__preview-title { font-size: 1.6rem; font-weight: 700; color: var(--color-heading, #1c3b5e); }
.home-scenes__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.home-scenes__top .home-scene-choice { width: 180px; }
.home-scene-choices--large { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.home-scene-choices--large .home-scene-choice.home-hero { min-height: 80px; }
/* 日替わり(2026-10-29 ユーザー): 選んでいるときだけ、背景ごとのチェックとまとまりの「全部入れる・外す」を出す */
.home-scene-cell { position: relative; }
.home-scene-cell > .home-scene-choice { width: 100%; }
.home-scene-pick { display: none; position: absolute; top: 6px; right: 6px; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); font-size: 0.78rem; color: #113961; cursor: pointer; }
.home-scene-pick input { width: 18px; height: 18px; margin: 0; }
.home-scene-photo .home-scene-pick { position: static; }
.home-scenes.is-daily .home-scene-pick { display: inline-flex; }
.home-scenes__group-pick { display: none; margin-left: 10px; gap: 4px; vertical-align: middle; }
.home-scenes.is-daily .home-scenes__group-pick { display: inline-flex; }
.home-scenes__daily-hint { display: none; }
.home-scenes.is-daily .home-scenes__daily-hint { display: block; }
.home-scene-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-scene-now .home-scene-choice { width: 220px; text-decoration: none; color: inherit; }
.home-scenes .section-title, .critter-settings .section-title { margin-top: 16px; }
.critter-card__sprite--still { background-size: 100% 100%; animation: none; }
.critter-card__sprite--square { width: 40px; height: 40px; background-size: 160px 40px; animation-name: critter-card-walk-square; animation-duration: 0.56s; }
@keyframes critter-card-walk-square { to { background-position: -160px 0; } }
/* 96×96 のコマを並べた絵(2026-11-05 ねぎ・クマ・ネッシー。上の段だけ動かす) */
.critter-card__sprite--sheet4 { background-size: calc(var(--cw) * 4) calc(var(--ch) * 2); animation-name: critter-card-walk; animation-duration: 0.56s; }
.critter-card__sprite--sheet3 { background-size: calc(var(--cw) * 3) calc(var(--ch) * 2); animation: critter-card-walk-sheet3 0.72s steps(3) infinite; }
@keyframes critter-card-walk-sheet3 { to { background-position: calc(var(--cw) * -3) 0; } }
/* お化け(2026-11-11。1枚の絵。設定の見本はふわふわ上下に) */
.critter-card__sprite--sheet1 { background-size: 100% 100%; animation: critter-card-float 3.2s ease-in-out infinite; }
@keyframes critter-card-float { 50% { translate: 0 -3px; } }
@media (prefers-reduced-motion: reduce) { .critter-card__sprite--sheet1 { animation: none; } }
/* 小物の一覧(2026-11-12 ユーザー: マスタに) */
.critter-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 14px; margin: 8px 0 4px; }
.critter-props__row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface, #fff); }
.critter-props__owner { flex: 0 0 100%; font-weight: 600; font-size: 0.88rem; }
.critter-props__item { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; cursor: pointer; }
.critter-props__img { image-rendering: pixelated; }
/* 季節のキャラの見本(2026-11-12)。コマを並べた絵の1コマ目だけ */
.critter-card__sprite--first { background-size: calc(var(--cw) * var(--cols)) calc(var(--ch) * var(--rows)); background-position: 0 0; animation: none; }
/* 小物(2026-11-11 Codex character_objects_v01)。キャラがひとやすみする横に置く・動かない・押せない */
.critter-prop { position: absolute; left: 0; bottom: 0; pointer-events: none; image-rendering: pixelated; transition: opacity 0.4s ease; }
/* とろけ銀の銀の玉(2026-11-15 Codex silver_slide_v10。critters_controller.js の addBalls)。3.84秒で1回り:
   上がる 0〜2.28秒(玉の2.6個分。上の帯の中で弾けるよう見本より少し低め)→ 4つに弾ける 2.28〜2.64秒 → 消えている 1.2秒。玉はセルの幅の 30/310 */
.critter__body:has(> .critter-balls) { position: relative; display: inline-block; }
.critter-balls { position: absolute; inset: 0; pointer-events: none; }
.critter-balls.is-mirror { scale: -1 1; }
.critter-ball { position: absolute; top: 27%; width: 9.7%; aspect-ratio: 1; margin-left: -4.85%; opacity: 0; animation: critter-ball-rise 3840ms infinite; }
.critter-ball img { display: block; width: 100%; height: 100%; image-rendering: pixelated; animation: critter-ball-img 3840ms infinite; }
.critter-ball i { position: absolute; left: 35%; top: 35%; width: 30%; height: 30%; background: #d5dbe2; box-shadow: 0 0 0 0.5px #5a6470; opacity: 0; animation: critter-ball-bit 3840ms infinite; }
.critter-ball i:nth-of-type(1) { --bx: -130%; --by: -130%; }
.critter-ball i:nth-of-type(2) { --bx: 130%; --by: -130%; }
.critter-ball i:nth-of-type(3) { --bx: -130%; --by: 110%; }
.critter-ball i:nth-of-type(4) { --bx: 130%; --by: 110%; }
@keyframes critter-ball-rise {
  0% { translate: 0 0; opacity: 0; animation-timing-function: cubic-bezier(0.3, 0.6, 0.5, 1); }
  3% { opacity: 1; }
  59.375% { translate: 0 -260%; opacity: 1; }
  68.75% { translate: 0 -260%; opacity: 1; }
  69% { opacity: 0; }
  100% { translate: 0 -260%; opacity: 0; }
}
@keyframes critter-ball-img { 0%, 59.3% { opacity: 1; } 59.4%, 100% { opacity: 0; } }
@keyframes critter-ball-bit {
  0%, 59.3% { opacity: 0; translate: 0 0; }
  59.4% { opacity: 1; translate: 0 0; }
  68.75% { opacity: 0; translate: var(--bx) var(--by); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .critter-balls { display: none; } }
/* 門松(お正月だけホームの背景の右下。動かない。スマホは背景を出さないので出さない) */
.home-hero > .home-decor, .home-decor { position: absolute; right: 18px; bottom: 6px; height: min(78%, 92px); width: auto; z-index: 1; pointer-events: none; image-rendering: pixelated; }
@media (max-width: 860px) { .home-decor { display: none; } }
@media print { .home-decor, .critter-prop { display: none !important; } }

/* 有給の全員の一覧の印刷(2026-10-23 ユーザー。paid_leaves/print)。A4 横に収める */
.pl-print { padding: 0 16px 24px; }
.pl-print__title { font-size: 1.2rem; margin: 0 0 4px; }
.pl-print__meta { font-size: 0.85rem; margin: 0 0 10px; color: var(--color-muted); }
.pl-print .table-wrap { overflow: visible; }
.pl-table--print { min-width: 0; width: 100%; font-size: 0.8rem; }
@page pl-print { size: A4 landscape; margin: 10mm; }
/* 人ごとの印刷(2026-10-26)は A4 縦 */
@page pl-print-person { size: A4 portrait; margin: 12mm; }
.pl-print--person { max-width: 760px; }
.pl-print__sum { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 12px; font-size: 0.95rem; }
.pl-print__sum b { font-size: 1.15rem; margin-left: 4px; }
.pl-print__h2 { font-size: 1rem; margin: 14px 0 4px; }
.pl-print--person .pl-table--print { width: auto; min-width: 420px; }
.pl-print--person .pl-table--print th, .pl-print--person .pl-table--print td { padding-left: 10px; padding-right: 10px; white-space: nowrap; }
@media print { .pl-print--person { page: pl-print-person; max-width: none; } }
@media print {
  .pl-print { page: pl-print; padding: 0; }
  .pl-table--print { font-size: 9pt; }
  .pl-table--print thead { display: table-header-group; }
  .pl-table--print tr { break-inside: avoid; }
}

/* スマホの上の帯を全部の画面に(2026-10-27 夜 ユーザー: このアプリの上の帯のように、左「‹ 戻る」・真ん中に画面の名前・右「…」。mobile_bar_controller.js)。
   大きなアイコンと見出しは隠して帯の名前にする。見出しの中の印と「?」は中身の一番上に残す。画面の「← ○○」は帯の「‹ 戻る」に替える */
.page-title-badges { display: none; }
@media (max-width: 860px) {
  .app-shell.has-bar-title main h1.page-title { display: none; }
  .page-title-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
  main a[data-back-link].is-in-bar { display: none !important; }
  .mobile-bar.mobile-bar--page .mobile-bar__side { width: 84px; flex: none; display: flex; align-items: center; }
  .mobile-bar.mobile-bar--page .mobile-bar__side--actions { justify-content: flex-end; }
  .mobile-bar.mobile-bar--page .mobile-bar__title { text-align: center; padding: 0 4px; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar-btn.mbar-back { width: auto; padding: 0 12px 0 8px; gap: 2px; font: inherit; font-size: 0.92rem; font-weight: 700; color: var(--frame, #2f5f93); border: 0; background: none; }
  .mbar-back__arrow { font-size: 1.4em; line-height: 1; margin-top: -2px; }
  .mbar-pop--scroll { max-height: min(70vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mbar-pop__item--danger { color: #b3261e; }
  /* 下へ進めたら、帯の後ろの字が透けて名前と重ならないよう濃いめに */
  .mobile-bar.mobile-bar--page.is-scrolled { background: rgba(247, 244, 237, 0.97); }
}

/* 仕入伝票(2026-10-28 ユーザー。取引先の伝票を AI が読む) */
.supplier-slip-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 10px; }
.supplier-slip-upload .btn { cursor: pointer; }
.supplier-slip-reading { margin: 0 0 10px; padding: 6px 10px; border-radius: var(--radius); background: #eef4fb; color: #2f5f93; font-size: 0.9rem; }
.supplier-slip-errors { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #eecac7; border-radius: var(--radius); background: #fdf5f4; font-size: 0.9rem; }
.supplier-slip-errors ul { margin: 6px 0 0; padding-left: 18px; }
.supplier-slip-errors li { margin: 3px 0; }
.supplier-slip-errors form { display: inline-block; margin-left: 4px; }
.supplier-slip-thumb-cell { width: 56px; }
.supplier-slip-thumb { display: inline-block; width: 44px; height: 34px; object-fit: cover; border: 1px solid var(--color-border); border-radius: 4px; vertical-align: middle; }
.supplier-slip-thumb--pdf { font-size: 0.7rem; font-weight: 700; color: #b3453d; text-align: center; line-height: 32px; background: #fff; }
.badge.supplier-slip-badge--read { background: #e6f3ea; color: #2f7d4f; }
.badge.supplier-slip-badge--check { background: #fbf1dc; color: #8a5d0c; }
.badge.supplier-slip-badge--duplicate { background: #eef0f3; color: #5c5852; }
.badge.supplier-slip-badge--ignored { background: #eef0f3; color: #8a8f99; }
tr.supplier-slip-row--check td { background: #fffaf0; }
tr.supplier-slip-row--duplicate td, tr.supplier-slip-row--ignored td { color: var(--color-muted); }
/* 対象者の「問合せ・詳細・参列・供物・香典 可・不」(2026-10-30) */
.cc-flags { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.cc-flag { border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); padding: 4px 12px 8px; margin: 0; min-width: 8.5em; }
.cc-flag legend { font-weight: 600; font-size: 0.9rem; padding: 0 4px; }
.cc-flag__choice { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; font-size: 1rem; cursor: pointer; }
.cc-flag__choice input { width: 1.15em; height: 1.15em; }
.cc-flag-chip { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 0.85rem; border: 1px solid var(--color-border); margin: 1px 0; }
.cc-flag-chip--yes { background: #e6f4ea; border-color: #9fd0ae; color: #1d5a2e; }
.cc-flag-chip--no { background: #fbe9e9; border-color: #e3a5a5; color: #8a2323; }
.cc-flag-chip--none { color: var(--color-muted); }
/* 仕入伝票の一覧の印刷(2026-10-30。取引先の請求書と見比べる用) */
.supplier-print-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0; }
.supplier-print-row .supplier-filtered-total { margin: 0; }
.slip-print { padding: 0 8mm; color: #222020; }
.slip-print__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 3mm; }
.slip-print__title { font-size: 1.3rem; margin: 0; }
.slip-print__title span { margin-left: 6px; }
.slip-print__date { margin-left: auto; font-size: 0.85rem; }
.slip-print__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; box-sizing: border-box; }
.slip-print__table th, .slip-print__table td { border: 1px solid #8a93a0; padding: 2px 5px; vertical-align: top; }
.slip-print__table thead th { background: #edf0f5; font-weight: 600; white-space: nowrap; }
.slip-print__table .num { text-align: right; white-space: nowrap; }
.slip-print__table tfoot td { font-weight: 600; border-top: 2px solid #3a3a3a; }
.slip-print__check { width: 1.6em; text-align: center; font-size: 1rem; }
.slip-print__items { max-width: 16em; }
.slip-print__table tr.is-muted td { color: #8a8a8a; }
.slip-print__offices { margin: 3mm 0 0; font-size: 0.9rem; }
@media print {
  .slip-print { padding: 0; }
  .slip-print__table { font-size: 8.5pt; }
  .slip-print__table thead { display: table-header-group; }
  .slip-print__table tr { break-inside: avoid; }
  .slip-print__table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 営業部の当番表(2026-10-30 ユーザー: 当番1・当番2だけ・月のカレンダーの形。友引は日の数字を緑・日曜と祝日は赤) */
.holiday-nav { align-items: center; gap: 12px; margin: 0 0 10px; }
.duty-cal { width: 100%; max-width: 1100px; border-collapse: collapse; table-layout: fixed; }
.duty-cal th { background: #edf0f5; font-weight: 600; text-align: center; padding: 4px 0; border: 1px solid #9aa4b2; }
.duty-cal th.is-sun { color: #c0261a; }
.duty-cal th.is-sat { color: #1f4fa3; }
.duty-cal td { border: 1px solid #9aa4b2; vertical-align: top; padding: 4px 6px 6px; height: 5.2em; }
.duty-cal__out { background: #f3f4f6; }
.duty-cal__day.is-today { box-shadow: inset 0 0 0 3px #2f5f93; }
.duty-cal__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.duty-cal__date { font-weight: 700; min-width: 1.6em; }
.duty-cal__date.is-sun { color: #c0261a; }
.duty-cal__date.is-sat { color: #1f4fa3; }
.duty-cal__date.is-tomobiki { background: #3e6b45; color: #fff; border-radius: 4px; padding: 0 5px; }
.duty-cal__note { font-size: 0.72rem; color: var(--color-muted); }
.duty-cal__note--holiday { color: #c0261a; }
.duty-cal__duty { font-size: 0.95rem; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duty-cal__no { display: inline-block; width: 1.3em; height: 1.3em; line-height: 1.3em; margin-right: 4px; border-radius: 50%; background: #dbe8fb; color: #113961; font-size: 0.75rem; font-weight: 700; text-align: center; }
.duty-cal__duty + .duty-cal__duty .duty-cal__no { background: #fff1c9; color: #6b4e00; }
/* 週のスケジュールの「当番」の行(2026-10-30) */
.schedule-week tbody tr.schedule-week__duty td { height: auto; padding-top: 2px; padding-bottom: 2px; }
/* 当1・当2は1行に並べる(2026-10-30 ユーザー: なるべくコンパクトに。入らないときだけ2行) */
.schedule-duty { display: inline-block; margin-right: 8px; font-size: 0.85rem; line-height: 1.5; white-space: nowrap; }
.schedule-duty:last-child { margin-right: 0; }
.schedule-week__duty th a { color: inherit; }
.schedule-duty__given { display: none; } /* 週の表の当番は名字だけ(パソコンも。2026-10-30 ユーザー: コンパクトに。氏名は重ねると出る) */
/* 当番を入れる: スタンプ(2026-10-30 ユーザー。人を選んで ① ② の段を押す) */
.duty-stamp__modes { display: inline-flex; gap: 0; margin: 4px 0 10px; }
.duty-stamp__modes .btn { border-radius: 0; }
.duty-stamp__modes .btn:first-child { border-radius: 6px 0 0 6px; }
.duty-stamp__modes .btn:last-child { border-radius: 0 6px 6px 0; }
.duty-stamp__people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.duty-stamp__person { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 12px; border: 1px solid #6f7680; border-radius: 6px; background: #fff; color: #222020; font: inherit; cursor: pointer; }
.duty-stamp__person-name { font-weight: 600; }
.duty-stamp__count { font-size: 0.75rem; color: var(--color-muted); }
.duty-stamp__person.is-active { background: #fff1a8; border-color: #b38600; box-shadow: 0 0 0 2px #e0b400; }
.duty-stamp__need { color: #c0261a; font-weight: 600; }
.duty-cal__slot { display: block; width: 100%; margin: 1px 0; padding: 1px 3px; border: 1px dashed transparent; border-radius: 4px; background: none; color: inherit; font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
@media (hover: hover) { .duty-cal__slot:hover { border-color: #6f7680; background: #f6f8fb; } }
@media screen and (max-width: 860px) {
  .duty-cal__slot { padding: 1px 0; font-size: 0.8rem; text-overflow: clip; }
  .duty-cal__slot .duty-cal__no { width: 1.15em; height: 1.15em; line-height: 1.15em; margin-right: 1px; font-size: 0.6rem; }
  .duty-cal__slot .duty-cal__name { font-size: 0.72rem; letter-spacing: -0.03em; }
}
.duty-cal__slot.is-picked { background: #fff1a8; }
.duty-cal__day.is-dup { background: #fde2df; }
.duty-table--edit { border-collapse: collapse; font-size: 1rem; }
.duty-table--edit th, .duty-table--edit td { border: 1px solid #9aa4b2; padding: 3px 10px; }
.duty-table--edit thead th { background: #edf0f5; font-weight: 600; text-align: center; white-space: nowrap; }
.duty-table__day { text-align: right; white-space: nowrap; }
.duty-table__day.is-tomobiki { background: #3e6b45; color: #fff; }
.duty-table__wday { text-align: center; }
.duty-table__wday.is-sun { color: #c0261a; }
.duty-table--edit select { min-width: 9em; }
.duty-counts { border-collapse: collapse; font-size: 0.95rem; margin-top: 10px; }
.duty-counts th, .duty-counts td { border: 1px solid #9aa4b2; padding: 3px 10px; }
.duty-counts thead th { background: #edf0f5; font-weight: 600; }
.duty-counts td:nth-child(n+2) { text-align: center; min-width: 3em; }
/* 当番表の下の名前・携帯の一覧(2026-11-02 ユーザー。見本の表と同じ 名前・フリガナ・携帯電話・携帯メール・当番なし)。当番をしない人は薄く */
.duty-contacts-wrap { overflow-x: auto; }
.duty-contacts td.duty-contacts__kana { text-align: left; white-space: nowrap; font-size: 0.85rem; }
.duty-contacts td.duty-contacts__tel, .duty-contacts td.duty-contacts__mail { text-align: left; white-space: nowrap; }
.duty-contacts tr.is-no-duty td:first-child { color: var(--color-muted); }
.holiday-history { margin-top: 14px; }
.holiday-history summary { cursor: pointer; font-weight: 600; }
.holiday-history__table { max-width: 760px; margin-top: 6px; }
.holiday-history__save { max-width: 760px; margin: 6px 0 0; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.holiday-history__save > summary { font-weight: 500; }
.holiday-history__at { font-weight: 700; margin-right: 4px; }
.holiday-history__list { margin: 6px 0 2px; padding-left: 1.2em; font-size: 0.9rem; columns: 2 16em; column-gap: 24px; }
.holiday-history__list li { break-inside: avoid; }
.duty-print__title { font-size: 1.3rem; margin: 0 0 3mm; }
.duty-print__title span { font-size: 1rem; font-weight: normal; margin-left: 8px; }
/* 印刷: A4 よこ1枚(この表だけよこ) */
@page duty-landscape { size: A4 landscape; margin: 8mm 10mm; }
@media print {
  .duty-print { page: duty-landscape; }
  .duty-print .duty-cal { max-width: none; font-size: 12pt; }
  .duty-print .duty-cal td { height: 26mm; padding: 1.5mm 2mm; }
  .duty-print .duty-cal__out, .duty-print .duty-cal__date.is-tomobiki, .duty-print .duty-cal__no { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .duty-print .duty-cal__day.is-today { box-shadow: none; }
  .duty-print .duty-counts { display: none; }
}
@media screen and (max-width: 860px) {
  .holiday-nav { flex-wrap: nowrap; gap: 6px; }
  .holiday-nav strong { font-size: 0.85rem; text-align: center; flex: 1 1 auto; }
  .holiday-nav .btn { flex: 0 0 auto; padding-left: 8px; padding-right: 8px; }
  .duty-cal td { padding: 2px 2px 4px; height: 4.6em; }
  .duty-cal__given, .duty-cal__note { display: none; }
  /* スマホは当番表での名前を3文字まで入れる(2026-11-02 ユーザー: 1文字は見づらい)→ 丸い番号をやめ、名前の地の色で当1(青)・当2(黄)を見分ける */
  .duty-cal__duty { font-size: 0.74rem; letter-spacing: -0.03em; margin-top: 2px; padding: 0 2px; border-radius: 3px; background: #dbe8fb; color: #113961; text-overflow: clip; }
  .duty-cal__duty + .duty-cal__duty { background: #fff1c9; color: #6b4e00; }
  .duty-cal__duty .duty-cal__no { display: none; }
}

/* シフト表(2026-11-10 ユーザー: 紙の「休日予定表」と同じ並び。日・曜・休日予定(人ごとの列)・イベント・朝礼・残1・残2) */
.shift-tabs { margin: 4px 0 10px; }
.shift-tabs__soon { cursor: default; opacity: 0.7; }
.shift-tabs__soon .hint { font-size: 0.72rem; }
.shift-wrap { max-width: 100%; }
/* 下へ進めても見出し(人の名前)を上に残す。入れる画面は上のスタンプの帯のすぐ下(--shift-head-top は shift_stamp_controller.js が測る) */
.shift-table thead { position: sticky; top: var(--shift-head-top, 0px); z-index: 3; box-shadow: 0 1px 0 #9aa4b2, 0 -2px 0 #fff; }
.shift-table { border-collapse: collapse; font-size: 0.9rem; background: #fff; }
.shift-table th, .shift-table td { border: 1px solid #9aa4b2; height: 1.9em; padding: 0 6px; text-align: center; white-space: nowrap; }
.shift-table thead th, .shift-table tfoot th { background: #edf0f5; font-weight: 600; }
.shift-table tfoot th { text-align: right; }
.shift-table tfoot td { font-weight: 600; }
.shift-table td.shift-table__day { text-align: left; padding: 0 6px 0 2px; }
.shift-table__num { display: inline-block; width: 3.1em; text-align: center; font-weight: 600; }
.shift-table__wd { display: inline-block; width: 1.5em; text-align: center; }
.shift-table__notes { display: inline-block; min-width: 5.6em; margin-left: 4px; font-size: 0.75rem; }
.shift-table .is-sun { color: #c0261a; }
.shift-table .is-sat { color: #1f4fa3; }
.shift-table__tomobiki { background: #3e6b45; color: #fff; border-radius: 4px; padding: 0 5px; }
.shift-table__note-tomobiki { color: #2f6a3a; font-weight: 700; margin-right: 4px; }
.shift-table__note-holiday { color: #c0261a; }
.shift-table__person, .shift-table__off { min-width: 3.6em; }
.shift-table__off { font-weight: 700; }
.shift-table__off.is-off, .shift-legend__chip.is-off, .shift-palette__kind.is-off { background: #fde4e4; color: #b3261e; }
.shift-table__off.is-paid, .shift-legend__chip.is-paid, .shift-palette__kind.is-paid { background: #dff0e2; color: #1f6b34; }
.shift-table__off.is-swap, .shift-legend__chip.is-swap, .shift-palette__kind.is-swap { background: #fff0c4; color: #7a5200; }
.shift-table__off.is-half, .shift-legend__chip.is-half, .shift-palette__kind.is-half { background: linear-gradient(135deg, #dbe8fb 50%, #fff 50%); color: #1f4fa3; }
.shift-table__work { min-width: 2.8em; color: var(--color-muted); }
.shift-table__work.is-short { background: #c0261a; color: #fff; font-weight: 700; }
.shift-table td.shift-table__event { min-width: 9em; text-align: left; }
.shift-table__duty { min-width: 4.4em; font-weight: 600; }
.shift-table__duty.is-conflict { background: #fde2df; color: #b3261e; }
.shift-table__slash { background: linear-gradient(to top right, transparent calc(50% - 0.6px), #9aa4b2 50%, transparent calc(50% + 0.6px)), #f3f4f6; }
.shift-table__slash span { font-size: 0.7rem; font-weight: 400; color: var(--color-muted); background: #f3f4f6; padding: 0 3px; }
.shift-table tr.is-today > td { border-top: 2px solid #113961; border-bottom: 2px solid #113961; }
.shift-table__blank { background: #fff; border: none !important; }
.shift-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 8px; font-size: 0.82rem; color: var(--color-muted); }
.shift-legend__chip { display: inline-block; min-width: 1.8em; margin-right: 4px; padding: 0 5px; border: 1px solid #9aa4b2; border-radius: 4px; font-weight: 700; text-align: center; }
.shift-counts { margin-top: 12px; }
/* 入れる画面: マスは押せるボタン・上に種類と人のスタンプ(画面を進めても上に残す) */
.shift-table--edit td.shift-table__off, .shift-table--edit td.shift-table__duty:not(.shift-table__slash) { padding: 0; }
.shift-cell { display: block; width: 100%; min-width: 3.4em; height: 2.1em; padding: 0 4px; border: none; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
@media (hover: hover) { .shift-cell:hover { box-shadow: inset 0 0 0 2px #6f7680; } }
.shift-table__duty.is-picked { background: #fff1a8; }
.shift-table--edit .shift-table__event input { width: 100%; min-width: 8em; height: 1.9em; padding: 0 4px; border: 1px solid transparent; border-radius: 0; background: #fbfcfe; font-size: inherit; }
.shift-table--edit .shift-table__event input:focus { border-color: var(--input-border, #6f7680); background: #fff; }
.shift-table--edit td.shift-table__event { padding: 0; }
.shift-table__balance { width: 3.2em; height: 1.8em; padding: 0 3px; text-align: center; font-size: inherit; }
.shift-palette { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0 0 6px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius, 8px); background: #f6f8fb; }
.shift-palette__group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shift-palette__label { font-weight: 700; margin-right: 2px; }
.shift-palette__kind { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 12px; border: 1px solid #6f7680; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
.shift-palette__kind span { font-size: 0.75rem; font-weight: 500; color: #222020; }
.shift-palette__kind.is-active { border-color: #b38600; box-shadow: 0 0 0 3px #e0b400; }
.shift-palette__save { margin-left: auto; }
.shift-palette .duty-stamp__person { padding: 3px 10px; }
/* 窓がせまいとき(ノートパソコン・スマホ)は、表を枠の中で縦横に動かす(見出しと日付は枠の中で残す) */
@media screen and (max-width: 1280px) {
  .shift-wrap { overflow: auto; max-height: calc(100dvh - 150px); border-bottom: 1px solid #9aa4b2; }
  .shift-table thead { top: 0; }
  .shift-wrap--edit { max-height: calc(100dvh - var(--shift-head-top, 0px) - 60px); }
}
.shift-palette__save { display: flex; gap: 8px; align-items: center; }
/* 次の期間の休みの希望の知らせ・自分の休みを入れる画面(月のカレンダーの形。2026-11-10) */
.shift-wish-banner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px; padding: 8px 12px; border: 1px solid #e0b400; border-radius: var(--radius, 8px); background: #fff8dc; }
.shift-wish__deadline { margin: 0 0 8px; }
.shift-wish__deadline.is-closed { color: #b3261e; font-weight: 600; }
.shift-wish__total { font-size: 0.95rem; }
.shift-wish__left { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 10px; background: #edf0f5; font-weight: 700; }
.shift-wish__left.is-done { background: #dff0e2; color: #1f6b34; }
.shift-wish__left.is-over { background: #c0261a; color: #fff; }
.shift-table tfoot td.is-mismatch { background: #fff0c4; color: #7a5200; }
/* 休みの希望の「必ず」(★)。入れる画面では、必ずの日が休みになっていなければ赤い枠 */
.shift-palette__must { background: #fff; color: #b38600; }
.shift-palette .shift-palette__must span { display: inline; } /* スマホでも「必ず」の字は出す(★ だけでは分かりにくい) */
.shift-wish__day.is-must { box-shadow: inset 0 0 0 3px #b38600; background: #fffbea; }
.shift-table__off.is-must { position: relative; }
.shift-table__off.is-must::after { content: "★"; position: absolute; top: 0; right: 1px; font-size: 0.6rem; line-height: 1; color: #b38600; pointer-events: none; }
.shift-table__off.is-must-missing { box-shadow: inset 0 0 0 2px #c0261a; }
.shift-legend__must { color: #b38600; font-weight: 700; margin-right: 2px; }
/* 全員出勤の日(休みの希望が入らない)。入れる画面はイベントの欄の左の「全」で付ける */
.shift-table tr.is-all-hands > td.shift-table__day, .shift-table tr.is-all-hands > td.shift-table__event { background: #e3ecfa; }
.shift-table__all-badge { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: #113961; color: #fff; font-size: 0.75rem; font-weight: 700; }
.shift-table__event-edit { display: flex; align-items: center; gap: 2px; }
.shift-table__all { flex: none; width: 1.7em; height: 1.7em; margin-left: 2px; padding: 0; border: 1px solid #9aa4b2; border-radius: 4px; background: #fff; color: #9aa4b2; font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.shift-table__all.is-on { background: #113961; border-color: #113961; color: #fff; }
.shift-wish__day.is-all-hands { background: #e3ecfa; }
.shift-wish__all { align-self: center; padding: 0 4px; border-radius: 4px; background: #113961; color: #fff; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.shift-wish td.shift-wish__day { padding: 0; height: auto; }
.shift-wish__cell { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 4.6em; padding: 4px 6px 5px; border: none; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.shift-wish__cell:disabled { cursor: default; }
.shift-wish__cell .duty-cal__head { margin: 0; }
.shift-wish__mark { align-self: center; min-width: 2.2em; min-height: 1.5em; border-radius: 4px; font-weight: 700; font-size: 1.05rem; text-align: center; line-height: 1.5; }
.shift-wish__mark.is-off { background: #fde4e4; color: #b3261e; }
.shift-wish__mark.is-paid { background: #dff0e2; color: #1f6b34; }
.shift-wish__mark.is-swap { background: #fff0c4; color: #7a5200; }
.shift-wish__mark.is-half { background: linear-gradient(135deg, #dbe8fb 50%, #fff 50%); color: #1f4fa3; }
.shift-wish__day.is-mine { box-shadow: inset 0 0 0 2px #b38600; }
@media (hover: hover) { .shift-wish__cell:not(:disabled):hover { background: #f6f8fb; } }
@media screen and (max-width: 860px) {
  .shift-wish__cell { padding: 2px 2px 3px; min-height: 4.4em; }
  .shift-wish__mark { font-size: 0.95rem; min-width: 1.9em; }
}
/* 印刷の紙には、作る人向けの知らせの色(休みの人が当番=赤・出勤が少ない日=赤・休みの日数が違う=黄)を出さない
   (2026-11-10 ユーザー: 印刷のときはふつうでいい)。休み・土日・友引の色はそのまま */
.shift-print .shift-table__duty.is-conflict { background: none; color: inherit; }
.shift-print .shift-table__work.is-short { background: none; color: var(--color-muted); font-weight: 400; }
.shift-print .shift-table tfoot td.is-mismatch { background: none; color: inherit; }
.shift-print .shift-legend__check { display: none; }
/* 印刷: A4 たて1枚(紙と同じ) */
@page shift-portrait { size: A4 portrait; margin: 9mm 8mm; }
@media print {
  .shift-print { page: shift-portrait; }
  .shift-print .shift-wrap { overflow: visible; }
  .shift-print .shift-table { width: 100%; font-size: 10.5pt; }
  /* 見出し・下の行をページごとにくり返さない(1枚に収める) */
  .shift-print .shift-table thead { position: static; display: table-row-group; box-shadow: none; }
  .shift-print .shift-table tfoot { display: table-row-group; }
  .shift-print .shift-table th, .shift-print .shift-table td { height: 7.1mm; padding: 0 1.5mm; }
  .shift-print .shift-table tr.is-today > td { border-top-width: 1px; border-bottom-width: 1px; border-color: #9aa4b2; }
  .shift-print .shift-table thead th, .shift-print .shift-table tfoot th, .shift-print .shift-table__off, .shift-print .shift-table__slash,
  .shift-print .shift-table__tomobiki, .shift-print .shift-table__work.is-short, .shift-print .shift-legend__chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .shift-print .shift-legend { font-size: 9pt; }
}
@media screen and (max-width: 860px) {
  .shift-wrap { max-height: calc(100dvh - var(--tab-bar-h, 72px) - var(--tab-bar-bottom, 0px) - 170px); }
  .shift-wrap--edit { max-height: calc(100dvh - var(--shift-head-top, 0px) - var(--tab-bar-h, 72px) - var(--tab-bar-bottom, 0px) - 80px); }
  .shift-table { font-size: 0.8rem; }
  .shift-table th, .shift-table td { padding: 0 3px; }
  .shift-table__notes { display: none; }
  .shift-table__num { width: 2.9em; }
  .shift-table td.shift-table__day, .shift-table tfoot th { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 #9aa4b2; }
  .shift-table tfoot th { background: #edf0f5; }
  .shift-table th.shift-table__day { position: sticky; left: 0; z-index: 4; }
  .shift-table__person, .shift-table__off { min-width: 2.7em; }
  .shift-cell { min-width: 2.6em; height: 2.4em; }
  .shift-palette { top: calc(env(safe-area-inset-top, 0px) + 44px); padding: 6px 8px; gap: 5px 10px; }
  .shift-palette .hint, .shift-palette .duty-stamp__count, .shift-palette__label { display: none; }
  form[data-controller="shift-stamp"] .shift-palette__kind span { display: none; } /* 入れる画面は種類が多いので字を隠す(希望の画面は2つだけなので出す) */
  .shift-palette__group { gap: 4px; }
  .shift-palette__kind { padding: 4px 11px; }
  .shift-palette .duty-stamp__person { padding: 4px 8px; }
  .shift-palette__save { order: 1; }
  .shift-palette__group + .shift-palette__group { order: 2; }
  .shift-palette__save .btn { padding: 6px 12px; }
}

/* 施行一覧(コールセンター用)(2026-10-30) */
.cc-duties { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 8px 12px; background: #edf0f5; border-radius: var(--radius, 8px); }
.cc-duties__day { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cc-duties__date { font-weight: 600; }
.cc-duties__more { margin-left: auto; align-self: center; font-size: 0.9rem; }
.cc-legend { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius, 8px); font-size: 0.9rem; line-height: 1.8; }
.cc-legend .cc-flag-chip { margin-left: 8px; }
.cc-legend--compact { font-size: 0.85rem; line-height: 1.7; }
.cc-legend--fold { line-height: 1.7; }
.cc-legend--fold .cc-flag-chip { margin-left: 0; }
.cc-legend--fold > summary { cursor: pointer; list-style: none; }
.cc-legend--fold > summary::-webkit-details-marker { display: none; }
.cc-legend__more { margin-left: 6px; color: var(--frame, #2f5f93); font-size: 0.85rem; white-space: nowrap; }
.cc-legend__more::before { content: "▸ "; }
.cc-legend--fold[open] .cc-legend__more::before { content: "▾ "; }
.cc-legend--fold[open] > summary { margin-bottom: 2px; }
.cc-week__item { display: block; padding: 3px 5px; margin-bottom: 4px; }
.cc-week__item .cc-flag-chip { white-space: nowrap; font-size: 0.78rem; padding: 0 6px; }
.cc-week__place { font-size: 0.82rem; color: var(--color-muted); }
.cc-week__item > summary { list-style: none; cursor: pointer; }
.cc-week__item > summary::-webkit-details-marker { display: none; }
.cc-week__more { margin: 6px 0 2px; padding-top: 4px; border-top: 1px dashed #c9d2de; font-size: 0.85rem; }
.cc-week__more dt { color: var(--color-muted); font-size: 0.75rem; margin-top: 4px; }
.cc-week__more dd { margin: 0; word-break: break-all; }
.cc-week__more .cc-flag-chip { margin: 1px 2px 1px 0; font-size: 0.75rem; }
.cc-week__flags { font-size: 0.8rem; margin-top: 2px; letter-spacing: 0.02em; }
/* スマホは日ごとに縦に並べる(2026-10-30 ユーザー: 表が細くなりすぎて崩れた) */
.cc-week-list { display: none; }
@media screen and (max-width: 860px) {
  .cc-week-wrap { display: none; }
  .cc-week-list { display: block; }
  .cc-week-list__day { border: 1px solid var(--color-border); border-radius: 6px; padding: 6px 10px 8px; margin-bottom: 8px; background: #fff; }
  .cc-week-list__day.is-today { box-shadow: inset 0 0 0 2px #2f5f93; }
  .cc-week-list__head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 4px; font-size: 1rem; font-weight: 700; }
  .cc-week-list__day.is-sun .schedule-day__date { color: #c0261a; }
  .cc-week-list__day.is-sat .schedule-day__date { color: #1f4fa3; }
  .cc-week-list__head .schedule-day__rokuyo, .cc-week-list__head .schedule-day__holiday { font-size: 0.8rem; font-weight: 500; }
  .cc-week-list__duty { font-size: 0.9rem; margin-bottom: 4px; }
  .cc-week-list__duty .schedule-duty { display: inline; margin-left: 6px; }
  .cc-week-list__none { margin: 0; font-size: 0.85rem; }
  .cc-week-list .cc-week__item { margin: 4px 0 0; }
}
.holiday-nav .is-disabled { opacity: 0.4; pointer-events: none; }
.cc-table__note { margin-top: 2px; font-size: 0.9rem; font-weight: 600; color: #7a4b00; }
.cc-note-field { margin-top: 8px; max-width: 40em; }
.cc-table__hidden { color: var(--color-muted); text-align: center; }
.cc-table__flag { text-align: center; }
.supplier-slip-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.supplier-slip-nav__count { font-size: 0.9rem; color: var(--color-muted); min-width: 4.5em; text-align: center; }
.supplier-slip-nav .is-disabled { opacity: 0.4; pointer-events: none; }
.supplier-slip-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.supplier-slip-detail__image { display: block; max-width: 100%; max-height: 78vh; height: auto; margin: 0 auto; border: 1px solid var(--color-border); border-radius: var(--radius); transform-origin: center center; }
/* 伝票の絵の枠と「回す」(2026-11-03。大きさと位置は slip_photo_controller.js が決める) */
.slip-photo__frame { position: relative; width: 100%; overflow: hidden; }
.slip-photo__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.supplier-slip-detail__pdf { display: block; width: 100%; height: 70vh; border: 1px solid var(--color-border); border-radius: var(--radius); }
.table.supplier-slip-items { min-width: 0; table-layout: fixed; }
.supplier-slip-items:not(.supplier-invoice-lines) th:not(:first-child) { width: 13%; }
/* 科目の列(2026-11-02)は「自動: 厚生費」が読める幅。数量は狭く・部門(2026-11-03)は「(伝票と同じ)」 */
.supplier-slip-items:not(.supplier-invoice-lines) th:nth-child(2) { width: 8%; }
.supplier-slip-items:not(.supplier-invoice-lines) th:nth-child(5) { width: 20%; }
.supplier-slip-items:not(.supplier-invoice-lines) th:nth-child(6) { width: 16%; }
.supplier-slip-items select { width: 100%; min-width: 0; }
.supplier-invoice-lines th:nth-child(n+5) { width: 11%; }
.supplier-slip-items input { width: 100%; min-width: 0; }
@media (max-width: 860px) {
  .supplier-slip-detail { grid-template-columns: minmax(0, 1fr); } /* 1fr だと中の一番広いもの(写真・表)に合わせて画面より広がった(2026-11-03 本番のスマホ) */
  .supplier-slip-detail__pdf { height: 60vh; }
  /* 明細の欄が細くなりすぎないよう、スマホは表を横にずらして見る(2026-11-03) */
  .table.supplier-slip-items:not(.supplier-invoice-lines) { min-width: 720px; }
}
/* 仕入伝票の突き合わせ(2026-10-28。合う=緑・金額が違う=黄・請求に無い=青・伝票が無い=赤) */
.badge.supplier-match--ok { background: #e6f3ea; color: #2f7d4f; }
.badge.supplier-match--diff { background: #fbf1dc; color: #8a5d0c; }
.badge.supplier-match--no_invoice { background: #e5eef8; color: #2f5f93; }
.badge.supplier-match--no_slip { background: #fbeceb; color: #b3453d; }
tr.supplier-match-row--diff td { background: #fffaf0; }
tr.supplier-match-row--no_invoice td { background: #f6f9fd; }
tr.supplier-match-row--no_slip td { background: #fff6f5; }
.supplier-match-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.supplier-match-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 12px; background: var(--color-surface); }
.supplier-match-card__label { font-size: 0.8rem; color: var(--color-muted); }
.supplier-match-card__count { font-size: 1.35rem; font-weight: 700; }
.supplier-match-card--ok .supplier-match-card__count { color: #2f7d4f; }
.supplier-match-card--diff .supplier-match-card__count { color: #8a5d0c; }
.supplier-match-card--no_invoice .supplier-match-card__count { color: #2f5f93; }
.supplier-match-card--no_slip .supplier-match-card__count { color: #b3453d; }
.supplier-match-diff { color: #b3453d; font-weight: 700; }
.supplier-match-ok { color: #2f7d4f; font-weight: 700; }
.table.supplier-match-totals { min-width: 0; }
.supplier-match-note form { display: flex; gap: 4px; align-items: center; }
.supplier-match-note input { min-width: 10em; flex: 1; }
.supplier-invoice-edit { margin-top: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 12px; }
.supplier-invoice-edit > summary { cursor: pointer; font-weight: 600; color: var(--frame); }
.table.supplier-invoice-lines th:nth-child(1) { width: 9.5em; }
.table.supplier-invoice-lines th:nth-child(4) { width: auto; }
@media (max-width: 860px) {
  .supplier-match-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 使い方の手引きをアプリの中で読む(2026-10-28。ページの絵を縦に並べる) */
.manual-reader__pages { display: grid; gap: 12px; justify-items: center; }
/* Word・Excel の添付をアプリの中で見る(file_views/office。2026-11-20)。白い紙に文章・表 */
.office-preview__doc { background: #fff; border: 1px solid var(--color-border); border-radius: 4px; padding: 18px 16px; max-width: 900px; margin: 0 auto; line-height: 1.7; color: #222020; }
.office-preview__p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.office-preview__p.is-center { text-align: center; }
.office-preview__p.is-right { text-align: right; }
.office-preview__p.is-bold { font-weight: 700; }
.office-preview__p.is-heading { font-size: 1.2em; font-weight: 700; margin: 6px 0 8px; }
.office-preview__blank { height: 0.9em; }
.office-preview__table { border-collapse: collapse; margin: 6px 0 10px; font-size: 0.92rem; background: #fff; }
.office-preview__table td { border: 1px solid #9aa4b2; padding: 4px 8px; vertical-align: top; min-width: 3em; }
.office-preview__table td div + div { margin-top: 2px; }
/* 短いマスは1行のまま(スマホで「品名」が「品/名」と割れないように。表は横にずらせる)。長い文のマスだけ折り返す */
.office-preview__doc .office-preview__table td { white-space: nowrap; }
.office-preview__doc .office-preview__table td.is-long { white-space: normal; min-width: 12em; }
.office-preview__table--sheet td { white-space: nowrap; max-width: 24em; overflow: hidden; text-overflow: ellipsis; }
.office-preview__sheet { margin: 14px 0 4px; }
.office-preview__note { margin: 0 0 8px; }
.manual-reader__page { display: block; width: 100%; max-width: 900px; height: auto; border: 1px solid var(--color-border); border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); background: #fff; }
/* 銀行明細の「対象外」の決まり(2026-10-29) */
.bank-rule-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 14px; }
.bank-rule-form { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px; }
.bank-ignore-form { display: inline-flex; align-items: center; gap: 4px; }
.bank-ignore-form label { display: inline-flex; align-items: center; gap: 3px; font-size: 0.82rem; white-space: nowrap; cursor: pointer; }

/* 葬儀予定表(2026-10-31)。A4 縦1枚・今の Excel の形。画面の見本(.yotei-preview)と印刷(.yotei-print)で同じ。
   字体は Noto Serif JP(_sheet で読み込む)。ユーザー: 見やすく大きめ・ふりがなは少しあける・2文字の項目は間をあける */
.yotei-page {
  position: relative; display: flex; flex-direction: column; width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 11mm 14mm 9mm; background: #fff; color: #111;
  font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif; font-size: 12.5pt; line-height: 1.35; font-weight: 500;
}
.yotei-title { text-align: center; font-size: 25pt; font-weight: 900; letter-spacing: 0.3em; margin: 4mm 0 5mm; color: #111; } /* 右上の書類番号は出さない(2026-10-31 ユーザー) */
.yotei-names { display: flex; justify-content: space-between; gap: 8mm; margin-bottom: 3mm; }
.yotei-name { flex: 1; display: flex; align-items: flex-end; gap: 4mm; border-bottom: 1.2px solid #222; padding: 0 2mm 1mm; font-size: 19pt; font-weight: 900; }
.yotei-name__role { font-size: 15pt; }
.yotei-name__part { display: inline-flex; flex-direction: column; align-items: center; gap: 1.6mm; }
.yotei-name__part + .yotei-name__part { margin-left: 3mm; }
.yotei-name__kana { font-size: 9pt; font-weight: 500; letter-spacing: 0.1em; line-height: 1; }
.yotei-name__body { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.yotei-name__sama { font-size: 16pt; }
.yotei-band {
  /* 帯の名前と日付は、下の表の項目の列(36mm)・日の列(40mm)の真ん中にそろえる(2026-10-31 ユーザー: 見出しの位置を納棺などと同じくらいに) */
  display: grid; grid-template-columns: 36mm 40mm 16mm 1fr; align-items: baseline; margin-top: 3mm; padding: 1.6mm 4mm 1.6mm 0;
  background: linear-gradient(180deg, #e6e9ee, #cfd5de); border-top: 1px solid #8d96a3; border-bottom: 1px solid #8d96a3;
  font-size: 18pt; font-weight: 900; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.yotei-band__label, .yotei-band__date { text-align: center; }
.yotei-band__time { text-align: right; }
.yotei-band__note { margin: 1.5mm 0 0 4mm; font-size: 10.5pt; }
.yotei-table { width: 100%; margin-top: 1.5mm; border-collapse: collapse; border: 1.5px solid #222; font-size: 14.5pt; font-weight: 700; }
.yotei-table th, .yotei-table td { border-left: 1px solid #222; padding: 1.3mm 2mm; text-align: center; }
.yotei-table thead th { border-bottom: 1px solid #222; font-weight: 900; font-size: 13pt; }
.yotei-table tbody tr + tr th, .yotei-table tbody tr + tr td { border-top: 1px dotted #444; }
.yotei-table th, .yotei-table td { padding-top: var(--yotei-row-pad, 1.3mm); padding-bottom: var(--yotei-row-pad, 1.3mm); } /* 一日葬などは行を高く(sheet_row_padding)。見出しの行も同じ割合で(2026-11-03 ユーザー: 見本 B) */
.yotei-table tbody th { width: 36mm; font-weight: 900; white-space: nowrap; }
.yotei-table__corner { width: 36mm; background: linear-gradient(to top right, transparent calc(50% - 0.6px), #222 50%, transparent calc(50% + 0.6px)); }
.yotei-table__date { width: 40mm; }
/* 月日と時刻の間も細い縦線(2026-11-02 ユーザー: 元の Excel と同じ) */
.yotei-table__place { width: 52mm; font-size: 11.5pt !important; }
.yotei-notice { margin: 3mm 0 2mm; font-size: 9.5pt; }
.yotei-bus { display: flex; gap: 6mm; align-items: baseline; margin: 1mm 0 2mm; font-size: 13pt; font-weight: 900; }
.yotei-bus__rows { display: flex; flex-direction: column; gap: 0.5mm; font-weight: 700; }
/* 地図は紙の下に残った所いっぱいまで大きくする(2026-11-01 ユーザー: 広い地図は字が小さい)。案内は右に細く・会社名の上まで */
.yotei-foot { flex: 1; display: grid; grid-template-columns: 1fr 62mm; gap: 4mm; margin-top: 3mm; min-height: 70mm; }
.yotei-foot__map { position: relative; min-height: 60mm; }
.yotei-foot__map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left top; }
.yotei-foot__info { font-size: 11pt; font-weight: 700; line-height: 1.55; }
.yotei-foot__head { text-align: center; font-size: 13pt; font-weight: 900; margin-bottom: 1mm; }
.yotei-foot__venue { font-size: 12pt; font-weight: 900; }
.yotei-foot__access { font-size: 10pt; }
.yotei-foot__head--offering { margin-top: 3mm; font-size: 12pt; white-space: nowrap; } /* 公営斎場のときの供物・供花お問い合わせ(2026-11-12。1行に収める) */
.yotei-company { position: absolute; right: 14mm; bottom: 10mm; font-size: 14pt; font-weight: 900; }
.yotei-preview { margin-top: 10px; overflow-x: auto; background: #e9ecf1; padding: 12px; border-radius: 6px; }
.yotei-preview .yotei-page { margin: 0 auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
@page yotei { size: A4 portrait; margin: 0; }
@media print {
  .yotei-print { page: yotei; }
  .yotei-print .yotei-page { min-height: 0; height: 296mm; overflow: hidden; }
}
@media screen { .yotei-print .yotei-page { margin: 0 auto 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); } }
/* 寺院予定表(2026-11-12)。お寺に渡す A4 縦1枚。今の Word の形(項目の表・ふりがな・右下に㈱ダイリン)。.yotei-page の紙と字体を使う */
.jiin-page { padding: 18mm 18mm 14mm; font-size: 15pt; }
.jiin-temple { margin: 4mm 0 9mm; font-size: 20pt; font-weight: 700; }
.jiin-temple__name { display: inline-block; min-width: 50mm; padding: 0 3mm 1mm; border-bottom: 1.2px solid #222; font-size: 24pt; font-weight: 900; }
.jiin-table { width: 100%; border-collapse: collapse; border: 1.5px solid #222; }
.jiin-table th, .jiin-table td { border: 1px solid #222; padding: 4.2mm 4mm; vertical-align: middle; }
.jiin-table th { width: 30mm; font-weight: 700; text-align: center; letter-spacing: 0.1em; white-space: nowrap; }
.jiin-table td { font-weight: 600; }
.jiin-row--name td { font-size: 19pt; font-weight: 900; }
.jiin-row--name td > * { vertical-align: bottom; }
.jiin-name { display: inline-flex; align-items: flex-end; gap: 5mm; }
.jiin-name__part { display: inline-flex; flex-direction: column; align-items: center; gap: 1.2mm; }
.jiin-name__kana { font-size: 9.5pt; font-weight: 500; letter-spacing: 0.1em; line-height: 1; min-height: 9.5pt; }
.jiin-sama { margin-left: 6mm; font-size: 15pt; }
.jiin-age { margin-left: 8mm; }
.jiin-relation { margin-left: 10mm; font-size: 14pt; font-weight: 700; }
.jiin-when { display: flex; gap: 8mm; }
.jiin-place { margin-top: 1.5mm; }
.jiin-place__label { display: inline-block; margin-right: 5mm; font-size: 12pt; font-weight: 500; }
.jiin-row--note td { height: 34mm; vertical-align: top; font-size: 13pt; }
.jiin-company { margin: auto 0 0; padding-top: 8mm; text-align: right; font-size: 17pt; font-weight: 700; }
.jiin-edit__events input[type=text], .jiin-edit__events input[list] { width: 100%; }

/* 訃報(2026-11-12)。A4 縦1枚・今の Word の形。.yotei-page の紙と字体・.yotei-foot__* の式場の案内を使う */
.fuho-page { padding: 16mm 18mm 12mm; font-size: 14pt; font-weight: 600; }
.fuho-title { text-align: center; font-size: 26pt; font-weight: 900; margin: 4mm 0 9mm; color: #111; }
.fuho-lead { margin: 0 6mm; font-size: 14.5pt; line-height: 1.7; }
.fuho-lead p { margin: 0; }
.fuho-ki { text-align: center; font-size: 15pt; font-weight: 700; margin: 8mm 0 6mm; }
.fuho-items { width: 100%; border-collapse: collapse; }
.fuho-items th { width: 38mm; padding: 0 0 6mm; text-align: left; vertical-align: top; font-weight: 700; white-space: nowrap; }
.fuho-items td { padding: 0 0 6mm; vertical-align: top; line-height: 1.6; }
.fuho-event { display: flex; gap: 6mm; }
.fuho-event__label { flex: 0 0 62mm; }
.fuho-sub { display: inline-block; width: 18mm; }
.fuho-foot { flex: 1; display: grid; grid-template-columns: 1fr 88mm; gap: 5mm; margin-top: 4mm; min-height: 64mm; }
.fuho-foot__info { display: flex; flex-direction: column; font-size: 11pt; font-weight: 700; line-height: 1.55; }
.fuho-foot__map { position: relative; min-height: 60mm; }
.fuho-foot__map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: right top; }
.fuho-company { margin-top: auto; padding-top: 3mm; text-align: center; font-size: 14pt; }
.fuho-offering { margin-top: 5mm; text-align: center; font-size: 13pt; line-height: 1.6; }
.fuho-offering__label { display: inline-block; width: 22mm; text-align: left; }

/* 顧客の画面の「葬儀予定表|印刷」などの1組(2026-11-12)。2つのボタンをくっつける */
.btn-pair { display: inline-flex; white-space: nowrap; }
.btn-pair > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-pair > .btn + .btn { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 0.6em; padding-right: 0.6em; font-size: 0.9em; }

/* 予定表を直す画面 */
.yotei-edit__base { border: 1px solid var(--color-border); border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; }
.yotei-edit__people { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.yotei-edit__person { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.yotei-edit__pair { display: inline-flex; align-items: center; gap: 4px; }
.yotei-edit__name { width: 7em; }
.yotei-edit__kana { width: 8em; }
.yotei-edit__band { border: 1px solid var(--color-border); border-radius: 6px; padding: 8px 10px; margin: 10px 0; background: #fff; }
.yotei-edit__band.is-off { opacity: 0.55; }
.yotei-edit__band-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.yotei-edit__band-label { width: 9em; font-weight: 700; }
.yotei-edit__time { width: 6.5em; }
.yotei-edit__check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.yotei-edit__band-body { margin-top: 6px; }
.yotei-edit__note { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; margin-bottom: 6px; }
.yotei-edit__note input { flex: 1; }
.yotei-edit__rows { border-collapse: collapse; margin-bottom: 6px; }
.yotei-edit__rows th { font-size: 0.8rem; text-align: left; padding: 2px 4px; color: var(--color-muted); }
.yotei-edit__rows td { padding: 2px 4px; }
.yotei-edit__label { width: 8em; }
.yotei-edit__place { width: 14em; }
.yotei-edit__row-actions { white-space: nowrap; }
.yotei-edit__bus { display: flex; gap: 8px; margin: 4px 0; }
.venue-map-preview img { max-width: 480px; width: 100%; border: 1px solid var(--color-border); }
@media screen and (max-width: 860px) {
  .yotei-edit__rows, .yotei-edit__rows tbody, .yotei-edit__rows tr { display: block; }
  .yotei-edit__rows thead { display: none; }
  .yotei-edit__rows tr { border-top: 1px dashed var(--color-border); padding: 4px 0; }
  .yotei-edit__rows td { display: inline-block; }
  .yotei-edit__place { width: 12em; }
}
/* 仕入・経費等処理連絡票(2026-11-02 ユーザー: 業者別に科目を分けて印刷。今の紙の表紙と同じ形)。A4 よこ・業者ごとに1枚 */
@page cover-sheet { size: A4 landscape; margin: 8mm 10mm; }
.cover-sheet { page: cover-sheet; color: #222020; width: 277mm; margin: 0 auto 10mm; font-size: 9.5pt; line-height: 1.3; }
.cover-sheet + .cover-sheet { break-before: page; }
.cs-top { display: flex; justify-content: space-between; align-items: flex-end; }
.cs-title { font-size: 17pt; font-weight: 800; letter-spacing: 0.06em; margin: 0; }
.cs-nums { display: flex; gap: 22mm; font-size: 8pt; font-weight: 700; padding-right: 30mm; }
.cs-head { display: flex; align-items: stretch; gap: 3mm; margin-top: 1.5mm; }
.cs-supplier { flex: 1; border: 1px solid #222; border-radius: 4mm; padding: 2mm 4mm; display: flex; align-items: center; gap: 3mm; min-height: 13mm; }
.cs-small { font-size: 8.5pt; }
.cs-supplier__name { font-size: 15pt; font-weight: 700; }
.cs-period { border: 1px solid #222; width: 30mm; padding: 1mm 3mm; display: flex; flex-direction: column; justify-content: center; text-align: right; }
.cs-period b { font-size: 11pt; }
.cs-amount { display: flex; border: 1px solid #222; position: relative; }
.cs-amount__cell { width: 9.5mm; border-left: 1px solid #999; display: flex; align-items: center; justify-content: center; font-size: 14pt; font-weight: 700; }
.cs-amount__cell:first-child { border-left: none; }
.cs-amount__cell.is-sep { border-right: 1px solid #222; }
.cs-amount__yen { position: absolute; right: 1mm; top: 0.3mm; font-size: 6.5pt; }
.cs-checks { width: 100%; border-collapse: collapse; margin-top: 3mm; }
.cs-checks th, .cs-checks td { border: 1px solid #222; width: 33.3%; }
.cs-checks th { font-weight: 600; font-size: 8.5pt; text-align: left; padding: 1mm 2mm; letter-spacing: 0.05em; }
.cs-checks th:nth-child(n+2) { text-align: center; }
.cs-checks td { height: 10mm; padding: 0 2mm; }
.cs-checks td span { display: inline-block; font-size: 8.5pt; margin-right: 11mm; }
.cs-checks td .cs-stamp { float: right; margin: 5.2mm 0 0; font-size: 7pt; border: 1px solid #222; border-radius: 50%; width: 3.6mm; height: 3.6mm; line-height: 3.4mm; text-align: center; }
.cs-table { width: 100%; border-collapse: collapse; margin-top: 3mm; table-layout: fixed; break-inside: avoid; }
.cs-table th, .cs-table td { border: 1px solid #222; padding: 0.6mm 1.5mm; vertical-align: middle; }
.cs-col-tax { width: 9mm; } .cs-col-account { width: 37mm; } .cs-col-pct { width: 9mm; }
.cs-table thead th { font-weight: 600; font-size: 8.5pt; text-align: center; line-height: 1.25; height: 11mm; }
.cs-first { padding: 0 !important; text-align: left !important; }
.cs-first__top { display: flex; align-items: center; gap: 7mm; border-bottom: 1px solid #222; font-size: 7.5pt; padding: 0.3mm 1mm; line-height: 1.05; }
.cs-first__top span:first-child { font-size: 6.5pt; border-right: 1px solid #222; padding-right: 1mm; }
.cs-first__bottom { font-size: 8pt; padding: 0.6mm 0 0.6mm 12mm; }
.cs-row-a td, .cs-row-b td { height: 6.6mm; }
.cs-tax { font-size: 6.5pt; text-align: center; padding: 0 !important; }
.cs-account { font-size: 9pt; font-weight: 600; white-space: nowrap; overflow: hidden; }
.cs-code { font-size: 7.5pt; font-weight: 400; color: #5c5852; }
.cs-memo { font-size: 7.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-pct { font-size: 7.5pt; text-align: right; padding-right: 1mm !important; }
.cs-table td.num { text-align: right; font-size: 11pt; white-space: nowrap; }
.cs-sub { font-weight: 700; }
.cs-table tr.cs-total td { height: 10mm; font-weight: 700; }
.cs-foot { text-align: center; letter-spacing: 0.4em; font-size: 10pt; }
.cs-table tr.is-undecided td { color: #a3260f; }
.cs-note { font-size: 7.5pt; color: #5c5852; margin: 1.5mm 0 0; }
@media screen { .cover-sheet { padding: 6mm; border: 1px solid #ddd; box-shadow: 0 1px 4px rgba(0,0,0,.08); background: #fff; } }
@media print { .cover-sheet { margin: 0; } }
/* 科目と取引先の画面(2026-11-02) */
.account-titles input[type=text], .account-titles input[type=number] { width: 100%; min-width: 0; }
.account-titles__pos { max-width: 64px; }
.account-titles__code { max-width: 80px; }
.supplier-accounts__rules { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 3px; }
.supplier-accounts__rules li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.supplier-accounts__add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.supplier-accounts__add input[type=text] { width: 200px; }
.supplier-slip-items select.is-undecided { border-color: #c0392b; }
/* 仕入・経費等 科目別一覧(2026-11-02 ユーザー: A4 たてに業者がそれぞれ出る形)。行 = 業者×科目・列 = 小計と部門コード */
@page acct-sum { size: A4 portrait; margin: 9mm 8mm; }
.acct-sum { page: acct-sum; color: #222020; max-width: 191mm; margin: 0 auto; font-size: 7.8pt; line-height: 1.3; }
.acct-sum__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2mm 6mm; margin-bottom: 2.5mm; }
.acct-sum__title { font-size: 13pt; margin: 0; letter-spacing: 0.05em; }
.acct-sum__period { font-size: 9.5pt; font-weight: 600; }
.acct-sum__date { margin-left: auto; font-size: 7.5pt; color: #5c5852; }
.acct-sum__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.acct-sum__table th, .acct-sum__table td { border: 1px solid #555; padding: 0.9mm 1.1mm; vertical-align: middle; }
.acct-sum__table thead th { background: #eef1f5; font-weight: 600; text-align: center; line-height: 1.15; }
.acct-sum__table th.acct-sum__supplier { width: 27mm; text-align: left; font-weight: 700; background: #fff; }
.acct-sum__table thead th.acct-sum__supplier { background: #eef1f5; text-align: center; }
.acct-sum__account { width: 25mm; white-space: nowrap; overflow: hidden; }
.acct-sum__tax { width: 7mm; text-align: center; font-size: 7pt; }
.acct-sum__code { font-size: 6.5pt; color: #5c5852; font-weight: 400; }
.acct-sum__count { display: block; font-size: 6.5pt; font-weight: 400; color: #5c5852; }
.acct-sum__table td.num, .acct-sum__table th.num { text-align: right; white-space: nowrap; }
.acct-sum__table thead th.num { text-align: center; }
.acct-sum__sub { font-weight: 700; }
.acct-sum__group { break-inside: avoid; }
.acct-sum__supplier-total td { background: #f6f7f9; font-weight: 600; }
.acct-sum__supplier-total td:first-child { text-align: right; }
.acct-sum__totals-head th { background: #eef1f5; text-align: left; font-weight: 700; padding-top: 1.2mm; }
.acct-sum__totals { break-inside: avoid; }
.acct-sum__grand td { font-weight: 700; background: #eef1f5; border-top: 1.5px solid #222; }
.acct-sum__table tr.is-undecided td { color: #a3260f; }
.acct-sum__note { font-size: 7pt; color: #5c5852; margin-top: 1.5mm; }
@media screen { .acct-sum { padding: 6mm; background: #fff; border: 1px solid #ddd; } }
/* 商品ごとの科目(確認用。2026-11-02) */
.acct-items { margin-top: 14px; break-inside: avoid; }
.acct-items__supplier { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 1.05rem; margin: 0 0 4px; }
.acct-items__meta { font-size: 0.82rem; font-weight: 400; color: var(--color-muted); }
.acct-items__warn { color: #a3260f; font-weight: 600; margin-left: 8px; }
.acct-items__why { font-size: 0.85em; color: var(--color-muted); }
.acct-items__table tr.is-undecided td { color: #a3260f; }
.acct-items__table td.num, .acct-items__table th.num { text-align: right; white-space: nowrap; }
.acct-items--print .acct-items { margin-top: 3mm; }
.acct-items--print .acct-items__supplier { font-size: 10pt; margin-bottom: 1mm; }
.acct-items--print .acct-items__table { table-layout: auto; }
.supplier-slip-errors__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
/* 施行検索(夜間)の列の並び(2026-11-02 ユーザー): パソコンは日程が左・スマホは名前が左 */
.cc-table-sp { display: none; }
@media screen and (max-width: 860px) {
  .cc-table-pc { display: none; }
  .cc-table-sp { display: block; }
}

/* データ管理「二重になっている対象者(旧データどうし)」は1組を1つの箱に(2026-11-07。表はスマホで横にはみ出した) */
.twin-list { display: grid; gap: 8px; max-width: 1100px; }
.twin-box { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 10px; background: var(--color-surface); min-width: 0; }
.twin-box__head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.twin-box__action { margin: 0 0 0 auto; }
.twin-box__side { margin-top: 4px; font-size: 0.9rem; overflow-wrap: anywhere; }
.twin-box__label { display: inline-block; min-width: 5.5em; margin-right: 6px; color: var(--color-muted); font-size: 0.85rem; }
.twin-box__people { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--color-border); font-size: 0.9rem; overflow-wrap: anywhere; }
.twin-box__people .twin-box__label { min-width: 8em; }
.twin-box__same { margin: 4px 0 0; font-weight: 600; }
.twin-box__same--ok { color: #1f7a3d; }
.twin-box__same--warn { color: #b42318; }

/* 一覧の見出しを押して並び替える(2026-11-08 ユーザー: 並び順の選ぶ欄の代わりに ▲▼。SearchFormHelper#sort_header) */
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; padding: 4px 2px; margin: -4px -2px; border-radius: 4px; }
.sort-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 並んでいる列は文字を明るい紺+濃い ▲/▼、ほかの押せる列は薄い ▲▼ を縦に重ねる(2026-11-08 ユーザー: 三角と文字の色で分かるように) */
.sort-link__mark { font-size: 0.75em; min-width: 0.9em; line-height: 1; }
.sort-link.is-active { color: var(--frame, #2f5f93); }
.sort-link:not(.is-active) .sort-link__mark { display: inline-flex; flex-direction: column; font-size: 0.5em; line-height: 0.95; opacity: 0.35; }
.sort-link:not(.is-active) .sort-link__mark::before { content: "▲"; }
.sort-link:not(.is-active) .sort-link__mark::after { content: "▼"; }
.list-count-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.list-count-row .list-count { margin: 0; }
.sort-latest.is-active { white-space: nowrap; }
@media (max-width: 860px) { .sort-link { padding: 8px 4px; margin: -8px -4px; } } /* スマホは押せる所を広めに */

/* 請求書の振込先を選び直したときの注意(2026-11-09 ユーザー。bank_choice_controller.js) */
.bank-choice__warn { margin: 6px 0 0; padding: 6px 10px; border: 1px solid #e3c46a; border-radius: var(--radius-control, 6px); background: #fff7dc; color: #6b4e00; font-size: 0.85rem; line-height: 1.5; }
.bank-choice-note { margin: 0 0 10px; padding: 6px 10px; border: 1px solid #e3c46a; border-radius: var(--radius-control, 6px); background: #fff7dc; color: #6b4e00; font-size: 0.9rem; }
.bank-choice__label { display: block; font-weight: 600; color: var(--color-text, #222020); margin-bottom: 4px; }
.bank-choice__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bank-choice__current { font-size: 0.95rem; }
.bank-choice__dialog { width: min(480px, calc(100vw - 32px)); }
.bank-choice__dialog select { margin: 4px 0 6px; }

/* かんたん見積(2026-11-13 営業: 夜中の打合せ用。見本 docs/samples/quick_estimate_v03.html)。左に質問、右に明細と合計(上に残る) */
.qe-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.qe-side { position: sticky; top: 12px; }
.qe-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px 12px; margin-bottom: 12px; background: var(--color-surface); }
.qe-card.is-off { opacity: 0.45; pointer-events: none; }
.qe-card[hidden] { display: none; }
.qe-card__head { margin: -10px -14px 10px; padding: 6px 14px; background: var(--band); font-size: 0.95rem; border-radius: var(--radius) var(--radius) 0 0; display: flex; gap: 8px; align-items: center; }
.qe-card__note { margin-left: auto; font-weight: 400; font-size: 0.8rem; color: var(--color-muted); }
.qe-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--color-primary); color: #fff; align-items: center; justify-content: center; font-size: 0.8rem; flex: none; }
.qe-card.is-done .qe-num { background: #2e7d4f; }
.qe-reception { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.qe-reception .field { margin: 0; min-width: 0; }
.qe-reception .field input { min-width: 0; width: 100%; }
.qe-readonly { white-space: nowrap; height: 38px; box-sizing: border-box; padding: 7px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--band); }
.qe-group-label { font-size: 0.8rem; color: var(--color-muted); margin: 6px 0 3px; font-weight: 700; }
.qe-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.qe-choice { border: 1px solid var(--frame); background: var(--color-surface); color: var(--color-primary); border-radius: var(--radius-control); padding: 7px 12px; font-size: 1rem; cursor: pointer; text-align: left; }
.qe-choice small { display: block; color: var(--color-muted); font-size: 0.75rem; }
.qe-choice.is-on { background: var(--color-primary); color: #fff; }
.qe-choice.is-on small { color: #dfe6ef; }
.qe-hall-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; margin-top: 6px; }
.qe-hall-days .qe-group-label { margin: 0 4px 0 0; }
.qe-qty-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--color-border); }
.qe-qty-row__name small { display: block; color: var(--color-muted); font-size: 0.78rem; }
.qe-qty { display: inline-flex; align-items: center; gap: 4px; }
.qe-qty button { width: 36px; height: 36px; border: 1px solid var(--frame); background: var(--color-surface); color: var(--color-primary); border-radius: var(--radius-control); font-size: 1.2rem; cursor: pointer; }
.qe-qty button:disabled { cursor: default; }
.qe-qty input { width: 68px; text-align: right; }
.qe-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.qe-checks label { display: flex; gap: 6px; align-items: center; padding: 3px 0; cursor: pointer; font-weight: 400; }
.qe-price { margin-left: auto; color: var(--color-muted); font-size: 0.85rem; white-space: nowrap; }
.qe-minus { color: #b42318; }
.qe-amounts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 4px; }
.qe-amounts input { width: 120px; text-align: right; }
.qe-lines { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.qe-lines th, .qe-lines td { border-bottom: 1px solid var(--color-border); padding: 5px 6px; text-align: left; }
.qe-lines thead th { background: var(--band); font-size: 0.8rem; }
.qe-lines .r { text-align: right; white-space: nowrap; }
.qe-lines__group td { background: var(--band); font-weight: 700; color: var(--color-primary); }
.qe-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--color-primary); margin-top: 8px; padding-top: 8px; }
.qe-total strong { font-size: 1.55rem; color: var(--color-primary); }
.qe-note { margin: 10px 0 4px; }
.qe-note textarea { min-width: 0; width: 100%; height: auto; font-size: 0.9rem; }
.qe-empty { color: var(--color-muted); padding: 12px 0; text-align: center; }
.qe-wide { display: block; width: 100%; margin-top: 8px; text-align: center; }
.qe-missing { border: 1px solid var(--color-warning); border-radius: var(--radius-control); padding: 6px 10px; }
.qe-preview { overflow-x: auto; background: #e9ecf1; padding: 12px 0; border-radius: var(--radius); }
.qe-preview .qe-sheet { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.qe-plan-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.qe-plan-checks label { display: flex; gap: 5px; align-items: center; font-weight: 400; cursor: pointer; }
.qe-set-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.qe-set-table th, .qe-set-table td { border-bottom: 1px solid var(--color-border); padding: 5px 6px; text-align: left; }
.qe-set-table thead th { background: var(--band); font-size: 0.8rem; }
.qe-set-table .r { text-align: right; white-space: nowrap; }
.qe-set-table input { width: 72px; text-align: right; }
.qe-add { position: relative; margin-top: 8px; }
.qe-add input { width: 100%; }
.qe-add__pop { position: absolute; top: calc(100% + 2px); left: 0; right: 0; max-height: 260px; overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border);
               border-radius: var(--radius-control); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); z-index: 20; display: none; }
.qe-add__pop.is-open { display: block; }
.qe-add__pop button { display: flex; justify-content: space-between; width: 100%; padding: 7px 10px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 0.95rem; color: var(--color-text); }
.qe-add__pop button:hover { background: var(--band); }
.qe-add__pop small { color: var(--color-muted); }
.qe-preview-title { font-weight: 700; color: var(--color-primary); margin: 8px 0 2px; }
@media (max-width: 1100px) {
  .qe-layout { grid-template-columns: minmax(0, 1fr); }
  .qe-side { position: static; }
  .qe-reception { grid-template-columns: 1fr 1fr; }
}

/* ---------- スマホの下の帯の作り替え(2026-11-14 ユーザー。見本 docs/samples/mobile_nav_v02.html) ----------
   下の帯 = ホーム・通知・アプリ・個人設定・メニュー。スマホのホームはスケジュールだけ(ほかの枠は「通知」へ) */
@media (max-width: 860px) {
  .home-card--pc-only { display: none; }
}
/* 通知: 新しい順(色の札)/種類ごと(ホームの枠) */
.notices__seg { display: flex; max-width: 420px; margin: 4px 0 12px; border: 1px solid var(--frame); border-radius: var(--radius-control); overflow: hidden; }
/* 切り替えボタンと通知の行は低めに(2026-11-21 ユーザー: スマホで高さをもう少し狭く) */
.notices__seg-btn { flex: 1; text-align: center; padding: 4px 0; line-height: 1.5; color: var(--color-primary); background: var(--color-surface); text-decoration: none; font-weight: 600; }
.notices__seg-btn.is-on { background: var(--color-primary); color: #fff; }
.notices__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.notices__list li + li { border-top: 1px solid var(--band); }
.notices__item { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; line-height: 1.45; color: var(--color-text); text-decoration: none; }
.notices__item:hover { background: var(--band); }
.notices__body { min-width: 0; overflow-wrap: anywhere; }
.notices__time { display: block; color: var(--color-muted); font-size: 0.78rem; margin-top: 0; line-height: 1.3; }
.notices__sub-tag { font-size: 0.75rem; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: 4px; padding: 0 4px; margin-right: 6px; line-height: 1.4; }
.notices__empty { padding: 16px 4px; }
/* 項目の色(アプリの画面の絵と同じ系統) */
.notice-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #fff; border-radius: 4px; padding: 0 6px; line-height: 1.5; margin-right: 6px; background: #4f6f8f; }
.notice-tag--reports { background: #c0392b; } .notice-tag--workflow { background: #d9822b; } .notice-tag--message { background: #3b82c4; }
.notice-tag--mail { background: #2f9e7a; } .notice-tag--board { background: #7a5bc0; } .notice-tag--supplier { background: #556b2f; }
.notices__card .home-card__title { border-left: 4px solid #4f6f8f; }
.notices__card--reports .home-card__title { border-left-color: #c0392b; } .notices__card--workflow .home-card__title { border-left-color: #d9822b; }
.notices__card--message .home-card__title { border-left-color: #3b82c4; } .notices__card--mail .home-card__title { border-left-color: #2f9e7a; }
.notices__card--board .home-card__title { border-left-color: #7a5bc0; } .notices__card--supplier .home-card__title { border-left-color: #556b2f; }

/* アプリ: アイコンと名前を4列(サイボウズのアプリのように)・一番上にお気に入り */
/* お気に入り(2026-11-14): 選んでいないときは細い1行(押すと選ぶ画面)・選んだら絵つきの3枚 */
.apps-favs-mini { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 2px 0; color: var(--color-text); text-decoration: none; }
.apps-favs-mini__star { color: #e0a800; font-size: 1.05rem; }
.apps-favs-mini__text { font-weight: 700; font-size: 0.9rem; color: var(--color-muted); }
.apps-favs-mini__add { border: 1px solid var(--frame); color: var(--frame); background: var(--color-surface); border-radius: 14px; padding: 2px 10px; font-size: 0.8rem; }
.apps-favs { margin: 2px 0 14px; }
.apps-favs__head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 700; color: var(--color-muted); margin-bottom: 6px; }
.apps-favs__edit { color: var(--frame); font-weight: 400; text-decoration: none; }
.apps-favs__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.apps-fav { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 5px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); background: var(--color-surface); color: var(--color-text); text-decoration: none; font-size: 0.78rem; text-align: center; line-height: 1.25; }
.apps-fav::after { content: "★"; position: absolute; top: 2px; right: 5px; color: #e0a800; font-size: 0.7rem; }
.apps-fav__icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.apps-fav__icon .sidebar__icon { width: 30px; height: 30px; margin: 0; }
.apps-fav__star { color: #e0a800; font-size: 1.2rem; }
.apps-fav__label { overflow-wrap: anywhere; }
/* お気に入りを選ぶ画面(apps/favorites) */
.fav-picker { max-width: 640px; }
.fav-picker__picked { position: sticky; top: 0; z-index: 3; background: var(--color-surface); padding: 10px 0; border-bottom: 1px solid var(--color-border); margin-bottom: 8px; }
@media (max-width: 860px) { .fav-picker__picked { top: var(--fav-picker-top, 0px); } }
.fav-picker__count { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--color-muted); margin-bottom: 6px; }
.fav-picker__count b { color: var(--color-text); }
.fav-picker__slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fav-picker__slot { position: relative; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; border: 1.5px dashed #b7c3d3; border-radius: var(--radius-control, 6px); background: #f6f8fb; color: #8a96a6; font-size: 0.75rem; text-align: center; line-height: 1.2; }
.fav-picker__slot.is-full { border: 1px solid var(--frame); background: #eef3fa; color: var(--color-text); }
.fav-picker__slot .sidebar__icon { width: 28px; height: 28px; margin: 0; }
.fav-picker__star { color: #e0a800; font-size: 1.2rem; }
.fav-picker__remove { position: absolute; top: -8px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #5c6773; color: #fff; font-size: 0.85rem; line-height: 24px; padding: 0; cursor: pointer; }
.fav-picker__note { font-size: 0.8rem; color: var(--color-muted); margin: 0 0 6px; }
.fav-picker__group { margin-top: 8px; }
.fav-picker__head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); background: var(--color-surface); color: var(--color-text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.fav-picker__head[aria-expanded="true"] { background: #edf0f5; border-radius: var(--radius-control, 6px) var(--radius-control, 6px) 0 0; }
.fav-picker__head .sidebar__icon { width: 30px; height: 30px; margin: 0; }
.fav-picker__label { flex: none; }
.fav-picker__badge { background: #e0a800; color: #fff; border-radius: 10px; padding: 0 8px; font-size: 0.75rem; }
.fav-picker__arrow { margin-left: auto; color: var(--color-muted); }
.fav-picker__sub { padding: 6px 14px 2px; font-size: 0.78rem; font-weight: 700; color: var(--color-muted); border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
.fav-picker__item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; border: 0; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); border-bottom: 1px solid #e6ebf1; background: var(--color-surface); color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.fav-picker__item > span:first-child { flex: 1; }
.fav-picker__check { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid #9aa6b5; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.9rem; }
.fav-picker__item.is-on { background: #fffbea; }
.fav-picker__item.is-on .fav-picker__check { background: #e0a800; border-color: #e0a800; }
.fav-picker__item.is-off { opacity: 0.45; }
.fav-picker__msg { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: #fff4d6; font-size: 0.85rem; }
.fav-picker__actions { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; margin-top: 16px; padding: 10px 0; background: var(--color-surface); border-top: 1px solid var(--color-border); }
@media (max-width: 860px) { .fav-picker__actions { bottom: calc(var(--tab-bar-h, 72px) + var(--tab-bar-bottom, 0px) + 6px); } }
.fav-picker__actions .btn { flex: 1; justify-content: center; text-align: center; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 18px 4px; max-width: 760px; }
/* スマホは3列(2026-11-14 ユーザー: 4列は字が2行に分かれて詰まって見える。絵は4列のときと同じ56px・行の間を広めに・名前の字を少し大きく) */
@media (max-width: 860px) {
  .apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; }
}
.apps-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--color-text); font-size: 0.78rem; text-align: center; }
.apps-tile__icon { width: 56px; height: 56px; flex: none; }
.apps-tile__icon.porcelain { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)); }
.apps-tile__icon--line { display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14); }
.apps-tile__icon--line svg { width: 30px; height: 30px; }
.apps-tile__count { position: absolute; top: -5px; right: calc(50% - 36px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d23a2f; color: #fff;
                    font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--color-surface); }
.apps-tile__label { line-height: 1.3; overflow-wrap: anywhere; }
/* スマホ: 絵と名前をもう少し小さく(2026-11-21 ユーザー。絵 56 → 46px・名前 0.9 → 0.8rem・行の間 24 → 18px)。上の決まりより後に置く */
@media (max-width: 860px) {
  .apps-tile { gap: 4px; }
  .apps-tile__icon { width: 46px; height: 46px; }
  .apps-tile__icon--line { border-radius: 12px; }
  .apps-tile__icon--line svg { width: 25px; height: 25px; }
  .apps-tile__count { right: calc(50% - 31px); }
  .apps-tile__label { font-size: 0.8rem; }
}

/* メニューの窓(案C): 下の帯にかぶらない・左にまとまり・右に中身(右の字は標準で 15px。文字の大きさに合わせて変わる) */
.mobile-menu__shade { position: fixed; inset: 0; z-index: 940; background: rgba(17, 57, 97, 0.28); }
.mobile-menu__win { position: fixed; z-index: 945; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 8px);
                    bottom: calc(var(--tab-bar-bottom, 6px) + var(--tab-bar-h, 72px) + 8px); background: var(--color-surface); border-radius: 16px;
                    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28); display: flex; flex-direction: column; overflow: hidden; }
.mobile-menu__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 8px; font-weight: 700; font-size: 1.05rem; color: var(--color-primary); border-bottom: 1px solid var(--color-border); }
.mobile-menu__close { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--color-muted); cursor: pointer; padding: 0 4px; }
.mobile-menu__body { flex: 1; min-height: 0; display: flex; }
/* 左のまとまり(2026-11-14 ユーザー: さっぱりしすぎ → 陶器調の絵と名前を縦に・選んでいるまとまりは白い札で浮かせて左に紺の印・右の中身はふわっと出す。
   4案の見本 docs/samples/mobile_menu_v03.html から案A に決まり「選択したらシャドウ」→ 左上から光を当てたように右下へ影を落とし、少し左上へ持ち上げる) */
.mobile-menu__side { flex: none; width: 7.1rem; /* 2026-11-21 ユーザー: 字を大きくするため 6.4 → 7.1rem */ overflow-y: auto; padding: 6px 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; background: var(--band); border-right: 1px solid var(--color-border); }
.mobile-menu__group { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; width: 100%; padding: 8px 4px 7px; border: 1px solid transparent; border-radius: 10px; background: none;
                      font: inherit; font-size: 0.84rem; line-height: 1.25; text-align: center; color: var(--color-text); cursor: pointer; /* 0.76 → 0.84rem(2026-11-21) */
                      transition: background-color 0.15s ease, box-shadow 0.18s ease, transform 0.18s ease, color 0.15s ease; }
.mobile-menu__group .sidebar__icon { width: 30px; height: 30px; margin: 0; transition: transform 0.15s ease; }
.mobile-menu__group.is-on { background: var(--color-surface); border-color: var(--color-border); box-shadow: 5px 6px 10px rgba(17, 57, 97, 0.30), 2px 2px 3px rgba(17, 57, 97, 0.22), inset 1px 1px 0 rgba(255, 255, 255, 0.9); transform: translate(-1px, -2px); color: var(--frame); font-weight: 700; }
.mobile-menu__group.is-on::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--frame); }
.mobile-menu__group.is-on .sidebar__icon { transform: scale(1.12); }
.mobile-menu__group-label { overflow-wrap: anywhere; }
.mobile-menu__count { position: absolute; top: 3px; right: 5px; background: #d23a2f; color: #fff; border-radius: 10px; font-size: 0.65rem; padding: 0 6px; font-weight: 700; }
.mobile-menu__panes { flex: 1; min-width: 0; overflow-y: auto; }
.mobile-menu__pane:not([hidden]) { animation: mobile-menu-pane-in 0.2s ease-out; }
@keyframes mobile-menu-pane-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mobile-menu__pane:not([hidden]) { animation: none; } .mobile-menu__group, .mobile-menu__group .sidebar__icon { transition: none; } }
/* 右の中身: 1行ずつ線で区切る(ガラスでも見えるよう枠の色)。中項目は見出しの帯に上下の線 */
.mobile-menu__pane a { display: flex; align-items: center; gap: 6px; padding: 13px 12px 13px 14px; border-bottom: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; font-size: 1rem; } /* 0.88 → 1rem(2026-11-21 ユーザー: 字を大きく) */
.mobile-menu__pane a:active { background: var(--band); }
.mobile-menu__pane a::after { content: "›"; margin-left: auto; color: var(--color-muted); }
.mobile-menu__pane a .sidebar__count { order: 1; }
.mobile-menu__sec-head { padding: 7px 12px 6px 14px; background: var(--band); border-bottom: 1px solid var(--color-border); color: var(--frame); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; }
.mobile-menu__sec + .mobile-menu__sec .mobile-menu__sec-head, .mobile-menu__pane > a + .mobile-menu__sec .mobile-menu__sec-head { border-top: 1px solid var(--color-border); margin-top: 10px; }
@media (min-width: 861px) { .mobile-menu { display: none !important; } }
html.mobile-menu-open, html.mobile-menu-open body { overflow: hidden; }

/* 遅い画面の記録(2026-11-14 ユーザー: スマホで表が入りきらない → スマホは1件ずつの札) */
.pt-sp { display: none; }
.pt-deploy { display: inline-block; border-radius: 4px; padding: 0 5px; font-size: 0.72rem; font-weight: 700; color: #7a4b00; background: #ffe9b8; border: 1px solid #e3b65a; vertical-align: middle; }
.pt-strained { color: #b3261e; font-weight: 700; }
.pt-deploy-note { margin-bottom: 6px; }
.table-wrap .table td.pt-detail { white-space: normal; min-width: 12em; max-width: 22em; }
.pt-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 0.85rem; color: var(--color-muted); }
.pt-sort .sort-reset { margin-left: auto; }
@media (min-width: 861px) { .pt-sort { display: none; } }
.pt-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pt-item { padding: 8px 2px; border-bottom: 1px solid var(--color-border); }
.pt-item__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pt-path { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.pt-sec { flex: none; }
.pt-item__sub { margin-top: 2px; font-size: 0.85rem; color: var(--color-muted); overflow-wrap: anywhere; }
.pt-kind { flex: none; border-radius: 10px; padding: 0 8px; font-size: 0.75rem; font-weight: 700; color: #fff; background: #5c6773; }
.pt-kind--server { background: #2f5f93; }
.pt-kind--browser { background: #a06a3c; }
@media (max-width: 860px) { .pt-pc { display: none; } .pt-sp { display: block; } }

/* スマホで同じ所を素早く2回押すと拡大される(2026-11-14 ユーザー: メニューのボタンを押していると拡大する)。
   iPhone は maximum-scale を無視して2回押しの拡大をするので、2回押しの拡大だけ止める(2本の指で広げる拡大はそのまま) */
html { touch-action: manipulation; }
/* iPhone の Safari が、横に長い表(横にずらす表)の中の字を勝手に大きくするのを止める(2026-11-20 ユーザー: 顧客の画面の請求書の
   「葬儀売上」「供物売上」の行だけ字がとても大きかった。行をまたぐ1つの欄の字が大きくされていた)。字の大きさは CSS で決めたとおりにする */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 紙の日報をまとめて入れる(2026-11-15)。列は中身に合わせた幅(ノートパソコンで横に動かさずに収まるように) */
.table-wrap .table.driving-paper__table { width: auto; min-width: 0; }
.driving-paper__table td, .driving-paper__table th { padding: 3px 3px; vertical-align: middle; white-space: nowrap; }
.driving-paper__table input, .driving-paper__table select { padding: 4px 5px; font-size: 0.88rem; }
.driving-paper__table input[type="date"] { width: 9.2em; }
.driving-paper__table select { width: 7.5em; }
.driving-paper__name { width: 6.5em; }
.driving-paper__num { width: 3.6em; text-align: right; }
.driving-paper__city { width: 5.5em; }
.driving-paper__note { width: 7em; }
.driving-paper__row.is-error td { background: #fdecea; }
.driving-paper__msg td { padding: 2px 8px 6px; color: #b3261e; font-size: 0.85rem; background: #fdecea; white-space: normal; }

/* ホームページ・広告(2026-11-15。web_reports/show。見本 docs/samples/web_ads_v01.html) */
.web-report { display: flex; flex-direction: column; gap: 12px; }
.web-report > .card { margin: 0; }
.web-report__head { flex-wrap: wrap; gap: 8px 16px; }
.web-report__right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.web-report__notice { background: #fff4d6; border-color: #e3b65a; }
.web-report__alert { background: #fdecea; color: #b3261e; border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; }
.web-report__learn { background: #fff4d6; color: #7a4b00; border-radius: 6px; padding: 6px 10px; font-size: 0.85rem; margin: 0 0 8px; }
.web-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; }
.web-sec h2 { margin: 0; font-size: 1.02rem; color: var(--color-primary); }
.web-sec span { font-size: 0.8rem; color: var(--color-muted); }
.web-sub { margin: 12px 0 4px; font-size: 0.82rem; color: var(--color-muted); }
.web-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.web-tile { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; min-width: 0; background: var(--color-surface); }
.web-tile.is-main { border-color: var(--frame); box-shadow: inset 3px 0 0 var(--frame); }
.web-tile.is-sub .web-tile__val { font-size: 1.15rem; }
.web-tile__lab { font-size: 0.78rem; color: var(--color-muted); }
.web-tile__val { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.web-tile__val small { font-size: 0.78rem; font-weight: 400; color: var(--color-muted); margin-left: 2px; }
.web-cmp { font-size: 0.78rem; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.web-cmp.is-good { color: #1e7d3a; }
.web-cmp.is-bad { color: #b3261e; }
.web-cmps { display: flex; flex-wrap: wrap; gap: 0 10px; }
.web-budget { position: relative; height: 8px; border-radius: 4px; background: #e6ebf1; margin: 6px 0 3px; overflow: visible; }
.web-budget span { display: block; height: 100%; border-radius: 4px; background: var(--frame); }
.web-budget span.is-over { background: #b3261e; }
.web-budget i { position: absolute; top: -3px; width: 2px; height: 14px; background: #5c6773; }
.web-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.web-cols > .card { margin: 0; }
.web-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.web-stack > .card { margin: 0; }
.web-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.web-report .table-wrap + .table-wrap { margin-top: 14px; }
/* 検索の傾向: スマホでは「12か月の平均」を隠して横にずらさずに見る(2026-11-17) */
.web-kw__short { display: none; }
@media (max-width: 860px) {
  .web-kw th:nth-child(4), .web-kw td:nth-child(4) { display: none; } .web-kw .web-cmp { display: block; }
  /* 2026-11-19 ユーザー: スマホで右の列が少し切れて横にずらす形になっていた → 画面の幅に収める(言葉は折り返す・数字の列は決まった幅・見出しも折り返す) */
  .table-wrap .table.web-kw { min-width: 0; width: 100%; table-layout: fixed; }
  .table-wrap .table.web-kw th { white-space: normal; line-height: 1.3; }
  .web-kw th:first-child, .web-kw td:first-child { overflow-wrap: anywhere; }
  .web-kw th.num:nth-child(2) { width: 4.8em; }
  .web-kw th.num:nth-child(3) { width: 5.6em; }
  .web-kw th, .web-kw td { padding-left: 8px; padding-right: 8px; }
  .web-kw__long { display: none; } .web-kw__short { display: inline; }
}
.web-q { table-layout: fixed; width: 100%; } .web-q th.num { width: 6.5em; } .web-q th.num:nth-child(2) { width: 7.5em; } .web-q td:first-child { overflow-wrap: anywhere; }
.web-q__rank { white-space: nowrap; } .web-q .web-rank { display: inline-block; min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; } .web-q__move { display: inline-block; width: 2.6em; text-align: left; padding-left: 4px; }
/* スマホ: 言葉を1行目いっぱいに・2行目に 順位・表示・押された(2026-11-17 ユーザー: 言葉が縦に1文字ずつで見づらい) */
@media (max-width: 860px) {
  .web-q { table-layout: auto; }
  .web-q, .web-q tbody, .web-q thead, .web-q thead tr { display: block; width: 100%; }
  .web-q thead th:not(:first-child) { display: none; }
  .web-q thead th:first-child { display: block; }
  .web-q tbody tr { display: grid; grid-template-columns: auto 1fr 1fr; align-items: baseline; gap: 2px 14px; padding: 8px 10px; }
  .web-q tbody td { display: block; padding: 0 !important; border: 0 !important; width: auto !important; text-align: left; background: transparent !important; box-shadow: none !important; }
  .web-q tbody tr:nth-child(even) { background: var(--band, #edf0f5); }
  .web-q tbody tr:nth-child(even) .web-rank { background: var(--color-surface, #fff); }
  .web-q tbody td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .web-q tbody td.num::before { content: attr(data-label) " "; font-size: 0.78em; color: var(--color-muted); font-weight: 400; }
  .web-q .web-rank { min-width: 0; }
}
@media (max-width: 860px) { .web-cols, .web-two { grid-template-columns: minmax(0, 1fr); } .web-report__right { margin-left: 0; } }
.web-chart { width: 100%; height: auto; display: block; }
.web-chart .web-grid { stroke: var(--color-border); stroke-width: 1; }
.web-chart .web-axis { fill: var(--color-muted); font-size: 11px; }
.web-chart .web-bar { fill: #2a78d6; }
.web-chart .web-bar.is-soft { fill: #b9d3f2; }
.web-chart .web-val { fill: var(--color-text); font-size: 11px; }
.web-share { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.web-share li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) 3em; align-items: center; gap: 6px; }
.web-share__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-share__bar { height: 8px; background: #e6ebf1; border-radius: 4px; overflow: hidden; }
.web-share__bar i { display: block; height: 100%; background: #2a78d6; }
.web-share__pct { text-align: right; font-variant-numeric: tabular-nums; }
.web-rank { display: inline-block; min-width: 2.4em; text-align: center; border-radius: 6px; padding: 0 6px; font-weight: 700; background: var(--band); }
.web-ai { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-items: start; }
.web-ai__score { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 110px; }
.web-ai__score small { font-size: 0.75rem; color: var(--color-muted); }
.web-ai__body h2 { margin: 0 0 4px; font-size: 1rem; }
.web-ai__body ul { margin: 0; padding-left: 1.2em; line-height: 1.75; }
.web-ai__parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.web-ai__parts span { font-size: 0.78rem; border: 1px solid var(--color-border); border-radius: 6px; padding: 1px 8px; }
.web-ai__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.8rem; }
.web-ai__meta form { margin: 0; }
.web-ai__error { color: #b3261e; }
@media (max-width: 860px) { .web-ai { grid-template-columns: minmax(0, 1fr); } .web-ai__score { align-items: flex-start; } }
.web-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.web-pill.is-good { background: #e5f4e9; color: #1e7d3a; }
.web-pill.is-normal { background: #edf0f5; color: #3d4652; }
.web-pill.is-caution { background: #fff2d9; color: #9a6200; }
.web-props { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.web-prop { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; }
.web-prop__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.web-prop p { margin: 4px 0; line-height: 1.7; font-size: 0.92rem; }
.web-prop__act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.web-prop__act form { margin: 0; }
.web-prio { border-radius: 6px; padding: 0 8px; font-size: 0.76rem; font-weight: 700; background: var(--band); }
.web-prio.is-high { background: #fdecea; color: #b3261e; }
.web-prio.is-mid { background: #fff2d9; color: #9a6200; }
.web-who { font-size: 0.76rem; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: 6px; padding: 0 8px; }
.web-prev { margin-top: 10px; font-size: 0.88rem; }
.web-prev summary { cursor: pointer; color: var(--frame); }
.web-settings summary { cursor: pointer; font-weight: 700; color: var(--color-primary); }
.web-settings__status { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: var(--color-muted); margin: 6px 0; }

/* お客様の声の一覧(2026-11-17 TestimonialsController) */
/* お客様の声: 葬儀日の月・並び(2026-11-17。パソコンでも出す) */
.voice-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 6px; font-size: 0.9rem; color: var(--color-muted); }
.voice-filter select { width: auto; min-width: 9em; }
.voice-filter a.is-on { font-weight: 700; color: var(--color-text, #222020); text-decoration: none; }
.voice-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.voice-card { border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 12px 14px; background: var(--color-surface, #fff); }
.voice-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.voice-card__family { margin-left: auto; font-size: 0.85rem; }
.voice-card__scale { font-size: 0.85rem; font-weight: 700; color: #113961; background: #edf0f5; border-radius: 4px; padding: 0 6px; }
.voice-card__marks { margin-top: 6px; }
/* お客様の声: ホームページの記事の形(2026-11-17) */
.voice-article { margin-top: 10px; border-top: 1px dashed var(--color-border); padding-top: 8px; }
.voice-article > summary { cursor: pointer; font-weight: 700; color: var(--frame, #2f5f93); }
.voice-article__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; margin: 8px 0; }
.voice-article__wide { grid-column: 1 / -1; }
.voice-article__preview { margin-top: 10px; border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 12px 14px; background: #fff; }
.voice-article__date { margin: 0; font-size: 0.8rem; color: var(--color-muted); }
.voice-article__title { margin: 2px 0 6px; font-size: 1.2rem; font-family: "Noto Serif JP", serif; border-bottom: 1px solid var(--color-border); padding-bottom: 6px; }
.voice-article__tags { margin: 0 0 8px; font-size: 0.9rem; }
.voice-article__tags span { display: inline-block; border: 1px solid #113961; color: #113961; font-size: 0.75rem; padding: 0 4px; margin-right: 2px; }
.voice-article__tags span:not(:first-child) { margin-left: 14px; }
.voice-article__body { font-size: 0.92rem; line-height: 1.8; }
@media (max-width: 860px) { .voice-article__grid { grid-template-columns: 1fr; } }
.badge--done { background: #e7eef7; color: #1f4f86; }
.pt-sort a.is-on { font-weight: 700; text-decoration: none; color: inherit; }

/* コラム記事(2026-11-17 ColumnArticlesController) */
.column-goal { font-size: 1rem; margin: 4px 0 10px; }
.column-topics { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.column-topics label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); cursor: pointer; }
.column-topics label:has(input:checked) { border-color: var(--frame, #2f5f93); background: #f2f6fb; }
.column-writing { padding: 14px; border-radius: var(--radius, 8px); background: #f2f6fb; font-weight: 600; }
.column-preview { border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 16px 20px; background: #fff; color: #222; line-height: 1.9; max-width: 820px; }
.column-preview h1 { font-size: 1.35rem; margin: 0 0 12px; }
.column-preview h2 { font-size: 1.15rem; margin: 22px 0 8px; padding-left: 8px; border-left: 4px solid var(--frame, #2f5f93); }
.column-preview h3 { font-size: 1.02rem; margin: 16px 0 6px; }
.column-body { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }

/* 火葬場の空き(2026-11-17 SaijoVacanciesController) */
.saijo-table th, .saijo-table td { text-align: center; white-space: nowrap; }
.saijo-table thead th { vertical-align: top; }
.saijo-note { font-weight: 400; font-size: 0.75rem; white-space: normal; min-width: 8em; }
.saijo-date { text-align: left !important; }
.saijo-table tr.is-weekend .saijo-date { color: #b3261e; }
.saijo-cell { color: #8a8f98; }
.saijo-cell.is-open { color: #1f5f9e; font-weight: 700; }
.saijo-cell.is-outside { background: #fbf7d9 !important; }
.saijo-cell.is-off { color: #b06a00; }
.saijo-legend .saijo-cell { display: inline-block; min-width: 1.8em; text-align: center; border: 1px solid var(--color-border); border-radius: 4px; margin: 0 2px 0 8px; }

/* 火葬場の利用: 月のカレンダー(2026-11-17) */
.saijo-cal-wrap { overflow-x: auto; margin: 12px 0 4px; }
.saijo-cal { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; min-width: 560px; }
.saijo-cal th { font-size: 0.85rem; padding: 2px; color: var(--color-muted); }
.saijo-cal th.is-sun, .saijo-cal__date.is-sun { color: #b3261e; }
.saijo-cal th.is-sat, .saijo-cal__date.is-sat { color: #1f5f9e; }
.saijo-cal__day { vertical-align: top; height: 80px; padding: 4px 6px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface, #fff); }
.saijo-cal__day.is-empty { border: 0; background: transparent; }
.saijo-cal__day.is-level1 { background: #eef4fb; }
.saijo-cal__day.is-level2 { background: #d6e5f5; }
.saijo-cal__day.is-level3 { background: #b4cfec; }
.saijo-cal__day.is-closed { background: #f1f1f1; }
.saijo-cal__date { font-size: 0.8rem; font-weight: 600; }
.saijo-cal__num { font-size: 1.25rem; font-weight: 700; line-height: 1.2; text-align: center; }
.saijo-cal__num small { font-size: 0.7rem; font-weight: 400; margin-left: 1px; }
.saijo-cal__sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 4px; margin-top: 2px; font-size: 0.85rem; color: var(--color-text, #222020); white-space: nowrap; }
.saijo-cal__sub b { font-size: 1.05rem; margin-left: 2px; }
.web-ai__group { margin: 8px 0 2px; font-size: 0.85rem; font-weight: 700; }
.web-ai__group--good { color: #2e7d32; }
.web-ai__group--caution { color: var(--color-danger); }
.web-ai__group--other { color: var(--color-muted); }
.web-ai__list--caution li { color: var(--color-danger); }
.saijo-cal__day.is-upcoming { border-style: dashed; background: #fbfcfe; opacity: 0.85; }
.saijo-cal__day.is-upcoming .saijo-cal__num { color: var(--color-muted); }
.saijo-cal__tag { margin-left: 4px; font-size: 0.65rem; font-weight: 600; color: #8a5a00; background: #fff4dc; border-radius: 3px; padding: 0 3px; }
.saijo-limit { margin: 10px 0 0; padding: 6px 10px; background: #edf0f5; border-radius: 6px; font-size: 0.9rem; }
.saijo-cal__closed { text-align: center; color: #b06a00; font-size: 0.85rem; margin-top: 8px; }
.saijo-cal__short, .saijo-cal__phone-hint { display: none; }
/* スマホは7日を画面の幅に収める(2026-11-18 ユーザー: 横にはみ出してマスをまたいでいた)。
   名前は「ダ」「式」に縮め、数字を縦に並べる。「予定」の札は点線の枠だけにする */
@media (max-width: 860px) {
  .saijo-cal-wrap { overflow-x: visible; margin: 10px -4px 4px; }
  .saijo-cal { min-width: 0; border-spacing: 2px; }
  .saijo-cal th { font-size: 0.75rem; padding: 0; }
  .saijo-cal__day { height: auto; min-height: 76px; padding: 3px 2px 4px; border-radius: 5px; overflow: hidden; }
  .saijo-cal__date { font-size: 0.72rem; line-height: 1.2; }
  .saijo-cal__tag { display: none; }
  .saijo-cal__num { font-size: 1.1rem; margin-top: 1px; }
  .saijo-cal__num small { font-size: 0.55rem; margin-left: 0; }
  /* スマホは「件」を出さない(2026-11-21 ユーザー: 2けたの件数だと「件」が下へ押し出されていた。件数のことは下の説明に書いてある) */
  .saijo-cal__unit { display: none; }
  .saijo-cal__sub { flex-direction: column; align-items: center; gap: 0; margin-top: 1px; font-size: 0.68rem; line-height: 1.35; }
  .saijo-cal__sub b { font-size: 0.8rem; margin-left: 1px; }
  .saijo-cal__long { display: none; }
  .saijo-cal__short { display: inline; }
  .saijo-cal__own { font-size: 0.62rem; }
  .saijo-cal__closed { font-size: 0.72rem; margin-top: 10px; }
  .saijo-cal__phone-hint { display: block; }
}

/* TODO(2026-11-17。付箋のようなカード) */
.todo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.todo-tools__sep { margin-left: 10px; }
.todo-chip { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #edf0f5; color: var(--color-text, #222020); font-size: 0.85rem; text-decoration: none; }
.todo-chip.is-on { background: #113961; color: #fff; }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.todo-card { border-radius: 10px; padding: 10px 12px; border: 1px solid rgba(0,0,0,.1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.todo-card.is-dragging { opacity: .5; }
.todo-card.is-later { opacity: .7; }
.todo-card--white { background: #fff; } .todo-card--yellow { background: #fff6c7; } .todo-card--green { background: #e0f5d8; }
.todo-card--blue { background: #dcecff; } .todo-card--pink { background: #f6e3f3; } .todo-card--orange { background: #ffe6cc; } .todo-card--gray { background: #e9eaec; }
.todo-card__head { display: flex; align-items: center; gap: 6px; }
.todo-card__head h2 { font-size: 1rem; margin: 0; flex: 1; }
.todo-items { list-style: none; margin: 6px 0 0; padding: 0; }
.todo-check-form { display: inline; margin: 0; }
.todo-check { display: flex; align-items: flex-start; gap: 6px; background: none; border: 0; padding: 2px 0; text-align: left; cursor: pointer; color: inherit; font: inherit; width: 100%; }
.todo-check__box { width: 16px; height: 16px; flex: none; border: 1.6px solid #555; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 3px; background: #fff; }
.is-done .todo-check__box { background: #555; color: #fff; }
.is-done .todo-check__text { text-decoration: line-through; color: #888; }
.todo-card__memo { margin: 6px 0 0; font-size: 0.85rem; color: var(--color-muted); white-space: pre-line; }
.todo-card__meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.todo-due, .todo-tag { font-size: 0.75rem; background: rgba(255,255,255,.75); border-radius: 10px; padding: 1px 7px; }
.todo-due.is-late { background: #fdebea; color: #a3261c; font-weight: 700; }
.todo-due.is-soon { background: #fff1d6; color: #8a5a00; font-weight: 700; }
.todo-av { width: 22px; height: 22px; border-radius: 50%; background: #2f5f93; color: #fff; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center; }
.todo-card__actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.todo-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.todo-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-color { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 14px; border: 1px solid #c9d2de; font-weight: normal; cursor: pointer; }
@media (max-width: 860px) { .todo-form__row { grid-template-columns: 1fr; } .todo-grid { grid-template-columns: 1fr; } }
/* スケジュール: 何日も続く予定の帯(2026-11-17 ユーザー: 安置室の表のように1本につなげる) */
.schedule-week__bars td.schedule-week__bar-cell { padding: 2px 3px; border-bottom: 0; }
.schedule-week__bars + tr td, .schedule-week__bars + .schedule-week__bars td { border-top: 0; }
.schedule-bar { display: block; padding: 2px 8px; border-radius: 5px; background: #cfe3f7; border: 1px solid #7aa7d6; color: #0f3a66; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-bar--colored { background: color-mix(in srgb, var(--menu-color) 22%, #fff); border-color: var(--menu-color); color: #222; }
.schedule-bar.is-cont-before { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.schedule-bar.is-cont-after { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.schedule-bar:hover { filter: brightness(0.97); }


/* ---------- 店舗ボード(2026-11-18 ユーザー: きららフラワー鴻巣店の開業準備・開業後の売上と棚卸し) ---------- */
.shop-head { margin: 6px 0 4px; }
.shop-head strong { color: var(--color-primary-dark); }
.shop-live { margin: 6px 0; padding: 8px 12px; border-radius: 8px; background: #fff6d6; border: 1px solid #ecd58a; color: #6b5300; cursor: pointer; font-weight: 600; }
.shop-tabs { margin-top: 8px; flex-wrap: wrap; }
.shop-concept { margin: 10px 0; padding: 10px 14px; border-left: 4px solid #2f8a52; background: #f1f8f3; border-radius: 6px; }
.shop-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0; }
.shop-tile { display: block; padding: 10px 14px; border: 1px solid var(--color-border, #c9d2de); border-radius: 8px; background: #fff; color: inherit; text-decoration: none; }
.shop-tile.is-alert { border-color: #e2a6a1; background: #fdf1f0; }
.shop-tile__lab { font-size: 0.85rem; color: var(--color-muted, #5c5852); }
.shop-tile__val { font-size: 1.5rem; font-weight: 700; margin: 2px 0; }
.shop-tile__val small { font-size: 0.85rem; font-weight: 400; }
.shop-bar { height: 8px; border-radius: 4px; background: #e6eaf0; overflow: hidden; }
.shop-bar span { display: block; height: 100%; background: #2f8a52; }
.shop-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
.shop-box { margin: 12px 0; }
.shop-box__title { font-size: 1rem; margin: 12px 0 6px; padding: 3px 10px; background: var(--band, #edf0f5); border-radius: 4px; }
.shop-box__title .hint { font-weight: 400; font-size: 0.8rem; margin-left: 6px; }
.shop-todo, .shop-events, .shop-changes { list-style: none; margin: 0; padding: 0; }
.shop-todo li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 2px; border-bottom: 1px dashed #d8dde5; }
.shop-todo li.is-overdue .shop-todo__due { color: #b3261e; font-weight: 700; }
.shop-todo__due { min-width: 70px; font-variant-numeric: tabular-nums; }
.shop-todo__title { flex: 1 1 260px; }
.shop-todo__status { white-space: nowrap; }
.shop-events li, .shop-changes li { padding: 5px 2px; border-bottom: 1px dashed #d8dde5; }
.shop-tag { display: inline-block; white-space: nowrap; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: #eef1f5; font-size: 0.78rem; }
.shop-tag--now { background: #fff1d6; color: #8a5a00; }
.shop-tag--done { background: #eceff3; color: #7a7f87; }
.shop-quick__form { display: inline; }
.shop-quick { border: 1px solid #c9d2de; background: #fff; color: #5c5852; border-radius: 12px; padding: 1px 8px; font: inherit; font-size: 0.8rem; cursor: pointer; margin: 1px 1px; }
.shop-quick.is-on { background: #2f5f93; border-color: #2f5f93; color: #fff; font-weight: 700; }
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0; }
.shop-tools__add { margin-left: auto; display: inline-flex; gap: 6px; }
.shop-table td { vertical-align: top; }
.shop-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-table__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-table__memo { min-width: 160px; max-width: 320px; font-size: 0.85em; color: #4a4744; white-space: pre-wrap; }
.shop-table__body { min-width: 260px; }
.shop-table tr.is-done td { color: #8a8f96; }
.shop-table tr.is-done td strong { color: #8a8f96; }
.shop-table tr.is-overdue td.shop-table__date { color: #b3261e; font-weight: 700; }
.shop-table tr.is-now td { background: #fffbea; }
.shop-table__total td { font-weight: 700; border-top: 2px solid #c9d2de; }
.shop-table__sub td { font-size: 0.85em; color: #5c5852; background: #f7f8fa; }
.shop-table td.is-minus { color: #b3261e; }
.shop-move { white-space: nowrap; }
.shop-table--tasks { table-layout: fixed; width: 100%; min-width: 900px; }
/* 長い文の表は画面の幅で折り返す(.table の min-width: max-content だと右にはみ出していた。2026-11-18 決定事項) */
.shop-table--wrap { min-width: 0; }
.shop-table--wrap td.shop-table__body { min-width: 0; overflow-wrap: anywhere; }
.shop-table__note { margin-top: 2px; font-size: 0.82em; color: var(--color-muted, #5c5852); white-space: pre-wrap; }
.shop-table--tasks td { overflow-wrap: anywhere; }
.shop-move form { display: inline; }
.shop-dialog__box { width: min(760px, 94vw); }
.shop-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.shop-form__wide { grid-column: 1 / -1; }
.shop-form__wide textarea { min-height: 90px; }
.shop-form__delete { margin-top: 10px; text-align: right; }
.shop-list { display: grid; gap: 8px; }
.shop-list__item { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid #c9d2de; border-radius: 8px; color: inherit; text-decoration: none; }
.shop-doc { border: 1px solid #c9d2de; border-radius: 8px; margin: 8px 0; padding: 8px 14px; background: #fff; }
.shop-doc > summary { cursor: pointer; font-size: 1.02rem; }
.shop-doc__actions { text-align: right; margin: 4px 0; }
.shop-doc__body { line-height: 1.8; }
.shop-doc__body ul { margin: 4px 0 8px 1.2em; }
.shop-doc__h { font-size: 1.05rem; margin: 16px 0 6px; padding-bottom: 3px; border-bottom: 2px solid #c9d2de; }
.shop-doc__h4 { font-size: 0.98rem; margin: 12px 0 4px; }
.shop-print { padding: 0; }
.shop-print__title { font-size: 1.15rem; margin: 0 0 8px; display: flex; justify-content: space-between; }
.shop-print__title span { font-size: 0.95rem; font-weight: 400; }
.shop-print__table { width: 100%; border-collapse: collapse; }
.shop-print__table th, .shop-print__table td { border: 1px solid #555; padding: 6px 8px; font-size: 0.95rem; }
.shop-print__at { width: 70px; white-space: nowrap; }
.shop-print__day { width: 42px; text-align: center; }
.shop-print__note { margin: 10px 0 4px; }
.shop-print__memo { height: 90px; border: 1px solid #555; }
@media print { @page shop-print { size: A4 landscape; margin: 10mm; } .shop-print { page: shop-print; } }
/* 棚卸表の印刷・PDF は A4 たて(2026-11-19) */
.shop-print__table td.num, .shop-print__table th.num { text-align: right; white-space: nowrap; }
.shop-print__total td { font-weight: 700; }
.shop-print__foot { margin-top: 8px; font-size: 0.8rem; color: #555; }
/* 棚卸表は1枚に40行ほど入るよう、行を低く・字を少し小さく(2026-11-19 ユーザー) */
.shop-print--stock .shop-print__table th, .shop-print--stock .shop-print__table td { padding: 2px 6px; font-size: 0.82rem; line-height: 1.25; }
/* 右の線が紙の端で半分切れて薄く見えた(2026-11-19 ユーザー)ので、表を少しだけ内側に */
.shop-print--stock .shop-print__table { width: calc(100% - 2px); }
.shop-print--stock .shop-print__title { font-size: 1.05rem; margin-bottom: 6px; }
.shop-print--stock .shop-print__note { margin: 6px 0 2px; font-size: 0.88rem; }
@media print { @page shop-print-stock { size: A4 portrait; margin: 10mm 12mm; } .shop-print--stock { page: shop-print-stock; } }
@media (max-width: 860px) {
  .shop-cols { grid-template-columns: 1fr; }
  .shop-form__grid { grid-template-columns: 1fr; }
  .shop-tools__add { margin-left: 0; }
  /* やることはスマホでは1件ずつの札(2026-11-18) */
  .shop-table--tasks { min-width: 0; table-layout: auto; }
  .shop-table--tasks colgroup, .shop-table--tasks thead { display: none; }
  .shop-table--tasks, .shop-table--tasks tbody, .shop-table--tasks tr, .shop-table--tasks td { display: block; width: auto; }
  .shop-table--tasks tr { position: relative; padding: 8px 64px 8px 4px; border-bottom: 1px solid var(--color-border, #c9d2de); }
  .shop-table--tasks td { border: 0; padding: 1px 0; }
  .shop-table--tasks td.shop-table__date, .shop-table--tasks td.hint { display: inline-block; margin-right: 8px; }
  .shop-table--tasks td:last-child { position: absolute; top: 8px; right: 4px; }
  .shop-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 4px; padding-bottom: 4px; }
  .shop-tabs .web-tabs__tab { flex: none; white-space: nowrap; padding: 4px 10px; font-size: 0.9rem; }
}

/* 一覧で長い文字を1行で「…」に(マウスを重ねると title で全部。2026-11-18 請求書一覧の請求先) */
.list-ellipsis { display: inline-block; max-width: 13em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* 火葬場の利用: 今月の火葬の件数を大きく(2026-11-18 ユーザー) */
.saijo-big { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.saijo-big > div { padding: 12px 18px; border: 1px solid var(--color-border, #c9d2de); border-radius: 8px; background: #fff; }
.saijo-big__main { border-left: 5px solid #2f5f93 !important; }
.saijo-big__lab { font-size: 0.92rem; color: var(--color-muted, #5c5852); font-weight: 600; }
.saijo-big__val { font-size: 2.6rem; font-weight: 800; line-height: 1.15; color: #1d3f66; font-variant-numeric: tabular-nums; }
.saijo-big__val small { font-size: 1rem; font-weight: 600; margin-left: 2px; }
.saijo-big__val--own { color: #2f8a52; font-size: 2.1rem; }
.saijo-big__val--hall { color: #8a5a00; font-size: 2.1rem; }
@media (max-width: 860px) { .saijo-big { grid-template-columns: 1fr 1fr; } .saijo-big__main { grid-column: 1 / -1; } }
/* 店舗ボード: スケジュール・TODO・トップの今日/明日(2026-11-18) */
.shop-box__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.shop-box__title--new { border-left: 4px solid #2f5f93; }
.shop-box__more { margin-left: auto; font-size: 0.82rem; font-weight: 400; text-decoration: none; }
.shop-box__title .home-day__switch { margin-left: 8px; }
.shop-agenda { list-style: none; margin: 0 0 6px; padding: 0; }
.shop-agenda li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 5px 2px 5px 8px; border-bottom: 1px dashed #d8dde5; }
.shop-agenda__at { min-width: 46px; font-weight: 700; color: #2f5f93; font-variant-numeric: tabular-nums; }
.shop-agenda--task .shop-agenda__at, .shop-agenda--task { color: #8a5a00; }
.shop-agenda--shop_event .shop-agenda__at { color: #a3261c; }
.shop-agenda--off .shop-agenda__at { color: #d0453b; }
.shop-agenda__who { margin-left: auto; font-size: 0.82rem; color: var(--color-muted, #5c5852); }
.shop-agenda__bar { background: #e0f5d8; border: 1px solid #9fd18e; border-radius: 4px; padding: 0 6px; color: #1f5f2c; font-weight: 700; text-decoration: none; }
.shop-agenda__due { min-width: 70px; font-weight: 700; color: #8a5a00; font-size: 0.85rem; }
.shop-agenda li.is-late .shop-agenda__due { color: #a3261c; }
.shop-agenda__title { font-weight: 700; color: inherit; text-decoration: none; }
.shop-agenda__check { border: 0; background: none; padding: 0; font: inherit; font-size: 0.85rem; color: #4a4744; cursor: pointer; }
.shop-agenda__check:hover { text-decoration: underline; }
.shop-changes__more > summary { cursor: pointer; color: var(--frame, #2f5f93); font-size: 0.88rem; margin: 6px 0; }
/* しおり: TODO の色を左の太い線で(2026-11-18 ユーザー: しおりみたいに色分け) */
.shop-bookmark { border-left: 6px solid #c9d2de !important; }
.shop-bookmark--white { border-left-color: #c9d2de !important; }
.shop-bookmark--yellow { border-left-color: #e6c229 !important; }
.shop-bookmark--green { border-left-color: #5fb34a !important; }
.shop-bookmark--blue { border-left-color: #4b8fd9 !important; }
.shop-bookmark--pink { border-left-color: #d36fbf !important; }
.shop-bookmark--orange { border-left-color: #ef8a2e !important; }
.shop-bookmark--gray { border-left-color: #8a8f96 !important; }
.shop-todo__from { font-size: 0.8rem; color: var(--frame, #2f5f93); margin: -2px 0 4px; }
.shop-week th.schedule-week__name { width: 110px; }
.shop-week__marks td { background: #fffbea; }
.shop-mark { display: block; font-size: 0.78rem; color: #8a5a00; line-height: 1.35; margin: 1px 0; }
.shop-mark--event { color: #a3261c; }
.shop-task__acts { white-space: nowrap; }
.shop-task__acts > * { display: inline-block; margin: 1px 0; }

/* 文字の大きさの下限(2026-11-18 ユーザー: デジタル庁デザインシステムを物差しに。本文や操作の字は 16px 以上・小さくても 14px まで)。
   パソコンの「標準」で 14px(0.875rem)より小さかった共通の部品だけを上げる。文字の大きさの設定(小さめ・大)にはそのまま比例する。
   スマホは前から大きめ(下の 860px 以下の決まり)なので触らない。印刷物(請求書・領収書など)は画面だけの決まりなので変わらない。
   カレンダーのマスやバッジの数字など、場所の狭い所は今のまま(デジタル庁の決まりでも、領域に制約がある所は例外) */
@media screen and (min-width: 861px) {
  .hint, .compact-list .hint, p.hint, div.hint,
  .field label, .compact-list .field label, .search-form .field label,
  .btn, .btn--sm, .search-form .btn:not(.btn--sm), .compact-list .btn:not(.btn--sm), .search-form__clear,
  .compact-list .field input, .compact-list .field select, .compact-list .field textarea,
  .sidebar__sub > summary, .sidebar__sub-empty, .sidebar__favs-edit, .sidebar__me-role { font-size: 0.875rem; }
  .sidebar__sub-manage { font-size: 0.875rem !important; }
  .required-badge { font-size: 0.8rem; }
}


/* システムの費用(2026-11-18) */
.cost-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cost-bars { margin: 6px 0 4px; }
.cost-bars-wrap--sp { display: none; }
@media (max-width: 860px) { .cost-bars-wrap--pc { display: none; } .cost-bars-wrap--sp { display: block; } }
.chart-axis--on { font-weight: 700; fill: #113961; }
.cost-table { margin: 4px 0 14px; }
.cost-table > summary { cursor: pointer; color: var(--frame, #2f5f93); font-size: 0.875rem; }
.cost-actions { white-space: nowrap; text-align: right; }
tr.is-ended td { color: var(--color-muted); }
.cost-ref { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 0.75rem; color: var(--color-muted); white-space: nowrap; }
.cost-tile--ref { border-style: dashed; background: transparent; }
.cost-tile--ref .web-tile__val { color: var(--color-muted); }
.cost-ref-cell { color: var(--color-muted); }
.cost-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 16px 0 6px; }
.cost-rate input[type=text] { width: 80px; }

/* 入金カレンダーの「最近手で入れた入金」(2026-11-19) */
.payment-calendar__recent { margin-top: 12px; }
.payment-calendar__recent > summary { cursor: pointer; color: var(--frame, #2f5f93); }
/* 店舗ボードの棚卸表(2026-11-19): 傷みありの行は状態を赤字に(.is-minus) */
.shop-stock__months { max-width: 720px; margin-bottom: 14px; }
/* 棚卸表: 区分の中の並び替え(↑↓)と区分の直し(2026-11-19) */
.shop-stock__move { white-space: nowrap; }
.shop-stock__move .shop-quick__form { display: inline-block; }
.shop-stock__cats { margin-top: 16px; }
.shop-stock__cats > summary { cursor: pointer; color: var(--frame, #2f5f93); font-weight: 600; padding: 4px 0; }
.shop-stock__cats .table-wrap { max-width: 720px; margin: 8px 0; }
.shop-stock__move .shop-dialog { display: inline-block; margin-left: 4px; }
.shop-stock__move .btn--sm { padding-left: 8px; padding-right: 8px; }
/* 棚卸表を表のまま入れる(2026-11-19 ユーザー: エクセルや請求書みたいに次々に入れたい) */
.stock-sheet { margin-top: 8px; }
.stock-sheet__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 6px; }
.stock-sheet__date { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.stock-sheet__date input { width: auto; }
.stock-sheet__table td { padding: 3px 4px; vertical-align: middle; }
.stock-sheet__table th { white-space: nowrap; }
.stock-sheet__table input, .stock-sheet__table select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 0.95rem; }
.stock-sheet__table td.num input { text-align: right; }
/* 欄の幅は見出しで決める(品目の欄が広がって右にはみ出さないように) */
.stock-sheet__table { table-layout: fixed; width: 100%; min-width: 860px; }
.stock-sheet__table th:nth-child(1) { width: 8em; }
.stock-sheet__table th:nth-child(3) { width: 5.5em; }
.stock-sheet__table th:nth-child(4) { width: 6.5em; }
.stock-sheet__table th:nth-child(5) { width: 7em; }
.stock-sheet__table th:nth-child(6) { width: 7.5em; }
.stock-sheet__table th:nth-child(7) { width: 15%; }
.stock-sheet__table th:nth-child(8) { width: 8em; }
.stock-sheet__amount { white-space: nowrap; overflow: hidden; }
.stock-sheet__ops { white-space: nowrap; }
.stock-sheet__ops .btn--sm { padding: 3px 8px; }
.stock-sheet__table tr.is-damaged td[data-label="状態"] select { color: #b3261e; border-color: #b3261e; }
.stock-sheet__total td { font-weight: 700; border-top: 2px solid #c9d2de; }
.stock-sheet__actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; position: sticky; bottom: 0; background: var(--color-surface, #fff); padding: 8px 0; z-index: 2; }
.stock-sheet__actions .btn:last-child { margin-left: auto; }
.stock-sheet__status { color: #b3261e; }
@media (max-width: 860px) {
  /* スマホは1行をカードにして、欄を2列に並べる */
  .stock-sheet__table thead { display: none; }
  .stock-sheet__table, .stock-sheet__table tbody, .stock-sheet__table tfoot { display: block; width: 100%; min-width: 0; }
  .stock-sheet__table tr.stock-sheet__row {
    display: grid; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid #c9d2de;
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas: "cat cat cat cond cond cond" "item item item item item item" "qty qty unit unit amt amt" "memo memo memo memo ops ops";
  }
  .stock-sheet__table tr.stock-sheet__row[hidden] { display: none; }
  .stock-sheet__table tr.stock-sheet__row td { display: block; width: auto !important; min-width: 0; border: 0; padding: 0; background: transparent !important; }
  .stock-sheet__table tr.stock-sheet__row td[data-label]::before { content: attr(data-label); display: block; font-size: 0.78rem; color: var(--color-muted, #5c5852); text-align: left; }
  .stock-sheet__table td[data-label="区分"] { grid-area: cat; }
  .stock-sheet__table td[data-label="状態"] { grid-area: cond; }
  .stock-sheet__table td[data-label="品目"] { grid-area: item; }
  .stock-sheet__table td[data-label="数量"] { grid-area: qty; }
  .stock-sheet__table td[data-label="単価"] { grid-area: unit; }
  .stock-sheet__table td[data-label="金額"] { grid-area: amt; align-self: end; padding-bottom: 8px; }
  .stock-sheet__table td[data-label="メモ"] { grid-area: memo; }
  .stock-sheet__ops { grid-area: ops; align-self: end; text-align: right; }
  .stock-sheet__ops .btn--sm { padding: 4px 7px; }
  .stock-sheet__table tfoot tr { display: flex; justify-content: space-between; padding: 8px 0; }
  .stock-sheet__actions { bottom: calc(var(--tab-bar-h, 64px) + 12px); }
}
.shop-stock__months--below { margin-top: 18px; }
/* 顧客の登録・直す画面の対象者の欄の「会員価格」(2026-11-20) */
.member-pick { margin: 10px 0 6px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.member-pick__choices { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 4px; }
.member-pick__done { margin: 4px 0; color: #2f6b3a; }
.member-pick__search { display: flex; gap: 6px; align-items: center; margin: 6px 0; max-width: 520px; }
.member-pick__search input { flex: 1 1 auto; min-width: 0; }
.member-pick__list { display: flex; flex-direction: column; gap: 4px; }
.member-pick__cand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; text-align: left; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-surface); color: var(--color-text); font: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
.member-pick__cand:hover { border-color: var(--frame, #2f5f93); }
.member-pick__cand.is-on { border-color: #2f6b3a; background: #e3f1e5; }
.member-pick__cand.is-disabled { opacity: 0.6; cursor: not-allowed; }
.member-pick__ng { color: var(--color-danger); font-size: 0.85rem; }
.member-pick__chosen { margin: 4px 0; color: #2f6b3a; }
/* スマホのホームのお知らせ: 短い文字と件数の小さな札を3列に(2026-11-20 ユーザー: スマホは画面が小さい。パソコンは今の帯のまま) */
.home__tiles { display: none; }
@media (max-width: 860px) {
  .home-hero .home__notices, .home__notices { display: none !important; }
  .home__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .home__tile { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 6px; align-items: center; padding: 6px 7px; min-width: 0;
    border-radius: 10px; background: #feecd2; border: 1px solid #f6d5a6; color: var(--color-text); text-decoration: none; line-height: 1.15; }
  .home__tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); color: #a8650a; }
  .home__tile-icon svg { width: 14px; height: 14px; }
  .home__tile-text { display: flex; flex-direction: column; min-width: 0; }
  .home__tile-label { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .home__tile-text strong { font-size: 0.95rem; color: #8a4f00; white-space: nowrap; }
  .home__tile--error { background: #fdebea; border-color: #f2c4bf; }
  .home__tile--error .home__tile-icon { color: #c0392b; }
  .home__tile--error strong { color: #a5281c; }
  .home__tile--member { background: repeating-linear-gradient(-45deg, #d62f1f 0 14px, #e2452f 14px 28px); border-color: #c0261a; color: #fff; }
  .home__tile--member .home__tile-icon { background: rgba(255, 255, 255, 0.25); color: #fff; }
  .home__tile--member strong { color: #fff; }
}

/* 今期のまとめの「比べる年」(2026-11-22) */
.dash-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.dash-compare__label { font-size: 0.85rem; font-weight: 600; color: var(--color-muted); margin-right: 2px; }
.dash-compare__btn { display: inline-flex; flex-direction: column; align-items: center; min-width: 4.6em; padding: 3px 10px; border: 1px solid var(--frame, #2f5f93); border-radius: var(--radius-control, 6px); color: var(--frame, #2f5f93); background: var(--color-surface); text-decoration: none; font-weight: 600; font-size: 0.88rem; line-height: 1.3; }
.dash-compare__btn small { font-size: 0.72rem; font-weight: 400; }
.dash-compare__btn.is-on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
@media (max-width: 860px) { .dash-compare__btn { flex: 1 1 0; min-width: 0; padding: 3px 2px; } .dash-compare__label { flex-basis: 100%; }
  /* 「2025年度」の「度」だけ次の行に落ちていた(2026-11-22 ユーザー)→ 1行のまま、狭い画面では字を少し小さく */
  .dash-compare__btn small { white-space: nowrap; font-size: min(0.72rem, 2.8vw); letter-spacing: -0.02em; } }
/* Dashboard の累計の比べ(2026-11-21。2026-11-22 表から札の形に) */
.dash-cum { margin: 14px 0; }
.dash-cum__sub { margin: 12px 0 6px; font-size: 0.95rem; }
.dash-cum__sub:first-of-type { margin-top: 6px; }
.dash-cum__range { font-size: 0.82em; font-weight: 400; color: var(--color-muted); }
.dash-cum__kpis { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dash-cum__change { font-weight: 700; }
.dash-cum__change.is-up { color: #1f7a3c; }
.dash-cum__change.is-down { color: #b3261e; }
.dash-cum__frac { font-size: 0.7em; font-weight: 400; color: var(--color-muted); }
.dash-cum__months { font-size: 0.9em; }
.dash-cum__total { border-width: 2px; }
.dash-cum__note { margin: 4px 0 6px; }
/* 計画数値の比較(2026-11-23。plan_comparisons/show) */
.plan-cmp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.plan-cmp__label { font-size: 0.85rem; font-weight: 600; color: var(--color-muted); }
.plan-cmp__label--gap { margin-left: 10px; }
.plan-cmp__now { background: var(--color-primary); border-color: var(--color-primary); color: #fff; pointer-events: none; }
a.plan-cmp__now { pointer-events: auto; }
.plan-cmp__head { font-size: 1rem; margin: 18px 0 8px; }
.plan-cmp__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.plan-cmp__kpi .dash-kpi__value { font-size: 1.35rem; }
.plan-cmp__kpi .dash-kpi__value small { font-size: 0.72rem; font-weight: 400; color: var(--color-muted); }
.plan-cmp__meter { position: relative; height: 8px; margin: 6px 0 4px; border-radius: 4px; background: var(--band, #edf0f5); }
.plan-cmp__meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #2f6fb3; }
.plan-cmp__meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #3b4350; }
.plan-cmp__st { display: block; font-size: 0.85rem; font-weight: 700; }
.plan-cmp .is-up { color: #1f7a3c; }
.plan-cmp .is-down { color: #b3261e; }
.plan-cmp__none { font-size: 0.85rem; color: var(--color-muted); margin-top: 6px; }
.plan-cmp__note { margin: 6px 0 0; }
.plan-cmp__catch { margin-top: 12px; }
.plan-cmp__charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.plan-cmp__chart { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; background: var(--color-surface); }
.plan-cmp__chart h3 { font-size: 0.95rem; margin: 0 0 4px; }
.plan-cmp__legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.8rem; color: var(--color-muted); margin-bottom: 4px; }
.plan-cmp__legend span { display: inline-flex; align-items: center; gap: 6px; }
.plan-cmp__sw-bar { width: 14px; height: 10px; border-radius: 2px; background: #2f6fb3; }
.plan-cmp__sw-est { width: 14px; height: 10px; border-radius: 2px; border: 2px solid #2f6fb3; box-sizing: border-box; }
.plan-cmp__sw-plan { width: 16px; height: 2px; background: #3b4350; }
.plan-cmp__sw-line { width: 18px; border-top: 2px solid #2f6fb3; }
.plan-cmp__sw-dash { width: 18px; border-top: 2px dashed #3b4350; }
.plan-cmp__grid { stroke: #e3e8ef; stroke-width: 1; }
.plan-cmp__axis { font-size: 11px; fill: var(--color-muted); }
.plan-cmp__label-svg { font-size: 11px; fill: var(--color-text, #222020); }
.plan-cmp__col { fill: #2f6fb3; }
.plan-cmp__est { fill: rgba(47, 111, 179, 0.12); stroke: #2f6fb3; stroke-width: 2; }
.plan-cmp__plan { stroke: #3b4350; stroke-width: 2; }
.plan-cmp__cum-plan { fill: none; stroke: #3b4350; stroke-width: 2; stroke-dasharray: 5 4; }
.plan-cmp__cum-act { fill: none; stroke: #2f6fb3; stroke-width: 2; }
.plan-cmp__dot { fill: #2f6fb3; stroke: #fff; stroke-width: 2; }
.plan-cmp__table td.num, .plan-cmp__table th { text-align: right; white-space: nowrap; }
.plan-cmp__table td:first-child, .plan-cmp__table th:first-child { text-align: left; white-space: nowrap; }
.plan-cmp__total td { font-weight: 700; border-top: 2px solid var(--color-border); }
.plan-cmp__table tr.is-on td:first-child { box-shadow: inset 3px 0 0 var(--color-primary); }
.plan-cmp__actual td { border-bottom-width: 2px; }
@media (max-width: 860px) {
  .plan-cmp__charts { grid-template-columns: 1fr; }
  .plan-cmp__kpi .dash-kpi__value { font-size: 1.15rem; }
  .plan-cmp__label--gap { margin-left: 0; flex-basis: 100%; }
  /* グラフは画面の幅に縮むので、目盛りの字は大きめに(縮んでも読める大きさ) */
  .plan-cmp__axis, .plan-cmp__label-svg { font-size: 19px; }
}
/* 追いつくには(2026-11-22) */
.dash-catch { margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-control, 6px); background: var(--band, #edf0f5); }
.dash-catch__head { font-weight: 700; font-size: 0.92rem; }
.dash-catch__list { margin: 4px 0 0; padding-left: 1.2em; font-size: 0.92rem; line-height: 1.6; }
.dash-catch__label { display: inline-block; min-width: 11em; color: var(--color-muted); }
.dash-catch .is-up { color: #1f7a3c; }
.dash-catch .is-down { color: #b3261e; }
@media (max-width: 860px) { .dash-catch__label { display: block; min-width: 0; } }
/* スマホは2列(売上は桁が多いので1行まるごと。あいた所に次の札を詰める)。字は少し小さく */
@media (max-width: 860px) {
  .dash-cum__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 6px; }
  .dash-cum__kpis .dash-cum__wide { grid-column: 1 / -1; }
  .dash-cum__kpis .dash-kpi { padding: 6px 8px; }
  .dash-cum__kpis .dash-kpi__value { font-size: 1.05rem; }
  .dash-cum__kpis .dash-kpi__value small { display: block; }
}

/* スマホの下の帯の5つの最初の画面(ホーム・通知・アプリ・個人設定・メニュー)の字の大きさをそろえる(2026-11-21 ユーザー: 最初の画面は
   なるべくそろえたい。飛び先の画面は多少違ってもよい)。字の大きさの設定(小さめ・標準・大)に合わせて変わるよう rem で決める
   (標準のスマホで 1rem = 17px):
   ・項目(一覧の行・設定の値・メニューの項目) 1rem(17px)
   ・区切りの見出し(ホームの枠の見出し・お気に入り・自分の情報など) 0.94rem(16px)・太字
   ・アイコンの名前(アプリ・メニューの左) 0.82rem(14px)
   ・小さい字(時刻・説明・ボタン) 0.82rem(14px)
   ・札(メッセージ・ワークフローなどの色の札・件数) 0.7rem(12px)
   ファイルの一番下に置く(前の決まりより後に効くように) */
@media (max-width: 860px) {
  /* ホーム */
  .home .home-list { font-size: 1rem; }
  .home .home-card__title, .home .home-card__title a { font-size: 0.94rem; font-weight: 700; }
  .home .hint, .home .home-day__btn, .home .schedule-item__tag { font-size: 0.82rem; }
  .home .home__tile-label { font-size: 0.7rem; }
  /* 通知 */
  .notices .notices__body, .notices .notices__body strong { font-size: 1rem; }
  .notices .notices__seg-btn { font-size: 0.94rem; }
  .notices .notices__time, .notices .notices__sub-tag, .notices .hint { font-size: 0.82rem; }
  .notices .notice-tag { font-size: 0.7rem; }
  .notices .home-card__title { font-size: 0.94rem; }
  /* アプリ */
  .apps-page .apps-favs__head { font-size: 0.94rem; }
  .apps-page .apps-favs__edit { font-size: 0.82rem; }
  .apps-page .apps-tile__label, .apps-page .apps-fav__label { font-size: 0.82rem; }
  .apps-page .apps-tile__count { font-size: 0.7rem; }
  /* 個人設定 */
  .account-page .section-title { font-size: 0.94rem; }
  .account-page dt, .account-page dd { font-size: 1rem; }
  .account-page .hint, .account-page .btn, .card.account-page .btn, .account-page .font-scale__option, .account-page .home-scene-choice span { font-size: 0.82rem; }
  /* メニュー */
  .mobile-menu .mobile-menu__pane a { font-size: 1rem; }
  .mobile-menu .mobile-menu__group { font-size: 0.82rem; }
  .mobile-menu .mobile-menu__sec-head { font-size: 0.82rem; }
}
