/* Loaded by every page; page-specific rules live in their own file
   (grocery-list.css, recipe.css, auth.css, admin.css, splash.css) - see
   _head.ftl. Search "SECTION:" to jump between blocks. */

/* SECTION: Base / reset */
:root {
  color-scheme: light;
  --bg: #fdf6f0;
  --surface: #ffffff;
  --text: #2b2118;
  --muted: #8a7b6c;
  --accent: #d9612b;
  --accent-hover: #c1521f;
  --border: #eee0d4;
  --track: #f6ebe1;
  --lift: 0 1px 2px rgba(43, 33, 24, 0.15);
}
* { box-sizing: border-box; }
/* Author styles like `.banner { display: flex }` otherwise beat the UA's
   `[hidden] { display: none }` regardless of specificity. */
[hidden] { display: none !important; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  /* No top padding - .nav is sticky and supplies its own, so the gap above it
     stays constant instead of shifting once it sticks mid-scroll. */
  padding: 0 1rem 2.5rem;
}
/* SECTION: Themed checkbox (grocery list + add-to-list review dialog) */
.grocery-item input[type=checkbox],
.review-item-row input[type=checkbox],
.review-select-all input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-content: center;
  border: 2px solid #e8cdb8;
  border-radius: 50%;
  background: #fff7f1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.grocery-item input[type=checkbox]::after,
.review-item-row input[type=checkbox]::after,
.review-select-all input[type=checkbox]::after {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  background: #fff;
  clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 24%, 86% 8%, 38% 68%);
  transform: scale(0);
  transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.6, 1);
}
.grocery-item input[type=checkbox]:hover,
.review-item-row input[type=checkbox]:hover,
.review-select-all input[type=checkbox]:hover { border-color: var(--accent); background: #fdeadc; }
.grocery-item input[type=checkbox]:active,
.review-item-row input[type=checkbox]:active,
.review-select-all input[type=checkbox]:active { transform: scale(0.9); }
.grocery-item input[type=checkbox]:checked,
.review-item-row input[type=checkbox]:checked,
.review-select-all input[type=checkbox]:checked {
  background: linear-gradient(135deg, #e8763f, var(--accent-hover));
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(217, 97, 43, 0.35);
}
.grocery-item input[type=checkbox]:checked::after,
.review-item-row input[type=checkbox]:checked::after,
.review-select-all input[type=checkbox]:checked::after { transform: scale(1); }
.grocery-item input[type=checkbox]:disabled { opacity: 0.6; cursor: default; }
.grocery-item input[type=checkbox]:focus-visible,
.review-item-row input[type=checkbox]:focus-visible,
.review-select-all input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* SECTION: Layout primitives & typography */
.container {
  max-width: 640px;
  margin: 0 auto;
}
h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 1.85rem;
  margin: 0 0 0.25rem;
}
.subtitle {
  color: var(--muted);
  margin: 0 0 1.5rem;
}
/* SECTION: Buttons */
a.button, button, label.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
a.button:hover, button:hover, label.button:hover {
  background: var(--accent-hover);
}
button:disabled, label.button[aria-disabled="true"] {
  background: var(--muted);
  cursor: default;
  pointer-events: none;
}
button.danger {
  background: var(--surface);
  color: #b3261e;
  border: 1px solid #b3261e;
}
button.danger:hover {
  background: #b3261e;
  color: #fff;
}
a.button-secondary, button.button-secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
a.button-secondary:hover, button.button-secondary:hover {
  background: var(--accent);
  color: #fff;
}
/* Suppresses Android Chrome's own blue tap-highlight on every tappable element,
   not just the styled button classes - reinstated for :focus-visible only, so
   keyboard/switch-control navigation keeps an accessible focus indicator. */
a, button, label.icon-button {
  -webkit-tap-highlight-color: transparent;
}
a:focus, button:focus, label.icon-button:focus {
  outline: none;
}
a:focus-visible, button:focus-visible, label.icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* SECTION: Top navigation */
.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  /* z-index stays below .nav-menu-panel's own (20), which still stacks correctly
     as its descendant. background matches body's so scrolled content underneath reads as seamless. */
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bg);
  padding: 1rem 0;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
