/*
 * 現場の画面（仕様書 0.2・0.3）。窓口の端末・タブレット（幅1,024px）を基準にした、文字・ボタンの大きさは、theme.css の「小・中・大・特大」の4組の変数で決まる（body の data-text-size）。
 * 管理者だけが使う画面（body.admin-ui）は、application.css の詰めた作りのまま。数値はここ1か所に置く。
 * 色は theme.css の変数だけを使う。
 */
body.field-ui {
  font-size: var(--f-text);
  line-height: 1.6;
}

/* ---- 押せる場所：高さ・幅とも48px以上、文字は18px以上 ---- */
body.field-ui a.hb, body.field-ui a.hb-link,
body.field-ui .bt, body.field-ui .bo, body.field-ui .bt-sub, body.field-ui .bt-go, body.field-ui .hb,
body.field-ui .bt-small, body.field-ui .bo-small, body.field-ui .nav-big {
  min-height: var(--f-hit); min-width: var(--f-hit); padding: 0 var(--f-pad-x); font-size: var(--f-action);
  border-radius: 8px; font-weight: 700; box-sizing: border-box; text-align: center; line-height: 1.3;
}
body.field-ui .bt, body.field-ui .bt-go, body.field-ui .bt-send, body.field-ui .bt-big {
  min-height: var(--f-main); padding: 0 calc(var(--f-pad-x) * 1.4); font-size: var(--f-action);
}
body.field-ui .bt-go {
  display: inline-flex; align-items: center; justify-content: center; background: var(--success-strong); color: var(--surface);
  border: 2px solid var(--success-strong); border-radius: 8px; font-weight: 700; font-family: inherit; cursor: pointer;
}
body.field-ui .bt-go:hover { background: var(--success-strong-dark); border-color: var(--success-strong-dark); color: var(--surface); }
body.field-ui .bo, body.field-ui .bt-big.bo { border: 2px solid var(--border-strong); color: var(--text); background: var(--surface); }
body.field-ui .bt:disabled, body.field-ui .bt-go:disabled, body.field-ui .bo:disabled { opacity: .45; cursor: not-allowed; }
body.field-ui input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not(.bt):not(.bt-go), body.field-ui select, body.field-ui textarea, body.field-ui .fi {
  min-height: var(--f-hit); font-size: var(--f-action); padding: 0 var(--f-pad-x); border-radius: 8px; border: 2px solid var(--border-strong);
}
body.field-ui textarea, body.field-ui textarea.fi { padding: var(--f-gap) var(--f-pad-x); line-height: 1.6; min-height: calc(var(--f-action) * 1.6 * 4 + var(--f-pad) * 1.25); resize: vertical; }
body.field-ui .fi:focus, body.field-ui textarea:focus, body.field-ui select:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
body.field-ui .lb { font-size: var(--f-text); gap: var(--f-gap); color: var(--text-2); }
body.field-ui .lb > b, body.field-ui .lb > span:first-child { font-weight: 700; color: var(--text); }
body.field-ui .inline-form { display: inline-flex; margin: 0; }
body.field-ui summary { min-height: var(--f-hit); display: flex; align-items: center; font-size: var(--f-action); font-weight: 700; cursor: pointer; }

/* ---- 上の帯：ホームへ・ひとつ前へは、どの画面でも同じ場所 ---- */
body.field-ui .app-header { flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--f-gap); padding: calc(var(--f-gap) / 2) var(--f-pad); min-height: 46px; }
body.field-ui .header-menu { display: flex; flex-wrap: wrap; align-items: stretch; gap: 2px; }
body.field-ui .header-flex { flex: 1 1 0; min-width: 0; }
body.field-ui .nb { display: flex; align-items: center; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * .75); font-size: var(--f-text); font-weight: 400; border: 0; border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap; color: var(--text-2); box-sizing: border-box; }
body.field-ui .nb:hover { color: var(--text); border-bottom-color: var(--border-strong); }
body.field-ui .nb.on { border-bottom-color: var(--primary); background: transparent; color: var(--text); font-weight: 700; }
body.field-ui .nb-off { opacity: .6; cursor: default; pointer-events: none; }
body.field-ui .nb-soon { margin-left: 2px; font-weight: 400; }
body.field-ui .logo { margin-right: var(--f-gap); flex: none; min-height: var(--f-hit); min-width: var(--f-hit); }
body.field-ui .logo-text { font-size: var(--f-lead); }
body.field-ui .field-nav { display: flex; gap: var(--f-gap); flex: none; }
body.field-ui .nav-big {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--f-gap); background: var(--surface); color: var(--primary);
  border: 2px solid var(--primary); cursor: pointer; font-family: inherit; white-space: nowrap; text-decoration: none; min-height: var(--f-main);
}
body.field-ui .nav-big:hover { background: var(--primary-soft); color: var(--primary); }
body.field-ui .nav-big.on { background: var(--primary); color: var(--surface); }
body.field-ui .nav-big[hidden] { display: none; }
body.field-ui .nav-small { min-height: var(--f-hit); border-color: var(--border-strong); color: var(--text-2); padding: 0 var(--f-pad-x); flex: none; }
body.field-ui .header-user { min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; display: block; text-align: right; flex: 0 1 auto; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--f-text); color: var(--text-2); }
body.field-ui .header-name { font-size: var(--f-action); font-weight: 700; color: var(--text); }
body.field-ui .header-sub { font-size: var(--f-text); }

/* ---- 見出し：いま何をしているか ---- */
body.field-ui .main { gap: var(--f-pad); }
body.field-ui .page-title, body.field-ui h1 { font-size: var(--f-title); font-weight: 700; line-height: 1.3; margin: 0; }
body.field-ui .page-title .date { font-size: var(--f-text); }
body.field-ui .title-row { align-items: center; gap: var(--f-gap); }
body.field-ui .title-links { display: flex; gap: var(--f-gap); flex-wrap: wrap; }
body.field-ui .ph { font-size: var(--f-action); padding: var(--f-gap) var(--f-pad); }
body.field-ui .ph .ph-note { font-size: var(--f-text); }
body.field-ui .pn { border-radius: 8px; }
body.field-ui .notice-ok, body.field-ui .notice-alert { padding: var(--f-pad) var(--f-pad-x); font-size: var(--f-action); border-radius: 8px; line-height: 1.6; }
body.field-ui .notice-alert::before { content: "⚠ "; }
body.field-ui .notice-ok::before { content: "✔ "; }
body.field-ui .empty, body.field-ui .easy-hint { font-size: var(--f-text); }

/* ---- 表：文字は16px以上、行は押しやすく ---- */
body.field-ui .tb td, body.field-ui .tb th, body.field-ui .today-table td, body.field-ui .today-table th,
body.field-ui .task-table td, body.field-ui .pj-table td, body.field-ui .pj-table th { font-size: var(--f-text); height: var(--f-main); }
body.field-ui .tb th, body.field-ui .today-table th, body.field-ui .pj-table th { font-size: var(--f-text); height: var(--f-hit); }

/* ---- 状態：色＋言葉（＋記号）で伝える ---- */
body.field-ui .task-pill, body.field-ui .tp-pill, body.field-ui .today-tag, body.field-ui .tile-badge, body.field-ui .photo-need,
body.field-ui .today-badge { font-size: var(--f-text); padding: 4px 12px; border-radius: 6px; }
body.field-ui .task-row-sub, body.field-ui .task-meta, body.field-ui .task-comment-who, body.field-ui .task-history,
body.field-ui .pj-note, body.field-ui .pj-sub, body.field-ui .pj-msg-who, body.field-ui .pj-member-sub, body.field-ui .pj-progress,
body.field-ui .modal-sub, body.field-ui .pj-topic-last, body.field-ui .pj-preview-note, body.field-ui .sent-summary,
body.field-ui .thn, body.field-ui .uploader-error, body.field-ui .ev-meta, body.field-ui .ev-when, body.field-ui .box-against,
body.field-ui .tile-note, body.field-ui .fab-item div, body.field-ui .fab-pop-head, body.field-ui .today-date, body.field-ui .today-time { font-size: var(--f-text); }
body.field-ui .tile-name { font-size: var(--f-action); }
body.field-ui .tile { min-height: var(--f-tile); }
body.field-ui .tiles { grid-template-columns: repeat(auto-fill, minmax(calc(var(--f-hit) * 4.6), 1fr)); gap: var(--f-pad); }

/* ---- 今日の仕事 ---- */
body.field-ui .today-tab { min-height: var(--f-main); font-size: var(--f-action); padding: 0 calc(var(--f-pad-x) * 1.1); }
body.field-ui .today-tabs { gap: var(--f-gap); border-bottom: 0; }
body.field-ui .today-tab { border: 2px solid var(--border-strong); border-radius: 8px; margin-bottom: 0; }
body.field-ui .today-tab.on { border-color: var(--primary); background: var(--primary-soft); }
body.field-ui .today-table { min-width: 0; table-layout: fixed; }
body.field-ui .today-table .col-box { width: calc(var(--f-hit) * 1.8); }
body.field-ui .today-table .col-tag { width: calc(var(--f-hit) * 3); }
body.field-ui .today-table .col-time { width: calc(var(--f-hit) * 2.2); }
body.field-ui .today-table td { height: auto; padding: var(--f-pad) var(--f-gap); vertical-align: middle; }
body.field-ui .today-item td:first-child { text-align: center; }
body.field-ui .today-group-label { line-height: var(--f-main); font-size: var(--f-action); }
body.field-ui .today-label { font-size: var(--f-action); padding-left: 0; display: inline-block; line-height: 1.5; }
body.field-ui .today-desc { font-size: var(--f-text); color: var(--text-2); margin-top: 2px; }
body.field-ui .photo-need { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; display: inline-block; margin: calc(var(--f-gap) / 2) var(--f-gap) 0 0; }
body.field-ui .photo-need::before { content: "● "; }
body.field-ui .see-btn { margin-top: calc(var(--f-gap) / 2); position: relative; }
body.field-ui .see-btn.has { border-color: var(--success-strong); color: var(--success-ink); }
body.field-ui .cam-count { margin-left: var(--f-gap); background: var(--success-strong); color: var(--surface); border-radius: 14px; padding: 0 10px; font-size: var(--f-text); }
body.field-ui .today-note { display: block; font-size: var(--f-text); color: var(--text-2); margin-top: calc(var(--f-gap) / 2); }
body.field-ui .today-item.done .today-label::before { content: "✔ 済み　"; color: var(--success-strong); text-decoration: none; display: inline-block; }
body.field-ui .today-bar { height: 16px; border-radius: 8px; }
body.field-ui .today-progress { font-size: var(--f-action); }

/* ---- 入力の窓：幅は画面の8割・最大は大きさごと（小640・中720・大840）。中だけ動き、下の大きいボタンは動かない ---- */
body.win-open { overflow: hidden; }
.win-backdrop {
  position: fixed; inset: 0; z-index: 20; background: var(--overlay); display: flex; align-items: center; justify-content: center;
  padding: var(--f-pad); box-sizing: border-box;
}
.win {
  position: relative; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-modal);
  width: min(80vw, var(--f-win)); max-height: calc(100vh - var(--f-pad) * 2); display: flex; flex-direction: column; overflow: hidden;
  font-size: var(--f-text);
}
.win > form, .win > .win-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; margin: 0; }
.win-head { display: flex; align-items: center; justify-content: space-between; gap: var(--f-gap); padding: var(--f-pad) var(--f-pad-x); border-bottom: 2px solid var(--border); flex: none; }
.win-title { margin: 0; font-size: var(--f-head); font-weight: 700; line-height: 1.3; }
.win-x {
  min-height: var(--f-hit); min-width: calc(var(--f-hit) * 2); padding: 0 var(--f-pad-x); font-size: var(--f-action); font-weight: 700; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--text); font-family: inherit;
}
.win-sub { padding: var(--f-gap) var(--f-pad-x) 0; font-size: var(--f-text); color: var(--text-2); flex: none; }
.win-body { padding: var(--f-pad) var(--f-pad-x); overflow-y: auto; display: flex; flex-direction: column; gap: var(--f-pad); min-height: 0; flex: 1 1 auto; }
.win-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--f-gap); padding: var(--f-pad) var(--f-pad-x); border-top: 2px solid var(--border); background: var(--surface-2); flex: none; }
.win-foot .foot-hint { margin-right: auto; font-size: var(--f-text); color: var(--text-2); }
.win-done { font-size: var(--f-lead); font-weight: 700; color: var(--success-ink); background: var(--success-soft); border-radius: 8px; padding: var(--f-pad) var(--f-pad-x); }
.win-done::before { content: "✔ "; }
.win-count { font-size: var(--f-text); color: var(--text-2); }
.win textarea.fi, .win textarea { min-height: calc(var(--f-action) * 1.6 * 4 + var(--f-pad) * 1.25); }
.win .send-cols { display: block; }
.win .send-left, .win .send-right { border-right: 0; padding: 0; box-sizing: border-box; flex: none; }
.win .send-right { margin-top: var(--f-pad); }
.win-guard { position: absolute; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: var(--f-pad-x); z-index: 2; }
.win-guard[hidden] { display: none; }
.win-guard-box { background: var(--surface); border-radius: 12px; padding: calc(var(--f-pad) * 1.5); width: 100%; box-shadow: var(--shadow-pop); }
.win-guard-box p { margin: 0 0 var(--f-pad); font-size: var(--f-lead); font-weight: 700; line-height: 1.5; }
.win-guard-buttons { display: flex; flex-wrap: wrap; gap: var(--f-gap); }
.win-review { font-size: var(--f-lead); line-height: 1.8; white-space: pre-wrap; background: var(--surface-2); border: 2px solid var(--border); border-radius: 8px; padding: var(--f-pad) var(--f-pad-x); }
.win-files { display: flex; flex-direction: column; gap: var(--f-gap); }
.win-file { display: flex; align-items: center; gap: var(--f-gap); min-height: var(--f-main); font-size: var(--f-action); border: 2px solid var(--border); border-radius: 8px; padding: 8px 14px; color: var(--text); background: var(--surface); }
.win-file-icon { flex: none; width: calc(var(--f-hit) * 1.2); height: calc(var(--f-hit) * .85); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--f-text); font-weight: 700; background: var(--chip-bg); color: var(--text-2); }
.win-file-icon.pdf { background: var(--danger-soft); color: var(--danger-ink); }
.win-file-icon.excel { background: var(--success-soft); color: var(--success-ink); }
.win-file-icon.word { background: var(--info-soft); color: var(--primary-dark); }
.win-file-icon.image { background: var(--yellow-soft); color: var(--yellow-ink); }
.win-file-name { min-width: 0; overflow-wrap: anywhere; }
body.field-ui .th-add { width: calc(var(--f-hit) * 2.4); min-height: calc(var(--f-hit) * 1.6); height: auto; font-size: var(--f-action); border-radius: 8px; color: var(--text-2); }
body.field-ui .th-btn { width: calc(var(--f-hit) * 2.4); height: calc(var(--f-hit) * 1.8); }
body.field-ui .th-x { width: calc(var(--f-hit) * .75); height: calc(var(--f-hit) * .75); border-radius: var(--f-hit); font-size: var(--f-lead); top: -10px; right: -10px; }
body.field-ui .uploader-row { gap: var(--f-gap); }

