@charset "utf-8";
/* HDS 部品：ボタン・カード・チップ・表・フォーム・フラッシュ・ページャ */

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-base); line-height: 1.3; cursor: pointer; white-space: nowrap;
  background: var(--paper-alt); color: var(--ink); transition: background .12s, box-shadow .12s;
}
.btn:hover { text-decoration: none; background: #e9ede8; }
.btn > i { line-height: inherit; }
/* ボタンの中のチップ（「送信済み」など）は文字 1 行に収め、ボタンの高さを変えない */
.btn .chip { line-height: 1.2; padding: 1px 7px; margin-left: 2px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { background: var(--paper-alt); }
.btn--outline { background: var(--paper); border-color: var(--primary); color: var(--primary-dark); }
.btn--outline:hover { background: var(--primary-tint); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--sm { padding: 5px 10px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-google { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-google:hover { background: var(--paper-alt); }
.btn-google svg { width: 18px; height: 18px; }

/* ---- カード ---- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card + .card, .card ~ dialog + .card { margin-top: var(--sp-4); }   /* 欄の中のモーダル（dialog）を挟んでも空ける */
.card__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.card__title { font-size: var(--fs-base); font-weight: 700; color: var(--primary-deep); display: flex; align-items: center; gap: 8px; }
.card__title .fa-solid { color: var(--primary); }
.card__actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.card__head__action { margin-left: auto; }
.card__body { padding: var(--sp-4); }
.card__body--flush { padding: 0; }

/* ---- チップ・バッジ ---- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; background: var(--paper-alt); color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip--current { background: var(--primary-tint); color: var(--primary-deep); border-color: var(--primary-soft); }
.chip--past { color: var(--muted); }
.chip--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip--accent { background: #fbf1dd; color: #7a5410; border-color: #f0dcae; }
.chip--danger { background: #fbe4e2; color: var(--danger); border-color: #f2c4bf; }

/* ---- 表 ---- */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 9px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { font-weight: 600; color: var(--muted); font-size: var(--fs-xs); letter-spacing: .04em; background: var(--paper-alt); white-space: nowrap; }
.table tbody tr:hover { background: var(--primary-tint); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-num, .table .t-right { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-muted td { opacity: .55; }
.table .t-nowrap { white-space: nowrap; }
.table .t-ellipsis { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__body--flush { overflow-x: auto; }
.table th.is-sorted { color: var(--primary-deep); }
.th-sort { color: inherit; }
.th-sort:hover { color: var(--primary-dark); text-decoration: none; }
.th-sort .fa-solid { font-size: 11px; margin-left: 2px; }
.row-link { color: var(--ink); font-weight: 600; }
.row-link:hover { color: var(--primary-dark); }

/* ---- キーバリュー ---- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--sp-4); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }

/* ---- フォーム ---- */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-3) var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 4px; grid-column: span 12; min-width: 0; }
.field--6 { grid-column: span 6; }
.field--4 { grid-column: span 4; }
.field--3 { grid-column: span 3; }
.field--8 { grid-column: span 8; }
.field--2 { grid-column: span 2; }
.field--5 { grid-column: span 5; }
.field--7 { grid-column: span 7; }
.field--9 { grid-column: span 9; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.label .req { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); font-size: var(--fs-base); transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.textarea { min-height: 96px; resize: vertical; }
.textarea--sm { min-height: 72px; }
.help { font-size: var(--fs-xs); color: var(--muted); }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.inline-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { grid-column: auto; min-width: 120px; flex: 1; }
.inline-form .field--fixed { flex: 0 0 auto; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* 年・月・日の 3 欄。狭い欄（所属モーダルの半幅）では縮む。入力欄自身の最小幅を外すのが要点 */
.ymd { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ymd .input { width: 4.4em; min-width: 3em; flex: 0 1 auto; text-align: right; padding-left: 8px; padding-right: 8px; }
.ymd .input:first-child { width: 5.4em; min-width: 3.8em; }
/* 数値の上下ボタンは場所を取るだけなので消す（年月日は直接打つ） */
.ymd .input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.ymd .input[type="number"]::-webkit-outer-spin-button,
.ymd .input[type="number"]::-webkit-inner-spin-button { appearance: none; margin: 0; }
.ymd span { font-size: var(--fs-sm); color: var(--muted); margin-right: 6px; flex: 0 0 auto; }
/* 変更できない値（所属モーダルの「名前」「組織」など）は入力欄と同じ高さで見せる */
.fixed-value { margin: 0; padding: 7px 2px; font-weight: 700; color: var(--primary-deep); }
fieldset legend { font-size: var(--fs-sm); font-weight: 700; color: var(--primary-deep); margin-bottom: var(--sp-2); }

/* ---- 検索バー ---- */
.searchbar { display: flex; gap: var(--sp-2); align-items: center; }
.searchbar .input { max-width: 420px; }

/* ---- フラッシュ ---- */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: var(--sp-3); font-size: var(--fs-sm); border: 1px solid; display: flex; gap: 8px; align-items: center; }
.flash--info { background: #eaf2fb; border-color: #c6dbf3; color: #1e4e8c; }
.flash--success { background: var(--primary-tint); border-color: var(--primary-soft); color: var(--primary-deep); }
.flash--error { background: #fdecea; border-color: #f5c6c1; color: #8f2318; }
.flash[hidden], .btn[hidden] { display: none; }   /* クラスの display が [hidden] に勝ってしまうため（パスキーの知らせの欄・対応しないブラウザのボタン） */

/* ---- ページャ ---- */
/* 一覧の件数表示とページ送り（上と下の両方に置く。_list_pager.html） */
.pager { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); flex-wrap: wrap; }
.pager .btn { padding: 4px 10px; }
.pager__count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager__count strong { color: var(--primary-deep); }
.pager__nav { display: flex; align-items: center; gap: 2px; }
.pager__link { min-width: 32px; height: 30px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--radius);
               color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.pager__link:hover { background: var(--primary-tint); color: var(--primary-deep); }
.pager__link.is-current { background: var(--primary); color: #fff; font-weight: 700; }
.pager__link.is-disabled { color: var(--line-strong); pointer-events: none; }
.pager__gap { color: var(--muted); }
.pager--bottom { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); background: var(--paper-alt);
                 border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pager--bottom .pager__nav { margin: 0 auto; }
.pager__top { color: var(--primary-dark); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .pager--bottom .pager__nav { margin: 0; } }

/* ---- 空状態 ---- */
.empty { padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.empty .fa-solid { font-size: 28px; color: var(--primary-soft); margin-bottom: var(--sp-2); display: block; }

/* ---- タイル（ポータル）---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-3); }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: var(--sp-4);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--ink); box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tile:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-1px); border-color: var(--primary-soft); }
.tile__icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary); font-size: 18px;
}
.tile__label { font-weight: 700; font-size: var(--fs-base); }
.tile__desc { font-size: var(--fs-xs); color: var(--muted); min-height: 1.4em; }
.tile--soon { opacity: .55; box-shadow: none; }
.tile--soon:hover { transform: none; box-shadow: none; border-color: var(--line); cursor: default; }
.tile--soon .tile__icon { background: var(--paper-alt); color: var(--muted); }
.tile__soon { font-size: 10px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 0 6px; align-self: flex-start; }
.tile-group { margin-bottom: var(--sp-5); }
.tile-group__title { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-bottom: var(--sp-3); }

@media (max-width: 640px) {
  .field--6, .field--4, .field--3, .field--8, .field--2, .field--5, .field--7, .field--9 { grid-column: span 12; }
}

/* ---- モーダル（<dialog>）---- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--paper); color: var(--ink);
         width: min(880px, 94vw); max-height: 90vh; box-shadow: 0 20px 60px rgba(30, 24, 21, .25); }
.modal::backdrop { background: rgba(30, 24, 21, .45); backdrop-filter: blur(1px); }
.modal__form { display: flex; flex-direction: column; max-height: 90vh; }
.modal__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--paper-alt); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal__title { font-size: var(--fs-lg); color: var(--primary-deep); display: flex; align-items: center; gap: 8px; margin: 0; }
.modal__title .fa-solid { color: var(--primary); }
.modal__close { margin-left: auto; background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: var(--radius); }
.modal__close:hover { background: var(--line); color: var(--ink); }
.modal__body { padding: var(--sp-4); overflow: auto; flex: 1; }
.modal__foot { display: flex; gap: var(--sp-2); justify-content: flex-end; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
body.has-modal { overflow: hidden; }

/* ---- 一覧: 選択・詳細検索・出力 ---- */
.card__head--stack { flex-wrap: wrap; row-gap: var(--sp-3); }
.card__head--stack .searchbar { flex: 1 1 100%; flex-wrap: wrap; }
.card__head--stack .searchbar .input[type="search"] { flex: 1 1 320px; max-width: 520px; }
.btn.is-active { background: var(--primary-tint); color: var(--primary-deep); border-color: var(--primary-soft); }
.adv { flex: 1 1 100%; padding: var(--sp-3) var(--sp-4); background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.adv__actions { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }
/* 一覧の集計（件数・延べ時間・関わった相手）。統計の入り口 */
.statbar { display: flex; gap: var(--sp-4); flex-wrap: wrap; flex: 1 1 100%; padding: var(--sp-2) var(--sp-3);
           background: var(--primary-tint); border-radius: var(--radius); font-size: var(--fs-sm); color: var(--primary-deep); }
.statbar .fa-solid { opacity: .7; margin-right: 4px; }
/* ---- リッチテキスト（行動記録の内容・上長コメント）---- */
.editor { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.editor__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px;
                   border-bottom: 1px solid var(--line); background: var(--paper-alt); }
.editor__btn { border: 0; background: none; width: 30px; height: 28px; border-radius: var(--radius); color: var(--ink-2);
               cursor: pointer; display: grid; place-items: center; font-size: 13px; }
.editor__btn:hover { background: var(--line); color: var(--ink); }
.editor__btn--swatch { width: 22px; }
.editor__swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .18); display: block; }
.editor__btn--marker .editor__swatch { height: 9px; border-radius: 2px; }
.editor__sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; }
.editor__note { font-size: var(--fs-xs); color: var(--muted); margin-left: 6px; }
.editor__body { padding: 10px 12px; max-height: 50vh; overflow: auto; line-height: 1.8; outline: none; }
.editor__body:empty::before { content: attr(data-placeholder); color: var(--muted); }

/* 保存された内容の表示 */
.prose { line-height: 1.8; }
.prose img, .editor__body img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin: 6px 0; }
.prose p, .editor__body p { margin: 0 0 .6em; }
.prose p:last-child, .editor__body p:last-child { margin-bottom: 0; }
.prose ul, .prose ol, .editor__body ul, .editor__body ol { padding-left: 1.4em; margin: .4em 0; }
.prose a, .editor__body a { color: var(--primary-dark); text-decoration: underline; }
/* ---- システム設定 ---- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-3); }
.theme-item { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.theme-item input[type="color"] { width: 42px; height: 32px; padding: 2px; border: 1px solid var(--line-strong);
                                  border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.option-row { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.option-row .input { flex: 1 1 140px; min-width: 0; }
.option-row .input.mono { flex: 0 1 140px; }
.option-row__usage { flex: 0 0 auto; min-width: 8em; }
ul.plain { margin: 0; padding-left: 1.2em; }
ul.plain li { margin-bottom: 4px; }

/* ---- 並べ替えできる一覧（参加者など）---- */
.sort-handle { color: var(--line-strong); cursor: grab; padding: 2px 2px 0; align-self: flex-start; }
.sort-handle:hover { color: var(--muted); }
.sort-handle:active { cursor: grabbing; }
[data-sort-id].is-dragging { opacity: .45; }
[data-sort-id].is-over { background: var(--primary-tint); }
[data-sortable].is-saved { animation: sorted .7s ease; }
@keyframes sorted { from { background: var(--primary-tint); } to { background: transparent; } }

/* ---- 参加者の選択（氏名・組織であいまい検索）---- */
.picker { position: relative; display: flex; flex-direction: column; gap: 6px; }
.picker__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picker__chips:empty { display: none; }
.chip--person { background: var(--primary-tint); color: var(--primary-deep); border-color: var(--primary-soft);
                display: inline-flex; align-items: center; gap: 6px; padding-right: 4px; }
.chip__x { border: 0; background: none; color: inherit; cursor: pointer; opacity: .6; padding: 0 2px; font-size: 12px; }
.chip__x:hover { opacity: 1; }
.picker__bar { display: flex; align-items: center; gap: var(--sp-3); }
.picker__bar[hidden], .picker[hidden] { display: none; }   /* クラスの display が [hidden] に勝ってしまうため */

/* 伝票の宛先のように「選んだ 1 件」を主役にしたいピッカー */
.picker--lead [data-picker-chosen] { padding: 2px 0; }
.picker--lead .chip { font-size: var(--fs-lg); padding: 6px 6px 6px 12px; gap: 8px; }
.picker--lead .chip .muted { font-size: var(--fs-sm); }
.picker--lead .chip__x { font-size: 15px; padding: 0 4px; }
.picker__bar .input { flex: 1 1 auto; }
.picker__results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px;
                   list-style: none; background: var(--paper); border: 1px solid var(--line-strong);
                   border-radius: var(--radius); box-shadow: var(--shadow-lg, 0 12px 32px rgba(30, 24, 21, .18));
                   max-height: 300px; overflow: auto; }
.picker__item { display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 8px; border-radius: var(--radius);
                cursor: pointer; font-size: var(--fs-sm); }
.picker__item:hover { background: var(--primary-tint); }
.picker__item--past { color: var(--muted); }
.picker__name { font-weight: 600; white-space: nowrap; }
.picker__sub { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__empty { padding: 8px; color: var(--muted); font-size: var(--fs-sm); }
.picker__item--individual .picker__sub { color: var(--primary-dark); }
.picker__create { border-top: 1px dashed var(--line); margin-top: 4px; color: var(--primary-dark); font-weight: 600; }
.picker__create .fa-solid { margin-right: 6px; }

.approved { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-3); padding: var(--sp-3);
            background: var(--primary-tint); border-radius: var(--radius); color: var(--primary-deep); font-size: var(--fs-sm); }
.approved .fa-stamp { font-size: 20px; }
.prose blockquote, .editor__body blockquote { margin: .4em 0; padding-left: var(--sp-3); border-left: 3px solid var(--primary-soft); color: var(--ink-2); }
.seltools { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 100%; flex-wrap: wrap; }
.seltools__count { font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 6em; }
.seltools .pager { margin-left: auto; }
.table .t-check { width: 36px; text-align: center; padding-left: 10px; padding-right: 6px; }
.table .t-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.table tbody tr { cursor: default; }
.table tbody tr.is-selected { background: var(--primary-tint); }
.table tbody tr.is-selected:hover { background: #dcefe2; }
.modal--sm { width: min(640px, 94vw); }

/* ---- 画像の拡大（写真・名刺）。別タブではなく重ねて見せる ---- */
.lightbox { border: 0; padding: 0; background: transparent; width: auto; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(30, 24, 21, .74); backdrop-filter: blur(2px); }
.lightbox__img { display: block; margin: 0 auto; max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: var(--radius);
                 background: var(--paper); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.lightbox__foot { display: flex; align-items: center; gap: var(--sp-3); justify-content: space-between; color: #fff; padding: 10px 2px 0; font-size: var(--fs-sm); }
.lightbox__caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__open { color: #fff; border: 1px solid rgba(255, 255, 255, .45); background: transparent; flex: 0 0 auto; }
.lightbox__open:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.lightbox__close, .lightbox__nav { position: fixed; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
                                   border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .16); font-size: 17px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .32); }
.lightbox__close { top: 16px; right: 20px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav[hidden] { display: none; }
/* クリックで拡大できる画像 */
a[data-lightbox] { cursor: zoom-in; display: inline-block; }
.modal--wide { width: min(1180px, 96vw); }
.modal__foot .foot-left { margin-right: auto; }
.export-tools { display: flex; gap: 6px; margin: 4px 0 8px; }
.export-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; }
@media (max-width: 640px) { .export-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- 伝票の明細（編集） ---- */
.btn--xs { padding: 2px 6px; font-size: var(--fs-xs); line-height: 1.2; }
.select--sm, .input--line { font-size: var(--fs-sm); padding: 4px 6px; }
.input--line { line-height: 1.4; }
.table--lines .col-move .btn { padding: 2px 3px; }
.table-scroll { overflow-x: auto; }

/* 明細は横に収めて縦に送る（建築などで行数が多くなるため、枠は固定） */
.lines-scroll { max-height: 56vh; overflow-y: auto; overflow-x: auto; border-bottom: 1px solid var(--line); }
.table--lines { table-layout: fixed; min-width: 880px; font-size: var(--fs-sm); }
.table--lines thead th { position: sticky; top: 0; z-index: 2; background: var(--paper);
                         box-shadow: inset 0 -1px 0 var(--line); }
.table--lines td { padding: 3px 4px; vertical-align: middle; }
/* 入力欄の高さをそろえる（バラバラだと目で追いにくい） */
.table--lines .input, .table--lines .select { height: 30px; padding: 2px 6px; font-size: var(--fs-sm); }
.table--lines .col-move   { width: 5.2em; padding-right: 10px; }
.table--lines .col-kind   { width: 7.2em; }
.table--lines .col-qty    { width: 5em; }
.table--lines .col-unit   { width: 4.8em; }
.table--lines .col-price  { width: 9em; }
.table--lines .col-tax    { width: 7.4em; }
.table--lines .col-amount { width: 8.4em; }
.table--lines .col-cost   { width: 8em; }
.table--lines .col-x      { width: 2.6em; }
/* マイナスは赤字（画面も帳票も） */
.is-negative, .table--lines .input.is-negative { color: var(--danger); }
/* 行のドラッグ並べ替え */
.table--lines tr.is-dragging { opacity: .45; }
.table--lines .group-sum { font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.table--lines tr.is-drop-target td { box-shadow: inset 0 2px 0 var(--primary); }
.table--lines .col-move .drag { cursor: grab; color: var(--muted); padding: 2px 4px; }
.table--lines .col-move .drag:active { cursor: grabbing; }

/* 合計は数字を右でそろえる */
.kv--num dd { text-align: right; font-variant-numeric: tabular-nums; font-size: var(--fs-lg); }
.kv--num dt { align-self: center; }

/* フォームの小見出し */
.subhead { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-2);
           font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.subhead::after { content: ''; flex: 1 1 auto; border-top: 1px solid var(--line); }
.subhead .btn { flex: 0 0 auto; order: 2; }
.subhead::after { order: 1; }
.table--lines .input, .table--lines .select { width: 100%; }
.table--lines tr.row-heading .input--line { font-weight: 600; }

/* 明細の行の色分け（見出し・明細・注記）。色はシステム設定 */
tr.row-heading > td { background: var(--row-heading); }
tr.row-item > td    { background: var(--row-item); }
tr.row-note > td    { background: var(--row-note); }
tr.row-heading > td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.table--lines tr.row-heading .input, .table--lines tr.row-note .input,
.table--lines tr.row-heading .select, .table--lines tr.row-note .select { background: rgba(255, 255, 255, .7); }
.row-swatch { display: flex; gap: 6px; margin-top: var(--sp-2); }
.row-swatch__item { padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); }
.row-swatch__item.row-heading { background: var(--row-heading); font-weight: 600; }
.row-swatch__item.row-item    { background: var(--row-item); }
.row-swatch__item.row-note    { background: var(--row-note); }

/* 明細の折りたたみ（見出しだけ見せる）。隠した行も送信はされる */
tr.is-folded-away { display: none; }
.fold-btn { border: 0; background: transparent; cursor: pointer; color: var(--ink-2);
            padding: 2px 4px; width: 1.6em; line-height: 1; }
.fold-btn:hover { color: var(--primary-dark); }
.fold-btn i { transition: transform .12s; }
tr.is-folded .fold-btn i { transform: rotate(-90deg); }
tr:not(.row-heading) .fold-btn { visibility: hidden; }
.table--lines .col-move { white-space: nowrap; }
.fold-count { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; margin-left: 6px; white-space: nowrap; }
.table--lines .fold-count { display: block; margin-left: 0; }
.table--lines tr.is-heading [data-line-qty], .table--lines tr.is-heading [data-line-unit],
.table--lines tr.is-heading [data-line-price], .table--lines tr.is-heading [data-line-tax],
.table--lines tr.is-heading [data-line-cost] { visibility: hidden; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: var(--sp-3) 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* 伝票の編集: 明細は 2 カラムの外に出して全幅で使う */
.cols > .card--full { grid-column: 1 / -1; }
.t-right { text-align: right; }
.table--lines tfoot .lines-total td { border-top: 1px solid var(--line); background: var(--paper-alt);
                                      padding: 7px 5px; font-size: var(--fs-base); }
.table--lines tfoot .lines-total--grand td { font-weight: 700; }
.table--lines tfoot th, .table--lines tfoot td { position: sticky; bottom: 0; z-index: 2; }
.table--lines tfoot .lines-total--grand td { bottom: 0; }
.table--lines tfoot .lines-total:first-child td { bottom: 2.1em; }

/* 一覧の見出しに置く「税抜 / 税込」の切り替え */
.th-basis { display: block; font-size: var(--fs-xs); font-weight: 400; margin-top: 2px; }
.th-basis a { color: var(--muted); text-decoration: none; }
.th-basis a:hover { color: var(--primary-dark); text-decoration: underline; }
.th-basis .is-current { color: var(--ink); font-weight: 600; }

/* ---- 操作ログ（変更履歴・送信履歴・操作ログの画面）---- */
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-item { border-top: 1px solid var(--line); }
.audit-item:first-child { border-top: 0; }
.audit-item summary { display: flex; align-items: baseline; gap: 10px; padding: 8px var(--sp-4); cursor: pointer;
                      list-style: none; font-size: var(--fs-sm); }
.audit-item summary::-webkit-details-marker { display: none; }
.audit-item summary:hover { background: var(--paper-alt); }
.audit-item__time { flex: 0 0 auto; color: var(--muted); font-size: var(--fs-xs); }
.audit-item__target { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30%; }
.audit-item__summary { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-item__user { flex: 0 0 auto; }
.audit-item__body { padding: 4px var(--sp-4) var(--sp-3) calc(var(--sp-4) + 8px); background: var(--paper-alt); }
.audit-chip { flex: 0 0 auto; font-size: var(--fs-xs); padding: 1px 8px; }
.audit-chip--create, .audit-chip--restore { background: var(--primary-tint); color: var(--primary-deep); border-color: var(--primary-soft); }
.audit-chip--delete, .audit-chip--login_failed, .audit-chip--mail_failed, .audit-chip--force_release
  { background: #fdecea; color: var(--danger); border-color: #f5c6c0; }
.audit-chip--issue, .audit-chip--approve, .audit-chip--mail_send, .audit-chip--lock, .audit-chip--unlock
  { background: #fbf1dd; color: #7a5410; border-color: #f0dcae; }
.audit-chip--view, .audit-chip--reveal, .audit-chip--download, .audit-chip--export_csv, .audit-chip--export_pdf, .audit-chip--print
  { background: #e8f0fb; color: var(--info); border-color: #c8d9f2; }
.audit-diff { margin: 6px 0; font-size: var(--fs-sm); background: var(--paper); }
.audit-diff td { vertical-align: top; white-space: pre-wrap; word-break: break-all; }
.audit-diff__before { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.audit-group { margin: 6px 0; font-size: var(--fs-sm); }
.audit-group__label { font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.audit-group li { padding: 2px 0; }
.audit-notes { margin: 6px 0; }
.audit-meta { margin: 6px 0 0; }
.mail-body { white-space: pre-wrap; font-family: var(--font-body); font-size: var(--fs-sm); background: var(--paper);
             border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0 0; }
.table--compact td, .table--compact th { padding: 4px 8px; }
.audit-filter .inline-form { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.audit-filter .inline-form .input { flex: 1 1 0; width: auto; min-width: 0; }
.card__body--flush > .pager { padding: 8px var(--sp-4); }
.audit-diff { table-layout: fixed; width: 100%; }
.audit-diff__c-label { width: 11em; }
.audit-diff__c-arrow { width: 2em; }
.due-quick { margin-top: 4px; gap: 4px; }
.billing dt { font-size: var(--fs-sm); }
.amount-range { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.amount-range .input { flex: 1 1 0; width: auto; min-width: 0; }
.audit-item__row { display: flex; align-items: baseline; gap: 10px; padding: 8px var(--sp-4); font-size: var(--fs-sm); }
.btn[disabled] { pointer-events: auto; }
.related--here { background: var(--primary-tint); }
.related-link { display: flex; gap: 6px; }
.related-link .select { flex: 1 1 auto; min-width: 0; }


/* hidden を付けたフォームは、display の指定があっても隠す（通帳の「消込しない」の理由欄など） */
.inline-form[hidden], .btn-row[hidden] { display: none; }

/* 通帳の処理済みの行: 相手・メモを左、「戻す」「直す」を右に */
.bank-done { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.bank-done form { margin: 0; }

/* 通帳の明細のメモ（前受金など、消込の前に分かっていること） */
.bank-note { background: var(--row-note); border-left: 3px solid var(--accent); border-radius: 4px; padding: 2px var(--sp-2); margin-bottom: 4px; color: var(--ink); }
.bank-note i { color: var(--muted); }

/* 経費精算の領収書（サムネイルを並べる） */
.receipt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-3); }
.receipt-grid__item { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.receipt-grid__item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-alt); }
.receipt-grid__file { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: var(--radius); font-size: 2rem; color: var(--muted); background: var(--paper-alt); }
.receipt-grid__item form { margin: 0; }
.receipt-input { display: flex; flex-direction: column; gap: 4px; }
.receipt-input__list { margin: 0; padding-left: 1.2em; }
.receipt-input__list[hidden] { display: none; }

/* ファイル管理: 形式のアイコン（拡張子ごとの色）と見本 */
.file-kind { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); color: var(--muted); }
.file-kind i { font-size: 1.15em; }
.file-kind--fa-file-pdf i { color: #d23f31; }
.file-kind--fa-file-excel i, .file-kind--fa-file-csv i { color: #1d7044; }
.file-kind--fa-file-word i { color: #2b579a; }
.file-kind--fa-file-powerpoint i { color: #c4502a; }
.file-kind--fa-file-image i { color: #8a5cc2; }
.file-kind--fa-file-video i, .file-kind--fa-file-audio i { color: #b7791f; }
.file-kind--fa-file-code i { color: var(--danger); }
.file-kind--big { font-size: 2rem; }
.file-preview { max-width: 100%; max-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.file-body { white-space: pre-wrap; max-height: 24em; overflow-y: auto; font-size: var(--fs-sm); line-height: 1.7;
  padding: var(--sp-2) var(--sp-3); background: var(--paper-alt); border-radius: var(--radius); }


/* 資産管理: 入力欄の小見出し・区分ごとの項目の行・一覧の写真 */
.form-section { font-size: var(--fs-sm); font-weight: 700; color: var(--primary-deep); margin: var(--sp-4) 0 var(--sp-2);
  padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.form-section:first-child { margin-top: 0; }
.spec-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: var(--sp-2); align-items: center; margin-bottom: 6px; }
.asset-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--paper-alt); display: block; }
.asset-thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.kv dd .spec-empty { color: var(--muted); }

/* どこからでも探す（Ctrl+K。js/nav.js） */
.palette { border: 0; padding: 0; width: min(640px, calc(100vw - 32px)); margin: 10vh auto auto; border-radius: var(--radius-lg);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-hover); }
.palette::backdrop { background: rgba(30, 24, 21, .35); }
.palette__bar, .palette__foot { cursor: move; }
.palette__input { cursor: text; }
.palette__bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.palette__bar > i { color: var(--primary-dark); }
.palette__input { flex: 1; border: 0; outline: 0; font: inherit; font-size: var(--fs-lg); background: transparent; color: var(--ink); }
.palette__results { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-2) 0; }
.palette__group { padding: 6px var(--sp-4) 2px; font-size: var(--fs-xs); font-weight: 700; color: var(--primary-dark); letter-spacing: .06em; }
.palette__item { display: flex; align-items: baseline; gap: var(--sp-2); padding: 7px var(--sp-4); color: var(--ink); }
.palette__item i { width: 1.2em; text-align: center; color: var(--muted); }
.palette__item:hover { text-decoration: none; }
.palette__item.is-active { background: var(--primary-tint); }
.palette__item.is-active i { color: var(--primary-dark); }
.palette__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.palette__sub { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__empty { padding: var(--sp-4); color: var(--muted); text-align: center; font-size: var(--fs-sm); }
.palette__foot { padding: 6px var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }

/* お気に入り（js/favorites.js）: 選ぶ欄の ★ ボタン・行の ☆・詳細の見出しの ★ */
.picker__fav { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: #d9a300; cursor: pointer; }
.picker__fav:hover { background: #fff7db; }
.picker__head { padding: 6px 8px 4px; font-size: var(--fs-xs); font-weight: 700; color: #b58800; }
.picker__head .muted { font-weight: 400; }
.fav-star { flex: none; border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--line-strong); font-size: 14px; line-height: 1; }
.fav-star:hover { color: #d9a300; }
.fav-star.is-on { color: #e0a800; }
.picker__item .fav-star { align-self: center; }
.btn.fav-star--head { color: var(--muted); font-size: 16px; padding-left: 12px; padding-right: 12px; }
.btn.fav-star--head.is-on { color: #e0a800; border-color: #f0d27a; background: #fffaf0; }

/* ---- スケジュール（doc/DB設計/09）---- */
.field[hidden] { display: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.seg__item { padding: 6px 12px; color: var(--ink-2); font-size: var(--fs-sm); border-left: 1px solid var(--line); }
.seg__item:first-child { border-left: 0; }
.seg__item:hover { background: var(--paper-alt); text-decoration: none; }
.seg__item.is-on { background: var(--primary); color: #fff; font-weight: 600; }
.input--sm { font-size: var(--fs-sm); padding: 4px 8px; }
/* 担当の種類の色（従業員＝緑・拠点＝青・部署＝紫） */
.ev--employee { --ev: #1f8a4c; --ev-bg: #e6f4ea; }
.ev--office { --ev: #2b6cb0; --ev-bg: #e6eef9; }
.ev--department { --ev: #7a4fb5; --ev-bg: #f0eaf8; }
.ev--unit { --ev: #c98a1d; --ev-bg: #fbf3e4; }              /* ユニット（色を決めたユニットはその色） */
.cal-legend { display: inline-block; padding: 1px 8px; border-left: 4px solid var(--ev); background: var(--ev-bg); border-radius: 4px; font-size: var(--fs-xs); }
.cal-targets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-2); }
.cal-targets__adders { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.cal-targets__adders .select { width: auto; max-width: 14rem; }
.cal-targets__picker .picker__bar { gap: 4px; }
.cal-targets__picker { position: relative; display: inline-block; width: 13rem; }
.cal-targets__picker .picker__results { min-width: 18rem; }
.cal-target .chip__x { text-decoration: none; }
.cal { overflow-x: auto; }
.cal-month { min-width: 760px; }
.cal-month__head, .cal-month__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month__head span { padding: 6px; text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-month__head .is-sun, .cal-day__num.is-sun { color: var(--danger); }
.cal-month__head .is-sat, .cal-day__num.is-sat { color: var(--info); }
.cal-day { min-height: 112px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: cell;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day:hover { background: #fbfdfb; }
.cal-day.is-other { background: var(--paper-alt); }
.cal-day.is-other .cal-day__num { opacity: .5; }
.cal-day.is-off { background: #fff5f5; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-group__cell.cal-day.is-today { box-shadow: none; background: #f3faf5; }
.cal-day__head { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-size: var(--fs-sm); }
.cal-day__num { font-weight: 700; }
.cal-day__wd { font-size: var(--fs-xs); color: var(--muted); }
.cal-day__hol { font-size: 11px; color: var(--danger); }
.cal-day__hol--off { color: #b7791f; }
.cal-day__more { font-size: var(--fs-xs); }
.cal-ev { display: flex; align-items: baseline; gap: 4px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--ev);
  background: var(--ev-bg); border-radius: 4px; padding: 1px 4px; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; min-width: 0; }
.cal-ev:hover { filter: brightness(.96); }
.cal-ev__time { flex: none; color: var(--ev); font-weight: 600; }
.cal-ev__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-ev__who { flex: none; margin-left: auto; color: var(--muted); font-size: 11px; }
.cal-ev__icon { flex: none; color: var(--muted); font-size: 10px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 900px; }
.cal-day--week { min-height: 360px; }
.cal-day--week .cal-ev { flex-wrap: wrap; }
.cal-day--week .cal-ev__title { white-space: normal; }
.cal-group { min-width: 980px; }
.cal-group__row { display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); }
.cal-group__head .cal-group__cell { padding: 6px; border-right: 1px solid var(--line); border-bottom: 2px solid var(--line); }
.cal-group__who { padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-sm);
  display: flex; flex-direction: column; background: var(--paper-alt); }
.cal-group__who i { color: var(--muted); }
.cal-group__cell.cal-day { min-height: 70px; }
/* 各画面の「スケジュール」の欄（小さな月のカレンダーと一覧） */
.sched-widget { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--sp-4); }
@media (max-width: 720px) { .sched-widget { grid-template-columns: 1fr; } }
.mini__bar { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: var(--fs-sm); }
.mini__row { display: grid; grid-template-columns: repeat(7, 1fr); }
.mini__head span { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.mini__head .is-sun { color: var(--danger); } .mini__head .is-sat { color: var(--info); }
.mini__day { position: relative; border: 1px solid transparent; background: none; padding: 5px 0; font: inherit; font-size: 13px;
  cursor: pointer; border-radius: 4px; color: var(--ink); }
.mini__day:hover { background: var(--primary-tint); }
.mini__day.is-other { color: var(--line-strong); }
.mini__day.is-sun { color: var(--danger); } .mini__day.is-sat { color: var(--info); }
.mini__day.is-other.is-sun, .mini__day.is-other.is-sat { opacity: .45; }
.mini__day.is-off { background: #fff5f5; }
.mini__day.is-today { border-color: var(--primary); font-weight: 700; }
.mini__day.is-picked { background: var(--primary); color: #fff; }
.mini__day.has-events::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0;
  border-color: transparent #d23f31 transparent transparent; }
.wlist__body { max-height: 330px; overflow-y: auto; border-top: 1px solid var(--line); }
.wlist__day { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.wlist__day.is-today { background: #fbfdfb; }
.wlist__date { padding: 5px 6px; font-size: var(--fs-sm); font-weight: 600; }
.wlist__date.is-sun { color: var(--danger); } .wlist__date.is-sat { color: var(--info); }
.wlist__hol { display: block; font-size: 11px; font-weight: 400; color: var(--danger); }
.wlist__items { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; min-width: 0; }
.wlist__ev { display: flex; align-items: baseline; gap: 6px; border: 0; border-left: 3px solid var(--ev); background: var(--ev-bg);
  border-radius: 4px; padding: 2px 6px; text-align: left; font: inherit; font-size: var(--fs-sm); cursor: pointer; color: var(--ink); min-width: 0; }
.wlist__ev:hover { filter: brightness(.96); }
.wlist__time { flex: none; color: var(--ev); font-weight: 600; font-size: 12px; }
.wlist__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wlist__who { flex: none; margin-left: auto; font-size: 11px; color: var(--muted); }
.wlist__none { color: var(--line-strong); padding: 2px 6px; font-size: var(--fs-sm); }
.ev-repeat, .ev-scope { background: var(--paper-alt); border-radius: var(--radius); padding: var(--sp-3); }

/* ---- ルーム（room/*。設計: doc/DB設計/10 ルーム管理.md）---- */
.room-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; flex: none; }
.room-dot--lg { width: 16px; height: 16px; border-radius: 4px; vertical-align: 2px; margin-right: 10px; }
.room-today { border: 0; cursor: pointer; font: inherit; font-size: var(--fs-xs); margin: 2px 4px 2px 0; }
/* 予定の窓の「ルーム」欄 */
.room-opts { display: flex; flex-direction: column; gap: 2px; max-height: 15rem; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px; background: var(--paper); }
.room-opts__office { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 6px 0; }
.room-opt { display: grid; grid-template-columns: auto auto minmax(6rem, auto) 1fr auto; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: 6px; font-size: var(--fs-sm); cursor: pointer; }
.room-opt:hover { background: var(--paper-alt); }
.room-opt.is-on { background: var(--primary-tint); }
.room-opt .room-dot { margin: 0; }
.room-opt__name { font-weight: 600; }
.room-opt__info { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.room-opt__state { font-size: var(--fs-xs); white-space: nowrap; }
.room-opt.is-free .room-opt__state { color: var(--primary); }
.room-opt.is-busy .room-opt__state { color: var(--danger); }
.room-opt.is-closed .room-opt__state { color: var(--muted); }
.room-opt.is-busy:not(.is-on), .room-opt.is-closed:not(.is-on) { cursor: not-allowed; opacity: .75; }
.room-opts__note.is-warn { color: var(--danger); }
/* 予約表（共通） */
.rt, .rtw { overflow-x: auto; user-select: none; -webkit-user-select: none; }
.rt-bar { position: absolute; z-index: 2; display: flex; gap: 4px; align-items: baseline; overflow: hidden; border: 0; cursor: pointer;
  text-align: left; font: inherit; font-size: 12px; line-height: 1.35; color: var(--ink); padding: 3px 6px;
  background: color-mix(in srgb, var(--c) 16%, white); border-left: 4px solid var(--c); border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.rt-bar:hover { background: color-mix(in srgb, var(--c) 26%, white); }
.rt-bar__time { flex: none; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, black); }
.rt-bar__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rt-bar__who { flex: none; color: var(--muted); font-size: 11px; }
.rt-bar__icon { position: absolute; top: 4px; right: 5px; color: var(--muted); font-size: 10px; }
.rt-bar.is-cut-before { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rt-bar.is-allday { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, white) 0 10px, color-mix(in srgb, var(--c) 22%, white) 10px 20px); }
.rt-tail { position: absolute; z-index: 1; background: repeating-linear-gradient(135deg, rgba(0,0,0,.05) 0 4px, transparent 4px 8px); pointer-events: none; }
.rt-closed { position: absolute; z-index: 0; background: repeating-linear-gradient(45deg, #eef0ec 0 6px, #f7f8f6 6px 12px); pointer-events: none; }
.rt-now { position: absolute; z-index: 3; background: var(--danger); pointer-events: none; }
.rt-ghost { position: absolute; z-index: 4; background: rgba(24, 146, 61, .18); border: 2px dashed var(--primary); border-radius: 5px;
  font-size: 12px; font-weight: 700; color: var(--primary-deep); padding: 2px 6px; pointer-events: none; white-space: nowrap; overflow: hidden; }
/* 日: ルームを縦に、時間を横に */
.rt__notice { padding: 6px 12px; font-size: var(--fs-sm); color: var(--danger); background: #fff5f5; border-bottom: 1px solid var(--line); }
.rt__row { display: grid; grid-template-columns: 190px minmax(640px, 1fr); border-bottom: 1px solid var(--line); }
.rt__row:last-child { border-bottom: 0; }
.rt__name { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 10px; border-right: 1px solid var(--line);
  font-size: var(--fs-sm); background: var(--paper); position: sticky; left: 0; z-index: 5; }
.rt__name a { font-weight: 600; text-decoration: none; color: var(--ink); }
.rt__name a:hover { color: var(--primary); }
.rt__scale { position: relative; height: 26px; }
.rt__scale span { position: absolute; top: 5px; transform: translateX(3px); font-size: 11px; color: var(--muted); }
.rt__head { border-bottom: 2px solid var(--line); }
.rt__track { position: relative; height: 64px; cursor: crosshair; touch-action: pan-y;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--hours))); }
.rt__track .rt-bar { top: 5px; bottom: 5px; flex-direction: column; gap: 0; justify-content: flex-start; padding: 2px 6px; }
.rt-bar > * { max-width: 100%; }
.rt__track .rt-bar__time, .rt__track .rt-bar__who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt__track .rt-bar__who { font-size: 10.5px; }
.rt__track .rt-tail, .rt__track .rt-closed { top: 0; bottom: 0; }
.rt__track .rt-now { top: 0; bottom: 0; width: 2px; }
.rt__track .rt-ghost { top: 4px; bottom: 4px; }
/* 週: 7 日を横に、時間を縦に */
.rtw__head, .rtw__body { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 860px; }
.rtw__head { border-bottom: 2px solid var(--line); }
.rtw__dayhead { padding: 6px; font-size: var(--fs-sm); font-weight: 700; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.rtw__dayhead .is-sun { color: var(--danger); } .rtw__dayhead .is-sat { color: var(--info); }
.rtw__dayhead.is-today { background: var(--primary-tint); }
.rtw__body { height: calc(var(--hours) * 52px); }
.rtw__axis { position: relative; }
.rtw__axis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.rtw__axis span:first-child { transform: none; }
.rtw__col { position: relative; border-left: 1px solid var(--line); cursor: crosshair; touch-action: pan-x;
  background-image: repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px calc(100% / var(--hours))); }
.rtw__col.is-off { background-color: #fffafa; }
.rtw__col.is-today { background-color: #f6fbf7; }
.rtw__col .rt-bar { left: 3px; right: 3px; flex-direction: column; gap: 0; justify-content: flex-start; border-left: 0; border-top: 4px solid var(--c); padding: 2px 5px; }
.rtw__col .rt-bar__title { white-space: normal; }
.rtw__col .rt-tail, .rtw__col .rt-closed { left: 0; right: 0; }
.rtw__col .rt-now { left: 0; right: 0; height: 2px; }
.rtw__col .rt-ghost { left: 3px; right: 3px; }
/* ルームの色（パレット＋直接指定） */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.swatch { position: relative; width: 30px; height: 30px; border-radius: 8px; border: 2px solid #fff; background: var(--sw); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-strong); padding: 0; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--ink); }
.swatch.is-on::before { content: '\2713'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.swatch.is-used::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--sw); }
.swatches__custom { display: inline-flex; align-items: center; gap: 6px; margin-left: var(--sp-3); padding-left: var(--sp-3); border-left: 1px solid var(--line); }
.swatches__custom input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: none; cursor: pointer; }
.swatches__custom .is-invalid { border-color: var(--danger); }
.swatch-preview { display: inline-block; padding: 3px 10px; font-size: 12px; border-radius: 5px; border-left: 4px solid var(--sw);
  background: color-mix(in srgb, var(--sw) 16%, white); color: color-mix(in srgb, var(--sw) 70%, black); font-weight: 700; }

/* ---- 案件（project/*。設計: doc/DB設計/11 案件管理.md）---- */
.pj-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.pj-card { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4); background: var(--paper);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.pj-card--strong { border-top: 3px solid var(--primary); }
a.pj-card--link { text-decoration: none; color: inherit; }
a.pj-card--link:hover { box-shadow: var(--shadow-hover); }
.pj-card__label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.pj-card__value { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.pj-card__value small { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.pj-card__sub { font-size: var(--fs-xs); color: var(--muted); }
.pj-fin__rev td { background: var(--paper-alt); }
.pj-fin__total td { font-weight: 700; border-top: 2px solid var(--line-strong); }
.health { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: 0; }
.health--good { background: var(--primary); } .health--caution { background: #e0a800; } .health--danger { background: var(--danger); }
.pj-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: calc(var(--sp-2) * -1) 0 var(--sp-3); font-size: var(--fs-sm); }
.pj-nav a { text-decoration: none; }
.pj-plan .input { width: 4.2rem; padding: 3px 6px; }
.pj-plan td.is-now, .pj-plan th.is-now { background: var(--primary-tint); }
.pj-plan__act { font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; }
.pj-plan__act.is-over { color: var(--danger); font-weight: 700; }
.pj-phases .input { min-width: 0; }
.pj-phases__new .input::placeholder { color: var(--primary); }
.help.is-warn { color: var(--danger); }
/* 工数を入れる表・稼働予定表 */
.pj-effort .input { width: 5rem; padding: 4px 6px; }
.pj-effort th.is-off, .pj-effort td.is-off { background: #fff5f5; }
.pj-effort th.is-sun { color: var(--danger); } .pj-effort th.is-sat { color: var(--info); }
.pj-effort tr.is-today td { background: var(--primary-tint); }
.pj-load td { text-align: right; }
.pj-load .cell { display: block; font-variant-numeric: tabular-nums; }
.pj-load .cell__plan { font-weight: 700; }
.pj-load .cell__act { font-size: 11px; color: var(--muted); }
.pj-load td.is-over { background: #fdecea; }
.pj-load td.is-over .cell__plan { color: var(--danger); }
.pj-load td.is-light .cell__plan { color: var(--muted); }

.picker__open { color: var(--primary); margin-left: 4px; font-size: 11px; text-decoration: none; }
.picker__open:hover { color: var(--primary-dark); }
/* WBS とガント（project/wbs.html） */
.wbs { overflow-x: auto; }
.wbs { --w-name: 220px; --w-who: 82px; --w-date: 104px; --w-ops: 74px;
  --w-left: calc(40px + var(--w-name) + var(--w-who) + var(--w-date) + var(--w-ops) + 32px); }
.wbs.no-who { --w-who: 0px; } .wbs.no-date { --w-date: 0px; } .wbs.no-ops { --w-ops: 0px; }
.wbs.no-who .wbs__who, .wbs.no-date .wbs__date, .wbs.no-ops .wbs__ops { visibility: hidden; overflow: hidden; }
.wbs__row { display: grid; grid-template-columns: var(--w-left) minmax(var(--chart-min, 420px), 1fr); border-bottom: 1px solid var(--line);
  min-width: calc(var(--w-left) + var(--chart-min, 420px)); }
.wbs__row.is-context { opacity: .55; }
.wbs-tools { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; justify-content: space-between; }
.wbs-tools__form, .wbs-tools__view, .wbs-tools__cols { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wbs-tools__cols .chip { cursor: pointer; border: 0; font: inherit; font-size: var(--fs-xs); }
.wbs__row:last-child { border-bottom: 0; }
.wbs__head { border-bottom: 2px solid var(--line); font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.wbs__left { display: grid; grid-template-columns: 40px minmax(0, 1fr) var(--w-who) var(--w-date) var(--w-ops); align-items: center; gap: 4px; padding: 4px 8px;
  border-right: 1px solid var(--line); background: var(--paper); position: sticky; left: 0; z-index: 3; font-size: var(--fs-sm); }
.wbs__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbs__name a { text-decoration: none; color: var(--ink); }
.wbs__name a:hover { color: var(--primary); }
.wbs__num { text-align: right; }
.wbs__date, .wbs__who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbs__ops { display: flex; gap: 0; justify-content: flex-end; }
.wbs__ops form { display: inline; }
.wbs__prog .select { padding: 2px 4px; font-size: 12px; width: 4.6rem; }
.wbs__row.is-parent .wbs__name a { font-weight: 700; }
.wbs__row.is-parent { background: var(--paper-alt); }
.wbs__row.is-parent .wbs__left { background: var(--paper-alt); }
.wbs__row.is-cancelled .wbs__name { text-decoration: line-through; color: var(--muted); }
.wbs__ms { color: #b7791f; font-size: 11px; }
.wbs__chart { position: relative; min-height: 34px; }
.wbs__scale { min-height: 42px; }
.wbs__col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 5px 0 0 3px; font-size: 11px; line-height: 1.35;
  white-space: nowrap; overflow: visible; }
.wbs__col small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.wbs__col.is-weekend { background: #fafafa; }
.wbs__col.is-sat, .wbs__col.is-sat small { color: var(--info); }
.wbs__col.is-sun, .wbs__col.is-sun small { color: var(--danger); }
.wbs__col.is-today { font-weight: 700; box-shadow: inset 0 -3px 0 var(--danger); }
.wbs__shade { position: absolute; top: 0; bottom: 0; background: #f7f7f5; }
.wbs__bar { --c: var(--primary); position: absolute; top: 9px; height: 16px; border-radius: 4px; background: color-mix(in srgb, var(--c) 22%, white);
  border: 1px solid color-mix(in srgb, var(--c) 55%, white); overflow: hidden; }
.wbs__fill { display: block; height: 100%; background: var(--c); opacity: .8; }
.wbs__row.is-parent .wbs__bar { top: 12px; height: 9px; background: color-mix(in srgb, var(--c) 18%, #ddd); border-color: color-mix(in srgb, var(--c) 45%, #777); }
.wbs__row.is-parent .wbs__fill { background: color-mix(in srgb, var(--c) 60%, #333); }
.swatch--none { background: repeating-linear-gradient(135deg, #fff 0 4px, #ddd 4px 8px); }
.wbs__row.is-done .wbs__bar { opacity: .6; }
.wbs__diamond { position: absolute; top: 10px; width: 14px; height: 14px; background: #d69e2e; transform: rotate(45deg); border-radius: 2px; }
.wbs__today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 1; }
.wbs__due { position: absolute; top: 0; bottom: 0; border-left: 2px dotted var(--primary); z-index: 1; }

/* カレンダーに載せる予定以外のもの（タスクの期限など） */
.cal-item { display: block; font-size: 11px; line-height: 1.5; color: #8a5a00; text-decoration: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; padding: 0 4px; border-left: 3px dashed #d69e2e; margin: 2px 0; }
.cal-item:hover { background: #fdf6e3; }
.wlist__item { text-decoration: none; color: #8a5a00; border-left: 3px dashed #d69e2e; }

.pj-guest td { background: #fffaf0; }

/* ---- 案件の評価（④ 振り返り）---- */
.rv-scale { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; vertical-align: middle; }
.rv-scale label { position: relative; cursor: pointer; }
.rv-scale input { position: absolute; opacity: 0; pointer-events: none; }
.rv-scale span { display: inline-block; min-width: 2.1rem; padding: 3px 0; text-align: center; font-size: var(--fs-sm); font-family: var(--font-mono);
  border-left: 1px solid var(--line); background: var(--paper); color: var(--muted); }
.rv-scale label:first-child span { border-left: 0; }
.rv-scale label:hover span { background: var(--primary-tint); color: var(--ink); }
.rv-scale input:checked + span { background: var(--primary); color: #fff; font-weight: 700; }
.rv-scale .rv-scale__none input:checked + span { background: var(--paper-alt); color: var(--muted); font-weight: 400; }
.rv-scale input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.rv-badge { display: inline-block; min-width: 1.7rem; padding: 1px 6px; border-radius: var(--radius-pill); text-align: center;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm); color: #fff; background: var(--muted); }
.rv-badge--5 { background: var(--primary-dark); }
.rv-badge--4 { background: var(--primary); }
.rv-badge--3 { background: #8a948c; }
.rv-badge--2 { background: var(--accent); }
.rv-badge--1 { background: var(--danger); }
.rv-table { border-collapse: collapse; }
.rv-table th, .rv-table td { padding: 4px 10px 4px 0; text-align: left; vertical-align: middle; }
.rv-aspect { font-weight: 400; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.rv-total th, .rv-total td { border-top: 1px solid var(--line); padding-top: 8px; }
.rv-total .rv-aspect { font-weight: 700; color: var(--ink); }
.rv-grid { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start; }
.rv-entry { margin-bottom: var(--sp-3); }
.rv-entry--mine { border-color: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-tint); }
.rv-entry__body--two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.rv-rating { border-left: 1px dashed var(--line-strong); padding-left: var(--sp-4); }
.rv-sub { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); }
.rv-texts { margin: 0; }
.rv-texts dt { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--sp-2); }
.rv-texts dt:first-child { margin-top: 0; }
.rv-texts dd { margin: 0; }
.rv-text { white-space: pre-wrap; }
.rv-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); }
@media (max-width: 800px) {
  .rv-grid, .rv-entry__body--two { grid-template-columns: 1fr; }
  .rv-rating { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line-strong); padding-top: var(--sp-3); }
}
.rv-avatar { width: 48px; height: 48px; font-size: 18px; margin-right: 4px; vertical-align: middle; }
.rv-entry .card__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.t-center { text-align: center; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tile--locked { opacity: .5; box-shadow: none; filter: grayscale(1); }
.tile--locked:hover { transform: none; box-shadow: none; border-color: var(--line); cursor: not-allowed; }
.tile--locked .tile__icon { background: var(--paper-alt); color: var(--muted); }
.appmenu__item--locked { opacity: .45; cursor: not-allowed; }
.rv-warn { color: var(--accent); border-color: var(--accent); }
.perm-matrix { overflow-x: auto; }
.perm-matrix td, .perm-matrix th { vertical-align: middle; }
.perm-matrix__group th { background: var(--row-heading); font-size: var(--fs-sm); text-align: left; }
.perm-matrix__scope { width: auto; margin-left: 4px; }
.perm-matrix tr.is-muted td:first-child { color: var(--muted); }
/* 見るだけの画面（ロールの権限で「編集」が無い）: 編集・登録・削除のボタンを隠す（保存は入口の判定が断る）。書き出しは残す */
.perm-readonly main [data-modal-open]:not([data-modal-open="export-dialog"]),
.perm-readonly main form[method="post"]:not([action*="export"]) button[type="submit"],
.perm-readonly main form[method="post"]:not([action*="export"]) input[type="submit"],
.perm-readonly main dialog:not(#export-dialog) .modal__foot .btn--primary,
.perm-readonly main .modal__foot .btn--danger,
.perm-noexport main [data-modal-open="export-dialog"] { display: none !important; }


/* 時刻の欄: ブラウザの時計の代わりに 15 分きざみの候補（js/time-field.js） */
input[type=time].tf-on { cursor: pointer; padding-right: 30px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378706B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; }
input[type=time].tf-on::-webkit-calendar-picker-indicator { display: none; }
.tf-list { position: fixed; z-index: 1000; margin: 0; padding: 4px 0; list-style: none; max-height: 240px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(30, 24, 21, .18);
  overscroll-behavior: contain; font-variant-numeric: tabular-nums; }
.tf-list li { padding: 5px 12px; cursor: pointer; white-space: nowrap; font-size: var(--fs-sm); }
.tf-list li:hover { background: var(--focus); }
.tf-list li.is-on { background: var(--primary); color: #fff; }
.tf-list li.is-on .tf-list__len { color: inherit; }
.tf-list__len { color: var(--muted); margin-left: 6px; font-size: var(--fs-xs); }

/* 区切りのボタンをラジオで */
label.seg__item { cursor: pointer; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.seg__item input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.seg__item:has(input:checked) { background: var(--primary); color: #fff; font-weight: 600; }
.seg__item:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--focus); }
.ev-contact .picker__chips:not(:empty) { margin-bottom: 6px; }
.ev-place-hints { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* スケジュールの関係者（週・比較の表示で 1 行。長ければ … ） */
.cal-ev__to { flex: 1 1 100%; min-width: 0; font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev__who { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 場所に住所が入ると長い */

/* スケジュールの窓の「行動記録」: 人ごとの提出の状況 */
.ev-reports__list { list-style: none; margin: 0 0 var(--sp-2); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.ev-reports__list li { display: flex; gap: var(--sp-3); align-items: baseline; padding: 6px 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.ev-reports__list li:first-child { border-top: 0; }
.ev-reports__list li.is-done a { color: var(--primary); }
.ev-reports__who { min-width: 8em; font-weight: 600; }
.ev-reports { padding: var(--sp-3); background: var(--paper-alt); border-radius: var(--radius); }
.ev-reports__list { background: var(--paper); }

/* 行動記録の窓の「スケジュール」欄 */
.act-sched { display: flex; flex-direction: column; gap: 4px; }
.act-sched__row { align-items: flex-start; padding: 4px 8px; border-radius: var(--radius); }
.act-sched__row:has(input:checked) { background: var(--paper-alt); }
.act-sched__time { font-variant-numeric: tabular-nums; color: var(--muted); }
.input.is-invalid { border-color: var(--danger); }   /* カナにできない文字など */
.postal-note:empty { display: none; }
.postal-note .link-btn { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* 日付の欄（js/date-field.js）: 打つ欄＋和暦＋カレンダーのボタン。元の input[type=date] は値の入れ物として後ろに隠す */
.df { position: relative; display: inline-flex; align-items: center; width: 100%; min-width: 9.5em; vertical-align: middle; container-type: inline-size; }
.df[hidden] { display: none; }
.df__text { width: 100%; padding-right: 36px; }
.df__text.is-invalid { border-color: var(--danger); color: var(--danger); }
.df__era { position: absolute; right: 34px; font-size: var(--fs-xs); color: var(--muted); pointer-events: none; white-space: nowrap; }
.df__cal { position: absolute; right: 4px; border: 0; background: none; color: var(--muted); padding: 4px 6px; cursor: pointer; }
.df__cal:hover { color: var(--primary-dark); }
.df__cal:disabled { cursor: default; opacity: .4; }
@container (max-width: 200px) { .df__era { display: none; } }   /* 狭い欄（一覧の絞り込みなど）では和暦を出さない */
.df__value { position: absolute; right: 0; bottom: 0; width: 30px; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* 備品の予約表（asset/bookings.html）・予定の窓の「備品」欄（asset/_event_assets.html）。帯と枠はルームの予約表と共通 */
.rt__group { padding: 4px 10px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--paper-alt); border-bottom: 1px solid var(--line); }
.rt__track.is-closed { background-color: #f7f8f6; }
.rt-bar.is-unreturned { box-shadow: inset 0 0 0 2px var(--danger); }
.rt-bar.is-unreturned .fa-triangle-exclamation { color: var(--danger); }
.rt-bar.is-returned { opacity: .7; }
.asset-pending { color: var(--danger); }
.asset-returns { margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm, 6px); padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.asset-returns[hidden] { display: none; }
.asset-returns__head { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.asset-return { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asset-return__name { font-weight: 600; min-width: 8em; }
.asset-return .input { flex: 1 1 14em; min-width: 0; }
.asset-return--row { flex-wrap: nowrap; }
.asset-return--row .input { width: 14em; flex: 0 1 14em; }

/* チェックで選ぶ一覧（予約できる人 _booker_fields.html など）。枠の中でスクロール */
.pick-list { display: flex; flex-direction: column; max-height: 11.5rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--paper, #fff); }
.pick-list__item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; font-size: var(--fs-sm); cursor: pointer; }
.pick-list__item:hover { background: var(--paper-alt); }
.pick-list__item:has(input:checked) { background: var(--primary-tint); font-weight: 600; }
.pick-list__item input { flex: none; margin: 0; }
