/* オペリケーション style.css — 見た目（UI担当）。トークンは DESIGN.md 準拠
   v3（2026-09-19）: 見出しはゴシック太字、区切りは線でなく面、角丸は大きく、ボタンはピル型。
   明朝（--logo）はアプリ名のロゴだけ。線（--line）は入力欄と表にだけ残す。 */

:root {
  --ink: #2B2B28;
  --ink-strong: #24302A;
  --ink-muted: #6E6B62;
  --paper: #FFFFFF;
  --gray: #F5F3F1;             /* 白い地の上の面（カード・一覧の行・箱） */
  --surface: #F6FAF7;
  --line: #D9E6DD;             /* 入力欄の枠と表の罫にだけ使う */
  --accent: #2E7D4F;
  --accent-strong: #1E5436;    /* --accent-soft の面の上の文字（7.74:1） */
  --accent-soft: #E6F3EB;
  --danger: #B5502F;           /* 白・グレーの面の上の文字 */
  --danger-strong: #9A3F22;    /* --danger-soft の面の上の文字（5.70:1） */
  --danger-soft: #F7E9E4;
  --disabled-bg: #ECEAE6;      /* 無効の面。半透明にしない */
  --disabled-ink: #57554E;     /* 無効の文字（6.21:1） */
  --on-accent: #FFFFFF;
  --grad: linear-gradient(135deg, #2E7D4F, #1E5436); /* 文字を載せてよい緑（白文字で最低 5.05:1） */
  --shadow-btn: 0 6px 18px rgba(30, 84, 54, .20);
  --shadow-float: 0 10px 32px rgba(30, 84, 54, .16);
  --shadow-header: 0 2px 14px rgba(30, 84, 54, .08);
  --logo: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; /* 明朝はロゴだけ */
  --font-heading: "Noto Sans JP", "Hiragino Kaku Gothic Pro", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic Pro", "Hiragino Sans", "Yu Gothic", sans-serif;
  --radius: 20px;              /* カード・面 */
  --radius-sm: 16px;           /* 小さな面・一覧の行 */
  --radius-input: 12px;        /* 入力欄 */
  --radius-pill: 999px;        /* ボタン・バッジ・タブ */
  --quiet-bg: var(--gray);     /* 控えめなボタン・バッジの地。面の中では白に切り替える */
  --actionbar-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ECEFEA;
    --ink-muted: #A3AAA3;
    --paper: #1B1F1C;
    --surface: #242A25;
    --line: #36403A;
    --accent: #7FC59A;
    --accent-soft: #24382C;
    --danger: #E08A7C;
    --on-accent: #FFFFFF;
    --ink-strong: #ECEFEA;
    --gray: #242A25;
    --accent-strong: #A6DDBB;
    --danger-strong: #F0A99D;
    --danger-soft: #3A2622;
    --disabled-bg: #2F3531;
    --disabled-ink: #B4BAB4;
  }
}

:root[data-theme="dark"] {
  --ink: #ECEFEA;
  --ink-muted: #A3AAA3;
  --paper: #1B1F1C;
  --surface: #242A25;
  --line: #36403A;
  --accent: #7FC59A;
  --accent-soft: #24382C;
  --danger: #E08A7C;
  --on-accent: #FFFFFF;
  --ink-strong: #ECEFEA;
  --gray: #242A25;
  --accent-strong: #A6DDBB;
  --danger-strong: #F0A99D;
  --danger-soft: #3A2622;
  --disabled-bg: #2F3531;
  --disabled-ink: #B4BAB4;
}

/* ---------- 基本 ---------- */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
  color: var(--ink-strong);
  margin: 0;
}

p { margin: 0; }

a { color: var(--accent); }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

img, video { max-width: 100%; }