/* ---- 押したあとの知らせ（取り消せる） ---- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--f-pad) * 1.5); transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: var(--f-gap); width: min(80vw, calc(var(--f-win) * .76)); }
.toast { display: flex; align-items: center; gap: var(--f-gap); background: var(--text); color: var(--surface); border-radius: 12px; padding: var(--f-gap) var(--f-gap) var(--f-gap) var(--f-pad-x); box-shadow: var(--shadow-pop); font-size: var(--f-action); }
.toast-text { flex: 1; min-width: 0; font-weight: 700; }
.toast .toast-undo { background: var(--surface); color: var(--text); border: 2px solid var(--surface); min-height: var(--f-hit); padding: 0 var(--f-pad-x); font-size: var(--f-action); font-weight: 700; border-radius: 8px; cursor: pointer; font-family: inherit; }
.toast .toast-close { min-width: var(--f-hit); min-height: var(--f-hit); border: 0; background: transparent; color: var(--surface); font-size: var(--f-head); cursor: pointer; }

/* ---- 右下の「＋」と、かんたん手続きの一覧 ---- */
body.field-ui .fab { width: calc(var(--f-hit) * 1.4); height: calc(var(--f-hit) * 1.4); border-radius: var(--f-hit); font-size: calc(var(--f-hit) * .8); }
body.field-ui .fab-wrap { right: calc(var(--f-pad) * 1.5); bottom: calc(var(--f-pad) * 1.5); }
body.field-ui .fab-pop { width: calc(var(--f-hit) * 7); bottom: calc(var(--f-hit) * 1.8); }
body.field-ui .fab-item { min-height: var(--f-main); padding: var(--f-gap) var(--f-pad-x); font-size: var(--f-action); }
body.field-ui .fab-item b { font-size: var(--f-action); }

/* ---- 狭い画面（1,024px 以下）でも、横にはみ出さない ---- */
body.field-ui .main { min-width: 0; }
body.field-ui .app { overflow-x: clip; }
.win-backdrop[hidden] { display: none; }

/* ---- 文字のリンク・補足：押せるものは48px、補足の文字も16px以上 ---- */
body.field-ui .row-link, body.field-ui .ph-link, body.field-ui .settings-link, body.field-ui .hb-link, body.field-ui .easy-fix, body.field-ui .link-btn {
  display: inline-flex; align-items: center; min-height: var(--f-hit); min-width: var(--f-hit); font-size: var(--f-action); padding: 0 6px;
}
body.field-ui .ph-link { font-weight: 700; }
body.field-ui .settings-link { padding: 0 var(--f-pad-x); }
body.field-ui .event-note, body.field-ui .quote-text, body.field-ui .quote-author, body.field-ui .quick-to, body.field-ui .ph-note,
body.field-ui .easy-assignee, body.field-ui .cam-count, body.field-ui .avatar, body.field-ui small { font-size: var(--f-text); }
body.field-ui .quick-btn { min-height: var(--f-tile); font-size: var(--f-action); gap: var(--f-gap); padding: var(--f-gap); }
body.field-ui .quick-name { font-size: var(--f-action); }
body.field-ui .quick { grid-template-columns: repeat(auto-fill, minmax(calc(var(--f-hit) * 4.6), 1fr)); gap: var(--f-pad); padding: var(--f-pad); }

/* ---- 部品ごとの大きさ（測って足りなかったもの） ---- */
body.field-ui .today { gap: var(--f-pad); }
body.field-ui .today-top, body.field-ui .today-title, body.field-ui .today-actions, body.field-ui .today-nav { gap: var(--f-gap); }
body.field-ui .today-nav { display: inline-flex; flex-wrap: wrap; align-items: center; }
body.field-ui .today-board { gap: var(--f-pad); }
body.field-ui .past-badge { font-size: var(--f-text); font-weight: 700; background: var(--yellow-soft); color: var(--yellow-ink); border-radius: 6px; padding: 6px 12px; }
body.field-ui .people-row { display: flex; align-items: center; gap: var(--f-gap); min-height: var(--f-main); padding: 0 var(--f-pad-x); margin-bottom: var(--f-gap); font-size: var(--f-action); border: 2px solid var(--border); border-radius: 8px; cursor: pointer; }
body.field-ui .people-row .pr-name, body.field-ui .people-row b { font-size: var(--f-action); }
body.field-ui .task-row-title, body.field-ui a.row-link { display: inline-flex; align-items: center; min-height: var(--f-hit); font-size: var(--f-action); }
body.field-ui .tab { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); margin: 0 var(--f-gap) var(--f-gap) 0; font-size: var(--f-action); font-weight: 700; border: 2px solid var(--border-strong); border-radius: 8px; }
body.field-ui .tab.on, body.field-ui .tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
body.field-ui .office-chip, body.field-ui .pj-card, body.field-ui .group-save, body.field-ui .group-pick, body.field-ui .group-del, body.field-ui .chosen-chip, body.field-ui .th-add {
  min-height: var(--f-hit); min-width: var(--f-hit); font-size: var(--f-action);
}
body.field-ui .prog-chips, body.field-ui .group-chips, body.field-ui .chosen-chips, body.field-ui .pj-cards, body.field-ui .chips, body.field-ui .easy-chips { gap: var(--f-gap); }
body.field-ui .pj-cards { grid-template-columns: repeat(auto-fill, minmax(calc(var(--f-hit) * 4.6), 1fr)); }
body.field-ui .pj-card b { font-size: var(--f-action); }
body.field-ui .pj-card span, body.field-ui .pj-room-note, body.field-ui .account-label, body.field-ui .task-ph-note,
body.field-ui .easy-preview-title, body.field-ui .easy-preview-note, body.field-ui .easy-preview-to, body.field-ui th, body.field-ui .task-ph { font-size: var(--f-text); }
body.field-ui .task-ph { font-weight: 700; padding: var(--f-gap) var(--f-pad); }

/* ---- 窓の中の並び：中身は縮めない（重ならない）。リストの行は、行どうしを12px離す ---- */
.win-body > * { flex-shrink: 0; }
.win .send-left, .win .send-right { display: flex; flex-direction: column; gap: var(--f-pad); }
.win .send-left > *, .win .send-right > * { flex-shrink: 0; }
.win .people-list, .win .people-body { max-height: 40vh; overflow-y: auto; padding-right: 4px; }
body.field-ui .people-row { height: auto; box-sizing: border-box; }
body.field-ui .people-name, body.field-ui .people-office, body.field-ui .people-role, body.field-ui .people-head { font-size: var(--f-text); }
body.field-ui .people-row .people-name { font-size: var(--f-action); }
body.field-ui .people-office { width: calc(var(--f-hit) * 2); }
body.field-ui .recent-badge { font-size: var(--f-text); padding: 2px 8px; }
body.field-ui .guide { font-size: var(--f-text); }
body.field-ui .guide a { display: inline-flex; align-items: center; min-height: var(--f-hit); font-size: var(--f-action); }
body.field-ui .dev-help, body.field-ui label { font-size: var(--f-text); }
body.field-ui .row-link, body.field-ui .settings-link { margin: calc(var(--f-gap) / 2) 0; }
body.field-ui .pj-room-grid { gap: var(--f-pad); }
body.field-ui .pj-room { min-height: var(--f-tile); font-size: var(--f-action); }
body.field-ui .pj-room b { font-size: var(--f-action); }
body.field-ui .pj-room-note, body.field-ui .pj-room-meta, body.field-ui .pj-room-meta b { font-size: var(--f-text); }
body.field-ui .dev-accounts td { padding: 6px 12px; }
body.field-ui .dev-accounts form { margin: calc(var(--f-gap) / 2) 0; }
body.field-ui .card, body.field-ui .login-box { font-size: var(--f-text); }
body.field-ui .message-panel { font-size: var(--f-lead); padding: calc(var(--f-pad) * 2) var(--f-pad); }
body.field-ui .office-chips { gap: var(--f-gap); }
body.field-ui .office-chip { height: auto; min-height: var(--f-hit); font-size: var(--f-action); padding: 0 var(--f-pad-x); border-width: 2px; border-radius: 24px; }
body.field-ui .pj-seg { display: inline-flex; gap: var(--f-gap); }
body.field-ui .pj-seg-btn { height: auto; min-height: var(--f-hit); min-width: var(--f-hit); font-size: var(--f-action); border-width: 2px; border-radius: 8px !important; margin: 0; }
body.field-ui .filters, body.field-ui .admin-form { gap: var(--f-gap); }
body.field-ui .filter-input, body.field-ui .form-select, body.field-ui .form-control { min-height: var(--f-hit); height: auto; font-size: var(--f-action); }
body.field-ui .filter-input.wide { width: auto; min-width: calc(var(--f-hit) * 5.4); }
body.field-ui .filters label { font-size: var(--f-text); gap: var(--f-gap); }
body.field-ui .send-search { margin-bottom: var(--f-gap); }
body.field-ui .login-form .fi, body.field-ui form .fi { margin-bottom: 0; }
body.field-ui .prog-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); }
body.field-ui .login-form { display: flex; flex-direction: column; gap: var(--f-pad); padding: var(--f-pad); }
body.field-ui .login-form .bt { margin-top: 4px; }
body.field-ui .nb, body.field-ui .hb, body.field-ui .nav-big { white-space: nowrap; }
body.field-ui .nb { display: flex; align-items: center; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * .75); font-size: var(--f-text); font-weight: 400; border: 0; border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap; color: var(--text-2); box-sizing: border-box; }
body.field-ui .nb:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.win-sub { font-size: var(--f-lead); font-weight: 700; color: var(--text); }

/* ---- 文字の大きさ（小・中・大）のボタン ---- */
body.field-ui .text-size { display: flex; align-items: center; gap: var(--f-gap); flex: none; }
body.field-ui .text-size-label { font-size: var(--f-text); color: var(--text-2); margin-right: calc(var(--f-gap) / 2); white-space: nowrap; }
body.field-ui .size-btn { min-height: var(--f-hit); min-width: var(--f-hit); padding: 0 calc(var(--f-pad-x) / 2); font-size: var(--f-action); font-family: inherit; border: 2px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; white-space: nowrap; }
body.field-ui .size-btn.on { border-color: var(--primary); background: var(--primary); color: var(--surface); font-weight: 700; }
body.field-ui .size-btn.on::before { content: "✔"; margin-right: 2px; }
body.field-ui .account-size-body { padding: var(--f-pad); display: flex; flex-direction: column; gap: var(--f-gap); align-items: flex-start; }
/* プロフィール（画面案67 Account）：2つの枠は最大760px・枠の見出しは14px太字（このページだけ。他の枠は変えない） */
body.field-ui #account-size, body.field-ui #account { max-width: 760px; width: 100%; }
body.field-ui #account-size > .ph, body.field-ui #account > .ph { font-size: 14px; font-weight: 700; }
body.field-ui .nav-small { padding: 0 calc(var(--f-pad-x) * .7); }
/* 「大」は、上の段がいっぱいになるので、ロゴの文字と、所属・役割をはぶく（名前は残す） */
body[data-text-size="xlarge"].field-ui .logo-text, body[data-text-size="xlarge"].field-ui .header-sub { display: none; }
body.field-ui .link-btn { overflow-wrap: anywhere; word-break: break-all; }
body.field-ui .easy-input-value { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- マニュアル（仕様書 6.4） ---- */
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--f-hit) * 6), 1fr)); gap: var(--f-pad); }
.manual-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--f-gap); min-height: var(--f-tile); padding: var(--f-pad); text-align: center; background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--radius-tile); color: var(--text); }
.manual-card:hover { border-color: var(--primary); background: var(--hover); color: var(--text); }
.manual-icon { color: var(--primary); width: calc(var(--f-hit) * 1.1); height: calc(var(--f-hit) * 1.1); }
.manual-name { font-size: var(--f-action); font-weight: 700; line-height: 1.4; }
.manual-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--f-gap); font-size: var(--f-text); color: var(--text-2); }
.manual-mark { font-weight: 700; padding: 2px var(--f-gap); border-radius: 6px; }
.manual-mark.required { background: var(--yellow-soft); color: var(--yellow-ink); }
.manual-mark.done { background: var(--success-soft); color: var(--success-ink); }
.manual-image { display: flex; align-items: center; justify-content: center; min-height: calc(var(--f-hit) * 3); background: var(--surface-2); border: 2px solid var(--border); border-radius: 8px; overflow: hidden; }
.manual-image img { max-width: 100%; max-height: calc(var(--f-hit) * 8); display: block; }
.manual-image-no { font-size: calc(var(--f-hit) * 2); font-weight: 700; color: var(--border-strong); }
.manual-text p { margin: 0 0 var(--f-gap); }
.manual-text li.sub { margin-left: var(--f-pad-x); }
.manual-text code { font-size: var(--f-text); background: var(--chip-bg); padding: 0 4px; border-radius: 4px; overflow-wrap: anywhere; }
.manual-done-note { padding: 0 var(--f-pad) var(--f-pad); background: var(--surface-2); font-size: var(--f-text); color: var(--text-2); }
.role-check { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }

