#mobileSearchToggle,#mobileBoardDock{display:none}
@media(max-width:650px), (any-pointer:coarse) and (max-width:1366px){
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar{justify-content:center;background:#f5f6f3;padding-top:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom,0px));border-top:0;box-shadow:none}
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar:not(.mobile-search-open)>:not(#mobileBoardDock){display:none!important}
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar #mobileSearchToggle{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;border-radius:28px;padding:10px 24px;background:#243e32;color:#fff;border:1px solid #243e32;box-shadow:0 2px 8px #172c2920;font-size:14px;order:10}
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar #mobileSearchToggle.has-filter{background:#d8ef91;color:#243e32}
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar.mobile-search-open{background:white;border-top:1px solid #dce2dc}
 body:is(:has(#content>.kanban),.mobile-board-controls) #toolbar.mobile-search-open #mobileSearchToggle{min-height:36px;padding:6px 20px}
}
@media(max-width:650px), (any-pointer:coarse) and (max-width:1366px){
 body:is(:has(#content>.kanban),.mobile-board-controls)>#autoSaveState{bottom:calc(72px + env(safe-area-inset-bottom,0px));right:10px;padding:5px 8px;pointer-events:none;font-size:10px}
 body:is(:has(#content>.kanban),.mobile-board-controls):has(#toolbar.mobile-search-open)>#autoSaveState{bottom:calc(190px + env(safe-area-inset-bottom,0px))}
}

@media(max-width:650px), (any-pointer:coarse) and (max-width:1366px){
 body.mobile-board-controls .page-heading{display:none}
 body.mobile-board-controls #toolbar,body.mobile-board-controls #toolbar.mobile-search-open{background:transparent;border:0;box-shadow:none}
 body.mobile-board-controls #mobileBoardDock{display:flex;align-items:center;justify-content:center;gap:8px;order:10;width:100%;pointer-events:none}
 body.mobile-board-controls #mobileBoardDock button{pointer-events:auto;min-height:46px;border-radius:25px;background:#243e32e8;color:white;border:1px solid #ffffff55;box-shadow:0 2px 8px #172c2920;padding:10px 14px;font-size:14px;white-space:nowrap}
 body.mobile-board-controls #toolbar #mobileSearchToggle{order:0;width:46px;min-width:46px;height:46px;padding:10px;gap:0}
 body.mobile-board-controls #mobileSearchToggle span{display:none}
 body.mobile-board-controls .mobile-size-buttons{display:flex;gap:1px;pointer-events:auto;border-radius:25px;overflow:hidden}
 body.mobile-board-controls #mobileBoardDock .mobile-size-buttons button{min-width:44px;border-radius:0;font-size:22px;padding:4px 10px;box-shadow:none}
 body.mobile-board-controls #mobileBoardDock button:disabled{opacity:.45}
 body[data-mobile-card-size="compact"] #content>.kanban>.column:not(.is-collapsed){width:225px;min-width:225px}
 body[data-mobile-card-size="compact"] #content>.kanban .card{padding:11px}
 body[data-mobile-card-size="compact"] #content>.kanban .card .cover-photo{height:112px}
 body[data-mobile-card-size="compact"] #content>.kanban .card h3{font-size:15px}
 body[data-mobile-card-size="large"] #content>.kanban>.column:not(.is-collapsed){width:320px;min-width:320px}
 body[data-mobile-card-size="large"] #content>.kanban .card .cover-photo{height:185px}
 body[data-mobile-card-size="large"] #content>.kanban .card h3{font-size:20px}
}
@media(max-width:650px), (any-pointer:coarse) and (max-width:1366px){body.mobile-board-controls #toolbar,body.mobile-board-controls #toolbar.mobile-search-open{background:transparent!important;border:0!important;box-shadow:none!important}}

@media(max-width:650px), (any-pointer:coarse) and (max-width:1366px){
 body.mobile-board-controls #content{order:1}
 body.mobile-board-controls #toolbar{order:2;flex-shrink:0;flex-wrap:wrap;margin:0;padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px));gap:8px}
 body.mobile-board-controls #stats{display:none}
 body.mobile-board-controls #toolbar #mobileBoardDock #mobileSearchToggle{width:48px;min-width:48px;flex:0 0 48px;padding:10px;order:0}
 #mobileSearchToggle svg{display:block;width:24px;height:24px;min-width:24px;flex:none;stroke:currentColor;overflow:visible}
 body.mobile-board-controls #toolbar .search{flex:1 1 100%;min-width:0}
 body.mobile-board-controls #toolbar .search input{font-size:16px;min-width:0;width:100%}
 body.mobile-board-controls #toolbar select{min-height:44px;min-width:0;max-width:45%}
}
/* Constrain both the connecting screen and login to the actual viewport. */
#serverCurtain{width:100%;height:100%;height:100dvh;box-sizing:border-box;grid-template-columns:minmax(0,1fr);overflow-y:auto;overflow-x:hidden;padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
#serverCurtain .server-login{box-sizing:border-box;width:min(420px,100%);min-width:0;max-width:100%;padding:28px;overflow-wrap:anywhere}
#serverCurtain .server-login h1{margin-top:0}
#serverCurtain .server-login input{min-width:0;width:100%;font-size:16px}
#serverCurtain .server-loading{text-align:center;background:transparent;color:#f7f9f2;box-shadow:none}
#serverCurtain .server-loading p{color:#bdcec6;font-size:14px;line-height:1.6}
.server-loading-mark{display:grid;place-items:center;margin:0 auto 22px;width:64px;height:64px;border-radius:18px;background:#d8ef91;color:#172c29;font-size:38px;font-weight:800}
/* Tablet board: reserve only the header and compact bottom controls. */
@media(any-pointer:coarse) and (min-width:651px) and (max-width:1366px){
 body.mobile-board-controls #stats{display:none!important}
 body.mobile-board-controls .page{padding:6px 12px 0!important}
 body.mobile-board-controls #toolbar{margin:0!important;padding:6px 0 calc(6px + env(safe-area-inset-bottom,0px))!important}
 body.mobile-board-controls #content>.kanban{padding-bottom:4px}
}
