/* AI Cockpit: the Cockpit (see cockpit.js). Same tokens as the board, light and dark. */
#board[hidden],#cockpit[hidden]{display:none}
#cockpit{flex:1;min-height:0;overflow-y:auto;padding:14px 12px calc(28px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
.ck-wrap{max-width:1180px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.ck-head{display:flex;align-items:center;gap:10px}
.ck-head h2{display:flex;align-items:center;gap:8px;margin:0;font-size:18px;font-weight:700}
.ck-head h2 .ico{width:20px;height:20px;color:var(--accent)}
.ck-wrap .banner-warn{border-radius:10px;border:1px solid color-mix(in srgb,var(--bad) 40%,transparent)}
.ck-tab .ico{width:15px;height:15px}
.tab.ck-tab{display:inline-flex;align-items:center;gap:5px;font-weight:600}
.tab.ck-tab.on .ico{color:var(--accent)}

/* actions: tiles */
.ck-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.ck-tile{display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;padding:14px;border-radius:14px;background:var(--card);border:1px solid var(--line);min-height:118px;color:var(--ink);transition:border-color .15s,background .15s,transform .1s}
@media (hover:hover){.ck-tile:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));background:color-mix(in srgb,var(--brand-soft) 55%,var(--card))}}
.ck-tile:active{transform:scale(.985)}
.ck-tile:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.ck-ico{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:var(--brand-soft);font-size:24px;line-height:1}
.ck-ico.sm{width:34px;height:34px;border-radius:10px;font-size:18px}
.ck-tt{font-weight:650;font-size:14.5px;line-height:1.25;margin-top:4px}
.ck-ds{font-size:12px;color:var(--quiet);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ck-meta{margin-top:auto;padding-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ck-chip{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--blue);background:color-mix(in srgb,var(--blue) 10%,transparent);border-radius:999px;padding:2px 8px 2px 6px;white-space:nowrap}
.ck-chip .ico{width:12px;height:12px}
.ck-chip.off{color:var(--quiet);background:var(--bg)}
.ck-when{font-size:11px;color:var(--quiet)}
.ck-h2{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--quiet);margin-top:10px}
.ck-empty{color:var(--quiet);font-style:italic;padding:6px 0}
.ck-older{text-align:center}