/* ---- 学びのページ・ステップ一覧・ステップの画面（仕様書 6.4。A-17） ---- */
.learn-search { display: flex; gap: var(--f-gap); align-items: stretch; }
.learn-search .fi { flex: 1 1 auto; min-width: 0; }
.learn-cols { display: flex; gap: var(--f-pad); align-items: flex-start; }
.learn-main-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--f-pad); }
.learn-side { flex: 0 0 30%; min-width: 0; display: flex; flex-direction: column; gap: var(--f-pad); }
.learn-list { display: flex; flex-direction: column; gap: var(--f-gap); padding: var(--f-gap); }
.learn-item { display: flex; align-items: center; gap: var(--f-pad); min-height: var(--f-main); padding: var(--f-gap) var(--f-pad); background: var(--surface); border: 2px solid var(--border); border-radius: 8px; color: var(--text); }
.learn-item:hover { background: var(--hover); border-color: var(--primary); color: var(--text); }
.learn-must { border-color: var(--yellow); }
.learn-main { display: flex; flex-direction: column; gap: calc(var(--f-gap) / 2); min-width: 0; flex: 1; }
.learn-main .manual-name { overflow-wrap: anywhere; }
.learn-play { flex: none; width: calc(var(--f-hit) * 1.2); height: calc(var(--f-hit) * 1.2); display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: var(--surface); border-radius: 50%; font-size: var(--f-action); }
.learn-cats { display: flex; flex-wrap: wrap; gap: var(--f-gap); padding: var(--f-gap); }
.cat-btn { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 2px solid var(--border-strong); border-radius: 24px; font-size: var(--f-action); font-weight: 700; color: var(--text-2); background: var(--surface); }
.cat-btn:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.learn-titles, .learn-recent { list-style: none; margin: 0; padding: var(--f-gap); display: flex; flex-direction: column; gap: var(--f-gap); }
.learn-title-link { display: flex; align-items: center; justify-content: space-between; gap: var(--f-gap); min-height: var(--f-hit); padding: calc(var(--f-gap) / 2) var(--f-pad); border: 2px solid var(--border); border-radius: 8px; font-size: var(--f-action); color: var(--text); }
.learn-title-link:hover { border-color: var(--primary); background: var(--hover); color: var(--text); }
.learn-stats { display: flex; gap: var(--f-pad); padding: var(--f-pad); }
.learn-stats > div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: var(--f-text); color: var(--text-2); }
.learn-stats b { font-size: var(--f-title); color: var(--text); line-height: 1.2; }
.learn-stats small { font-size: var(--f-text); font-weight: 400; margin-left: 2px; }
.learn-cal { padding: 0 var(--f-pad) var(--f-pad); }
.learn-cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--f-gap); margin-bottom: var(--f-gap); font-size: var(--f-action); }
.cal-nav { display: inline-flex; align-items: center; justify-content: center; min-width: var(--f-hit); min-height: var(--f-hit); border: 2px solid var(--border-strong); border-radius: 8px; font-size: var(--f-lead); color: var(--text-2); background: var(--surface); }
.cal-nav:hover { border-color: var(--primary); color: var(--text); }
.cal-table { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; text-align: center; font-size: var(--f-text); }
.cal-table th { font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-table td { height: calc(var(--f-hit) * .8); border-radius: 6px; position: relative; color: var(--text); }
.cal-table td.out { color: var(--faint); opacity: .5; }
.cal-table td.viewed { background: var(--success-soft); color: var(--success-ink); font-weight: 700; }
.cal-flag { color: var(--attention); font-weight: 700; margin-left: 2px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); margin-top: var(--f-gap); font-size: var(--f-text); color: var(--text-2); }
.cal-key { width: var(--f-text); height: var(--f-text); border-radius: 4px; display: inline-block; }
.cal-key.viewed { background: var(--success-soft); border: 1px solid var(--success-line); }
.manual-lead { padding: var(--f-pad); display: flex; flex-direction: column; gap: var(--f-gap); }
.manual-desc { margin: 0; font-size: var(--f-action); line-height: 1.7; }
.manual-pct { font-weight: 700; margin-left: var(--f-gap); }
.step-rows { list-style: none; margin: 0; padding: 0; }
.step-row { display: flex; align-items: flex-start; gap: var(--f-gap); padding: var(--f-pad); border-bottom: 1px solid var(--divider); }
.step-row:last-child { border-bottom: 0; }
.step-row-main { display: flex; align-items: flex-start; gap: var(--f-pad); flex: 1; min-width: 0; color: var(--text); padding: calc(var(--f-gap) / 2); border-radius: 8px; border: 2px solid transparent; }
.step-row-main:hover { background: var(--hover); border-color: var(--primary); color: var(--text); }
.step-row-text { display: flex; flex-direction: column; gap: calc(var(--f-gap) / 2); min-width: 0; }
.step-row-title { font-size: var(--f-action); font-weight: 700; overflow-wrap: anywhere; }
.step-bullets { margin: 0; padding-left: var(--f-pad-x); font-size: var(--f-text); color: var(--text-2); line-height: 1.6; }
.step-row.is-done .step-row-title { text-decoration: line-through; color: var(--faint); }
.step-state { flex: none; min-height: var(--f-hit); min-width: calc(var(--f-hit) * 2); padding: 0 var(--f-pad-x); font-size: var(--f-action); font-weight: 700; font-family: inherit; border-radius: 8px; cursor: pointer; }
.step-state.todo { border: 2px solid var(--primary); background: var(--surface); color: var(--primary); }
.step-state.todo:hover { background: var(--primary-soft); }
.step-state.done { border: 2px solid var(--border-strong); background: var(--surface-2); color: var(--muted); font-weight: 400; }
.step-state.done:hover { background: var(--hover); border-color: var(--primary); color: var(--text); }
.manual-dl { display: grid; grid-template-columns: auto 1fr; gap: var(--f-gap) var(--f-pad); margin: 0; padding: var(--f-pad); font-size: var(--f-action); }
.manual-dl dt { color: var(--text-2); font-size: var(--f-text); font-weight: 400; }
.manual-dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.crumb { font-size: var(--f-text); font-weight: 400; color: var(--muted); margin-right: var(--f-gap); }
.crumb a { color: var(--primary); display: inline-flex; align-items: center; min-height: var(--f-hit); }
.manual-owner { font-weight: 400; font-size: var(--f-text); color: var(--text-2); }
a.size-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.mode-view { display: flex; flex-direction: column; gap: var(--f-pad); }
/* 見せ方：保存した選択があればそれ。なければ画面の幅で自動（768px未満は1画面ずつ） */
.trouble-title { margin: 0; font-size: var(--f-head); font-weight: 700; }
.trouble-choices { display: flex; flex-direction: column; gap: var(--f-gap); }
.trouble-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: var(--f-main); padding: var(--f-gap) var(--f-pad); text-align: left; background: var(--surface); border: 2px solid var(--border-strong); border-radius: 8px; font-family: inherit; font-size: var(--f-text); color: var(--text-2); cursor: pointer; }
.trouble-btn b { font-size: var(--f-action); color: var(--text); }
.trouble-btn:hover { border-color: var(--primary); background: var(--hover); }
.trouble-panel form, .trouble-panel .inline-form { display: block; width: 100%; }
.trouble-memo { margin: 0; font-size: var(--f-text); color: var(--text-2); }
.call-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); padding: var(--f-pad); background: var(--success-soft); border-radius: 8px; font-size: var(--f-action); }
.feedback-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); padding: var(--f-gap) var(--f-pad); font-size: var(--f-action); }
.feedback-thanks { color: var(--success-ink); font-weight: 700; font-size: var(--f-text); }
@media (max-width: 900px) {
  .learn-cols { flex-direction: column; }
  .learn-side { flex: none; width: 100%; }
  .manual-flow { flex: 1 1 100%; }
  .step-row { flex-wrap: wrap; }
}
/* スマホ（幅390px前後）：上の帯は折り返してよい。入り口の段は、その中だけ横に動かす。ページは横にはみ出さない */
@media (max-width: 767px) {
  body.field-ui .header-user { flex: 1 1 100%; order: 9; text-align: left; white-space: normal; }
  body.field-ui .header-menu { flex: 1 1 100%; order: 8; overflow-x: auto; flex-wrap: nowrap; }
  .learn-search { flex-wrap: wrap; }
  .win { width: 96vw; }
  body.field-ui .title-row { flex-direction: column; align-items: flex-start; }
}
.learn-search { margin-top: var(--f-gap); }
body.field-ui .crumb a { font-size: var(--f-action); }
.learn-main { align-items: flex-start; text-align: left; }
.learn-main .manual-meta { justify-content: flex-start; }

/* ---- A-17追補：学びのページ・ステップ一覧・ステップの画面を、画面案（Manual2）に合わせる ---- */
.learn-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-pad); }
.learn-top .page-title { flex: none; order: 0; }
.learn-search .fi { border-radius: 4px 0 0 4px; min-height: var(--f-main); }
.learn-search .bt { border-radius: 0 4px 4px 0; min-height: var(--f-main); }
.learn-must .ph { background: var(--todo-bg); }
.pn.learn-must { border: 2px solid var(--todo-line); }
.learn-item .manual-sub { font-size: var(--f-text); color: var(--muted); }
.learn-cats { padding: 0; }
.cat-btn { border-radius: 6px; font-weight: 400; }
.cat-btn.on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 700; }
.crumb-line { font-size: var(--f-text); color: var(--muted); }
.crumb-line a { color: var(--navy); text-decoration: underline; display: inline-flex; align-items: center; min-height: var(--f-hit); font-size: var(--f-action); }
.manual-head { padding: var(--f-pad) var(--f-pad-x); display: flex; flex-wrap: wrap; gap: var(--f-pad); align-items: center; }
.manual-head-text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.manual-head-title { margin: 0; font-size: calc(var(--f-action) + 5px); font-weight: 700; line-height: 1.4; }
.manual-desc { font-size: var(--f-text); color: var(--text-2); }
.manual-meta-line { font-size: var(--f-text); color: var(--muted); }
.manual-head-bar { flex: 0 0 min(260px, 100%); }
.head-bar { display: block; height: 14px; background: var(--chip-bg); border-radius: 7px; overflow: hidden; }
.head-bar-fill { display: block; height: 100%; background: var(--success); }
.head-pct { text-align: right; font-weight: 700; margin-top: 4px; font-size: var(--f-action); }
.step-row { gap: var(--f-pad); padding: var(--f-pad) var(--f-pad-x); }
.step-row-main { display: block; border: 0; padding: 0; }
.step-row-main:hover { background: transparent; border: 0; }
.step-row-main:hover .step-row-title { text-decoration: underline; }
.step-row-title { display: block; font-weight: 700; color: var(--navy); font-size: var(--f-action); }
.step-bullets { margin: 6px 0 0; padding-left: calc(var(--f-pad-x) * 1.1); color: var(--text-2); font-size: var(--f-action); line-height: 1.7; }
.step-row.is-done .step-row-title { text-decoration: line-through; color: var(--navy); }
.step-state { min-height: var(--f-main); min-width: calc(var(--f-main) * 2.2); border-radius: 6px; font-weight: 700; }
.step-state.todo { border: 2px solid var(--todo-line); background: var(--todo-bg); color: var(--text); }
.step-state.todo:hover { background: var(--yellow-soft); }
.step-state.done { border: 2px solid var(--border-strong); background: var(--surface-2); color: var(--faint); }
.step-state.done:hover { background: var(--hover); color: var(--text-2); }
/* ステップの画面：下の3つのボタン */
/* 見せ方：リンクは1つだけ。広い画面は「1画面ずつで見る」、狭い画面・1画面ずつのときは「一覧で見る」 */
.mode-link { display: inline-flex; align-items: center; min-height: var(--f-hit); font-size: var(--f-text); color: var(--navy); text-decoration: underline; }
.mode-view .to-flow { display: none; }
.mode-view[data-mode="slides"] .to-slides { display: none; }
.mode-view[data-mode="slides"] .to-flow { display: inline-flex; }
@media (max-width: 767px) {
  .mode-view[data-mode="auto"] .to-slides { display: none; }
  .mode-view[data-mode="auto"] .to-flow { display: inline-flex; }
  .learn-item { flex-wrap: wrap; }
}
.mode-link { font-size: var(--f-action); }
.learn-list { gap: var(--f-gap); padding: var(--f-gap); }
.learn-item { border: 1px solid var(--border); border-radius: 6px; }

