/* ==========================================================================
   pjutaku_mgmt 共通スタイル（流用元: kyouwadx_app rev30 の app.css）
   レスポンシブ前提。幅375px（iPhone基準）で横スクロールなしに操作できること。
   タップ対象は最小44px。表は横スクロール枠に入れる。
   ========================================================================== */

:root{
  --bg:#f4f6f8; --panel:#fff; --ink:#1c2733; --sub:#5b6b7c; --line:#dbe2ea;
  --accent:#1f6feb; --accent-d:#1656bb; --ok:#127a3d; --ok-bg:#e6f4ec;
  --warn:#9a6400; --warn-bg:#fff5e0; --bad:#b3261e; --bad-bg:#fdecea;
  --gray:#8b98a5; --gray-bg:#eef1f4;
  --radius:10px; --tap:44px;
  --shadow:0 1px 2px rgba(16,32,48,.06), 0 2px 8px rgba(16,32,48,.05);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:15px/1.65 "Segoe UI","Yu Gothic UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  -webkit-text-size-adjust:100%;
  overflow-x:hidden;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{line-height:1.35; margin:0 0 .5em}
h1{font-size:20px}
h2{font-size:17px; margin-top:0}
h3{font-size:15px}
p{margin:.4em 0}

/* ---------- ヘッダー・ナビ ---------- */
.hd{
  position:sticky; top:0; z-index:50;
  background:#16283c; color:#fff; box-shadow:var(--shadow);
}
.hd-top{
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; min-height:var(--tap);
}
.hd-title{font-weight:700; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hd-title a{color:#fff}
.hd-title a:hover{text-decoration:none}
.hd-me{margin-left:auto; display:flex; align-items:center; gap:8px; font-size:12.5px; white-space:nowrap}
.hd-me .nm{font-weight:600}
.hd-me .ttl{color:#a9c0d8}
.hd-out{
  background:rgba(255,255,255,.14); color:#fff; border:0; border-radius:6px;
  padding:7px 10px; font-size:12.5px; cursor:pointer; min-height:34px;
}
.hd-out:hover{background:rgba(255,255,255,.24)}
.nav{
  display:flex; gap:2px; overflow-x:auto; padding:0 6px 6px;
  scrollbar-width:thin; -webkit-overflow-scrolling:touch;
}
.nav a{
  color:#c9d8e6; padding:9px 11px; border-radius:7px; white-space:nowrap;
  font-size:13.5px; min-height:38px; display:flex; align-items:center;
}
.nav a:hover{background:rgba(255,255,255,.10); text-decoration:none; color:#fff}
.nav a.on{background:#2f5f8f; color:#fff; font-weight:600}

/* ---------- レイアウト ---------- */
/* width:100% を明示しないと、チャット画面（body が flex）で中身の最小幅に
   引っ張られて版面が広がることがある */
.wrap{width:100%; max-width:1180px; margin:0 auto; padding:14px 12px 60px}
.card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:14px; margin:0 0 14px; box-shadow:var(--shadow);
}
.card>h2:first-child,.card>h1:first-child{margin-top:0}
.row{display:flex; flex-wrap:wrap; gap:10px}
.row>*{min-width:0}
.grid2{display:grid; grid-template-columns:1fr; gap:14px}
@media(min-width:820px){ .grid2{grid-template-columns:1fr 1fr} }
.spread{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.muted{color:var(--sub); font-size:13px}
.small{font-size:12.5px}
.right{text-align:right}
.nowrap{white-space:nowrap}
.pre{white-space:pre-wrap; word-break:break-word}
.hide{display:none !important}

/* ---------- ボタン ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:var(--tap); padding:10px 15px; border-radius:8px;
  border:1px solid var(--line); background:#fff; color:var(--ink);
  font-size:14px; font-family:inherit; cursor:pointer; text-decoration:none;
}
.btn:hover{background:#f2f5f8; text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.5; cursor:not-allowed}
.btn.pri{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}
.btn.pri:hover{background:var(--accent-d)}
.btn.danger{background:#fff; border-color:#e3b4b0; color:var(--bad)}
.btn.danger:hover{background:var(--bad-bg)}
.btn.sm{min-height:34px; padding:6px 10px; font-size:13px; border-radius:7px}
.btn.wide{width:100%}

/* ---------- フォーム ---------- */
label{display:block; font-size:13px; color:var(--sub); margin:0 0 3px; font-weight:600}
input[type=text],input[type=date],input[type=email],input[type=number],input[type=search],
select,textarea{
  width:100%; padding:10px 11px; min-height:var(--tap);
  border:1px solid var(--line); border-radius:8px; background:#fff;
  font:inherit; font-size:15px; color:var(--ink);
}
textarea{min-height:96px; resize:vertical; line-height:1.6}
input:focus,select:focus,textarea:focus{
  outline:2px solid rgba(31,111,235,.35); outline-offset:-1px; border-color:var(--accent);
}
.field{margin:0 0 11px}
.fields{display:grid; grid-template-columns:1fr; gap:0 12px}
@media(min-width:640px){ .fields.c2{grid-template-columns:1fr 1fr} .fields.c3{grid-template-columns:1fr 1fr 1fr} }
.checks{display:flex; flex-wrap:wrap; gap:6px}
.checks label{
  display:flex; align-items:center; gap:6px; margin:0; font-weight:400; color:var(--ink);
  border:1px solid var(--line); border-radius:20px; padding:8px 12px; min-height:38px;
  background:#fff; cursor:pointer; font-size:13.5px;
}
.checks input{width:auto; min-height:auto; margin:0}
.checks label:has(input:checked){background:#e8f0fe; border-color:var(--accent); font-weight:600}
.filters{display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end}
.filters .field{margin:0; flex:1 1 150px; min-width:130px}
.filters .field.sm{flex:0 1 110px}

/* ---------- 表 ---------- */
.tablewrap{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -14px; padding:0 14px}
table{border-collapse:collapse; width:100%; font-size:13.5px}
th,td{border-bottom:1px solid var(--line); padding:9px 8px; text-align:left; vertical-align:top}
th{background:#f7f9fb; color:var(--sub); font-size:12.5px; font-weight:700; white-space:nowrap;
   position:sticky; top:0; z-index:1}
tbody tr:hover{background:#f8fbff}
tr.clickable{cursor:pointer}
td.num,th.num{text-align:right; white-space:nowrap}
.emptynote{padding:22px 8px; text-align:center; color:var(--sub)}

/* ---------- バッジ・状態 ---------- */
.badge{
  display:inline-block; padding:2px 8px; border-radius:11px; font-size:11.5px;
  font-weight:700; white-space:nowrap; line-height:1.7;
}
.b-未着手{background:var(--warn-bg); color:var(--warn)}
.b-対応中{background:#e6f0fd; color:var(--accent-d)}
.b-提出済み{background:#efe7fb; color:#6b3fb0}
.b-完了{background:var(--ok-bg); color:var(--ok)}
/* フェーズの状態 */
.b-進行中{background:#e6f0fd; color:var(--accent-d)}
.b-未確定{background:var(--warn-bg); color:var(--warn)}
.b-確定済{background:var(--ok-bg); color:var(--ok)}
.b-取り下げ{background:var(--gray-bg); color:var(--sub)}
.b-有効{background:var(--ok-bg); color:var(--ok)}
.b-取消{background:var(--gray-bg); color:var(--sub)}
/* 状態の言い添え。議事録の公開/非公開のように、取り違えが事故になるものに使う */
.note{background:var(--gray-bg); border-left:3px solid var(--line); border-radius:0 7px 7px 0;
  padding:9px 12px; font-size:12.5px; color:var(--sub)}
.note.ok{background:var(--ok-bg); border-left-color:var(--ok); color:var(--ok)}

/* 議事録の公開状態。既定は「運営内部のみ」なので、公開のほうを目立たせる */
.b-公開中{background:var(--ok-bg); color:var(--ok)}
.b-内部のみ{background:var(--gray-bg); color:var(--sub)}
.chkline{display:flex; align-items:flex-start; gap:7px; font-size:13px; margin-top:10px}
.chkline input{margin-top:3px; flex-shrink:0}
.b-over{background:var(--bad-bg); color:var(--bad)}
.b-soon{background:var(--warn-bg); color:var(--warn)}
.b-dev{background:#fde7a9; color:#7a5200}
tr.over,li.over{background:#fdf2f1}
.overtext{color:var(--bad); font-weight:700}
.struck{text-decoration:line-through; color:var(--sub)}
.lv{color:#c98a00; letter-spacing:-1px; white-space:nowrap}

/* ---------- 数字タイル ---------- */
.tiles{display:grid; grid-template-columns:repeat(2,1fr); gap:10px}
@media(min-width:700px){ .tiles{grid-template-columns:repeat(4,1fr)} }
.tile{
  display:block; background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:12px; min-height:var(--tap); color:inherit;
}
.tile:hover{background:#f6f9ff; border-color:#bcd3f5; text-decoration:none}
.tile .k{font-size:12.5px; color:var(--sub); font-weight:600}
.tile .v{font-size:26px; font-weight:700; line-height:1.25}
.tile .u{font-size:12.5px; color:var(--sub); font-weight:400}
.tile.bad .v{color:var(--bad)}
.tile.warn .v{color:var(--warn)}

/* 進捗の帯グラフ */
.bar{display:flex; height:16px; border-radius:8px; overflow:hidden; background:var(--gray-bg); margin:8px 0 6px}
.bar i{display:block; height:100%}
.bar .s-完了{background:#2f9e5e}
.bar .s-進行中{background:#4a8fe0}
.bar .s-未着手{background:#e8b23a}
.legend{display:flex; flex-wrap:wrap; gap:4px}
.legend a{
  display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--ink);
  border:1px solid var(--line); border-radius:16px; padding:5px 10px; min-height:32px; background:#fff;
}
.legend a:hover{background:#f2f5f8; text-decoration:none}
.legend i{width:9px; height:9px; border-radius:50%; display:inline-block}

/* ---------- タスクへのリンク ---------- */
/* No＋内容のブロック。押せる範囲を広くとる */
.dref{
  display:flex; align-items:flex-start; gap:9px; min-height:var(--tap);
  padding:7px 9px; margin:-7px -9px; border-radius:9px;
  color:inherit; text-decoration:none;
}
.dref:hover{background:#eef4ff; text-decoration:none}
.dref:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.dref .no{
  flex:0 0 auto; font-weight:700; color:var(--accent-d); font-size:13px;
  background:#e6f0fd; border-radius:11px; padding:2px 9px; white-space:nowrap; line-height:1.7;
}
.dref .bd{flex:1 1 auto; min-width:0; font-size:13.5px; line-height:1.5}
.dref:hover .bd{text-decoration:underline}
.dref .sub{display:block; font-size:12px; color:var(--sub); margin-top:2px;
  text-decoration:none}
.dref:hover .sub{text-decoration:none}

/* 小さいバッジ型（本文の中に置く用）。押せる高さは確保する */
.dref-in{
  display:inline-flex; align-items:center; min-height:32px; padding:2px 10px;
  background:#e6f0fd; color:var(--accent-d); border-radius:11px;
  font-size:12.5px; font-weight:700; white-space:nowrap;
}
.dref-in:hover{background:#d6e6fc; text-decoration:none}

/* 行全体をタップで移動できる表 */
tr.rowlink{cursor:pointer}
tr.rowlink:hover{background:#eef4ff}
tr.rowlink:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
tr.rowlink td{min-height:var(--tap)}
.rowhint{font-size:11.5px; color:var(--gray); white-space:nowrap}
tr.rowlink:hover .rowhint{color:var(--accent)}

/* ---------- タスクの経過履歴（タイムライン） ---------- */
.tl{position:relative; margin:6px 0 0; padding-left:26px}
.tl::before{content:''; position:absolute; left:8px; top:6px; bottom:6px; width:2px;
  background:var(--line)}
.tli{position:relative; margin:0 0 14px}
.tli::before{content:''; position:absolute; left:-22px; top:7px; width:11px; height:11px;
  border-radius:50%; background:#fff; border:2px solid var(--gray)}
.tli.c-comment::before{border-color:var(--accent); background:var(--accent)}
.tli.c-post::before{border-color:#2f9e5e; background:#2f9e5e}
.tli.c-photo::before{border-color:#c98a00; background:#c98a00}
.tli .when{font-size:12px; color:var(--gray)}
.tli .who{font-size:13px; font-weight:700; color:var(--ink)}
.tli .who .ttl{font-weight:400; color:var(--sub); font-size:12px}
.tli .bd{background:#fff; border:1px solid var(--line); border-radius:9px; padding:9px 11px;
  margin-top:4px; white-space:pre-wrap; word-break:break-word}
.tli.c-log .bd{background:var(--gray-bg); border-color:#e3e8ed; color:var(--sub);
  font-size:12.5px; padding:6px 10px}
.tli.c-post .bd{background:#f4fbf6; border-color:#cdeadb}
.tli .src{font-size:11.5px; color:var(--sub); margin-bottom:3px}
.tli .src a{font-weight:700}
.commentbox{background:#f7f9fb; border:1px solid var(--line); border-radius:10px;
  padding:12px; margin-top:12px}

/* ---------- 提出物のサムネイル列 ---------- */
.thumbrow{display:flex; gap:6px; flex-wrap:wrap}
.thumbrow a{display:block}
.thumbrow img{width:78px; height:78px; object-fit:cover; border-radius:7px; border:1px solid var(--line)}
.thumbrow .noimg{
  width:78px; height:78px; border-radius:7px; border:1px solid var(--line); background:var(--gray-bg);
  display:flex; align-items:center; justify-content:center; font-size:10.5px; color:var(--sub);
  text-align:center; padding:4px;
}

/* ---------- モーダル ---------- */
.modal{
  position:fixed; inset:0; background:rgba(14,24,35,.5); z-index:100;
  display:flex; align-items:flex-end; justify-content:center; padding:0;
}
@media(min-width:640px){ .modal{align-items:center; padding:20px} }
.modal .box{
  background:#fff; border-radius:14px 14px 0 0; width:100%; max-width:620px;
  max-height:92dvh; overflow-y:auto; padding:16px; box-shadow:0 8px 40px rgba(0,0,0,.3);
}
@media(min-width:640px){ .modal .box{border-radius:14px} }
.modal .box h2{margin-top:0}
.modal .acts{display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:14px}
.modal .acts .btn{flex:1 1 auto}
@media(min-width:640px){ .modal .acts .btn{flex:0 0 auto} }

/* ---------- 通知・エラー ---------- */
/* トーストは画面下端に重なるため、出ている間もその裏のボタンを押せるようにする。
   タップを受けるのは「×」だけ（rev29）。本文は pointer-events:none で背面へ透過。 */
#toasts{position:fixed; left:0; right:0; bottom:0; z-index:200; padding:10px; pointer-events:none}
.toast{
  max-width:620px; margin:0 auto 8px; padding:11px 44px 11px 14px; border-radius:9px;
  font-size:14px; box-shadow:0 4px 20px rgba(0,0,0,.2); word-break:break-word;
  pointer-events:none; position:relative;
}
/* 「×」だけが反応する。指で押しやすい大きさ（44px）を確保する */
.toast .tx{
  position:absolute; top:0; right:0; width:44px; height:100%; min-height:44px;
  display:flex; align-items:center; justify-content:center;
  border:none; background:none; color:inherit; opacity:.65;
  font:inherit; font-size:19px; line-height:1; cursor:pointer;
  pointer-events:auto; border-radius:0 9px 9px 0;
}
.toast .tx:hover{opacity:1; background:rgba(0,0,0,.06)}
.toast.err{background:#fdecea; color:#8a1c15; border:1px solid #f0b7b2}
.toast.ok{background:#e6f4ec; color:#0f5c30; border:1px solid #a8d8bd}
.toast.info{background:#e8f0fe; color:#1a4a9c; border:1px solid #b7cdf3}
#updbar{
  position:fixed; left:0; right:0; top:0; z-index:300; background:#7a5200; color:#fff;
  padding:11px 14px; font-size:14px; text-align:center;
}
#updbar button{margin-left:10px; min-height:32px; padding:5px 12px; border-radius:6px;
  border:0; background:#fff; color:#7a5200; font-weight:700; cursor:pointer}
.devbar{background:#fff4d2; border:1px solid #e8cf8a; color:#6b4a00; border-radius:9px;
  padding:9px 12px; font-size:13px; margin:0 0 12px}
.errbox{background:var(--bad-bg); border:1px solid #f0b7b2; color:#8a1c15;
  border-radius:9px; padding:11px 13px; margin:0 0 12px; font-size:14px}
.loading{padding:22px; text-align:center; color:var(--sub)}

/* ---------- ログイン ---------- */
.loginwrap{max-width:420px; margin:0 auto; padding:34px 16px}
.loginwrap .card{padding:20px}
.step{display:none}
.step.on{display:block}

/* ---------- 印刷・細部 ---------- */
.linkrow{display:flex; flex-wrap:wrap; gap:6px}
.linkrow a{font-size:12.5px; background:var(--gray-bg); border-radius:7px; padding:5px 9px;
  color:var(--sub); min-height:32px; display:inline-flex; align-items:center}
.linkrow a:hover{background:#e2e7ec; text-decoration:none}
ul.plain{list-style:none; margin:0; padding:0}
ul.plain li{padding:9px 0; border-bottom:1px solid var(--line)}
ul.plain li:last-child{border-bottom:0}
.kv{display:grid; grid-template-columns:auto 1fr; gap:4px 12px; font-size:13.5px}
.kv dt{color:var(--sub); font-weight:600; white-space:nowrap}
.kv dd{margin:0}
hr{border:0; border-top:1px solid var(--line); margin:14px 0}
code{background:var(--gray-bg); padding:1px 5px; border-radius:4px; font-size:13px}

/* ---------- 概況（ゴール・今の焦点・フェーズ） ---------- */
.ov .lbl{
  display:inline-block; font-size:11.5px; font-weight:700; color:var(--sub);
  background:var(--gray-bg); border-radius:4px; padding:2px 7px; margin-right:8px;
}
.ov-goal{margin-top:12px}
.ov-goal .val{font-size:17px; font-weight:700}
.ov-focus{
  margin-top:10px; padding:10px 12px; border-radius:8px;
  background:#fffbef; border:1px solid #f0e0b6;
}
.ov-focus .val{font-weight:700}
.ov-focus .small{display:block; margin-top:4px}
.ov-phase{margin-top:14px}
.phases{list-style:none; margin:6px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:6px}
.phases .ph{
  display:inline-flex; align-items:center; gap:6px; font-size:12.5px;
  border:1px solid var(--line); border-radius:16px; padding:5px 11px; background:#fff;
}
.phases .dot{width:9px; height:9px; border-radius:50%; background:#d3dae1; flex:none}
.phases .st{font-size:11px; color:var(--sub)}
.phases .done .dot{background:#2f9e5e}
.phases .done .nm{color:var(--sub)}
.phases .now{border-color:#8bb6ec; background:#f2f7ff}
.phases .now .dot{background:#4a8fe0}
.phases .now .nm{font-weight:700}
@media (max-width:420px){
  .phases{flex-direction:column; align-items:stretch}
  .phases .ph{justify-content:space-between}
}

/* ==========================================================================
   タスク実行ページ（shinro_app の mission.html から移植）
   配色は kyouwadx の変数体系（--accent / --ok / --warn / --bad …）に読み替えてある。
   ========================================================================== */
.stbtn{font:inherit;font-size:13px;padding:5px 14px;border:1px solid var(--line);background:#fff;color:var(--sub);border-radius:16px;cursor:pointer;margin-right:6px}
.stbtn:hover:not(:disabled){border-color:var(--accent);color:var(--accent-d)}
.stbtn:disabled{opacity:.55;cursor:not-allowed}
.stbtn.on{border-color:transparent;font-weight:600}
.stbtn.on[data-s="未着手"]{background:var(--gray-bg);color:var(--gray)}
.stbtn.on[data-s="対応中"]{background:var(--warn-bg);color:var(--warn)}
.stbtn.on[data-s="提出済み"]{background:#efe7fb;color:#6b3fb0}
.stbtn.on[data-s="完了"]{background:var(--ok-bg);color:var(--ok)}
.stbtn.on[data-s="取り下げ"]{background:var(--gray-bg);color:var(--sub)}
/* 物件詳細: 明細の右側が空いていたので間取り図を置いた（2026-08-12）。
   狭い画面では縦に積む。図は拡大せず、枠に収まる範囲で出す */
.headwrap{display:flex;gap:18px;align-items:flex-start}
.headwrap .head{flex:1;min-width:0}
.madori{flex:0 0 190px;text-align:center}
.madori img{width:100%;max-width:190px;height:auto;border:1px solid var(--line);
  border-radius:8px;background:#fff}
.madori .cap{margin-top:5px;font-size:11px;color:var(--gray)}
@media (max-width:640px){
  .headwrap{flex-direction:column}
  .madori{flex:none;width:100%;max-width:220px;align-self:center}
}
/* 一覧のサムネイル。カード化した狭い画面でも潰れないよう幅を決め打ちにする */
.thumbcell{width:76px}
.thumb{width:66px;height:auto;border:1px solid var(--line);border-radius:5px;
  background:#fff;display:block}

.head{display:grid;grid-template-columns:110px 1fr;gap:8px 14px;align-items:center;font-size:13px}
.head .k{color:var(--sub);font-size:12px}
.steps{counter-reset:st;padding:0;margin:0;list-style:none}
.steps li{counter-increment:st;position:relative;padding:8px 0 8px 34px;border-bottom:1px dotted var(--line);font-size:13px}
.steps li:last-child{border-bottom:none}
.steps li::before{content:counter(st);position:absolute;left:0;top:7px;width:22px;height:22px;border-radius:50%;
  background:var(--accent);color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center}
.chk li{display:flex;align-items:flex-start;gap:9px;padding:8px 0;border-bottom:1px dotted var(--line);font-size:13px}
.chk li:last-child{border-bottom:none}
.chk input{width:17px;height:17px;margin:1px 0 0;flex:none}
.chk .who{font-size:11px;color:var(--sub);margin-left:auto;white-space:nowrap}
.chk li.done span.t{color:var(--sub);text-decoration:line-through}
/* 操作の結果は押したボタンのすぐ下に出す。ページ上部のflashだけだと、
   下のフォームを操作している人の視界に入らない。 */
.actmsg{margin-top:10px;padding:10px 14px;border-radius:10px;font-size:13px;font-weight:600;line-height:1.6}
.actmsg.ok{background:var(--ok-bg);color:var(--ok);border:1px solid #b6dfc6}
.actmsg.ng{background:#fdecec;color:var(--bad);border:1px solid #f0bcbc}
.actmsg .sub{display:block;font-weight:400;font-size:12px;margin-top:3px;opacity:.85}
.act{border:2px solid var(--accent);border-radius:12px;padding:18px 20px;margin-bottom:14px;background:var(--panel)}
.act h3{margin:0 0 10px;font-size:15px;color:var(--accent-d);display:flex;align-items:center;gap:8px}
.act h3 .ic{font-size:19px}
.act .btn{font-size:15px;padding:11px 22px}
.act input[type=file]{font:inherit;font-size:14px;padding:9px;border:2px dashed var(--accent);
  border-radius:10px;background:#f8fafc;cursor:pointer;max-width:100%}
.act .how{background:#fff8e6;border:1px solid #e7d493;border-radius:8px;padding:9px 12px;
  font-size:12px;color:#6b4a00;margin-bottom:10px}
.doguide{background:var(--ok-bg);border:1px solid #b9dcc6;border-radius:12px;padding:12px 16px;
  font-size:13px;color:var(--ok);font-weight:600;margin-bottom:12px}
.waitbar{background:var(--bad-bg);border:1px solid #f0bcc8;border-radius:12px;padding:12px 16px;
  font-size:13px;color:var(--bad);margin-bottom:14px}
.remand{background:var(--warn-bg);border:2px solid #e0c56a;border-radius:12px;padding:14px 18px;
  font-size:13px;color:#6b4a00;margin-bottom:14px}
/* 確認の画面であることの目印。見出しと一覧の動線で同じ緑を使う */
.vflag{display:inline-block;background:var(--ok);color:#fff;font-size:13px;font-weight:600;
  border-radius:8px;padding:2px 10px;margin-right:10px;vertical-align:middle}
/* 提出済みの元タスク側から、確認画面へ迷わず行けるようにする */
.waitverify{border:2px solid var(--ok);background:#f6fbf8;border-radius:12px;padding:14px 18px;
  margin-bottom:14px;font-size:13px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.waitverify .btn{white-space:nowrap}
.vbox{border:2px solid var(--ok);border-radius:12px;padding:18px 20px;margin-bottom:14px;background:#f6fbf8}
.vbox h3{margin:0 0 10px;font-size:15px;color:var(--ok)}
.vbox .sub{border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px 14px;margin-bottom:12px}
.vbox textarea{width:100%;min-height:70px;font:inherit;font-size:13px;padding:8px 10px;
  border:1px solid var(--line);border-radius:8px}
.vbox .btn{font-size:15px;padding:11px 22px}
.rel{font-size:12px;margin-top:4px}
.rel a{color:var(--accent);text-decoration:none;border-bottom:1px dotted var(--accent)}
/* 終わった相手は、まだ終わっていない相手より目立たせない */
.rel a.donelink{color:var(--sub);border-bottom-color:var(--line)}
.donefold{display:inline-block;vertical-align:top}
.donefold summary{cursor:pointer;color:var(--sub);font-size:11px;list-style:none}
.donefold summary::-webkit-details-marker{display:none}
.donefold summary::before{content:'▸ ';font-size:10px}
.donefold[open] summary::before{content:'▾ '}
.donefold summary:hover{color:var(--accent)}
.act textarea{width:100%;min-height:90px;font:inherit;font-size:13px;padding:8px 10px;border:1px solid var(--line);border-radius:8px}
.act .q{background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:8px 11px;font-size:12px;margin-bottom:8px}
.ans{border-left:3px solid var(--accent);padding:8px 0 8px 12px;margin-top:10px;font-size:13px}
/* タスクのやり取り（コメント）。
   経過履歴と並ぶので、ひと目で別物と分かるよう吹き出し寄りの見た目にしている。 */
.talkitem{border:1px solid var(--line);border-radius:10px;padding:10px 13px;margin-bottom:9px;
  background:#fff;font-size:13px}
.talkitem.mine{background:#f2f8ff;border-color:#cfe2f7}
/* `.hd` はサイト共通ヘッダ（濃紺・sticky）にも使われているクラス名なので、
   発言の見出しでは打ち消す。打ち消さないと発言が濃紺の帯になる
   （やり取りが0件の間は表に出ていなかった。2026-08-12 に実描画で発見） */
.talkitem .hd{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:5px;font-size:12px;
  position:static;z-index:auto;background:none;color:inherit;box-shadow:none}
.talkitem .hd b{font-size:13px}
.talkitem .hd .org{color:#8b98a5;font-size:11.5px}
.talkitem .hd .when{color:var(--gray);font-size:11.5px}
.talkitem .hd .to{background:var(--accent);color:#fff;border-radius:10px;padding:1px 9px;font-size:11px}
/* 返信引用（B06）。引用は押すと元の発言へ飛ぶので、リンクだと分かる見た目にする */
.talkitem .quote{display:block;border-left:3px solid var(--accent);background:#f7f9fb;
  border-radius:0 6px 6px 0;padding:5px 9px;margin:0 0 6px;font-size:12px;
  color:var(--gray);text-decoration:none}
.talkitem .quote b{color:var(--ink);font-weight:600}
.talkitem .quote:hover{background:#eef3f8}
.talkitem .acts{margin-top:6px;font-size:12px}
.talkitem .acts a{color:var(--accent);text-decoration:none}
.talkitem .acts a:hover{text-decoration:underline}
/* リアクション。押した本人のものは枠で分かるようにする（誰が押したかは title で出す） */
.talkitem .rx{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.rxbtn{font:inherit;font-size:11.5px;line-height:1.4;cursor:pointer;
  border:1px solid var(--line);background:#fff;color:var(--gray);
  border-radius:999px;padding:2px 10px}
.rxbtn:hover{border-color:var(--accent)}
.rxbtn.on{background:#eaf3fd;border-color:var(--accent);color:var(--ink);font-weight:600}
.rxbtn b{font-weight:700}
.replybar{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:12px;
  background:#f7f9fb;border-left:3px solid var(--accent);border-radius:0 6px 6px 0;
  padding:6px 10px;color:var(--gray)}
.replybar .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.replybar button{font:inherit;font-size:11.5px;cursor:pointer;border:1px solid var(--line);
  background:#fff;border-radius:6px;padding:2px 9px;color:var(--gray)}

.talkform{margin-top:14px;border-top:1px dashed var(--line);padding-top:14px}
.talkform textarea{width:100%;min-height:80px;font:inherit;font-size:13px;padding:8px 10px;
  border:1px solid var(--line);border-radius:8px}
.talkform .towrap{margin-top:9px}
.talkform .tolist{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0}
.talkform .tochk{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;
  border:1px solid var(--line);border-radius:16px;padding:5px 12px;background:#fff;cursor:pointer}
.talkform .tochk:has(input:checked){border-color:var(--accent);background:#eaf3fd;color:var(--accent-d)}
.talkform .tochk input{width:15px;height:15px;margin:0}

/* ==========================================================================
   画像のサムネイルとライトボックス
   原本は変換しない。一覧に出すのはブラウザ側で作った縮小画像か、
   原本を CSS で縮めたもの（object-fit: cover）。
   ========================================================================== */
.thumb{
  display:inline-flex; align-items:center; justify-content:center;
  width:56px; height:56px; padding:0; flex:none;
  border:1px solid var(--line); border-radius:8px; background:#fff;
  overflow:hidden; cursor:zoom-in;
}
.thumb:hover{border-color:var(--accent)}
.thumb img{width:100%; height:100%; object-fit:cover; display:block}
.thumb.noimg{
  flex-direction:column; gap:1px; cursor:pointer;
  background:var(--gray-bg); color:var(--sub); border-style:dashed;
}
.thumb.noimg .ic{font-size:17px; line-height:1}
.thumb.noimg .tx{font-size:8.5px; line-height:1.15; text-align:center}

/* 一覧の「画像」列。行が縦に伸びすぎないようにする */
td.thumbcell{width:70px; padding-top:6px; padding-bottom:6px}

/* ---------- ライトボックス ---------- */
body.lb-open{overflow:hidden}          /* 背面がスクロールしないように */
.lightbox{
  position:fixed; inset:0; z-index:1000;
  background:rgba(12,18,26,.94);
  display:flex; flex-direction:column;
}
.lightbox .lb-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px; background:rgba(0,0,0,.35); color:#fff;
  /* iPhone のノッチ・ホームバーを避ける */
  padding-top:calc(10px + env(safe-area-inset-top));
  flex:none;
}
.lightbox .lb-name{
  font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  min-width:0;
}
.lightbox .lb-acts{display:flex; gap:8px; flex:none}
.lightbox .lb-body{
  flex:1; min-height:0; display:flex; align-items:center; justify-content:center;
  padding:10px; padding-bottom:calc(10px + env(safe-area-inset-bottom));
  overflow:auto;
}
.lightbox .lb-body img{
  max-width:100%; max-height:100%; object-fit:contain;
  border-radius:6px; background:#fff;
}
.lightbox .lb-noimg{
  color:#e8eef4; font-size:14px; line-height:1.9; text-align:center;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18);
  border-radius:10px; padding:22px 20px; max-width:min(520px, 92vw);
}
@media (max-width:420px){
  .thumb{width:48px; height:48px}
  td.thumbcell{width:60px}
  .lightbox .lb-name{font-size:12px}
}

/* 見た目はリンク、実体はボタン（画面遷移させたくないもの） */
.linklike{
  border:0; background:none; padding:0; font:inherit; color:var(--accent);
  cursor:pointer; text-align:left;
}
.linklike:hover{text-decoration:underline}


/* ==========================================================================
   ここから下は pjutaku_mgmt で新しく足した分
   ========================================================================== */

/* ---------- デモ環境の帯（導入指示書 §11・全画面に常時表示） ---------- */
/* ヘッダーの一番上に固定で出す。スクロールしても必ず見えている状態にする。
   本稼働へ移すときは /admin の「デモ環境の表示」を外すと消える。 */
.demobar{
  background:#7a2f2f; color:#ffe9e9; text-align:center;
  padding:6px 12px; font-size:13px; font-weight:700; line-height:1.5;
}
.demobar .sub{display:block; font-size:11.5px; font-weight:400; color:#f3c9c9}
@media(min-width:640px){
  .demobar .sub{display:inline; margin-left:10px}
}
/* 帯の直下に置く但し書き（2026-08-13 追加）。
   デモの中に実在の記録（議事録 #7・全体チャット・実在物件2件）が混ざっているため、
   帯の断定を打ち消す。**帯と別の要素にしてある**のは、帯の文言を将来変えても
   この一行が巻き添えで消えないようにするため。色は帯と同系にして続きに見せ、
   文字は一段小さくして「注記」と分かるようにしている。 */
.demonote{
  background:#f6ecec; color:#7a2f2f; text-align:center;
  padding:5px 12px; font-size:11.5px; line-height:1.5;
  border-bottom:1px solid #e8d6d6;
}

/* ---------- 物件の状態 ---------- */
.b-掲載準備{background:var(--warn-bg); color:var(--warn)}
.b-掲載中{background:var(--ok-bg); color:var(--ok)}
.b-成約{background:#efe7fb; color:#6b3fb0}
.b-掲載終了{background:var(--gray-bg); color:var(--sub)}
.b-空室連絡{background:#e6f0fd; color:var(--accent-d)}
.b-成約連絡{background:#efe7fb; color:#6b3fb0}

/* ---------- SLA（残り営業日） ---------- */
.sla{display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-weight:700}
.sla .n{font-size:16px}
.sla.ok{color:var(--ok)}
.sla.soon{color:var(--warn)}
.sla.over{color:var(--bad)}
.slalist{list-style:none; margin:0; padding:0}
.slalist li{
  display:flex; gap:10px; align-items:flex-start; padding:10px 0;
  border-bottom:1px solid var(--line);
}
.slalist li:last-child{border-bottom:0}
.slalist .body{flex:1; min-width:0}
.slalist .meta{font-size:12.5px; color:var(--sub); margin-top:2px}

/* ---------- KPI ---------- */
.kpi{display:grid; grid-template-columns:1fr; gap:10px; margin-top:10px}
@media(min-width:640px){ .kpi{grid-template-columns:1fr 1fr} }
.kpi .it{
  border:1px solid var(--line); border-radius:var(--radius); padding:11px 13px; background:#fff;
}
.kpi .k{font-size:12.5px; color:var(--sub); font-weight:600}
.kpi .v{font-size:22px; font-weight:700}
.kpi .v .u{font-size:12.5px; font-weight:400; color:var(--sub)}
.kpi .none{font-size:13px; color:var(--sub); font-weight:400}

/* ==========================================================================
   表のカード化（B37）
   列が4つ以上ある一覧をスマホ幅で読ませるため、1行＝1カードに組み替える。
   横スクロール枠だけだと列が潰れて、どの数字が何なのか分からなくなる。
   各セルの data-th（見出し）は app.js の cardifyTables() が入れる。
   ========================================================================== */
@media (max-width:700px){
  table.cardify, table.cardify tbody, table.cardify tr, table.cardify td{display:block; width:100%}
  table.cardify thead{display:none}
  table.cardify tr{
    border:1px solid var(--line); border-radius:var(--radius); background:#fff;
    margin:0 0 10px; padding:8px 10px; box-shadow:var(--shadow);
  }
  table.cardify td{
    border:0; border-bottom:1px dotted var(--line); padding:6px 0;
    display:flex; gap:10px; align-items:flex-start;
  }
  table.cardify td:last-child{border-bottom:0}
  table.cardify td::before{
    content:attr(data-th); flex:0 0 6.5em; color:var(--sub);
    font-size:12px; font-weight:700; padding-top:2px;
  }
  table.cardify td:empty{display:none}
  table.cardify td.num{text-align:left}
  .tablewrap{overflow-x:visible; margin:0; padding:0}
}

/* ---------- 存在しない番号を開いたときの案内（B38） ---------- */
.notfound{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:26px 20px; text-align:center;
}
.notfound .big{font-size:17px; font-weight:700; margin-bottom:6px}
.notfound .btn{margin-top:14px}
