/* The phone's Day calendar (JS/features/mobile-day.js): the Tasks | Calendar tab bar, the day bar in the header, the hour
   timeline and the read-only meeting card's bridge. Phone tokens, coloured as the desktop's Day and Week; the now line's three tokens are restated from
   CSS/alt/alt-tokens.css per theme and held equal by mobile-day.test.js. No clash marks of any kind exist here. */

:root{ --a-now:#ff6b57; --a-on-now:#0a1628; --a-now-past:rgba(0,0,0,.3); }
:root.theme-light, body.theme-light{ --a-now:#c4143c; --a-on-now:#fff; --a-now-past:rgba(255,255,255,.65); }
/* Focus time's, a flight's and a lunch's wash (the desktop's --a-focus-wash, --a-flight-wash and --a-lunch-wash, restated in this page's tokens): 9% of the
   accent on panel-2 (the desktop's --a-raised) in dark, 6% on white in light (every value is the desktop's own recipe). The plain value goes first for a browser without color-mix. */
:root{ --md-focus-wash:var(--panel-2); --md-flight-wash:var(--panel-2); --md-lunch-wash:var(--panel-2); }
:root.theme-light, body.theme-light{ --md-focus-wash:#f1f6f3; --md-flight-wash:#f6f4f9; --md-lunch-wash:#f9f4f0; }
@supports (color: color-mix(in srgb, red, red)){
  :root{ --md-focus-wash:var(--panel-2); --md-focus-wash:color-mix(in srgb, var(--green-text) 9%, var(--panel-2)); --md-flight-wash:var(--panel-2); --md-flight-wash:color-mix(in srgb, var(--purple-text) 9%, var(--panel-2)); --md-lunch-wash:var(--panel-2); --md-lunch-wash:color-mix(in srgb, var(--orange-text) 9%, var(--panel-2)); }
  :root.theme-light, body.theme-light{ --md-focus-wash:#f1f6f3; --md-focus-wash:color-mix(in srgb, var(--green-text) 6%, #fff); --md-flight-wash:#f6f4f9; --md-flight-wash:color-mix(in srgb, var(--purple-text) 6%, #fff); --md-lunch-wash:#f9f4f0; --md-lunch-wash:color-mix(in srgb, var(--orange-text) 6%, #fff); }
}

/* ---------- the tab bar: under the thumb, 56px plus the home indicator ---------- */
.m-tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:calc(var(--z-sticky) + 2);
  display:flex; height:calc(56px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom);
  background:var(--panel); border-top:1px solid var(--border);
}
.m-tab{
  flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  min-height:var(--m-tap); background:none; border:0; color:var(--text-dim); font:inherit; font-size:12px; font-weight:600; cursor:pointer;
}
.m-tab[aria-selected="true"]{ color:var(--accent-text); }
.m-tab:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:-4px; border-radius:var(--a-r-sm); }
.m-tab-i{ width:20px; height:20px; border:2px solid currentColor; border-radius:4px; box-sizing:border-box; }
.m-tab-i-tasks{ border-width:0 0 0 0; background:linear-gradient(currentColor, currentColor) 0 3px / 100% 2px no-repeat,
  linear-gradient(currentColor, currentColor) 0 9px / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 15px / 70% 2px no-repeat; }
.m-tab-i-calendar{ border-top-width:5px; }
.m-tab-t{ line-height:1; }

/* ---------- the header on Calendar: task-only controls step aside, the day bar takes their place ---------- */
.chrome.is-cal .tools, .chrome.is-cal #searchBtn{ display:none; }
/* The list is hidden in place, never rebuilt: visibility (and inert), so its scroll position survives the flip. */
.m-stage[data-surface="calendar"] #board{ visibility:hidden; }
/* On Calendar the header never folds: its box is the full header even if a fold was left set. */
.chrome.is-cal{ height:auto; }
/* Toasts sit above the tab bar on both tabs. */
:root[data-toast-phone] body:has(.m-tabbar) .a-toasts{ bottom:calc(var(--a-4, 16px) + 56px + env(safe-area-inset-bottom, 0px)); }
.m-daybar{ padding:0 var(--a-4) var(--a-2); }
.m-daybar-row{ display:flex; align-items:center; gap:var(--a-1); min-height:52px; }
.m-day-step{ flex:0 0 auto; font-size:22px; line-height:1; }
.m-day-step:disabled{ opacity:.4; }
.m-day-pick{ flex:1 1 auto; min-width:0; min-height:var(--m-tap); justify-content:center; gap:var(--a-1); font-weight:600; }
.m-day-pick-t{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.m-day-pick-c{ flex:0 0 auto; color:var(--text-dim); font-size:12px; }
.m-day-today{ flex:0 0 auto; min-height:var(--m-tap); }
.m-day-note{ margin:0 0 var(--a-2); padding:var(--a-2) var(--a-3); border-radius:var(--a-r-sm); font-size:13px; line-height:1.4; color:var(--text-dim); background:var(--panel-2); }
.m-day-note.is-warn{ color:var(--warn-text); background:var(--yellow-soft); }
.m-day-note.is-empty{ color:var(--text); }
.m-day-help{ color:var(--accent-text); font-weight:600; }
.m-day-allday{ display:flex; align-items:center; gap:var(--a-1); min-width:0; margin-bottom:var(--a-1); overflow:hidden; }
.m-day-allday-h{ flex:0 0 auto; font-size:12px; font-weight:600; color:var(--text-faint); }
.m-day-chip{
  flex:0 1 auto; min-width:0; max-width:46%; min-height:var(--m-tap); padding:0 var(--a-2); border:1px solid var(--border-soft); border-radius:var(--a-r-pill);
  background:var(--panel-2); color:var(--text); font:inherit; font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer;
}
.m-day-chip.is-cancelled{ text-decoration:line-through; color:var(--text-faint); }
.m-day-chip-more{ flex:0 0 auto; }
.m-day-cap{ margin:0; min-height:18px; line-height:18px; font-size:13px; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---------- the timeline: one scroller under the header, a fixed 24h height so a day change shifts nothing ---------- */
.m-day{
  position:absolute; inset:0; overflow-y:auto; overscroll-behavior:contain;
  padding:0 var(--a-3) calc(16px + var(--m-tabbar-h, 0px)); background:var(--bg);
}
.m-day::before{ content:''; display:block; height:var(--chrome-h); }
.m-day.m-day-nogrid{ overflow-y:hidden; }   /* a state with no timeline has nothing to scroll */
.m-day.m-day-nogrid .m-day-tl{ display:none; }
.m-day-tl{ --md-h:64px; --md-g:52px; position:relative; height:calc(24 * var(--md-h)); }
.m-day-axis{ position:absolute; inset:0; }
.m-day-off{ position:absolute; left:var(--md-g); right:0; background:var(--panel-2); opacity:.55; }
.m-day-off-am{ top:0; height:calc(8 * var(--md-h)); }
.m-day-off-pm{ top:calc(18 * var(--md-h)); bottom:0; }
.m-day-hr{ position:absolute; left:var(--md-g); right:0; top:calc(var(--s) * var(--md-h) / 60); border-top:1px solid var(--border-soft); }
.m-day-hr-l{ position:absolute; right:calc(100% + 6px); top:-7px; font-size:11px; line-height:1; color:var(--text-faint); white-space:nowrap; }
.m-day-cols{ position:absolute; top:0; bottom:0; left:calc(var(--md-g) + 2px); right:0; }
.m-day-slot{
  position:absolute; top:calc(var(--s) * var(--md-h) / 60); height:max(22px, calc(var(--d) * var(--md-h) / 60 - 2px));
  left:calc(var(--c) / var(--n) * 100%); width:calc(var(--sp) / var(--n) * 100% - 3px);
}
.m-day-ev{
  position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:1px; width:100%; height:100%; min-width:0;
  padding:3px 6px 3px 8px; overflow:visible; text-align:left; cursor:pointer; font:inherit; color:var(--text);
  background:var(--panel-2); border:1px solid var(--border-soft); border-left:3px dashed var(--border-strong); border-radius:var(--a-r-sm);
}
/* A meeting is the desktop's Outlook block (alt-calendar-grid.css .a-cg-ev, in this page's tokens): the raised ground, a soft 1px edge and a 3px DASHED strong
   left edge, the read-only calendar band's mark (a task card's edge is solid). Owner, 2026-11-16: "The mobile color theme for meetings should be the same as the desktop." */
/* A short block keeps a 44px target below it, clipped where the next block starts (--cd, calTimelinePack's clipEndMin). */
.m-day-ev::after{ content:''; position:absolute; left:0; right:0; top:0; height:min(44px, calc(var(--cd) * var(--md-h) / 60)); }
.m-day-ev:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:1px; z-index:1; }
.m-day-ev-in{ display:flex; flex-direction:column; gap:1px; width:100%; height:100%; min-width:0; overflow:hidden; }
.m-day-ev-t{ max-width:100%; min-height:0; font-size:14px; font-weight:600; line-height:1.25; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.m-day-slot.is-short .m-day-ev-t{ -webkit-line-clamp:1; white-space:nowrap; text-overflow:ellipsis; display:block; }
.m-day-slot.is-short{ z-index:1; }   /* its 44px hit area reaches below it, over the hour lines */
.m-day-slot.is-short .m-day-ev{ padding-top:0; padding-bottom:0; }
.m-day-slot.is-short .m-day-ev-in{ flex-direction:row; align-items:center; gap:6px; }
.m-day-slot.is-short .m-day-ev-t{ flex:0 1 auto; min-width:0; }
.m-day-slot.is-short .m-day-ev-w{ flex:0 0 auto; }
.m-day-ev-w{ max-width:100%; font-size:12px; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Tentative: the desktop timeline's 6px hatched left edge on the plain ground (alt-calendar-timeline.css); 3px of padding pays back the wider edge. */
.m-day-ev.is-tentative{
  background-color:var(--panel-2); background-image:repeating-linear-gradient(135deg, var(--border-strong) 0 3px, transparent 3px 6px);
  background-size:6px 100%; background-repeat:no-repeat; background-position:left top; background-origin:border-box;
  border-left:6px solid transparent; padding-left:5px;
}
/* Focus and blocked time (green), flights (purple), lunch (orange): the desktop's Style B (.k-focus / .k-flight / .k-lunch), a 1px edge all round, a 4px accent bar,
   a filled chip and the wash. The wash replaces a tentative hatch. */
.m-day-ev.is-focus{ --md-k:var(--green-text); --md-kw:var(--md-focus-wash); }
.m-day-ev.is-flight{ --md-k:var(--purple-text); --md-kw:var(--md-flight-wash); }
.m-day-ev.is-lunch{ --md-k:var(--orange-text); --md-kw:var(--md-lunch-wash); }
.m-day-ev.is-focus, .m-day-ev.is-flight, .m-day-ev.is-lunch{ border-color:var(--md-k); border-left:4px solid var(--md-k); padding-left:7px; background:var(--md-kw); }
.m-day-list-i.is-focus{ --md-k:var(--green-text); --md-kw:var(--md-focus-wash); }
.m-day-list-i.is-flight{ --md-k:var(--purple-text); --md-kw:var(--md-flight-wash); }
.m-day-list-i.is-lunch{ --md-k:var(--orange-text); --md-kw:var(--md-lunch-wash); }
.m-day-list-i.is-focus, .m-day-list-i.is-flight, .m-day-list-i.is-lunch{ border-color:var(--md-k); background:var(--md-kw); }
.m-day-ev-row{ display:flex; align-items:center; gap:6px; min-width:0; max-width:100%; }
.m-day-ev-k{
  flex:none; display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; box-sizing:border-box; border-radius:var(--a-r-sm);
  background:var(--md-k); color:var(--panel-2);
}
.m-day-ev-k svg{ display:block; width:12px; height:12px; }
.m-day-ev-row .m-day-ev-t{ min-width:0; }
.m-day-slot.is-short .m-day-ev-row{ flex:0 1 auto; }
/* Cancelled: the desktop's struck, faint title (never a kind). */
.m-day-ev.is-cancelled .m-day-ev-t{ text-decoration:line-through; color:var(--text-faint); }
/* Ended (any earlier day, and today's finished meetings): the desktop's receded row, which wins over every kind and tentative. The panel ground, faint ink, a thin
   dotted edge all round, an unfilled chip; never opacity, never a strikethrough. 10px of padding pays back the edge so the text does not move. */
.m-day-ev.is-ended, .m-day-ev.is-ended.is-tentative, .m-day-ev.is-ended.is-focus, .m-day-ev.is-ended.is-flight, .m-day-ev.is-ended.is-lunch{
  color:var(--text-faint); background:var(--panel); border:1px dotted var(--border-soft); padding-left:10px;
}
.m-day-ev.is-ended .m-day-ev-t{ font-weight:400; }
.m-day-ev.is-ended .m-day-ev-w{ color:var(--text-faint); }
.m-day-ev.is-ended .m-day-ev-k{ background:transparent; color:var(--text-faint); box-shadow:inset 0 0 0 1px var(--border-soft); }
.m-day-more{ align-items:center; justify-content:center; font-weight:700; color:var(--accent-text); background:var(--panel); border:1px dashed var(--border-strong); padding-left:6px; }   /* the desktop's .a-tl-more */

/* ---------- the now line: today only; the tick writes --now and the flag's text ---------- */
.m-day-past{ position:absolute; left:var(--md-g); right:0; top:0; height:calc(var(--now) * var(--md-h) / 60); background:var(--a-now-past); pointer-events:none; }
.m-day-now{
  position:absolute; left:var(--md-g); right:0; top:calc(var(--now) * var(--md-h) / 60 - 1.5px); height:3px; z-index:2; pointer-events:none;
  background:var(--a-now); box-shadow:0 0 0 1px var(--panel);
}
.m-day-now::before{ content:''; position:absolute; left:-6px; top:-4.5px; width:12px; height:12px; border-radius:50%; background:var(--a-now); box-shadow:0 0 0 1px var(--panel); }
.m-day-now-f{
  position:absolute; right:calc(100% + 4px); top:-8px; padding:1px 4px; border-radius:3px;
  font-size:11px; font-weight:700; line-height:14px; color:var(--a-on-now); background:var(--a-now); font-variant-numeric:tabular-nums;
}
.m-day-sr{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (prefers-reduced-motion:no-preference){
  .m-day-now::before{ animation:m-day-ring 1.2s var(--ease-out) 1; }
  .m-day-tl.m-day-in-r{ animation:m-day-in-r 120ms var(--ease-out); }
  .m-day-tl.m-day-in-l{ animation:m-day-in-l 120ms var(--ease-out); }
}
@keyframes m-day-ring{ from{ box-shadow:0 0 0 1px var(--panel), 0 0 0 0 var(--a-now); } to{ box-shadow:0 0 0 1px var(--panel), 0 0 0 10px transparent; } }
@keyframes m-day-in-r{ from{ transform:translateX(24px); opacity:.4; } to{ transform:none; opacity:1; } }
@keyframes m-day-in-l{ from{ transform:translateX(-24px); opacity:.4; } to{ transform:none; opacity:1; } }

/* ---------- the day picker: a dropdown under the day bar ---------- */
.m-daypick{
  position:fixed; left:var(--a-3); right:var(--a-3); z-index:var(--z-float); max-height:calc(100vh - 160px); overflow-y:auto;
  padding:var(--a-3); background:var(--panel); border:1px solid var(--border-strong); border-radius:var(--a-r-lg); box-shadow:var(--a-shadow-lg);
}
.m-dp-grid{ display:flex; flex-direction:column; gap:2px; }
.m-dp-row{ display:grid; grid-template-columns:repeat(7, 1fr); gap:2px; }
.m-dp-wd{ text-align:center; font-size:11px; font-weight:700; color:var(--text-faint); padding:2px 0; }
.m-dp-c{ display:flex; justify-content:center; }
.m-dp-d{
  position:relative; width:var(--m-tap); height:var(--m-tap); border-radius:50%; border:0; background:none;
  font:inherit; font-size:15px; font-variant-numeric:tabular-nums; color:var(--text); cursor:pointer;
}
.m-dp-d.is-today{ box-shadow:inset 0 0 0 2px var(--accent); }
.m-dp-d.is-on{ background:var(--accent-fill); color:#fff; font-weight:700; }   /* the page's .btn.primary pairing */
.m-dp-d:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:1px; }
.m-dp-dot{ position:absolute; left:50%; bottom:6px; width:5px; height:5px; margin-left:-2.5px; border-radius:50%; background:currentColor; opacity:.7; }
.m-dp-acts{ display:flex; flex-direction:column; gap:var(--a-2); margin-top:var(--a-3); }
.m-dp-more, .m-dp-today{ width:100%; min-height:var(--m-tap); justify-content:center; }

/* ---------- the read-only meeting card and the "+N" list: the one card, bridged to phone tokens ---------- */
.m-evcard{
  --a-float:var(--panel); --a-line-strong:var(--border-strong); --a-line-soft:var(--border-soft); --a-text:var(--text); --a-dim:var(--text-dim);
  --a-faint:var(--text-faint); --a-body:var(--text); --a-display:var(--app-font-display, inherit); --a-red:var(--red-text); --a-green:var(--green-text);
  --a-amber:var(--warn-text); --a-blue-text:var(--accent-text); --a-top-h:0px;
}
.m-evcard .a-cg-pop, .m-day-list{
  position:fixed; left:8px; right:8px; bottom:calc(var(--m-tabbar-h, 56px) + 8px + env(safe-area-inset-bottom)); top:auto !important;
  max-height:70vh; z-index:var(--z-dialog) !important;
}
.m-evcard .a-cg-pop-h b{ font-size:15px; }
.m-evcard .a-cg-evpop-r{ font-size:13px; }
.m-evcard .a-btn{ min-height:var(--m-tap); display:inline-flex; align-items:center; justify-content:center; gap:var(--a-1); text-decoration:none; cursor:pointer; }
.m-evcard .a-btn.icon{ min-width:var(--m-tap); padding:0; background:none; border-color:transparent; font-size:20px; }
.m-evcard .a-btn:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:1px; }
.m-day-list{
  display:flex; flex-direction:column; gap:var(--a-1); padding:var(--a-2); overflow-y:auto;
  background:var(--panel); border:1px solid var(--border-strong); border-radius:var(--a-r-lg); box-shadow:var(--a-shadow-lg);
}
.m-day-list-h{ display:flex; align-items:center; gap:var(--a-2); padding:0 0 var(--a-1) var(--a-2); }
.m-day-list-h b{ flex:1 1 auto; font-size:15px; }
.m-day-list-i{
  display:flex; flex-direction:column; align-items:flex-start; gap:1px; min-height:var(--m-tap); padding:var(--a-2) var(--a-3);
  border:1px solid var(--border-soft); border-left:3px solid var(--accent); border-radius:var(--a-r-sm); background:var(--panel-2);
  color:var(--text); font:inherit; text-align:left; cursor:pointer;
}
@media (max-width:360px){ .m-daybar{ padding-left:var(--a-3); padding-right:var(--a-3); } }

/* ---------- tap an empty time to block focus time (JS/features/mobile-focus-block.js; spec mobile-focus-block-2026-11-06) ---------- */
/* A free gap is a transparent button over the empty time, under the meetings in the list so a meeting keeps its own tap. At rest the
   timeline looks as it always did; pressed, a dashed half hour shows where the finger landed. pan-y keeps scroll and the day swipe. */
.m-day-gap{
  position:relative; display:block; width:100%; height:100%; padding:0; border:0; background:transparent; cursor:pointer;
  touch-action:pan-y; -webkit-tap-highlight-color:transparent; font:inherit; color:var(--accent-text);
}
.m-day-gap::after{
  content:attr(data-ghost); display:none; position:absolute; left:2px; right:2px; top:var(--gt, 0px); height:calc(var(--md-h) / 2 - 2px);
  align-items:center; padding:0 var(--a-2); border:2px dashed var(--accent); border-radius:var(--a-r-sm); background:var(--accent-soft);
  font-size:12px; font-weight:700; text-align:left; box-sizing:border-box;
}
.m-day-gap:active::after{ display:flex; }
.m-day-gap:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:-2px; border-radius:var(--a-r-sm); }
.m-day-gap:focus-visible::after{ content:'+ Block focus time'; display:flex; top:0; }
/* A pending block: the invite is sent, Outlook has not shown it yet. Not interactive; dashed, like an unconfirmed hold. */
.m-day-pend-slot{ pointer-events:none; }   /* drawn under any meeting, and never takes its tap */
.m-day-pend{
  display:flex; width:100%; height:100%; min-width:0; padding:3px 6px 3px 8px; overflow:hidden; box-sizing:border-box;
  color:var(--text-dim); background:var(--panel-2); border:1px dashed var(--accent); border-left:3px solid var(--accent); border-radius:var(--a-r-sm);
}
.m-day-pend-slot.is-short .m-day-pend{ padding-top:0; padding-bottom:0; }
.m-day-pend-slot.is-short .m-day-ev-in{ flex-direction:row; align-items:center; gap:6px; }

/* The sheet: the phone's .qs-sheet (CSS/mobile-tasks.css) with a start stepper, the m-seg length chips and a title field. */
.m-fb-sheet{ max-height:85vh; }
.m-fb-day{ margin:0 0 var(--a-3); font-size:13px; color:var(--text-dim); }
.m-fb-row{ padding:var(--a-2) 0; }
.m-fb-row > input[type="text"]{ width:100%; min-height:var(--m-tap); box-sizing:border-box; }
.m-fb-step{ display:flex; align-items:center; gap:var(--a-2); }
.m-fb-stepper{ flex:0 0 auto; min-width:var(--m-tap); min-height:var(--m-tap); justify-content:center; }
.m-fb-time{ flex:1 1 auto; text-align:center; font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }
.m-fb-len{ flex-wrap:wrap; }
.m-fb-len .m-seg-b{ flex:1 1 0; min-width:64px; }
.m-fb-len .m-seg-b:disabled{ opacity:.4; }
.m-fb-free{ margin:var(--a-2) 0 0; font-size:12px; color:var(--text-dim); }
.m-fb-note{ margin:var(--a-2) 0 0; font-size:12px; line-height:1.45; color:var(--text-dim); }
.m-fb-note.is-warn{ color:var(--warn-text); }
.m-fb-err{ margin:var(--a-2) 0 0; padding:var(--a-2) var(--a-3); border-radius:var(--a-r-sm); font-size:13px; line-height:1.4; color:var(--red-text); background:var(--panel-2); }
.m-fb-sheet .sheet-actions .btn{ min-height:var(--m-tap); }