/* ---- ステップの画面（画面案 Manual.dc.html。A-17追補2）：上の1行・左に全体の流れ・右に本文と下の操作 ---- */
.mode-view { display: flex; flex-direction: column; gap: var(--f-pad); }
body.field-ui .manual-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--f-gap); font-size: var(--f-action); font-weight: 700; line-height: 1.4; }
.manual-line a { display: inline-flex; align-items: center; min-height: var(--f-hit); }
.manual-line .ml-biz { font-size: var(--f-text); font-weight: 400; color: var(--muted); }
.manual-line .ml-sep { font-size: var(--f-text); font-weight: 400; color: var(--muted); }
.manual-line .ml-title { color: var(--text); }
.manual-line .ml-sub { font-size: var(--f-text); font-weight: 400; color: var(--muted); margin-left: var(--f-gap); }
.manual-view { display: flex; flex-wrap: wrap; gap: var(--f-pad); align-items: flex-start; }
.manual-flow { flex: 0 0 calc(var(--f-hit) * 7); min-width: 0; }
.manual-body { flex: 999 1 calc(var(--f-hit) * 12); min-width: 0; }
.manual-steps { list-style: none; margin: 0; padding: 0; }
.manual-step-link { display: flex; align-items: center; gap: var(--f-pad); min-height: var(--f-hit); padding: calc(var(--f-gap) * .75) var(--f-pad-x); border-bottom: 1px solid var(--divider); background: var(--surface); color: var(--text); font-size: var(--f-action); line-height: 1.4; }
.manual-step-link.branch { padding-left: calc(var(--f-pad-x) * 2.2); }
.manual-step-link:hover { background: var(--hover); color: var(--text); }
.manual-step-link.on { background: var(--primary-soft); font-weight: 700; }
.manual-no { flex: none; box-sizing: border-box; min-width: calc(var(--f-hit) * .7); height: calc(var(--f-hit) * .7); padding: 0 4px; border-radius: calc(var(--f-hit) * .35); display: inline-flex; align-items: center; justify-content: center; background: var(--chip-bg); color: var(--text-2); font-weight: 700; font-size: var(--f-text); line-height: 1; }
.manual-step-link.is-done .manual-no, .step-dots .dot.done .manual-no { background: var(--success-strong); color: var(--surface); }
.manual-step-link.on .manual-no, .step-dots .dot.now .manual-no { background: var(--navy); color: var(--surface); }
.manual-step-title { min-width: 0; overflow-wrap: anywhere; }
.manual-step-note { flex: none; margin-left: auto; font-size: var(--f-text); font-weight: 700; color: var(--success-ink); }
.manual-content { padding: var(--f-pad-x); display: flex; flex-direction: column; gap: var(--f-pad); }
.manual-step-heading { margin: 0; font-size: var(--f-lead); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.manual-text { font-size: var(--f-action); line-height: 1.6; overflow-wrap: anywhere; }
.manual-text ul { list-style: none; margin: 0 0 var(--f-gap); padding: 0; display: flex; flex-direction: column; gap: var(--f-gap); }
.manual-text ul > li { position: relative; padding-left: 1.6em; }
.manual-text ul > li::before { content: "■"; position: absolute; left: 0; top: .15em; font-size: .75em; color: var(--navy); }
.manual-text ol { margin: 0 0 var(--f-gap); padding-left: calc(var(--f-pad-x) * 1.4); }
.manual-text ul ul { margin-top: var(--f-gap); margin-bottom: 0; }
/* 下の操作：静かな「‹ 前へ」「うまくいかない」と、右に「✓ できた » 次へ」 */
.step-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--f-gap); margin: 0 var(--f-pad-x); padding: var(--f-pad-x) 0; border-top: 1px solid var(--border); }
.step-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-main); padding: 0 var(--f-pad-x); border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); font-size: var(--f-action); font-weight: 700; color: var(--text); }
.step-btn:hover { background: var(--hover); color: var(--text); }
.step-ask { display: inline-flex; align-items: center; min-height: var(--f-main); padding: 0 var(--f-gap); font-size: var(--f-action); color: var(--navy); text-decoration: underline; }
.step-go { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-main); padding: 0 calc(var(--f-pad-x) * 1.25); border: 1px solid var(--navy); border-radius: 4px; background: var(--navy); color: var(--surface); font-family: inherit; font-size: var(--f-action); font-weight: 700; cursor: pointer; white-space: nowrap; }
.step-go:hover { background: var(--primary); border-color: var(--primary); }
.step-actions .inline-form { margin-left: auto; }
.trouble-panel { margin: 0 var(--f-pad-x); padding: var(--f-pad); display: flex; flex-direction: column; gap: var(--f-pad); border: 2px solid var(--attention); border-radius: 6px; background: var(--todo-bg); }
/* 紙芝居（1画面ずつ）：同じ番号の丸を横に並べ、題名・写真・文字を大きく。左の流れは出さない */
.step-dots { display: none; list-style: none; margin: 0; padding: var(--f-pad-x) var(--f-pad-x) 0; flex-wrap: wrap; gap: var(--f-gap); }
.step-dots .dot { margin: 0; }
.mode-view[data-mode="slides"] .manual-flow { display: none; }
.mode-view[data-mode="slides"] .step-dots { display: flex; }
.mode-view[data-mode="slides"] .manual-step-heading { font-size: var(--f-title); }
.mode-view[data-mode="slides"] .manual-image { min-height: calc(var(--f-hit) * 4); }
.mode-view[data-mode="slides"] .manual-image img { max-height: calc(var(--f-hit) * 10); }
.mode-view[data-mode="slides"] .manual-text { font-size: var(--f-lead); }
@media (max-width: 767px) {
  .mode-view[data-mode="auto"] .manual-flow { display: none; }
  .mode-view[data-mode="auto"] .step-dots { display: flex; }
  .mode-view[data-mode="auto"] .manual-step-heading { font-size: var(--f-title); }
  .mode-view[data-mode="auto"] .manual-image { min-height: calc(var(--f-hit) * 4); }
  .mode-view[data-mode="auto"] .manual-image img { max-height: calc(var(--f-hit) * 10); }
  .mode-view[data-mode="auto"] .manual-text { font-size: var(--f-lead); }
  .step-actions .inline-form { order: -1; flex: 1 1 100%; margin-left: 0; }
  .step-go { width: 100%; }
}
.manual-image img { max-width: 100%; }

/* ---- 学びのページ：1本1行（A-17追補2）。画面の幅いっぱい。行の間は4px ---- */
.learn-single { width: 100%; max-width: none; display: flex; flex-direction: column; gap: var(--f-pad); }
.learn-list { display: flex; flex-direction: column; gap: 4px; padding: 0; }
.learn-item { display: flex; align-items: center; gap: var(--f-pad-x); padding: calc(var(--f-gap) * .6) var(--f-pad-x); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--text); }
.learn-item:hover { background: var(--hover); border-color: var(--primary); color: var(--text); }
.learn-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--f-gap); }
.learn-bar { flex: none; display: flex; align-items: center; gap: var(--f-gap); }
body.field-ui .learn-bar .today-bar { flex: none; width: 120px; height: 10px; }
.learn-pct { min-width: 3.4em; font-size: var(--f-text); color: var(--muted); text-align: right; }
.learn-featured { padding: var(--f-pad-x); border: 0; border-radius: 0; gap: var(--f-pad-x); }
.learn-featured .manual-name { font-size: var(--f-head); }
.featured-desc { font-size: var(--f-action); color: var(--text-2); line-height: 1.6; }
.cat-count { margin-left: calc(var(--f-gap) / 2); font-size: var(--f-text); font-weight: 400; color: var(--muted); }
.cat-btn.zero { color: var(--muted); }
.learn-result-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); font-size: var(--f-action); font-weight: 700; }
.learn-result-line .ph-note { font-size: var(--f-text); color: var(--muted); font-weight: 400; }
.learn-result-line .ph-link { font-size: var(--f-action); }
@media (max-width: 767px) {
  .learn-item { flex-wrap: wrap; }
  .learn-bar { flex: 1 1 100%; }
}

.learn-path { font-size: var(--f-text); color: var(--muted); }

/* ダッシュボードの「困ったとき」の帯 */
.help-band .help-band-row { display: flex; flex-wrap: wrap; gap: var(--f-gap); padding: var(--f-gap); }
.help-band .help-btn { flex: 1 1 200px; min-height: calc(var(--f-hit) * 1.4); padding: var(--f-gap) var(--f-pad-x); }
.help-band .help-btn b { font-size: var(--f-action); }
.help-band .help-btn span { font-size: var(--f-text); }
/* 「毎日のやり方」（1列で全部） */
.daily-back a { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--navy); text-decoration: underline; font-size: var(--f-action); }
.role-cols.single { grid-template-columns: 1fr; }