/* ---------- ヘッダー ---------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 0 16px;
  background: var(--paper);
  box-shadow: var(--shadow-header);
  position: relative;
  z-index: 5;
}
.app-header .brand { white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.app-header .nav-back { white-space: nowrap; flex: 0 0 auto; }
.app-header .lang-btn { flex: 0 0 auto; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) {
  .app-header { padding: 0 12px; gap: 6px; }
  .app-header .brand { font-size: 17px; letter-spacing: 0.02em; }
  .app-header .brand-sub { font-size: 11px; padding: 0; margin-left: 2px; letter-spacing: 0; background: none; color: var(--ink-muted); }
  .app-header .nav-back { font-size: 14px; margin-left: 8px; }
  .app-header .lang-btn { font-size: 13px; padding: 6px 8px; }
}

/* 第2弾（サーバーの形）: ログイン中のお名前・会社の設定・ログアウト */
.session-bar { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; white-space: nowrap; min-width: 0; }
.session-bar .session-name { overflow: hidden; text-overflow: ellipsis; max-width: 12em; color: var(--ink-muted); }
.session-bar a, .session-bar .linklike { min-height: 44px; display: inline-flex; align-items: center; }
/* スマホ幅: 「人と拠点」「ログアウト」は 2 段目に（言語のボタンと重ならないように。段階5.5 の点検 A2） */
@media (max-width: 480px) {
  .app-header { flex-wrap: wrap; }
  .session-bar { order: 10; flex: 1 0 100%; justify-content: flex-end; margin-left: 0; }
}
@media (max-width: 480px) {
  .session-bar { gap: 8px; font-size: 13px; }
  .session-bar .session-name { display: none; }
}
.name-list { display: grid; gap: 10px; margin: 12px 0 16px; }
.admin-read-note { padding: 10px 12px; }

.brand {
  font-family: var(--logo);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
}

.nav-back {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
}

/* ---------- 本文の器 ---------- */

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--actionbar-h) + 24px + env(safe-area-inset-bottom, 0px));
}

.view { display: block; }

.page-title {
  font-size: clamp(24px, 5.6vw, 32px);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.section-title {
  font-size: 20px;
  margin: 32px 0 12px;
}

.meta {
  color: var(--ink-muted);
  font-size: 16px;
}

.notice + .add-block,
.notice + .notice,
.notice + .card,
.notice + .steps { margin-top: 12px; }

.notice {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

/* 読み込み中: 若葉の細い輪が静かに回るだけ */
.notice.is-loading,
#gen-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice.is-loading::before,
#gen-status::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: operi-spin 0.9s linear infinite;
}
/* 止まった（失敗・中止・確認待ち）ときは回る印を出さない */
#gen-status.is-idle::before,
#gen-status.error-text::before { display: none; }
#gen-status:focus { outline: none; }
#gen-status::before { border-color: var(--paper); border-top-color: var(--accent); }
@keyframes operi-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .notice.is-loading::before, #gen-status::before { animation-duration: 2.4s; }
}

.notice-soft {
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

/* エラー: 文字は --danger。箱（.notice や p 単体の面）に載るときは薄い面を敷く */
.error-text { color: var(--danger); font-weight: 700; }
.notice.error-text { background: var(--danger-soft); color: var(--danger-strong); }

.mode-chip {
  display: inline-block;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--gray);
  margin-bottom: 12px;
}

.time,
.time-btn,
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--soft-bg, var(--accent-soft));
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible,
.tab-btn:focus-visible,
.quiz-choice:focus-visible,
.time-btn:focus-visible,
.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 主ボタン: 矢印の丸が無いので、文字を載せてよい緑 --grad を使う */
.btn-primary {
  background: var(--grad);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}

.btn-secondary { background: var(--soft-bg, var(--accent-soft)); color: var(--accent-strong); }

/* 若葉の薄い面の上では、副ボタンを白いピルにする（同じ色で埋もれないように） */
.notice-soft, .gen-panel, .review-box, .lang-bar { --soft-bg: var(--paper); }

.btn-quiet {
  background: var(--quiet-bg);
  color: var(--ink);
  font-weight: 500;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger-strong);
  font-weight: 500;
}

.btn-block { width: 100%; }

.btn.is-active {
  background: var(--grad);
  color: var(--on-accent);
}

/* 無効: 半透明にしない。薄いグレーの面に濃い文字（6.21:1） */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn-row .btn { flex: 1 1 140px; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

.link-row a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

/* ---------- 下部固定のボタン列 ---------- */

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  box-shadow: 0 -4px 20px rgba(30, 84, 54, .10);
  z-index: 10;
}

