  :root{
    --bg: #15171c;
    --panel: #1d2027;
    --panel-2: #23262e;
    --line: #2d313b;
    --text: #e7e5e0;
    --text-dim: #8b8f99;
    --amber: #e8a33d;
    --teal: #4fb6a8;
    --red: #d9706c;
    --blue: #6f9ceb;
    --purple: #b98cf0;
    --pink: #e88ec9;
  }
  *{box-sizing:border-box;}
  html,body{height:100%;}
  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
    height:100vh; height:100dvh;
    overflow:hidden;
  }
  ::-webkit-scrollbar{width:8px;height:8px;}
  ::-webkit-scrollbar-thumb{background:#33373f;border-radius:4px;}
  .mono{font-family:'IBM Plex Mono','SFMono-Regular',Consolas,monospace;}

  /* ===== Sidebar ===== */
  #sidebar{
    width:300px; min-width:300px;
    background:var(--panel);
    border-right:1px solid var(--line);
    display:flex; flex-direction:column;
  }
  #sidebar-header{ padding:20px 18px 14px; border-bottom:1px solid var(--line); }
  #sidebar-header .eyebrow{
    font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.12em;
    color:var(--amber); text-transform:uppercase;
  }
  #sidebar-header h1{ margin:6px 0 0; font-size:19px; font-weight:700; letter-spacing:-0.01em; }
  #stats-row{
    display:flex; gap:10px; padding:12px 18px; border-bottom:1px solid var(--line);
    font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim);
  }
  #stats-row span b{color:var(--text);font-size:13px;}
  #overview-nav-btn{
    margin:12px 14px 0;
    display:flex; align-items:center; gap:8px;
    background:var(--panel-2); border:1px solid var(--line); color:var(--text);
    padding:9px 12px; border-radius:8px; font-size:13px; cursor:pointer;
    font-family:'IBM Plex Mono',monospace;
  }
  #overview-nav-btn:hover{border-color:var(--amber);}
  #overview-nav-btn.active{border-color:var(--amber); color:var(--amber);}
  #overview-nav-btn .dot{width:7px;height:7px;border-radius:50%;background:var(--amber);}

  #search-add{ padding:12px 14px; display:flex; gap:8px; border-bottom:1px solid var(--line); }
  #search-input{
    flex:1; background:var(--panel-2); border:1px solid var(--line); color:var(--text);
    padding:8px 10px; border-radius:6px; font-size:13px; outline:none;
  }
  #search-input:focus{border-color:var(--amber);}
  #new-project-btn{
    background:var(--amber); color:#1a1a1a; border:none; border-radius:6px;
    width:34px; font-size:18px; font-weight:700; cursor:pointer; line-height:1;
  }
  #new-project-btn:hover{filter:brightness(1.08);}
  #project-list{ flex:1; overflow-y:auto; padding:8px; }
  .project-item{
    padding:12px 12px; border-radius:8px; cursor:pointer; margin-bottom:4px;
    border:1px solid transparent; transition:background .12s ease;
  }
  .project-item:hover{background:var(--panel-2);}
  .project-item.active{ background:var(--panel-2); border-color:var(--line); }
  .project-item .row1{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
  .project-item .pname{ font-weight:600; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .project-item .pcat{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--text-dim); margin-top:3px; }
  .status-pill{
    font-family:'IBM Plex Mono',monospace; font-size:10px; letter-spacing:.04em; text-transform:uppercase;
    padding:2px 8px; border-radius:999px; white-space:nowrap; flex-shrink:0;
  }
  .status-active{background:rgba(232,163,61,.15); color:var(--amber);}
  .status-blocked{background:rgba(217,112,108,.15); color:var(--red);}
  .status-done{background:rgba(79,182,168,.15); color:var(--teal);}
  .status-planning{background:rgba(111,156,235,.15); color:var(--blue);}
  .status-paused{background:rgba(139,143,153,.15); color:var(--text-dim);}
  #empty-list{ color:var(--text-dim); font-size:13px; padding:30px 16px; text-align:center; }

  /* ===== Main panel ===== */
  #main{ flex:1; display:flex; flex-direction:column; overflow:hidden; }
  #main-empty{
    flex:1; display:flex; align-items:center; justify-content:center;
    flex-direction:column; color:var(--text-dim); gap:10px;
  }
  #main-empty .big{
    font-family:'IBM Plex Mono',monospace; font-size:13px; letter-spacing:.1em;
    text-transform:uppercase; color:#565a63;
  }

  #detail{ display:none; flex-direction:column; height:100%; height:100dvh; }
  #detail-header{ padding:24px 32px 14px; border-bottom:1px solid var(--line); }
  #detail-header .top-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
  #detail-title{
    font-size:24px; font-weight:700; letter-spacing:-0.01em; margin:0;
    background:transparent; border:none; color:var(--text); width:100%; font-family:inherit;
  }
  #detail-title:focus{outline:none;}
  #detail-meta{ display:flex; align-items:center; gap:12px; margin-top:10px; flex-wrap:wrap; }
  select.status-select{
    font-family:'IBM Plex Mono',monospace; font-size:11px; text-transform:uppercase; letter-spacing:.04em;
    padding:5px 10px; border-radius:999px; border:1px solid var(--line); cursor:pointer;
    background:var(--panel-2); color:var(--text);
  }
  #tag-editor{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  .tag-chip{
    display:inline-flex; align-items:center; gap:5px; font-family:'IBM Plex Mono',monospace; font-size:11px;
    background:rgba(232,163,61,.12); color:var(--amber); border:1px solid rgba(232,163,61,.35);
    padding:3px 6px 3px 9px; border-radius:999px;
  }
  .tag-chip .tag-chip-del{ background:none; border:none; color:inherit; cursor:pointer; font-size:10px; padding:0 3px; opacity:.75; }
  .tag-chip .tag-chip-del:hover{ opacity:1; }
  #tag-input{
    background:transparent; border:none; border-bottom:1px dashed var(--line); color:var(--text-dim);
    font-family:'IBM Plex Mono',monospace; font-size:12px; padding:3px 0; width:120px; outline:none;
  }
  #tag-input:focus{ border-color:var(--amber); }

  #tag-filter-wrap{ padding:12px 14px; border-bottom:1px solid var(--line); display:none; }
  #tag-filter-wrap.has-tags{ display:block; }
  #tag-filter-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
  #tag-filter-head span{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; }
  #tag-filter-clear{ background:none; border:none; color:var(--amber); font-size:11px; cursor:pointer; display:none; }
  #tag-filter-clear.show{ display:inline; }
  #tag-filter-list{ display:flex; flex-wrap:wrap; gap:6px; }
  .tag-filter-chip{
    font-family:'IBM Plex Mono',monospace; font-size:11px; padding:4px 10px; border-radius:999px;
    border:1px solid var(--line); background:var(--panel-2); color:var(--text-dim); cursor:pointer;
  }
  .tag-filter-chip.active{ background:rgba(232,163,61,.15); border-color:var(--amber); color:var(--amber); }
  .pcat .tag-mini{ color:var(--text-dim); }
  #delete-project-btn{
    background:none; border:1px solid var(--line); color:var(--text-dim); border-radius:6px;
    padding:7px 12px; font-size:12px; cursor:pointer; flex-shrink:0;
  }
  #delete-project-btn:hover{border-color:var(--red);color:var(--red);}

  /* Lane tabs */
  #lane-tabs{
    display:flex; gap:6px; padding:14px 32px 0; flex-wrap:wrap; align-items:center;
  }
  .lane-tab{
    font-family:'IBM Plex Mono',monospace; font-size:11.5px; padding:6px 12px; border-radius:999px;
    border:1px solid var(--line); background:var(--panel-2); color:var(--text-dim); cursor:pointer;
    display:flex; align-items:center; gap:6px;
  }
  .lane-tab .swatch{width:7px;height:7px;border-radius:50%;}
  .lane-tab.active{ color:var(--text); border-color:currentColor; }
  #add-lane-btn{
    font-family:'IBM Plex Mono',monospace; font-size:11.5px; padding:6px 10px; border-radius:999px;
    border:1px dashed var(--line); background:transparent; color:var(--text-dim); cursor:pointer;
  }
  #add-lane-btn:hover{ border-color:var(--amber); color:var(--amber); }
  .lane-del{
    background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:11px;padding:0;margin-left:2px;
  }
  .lane-del:hover{color:var(--red);}
  .lane-merge-btn{
    background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:12px;padding:0;margin-left:2px;
  }
  .lane-merge-btn:hover{color:var(--teal);}
  .lane-tab.closed{ opacity:.55; }
  .lane-folder-toggle{
    font-family:'IBM Plex Mono',monospace; font-size:11.5px; padding:6px 12px; border-radius:999px;
    border:1px dashed var(--line); background:transparent; color:var(--text-dim); cursor:pointer;
    display:flex; align-items:center; gap:6px;
  }
  .lane-folder-toggle:hover{ border-color:var(--text-dim); color:var(--text); }
  .lane-folder-toggle .chevron{ font-size:9px; transition:transform .12s; }
  .lane-folder-toggle.expanded .chevron{ transform:rotate(90deg); }
  .lane-tab .merged-badge{
    font-size:9.5px; color:var(--teal); border:1px solid rgba(79,182,168,.4); border-radius:999px;
    padding:0 6px; margin-left:2px;
  }
  #add-step-bar.disabled #step-input, #add-step-bar.disabled #add-step-btn, #add-step-bar.disabled #eta-input{
    opacity:.4; pointer-events:none;
  }
  #closed-lane-notice{
    font-size:12px; color:var(--text-dim); padding:0 0 10px; font-family:'IBM Plex Mono',monospace;
  }
  .merge-menu{
    position:fixed; z-index:20; background:var(--panel-2); border:1px solid var(--line); border-radius:8px;
    padding:6px; box-shadow:0 8px 24px rgba(0,0,0,.4); min-width:160px;
  }
  .merge-menu .mm-label{ font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--text-dim); padding:4px 8px; text-transform:uppercase; letter-spacing:.06em; }
  .merge-menu button{
    display:block; width:100%; text-align:left; background:none; border:none; color:var(--text);
    padding:7px 8px; border-radius:6px; font-size:13px; cursor:pointer;
  }
  .merge-menu button:hover{ background:var(--panel); }

  #modal-backdrop{
    display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:40;
    align-items:center; justify-content:center;
  }
  #modal-backdrop.open{ display:flex; }
  #modal-box{
    background:var(--panel); border:1px solid var(--line); border-radius:12px;
    padding:22px; width:90%; max-width:340px; box-shadow:0 12px 32px rgba(0,0,0,.5);
  }
  #modal-box h3{ margin:0 0 8px; font-size:16px; }
  #modal-box p{ margin:0 0 14px; font-size:13.5px; color:var(--text-dim); line-height:1.4; }
  #modal-input, #modal-input-2{
    width:100%; background:var(--panel-2); border:1px solid var(--line); color:var(--text);
    padding:9px 11px; border-radius:8px; font-size:14px; outline:none; margin-bottom:10px; font-family:inherit;
  }
  #modal-input:focus, #modal-input-2:focus{ border-color:var(--amber); }
  #modal-actions{ display:flex; justify-content:flex-end; gap:8px; }
  #modal-actions button{
    padding:8px 14px; border-radius:7px; font-size:13px; cursor:pointer; border:1px solid var(--line);
    background:var(--panel-2); color:var(--text);
  }
  #modal-actions .modal-primary{ background:var(--amber); border-color:var(--amber); color:#1a1a1a; font-weight:700; }
  #modal-actions .modal-danger{ background:var(--red); border-color:var(--red); color:#1a1a1a; font-weight:700; }

  #graph-tooltip{
    position:fixed; z-index:50; border:1px solid var(--line); border-radius:7px;
    width:240px; font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--text);
    pointer-events:none; opacity:0; transition:opacity .08s ease;
    box-shadow:0 6px 18px rgba(0,0,0,.45); overflow:hidden;
  }
  #graph-tooltip.show{ opacity:1; }
  #graph-tooltip .gt-header{
    background:var(--panel); padding:6px 11px; font-size:10.5px; font-weight:600;
    color:var(--amber); text-transform:uppercase; letter-spacing:.04em;
    border-bottom:1px solid var(--line);
  }
  #graph-tooltip .gt-body{
    background:var(--panel-2); padding:8px 11px;
  }
  #graph-tooltip .gt-text{ font-weight:500; white-space:pre-wrap; word-break:break-word; line-height:1.4; }
  #graph-tooltip .gt-date{ color:var(--text-dim); margin-top:5px; font-size:10.5px; }
  #graph-tooltip .gt-eta{ margin-top:4px; font-size:10.5px; padding:2px 7px; border-radius:999px; display:inline-block; }
  .gt-attachments{ margin-top:6px; border-top:1px solid var(--line); padding-top:5px; display:flex; flex-direction:column; gap:3px; }
  .gt-att-link{
    display:flex; align-items:center; gap:4px; color:var(--blue); text-decoration:none;
    font-size:10.5px; padding:2px 0;
  }
  .gt-att-link:hover{ color:var(--text); text-decoration:underline; }

  /* Log / steps feed */
  #log-wrap{ flex:1; overflow-y:auto; padding:18px 32px 24px; }
  .log-eyebrow{
    font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.12em; text-transform:uppercase;
    color:var(--text-dim); margin-bottom:16px;
  }
  #timeline{ position:relative; padding-left:24px; }
  #timeline::before{
    content:""; position:absolute; left:5px; top:6px; bottom:6px; width:1px; background:var(--line);
  }
  .log-entry{ position:relative; padding-bottom:22px; }
  .log-entry::before{
    content:""; position:absolute; left:-24px; top:4px; width:9px; height:9px; border-radius:50%;
    background: var(--dot-color, var(--amber)); border:2px solid var(--bg); box-shadow:0 0 0 1px var(--line);
  }
  .log-entry .log-top{ display:flex; align-items:center; gap:8px; }
  .log-entry .log-time{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); margin-bottom:4px; }
  .log-entry .log-text{ font-size:14px; line-height:1.5; white-space:pre-wrap; }
  .log-entry.is-done .log-text{ color:var(--text-dim); text-decoration:line-through; }
  .log-entry .log-eta{
    font-family:'IBM Plex Mono',monospace; font-size:11px; margin-top:5px; display:inline-block;
    padding:2px 8px; border-radius:999px;
  }
  .eta-upcoming{background:rgba(232,163,61,.12); color:var(--amber);}
  .eta-overdue{background:rgba(217,112,108,.15); color:var(--red);}
  .eta-done{background:rgba(79,182,168,.12); color:var(--teal);}
  .log-done-toggle{
    width:16px;height:16px;border-radius:50%;border:1.5px solid var(--line);background:none;cursor:pointer;
    flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; font-size:10px; color:transparent;
  }
  .log-done-toggle.checked{ background:var(--teal); border-color:var(--teal); color:#0e1512; }
  .log-actions{
    position:absolute; right:0; top:0; display:flex; gap:4px;
    opacity:0; transition:opacity .12s;
  }
  .log-entry:hover .log-actions{opacity:1;}
  .log-actions button{
    background:none; border:none; color:var(--text-dim); cursor:pointer; font-size:12px; padding:2px;
  }
  .log-actions .log-attach:hover{color:var(--blue);}
  .log-actions .log-del:hover{color:var(--red);}
  #no-steps{ color:var(--text-dim); font-size:13px; padding:6px 0; }

  #add-step-bar{ padding:10px 32px 16px; border-top:1px solid var(--line); }
  #add-step-row{ display:flex; gap:6px; align-items:stretch; }
  #step-input-wrap{
    flex:1; display:flex; align-items:center; background:var(--panel-2);
    border:1px solid var(--line); border-radius:8px; padding:4px;
    min-width:0; min-height:36px;
  }
  #step-input-wrap:focus-within{ border-color:var(--amber); }
  #step-input{
    background:transparent; border:none; color:var(--text);
    padding:5px 8px; font-size:13px; font-family:inherit; resize:none;
    outline:none; max-height:120px; min-width:0; flex:1;
  }
  #eta-badge{
    display:flex; flex-direction:column; align-items:center; flex-shrink:0;
    font-family:'IBM Plex Mono',monospace; font-size:9px; line-height:1.2;
    background:rgba(232,163,61,.12); color:var(--amber); border:1px solid rgba(232,163,61,.3);
    padding:2px 6px; border-radius:6px; margin-right:2px; position:relative;
  }
  #eta-badge-date, #eta-badge-time{ white-space:nowrap; }
  #eta-clear{
    position:absolute; top:-5px; right:-5px;
    background:var(--panel-2); border:1px solid rgba(232,163,61,.3); color:var(--amber);
    width:14px; height:14px; border-radius:50%; cursor:pointer;
    font-size:8px; padding:0; display:flex; align-items:center; justify-content:center;
    opacity:.8;
  }
  #eta-clear:hover{ opacity:1; }
  #eta-clear{
    background:none; border:none; color:var(--amber); cursor:pointer;
    font-size:8px; padding:0 2px; opacity:.7;
  }
  #eta-clear:hover{ opacity:1; }
  #attach-toggle, #eta-toggle{
    background:none; border:1px solid var(--line); border-radius:8px;
    width:36px; min-height:36px; cursor:pointer; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    color:var(--text-dim);
  }
  #attach-toggle:hover, #eta-toggle:hover{ border-color:var(--amber); color:var(--text); }
  #attach-toggle.has-attachments, #eta-toggle.has-eta{ border-color:var(--amber); color:var(--amber); background:rgba(232,163,61,.1); }

  .attachment-list{
    display:flex; flex-wrap:wrap; gap:5px; margin-top:6px;
  }
  .attachment-chip{
    display:inline-flex; align-items:center; gap:2px;
    font-family:'IBM Plex Mono',monospace; font-size:10.5px;
    background:var(--panel-2); border:1px solid var(--line); color:var(--text-dim);
    padding:3px 4px 3px 8px; border-radius:6px;
  }
  .attachment-chip a{
    display:inline-flex; align-items:center; gap:4px;
    color:inherit; text-decoration:none;
  }
  .attachment-chip:hover{ border-color:var(--amber); color:var(--text); }
  .attachment-chip .att-icon{ font-size:12px; filter:grayscale(1)brightness(0.7); }
  .att-del{
    background:none; border:none; color:var(--text-dim); cursor:pointer;
    font-size:9px; padding:0 3px; opacity:.5;
  }
  .att-del:hover{ opacity:1; color:var(--red); }

  .mini-confirm{
    background:var(--panel); border:1px solid var(--line); border-radius:8px;
    padding:8px 10px; box-shadow:0 4px 14px rgba(0,0,0,.45);
    display:flex; align-items:center; gap:8px;
    font-family:'IBM Plex Mono',monospace; font-size:11px;
  }
  .mini-confirm-text{ color:var(--text-dim); white-space:nowrap; }
  .mini-confirm-yes, .mini-confirm-no{
    border:none; border-radius:5px; padding:4px 10px; font-size:11px;
    font-family:'IBM Plex Mono',monospace; cursor:pointer;
  }
  .mini-confirm-yes{ background:var(--red); color:#1a1a1a; font-weight:600; }
  .mini-confirm-yes:hover{ filter:brightness(1.1); }
  .mini-confirm-no{ background:var(--panel-2); color:var(--text-dim); border:1px solid var(--line); }
  .mini-confirm-no:hover{ color:var(--text); }

  .pending-attachments{
    display:flex; flex-wrap:wrap; gap:4px; margin:0 4px 3px;
  }
  .pending-att-chip{
    display:inline-flex; align-items:center; gap:3px;
    font-family:'IBM Plex Mono',monospace; font-size:9.5px;
    background:rgba(111,156,235,.12); color:var(--blue); border:1px solid rgba(111,156,235,.3);
    padding:1px 3px 1px 6px; border-radius:999px;
  }
  .pending-att-del{
    background:none; border:none; color:var(--blue); cursor:pointer;
    font-size:8px; padding:0 2px; opacity:.7;
  }
  .pending-att-del:hover{ opacity:1; }
  #eta-input{ position:absolute; opacity:0; pointer-events:none; }
  #add-step-btn{
    background:var(--amber); color:#1a1a1a; border:none; border-radius:8px;
    width:36px; min-height:36px; font-size:18px; font-weight:700; cursor:pointer; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  #add-step-btn:hover{filter:brightness(1.08);}

  /* ===== Overview graph ===== */
  #overview{ display:none; flex-direction:column; height:100%; }
  #overview-header{ padding:24px 32px 14px; border-bottom:1px solid var(--line); }
  #overview-header h2{ margin:0; font-size:20px; font-weight:700; }
  #overview-header p{ margin:6px 0 0; color:var(--text-dim); font-size:13px; }
  #overview-header .oh-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
  #orientation-toggle{ display:flex; gap:4px; background:var(--panel-2); border:1px solid var(--line); border-radius:999px; padding:3px; flex-shrink:0; }
  #orientation-toggle button{
    font-family:'IBM Plex Mono',monospace; font-size:11.5px; padding:6px 12px; border-radius:999px; border:none;
    background:transparent; color:var(--text-dim); cursor:pointer;
  }
  #orientation-toggle button.active{ background:var(--amber); color:#1a1a1a; font-weight:700; }
  #overview-body{ flex:1; overflow:auto; padding:20px 32px 40px; position:relative; }
  .ov-project{ margin-bottom:34px; }
  .ov-project-head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
  .ov-project-head .ov-name{ font-weight:700; font-size:15px; }
  .ov-project-head .ov-count{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); }
  .ov-graph-wrap{ overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:var(--panel); padding:10px 4px; }
  .ov-empty-proj{ color:var(--text-dim); font-size:12.5px; padding:10px 2px; }
  .ov-legend{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom:18px; font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); }
  .ov-legend span{ display:inline-flex; align-items:center; gap:6px; }
  .ov-legend i{ width:9px;height:9px;border-radius:50%; display:inline-block; }
  .ov-drag-handle{
    cursor:grab; color:var(--text-dim); font-size:16px; line-height:1;
    padding:4px 6px; border-radius:4px; user-select:none; touch-action:none; flex-shrink:0;
  }
  .ov-drag-handle:hover{ color:var(--text); background:var(--panel-2); }
  .ov-project{ border-radius:12px; border:1px solid transparent; padding:4px; position:relative; }
  .ov-project.ov-dragging{
    position:absolute; z-index:10; opacity:0.85; border-color:var(--amber);
    background:var(--panel); box-shadow:0 8px 24px rgba(0,0,0,.4); pointer-events:none;
  }
  .ov-drag-placeholder{
    border:2px dashed var(--line); border-radius:12px; background:transparent;
    margin-bottom:34px;
  }

  .toast{
    position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--panel-2);
    border:1px solid var(--line); padding:9px 16px; border-radius:8px; font-size:12px; color:var(--text-dim);
    opacity:0; transition:opacity .25s; pointer-events:none;
  }
  .toast.show{opacity:1;}

  #global-hamburger{
    display:none; position:fixed; top:14px; left:14px; z-index:25;
    width:38px;height:38px; align-items:center; justify-content:center;
    background:var(--panel-2); border:1px solid var(--line); border-radius:8px;
    color:var(--text); cursor:pointer; font-size:16px;
  }
  #sidebar-backdrop{
    display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:10;
  }

  @supports (-webkit-touch-callout: none) {
    input, select, textarea { font-size: 16px !important; }
  }

  @media (max-width: 760px){
    #sidebar{position:fixed;z-index:20;height:100%;transform:translateX(-100%);transition:transform .2s;}
    #sidebar.open{transform:translateX(0);}
    #global-hamburger{display:flex;}
    #sidebar-backdrop.open{display:block;}
    #sidebar-header{ padding-top:60px; }
    #detail-header,#log-wrap,#add-step-bar,#overview-header,#overview-body{padding-left:16px;padding-right:16px;}
    #detail-header{padding-top:54px;}
    #overview-header{padding-top:54px;}
    #main-empty{padding-top:44px;}
    #detail-title{font-size:20px;}
    #add-step-row{flex-wrap:nowrap;}
    .ov-graph-wrap{-webkit-overflow-scrolling:touch;}

    .user-info-row{ flex-direction:column; align-items:stretch; gap:6px; }
    .logout-btn{ min-height:44px; display:flex; align-items:center; justify-content:center; }

    #lane-tabs{ flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:10px; }
    .lane-tab, #add-lane-btn, .lane-folder-toggle{ flex-shrink:0; }

    #add-step-bar{ padding:8px 16px 12px; }
    #attach-toggle, #eta-toggle{ width:44px; height:44px; }
    #add-step-btn{ width:44px; height:44px; }

    .log-actions{ opacity:0.6; }

    #modal-box{ max-height:90vh; overflow-y:auto; }

    #new-project-btn{ min-width:44px; min-height:44px; }
    #delete-project-btn{ min-height:44px; }
    .log-done-toggle{ width:28px; height:28px; font-size:13px; }

    #overview-body{ padding:16px 16px 32px; }
    .ov-legend{ gap:10px; }
  }

  @media (max-width: 400px){
    #detail-header,#log-wrap,#add-step-bar{ padding-left:12px; padding-right:12px; }
    #detail-title{ font-size:18px; }
    #lane-tabs{ padding:10px 12px 8px; }
    #overview-header,#overview-body{ padding-left:12px; padding-right:12px; }
  }
  /* ===== App wrapper ===== */
  #app-wrap{
    display:flex;
    width:100%;
    height:100vh; height:100dvh;
    overflow:hidden;
  }

  /* ===== User info ===== */
  .user-info-row{
    display:flex; align-items:center; gap:8px; margin-top:10px; flex-wrap:wrap;
  }
  .user-name{
    font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--text-dim);
  }
  .logout-btn{
    background:none; border:1px solid var(--line); color:var(--text-dim); border-radius:6px;
    padding:4px 10px; font-size:11px; cursor:pointer; font-family:'IBM Plex Mono',monospace;
  }
  .logout-btn:hover{ border-color:var(--red); color:var(--red); }