/* ---- 学びのページ：画面案 Manual4.dc.html と同じ数値（A-17追補6）。数値は「中」のときの画面案のとおり ---- */
.learn-top { gap: 12px; }
body.field-ui .learn-top .page-title { font-size: calc(var(--f-action) + 5px); }
.learn-top .learn-search { flex: 1 1 300px; max-width: 560px; order: 1; margin: 0; }
.learn-top .learn-search .fi { height: max(44px, var(--f-hit)); min-height: max(44px, var(--f-hit)); padding: 0 12px; font-size: var(--f-action); border: 1px solid var(--border-strong); border-radius: 4px 0 0 4px; }
.learn-top .learn-search .bt { height: max(44px, var(--f-main)); min-height: max(44px, var(--f-main)); min-width: 0; padding: 0 20px; font-size: var(--f-action); border-radius: 0 4px 4px 0; }
.learn-top #troubles-link { order: 2; }
.learn-single { gap: 14px; }
.find-ways { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.learn-top .find-ways { order: 4; }
.find-label { font-size: var(--f-text); color: var(--muted); }
.way-btn { display: inline-flex; align-items: center; justify-content: center; height: max(34px, calc(var(--f-hit) * .85)); padding: 0 14px; border: 2px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text-2); font-size: var(--f-text); font-weight: 700; }
.way-btn:hover { background: var(--hover); color: var(--text-2); }
.way-btn.on, .way-btn.on:hover { background: var(--navy); border-color: var(--navy); color: var(--surface); }
@media (max-width: 767px) { .find-ways, .learn-top .find-ways { flex: 1 1 100%; margin-left: 0; } }
/* 役割から */
.role-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: calc(var(--f-action) - 1px); color: var(--text-2); }
.role-switch summary { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0; border: 0; background: none; color: var(--navy); font-weight: 700; font-size: calc(var(--f-action) + 1px); cursor: pointer; list-style: none; }
.role-hint { font-size: calc(var(--f-action) - 1px); color: var(--faint); }
.role-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; align-items: start; }
@media (min-width: 1000px) { .role-cols:not(.single) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.role-col .ph, .genre-group .ph { padding: 8px 14px; font-size: calc(var(--f-action) - 1px); }
.role-col.stage-must { border: 2px solid var(--todo-line); }
.role-col.stage-must .ph { background: var(--todo-bg); }
.stage-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 11px; background: var(--navy); color: var(--surface); font-size: var(--f-text); }
.stage-must .stage-no { background: var(--todo-line); }
.stage-help .stage-no { background: var(--faint); }
.stage-sub { font-weight: 400; font-size: var(--f-text); color: var(--muted); margin-top: 2px; }
.role-row, .feature-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--divider); background: var(--surface); color: var(--text); font-size: var(--f-action); }
.role-row:hover, .feature-row:hover, .genre-row:hover { background: var(--hover); color: var(--text); }
.role-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.role-row .manual-name, .feature-row .manual-name, .genre-row .manual-name { font-size: var(--f-action); font-weight: 700; line-height: 1.4; }
.role-row .manual-sub, .feature-row .manual-sub, .genre-row .manual-sub { font-size: var(--f-text); color: var(--muted); line-height: 1.4; }
.mark-pill { flex: none; padding: 3px 8px; border-radius: 3px; font-size: var(--f-text); font-weight: 700; white-space: nowrap; }
.mark-required { background: var(--yellow); color: var(--text); }
.mark-unread { background: var(--chip-bg); color: var(--text); }
.mark-read { background: var(--pill-read-bg); color: var(--pill-read-ink); }
.chip-title { font-size: calc(var(--f-action) - 1px); color: var(--text-2); margin-top: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: max(8px, var(--f-gap)); }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: max(44px, var(--f-hit)); padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: var(--f-action); }
.chip-btn:hover { background: var(--hover); color: var(--text); }
/* まず読むもの */
.pn.learn-must { border: 2px solid var(--todo-line); }
.learn-must .ph { padding: 8px 14px; font-size: calc(var(--f-action) - 1px); background: var(--todo-bg); }
.learn-must .ph-note { font-size: var(--f-text); font-weight: 400; color: var(--muted); margin-left: 8px; }
.feature-row { border-bottom: 0; padding: 14px 16px; }
/* ジャンルから */
.genre-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.genre-tile { display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: var(--f-action); }
.genre-tile:hover { background: var(--hover); color: var(--text); border-color: var(--border); }
.genre-tile.empty-tile { background: var(--surface-2); opacity: .6; }
.genre-mark { flex: none; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--surface); font-weight: 700; font-size: calc(var(--f-action) + 5px); }
.genre-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.genre-text b { font-size: calc(var(--f-action) + 1px); }
.genre-text span { margin-top: 3px; font-size: var(--f-text); color: var(--muted); line-height: 1.5; }
.genre-count { flex: none; font-size: var(--f-text); font-weight: 700; color: var(--navy); }
.empty-tile .genre-count { color: var(--faint); }
.genre-back a { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--navy); text-decoration: underline; font-size: var(--f-action); }
.genre-name { margin: 0; font-size: var(--f-lead); font-weight: 700; }
.genre-none { margin: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: var(--f-action); color: var(--text-2); }
.genre-group { display: flex; flex-direction: column; }
.genre-row { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--divider); background: var(--surface); color: var(--text); font-size: var(--f-action); }
.genre-row:last-child { border-bottom: 0; }
.genre-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.genre-bar { flex: none; display: flex; align-items: center; gap: 8px; }
body.field-ui .genre-bar .today-bar { flex: none; width: 90px; height: 8px; background: var(--chip-bg); border-radius: 4px; }
.genre-bar .learn-pct { min-width: 0; font-size: var(--f-text); color: var(--text-2); }
/* 困りごとから */
.help-title { font-size: calc(var(--f-action) + 2px); font-weight: 700; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.help-btn { display: flex; flex-direction: column; justify-content: center; min-height: 84px; padding: 14px 16px; border-radius: 8px; color: var(--surface); }
.help-btn b { font-size: var(--f-lead); line-height: 1.4; }
.help-btn span { margin-top: 4px; font-size: var(--f-text); opacity: .9; }
.role-switch[open] { flex: 1 1 100%; }
.role-menu { margin-top: 8px; min-width: calc(var(--f-hit) * 5); display: flex; flex-wrap: wrap; gap: var(--f-gap); padding: var(--f-gap); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; }
.role-switch:not([open]) .role-menu { display: none; }
.role-opt { display: flex; align-items: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: var(--f-action); }
.role-opt:hover { background: var(--hover); color: var(--text); }
.role-opt.on { background: var(--primary-soft); font-weight: 700; }
.role-none { margin: 0; padding: var(--f-gap) var(--f-pad); background: var(--todo-bg); border: 1px solid var(--todo-line); border-radius: 4px; font-size: var(--f-action); }
.tone-blue { background: var(--tone-blue); } .tone-red { background: var(--tone-red); } .tone-orange { background: var(--tone-orange); }
.tone-purple { background: var(--tone-purple); } .tone-teal { background: var(--tone-teal); } .tone-gold { background: var(--tone-gold); }
.tone-pink { background: var(--tone-pink); } .tone-olive { background: var(--tone-olive); } .tone-gray { background: var(--tone-gray); }
@media (max-width: 767px) { .role-cols { grid-template-columns: 1fr; } .genre-row { flex-wrap: wrap; } .genre-bar { flex: 1 1 100%; } }
.help-btn:hover { color: var(--surface); }
/* ステップ一覧：画面案 Manual2 の数値（題名20px・説明14px・「・」の丸・進み具合の緑） */
body.field-ui .manual-head-title { font-size: calc(var(--f-action) + 5px); }
.manual-head .manual-desc { font-size: calc(var(--f-action) - 1px); color: var(--text-2); }
.step-bullets { list-style: disc; }
.head-bar-fill { background: var(--bar-ok); }

/* ---- 作る（A-18a）：画面案 Manual5.dc.html の「1 作り方を選ぶ」「5 動画を載せる（パソコン）」の数値 ---- */
.make-wrap { max-width: 900px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.make-pick { max-width: 640px; gap: 14px; }
.make-crumb { font-size: var(--f-text); color: var(--muted); }
.make-crumb a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-hit); min-width: var(--f-hit); font-size: var(--f-action); color: var(--navy); text-decoration: underline; }
body.field-ui .make-title { margin: 0; font-size: calc(var(--f-action) + 5px); font-weight: 700; }
.make-form { display: block; width: 100%; margin: 0; }
.make-card { display: flex; flex-direction: column; align-items: flex-start; width: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; }
.make-card-on { border: 2px solid var(--primary); background: var(--hover); cursor: pointer; }
.make-card-on:hover { color: var(--text); background: var(--primary-soft); }
.make-card-off { opacity: .55; }
.make-card-title { font-size: calc(var(--f-action) + 2px); font-weight: 700; }
.make-card-on .make-card-title { font-size: var(--f-lead); color: var(--navy); }
.make-card-text { margin-top: 4px; font-size: var(--f-text); line-height: 1.6; color: var(--text-2); }
.make-card-btn { display: inline-flex; align-items: center; margin-top: 10px; min-height: max(44px, var(--f-hit)); padding: 0 20px; border-radius: 6px; background: var(--primary); color: var(--surface); font-weight: 700; font-size: var(--f-action); }
.make-soon { margin-left: 8px; padding: 2px 8px; border-radius: 3px; background: var(--chip-bg); color: var(--text-2); font-size: var(--f-text); font-weight: 700; }
.make-note { font-size: var(--f-text); color: var(--faint); }
.make-pc-note { margin: 0; padding: 12px 14px; border: 1px solid var(--todo-line); border-radius: 4px; background: var(--todo-bg); font-size: var(--f-action); }
.make-back-btn { align-self: flex-start; }
.make-drafts .draft-row { font-size: var(--f-action); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--divider); color: var(--text); }
.make-drafts .draft-row:last-child { border-bottom: 0; }
.make-drafts .draft-row:hover { background: var(--hover); color: var(--text); }
.draft-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.draft-go { color: var(--navy); font-weight: 700; text-decoration: underline; }
/* 動画を載せる */
.make-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 11px; background: var(--navy); color: var(--surface); font-size: var(--f-text); }
.video-builder .ph { padding: 8px 14px; font-size: calc(var(--f-action) - 1px); }
.video-builder .ph-sub { margin-left: 6px; font-weight: 400; font-size: var(--f-text); color: var(--muted); }
.make-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.drop { border: 2px dashed var(--primary); border-radius: 8px; background: var(--hover); padding: 22px; text-align: center; }
.drop.over { background: var(--primary-soft); }
.drop-title { font-size: calc(var(--f-action) + 1px); font-weight: 700; color: var(--navy); }
.drop-note { margin-top: 6px; font-size: var(--f-text); color: var(--text-2); }
.drop-btn-wrap { margin-top: 10px; }
.drop-btn { min-height: max(44px, var(--f-hit)); padding: 0 20px; border: 0; border-radius: 6px; background: var(--primary); color: var(--surface); font: inherit; font-weight: 700; font-size: var(--f-action); cursor: pointer; }
.file-error { margin: 0; padding: 8px 12px; border: 1px solid var(--attention); border-radius: 6px; background: var(--todo-bg); color: var(--text); font-size: var(--f-action); }
.file-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: calc(var(--f-action) - 1px); }
.file-card[hidden] { display: none; }
.file-thumb { flex: none; width: 90px; height: 56px; border-radius: 4px; background: var(--video-bg); }
.file-main { flex: 1; min-width: 0; }
.file-main b { overflow-wrap: anywhere; }
.file-meta { margin-top: 2px; font-size: var(--f-text); color: var(--muted); }
.file-bar { margin-top: 6px; height: 8px; border-radius: 4px; background: var(--chip-bg); }
.file-fill { height: 8px; width: 0; border-radius: 4px; background: var(--ok-green); }
.file-status { flex: none; font-size: var(--f-text); font-weight: 700; color: var(--ok-green); }
.make-chapters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.preview-box { height: 170px; border-radius: 6px; background: var(--video-bg); display: flex; align-items: center; justify-content: center; color: var(--border-strong); font-size: calc(var(--f-action) - 1px); overflow: hidden; }
.preview-box video { width: 100%; height: 100%; object-fit: contain; background: var(--video-bg); }
.preview-actions { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chapter-add { display: inline-flex; align-items: center; min-height: max(44px, var(--f-hit)); padding: 0 16px; border: 0; border-radius: 6px; background: var(--ok-green); color: var(--surface); font: inherit; font-weight: 700; font-size: var(--f-action); cursor: pointer; }
.add-hint { font-size: var(--f-text); color: var(--muted); }
.chapter-list { display: flex; flex-direction: column; gap: 6px; }
.chapter-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: calc(var(--f-action) - 1px); }
.chapter-row input { height: var(--f-hit); border: 1px solid transparent; border-radius: 4px; background: transparent; font: inherit; color: var(--text); padding: 0 6px; }
.chapter-row input:hover, .chapter-row input:focus { border-color: var(--border-strong); background: var(--surface); }
.chapter-row .chapter-time { flex: none; width: 56px; font-size: var(--f-text); font-weight: 700; color: var(--primary); }
.chapter-row .chapter-no { flex: none; }
.chapter-row .chapter-title { flex: 1; min-width: 0; }
.chapter-del { flex: none; min-height: var(--f-hit); padding: 0 8px; border: 0; background: none; font: inherit; font-size: var(--f-text); color: var(--text-2); text-decoration: underline; cursor: pointer; }
.make-fields { padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.make-field { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; font-size: var(--f-text); font-weight: 700; color: var(--text-2); }
.make-field legend { float: none; width: auto; margin: 0 0 4px; padding: 0; font-size: var(--f-text); font-weight: 700; color: var(--text-2); }
.make-field-wide { flex: 1 1 100%; }
.make-field input[type=text], .make-field select { height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); font: inherit; font-size: calc(var(--f-action) - 1px); color: var(--text); box-sizing: border-box; }
.chip-pick { display: flex; flex-wrap: wrap; gap: max(8px, var(--f-gap)); }
.aud-roles { display: none; }
.make-fields:has(#make-aud-roles:checked) .aud-roles { display: flex; }
.make-publish { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.publish-btn { min-height: max(48px, var(--f-hit)); padding: 0 28px; border: 0; border-radius: 6px; background: var(--ok-green); color: var(--surface); font: inherit; font-weight: 700; font-size: calc(var(--f-action) + 1px); cursor: pointer; }
.publish-btn:disabled { opacity: .45; cursor: not-allowed; }
.save-status { font-size: var(--f-text); color: var(--muted); }
.reasons { flex: 1 1 100%; margin: 0; font-size: var(--f-text); color: var(--text-2); }
.reasons[hidden], .file-error[hidden] { display: none; }
/* 見る側：動画のステップ */
.step-video { display: flex; flex-direction: column; gap: 8px; }
.step-video video { width: 100%; max-height: calc(var(--f-hit) * 10); background: var(--video-bg); border-radius: 6px; display: block; }
.speed-row { display: flex; flex-wrap: wrap; align-items: center; gap: max(8px, var(--f-gap)); font-size: var(--f-text); color: var(--text-2); }
.speed-btn { min-height: var(--f-hit); min-width: var(--f-hit); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); font: inherit; font-size: var(--f-action); font-weight: 700; color: var(--text); cursor: pointer; }
.speed-btn.on { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.manual-image .step-video { width: 100%; padding: 8px; box-sizing: border-box; }
.step-time { font-weight: 400; font-size: var(--f-text); color: var(--muted); }
.learn-top #make-link { order: 3; }
/* 画面の幅で、出し分ける：パソコンの幅（768px以上）は only-wide、スマホの幅は only-narrow */
.only-narrow, .make-wrap.only-narrow, .make-card.only-narrow { display: none; }
@media (max-width: 767px) {
  .only-wide, .make-form.only-wide, .make-wrap.only-wide { display: none !important; }
  .make-wrap.only-narrow { display: flex; }
  .make-card.only-narrow { display: flex; }
}
/* 作る：窓口端末の共通の入力欄の指定（太い枠・大きな四角）を、画面案の見た目に戻す */
body.field-ui .chapter-row input.chapter-time { width: 72px; padding: 0 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: var(--f-text); font-weight: 700; color: var(--primary); text-align: center; height: var(--f-hit); box-shadow: none; }
body.field-ui .chapter-row input.chapter-title { border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: calc(var(--f-action) - 1px); height: var(--f-hit); box-shadow: none; padding: 0 6px; }
body.field-ui .chapter-row input:hover, body.field-ui .chapter-row input:focus { border-color: var(--border-strong); background: var(--surface); }
body.field-ui .make-field input[type=text], body.field-ui .make-field select { height: 44px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: calc(var(--f-action) - 1px); padding: 0 12px; box-shadow: none; background: var(--surface); }
body.field-ui .chapter-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not(.bt):not(.bt-go) { border: 1px solid transparent; border-radius: 4px; min-height: 0; height: var(--f-hit); padding: 0 6px; background: transparent; font-size: calc(var(--f-action) - 1px); }
body.field-ui .chapter-row input.chapter-time:not([type=checkbox]):not([type=radio]) { width: 72px; padding: 0 4px; font-size: var(--f-text); font-weight: 700; color: var(--primary); text-align: center; }
body.field-ui .chapter-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):hover, body.field-ui .chapter-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus { border-color: var(--border-strong); background: var(--surface); outline: none; }
body.field-ui .make-field input[type=text]:not(.x), body.field-ui .make-field select:not(.x) { border: 1px solid var(--border-strong); border-radius: 6px; min-height: 44px; height: 44px; padding: 0 12px; font-size: calc(var(--f-action) - 1px); }
body.field-ui .make-field input[type=text]:not(.x), body.field-ui .make-field select:not(.x) { min-height: max(44px, var(--f-hit)); height: max(44px, var(--f-hit)); }

/* ---- マニュアルの管理：役割を横に並べた表（A-17追補7。画面案 Manual6.dc.html。数値は「中」のとき）。この画面は管理者向けだが、押せる場所・文字は小・中・大に追従する ---- */
.mg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body.admin-ui .mg-title { margin: 0; font-size: calc(var(--f-action) + 5px); font-weight: 700; }
.mg-only { font-size: var(--f-text); font-weight: 400; color: var(--muted); }
.mg-links { display: flex; flex-wrap: wrap; gap: max(8px, var(--f-gap)); margin-left: auto; }
.mg-btn { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--primary-soft); color: var(--navy); font-size: var(--f-action); font-weight: 700; }
.mg-btn:hover { background: var(--surface); color: var(--navy); }
.mg-lead { margin: 12px 0; font-size: calc(var(--f-action) - 1px); line-height: 1.7; color: var(--text-2); }
.mg-filters { display: flex; flex-wrap: wrap; align-items: center; gap: max(8px, var(--f-gap)); margin-bottom: 12px; }
.mg-filter-label { font-size: var(--f-text); color: var(--muted); }
.mg-filter { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text-2); font-size: var(--f-action); }
.mg-filter.on, .mg-filter.on:hover { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.mg-wrap { overflow-x: auto; max-width: 100%; min-width: 0; }
#help-admin, #category-admin { max-width: 100%; min-width: 0; overflow-x: auto; }
.mg-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1000px; font-size: calc(var(--f-action) - 1px); }
.mg-table thead tr { background: var(--surface-2); text-align: left; }
.mg-table th { padding: 8px; border-bottom: 1px solid var(--border); font-weight: 700; background: var(--surface-2); }
.mg-table th.mg-col-role { padding: 8px 2px; text-align: center; font-size: var(--f-text); width: 64px; }
.mg-table td { padding: 3px 8px; border-bottom: 1px solid var(--divider); vertical-align: middle; background: var(--surface); }
.mg-table .mg-col-title { position: sticky; left: 0; z-index: 2; min-width: 220px; max-width: 270px; padding-left: 12px; box-shadow: 1px 0 0 var(--border); }
.mg-table th.mg-col-title { z-index: 3; }
.mg-table td.mg-col-role { padding: 3px 2px; text-align: center; }
.mg-table .mg-col-read { text-align: center; font-size: var(--f-text); white-space: nowrap; }
.mg-table .mg-col-act { white-space: nowrap; }
.mg-title-link { display: flex; flex-direction: column; justify-content: center; min-height: var(--f-hit); max-width: 250px; color: var(--navy); }
.mg-title-link:hover .mg-name { text-decoration: underline; }
.mg-name { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-weight: 700; font-size: var(--f-action); line-height: 1.3; }
.mg-sub { display: block; white-space: nowrap; font-size: var(--f-text); color: var(--muted); line-height: 1.3; }
.mg-select, .mg-input { display: block; min-height: var(--f-hit); max-width: 150px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); font: inherit; font-size: var(--f-action); color: var(--text); }
.role-cell { display: block; margin: 0 auto; width: 56px; height: var(--f-hit); min-height: var(--f-hit); border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--cell-none-ink); font: inherit; font-size: var(--f-action); font-weight: 700; cursor: pointer; }
.role-cell.cell-daily { background: var(--cell-daily-bg); border-color: transparent; color: var(--navy); }
.role-cell.cell-help { background: var(--chip-bg); border-color: transparent; color: var(--text-2); }
.role-cell.cell-must { background: var(--yellow); border-color: transparent; color: var(--text); }
.role-cell:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.mg-more { vertical-align: middle; min-height: var(--f-hit); padding: 0 8px; border: 0; background: none; color: var(--navy); font: inherit; font-size: var(--f-action); text-decoration: underline; cursor: pointer; margin-right: 6px; }
.mg-more.on { font-weight: 700; }
.mg-save { vertical-align: middle; min-height: var(--f-hit); padding: 0 14px; border: 0; border-radius: 4px; background: var(--primary); color: var(--surface); font: inherit; font-size: var(--f-action); font-weight: 700; cursor: pointer; }
.mg-more-row td { background: var(--surface-2); }
.mg-more-row[hidden] { display: none; }
.mg-more-box { position: sticky; left: 12px; display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 4px; max-width: calc(100vw - 80px); }
.mg-more-field { display: flex; flex-direction: column; gap: 2px; font-size: var(--f-text); color: var(--text-2); }
.mg-input-num { width: 80px; }
.mg-foot { margin: 8px 0 12px; font-size: var(--f-text); color: var(--muted); }
.mg-select, .mg-input, .mg-save, .mg-more, .role-cell { box-sizing: border-box; }
.mg-table th:not(.mg-col-title) { position: relative; }