/* runs: cards */
.ck-runs{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,460px),1fr));gap:12px;align-items:start}
.ck-run{background:var(--card);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-width:0;scroll-margin-top:12px}
.ck-run.ck-waiting{border-color:var(--warn);box-shadow:0 0 0 1px var(--warn)}
.ck-run.ck-error{border-color:color-mix(in srgb,var(--bad) 60%,var(--line))}
.ck-run.ck-flash{animation:ckflash 1.6s ease-out}
@keyframes ckflash{0%,40%{box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 55%,transparent)}100%{box-shadow:0 0 0 0 transparent}}
.ck-main{padding:12px 14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.ck-rh{display:flex;gap:10px;align-items:flex-start}
.ck-rt{flex:1;min-width:0}
.ck-rt b{font-size:14px;font-weight:650}
.ck-rl{display:block;font-size:13px;color:var(--ink);overflow-wrap:anywhere;margin-top:1px}
.ck-rm{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:11.5px;color:var(--quiet);margin-top:5px}
.ck-rm span{display:inline-flex;align-items:center;gap:3px}
.ck-rm .ico{width:12px;height:12px}
.ck-st-working{color:var(--blue)}.ck-st-waiting{color:var(--warn)}.ck-st-done{color:var(--good)}.ck-st-error{color:var(--bad)}.ck-st-unknown{color:var(--quiet)}
.ck-ra{display:flex;gap:0;margin:-4px -6px 0 0}
.ck-ra a.icn{display:inline-flex;align-items:center;justify-content:center}
.ck-in{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--quiet);background:var(--bg);border-radius:9px;padding:7px 10px}
.ck-in span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.ck-in b{font-weight:600;color:var(--ink)}
.ck-ask{display:flex;flex-direction:column;gap:8px;border:1px solid var(--warn);background:color-mix(in srgb,var(--warn) 8%,var(--card));border-radius:10px;padding:9px 10px;font-size:13px}
.ck-ask pre{white-space:pre-wrap;word-break:break-word;font:11.5px/1.4 ui-monospace,Menlo,monospace;margin:0;max-height:110px;overflow:auto}
.ck-ask .btns button{padding:8px 12px;font-size:13px;font-weight:600}
.ck-live{display:flex;align-items:center;gap:8px;font:11.5px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--blue);min-width:0}
.ck-live{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ck-spin{flex:none;width:11px;height:11px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}
.ck-sec{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--quiet);margin-bottom:-4px}
.ck-sec .n{font-weight:500;margin-left:4px}
.ck-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px}
.ck-file{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--bg);min-width:0}
.ck-prev{display:block;aspect-ratio:4/3;background:var(--card);border-bottom:1px solid var(--line);overflow:hidden}
.ck-prev img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.ck-ext{display:grid;place-items:center;height:100%;font:700 15px ui-monospace,Menlo,monospace;color:var(--accent);background:var(--brand-soft)}
.ck-ext .ico{width:26px;height:26px}
.ck-fn{font-size:12px;font-weight:600;padding:6px 8px 0;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ck-fm{font-size:11px;color:var(--quiet);padding:2px 8px 7px}
.ck-fa{position:absolute;top:6px;right:6px;display:flex;gap:4px}
.ck-btn{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;background:color-mix(in srgb,var(--card) 92%,transparent);border:1px solid var(--line);color:var(--ink);box-shadow:0 1px 4px rgba(15,23,42,.12)}
.ck-btn .ico{width:15px;height:15px}
@media (hover:hover){.ck-btn:hover{color:var(--accent)}}
.ck-links{display:flex;flex-wrap:wrap;gap:6px}
.ck-links a{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:999px;background:color-mix(in srgb,var(--blue) 10%,transparent);color:var(--blue);font-weight:600;font-size:12.5px;text-decoration:none}
.ck-links a .ico{width:13px;height:13px}
.ck-res{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.ck-res.long:not(.open){max-height:13.5em;overflow:hidden;-webkit-mask-image:linear-gradient(#000 65%,transparent);mask-image:linear-gradient(#000 65%,transparent)}
.ck-more{align-self:flex-start;font-size:12.5px;margin-top:-4px}
.ck-note{font-size:12px;color:var(--quiet)}
.ck-foot{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px 14px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--bg) 55%,var(--card));border-radius:0 0 13px 13px}
.ck-foot[hidden]{display:none}
.ck-foot textarea{flex:1;min-height:42px;height:42px;padding:10px 12px;line-height:20px;background:var(--card);resize:none}
.ck-foot button{height:42px;min-height:42px;padding:0 16px}
.ck-foot textarea:focus{outline:none;border-color:var(--accent)}
.ck-foot button{flex:none;align-self:flex-end}

/* the action's form and the settings */
.modal-head h2{display:flex;align-items:center;gap:8px}
.ck-form{width:min(560px,100%)}
.ck-desc{margin:-4px 0 0;color:var(--quiet);font-size:12.5px;line-height:1.45}
.ck-lab{font-size:12px;font-weight:600;color:var(--quiet)}
.ck-req{font-weight:500;color:var(--accent);margin-left:4px}
.ck-hint{font-size:11.5px;color:var(--quiet);line-height:1.4;overflow-wrap:anywhere}
.ck-form textarea{min-height:64px}
.ck-field{display:flex;flex-direction:column;gap:5px}
.ck-folder{display:flex;gap:6px}
.ck-folder input{flex:1;min-width:0}
.ck-browse{border:1px solid var(--line);border-radius:10px;background:var(--bg);display:flex;flex-direction:column;overflow:hidden}
.ck-browse[hidden]{display:none}
.ck-bhead{padding:8px 8px 0}
.ck-bhead select{width:100%}
.ck-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px 4px;padding:8px 10px 6px;font-size:12.5px;color:var(--quiet);min-width:0}
.ck-crumbs button{border:none;background:none;padding:2px 4px;margin:0 -2px;min-height:0;color:var(--blue);font-size:12.5px;border-radius:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-crumbs b{color:var(--ink);font-weight:600;overflow-wrap:anywhere}
.ck-dirs{max-height:260px;overflow-y:auto;display:flex;flex-direction:column;border-top:1px solid var(--line)}
.modal .ck-dirs button.ck-dir{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;border:none;border-bottom:1px solid var(--line);border-radius:0;background:var(--card);text-align:left;padding:9px 12px;color:var(--ink);min-height:0}
.modal .ck-dirs button.ck-dir:last-child{border-bottom:none}
.ck-dir .ico{width:16px;height:16px;color:var(--quiet);flex:none}
.ck-dir span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-dirs .ck-note{padding:10px 12px}
@media (hover:hover){.modal .ck-dirs button.ck-dir:hover{background:var(--brand-soft)}}
.ck-bfoot{display:flex;align-items:center;gap:10px;padding:8px 10px;border-top:1px solid var(--line)}
.ck-bfoot small{flex:1;color:var(--quiet);font-size:11.5px}
.ck-bfoot button{max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-addrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ck-addrow button{display:inline-flex;align-items:center;gap:6px}
.ck-addrow .ico{width:14px;height:14px}
.ck-filelist{display:flex;flex-wrap:wrap;gap:6px}
.ck-filelist:empty{display:none}
.ck-fchip{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid var(--line);border-radius:999px;padding:3px 4px 3px 9px;font-size:12px;background:var(--bg)}
.ck-fchip .ico{width:13px;height:13px;color:var(--quiet);flex:none}
.ck-fchip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-fchip small{color:var(--quiet);white-space:nowrap}
.ck-fchip button{display:grid;place-items:center;width:22px;height:22px;min-height:0;min-width:0;padding:0;border-radius:50%;border:none;background:var(--quiet);color:#fff;flex:none}
.ck-fchip button .ico{width:12px;height:12px;color:#fff;stroke-width:2.5}
@media (hover:hover){.ck-fchip button:hover{background:var(--bad)}}
.ck-sched{border:1px solid var(--line);border-radius:10px;padding:9px 11px}
.ck-sched summary{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--ink);font-weight:600;list-style:none}
.ck-sched summary::-webkit-details-marker{display:none}
.ck-sched summary .ico{width:16px;height:16px;color:var(--blue)}
.ck-schst{font-size:12px;color:var(--good);font-weight:600;margin-top:8px}
.ck-schrow{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0 6px}
.ck-schrow [hidden]{display:none}
.ck-schrow select,.ck-schrow input{flex:1 1 120px}
.ck-schbtn{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.ck-schbtn button{display:inline-flex;align-items:center;gap:5px}
.ck-schbtn .ico{width:14px;height:14px}
/* smart start: its own form */
#ckSmModal .ck-form{display:flex;flex-direction:column;gap:14px}
.ck-sm-win label{align-items:center}
.ck-sm-win label span{display:flex;flex-direction:column;gap:1px}
.ck-sm-custom{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.ck-sm-custom[hidden]{display:none}
.ck-sm-days{display:flex;flex-wrap:wrap;gap:6px}
.modal .ck-sm-days label{position:relative;cursor:pointer;display:block}
.ck-sm-why{font-size:12px;color:var(--quiet);font-weight:600;background:var(--bg);border-radius:8px;padding:7px 10px}
.ck-sm-days input{position:absolute;opacity:0;pointer-events:none}
.ck-sm-days span{display:inline-grid;place-items:center;min-width:42px;min-height:34px;padding:0 10px;border:1px solid var(--line);border-radius:999px;font-size:13px;font-weight:600;color:var(--quiet);background:var(--card)}
.ck-sm-days input:checked+span{color:var(--blue);background:color-mix(in srgb,var(--blue) 12%,transparent);border-color:color-mix(in srgb,var(--blue) 40%,transparent)}
.ck-sm-days input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}
.ck-sm-conds{display:flex;flex-direction:column;gap:2px;margin-bottom:6px}
.modal label.ck-sm-chk{display:flex;flex-direction:row;align-items:flex-start;gap:8px;font-size:13px;color:var(--ink);cursor:pointer;padding:5px 0}
.modal .ck-sm-chk input{margin-top:2px;flex:none}
.ck-sm-chk small{display:block;color:var(--quiet);font-size:11.5px}
.ck-form .btns button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.ck-form .btns .ico{width:15px;height:15px}
.ck-form .dlg-sec label{gap:4px}
.ck-toast{position:fixed;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:80;background:var(--ink);color:var(--card);padding:9px 16px;border-radius:10px;font-size:13px;box-shadow:var(--shadow);max-width:calc(100vw - 32px)}

@media (pointer:coarse){
  .ck-foot textarea{min-height:46px;height:46px;padding:12px 14px;line-height:20px}
  .ck-foot button{height:46px;min-height:46px;font-size:15px}
  .modal .ck-dirs button.ck-dir{min-height:48px}
  .ck-btn{width:36px;height:36px}
  .ck-fchip button{width:30px;height:30px}
}
@media (max-width:600px){
  #cockpit{padding:10px 12px calc(28px + env(safe-area-inset-bottom))}
  .ck-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .ck-tile{padding:12px;min-height:108px;border-radius:12px}
  .ck-ico{width:38px;height:38px;font-size:21px;border-radius:10px}
  .ck-tt{font-size:14px}
  .ck-files{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ck-res{font-size:14px}
  .ck-main{padding:12px}
  .ck-foot{padding:10px 12px}
}

/* settings: folders as a list (a row per folder, add and remove) */
.ck-flist{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card)}
.ck-frow{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--line);min-width:0}
.ck-frow > .ico{width:18px;height:18px;color:var(--accent);flex:none}
.ck-fname{flex:1;min-width:0;display:flex;flex-direction:column}
.ck-fname b{font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-fname small{font-size:11.5px;color:var(--quiet);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-frow button{flex:none}
.ck-tag{flex:none;font-size:11px;color:var(--quiet);background:var(--bg);border-radius:999px;padding:2px 8px}
.ck-flist .ck-fempty{padding:10px 12px;border-bottom:1px solid var(--line)}
.modal .ck-flist button.ck-fadd{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;border:none;border-radius:0;background:none;padding:10px 12px;color:var(--accent);font-weight:600;min-height:0}
.ck-fadd .ico{width:16px;height:16px}
@media (hover:hover){.modal .ck-flist button.ck-fadd:hover{background:var(--brand-soft)}}
.ck-flist > :last-child{border-bottom:none}
@media (pointer:coarse){.modal .ck-flist button.ck-fadd{min-height:46px}}

.ck-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:420px){.ck-row2{grid-template-columns:1fr}}

.ck-frow2{display:flex;align-items:flex-end;gap:8px}
.ck-foot .atts .att:not(.doc){width:52px;height:52px}
.ck-foot button.ck-attach{width:42px;padding:0;color:var(--quiet)}
.ck-foot button.ck-attach .ico{width:17px;height:17px}
@media (hover:hover){.ck-foot button.ck-attach:hover{color:var(--accent)}}
@media (pointer:coarse){.ck-foot button.ck-attach{width:46px}}
/* routines of the Claude app, taken over as actions */
.ck-set-btns{display:flex;gap:8px;flex-wrap:wrap}
.ck-rt-list{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow-y:auto}
.ck-rti{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);cursor:pointer}
.ck-rti input{margin-top:3px;flex:none}.ck-rti span{display:flex;flex-direction:column;gap:2px;min-width:0}.ck-rti b{font-size:13.5px}.ck-rti small{color:var(--quiet);font-size:12px}
.ck-rti.off{opacity:.55;cursor:default}
.ck-proj{display:flex;align-items:center;gap:6px}.ck-proj .ico{width:14px;height:14px;flex:none}
/* the tile's head: the icon, and when it runs / its folder on the right */
.ck-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;width:100%}
.ck-chips{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:0}
.ck-chips .ck-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.ck-ico .ico{width:22px;height:22px;color:var(--accent);stroke-width:1.8}
.ck-ico.sm .ico{width:17px;height:17px}
.ck-inb-ic .ico{width:15px;height:15px;color:var(--accent)}
/* the action's name in its form: a click renames it */
button.ck-ttl{display:inline-flex;align-items:center;gap:6px;min-height:0;padding:2px 6px;margin-left:-6px;border:1px solid transparent;border-radius:7px;background:none;color:inherit;font:inherit;cursor:text;text-align:left}
button.ck-ttl .ico{width:14px;height:14px;color:var(--quiet);opacity:.6;flex:none}
@media (hover:hover){button.ck-ttl:hover{border-color:var(--line)}button.ck-ttl:hover .ico{opacity:1}}
input.ck-ttl-in{font:inherit;font-weight:700;padding:2px 6px;border:1px solid var(--accent);border-radius:7px;background:var(--bg);color:var(--ink);min-width:0;width:min(420px,70vw)}
.ck-nx{margin-top:2px}.ck-nx .nx{margin-top:0}
