/* MMG Storefront: the planner (docs/superpowers/specs/2026-11-15-menu-train-4-planner.md).
   Built to the approved mock docs/superpowers/mocks/2026-11-14-menu-revamp/ (v32: the row 01 to 02 and S14 to S15, the panel Q1 to Q9, P2 to P2c, A1 to A8, the
   capsule E and S4, the desktop S9 to S9b) and the approved motion pack docs/superpowers/mocks/2026-11-15-menu-motion/ (the sheet and popover moments, the presses
   and the reduced-motion rule). The colours and spacing are custom properties local to this file; no shared token is added. Everything the module prints sits
   under .mmg-planner; the rest is the bottom bar's Plan item, which the navigation's own stylesheet does not know. Phone layout below 768px, desktop from
   768px. This is not mmg-menu.css: the menu's own file is untouched.
   The planner UX pass (docs/superpowers/specs/2026-11-16-planner-ux.md, approved mock docs/superpowers/mocks/2026-11-16-planner-ux/): tiles instead of pills, the row's
   info block, the panel's three groups, the selected style (the three tokens below), loading bones, the focus rules and the Plan entry's words. */

.mmg-planner {
  --mmg-planner-cream-50: #fbf6ec;
  --mmg-planner-cream-100: #f0e9de;
  --mmg-planner-cream-200: #e4ddd2;
  --mmg-planner-ink: #2f2c28;
  --mmg-planner-ink-muted: #55504a;
  --mmg-planner-brown: #68442c;
  --mmg-planner-scrim: rgba(47, 44, 40, 0.45);
  /* The selected style (A3-dark): a tile at rest, its tint and ring when chosen. The ring is its own colour, not the brand brown (brown is the Done button only). */
  --mmg-planner-tile: #f4eee3;
  --mmg-planner-accent-soft: #f0e9e1;
  --mmg-planner-accent: #6f4e37;

  --mmg-planner-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mmg-planner-serif: 'Noto Serif', 'Noto Serif Fallback', Georgia, 'Times New Roman', serif;

  --mmg-planner-ease-out: cubic-bezier(.22, .8, .2, 1);
  --mmg-planner-ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --mmg-planner-ease-in: cubic-bezier(.4, 0, 1, 1);

  box-sizing: border-box;
  color: var(--mmg-planner-ink);
  font-family: var(--mmg-planner-body);
  font-size: 14px;
  line-height: 20px;
}

.mmg-planner *,
.mmg-planner *::before,
.mmg-planner *::after {
  box-sizing: border-box;
}

.mmg-planner[hidden],
.mmg-planner [hidden] {
  display: none !important;
}

.mmg-planner a,
.mmg-planner button {
  -webkit-tap-highlight-color: transparent;
}

/* The theme (Bricks) gives headings, paragraphs, buttons, inputs and labels its own spacing, colour, border, font and size. This baseline states them all once,
   at zero extra specificity; each component's own rule below it (the same specificity, later in the file) then states what it needs. */
.mmg-planner :where(h2, h3, p, section, button, input, label, a) {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--mmg-planner-ink);
  font-family: var(--mmg-planner-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  text-decoration: none;
}

.mmg-planner button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.mmg-planner a,
.mmg-planner a:hover,
.mmg-planner a:focus,
.mmg-planner a:active,
.mmg-planner a:visited {
  color: inherit;
  text-decoration: none;
}

/* One focus ring: 2px in ink, on every control. The panel itself takes focus without a ring. */
.mmg-planner button:focus-visible,
.mmg-planner input:focus-visible,
.mmg-planner select:focus-visible,
.mmg-planner a:focus-visible {
  outline: 2px solid var(--mmg-planner-ink);
  outline-offset: 2px;
}

.mmg-nav-bar__plan:focus-visible {
  outline: 2px solid var(--mmg-nav-ink);
  outline-offset: 2px;
}

/* The bar's Plan item gets the focus back, for a pointer user, after the panel closes (script: focusQuiet): no ring, as for the controls inside the panel. */
.mmg-nav-bar__plan.no-ring:focus,
.mmg-nav-bar__plan.no-ring:focus-visible {
  outline: none;
}

.mmg-planner--panel:focus {
  outline: 0;
}

/* A control the script moves the focus to for a pointer user (script: focusQuiet) takes no ring; a keyboard user never gets this class. */
.mmg-planner .no-ring:focus,
.mmg-planner .no-ring:focus-visible {
  outline: none;
}

.mmg-planner__svg {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mmg-planner__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

html.mmg-planner-locked,
html.mmg-planner-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.mmg-planner-locked body {
  position: fixed;
  top: var(--mmg-planner-scroll-top, 0px);
  width: 100%;
}

/* ---- The Delivery | Pickup switch (the row and the panel print one each): two rounded tiles ------------------------------------------------------------ */

.mmg-planner__switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.mmg-planner__type {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--mmg-planner-tile);
  color: var(--mmg-planner-ink);
  text-align: left;
}