/* ---- トップと、2つ目の階層の画面（仕様書 5.3。画面案 Overview.dc.html・Dashboard3.dc.html） ---- */
/* 画面の幅と左右の余白（theme.css の --frame・--gutter。全画面で同じ）。枠より広い画面では、左右を同じ幅にして中央に置く */
body.field-ui .main { width: 100%; max-width: calc(var(--frame) + var(--gutter) * 2); margin-inline: auto; box-sizing: border-box; padding: var(--page-top) var(--gutter) calc(var(--f-hit) * 2); }
/* 上のメニューの位置と幅は、全画面で同じ（画面の枠が page・wide・sheet のどれでも動かない）。いちばん広い枠（wide）にそろえる */
/* 上のメニューの余白・高さは frame.css（全画面で同じ：左右12px・高さ46px） */
.pg { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; width: 100%; box-sizing: border-box; }
.pg-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--f-pad); }
.pg-aside { flex: 1 1 300px; max-width: 380px; min-width: 0; }
.pg-detail { display: flex; flex-direction: column; gap: var(--f-pad); width: 100%; }
.pg-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); }
.pg-flex { flex: 1; }
.pg-date { margin-left: var(--f-gap); font-weight: 400; color: var(--muted); font-size: var(--f-sub); }
body.field-ui .pg-date { font-size: var(--f-text); }
.pg-tabs { display: flex; flex-wrap: wrap; gap: var(--f-gap); }
body.field-ui .pg-tab { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * 1.1); border: 2px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); font-size: var(--f-text); font-weight: 700; box-sizing: border-box; }
body.field-ui .pg-tab.on { border-color: var(--primary); background: var(--primary); color: var(--surface); }
body.field-ui .pbtn, body.field-ui .pbtn2 { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * 1.1); border-radius: var(--radius); font-weight: 700; font-size: var(--f-text); border: 1px solid var(--primary); background: var(--primary); color: var(--surface); white-space: nowrap; box-sizing: border-box; font-family: inherit; cursor: pointer; }
body.field-ui .pbtn:hover { background: var(--primary-dark); color: var(--surface); }
body.field-ui .pbtn2 { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
body.field-ui .pbtn2:hover { background: var(--hover); color: var(--text); }
body.field-ui .pg .ph, body.field-ui .dash .ph { font-size: var(--f-action); }
.pg-ph { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--f-gap) 12px; padding: 10px 14px; }
body.field-ui .pg .sub, body.field-ui .dash .sub { font-size: var(--f-sub); color: var(--muted); font-weight: 400; }
.pg-left { color: var(--text); }
.pg-row { display: flex; align-items: center; gap: 12px; min-height: max(var(--f-row), var(--f-hit)); padding: 4px 14px; border-bottom: 1px solid var(--divider); box-sizing: border-box; font-size: var(--f-text); background: var(--surface); }
.pg-row:last-child { border-bottom: 0; }
.pg-row-wrap { flex-wrap: wrap; }
.pg-row.done .today-label, .pg-row.done .pg-task-link { color: var(--faint); text-decoration: line-through; }
.pg-name { flex: 1; min-width: 0; font-size: var(--f-text); }
.pg-name-wide { flex: 1 1 240px; }
body.field-ui .pg-row .today-label { font-size: var(--f-text); line-height: 1.5; }
.pg-task-link { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--text); font-weight: 400; }
.pg-task-link:hover { color: var(--primary); text-decoration: underline; }
.pg-due { white-space: nowrap; }
.pg-state { width: calc(var(--f-hit) * 1.6); }
body.field-ui .pg .tag, body.field-ui .dash .tag { flex: none; font-size: var(--f-sub); border-radius: 10px; padding: 2px 10px; background: var(--tag-bg); color: var(--primary); white-space: nowrap; }
body.field-ui .pg .tag.ask, body.field-ui .dash .tag.ask { background: var(--ask-bg); color: var(--tone-red); }
.pg-empty { padding: 14px; color: var(--muted); font-size: var(--f-text); }
.chk-hit { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--f-hit); min-height: var(--f-hit); margin: 0 0 0 calc(var(--f-gap) * -1); cursor: pointer; }
.pg .check-form, .dash .check-form { margin: 0; display: flex; }
.pg-card { padding: 14px; display: flex; flex-direction: column; gap: var(--f-pad); }
.pg-big { font-size: calc(var(--f-title) + 6px); font-weight: 700; }
.pg-card .sub { margin-left: 6px; }
.pg-line { display: flex; justify-content: space-between; gap: 10px; font-size: var(--f-text); border-top: 1px solid var(--divider); padding-top: 10px; }
.pg-line-first { border-top: 0; padding-top: 0; }
.pg-bar { display: block; height: 8px; background: var(--chip-bg); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.pg-bar-sm { flex: none; width: 120px; margin-top: 0; }
.pg-bar-fill { display: block; height: 100%; background: var(--ok-green); }
.pg-note { margin-top: 6px; }
.pg-links { display: flex; flex-wrap: wrap; gap: var(--f-gap); padding: 10px 14px; }
.pg-main > .pg-links { padding: 0; }
.pg-kinds-title { font-weight: 700; font-size: var(--f-text); color: var(--text-2); margin-bottom: 6px; }
.pg-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--f-gap); }
.pg-kinds-group { display: block; }
.pg-kind { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; min-height: calc(var(--f-row) * 2.4); padding: 8px; border: 2px solid var(--border-strong); border-radius: var(--radius-tile); background: var(--surface); font-size: var(--f-action); font-weight: 700; color: var(--text); text-align: center; }
.pg-kind:hover { border-color: var(--primary); color: var(--text); }
.pg .quick { padding: 10px; }

/* トップ：左にタイル5つ、右に「今日の仕事」 */
.dash { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.dash-tiles { flex: 999 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--f-row) * 4), 1fr)); gap: 12px; }
.dtile { --tile-tone: var(--primary); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: calc(var(--f-row) * 2.8); padding: 12px; border: 2px solid var(--border-strong); border-radius: var(--radius-tile); background: var(--surface); box-sizing: border-box; text-align: center; font-size: var(--f-action); color: var(--text); }
a.dtile:hover { border-color: var(--tile-tone); box-shadow: var(--shadow-tile); color: var(--text); }
.dtile-blue { --tile-tone: var(--primary); }
.dtile-orange { --tile-tone: var(--tone-orange); }
.dtile-teal { --tile-tone: var(--tone-teal); }
.dtile-brown { --tile-tone: var(--brand); }
.dtile-violet { --tile-tone: var(--tone-violet); }
.dtile-ico { flex: none; display: flex; align-items: center; justify-content: center; width: calc(var(--f-row) * 1.2); height: calc(var(--f-row) * 1.2); border-radius: 50%; background: var(--tile-tone); color: var(--surface); }
.dtile-ico svg { width: calc(var(--f-row) * .7); height: calc(var(--f-row) * .7); }
.dtile-name { font-weight: 700; }
.dtile-note { font-size: var(--f-sub); color: var(--muted); }
.dtile-badge { position: absolute; top: 8px; right: 8px; min-width: calc(var(--f-row) * .6); height: calc(var(--f-row) * .6); padding: 0 8px; border-radius: var(--f-row); box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: var(--f-sub); font-weight: 700; color: var(--surface); background: var(--badge-red); }
.dtile-off { opacity: .6; cursor: default; }
.dash-today { flex: 1 1 320px; min-width: 0; }
.dash-open { padding: 10px 14px; border-top: 1px solid var(--border); }
.dash-extra { margin-top: var(--f-pad); }
body.field-ui .dash-today .ph { background: var(--surface-2); }
.dash-top { display: flex; align-items: center; gap: var(--f-gap); }
body.field-ui .dash-date { font-size: var(--f-sub); color: var(--muted); }
body.field-ui .pbtn.pg-wide { width: 100%; }
.rp-count { display: flex; justify-content: space-between; align-items: center; gap: var(--f-gap); font-size: var(--f-action); }
body.field-ui .easy-profile-head b { font-size: var(--f-action); }
#add-photo { width: auto; white-space: nowrap; padding: 0 var(--f-pad-x); }
.step-row-main { min-height: var(--f-hit); }
.dtile-green { --tile-tone: var(--c-green); }
.dtile-gold { --tile-tone: var(--tone-gold); }

