/**
 * App shell: title bar, banners, main column, tab bar with the big +,
 * bottom sheet, toast.
 */

/* Title bar */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--bg)}
.top .wrap{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding-block:20px 10px}
.top h1{font-size:32px;font-weight:800;line-height:1.05;letter-spacing:-.02em}
.top .today{font-size:14px;color:var(--muted);text-align:right;font-weight:500}
.banner{display:flex;gap:10px;align-items:center;justify-content:space-between;background:var(--accent-soft);color:var(--ink);border-radius:var(--r-md);padding:12px 14px;font-size:15px;margin-bottom:12px}
.banner.warn{background:var(--yel-bg)}

main{padding-bottom:calc(120px + env(safe-area-inset-bottom,0px))}
section.view{display:flex;flex-direction:column;gap:18px;padding-block:4px 16px}

/* Tab bar: Today · Kitchen · + · List · More */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:25;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px)}
.tabs .wrap{display:grid;grid-template-columns:1fr 1fr 80px 1fr 1fr;align-items:start;height:70px;padding-top:8px}
.tab{position:relative;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;font-weight:600;color:var(--muted);min-height:52px}
.tab svg{width:26px;height:26px}
.tab[aria-current="page"]{color:var(--accent);font-weight:800}
.tab .count{position:absolute;top:-4px;left:calc(50% + 8px);background:var(--badge);color:var(--badge-ink);border-radius:999px;font-size:11px;font-weight:800;padding:1px 6px}
.fab{justify-self:center;width:62px;height:62px;border-radius:20px;border:0;background:var(--accent);color:var(--accent-ink);box-shadow:var(--fab-shadow);display:grid;place-items:center;transform:translateY(-22px)}
.fab svg{width:30px;height:30px}

/* Bottom sheet */
#scrim{position:fixed;inset:0;background:var(--scrim);z-index:40;opacity:0;pointer-events:none;transition:opacity .2s}
#scrim.on{opacity:1;pointer-events:auto}
#sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;max-height:calc(100% - 32px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;background:var(--bg);border-radius:28px 28px 0 0;transform:translateY(105%);transition:transform .25s cubic-bezier(.2,.8,.2,1);padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));box-shadow:var(--shadow)}
#sheet.on{transform:none}
#sheet .grab{width:44px;height:5px;border-radius:3px;background:var(--line);margin:10px auto 4px}
#sheet .wrap{display:flex;flex-direction:column;gap:16px;padding-block:6px 4px}
.sh-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.sh-head h2{font-size:28px;font-weight:800;line-height:1.1;min-width:0;overflow-wrap:anywhere;letter-spacing:-.02em}
.x{flex:none;border:0;background:var(--surface-2);width:44px;height:44px;border-radius:50%;font-size:22px;line-height:1;color:var(--ink)}
@media (prefers-reduced-motion: reduce){#sheet,#scrim{transition:none}}

/* Toast */
#toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom,0px));transform:translate(-50%,20px);z-index:60;background:var(--bar);color:var(--bar-ink);border-radius:var(--r-md);padding:12px 12px 12px 18px;display:flex;align-items:center;gap:12px;font-size:15px;font-weight:600;opacity:0;pointer-events:none;transition:.2s;width:max-content;max-width:calc(100% - 32px)}
#toast.on{opacity:1;transform:translate(-50%,0)}
/* Taps pass through the toast to the sheet behind it; only Undo catches them. */
#toast.on button{pointer-events:auto}
#toast button{border:0;background:none;color:var(--bar-ink);font-weight:800;text-decoration:underline;padding:8px;min-height:40px}
