/* Layout: one-column work app — header, segmented tabs, cards sized for gloved thumbs (48px+ targets) */
:root {
  --bg: #eef0f2; --surface: #ffffff; --ink: #1d2328; --muted: #5d6a74; --line: #d3d9de;
  --steel: #33414c; --amber: #e8a200; --amber-ink: #5b3f00; --amber-weak: #fff3cf;
  --ok: #1f8a4c; --ok-weak: #e1f3e8; --danger: #c2372b; --danger-weak: #fde6e3;
  --font-display: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191d; --surface: #1d242a; --ink: #e7ecef; --muted: #9aa7b0; --line: #2f3a42;
    --steel: #c9d3da; --amber: #f2b416; --amber-ink: #ffe3a0; --amber-weak: #3a2f12;
    --ok: #46c27b; --ok-weak: #163323; --danger: #f06a5d; --danger-weak: #3d1d1a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.65; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: calc(16px + env(safe-area-inset-top, 0px)) 48px; display: grid; gap: 16px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 40px; height: 40px; flex: none; display: block; }
.brand h1, .brand .bn { font-family: "Dela Gothic One", var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: .02em; line-height: 1.15; }
.brand .bn { margin: 0; }
.sub { font-size: 12px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; font-size: 14px; }
.linkbtn { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 6px 8px; font-size: 13px; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 4px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.tab { border: none; background: none; border-radius: 7px; padding: 10px 2px; font-weight: 700; color: var(--muted); min-height: 48px; font-size: 14px; }
.tab[aria-selected="true"] { background: var(--steel); color: var(--bg); }

.panel { display: grid; gap: 14px; }
.lead { color: var(--muted); margin: 0; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mach { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 96px; display: grid; gap: 6px; align-content: start; }
.mach .id { font-family: var(--font-mono); font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.mach .area { font-size: 12px; color: var(--muted); }
.mach.pending { border-color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; width: fit-content; }
.pill.warn { background: var(--amber); color: #2a1d00; }
.pill.ok { background: var(--ok-weak); color: var(--ok); }
.pill.none { background: var(--bg); color: var(--muted); }
.pill.high { background: var(--danger-weak); color: var(--danger); }
.pill.role { background: var(--bg); color: var(--muted); }

.back { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; min-height: 44px; font-weight: 700; }
.mtitle { font-family: var(--font-mono); font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 10px; border-left: 6px solid var(--amber); }
.notice.high { border-left-color: var(--danger); }
.notice.done { border-left-color: var(--ok); }
.notice h3 { font-size: 17px; text-wrap: pretty; }
.notice p { margin: 0; white-space: pre-wrap; }
.caution { background: var(--amber-weak); color: var(--amber-ink); border-radius: 8px; padding: 10px 12px; font-weight: 700; white-space: pre-wrap; }
.meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ack { border: none; border-radius: 10px; min-height: 60px; font-size: 18px; font-weight: 700; background: var(--ok); color: #fff; width: 100%; }
.acked { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 10px; background: var(--ok-weak); color: var(--ok); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; min-height: 46px; }
textarea { resize: vertical; min-height: 120px; }
/* 選択欄：Safariの標準の小さい見た目をやめて、入力欄と同じ大きさにそろえる */
select { -webkit-appearance: none; appearance: none; min-height: 52px; font-size: 16px; padding: 10px 40px 10px 14px; line-height: 1.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%238a97a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=month], input[type=search], textarea { font-size: 16px; min-height: 52px; }
input[type=month] { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.btn { border: none; border-radius: 8px; padding: 12px 18px; min-height: 48px; font-weight: 700; }
.btn.primary { background: var(--steel); color: var(--bg); }
.btn.amber { background: var(--amber); color: #2a1d00; }
.btn.ghost { background: var(--bg); border: 1px solid var(--line); }
.btn.small { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: var(--surface); padding: 10px 16px; min-height: 44px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--steel); color: var(--bg); }
.seg button.hi[aria-pressed="true"] { background: var(--danger); color: #fff; }
.status { font-size: 13px; color: var(--muted); }
.status.err { color: var(--danger); }
.status.good { color: var(--ok); }

.names { display: flex; flex-wrap: wrap; gap: 6px; }
.names span { font-size: 12px; background: var(--ok-weak); color: var(--ok); border-radius: 999px; padding: 2px 10px; }
.count { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.code { font-family: var(--font-mono); font-size: 28px; font-weight: 700; letter-spacing: .12em; }
.list { display: grid; gap: 0; }
.list > div { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > div:last-child { border-bottom: none; }
.list .name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }

.auth { max-width: 440px; margin: 0 auto; width: 100%; }
.center { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

.langpick { position: relative; display: inline-flex; align-items: center; margin: 0; font-weight: 400; }
.langpick .globe { position: absolute; left: 12px; width: 20px; height: 20px; color: var(--steel); pointer-events: none; }
.langpick select { width: auto; min-width: 150px; min-height: 46px; padding: 8px 40px 8px 42px; font-size: 16px; font-weight: 700; background-color: var(--surface); border: 2px solid var(--line); border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.orig { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.orig b { color: var(--ink); }
.toggle { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 4px 0; font-size: 13px; justify-self: start; }

.names-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pickname { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 72px; padding: 12px; font-size: 18px; font-weight: 700; text-align: left; display: grid; gap: 2px; }
.pickname .meta { font-weight: 400; }
#linkText { font-family: var(--font-mono); font-size: 13px; }

.urgent-title { font-size: 16px; color: var(--danger); }
.joininfo { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qr { background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); line-height: 0; flex: none; }
.qr svg { width: 180px; height: 180px; display: block; }
.names .notyet { background: var(--bg); color: var(--muted); }

.loginbox { display: flex; flex-wrap: wrap; gap: 12px 28px; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 16px; }
.scrolllist { max-height: 320px; overflow: auto; }
input[type=search] { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 12px; min-height: 46px; font-size: 16px; }

/* 写真 */
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos:empty { display: none; }
.photos .ph { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); padding: 0; cursor: zoom-in; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph .rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 28px; padding: 0; cursor: pointer; }
.photobtn { display: inline-flex; align-items: center; cursor: pointer; }
.photoview { position: fixed; inset: 0; z-index: 50; background: rgba(10,14,18,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.photoview img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.photoview .btn { background: #fff; }

.photoview .btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.photoview .status { color: #ffb4ab; }

/* 見つからない機械の追加 */
.newmach { margin-top: 8px; padding: 12px; border: 1px dashed var(--amber); background: var(--amber-weak); border-radius: 10px; display: grid; gap: 8px; }
.newmach .row:empty { display: none; }
.newmach .maybe { font-weight: 700; }
.pill.review { background: var(--amber-weak); color: var(--amber-ink); }

/* 過去の連絡 */
.wideseg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.hitem { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; cursor: pointer; font: inherit; color: inherit; }
.hitem.high { border-left: 5px solid var(--danger); }
.hitem .hmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.hitem .hmach { font-family: var(--font-mono); font-weight: 700; color: var(--ink); font-size: 15px; }
.hitem h3 { margin: 0; font-size: 16px; }
.pill.closed { background: var(--bg); color: var(--muted); }
.hdetail { border: 1px solid var(--line); border-top: none; border-radius: 0 0 10px 10px; margin-top: -8px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; }
.hdetail p { margin: 0; white-space: pre-wrap; }

/* 規約ページ */
.legal { display: grid; gap: 10px; }
.legal h2 { font-size: 22px; }
.legal h3 { font-size: 16px; margin-top: 10px; }
.legal p, .legal ul, .legal ol { margin: 0; }
.legal ul, .legal ol { padding-left: 1.4em; display: grid; gap: 4px; }
.legal a { color: var(--steel); }
.legaltable { width: 100%; border-collapse: collapse; font-size: 14px; }
.legaltable th, .legaltable td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.legaltable th { background: var(--bg); }
.draftnote { background: var(--amber-weak); color: var(--amber-ink); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.legaldate { color: var(--muted); font-size: 13px; margin-top: 8px !important; }
.legalnav { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.legalnav a { color: var(--muted); margin: 0 6px; }
@media (max-width: 480px) { .legaltable, .legaltable tr, .legaltable td, .legaltable th { display: block; width: 100%; } .legaltable tr:first-child { display: none; } .legaltable td:first-child { font-weight: 700; background: var(--bg); } }

/* お支払い */
.billbanner { border-radius: 10px; padding: 12px 14px; font-weight: 700; background: var(--amber-weak); color: var(--amber-ink); border: 1px solid var(--amber); }
.billbanner.stop { background: var(--danger-weak); color: var(--danger); border-color: var(--danger); }
.billstate { font-size: 15px; }
.billstate b { font-size: 18px; }

/* 利用期間が終わった工場：作業者は何も見られない。工場長は「お支払い」だけ */
#appView.locked .tabs, #appView.locked #panel-check, #appView.locked #panel-send, #appView.locked #panel-status { display: none !important; }
#appView.locked #panel-admin > .card:not(#billCard) { display: none !important; }

/* 入口の選択 */
.choosebtn { display: grid; gap: 4px; text-align: left; width: 100%; padding: 18px 18px; border-radius: 12px; border: 2px solid var(--steel); background: var(--steel); color: #fff; cursor: pointer; font: inherit; }
.choosebtn b { font-family: var(--font-display); font-size: 20px; }
.choosebtn span { font-size: 13px; opacity: .85; }
.choosebtn.admin { background: var(--surface); color: var(--ink); border-color: var(--line); }
.choosebtn.admin b { font-size: 17px; }

/* ログイン中の人 */
.whobar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 8px 14px; }
.whotext { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.whocap { font-size: 13px; color: var(--muted); }
.whotext b { font-size: 16px; }
.whobtns { display: flex; gap: 8px; }
/* 有料で使っている間は、お支払いは管理タブの一番下に小さく */
#billCard.compact { padding: 12px 16px; gap: 6px; }
#billCard.compact h2 { font-size: 14px !important; color: var(--muted); }
#billCard.compact .billstate { font-size: 14px; }
#billCard.compact .btn { min-height: 38px; padding: 6px 12px; font-size: 13px; }

/* 機械の編集 */
.medit { display: grid; gap: 10px; padding: 12px; margin: 6px 0; border: 2px solid var(--amber); border-radius: 10px; background: var(--amber-weak); }
.medit label { display: grid; gap: 4px; margin: 0; width: 100%; }
.medit input { width: 100%; }

/* 部署 */
.deptbar { display: flex; align-items: center; gap: 10px; }
.deptbar label { margin: 0; white-space: nowrap; }
.deptbar select { flex: 1 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--steel); border-color: var(--steel); color: var(--bg); }
.wrow { display: grid !important; gap: 8px; }
.dtag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* 異動・退職の案内 */
.helpcard summary { cursor: pointer; font-size: 15px; min-height: 28px; }
.helpcard dl { margin: 6px 0 0; display: grid; gap: 10px; }
.helpcard dt { font-weight: 700; }
.helpcard dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* 完了の報告が必要な連絡 */
.taskopt { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 400; }
.checkline input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--steel); }
.pill.task { background: var(--steel); color: var(--bg); }
.pill.mine { background: var(--amber); color: #2a1d00; }
.donebtn { border: 2px solid var(--steel); border-radius: 10px; min-height: 56px; font-size: 17px; font-weight: 700; background: var(--surface); color: var(--ink); width: 100%; cursor: pointer; }
.doneline { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 10px; background: var(--ok-weak); color: var(--ok); font-weight: 700; }
.notice.task-open { border-left-color: var(--steel); }
.subhead { margin: 6px 0 2px; font-size: 16px; color: var(--steel); }

/* 料金の対象人数と、停止中の作業者 */
.wcount { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.stoppedhead { font-size: 13px; font-weight: 700; color: var(--muted); padding: 14px 0 4px; border-bottom: none !important; }
#workerList .stopped .name { color: var(--muted); }

/* スマホ通知のお知らせ */
.pushcard { display: grid; gap: 10px; border-left: 4px solid var(--amber, #e0a100); }


/* はじめの準備（管理画面の一番上） */
.setupguide { border: 2px solid var(--amber); }
.setupguide h2 { font-size: 17px; }
.setupguide ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.setupguide li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.setupguide li .ck { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 2px solid var(--line); background: var(--surface); }
.setupguide li.done .ck { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.setupguide li.done b { color: var(--muted); text-decoration: line-through; }
.setupguide li .meta { display: block; font-size: 12px; }
.setupguide .bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.setupguide .bar span { display: block; height: 100%; background: #1f8a4c; }

/* 使い方ガイド */
.guide h2 { font-size: 20px; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--line); scroll-margin-top: 12px; }
.guide h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.guide .toc { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.guide .toc ol { gap: 2px; }
.guide .stepbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.guide .stepbox b.n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; margin-right: 6px; }
.guide .ui { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
.guide .tip { background: var(--amber-weak); color: var(--ink); border-radius: 10px; padding: 10px 12px; }
.guide dt { font-weight: 700; margin-top: 8px; }
.guide dd { margin: 2px 0 0; }
.guide figure { margin: 4px 0; }
.guide figure img { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; }
.guide figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rolecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rolecards a { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--ink); color: inherit; text-decoration: none; background: var(--surface); }
.rolecards a b { font-size: 17px; }
.rolecards a span { font-size: 13px; color: var(--muted); }
.cmptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmptable th, .cmptable td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.cmptable th { background: var(--bg); }
.cmptable td:first-child { font-weight: 700; }

/* コラム（SEO記事） */
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.column .atitle { font-family: var(--font-display); font-size: 24px; line-height: 1.45; margin: 0; }
.column h2 { font-size: 20px; }
.column h3 { font-size: 17px; }
.column p, .column li { line-height: 1.9; }
.tablewrap { overflow-x: auto; }
/* 縦に並べる箱（grid）の中で、広い表が画面からはみ出さないように */
.card.legal > *, .wrap > * { min-width: 0; }
.tablewrap .cmptable { min-width: 520px; }
.ctabox { border: 2px solid var(--amber); border-radius: 14px; padding: 16px; display: grid; gap: 8px; background: var(--amber-weak); color: var(--ink); margin-top: 12px; }
.ctabox .btn { margin: 4px 6px 0 0; }
.authorbox, .related { border-top: 1px solid var(--line); padding-top: 12px; }
.authorbox p { margin: 4px 0 0; font-size: 14px; }
.related ul { margin: 6px 0 0; }
.colgrid { display: grid; gap: 12px; }
.colcard { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: var(--surface); }
.colcard b { font-size: 16px; line-height: 1.5; }
.colcard span { font-size: 13px; color: var(--muted); line-height: 1.7; }
.colcard small { font-size: 12px; color: var(--muted); }
.cmptable.tpl td { height: 46px; }
#printOnly { display: none; page: tpl; }
@page tpl { size: A4 landscape; margin: 10mm; }
@media print {
  body.printtemplate { background: #fff; color: #111; }
  body.printtemplate > *:not(#printOnly) { display: none !important; }
  body.printtemplate #printOnly { display: block; }
  body.printtemplate #printOnly .tablewrap { overflow: visible; }
  body.printtemplate #printOnly .cmptable { min-width: 0; font-size: 11pt; }
  body.printtemplate #printOnly .cmptable th { background: #eee; }
}
a.btn { text-decoration: none; white-space: nowrap; }
.column .ctabox .btn { display: inline-block; }

/* 連絡の編集・削除 */
.ntools { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.notice.editing { border-left-color: var(--steel); }
.neditor { gap: 12px; }
.neditor label { margin-bottom: 4px; }
.ekind { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; }
.ekind legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.ekind label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; padding: 8px 0; margin: 0; cursor: pointer; }
.ekind input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.meta.edited { font-style: normal; }
.ehist summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.ehist .ehitem { border-top: 1px dashed var(--line); padding: 8px 0; display: grid; gap: 4px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 10px; width: max-content; max-width: min(92vw, 520px); z-index: 60; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); color: #fff; }
.pushres.warn { color: var(--danger); }

/* 作業者の暗証番号 */
.pinview { position: fixed; inset: 0; z-index: 55; background: rgba(10,14,18,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pincard { width: min(100%, 380px); }
.pincard input { font-family: var(--font-mono); font-size: 28px; letter-spacing: .4em; text-align: center; }

/* モニター版 */
.monitornote { border: 2px solid var(--amber); border-radius: 10px; padding: 10px 12px; background: var(--bg); font-size: 14px; line-height: 1.6; }
.monitornote b { font-size: 15px; }
.monitornote.closed { border-color: var(--line); }
#feedbackCard.monitor { border: 2px solid var(--amber); }
.fbkinds { gap: 6px 14px; font-size: 14px; }
.fbkinds label { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin: 0; }
#fbText { width: 100%; min-height: 72px; resize: vertical; font: inherit; }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.danger:disabled { opacity: .45; }
.monend { border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.monend summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.monend[open] summary { margin-bottom: 8px; }
.monend textarea { min-height: 60px; }
/* 管理メニュー（項目を1つずつ開く） */
.secoff { display: none !important; }
.adminmenu { padding: 12px; }
.menugrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 760px) { .menugrid { grid-template-columns: repeat(3, 1fr); } }
.mtile { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.mtile b { font-size: 15px; line-height: 1.3; }
.mtile span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mtile:active { transform: scale(.98); }
.mtile.warn { border-color: var(--amber); }
.mtile.warn span { color: var(--amber-ink, #8a5a00); font-weight: 700; }
.mtile.alert { border-color: var(--danger); }
.mtile.alert span { color: var(--danger); font-weight: 700; }
.mtile.hot { border: 2px solid var(--amber); }
.secbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--bg); }
.secbar b { font-size: 16px; }
/* はじめの準備（1ステップずつ） */
.wizbar { display: grid; gap: 8px; border: 2px solid var(--amber); }
.wizbar b { font-size: 17px; }
.wizprog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.wizprog i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 99px; transition: width .3s; }
.wiznav { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.wiznav #wizBack { margin-right: auto; }
.wiznav #wizNext:disabled { opacity: 1; background: var(--line); color: var(--muted); border-color: var(--line); }
/* 追加の入力欄（いちばんよく使う操作なので、一覧の上に） */
.addbox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
/* スマホでは、上の帯（ロゴ・言語・ログイン中）を細くして、画面の上の方を中身に使う */
@media (max-width: 560px) {
  .top { flex-wrap: nowrap; }
  .brand { flex: 1 1 auto; }
  .brand > div { min-width: 0; }
  .brand h1 { font-size: 20px; }
  .brand .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mark { width: 34px; height: 34px; }
  .langpick { flex: none; }
  .langpick select { min-width: 0; max-width: 132px; min-height: 42px; padding: 6px 28px 6px 36px; font-size: 14px; background-position: right 8px center; }
  .langpick .globe { left: 10px; width: 18px; height: 18px; }
  .whobar { padding: 6px 8px 6px 12px; }
}