/* ---- ワークフローの「申請する」（A-20・仕様書 5.4。画面案 Flow2） ---- */
[hidden] { display: none !important; }
.wf-center { width: 100%; display: flex; flex-direction: column; gap: var(--f-pad); }
.wf-search { text-align: center; padding: 14px 0 2px; }
.wf-search-title { margin: 0; font-size: var(--f-title); font-weight: 700; }
html body.field-ui input.wf-search-input[type=search]:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not(.bt):not(.bt-go) { display: block; width: 100%; max-width: 640px; margin: 12px auto 0; height: calc(var(--f-hit) + 8px); border: 2px solid var(--primary); border-radius: 28px; padding: 0 18px; font-size: var(--f-action); background: var(--surface); box-sizing: border-box; }
/* ワークフローの検索欄（画面案 Flow2.dc.html）：角が少し丸いだけの四角い欄・薄い灰色の細い枠。「検索する」は同じ高さ・同じ角・細めの小さい字。間は10px */
html body.field-ui .wf-search-row input.wf-search-input[type=search]:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not(.bt):not(.bt-go) { flex: 1 1 0; width: auto; min-width: 0; max-width: none; margin: 0; height: calc(var(--f-hit) + 6px); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 18px; font-size: var(--f-action); color: var(--text); }
body.field-ui .wf-search-row .wf-search-go { flex: none; height: calc(var(--f-hit) + 6px); border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text-2); font-weight: 500; font-size: var(--f-text); }
.wf-block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--f-action); }
.wf-block-note { font-size: var(--f-text); font-weight: 400; color: var(--muted); }
.wf-need-head { margin-top: 4px; }
.wf-pills { display: flex; flex-wrap: wrap; gap: var(--f-gap); margin-top: var(--f-gap); }
body.field-ui .wf-pill { display: inline-flex; align-items: center; gap: 8px; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * 1.1); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: var(--f-action); font-weight: 700; white-space: nowrap; font-family: inherit; box-sizing: border-box; cursor: pointer; }
body.field-ui .wf-pill:hover { border-color: var(--primary); color: var(--text); }
.wf-pill-soon { color: var(--muted); }
.wf-pill-soon-mark { font-weight: 400; font-size: var(--f-sub); color: var(--faint); }
.wf-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; box-sizing: border-box; }
.wf-buy-name { font-size: var(--f-action); }
.wf-flex { flex: 1; }
.group-icon { flex: none; color: var(--brand); }
.wf-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--f-gap); align-items: start; }
.wf-group { overflow: hidden; }
body.field-ui .wf-group-head { display: flex; align-items: center; gap: 10px; min-height: var(--f-hit); padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--f-action); color: var(--text); box-sizing: border-box; }
body.field-ui .wf-group-head:hover { color: var(--text); background: var(--hover); }
.wf-item { display: flex; align-items: center; gap: 10px; min-height: var(--f-hit); padding: 0 14px; border-bottom: 1px solid var(--divider); font-size: var(--f-text); color: var(--text); box-sizing: border-box; }
.wf-item:last-child { border-bottom: 0; }
a.wf-item:hover { background: var(--hover); color: var(--text); }
.wf-item-soon { color: var(--faint); justify-content: space-between; opacity: 1; }
.wf-item-hint { font-size: var(--f-sub); color: var(--faint); }
.wf-empty { text-align: center; color: var(--muted); padding: 20px 0; font-size: var(--f-text); }
body.field-ui .pbtn-off { background: var(--chip-bg); border-color: var(--border); color: var(--faint); cursor: default; }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-line { display: flex; gap: 10px; align-items: flex-start; min-height: var(--f-hit); padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: var(--f-action); }
.rule-line:last-child { border-bottom: 0; }
.rule-dot { flex: none; color: var(--primary); font-size: var(--f-text); padding-top: 3px; }

/* ---- 過去の記録（A-20・仕様書 5.4）：右にカレンダー ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--f-gap); }
body.field-ui .cal-nav { display: inline-flex; align-items: center; justify-content: center; min-width: var(--f-hit); min-height: var(--f-hit); font-size: var(--f-lead); color: var(--primary); border-radius: var(--radius); font-weight: 700; }
body.field-ui .cal-nav-off { color: var(--faint); }
.cal-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.today-record .pg-aside { flex: 1 1 400px; max-width: 440px; }
.cal-dow span { text-align: center; font-size: var(--f-sub); color: var(--muted); }
body.field-ui .cal-cell { display: flex; align-items: center; justify-content: center; min-height: var(--f-hit); border: 2px solid transparent; border-radius: var(--radius); font-size: var(--f-text); color: var(--text); background: transparent; box-sizing: border-box; }
a.cal-cell:hover { border-color: var(--border-strong); color: var(--text); }
.cal-future { color: var(--faint); }
.cal-done { background: var(--success-soft); color: var(--success-ink); font-weight: 700; }
.cal-partial { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; }
body.field-ui .cal-today { border-color: var(--primary); }
body.field-ui .cal-selected { outline: 3px solid var(--primary-soft); text-decoration: underline; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-dot { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 2px solid transparent; }
.cal-dot.cal-today { border-color: var(--primary); }
.rod-body { padding: 12px 14px; display: flex; flex-direction: column; gap: var(--f-gap); font-size: var(--f-text); }
.rod-note { white-space: pre-wrap; font-size: var(--f-action); }
.rod-photos { display: flex; flex-wrap: wrap; gap: var(--f-gap); }
.today-record .today { width: 100%; }

/* ---- マニュアルのホーム（A-20・仕様書 5.4。画面案 Manual8）：中央・最大960px ---- */
.mh { width: 100%; display: flex; flex-direction: column; gap: var(--f-pad); }
.mh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--f-gap); }
.mh-search { padding-top: 0; }
.mh-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--f-gap); align-items: start; }
.mh-folder-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: var(--f-action); margin-top: 4px; }
.mh-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--f-gap); align-items: start; }
.mh-folder { overflow: hidden; }
body.field-ui .mh-folder-head-link { display: flex; align-items: center; gap: 10px; min-height: var(--f-hit); padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--f-action); color: var(--text); box-sizing: border-box; }
a.mh-folder-head-link:hover { background: var(--hover); color: var(--text); }
.mh-row { border-bottom: 1px solid var(--divider); }
.mh-row:last-child { border-bottom: 0; }
body.field-ui .mh-link { display: flex; align-items: center; gap: 10px; min-height: calc(var(--f-hit) + 4px); padding: 4px 14px; color: var(--text); box-sizing: border-box; }
body.field-ui .mh-link:hover { background: var(--hover); color: var(--text); }
.mh-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mh-name { font-size: var(--f-text); font-weight: 400; overflow-wrap: anywhere; }
#manual-quick .mh-name { font-size: var(--f-action); }
.mh-desc { font-size: var(--f-sub); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-count { flex: none; font-size: var(--f-sub); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 8px; white-space: nowrap; }
.mh-none { padding: 12px 14px; color: var(--faint); font-size: var(--f-text); }
body.field-ui .mh-more { display: flex; align-items: center; min-height: var(--f-hit); padding: 0 14px; font-size: var(--f-text); color: var(--primary); font-weight: 700; border-top: 1px solid var(--divider); }
.mh-preparing { text-align: center; }
.mh-must-box { display: flex; flex-direction: column; gap: 4px; }
.mh-must { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) calc(var(--f-gap) * 1.5); background: var(--yellow-soft); border: 1px solid var(--todo-line); border-radius: 6px; padding: 4px 12px; font-size: var(--f-text); }
.mh-must-tag { flex: none; background: var(--yellow); color: var(--yellow-ink); font-weight: 700; font-size: var(--f-sub); border-radius: 10px; padding: 1px 8px; }
body.field-ui .mh-must-name { flex: 1; min-width: 0; min-height: var(--f-hit); display: inline-flex; align-items: center; color: var(--text); }
body.field-ui .fav-btn { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); font-size: var(--f-text); font-family: inherit; cursor: pointer; }
body.field-ui .fav-btn.on { border-color: var(--todo-line); background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; }
body.field-ui .sheet-hint { font-size: var(--f-sub); }
body.field-ui .pg-name:has(> .pg-task-link) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) calc(var(--f-gap) * 2); }

/* ---- 自分の仕事を足す（A-21・仕様書 5.6） ---- */
.own-error { margin: 0; }
.own-error:empty { display: none; }
body.field-ui .pg .tag.own-tag, body.field-ui .dash .tag.own-tag { background: var(--chip-bg); color: var(--faint); }
.own-overdue { color: var(--danger-ink); font-weight: 700; }
.own-delete-foot { justify-content: flex-start; }

/* ---- 日報の書類（A-21・仕様書 5.5。画面案 Nippo.dc.html）：白い紙。黒い線と文字だけ（出すボタンの青を除く） ---- */
.paper { background: var(--surface); color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.paper-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; border-bottom: 3px double var(--text); padding-bottom: 8px; }
.paper-heading { font-size: var(--f-title); font-weight: 700; letter-spacing: .4em; }
.paper-who { text-align: right; font-size: var(--f-action); line-height: 1.7; }
.paper-sec { display: flex; flex-direction: column; }
.paper-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; border-bottom: 2px solid var(--text); padding: 0 0 4px; margin: 18px 0 6px; font-size: var(--f-action); }
.paper-sub { font-size: var(--f-text); padding: 12px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.paper-row { display: flex; align-items: center; gap: 10px; min-height: var(--f-hit); padding: 4px 2px; border-bottom: 1px solid var(--border); font-size: var(--f-text); box-sizing: border-box; }
.paper-check.is-off .paper-name { color: var(--faint); text-decoration: line-through; }
.paper-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.paper-tag { flex: none; }
.paper-result { flex: none; width: 2.2em; text-align: center; font-weight: 700; }
.paper-result.is-open { color: var(--faint); }
.paper-kind { flex: none; width: 112px; display: inline-flex; align-items: center; justify-content: center; min-height: calc(var(--f-hit) - 8px); border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-weight: 700; color: var(--text-2); font-size: var(--f-text); box-sizing: border-box; }
body.field-ui .paper-text, body.field-ui .fld.paper-text { flex: 1; min-width: 0; min-height: var(--f-hit); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 10px; font-size: var(--f-text); background: var(--surface); box-sizing: border-box; }
body.field-ui .paper-del { flex: none; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 0; background: transparent; color: var(--muted); font-size: var(--f-text); font-family: inherit; text-decoration: underline; cursor: pointer; }
.paper-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); padding: 10px 0 2px; }
body.field-ui .paper-chip { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: var(--f-text); font-family: inherit; cursor: pointer; box-sizing: border-box; }
body.field-ui .paper-chip:hover { border-color: var(--text); color: var(--text); }
.paper-left { flex-wrap: wrap; }
.paper-none { padding: 8px 2px; color: var(--faint); font-size: var(--f-text); }
body.field-ui .paper-area { width: 100%; box-sizing: border-box; }
.paper-photos { display: flex; flex-wrap: wrap; gap: var(--f-gap); padding-top: var(--f-gap); }
.paper-photo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.paper-text-ro { white-space: pre-wrap; padding: 6px 2px; font-size: var(--f-action); }
.paper-foot { text-align: right; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 18px; }
.paper-readonly { padding: 4px 4px 12px; }
@media (max-width: 767px) {
  .paper-kind { width: 88px; }
  .paper-left .paper-choices { flex: 1 1 100%; }
  .paper-row { flex-wrap: wrap; }
  .paper-extra .paper-text, .paper-line .paper-text { flex: 1 1 100%; order: 3; }
}

/* ---- 日報の下書き（A-21追補）：下書きあり・昨日の日報が出ていません ---- */
.pg-draft { display: block; margin-top: 6px; color: var(--faint); }
.stale-draft { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) 12px; padding: 2px 14px; min-height: var(--f-hit); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: var(--f-text); box-sizing: border-box; }
.stale-text { flex: 1; min-width: 0; }

.mh-folder-head-link .sub { white-space: nowrap; }
body.field-ui .paper-chip, body.field-ui .paper-del, body.field-ui .paper-choice span { font-size: var(--f-action); }
.paper-sec > .paper-chip { align-self: flex-start; margin: var(--f-gap) 0; }
.paper-sec .uploader-row { margin-top: var(--f-gap); }
.paper-left { padding-block: calc(var(--f-gap) * .75); }

/* ---- 日報の別ページ（A-22・仕様書 0.3・5.5。画面案 Nippo.dc.html）：窓ではなく、申請書と同じページ ---- */
body.report-page .fab-wrap { display: none; }
body.report-page .main { padding-bottom: 0; }
.report-form { display: flex; flex-direction: column; width: 100%; margin: 0; flex: 1 1 auto; }
.report-wrap { width: 100%; max-width: var(--width-paper); margin-inline: auto; display: flex; flex-direction: column; gap: var(--f-pad); padding-bottom: var(--f-pad-x); box-sizing: border-box; }
.report-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
body.field-ui .report-back { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--primary); font-weight: 700; font-size: var(--f-action); }
.report-title { font-size: var(--f-title); }
.report-title-date { font-size: var(--f-action); font-weight: 700; color: var(--text-2); }
.report-wrap .paper { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 30px 26px; box-sizing: border-box; }
@media (max-width: 767px) { .report-wrap .paper { padding: 8px 14px 20px; } }
.page-bar { position: sticky; bottom: var(--footer-h); z-index: 5; margin: auto calc(var(--gutter) * -1) 0; padding: var(--f-gap) var(--gutter); background: var(--surface); border-top: 1px solid var(--border); box-sizing: border-box; }
.page-bar-in { width: 100%; max-width: var(--width-paper); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); }
.page-bar-flex { flex: 1; }

