#desktopSidebar,#desktopSidebar[hidden],.desktop-tool-label { display:none; }
.desktop-section-title { display:none; }
@media(min-width:561px) {
 :root { --sidebar-width:224px; }
 body.desktop-sidebar-active .app { width:min(calc(100% - var(--sidebar-width)),1200px); margin-left:calc(var(--sidebar-width) + max(0px,(100vw - var(--sidebar-width) - 1200px)/2)); margin-right:0; padding:28px 28px 40px; }
 body.desktop-sidebar-active .app > header { padding-bottom:24px; }
 body.desktop-sidebar-active .app > header { flex-wrap:nowrap; align-items:flex-start; }
 body.desktop-sidebar-active .header-tools { flex:0 0 auto; margin-left:auto; }
 #searchOpen { min-height:46px; padding:10px 16px; gap:9px; background:#e5e7eb; border-color:#c6cbd2; color:#27313d; }
 #searchOpen .desktop-tool-label { display:inline; font-size:14px; font-weight:650; }
 #searchOpen:hover { background:#d8dde3; }
 :root[data-theme="dark"] #searchOpen { background:#414a54; border-color:#6b7682; color:#f1f3f5; }
 :root[data-theme="dark"] #searchOpen:hover { background:#505c68; }
 .mobile-nav,.mobile-capture-fab,.mobile-sections-menu,.mobile-sections-backdrop { display:none !important; }
 body.desktop-sidebar-active .more-nav { display:none; }
 #desktopSidebar { position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); display:flex; flex-direction:column; gap:14px; padding:22px 14px 16px; background:var(--surface); border-right:1px solid var(--line); z-index:12; }
 .desktop-brand { padding:0 10px; font-size:24px; font-weight:780; letter-spacing:-.04em; }
 .desktop-brand span { display:block; margin-top:3px; color:var(--muted); font-size:11px; font-weight:450; letter-spacing:0; }
 #sidebarCapture,#sidebarShopping,#sidebarTools { flex:0 0 auto; }
 #sidebarCapture > button { width:100%; }
 #sidebarSections { display:flex; flex:1 1 auto; min-height:0; }
 #desktopSidebar #tabs,#desktopSidebar #tabs.hide { display:flex !important; flex-direction:column; flex-wrap:nowrap; width:100%; min-height:0; padding:0; gap:12px; overflow:hidden; }
 #desktopPrimarySections { flex:0 0 auto; }
 #desktopAdditionalSections { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-top:12px; border-top:1px solid var(--line); scrollbar-width:thin; }
 .desktop-section-title { display:block; padding:0 10px 7px; color:var(--muted); font-size:11px; }
 #desktopSidebar .tabs .tab { display:flex; align-items:center; gap:8px; width:100%; min-height:44px; padding:9px 10px; text-align:left; white-space:normal; font-size:14px; margin:2px 0; }
 #desktopAdditionalSections .tab { font-weight:500; }
 #desktopSidebar .tab .count { margin-left:auto; flex:0 0 auto; }
 #sidebarShopping { border-top:1px solid var(--line); padding-top:12px; }
 #sidebarShopping .shopping-switch,#sidebarShopping button { width:100%; margin:0; }
 #sidebarShopping button { display:flex; align-items:center; gap:8px; justify-content:flex-start; min-height:44px; padding-left:10px; background:transparent; border-color:transparent; color:var(--muted); }
 #sidebarShopping.is-current button { background:var(--accent-soft); color:var(--accent); }
 #sidebarTools { display:flex; flex-direction:column; gap:4px; }
 #sidebarTools .icon-btn { width:100%; height:auto; min-height:44px; gap:10px; justify-content:flex-start; padding:8px 10px; border-color:transparent; background:transparent; color:var(--muted); }
 #sidebarTools .desktop-tool-label { display:inline; font-size:13px; font-weight:550; }
 #sidebarTools svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
 #desktopSidebar button:hover { background:var(--soft); }
 #desktopSidebar .tab[aria-selected="true"] { background:var(--accent-soft); color:var(--accent); }
 #desktopSidebar .primary:hover { background:var(--accent); }
 #desktopSidebar button:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
 body:has(.veil.open) #desktopSidebar { visibility:hidden; }
}
@media(min-width:561px) and (max-width:899px) {
 :root { --sidebar-width:180px; }
 body.desktop-sidebar-active .app { padding:22px 14px 32px; }
 #desktopSidebar { padding:18px 9px 12px; gap:10px; }
 #desktopSidebar .tabs .tab { font-size:13px; }
 .desktop-brand { font-size:22px; }
 body.desktop-sidebar-active .task.has-attention { grid-template-columns:30px minmax(0,1fr) auto; }
 body.desktop-sidebar-active .task.has-attention > .attention-date { grid-column:2; grid-row:2; justify-self:start; }
 body.desktop-sidebar-active .task.has-attention > .task-next,body.desktop-sidebar-active .task.has-attention > .chevron { grid-column:3; grid-row:1 / span 2; }
}
@media(min-width:561px) and (max-height:650px) {
 #desktopSidebar { gap:6px; padding-top:10px; padding-bottom:8px; }
 .desktop-brand span { display:none; }
 #desktopPrimarySections { flex:0 0 auto; }
 #sidebarSections { overflow-y:auto; }
 #desktopSidebar #tabs { overflow:visible; }
 #desktopAdditionalSections { flex:none; overflow:visible; }
}