.mmg-planner__type-name {
  display: block;
  max-width: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

/* The second line is two lines of its own, split after the comma ("Earliest today," / "3 PM – 5 PM"); the script fills it and its height is reserved so nothing jumps. */
.mmg-planner__type-line {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 2px;
  color: var(--mmg-planner-ink-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  white-space: pre-line;
}

/* Before the first read the line is a bar the size of its text. */
.mmg-planner__type-line:empty::before {
  content: '';
  display: block;
  width: 72%;
  height: 12px;
  margin-top: 3px;
  border-radius: 6px;
  background: var(--mmg-planner-cream-200);
}

.mmg-planner__type-line.is-failed:empty::before {
  display: none;
}

.mmg-planner__type.is-on {
  background: var(--mmg-planner-accent-soft);
  box-shadow: inset 0 0 0 1px var(--mmg-planner-accent);
  color: var(--mmg-planner-ink);
}

.mmg-planner__type.is-on .mmg-planner__type-name {
  font-weight: 700;
}

/* The chosen tile's round check: the circle (::before) and the tick (::after), a mask filled from the tokens. */
.mmg-planner__type.is-on::before,
.mmg-planner__type.is-on::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
}

.mmg-planner__type.is-on::before {
  border-radius: 50%;
  background: var(--mmg-planner-accent);
}

.mmg-planner__type.is-on::after {
  background: var(--mmg-planner-cream-50);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.6l2.1-2.1 3.6 3.6 8.2-8.2L20 8 9.7 18.3z'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.6l2.1-2.1 3.6 3.6 8.2-8.2L20 8 9.7 18.3z'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}

/* ---- The row: the switch and the info block --------------------------------------------------------------------------------------------------------- */

.mmg-planner--row {
  display: block;
  padding: 12px 0 8px;
}

/* The row's tiles are 84px at every width; the phone row is 178px in every state (a new visitor, a saved choice, a gone slot, loading), the desktop row 120px. */
.mmg-planner__switch--row .mmg-planner__type {
  min-height: 84px;
}

.mmg-planner__switch--row .mmg-planner__type.is-on::before,
.mmg-planner__switch--row .mmg-planner__type.is-on::after {
  top: 8px;
  right: 8px;
}

.mmg-planner__summary {
  position: relative;
  min-width: 0;
  margin: 8px -4px 0;
  padding: 0 4px;
  /* A safety net: whatever the script leaves, the block never pushes the page wider. Clipped across only, so the 44px hit areas above and below stay; the 4px of padding each
     side (the margin takes it back) keeps the buttons' focus rings inside the clip. */
  overflow-x: clip;
  cursor: pointer;
}

.mmg-planner__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.mmg-planner__info-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  font-size: 15px;
  line-height: 22px;
}

/* The top line (the street, the place) is cut with an ellipsis on the phone; nothing else is. Unset, "Delivery from RM18" leads in the fee's weight. */
.mmg-planner__top,
.mmg-planner__sub {
  min-width: 0;
  overflow: hidden;
  color: var(--mmg-planner-ink);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmg-planner__top.is-fee {
  flex: none;
  overflow: visible;
  font-weight: 600;
}

.mmg-planner__subline {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 15px;
  line-height: 22px;
}

/* A delivery fee and the occasion may sit on two lines (the dot then goes); a pickup address stays on its line and is cut. */
.mmg-planner__subline.is-wrap {
  flex-wrap: wrap;
}

.mmg-planner__sub {
  flex: 0 1 auto;
  color: var(--mmg-planner-ink-muted);
}

.mmg-planner__sub.is-fee {
  color: var(--mmg-planner-ink);
  font-weight: 600;
}

.mmg-planner__sep {
  margin: 0 6px;
  color: var(--mmg-planner-ink-muted);
}

.mmg-planner__occ {
  flex: none;
  color: var(--mmg-planner-ink-muted);
  font-weight: 500;
  white-space: nowrap;
}

.mmg-planner__subline.is-broken .mmg-planner__occ,
.mmg-planner__subline.is-broken .mmg-planner__occbtn {
  flex: 0 0 100%;
}

/* "Add occasion": a text button, 44px to press though its text is 22px. */
.mmg-planner__occbtn {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  margin: -11px 0;
  color: var(--mmg-planner-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* The one outlined button of the info block: Change, or Add address. */
.mmg-planner__btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--mmg-planner-ink);
  border-radius: 16px;
  background: transparent;
  color: var(--mmg-planner-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

/* The pill is 32px; this keeps the hit area at 44px tall. */
.mmg-planner__btn::after {
  content: "";
  position: absolute;
  inset: -6px -4px -6px -6px;
}

.mmg-planner__btn:hover {
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__struck {
  color: var(--mmg-planner-ink-muted);
  text-decoration: line-through;
}

.mmg-planner__newtime {
  color: var(--mmg-planner-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---- The panel and its scrim (phone: a bottom sheet; desktop: a popover under the summary) -------------------------------------------------------------- */

.mmg-planner--scrim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--mmg-planner-scrim);
}

@media (max-width: 767px) {
  .mmg-planner--scrim {
    touch-action: none;
  }
}

.mmg-planner--panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: var(--mmg-planner-cream-50);
}

.mmg-planner__handle {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  height: 32px;
  border-radius: inherit;
  touch-action: none;
}

.mmg-planner__handle::before {
  position: absolute;
  top: 8px;
  left: calc(50% - 18px);
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--mmg-planner-cream-200);
  pointer-events: none;
  content: '';
}

.mmg-planner__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 8px 16px;
}

.mmg-planner__title {
  color: var(--mmg-planner-ink);
  font-family: var(--mmg-planner-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
}

.mmg-planner__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 0;
  color: var(--mmg-planner-ink);
}

.mmg-planner__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

/* The body scrolls by wheel, touch and keys; no native bar is drawn. */
.mmg-planner__body::-webkit-scrollbar {
  display: none;
}

/* The panel's tiles are 88px, the check 20px at 14px/14px. */
.mmg-planner__body > .mmg-planner__switch {
  margin-bottom: 16px;
}

.mmg-planner__body > .mmg-planner__switch .mmg-planner__type {
  height: 88px;
  padding: 16px;
}

.mmg-planner__body > .mmg-planner__switch .mmg-planner__type-name {
  font-size: 18px;
  line-height: 22px;
}

.mmg-planner__body > .mmg-planner__switch .mmg-planner__type.is-on::before,
.mmg-planner__body > .mmg-planner__switch .mmg-planner__type.is-on::after {
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
}

/* The groups: 16px apart, a folded row 8px under what is above it, and the slots 8px under their day strip. */
.mmg-planner__body > .mmg-planner__sec {
  margin: 16px 0 0;
}

.mmg-planner__body > .mmg-planner__sec.is-folded {
  margin-top: 8px;
}

.mmg-planner__body > .mmg-planner__sec[data-mmg-planner-sec='slot'] {
  margin-top: 8px;
}

/* A folded group is its row and nothing else (Occasion's select lies over its row, so it stays). */
.mmg-planner__sec.is-folded > :not(.mmg-planner__sum):not(.mmg-planner__select) {
  display: none;
}

/* The label row is the label's 16px line; the DATE row is 20px tall because of its "More dates" link. */
.mmg-planner__sechead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 16px;
  margin-bottom: 8px;
}