/* ---- マニュアル一覧の種類のアイコン（A-22・仕様書 5.7）：濃い灰色の細い線・30px・色は付けない ---- */
.mh-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--text-2); }
.kind-icon { flex: none; display: block; }
@media (max-width: 767px) { .mh { width: auto; } .mh, .mh-must-box { margin-inline: calc(var(--f-pad-x) * .625); } }

/* ---- 今日の仕事（画面案24）：追加ボタン・お知らせ・印・追加の窓 ---- */
body.field-ui .pbtn.pg-add { min-height: var(--f-main); padding: 0 calc(var(--f-pad-x) * 1.4); font-size: var(--f-action); font-weight: 700; }
.pg-notices { display: flex; flex-direction: column; gap: var(--f-gap); }
.pg-notice { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) 12px; background: var(--yellow-soft); border: 1px solid var(--yellow-ink); border-radius: 6px; padding: 10px 14px; font-size: var(--f-text); color: var(--yellow-ink); min-height: var(--f-hit); box-sizing: border-box; }
.pg-notice-link { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--primary); font-weight: 700; }
body.field-ui .pg .tag.from, body.field-ui .dash .tag.from { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; }
.pg-name-fit { flex: 0 1 auto; }
.task-ask { font-size: var(--f-sub); color: var(--muted); }
.pg-row .own-overdue { flex: none; font-size: var(--f-sub); }
.own-new { display: flex; flex-direction: column; gap: calc(var(--f-pad) * 1.2); }
.own-flash { color: var(--ok-green); font-weight: 700; font-size: var(--f-text); }
.own-flash:empty { display: none; }
body.field-ui .own-new-name { width: 100%; box-sizing: border-box; min-height: var(--f-main); }
.own-group-title { font-weight: 700; font-size: var(--f-text); padding-bottom: 8px; }
body.field-ui .own-new-submit { width: 100%; min-height: var(--f-main); font-size: var(--f-action); }
.own-new:has(.own-new-name:placeholder-shown) .own-new-submit { background: var(--faint); border-color: var(--faint); }

/* ---- 日報のチェックの行（画面案22）：今日の仕事と同じ枠。付けると緑 ---- */
.paper-note { padding: 10px 0 4px; }
.paper-lbl { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; min-width: 0; margin: 0; cursor: pointer; min-height: var(--f-hit); }
.paper-check.done .paper-name { color: var(--faint); text-decoration: line-through; }
.paper-flex { flex: 0 0 0; margin-left: auto; }
.paper .tag { flex: none; font-size: var(--f-sub); border-radius: 12px; padding: 3px 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
body.field-ui .paper .photo-need { margin: 0; }
body.field-ui .paper-check .see-btn { min-height: var(--f-hit); }

/* ---- 過去の日報（画面案25）：読むだけの書類と、右のカレンダー ---- */
.hist { justify-content: center; }
.hist-main { flex: 1 1 380px; max-width: 900px; }
.hist-aside { flex: 0 0 292px; max-width: 100%; box-sizing: border-box; }
.hist-badge { font-size: var(--f-sub); padding: 3px 10px; border-radius: 12px; background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; }
.hist-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) 10px; }
.hist-date { font-size: var(--f-title); }
body.field-ui .hist-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--f-main); padding: 0 calc(var(--f-pad-x) * 1.2); font-size: var(--f-action); }
.hist-btn.is-off { opacity: .4; cursor: default; }
.hist-none { padding: 48px 20px; text-align: center; font-size: var(--f-action); color: var(--muted); }
.hist-legend { padding-top: 10px; }
.history-page .cal-cell.cal-future { background: none; }
.paper-readonly { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 30px 26px; box-sizing: border-box; }
@media (max-width: 767px) { .paper-readonly { padding: 8px 14px 20px; } }
.paper-ro-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 0 0; }
.paper-ro-title { font-size: var(--f-title); }
.paper-ro-link { padding-top: 6px; }
.paper-check.ro:not(.done) .paper-name { color: var(--faint); }
.paper-check.ro.done .paper-name { color: var(--text-2); text-decoration: none; }
.paper-time { flex: none; min-width: 3.4em; text-align: right; }
.paper-goal { color: var(--muted); }
.ro-photos { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.ro-photo { width: 120px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--chip-bg); cursor: pointer; }
.ro-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ro-photos-note { padding-top: 6px; }

/* ---- メニューの数の札（画面案24）：赤い丸に白い数字。0件のときは出さない ---- */
.nb-badge { display: inline-flex; align-items: center; justify-content: center; min-width: calc(var(--f-sub) * 1.5); height: calc(var(--f-sub) * 1.5); margin-left: 6px; padding: 0 7px; border-radius: 999px; box-sizing: border-box; background: var(--badge-red); color: var(--surface); font-size: var(--f-sub); font-weight: 700; line-height: 1; }
.win.win-narrow { width: min(94vw, max(540px, calc(var(--f-win) * .75))); }
.win-narrow .win-head { background: var(--surface-2); }
body.field-ui .paper-sec .th-add { border-style: solid; border-color: var(--border-strong); }
body.field-ui .cal-cell.cal-done { background: var(--success-soft); color: var(--success-ink); font-weight: 700; }
.paper-readonly .paper-kind { width: auto; padding: 0 14px; }

/* 今日の仕事の見出し：追加ボタンは、見出しの行の右端（画面案24）。せまい幅だけ、折り返す */
.today-head { flex-wrap: nowrap; }
.today-head .page-title { flex: 0 1 auto; min-width: 0; }
@media (max-width: 640px) { .today-head { flex-wrap: wrap; } }
.pg-fin { display: block; }
.hist-select { min-width: 220px; min-height: var(--f-main); font-size: var(--f-action); padding: 0 var(--f-gap); }
.hist-who { margin: 0; }

/* ---- ワークフロー（画面案21）：文字の下線のタブ・一覧・詳細 ---- */
.wf-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
body.field-ui .wf-tab { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 calc(var(--f-pad-x) * 1.2); margin-bottom: -1px; border-bottom: 3px solid transparent; font-size: var(--f-action); color: var(--text-2); font-weight: 400; }
body.field-ui .wf-tab.on { border-bottom-color: var(--primary); color: var(--text); font-weight: 700; }
.wf-tab-badge { margin-left: 6px; background: var(--badge-red); color: var(--surface); font-size: var(--f-sub); border-radius: 999px; padding: 1px 8px; }
.wf-new { display: flex; flex-direction: column; gap: var(--f-pad); }
.wf-lead { font-size: var(--f-text); color: var(--text-2); }
.wf-row { display: flex; align-items: center; gap: 12px; min-height: calc(var(--f-hit) + 14px); padding: 6px 14px; border-bottom: 1px solid var(--divider); font-size: var(--f-text); color: var(--text); box-sizing: border-box; }
.wf-row:last-child { border-bottom: 0; }
.wf-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wf-decided { margin-right: 10px; }
.wf-row-link:hover { background: var(--hover); color: var(--text); }
.wf-head { background: var(--surface-2); min-height: var(--f-hit); font-weight: 700; }
.wf-col-state { width: 120px; flex: none; }
.wf-col-at { width: 150px; flex: none; }
.wf-col-go { width: 20px; flex: none; color: var(--faint); }
@media (max-width: 640px) { .wf-col-at { display: none; } .wf-col-state { width: auto; } }
.wf-state { display: inline-block; font-size: var(--f-sub); font-weight: 700; padding: 3px 10px; border-radius: 12px; background: var(--chip-bg); color: var(--text-2); }
.wf-state-warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.wf-state-ok { background: var(--success-soft); color: var(--success-ink); }
.wf-state-info { background: var(--primary-soft); color: var(--primary); }
.wf-state-bad { background: var(--ask-bg); color: var(--tone-red); }
.wf-scopes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap); }
body.field-ui .wf-scope { display: inline-flex; align-items: center; min-height: var(--f-hit); padding: 0 var(--f-pad-x); border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: var(--f-text); }
body.field-ui .wf-scope.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.wf-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--f-gap) 10px; }
.wf-detail-title { margin: 0; font-size: var(--f-title); }
.wf-detail-cols { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.wf-detail-main { flex: 1 1 320px; padding: 6px 18px 14px; min-width: 0; }
.wf-detail-side { flex: 0 1 340px; padding: 6px 18px 14px; box-sizing: border-box; max-width: 100%; }
.wf-detail-h { font-size: var(--f-action); font-weight: 700; border-bottom: 2px solid var(--text); padding: 10px 0 4px; }
.wf-kv { display: flex; gap: 10px; min-height: var(--f-hit); align-items: center; border-bottom: 1px solid var(--divider); font-size: var(--f-text); }
.wf-kv > .sub { width: 120px; flex: none; }
.wf-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: var(--f-text); }
.wf-step-body { flex: 1; min-width: 0; }
.wf-step-comment { font-size: var(--f-text); }
.wf-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--f-sub); font-weight: 700; border: 2px solid var(--border-strong); background: var(--surface); color: var(--faint); }
.wf-dot-now { border-color: var(--primary); color: var(--primary); }
.wf-withdraw { padding-top: 14px; }
body.field-ui .wf-danger { color: var(--danger-ink); }
.wf-decision { padding: 6px 18px 14px; }
.wf-comment { width: 100%; box-sizing: border-box; margin-top: 10px; }
.wf-actions { display: flex; flex-wrap: wrap; gap: var(--f-gap); padding-top: 10px; }
body.field-ui .pbtn-sm { min-height: calc(var(--f-hit) - 6px); font-size: var(--f-text); padding: 0 var(--f-pad-x); }
.wf-admin-link { padding-top: var(--f-gap); font-size: var(--f-sub); }
.wf-admin-link a { color: var(--muted); text-decoration: underline; }

/* ---- マニュアルの管理（画面案26）・「やり方を見る」・マニュアルのホーム ---- */
.mg-page { width: 100%; display: flex; flex-direction: column; gap: var(--f-gap); }
.mg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mg-row { display: flex; align-items: center; gap: 10px; min-height: calc(var(--f-hit) + 16px); padding: 6px 14px; border-bottom: 1px solid var(--divider); font-size: var(--f-text); }
.mg-row:last-child { border-bottom: 0; }
.mg-th { background: var(--surface-2); font-weight: 700; color: var(--muted); font-size: var(--f-sub); min-height: var(--f-hit); }
.mg-c-name { flex: 1; min-width: 0; }
.mg-c-folder { width: 150px; flex: none; }
.mg-c-places { width: 280px; flex: none; }
.mg-c-owner { width: 120px; flex: none; }
.mg-c-edit { width: 90px; flex: none; display: flex; justify-content: flex-end; }
.mg-places { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.mg-place { display: inline-flex; align-items: center; gap: 2px; }
.mg-place:not(:last-child)::after { content: "、"; }
body.field-ui .mg-place-x { border: 0; background: none; color: var(--faint); font-size: var(--f-text); cursor: pointer; min-width: var(--f-hit); min-height: var(--f-hit); }
body.field-ui .mg-add { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--primary); font-weight: 700; font-size: var(--f-text); }
.place-manual { font-size: var(--f-action); }
.place-target { width: 100%; min-height: var(--f-main); }
@media (max-width: 900px) { .mg-row { flex-wrap: wrap; } .mg-c-name { flex: 1 1 100%; } .mg-c-places { width: 100%; } .mg-th { display: none; } }
body.field-ui .howto-link { display: inline-flex; align-items: center; min-height: var(--f-hit); color: var(--primary); font-weight: 700; font-size: var(--f-text); text-decoration: underline; }
.dash-howto { font-size: var(--f-text); padding: 0 var(--f-gap); }
.mh-list .mh-row:last-child { border-bottom: 0; }
/* 今日の仕事の右のカード（画面案24）：「完了 3 / 8」は1行、「自分の業務 0 / 0」はラベルのすぐ横 */
.pg-fin { display: inline; margin-right: 8px; }
.pg-card .pg-line { justify-content: flex-start; gap: 12px; border-top: 0; padding-top: 0; }
.pg-card .pg-line b { font-weight: 400; }
.pg-name-fit { min-width: 5em; }
.hist-aside .cal-head { padding: 12px 14px 0; font-size: var(--f-action); }
.mg-c-name .mg-name { color: var(--text); }
.mg-c-name { line-height: 1.5; }
.easy-due { font-size: var(--f-text); }

/* ---- 今日の仕事・日報のチェックの行（画面案24・22）：小さなボタン・小さな印・説明は名前の下に小さく1行 ---- */
body.field-ui .row-chip { display: inline-flex; align-items: center; flex: none; min-height: calc(var(--f-hit) - 8px); padding: 0 var(--f-pad-x); border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: var(--f-text); white-space: nowrap; box-sizing: border-box; }
body.field-ui .row-chip:hover { border-color: var(--text); color: var(--text); }
body.field-ui .row-chip.has { color: var(--primary); }
body.field-ui .pg .tag.need, body.field-ui .paper .tag.need { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; }
body.field-ui .pg .tag.today-tag, body.field-ui .paper .tag.today-tag { background: var(--chip-bg); color: var(--faint); font-weight: 700; }
body.field-ui .pg-row .today-desc { font-size: var(--f-sub); color: var(--muted); margin-top: 0; }
body.field-ui .pg-row .today-label { display: block; }