/* Segmented controls (nav tabs, category filters, list destinations): the
   choices share one tinted track and the selected one lifts onto a surface. */
.tabgroup-pill {
  display: inline-flex;
  gap: 2px;
  background: var(--track);
  border-radius: 10px;
  padding: 3px;
}
.tab-pill {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  line-height: 1.3;
}
.tab-pill:hover {
  color: var(--text);
}
.tab-pill.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--lift);
}
.nav-menu {
  position: relative;
}
.nav-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(43, 33, 24, 0.15);
  padding: 0.4rem;
  min-width: 160px;
  z-index: 20;
}
.nav-menu.open .nav-menu-panel {
  display: flex;
  flex-direction: column;
}
.nav-menu-panel a,
.nav-menu-panel .nav-logout {
  margin: 0;
}
.nav-menu-panel a,
.nav-menu-panel .nav-logout button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.nav-menu-panel a:hover,
.nav-menu-panel .nav-logout button:hover {
  background: var(--bg);
  color: var(--text);
}
/* SECTION: Icon buttons & floating action buttons */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--accent-hover);
}
.icon-button:disabled,
.fab-actions.fab-disabled .icon-button {
  background: #9a9a9a;
  cursor: not-allowed;
  pointer-events: none;
}
.icon-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}
.fab-actions {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right));
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  /* flex-direction: column's default align-items: stretch only fills width for
     children with no explicit width - fixed-width children like .fab-toggle
     fall back to flex-start (left) instead, so a wider .fab-item row left them
     behind at the old left edge. flex-end right-aligns every child instead. */
  align-items: flex-end;
  gap: 0.75rem;
  z-index: 10;
}
.fab-actions .icon-button {
  width: 3.25rem;
  height: 3.25rem;
  box-shadow: 0 4px 12px rgba(43, 33, 24, 0.3);
}
.fab-actions .icon-button svg {
  width: 1.5rem;
  height: 1.5rem;
}
.icon-button.icon-button-danger {
  background: var(--surface);
  color: #b3261e;
  border: 1px solid #b3261e;
}
.icon-button.icon-button-danger:hover {
  background: #b3261e;
  color: #fff;
}
.speed-dial .fab-mini {
  display: none;
}
/* Must be inline-flex, matching .icon-button - a plain `block` here overrides
   its flex centering (3-class specificity beats .icon-button's 1-class rule)
   and pins the SVG glyph to the top-left instead of centering it. */
