
/* ===== navigation, both sizes =====
   Wide screen: a top bar with the same icons as the phone's tab bar, icon + label side by side, and the menu
   behind a round avatar with the user's initial. Phone (below): the bottom tab bar with "More". */
.fab { display: none; }
nav .tab { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; color: var(--ink-soft); }
nav .tab svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav details.navmore > summary.tab svg circle { fill: currentColor; stroke: none; }
nav .tab:hover { background: var(--surface); color: var(--ink); }
nav .tab.active { color: var(--ink); background: var(--surface); }
nav .tab.active svg { stroke: var(--green); }
nav .tab:focus-visible, nav summary:focus-visible, nav .navmore-menu a:focus-visible, nav .navmore-menu button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
nav details.navmore { margin-left: 6px; }
nav details.navmore > summary.tab svg, nav .more-label { display: none; }   /* wide: avatar only */
nav .avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--green); color: #1d2414; font-weight: 600; font-size: 15px;
}
nav details.navmore > summary.tab { padding: 2px; }
nav details.navmore > summary.tab:hover { background: none; }
nav .navmore-who { display: block; padding: 6px 10px 8px; font-size: 13px; color: var(--ink-faint); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

@media (max-width: 600px) {
    /* tab bar ~62px (icon 24 + label + padding); the + floats a gap above it */
    :root { --tabbar-h: 64px; --fab-size: 56px; --fab-gap: 12px; }

    /* bottom tab bar, thumb reach; brand hidden (the app icon says what this is) */
    nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line); border-bottom: none; background: #1d2127;
    }
    nav .brand { display: none; }
    nav .tab, nav details.navmore > summary.tab {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        min-width: 64px; padding: 4px 6px; font-size: 11px; color: var(--ink-faint); background: none;
    }
    nav details.navmore { margin-left: 0; }
    nav .tab svg { width: 24px; height: 24px; }
    nav details.navmore > summary.tab svg, nav .more-label { display: block; }   /* phone: dots + "More" */
    nav .avatar { display: none; }
    nav .tab:hover { background: none; }
    nav .tab.active { color: var(--ink); background: none; }
    nav .navmore-menu { top: auto; bottom: calc(100% + 12px); right: 4px; min-width: 190px; }
    nav .navmore-menu a, nav .navmore-menu button.link { padding: 12px 12px; font-size: 16px; }   /* finger-sized */
    /* An open menu lies over the floating + (both sit bottom right). In 0.1.7 the + (z-index 21) was above the menu
       (inside the nav, z-index 20), so a tap on "Log out" hit the + instead: nothing reached the server. */
    nav:has(details.navmore[open]) { z-index: 30; }
    body:has(details.navmore[open]) .fab { visibility: hidden; }

    /* bottom room = tab bar + gap + the + button + gap, so the last task row scrolls clear of the + (it covered the row's end) */
    main { padding: calc(8px + env(safe-area-inset-top)) 14px calc(var(--tabbar-h) + var(--fab-gap) + var(--fab-size) + 16px + env(safe-area-inset-bottom)); }

    /* floating add button above the tab bar */
    .fab {
        display: block; position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + var(--fab-gap) + env(safe-area-inset-bottom)); z-index: 21;
        width: var(--fab-size); height: var(--fab-size); border-radius: 18px; border: none; padding: 0;
        background: var(--green); color: #1d2414; font-size: 30px; line-height: var(--fab-size);
        box-shadow: 0 6px 18px rgba(0,0,0,.4);
    }
    .quickadd-line button { display: none; }   /* the floating + replaces it; Enter adds */
}
