:root{
  color-scheme:light;
  --bg:#f6f7f9;--surface:#fff;--text:#111827;--sub:#5f6877;--line:#dfe3e8;
  --accent:#111827;--soft:#eef1f4;--danger:#9f1239;--focus:#0f766e;
  font-family:system-ui,-apple-system,"Noto Sans JP","Segoe UI",sans-serif;
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
body{padding-bottom:78px}.topbar{position:sticky;top:0;z-index:20;height:58px;background:rgba(246,247,249,.94);backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line)}
.brand{font-size:19px;letter-spacing:.01em}.badge{font-size:11px;border:1px solid var(--line);border-radius:999px;padding:2px 7px;margin-left:8px}.muted{color:var(--sub)}
.icon-btn,.btn{border:0;background:var(--accent);color:white;border-radius:11px;min-height:42px;padding:0 15px;font-weight:650;font-size:14px}.icon-btn{width:42px;padding:0;font-size:24px}.btn.secondary{background:var(--soft);color:var(--text)}.btn.ghost{background:transparent;color:var(--text);border:1px solid var(--line)}.btn.danger{background:#fff1f2;color:var(--danger)}.btn.small{min-height:34px;padding:0 10px;font-size:13px}.btn:disabled{opacity:.5}
.app{width:min(760px,100%);margin:0 auto;padding:16px}.section{margin:0 0 22px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}.section h2{font-size:17px;margin:0}.section h3{font-size:14px;color:var(--sub);margin:18px 0 8px}.count{font-size:13px;color:var(--sub)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;margin:0 0 10px;box-shadow:0 1px 2px rgba(0,0,0,.02)}.card.clickable{cursor:pointer}.card-title{font-weight:700;line-height:1.45;margin-bottom:5px}.card-body{font-size:14px;line-height:1.65;color:#303846;white-space:pre-wrap;overflow-wrap:anywhere}.meta{font-size:12px;color:var(--sub);display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.pill{display:inline-flex;align-items:center;border:1px solid var(--line);background:var(--soft);border-radius:999px;padding:3px 8px;font-size:12px;color:#45505f}.pill.focus{border-color:#99d6cf;color:#0f766e;background:#f0fdfa}.pill.wait{background:#fff7ed}.pill.closed{opacity:.7}.pill.park{background:#f5f3ff}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.action-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;text-align:left;min-height:82px}.action-card strong{display:block;margin-bottom:4px}.action-card span{font-size:12px;color:var(--sub)}
.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;height:70px;padding-bottom:env(safe-area-inset-bottom);background:rgba(255,255,255,.96);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr)}.bottom-nav button{border:0;background:transparent;color:#6b7280;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:20px}.bottom-nav button small{font-size:10px}.bottom-nav button.active{color:var(--text);font-weight:700}
label{display:block;font-size:13px;font-weight:650;margin:12px 0 5px}.field,input,textarea,select{width:100%;font:inherit;color:var(--text);background:white;border:1px solid #cfd5dc;border-radius:10px;padding:10px 11px;min-height:42px}textarea{min-height:120px;resize:vertical;line-height:1.55}.row{display:flex;gap:8px;align-items:center}.row>*{min-width:0}.row.wrap{flex-wrap:wrap}.grow{flex:1}.toolbar{display:flex;gap:8px;overflow:auto;padding-bottom:4px;margin-bottom:12px}.chip{white-space:nowrap;border:1px solid var(--line);background:white;padding:7px 11px;border-radius:999px;font-size:13px}.chip.active{background:var(--accent);color:white;border-color:var(--accent)}
.searchbox{position:sticky;top:66px;z-index:10;background:var(--bg);padding-bottom:10px}.empty{text-align:center;color:var(--sub);padding:32px 12px}.detail-head{margin-bottom:15px}.detail-head h1{font-size:22px;line-height:1.35;margin:0 0 7px}.pre{white-space:pre-wrap;overflow-wrap:anywhere;background:white;border:1px solid var(--line);border-radius:12px;padding:12px;line-height:1.65;font-size:14px;max-height:55vh;overflow:auto}.divider{height:1px;background:var(--line);margin:16px 0}.back{border:0;background:none;padding:0;color:var(--sub);font-size:14px;margin-bottom:12px}.sticky-actions{position:sticky;bottom:78px;background:linear-gradient(transparent,var(--bg) 20%);padding-top:20px;display:flex;gap:8px}.sticky-actions .btn{flex:1}
.modal{width:min(680px,calc(100% - 20px));max-height:90vh;border:0;border-radius:16px;padding:0;background:white;color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.24)}.modal::backdrop{background:rgba(17,24,39,.52)}#modal-content{padding:18px;max-height:90vh;overflow:auto}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:12px}.modal-head h2{font-size:18px;margin:0}.close{border:0;background:var(--soft);border-radius:9px;width:36px;height:36px;font-size:20px}.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap}.progress{height:9px;background:var(--soft);border-radius:999px;overflow:hidden;margin:10px 0}.progress>div{height:100%;background:var(--accent);width:0%}.candidate{border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0}.candidate select{margin:8px 0}.candidate .candidate-summary{font-size:14px;line-height:1.55;white-space:pre-wrap}.toast{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:88px;background:#111827;color:white;border-radius:10px;padding:10px 14px;max-width:calc(100% - 30px);font-size:13px;box-shadow:0 8px 30px rgba(0,0,0,.2)}
.checklist{display:grid;gap:7px}.checkitem{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--line);border-radius:10px;padding:10px;background:white}.checkitem input{width:auto;min-height:auto;margin-top:3px}.checkitem div{flex:1}.checkitem small{display:block;color:var(--sub);margin-top:3px}.warning{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:10px;font-size:13px;line-height:1.5}.danger-text{color:var(--danger)}
@media(min-width:700px){.app{padding:22px}.grid2{grid-template-columns:repeat(4,1fr)}.bottom-nav{left:50%;transform:translateX(-50%);max-width:760px;border-left:1px solid var(--line);border-right:1px solid var(--line)}}

