/* TEHON（てほん）体験版 — 温かい白 × 柿色 × 深緑 */
:root {
  --bg: #fffdf8;
  --paper: #ffffff;
  --cream: #f7efe3;
  --line: #ebe2d4;
  --ink: #2b2724;
  --muted: #6d655d;
  --kaki: #d9733b;
  --kaki-d: #a8521f;
  --kaki-l: #fbe8db;
  --green: #2f5d50;
  --green-l: #dcebe4;
  --red: #b3403a;
  --red-l: #f8e1de;
  --blue-l: #e3edf3;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(43, 39, 36, .05), 0 8px 24px rgba(43, 39, 36, .07);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --fs: 17px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.75; letter-spacing: .02em;
  overflow-wrap: anywhere;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--kaki); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
small { font-size: .8em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
rt { font-size: .5em; color: var(--muted); letter-spacing: 0; }

/* ===== 体験版の帯 ===== */
.demo-band {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  padding: 7px 16px; background: var(--ink); color: #f6efe6; font-size: 12.5px; line-height: 1.55;
}
.demo-band p { flex: 1 1 420px; min-width: 0; }
.demo-band a { white-space: nowrap; text-underline-offset: 3px; }

/* ===== ヘッダー ===== */
.app-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 16px 24px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.brand-logo { font-size: 26px; font-weight: 800; letter-spacing: .3em; color: var(--green); line-height: 1.2; }
.brand-logo::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--kaki); margin-left: 2px; vertical-align: super; }
.brand-ja { font-size: 12.5px; color: var(--muted); }
.view-tabs { display: flex; background: var(--cream); border-radius: 999px; padding: 4px; gap: 4px; max-width: 100%; }
.view-tabs button {
  border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; min-height: 48px;
  font-size: 15px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.25;
}
.view-tabs button small { font-size: 11px; font-weight: 400; color: var(--muted); }
.view-tabs button[aria-selected="true"] { background: var(--paper); box-shadow: var(--shadow); color: var(--green); }
.reset-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px; min-height: 44px; font-size: 14px; color: var(--muted); }
.reset-btn:hover { border-color: var(--kaki); color: var(--kaki-d); }

.app { padding: 24px 16px 72px; }

