/* TaskHub mobile Classic concept — mobile only; desktop intentionally untouched.
   Aptos Narrow is preferred; browsers without the licensed font use condensed fallback. */
@media (max-width:800px) {
 :root,html,body,button,input,select,textarea{font-family:'Aptos Narrow','Arial Narrow','Roboto Condensed',sans-serif!important}
 #shell{--classic-blue:#0877ff;--classic-ink:#14274b;--classic-line:#e4edf9}
 #shell .content{background:#fff}
 #shell .page-heading{margin-bottom:12px!important;min-height:65px!important}
 #shell .page-heading h1{font-size:27px!important;letter-spacing:-.55px!important;line-height:1.08!important}
 #shell .page-heading .muted{font-size:12px!important;margin-top:4px!important}
 #shell .light-today-advice{border-radius:13px!important;background:#f3f8ff!important;border-color:#dbe9ff!important;min-height:49px!important;padding:9px 12px!important}
 #shell .light-today-advice strong{font-size:14px!important}
 #shell .task-group .task-row,#shell .task-row{
  background:#fff!important;border:1px solid #e6edf8!important;
  border-radius:11px!important;box-shadow:0 3px 12px #15345b0a!important;
  margin:5px 0!important;padding:8px 9px!important;min-height:52px!important
 }
 #shell .task-row .task-name{font-size:15px!important;line-height:1.22!important}
 #shell .task-row .task-meta{font-size:11px!important;line-height:1.25!important}
 /* A seven-item dock stays on one row even on narrow phones. */
 #shell .bottom-nav{
  position:fixed!important;left:5px!important;right:5px!important;
  bottom:calc(5px + env(safe-area-inset-bottom,0px))!important;
  width:auto!important;height:auto!important;max-width:none!important;
  display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
  grid-template-rows:1fr!important;gap:0!important;
  padding:7px 2px!important;background:#fffffff7!important;
  border:1px solid #dce8f7!important;border-radius:19px!important;
  box-shadow:0 8px 30px #254b821b!important;z-index:100!important;
  overflow:visible!important
 }
 #shell .bottom-nav button{
  min-width:0!important;width:100%!important;min-height:52px!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  padding:5px 0!important;gap:4px!important;overflow:hidden!important;
  border-radius:11px!important
 }
 #shell .bottom-nav button .light-icon,#shell .bottom-nav button .nav-icon{
  width:21px!important;height:21px!important;flex:0 0 21px!important
 }
 #shell .bottom-nav button b{
  font-size:clamp(8px,2.25vw,10.5px)!important;line-height:1.1!important;
  font-weight:600!important;letter-spacing:-.3px!important;white-space:nowrap!important
 }
 #shell .bottom-nav button.active{background:#eaf3ff!important;color:#0877ff!important}
 #shell main{padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important}
 /* Compact calendar cards, without changing event placement calculations. */
 #shell[data-page=calendar] .compact-agenda .agenda-event{
  border-radius:9px!important;min-height:43px!important;padding:6px 8px!important;
  background:#f3f8ff!important;border-left:3px solid #0877ff!important;
  box-shadow:none!important
 }
 #shell[data-page=calendar] .compact-agenda .agenda-event .task-name{font-size:14px!important;line-height:1.2!important}
 #shell[data-page=calendar] .compact-agenda .agenda-gap{background:transparent!important;color:#9bacc4!important;min-height:18px!important}
 #shell[data-page=calendar] .compact-agenda .time-hour{height:32px!important;min-height:32px!important}
 /* Habit rows: name + progress + action, not a tall empty card. */
 #shell .habit-list{gap:8px!important}
 #shell .habit-list .habit-card{
  display:grid!important;grid-template-columns:minmax(0,1fr) 42px!important;
  align-items:center!important;gap:6px 10px!important;
  padding:11px 12px!important;min-height:70px!important;
  border:1px solid #e5edf9!important;border-radius:13px!important;
  background:#fff!important;box-shadow:0 3px 14px #193c710b!important
 }
 #shell .habit-list .habit-top{display:contents!important}
 #shell .habit-list .habit-top>.task-name{
  grid-column:1!important;grid-row:1!important;align-self:end!important;
  min-height:0!important;margin:0!important;font-size:16px!important;line-height:1.2!important
 }
 #shell .habit-list .habit-top>.habit-action-plus,
 #shell .habit-list .habit-top>.task-completion{
  grid-column:2!important;grid-row:1 / span 2!important;
  align-self:center!important;justify-self:end!important;margin:0!important
 }
 #shell .habit-list .habit-body{grid-column:1!important;grid-row:2!important;min-width:0!important}
 #shell .habit-list .habit-count{margin:0!important;font-size:12px!important;line-height:1.25!important}
 #shell .habit-list .habit-body progress{height:4px!important;margin-top:5px!important;width:100%!important;max-width:100%!important}
 #shell .habit-list .habit-adjust{margin-top:3px!important}
 #shell .habit-list .habit-adjust>summary{min-height:24px!important}
}
@media(max-width:360px){
 #shell .bottom-nav{grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-template-rows:1fr!important}
 #shell .bottom-nav button b{font-size:8px!important;letter-spacing:-.4px!important}
 #shell main{padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important}
}