/* 2026-11-15 修正：チェックボックスが横幅いっぱいに広がり、Source一覧の文字が縦1列に潰れる不具合 */
input[type=checkbox],input[type=radio]{width:24px;height:24px;min-height:0;padding:0;flex:none;margin-top:2px}
.grow{min-width:0}
.card .row{align-items:flex-start}
html,body{max-width:100%;overflow-x:hidden}

/* 2026-11-15 「続きを考える」案内 */
.steps{display:flex;align-items:center;gap:6px;margin:4px 0 14px}
.step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--sub);white-space:nowrap}
.step .num{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;border:2px solid #cfd5dc;background:white;color:var(--sub);flex:none}
.step.now{color:var(--text);font-weight:700}
.step.now .num{background:var(--accent);border-color:var(--accent);color:white}
.step.done .num{background:#e7f6ec;border-color:#2f9e5b;color:#1f7a44}
.step.todo .lbl,.step.done .lbl{display:none}
.step-line{flex:1;height:2px;background:#d9dee5;min-width:10px}
.guide{background:white;border:2px solid var(--accent);border-radius:14px;padding:12px 14px;margin:0 0 18px}
.guide-row{display:flex;gap:10px;align-items:flex-start}
.guide-row+.guide-row{margin-top:8px;padding-top:8px;border-top:1px dashed var(--line)}
.guide-row p{margin:0;font-size:15px;line-height:1.6;flex:1}
.guide-row:first-child p{font-weight:700}
.guide-tag{flex:none;font-size:11px;font-weight:700;background:var(--accent);color:white;border-radius:6px;padding:3px 7px;margin-top:2px;min-width:68px;text-align:center}
.guide-tag.why{background:var(--soft);color:var(--text);border:1px solid var(--line)}
.think-title{font-size:19px;font-weight:700;line-height:1.4;margin-bottom:6px}
.hint{font-size:12.5px;color:var(--sub);line-height:1.55;margin:6px 0 0}
.plain{margin:4px 0 0;padding-left:20px;line-height:1.7}
.words{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}
.word{display:inline-flex;align-items:center;gap:2px;background:white;border:1px solid #b9c1cc;border-radius:999px;padding:4px 4px 4px 12px;font-size:14px}
.word button{border:0;background:none;width:30px;height:30px;font-size:17px;color:var(--sub);border-radius:50%}
.add-word{align-items:center}
.add-word input{flex:1}
.add-word .btn{flex:none}
.pick{display:flex;gap:11px;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:13px;margin:0 0 10px;font-weight:400;font-size:inherit}
.pick.on{border:2px solid var(--accent);padding:12px;background:#f3f6ff}
.pick-body{flex:1;min-width:0}
.pick .card-body{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.linkbtn{border:0;background:none;padding:0;color:#2452c7;text-decoration:underline;font-size:12px;min-height:24px}
.empty.small{padding:14px 12px;font-size:13px}
.btn.narrow{flex:none}
.task{background:white;border:1px solid var(--line);border-radius:14px;padding:14px;margin:0 0 12px}
.task.now{border:2px solid var(--accent);padding:13px}
.task.done{background:#f3faf5;border-color:#bfe3cb}
.task.todo{opacity:.62}
.task-head{display:flex;align-items:center;gap:9px;margin-bottom:6px}
.task-head h2{font-size:16px;margin:0}
.task-num{font-size:20px;font-weight:700;line-height:1;min-width:24px;text-align:center}
.task.done .task-num{color:#1f7a44}
.task p{margin:6px 0 10px;line-height:1.6}
.task textarea{margin:10px 0}
.task details{margin-top:10px}
.task summary,.history summary{color:#2452c7;font-size:13px;min-height:30px;cursor:pointer}
.task .btn{flex:none;min-height:46px}
.task>.btn{width:100%}
.plain-steps{margin:6px 0;padding-left:22px;line-height:1.75}
.resume{background:#fffbeb;border:2px solid #f0c64a;border-radius:14px;padding:13px;display:flex;flex-direction:column;gap:10px}
.resume .row{align-items:center}
.history{margin-top:10px}
.history-item{border-left:3px solid var(--line);padding:2px 0 2px 10px;margin:8px 0}
.think-spacer{height:28px}
.think-backrow{width:100%;margin:4px 0 24px;min-height:46px}
