:root{--ink:#172640;--muted:#64728a;--line:#dce3ed;--canvas:#f3f6fa;--blue:#2366c8;--navy:#173d78}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--canvas);color:var(--ink);font-family:"Yu Gothic UI","Hiragino Sans",sans-serif}button,input,select{font:inherit}.app-shell{min-height:100vh}.topbar{height:72px;display:flex;align-items:center;gap:24px;padding:0 28px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:11px;min-width:250px}.mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--navy);color:#fff;font-weight:800}.brand strong{display:block;font-size:19px}.brand span{display:block;font-size:11px;color:var(--muted)}.today{border:1px solid #cbd6e5;border-radius:10px;padding:9px 14px;background:#fff}.header-actions{margin-left:auto;display:flex;gap:8px}.header-actions button,.controlbar button{border:1px solid #cbd6e5;border-radius:9px;background:#fff;padding:9px 13px;font-weight:700}.header-actions button.active{background:var(--navy);color:#fff}.controlbar{display:flex;align-items:center;gap:12px;padding:16px 28px 11px}.tabs{display:flex}.tabs button{border-radius:0}.tabs button:first-child{border-radius:9px 0 0 9px}.tabs button:last-child{border-radius:0 9px 9px 0}.tabs .active{background:var(--navy);color:#fff}.controlbar #add{background:#1e6d4b;color:#fff}.controlbar #save-state{margin-left:auto;font-size:12px;color:#44705b}.timeline-card{margin:0 28px;background:#fff;border:1px solid #cbd5e2;border-radius:14px;overflow:hidden}.timeline-scroll{overflow-x:auto}.timeline{min-width:1460px;display:grid;grid-template-columns:230px 1fr}.sticky{position:sticky;left:0;z-index:8;background:#fff;border-right:1px solid var(--line)}.week-label{height:72px;padding:14px 18px;border-bottom:1px solid var(--line)}.week-label strong{font-size:20px}.week-label span{display:block;color:var(--muted);font-size:11px}.date-grid,.bar-grid{display:grid;grid-template-columns:repeat(25,minmax(48px,1fr));position:relative}.date-grid{height:72px;border-bottom:1px solid var(--line)}.date-cell{display:grid;place-content:center;text-align:center;border-right:1px solid var(--line);font-size:11px}.date-cell strong{font-size:14px}.date-cell.today-cell{background:#fff1f1;color:#d52e2e}.row{display:contents}.row-name{min-height:76px;padding:10px 15px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;justify-content:center}.row-name strong{font-size:15px}.row-name span{color:#53627a;font-size:11px;margin-top:5px}.row-name input{width:100%;border:1px solid #7ea7df;border-radius:6px;padding:5px}.next-input{margin-top:5px!important;font-size:11px}.bar-grid{min-height:76px;align-items:center;border-bottom:1px solid var(--line)}.bar-grid>i{align-self:stretch;border-right:1px solid #edf0f4;grid-row:1}.process-bar{grid-row:1;height:34px;margin:0 3px;border-radius:6px;border:1px solid transparent;z-index:3;color:#fff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:700}.normal{background:#2366c8}.near{background:#ffad48;color:#3f2c0c}.late{background:#ec5b55}.waiting{color:#594274;border:2px dashed #9b6bd3;background:#faf5ff}.ours{color:#614807;border:1px solid #eab72d;background:repeating-linear-gradient(-45deg,#fff9de,#fff9de 7px,#ffe58a 7px,#ffe58a 14px)}.legend{display:flex;flex-wrap:wrap;gap:16px;margin:13px 32px;color:#526178;font-size:12px}.legend span{display:flex;gap:6px;align-items:center}.legend i{width:27px;height:11px;border-radius:3px}.backdrop{position:fixed;inset:0;background:#13223a55;z-index:50;display:flex;justify-content:flex-end}.sheet{width:min(470px,100vw);height:100%;overflow:auto;background:#fff;padding:30px;position:relative}.close{position:absolute;right:18px;top:17px;border:0;border-radius:50%;width:38px;height:38px;font-size:22px}.sheet h2{font-size:25px}.form-stack{display:grid;gap:13px}.form-stack label{font-size:12px;font-weight:700;color:#526178}.form-stack input,.form-stack select{width:100%;margin-top:5px;padding:11px;border:1px solid #c5d0df;border-radius:8px;background:#fff}.primary{width:100%;border:0;border-radius:8px;background:var(--navy);color:#fff;padding:12px;font-weight:800}.danger{width:100%;margin-top:10px;border:1px solid #e4a3a3;background:#fff7f7;color:#ad3030;border-radius:8px;padding:10px}.link-button{display:block;text-align:center;text-decoration:none;margin-top:18px}.setup-page{padding:30px}.setup-card{width:min(520px,calc(100% - 28px));margin:7vh auto;background:#fff;border:1px solid var(--line);border-radius:16px;padding:30px;box-shadow:0 14px 40px #1f345014}.setup-card h1{margin:17px 0 8px}.setup-card p{color:var(--muted);line-height:1.7}.setup-card hr{border:0;border-top:1px solid var(--line);width:100%}.error-box{padding:10px;border-radius:7px;background:#fff0f0;color:#a82f2f;margin:10px 0}.security-note{font-size:11px!important}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:80;background:#173d2f;color:#fff;padding:12px 16px;border-radius:9px}
@media(max-width:700px){.topbar{height:62px;padding:0 10px;gap:7px}.brand{min-width:auto}.brand span{display:none}.brand strong{font-size:15px}.mark{width:34px;height:34px}.today{font-size:10px;padding:6px}.header-actions{gap:4px}.header-actions button{font-size:11px;padding:7px}.header-actions button span{display:none}.controlbar{padding:9px;overflow-x:auto}.controlbar button{font-size:10px;padding:8px;white-space:nowrap}.timeline-card{margin:0;border-radius:0}.timeline{grid-template-columns:142px 1fr;min-width:1050px}.date-grid,.bar-grid{grid-template-columns:repeat(25,36px)}.week-label,.date-grid{height:62px}.row-name,.bar-grid{min-height:70px}.row-name{padding:8px 10px}.row-name strong{font-size:12px}.process-bar{height:31px;font-size:10px}.legend{margin:10px;font-size:9px}.backdrop{align-items:flex-end}.sheet{width:100%;height:auto;max-height:88vh;border-radius:18px 18px 0 0;padding:24px 18px}.setup-card{padding:22px}}

/* 長期工程・運用版 */
.controlbar{gap:9px}.view-switch{display:flex}.view-switch button{border-radius:0}.view-switch button:first-child{border-radius:9px 0 0 9px}.view-switch button:last-child{border-radius:0 9px 9px 0}.view-switch .active{background:var(--navy);color:#fff}.controlbar #add-project,.controlbar #add{background:#1e6d4b;color:#fff}.controlbar input[type=month]{border:1px solid #cbd6e5;border-radius:8px;padding:8px;background:#fff;color:var(--ink)}.dynamic-grid{grid-template-columns:repeat(var(--slot-count),minmax(0,1fr))!important}.dynamic-timeline.day-timeline{min-width:2250px}.dynamic-timeline.week-timeline{min-width:1700px}.dynamic-timeline.month-timeline{min-width:2050px}.dynamic-timeline.year-timeline{min-width:1100px}.file-row{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px}.file-row a{min-width:0;flex:1;color:var(--blue);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-row button{border:0;background:#fff0f0;color:#a53030;border-radius:6px;padding:5px 8px}.upload-button{display:block;text-align:center;margin-top:16px;background:var(--navy);color:#fff;border-radius:8px;padding:12px;font-weight:800;cursor:pointer}.files-head{display:flex;justify-content:space-between;align-items:center;margin:22px 0 8px}.files{display:grid;gap:7px}.files>p{background:#f7f9fb;color:var(--muted);border-radius:8px;padding:18px;text-align:center}.sheet h2 input{width:calc(100% - 45px);border:1px solid #7ea7df;border-radius:8px;padding:8px;font-size:22px}
@media(max-width:700px){.controlbar input[type=month]{font-size:10px;padding:7px}.controlbar #save-state{display:none}.dynamic-timeline.day-timeline{min-width:1800px}.dynamic-timeline.week-timeline{min-width:1280px}.dynamic-timeline.month-timeline{min-width:1720px}.dynamic-timeline.year-timeline{min-width:760px}.header-actions button{padding:6px;font-size:10px}.brand strong{font-size:14px}}
.form-stack textarea{width:100%;margin-top:5px;padding:11px;border:1px solid #c5d0df;border-radius:8px;resize:vertical}.support-history{margin-top:24px;border-top:1px solid var(--line);padding-top:12px}.support-history article{border:1px solid var(--line);border-radius:8px;padding:10px;margin:8px 0}.support-history article strong,.support-history article span{display:block}.support-history article span{font-size:10px;color:var(--muted);margin-top:3px}.support-history article p{font-size:12px;white-space:pre-wrap}
