:root{--font:"Noto Sans JP","Hiragino Kaku Gothic Pro","ヒラギノ角ゴ Pro W3",Meiryo,"メイリオ",sans-serif;--bg:#f5f4f0;--surface:#ffffff;--border:#e2e0d8;--border-mid:#ccc9be;--text:#1a1916;--text-muted:#706e66;--text-faint:#a09e97;--blue:#1a5fa8;--blue-light:#e8f0fb;--blue-mid:#b8d0f0;--green:#2a7a3b;--green-light:#eaf5ec;--green-mid:#a8d8b0;--amber:#8a5a00;--amber-light:#fdf3e0;--amber-mid:#f0d090;--red:#9a2a2a;--red-light:#fdeaea;--red-mid:#f0a8a8;--gray-light:#f0ede6;--gray-mid:#c8c5be;--radius-sm:6px;--radius-md:10px;--radius-lg:14px}*{box-sizing:border-box;margin:0;padding:0}body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:13px;min-height:100vh}.header{background:var(--surface);border-bottom:1px solid var(--border);padding:14px 20px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;position:-webkit-sticky;position:sticky;top:0;z-index:50}.header-title{font-size:16px;font-weight:700;letter-spacing:-.3px;white-space:nowrap}.header-title span{color:var(--blue)}.header-year{font-size:11px;color:var(--text-muted);background:var(--gray-light);padding:2px 10px;border-radius:20px}.toolbar{background:var(--surface);border-bottom:1px solid var(--border);padding:8px 20px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.toolbar input[type=text],.toolbar select{font-family:var(--font);font-size:12px;padding:5px 10px;height:30px;border:1px solid var(--border-mid);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);outline:none;transition:border-color .15s}.toolbar input[type=text]:focus,.toolbar select:focus{border-color:var(--blue)}.io-bar{background:var(--gray-light);border-bottom:1px solid var(--border);padding:7px 20px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.io-label{font-size:11px;color:var(--text-muted)}.btn,.io-label{font-weight:500}.btn{font-family:var(--font);font-size:12px;padding:5px 14px;border-radius:var(--radius-sm);border:1px solid var(--border-mid);background:var(--surface);color:var(--text);cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.btn:hover{background:var(--gray-light)}.btn:active{transform:scale(.98)}.btn-primary{background:var(--blue);color:#fff;border-color:var(--blue)}.btn-primary:hover{background:#154d8a}.btn-amber{background:var(--amber-light);color:var(--amber);border-color:var(--amber-mid)}.btn-amber:hover{background:#f5e8c0}.btn-danger{background:var(--red-light);color:var(--red);border-color:var(--red-mid)}.btn-danger:hover{background:#f8d8d8}.btn-add{background:var(--blue);color:#fff;border-color:var(--blue);padding:5px 14px}.btn-add:hover{background:#154d8a}.badge{display:inline-block;font-size:10px;padding:2px 8px;border-radius:20px;font-weight:500;white-space:nowrap}.badge-todo{background:var(--gray-light);color:var(--text-muted)}.badge-doing{background:var(--blue-light);color:var(--blue)}.badge-done{background:var(--green-light);color:var(--green)}.badge-delay{background:var(--red-light);color:var(--red)}.badge-admin{background:var(--green-light);color:var(--green);border:1px solid var(--green-mid);border-radius:20px}.badge-admin,.badge-guest{font-size:11px;padding:3px 10px}.badge-guest{background:var(--gray-light);color:var(--text-muted);border:1px solid var(--border-mid);border-radius:20px}.stat-bar{display:flex;gap:8px;padding:8px 20px;border-bottom:1px solid var(--border);flex-wrap:wrap;background:var(--surface)}.stat{background:var(--bg);border-radius:var(--radius-sm);padding:5px 14px;font-size:11px;color:var(--text-muted)}.stat b{display:block;font-size:18px;font-weight:700;color:var(--text);line-height:1.3}.gantt-wrap{overflow:auto;max-height:calc(100vh - 260px);background:var(--surface)}table{border-collapse:collapse;width:max-content;min-width:100%}thead th{position:-webkit-sticky;position:sticky;top:0;background:var(--bg);z-index:10;font-size:11px;font-weight:700;color:var(--text-muted);border-bottom:1px solid var(--border);white-space:nowrap;padding:6px 7px;text-align:center}th.h-dept{left:0;width:115px;min-width:115px}th.h-dept,th.h-task{position:-webkit-sticky;position:sticky;top:0;z-index:20;text-align:left}th.h-task{left:115px;width:195px;min-width:195px}th.h-status{left:310px;width:78px;min-width:78px;text-align:center}th.h-prog,th.h-status{position:-webkit-sticky;position:sticky;top:0;z-index:20}th.h-prog{left:388px;width:70px;min-width:70px}th.h-act{position:-webkit-sticky;position:sticky;top:0;left:458px;z-index:20;width:62px;min-width:62px;text-align:center}td{border-bottom:1px solid var(--border);padding:4px 7px;vertical-align:middle;white-space:nowrap}td.c-dept{left:0;font-size:11px;font-weight:700;color:var(--text-muted);width:115px;min-width:115px;max-width:115px}td.c-dept,td.c-task{position:-webkit-sticky;position:sticky;background:var(--surface);z-index:5;overflow:hidden;text-overflow:ellipsis}td.c-task{left:115px;width:195px;min-width:195px;max-width:195px;font-size:12px;cursor:pointer}td.c-status{left:310px;text-align:center;width:78px;min-width:78px}td.c-prog,td.c-status{position:-webkit-sticky;position:sticky;background:var(--surface);z-index:5}td.c-prog{left:388px;width:70px;min-width:70px}td.c-act{position:-webkit-sticky;position:sticky;left:458px;background:var(--surface);z-index:5;width:62px;min-width:62px;text-align:center}tr:hover td{background:#f8f7f3!important}.prog-wrap{display:flex;align-items:center;gap:4px}.prog-bar-bg{flex:1 1;height:6px;background:var(--border);border-radius:3px;overflow:hidden}.prog-bar{height:100%;border-radius:3px;transition:width .3s}.prog-num{font-size:11px;color:var(--text-muted);min-width:26px;text-align:right}.cell-month{width:34px;min-width:34px;padding:0;position:relative}.bar{position:absolute;top:50%;transform:translateY(-50%);height:14px;border-radius:3px;left:1px;right:1px}.icon-btn{background:none;border:none;cursor:pointer;padding:2px 5px;border-radius:4px;font-size:14px;color:var(--text-muted);transition:background .1s,color .1s}.icon-btn:hover{background:var(--gray-light);color:var(--text)}.icon-btn.del:hover{color:var(--red)}.legend{gap:14px;padding:8px 20px;font-size:11px;border-top:1px solid var(--border);flex-wrap:wrap;background:var(--surface);color:var(--text-muted)}.leg-item,.legend{display:flex;align-items:center}.leg-item{gap:4px}.leg-dot{width:10px;height:10px;border-radius:2px;display:inline-block}.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:200;align-items:center;justify-content:center}.overlay.open{display:flex}.modal{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:24px;width:420px;max-width:94vw;max-height:92vh;overflow-y:auto;box-shadow:0 8px 40px rgba(0,0,0,.14)}.modal h3{font-size:16px;font-weight:700;margin-bottom:4px}.modal .sub{font-size:11px;color:var(--text-muted);margin-bottom:16px}.field{margin-bottom:13px}.field label{display:block;font-size:11px;color:var(--text-muted);font-weight:500;margin-bottom:4px}.field input,.field select,.field textarea{width:100%;font-family:var(--font);font-size:13px;padding:6px 10px;border:1px solid var(--border-mid);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);outline:none;transition:border-color .15s}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue)}.field textarea{resize:vertical;height:58px}.field input[type=range]{padding:0;border:none;background:transparent}.row2{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.modal-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}.err{font-size:11px;color:var(--red);margin-top:6px;min-height:16px}.highlight-section{background:var(--surface);border-bottom:1px solid var(--border);padding:12px 20px}.highlight-header{display:flex;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap}.highlight-title{font-size:13px;font-weight:700;white-space:nowrap}.month-tabs{display:flex;gap:4px;flex-wrap:wrap}.month-tab{font-family:var(--font);font-size:11px;padding:3px 10px;border-radius:20px;border:1px solid var(--border-mid);background:var(--surface);color:var(--text-muted);cursor:pointer;font-weight:500;transition:all .12s;white-space:nowrap}.month-tab:hover{background:var(--gray-light)}.month-tab.active{background:var(--blue);color:#fff;border-color:var(--blue)}.month-tab.has-data{border-color:var(--blue-mid);color:var(--blue)}.month-tab.has-data.active{background:var(--blue);color:#fff}.hl-toggle{font-size:11px;color:var(--text-muted);cursor:pointer;margin-left:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.hl-toggle:hover{color:var(--text)}.hl-collapsed .dept-cards{display:none}.dept-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:8px;gap:8px}.dept-card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-md);padding:9px 12px;cursor:pointer;transition:border-color .12s,background .12s;position:relative}.dept-card:hover{border-color:var(--blue-mid);background:var(--blue-light)}.dept-card-top{display:flex;align-items:center;gap:6px;margin-bottom:4px}.dept-card-name{font-size:11px;color:var(--text-muted);flex:1 1;overflow:hidden;text-overflow:ellipsis}.dept-card-name,.dept-card-status{font-weight:700;white-space:nowrap}.dept-card-status{display:inline-block;font-size:9px;padding:1px 7px;border-radius:10px;flex-shrink:0}.ds-smooth{background:var(--green-light);color:var(--green)}.ds-mostly{background:var(--blue-light);color:var(--blue)}.ds-delay{background:var(--amber-light);color:var(--amber)}.ds-consult{background:var(--red-light);color:var(--red)}.ds-none{background:var(--gray-light);color:var(--text-faint)}.dept-card-comment{font-size:11px;color:var(--text);line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dept-card-comment.empty{color:var(--text-faint);font-style:italic}.dept-card-arrow{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--text-faint)}.detail-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:200;align-items:center;justify-content:center}.detail-overlay.open{display:flex}.detail-modal{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:24px;width:520px;max-width:94vw;max-height:88vh;overflow-y:auto;box-shadow:0 8px 40px rgba(0,0,0,.14)}.detail-modal h3{font-size:15px;font-weight:700;margin-bottom:2px}.detail-section{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--border)}.detail-section:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.detail-label{display:flex;gap:5px;font-size:10px;color:var(--text-muted);margin-bottom:4px}.d-num,.detail-label{align-items:center;font-weight:700}.d-num{display:inline-flex;justify-content:center;width:15px;height:15px;border-radius:50%;background:var(--blue);color:#fff;font-size:8px;flex-shrink:0}.d-num.amber{background:var(--amber)}.d-num.red{background:var(--red)}.d-num.green{background:var(--green)}.detail-val{font-size:12px;color:var(--text);line-height:1.7;white-space:pre-wrap;word-break:break-all}.detail-purpose{font-size:10px;margin-bottom:6px}.detail-purpose,.detail-val.empty{color:var(--text-faint);font-style:italic}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1a1916;color:#f5f4f0;font-size:12px;font-weight:500;padding:9px 20px;border-radius:var(--radius-md);z-index:300;opacity:0;transition:opacity .25s;pointer-events:none;white-space:nowrap}.toast.show{opacity:1}.loading-overlay{position:fixed;inset:0;background:rgba(255,255,255,.7);z-index:400;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--text-muted)}