/* ===== 案内 ===== */
.intro { max-width: 1180px; margin: 0 auto 20px; }
.intro-in { background: var(--green); color: #f4f8f6; border-radius: var(--radius); padding: 18px 22px; position: relative; }
.intro h2 { font-size: 17px; margin-bottom: 6px; }
.intro ul { padding-left: 1.2em; font-size: 15px; }
.intro li { margin: 2px 0; }
.intro b { color: #ffd9c2; }
.intro .btn { margin-top: 10px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }

/* ===== 共通部品 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 700; text-decoration: none; line-height: 1.3; text-align: center;
}
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--kaki); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--kaki-d); }
.btn.ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--kaki); }
.btn.green { background: var(--green); color: #fff; }
.danger-t { color: var(--red) !important; }
.link { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; text-align: left; min-height: 32px; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); font-size: 18px; font-weight: 700; flex: 0 0 auto; }
.icon-btn.danger { color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-row.end { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.chip.green, .chip.st-pass, .chip.d-added { background: var(--green-l); color: var(--green); }
.chip.kaki, .chip.st-doing, .chip.d-changed { background: var(--kaki-l); color: var(--kaki-d); }
.chip.gray, .chip.st-todo, .chip.d-same { background: #efebe5; color: var(--muted); }
.chip.st-late, .chip.d-removed { background: var(--red-l); color: var(--red); }
.chip.d-moved { background: var(--blue-l); color: #33607a; }
.note { font-size: 14px; color: var(--muted); }
.center { text-align: center; }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--cream); border-radius: 12px; }
.err { color: var(--red); font-weight: 700; margin-top: 10px; }
.ok { color: var(--green); font-weight: 700; }
.ng-t { color: var(--red); }
.kaki-t { color: var(--kaki-d); font-weight: 700; }
.muted { color: var(--muted); }
.h2 { font-size: 21px; margin: 6px 0 10px; }
.h3 { font-size: 17px; margin-bottom: 8px; }
.block { margin-top: 22px; }
.label { font-size: 12px; letter-spacing: .2em; color: var(--kaki-d); font-weight: 700; }
.bar { display: inline-block; flex: 1 1 auto; width: 100%; min-width: 60px; height: 10px; border-radius: 999px; background: #efe8de; overflow: hidden; vertical-align: middle; }
.bar > span { display: block; height: 100%; background: var(--kaki); border-radius: 999px; }
.bar.green > span { background: var(--green); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; box-shadow: var(--shadow); min-width: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; min-width: 0; }
.fld input, .fld select, .fld textarea, .me-bar select, .search-box input, .asg-form input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 400;
}
.fld textarea { min-height: 64px; resize: vertical; line-height: 1.6; }
.ck { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 15px; }
.ck input { width: 22px; height: 22px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--green); }
.checks { margin-top: 12px; }
.checks legend { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.back { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--green); font-weight: 700; font-size: 15px; }

/* ===== 用語（点線） ===== */
.term {
  display: inline; padding: 0 1px; margin: 0; background: none; border: 0; border-radius: 3px;
  color: inherit; font: inherit; line-height: inherit; text-decoration: underline dotted var(--kaki); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.term:hover { background: var(--kaki-l); }
.term-sample { text-decoration: underline dotted var(--kaki); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ===== スタッフの画面（スマホ想定） ===== */
.phone { max-width: 460px; margin: 0 auto; }
@media (min-width: 720px) {
  .view-staff .phone { border: 1px solid var(--line); border-radius: 32px; padding: 18px 18px 26px; background: var(--paper); box-shadow: var(--shadow); }
}
.me-bar { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.me-bar select { font-size: 15px; min-height: 44px; }
.sub-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 10px; overflow-x: auto; }
.sub-tabs button {
  flex: 1 0 auto; border: 0; background: none; padding: 10px 10px; min-height: 48px; font-size: 15px; font-weight: 700; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.sub-tabs button[aria-current] { color: var(--green); border-bottom-color: var(--kaki); }
.disp-bar { background: var(--cream); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.disp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: flex; background: #fff; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; border-radius: 8px; min-height: 40px; padding: 4px 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
.seg.small button { min-height: 36px; font-size: 13px; padding: 2px 8px; }
.toggle { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; min-height: 40px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
.toggle[aria-pressed="true"] { border-color: var(--green); color: var(--green); }
.reread-banner { display: block; width: 100%; text-align: left; border: 0; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--kaki-l); color: var(--kaki-d); font-weight: 700; font-size: 15px; min-height: 48px; }
.me-foot { margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--muted); }
.search-box { margin-bottom: 10px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.cat-chips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; min-height: 40px; font-size: 14px; font-weight: 700; }
.cat-chips button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.m-card {
  display: flex; gap: 12px; width: 100%; text-align: left; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-top: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.m-card:hover { border-color: var(--kaki); }
.m-thumb { flex: 0 0 96px; width: 96px; }
.m-thumb .art { width: 96px; height: 64px; border-radius: 10px; display: block; object-fit: cover; }
.m-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.m-cat { font-size: 12px; color: var(--kaki-d); font-weight: 700; }
.m-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.m-note { font-size: 12.5px; color: var(--muted); }
.m-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.reread { background: var(--kaki-l); border-radius: 14px; padding: 12px; }
.reread .h2 { color: var(--kaki-d); margin-top: 0; }

/* 手順を見る */
.reader { font-size: var(--fs); }
.size-l { --fs: 20px; }
.size-xl { --fs: 24px; }
.r-title { font-size: calc(var(--fs) + 5px); line-height: 1.55; margin: 2px 0; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.dot { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: 15px; }
.dot[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.dot.changed { border-color: var(--kaki); box-shadow: 0 0 0 3px var(--kaki-l); }
.step-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.step-card.is-changed { border: 2px solid var(--kaki); }
.step-pic .art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.step-body { padding: 14px 16px 16px; }
.step-no { font-size: 13px; font-weight: 800; color: var(--kaki-d); letter-spacing: .05em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.step-text { font-size: calc(var(--fs) + 2px); font-weight: 700; line-height: 1.9; margin: 4px 0 8px; }
.warn, .tip { display: block; border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: var(--fs); line-height: 1.85; }
.warn { background: var(--red-l); }
.warn b { color: var(--red); }
.tip { background: var(--green-l); }
.tip b { color: var(--green); }
.warn .ico, .tip .ico { font-size: 1.1em; margin-right: 6px; }
.warn b, .tip b { margin-right: 8px; }
.pager { display: flex; gap: 10px; }
.pager .btn { flex: 1 1 0; }
.reader-foot { margin: 14px 0; text-align: center; }
.read-box { border-top: 1px dashed var(--line); padding-top: 14px; }
.read-done { text-align: center; color: var(--green); font-weight: 800; background: var(--green-l); border-radius: 12px; padding: 12px; }
.change-box { background: var(--kaki-l); border-radius: 14px; padding: 12px 14px; margin: 10px 0; font-size: 15px; }
.change-box ul { padding-left: 1.2em; margin-top: 4px; }
.d-add { color: var(--green); font-weight: 700; }
.d-chg { color: var(--kaki-d); font-weight: 700; }
.d-del { color: var(--red); font-weight: 700; }

/* 用語帳 */
.gloss-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 10px 0; }
.gloss-head .bar { flex: 1 1 auto; }
.g-list { display: grid; gap: 10px; margin-top: 10px; }
.g-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: var(--fs); }
.g-card.on { border-color: var(--green); background: #f7fbf9; }
.g-word { font-size: calc(var(--fs) + 4px); font-weight: 800; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.g-en { font-size: 13px; font-weight: 600; color: var(--muted); }
.g-mean { margin: 4px 0 6px; line-height: 1.85; }
.g-used { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.term-sheet .t-word { font-size: 28px; margin: 4px 0; }
.t-mean { font-size: 18px; line-height: 1.9; margin: 8px 0; }

/* 研修・テスト */
.course-card { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; }
.course-card.st-pass { border-left-color: var(--green); }
.course-card.st-doing { border-left-color: var(--kaki); }
.course-card.st-late { border-left-color: var(--red); }
.cc-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cc-head h3 { font-size: 17px; }
.cc-bar { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; font-weight: 700; }
.cc-bar span:last-child { white-space: nowrap; }
.cc-list { list-style: none; margin: 8px 0 12px; border-top: 1px solid var(--line); font-size: var(--fs); }
.cc-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9em; }
.cc-list li > span { white-space: nowrap; font-size: 13px; }
.cc-test { font-weight: 700; }
.q-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; font-size: var(--fs); }
.q-card.ok { border-color: var(--green); }
.q-card.ng { border-color: var(--red); background: #fffafa; }
.q-card legend { font-weight: 800; float: left; width: 100%; margin-bottom: 8px; line-height: 1.8; }
.q-card legend + * { clear: both; }
.q-no { display: inline-block; background: var(--green); color: #fff; border-radius: 8px; padding: 0 8px; margin-right: 8px; font-size: 14px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; margin-top: 8px; }
.opt input { width: 22px; height: 22px; accent-color: var(--green); flex: 0 0 auto; }
.opt.correct { border-color: var(--green); background: var(--green-l); }
.opt.picked-wrong { border-color: var(--red); background: var(--red-l); }
.order { list-style: decimal; padding-left: 1.6em; }
.order li { padding: 8px 0 8px 4px; border-bottom: 1px solid var(--line); }
.order li > .o-text { display: block; }
.order li { display: list-item; }
.o-btns { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.order li.correct { color: var(--green); }
.order li.picked-wrong { color: var(--red); }
.q-fb { font-weight: 800; margin: 8px 0 6px; }
.q-fb.ok { color: var(--green); }
.q-fb.ng { color: var(--red); }
.score-box { border-radius: 16px; padding: 16px; text-align: center; margin: 10px 0; font-weight: 700; }
.score-box.pass { background: var(--green-l); color: var(--green); }
.score-box.fail { background: var(--kaki-l); color: var(--kaki-d); }
.score { font-size: 48px; font-weight: 800; line-height: 1.2; }
.score small { font-size: 18px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.tile { background: var(--cream); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); font-weight: 700; }
.t-num { font-size: 28px; color: var(--ink); font-weight: 800; line-height: 1.3; }
.t-num small { font-size: 14px; color: var(--muted); }
.tile.st-late { background: var(--red-l); } .tile.st-late .t-num { color: var(--red); }
.tile.st-doing { background: var(--kaki-l); } .tile.st-doing .t-num { color: var(--kaki-d); }
.tile.st-pass { background: var(--green-l); } .tile.st-pass .t-num { color: var(--green); }
.prog-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.pr-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.att-list { list-style: none; }
.att-list li { display: grid; grid-template-columns: 4.5em 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ===== 教える人の画面（パソコン想定） ===== */
.wide { max-width: 1180px; margin: 0 auto; }
.t-who { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.t-tabs { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14.5px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 10px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--cream); font-size: 13px; white-space: nowrap; }
.tbl td .bar { margin-top: 4px; max-width: 140px; display: block; }
.tbl .actions { white-space: nowrap; }
.tbl .actions .btn + .btn { margin-left: 6px; }
.rate { font-weight: 700; white-space: nowrap; }
.matrix td.cell { min-width: 120px; border-left: 4px solid #fff; }
.cell span, .cell small { display: block; }
.cell-st { font-weight: 800; }
.cell-pct { font-size: 13px; }
.cell small { color: var(--muted); font-size: 12px; }
.cell.st-pass { background: var(--green-l); } .cell.st-pass .cell-st { color: var(--green); }
.cell.st-doing { background: var(--kaki-l); } .cell.st-doing .cell-st { color: var(--kaki-d); }
.cell.st-todo { background: #f3efe9; } .cell.st-todo .cell-st { color: var(--muted); }
.cell.st-late { background: var(--red-l); } .cell.st-late .cell-st { color: var(--red); }
.cell-none { color: #c8beb2; text-align: center !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 編集 */
.diff-note { background: var(--blue-l); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.lang-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; font-size: 14px; font-weight: 700; }
.lang-tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; min-height: 40px; padding: 4px 14px; font-weight: 700; font-size: 14px; }
.lang-tabs button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.lang-tabs .miss { color: var(--kaki-d); background: #fff; border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.ed-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin: 12px 0; }
.ed-steps { list-style: none; }
.ed-step { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.ed-step.focus { border: 2px solid var(--kaki); box-shadow: 0 0 0 4px var(--kaki-l); }
.es-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.es-btns { display: flex; gap: 6px; }
.es-grid { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
.es-pic .art { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; display: block; }
.es-pic-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-btn { position: relative; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--kaki); outline-offset: 2px; }
.es-fields { display: grid; gap: 8px; min-width: 0; }
.publish-box { background: var(--cream); border-radius: 16px; padding: 16px; margin-top: 16px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.art-opt { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; }
.art-opt .art { width: 100%; height: auto; }
.art-opt:hover { border-color: var(--kaki); }

/* 改訂 */
.rev-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.rev-side { list-style: none; display: grid; gap: 6px; }
.rev-side button { width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.rev-side button[aria-current] { border-color: var(--green); background: #f4f9f6; box-shadow: inset 4px 0 0 var(--green); }
.rev-side .note { font-size: 12.5px; }
.rate-line { font-size: 12.5px; color: var(--kaki-d); font-weight: 700; }
.rev-main .card:first-child { margin-top: 0; }
.timeline { list-style: none; border-left: 3px solid var(--line); margin: 8px 0 0 6px; padding-left: 16px; }
.timeline li { position: relative; padding: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 0 12px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 10px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.timeline li.now::before { border-color: var(--kaki); background: var(--kaki); }
.timeline li span { color: var(--muted); font-size: 14px; }
.timeline li p { flex: 1 1 100%; font-size: 14.5px; }
.cmp-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 6px 0 8px; font-size: 14px; font-weight: 700; }
.cmp-bar select { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.diff-sum { background: var(--cream); border-radius: 999px; padding: 4px 12px; }
.diff-list { list-style: none; display: grid; gap: 10px; }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; border-radius: 14px; padding: 10px; border: 1.5px solid var(--line); border-left-width: 6px; }
.dl-pic .art { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; display: block; }
.dl.d-added { border-color: var(--green); background: #f3f9f6; }
.dl.d-changed { border-color: var(--kaki); background: #fff8f2; }
.dl.d-removed { border-color: var(--red); background: #fdf5f4; }
.dl.d-removed .dl-text { text-decoration: line-through; color: var(--red); }
.dl.d-removed .dl-pic { opacity: .5; }
.dl.d-same { background: #fbfaf8; color: var(--muted); }
.dl-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.dl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.dl-pair p { border-radius: 10px; padding: 8px 10px; font-size: 14.5px; }
.dl-pair span { display: block; font-size: 12px; font-weight: 800; }
.before { background: var(--red-l); text-decoration: line-through; text-decoration-color: rgba(179,64,58,.5); }
.before span { text-decoration: none; color: var(--red); }
.after { background: var(--green-l); }
.after span { color: var(--green); }

/* 研修の管理 */
.rank { list-style: none; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.rk { width: 36px; height: 36px; border-radius: 50%; background: var(--kaki); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rank li:nth-child(n+4) .rk { background: #e8ded2; color: var(--ink); }
.course-list { list-style: none; display: grid; gap: 8px; margin-top: 8px; }
.course-list li { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.nc-form { background: var(--cream); border-radius: 14px; padding: 14px; margin: 8px 0 12px; }
.nc-form .checks { columns: 2; column-gap: 20px; }
.asg-form { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.card > .checks { columns: 2; column-gap: 20px; }
.checks legend { column-span: all; }

/* 掲示用 */
.print-ctrl { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 8px; }
.print-ctrl .fld { flex: 1 1 200px; }
.print-sheet { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px; margin-top: 12px; border-radius: 6px; }
.ps-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 4px solid var(--kaki); padding-bottom: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ps-head h2 { font-size: 26px; color: var(--green); line-height: 1.5; }
.ps-shop { font-size: 13px; color: var(--muted); font-weight: 700; }
.ps-ver { text-align: right; font-size: 13px; color: var(--muted); font-weight: 700; }
.ps-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ps-steps li { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; break-inside: avoid; }
.ps-pic .art { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.ps-txt { padding: 10px 12px; font-size: 15px; font-weight: 700; line-height: 1.8; }
.ps-no { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 4px; }
.ps-txt .warn, .ps-txt .tip { font-size: 13.5px; font-weight: 600; padding: 6px 8px; display: block; }
.ps-foot { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: right; }

/* ===== モーダル・トースト ===== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(43, 39, 36, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--paper); border-radius: 20px; padding: 20px; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
@media (min-width: 720px) { .modal { align-items: center; } }
.modal-title { font-size: 18px; margin-bottom: 8px; }
.modal-text { font-size: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 120;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px);
  transition: transform .25s ease; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.show { transform: translate(-50%, 0); }
.noscript { padding: 24px; text-align: center; }

/* ===== 幅のせまい画面 ===== */
@media (max-width: 900px) {
  .rev-layout { grid-template-columns: 1fr; }
  .rev-side { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .es-grid { grid-template-columns: 1fr; }
  .es-pic .art { max-width: 320px; }
  .ed-meta { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .app-head { padding: 12px 16px; }
  .view-tabs { width: 100%; }
  .view-tabs button { flex: 1 1 0; padding: 6px 8px; font-size: 14px; }
  .reset-btn { width: 100%; }
  .app { padding: 16px 12px 64px; }
  .card { padding: 14px; }
  .dl { grid-template-columns: 1fr; }
  .dl-pic .art { width: 100%; height: auto; max-width: 240px; }
  .dl-pair { grid-template-columns: 1fr; }
  .rank li { grid-template-columns: 36px minmax(0, 1fr); }
  .rank li .btn { grid-column: 2; justify-self: start; }
  .asg-form { grid-template-columns: 1fr; }
  .nc-form .checks, .card > .checks { columns: 1; }
  .print-sheet { padding: 14px; }
  .ps-head h2 { font-size: 21px; }
  .att-list li { grid-template-columns: 4.5em 1fr; }
  .att-list li b { grid-column: 2; }
}

/* ===== 印刷 ===== */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .no-print, .demo-band, .app-head, .t-tabs, .t-who, .intro, .modal, .toast { display: none !important; }
  .app { padding: 0; }
  .print-sheet { border: 0; box-shadow: none; padding: 0; margin: 0; }
  .ps-steps { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ps-txt { font-size: 12.5px; }
  .warn, .tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ps-no, .ps-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