.actionbar .btn {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

/* ---------- フォーム ---------- */

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

/* 「人間かどうか」のチェック欄（Cloudflare Turnstile。高さ 65px）。読み込むまで高さを取っておき、ボタンが跳ねないように */
.turnstile-box {
  min-height: 65px;
  margin-bottom: 18px;
}

.field .hint {
  display: block;
  font-weight: 400;
  color: var(--ink-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
.field select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

textarea {
  resize: vertical;
  overflow: hidden;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
textarea:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
}

input[type="file"] {
  display: block;
  width: 100%;
  font-size: 16px;
  padding: 10px 0;
}

input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--accent);
  margin: 0;
}

.required { color: var(--danger); font-weight: 700; font-style: normal; font-size: 14px; }

/* ファイル選択のボタンもピル型に */
input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 12px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* 折りたたみ（持ち出しファイルの取り込み）: グレーの面 */
.import-box {
  margin: 8px 0 18px;
  padding: 4px 18px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  --quiet-bg: var(--paper);
}
.import-box > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.import-box > summary::-webkit-details-marker { display: none; }
.import-box > summary::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform .15s;
}
.import-box[open] > summary::before { transform: rotate(45deg); }
.import-box[open] { padding-bottom: 14px; }

/* 文の中の、リンクに見えるボタン */
.linklike {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- 一覧 ---------- */

.card {
  display: block;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--gray);
  color: var(--ink);
  text-decoration: none;
  --quiet-bg: var(--paper);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  flex: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--quiet-bg);
  color: var(--ink-muted);
  white-space: nowrap;
}

