/* My Sous Sidekick — Increment 1 styles.
   Brand: sky #89D0FE ground, white cards, navy #131B4C text/borders,
   red #EB4247 sparingly, deep blue #328AE4 accents. */

/* v129: Luckiest Guy (Nov 23 decision) — the title/header font,
   self-hosted in app/ like pdf.min.js, no CDN so it renders
   offline. The file is LuckiestGuy.ttf, copied from the
   workspace font candidates. */
@font-face {
  font-family: "Luckiest Guy";
  src: url("LuckiestGuy.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #89D0FE;
  --navy: #131B4C;
  --taxi: #FFD400;
  --red: #EB4247;
  --green: #1E9E62;
  --deep-blue: #328AE4;
  --sidekick-blue: #41ADF6;
  --ink: #1c2340;
  --muted: #5a6480;
  --card-border: #d8e2f2;
}

* { box-sizing: border-box; }

/* v52: overflow-x guard — a page wider than the screen widens the
   layout viewport, and every fixed .modal then centers in the
   widened viewport (the v51 help-sheet shift: the footer was
   ~80px too wide in ES/HT, so the sheet sat ~29px right of
   center). clip, NOT hidden: clip creates no scroll container,
   so the sticky .brand-band keeps sticking to the viewport top;
   hidden would make body the scroll container and break it.
   No inner horizontal scrollers exist to break (no overflow-x
   anywhere else in this sheet). */
html, body { margin: 0; padding: 0; overflow-x: clip; }

body {
  background: var(--sky);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* In-app-browser banner (v46; v47: red + bold white): the navy
   blended into the app's own blue chrome, so the warning read as
   part of the app. Hat-band red is the app's warning color — the
   banner only shows in the webview case, exactly when you want to
   interrupt. Same size, bold white. */
.inapp-banner { background: var(--red); color: #fff; font-weight: 800; text-align: center; padding: 10px 14px; font-size: 14px; line-height: 1.35; }

/* Guest cap prompt (v46): white card, chef logo centered on top,
   the choice is a door, not a trap — "Sign up now" or a quiet
   "Not now". */
.guest-cap-card { text-align: center; }
.guest-cap-logo { width: 84px; height: 84px; object-fit: cover; border-radius: 18px; border: 2px solid var(--navy); margin: 0 auto 10px; display: block; }

/* ---------- Header ---------- */
.brand-band {
  background: #fff;
  border-bottom: 3px solid var(--navy);
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-row { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; }
/* v54: the borderless chef (logo-header.png, transparent) — no
   border, no radius, no tile background, and ~22% bigger so the
   logo itself carries the slot. The guest-cap logo keeps its
   framed tile; only the header goes frameless. */
.brand-tile {
  width: 56px; height: 56px; flex: 0 0 56px;
  object-fit: cover;
  color: #fff;
  font-weight: 800; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { flex: 1; min-width: 0; }
/* v129: the upper-left header in Luckiest Guy (Nov 23 decision).
   One weight only (400) — no synthesized bold. Sizes unchanged:
   the display face reads bigger than the old 800-weight sans at
   the same size, and the band has room for it. */
.brand-name { font-family: "Luckiest Guy", "Arial Black", sans-serif; color: var(--navy); font-weight: 400; font-size: 19px; line-height: 1.15; }
.brand-tagline { color: var(--red); font-weight: 800; font-size: 13px; }

/* v32 (owner's markup, 2026-10-22): the chip is a vertical stack —
   the name sits ABOVE the Sign out button, with real
   air between them, so a thumb aiming at one never lands on the
   other. v33 (owner, on-device, same evening): the stack is
   RIGHT-FLUSH — one straight line down the right side. Centering
   was built first and the owner overrode it after seeing Spanish
   mode ("Cerrar sesión" is wide enough to expose a ragged right
   edge): the chip is flex-end again, and #sign-out-btn drops its
   right padding so the button's TEXT ends at the same right x as
   the name's — the bare span has no inset; the button carried
   10px of .btn-small right padding. The chip block itself still
   hugs the header's right side. Layout only. v82 (2026-11-20):
   the chip is gone — the hamburger button below is the account
   door now, and renderMenuLang() owns the menu rows' texts. */
/* Hamburger menu button (v82): the header's account door — a 44px
   thumb target (WCAG 2.1 AA, same bar as the v72 pencils), CSS-drawn
   bars, navy on the sky band. The brand block is flex:1, so the
   button lands at the right edge on its own. */
.menu-btn { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; background: none; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.menu-btn:active { background: rgba(19, 27, 76, 0.08); }
.menu-btn:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; }
/* Upgrade pill (v143): the header's Plus door for Free users —
   green, white bold text, fully rounded, the hamburger's 44px
   height so it sits level in the brand row. paintUpgradePill
   owns the visibility (Free signed-in only). */
.upgrade-pill { flex: 0 0 auto; height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: center; background: var(--green); color: #fff; font-size: 15px; font-weight: 800; border: none; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.upgrade-pill:active { background: #177a4b; }
.upgrade-pill:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; }
/* Upgrade row (v144): the pill's own centered row on home, above
   the language switcher, with breathing room. paintUpgradePill
   hides the whole row for Plus and guests, so no gap is left
   behind when the pill goes away. */
.upgrade-row { display: flex; justify-content: center; padding: 12px 0 8px; }
.menu-bars { display: flex; flex-direction: column; gap: 4px; }
.menu-bars span { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--navy); }

/* Hamburger menu rows (v82): the .ws-option card restated — label
   left, value / "Coming soon" tag right, nothing clips in any
   language (the value truncates with an ellipsis instead). */
.nav-option-label { flex: 0 0 auto; }
.nav-option-value { margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58%; }
.nav-soon { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--sky); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }

/* Account sheet (v46): label + value rows; the value is user data,
   filled by JS, never by the i18n walker. */
.account-rows p { display: flex; gap: 10px; margin: 8px 0; font-size: 15px; }
.account-rows p span:last-child { min-width: 0; overflow-wrap: anywhere; }
.account-label { color: var(--muted); flex: 0 0 auto; min-width: 96px; }
/* v71 (Trey's field correction): the Name/Email rows carry a small
   pencil, not a wide Edit button — the v70 .btn was pushed off the
   sheet's right edge by a long email (field screenshot, Nov 7). The
   pencil is the group rename pencil (.ws-rename) restated for this
   sheet: a quiet fixed thumb target right after the value, deep
   blue, no box, fills on press, and it never shrinks. The value
   shrinks and truncates with an ellipsis instead, so no address of
   any length can push the pencil out of the sheet. */
.account-edit-row { align-items: center; }
.account-value { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v72 item 11 — 44px thumb target (WCAG 2.1 AA): the v71 36px
   pencil sat under the 44px guideline. Glyph stays 17px; only
   the button grows. The value still truncates, the pencil never
   shrinks. */
.account-pencil {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px;
  color: var(--deep-blue); cursor: pointer;
}
.account-pencil:active { background: #eef6ff; }
/* v70: inline name/email editors inside the account sheet. */
.account-editor { margin: 2px 0 10px; }
.account-editor input { font: inherit; font-size: 16px; padding: 10px; border: 2px solid var(--card-border); border-radius: 10px; width: 100%; color: var(--ink); background: #fff; }
.account-editor input:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; border-color: var(--deep-blue); }
.account-editor .sheet-actions { margin-top: 8px; }
.account-msg { color: var(--red); font-size: 14px; margin: 8px 0 0; }
.account-pending { background: #eef6ff; border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--navy); margin: 10px 0 0; }
/* v142: the plan section in the account sheet — a divider above
   it (it sits under the name/email/groups rows), the detail line
   under the plan name, and the upgrade note under the buttons. */
.account-plan { border-top: 1px solid var(--card-border); margin-top: 10px; padding-top: 4px; }
.account-plan-detail { font-size: 14px; margin: 4px 0 8px; }
.account-upgrade-line { font-size: 15px; font-weight: 700; color: var(--navy); margin: 8px 0; }
.account-upgrade .sheet-actions { margin: 8px 0; }
.account-manage .fineprint { margin: 8px 0 0; }

/* Narrow phones: the brand block shrinks a step and the chip
   compacts — but the app name and tagline are NEVER truncated
   (v32, owner's word: they stay fully viewable; the text wraps or
   the band grows instead of cutting to an ellipsis). */
@media (max-width: 520px) {
  .brand-band { padding: 8px 10px; }
  .brand-row { gap: 8px; }
  .brand-tile { width: 46px; height: 46px; flex-basis: 46px; }
  .brand-name { font-size: 15px; }
  .brand-tagline { font-size: 12px; }
}

/* ---------- Layout ---------- */
/* v106: the bottom nav is fixed, so the scrolling views need
   clearance or the last row would hide under it — 84px covers
   the tallest the bar gets (a two-line label in ES/HT) plus the
   iPhone home indicator. */
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 14px calc(84px + env(safe-area-inset-bottom, 0px)); }

/* Footer (v46): a plain normal-flow row at the end of the main
   column. (v48: the Last Action bar is gone, so the footer is a
   clean flex row — copyright at the LEFT, legal links at the
   RIGHT, nothing floating over any of it. The old 76px/84px
   bottom padding that kept the footer clear of the bar is gone
   with it; main is back to a normal 14px.) */
.site-footer { display: flex; flex-wrap: wrap; row-gap: 2px; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 2px 8px; font-size: 13px; }
.site-footer button { background: none; border: none; padding: 4px 2px; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.site-footer .foot-sep { color: var(--navy); margin: 0 4px; } /* v72 item 11: muted on sky is 3.51:1 (fails AA small text); navy on sky is 9.71:1 — the separators match the rest of the footer now. */
.site-footer .foot-copy { color: var(--navy); white-space: nowrap; }
.site-footer .foot-links { display: flex; align-items: center; white-space: nowrap; }
.view-title { color: var(--navy); font-size: 20px; margin: 4px 0 12px; }

.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(19, 27, 76, 0.08);
}

/* ---------- Buttons & forms ---------- */
.btn {
  font: inherit; font-weight: 700;
  border-radius: 10px;
  border: 2px solid var(--navy);
  padding: 10px 16px;
  min-height: 48px;
  cursor: pointer;
  background: #fff; color: var(--navy);
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* v137: Google + Facebook sign-in buttons on the auth card —
   plain white buttons under the forms, one tap each.
   v138: each button carries its official brand mark at the
   left of the label. Google takes its Light theme (white fill,
   1px #747775 stroke, #1F1F1F text); Facebook stays white
   with the existing border and navy text. The mark is 20px,
   never stretched (flex: none keeps the aspect ratio). */
.oauth-row { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.oauth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.oauth-btn svg { width: 20px; height: 20px; flex: none; }
.oauth-google { background: #fff; color: #1F1F1F; border: 1px solid #747775; }
.oauth-facebook { background: #fff; color: var(--navy); border-color: #c9d2de; }

.form label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 12px; font-size: 14px; }
.form input, .form-inline input {
  width: 100%;
  font: inherit;
  padding: 12px;
  margin-top: 4px;
  border: 2px solid var(--card-border);
  border-radius: 10px;
  min-height: 48px;
  background: #fff;
  color: var(--ink);
}
.form input:focus-visible, .form-inline input:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; border-color: var(--deep-blue); }
/* v101: show/hide password — the eye sits inside the input's
   right edge on every auth-card password field (sign in,
   create account, choose a new one). The wrap is the
   positioning context and carries the input's top margin, so
   the button centers on the input itself. */
.password-wrap { position: relative; display: block; margin-top: 4px; }
.password-wrap input { margin-top: 0; padding-right: 48px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; border: none; background: transparent;
  color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.password-toggle:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; }
.password-toggle .eye-off { display: none; }
.password-toggle.showing .eye-off { display: block; }
.password-toggle.showing .eye-open { display: none; }
/* Checkbox rows (v49): the sign-up marketing opt-in and the
   account-sheet toggle — a real 20px box with plain words beside
   it. Specificity beats .form label (block) so the row is flex. */
label.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; color: var(--navy); margin: 0 0 12px; cursor: pointer; }
.check-row input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; accent-color: var(--navy); cursor: pointer; }
/* v50: the sign-up marketing row sits equidistant between the
   password hint above and the Create Account button below —
   12px both ways (the hint carries no bottom margin and the
   button none on top, so the row's own margins ARE the gaps).
   Scoped to the sign-up form only; the account-sheet toggle
   keeps the shared .check-row spacing. */
#form-signup .check-row { margin: 12px 0; }
/* v63: the document names inside the sign-up agreement label are
   real buttons (data-legal) that must read as inline links in the
   sentence, not as chips — same treatment as .site-footer button. */
.legal-agree button { background: none; border: none; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.fineprint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.form-inline { display: flex; gap: 8px; align-items: stretch; }
.form-inline input { flex: 1; margin-top: 0; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; font: inherit; font-weight: 700;
  min-height: 44px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--card-border); background: #f4f7fd; color: var(--muted);
}
.tab.active { border-color: var(--navy); background: #fff; color: var(--navy); }
/* v72 item 10 (Trey, Nov 9 — variant B, decided verbatim from the
   4-way mockup): the Create account tab carries the taxi-yellow
   #FFD400 2px border + navy text, pale fill unchanged, so the money
   door never reads dead gray. The ID beats .tab.active, so the
   accent holds in both states (active: white fill, yellow border,
   navy text). A was too subtle; C (full yellow fill) was rejected. */
#tab-signup { border-color: #FFD400; color: var(--navy); }

/* v72 item 11 — focus visibility: keyboard users get a real
   outline on every interactive element. Buttons/links relied on
   browser defaults; inputs swapped the outline for a border-color
   change. Now :focus-visible draws a deep-blue ring everywhere,
   and the input rules below keep their border-color change AND
   the ring instead of killing it. */
:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
/* v72 item 11 — prefers-reduced-motion: the mic pulse and tray
   transitions go still for users who ask for it. State is still
   conveyed — the mic circle changes color between listening and
   recording — so nothing about the voice flow goes silent. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.message { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.message.error { background: #fdecec; color: #8f1d20; border: 1px solid var(--red); }
.message.ok { background: #e9f6ec; color: #1d5c2a; border: 1px solid #57a773; }

/* ---------- Store picker ---------- */
/* Layout: store tiles sit TWO across at every screen size — phones,
   tablets, laptops, monitors. (Prototype was 2-across; a 4-across desktop
   grid shipped briefly on 2026-10-21 and Trey killed it the same evening:
   tiles looked stretched, and the add-store bar spanned the whole stage.
   Max 2 across, stage capped at 880px, add-store form capped at 520px on
   wide screens.) Tap a tile -> into that store's list. */
#store-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
#store-list .store-card { margin-bottom: 0; height: 100%; }
/* Two-across cards are narrow on phones: stack tile, name, counts. */
@media (max-width: 699px) {
  #store-list .store-card { flex-direction: column; align-items: flex-start; gap: 8px; }
  #store-list .store-chevron { display: none; }
  /* v91: the rename pencil rides the top-right corner on phones, level
     with the icon — out of the flow, so the tile is back to its old
     height. The × chip owns the same corner in rearrange mode, but
     the pencil hides there, so the two never meet. */
  #store-list .tile-rename { position: absolute; top: 6px; right: 6px; padding: 6px; }
}
@media (min-width: 700px) {
  body:has(#view-home:not(.hidden)) main { max-width: 880px; }
  body:has(#view-home:not(.hidden)) .brand-row { max-width: 880px; }
  #form-add-store { max-width: 520px; }
  /* v132: desktop recipe tiles — white behind the photos, and the
     photo ACTUALLY fills the block. v131 made the photo span the
     full card width, but the img stayed at its base 110px height
     inside the ~190px-tall 16:10 block — Safari/WebKit does not
     resolve height:100% on the img against an aspect-ratio-sized
     parent, so the image sat at 110px vertically centered and the
     span's sky background showed through as blue bands above and
     below (Trey's Mac screenshot, Nov 28). Two changes: (1) the
     span background is WHITE on desktop, so nothing blue can ever
     show through behind a photo — the tile is already white, and
     the no-photo letter tiles become white with the navy letter.
     (2) the img gets its OWN aspect-ratio: 16/10 with width:100%
     and height:auto, so its height derives from its own width
     with no percentage-height resolution against the parent —
     the height:100% declaration is gone. The span keeps
     aspect-ratio: 16/10 so letter tiles keep the same taller
     block. Ratio is never distorted: object-fit stays cover
     (crop, never stretch) and no fill appears anywhere.
     Phones (<700px) are untouched — the base 110px rules ride
     along exactly as in v131. */
  .recipe-tile { align-items: stretch; }
  .recipe-tile-photo { width: 100%; min-height: 0; aspect-ratio: 16 / 10; background: #fff; }
  .recipe-tile-img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}
/* Add-store sits at the TOP of the home view, centered (Trey's flow call,
   2026-10-21: adding a store is a starting action, not a bottom footer). */
#form-add-store { margin-left: auto; margin-right: auto; width: 100%; }

/* ---------- Zip finder (v40) ----------
   Trey's locked mockup (2026-10-23): the add-store area is a pair
   of boxes on the SAME two-column grid as the store tiles (each
   box exactly one tile wide), and Google Places answers land as
   pill chips on a shelf below. Added chips fill navy with a check;
   "Done with adding stores" folds the shelf away. */
.btn-deep { background: var(--deep-blue); color: #fff; }
.zip-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
/* v52: grid blowout guard — the two boxes are 1fr tracks whose auto
   minimum is the widest child, and the ES/HT "Add store" button
   alone (172–182px at 16px bold) made the pair 404–423px on a
   361px stage, widening the page the same way the footer did.
   min-width: 0 lets tracks and children shrink to the track;
   button text wraps if it ever must. */
.zip-pair > * { min-width: 0; }
.zip-box > * { min-width: 0; }
.zip-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 0; height: 100%; }
.zip-pair #form-add-store { max-width: none; margin: 0; width: 100%; }
.zip-box-label { font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.zip-box input { font: inherit; font-size: 16px; padding: 10px; border: 2px solid var(--card-border); border-radius: 10px; width: 100%; color: var(--ink); background: #fff; }
.zip-box input:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 1px; border-color: var(--deep-blue); }
.zip-box .btn { width: 100%; margin-top: auto; }
.zip-shelf { background: rgba(255, 255, 255, .88); border: 1px solid var(--card-border); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.zip-micro { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.zip-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zip-chip { border: 2px solid var(--navy); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.zip-chip.added { background: var(--navy); color: #fff; }
.zip-done { width: 100%; margin-top: 12px; }
.store-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.store-tile {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 12px; border: 2px solid var(--navy);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.store-tile.t2 { font-size: 17px; }
.store-tile.t3 { font-size: 13px; letter-spacing: -0.02em; }
.store-meta { flex: 1; min-width: 0; }
.store-name { font-weight: 700; color: var(--navy); font-size: 17px; overflow-wrap: anywhere; }
/* v52 hardening: a single unbroken store name (an 80-char paste)
   is the one grid blowout left — anywhere lets it break instead
   of widening the page. No visual change for normal names. */
.store-count { font-size: 13px; color: var(--muted); }
.store-count .to-go { color: var(--deep-blue); font-weight: 700; }
.store-count .checked-off { color: var(--red); font-weight: 700; }
.store-chevron { color: var(--muted); font-size: 22px; }

/* ---------- Store list ---------- */
.store-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.store-head .view-title { margin: 0; }

/* Dogfood item 8 (2026-10-23): app chrome never text-selects —
   long-presses are gestures here (rearrange, remove), not text
   operations. Only .store-card carried the shield; the modebar's
   "Done" got highlighted mid-press. Form fields keep selection.
   Item 10: the first shield listed ".sheet", a class the markup
   never uses — the pop-ups are .modal / .modal-card, and their
   titles stayed selectable. The selector names the real wrappers
   now. */
button, .card, .modebar, .item-row, .mic-bar, .ws-bar, .tray, .modal, .modal-card, .toast, .drag-grip, .qty-value {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
input, textarea { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }

.item-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  min-height: 60px;
}
/* Active rows only (the tray keeps its proven layout): the two
   right columns stretch the row's full height. */
.item-row:not(.tray-row) { align-items: stretch; min-height: 84px; }
.item-check {
  width: 34px; height: 34px; flex: 0 0 34px; align-self: center;
  accent-color: var(--navy);
  cursor: pointer;
}
.item-main { flex: 1; min-width: 0; align-self: center; }
.item-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.item-sub { font-size: 12px; color: var(--muted); }

/* v38 (dogfood item 9, Trey's layout): the right side of an active
   row is TWO columns — the stepper column (plus top, value center,
   minus bottom) and the actions column (pencil level with plus,
   × level with minus). Both columns space-between over the row's
   full height, which is what produces the alignments. */
.row-cols { display: flex; gap: 8px; align-items: stretch; flex: 0 0 auto; }
.stepper { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px; }
.stepper button {
  width: 36px; height: 28px;
  border-radius: 8px; border: 2px solid var(--card-border);
  background: #f4f7fd; color: var(--navy);
  font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1;
}
.act-col { display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.qty-value {
  min-width: 30px; text-align: center; font-weight: 700; color: var(--navy);
  font-size: 15px; padding: 2px; cursor: pointer; border-radius: 8px;
}
.qty-input { width: 58px; font: inherit; font-weight: 700; text-align: center; padding: 7px 2px; border: 2px solid var(--deep-blue); border-radius: 8px; }

.item-remove {
  width: 36px; height: 28px; flex: none;
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 20px; border-radius: 9px;
}
.item-remove:active { background: #fdecec; color: var(--red); }
.item-edit {
  width: 36px; height: 28px; flex: none;
  border: none; background: transparent; cursor: pointer;
  color: var(--deep); border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 0;
}
.item-edit svg { display: block; }
.item-edit svg path { stroke: var(--navy); stroke-width: 2; }
.item-edit:active { background: #e8f4fe; }
.sheet-actions.col { flex-direction: column; }
.sheet-actions.col .btn { width: 100%; }
.move-store-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.move-store-list .btn { width: 100%; }
.drag-armed .drag-grip { color: var(--deep); transform: scale(1.25); }

/* ---------- Tray ---------- */
.tray { padding: 6px 14px 10px; }
.tray-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; font: inherit; cursor: pointer;
  font-weight: 700; color: var(--navy); padding: 10px 0; text-align: left;
}
.tray-count {
  background: var(--navy); color: #fff; border-radius: 999px;
  font-size: 12px; padding: 1px 8px;
}
.tray-caret { margin-left: auto; color: var(--muted); }
.tray-row { border-top: 1px solid var(--card-border); touch-action: pan-y; }
.tray-row.swiping { transition: none; }
.tray-row.snap { transition: transform .18s ease-out, opacity .18s ease-out; }
.tray-row .item-name { color: var(--muted); }
.is-checked .item-name { text-decoration: line-through; }
.tag-removed {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px;
  text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle;
}
.tray-actions { display: flex; gap: 6px; }
.btn-mini {
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  border-radius: 8px; border: 2px solid var(--card-border);
  background: #f4f7fd; color: var(--navy); min-height: 38px; padding: 4px 10px;
}
.btn-mini.danger { color: #8f1d20; border-color: var(--red); background: #fdecec; }

/* ---------- Store actions, sort, handoff, sheets ---------- */
.store-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.actions-note { margin: -4px 0 12px; }
.cat-header {
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--navy);
  margin: 12px 2px 6px;
}
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn[disabled]:active { transform: none; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }

.sheet-card { max-height: 86vh; overflow-y: auto; }
.sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions.slim .btn { padding-top: 8px; padding-bottom: 8px; }

.handoff-moveall { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.handoff-moveall label { font-weight: 700; color: var(--navy); font-size: 14px; white-space: nowrap; }
.handoff-moveall select, .handoff-dest {
  flex: 1; min-width: 0; font: inherit;
  padding: 10px; border: 2px solid var(--card-border); border-radius: 10px;
  min-height: 48px; background: #fff; color: var(--ink);
}
.handoff-row { border-top: 1px solid var(--card-border); padding: 10px 0; }
.handoff-item { font-weight: 700; color: var(--navy); margin-bottom: 6px; overflow-wrap: anywhere; }
.handoff-qty { color: var(--muted); font-weight: 600; font-size: 13px; }
.handoff-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.handoff-controls .handoff-dest { flex: 1 1 150px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  border-radius: 999px; border: 2px solid var(--deep-blue);
  color: var(--deep-blue); background: #eef6ff;
  padding: 6px 10px; min-height: 38px;
}
.chip.accepted { background: var(--deep-blue); color: #fff; }

/* ---------- Modal / toast ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(19, 27, 76, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-card { background: #fff; border-radius: 14px; padding: 18px; max-width: 420px; width: 100%; border: 2px solid var(--navy); max-height: calc(100vh - 36px); overflow-y: auto; }

/* v98: the card caps its height and scrolls. Before this, a card
   taller than the viewport (recipe form / recipe detail) grew
   past the top and bottom with nowhere to scroll — the overlay is
   fixed with no overflow and the card had no cap, so the Save /
   Done buttons sat below the fold and the sheet was dead on a
   phone (Trey + Autumn, Nov 24). Same cap the legal card already
   uses (100vh - 36px = the 18px overlay padding top and bottom).
   Short modals are untouched — the cap only bites when the
   content is taller than the screen. Sheet cards keep their own
   86vh cap (higher specificity, so this rule never overrides
   it). */
.modal-card.sheet-card { max-height: 86vh; }
.modal-card h3 { margin: 0 0 8px; color: var(--navy); }

/* Mic help sheet (v51, item 2): its own narrower card. The shared
   .modal-card runs full-bleed on phones (width 100% of the overlay,
   420px cap never bites), and the long Spanish / Creole lines made
   the sheet read as a full-width sheet that ran past the page's
   centered frame. This card stays a centered card with real margins
   on both sides — 54px a side on a 360px phone (18px overlay pad +
   36px of the 72px cut), 330px max on wide screens. Help sheet
   only; .modal-card is untouched, so the guest-cap prompt, the
   confirms, and the legal sheets keep their width. */
.mic-help-card { max-width: 330px; width: calc(100% - 72px); }

/* Legal modal (v47): the full Privacy / Terms text lives here now,
   so the card caps its height and the body scrolls — the Close
   button stays put at the bottom. Headings render from the HTML
   the legal docs carry (see LEGAL_DOCS in app.js). */
.legal-card { max-height: calc(100vh - 36px); display: flex; flex-direction: column; }
.legal-body { overflow-y: auto; min-height: 0; }
.legal-body h2 { font-size: 17px; color: var(--navy); margin: 14px 0 6px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 15px; color: var(--navy); margin: 12px 0 4px; }
.legal-body p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.legal-body ul { margin: 0 0 8px; padding-left: 20px; }
.legal-body li { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 24px; z-index: 60;
  background: #FFD400; color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 12px; padding: 12px 16px;
  display: flex; gap: 14px; align-items: center;
  max-width: calc(100vw - 32px);
  box-shadow: 0 6px 20px rgba(19, 27, 76, 0.35);
  font-size: 15px;
}
.toast-action { background: none; border: none; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; padding: 4px; }
.toast-chef { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
/* v136: the version toast's hard-hat mascot sits contain-fit on a
   white circle — the whole character (hard hat included) stays
   visible with a white ring around him, never cropped edge to edge. */
.toast-chef-contain { background: #fff; object-fit: contain; }
/* v136: the sticky version toast's dismiss ×, top-right corner
   of the toast (shown only while a sticky toast is up). */
.toast-dismiss { position: absolute; top: 2px; right: 6px; background: none; border: none; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; padding: 4px; line-height: 1; }
/* v141: the version toast lays out in rows — row 1 is the mascot +
   the sentence, row 2 is Refresh below, under the sentence. The
   toast-rows class is toggled by showToast() only for sticky toasts
   (the version toast is the only one); every other toast keeps the
   one-row look. Refresh's 46px left margin is the chef's 32px plus
   the row's 14px gap, so it lines up under the sentence. */
.toast.toast-rows { flex-direction: column; align-items: stretch; gap: 8px; }
.toast-row { display: flex; gap: 14px; align-items: center; }
.toast-rows .toast-action { margin-left: 46px; align-self: flex-start; }

/* ---------- Round of fixes from Trey's test pass (2026-10-21) ---------- */
/* Header brand (logo + name + tagline) is a home button. */
.brand-home { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.brand-home:active { opacity: .85; }

/* The item list gets its own bounded scroll area, so the store screen
   stops growing taller and taller (the sort view made it obvious). */
#view-store #item-list {
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* "Done with this store" now sits between the list and the tray. */
.store-actions-bottom { margin: 12px 0 0; }

/* Spacing pass from Trey's screenshots (2026-10-21): the tray gets the
   same 12px of air above it that the Done button has above it, and the
   "nothing left to move" note gets breathing room on both sides. */
#view-store .tray { margin-top: 12px; }
#view-store .actions-note { margin: 8px 2px 12px; }

/* Button standouts (Trey approved, 2026-10-21): Done with this store =
   the brand deep blue, the unmistakable finish button; Sort by category =
   a pale sky wash — the highlighter-swipe feel without the shout. Scoped
   by ID so the other primary buttons (Add store, Add, Sign in) stay navy. */
#handoff-btn { background: var(--deep-blue); border-color: var(--deep-blue); color: #fff; }
#handoff-btn:active { filter: brightness(0.94); }
#sort-btn { background: linear-gradient(180deg, #EAF7FF, #CDEBFE); color: var(--navy); }

/* Rearrange mode (drag-and-drop reorder) */
.modebar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px dashed var(--deep-blue); color: var(--navy);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px;
}
.modebar span { flex: 1; }
/* v49: the rearrange hint breaks by design — the second sentence
   starts its own line (the string carries the break). */
#stores-modebar span { white-space: pre-line; }
.modebar.hidden { display: none; }
#item-list.rearranging .item-row button,
#item-list.rearranging .item-row input { pointer-events: none; }
#item-list.rearranging .item-row,
#store-list.rearranging .store-card { cursor: grab; touch-action: none; }
.store-card { position: relative; }
.tile-remove {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-weight: 800; font-size: 15px; line-height: 26px; text-align: center;
  cursor: pointer; box-shadow: 0 1px 4px rgba(19, 27, 76, .35);
}
/* v90: the store-tile rename pencil. v92: it is the SAME drawing as
   the group pencil (.ws-rename) — the 17px Material edit SVG, taxi
   fill, navy edge — not the unicode ✎. The unicode glyph at 20px
   read fat and navy on Trey's phone (the 1px text stroke ate the
   yellow fill), so the tile pencil looked bulky next to the slim
   group pencil. The SVG is identical to the group pencil by
   construction. In-flow on wide screens, before the chevron; v91
   pulls it to the tile's top-right corner on phones (see the narrow
   media query above), where it leaves the flow and the tile keeps
   its old height. Hidden in rearrange mode, where drag owns the
   tile and the × is the action. */
.tile-rename {
  flex: 0 0 auto; line-height: 0;
  color: var(--taxi);
  cursor: pointer; padding: 4px 2px;
}
.tile-rename svg { display: block; }
.tile-rename svg path { stroke: var(--navy); stroke-width: 2; }
#store-list.rearranging .tile-rename { display: none; }
.drag-ph {
  border: 2px dashed var(--deep-blue); border-radius: 12px;
  background: rgba(137, 208, 254, .25); box-sizing: border-box;
}
.drag-follower {
  position: fixed; z-index: 200; pointer-events: none;
  box-shadow: 0 10px 24px rgba(19, 27, 76, .35); opacity: .97; margin: 0;
}
/* v51 (item 1): an armed store tile lifts, so the 550ms hold reads —
   the tile is grabbed now. Same buzz + class the grip arm uses. */
.store-card.drag-armed { box-shadow: 0 6px 16px rgba(19, 27, 76, .35); }

/* Handoff sheet: inline new-store creator */
.handoff-new-store { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.handoff-new-store.hidden { display: none; }
.handoff-new-store input {
  flex: 1; min-width: 160px; font: inherit; padding: 10px 12px;
  border: 2px solid var(--card-border); border-radius: 10px; color: var(--navy);
}

/* The six-dot drag grip on item rows (Square's convention): two columns
   of three dots, drawn with a radial-gradient tile. touch-action: none
   makes the grip drag-hot — a pull on the dots drags, while the rest of
   the row still scrolls normally. */
.drag-grip {
  flex: 0 0 16px; width: 16px; height: 26px; align-self: center;
  margin-right: 2px; cursor: grab; touch-action: none;
  background-image: radial-gradient(circle, #93a4c4 2.2px, transparent 2.7px);
  background-size: 8px 8px; background-repeat: repeat; background-position: 0 1px;
}
.drag-grip:active { cursor: grabbing; }

/* ---------- Workspace bar, invites, switcher (invite slice) ---------- */
/* The workspace context sits at the top of the home view: the current
   workspace's name (a chooser when there's more than one) on the left,
   the Invite control on the right. Brand rules hold: navy and deep
   blue carry it; red stays home. */
.ws-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
/* v49: the switcher LOOKS like a dropdown now — a white box with a
   border around the name, and a larger triangle. The list itself
   is unchanged; only the control gets the affordance. */
.ws-switch {
  font: inherit; font-size: 15px; font-weight: 800; color: var(--navy);
  background: #fff; border: 2px solid var(--navy); border-radius: 10px;
  padding: 6px 10px; min-height: 38px; cursor: pointer;
  text-align: left; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ws-caret { color: var(--muted); font-weight: 700; font-size: 19px; line-height: 1; }
/* The rename pencil: a quiet 44px thumb target right after the
   workspace name — deep blue, no box, fills on press. (v72 item
   11: was 38px, under the 44px guideline.) */
.ws-rename {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px;
  color: var(--deep-blue); cursor: pointer;
}
.ws-rename:active { background: #eef6ff; }
/* v80 (Trey, Nov 20): the pencils were dull gray — they read as
   pencils now: taxi-yellow fill, navy outline. The three SVG pencils
   (.ws-rename, .account-pencil, .item-edit) carry fill="currentColor", so the
   button color drives the fill; the path stroke draws the navy edge
   (stroke-width 2 in the 24 viewBox ≈ 1.4px at the 17px glyph).
   v94: the item pencil is the same SVG now — the unicode ✎ read
   dark on Trey's phone (the 1px text stroke ate the yellow fill,
   the same failure as the tile pencil in v92), so the stroke is
   gone and the navy edge is the path stroke, like the other two.
   This block sits after all three pencil rules, so on equal
   specificity it wins over their deep-blue. Shapes untouched —
   coloring only. */
.ws-rename, .account-pencil { color: var(--taxi); }
.ws-rename svg path, .account-pencil svg path {
  stroke: var(--navy); stroke-width: 2;
}
.item-edit {
  color: var(--taxi);
}
#invite-btn { margin-left: auto; border-color: var(--deep-blue); color: var(--deep-blue); flex: 0 0 auto; }
.ws-members { margin: 0 0 10px; }
/* v49: the guest + sharing lines read navy, regular weight — the
   muted gray-blue was "shadowy" on the sky ground (9.7:1 vs 3.5:1).
   Scoped to this one line only; .fineprint stays muted everywhere
   else. pre-line renders the two-line break the string carries. */
#ws-members { color: var(--navy); white-space: pre-line; }

.invite-link-row { display: flex; gap: 8px; align-items: stretch; }
.invite-link-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 13px;
  padding: 10px; border: 2px solid var(--card-border); border-radius: 10px;
  background: #f4f7fd; color: var(--ink);
}
.invite-link-row .btn { min-height: 44px; flex: 0 0 auto; }

.ws-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font: inherit; font-weight: 700; color: var(--navy);
  background: #fff; border: 2px solid var(--card-border); border-radius: 10px;
  padding: 12px; margin-bottom: 8px; cursor: pointer; text-align: left;
}
.ws-option.current { border-color: var(--navy); }
.ws-option .ws-role { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ws-option.danger { color: var(--red); border-color: #f2b6b8; }
#ws-archived-title { margin: 14px 0 8px; font-size: 14px; color: var(--muted); }
/* v78: archived rows carry a small delete × beside the restore card. */
.ws-archived-row { display: flex; gap: 8px; align-items: stretch; }
.ws-archived-row .ws-option { flex: 1; min-width: 0; }
.ws-archived-row .ws-delete { flex: none; align-self: center; min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 20px; line-height: 1; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--card-border); flex-wrap: wrap; }
.member-row:last-child { border-bottom: none; }
.member-name { font-weight: 700; color: var(--navy); }
.member-role { font-size: 12px; color: var(--muted); font-weight: 600; }
/* v87: the Circle rows' subline — the groups a member is already
   in — rides its own flex line under the name, like the actions. */
.member-sub { flex-basis: 100%; font-size: 12px; color: var(--muted); font-weight: 600; }
/* v70: the actions wrap to their OWN line under the name (Trey's
   design) — three buttons on one flex line sliced the red Remove
   button off the sheet's right edge on phone width. Full-width row
   + flex:1 buttons = equal widths, and nothing can clip in any
   language. Rows without actions (the owner's) stay one line. */
.member-actions { flex-basis: 100%; margin-top: 8px; display: flex; gap: 6px; }
.member-actions .btn { flex: 1; padding: 6px 10px; font-size: 12.5px; }
/* v61: Add-to-groups checkbox rows ride the .ws-option card; the
   already-in rows dim and hold still (checked + disabled). */
.add-group-row { cursor: pointer; }
.add-group-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--navy); cursor: pointer; }
.add-group-row.is-in { opacity: 0.6; cursor: default; }
.add-group-row.is-in input[type="checkbox"] { cursor: default; }
/* v89: the group picker's rows are plain .ws-option buttons, not
   checkbox labels — the already-in rows dim the same way, so a
   group the person is already in reads as off-limits at a glance. */
.ws-option.is-in { opacity: 0.6; cursor: default; }
/* v89: the Manage members "Add members" section heading — same
   navy as the sheet title, one step smaller, clear of the list
   above it. */
#members-add-title { margin: 16px 0 4px; color: var(--navy); font-size: 15px; }
/* v87: the pick sheet's rows stack name over the groups subline
   inside the same .ws-option card, so a long group list never
   squeezes the name — the subline wraps under it instead. */
.circle-pick-name { display: flex; flex-direction: column; min-width: 0; }
.circle-pick-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* ---------- Voice — Slice 3 (2026-10-22) ---------- */
/* Both mics are headline bars at the TOP of their views, in normal
   flow — no floating or fixed buttons (house rule). GREEN is the mic
   color (v47: red read stop/beware, and the mic is the app's
   signature move — green invites); the status line stays navy on sky. */
/* v64: the bar is a plain row on the sky now — no slab. The row is
   still the tap target; the MIC itself is the round green button,
   the label + hint ride a navy text column, and "need help ?" is
   its own green pill at the right. */
.mic-bar {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 54px;
  font: inherit; cursor: pointer; text-align: left;
  padding: 2px; margin: 6px 0 8px;
}
.mic-bar:active .mic-circle { filter: brightness(0.94); }
.mic-circle {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%;
  background: var(--green); box-shadow: 0 2px 8px rgba(19, 27, 76, 0.25);
  display: inline-flex; align-items: center; justify-content: center;
}
.mic-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* The label WRAPS (v64, owner's design — reverses the v36 rule):
   the label sits in its own column beside the round button, so a
   long label like the Spanish store mic ("Micrófono de la tienda")
   takes two lines at full size instead of dying by ellipsis
   ("Sto…") the way it did inside the one-line slab. No truncation
   in any language; the column, not the words, absorbs the width. */
.mic-bar-label { font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.15; white-space: normal; }
.mic-bar .mic-hint { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-top: 2px; }
/* Main mic help button (v49; own pill since v64): "need help"
   underlined + a circled "?" — the two tap signals together. Its
   own green pill at the row's right edge; the tap opens the sheet
   and never starts the mic. In ES/HT the two words STACK inside
   the pill (applyLang breaks them), so the pill squares up and
   centers the stack. */
.mic-help {
  background: var(--green); border: none; border-radius: 999px; padding: 8px 13px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: #fff;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(19, 27, 76, 0.2);
}
html[lang="es"] .mic-help, html[lang="ht"] .mic-help { border-radius: 14px; padding: 7px 11px; }
html[lang="es"] .mic-help-words, html[lang="ht"] .mic-help-words { text-align: center; line-height: 1.25; }
.mic-help-words { text-decoration: underline; text-underline-offset: 2px; }
.mic-help-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border: 1.5px solid #fff; border-radius: 50%;
  font-size: 11px; font-weight: 800; line-height: 1; color: #fff;
}
/* Help sheet lines: plain words, one per line. */
.mic-help-list p { margin: 8px 0; font-size: 15px; font-weight: 600; color: var(--navy); }
.mic-help-list p:first-child { margin-top: 2px; }
.mic-bar.listening .mic-circle { animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
/* v68: the recorder road's bar states. RECORDING turns the circle
   hat-band red and pulses it (the field test page that went 22/22
   used the same read), and a thin level track opens under the hint
   so the speaker can SEE the mic hearing them — its fill is driven
   from the recorder's analyser. HELD (a take that failed to send)
   turns the circle red; the label carries the "Tap to resend". */
.mic-bar.recording .mic-circle { background: var(--red); animation: mic-pulse 1.1s ease-in-out infinite; }
.mic-bar.held .mic-circle { background: var(--red); }
.mic-level { display: none; height: 6px; border-radius: 3px; background: rgba(19, 27, 76, 0.15); margin-top: 5px; overflow: hidden; }
.mic-bar.recording .mic-level { display: block; }
.mic-level-fill { display: block; height: 100%; width: 0%; background: var(--green); border-radius: 3px; }

.voice-status { font-size: 13px; font-weight: 600; color: var(--navy); margin: 0 0 10px; overflow-wrap: anywhere; }

/* Dictionary confirm sheet: one row per unverified item. */
.vc-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--card-border); }
.vc-name { flex: 1; min-width: 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.vc-sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Guest mode + Install button (2026-10-22) ---------- */
/* The auth view's guest door: a quiet divider under the sign-in /
   sign-up card, a ghost button, and one honest line about what
   device-only means. */
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 13px; font-weight: 600; margin: 16px 0 10px; } /* v72 item 11: the divider text sits directly on sky — muted is 3.51:1 there (fails AA small text); navy is 9.71:1. */
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--card-border); }
.fineprint.center { text-align: center; }

/* Guest mode's account door stands exactly where Invite stands for
   signed-in users — same push-right slot, same deep-blue outline.
   v50: it matches "My Household" now — same min-height, padding,
   font size and weight, border width and radius — in taxi yellow
   fill with navy text and border, bold: the conversion button is
   the loudest thing on the sky-blue page. Home-view pill only;
   the navy submit button is untouched. */
#create-account-btn { margin-left: auto; flex: 0 0 auto; background: #FFD400; color: var(--navy); border-color: var(--navy); font-size: 15px; font-weight: 800; }

/* The install bar: the mic bar's in-flow shape in deep blue, with the
   label and its sub-line stacked. Plain flow only — no floating or
   fixed positioning (house rule). */
.install-bar {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 54px;
  font: inherit; color: #fff;
  background: var(--deep-blue); border: 2px solid var(--deep-blue); border-radius: 14px;
  padding: 10px 16px; margin: 6px 0 8px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(19, 27, 76, 0.18);
  text-align: left;
}
.install-bar:active { filter: brightness(0.94); }
.install-text { display: flex; flex-direction: column; min-width: 0; }
.install-label { font-size: 17px; font-weight: 800; }
.install-sub { font-size: 12px; font-weight: 600; opacity: 0.85; }

/* ---------- Languages (v30; layout v32) ---------- */
/* The language switcher: three buttons, each a flag medallion plus
   a word label beside it, OUTSIDE the circle. The medallion is a
   true circle: a fixed square box (aspect-ratio 1/1, equal width
   and height) with border-radius: 50% and the glyph centered.
   (v30–v31 put the flag glyph directly inside a content-sized
   pill — border-radius: 999px on a box whose height, min-height
   36px plus line-height, exceeded its flag-only width once the
   header shrank the labels away at ≤520px. A capsule taller than
   wide: the owner's "egg". The disc's size no longer depends on
   its contents at all.) Active = navy medallion. Instances: the
   home row (first flow row of the home view, centered as a group
   since v33 — v32 had it right-aligned on the same markup,
   plain normal flow: nothing below it is positioned, transformed,
   or negatively margined; content pushes down on its own) and the
   auth card's top (centered). Word labels show at every width —
   in the body there is room. */
.lang-row { display: flex; justify-content: center; margin-bottom: 10px; }
.lang-switch { display: flex; gap: 6px; flex: 0 0 auto; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13px; font-weight: 700;
  border: 2px solid transparent; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 3px 8px 3px 3px; min-height: 42px; cursor: pointer;
  white-space: nowrap;
}
.lang-flag {
  width: 34px; height: 34px; aspect-ratio: 1 / 1; flex: 0 0 34px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--card-border); background: #f4f7fd;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
}
.lang-btn.active { color: var(--navy); }
.lang-btn.active .lang-flag { background: var(--navy); border-color: var(--navy); }
.lang-switch-auth { justify-content: center; margin-bottom: 14px; }
.brand-row { flex-wrap: wrap; }

/* ---------- Recipes (v96) ---------- */
/* Rolodex page: the alphabet rail sticks down the left; the list
   takes the rest. Navy + white, same as every other page. */
/* v98: the add rows are two EXACTLY EQUAL halves (Trey, Nov 24).
   flex-basis 0 + grow 1 splits the row 50/50 whatever the labels
   say; min-width 0 lets a long label wrap instead of forcing the
   row wider. Row 1 is link/photo, row 2 is by hand/spreadsheet. */
.recipe-add-row { display: flex; gap: 8px; margin: 0 0 8px; }
.recipe-add-row .btn { flex: 1 1 0; min-width: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--deep-blue); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.recipe-body { display: flex; gap: 10px; align-items: flex-start; }
.recipe-rail { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 8px; }
.recipe-letter { width: 30px; min-height: 26px; padding: 2px 0; border: 1px solid var(--card-border); border-radius: 6px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; }
.recipe-letter.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.recipe-letter:disabled { opacity: .3; cursor: default; }
.recipe-list-wrap { flex: 1; min-width: 0; }
.recipe-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin: 0 0 8px; background: #fff; border: 2px solid var(--navy); border-radius: 10px; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.recipe-row-name { font-weight: 700; overflow-wrap: anywhere; }
.recipe-row-count { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.recipe-subhead { color: var(--navy); font-size: 15px; margin: 12px 0 6px; }
.recipe-lines { margin: 0 0 6px; padding-left: 20px; line-height: 1.5; }
.recipe-lines li { margin-bottom: 4px; overflow-wrap: anywhere; }
.recipe-field-label { display: block; font-weight: 700; color: var(--navy); font-size: 14px; margin: 12px 0 4px; }
.recipe-field-label:first-of-type { margin-top: 0; }
#form-recipe input, #form-recipe textarea, #form-recipe-link input { width: 100%; border: 2px solid var(--navy); border-radius: 8px; padding: 10px; font: inherit; font-size: 15px; }
#form-recipe textarea { resize: vertical; min-height: 96px; }
.recipe-photo-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* v123: link-import progress — a pure-CSS border spinner beside
   the status line, in brand colors (sky track, sidekick-blue
   arc). It shows whenever the status row is visible, which is
   exactly while a link import is in flight; no JS toggles it. */
.recipe-link-spinner { width: 14px; height: 14px; flex-shrink: 0; border: 2px solid var(--sky); border-top-color: var(--sidekick-blue); border-radius: 50%; animation: recipe-link-spin 0.8s linear infinite; }
@keyframes recipe-link-spin { to { transform: rotate(360deg); } }
.recipe-photo-thumb { background: #fff; border: 1px solid var(--card-border); border-radius: 6px; padding: 6px 10px; font-size: 13px; overflow-wrap: anywhere; }
.recipe-store-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--card-border); font-size: 15px; cursor: pointer; }
.recipe-store-row input[type="radio"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--navy); }
/* Recipe store picker group dropdown (v100): the shopper picks ANY
   group first; that group's stores pop up below. Mirrors the sort
   label's select. */
.recipe-store-group { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.recipe-store-group select { flex: 1; min-width: 0; border: 2px solid var(--navy); border-radius: 8px; padding: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
/* Empty group (v100): the list area IS the create row — a full
   width button row, navy and bold, that opens the type-in below. */
button.recipe-store-row { width: 100%; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; text-align: left; color: var(--navy); font-weight: 700; }
/* Inline new-store creator inside the picker (v100): mirrors the
   handoff sheet's creator — input + Create store + Cancel. */
.recipe-store-create { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.recipe-store-create input { flex: 1; min-width: 160px; font: inherit; padding: 10px 12px; border: 2px solid var(--card-border); border-radius: 10px; color: var(--navy); }
/* v111: the mic and the Sort share one row (Trey, Nov 25) —
   the mic owns the left half, Sort the right half; each flexes
   to half the row. The mic keeps its bar, just narrower. */
.recipe-mic-sort-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; }
.recipe-mic-sort-row #recipe-mic { flex: 1 1 0; min-width: 0; margin: 0; }
.recipe-mic-sort-row .recipe-sort-label { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
.recipe-mic-sort-row .recipe-sort-label select { flex: 1; min-width: 0; }
/* v111: the toolbar row is the List/Tiles toggle + Download now
   (Trey, Nov 25) — stretch makes both boxes the same height,
   the taller one setting the row; Download takes the rest of
   the row after the toggle. */
.recipe-toolbar { display: flex; justify-content: space-between; align-items: stretch; gap: 10px; margin: 0 0 10px; }
.recipe-toolbar .recipe-view-toggle { flex: 0 0 auto; }
.recipe-toolbar #recipes-export { flex: 1 1 0; min-width: 0; }
.recipe-view-toggle { display: flex; border: 2px solid var(--navy); border-radius: 8px; overflow: hidden; }

/* Back buttons (v98 Recipes, v104 store view; patched to Trey's
   approved mockup): the small "←" stick arrow is replaced by a
   WHITE-FILLED outline arrow — a solid left-arrow silhouette
   (shaft + triangular head), white fill, thin navy outline
   (~1px stroke), 18px — flex-centered on the Stores label's
   x-axis (align-items: center). Both back buttons share the
   .recipe-back-btn / .recipe-back-arrow classes. */
.recipe-back-btn { display: inline-flex; align-items: center; gap: 8px; }
.recipe-back-arrow { width: 18px; height: 18px; flex-shrink: 0; }
.recipe-view-toggle .btn-toggle { border: 0; border-radius: 0; background: #fff; color: var(--navy); padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.recipe-view-toggle .btn-toggle.active { background: var(--navy); color: #fff; }
.recipe-sort-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy); }
.recipe-sort-label select { border: 2px solid var(--navy); border-radius: 8px; padding: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.recipe-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* v111: Load more sits at the bottom of the recipe section,
   above the fixed bottom nav. */
.recipes-load-more-row { display: flex; justify-content: center; margin: 14px 0 4px; }
.recipe-tile { display: flex; flex-direction: column; gap: 6px; padding: 0 0 10px; background: #fff; border: 2px solid var(--navy); border-radius: 10px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.recipe-tile-photo { display: flex; align-items: center; justify-content: center; min-height: 110px; background: var(--sky); }
.recipe-tile-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.recipe-tile-initial { font-size: 44px; font-weight: 700; color: var(--navy); }
.recipe-pick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; background: none; border: 0; border-bottom: 1px solid var(--card-border); color: var(--ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.recipe-pick-row:last-child { border-bottom: 0; }
.recipe-pick-thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--sky); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.recipe-pick-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-pick-name { font-weight: 700; overflow-wrap: anywhere; }
.recipe-tile-name { font-weight: 700; font-size: 15px; padding: 0 10px; overflow-wrap: anywhere; }
.recipe-tile-count { font-size: 13px; color: var(--muted); padding: 0 10px; }
.recipe-detail-photo { margin: 0 0 12px; }
.recipe-detail-photo-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; display: block; }
.recipe-form-photo { margin: 12px 0 0; }
.recipe-form-photo-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; display: block; }


/* ---------- Bottom nav (v106) ---------- */
/* The three top-level doors, pinned to the bottom: Stores,
   Recipes, Meal Planning. White bar, navy top border; icons all
   green, labels all navy bold. The ONLY active marker is the red
   bar above the active tab's icon — icon and label colors never
   change with active state. The bar sits under every sheet and
   modal (z-index below .modal's 50), so it never intercepts a
   tap meant for one. env(safe-area-inset-bottom) keeps the
   iPhone home indicator from clipping it. */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: #fff; border-top: 3px solid var(--navy);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav-tab {
  flex: 1 1 0; min-width: 0; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 0 2px; font: inherit;
}
.bottom-nav-indicator { width: 56px; height: 5px; border-radius: 3px; background: transparent; }
.bottom-nav-tab.active .bottom-nav-indicator { background: var(--red); }
.bottom-nav-icon { color: var(--green); flex: 0 0 auto; }
.bottom-nav-label { color: var(--navy); font-weight: 700; font-size: 11px; line-height: 1.25; text-align: center; }
.bottom-nav-tab:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: -2px; }