/* Direct navigation and clipboard controls (0.9.15). */
.desktop-search,.mobile-shopping { display:none; }
.notes-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.notes-copy-row { display:flex; justify-content:flex-end; margin-bottom:6px; }
.copy-details { min-height:44px; padding:8px 12px; }
@media(min-width:561px) {
 #searchOpen,#mobileSectionsToggle { display:none; }
 .desktop-search { display:flex; align-items:center; width:clamp(150px,25vw,330px); max-width:100%; min-height:46px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
 .desktop-search input { width:100%; min-width:0; padding:11px; border:0; border-radius:12px; background:transparent; color:var(--ink); font:inherit; font-size:14px; }
 .desktop-search button { flex:0 0 44px; min-height:44px; border:0; border-radius:12px; background:transparent; color:var(--ink); font-size:25px; cursor:pointer; }
 .desktop-search:focus-within { outline:2px solid var(--focus); }
 body.desktop-sidebar-active .app > header { flex-wrap:wrap; gap:12px; }
}
@media(max-width:560px) {
 :root { --mobile-rail-width:76px; }
 .mobile-nav { display:block; padding:0; border:0; box-shadow:none; background:transparent; }
 .mobile-bottom-nav { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:2px; padding:5px 5px calc(5px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
 .mobile-nav button { min-height:48px; min-width:0; padding:4px 2px; font-size:11px; line-height:1.2; }
 .mobile-nav .nav-symbol { font-size:19px; }
 .mobile-right-rail { position:fixed; right:6px; bottom:calc(76px + env(safe-area-inset-bottom)); width:var(--mobile-rail-width); display:flex; flex-direction:column; gap:8px; max-height:calc(100dvh - 90px - env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; }
 .mobile-right-rail button { width:100%; flex-shrink:0; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
 .mobile-right-rail #mobileCapture,.mobile-right-rail #mobileShopping { position:static; display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; padding:7px 3px; font-size:12px; letter-spacing:0; box-shadow:none; }
 .mobile-right-rail #mobileCapture { color:#fff; background:#c52234; border-color:#c52234; }
 .mobile-right-rail #mobileShopping { color:var(--ink); background:var(--surface); font-weight:650; }
 .mobile-right-rail #mobileShopping[aria-pressed="true"],.mobile-right-rail button[aria-current="page"] { background:var(--accent-soft); color:var(--accent); border-color:var(--accent); }
 .app { padding-right:14px; padding-bottom:calc(188px + env(safe-area-inset-bottom)); }
 .app > header { margin-right:0; }
 .mobile-sections-menu.open { bottom:calc(70px + env(safe-area-inset-bottom)); max-height:calc(100dvh - 95px - env(safe-area-inset-bottom)); }
 body.search-active .mobile-nav { visibility:hidden; }
}

/* 0.9.23: quieter navigation and readable task hierarchy. */
.control-review-heading { display:flex; align-items:center; gap:4px; padding:8px 12px; border-top:1px solid var(--line); }
.control-review-toggle { flex:1; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; border:0; padding:6px 0; background:transparent; color:var(--muted); text-align:left; font-size:13px; font-weight:650; }
.control-review-toggle::after { content:'⌄'; font-size:18px; }
.control-review-toggle[aria-expanded="true"]::after { content:'⌃'; }
.control-review-items[hidden] { display:none; }
.control-review-group .control-tag { display:none; }
.control-review-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media(max-width:560px) {
 .mobile-right-rail button { background:transparent; border-color:transparent; border-radius:12px; color:var(--muted); }
 .mobile-right-rail #mobileCapture { font-size:11px; background:#bd3546; border-color:#bd3546; }
 .mobile-right-rail #mobileShopping { background:transparent; border-color:var(--line); font-size:11px; gap:3px; flex-direction:row; }
 .mobile-right-rail #mobileShopping svg { width:16px; height:16px; flex-shrink:0; }
 .mobile-right-rail button[aria-current="page"] { border-color:transparent; }
 .mobile-rail-actions { display:flex; flex-direction:column; gap:8px; padding-top:8px; border-top:1px solid var(--line); }
 .mobile-nav .nav-symbol { display:flex; align-items:center; justify-content:center; height:22px; }
 #tasks.main-card { border:0; border-radius:0; background:transparent; box-shadow:none; }
 #tasks .group-title { padding:16px 0 8px; background:transparent; text-transform:none; letter-spacing:0; font-size:13px; }
 #tasks .task { padding:12px 0; gap:8px; }
 #tasks .task-title { font-size:16px; line-height:1.4; }
 #tasks .task-goal,#tasks .project-tag { background:transparent; padding:0; border:0; border-radius:0; color:var(--muted); font-size:12px; font-weight:400; }
 #tasks .details { gap:5px; }
 #tasks .compact-note { background:transparent; padding:0; color:var(--muted); font-size:13px; }
 #tasks .attention-date { background:transparent; border-color:transparent; padding:4px 0; min-height:44px; font-size:12px; font-weight:500; }
 #tasks .control-review-heading { padding:12px 0 4px; }
 #tasks .control-review-heading .help-trigger { flex-shrink:0; }
}

/* Mobile calendar beside settings; the three frequent sections share one row. */
#mobileCalendar { display:none; }
@media(max-width:560px) {
 #mobileCalendar { display:inline-flex; }
 #mobileCalendar[aria-current="page"] { background:var(--accent-soft); color:var(--accent); border-color:var(--accent); }
 .app > header { flex-wrap:wrap; gap:10px; }
 .header-tools { margin-left:auto; }
 .mobile-rail-actions { padding-top:0; border-top:0; }
}

/* Floating actions no longer reserve a column in mobile lists. */
@media(max-width:560px) {
 html { scroll-padding-bottom:calc(188px + env(safe-area-inset-bottom)); }
 .mobile-right-rail { pointer-events:none; filter:drop-shadow(0 3px 6px #0003); }
 .mobile-right-rail button { pointer-events:auto; }
 .mobile-right-rail #mobileShopping { background:var(--surface); color:var(--ink); }
 .mobile-right-rail #mobileShopping[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); }
}

/* Shopping has its own calm color, distinct from capture. */
@media(max-width:560px) {
 .mobile-right-rail #mobileShopping { background:#d7eee3; color:#205940; border-color:#91bea7; }
 .mobile-right-rail #mobileShopping[aria-pressed="true"] { background:#27684d; color:#fff; border-color:#27684d; }
 :root[data-theme="dark"] .mobile-right-rail #mobileShopping { background:#254b3c; color:#d8f4e6; border-color:#56836d; }
 :root[data-theme="dark"] .mobile-right-rail #mobileShopping[aria-pressed="true"] { background:#367b59; color:#fff; border-color:#75b892; }
}

/* Seven-day overview fits its viewport; tap a date for a readable day view. */
[data-calendar-view=week] .calendar-week-scroll { overflow-x:hidden; }
.calendar-week-day { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; min-width:0; min-height:44px; padding:2px 0; border:0; border-radius:6px; background:transparent; color:inherit; font:inherit; font-size:11px; cursor:pointer; }
.calendar-week-day strong { margin:2px 0 0; font-size:13px; }
.calendar-week-day:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
@media(max-width:560px) {
 [data-calendar-view=week] { padding-left:0; padding-right:0; }
 [data-calendar-view=week] .calendar-days,[data-calendar-view=week] .calendar-grid { grid-template-columns:32px repeat(7,minmax(0,1fr)); }
 [data-calendar-view=week] .calendar-day-head { padding:4px 1px; overflow-x:hidden; }
 [data-calendar-view=week] .calendar-corner { font-size:8px; padding:9px 0; }
 [data-calendar-view=week] .calendar-marker { padding:3px 1px; font-size:10px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
 [data-calendar-view=week] .calendar-block { padding:2px 0; border-left-width:2px; }
 [data-calendar-view=week] .calendar-block-title { font-size:10px; }
}

/* v0.9.24: third floating action, above Write. */
@media(max-width:560px) {
  #voiceDesktop { display:none !important; }
  .mobile-right-rail #mobileVoice { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:48px; background:var(--surface); color:var(--ink); border-color:var(--line); font-size:11px; }
  .mobile-right-rail #mobileVoice svg { flex-shrink:0; }
  .mobile-bottom-nav button { font-size:10px; }
}