.mmg-planner__sec[data-mmg-planner-sec='occasion'] .mmg-planner__sechead {
  justify-content: flex-start;
  gap: 8px;
}

.mmg-planner__label {
  color: var(--mmg-planner-ink-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* The slots' own label names the viewed day, in the small label style. */
.mmg-planner__slotday {
  margin: 4px 0 6px;
}

.mmg-planner__optional {
  color: var(--mmg-planner-ink-muted);
  font-size: 13px;
  line-height: 16px;
}

.mmg-planner__sec[data-mmg-planner-sec='occasion'] .mmg-planner__optional::before {
  content: '· ';
}

.mmg-planner__link {
  display: inline-block;
  color: var(--mmg-planner-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mmg-planner .mmg-planner__link:hover,
.mmg-planner .mmg-planner__link:focus,
.mmg-planner .mmg-planner__link:active {
  color: var(--mmg-planner-ink);
  text-decoration: underline;
}

/* More dates: 44px to press, in the 20px line of its heading. */
.mmg-planner__sechead .mmg-planner__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -14px 0;
}

/* A folded group's row: the label, what it holds, an optional second line, and the action word. */
.mmg-planner__sum {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid var(--mmg-planner-cream-200);
  border-radius: 12px;
  background: var(--mmg-planner-cream-50);
  color: var(--mmg-planner-ink);
  font-family: inherit;
  text-align: left;
}

.mmg-planner__sum:hover {
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__sum.is-static,
.mmg-planner__sum.is-static:hover {
  background: var(--mmg-planner-cream-50);
  cursor: default;
}

.mmg-planner__sum-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.mmg-planner__sum-lab {
  color: var(--mmg-planner-ink-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.mmg-planner__sum-val {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmg-planner__sum-sub {
  overflow: hidden;
  color: var(--mmg-planner-ink-muted);
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-mmg-planner-sum="address"] {
  min-height: 102px;
}

[data-mmg-planner-sum="address"] :is(.mmg-planner__sum-val, .mmg-planner__sum-sub) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}

.mmg-planner__sum-sub.is-fee {
  color: var(--mmg-planner-ink);
  font-weight: 600;
}

.mmg-planner__sum.is-empty .mmg-planner__sum-val {
  color: var(--mmg-planner-ink-muted);
  font-weight: 500;
}

.mmg-planner__sum-act {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  color: var(--mmg-planner-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mmg-planner__sum.is-empty .mmg-planner__sum-act {
  color: var(--mmg-planner-ink-muted);
  font-weight: 500;
  text-decoration: none;
}

.mmg-planner__muted {
  color: var(--mmg-planner-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.mmg-planner__foot {
  flex: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--mmg-planner-cream-200);
}

.mmg-planner__action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border-radius: 999px;
  background: var(--mmg-planner-brown);
  color: var(--mmg-planner-cream-50);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.mmg-planner__action.is-quiet {
  opacity: 0.8;
  pointer-events: none;
}

.mmg-planner__spin {
  display: none;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}

.mmg-planner__action.is-busy .mmg-planner__spin {
  display: block;
  animation: mmg-planner-spin 700ms linear infinite;
}

/* Reserve the matching space on the right so the footer label stays centered while the spinner appears. */
.mmg-planner__action[data-mmg-planner-action] {
  display: grid;
  grid-template-columns: 16px auto 16px;
}

.mmg-planner__action[data-mmg-planner-action] .mmg-planner__spin {
  display: block;
  visibility: hidden;
}

.mmg-planner__action[data-mmg-planner-action].is-busy .mmg-planner__spin {
  visibility: visible;
}

@keyframes mmg-planner-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Address ------------------------------------------------------------------------------------------------------------------------------------------ */

.mmg-planner__saved {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0 0;
}

.mmg-planner__line {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}

/* The saved address: the street (it wraps) and the fee flush right, "postcode town", then Saved on the left and Change and Remove on the right, on a row of their own
   (they do not widen the fee's column). */
.mmg-planner__place {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 12px;
  margin-bottom: -6px;
}

/* The fee ("Delivery fee RM20") sits under the street and its town, the actions on the same row at the right. */
.mmg-planner__fee {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: start;
  color: var(--mmg-planner-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.mmg-planner__fee:empty {
  display: none;
}

/* The pickup place: its name, then its address on its own line. */
.mmg-planner__saved.mmg-planner__pickup {
  display: grid;
  gap: 2px;
  padding: 4px 0 0;
}

.mmg-planner__pickup .mmg-planner__town {
  color: var(--mmg-planner-ink-muted);
  font-size: 15px;
  line-height: 22px;
}

.mmg-planner__town {
  grid-column: 1 / -1;
  color: var(--mmg-planner-ink-muted);
  font-size: 15px;
  line-height: 20px;
}

/* "Saved": a live region in the panel body, outside every group and always in the DOM; the script writes the text. Visually hidden: the folded address row is the
   visible confirmation. */
.mmg-planner__ok {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mmg-planner__acts {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 3;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 16px;
  min-height: 32px;
}

.mmg-planner__acts .mmg-planner__link,
.mmg-planner__help .mmg-planner__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The row is 32px tall; the 44px tap targets of Change and Remove reach 6px above and below it. */
.mmg-planner__acts .mmg-planner__link {
  margin: -6px 0;
}

/* A suggestion is being priced: the fee waits as a bone and a ring stands where Change and Remove are. */
.mmg-planner__place.is-busy .mmg-planner__fee {
  align-self: start;
  width: 46px;
  height: 16px;
  margin-top: 3px;
  border-radius: 8px;
  background: var(--mmg-planner-cream-100);
  color: transparent;
}

.mmg-planner__place.is-busy .mmg-planner__link {
  display: none;
}

.mmg-planner__place.is-busy .mmg-planner__spin {
  display: block;
  color: var(--mmg-planner-ink-muted);
  animation: mmg-planner-spin 700ms linear infinite;
}

.mmg-planner__smart {
  position: relative;
  display: flex;
  align-items: center;
}

.mmg-planner__smart .mmg-planner__svg {
  position: absolute;
  left: 12px;
  color: var(--mmg-planner-ink-muted);
  pointer-events: none;
}

.mmg-planner__input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--mmg-planner-cream-100);
  color: var(--mmg-planner-ink);
  font-size: 16px;
  line-height: 24px;
  text-overflow: ellipsis;
}

/* Keep the address field visible when opening the planner focuses it. */
.mmg-planner__input:focus {
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__input--smart {
  padding-left: 42px;
}

.mmg-planner__input::placeholder {
  color: var(--mmg-planner-ink-muted);
  opacity: 1;
}

/* Street on its own row, then postcode and town side by side. */
.mmg-planner__typed {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.mmg-planner__field {
  display: block;
  min-width: 0;
}

.mmg-planner__field:first-child {
  grid-column: 1 / -1;
}

.mmg-planner__hint,
.mmg-planner__msg {
  margin-top: 8px;
  color: var(--mmg-planner-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

/* "Delivery from RM18" sits 4px under the field, its text on the edge of the pin (12px in, and the glyph's own 5px inset): the pill's radius pulls its edge away from the text. */
.mmg-planner__hint {
  margin-top: 4px;
  padding-left: 17px;
}

/* On the popover the fee line stops showing once there is text but keeps its 24px, so the panel (and the button under it) does not move when the dropdown opens over it. */
.mmg-planner__hint.is-quiet {
  visibility: hidden;
}

.mmg-planner__msg {
  margin-top: 12px;
  color: var(--mmg-planner-ink);
  font-weight: 500;
}

.mmg-planner__help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mmg-planner-ink-muted);
}

.mmg-planner__help .mmg-planner__link {
  margin-left: auto;
}

/* The map credit under the rows, the checkout's own (.mmg-ca-attr): grey 12px Roboto then Arial, right-aligned, 42px tall. It sits at the foot of the box (its own scroller) while the
   rows scroll behind it, and directly under the last row when they all fit. */
.mmg-planner__attr {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 42px;
  padding: 0 14px;
  background: var(--mmg-planner-cream-50);
  color: #5e5e5e;
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.mmg-planner__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 0 -8px;
  padding: 7px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.mmg-planner__opt[aria-selected='true'] {
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__opt.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.mmg-planner__opt .mmg-planner__svg {
  color: var(--mmg-planner-ink-muted);
}

.mmg-planner__opt-body {
  min-width: 0;
}

.mmg-planner__opt-main,
.mmg-planner__opt-more {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmg-planner__opt-main {
  font-size: 16px;
  line-height: 22px;
}

.mmg-planner__opt-main strong {
  font-weight: 600;
}

.mmg-planner__opt-more {
  color: var(--mmg-planner-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

/* The panel's suggestions are the picker's box: bordered and white, a line between the rows, the map credit as the last row, at the box's foot.
   The box is out of the flow, an overlay: it hangs 8px under the field (44px, and the gap) inside the form, over the sections below, so the skeleton, the rows and "No match" never move them. It
   scrolls inside itself with no bar, so the credit stays at its foot; the script sets its height to what the sheet still shows under the field, so the sheet's own scroll never cuts it
   (from 768px it is the fixed dropdown below). */
.mmg-planner--panel .mmg-planner__form {
  position: relative;
}

.mmg-planner--panel .mmg-planner__suggest {
  position: absolute;
  top: 44px;
  right: 0;
  left: 0;
  z-index: 1;
  margin-top: 8px;
  overflow: hidden auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  border: 1px solid var(--mmg-planner-cream-200);
  border-radius: 16px;
  background: #fff;
}

.mmg-planner--panel .mmg-planner__suggest::-webkit-scrollbar {
  display: none;
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__opt {
  margin: 0;
  padding: 7px 14px;
  border-radius: 0;
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__opt + .mmg-planner__opt {
  border-top: 1px solid var(--mmg-planner-cream-200);
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__help {
  padding: 12px 14px;
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__attr {
  padding: 0 14px;
  border-top: 1px solid var(--mmg-planner-cream-200);
  background: #fff;
}

/* Only "Enter manually" to show (Change refills the field with the saved street): a plain line under the field, on the fee line's indent, with no box and no height of its own; the link keeps
   its 44px tap area, which hangs below the line. */
.mmg-planner--panel .mmg-planner__suggest.is-plain {
  position: static;
  margin-top: 4px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
}

.mmg-planner--panel .mmg-planner__suggest.is-plain .mmg-planner__help {
  justify-content: flex-start;
  gap: 0;
  padding: 0 0 0 17px;
}

.mmg-planner--panel .mmg-planner__suggest.is-plain .mmg-planner__help .mmg-planner__link {
  align-items: flex-start;
  margin: 0 0 -24px;
}

/* The rows still on their way are the loaded rows' shape (a 56px row, the 14px sides, a line between): the pin's dot and the two text bars, so the list replaces them with nothing moving. */
.mmg-planner--panel .mmg-planner__suggest .mmg-planner__bone--opt {
  box-sizing: border-box;
  grid-template-columns: 22px 1fr;
  column-gap: 10px;
  padding: 0 14px;
  border-radius: 0;
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__bone--opt::before {
  justify-self: center;
  background: var(--mmg-planner-cream-200);
}

.mmg-planner--panel .mmg-planner__suggest .mmg-planner__bone--opt + .mmg-planner__bone--opt {
  height: 57px;
  border-top: 1px solid var(--mmg-planner-cream-200);
}

/* From 768px the box is a dropdown under the field, over the popover and the page: fixed, so the popover never grows or scrolls for it (the script sets its top, left, width and the
   height left in the window). */
@media (min-width: 768px) {
  .mmg-planner--panel .mmg-planner__suggest {
    position: fixed;
    margin-top: 0;
  }
}

/* The phone's keyboard is up: pad below, so ADDRESS can sit under the title in every typing state. */
.mmg-planner--panel.is-typing .mmg-planner__body {
  padding-bottom: 70vh;
}

@media (max-width: 767px) {
  /* Match the product sheet's folded and expanded plan heights. The screen
     caps the height, so longer date content still scrolls. */
  [data-mmg-planner-panel]:not(.is-typing):has([data-mmg-planner-sec="occasion"]:not([hidden])) {
    --mmg-planner-rest-height: 585px;
    min-height: min(var(--mmg-planner-rest-height), calc(100vh - 20px));
    min-height: min(var(--mmg-planner-rest-height), calc(100dvh - 20px));
  }

  [data-mmg-planner-panel]:not(.is-typing):has([data-mmg-planner-sec="occasion"]:not([hidden])):has([data-mmg-planner-sec="date"]:not([hidden], .is-folded)) {
    --mmg-planner-rest-height: 695px;
  }

  [data-mmg-planner-panel]:not(.is-typing) .mmg-planner__body:has(> [data-mmg-planner-sec="occasion"]:not([hidden])) {
    display: flex;
    flex-direction: column;
  }

  [data-mmg-planner-panel]:not(.is-typing) .mmg-planner__body > :is(.mmg-planner__sec, .mmg-planner__switch) {
    flex-shrink: 0;
  }

  [data-mmg-planner-panel]:not(.is-typing) .mmg-planner__body > [data-mmg-planner-sec="occasion"] {
    margin-top: auto;
    padding-top: 8px;
  }

  [data-mmg-planner-panel].is-address-keyboard {
    top: calc(var(--mmg-planner-visible-top) + 8px);
    bottom: auto;
    height: calc(var(--mmg-planner-visible-height) - 8px);
    max-height: calc(var(--mmg-planner-visible-height) - 8px);
  }

  [data-mmg-planner-panel].is-address-keyboard .mmg-planner__body {
    padding-bottom: 16px;
  }

  /* Extra scroll room belongs to the content so the body can shrink with the keyboard. */
  [data-mmg-planner-panel].is-address-keyboard .mmg-planner__body::after {
    display: block;
    height: var(--mmg-planner-visible-height);
    content: '';
  }

  [data-mmg-planner-panel].is-address-keyboard .mmg-planner__foot {
    padding-bottom: 12px;
  }

  [data-mmg-planner-panel].is-address-keyboard .mmg-planner__body > .mmg-planner__switch,
  [data-mmg-planner-panel].is-address-keyboard [data-mmg-planner-sec="date"],
  [data-mmg-planner-panel].is-address-keyboard [data-mmg-planner-sec="slot"],
  [data-mmg-planner-panel].is-address-keyboard [data-mmg-planner-sec="occasion"] {
    display: none;
  }

  /* Keep the field and independently scrolling results usable above a tall keyboard. */
  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__handle {
    height: 14px;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__handle::before {
    top: 5px;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__head {
    min-height: 44px;
    padding: 0 148px 0 16px;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__close {
    position: absolute;
    top: 14px;
    right: 4px;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__sec:has(.mmg-planner__smart:not([hidden])) {
    margin-top: 0;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__sec:has(.mmg-planner__smart:not([hidden])) .mmg-planner__sechead:not(:has(button)) {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__foot {
    position: absolute;
    top: 14px;
    right: 52px;
    width: 88px;
    padding: 0;
    border: 0;
  }

  .mmg-planner--panel.is-short-address-keyboard .mmg-planner__suggest .mmg-planner__attr {
    height: 20px;
  }

  /* Continue the sheet surface under Safari's translucent keyboard controls. */
  .mmg-planner--scrim.is-address-keyboard {
    background: linear-gradient(
      to bottom,
      var(--mmg-planner-scrim) var(--mmg-planner-keyboard-edge),
      var(--mmg-planner-cream-50) var(--mmg-planner-keyboard-edge)
    );
  }
}

.mmg-planner__outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin-top: 12px;
  padding: 0 20px;
  border: 1px solid var(--mmg-planner-ink);
  border-radius: 999px;
  color: var(--mmg-planner-ink);
  font-size: 15px;
  font-weight: 600;
}

/* ---- Date: the five day tiles, the calendar, the gone slot and the notice ----------------------------------------------------------------------------- */

.mmg-planner__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mmg-planner__strip::-webkit-scrollbar {
  display: none;
}

.mmg-planner__day {
  display: flex;
  flex: 0 0 calc((100% - 32px) / 5);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 64px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--mmg-planner-tile);
  color: var(--mmg-planner-ink);
  text-align: center;
}

.mmg-planner__day-top,
.mmg-planner__day-mon {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--mmg-planner-ink-muted);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.mmg-planner__day-num {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 20px;
}

/* Chosen: a day with a time saved on it (is-on), or one the visitor tapped (or a search shortcut asked for) that has no time yet (is-tapped). The day the panel falls back
   to is dashed until it is tapped or saved. */
.mmg-planner__day.is-on,
.mmg-planner__day.is-tapped,
.mmg-planner__cal-day.is-on,
.mmg-planner__cal-day.is-tapped,
.mmg-planner__slot.is-on {
  background: var(--mmg-planner-accent-soft);
  box-shadow: inset 0 0 0 1px var(--mmg-planner-accent);
  color: var(--mmg-planner-ink);
  font-weight: 700;
}

.mmg-planner__day.is-suggested {
  border-style: dashed;
  border-color: var(--mmg-planner-accent);
}

.mmg-planner__day.is-on .mmg-planner__day-top,
.mmg-planner__day.is-on .mmg-planner__day-mon,
.mmg-planner__day.is-tapped .mmg-planner__day-top,
.mmg-planner__day.is-tapped .mmg-planner__day-mon {
  color: var(--mmg-planner-ink);
  font-weight: 400;
}

.mmg-planner__day.is-on .mmg-planner__day-num,
.mmg-planner__day.is-tapped .mmg-planner__day-num {
  font-weight: 700;
}

/* Keyboard focus on a day or a slot is an inset ring that follows the tile, so the strip never clips it. A pointer user's focus (no-ring) draws none. */
.mmg-planner__day:focus-visible:not(.no-ring),
.mmg-planner__slot:focus-visible:not(.no-ring) {
  outline: 2px solid var(--mmg-planner-ink);
  outline-offset: -2px;
}

/* A closed tile or slot: crossed out by two diagonals (the live picker's pattern), muted, and not tappable. */
.mmg-planner__day.is-gone,
.mmg-planner__slot.is-gone {
  background-image: linear-gradient(to top right, transparent calc(50% - 0.75px), rgba(85, 80, 74, 0.55) calc(50% - 0.75px), rgba(85, 80, 74, 0.55) calc(50% + 0.75px), transparent calc(50% + 0.75px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.75px), rgba(85, 80, 74, 0.55) calc(50% - 0.75px), rgba(85, 80, 74, 0.55) calc(50% + 0.75px), transparent calc(50% + 0.75px));
  color: var(--mmg-planner-ink-muted);
  cursor: default;
}

.mmg-planner__calendar {
  padding: 0;
}

.mmg-planner__cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mmg-planner__cal-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.mmg-planner__cal-nav {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--mmg-planner-ink);
}

.mmg-planner__cal-nav:disabled {
  color: var(--mmg-planner-ink-muted);
  cursor: default;
  opacity: 0.4;
}

.mmg-planner__cal-nav .mmg-planner__svg {
  width: 20px;
  height: 20px;
}

.mmg-planner__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 0;
}

.mmg-planner__cal-dow {
  display: block;
  color: var(--mmg-planner-ink-muted);
  font-size: 12px;
  line-height: 24px;
  text-align: center;
}

.mmg-planner__cal-blank {
  display: block;
}

.mmg-planner__cal-day {
  position: relative;
  display: block;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--mmg-planner-tile);
  color: var(--mmg-planner-ink);
  font-size: 15px;
  line-height: 38px;
  text-align: center;
}

.mmg-planner__cal-day.is-muted {
  background: none;
  color: var(--mmg-planner-ink-muted);
  cursor: default;
  opacity: 0.45;
}

.mmg-planner__cal-day.is-today {
  color: var(--mmg-planner-ink);
  font-weight: 600;
}

.mmg-planner__cal-day.is-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.mmg-planner__gone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

/* The gone slot's offer: the same outlined secondary pill as the row's button. */
.mmg-planner__use {
  display: inline-flex;
  align-items: center;
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--mmg-planner-ink);
  border-radius: 22px;
  background: transparent;
  color: var(--mmg-planner-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.mmg-planner__note {
  margin-top: 8px;
  color: var(--mmg-planner-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

/* ---- Time slots, the order-by line, the occasion select --------------------------------------------------------------------------------------------------- */

.mmg-planner__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mmg-planner__slot {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 48px;
  padding: 0 8px;
  border-radius: 16px;
  background: var(--mmg-planner-tile);
  color: var(--mmg-planner-ink);
  font-size: 15px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

.mmg-planner__orderby {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--mmg-planner-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.mmg-planner__orderby .mmg-planner__svg {
  width: 18px;
  height: 18px;
}

.mmg-planner__error {
  margin-top: 12px;
  color: var(--mmg-planner-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.mmg-planner__select {
  position: relative;
}

/* The native select: a rounded box with its chevron drawn by a mask (no colour in the image). */
.mmg-planner__selectbox {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 44px 0 16px;
  border: 0;
  border-radius: 16px;
  background-color: var(--mmg-planner-cream-100);
  color: var(--mmg-planner-ink-muted);
  font-family: var(--mmg-planner-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.mmg-planner__selectbox.is-set {
  color: var(--mmg-planner-ink);
  font-weight: 600;
}

.mmg-planner__selectbox option {
  background: var(--mmg-planner-cream-50);
  color: var(--mmg-planner-ink);
  font-weight: 400;
}

.mmg-planner__select::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--mmg-planner-ink-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.3 9.7l1.4-1.4 5.3 5.3 5.3-5.3 1.4 1.4-6.7 6.7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.3 9.7l1.4-1.4 5.3 5.3 5.3-5.3 1.4 1.4-6.7 6.7z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

/* Folded, the select lies over its row (the chevron gone, its text clear) so one tap on the row opens the native picker; its focus ring is the row's. */
.mmg-planner__sec[data-mmg-planner-sec='occasion'].is-folded {
  position: relative;
}

.mmg-planner__sec[data-mmg-planner-sec='occasion'].is-folded > .mmg-planner__select {
  position: absolute;
  inset: 0;
}

.mmg-planner__sec[data-mmg-planner-sec='occasion'].is-folded > .mmg-planner__select::after {
  display: none;
}

.mmg-planner__sec[data-mmg-planner-sec='occasion'].is-folded .mmg-planner__selectbox {
  height: 100%;
  border-radius: 12px;
  background: none;
  color: transparent;
}

/* ---- Loading: bones the size of the tiles and slots they stand for, no caption --------------------------------------------------------------------------- */

.mmg-planner__bone {
  display: block;
  border-radius: 16px;
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__bone--day {
  flex: 0 0 calc((100% - 32px) / 5);
  height: 64px;
}

.mmg-planner__bone--opt {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px 12px;
  align-content: center;
  height: 56px;
  background: none;
}

.mmg-planner__bone--opt::before {
  content: '';
  grid-row: 1 / 3;
  align-self: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__bar {
  grid-column: 2;
  height: 12px;
  border-radius: 6px;
  background: var(--mmg-planner-cream-100);
}

.mmg-planner__bar:first-child {
  width: 62%;
}

.mmg-planner__bar:last-child {
  width: 90%;
}

.mmg-planner__bone--slot {
  flex: 1 1 0;
  min-width: 104px;
  height: 48px;
  border-radius: 16px;
}

/* ---- The bottom bar's Plan item (the navigation's stylesheet knows only its own slots) ------------------------------------------------------------------- */

.mmg-nav-bar__plan {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  width: auto;
  height: 48px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  color: var(--mmg-nav-ink);
  cursor: pointer;
  font-family: var(--mmg-nav-body);
  transition: height 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.mmg-nav-bar__plan .mmg-planner__svg {
  width: 22px;
  height: 22px;
}

/* With words the glyph gives way to two lines: the day, and under it the time. */
.mmg-nav-bar__plan.has-text {
  height: 52px;
}

.mmg-nav-bar__plan.has-text .mmg-planner__svg,
.mmg-nav-bar__pdp-plan.has-text .mmg-nav-svg {
  width: 18px;
  height: 18px;
}

.mmg-nav-bar__plan-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  color: var(--mmg-nav-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

.mmg-nav-bar__plan-text .mmg-nav-plan__time {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 400;
}

/* One word and one line in the bar: the month, the comma and the short word are for the shrunk bar and the header. */
.mmg-nav-bar__plan-text .mmg-nav-plan__short,
.mmg-nav-bar__plan-text .mmg-nav-plan__month,
.mmg-nav-bar__plan-text .mmg-nav-plan__comma {
  display: none;
}

/* Scrolling down shrinks the bar to icons and one short word ("Today", "Tmrw", "Sun 22"). */
.mmg-nav-bar.is-shrunk .mmg-nav-bar__plan,
.mmg-nav-bar.is-shrunk .mmg-nav-bar__plan.has-text {
  height: 44px;
  overflow: visible;
}

.mmg-nav-bar.is-shrunk .mmg-nav-bar__plan-text .mmg-nav-plan__time {
  display: none;
}

.mmg-nav-bar.is-shrunk .mmg-nav-bar__plan-text.has-short .mmg-nav-plan__lead {
  display: none;
}

.mmg-nav-bar.is-shrunk .mmg-nav-bar__plan-text.has-short .mmg-nav-plan__short {
  display: inline;
}

@media (max-width: 340px) {
  .mmg-nav-bar__plan-text {
    font-size: 11.5px;
  }

  .mmg-nav-bar__plan-text .mmg-nav-plan__time {
    font-size: 10.5px;
  }
}

/* ---- Desktop: the info block beside the tiles, the popover ----------------------------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .mmg-planner--row {
    min-height: 178px;
  }
}

@media (min-width: 768px) {
  .mmg-planner--row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0 24px;
  }

  .mmg-planner--row .mmg-planner__switch {
    flex: none;
    width: 360px;
  }

  .mmg-planner--row .mmg-planner__summary {
    flex: 0 1 auto;
    margin: 0 -4px;
  }

  .mmg-planner__info-text {
    flex: 0 1 auto;
    max-width: 340px;
  }

  .mmg-planner--scrim {
    display: none !important;
  }

  /* Hung from the header (the script adds .is-hung): the page darkens, under the header (z 40) like the search scrim. :not([hidden]) is required: closing only
     conceals the scrim and never clears .is-hung, and a closed scrim left at display block would eat every click under the header. */
  .mmg-planner--scrim.is-hung:not([hidden]) {
    display: block !important;
    z-index: 39;
  }

  /* 432px, its left edge and top set by the script from the summary; the body scrolls and the title and the button stay. */
  .mmg-planner--panel {
    top: 120px;
    right: auto;
    bottom: auto;
    left: 40px;
    z-index: 45;
    width: 432px;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 136px);
    border: 1px solid var(--mmg-planner-cream-200);
    border-radius: 12px;
  }

  /* Hung from the header: flush under it, no border, rounded bottom (the mega menu's convention); from the summary row it stays the bordered popover. */
  .mmg-planner--panel.is-hung {
    border: 0;
    border-radius: 0 0 12px 12px;
  }

  .mmg-planner__handle {
    display: none;
  }

  .mmg-planner__head {
    padding-top: 8px;
  }

  /* The button sits under the body with no rule above it, 16px from the popover's edge. */
  .mmg-planner__foot {
    padding: 0 16px 16px;
    border-top: 0;
  }
}

@media (min-width: 1024px) {
  .mmg-planner--row .mmg-planner__switch {
    width: 440px;
  }
}

/* Below 1024px a delivery fee and the occasion never share a line: the occasion (or "Add occasion") starts its own and no dot is drawn. From 1024px they share one when they
   fit (the script measures, above). */
@media (max-width: 1023px) {
  .mmg-planner__subline.is-wrap .mmg-planner__occ,
  .mmg-planner__subline.is-wrap .mmg-planner__occbtn {
    flex: 0 0 100%;
  }

  .mmg-planner__subline.is-wrap .mmg-planner__sep {
    display: none;
  }
}

/* ---- Motion ------------------------------------------------------------------------------------------------------------------------------------------- */

/* Built to the approved motion pack: the phone sheet is the sheet moment, the desktop popover the popover moment, the presses are moment 1. The script
   removes [hidden] (the resting state), then adds .is-open; on close it removes .is-open and sets [hidden] when the transition ends. The closed state is under
   .has-motion, a class the script adds only when the browser runs transitions, so without script the shells stay [hidden] and with a script that cannot
   animate they simply appear and go. */
.mmg-planner--panel.has-motion {
  transform: translateY(var(--mmg-planner-exit-travel, 100%));
  pointer-events: none;
  transition: transform 200ms var(--mmg-planner-ease-in);
}

.mmg-planner--panel.has-motion.is-open {
  transform: none;
  pointer-events: auto;
  transition: transform 300ms var(--mmg-planner-ease-sheet);
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .mmg-planner--panel.has-motion {
    transition: transform 200ms var(--mmg-planner-ease-in), translate 200ms var(--mmg-planner-ease-in);
  }

  .mmg-planner--panel.has-motion.is-open {
    transition: transform 300ms var(--mmg-planner-ease-sheet), translate 160ms ease-out;
  }

  .mmg-planner--panel.has-motion.is-open.is-handle-dragging {
    transition: none;
  }
}

.mmg-planner--scrim.has-motion {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.mmg-planner--scrim.has-motion.is-open {
  opacity: 1;
  transition: opacity 300ms ease-out;
}

@media (min-width: 768px) {
  .mmg-planner--panel.has-motion {
    transform: translateY(-6px);
    opacity: 0;
    transition: transform 140ms var(--mmg-planner-ease-in), opacity 140ms ease-in;
  }

  .mmg-planner--panel.has-motion.is-open {
    transform: none;
    opacity: 1;
    transition: transform 220ms var(--mmg-planner-ease-out), opacity 180ms ease-out;
  }
}

/* One fade for the three desktop scrims: the search scrim's, 220ms in and 140ms out, ease-in (the shorthand: the rule above says ease-out). */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .mmg-planner--scrim.has-motion {
    opacity: 0;
    transition: opacity 140ms ease-in;
  }

  .mmg-planner--scrim.has-motion.is-open {
    opacity: 1;
    transition: opacity 220ms ease-in;
  }
}

/* Press: down 80ms, release 180ms. `scale`, not `transform`, so it never fights the shell's own slide. */
.mmg-planner :is(.mmg-planner__type, .mmg-planner__day, .mmg-planner__slot, .mmg-planner__cal-day, .mmg-planner__use, .mmg-planner__action, .mmg-planner__outline, .mmg-planner__btn) {
  touch-action: manipulation;
  transition: scale 180ms var(--mmg-planner-ease-out), opacity 180ms var(--mmg-planner-ease-out), background-color 180ms var(--mmg-planner-ease-out), color 180ms var(--mmg-planner-ease-out);
}

.mmg-planner :is(.mmg-planner__type, .mmg-planner__day, .mmg-planner__slot, .mmg-planner__cal-day, .mmg-planner__use, .mmg-planner__action, .mmg-planner__outline, .mmg-planner__btn):not(.is-gone):not(.is-muted):active {
  scale: 0.96;
  transition-duration: 80ms;
}

@media (hover: hover) {
  .mmg-planner :is(.mmg-planner__day, .mmg-planner__slot, .mmg-planner__cal-day):not(.is-on):not(.is-tapped):not(.is-gone):not(.is-muted):hover {
    background-color: var(--mmg-planner-cream-200);
  }
}

/* Reduced motion: no scale or slide. The panel and the scrim become a plain short fade; presses answer with a tone change; the busy ring stands still. */
@media (prefers-reduced-motion: reduce) {
  .mmg-planner :is(.mmg-planner__type, .mmg-planner__day, .mmg-planner__slot, .mmg-planner__cal-day, .mmg-planner__use, .mmg-planner__action, .mmg-planner__outline, .mmg-planner__btn):not(.is-gone):not(.is-muted):active {
    scale: none;
    opacity: 0.85;
    transition: opacity 80ms linear;
  }

  .mmg-planner--panel.has-motion,
  .mmg-planner--panel.has-motion.is-open {
    transform: none;
    transition: opacity 120ms linear;
  }

  .mmg-planner--panel.has-motion {
    opacity: 0;
  }

  .mmg-planner--panel.has-motion.is-open {
    opacity: 1;
  }

  .mmg-planner--scrim.has-motion,
  .mmg-planner--scrim.has-motion.is-open {
    transition-duration: 120ms;
  }

  .mmg-planner__action.is-busy .mmg-planner__spin,
  .mmg-planner__place.is-busy .mmg-planner__spin {
    animation: none;
  }

  .mmg-nav-bar__plan {
    transition: none;
  }
}

/* ---- Journey motion (docs/superpowers/specs/2026-11-16-journey-motion.md, D.4; approved mock 2026-11-16-journey-motion) ---------------------------------------------- */

/* The bar's Plan item answers a press (the row's button does, with the planner's own press above): `scale`, down 80ms, release 180ms. One class more than `.mmg-nav-bar__plan` above, so its
   `height 0.2s ease` stays in the list; the tokens of the navigation (the bar is outside .mmg-planner). */
.mmg-nav-bar .mmg-nav-bar__plan { touch-action: manipulation; transition: scale 180ms var(--mmg-nav-ease-out), opacity 180ms var(--mmg-nav-ease-out), background-color 180ms var(--mmg-nav-ease-out), color 180ms var(--mmg-nav-ease-out), height 0.2s ease; }
.mmg-nav-bar .mmg-nav-bar__plan:active { scale: .96; transition-duration: 80ms, 80ms, 80ms, 80ms, 0.2s; }

/* Reduced motion: no scale; the press answers with opacity .85, 80ms linear; the Plan item keeps having no transition at all, height included (the reduced rule above). */
@media (prefers-reduced-motion: reduce) {
  .mmg-nav-bar .mmg-nav-bar__plan { transition: none; }
  .mmg-nav-bar .mmg-nav-bar__plan:active { scale: none; opacity: .85; transition: opacity 80ms linear; }
}
