*{box-sizing:border-box}
body{margin:0;background:#F8F7F6;color:#23221F;font:14px/1.6 system-ui,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Noto Sans JP",sans-serif}
a{color:#0B6A8A}
.top{height:40px;background:#1F5F5B;color:#fff;display:flex;align-items:center;gap:12px;padding:0 24px}
.top .brand{color:#fff;font-weight:700;text-decoration:none}
.top .proto{font-size:12px;border:1px solid rgba(255,255,255,.6);padding:0 6px;border-radius:3px}
.top .who{margin-left:auto;font-size:13px}.top .who a{color:#fff}
.tabs{background:#fff;border-bottom:1px solid #D6D3D0;padding:0 24px;display:flex;gap:4px;overflow-x:auto}
.tabs a,.subtabs a{display:inline-block;padding:10px 14px;color:#23221F;text-decoration:none;border-bottom:3px solid transparent;white-space:nowrap}
.tabs a[aria-current],.subtabs a[aria-current]{border-color:#1F5F5B;font-weight:700}
.subtabs{display:flex;gap:2px;border-bottom:1px solid #D6D3D0;margin:8px 0 16px;overflow-x:auto}
main{max-width:1200px;margin:0 auto;padding:16px 24px 64px}
.crumb{font-size:12px;color:#706D65;margin:0 0 8px}.crumb a{color:#706D65}
.ph{display:flex;align-items:center;justify-content:space-between;gap:16px}
h1{font-size:20px;margin:0}h2{font-size:16px;margin:28px 0 8px}
.lead{color:#706D65;margin:4px 0 16px}
.panel{background:#fff;border:1px solid #D6D3D0;border-radius:4px;margin-bottom:16px;overflow-x:auto}
.pad{padding:16px 20px}
table{width:100%;border-collapse:collapse}
th{background:#EDEBE6;text-align:left;font-weight:700;font-size:13px;padding:8px 12px;border-bottom:1px solid #D6D3D0;white-space:nowrap}
td{padding:8px 12px;border-bottom:1px solid #EDEBE6;vertical-align:top}
tr:last-child td{border-bottom:0}
tr.muted td{color:#A09D96}
.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.neg{color:#B8322A}
.mono{font-variant-numeric:tabular-nums;color:#706D65;white-space:nowrap}
.sub{color:#706D65;font-size:12px}
.pre{white-space:pre-wrap}
.note{color:#706D65;font-size:12px;margin:8px 12px}
.empty{background:#fff;border:1px solid #D6D3D0;border-radius:4px;padding:16px 20px;color:#706D65;margin:0 0 16px}
.bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:12px 16px;border-bottom:1px solid #D6D3D0}
.bar .count{margin-left:auto;font-weight:700}
label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:700;margin-bottom:10px}
.bar label{margin:0}
input,select,textarea{font:inherit;font-weight:400;height:32px;padding:4px 8px;border:1px solid #B5B1AB;border-radius:3px;background:#fff;color:#23221F}
textarea{height:auto}
input[type=search]{min-width:240px}
.btn{display:inline-flex;align-items:center;height:32px;padding:0 14px;border:1px solid #B5B1AB;border-radius:3px;background:#fff;color:#23221F;font:inherit;cursor:pointer;text-decoration:none}
.btn.primary{background:#0B6A8A;border-color:#0B6A8A;color:#fff;font-weight:700}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.actions{display:flex;gap:8px;align-items:center;border-top:1px solid #EDEBE6;padding-top:12px;margin-top:8px}
.lbl{display:inline-block;font-size:12px;border:1px solid #B5B1AB;border-radius:3px;padding:0 6px;white-space:nowrap}
.lbl.ok{border-color:#2E7D4F;color:#2E7D4F}.lbl.ng{border-color:#B8322A;color:#B8322A}.lbl.warn{background:#FFF3C4;border-color:#D9B44A}
dl.def{display:grid;grid-template-columns:160px 1fr;margin:0}
dl.def dt{font-weight:700;padding:6px 0;border-bottom:1px solid #EDEBE6;font-size:13px}
dl.def dd{margin:0;padding:6px 0;border-bottom:1px solid #EDEBE6}
.summary{padding:12px 20px}
dl.inline{display:flex;flex-wrap:wrap;gap:8px 40px;margin:0}
dl.inline dt{font-size:12px;color:#706D65}dl.inline dd{margin:0;font-size:18px;font-weight:700}
fieldset{border:0;border-top:1px solid #EDEBE6;padding:12px 0 0;margin:12px 0 0}
legend{font-weight:700;padding-right:8px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:0 16px}
.checks{margin:6px 0 10px}.ck{display:inline-flex;flex-direction:row;align-items:center;gap:4px;font-weight:400;margin:0 12px 0 0}
.ck input{height:auto}
.board{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.col h2{margin-top:0}
.card{background:#fff;border:1px solid #D6D3D0;border-radius:4px;padding:10px 12px;margin-bottom:8px}
.card.late{border-left:4px solid #B8322A}
.card select{margin-top:6px;height:28px}
.chart{width:100%;height:auto;font-size:11px;fill:#706D65}
.key{display:inline-block;width:10px;height:10px;margin:0 4px 0 8px}
.mail{border:1px solid #EDEBE6;padding:12px;max-width:640px}
.mail hr{border:0;border-top:1px solid #EDEBE6}
.flash{background:#FFF3C4;border:1px solid #D9B44A;padding:8px 12px;border-radius:3px}
.flash.ng{background:#FBE9E7;border-color:#B8322A}
.pager{padding:8px 16px;text-align:right}
body.login{display:block}
body.login form{max-width:360px;margin:80px auto}
.brandline{font-weight:700;font-size:16px;margin:0 0 16px}
@media (max-width:720px){main{padding:12px}.board{grid-template-columns:1fr}dl.def{grid-template-columns:110px 1fr}.top{padding:0 12px}}
/* v2 */
.top{background:#fff;color:#23221F;border-bottom:1px solid #D6D3D0;height:48px}
.top .brand{color:#1F3B5C;display:flex;align-items:center;gap:8px}
.top .proto{border-color:#B5B1AB;color:#706D65}
.top .who{display:flex;gap:12px;align-items:center}.top .who a{color:#0B6A8A}
.top .role{font-size:12px;color:#706D65;border:1px solid #D6D3D0;border-radius:3px;padding:0 6px;margin-left:4px}
.loginlogo{display:block;margin:0 auto 4px;width:180px;height:auto}
body.login .brandline{text-align:center}
.sec{font-weight:700;font-size:13px;margin:0 0 6px}
h3{font-size:14px;margin:20px 0 8px}
tr.cur td{background:#F1F6F5}
tr.warnrow td{background:#FFFBEA}
input.num{width:110px;text-align:right}
.btn.danger{border-color:#B8322A;color:#B8322A}
.sticky{position:sticky;bottom:0;background:#F8F7F6;padding:12px 0}
ul.roles{margin:8px 0;padding-left:18px}
.mail.full{max-width:none;border:0;padding:0}
table.items input{width:100%;height:28px}table.items input.s{width:64px}table.items td{padding:4px 6px}
dl.totals{grid-template-columns:120px 160px;margin:12px 0 12px auto;width:280px}
tr.pendrow td{background:#FBE9E7}
.pendnote{font-size:12px;margin-bottom:4px}.pendnote .ck{display:inline-flex;margin-left:8px;font-weight:700}
.warnbox{background:#FFFBEA;border-color:#D9B44A}
form.inline{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.split{display:grid;grid-template-columns:300px 1fr;gap:16px}@media (max-width:900px){.split{grid-template-columns:1fr}}
tr.inrow td{background:#F4F8FB}
.ph .lead{flex:1}
.exform{margin:0 0 8px}
tr.late td:first-child{border-left:3px solid #B8322A}
.chat{position:fixed;right:16px;bottom:16px;z-index:50;font-size:13px}
.chat-toggle{background:#1F3B5C;color:#fff;border:0;border-radius:20px;padding:10px 18px;font:inherit;font-weight:700;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.chat:not(.closed) .chat-toggle{display:none}.chat.closed .chat-panel{display:none}
.chat-panel{width:380px;max-width:calc(100vw - 32px);height:520px;max-height:calc(100vh - 32px);background:#fff;border:1px solid #B5B1AB;border-radius:6px;display:flex;flex-direction:column;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.chat-head{padding:8px 12px;border-bottom:1px solid #EDEBE6;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}.chat-head .sub{flex-basis:100%;order:3}
.chat-x{margin-left:auto;border:0;background:none;font-size:18px;cursor:pointer}
.chat-log{flex:1;overflow-y:auto;padding:8px 12px;background:#F8F7F6}
.chat-msg{margin:6px 0;padding:6px 10px;border-radius:6px;max-width:88%}.chat-msg.me{background:#E3EEF5;margin-left:auto}.chat-msg.miku{background:#fff;border:1px solid #EDEBE6}
.chat-msg img{max-width:100%;max-height:160px;display:block;margin-top:4px}.chat-meta,.chat-st{font-size:11px;color:#706D65}
.chat-form{border-top:1px solid #EDEBE6;padding:8px}.chat-form textarea{width:100%;height:auto}
.chat-row{display:flex;gap:8px;align-items:center;margin-top:6px}.chat-row .btn{margin-left:auto}
.chat-file{flex-direction:row;font-weight:400;margin:0;cursor:pointer;color:#0B6A8A;text-decoration:underline}.chat-file input{display:none}
/* ---------- スマホ（2026-12-04） ---------- */
.hamb{display:none;background:none;border:0;font-size:22px;line-height:1;padding:0 8px 0 0;cursor:pointer;color:#1F3B5C;min-width:44px;min-height:44px}
@media (max-width:720px){
  body{font-size:15px;-webkit-text-size-adjust:100%}
  .top{height:auto;min-height:52px;padding:0 8px 0 4px;flex-wrap:wrap;gap:4px;padding-top:env(safe-area-inset-top)}
  .hamb{display:inline-flex;align-items:center;justify-content:center}
  .top .brand{font-size:14px}.top .brand img{width:24px;height:24px}
  .top .proto{display:none}
  .top .who{width:100%;justify-content:flex-end;font-size:12px;gap:10px;padding-bottom:6px}
  .top .who a{display:inline-flex;align-items:center;min-height:36px}
  nav.tabs{display:none;flex-direction:column;padding:0;overflow:visible}
  nav.tabs.open{display:flex}
  nav.tabs a{border-bottom:1px solid #EDEBE6;border-left:4px solid transparent;padding:12px 16px;min-height:44px}
  nav.tabs a[aria-current]{border-left-color:#1F5F5B;border-bottom-color:#EDEBE6;background:#F1F6F5}
  main{padding:12px 12px 96px}
  h1{font-size:19px}.ph{flex-wrap:wrap}
  input,select,textarea{font-size:16px;min-height:44px}
  input[type=checkbox],input[type=radio]{min-height:0;width:22px;height:22px}
  input[type=search]{min-width:0;width:100%}
  .btn{min-height:44px;padding:0 16px}
  .bar{flex-direction:column;align-items:stretch}.bar label{width:100%}.bar .count{margin-left:0}
  .grid{grid-template-columns:1fr}
  .subtabs a{padding:12px 12px;min-height:44px}
  .actions{flex-wrap:wrap}
  .ck{min-height:44px}
  dl.inline{gap:8px 20px}dl.inline dd{font-size:17px}
  .split{grid-template-columns:1fr}
  a{word-break:break-word}
  /* 表 → カード */
  .panel{overflow-x:visible}
  table.cardable,table.cardable tbody,table.cardable tr,table.cardable td{display:block;width:100%}
  table.cardable thead{display:none}
  table.cardable tr{border-bottom:1px solid #D6D3D0;padding:8px 12px}
  table.cardable tr:last-child{border-bottom:0}
  table.cardable td{border:0;padding:2px 0;text-align:left;white-space:normal}
  table.cardable td.n{text-align:left}
  table.cardable td[data-label]:not(:first-child)::before{content:attr(data-label)"：";color:#706D65;font-size:12px;margin-right:4px}
  table.cardable td:first-child{font-size:15px;padding-bottom:4px}
  table.cardable td.empty-cell{display:none}
  table.cardable td form.inline{margin-top:4px}
  table.items td input{width:100%}
  .board{grid-template-columns:1fr}
  /* チャットは全画面 */
  .chat{right:12px;bottom:12px}
  .chat:not(.closed){inset:0;right:0;bottom:0}
  .chat-panel{width:100vw;max-width:none;height:100dvh;max-height:none;border-radius:0;border:0;padding-bottom:env(safe-area-inset-bottom)}
  .chat-x{font-size:26px;min-width:44px;min-height:44px}
  .chat-toggle{min-height:48px}
  body.login form{margin:24px 12px}
}
@media (max-width:720px){ main textarea,main input,main select{min-width:0!important;max-width:100%} form.inline input{width:100%!important} }
@media (max-width:720px){ main select{width:100%} }