.speed-dial.open .fab-mini {
  display: inline-flex;
}
.fab-toggle svg {
  transition: transform 0.15s ease;
}
.speed-dial.open .fab-toggle svg {
  transform: rotate(45deg);
}
.fab-item {
  display: none;
}
.speed-dial.open .fab-item {
  display: flex;
  align-items: center;
}
.fab-label {
  display: flex;
  align-items: center;
  height: 3.25rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0 2.25rem 0 1rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(43, 33, 24, 0.3);
  white-space: nowrap;
  /* Pulled behind the button (a later DOM sibling) with a negative margin, rather
     than z-index, to tuck its rounded end out of sight. */
  margin-right: -1.75rem;
}
/* SECTION: Wordmark & nav logout */
.wordmark {
  font-family: 'Fredoka', sans-serif;
  font-weight: 400;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
}
.wordmark .flame-i {
  position: relative;
  display: inline-block;
}
.wordmark .flame-i::after {
  content: "\1F525";
  position: absolute;
  top: -0.32em;
  left: -0.01em;
  font-size: 0.4em;
  filter: brightness(0);
}
.nav .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: var(--text);
  margin-right: auto;
}
.nav-logo {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  flex-shrink: 0;
}
h1.wordmark {
  font-size: 2.5rem;
  margin: 0 0 0.25rem;
}
.auth-card h1.wordmark {
  font-size: 2.5rem;
}
.nav-logout {
  margin: 0;
}
.nav-logout button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}
.nav-logout button:hover {
  color: var(--text);
}
/* SECTION: Cards & list entries */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.share-actions button {
  width: 100%;
}
a.list-entry {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
a.list-entry:hover {
  border-color: var(--accent);
}
.list-entry-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.list-entry-preview {
  color: var(--text);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
/* An <a> can't contain another interactive form/button, so the link and delete form sit side by side. */
.list-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color 0.15s ease;
}
.list-entry-row:hover {
  border-color: var(--accent);
}
.list-entry-row .list-entry {
  flex: 1;
  min-width: 0;
}
.list-entry-row form {
  flex-shrink: 0;
}
a.recipe-link {
  display: block;
  font-family: 'Fredoka', sans-serif;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
a.recipe-link:hover {
  border-color: var(--accent);
}
/* SECTION: Dialogs (native <dialog> - recipe.ftl's linkRecipeDialog,
   grocery-list.ftl's mealTagsDialog) */
dialog {
  border: none;
  border-radius: 10px;
  padding: 1.25rem;
  width: calc(100% - 2.5rem);
  max-width: 400px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
dialog::backdrop {
  background: rgba(43, 33, 24, 0.45);
}
dialog h3 {
  margin-top: 0;
}
dialog form + form {
  margin-top: 0.75rem;
}
/* Side slide-over (itemDialog, reviewItemsDialog): a full-height panel from the
   right edge - a drawer on wide screens, effectively full-screen on phones.
   Opening/closing animate via @starting-style + allow-discrete display/overlay
   transitions; browsers without those just show/hide instantly. Content flows
   from the top so the on-screen keyboard never covers the input or buttons;
   --sheet-top / --sheet-bottom (set by fitToKeyboard() in app.js, itemDialog
   only) fit the panel to the visible area above the keyboard. */
dialog.slideover::backdrop {
  opacity: 0;
  transition: opacity 0.45s, overlay 0.45s allow-discrete, display 0.45s allow-discrete;
}
dialog.slideover[open]::backdrop { opacity: 1; }
dialog.slideover:focus { outline: none; }
@starting-style {
  dialog.slideover[open]::backdrop { opacity: 0; }
}
dialog.slideover {
  position: fixed;
  inset: var(--sheet-top, 0px) 0 var(--sheet-bottom, 0px) auto;
  margin: 0;
  width: 100%;
  max-width: 440px;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  border-radius: 18px 0 0 18px;
  padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
  padding-bottom: 1.25rem;
  box-shadow: -10px 0 30px rgba(43, 33, 24, 0.25);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), bottom 0.2s ease-out, top 0.2s ease-out,
    overlay 0.45s allow-discrete, display 0.45s allow-discrete;
}
dialog.slideover[open] {
  transform: none;
  display: flex;
  flex-direction: column;
}
@starting-style {
  dialog.slideover[open] { transform: translateX(100%); }
}
@media (max-width: 440px) {
  dialog.slideover { border-radius: 0; }
}
.slideover-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.slideover-head h3 { margin: 0; }
.slideover-back {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  dialog.slideover, dialog.slideover::backdrop { transition-duration: 0.01ms; }
}
/* SECTION: Tags, filters & banners */
.tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  text-transform: capitalize;
}
/* One line that scrolls sideways when the categories outgrow the screen; the fade
   (toggled in app.js) hints that more are off-screen. */
.filter-row + .filter-row { margin-top: 0.5rem; }
.filter-row {
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--track);
  border-radius: 10px;
  padding: 3px;
  margin-top: 1.25rem;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row.fade {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.filter-chip {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-transform: capitalize;
}
.filter-chip:hover {
  color: var(--text);
}
.filter-chip-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--lift);
}
.filter-chip-empty {
  opacity: 0.45;
}
.filter-count {
  color: var(--muted);
  font-size: 0.8rem;
}
.banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.banner-processing {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.banner-error {
  background: #fbe9e7;
  border: 1px solid #f0b8ae;
  color: #8a3a2b;
  justify-content: space-between;
}
.banner-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
}
.banner-offline {
  background: #fdf1e2;
  border: 1px solid #f0d9b5;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(43, 33, 24, 0.08);
  margin-bottom: 1.25rem;
}
.banner-offline .offline-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: offline-pulse 1.6s ease-in-out infinite;
}
.banner-offline .spinner {
  width: 0.85rem;
  height: 0.85rem;
  border-width: 2px;
  flex-shrink: 0;
}
@keyframes offline-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.banner-dismiss {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
}
.banner-dismiss:hover {
  background: rgba(0, 0, 0, 0.05);
}
.banner-install {
  background: #fdf1e2;
  border: 1px solid #f0d9b5;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(43, 33, 24, 0.08);
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.banner-install span {
  flex: 1 1 auto;
}
.banner-install .banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
/* SECTION: Section headings */
.section-heading {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem;
}
.section-heading:first-of-type { margin-top: 0; }
/* SECTION: Staging area / photo upload (home.ftl) */
.staging-area {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.staged-photos {
  /* Not a flex container itself - children become direct items of .staging-area's row. */
  display: contents;
}
.staged-photo {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
}
.staged-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.recipe-url-input {
  flex: 1 1 200px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.staged-photo-remove {
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: none;
  background: #b3261e;
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.staging-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#status { margin: 1rem 0; color: var(--muted); }
#cameraInput, #galleryInput { display: none; }
/* SECTION: Empty state & small-screen tweaks */
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-top: 1.5rem;
}
@media (max-width: 480px) {
  body { padding: 0 1rem 1.5rem; }
  h1 { font-size: 1.5rem; }
  a.button, button, label.button, a.button-secondary, button.button-secondary {
    display: block;
    width: 100%;
  }
  .nav {
    gap: 0.85rem;
  }
  .nav .wordmark {
    gap: 0.35rem;
    font-size: 1.3rem;
  }
  .nav-logo {
    width: 1.4rem;
    height: 1.4rem;
  }
}
/* SECTION: Add-item form (grocery-list.ftl / recipe.ftl / staples.ftl) */
/* position: relative so grocery-list.css's .suggestions-dropdown can anchor to the whole form, not just the input. */
.add-item-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.add-item-form input,
.add-item-form select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
/* min-width: 0 overrides the flex item default of min-width: auto, letting this shrink below its intrinsic content width. */
.add-item-form .name-input { flex: 1 1 200px; min-width: 0; }

/* Select-all's partial state: filled like checked, with a dash instead of a tick. */
.review-select-all input[type=checkbox]:indeterminate {
  background: linear-gradient(135deg, #e8763f, var(--accent-hover));
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(217, 97, 43, 0.35);
}
.review-select-all input[type=checkbox]:indeterminate::after {
  clip-path: inset(40% 0 40% 0 round 1px);
  transform: scale(1);
}

/* SECTION: Category strip (add/edit dialog, new-list dialog, recipe review dialog) */
/* Scrolls sideways; the fade (toggled in app.js) hints that more chips are off-screen. */
.dest-picker { flex: 1 1 100%; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.dest-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  background: var(--track);
  border-radius: 10px;
  padding: 3px;
}
.dest-strip::-webkit-scrollbar { display: none; }
.dest-strip.fade {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.dest-chip {
  flex-shrink: 0;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.dest-chip:hover { color: var(--text); }
.dest-chip .dest-count { font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.dest-chip[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--lift); }
.dest-chip-new { border-color: var(--border); border-style: dashed; font-weight: 500; color: var(--muted); background: transparent; }
.dest-chip-new:hover { border-color: var(--accent); color: var(--accent); }
.dest-new-form { flex: 0 0 auto; display: flex; gap: 0.35rem; align-items: center; }
/* .add-item-form input (base.css) gives the box its border and padding; this only sizes it. */
.dest-new-input {
  width: 11rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.dest-new-create, .dest-new-cancel {
  width: auto;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}
.dest-new-cancel { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.dest-new-cancel:hover { background: var(--bg); }

.aisle-picker-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Touch devices: hide scrollbars, as native mobile apps do. Content still
   scrolls; desktop pointers keep their scrollbars. */
@media (hover: none) and (pointer: coarse) {
  * { scrollbar-width: none; }
  *::-webkit-scrollbar { display: none; }
}
