/* MIMAWARI（みまわり）体験版 — 白 × 墨緑 × 青緑。異常はくすんだ赤、注意は黄土 */
:root {
  --bg: #F6F8F8;
  --paper: #FFFFFF;
  --ink: #1d2b2a;
  --muted: #5d6b6a;
  --line: #DCE4E3;
  --soft: #EEF3F3;
  --accent: #127a74;
  --accent-d: #0d5f5a;
  --accent-l: #E3F1F0;
  --bad: #c0453a;
  --bad-l: #F8E7E5;
  --warn: #c99a2e;
  --warn-d: #8a6614;
  --warn-l: #F8F0DC;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 43, 42, .05), 0 6px 22px rgba(29, 43, 42, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

* { 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.65; letter-spacing: .02em;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding-left: 1.3em; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ===== 体験版の帯 ===== */
.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: 6px 16px; background: var(--ink); color: #EAF2F1; 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; }
.demo-band a:focus-visible { outline-color: #8fd8d2; }

/* ===== ヘッダー ===== */
.app-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  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: 24px; font-weight: 700; letter-spacing: .28em; line-height: 1.2; color: var(--accent-d); }
.brand-ja { font-size: 12.5px; color: var(--muted); }
.view-tabs { display: flex; background: var(--soft); border-radius: 14px; padding: 4px; gap: 4px; }
.view-tabs button {
  border: 0; background: transparent; border-radius: 10px; padding: 6px 16px; min-height: 48px;
  font-size: 15px; font-weight: 700; display: flex; flex-direction: column; align-items: 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(--accent-d); }
.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(--accent); color: var(--accent-d); }

.app { padding: 20px 16px 72px; max-width: 1240px; margin: 0 auto; }

/* ===== 共通 ===== */
.h2 { font-size: 20px; font-weight: 700; line-height: 1.45; margin-bottom: 4px; }
.h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.lead { margin-bottom: 14px; }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }
.sub { font-size: 14px; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.t-bad { color: var(--bad); }
.t-ok { color: var(--accent-d); }
.err { color: var(--bad); font-size: 14px; margin: 8px 0; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--ink); background: var(--paper); font-size: 15px; font-weight: 700; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-d); border-color: var(--accent-d); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--accent); }
.btn.danger { border-color: #e2b5b0; color: var(--bad); }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.btn.icon { min-width: 44px; padding: 6px 0; font-size: 17px; }
.btn.wide { width: 100%; }
.btn.big { min-height: 58px; font-size: 17px; }
.btn:disabled { opacity: .35; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.linkish { border: 0; background: none; padding: 4px 0; font-weight: 700; color: var(--accent-d); text-decoration: underline; text-underline-offset: 3px; text-align: left; }

.chip {
  display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 0 8px; border-radius: 999px; font-weight: 700;
  white-space: nowrap; vertical-align: middle; background: var(--soft); color: var(--muted);
}
.chip.done { background: var(--accent-l); color: var(--accent-d); }
.chip.teal { background: var(--accent); color: #fff; }
.chip.bad { background: var(--bad-l); color: var(--bad); }
.chip.warn { background: var(--warn-l); color: var(--warn-d); }
.chip.gray { background: var(--soft); color: var(--muted); }
.kind { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-d); letter-spacing: .08em; }

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-head .h3 { margin: 0; }
.empty { padding: 20px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; background: var(--paper); }
.notice { background: var(--accent-l); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 10px 0; }
.notice.bad { background: var(--bad-l); color: #7a2a22; }
.notice.ok { background: var(--accent-l); color: var(--accent-d); }
.notice ul { margin-top: 4px; }
.save-warn { background: var(--bad); color: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.meter { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }

.field { display: block; font-size: 14px; font-weight: 700; margin-top: 10px; }
.field input[type="text"], .field input[type="date"], .field input[type="time"], .field select, .field textarea, textarea, .me-pick select, .inline select {
  display: block; width: 100%; margin-top: 4px; min-height: 46px; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; font-size: 16px;
}
textarea { resize: vertical; min-height: 64px; }
.req { margin-left: 6px; font-size: 11px; color: #fff; background: var(--bad); border-radius: 4px; padding: 0 5px; font-weight: 700; }
.opt { margin-left: 6px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.inline select { width: auto; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: 14px; }

/* ===== 案内 ===== */
.intro { margin-bottom: 18px; }
.intro-in { background: var(--accent-l); border: 1px solid #bfdedb; border-radius: var(--radius); padding: 16px 18px; }
.intro h2 { font-size: 16px; margin-bottom: 6px; color: var(--accent-d); }
.intro ul { font-size: 14px; display: grid; gap: 4px; margin-bottom: 10px; }

/* ===== スタッフの画面（スマホ枠） ===== */
.phone { max-width: 440px; margin: 0 auto; background: var(--paper); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.phone-top { padding: 14px 16px 12px; background: var(--accent-d); color: #fff; }
.shop-name { font-weight: 700; font-size: 15px; }
.me-pick { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }
.me-pick select { margin: 0; min-height: 44px; flex: 1; min-width: 0; color: var(--ink); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--paper); }
.seg button { position: relative; border: 0; background: none; min-height: 54px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; padding: 4px 2px; }
.seg button.on { color: var(--accent-d); border-bottom-color: var(--accent); }
.badge { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; margin-left: 4px; padding: 0 5px; vertical-align: 1px; }
.phone-body { padding: 16px 14px 24px; }
.today-head { margin-bottom: 12px; }
.today-head .meter { margin: 8px 0 4px; }

.chk {
  display: grid; gap: 2px; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px 14px 12px;
  border: 1.5px solid var(--line); border-left: 6px solid var(--accent); border-radius: 14px; background: var(--paper); position: relative; min-height: 64px;
}
.chk:hover { border-color: var(--accent); }
.chk-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chk .due { font-size: 13px; font-weight: 700; }
.chk-name { font-size: 17px; }
.chk-note { font-size: 13px; color: var(--muted); }
.chk-go { font-size: 13px; font-weight: 700; color: var(--accent-d); justify-self: end; }
.chk.over { border-left-color: var(--bad); background: #fffafa; border-color: #efc9c5; }
.chk.over .due { color: var(--bad); }
.chk.draft { border-left-color: var(--warn); }
.chk.done { border-left-color: #a9c9c6; background: #fbfdfd; }
.chk.done .chk-name { color: var(--muted); }
.chk.returned { border-left-color: var(--bad); border-color: var(--bad); }

/* --- 点検の実施 --- */
.back { border: 0; background: none; color: var(--accent-d); font-weight: 700; padding: 8px 0; min-height: 44px; font-size: 14px; }
.run-head { margin: 4px 0 8px; }
.run-prog { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.run-prog .meter { flex: 1; }
.item { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 12px; background: var(--paper); }
.item.ok { border-color: #a6d0cc; background: #fbfefe; }
.item.abn { border-color: var(--bad); background: #fffaf9; }
.item.need { box-shadow: 0 0 0 3px rgba(192, 69, 58, .25); border-color: var(--bad); }
.item-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.item-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.item.ok .item-no { background: var(--accent); color: #fff; }
.item.abn .item-no { background: var(--bad); color: #fff; }
.item-label { flex: 1; font-weight: 700; min-width: 0; }
.yn { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 6px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-top: 6px; }
.ans { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 16px; padding: 6px 8px; }
.ans.ok-btn:hover { border-color: var(--accent); }
.ans.ng-btn { color: var(--bad); }
.ans.ng-btn:hover { border-color: var(--bad); }
.ans.ok-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ans.ng-btn.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.num { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.num input { width: 130px; min-height: 56px; font-size: 24px; font-weight: 700; text-align: right; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.item.abn .num input { border-color: var(--bad); color: var(--bad); }
.unit { font-weight: 700; font-size: 18px; }
.num-state { font-size: 14px; margin-top: 4px; color: var(--muted); }
.abn-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2b5b0; }
.abn-msg { font-size: 13px; font-weight: 700; color: var(--bad); }
.photo-field { margin-top: 6px; }
.photo-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; border: 1.5px dashed var(--accent); border-radius: 12px; color: var(--accent-d); font-weight: 700; font-size: 15px; background: #fbfefe; cursor: pointer;
}
.photo-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.photo-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.cam { width: 22px; height: 16px; border: 2px solid currentColor; border-radius: 4px; position: relative; }
.cam::after { content: ""; position: absolute; width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; left: 5.5px; top: 2.5px; }
.photo-prev { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.thumb { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); }
.thumb.lg { width: 160px; height: 120px; }
.pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sign { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.sign .field { margin-top: 0; }

/* --- タスク --- */
.task { border: 1.5px solid var(--line); border-left: 6px solid var(--warn); border-radius: 14px; padding: 12px 14px; margin-top: 12px; background: var(--paper); min-width: 0; }
.task.over { border-left-color: var(--bad); border-color: #efc9c5; background: #fffafa; }
.task.done { border-left-color: var(--accent); }
.task-top { display: flex; flex-wrap: wrap; gap: 4px; }
.task-title { font-size: 16px; margin-top: 6px; }
.task-reason { font-size: 14px; margin-top: 4px; }
.task-meta { font-size: 14px; margin-top: 6px; }
.task-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.done-rep { margin-top: 10px; padding: 10px 12px; background: var(--accent-l); border-radius: 10px; font-size: 14px; }

/* --- 引き継ぎ --- */
.ho-form { margin-bottom: 14px; display: grid; gap: 8px; }
.ho { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.ho.unread { border-color: var(--warn); background: #fffdf6; }
.ho-meta { font-size: 13px; }
.ho-text { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ho .btn { margin-top: 8px; }

/* ===== 店長の画面 ===== */
.mnav { display: flex; flex-wrap: wrap; gap: 6px; background: var(--paper); padding: 6px; border-radius: 14px; box-shadow: var(--shadow); }
.mnav button { border: 0; background: none; border-radius: 10px; min-height: 46px; padding: 6px 14px; font-weight: 700; color: var(--muted); font-size: 15px; }
.mnav button.on { background: var(--accent); color: #fff; }
.mnav button:hover:not(.on) { background: var(--soft); }
.mgr-body { margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tile { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-top: 4px solid var(--accent); }
.tile.bad { border-top-color: var(--bad); }
.tile.warn { border-top-color: var(--warn); }
.tile-l { font-size: 13px; color: var(--muted); font-weight: 700; }
.tile-b { font-size: 28px; font-weight: 700; line-height: 1.3; }
.tile.bad .tile-b { color: var(--bad); }
.tile-s { font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mini-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 5px solid var(--warn); background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; min-height: 48px; }
.mini-row.over { border-left-color: var(--bad); }
.chart-wrap { width: 100%; }
.chart { display: block; width: 100%; height: auto; }
.chart .band { fill: var(--accent-l); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .pt { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart .pt-bad { fill: var(--bad); stroke: #fff; stroke-width: 2; }

.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 420px; margin-bottom: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg { font-style: normal; }
.cal-wrap { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal { border-collapse: collapse; font-size: 12px; }
.cal th, .cal td { border-bottom: 1px solid var(--line); padding: 3px 1px; text-align: center; }
.cal thead th { font-weight: 400; color: var(--muted); line-height: 1.2; min-width: 30px; }
.cal thead th span { display: block; font-weight: 700; color: var(--ink); }
.cal thead th.sun span { color: var(--bad); }
.cal thead th.sat span { color: #2e6aa8; }
.cal .is-today { background: #fff7e3; }
.cal-name { position: sticky; left: 0; background: var(--paper); text-align: left !important; padding: 6px 10px !important; white-space: nowrap; font-weight: 700; z-index: 1; font-size: 13px; }
.cell, .lg {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px;
  font-size: 12px; font-weight: 700; border: 1px solid transparent; padding: 0;
}
button.cell:hover { outline: 2px solid var(--ink); }
.c-done { background: #cfe7e4; color: var(--accent-d); }
.c-done.appr { background: var(--accent); color: #fff; }
.c-done.c-abn { background: #fff; color: var(--bad); border: 2px solid var(--bad); }
.c-done.c-abn.appr { background: var(--bad-l); }
.c-ret { background: var(--bad); color: #fff; }
.c-draft { background: var(--warn-l); color: var(--warn-d); border-color: var(--warn); }
.c-miss { background: #fff; color: var(--bad); border: 1px dashed var(--bad); }
.c-todo, .future { color: #a8b4b3; }
.rate-row th, .rate-row td { border-bottom: 0; }
.rate { display: inline-block; min-width: 28px; font-size: 10.5px; border-radius: 4px; padding: 2px 0; font-weight: 700; }
.rate.r100 { background: var(--accent); color: #fff; }
.rate.r60 { background: #bfe0dc; color: var(--accent-d); }
.rate.r30 { background: var(--warn-l); color: var(--warn-d); }
.rate.r0 { background: var(--bad-l); color: var(--bad); }
.wait-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wait-row .btn-row { margin-top: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; min-height: 44px; padding: 6px 14px; font-weight: 700; font-size: 14px; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill small { font-weight: 400; opacity: .8; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 12px; }

/* 編集 */
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 14px; align-items: start; }
.ed-sched { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.dows { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.dows legend { width: 100%; margin-bottom: 4px; }
.dow { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 10px; min-height: 44px; font-weight: 700; }
.dow input, .chk-l input { width: 20px; height: 20px; accent-color: var(--accent); }
.ed-item { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 10px; }
.ed-row { display: flex; align-items: center; gap: 8px; }
.ed-label { flex: 1; min-width: 0; min-height: 46px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.ed-btns { display: flex; gap: 4px; flex: none; }
.ed-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; margin-top: 4px; }
.ed-opts .field { margin-top: 6px; }
.ed-opts .field select { min-width: 160px; }
.ed-opts .field.sm input { width: 90px; }
.ed-opts .field.wide { flex: 1 1 100%; }
.chk-l { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 700; margin-right: 8px; }
.ed-abn { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 13px; color: var(--muted); flex: 1 1 100%; }
.ed-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.vers { list-style: none; padding: 0; display: grid; gap: 10px; }
.vers li { display: grid; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }

/* ===== モーダル ===== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 32, 31, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto; }
.modal-box { background: var(--paper); border-radius: 18px; width: 100%; max-width: 560px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.md-head { margin-bottom: 10px; }
.md-head .chip { margin-left: 6px; }
.md-text { margin: 8px 0; }
.md-actions { margin-top: 16px; }
.kv { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 10px; font-size: 14px; background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.kv dt { color: var(--muted); }
.vals { list-style: none; padding: 0; margin-top: 12px; }
.vals li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.vals li.abn { background: #fffaf9; box-shadow: inset 4px 0 0 var(--bad); padding-left: 10px; }
.v-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.v-row small { color: var(--muted); }
.plain { list-style: none; padding: 0; font-size: 14px; display: grid; gap: 4px; }
.hist { margin-top: 12px; font-size: 14px; }
.hist summary { cursor: pointer; font-weight: 700; min-height: 36px; }
.ret-form { margin-top: 12px; }
.stamp { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--bad); color: var(--bad); border-radius: 50%; font-size: 12px; font-weight: 700; transform: rotate(-12deg); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 20px; text-align: center; }

/* ===== 印刷用 ===== */
.print-area { display: none; }
.print-doc { font-size: 11px; color: #000; background: #fff; }
.print-doc.preview { min-width: 760px; padding: 8px; }
.pd-head h1 { font-size: 18px; }
.pd-note { color: #555; }
.pd-sec { margin-top: 14px; break-inside: avoid-page; }
.pd-sec h2 { font-size: 13px; border-left: 4px solid #000; padding-left: 6px; margin-bottom: 4px; }
.pd-sec h2 small { font-weight: 400; margin-left: 8px; }
.pd-tbl { width: 100%; border-collapse: collapse; }
.pd-tbl th, .pd-tbl td { border: 1px solid #777; padding: 2px 4px; text-align: center; vertical-align: middle; }
.pd-tbl th { background: #eee; font-weight: 700; font-size: 10px; }
.pd-tbl th small { font-weight: 400; }
.pd-abn { font-weight: 700; background: #f3d9d6; }
.pd-miss { color: #a00; }
.nw { white-space: nowrap; }
.pd-stamp { display: inline-block; border: 1.5px solid #b00; color: #b00; border-radius: 50%; width: 26px; height: 26px; line-height: 23px; font-size: 9px; }
.pd-notes { margin-top: 4px; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .pd-tbl th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pd-abn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== 狭い画面 ===== */
@media (max-width: 900px) {
  .grid2, .ed-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .app-head { padding: 12px 16px; }
  .brand-logo { font-size: 20px; }
  .view-tabs { width: 100%; }
  .view-tabs button { flex: 1; padding: 6px 8px; font-size: 14px; }
  .reset-btn { width: 100%; }
  .app { padding: 14px 12px 64px; }
  .phone { border-radius: 18px; }
  .phone-body { padding: 14px 12px 20px; }
  .seg, .mnav { top: 48px; }
  .mnav button { flex: 1 1 auto; padding: 6px 10px; font-size: 14px; }
  .task-grid { grid-template-columns: minmax(0, 1fr); }
  .task-edit { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-b { font-size: 24px; }
  .kv { grid-template-columns: 6.5em 1fr; }
  .modal { padding: 16px 8px; }
  .modal-box { padding: 16px; }
  .ed-row { flex-wrap: wrap; }
  .ed-label { flex-basis: calc(100% - 40px); }
  .ed-btns { margin-left: auto; }
  .ed-opts .field select { min-width: 0; }
}