/* Mobile polish v2: calendar hierarchy, habit actions and seven-tab safe area. */
@media(max-width:800px){
 #shell .bottom-nav{
  box-sizing:border-box!important;
  padding:6px 3px!important;
  bottom:calc(6px + env(safe-area-inset-bottom,0px))!important;
 }
 #shell .bottom-nav button{box-sizing:border-box!important;min-height:50px!important;gap:3px!important}
 #shell .bottom-nav button b{display:block!important;max-width:100%!important;overflow:visible!important}
 #shell .bottom-nav button .light-icon{display:block!important;object-fit:contain!important}
 #shell[data-page=calendar] .day-plan-header{margin:12px 0 9px!important}
 #shell[data-page=calendar] .day-plan-header h2{font-size:22px!important;line-height:1.2!important;margin:0 0 5px!important}
 #shell[data-page=calendar] .compact-agenda{display:grid!important;gap:5px!important;margin:8px 0 16px!important}
 #shell[data-page=calendar] .compact-agenda .agenda-row{grid-template-columns:47px minmax(0,1fr)!important;gap:7px!important;min-width:0!important}
 #shell[data-page=calendar] .compact-agenda .agenda-row>time{font-size:11px!important;padding-top:9px!important;white-space:nowrap!important;color:#8da1bf!important}
 #shell[data-page=calendar] .compact-agenda .agenda-row.time-hour{height:auto!important;min-height:23px!important}
 #shell[data-page=calendar] .compact-agenda .agenda-gap{
  display:block!important;min-height:22px!important;height:auto!important;
  padding:3px 9px!important;text-align:left!important;
  font-size:10px!important;color:#a4b4ca!important;
  background:#f7faff!important;border:0!important;border-radius:8px!important
 }
 #shell[data-page=calendar] .compact-agenda .agenda-event{
  min-width:0!important;min-height:48px!important;padding:7px 9px!important;
  display:flex!important;align-items:center!important;gap:7px!important
 }
 #shell[data-page=calendar] .compact-agenda .agenda-event .task-row-body{min-width:0!important;flex:1!important}
 #shell[data-page=calendar] .compact-agenda .agenda-event .task-name{font-size:14px!important;overflow-wrap:anywhere!important}
 #shell[data-page=calendar] .compact-agenda .agenda-event .small{font-size:11px!important;margin:3px 0 0!important}
 #shell[data-page=calendar] .compact-agenda .agenda-event .task-completion{flex:0 0 34px!important;width:34px!important;min-width:34px!important}
 #shell .habit-list .habit-card{box-sizing:border-box!important;min-width:0!important;overflow:hidden!important}
 #shell .habit-list .habit-top>.task-name{text-align:left!important;overflow-wrap:anywhere!important}
 #shell .habit-list .habit-top>.task-completion,
 #shell .habit-list .habit-top>.habit-action-plus{
  width:38px!important;min-width:38px!important;max-width:38px!important;
  height:38px!important;min-height:38px!important;padding:6px!important;
  border-radius:11px!important
 }
 #shell .habit-list .habit-body{overflow:hidden!important}
 #shell .habit-list .habit-body progress{display:block!important;box-sizing:border-box!important}
}

