/* Spacing scale: 4/8/12/16/24/32. Type: h1 24-28, body 14-16, aux 12-13. */
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;color:#172d3c;background:#f4f7f8;font-size:15px;line-height:1.6;
--accent:#14756c;--accent-dark:#0a5b54;--border:#dce5e8;--nav:#12333a;--nav-2:#1b464e;--muted:#5f747b;--danger:#a63a3a}
*{box-sizing:border-box}body{margin:0;min-width:320px}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
.skip-link{position:absolute;left:8px;top:-48px;background:#fff;padding:8px 16px;border-radius:4px;z-index:10}.skip-link:focus{top:8px}
/* App header (darkest) and project bar (one step lighter) */
.app-header{height:56px;background:var(--nav);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:16px}
.brand{font-size:18px;letter-spacing:.05em;color:#fff;white-space:nowrap;display:inline-flex;align-items:center}.brand:hover{text-decoration:none}.brand b{font-weight:400;color:#9fb9bd;margin-left:4px}
.mark{display:inline-grid;place-items:center;width:32px;height:32px;background:var(--accent);color:#fff;border-radius:8px;font-weight:700;margin-right:8px}
nav{display:flex;align-items:center;gap:16px;font-size:13px}nav form{margin:0}.app-header nav a{color:#d3e2e4;padding:8px 0}.app-header nav a:hover{color:#fff}.account-short{display:none}
.account{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-bar{background:var(--nav-2);color:#fff}.project-bar-inner{max-width:1280px;margin:0 auto;padding:0 32px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.project-title{padding:12px 0;font-size:13px;color:#b8cdd0;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.project-title a{color:#b8cdd0}.project-title a.strong{color:#fff;font-size:16px;font-weight:600}.project-title small{color:#9fb9bd}
.tabs{gap:4px;align-items:flex-end}.tabs a{color:#c9dcde;padding:12px 16px;min-height:44px;display:inline-flex;align-items:center;border-bottom:3px solid transparent;font-size:14px}.tabs a:hover{color:#fff;text-decoration:none;background:#ffffff14}.tabs a[aria-current=page]{color:#fff;border-bottom-color:#7fd1c4;font-weight:600}
main{max-width:1280px;margin:0 auto;padding:24px 32px 32px;min-height:calc(100vh - 160px)}
footer{font-size:12px;color:#7a8c92;text-align:center;padding:24px}
h1{font-size:26px;letter-spacing:-.02em;margin:4px 0 8px;line-height:1.35}h2{font-size:16px;margin:0 0 16px}h3{font-size:14px;margin:16px 0 8px}p{margin:8px 0 16px}
.eyebrow{font-size:11px;letter-spacing:.16em;color:var(--accent);font-weight:700}.muted,small{color:var(--muted);font-size:13px}
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.page-heading p{margin:0}.actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
/* Buttons: one primary per group, others outlined */
.button,button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;background:var(--accent);color:#fff;border:1px solid transparent;border-radius:8px;padding:8px 16px;font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.button:hover,button:hover{background:var(--accent-dark);text-decoration:none}
.secondary{background:#fff;color:var(--accent);border-color:#b5d2ce}.secondary:hover{background:#eaf3f1}
.quiet{background:transparent;color:#526c75;padding:4px 12px;min-height:36px;border:1px solid var(--border)}.quiet:hover{background:#f1f5f5}.quiet.on-dark{color:#d3e2e4;border-color:#ffffff40}.quiet.on-dark:hover{background:#ffffff1a}
.danger{background:#fff;color:var(--danger);border-color:#e3b9b9}.danger:hover{background:#fbeeee}button:disabled{opacity:.45;cursor:not-allowed}
.panel{background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px;margin-bottom:16px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
.project-card{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:12px;background:#fff;color:#233e48;padding:24px;min-height:200px}.project-card:hover{border-color:#85b5ae;text-decoration:none}.project-card h2{margin:8px 0 4px}.project-card p{font-size:13px;color:var(--muted)}
.project-icon{background:#e7f3ef;color:var(--accent);font-size:20px;font-weight:700;display:grid;place-items:center;width:44px;height:44px;border-radius:12px;margin-bottom:12px}.card-link{font-size:13px;color:var(--accent);margin-top:auto}
/* Forms */
label{display:block;color:#3f5861;font-size:13px;font-weight:600;margin:0 0 4px}
input,select,textarea{width:100%;min-height:44px;padding:8px 12px;font:inherit;font-size:14px;border:1px solid #c3d3d8;border-radius:8px;background:#fff;color:#1f3a45}
input:focus,select:focus,textarea:focus{outline:2px solid #5fb3a6;outline-offset:1px}textarea{resize:vertical}
.field{margin-bottom:16px;min-width:0}.field.wide{max-width:100%}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 16px}
fieldset{border:0;border-top:1px solid var(--border);margin:0 0 16px;padding:16px 0 0}legend{font-size:13px;font-weight:700;color:var(--muted);padding:0 8px 0 0}
.editor{max-width:880px}.editor p{margin:0 0 16px}.helptext{display:block;font-size:12px;color:var(--muted)}.helptext ul{padding-left:20px}
.errorlist{color:var(--danger);padding-left:0;list-style:none;font-size:13px;margin:4px 0}.error{color:var(--danger)}
form button{margin-top:8px}
.check{display:flex;align-items:center;gap:8px;margin:0;font-weight:400;min-height:44px;white-space:nowrap}.check input{width:20px;height:20px;min-height:0;min-width:0}
/* Filters */
.filters{margin-bottom:16px}.filter-row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.filter-row .field{margin-bottom:12px;flex:0 1 160px}.filter-row .field.grow{flex:1 1 240px}
.more-filters{margin-bottom:8px}.more-filters summary{cursor:pointer;font-size:13px;color:var(--accent);min-height:32px;padding:4px 0}
.filter-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.filter-actions button{margin:0}
.result-count{font-size:13px;color:var(--muted);margin:0 0 8px}
/* Table */
.table-scroll{overflow-x:auto;position:relative}table{border-collapse:collapse;width:100%;font-size:14px;text-align:left}
th{background:#f4f7f8;color:#5b7078;font-size:12px;font-weight:600;padding:8px 12px;white-space:nowrap}
td{border-top:1px solid #edf1f2;padding:12px;white-space:nowrap;vertical-align:top}td.title-cell{white-space:normal;min-width:240px;width:40%}
td a{display:flex;gap:4px;flex-direction:column;color:#1f3a45}td strong{font-weight:500}tbody tr:hover{background:#fafcfc}
.badge{display:inline-block;border-radius:4px;background:#edf1f3;color:#4c6572;padding:2px 8px;font-size:12px;white-space:nowrap;border-left:3px solid #9fb0b8}
.badge.open{border-left-color:#9fb0b8}.badge.doing{background:#e4eefb;color:#2c5f9c;border-left-color:#4a86c8}.badge.review{background:#fff2d7;color:#85570c;border-left-color:#d79a2b}.badge.closed{background:#e4f3eb;color:#1f6f4b;border-left-color:#2f9d6c}
.prio{font-size:13px;white-space:nowrap}.prio.high{color:var(--danger);font-weight:600}.prio.high::before{content:"▲ "}.prio.low{color:var(--muted)}.prio.low::before{content:"▽ "}
.empty{text-align:center;padding:32px;color:var(--muted)}
.pagination,.pager{display:flex;justify-content:center;gap:16px;margin-top:16px;font-size:13px;align-items:center}.pager{margin:0}
/* Board */
.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.column{background:#e9eff1;border:1px solid var(--border);border-radius:12px;padding:12px;min-width:0}.column.drop{outline:2px dashed var(--accent);background:#dcebe8}
.column-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.column-head h2{margin:0}.count{font-size:12px;color:var(--muted)}
.column-body{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-height:48px}
.card{background:#fff;border:1px solid var(--border);border-radius:8px;padding:12px}.card[draggable=true]{cursor:grab}.card.dragging{opacity:.5}.card.busy{opacity:.6}
.card-title{display:flex;flex-direction:column;gap:4px;color:#1f3a45;overflow-wrap:anywhere}.card-title strong{font-weight:500;font-size:14px}
.card-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--muted);margin-top:8px}
.move-form{margin-top:8px;border-top:1px solid #edf1f2;padding-top:8px}.move-form label{font-size:12px;font-weight:500;color:var(--muted)}.move-row{display:flex;gap:8px}.move-row select{flex:1;min-width:0}.move-row button{margin:0;padding:8px 12px}
.column-empty{font-size:13px;color:var(--muted);text-align:center;padding:16px 8px;border:1px dashed #c3d3d8;border-radius:8px}
.column-foot{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);margin-top:8px;gap:8px;flex-wrap:wrap}
.board-status{min-height:0;margin-bottom:8px;font-size:14px}.board-status:not(:empty){padding:12px 16px;border-radius:8px}.ok-box{background:#e4f3ec}.error-box{background:#fbeaea;color:#7e2a2a}
/* Planning */
.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.plan-item{display:flex;gap:8px;align-items:flex-start;border-top:1px solid #edf1f2;padding:12px 0}.plan-edit{flex:1;min-width:0}.plan-fields{display:grid;gap:0 12px}.plan-actions{display:flex;justify-content:space-between;align-items:center}.plan-edit .field{margin-bottom:8px}.plan-delete{margin-top:20px}.plan-add{border-top:1px solid var(--border);padding-top:8px}
/* Issue detail */
.issue-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.prose{overflow-wrap:anywhere;line-height:1.8}
.comment{padding:16px 0;border-bottom:1px solid #edf1f2;margin-bottom:16px}.comment time{float:right;font-size:12px;color:var(--muted)}.comment strong{font-size:13px}
dt{font-size:12px;color:var(--muted);margin-top:12px}dd{margin:4px 0 0;font-size:14px;overflow-wrap:anywhere}
.auth{max-width:470px;margin:24px auto}.auth h1{font-size:28px;margin-bottom:24px}.auth button{width:100%}.auth .qr{width:220px;height:220px;display:block;margin:16px auto}
.notice{background:#e4f3ec;padding:12px 16px;border-radius:8px;margin-bottom:16px}.notice.error{background:#fbeaea;color:#7e2a2a}
.notification{display:flex;justify-content:space-between;border-bottom:1px solid #edf1f2;padding:16px 0;gap:16px}.notification small{display:block}.codes{font-size:17px;line-height:2;list-style:none;padding:0}
aside input[type=file]{font-size:12px}aside small{display:block}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #5fb3a6;outline-offset:2px}
@media(max-width:1100px){.board{grid-template-columns:repeat(2,minmax(0,1fr))}.plan-grid{grid-template-columns:1fr}}
@media(max-width:800px){.app-header{padding:0 16px}.app-header nav .account{display:inline-flex}.account-name{display:none}.account-short{display:inline}main{padding:16px}.project-bar-inner{padding:0 16px}.tabs{overflow-x:auto;max-width:100%}.tabs a{padding:12px;white-space:nowrap}
.grid,.issue-layout{grid-template-columns:1fr}.page-heading{flex-direction:column}.panel{padding:16px}h1{font-size:24px}.auth h1{font-size:24px}.project-card{min-height:160px}.filter-row .field{flex:1 1 100%}}
@media(max-width:560px){.board{grid-template-columns:1fr}.app-header{height:auto;min-height:56px;flex-wrap:wrap;gap:4px;padding:12px 16px}.app-header nav{width:100%;justify-content:space-between;gap:12px}.app-header nav a{white-space:nowrap;min-height:44px;display:inline-flex;align-items:center}.brand b{display:inline}}
/* Unit 2: gantt, summary, wiki history, shared files */
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.flag{display:inline-block;font-size:12px;padding:0 8px;border:1px solid #c3d3d8;border-radius:4px;color:#4c6572;background:#f4f7f8;white-space:nowrap}.flag.late{color:#8a2d2d;border-color:#e3b9b9;background:#fbeeee;font-weight:600}
.g-nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}.g-nav .button{margin:0}.g-range{font-size:14px;margin-left:8px}
.gantt-table td,.gantt-table th{vertical-align:middle}.g-timeline-col{min-width:360px;width:44%;padding:4px 12px}
.g-axis{display:flex;list-style:none;margin:0;padding:0;font-size:11px;font-weight:400;color:var(--muted)}.g-axis li{flex:1;border-left:1px solid var(--border);padding-left:4px}
.g-svg{display:block;width:100%;height:28px}.g-grid{stroke:#e3eaec;stroke-width:1;vector-effect:non-scaling-stroke}.g-today{stroke:var(--danger);stroke-width:2;vector-effect:non-scaling-stroke}
.g-bar{stroke:#2c5f9c;stroke-width:2;vector-effect:non-scaling-stroke;rx:2}.g-bar.open{fill:#fff;stroke:#4c6572}.g-bar.doing{fill:#4a86c8;stroke:#2c5f9c}.g-bar.review{fill:#f1d9a2;stroke:#85570c;stroke-dasharray:6 3}.g-bar.closed{fill:#cfe7da;stroke:#2f9d6c}
.g-bar.single{stroke-dasharray:3 3}.g-bar.late{stroke:var(--danger)}.g-ms{fill:#14756c;stroke:#0a5b54;stroke-width:2;vector-effect:non-scaling-stroke}
.g-note{display:block;font-size:11px}.g-rel{display:block;font-size:12px;color:var(--muted)}a.inline,td a.inline{display:inline;flex-direction:row}
.g-edit summary{cursor:pointer;color:var(--accent);min-height:44px;display:inline-flex;align-items:center;padding:0 8px;font-size:13px}.g-edit form{min-width:200px;padding:8px 0}
.legend{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;margin:16px 0 0;padding:0;font-size:12px;color:var(--muted)}.swatch{display:inline-block;width:20px;height:10px;margin-right:4px;border:2px solid #4c6572;vertical-align:middle;background:#fff}
.swatch.doing{background:#4a86c8;border-color:#2c5f9c}.swatch.review{background:#f1d9a2;border:2px dashed #85570c}.swatch.closed{background:#cfe7da;border-color:#2f9d6c}.swatch.single{border:2px dotted #2c5f9c}.swatch.today{height:12px;width:0;border:0;border-left:2px solid var(--danger)}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}.stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px}
.bars{list-style:none;margin:0;padding:0}.bars li{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-top:1px solid #edf1f2;gap:8px}.bars li:first-child{border-top:0}
.big{font-size:32px;font-weight:600;margin:0 0 8px;line-height:1.2}.hours{margin:0}.hours dd{font-size:20px;margin:0 0 8px}
.meter{display:inline-block;width:96px;vertical-align:middle}.meter svg{width:100%;height:8px;display:block}.m-bg{fill:#e3eaec}.m-fg{fill:#14756c}
.info-box{background:#eef3f6;border:1px solid #c3d3d8;color:#243f4a}.plain{list-style:none;padding:0;margin:0}.plain li{padding:8px 0;border-top:1px solid #edf1f2}
.burn{margin:16px 0}.burn svg{width:100%;max-width:720px;height:auto;background:#fff}.burn .ax{stroke:#8aa0a7;stroke-width:1}.burn .tk{font-size:11px;fill:#4c6572}.burn .actual{stroke:#14756c;stroke-width:2.5}.burn .ideal{stroke:#5f747b;stroke-width:2;stroke-dasharray:6 4}.burn .dot{fill:#fff;stroke:#14756c;stroke-width:2}
.burn figcaption{font-size:13px;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.meter-label{font-size:12px}.inline-form{display:inline-block;margin:0 0 0 8px}.inline-form button{margin:0}
.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.crumbs{font-size:14px;margin:4px 0 8px}
.wiki-body{white-space:normal;max-width:860px;font-size:15px}.editor textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:14px;line-height:1.7}
@media(max-width:1100px){.stat-grid,.two-col{grid-template-columns:1fr}}
.mobile-scroll-hint{display:none}
@media(max-width:800px){.gantt-table{min-width:900px}.gantt-table td.title-cell{min-width:200px}.burn svg{max-width:100%}.mobile-scroll-hint{display:block}}
summary,.more-filters summary{min-height:44px;display:inline-flex;align-items:center}.quiet{min-height:44px}

.hours-note{display:block;font-size:12px}.hours-missing{font-size:15px;color:var(--muted)}
