/* Direct compact top and stable floating icon dock tuning */
.hdr{padding:calc(env(safe-area-inset-top) + 8px) 16px 4px;}
.hdr-logo{font-size:28px;letter-spacing:-.75px;}
.hdr-actions{gap:2px;}
.icon-btn{width:36px;height:36px;border-radius:10px;}
.icon-btn svg{width:20px;height:20px;stroke-width:1.7;}

.boards-folder-hdr{margin-top:18px;margin-bottom:18px;}
.boards-folder-name{font-size:22px;line-height:1.15;letter-spacing:-.45px;}
.board-title{font-size:25px;line-height:1.15;letter-spacing:-.55px;}
.bi-title,.card-title{font-size:19px;line-height:1.22;letter-spacing:-.28px;}
.bi-desc,.card-desc{font-size:15px;line-height:1.35;}

.bnav{
  position:fixed;
  left:0;
  right:0;
  margin:0 auto;
  bottom:max(12px,calc(env(safe-area-inset-bottom) + 8px));
  width:min(690px,calc(100vw - 112px));
  height:58px;
  padding:8px 18px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  align-items:center;
  border:0;
  border-top:0;
  border-radius:999px;
  background:rgba(245,245,247,.85);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  box-shadow:0 2px 16px rgba(0,0,0,.08);
  overflow:hidden;
  z-index:180;
}
.nbtn{
  min-width:0;
  width:42px;
  height:42px;
  padding:0;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  color:var(--ink);
  background:transparent;
  font-size:0;
  text-indent:0;
  overflow:visible;
}
.nbtn svg{
  display:block;
  width:26px;
  height:26px;
  min-width:26px;
  min-height:26px;
  stroke:currentColor;
  stroke-width:1.9;
  fill:none;
  overflow:visible;
}
.nbtn.active{
  color:var(--ink);
  background:transparent;
}
.nbtn:active{
  background:rgba(0,0,0,.06);
  transform:scale(.96);
}
#nav-calendar{display:flex;}
#nav-add{display:flex;font-size:0;}
.view .scroll{padding-bottom:calc(92px + env(safe-area-inset-bottom));}

#view-settings .scroll{
  padding-bottom:calc(112px + env(safe-area-inset-bottom));
}

body:has(#view-canvas.active) .bnav{
  display:none;
}

#reorder-btn,
#boards-reorder-btn{
  display:none;
}

.cards-list{
  position:relative;
}
.cards-list .card,
.cards-list .section-hdr{
  position:relative;
  z-index:1;
}
.Trille-board-lines{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:0;
  overflow:visible;
}
.Trille-board-line-path{
  fill:none;
  stroke:var(--line);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.95;
}
.Trille-board-line-dot{
  fill:var(--surface);
  stroke:var(--line);
  stroke-width:2;
}
.Trille-board-line-arrow{
  fill:var(--line);
}
.Trille-linked-flow{
  margin-top:12px;
  padding-top:12px;
  border-top:.5px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.Trille-linked-label{
  width:100%;
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--ink3);
}
.Trille-linked-chip{
  max-width:100%;
  padding:6px 10px;
  border-radius:999px;
  background:var(--bg2);
  color:var(--ink2);
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.Trille-linked-chip:active{
  background:var(--line);
  color:var(--ink);
}

[data-dark] .bnav{
  background:rgba(28,28,30,.85);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  box-shadow:0 4px 24px rgba(0,0,0,.4);
  border:0;
  border-top:0;
}

[data-dark] .nbtn{
  color:rgba(255,255,255,.76);
}
[data-dark] .nbtn.active{
  color:#fff;
  background:rgba(255,255,255,.14);
}
[data-dark] .nbtn:active{
  background:rgba(255,255,255,.18);
}

.board-back-hdr{padding:1px 0 4px;}
.board-nav-left span,.boards-back span{font-size:11px;}
.board-nav-left svg,.boards-back svg{width:18px;height:18px;}

/* === Sticky color tray behavior === */
.cn-sticky .Trille-canvas-sticky-colors{
  left:-44px;
  opacity:0;
  pointer-events:none;
}
.cn-sticky .Trille-canvas-sticky-palette-btn{
  display:none;
}
.cn-sticky .Trille-canvas-sticky-palette-panel{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.cn-sticky:hover .Trille-canvas-sticky-colors,
.cn-sticky:active .Trille-canvas-sticky-colors,
.cn-sticky:focus-within .Trille-canvas-sticky-colors{
  opacity:1;
  pointer-events:auto;
}

@media (max-width:390px){
  .hdr-logo{font-size:27px;letter-spacing:-.7px;}
  .icon-btn{width:35px;height:35px;}
  .icon-btn svg{width:19px;height:19px;}
  .boards-folder-name{font-size:21px;}
  .board-title{font-size:24px;}
  .bi-title,.card-title{font-size:18px;}
  .bnav{width:calc(100vw - 112px);bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px));height:56px;}
  .nbtn{width:40px;height:40px;}
  .nbtn svg{width:25px;height:25px;min-width:25px;min-height:25px;}
  #view-settings .scroll{padding-bottom:calc(120px + env(safe-area-inset-bottom));}
}