.badge-published {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.empty-state {
  padding: 24px 22px;
  border-radius: 24px;
  background: var(--gray);
  --quiet-bg: var(--paper);
}

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.empty-state ol {
  margin: 0;
  padding-left: 1.4em;
}

/* ---------- 動画 ---------- */

.video-wrap {
  margin: 8px 0 12px;
  background: #000;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(30, 84, 54, .14);
  overflow: hidden;
}

.video-wrap video {
  display: block;
  width: 100%;
  max-height: 40vh;
  background: #000;
}

.time-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.time-row .time {
  font-size: 22px;
  font-weight: 700;
}

.progress-text {
  color: var(--ink-muted);
}

/* ---------- 振り返り（メモ） ---------- */

.add-block {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

.add-block .field { margin-bottom: 10px; }

.interim {
  color: var(--ink-muted);
  padding: 6px 0 10px;
  min-height: 1.85em;
  overflow-wrap: anywhere;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

.time-btn {
  min-height: 48px;
  min-width: 72px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
  align-self: start;
}

/* 動画が無いマニュアルでは時刻ボタンの代わりに順番（1, 2, 3）を出す */
.seq-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--grad);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  align-self: start;
}

.note-body { min-width: 0; }

.note-text { overflow-wrap: anywhere; }

.note-actions {
  grid-column: 2;
  display: flex;
  gap: 8px;
}

.note-actions .btn { min-width: 88px; }

.note-edit textarea { margin-bottom: 8px; }

.gen-panel {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  --quiet-bg: var(--paper);
}

.gen-panel .btn-row { margin-top: 8px; }

/* ---------- マニュアル ---------- */

.block { margin-top: 24px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* 丸い番号（「1」「問1」）。緑の面に白抜き */
.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--grad);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.step-head .spacer { flex: 1; }

.step .field { margin-bottom: 10px; }

.step .field > span { font-size: 16px; color: var(--ink-muted); font-weight: 400; }

.plain-list {
  margin: 0;
  padding-left: 1.4em;
}

.plain-list li { margin-bottom: 4px; }

.quiz-item {
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

/* ---------- 学習 ---------- */

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 8px;
  cursor: pointer;
}

.check-row span { font-weight: 700; }

.step-field { margin-bottom: 6px; overflow-wrap: anywhere; }

.step-field b { display: block; color: var(--ink-muted); font-weight: 400; }

.quiz-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

.quiz-q { font-weight: 700; overflow-wrap: anywhere; }

.quiz-a {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

/* 選択式の確認テスト（仕様書 §9.3）。グレーの面の上に白い選択肢。正解は若葉の薄い面、不正解は --danger の薄い面 */
.quiz-choices { display: grid; gap: 8px; margin-top: 12px; }

.quiz-choice {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.quiz-choice:disabled { cursor: default; }

.quiz-choice:not(:disabled):hover { background: var(--accent-soft); }

.quiz-choice.is-correct {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.quiz-choice.is-wrong {
  background: var(--danger-soft);
  color: var(--danger-strong);
  font-weight: 700;
}

.quiz-result { margin-top: 12px; font-weight: 700; overflow-wrap: anywhere; }
.quiz-result.is-ok { color: var(--accent); }
.quiz-result.is-ng { color: var(--danger); }

.quiz-score { margin: 8px 0; font-size: 22px; font-weight: 700; }

/* 習得完了: 緑の面に白抜き（panel-green の小さい版） */
.done-banner {
  margin-top: 20px;
  padding: 24px 20px;
  border-radius: 24px;
  background: var(--grad);
  color: var(--on-accent);
  text-align: center;
  box-shadow: var(--shadow-btn);
}

.done-banner h2 { font-size: 24px; font-weight: 900; color: var(--on-accent); }

/* ---------- 共有 ---------- */

.qr-box {
  display: inline-block;
  padding: 14px;
  background: #FFFFFF;
  border: 10px solid var(--gray);   /* 線ではなく、グレーの面の額縁 */
  border-radius: 24px;
  margin: 12px 0;
}

.qr-box img,
.qr-box canvas { display: block; }

.url-box {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

/* ---------- トースト ---------- */

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--actionbar-h) + 12px + env(safe-area-inset-bottom, 0px));
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-align: center;
  box-shadow: var(--shadow-float);
  z-index: 20;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- 画面幅が広いとき ---------- */

@media (min-width: 640px) {
  .actionbar {
    padding-left: max(16px, calc((100% - 720px) / 2 + 16px));
    padding-right: max(16px, calc((100% - 720px) / 2 + 16px));
  }
}

/* 2度押し確認の待ち状態 */
.is-armed {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  font-weight: 700;
}

/* 一覧カード（本体リンク＋新人向けの学習ボタン） */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-actions {
  margin-top: 12px;
}
.btn-small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
}
.ai-hint {
  margin: 8px 0 16px;
}

/* 一覧の下の「この端末の情報を消す」（共有端末向け。小さく置く） */
.device-clear {
  margin-top: 32px;
}
.device-clear .meta { margin-bottom: 8px; }

/* ---------- 質問（チャット） ---------- */

.chat {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.msg {
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg .who {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: normal;
}

/* 誰の発言かは、線ではなく面の色と寄せで分ける */
.msg-learner { margin-right: 24px; }
.msg-trainer { margin-left: 24px; background: var(--accent-soft); }
.msg-trainer .who { color: var(--accent-strong); }
.msg-ai { margin-left: 24px; }
.msg-ai .who { color: var(--accent); }

.chat-empty { color: var(--ink-muted); }

/* 多言語（仕様 §9）: 原文・自動翻訳の注記 */
.msg .msg-orig,
.msg .msg-note {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: pre-wrap;
}
/* 段階5: AI の回答の「訂正する」（上司の画面）。面の中の控えめなボタンは白 */
.msg .msg-actions {
  display: block;
  margin-top: 8px;
  white-space: normal;
  --quiet-bg: var(--paper);
}
.msg-body { display: block; }

/* 上司確認の「質問」タブの AI の回答 */
.ai-answer .ai-answer-text {
  margin: 8px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-answer .btn-row { margin-top: 12px; }

.msg .msg-orig {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--paper);
}

/* ---------- 上司確認 ---------- */

/* タブ: グレーの面の上に、選択中だけ白いピル。下線タブは使わない */
.tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0 16px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--gray);
}

.tab-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.is-on {
  background: var(--paper);
  color: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(30, 84, 54, .12);
}

.badge-review {
  background: var(--disabled-bg);
  color: var(--ink);
}

.badge-alert {
  background: var(--danger-soft);
  color: var(--danger-strong);
}

.table-wrap { overflow-x: auto; }

/* 表: 罫線なし。行の地を白とグレーの交互にして、行の両端を角丸に */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 16px;
}

.table th,
.table td {
  padding: 10px 14px;
  border: 0;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.table th { color: var(--ink-muted); font-weight: 700; font-size: 14px; }
.table tbody tr:nth-child(odd) td { background: var(--gray); }
.table td:first-child, .table th:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child, .table th:last-child { border-radius: 0 12px 12px 0; }

.review-box {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  --quiet-bg: var(--paper);
}

.review-box .field { margin-bottom: 10px; }

/* ---------- 印刷 ---------- */

.print-sheet .p-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.print-sheet .p-qr {
  flex: 0 0 auto;
  padding: 4px;
  background: #FFFFFF;
}

.print-sheet .p-qr img,
.print-sheet .p-qr canvas { display: block; }

.print-sheet h2 { font-size: 18px; margin: 18px 0 6px; border-bottom: 1px solid var(--line); }

.print-sheet .p-step {
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-sheet .p-step-title { font-weight: 700; }

.print-sheet .p-row { margin: 0; }
.print-sheet .p-row b { font-weight: 400; color: var(--ink-muted); margin-right: 6px; }

.print-sheet .p-check { list-style: none; padding: 0; margin: 0; }
.print-sheet .p-check li { padding: 4px 0; }
.print-sheet .p-check li::before { content: "□"; margin-right: 8px; }

.print-sheet .p-quiz { margin: 0; padding-left: 1.4em; }
.print-sheet .p-quiz li { margin-bottom: 6px; }
.print-sheet .p-choices { margin: 2px 0 4px; padding-left: 1.2em; list-style: disc; }
.print-sheet .p-choices li { margin-bottom: 2px; }
.print-sheet .p-answer { color: var(--ink-muted); }
/* 翻訳の併記（仕様書 §10）: 各項目の下に薄い字で訳を添える */
.print-sheet .p-tr { display: block; color: var(--ink-muted); font-size: 0.92em; white-space: pre-wrap; }

.print-sheet .p-foot {
  margin-top: 18px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

@media print {
  @page { margin: 14mm; }
  .app-header, .actionbar, .toast, .no-print { display: none !important; }
  body { background: #FFFFFF; color: #000000; font-size: 12pt; line-height: 1.6; }
  .app-main { max-width: none; padding: 0; }
  .print-sheet, .print-sheet .p-step { background: #FFFFFF; color: #000000; }
  .print-sheet .p-row b, .print-sheet .p-answer, .print-sheet .p-foot, .print-sheet .p-tr { color: #444444; }
  .print-sheet h2 { break-after: avoid; page-break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- 資料（添付ファイル。マニュアル画面・学習画面） ---------- */

.files {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--gray);
  --quiet-bg: var(--paper);
}

/* サムネイル（画像は高さ 80px。PDF・テキストは種類ラベル） */
.file-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-input);
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}

.file-thumb img {
  display: block;
  height: 80px;
  width: 80px;
  object-fit: cover;
}

.file-thumb img:not([hidden]) + .file-kind { display: none; }

.file-body { min-width: 0; }

.file-name { overflow-wrap: anywhere; }

.file-body input.file-name { margin-bottom: 4px; }

.file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.file-progress { margin-top: 8px; }

/* 学習画面: 名前をタップで開く。画像はタップで全幅表示の切替 */
.file-item-learn {
  display: block;
}

.file-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  overflow-wrap: anywhere;
  margin-right: 10px;
}

.file-img {
  display: block;
  height: 80px;
  width: auto;
  max-width: 100%;
  margin-top: 6px;
  border-radius: var(--radius-input);
  object-fit: contain;
  cursor: zoom-in;
}

.file-img.is-wide {
  height: auto;
  width: 100%;
  cursor: zoom-out;
}

/* 言語切替 */
.lang-btn { margin-left: auto; min-height: 44px; padding: 6px 16px; border: 0; border-radius: var(--radius-pill); background: var(--gray); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
/* 浮いている面（モーダル相当）: 白・大きな角丸・薄い緑がかった影。線は引かない */
.lang-menu { position: fixed; top: 60px; right: 16px; z-index: 30; background: var(--paper); border: 0; border-radius: var(--radius); padding: 8px; min-width: 200px; box-shadow: var(--shadow-float); }
.lang-menu button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 16px; border: none; background: none; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; border-radius: var(--radius-input); }
.lang-menu button:hover { background: var(--gray); }
.lang-menu button[aria-current="true"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }

/* 学習画面: 翻訳の案内（自動翻訳の注意・翻訳中・翻訳できないとき）。色はトークンのみ */
.lang-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 14px; line-height: 1.5; --quiet-bg: var(--paper); }
.lang-bar a { color: var(--accent-strong); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

/* マニュアル画面の翻訳併記（仕様書 §10）: 日本語の入力欄の直下に、その言語の訳を読み取り専用で薄く出す */
.tr-line {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.field .tr-line { font-weight: 400; }
.step .tr-line { margin-bottom: 4px; }

/* ---------- 本部版（app-org.js）。色はトークンのみ。既存の値は変えない ---------- */

/* 一覧の上の小さな案内（役割・本部・ダッシュボード・端末の設定） */
.org-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: 12px; padding: 8px 16px; border-radius: var(--radius-sm); background: var(--gray); font-size: 14px; line-height: 1.5; --quiet-bg: var(--paper); }
.org-bar a { color: var(--accent); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.org-bar .org-who { color: var(--ink-muted); }

/* 入力部品（本体は text/textarea だけ整えているので、select・number・radio を足す） */
.org-view select,
.org-row select,
.org-view input[type="number"] {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-input);
  background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.6;
}
.org-view select:focus,
.org-row select:focus,
.org-view input[type="number"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.org-view input[type="radio"] { width: 24px; height: 24px; accent-color: var(--accent); margin: 0; }
.org-radio, .org-checks { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 4px 0 10px; }
.org-radio label, .org-checks label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.org-checks-head { flex-basis: 100%; margin-top: 6px; }
.org-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.org-row input[type="text"] { flex: 1 1 140px; min-width: 0; }
.org-row select { flex: 0 1 45%; min-width: 0; width: auto; }
.org-note-text { overflow-wrap: anywhere; white-space: normal; }
.org-note-box textarea { margin-bottom: 4px; }

/* ダッシュボードの表。横スクロールは表の容器だけに許す */
/* 集計の表は、マス目の濃淡を読むので罫（--line）を残す。外枠は角丸の面にする */
.org-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; border-radius: var(--radius-sm); background: var(--surface); }
.org-table { border-collapse: separate; border-spacing: 0; background: var(--surface); font-size: 14px; min-width: 100%; }
.org-table th, .org-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; vertical-align: middle; white-space: nowrap; }
.org-table th { color: var(--ink-muted); font-weight: 700; background: var(--surface); }
.org-table tr > :last-child { border-right: 0; }
.org-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.org-table tbody:last-child tr:last-child td { border-bottom: 0; }
.org-table tfoot td { border-bottom: 0; color: var(--ink-muted); }
.org-table .org-th-manual, .org-table .org-td-manual { position: sticky; left: 0; z-index: 1; text-align: left; white-space: normal; min-width: 150px; max-width: 220px; background: var(--surface); border-right: 1px solid var(--line); }
.org-table .org-td-ver { display: block; font-size: 12px; }
.org-table .org-cell { font-variant-numeric: tabular-nums; }
.org-table .org-cell-n { display: block; font-weight: 700; }
.org-table .org-cell-rate { display: block; font-size: 12px; color: var(--ink-muted); }
.org-table .org-cell-stale { display: block; font-size: 12px; color: var(--danger); }
.org-table .org-cell-none { color: var(--ink-muted); font-size: 13px; }
.org-table .org-cell-na { color: var(--ink-muted); }  /* 半透明にしない */
/* 率の濃淡3段: 0% は地のまま / 1〜99% は薄く / 100% は --accent-soft そのまま */
.org-table .org-cell-zero { background: var(--surface); }
.org-table .org-cell-part { background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
.org-table .org-cell-full { background: var(--accent-soft); }
.org-table .org-cell-full .org-cell-n { color: var(--accent); }

/* 学習画面: 新しい版の案内（.lang-bar の見た目を借りる） */
.org-version-bar .btn { margin-left: auto; }

@media print {
  .org-bar, .org-deliver-box, .org-note-box, .org-version-bar { display: none !important; }
}

.brand-sub { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-strong); background: var(--accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; margin-left: 6px; vertical-align: middle; }

.toast { pointer-events: none; }

/* ---------- 人と拠点（第2弾 段階5.5。people.js） ---------- */

.view-people .pp-site-pick { max-width: 360px; }
.pp-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gray); --quiet-bg: var(--paper); --soft-bg: var(--paper); }
.pp-row-main { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.pp-row-main .meta { margin-left: 6px; }
.pp-row .btn-row { margin: 0; flex: 0 1 auto; }
.pp-row .btn-row .btn { flex: 0 0 auto; }
.pp-edit { display: block; }
.pp-edit .field { margin-bottom: 10px; }
.pp-btn-sm { padding: 8px 14px; font-size: 14px; min-height: 40px; }
.pp-badge-warn { background: var(--danger-soft); color: var(--danger-strong); }
.pp-check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; font-weight: 500; }
.pp-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.pp-sub { font-size: 16px; font-weight: 700; margin: 18px 0 4px; }
.pp-add, .pp-stopped { margin-top: 14px; }
.pp-add > summary, .pp-stopped > summary { cursor: pointer; font-weight: 700; color: var(--accent-strong); padding: 8px 0; }
.pp-add form { padding: 14px; border-radius: var(--radius-sm); background: var(--surface); }
.pp-secret { margin: 12px 0; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); --soft-bg: var(--paper); }
.pp-pin { font-family: "Barlow Semi Condensed", var(--font-body); font-size: 48px; letter-spacing: 0.2em; font-weight: 600; margin: 4px 0; color: var(--ink-strong); }
.pp-qr-row { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin: 12px 0; }
.pp-qr { background: #FFFFFF; padding: 12px; border-radius: var(--radius-sm); line-height: 0; }
.pp-qr img, .pp-qr canvas { display: block; max-width: 100%; height: auto; }
.pp-qr-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.pp-qr-meta dt { color: var(--ink-muted); }
.pp-qr-meta dd { margin: 0; font-weight: 700; }
.pp-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; overflow-y: auto; background: rgba(0, 0, 0, .45); }  /* 上寄せ: スマホのキーボードで「確認する」が隠れないように */
.pp-modal-box { width: 100%; max-width: 420px; padding: 22px; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-float); }
.pp-modal-box .field { margin: 12px 0; }

/* 最近のその場で承認（2026-09-28。会社の設定の中） */
.pp-onsite-log .pp-row-main { flex-basis: 100%; }
.pp-log-when { color: var(--ink-muted); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* 操作の記録（2026-09-28。audit.js。会社の管理者だけ） */
.view-audit .notice-soft ul { margin: 6px 0 0; padding-left: 1.2em; }
.au-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 4px; }
.au-filters .field { flex: 1 1 160px; max-width: 260px; margin: 0; }
.au-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.au-row { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gray); overflow-wrap: anywhere; }
.au-when { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.au-main { margin-top: 2px; line-height: 1.6; }
.au-target { margin-left: 6px; }
.au-detail { margin-top: 4px; }

/* A4 の貼り紙（画面には出さない。印刷のときだけ、これ以外を隠す） */
#pp-poster { display: none; }
/* 貼り紙以外の印刷（Cmd+P など）でも、合言葉と教える側の一覧は刷らない */
@media print {
  body:not(.pp-printing) .pp-secret, body:not(.pp-printing) #pp-staff { display: none !important; }
}
@media print {
  body.pp-printing > *:not(#pp-poster) { display: none !important; }
  body.pp-printing #pp-poster { display: block; text-align: center; color: #000000; font-family: var(--font-body); }
  @page { size: A4 portrait; margin: 14mm; }
  #pp-poster, #pp-poster * { color: #000000 !important; background: #FFFFFF !important; -webkit-text-fill-color: #000000; }
  #pp-poster .pp-poster-company { font-size: 14pt; margin: 0 0 2mm; }
  #pp-poster .pp-poster-site { font-size: 30pt; font-weight: 900; margin: 0 0 6mm; }
  #pp-poster .pp-poster-lead { font-size: 22pt; font-weight: 700; margin: 0; }
  #pp-poster .pp-poster-how { font-size: 14pt; margin: 2mm 0 6mm; }
  #pp-poster .pp-poster-qr { display: inline-block; padding: 4mm; border: 0.4mm solid #000000; line-height: 0; }
  #pp-poster .pp-poster-qr img, #pp-poster .pp-poster-qr canvas { width: 95mm; height: 95mm; }
  #pp-poster .pp-poster-langs { list-style: none; padding: 0; margin: 6mm 0 0; font-size: 11pt; line-height: 1.7; }
  #pp-poster .pp-poster-note { font-size: 10pt; margin: 8mm 0 0; }
  #pp-poster .pp-poster-foot { font-size: 9pt; margin-top: 4mm; }
}

/* 段階5.7: マニュアルの削除（弱い赤の文字リンク）・ごみ箱・ログイン中の端末の一覧 */
.danger-row { margin-top: 28px; }
.linklike.danger-link { color: var(--danger); min-height: 48px; }
.trash-list, .session-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.trash-item, .session-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.trash-text, .session-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1 1 200px; }
.session-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.trash-title, .session-label { font-weight: 700; overflow-wrap: anywhere; }
.trash-item .btn, .session-item .btn { flex: 0 0 auto; }

/* 段階6: CSP の style-src に 'unsafe-inline' を足さないため、画面の中の style="…" をクラスに置き換えた */
.mt-0 { margin-top: 0; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* 2026-09-24: ロゴ（operi の「iR」の形。原本は 案件/ロゴ/）。明るい画面は白地、暗い画面は黒地の画像を出す */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 6px; flex: 0 0 auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline-block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }
@media (max-width: 400px) {
  .brand-logo { width: 24px; height: 24px; }
  .brand { gap: 6px; }
}

/* ---------- 印（2026-09-26）: 承認の印「口伝」・理解の印「聴継」。朱の角印の絵（stamp-kuden.svg・stamp-kikitsugi.svg）。
   朱は絵の中だけ（文字・帯・枠には使わない。DESIGN.md）。絵には必ず alt を付ける ---------- */
.stamp { display: inline-block; flex: none; vertical-align: middle; }
.stamp-sm { width: 22px; height: 22px; }
.stamp-md { width: 48px; height: 48px; }
.stamp-lg { width: 72px; height: 72px; }
.stamp-line { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.stamp-line > div { min-width: 0; }
.stamp-title { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.stamp-line .meta { margin: 2px 0 0; overflow-wrap: anywhere; }
.stamp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.stamp-mini { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; overflow-wrap: anywhere; }   /* 学ぶ画面の題の下（1 行。動画を下げない） */
.table .stamp-sm { width: 18px; height: 18px; margin: 0 2px 0 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stamp { background: #FFFFFF; border-radius: 3px; }   /* 暗い画面でも、白い紙に押した印に見えるように */
}
:root[data-theme="dark"] .stamp { background: #FFFFFF; border-radius: 3px; }
@media print {
  .stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet .meta { color: #444444; }   /* 暗い画面の端末から刷っても、補足の文字（承認した人など）が薄くならないように */
}

/* ---------- その場で承認（聴き継ぎの承認のしかた A。2026-09-27）: 確認待ちの箱の中。社長が新人の方のスマホで承認の合言葉を入れる ---------- */
.onsite-box { margin-top: 14px; }
.onsite-return { margin-top: 12px; }
.onsite-return > summary { cursor: pointer; font-weight: 700; color: var(--accent-strong); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.onsite-return textarea { width: 100%; }
.onsite-record { margin-top: 10px; }
.onsite-note { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--paper); overflow-wrap: anywhere; }
.onsite-panel { margin-top: 12px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--paper); --soft-bg: var(--accent-soft); --quiet-bg: var(--gray); }
.onsite-hand { margin: 0 0 10px; font-weight: 700; color: var(--accent-strong); }
.onsite-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.onsite-one { margin: 8px 0; font-weight: 700; overflow-wrap: anywhere; }
.onsite-who { border: 0; padding: 0; margin: 8px 0; }
.onsite-who legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.onsite-who label span { overflow-wrap: anywhere; }
#f-onsite-pin { font-size: 22px; letter-spacing: .3em; max-width: 12em; }
.pp-approval-mode { flex-direction: column; gap: 8px; }
.pp-approval-mode label { align-items: flex-start; }
.pp-approval-mode input { margin-top: 4px; flex: none; }
.onsite-note p { margin: 0; }
.onsite-note p + p { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* パスキー（顔や指紋でログイン。2026-10-03） */
.passkey-login { margin-bottom: 4px; }
.passkey-or { text-align: center; margin: 4px 0 8px; }
.passkey-offer .btn-row { margin-top: 8px; }
