:root {
  color-scheme: light;
  --bg: #f5f3f1;
  --surface: #ffffff;
  --ink: #231f20;
  --muted: #5e5a5b;
  --line: #d6d2d0;
  --green: #e11a2c;
  --green-dark: #c81727;
  --blue: #0072ce;
  --gold: #f9b233;
  --red: #b80016;
  --shadow: 0 12px 28px rgba(23, 32, 27, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0; /* prevent flex/grid children from escaping their container */
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  min-width: auto; /* override * { min-width: 0 } — buttons keep their natural minimum */
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.suggestion-row:focus-visible,
.add-choice-card:focus-visible {
  outline: 3px solid rgba(42, 95, 143, 0.38);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  width: min(100%, 480px);
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.brand-lockup {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.brand-lockup img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-lockup .brand-mark {
  width: clamp(54px, 17vw, 76px);
  height: auto;
  max-height: 44px;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
}

.eyebrow,
.step-label {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.22rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.16;
}

.copy {
  color: var(--muted);
  line-height: 1.45;
}

.reward-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 16px;
}

.reward-preview span {
  min-width: 0;
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.reward-preview img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.feature-tile,
.store-card,
.recipe-card {
  min-height: 82px;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--green-dark);
  text-align: center;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(23, 32, 27, 0.06);
}

.feature-tile img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.store-card-grid {
  display: grid;
  gap: 10px;
}

.store-card {
  justify-items: start;
  text-align: left;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
}

.store-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  grid-row: span 3;
}

.store-card.selected {
  border-color: var(--green);
  background: #fff1e8;
}

.store-card-title,
.recipe-card-main strong {
  display: block;
  color: var(--green-dark);
  font-weight: 900;
}

.store-card-meta,
.store-card-status,
.recipe-card-main small,
.ingredient-row small,
.trophy-card small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.recipe-category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.recipe-category-pill {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.recipe-category-pill.selected {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.screen-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 8px;
  /* Keep each screen's heading nav buttons (Back, View list, etc.) above the floating
     map button so it can never intercept their taps. */
  position: relative;
  z-index: 6;
}

.screen-heading h2 {
  margin-bottom: 0;
}

.compact-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.recipe-layout,
.recipe-list,
.recipe-detail-card,
.ingredient-list,
.trophy-grid {
  display: grid;
  gap: 10px;
}

.recipe-card {
  grid-template-columns: 42px minmax(0, 1fr);
  justify-items: start;
  min-height: 72px;
  text-align: left;
}

.recipe-card.selected {
  border-color: var(--green);
  background: #fff1e8;
}

.recipe-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef5fb;
  color: var(--green);
  font-weight: 900;
}

.recipe-controls {
  display: grid;
  grid-template-columns: 74px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.recipe-controls label {
  grid-column: 1;
  font-size: 0.74rem;
  font-weight: 900;
  color: var(--blue);
  text-transform: uppercase;
}

.recipe-controls input {
  grid-column: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.recipe-controls button {
  min-height: 42px;
  font-size: 0.78rem;
}

.recipe-back-button {
  margin-bottom: 10px;
}

.recipe-empty-card {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

#recipeStep.recipe-card-open .recipe-category-row,
#recipeStep.recipe-card-open .recipe-list {
  display: none;
}

.recipe-detail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.recipe-detail-hero {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.recipe-detail-hero img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.recipe-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f0f7;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.recipe-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.recipe-meta-grid span {
  padding: 8px 6px;
  border-radius: 8px;
  background: #f3f8f4;
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.ingredient-row input {
  margin-top: 3px;
}

.recipe-route-preview {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.trophy-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.trophy-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.trophy-card p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.trophy-card.locked {
  filter: grayscale(0.6);
  opacity: 0.68;
}

.toolbar {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 148px;
}

.icon-button {
  width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
  font-weight: 800;
}

.icon-button.danger,
.item-icon-button.danger {
  color: var(--red);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  overflow-x: hidden;
  overflow-y: auto;
}

.screen {
  display: none;
  padding: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

.screen.active {
  display: block;
}

.welcome-editorial-heading .store-change-link {
  min-height: 44px;
}

.store-status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.store-status-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.store-status-strip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.home-primary-actions {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.12;
}

.action-button img {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.action-button-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green, #2c7a4b);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

/* Adult-only retarget: family/child ("quest") features are hidden by default. To bring
   them back, remove this rule or gate it behind a body class fed by the quest_enabled flag. */
.family-feature {
  display: none !important;
}

.item-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.add-choice-grid,
.suggestion-list,
.hunt-target-list {
  display: grid;
  gap: 10px;
}

.add-choice-card,
.suggestion-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 10px rgba(23, 32, 27, 0.06);
}

.add-choice-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  grid-row: span 2;
}

.add-choice-card .add-choice-specials-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  grid-row: span 2;
  border-radius: 999px;
  background: var(--brand-primary, #e30613);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
}

.add-choice-card span,
.suggestion-row strong {
  color: var(--green-dark);
  font-weight: 900;
}

.add-choice-card small,
.suggestion-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.freestyle-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.freestyle-panel[hidden],
.hunt-builder-panel[hidden] {
  display: none;
}

.freestyle-panel > label,
.hunt-target-field span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.item-suggestions {
  min-height: 42px;
}

.suggestion-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  background: #ffffff;
}

.suggestion-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e4f1ea;
  color: var(--green-dark);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
}

.hunt-target-field {
  display: grid;
  gap: 8px;
}

.hunt-target-field select {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hunt-selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hunt-selection-summary span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.item-composer input {
  min-width: 0;
  min-height: 52px;
  padding: 0 12px;
  border: 0;
  color: var(--ink);
}

.icon-submit {
  width: 48px;
  min-height: 52px;
  border-radius: 0;
  background: var(--blue);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

.list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.list-header h2 {
  margin-bottom: 0;
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px 44px;
  gap: 8px;
}

.list-tools select {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.shopping-list-body {
  min-height: 176px;
}

.list-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 8px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-surface-alt);
}

.list-view-controls > span {
  margin-right: auto;
  color: var(--brand-text-secondary);
  font-size: 0.78rem;
  font-weight: 850;
}

.list-view-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--brand-surface);
  color: var(--brand-text-primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.list-view-button.active {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
}

.shopping-aisle-groups {
  display: grid;
  gap: 14px;
}

.shopping-aisle-group {
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--brand-surface);
}

.shopping-aisle-group > header {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  padding: 11px 12px;
  border-bottom: 1px solid var(--brand-border);
  background: var(--brand-surface-alt);
}

.shopping-aisle-group > header span,
.shopping-aisle-group > header strong {
  display: block;
}

.shopping-aisle-group > header span,
.shopping-aisle-group > header small {
  color: var(--brand-text-secondary);
  font-size: 0.72rem;
  font-weight: 750;
}

.shopping-aisle-group > header strong {
  margin-top: 2px;
  font-size: 0.95rem;
}

.shopping-aisle-group .shopping-items {
  gap: 0;
}

.shopping-aisle-group .shopping-item {
  border-width: 0 0 1px;
  border-radius: 0;
}

.shopping-aisle-group .shopping-item:last-child {
  border-bottom: 0;
}

.empty-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.empty-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty-actions .secondary-button {
  margin-top: 0;
}

.shopping-items {
  display: grid;
  gap: 8px;
}

.list-route-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 14px;
}

.list-route-summary-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.list-route-summary-main h3 {
  margin-bottom: 6px;
}

.list-route-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.list-route-metrics span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f4f7f4;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.shopping-item {
  display: grid;
  grid-template-columns: 30px 52px minmax(0, 1fr) 48px 44px;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.item-select-wrap {
  display: grid;
  place-items: center;
}

.item-select-wrap input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.shopping-item:last-child {
  border-bottom: 0;
}

.shopping-item.checked .item-name {
  color: var(--muted);
  text-decoration: line-through;
}

.item-check,
.item-icon-button {
  width: 100%;
  min-height: 44px;
  padding: 0 4px;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.05;
}

.item-check {
  background: #e4f1ea;
  color: var(--green-dark);
}

.item-main {
  min-width: 0;
}

.shopping-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.item-name {
  margin-bottom: 0;
  font-weight: 900;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.shopping-item-route-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.shopping-route-badge {
  flex: 0 0 auto;
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #e9f1ea;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 950;
}

.shopping-route-badge.next {
  background: #fff1d8;
  color: #8a4a00;
}

.item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.item-chip {
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.item-chip.ready {
  background: #e4f1ea;
  color: var(--green-dark);
}

.item-chip.route,
.item-chip.route-next {
  background: #eef4ff;
  color: var(--blue);
}

.item-chip.route-next {
  background: #fff1d8;
  color: #8a4a00;
}

.item-chip.source,
.item-chip.brand {
  background: #e8f0f7;
  color: var(--blue);
}

.item-chip.pending {
  background: #fff8e6;
  color: var(--gold);
}

.action-footer {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.action-footer .secondary-button {
  margin-top: 0;
}

.store-map {
  position: relative;
  height: 172px;
  margin: 0 -2px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(42, 95, 143, 0.08) 48% 52%, transparent 52%),
    linear-gradient(#eef3ef 1px, transparent 1px),
    linear-gradient(90deg, #eef3ef 1px, transparent 1px),
    #fbfcfa;
  background-size: 100% 100%, 28px 28px, 28px 28px, auto;
}

.map-mascot {
  position: absolute;
  right: 8px;
  bottom: 4px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  pointer-events: none;
}

.store-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.store-map path {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-node {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(23, 32, 27, 0.22);
}

.map-node.entrance {
  background: var(--green);
}

.map-node.clue {
  background: var(--gold);
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--green);
  color: #ffffff;
}

.secondary-button {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
}

.secondary-button.danger-button {
  border-color: rgba(166, 63, 63, 0.35);
  background: #fff7f6;
  color: var(--red);
}

.field-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field-row label {
  color: var(--muted);
  font-weight: 700;
}

.field-row input,
.field-row select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.role-grid,
.scan-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.scan-actions .secondary-button {
  margin-top: 0;
}

.role {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
  font-weight: 800;
}

.role img {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.role span {
  min-width: 0;
  line-height: 1.15;
}

.role.selected {
  border-color: var(--green);
  background: #fff1e8;
}

.camera-panel,
.objective-panel,
.result-panel,
.route-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.panel-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.panel-mascot {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.camera-feed {
  display: none;
  width: 100%;
  height: 220px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

.camera-frame {
  position: relative;
  height: 150px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(18, 72, 52, 0.16) 0 2px, transparent 2px 100%),
    linear-gradient(rgba(18, 72, 52, 0.16) 0 2px, transparent 2px 100%),
    #eef3ef;
  background-size: 24px 24px;
}

.camera-frame span {
  position: absolute;
  inset: 44px 36px;
  border: 3px solid var(--green);
  border-radius: 8px;
}

.scan-guide-mascot {
  position: absolute;
  right: 18px;
  bottom: 48px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  pointer-events: none;
}

.camera-panel p {
  margin: 12px 0 0;
  color: var(--muted);
}

/* ── Camera overlay — floats above any screen ───────────── */
#cameraOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
  gap: 12px;
}

#cameraOverlay.active {
  display: flex;
}

#cameraOverlay .camera-feed {
  display: block;
  width: 100%;
  height: 60vw;
  max-height: 340px;
  border-radius: 10px;
}

#cameraOverlay .camera-frame {
  width: 100%;
  height: 60vw;
  max-height: 340px;
  border-radius: 10px;
}

#cameraOverlay .scan-guide-mascot {
  bottom: 80px;
}

#cameraOverlay p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  text-align: center;
  margin: 0;
}

#cameraOverlayCancel {
  padding: 10px 32px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
}

.camera-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.camera-overlay-actions [hidden] {
  display: none;
}

.objective-title {
  margin-bottom: 6px;
  font-weight: 900;
}

.objective-meta,
.route-step,
.result-detail {
  color: var(--muted);
  line-height: 1.4;
}

.objective-hero,
.result-hero,
.route-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.objective-hero > div,
.result-hero > div {
  min-width: 0;
}

.objective-asset {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.objective-asset.icon {
  width: 54px;
  height: 54px;
}

.quest-progress-chip {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.quest-progress-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.result-hero img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.reward-earned {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff8e6;
  color: var(--green-dark);
  font-weight: 900;
}

.reward-earned img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.reward-earned.mission {
  background: #eaf3fb;
}

.progress-track {
  height: 12px;
  margin: 14px 0;
  border-radius: 999px;
  background: #e9ece8;
  overflow: hidden;
}

#progressFill {
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 180ms ease;
}

.route-panel {
  margin-top: 14px;
}

.route-summary {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.route-summary img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.route-summary .objective-title {
  margin: 0;
}

.route-summary-detail {
  align-items: flex-start;
}

.route-step {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.route-step:last-child {
  border-bottom: 0;
}

.route-index {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e4f1ea;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.route-step.route-stop.is-next {
  margin: 4px 0;
  padding: 10px 8px;
  border: 1px solid rgba(35, 31, 32, 0.18);
  border-radius: 8px;
  background: #f4fbf6;
}

.route-stop-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-secondary-soft);
  color: var(--fresh-accent);
  font-size: 0.78rem;
  font-weight: 950;
}

.map-status-panel,
.map-log-panel,
.map-visual-panel {
  min-height: 96px;
}

.custom-map-panel {
  display: grid;
  gap: 12px;
}

.custom-map-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.custom-map-header .objective-title,
.custom-map-header .objective-meta {
  margin-bottom: 0;
}

.custom-map-tools {
  grid-template-columns: minmax(0, 1fr) 44px 44px 44px;
}

.custom-map-points {
  display: grid;
  gap: 8px;
}

.custom-map-point {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.custom-map-point:first-child {
  border-top: 0;
}

.custom-map-point-main {
  min-width: 0;
}

.custom-map-point-title {
  margin-bottom: 4px;
  font-weight: 900;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.custom-map-point-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.custom-map-action {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.custom-map-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
  align-items: center;
}

.custom-map-action select {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.custom-map-action .secondary-button {
  margin-top: 0;
}

.custom-map-location {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.map-status-panel {
  padding-right: 84px;
}

.map-expand-button {
  margin-top: 10px;
}

body[data-active-screen="map"] #mapStep {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: calc(100dvh - 156px - env(safe-area-inset-bottom));
  padding-bottom: 10px;
}

body[data-active-screen="map"] #pioneerMapPanel {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="map"] #pioneerMapPanel .store-map-visual.has-art {
  max-width: calc(clamp(520px, 72dvh, 820px) * (var(--store-map-aspect-ratio)));
  margin-inline: auto;
  border-radius: 10px;
}

body[data-active-screen="map"] #pioneerMapPanel .objective-title,
body[data-active-screen="map"] #pioneerMapPanel .objective-meta {
  padding-inline: 2px;
}

body[data-active-screen="map"] #mapStatusPanel {
  margin-top: 10px;
}

body[data-active-screen="adult"] #adultStep {
  padding-bottom: calc(124px + env(safe-area-inset-bottom));
}

body[data-active-screen="adult"] #adultRoutePanel .store-map-visual.has-art {
  width: 100%;
  max-width: calc(clamp(340px, 42dvh, 520px) * (var(--store-map-aspect-ratio)));
  margin-inline: auto;
}

body[data-active-screen="adult"] #adultRoutePanel .floor-plan-truth-note {
  display: none;
}

.map-support-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.map-support-pills span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

/* ── Product result card ─────────────────────────────────── */

.product-card {
  display: grid;
  gap: 6px;
  padding: 12px 0 10px;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.product-card-image {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.product-card-text {
  min-width: 0;
}

.product-card-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-card-meta {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.product-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-dark);
}

.product-location-chip.unmapped {
  color: var(--muted);
  border-style: dashed;
}

/* ── Product action row ──────────────────────────────────── */

.product-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scan-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.scan-choice-button {
  margin-top: 0;
  min-height: 48px;
  padding-inline: 10px;
  line-height: 1.12;
}

.product-actions .secondary-button {
  margin-top: 0;
  font-size: 0.78rem;
  padding: 0 8px;
}

/* ── Variant discovery panels ────────────────────────────── */

.variant-panels {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.variant-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--green-dark);
  user-select: none;
}

.variant-panel summary::-webkit-details-marker { display: none; }

.variant-panel summary::after {
  content: "›";
  font-size: 1.1rem;
  transition: transform 0.15s;
}

.variant-panel[open] summary::after {
  transform: rotate(90deg);
}

.variant-list {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.variant-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.3;
}

.variant-chip-name {
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
  min-width: 0;
}

.variant-chip-qty {
  flex: 0 0 auto;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.variant-chip-add {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: none;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.variant-loading {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 0;
}

.variant-empty {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.map-visual-panel {
  overflow: hidden;
}

.map-svg {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#eef3ef 1px, transparent 1px),
    linear-gradient(90deg, #eef3ef 1px, transparent 1px),
    #ffffff;
  background-size: 20px 20px;
  touch-action: pan-x pan-y pinch-zoom;
}

.store-map-svg,
.route-mini-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.store-map-svg rect {
  fill: #f9f6ea;
  stroke: #eadfc9;
  stroke-width: 0.8;
}

.store-map-edges line {
  stroke: #dfd6c5;
  stroke-width: 0.35;
}

.store-map-node {
  stroke: #ffffff;
  stroke-width: 0.5;
}

.store-map-node.grocery {
  fill: #2f8bd8;
}

.store-map-node.produce {
  fill: #39a95d;
}

.store-map-node.dairy {
  fill: #0072ce;
}

.store-map-node.bakery {
  fill: #d7922b;
}

.store-map-node.restricted {
  fill: #b74949;
}

.store-map-route,
.route-mini-map polyline {
  fill: none;
  stroke: var(--route-line, #e30613);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0;
  filter: drop-shadow(0 1px 1px rgba(23, 32, 27, 0.22));
}

.store-map-target circle {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 1.4;
}

.store-map-target text {
  fill: var(--green-dark);
  font-size: 3px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.store-map-highlight circle {
  fill: #f8d75b;
  stroke: var(--ink);
  stroke-width: 1.2;
  filter: drop-shadow(0 1px 2px rgba(23, 32, 27, 0.28));
}

.store-map-highlight.scan circle {
  fill: #70b7ff;
}

.customer-route-map {
  display: grid;
  gap: 6px;
}

.route-map-frame {
  position: relative;
}

.route-map-layer-toggle {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 3;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(31, 31, 31, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-primary, var(--red));
  box-shadow: 0 6px 18px rgba(31, 31, 31, 0.16);
  font-size: 0.76rem;
  font-weight: 900;
}

.route-map-layer-toggle:focus-visible {
  outline: 3px solid rgba(249, 178, 51, 0.72);
  outline-offset: 2px;
}

.route-mini-map {
  background:
    linear-gradient(#eef3ef 1px, transparent 1px),
    linear-gradient(90deg, #eef3ef 1px, transparent 1px),
    #ffffff;
  background-size: 20px 20px;
}

.route-mini-map circle {
  fill: var(--green);
  stroke: #ffffff;
  stroke-width: 2;
}

.map-svg line {
  stroke: #9aa59f;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.map-point {
  cursor: pointer;
  stroke: #ffffff;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(23, 32, 27, 0.24));
}

.map-point.low {
  fill: #8d9690;
}

.map-point.medium {
  fill: var(--gold);
}

.map-point.high {
  fill: var(--green);
}

.map-point.selected {
  stroke: var(--ink);
  stroke-width: 3;
}

.custom-map-progress-svg {
  background:
    linear-gradient(90deg, rgba(35, 31, 32, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 31, 32, 0.08) 1px, transparent 1px),
    #fffdf8;
  background-size: 18px 18px;
}

.custom-map-progress-line {
  fill: none;
  stroke: var(--brand-primary, var(--red));
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.custom-map-progress-point circle {
  fill: #ffffff;
  stroke: var(--brand-secondary, var(--green));
  stroke-width: 1.6;
  filter: drop-shadow(0 2px 4px rgba(23, 32, 27, 0.22));
}

.custom-map-progress-point text {
  fill: var(--brand-secondary, var(--green-dark));
  font-size: 3px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.map-inspector {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.regroup-list {
  margin-top: 10px;
}

.map-log-entry {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.map-log-entry:last-child {
  border-bottom: 0;
}

.map-log-entry strong {
  color: var(--green-dark);
}

.map-log-entry small {
  color: var(--muted);
  line-height: 1.35;
}

.mapping-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.mapping-suggestions span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef7ec;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.route-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.parent-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.parent-bar button {
  min-height: 58px;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 4px 2px;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
}

.parent-bar button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.parent-bar button span {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 132px;
  width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.large-text {
  font-size: 1.15rem;
}

body.high-contrast {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #050505;
  --muted: #222222;
  --line: #111111;
  --green: #e11a2c;
  --green-dark: #c81727;
  --blue: #003f8c;
  --gold: #8a5400;
  --red: #8e1f1f;
  --shadow: none;
}

@media (min-width: 430px) {
  .role-grid,
  .scan-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .role-grid .role:last-child {
    grid-column: 1 / -1;
  }
}

/* ── Login screen ────────────────────────────────────────── */

.login-hero {
  text-align: center;
  padding: 24px 0 16px;
}

.login-logo {
  width: 120px;
  height: auto;
  margin-bottom: 16px;
}

.login-hero h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.login-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.login-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}

.login-input:focus {
  outline: none;
  border-color: var(--green);
}

.login-message {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--green-dark);
  font-weight: 700;
  min-height: 1.4em;
}

.login-message.error {
  color: var(--red);
}

.login-delivery-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.login-dev-notice {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1.5px dashed var(--gold);
  border-radius: 8px;
  background: #fdf8ef;
}

.login-dev-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-dev-anchor {
  font-size: 0.85rem;
  color: var(--green-dark);
  font-weight: 700;
  word-break: break-all;
}

.login-privacy {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* Previous-activity strip — shown below store status when signed in */
.history-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 16px;
  background: var(--cream, #f6f4ef);
  border-bottom: 1px solid rgba(33, 111, 80, 0.12);
  font-size: 0.82rem;
  color: var(--green-dark, #17201b);
}

.history-strip-greeting {
  font-weight: 700;
  color: var(--green, #e30613);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--ink, #17201b);
  opacity: 0.75;
}

.history-stat strong {
  color: var(--green-dark, #17201b);
  opacity: 1;
}

/* Header user chip — shown when signed in */
.user-chip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 0 100%;
  min-height: 28px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green-dark);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 0;
}

.user-chip-email {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── ShelfQuest kawaii UI refresh ───────────────────────── */

:root {
  --green-primary: #e30613;
  --green-dark: #b80016;
  --blue-primary: #e30613;
  --yellow-reward: #f9b233;
  --orange-accent: #e30613;
  --coral-warning: #b80016;
  --feature-accent: #b80016;
  --pink-badge: #e30613;
  --background: #fff8ef;
  --warm-background: #fff8ef;
  --card: #ffffff;
  --cream-card: #fff1e8;
  --text-primary: #1f1f1f;
  --text-secondary: #5b5550;
  --success: #0072ce;
  --border-soft: #e7e2da;
  --sticker-line: rgba(255, 255, 255, 0.92);
  --bg: var(--warm-background);
  --surface: #fffdfa;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: rgba(229, 231, 235, 0.9);
  --green: var(--green-primary);
  --gold: var(--yellow-reward);
  --blue: var(--blue-primary);
  --red: var(--coral-warning);
  --shadow: 0 18px 36px rgba(36, 48, 68, 0.14);
  --soft-shadow: 0 10px 24px rgba(36, 48, 68, 0.12);
  --sticker-shadow: 0 6px 0 rgba(36, 48, 68, 0.06), 0 16px 30px rgba(36, 48, 68, 0.14);
  font-family: "Nunito", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 194, 71, 0.22) 0 26px, transparent 27px),
    radial-gradient(circle at 88% 14%, rgba(244, 114, 182, 0.16) 0 30px, transparent 31px),
    linear-gradient(180deg, #fff8ef 0%, #ffffff 62%, #fff1e8 100%);
  color: var(--text-primary);
}

button {
  border-radius: 999px;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:active {
  transform: translateY(1px) scale(0.98);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.95), rgba(248, 250, 252, 0.96)),
    var(--warm-background);
  box-shadow: 0 20px 56px rgba(36, 48, 68, 0.22);
}

.topbar {
  position: relative;
  z-index: 5;
  padding: 14px 14px 16px;
  border: 0;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  background:
    url("/prototype/assets/decorations/sparkle-small.png") right 22px top 16px / 22px 22px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 231, 0.96) 48%, rgba(232, 247, 255, 0.96));
  box-shadow: var(--soft-shadow);
}

.brand-lockup {
  gap: 10px;
}

.brand-lockup .brand-mark {
  width: clamp(72px, 21vw, 92px);
  max-height: 58px;
  filter: drop-shadow(0 5px 8px rgba(36, 48, 68, 0.12));
}

.brand-lockup h1 {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 950;
}

.header-microcopy {
  margin: 3px 0 0;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.eyebrow,
.step-label {
  color: var(--feature-accent);
  font-size: 0.72rem;
  font-weight: 950;
}

.toolbar {
  max-width: 168px;
}

.icon-button,
.user-chip {
  border: 2px solid var(--sticker-line);
  background: #ffffff;
  box-shadow: 0 5px 12px rgba(36, 48, 68, 0.1);
}

main {
  background:
    url("/prototype/assets/decorations/sparkle-medium.png") left 12px top 42px / 18px 18px no-repeat,
    transparent;
  padding-bottom: 104px;
}

.screen {
  padding: 16px 16px 18px;
}

h2 {
  color: var(--text-primary);
  font-weight: 950;
}

.copy,
.objective-meta,
.route-step,
.result-detail,
.store-card-meta,
.store-card-status,
.recipe-card-main small,
.ingredient-row small,
.trophy-card small {
  color: var(--text-secondary);
}

.shelf-card,
.feature-tile,
.store-card,
.recipe-card,
.recipe-detail-card,
.trophy-card,
.trophy-feature-card,
.camera-panel,
.objective-panel,
.result-panel,
.route-panel,
.empty-list,
.product-card,
.variant-chip,
.recipe-empty-card {
  border: 3px solid var(--sticker-line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68)),
    var(--card);
  box-shadow: var(--sticker-shadow);
}

.store-status-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.store-status-strip span {
  min-height: 40px;
  border: 2px solid var(--sticker-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-dark);
  box-shadow: 0 6px 14px rgba(36, 48, 68, 0.09);
}

.store-status-strip img {
  width: 21px;
  height: 21px;
}

.history-strip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 16px rgba(36, 48, 68, 0.08);
}

.store-welcome-card,
.quest-teaser-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  overflow: hidden;
}

.store-welcome-card {
  background:
    url("/prototype/assets/decorations/star-gold.png") right 12px top 12px / 24px 24px no-repeat,
    linear-gradient(135deg, #ffffff 0%, #fff8e7 54%, #eafbe9 100%);
}

.brand-studio-modules {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-studio-modules[hidden] {
  display: none;
}

.brand-studio-module-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--brand-border, var(--line));
  border-radius: 8px;
  background: var(--brand-surface, #ffffff);
  box-shadow: 0 4px 10px rgba(23, 32, 27, 0.06);
}

.brand-studio-module-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand-studio-module-card strong {
  display: block;
  color: var(--brand-primary-pressed, var(--green-dark));
  overflow-wrap: break-word;
}

.brand-studio-module-card small {
  display: block;
  margin-top: 3px;
  color: var(--brand-text-secondary, var(--muted));
  line-height: 1.3;
}

.quest-teaser-card {
  background:
    url("/prototype/assets/decorations/sparkle-small.png") right 16px top 16px / 22px 22px no-repeat,
    linear-gradient(135deg, #fff7d6 0%, #fff 48%, #fff1e8 100%);
}

.store-welcome-card > img,
.quest-teaser-card > img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(36, 48, 68, 0.14));
}

.store-welcome-card h2,
.quest-teaser-card h2 {
  margin-bottom: 5px;
  font-size: 1.18rem;
}

.store-welcome-card p,
.quest-teaser-card p,
.safety-shield-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.38;
}

.store-badge,
.reward-badge,
.aisle-badge,
.you-are-here-badge,
.next-stop-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--yellow-reward);
  color: #6b3f00;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.11);
}

.primary-button,
.secondary-button,
.success-button,
.warning-soft-button,
.blue-family-button,
.yellow-reward-button {
  min-height: 50px;
  border: 2px solid var(--sticker-line);
  box-shadow: 0 8px 16px rgba(36, 48, 68, 0.14);
  font-weight: 950;
}

.primary-button,
.primary-quest-button,
.success-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 48%),
    linear-gradient(180deg, var(--green-primary), var(--green-dark));
  color: #ffffff;
}

.secondary-button {
  background:
    linear-gradient(180deg, #ffffff, #f5fbff);
  color: var(--text-primary);
}

.blue-family-button {
  background: linear-gradient(180deg, #58bdff, var(--blue-primary));
  color: #ffffff;
}

.yellow-reward-button {
  background: linear-gradient(180deg, #ffe08a, var(--yellow-reward));
  color: #6b3f00;
}

.warning-soft-button,
.secondary-button.danger-button {
  border-color: rgba(255, 90, 82, 0.35);
  background: #fff0ef;
  color: var(--coral-warning);
}

.home-primary-actions {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
}

.item-composer {
  border: 3px solid var(--sticker-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.item-composer input {
  border-radius: 24px 0 0 24px;
  font-weight: 800;
}

.icon-submit {
  border-radius: 18px;
  margin: 5px;
  min-height: 42px;
  width: 42px;
  background: linear-gradient(180deg, #58bdff, var(--blue-primary));
  box-shadow: 0 6px 12px rgba(30, 154, 240, 0.24);
}

.feature-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.feature-tile {
  min-height: 84px;
  padding: 8px 4px;
  background: linear-gradient(180deg, #ffffff, #fff8e7);
  color: var(--green-dark);
  font-size: 0.72rem;
}

.feature-tile img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 5px 8px rgba(36, 48, 68, 0.12));
}

.shopping-list-card {
  padding: 14px;
  background:
    url("/prototype/assets/decorations/sparkle-small.png") right 14px top 18px / 20px 20px no-repeat,
    linear-gradient(180deg, #ffffff, #fffdf8);
}

.list-tools {
  grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
}

.list-tools select,
.field-row input,
.field-row select,
.recipe-controls input,
.custom-map-action select {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 850;
}

.shopping-items {
  gap: 10px;
}

.shopping-item {
  grid-template-columns: 30px 46px 52px minmax(0, 1fr) 44px 38px;
  gap: 8px;
  min-height: 72px;
  padding: 9px 8px;
  border: 2px solid rgba(229, 231, 235, 0.75);
  border-radius: 20px;
  background: #fff8e7;
  box-shadow: 0 7px 14px rgba(36, 48, 68, 0.08);
}

.shopping-item-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 14px;
  background: #ffffff;
  color: var(--brand-text-primary);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.1);
  overflow: hidden;
  position: relative;
}

.shopping-item-icon.has-image img {
  background: #ffffff;
  height: 100%;
  inset: 0;
  object-fit: contain;
  opacity: 0;
  padding: 3px;
  position: absolute;
  transition: opacity 0.15s ease;
  width: 100%;
}

.shopping-item-icon.has-image.is-image-loaded img {
  opacity: 1;
}

.shopping-item-icon.has-image.is-image-loaded span {
  visibility: hidden;
}

.shopping-item-icon.default {
  background: linear-gradient(180deg, #ffffff, #f7f5f2);
}

.shopping-item-icon.ready {
  background: linear-gradient(180deg, #ffffff, #eef7f1);
  color: var(--brand-secondary);
}

.shopping-item-icon.fresh {
  background: linear-gradient(180deg, #ffffff, #f3f8e9);
  color: #586b1c;
}

.shopping-item-icon.recipe {
  background: linear-gradient(180deg, #ffffff, #fff6e4);
  color: #8a4a00;
}

.shopping-item-icon.scanned {
  background: linear-gradient(180deg, #ffffff, #eef3fb);
  color: #24527a;
}

.shopping-item.checked {
  background: #eefbea;
}

.item-check,
.item-icon-button {
  border: 2px solid #ffffff;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.08);
}

.item-check {
  background: linear-gradient(180deg, #dff9d8, #bdf4c5);
  color: var(--green-dark);
}

.item-icon-button {
  font-size: 0.68rem;
}

.item-name {
  color: var(--text-primary);
  font-size: 0.97rem;
}

.item-chip {
  background: #ffffff;
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px rgba(229, 231, 235, 0.8);
}

.item-chip.ready {
  background: #dcfce7;
  color: var(--green-dark);
}

.item-chip.source,
.item-chip.brand {
  background: #dbeafe;
  color: #1d4ed8;
}

.item-chip.pending {
  background: #fff3c4;
  color: #9a5b00;
}

.action-footer {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-footer .secondary-button:last-child {
  grid-column: 1 / -1;
}

.safety-shield-card,
.guardian-note-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  background: linear-gradient(135deg, #eaf7ff, #effff0);
}

.safety-shield-card img,
.guardian-note-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.safety-shield-card strong,
.guardian-note-card span {
  color: var(--green-dark);
  font-weight: 950;
}

.camera-panel {
  min-height: 314px;
  padding: 18px 14px 14px;
  background:
    radial-gradient(circle at 50% 44%, rgba(227, 6, 19, 0.12), transparent 46%),
    linear-gradient(180deg, #ffffff, #fff1e8);
  overflow: hidden;
}

.scan-instruction-pill {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 8px 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: var(--soft-shadow);
}

.camera-frame {
  height: 210px;
  border: 3px solid #ffffff;
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(90deg, rgba(227, 6, 19, 0.1) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(0deg, rgba(227, 6, 19, 0.1) 0 2px, transparent 2px 28px),
    #fff1e8;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.16);
}

.camera-frame::before {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 24px;
  background:
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) left top / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) left top / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) right top / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) right top / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) left bottom / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) left bottom / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) right bottom / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame, var(--green-primary)), var(--scanner-frame, var(--green-primary))) right bottom / 5px 54px no-repeat;
  filter: drop-shadow(0 0 10px rgba(227, 6, 19, 0.28));
}

.camera-frame span {
  inset: 56px 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(227, 6, 19, 0.1);
  animation: scanPulse 1.8s ease-in-out infinite;
}

.camera-panel .panel-icon {
  width: 46px;
  height: 46px;
}

.scan-guide-mascot {
  right: 12px;
  bottom: 54px;
  width: 42px;
  height: 42px;
  opacity: 0.78;
  animation: none;
}

.camera-panel p {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  color: var(--green-dark);
  font-weight: 850;
  text-align: center;
}

.scan-safety-card {
  margin-top: 14px;
}

.objective-panel {
  background:
    url("/prototype/assets/decorations/star-gold.png") right 12px top 12px / 26px 26px no-repeat,
    linear-gradient(135deg, #fff8ef, #ffffff 55%, #fff1e8);
}

.objective-hero {
  align-items: center;
}

.quest-clue-hero {
  justify-content: space-between;
}

.objective-title {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 950;
}

.objective-asset {
  width: 86px;
  height: 86px;
  filter: drop-shadow(0 8px 12px rgba(36, 48, 68, 0.14));
}

.quest-progress-chip {
  border: 2px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(36, 48, 68, 0.1);
}

.reward-earned {
  border: 2px solid #ffffff;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff4c7, #ffe8a3);
  box-shadow: 0 8px 16px rgba(255, 194, 71, 0.24);
}

.progress-track {
  height: 16px;
  border: 2px solid #ffffff;
  background: #e5e7eb;
  box-shadow: inset 0 2px 4px rgba(36, 48, 68, 0.08);
}

#progressFill {
  background: linear-gradient(90deg, var(--yellow-reward), var(--orange-accent));
}

.result-panel {
  background: linear-gradient(180deg, #ffffff, #f7fff4);
}

.result-hero img {
  width: 76px;
  height: 76px;
  filter: drop-shadow(0 8px 12px rgba(36, 48, 68, 0.13));
}

.product-card {
  padding: 12px;
  background: #ffffff;
}

.product-location-chip {
  border: 2px solid #ffffff;
  background: #dcfce7;
  color: var(--green-dark);
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.08);
}

.recipe-category-row {
  gap: 10px;
}

.recipe-list-context {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #eefbea);
}

.recipe-list-context strong,
.recipe-flow-card strong,
.recipe-added-banner strong {
  display: block;
}

.recipe-list-context span,
.recipe-flow-card span,
.recipe-added-banner span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.recipe-category-pill {
  border: 2px solid #ffffff;
  background: #ffffff;
  color: var(--feature-accent);
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.08);
}

.recipe-category-pill.selected {
  background: linear-gradient(180deg, #e30613, var(--feature-accent));
  border-color: #ffffff;
  color: #ffffff;
}

.recipe-card {
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 88px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #fff8e7);
}

.recipe-card.selected {
  border-color: #ffffff;
  background: linear-gradient(135deg, #fff1e8, #ffffff);
  outline: 3px solid rgba(227, 6, 19, 0.22);
}

.recipe-card-image {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(36, 48, 68, 0.12));
}

.recipe-detail-card {
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fff8e7);
}

.recipe-badge,
.dietary-badge {
  border: 2px solid #ffffff;
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.08);
}

.recipe-meta-grid span {
  border: 2px solid #ffffff;
  border-radius: 16px;
  background: #eefbea;
}

.recipe-mastery-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 2px solid #ffffff;
  border-radius: 18px;
  background: #fff4c7;
  box-shadow: 0 6px 12px rgba(36, 48, 68, 0.08);
}

.recipe-mastery-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.recipe-mastery-card strong,
.recipe-mastery-card span {
  display: block;
}

.recipe-mastery-card span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.recipe-flow-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 2px solid #ffffff;
  border-radius: 18px;
  background: #eefbea;
  box-shadow: 0 6px 12px rgba(36, 48, 68, 0.08);
}

.recipe-flow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-flow-metrics span {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-dark);
  padding: 4px 10px;
}

.ingredient-row {
  border-top: 2px dashed rgba(229, 231, 235, 0.9);
}

.recipe-added-banner {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 2px solid rgba(35, 31, 32, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, #eefbea, #ffffff);
  box-shadow: 0 6px 14px rgba(36, 48, 68, 0.08);
}

.shopping-item.recent-recipe-add {
  border-color: rgba(35, 31, 32, 0.24);
  box-shadow: 0 10px 18px rgba(35, 31, 32, 0.08);
}

.trophy-grid {
  gap: 14px;
}

.trophy-feature-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  background:
    url("/prototype/assets/decorations/sparkle-medium.png") right 14px top 14px / 24px 24px no-repeat,
    linear-gradient(135deg, #fff4c7, #ffffff 52%, #fff1e8);
}

.trophy-feature-card img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 9px 14px rgba(36, 48, 68, 0.16));
}

.trophy-feature-card strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--text-primary);
  font-size: 1.04rem;
  font-weight: 950;
}

.trophy-feature-card p {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.35;
}

.trophy-section {
  display: grid;
  gap: 10px;
}

.trophy-section h3 {
  margin: 2px 0 0;
  color: var(--brand-primary-pressed);
  font-size: 0.92rem;
  font-weight: 950;
}

.activity-summary-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff, #f8f5ef);
}

.activity-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-summary-metrics span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--brand-text-secondary);
  font-size: 0.76rem;
  font-weight: 900;
}

.trophy-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trophy-card {
  grid-template-columns: 60px minmax(0, 1fr);
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #fffdf8);
}

.trophy-tile {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.trophy-card img {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 7px 10px rgba(36, 48, 68, 0.12));
}

.trophy-tile img {
  width: 76px;
  height: 76px;
}

.trophy-card strong {
  color: var(--text-primary);
  font-weight: 950;
}

.trophy-card.locked,
.trophy-feature-card.locked {
  filter: grayscale(0.75);
  opacity: 0.78;
}

.trophy-progress {
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #e5e7eb;
}

.trophy-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow-reward), var(--pink-badge));
}

.sticker-collection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #eaf7ff);
}

.sticker-collection-card strong {
  color: var(--text-primary);
  font-weight: 950;
}

.sticker-collection-row {
  display: flex;
  align-items: center;
}

.sticker-collection-row img,
.sticker-collection-row span {
  width: 44px;
  height: 44px;
  margin-left: -8px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 6px 12px rgba(36, 48, 68, 0.12);
}

.sticker-collection-row img:first-child {
  margin-left: 0;
}

.sticker-collection-row span {
  display: grid;
  place-items: center;
  background: var(--feature-accent);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
}

.route-panel {
  background: linear-gradient(180deg, #ffffff, #fff8e7);
}

.store-map-svg,
.route-mini-map,
.map-svg {
  border: 3px solid #ffffff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 194, 71, 0.22), transparent 12%),
    linear-gradient(#fff2cb 1px, transparent 1px),
    linear-gradient(90deg, #fff2cb 1px, transparent 1px),
    #fff8e7;
  background-size: auto, 24px 24px, 24px 24px, auto;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.54);
}

.store-map-svg rect {
  fill: #fff8e7;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.store-map-edges line,
.map-svg line {
  stroke: rgba(107, 114, 128, 0.38);
  stroke-width: 0.45;
}

.store-map-route,
.route-mini-map polyline {
  stroke: #d84a55;
  stroke-width: 1.1;
  stroke-dasharray: 1.4 5;
  stroke-linecap: round;
  opacity: 0.55;
  /* No drop-shadow filter here: an animated dashed stroke plus a per-frame filter
     recompute over a long path is the main source of route-map jank. */
  filter: none;
  animation: routeFriendlyWalk 12s linear infinite;
}

/* Long shops (many list items → many stops/vertices) drop the marching-ants
   animation and render a static line, so the map never gets laggy at scale. */
.store-map-visual.route-heavy .store-map-route,
.route-mini-map.route-heavy polyline {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .store-map-route,
  .route-mini-map polyline {
    animation: none;
  }
}

.store-map-target circle {
  fill: var(--yellow-reward);
  stroke: #ffffff;
  stroke-width: 1.4;
}

.store-map-target text {
  fill: #6b3f00;
}

.store-map-highlight circle {
  fill: var(--pink-badge);
  stroke: #ffffff;
  stroke-width: 1.4;
}

.route-index {
  background: var(--yellow-reward);
  color: #6b3f00;
  border: 2px solid #ffffff;
  box-shadow: 0 5px 10px rgba(36, 48, 68, 0.1);
}

.route-step {
  border-bottom: 2px dashed rgba(229, 231, 235, 0.9);
}

.custom-map-panel {
  background: linear-gradient(180deg, #ffffff, #eaf7ff);
}

.map-log-entry {
  border-bottom: 2px dashed rgba(229, 231, 235, 0.9);
}

.mapping-suggestions span {
  border: 2px solid #ffffff;
  background: #dcfce7;
}

.parent-bar.shelfquest-bottom-nav {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 12px;
  width: min(456px, calc(100% - 24px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 8px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 32px rgba(36, 48, 68, 0.18);
  transform: translateX(-50%);
}

.parent-bar.shelfquest-bottom-nav button {
  position: relative;
  min-height: 58px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.66rem;
  font-weight: 950;
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav button img {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 4px 6px rgba(36, 48, 68, 0.12));
}

.parent-bar.shelfquest-bottom-nav button.active,
.parent-bar.shelfquest-bottom-nav button.centered {
  background: #fff8e7;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px rgba(227, 6, 19, 0.15), 0 8px 16px rgba(36, 48, 68, 0.08);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  min-height: 68px;
  margin-top: -22px;
  border: 4px solid #ffffff;
  border-radius: 26px;
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button.active,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.centered {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(180deg, var(--green-primary), var(--green-dark));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(227, 6, 19, 0.26);
  outline: 3px solid rgba(255, 194, 71, 0.55);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button img {
  width: 32px;
  height: 32px;
}

body.login-active .parent-bar.shelfquest-bottom-nav {
  display: none;
}

body.login-active #headerMoreButton,
body.login-active .quick-map-button {
  display: none !important;
}

.toast {
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: var(--text-primary);
  box-shadow: 0 14px 26px rgba(36, 48, 68, 0.25);
}

#cameraOverlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(227, 6, 19, 0.24), transparent 32%),
    rgba(18, 24, 38, 0.92);
}

#cameraOverlay .camera-feed,
#cameraOverlay .camera-frame {
  border: 4px solid #ffffff;
  border-radius: 28px;
}

#cameraOverlayCancel {
  border: 3px solid #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

/* ── New World retail skin ───────────────────────────────── */

:root,
:root[data-theme="new-world"] {
  --brand-primary: #e11a2c;
  --brand-primary-pressed: #c81727;
  --brand-secondary: #231f20;
  --brand-secondary-soft: #f0efef;
  --brand-info: #0072ce;
  --brand-background: #f5f3f1;
  --brand-surface: #ffffff;
  --brand-surface-alt: #f3f4f6;
  --brand-text-primary: #231f20;
  --brand-text-secondary: #5e5a5b;
  --brand-border: #d6d2d0;
  --brand-warning: #0072ce;
  --brand-success: #0072ce;
  --brand-danger: #c81727;
  --brand-focus: rgba(0, 114, 206, 0.34);
  --brand-primary-soft: #fff0f1;
  --brand-primary-mist: #ffe3e6;
  --fresh-accent: var(--brand-secondary);
  --fresh-soft: var(--brand-secondary-soft);
  --route-line: var(--brand-primary);
  --scanner-frame: var(--brand-primary);
  --reward-gold: var(--brand-warning);
  --bg: var(--brand-background);
  --surface: var(--brand-surface);
  --ink: var(--brand-text-primary);
  --muted: var(--brand-text-secondary);
  --line: var(--brand-border);
  --green-primary: var(--brand-primary);
  --green-dark: var(--brand-primary-pressed);
  --green: var(--brand-primary);
  --blue-primary: var(--brand-info);
  --blue: var(--brand-info);
  --yellow-reward: var(--brand-warning);
  --orange-accent: var(--brand-primary);
  --coral-warning: var(--brand-danger);
  --feature-accent: var(--brand-primary-pressed);
  --pink-badge: var(--brand-primary);
  --background: var(--brand-background);
  --warm-background: var(--brand-background);
  --card: var(--brand-surface);
  --cream-card: var(--brand-surface-alt);
  --text-primary: var(--brand-text-primary);
  --text-secondary: var(--brand-text-secondary);
  --success: var(--brand-success);
  --border-soft: var(--brand-border);
  --sticker-line: rgba(231, 226, 218, 0.96);
  --shadow: 0 18px 36px rgba(31, 31, 31, 0.13);
  --soft-shadow: 0 10px 24px rgba(31, 31, 31, 0.1);
  --sticker-shadow: 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 26px rgba(31, 31, 31, 0.1);
  font-family: "Nunito", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(249, 178, 51, 0.18) 0 24px, transparent 25px),
    radial-gradient(circle at 92% 10%, rgba(227, 6, 19, 0.1) 0 34px, transparent 35px),
    linear-gradient(180deg, var(--brand-background) 0%, #fffdf9 56%, var(--brand-surface-alt) 100%);
  color: var(--brand-text-primary);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.suggestion-row:focus-visible,
.add-choice-card:focus-visible {
  outline-color: var(--brand-focus);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.96), rgba(255, 255, 255, 0.98)),
    var(--brand-background);
  box-shadow: 0 20px 56px rgba(31, 31, 31, 0.17);
}

.topbar {
  background:
    linear-gradient(90deg, var(--brand-primary) 0 5px, transparent 5px),
    radial-gradient(circle at right 20px top 18px, rgba(35, 31, 32, 0.1) 0 12px, transparent 13px),
    linear-gradient(135deg, var(--brand-surface) 0%, var(--brand-background) 58%, var(--brand-surface-alt) 100%);
  border-bottom: 1px solid var(--brand-border);
}

.brand-lockup .brand-mark {
  filter: drop-shadow(0 5px 8px rgba(31, 31, 31, 0.1));
}

.brand-lockup h1,
h2,
.objective-title,
.item-name,
.store-card-title,
.recipe-card-main strong,
.trophy-card strong,
.trophy-feature-card strong,
.sticker-collection-card strong {
  color: var(--brand-text-primary);
}

.header-microcopy,
.store-status-strip span:nth-child(4),
.product-location-chip,
.map-log-entry strong {
  color: var(--fresh-accent);
}

.eyebrow,
.step-label,
.recipe-controls label,
.freestyle-panel > label,
.hunt-target-field span,
.trophy-section h3,
.variant-panel summary {
  color: var(--brand-primary-pressed);
}

.copy,
.objective-meta,
.route-step,
.result-detail,
.store-card-meta,
.store-card-status,
.recipe-card-main small,
.ingredient-row small,
.trophy-card small,
.product-card-meta,
.custom-map-point-meta {
  color: var(--brand-text-secondary);
}

.shelf-card,
.feature-tile,
.store-card,
.recipe-card,
.recipe-detail-card,
.trophy-card,
.trophy-feature-card,
.camera-panel,
.objective-panel,
.result-panel,
.route-panel,
.empty-list,
.product-card,
.variant-chip,
.recipe-empty-card,
.add-choice-card,
.suggestion-row {
  border-color: var(--brand-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 239, 0.72)),
    var(--brand-surface);
  box-shadow: var(--sticker-shadow);
}

.store-welcome-card {
  background:
    url("/prototype/assets/decorations/star-gold.png") right 12px top 12px / 24px 24px no-repeat,
    linear-gradient(135deg, #ffffff 0%, var(--brand-background) 56%, var(--fresh-soft) 100%);
}

.quest-teaser-card,
.objective-panel,
.route-panel,
.shopping-list-card,
.recipe-detail-card,
.trophy-card,
.recipe-card {
  background:
    url("/prototype/assets/decorations/sparkle-small.png") right 16px top 16px / 20px 20px no-repeat,
    linear-gradient(135deg, #ffffff 0%, var(--brand-background) 58%, var(--brand-surface-alt) 100%);
}

.store-status-strip span,
.history-strip,
.icon-button,
.user-chip {
  border-color: var(--brand-border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-text-primary);
}

.history-strip {
  border-bottom-color: rgba(184, 0, 22, 0.16);
}

.history-strip-greeting,
.history-stat strong {
  color: var(--brand-primary-pressed);
}

.store-badge,
.reward-badge,
.aisle-badge,
.you-are-here-badge,
.next-stop-badge,
.recipe-badge,
.dietary-badge {
  border-color: #ffffff;
  background: var(--brand-primary-mist);
  color: var(--brand-primary-pressed);
}

.primary-button,
.primary-quest-button,
.success-button,
.icon-submit,
.variant-chip-add,
.floating-scan-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(180deg, var(--brand-primary), var(--brand-primary-pressed));
  color: #ffffff;
}

.primary-button:active,
.primary-quest-button:active,
.floating-scan-button:active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    var(--brand-primary-pressed);
}

.secondary-button {
  border-color: rgba(184, 0, 22, 0.32);
  background: linear-gradient(180deg, #ffffff, var(--brand-background));
  color: var(--brand-primary-pressed);
}

.secondary-button.danger-button,
.warning-soft-button,
.icon-button.danger,
.item-icon-button.danger {
  border-color: rgba(184, 0, 22, 0.38);
  background: var(--brand-primary-soft);
  color: var(--brand-danger);
}

.feature-tile,
.add-choice-card span,
.suggestion-row strong {
  color: var(--brand-primary-pressed);
}

.store-card.selected,
.recipe-card.selected,
.role.selected,
.shopping-item.selected {
  border-color: rgba(227, 6, 19, 0.58);
  background:
    linear-gradient(135deg, var(--brand-primary-soft), #ffffff 58%, var(--brand-background));
  outline: 3px solid rgba(227, 6, 19, 0.16);
}

.shopping-item {
  border-color: var(--brand-border);
  background: var(--brand-background);
}

.shopping-item.checked {
  background: var(--fresh-soft);
}

.item-select-wrap input,
.ingredient-row input {
  accent-color: var(--brand-primary);
}

.item-check {
  background: linear-gradient(180deg, #ffffff, var(--fresh-soft));
  color: var(--fresh-accent);
}

.item-chip.ready,
.product-location-chip,
.mapping-suggestions span,
.map-point.high {
  background: var(--fresh-soft);
  color: var(--fresh-accent);
}

.list-route-metrics span,
.shopping-route-badge {
  background: var(--fresh-soft);
  color: var(--fresh-accent);
}

.shopping-route-badge.next,
.item-chip.route-next {
  background: #fff6df;
  color: #6b3f00;
}

.item-chip.route {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
}

.item-chip.source,
.item-chip.brand,
.suggestion-row em,
.recipe-meta-grid span {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
}

.item-chip.pending,
.reward-earned,
.recipe-mastery-card {
  background: #fff6df;
  color: #6b3f00;
}

.camera-panel {
  background:
    radial-gradient(circle at 50% 44%, rgba(227, 6, 19, 0.12), transparent 46%),
    linear-gradient(180deg, #ffffff, var(--brand-surface-alt));
}

.scan-instruction-pill,
.camera-panel p {
  color: var(--brand-primary-pressed);
}

.camera-frame {
  background:
    linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16)),
    repeating-linear-gradient(90deg, rgba(227, 6, 19, 0.12) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(0deg, rgba(227, 6, 19, 0.12) 0 2px, transparent 2px 28px),
    var(--brand-primary-soft);
}

.camera-frame::before {
  background:
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) left top / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) left top / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) right top / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) right top / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) left bottom / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) left bottom / 5px 54px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) right bottom / 54px 5px no-repeat,
    linear-gradient(var(--scanner-frame), var(--scanner-frame)) right bottom / 5px 54px no-repeat;
  filter: drop-shadow(0 0 10px rgba(227, 6, 19, 0.28));
}

.camera-frame span {
  background: rgba(227, 6, 19, 0.1);
}

#cameraOverlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(227, 6, 19, 0.24), transparent 32%),
    rgba(31, 31, 31, 0.92);
}

.progress-track {
  background: #eadfd8;
}

#progressFill,
.trophy-progress span {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-pressed));
}

.reward-earned.mission {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
}

.result-panel {
  background: linear-gradient(180deg, #ffffff, var(--brand-background));
}

.result-panel.is-success {
  background:
    radial-gradient(circle at right 18px top 18px, rgba(35, 31, 32, 0.1) 0 20px, transparent 21px),
    linear-gradient(180deg, #ffffff, var(--brand-background));
}

.result-panel.is-failure {
  background:
    linear-gradient(180deg, #ffffff, var(--brand-surface-alt));
}

.result-state-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
  font-size: 0.76rem;
  font-weight: 950;
}

.result-state-chip.success {
  background: var(--fresh-soft);
  color: var(--fresh-accent);
}

.recipe-category-pill {
  color: var(--brand-primary-pressed);
}

.recipe-category-pill.selected {
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-pressed));
  color: #ffffff;
}

.recipe-card.selected {
  background: linear-gradient(135deg, var(--brand-primary-soft), #ffffff);
  outline-color: rgba(227, 6, 19, 0.22);
}

.trophy-feature-card {
  background:
    url("/prototype/assets/decorations/sparkle-medium.png") right 14px top 14px / 24px 24px no-repeat,
    linear-gradient(135deg, #fff6df, #ffffff 52%, var(--brand-primary-soft));
}

.sticker-collection-card,
.custom-map-panel,
.safety-shield-card,
.guardian-note-card {
  background: linear-gradient(135deg, #ffffff, var(--brand-background) 58%, var(--fresh-soft));
}

.safety-shield-card strong,
.guardian-note-card span {
  color: var(--brand-primary-pressed);
}

.store-map-svg,
.route-mini-map,
.map-svg {
  border-color: #ffffff;
  background:
    radial-gradient(circle at 10% 15%, rgba(249, 178, 51, 0.18), transparent 12%),
    linear-gradient(#fde7de 1px, transparent 1px),
    linear-gradient(90deg, #fde7de 1px, transparent 1px),
    var(--brand-background);
}

.store-map-svg rect {
  fill: var(--brand-background);
  stroke: #ffffff;
}

.store-map-edges line,
.map-svg line {
  stroke: rgba(91, 85, 80, 0.36);
}

.store-map-route,
.route-mini-map polyline,
.store-map path {
  stroke: #d84a55;
}

.store-map-target circle,
.route-index {
  background: var(--brand-primary);
  fill: var(--brand-primary);
  color: #ffffff;
  stroke: #ffffff;
}

.store-map-target text {
  fill: #ffffff;
}

.store-map-target.upcoming circle {
  fill: #ffffff;
  stroke: var(--brand-primary);
}

.store-map-target.upcoming text {
  fill: var(--brand-primary-pressed);
}

.store-map-target.completed circle {
  fill: #ffffff;
  stroke: var(--fresh-accent);
}

.store-map-target.completed text {
  fill: var(--fresh-accent);
}

.store-map-highlight circle,
.store-map-highlight.product circle {
  fill: var(--brand-warning);
  stroke: #ffffff;
}

.store-map-highlight.scan circle {
  fill: #ffffff;
  stroke: var(--fresh-accent);
}

.store-map-highlight.scan text {
  fill: var(--fresh-accent);
}

.store-map-highlight text {
  font-size: 3px;
  font-weight: 950;
  text-anchor: middle;
  pointer-events: none;
}

.store-map-node.grocery,
.map-node {
  fill: #7c6f67;
  background: #7c6f67;
}

.store-map-node.produce,
.map-node.entrance,
.map-point.high {
  fill: var(--fresh-accent);
  background: var(--fresh-accent);
}

.store-map-node.dairy {
  fill: #8b6f62;
}

.store-map-node.bakery,
.map-node.clue,
.map-point.medium {
  fill: var(--brand-warning);
  background: var(--brand-warning);
}

.store-map-node.restricted,
.map-point.selected {
  fill: var(--brand-danger);
}

.route-mini-map circle {
  fill: var(--brand-primary);
}

.parent-bar.shelfquest-bottom-nav {
  border-color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 248, 239, 0.96);
}

.parent-bar.shelfquest-bottom-nav button {
  color: var(--brand-text-primary);
}

.parent-bar.shelfquest-bottom-nav button.active,
.parent-bar.shelfquest-bottom-nav button.centered {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
  box-shadow: inset 0 0 0 2px rgba(227, 6, 19, 0.15), 0 8px 16px rgba(31, 31, 31, 0.08);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  background: transparent;
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button.active,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.centered {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 44%),
    linear-gradient(180deg, var(--brand-primary), var(--brand-primary-pressed));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(227, 6, 19, 0.26);
  outline-color: rgba(249, 178, 51, 0.72);
}

body.high-contrast {
  --brand-primary: #b80016;
  --brand-primary-pressed: #8f0011;
  --brand-secondary: #231f20;
  --brand-secondary-soft: #ffffff;
  --brand-background: #ffffff;
  --brand-surface: #ffffff;
  --brand-surface-alt: #ffffff;
  --brand-text-primary: #050505;
  --brand-text-secondary: #222222;
  --brand-border: #111111;
  --brand-warning: #8a5400;
  --brand-success: #0068a8;
  --brand-danger: #8f0011;
  --shadow: none;
}

@keyframes scanPulse {
  0%,
  100% {
    transform: scale(0.78);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.12;
  }
}

@keyframes mascotWiggle {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-3px);
  }
}

@keyframes routeFriendlyWalk {
  to {
    stroke-dashoffset: -12;
  }
}

.install-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 calc(14px + env(safe-area-inset-bottom, 0px));
  padding: 12px;
}

.install-card[hidden] {
  display: none;
}

.install-card > img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.install-card-copy {
  min-width: 0;
}

.install-card-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-text-primary);
  font-weight: 950;
  line-height: 1.18;
}

.install-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.58fr);
  gap: 8px;
  margin-top: 10px;
}

.install-actions .secondary-button,
.install-actions .primary-button {
  margin-top: 0;
  min-height: 46px;
  padding-inline: 10px;
  line-height: 1.12;
}

.install-greeting-card {
  width: min(100%, 420px);
  margin: 0;
  border-radius: 14px 14px 8px 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.shopping-item {
  grid-template-columns: 30px 46px minmax(0, 1fr);
  grid-template-areas:
    "select icon main"
    "select icon actions";
  align-items: center;
  gap: 8px 10px;
}

.item-select-wrap {
  grid-area: select;
}

.shopping-item-icon {
  grid-area: icon;
}

.item-main {
  grid-area: main;
  min-width: 0;
}

.item-name,
.product-card-name,
.product-card-meta,
.result-detail,
.objective-meta,
.route-step {
  overflow-wrap: break-word;
  word-break: normal;
}

.item-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: minmax(74px, 1fr) 54px 44px;
  gap: 8px;
  min-width: 0;
}

.item-actions .item-check,
.item-actions .item-icon-button {
  min-width: 0;
  margin: 0;
}

.scan-choice-actions {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.scan-choice-button,
.action-button span,
.parent-bar.shelfquest-bottom-nav button span,
.brand-lockup h1 {
  overflow-wrap: normal;
  word-break: normal;
}

.store-map-visual {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #fff8e7;
}

.store-map-visual.has-art {
  aspect-ratio: var(--store-map-aspect-ratio, 1747.44 / 1928.88);
  border: 3px solid #ffffff;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.54), var(--soft-shadow);
}

.store-map-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  filter: grayscale(1) contrast(1.02);
}

.store-map-visual .store-map-svg {
  display: block;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.store-map-visual.floor-layer {
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: 12px;
}

.store-map-visual.floor-layer .store-map-svg {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.store-map-visual.has-art .store-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: 1;
}

.store-map-visual.has-art .store-map-svg rect,
.store-map-visual.has-art .store-map-edges {
  display: none;
}

.store-map-visual.has-art .store-map-route {
  stroke: #d84a55;
  stroke-width: 0.525;
  filter: none;
}

.store-map-visual.has-art .store-map-node {
  opacity: 0;
}

.store-map-visual.has-art .store-map-target circle,
.store-map-visual.has-art .store-map-highlight circle {
  stroke-width: 1.55;
  filter: drop-shadow(0 1px 2px rgba(31, 31, 31, 0.28));
}

.store-map-visual.has-art .store-map-highlight.product circle {
  stroke-width: 1;
}

.store-map-visual.has-art .store-map-target.active circle {
  stroke-width: 2.2;
  filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 2px 3px rgba(31, 31, 31, 0.34));
}

.shopper-map {
  display: grid;
  gap: 10px;
}

.floor-plan-truth-note {
  margin: 0;
  color: var(--brand-text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
}

.floor-plan-truth-note.verified {
  color: var(--brand-text-primary);
  border-color: var(--brand-text-primary);
}

.shopper-map-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.shopper-map-key span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.map-key-marker {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--brand-primary);
  box-shadow: 0 1px 3px rgba(31, 31, 31, 0.2);
  color: #ffffff;
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1;
}

.map-key-marker.current {
  width: 32px;
  background: #0072ce;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.map-key-line {
  width: 28px;
  border-top: 4px solid var(--brand-primary);
  border-radius: 999px;
}

.store-map-visual.has-art .store-map-highlight.scan circle {
  fill: #ffffff;
  stroke: var(--brand-secondary);
}

@media (min-width: 430px) {
  .shopping-item {
    grid-template-columns: 30px 46px minmax(0, 1fr) minmax(164px, auto);
    grid-template-areas: "select icon main actions";
  }

  .item-actions {
    grid-template-columns: 58px 54px 44px;
  }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }

  .user-chip {
    flex: 1 1 auto;
    max-width: calc(100% - 104px);
  }

  .user-chip-email {
    max-width: 100%;
  }

  .screen {
    padding-inline: 12px;
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-primary-actions {
    grid-template-columns: 1fr;
  }

  .install-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .install-card > img {
    width: 48px;
    height: 48px;
  }

  .install-actions,
  .scan-choice-actions {
    grid-template-columns: 1fr;
  }

  .shopping-item {
    grid-template-columns: 26px 40px minmax(0, 1fr);
    padding-inline: 7px;
  }

  .shopping-item-icon {
    width: 38px;
    height: 38px;
  }

  .item-actions {
    grid-template-columns: minmax(72px, 1fr) 52px 42px;
    gap: 6px;
  }

  .store-welcome-card,
  .quest-teaser-card,
  .trophy-feature-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .trophy-tile-grid {
    grid-template-columns: 1fr;
  }
}

body:not(.login-active):not([data-active-screen="presence"]) .topbar {
  display: none;
}

body:not(.login-active):not([data-active-screen="presence"]) main {
  padding-top: 10px;
}

body:not(.login-active)[data-active-screen="presence"] .topbar {
  order: 2;
  position: relative;
  z-index: 1;
  width: auto;
  margin: 12px 12px calc(110px + env(safe-area-inset-bottom));
  padding: 8px 10px;
  border: 1px solid rgba(43, 156, 229, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 20px rgba(40, 83, 112, 0.12);
}

body:not(.login-active)[data-active-screen="presence"] .app-shell {
  display: flex;
  flex-direction: column;
}

body:not(.login-active)[data-active-screen="presence"] main {
  order: 1;
  padding-top: 10px;
  padding-bottom: 0;
}

body:not(.login-active)[data-active-screen="presence"] .brand-lockup .brand-mark {
  width: clamp(74px, 22vw, 94px);
  max-height: 30px;
}

/* Compact list rows keep item controls in a narrow, predictable right rail. */
.list-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.list-primary-actions .action-button {
  margin: 0;
  min-height: 46px;
}

.shopping-item {
  position: relative;
  grid-template-columns: 26px 42px minmax(0, 1fr) 54px;
  grid-template-areas: "select icon main actions";
  align-items: center;
  gap: 7px;
  padding: 8px;
  overflow: hidden;
  isolation: isolate;
}

.shopping-item > *:not(.shopping-item-map-backdrop) {
  position: relative;
  z-index: 1;
}

.shopping-item-map-backdrop {
  position: absolute;
  inset: 4px 58px 4px 72%;
  overflow: hidden;
  border: 1px solid rgba(35, 31, 32, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0.64;
  pointer-events: none;
  z-index: 0;
}

.shopping-item-map-backdrop img,
.shopping-item-map-backdrop svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shopping-item-map-backdrop img {
  object-fit: fill;
  filter: grayscale(1) contrast(1.04);
}

.shopping-item-map-backdrop svg {
  z-index: 1;
}

.shopping-item-map-halo {
  fill: rgba(227, 6, 19, 0.26);
  stroke: #fff;
  stroke-width: 1.5;
}

.shopping-item-map-point {
  fill: var(--brand-primary);
  stroke: #fff;
  stroke-width: 1.1;
}

.item-main {
  display: grid;
  gap: 6px;
}

.item-detail-trigger {
  appearance: none;
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 3px 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.item-detail-trigger:focus-visible {
  outline: 3px solid rgba(0, 114, 206, 0.34);
  outline-offset: 2px;
}

.item-name,
.shopping-item-summary {
  display: block;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  text-align: center;
}

.shopping-item-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}

.item-name {
  width: 100%;
  line-height: 1.3;
}

.route-step > span:last-child {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  text-align: center;
}

.shopping-item-summary {
  color: var(--brand-text-secondary);
  font-size: 0.76rem;
  line-height: 1.25;
}

.shopping-special-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #fff0f1;
  color: var(--brand-primary-pressed, #a70012);
  line-height: 1.2;
}

.shopping-special-badge strong {
  font-size: 0.76rem;
  font-weight: 950;
}

.shopping-special-badge small {
  color: var(--brand-text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: normal;
}

.item-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-self: stretch;
  gap: 4px;
  width: 54px;
}

.item-actions .item-check,
.item-actions .item-icon-button {
  min-height: 32px;
  padding: 4px 3px;
  font-size: 0.7rem;
  line-height: 1;
}

.shopping-item.unroutable {
  border-color: #c9c9c9;
  background: #f1f1f1;
}

.shopping-item.unroutable .shopping-item-icon {
  filter: grayscale(1);
  opacity: 0.58;
}

.shopping-item.unroutable .shopping-item-summary {
  opacity: 0.68;
}

.find-substitute-button {
  appearance: none;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  overflow: hidden;
  padding: 5px 9px;
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.find-substitute-button[aria-busy="true"] {
  border-style: dashed;
}

.item-mini-map {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: 16px;
  background: #fffaf0;
}

.item-mini-map-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
}

.item-mini-map-heading span,
.item-mini-map.unmapped span {
  color: var(--brand-text-secondary);
  font-size: 0.82rem;
}

.item-mini-map-visual {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 12px;
  background: #edf3f5;
}

.item-mini-map-visual.has-art {
  aspect-ratio: var(--store-map-aspect-ratio, 1747.44 / 1928.88);
}

.item-mini-map-visual img,
.item-mini-map-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.item-mini-map-visual img {
  object-fit: fill;
  filter: grayscale(1) contrast(1.02);
}

.item-mini-map-visual svg {
  z-index: 1;
}

.item-mini-map-halo {
  fill: rgba(227, 6, 19, 0.22);
  stroke: #fff;
  stroke-width: 1.6;
}

.item-mini-map-point {
  fill: var(--brand-primary);
  stroke: #fff;
  stroke-width: 1.2;
}

.camera-preview {
  position: relative;
  width: min(100%, 1000px);
  margin-inline: auto;
}

#cameraOverlay .camera-feed {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #080808;
}

#cameraOverlay .camera-frame {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(72%, 620px);
  height: 38%;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

#cameraOverlay .camera-frame::before {
  inset: 0;
}

#cameraOverlay .camera-frame span {
  display: none;
}

@media (max-width: 390px) {
  .shopping-item {
    grid-template-columns: 24px 38px minmax(0, 1fr) 50px;
  }

  .item-actions {
    grid-template-columns: 1fr;
    width: 50px;
    gap: 3px;
  }

  .list-primary-actions {
    grid-template-columns: 1fr;
  }
}

.store-status-strip button {
  appearance: none;
  border: 1px solid rgba(227, 6, 19, 0.18);
  background: #fff;
  border-radius: 999px;
  color: var(--brand-text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(184, 0, 22, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.store-status-strip button:active,
.feature-tile:active,
.add-choice-card:active,
.quest-template-card:active,
.catalogue-result:active,
.scan-choice-button:active,
.parent-bar.shelfquest-bottom-nav button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 0 rgba(184, 0, 22, 0.12);
}

.list-action-row,
.catalogue-actions,
.expanded-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.expanded-map-actions .compact-button {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.list-action-row {
  margin: 12px 0;
}

.info-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.info-card > img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.plain-steps {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--brand-text-secondary);
  line-height: 1.45;
}

.plain-steps li + li {
  margin-top: 8px;
}

.guardian-ethos-grid,
.quest-template-list {
  display: grid;
  gap: 12px;
}

.quest-settings-card {
  margin-top: 14px;
}

.quest-settings-card summary {
  cursor: pointer;
  font-weight: 900;
}

.quest-template-card {
  width: 100%;
  border: 1px solid rgba(227, 6, 19, 0.16);
  background: linear-gradient(180deg, #fff, #fff8ef);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  color: var(--brand-text-primary);
  box-shadow: 0 5px 0 rgba(184, 0, 22, 0.08);
}

.quest-template-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.quest-template-card strong,
.catalogue-result strong {
  display: block;
  overflow-wrap: break-word;
}

.quest-template-card small,
.catalogue-result small {
  color: var(--brand-text-secondary);
  display: block;
  line-height: 1.35;
  margin-top: 3px;
}

.quest-template-card em {
  background: var(--brand-secondary-soft);
  border-radius: 999px;
  color: var(--brand-secondary);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}

.catalogue-search {
  background: #fff;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 12px;
  box-shadow: 0 4px 0 rgba(184, 0, 22, 0.08);
}

.catalogue-search label {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.catalogue-layout {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.catalogue-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.catalogue-result {
  border: 1px solid rgba(35, 31, 32, 0.18);
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  text-align: left;
  color: var(--brand-text-primary);
  box-shadow: 0 4px 0 rgba(35, 31, 32, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.catalogue-result.selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.catalogue-result:hover {
  border-color: rgba(227, 6, 19, 0.48);
  transform: translateY(-1px);
}

.catalogue-result-copy {
  display: block;
}

.catalogue-product-media {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.catalogue-result-media {
  aspect-ratio: 1;
  width: 100%;
}

.catalogue-product-media img {
  background: #fff;
  height: 100%;
  inset: 0;
  object-fit: contain;
  padding: 8px;
  position: absolute;
  width: 100%;
}

.catalogue-image-placeholder {
  color: var(--brand-text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 12px;
  text-align: center;
}

.catalogue-age-chip {
  background: #fff0f1;
  border-radius: 999px;
  color: var(--brand-primary-pressed);
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 900;
  margin-top: 7px;
  padding: 3px 7px;
}

.product-detail-card {
  min-width: 0;
}

.catalogue-detail-back {
  margin-bottom: 12px;
}

.product-detail-main {
  display: grid;
  gap: 14px;
}

.product-detail-media {
  aspect-ratio: 1;
  margin-inline: auto;
  max-width: 280px;
  width: 100%;
}

.product-detail-media img {
  padding: 16px;
}

.product-detail-copy {
  min-width: 0;
}

.product-detail-brand {
  color: var(--brand-secondary);
  font-size: 0.9rem;
  font-weight: 900;
  margin: -2px 0 8px;
}

.product-detail-card h2 {
  margin: 4px 0 8px;
  overflow-wrap: break-word;
}

.expanded-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.expanded-map-viewport {
  background: #f4efe6;
  border: 2px solid rgba(227, 6, 19, 0.16);
  border-radius: 12px;
  height: min(68vh, 680px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  touch-action: pan-x pan-y;
}

.expanded-map-canvas {
  position: relative;
  min-width: 760px;
  transform-origin: top left;
  transition: transform 0.16s ease;
}

.expanded-map-canvas .store-map-visual {
  min-height: 520px;
}

.store-map-visual.floor-layer {
  background:
    linear-gradient(90deg, rgba(35, 31, 32, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 31, 32, 0.08) 1px, transparent 1px),
    #fffdf8;
  background-size: 24px 24px;
}

.store-map-highlight.current circle {
  fill: #0072ce;
  stroke: #fff;
  stroke-width: 1.4;
}

.store-map-highlight.current text {
  fill: #fff;
  font-size: 2.4px;
  font-weight: 900;
  text-anchor: middle;
}

.freestyle-panel {
  scroll-margin-top: 18px;
}

.parent-bar.shelfquest-bottom-nav {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  scroll-padding-inline: 42%;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.parent-bar.shelfquest-bottom-nav button {
  flex: 0 0 76px;
  min-width: 76px;
  scroll-snap-align: center;
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  flex-basis: 88px;
  min-width: 88px;
}

@media (min-width: 760px) {
  .guardian-ethos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 500px) {
  .product-detail-main {
    align-items: start;
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 430px) {
  .quest-template-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .quest-template-card em {
    grid-column: 2;
    justify-self: start;
  }

}

.current-shop-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 48%, rgba(255, 255, 255, 0.48) 100%),
    url("/prototype/assets/maps/pioneer-new-world-default-map.png") right 46% / auto 150% no-repeat,
    var(--brand-background);
}

.current-shop-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.current-shop-main h2,
.route-now-card h2 {
  margin-bottom: 6px;
}

.current-shop-progress {
  min-width: 74px;
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid rgba(35, 31, 32, 0.18);
  color: var(--fresh-accent);
  text-align: center;
  box-shadow: 0 6px 16px rgba(31, 31, 31, 0.08);
}

.current-shop-progress strong {
  font-size: 1.05rem;
  line-height: 1;
}

.current-shop-progress span {
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
}

.current-shop-progress-track {
  position: relative;
  z-index: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfd8;
}

.current-shop-primary,
.current-shop-secondary {
  position: relative;
  z-index: 1;
}

.shopping-list-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 58%, rgba(255, 255, 255, 0.9) 100%),
    url("/prototype/assets/maps/pioneer-new-world-default-map.png") right top / auto 128% no-repeat,
    var(--brand-surface);
}

.shopping-list-card > * {
  position: relative;
  z-index: 1;
}

.add-item-primary-paths {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.scan-barcode-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px;
  border: 2px solid var(--brand-text-primary);
  border-radius: 14px;
  background: var(--brand-text-primary);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(35, 31, 32, 0.18);
}

.scan-barcode-card img {
  width: 42px;
  height: 42px;
  filter: grayscale(1) brightness(0) invert(1);
}

.scan-barcode-card strong,
.scan-barcode-card small {
  display: block;
}

.scan-barcode-card strong {
  font-size: 1rem;
}

.scan-barcode-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 750;
  line-height: 1.25;
}

.add-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-list-selection {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 2px solid #005fa8;
  border-radius: 12px;
  background: rgba(238, 245, 251, 0.96);
  color: var(--brand-text-primary);
}

.map-list-selection.empty {
  border-color: var(--brand-border);
  background: rgba(255, 255, 255, 0.94);
}

.map-list-selection strong,
.map-list-selection span {
  display: block;
}

.map-list-selection-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expanded-map-canvas .map-list-selection {
  z-index: 3;
}

.store-map-highlight.current,
.store-map-highlight.current * {
  pointer-events: none;
}

.shopping-item.map-selected {
  border-color: #005fa8;
  box-shadow: 0 0 0 3px rgba(0, 95, 168, 0.16);
}

.store-map-target.selected-location .store-map-target-visual circle {
  stroke: #005fa8;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 2px rgba(0, 95, 168, 0.5));
}

.current-shop-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fresh-accent), var(--brand-primary));
}

.current-shop-primary {
  min-height: 54px;
  font-size: 1rem;
}

.current-shop-secondary,
.route-now-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.current-shop-secondary .secondary-button,
.route-now-actions .secondary-button,
.route-now-actions .primary-button {
  margin-top: 0;
  min-height: 48px;
  padding-inline: 10px;
}

.route-now-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(35, 31, 32, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, var(--fresh-soft));
}

.route-now-main {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.route-now-icon {
  width: 58px;
  height: 58px;
  grid-area: auto;
  border-radius: 18px;
  font-size: 0.96rem;
}

.route-now-main > div:last-child {
  min-width: 0;
}

.more-grid {
  display: grid;
  gap: 10px;
}

.more-tile {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: 12px;
  background: #ffffff;
  color: var(--brand-text-primary);
  text-align: left;
  box-shadow: 0 4px 0 rgba(184, 0, 22, 0.08);
}

.more-tile img {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.more-tile span {
  font-weight: 950;
  color: var(--brand-primary-pressed);
}

.more-tile small {
  color: var(--brand-text-secondary);
  line-height: 1.35;
}

.map-improve-details {
  margin-top: 14px;
  padding: 12px;
}

.map-improve-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--brand-primary-pressed);
  cursor: pointer;
  font-weight: 950;
}

.parent-bar.shelfquest-bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  scroll-snap-type: none;
}

.parent-bar.shelfquest-bottom-nav button,
.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  min-width: 0;
  width: 100%;
  flex: initial;
  scroll-snap-align: none;
}

.parent-bar.shelfquest-bottom-nav button span {
  overflow-wrap: normal;
}

@media (max-width: 390px) {
  .current-shop-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .current-shop-progress {
    width: 100%;
    min-height: 54px;
    border-radius: 12px;
  }

  .current-shop-secondary,
  .route-now-actions {
    grid-template-columns: 1fr;
  }

  .more-tile {
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

.pantry-recipe-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.pantry-recipe-card h3,
.quiz-card h3,
.quiz-claim h3 {
  margin: 3px 0 8px;
}

.pantry-recipe-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 7px 10px;
}

.pantry-recipe-form label {
  font-weight: 900;
}

.pantry-recipe-form input {
  min-height: 48px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.pantry-recipe-actions,
.pantry-recipe-results {
  grid-column: 1 / -1;
}

.pantry-recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pantry-recipe-results {
  display: grid;
  gap: 8px;
}

.pantry-suggestion-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 9px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--brand-surface);
  color: inherit;
  text-align: left;
}

.pantry-suggestion-card img {
  width: 64px;
  height: 64px;
  border-radius: 11px;
  object-fit: cover;
}

.pantry-suggestion-card span {
  display: grid;
  gap: 3px;
}

.pantry-suggestion-card small {
  color: var(--brand-text-secondary);
  line-height: 1.35;
}

.route-guidance-status {
  margin: 8px 0 2px;
  color: var(--brand-primary-pressed);
  font-weight: 950;
}

.quiz-body,
.store-quiz-form,
.quiz-review {
  display: grid;
  gap: 12px;
}

.quiz-card,
.quiz-question,
.quiz-review-item,
.quiz-claim {
  padding: 16px;
}

.quiz-offer-card {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--brand-border));
}

.quiz-time {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-pressed);
  font-size: 0.82rem;
  font-weight: 900;
}

.quiz-question {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--brand-border);
}

.quiz-question legend {
  display: flex;
  gap: 9px;
  padding: 0 4px;
  font-weight: 950;
  line-height: 1.35;
}

.quiz-question legend > span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-primary);
  color: white;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  cursor: pointer;
}

.quiz-option:has(input:checked) {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
}

.quiz-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-primary);
}

.quiz-result-card.passed,
.quiz-review-item.correct {
  border-color: var(--brand-success);
}

.quiz-result-card.try-again,
.quiz-review-item.incorrect {
  border-color: var(--brand-warning);
}

.quiz-claim {
  border: 2px solid var(--brand-primary);
  background: linear-gradient(150deg, var(--brand-surface), var(--brand-primary-soft));
}

.quiz-claim-code {
  margin: 14px 0;
  padding: 13px;
  border: 2px dashed var(--brand-primary);
  border-radius: 12px;
  background: var(--brand-surface);
  font-size: clamp(1.25rem, 6vw, 1.8rem);
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-align: center;
}

.quiz-claim-status {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-primary-soft);
}

@media (max-width: 520px) {
  .pantry-recipe-form {
    grid-template-columns: 1fr;
  }

  .pantry-recipe-actions,
  .pantry-recipe-results {
    grid-column: auto;
  }
}

/* Shopper route map: walking paths, entrance truth, and fluid map controls. */
.store-map-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-map-visual.has-art .store-map-route.shopping,
.route-mini-map polyline.shopping {
  stroke: #00843d;
}

.store-map-visual.has-art .store-map-route.checkout.assisted,
.route-mini-map polyline.checkout.assisted {
  stroke: #d6007f;
}

.store-map-visual.has-art .store-map-route.exit.assisted,
.route-mini-map polyline.exit.assisted {
  stroke: #ed66b5;
}

.store-map-visual.has-art .store-map-route.checkout.self-service,
.route-mini-map polyline.checkout.self-service {
  stroke: #0072ce;
}

.store-map-visual.has-art .store-map-route.exit.self-service,
.route-mini-map polyline.exit.self-service {
  stroke: #4a9cdb;
}

.map-key-line.shopping {
  border-color: #00843d;
}

.map-key-line.checkout.assisted {
  border-color: #d6007f;
}

.map-key-line.exit.assisted {
  border-color: #ed66b5;
}

.map-key-line.checkout.self-service {
  border-color: #0072ce;
}

.map-key-line.exit.self-service {
  border-color: #4a9cdb;
}

.store-map-completion circle {
  stroke: #ffffff;
  stroke-width: 1.1;
  filter: drop-shadow(0 1px 2px rgba(31, 31, 31, 0.3));
}

.store-map-completion.checkout.self-service circle {
  fill: #0072ce;
}

.store-map-completion.exit.self-service circle {
  fill: #4a9cdb;
}

.store-map-completion.checkout.assisted circle {
  fill: #d6007f;
}

.store-map-completion.exit.assisted circle {
  fill: #ed66b5;
}

.store-map-completion text {
  fill: #ffffff;
  font-size: 1.45px;
  font-weight: 1000;
  text-anchor: middle;
  pointer-events: none;
}

.store-map-completion.exit text {
  font-size: 1.15px;
}

.store-map-target-spur {
  stroke: #d84a55;
  stroke-width: 0.95;
  stroke-dasharray: 1.5 1.5;
  stroke-linecap: round;
  opacity: 0.88;
}

.store-map-start circle {
  fill: var(--brand-secondary);
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 1px 2px rgba(31, 31, 31, 0.28));
}

.store-map-start[data-map-route-origin] {
  cursor: pointer;
}

.store-map-start:focus-visible circle {
  stroke: #1f1f1f;
}

.map-key-marker.start {
  background: var(--brand-secondary);
}

.expanded-map-viewport {
  position: relative;
  padding: 8px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.expanded-map-viewport.is-dragging {
  cursor: grabbing;
}

.expanded-map-canvas {
  width: 100%;
  min-width: 100%;
  transform: none;
  transform-origin: top left;
}

.expanded-map-viewport.is-dragging .expanded-map-canvas {
  transition: none;
}

.expanded-map-canvas .store-map-visual {
  min-height: 0;
}

.store-map-target.interactive {
  cursor: pointer;
  outline: none;
}

.store-map-target .store-map-target-visual {
  pointer-events: none;
}

.store-map-target .store-map-target-hit {
  fill: transparent !important;
  stroke: transparent !important;
  stroke-width: 0.7 !important;
  filter: none !important;
  pointer-events: all;
  vector-effect: non-scaling-stroke;
}

.store-map-target.interactive:focus-visible .store-map-target-hit {
  fill: rgba(0, 114, 206, 0.12) !important;
  stroke: #0072ce !important;
}

.product-shelf-position {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 12px;
  border: 2px solid var(--brand-primary);
  border-radius: 12px;
  background: var(--brand-primary-soft);
}

.product-shelf-position span,
.product-shelf-position small {
  color: var(--brand-text-secondary);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-shelf-position strong {
  color: var(--brand-text-primary);
  font-size: 1rem;
  line-height: 1.35;
}

.product-neighbourhood {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--nw-line, rgba(35, 31, 32, 0.14));
  border-radius: 12px;
  background: #fff;
}

.product-neighbourhood-title {
  color: var(--brand-text-primary);
  font-size: 0.78rem;
  font-weight: 950;
}

.product-neighbourhood-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(58px, 0.7fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 6px;
  align-items: stretch;
}

.product-neighbour {
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
  background: var(--brand-primary-soft, #fff0f1);
  overflow-wrap: anywhere;
}

.product-neighbour small,
.product-neighbour strong {
  display: block;
}

.product-neighbour small {
  margin-bottom: 3px;
  color: var(--brand-text-secondary);
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-neighbour strong {
  color: var(--brand-text-primary);
  font-size: 0.69rem;
  line-height: 1.25;
}

.product-neighbour.above { grid-column: 2; grid-row: 1; }
.product-neighbour.left { grid-column: 1; grid-row: 2; }
.product-neighbour.current { grid-column: 2; grid-row: 2; background: var(--nw-green-soft, #edf8ef); text-align: center; }
.product-neighbour.right { grid-column: 3; grid-row: 2; }
.product-neighbour.below { grid-column: 2; grid-row: 3; }
.product-neighbour.empty { visibility: hidden; }

.product-neighbourhood > p {
  margin: 0;
  color: var(--brand-text-secondary);
  font-size: 0.68rem;
  line-height: 1.35;
}

.quick-map-button {
  position: fixed;
  top: max(88px, calc(env(safe-area-inset-top) + 70px));
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  /* Sits BELOW the header and each screen's heading nav buttons (which are raised to
     z-index 6 below) so it never blocks navigation, but ABOVE plain card content so it
     stays tappable — scroll a clear area of content under it to click it. */
  z-index: 4;
  display: grid;
  grid-template-columns: 28px auto 22px;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 8px 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand-secondary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(35, 31, 32, 0.24);
  font-weight: 950;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.quick-map-button[hidden] {
  display: none !important;
}

.quick-map-button img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.quick-map-button strong {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-primary-pressed);
  font-size: 0.72rem;
}

.quick-map-button:hover,
.quick-map-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(35, 31, 32, 0.3);
}

.quick-map-button:hover {
  background: #d8d5d2;
  color: #5e5a5b;
  opacity: 0.42;
  box-shadow: none;
}

@media (max-width: 460px) {
  .quick-map-button {
    grid-template-columns: 28px 22px;
  }

  .quick-map-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-map-button {
    transition: none;
  }
}

/* Corporate New World demo: restrained chrome, black structure, red actions, blue information. */
body {
  background: #eceae8;
  color: var(--brand-text-primary);
}

.app-shell {
  background: var(--brand-surface);
  box-shadow: 0 12px 36px rgba(35, 31, 32, 0.14);
}

.topbar {
  min-height: 54px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid var(--brand-border);
  border-radius: 0;
  background: var(--brand-surface);
  box-shadow: none;
}

.brand-lockup {
  gap: 10px;
}

.brand-lockup .eyebrow {
  margin-bottom: 1px;
  color: var(--brand-primary);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.brand-lockup h1 {
  font-size: 0.93rem;
  font-weight: 900;
}

.corporate-wordmark {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  padding: 2px 1px 5px;
  color: var(--brand-text-primary);
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.corporate-wordmark::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--brand-info);
  content: "";
}

.corporate-wordmark strong {
  color: var(--brand-primary);
  font: inherit;
}

.brand-lockup .brand-app-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  object-fit: contain;
}

.login-app-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(35, 31, 32, 0.16);
}

.login-wordmark {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 8vw, 2.2rem);
}

.header-more-button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--brand-text-primary);
  border-radius: 999px;
  background: var(--brand-text-primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

main {
  background: transparent;
}

.screen {
  padding-inline: 14px;
}

.shelf-card,
.feature-tile,
.store-card,
.recipe-card,
.recipe-detail-card,
.trophy-card,
.trophy-feature-card,
.camera-panel,
.objective-panel,
.result-panel,
.route-panel,
.empty-list,
.product-card,
.variant-chip,
.recipe-empty-card,
.add-choice-card,
.suggestion-row,
.more-tile,
.catalogue-search,
.catalogue-result {
  border-color: var(--brand-border);
  border-radius: 12px;
  background: var(--brand-surface);
  box-shadow: 0 3px 10px rgba(35, 31, 32, 0.07);
}

.store-welcome-card,
.quest-teaser-card,
.objective-panel,
.route-panel,
.shopping-list-card,
.recipe-detail-card,
.trophy-card,
.recipe-card,
.current-shop-card {
  background: var(--brand-surface);
}

.catalogue-result,
.more-tile,
.settings-button {
  border: 1px solid rgba(35, 31, 32, 0.32);
}

.catalogue-result:hover,
.catalogue-result:focus-visible,
.more-tile:hover,
.settings-button:hover {
  border-color: var(--brand-text-primary);
  box-shadow: 0 5px 14px rgba(35, 31, 32, 0.12);
}

.account-settings-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.account-settings-card h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.account-settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 62px;
  padding: 9px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-text-primary);
  text-align: left;
}

.settings-button[aria-pressed="true"] {
  border-color: var(--brand-info);
  background: #eef5fb;
  box-shadow: inset 0 0 0 1px var(--brand-info);
}

.settings-button-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-text-primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.settings-button strong,
.settings-button small {
  display: block;
}

.settings-button strong {
  font-size: 0.82rem;
}

.settings-button small {
  margin-top: 2px;
  color: var(--brand-text-secondary);
  font-size: 0.68rem;
  line-height: 1.25;
}

.account-toolbar {
  display: grid;
  max-width: none;
}

.account-toolbar .user-chip {
  width: 100%;
  min-height: 44px;
  justify-content: space-between;
  border: 1px solid var(--brand-text-primary);
  border-radius: 10px;
  box-shadow: none;
}

.catalogue-heading-actions {
  display: grid;
  gap: 7px;
}

.catalogue-results {
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
}

.catalogue-result {
  box-shadow: none;
}

.catalogue-result.selected {
  border-color: var(--brand-text-primary);
  box-shadow: inset 0 0 0 1px var(--brand-text-primary);
}

.catalogue-detail[hidden] {
  display: none !important;
}

.catalogue-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 14px 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(35, 31, 32, 0.62);
  backdrop-filter: blur(3px);
}

.kiosk-only-control {
  display: none;
}

body.kiosk-mode .kiosk-only-control {
  display: inline-flex;
}

body.kiosk-mode .store-status-strip,
body.kiosk-mode #navStoreButton,
body.kiosk-mode #navMoreButton,
body.kiosk-mode #recipeHomeButton {
  display: none !important;
}

body[data-active-screen="welcome"] .parent-bar,
body[data-active-screen="welcome"] .quick-map-button {
  display: none !important;
}

.welcome-screen.active {
  display: grid;
  min-height: calc(100dvh - 132px);
  place-items: center;
  padding-block: clamp(24px, 7vh, 72px);
}

.welcome-card {
  display: grid;
  width: min(100%, 620px);
  justify-items: center;
  gap: 16px;
  padding: clamp(28px, 7vw, 56px) clamp(20px, 7vw, 52px);
  text-align: center;
}

.welcome-logo {
  width: min(72vw, 280px);
  height: auto;
  object-fit: contain;
}

.welcome-card h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.02;
}

.welcome-copy {
  max-width: 48ch;
  margin: 0;
  color: var(--brand-text-muted, #5f5b5c);
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  line-height: 1.55;
}

.welcome-begin-button {
  width: min(100%, 440px);
  min-height: clamp(82px, 18vw, 116px);
  margin-top: 8px;
  padding: 18px 28px;
  border: 0;
  border-radius: 999px;
  background: #d5001c;
  box-shadow: 0 0 0 0 rgba(213, 0, 28, 0.48), 0 16px 30px rgba(134, 0, 18, 0.22);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  animation: welcome-button-pulse 1.8s ease-out infinite;
}

.welcome-begin-button:hover,
.welcome-begin-button:focus-visible {
  background: #b50018;
  outline: 4px solid rgba(213, 0, 28, 0.2);
  outline-offset: 4px;
}

.welcome-sign-in-button {
  width: min(100%, 320px);
}

body.kiosk-mode .welcome-sign-in-button,
body.kiosk-mode .welcome-privacy {
  display: none;
}

.welcome-privacy {
  max-width: 54ch;
  color: var(--brand-text-muted, #6b6768);
  line-height: 1.45;
}

@keyframes welcome-button-pulse {
  0% { box-shadow: 0 0 0 0 rgba(213, 0, 28, 0.48), 0 16px 30px rgba(134, 0, 18, 0.22); }
  70% { box-shadow: 0 0 0 18px rgba(213, 0, 28, 0), 0 16px 30px rgba(134, 0, 18, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(213, 0, 28, 0), 0 16px 30px rgba(134, 0, 18, 0.22); }
}

.kiosk-recipe-map-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
}

.kiosk-recipe-map-summary h3,
.kiosk-recipe-map-summary p {
  margin: 0;
}

.kiosk-recipe-map-summary ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kiosk-recipe-map-summary li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--brand-border, #ddd8d9);
  border-radius: 12px;
  background: #fff;
}

.kiosk-recipe-map-summary li > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.kiosk-recipe-map-summary small {
  overflow-wrap: anywhere;
  color: var(--brand-text-muted, #5f5b5c);
  line-height: 1.35;
}

.kiosk-recipe-map-marker {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #d5001c;
  color: #fff;
  font-weight: 900;
}

.kiosk-recipe-map-unresolved {
  color: #7b5411;
  font-weight: 700;
}

.store-map-highlight.recipe circle {
  fill: #d5001c;
  stroke: #fff;
  stroke-width: 0.7;
  filter: drop-shadow(0 0.8px 1px rgba(35, 31, 32, 0.4));
}

.store-map-highlight.recipe text {
  fill: #fff;
  font-size: 2.1px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

body.kiosk-mode #recipeCookedButton {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-begin-button {
    animation: none;
  }
}

/* This week's specials — bolt-on tile in the search tab that expands to a
   near-fullscreen list reusing the catalogue result rows and product modal. */
.specials-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--brand-border, rgba(35, 31, 32, 0.18));
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.specials-toggle:hover,
.specials-toggle:focus-visible {
  border-color: var(--brand-text-primary, #231f20);
}

.specials-toggle-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--brand-accent, #d5001c);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.specials-toggle-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.specials-toggle-copy small {
  color: var(--brand-text-muted, #6b6b6b);
}

.specials-toggle-chevron {
  font-size: 1.5rem;
  color: var(--brand-text-muted, #6b6b6b);
  transition: transform 0.15s ease;
}

.specials-toggle[aria-expanded="true"] .specials-toggle-chevron {
  transform: rotate(90deg);
}

.specials-panel {
  z-index: 85;
}

.specials-panel[hidden] {
  display: none !important;
}

.specials-panel .product-detail-card {
  width: min(100%, 560px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.specials-panel .product-detail-header,
.specials-search,
.specials-tabs {
  flex: 0 0 auto;
}

.specials-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px 10px;
  scrollbar-width: none;
}

.specials-tabs::-webkit-scrollbar {
  display: none;
}

.specials-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1.5px solid var(--border, #d8d3cd);
  border-radius: 999px;
  background: var(--surface-muted, #f6f4f1);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.specials-tab.is-active {
  background: var(--green, #2c7a4b);
  border-color: var(--green, #2c7a4b);
  color: #fff;
}

.specials-tab-count {
  font-size: 11px;
  opacity: 0.72;
}

.specials-search {
  padding: 0 14px 10px;
}

.specials-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid var(--border, #d8d3cd);
  border-radius: 12px;
  font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  line-height: 1.2;
  background: var(--surface-muted, #f6f4f1);
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.specials-search-input:focus {
  outline: none;
  border-color: var(--green, #2c7a4b);
  box-shadow: 0 0 0 3px rgba(44, 122, 75, 0.15);
}

.catalogue-department-hint {
  border-left: 4px solid var(--green, #2c7a4b);
}

.recipe-specials-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.recipe-specials-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green, #2c7a4b);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.specials-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1 1 auto;
}

.specials-department-section {
  display: grid;
  gap: 9px;
}

.specials-department-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-inline: 2px;
}

.specials-department-heading h3 {
  margin: 0;
  font-size: 0.96rem;
}

.specials-department-heading span {
  display: inline-grid;
  min-width: 26px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #f0efef;
  color: var(--brand-text-secondary);
  font-size: 0.75rem;
  font-weight: 900;
}

.specials-department-items {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 78%);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.specials-result {
  display: block;
  gap: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
  scroll-snap-align: start;
}

.specials-result:hover {
  transform: none;
}

.specials-result.is-added {
  border-color: rgba(35, 126, 73, 0.5);
  box-shadow: 0 0 0 3px rgba(35, 126, 73, 0.1);
}

.specials-result.has-error {
  border-color: rgba(190, 35, 49, 0.58);
}

.specials-result-main {
  appearance: none;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.specials-result-main {
  cursor: pointer;
}

button.specials-result-main:hover {
  background: #fffafa;
}

button.specials-result-main:focus-visible,
.specials-result-actions button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(0, 114, 206, 0.4);
  outline-offset: -3px;
}

.specials-result-main .catalogue-result-media {
  aspect-ratio: 1;
  width: 76px;
}

.specials-result-main .catalogue-result-copy {
  min-width: 0;
}

.specials-result-main .catalogue-result-copy > strong,
.specials-result-main .catalogue-result-copy > small {
  display: block;
}

.specials-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px 10px;
  border-top: 1px solid rgba(35, 31, 32, 0.1);
  background: #fafafa;
}

.specials-result-actions button {
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
}

.specials-add-button:disabled {
  border-color: #237e49;
  background: #237e49;
  color: #fff;
  opacity: 1;
}

.specials-exact-button,
.specials-add-status {
  grid-column: 1 / -1;
}

.specials-add-status:empty {
  display: none;
}

.specials-add-status {
  color: var(--brand-text-secondary);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.3;
}

.specials-add-status.is-success {
  color: #17633a;
}

.specials-add-status.is-error {
  color: #a70012;
}

.specials-price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
  font-weight: 800;
  color: var(--brand-accent, #d5001c);
}

.specials-price small {
  font-weight: 600;
  color: var(--brand-text-muted, #6b6b6b);
}

.catalogue-modal .product-detail-card {
  width: min(100%, 480px);
  max-height: min(88vh, 760px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(35, 31, 32, 0.28);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(35, 31, 32, 0.3);
}

.product-detail-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--brand-border);
  background: rgba(255, 255, 255, 0.97);
}

.product-detail-header .step-label {
  margin: 0;
}

.catalogue-modal-close {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--brand-text-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-text-primary);
  font-size: 1.2rem;
  font-weight: 900;
}

.catalogue-modal .product-detail-main {
  padding: 14px;
}

.product-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.product-detail-fact {
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: #f7f7f7;
}

.product-detail-fact dt {
  margin: 0 0 3px;
  color: var(--brand-text-secondary);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail-fact dd {
  margin: 0;
  color: var(--brand-text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.product-special-panel {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--brand-border);
  border-left: 4px solid var(--brand-text-primary);
  border-radius: 10px;
  background: #f7f7f7;
}

.product-special-panel.is-active {
  border-left-color: var(--brand-primary);
  background: #fff0f1;
}

.product-special-panel strong,
.product-special-panel span,
.product-special-panel small {
  display: block;
}

.product-special-panel small {
  margin-top: 4px;
  color: var(--brand-text-secondary);
}

.catalogue-modal .catalogue-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  padding: 12px 14px;
  border-top: 1px solid var(--brand-border);
  background: rgba(255, 255, 255, 0.98);
}

.catalogue-modal .catalogue-actions button {
  min-height: 48px;
  margin: 0;
}

.catalogue-modal .catalogue-actions .map-stop-complete-control {
  grid-column: 1 / -1;
  min-height: 58px;
}

.catalogue-map-action {
  grid-column: 1 / -1;
}

.engine-only-control {
  display: none !important;
}

body.catalogue-modal-open {
  overflow: hidden;
}

body.map-overlay-open .catalogue-modal {
  z-index: 110;
}

.product-location-chip,
.item-chip.ready,
.mapping-suggestions span,
.map-point.high,
.list-route-metrics span,
.shopping-route-badge,
.result-state-chip.success {
  background: #eef5fb;
  color: #005fa8;
}

.parent-bar.shelfquest-bottom-nav {
  border-color: var(--brand-border);
  background: rgba(255, 255, 255, 0.97);
}

.parent-bar.shelfquest-bottom-nav button.active,
.parent-bar.shelfquest-bottom-nav button.centered {
  background: #f0efef;
  color: var(--brand-text-primary);
  box-shadow: inset 0 0 0 1px rgba(35, 31, 32, 0.18);
}

#historyStrip {
  display: none !important;
}

.store-status-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.store-status-strip img,
.action-button img,
.more-tile img,
.parent-bar.shelfquest-bottom-nav button img,
.info-card > img,
.install-card > img,
.panel-icon,
.scan-guide-mascot,
img[src*="/prototype/assets/icons/"],
img[src*="/prototype/assets/mascots/"],
img[src*="/prototype/assets/badges/"],
img[src*="/prototype/assets/decorations/"] {
  filter: grayscale(1) brightness(0.16);
}

.quick-map-button img,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.active img,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.centered img {
  filter: grayscale(1) brightness(0) invert(1);
}

.quick-map-button {
  top: auto;
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 78px));
  background: var(--brand-text-primary);
}

.catalogue-substitution-notice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--brand-info);
  border-radius: 12px;
  background: #eef5fb;
  color: var(--brand-text-primary);
}

.catalogue-substitution-notice[hidden] {
  display: none !important;
}

.catalogue-substitution-notice > span:last-child {
  display: grid;
  gap: 2px;
}

.catalogue-substitution-notice small {
  color: #005fa8;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalogue-substitution-notice strong {
  font-size: 1rem;
}

.catalogue-substitution-notice span span {
  color: var(--brand-text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.catalogue-substitution-notice .substitution-direction,
.substitute-route-icon {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-info);
  color: #fff;
  font-weight: 950;
}

.catalogue-substitution-notice .substitution-direction {
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
}

.route-now-actions .substitute-route-action {
  min-height: 54px;
  padding-block: 6px;
  border-color: var(--brand-info);
  background: #eef5fb;
  color: var(--brand-text-primary);
}

.substitute-route-action > span:last-child {
  text-align: left;
}

.substitute-route-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .store-map-route,
  .route-mini-map polyline {
    animation: none;
  }
}

@media (min-width: 560px) {
  .catalogue-modal {
    align-items: center;
  }
}

@media (max-width: 360px) {
  .account-settings-actions,
  .list-primary-actions,
  .product-detail-facts,
  .catalogue-modal .catalogue-actions {
    grid-template-columns: 1fr;
  }

  .catalogue-map-action {
    grid-column: auto;
  }
}

/* Friendly corporate asset-pack default. New World red remains the action
   colour; ShelfQuest blue/green artwork supplies warmth and orientation. */
body {
  background:
    radial-gradient(circle at 12% 4%, rgba(43, 156, 229, 0.12), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(87, 190, 73, 0.11), transparent 26%),
    #f4f6f7;
}

.app-shell {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 62%, #f5f8fa 100%);
  box-shadow: 0 18px 46px rgba(40, 83, 112, 0.15);
}

.topbar {
  border-color: rgba(43, 156, 229, 0.24);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(40, 83, 112, 0.08);
}

.brand-lockup .brand-mark {
  width: clamp(92px, 26vw, 112px);
  height: auto;
  max-height: 34px;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(35, 112, 171, 0.14));
}

.brand-lockup .eyebrow {
  color: #2370ab;
}

.header-more-button {
  border-color: rgba(35, 112, 171, 0.3);
  background: #eef7fd;
  color: #1f5f91;
  box-shadow: none;
}

.login-hero {
  margin: 18px 0 20px;
  padding: 26px 20px 22px;
  border: 1px solid rgba(43, 156, 229, 0.22);
  border-radius: 26px;
  background:
    url("/prototype/assets/decorations/sparkle-small.png") 18px 18px / 24px 24px no-repeat,
    url("/prototype/assets/decorations/sparkle-medium.png") calc(100% - 20px) 22px / 30px 30px no-repeat,
    linear-gradient(145deg, #f4fbff 0%, #ffffff 54%, #f6fff1 100%);
  box-shadow: 0 14px 34px rgba(40, 112, 160, 0.11);
}

.login-logo {
  width: min(238px, 76vw);
  height: auto;
  margin: 0 auto 12px;
  filter: drop-shadow(0 6px 8px rgba(35, 112, 171, 0.12));
}

.login-kicker {
  margin: 0 0 6px;
  color: #2370ab;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-hero h2 {
  color: #263746;
  font-size: clamp(1.5rem, 7vw, 2rem);
}

.login-sub,
.login-privacy {
  color: #587080;
}

body.login-active main {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

body.login-active .topbar {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 560px);
  min-height: 64px;
  margin: 0 auto;
  padding: 9px 14px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(43, 156, 229, 0.25);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -10px 30px rgba(40, 83, 112, 0.12);
}

.primary-button,
.icon-submit {
  border-radius: 15px;
  box-shadow: 0 7px 15px rgba(225, 26, 44, 0.17);
}

.shelf-card,
.feature-tile,
.store-card,
.recipe-card,
.recipe-detail-card,
.trophy-card,
.trophy-feature-card,
.camera-panel,
.objective-panel,
.result-panel,
.route-panel,
.empty-list,
.product-card,
.variant-chip,
.recipe-empty-card,
.add-choice-card,
.suggestion-row,
.more-tile,
.catalogue-search,
.catalogue-result {
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(40, 83, 112, 0.08);
}

.store-status-strip img,
.action-button img,
.more-tile img,
.parent-bar.shelfquest-bottom-nav button img,
.info-card > img,
.install-card > img,
.panel-icon,
.scan-guide-mascot,
img[src*="/prototype/assets/icons/"],
img[src*="/prototype/assets/mascots/"],
img[src*="/prototype/assets/badges/"],
img[src*="/prototype/assets/decorations/"],
.quick-map-button img,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.active img,
.parent-bar.shelfquest-bottom-nav .floating-scan-button.centered img {
  filter: drop-shadow(0 3px 5px rgba(40, 83, 112, 0.16));
}

.store-map-art {
  filter: none;
}

.quick-map-button {
  top: max(14px, calc(env(safe-area-inset-top) + 10px));
  right: max(14px, calc((100vw - 560px) / 2 + 14px));
  bottom: auto;
  width: 56px;
  height: 56px;
  padding: 8px;
  border: 2px solid #77c8f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  color: #1f5f91;
  box-shadow: 0 10px 24px rgba(35, 112, 171, 0.22);
}

body[data-active-screen="presence"] .quick-map-button {
  top: max(68px, calc(env(safe-area-inset-top) + 64px));
}

.quick-map-button:hover,
.quick-map-button:focus-visible {
  border-color: #2b9ce5;
  background: #f3fbff;
  transform: translateY(-2px);
}

.quick-map-button img {
  width: 34px;
  height: 34px;
}

.quick-map-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.quick-map-button strong {
  top: -7px;
  right: -7px;
  min-width: 24px;
  height: 24px;
  padding-inline: 5px;
  border: 2px solid #fff;
  background: var(--brand-primary);
  box-shadow: 0 4px 8px rgba(225, 26, 44, 0.2);
}

.quick-map-button strong[hidden] {
  display: none;
}

body.map-overlay-open {
  overflow: hidden;
}

body.map-overlay-open::before {
  position: fixed;
  z-index: 89;
  inset: 0;
  background: rgba(31, 54, 70, 0.34);
  backdrop-filter: blur(3px);
  content: "";
}

#expandedMapStep.map-overlay-active {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  overflow: hidden;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.expanded-map-header {
  align-items: center;
  margin: 0;
  padding: 0 2px;
}

.expanded-map-header h2 {
  margin: 1px 0 0;
  color: #263746;
  font-size: 1.25rem;
}

.expanded-map-dismiss {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(35, 112, 171, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #35566c;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 5px 13px rgba(40, 83, 112, 0.12);
}

.expanded-map-viewport {
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  touch-action: none;
}

.expanded-map-canvas {
  min-width: 100%;
  max-width: none;
}

body.map-overlay-open .quick-map-button {
  display: none;
}

body:not(.login-active)[data-active-screen="presence"] main {
  padding-top: 10px;
  padding-bottom: calc(176px + env(safe-area-inset-bottom));
}

body:not(.login-active):not([data-active-screen]) main {
  padding-top: 10px;
  padding-bottom: calc(176px + env(safe-area-inset-bottom));
}

body:not(.login-active)[data-active-screen="presence"] .topbar {
  position: fixed;
  z-index: 72;
  left: 50%;
  right: auto;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 86px));
  width: min(456px, calc(100% - 24px));
  min-height: 58px;
  margin: 0;
  padding: 8px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(43, 156, 229, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(40, 83, 112, 0.14);
}

body:not(.login-active):not([data-active-screen]) .topbar {
  position: fixed;
  z-index: 72;
  left: 50%;
  right: auto;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 86px));
  width: min(456px, calc(100% - 24px));
  min-height: 58px;
  margin: 0;
  padding: 8px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(43, 156, 229, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(40, 83, 112, 0.14);
}

body:not(.login-active)[data-active-screen="presence"] .brand-lockup {
  gap: 8px;
}

body:not(.login-active)[data-active-screen="presence"] .brand-lockup .brand-mark {
  width: clamp(76px, 22vw, 96px);
  max-height: 30px;
}

body:not(.login-active)[data-active-screen="presence"] .brand-lockup .eyebrow {
  margin-bottom: 2px;
  font-size: 0.64rem;
}

body:not(.login-active)[data-active-screen="presence"] .brand-lockup h1 {
  font-size: 0.95rem;
}

body:not(.login-active)[data-active-screen="presence"] .header-more-button {
  min-height: 38px;
  padding: 6px 10px;
}

.quick-map-button,
body[data-active-screen="presence"] .quick-map-button {
  top: auto;
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 78px));
}

body[data-active-screen="presence"] .quick-map-button {
  bottom: max(190px, calc(env(safe-area-inset-bottom) + 182px));
}

.brand-studio-modules {
  display: none !important;
}

@media (max-width: 390px) {
  body.login-active .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #expandedMapStep.map-overlay-active {
    padding: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  }
}

/* New World shopper home refresh */
:root {
  --nw-red: #e31b2f;
  --nw-red-dark: #b80016;
  --nw-green: #18864b;
  --nw-mint: #eef8f4;
  --nw-lilac: #f5eefb;
  --nw-peach: #fff3ec;
  --nw-ink: #161616;
  --nw-muted: #5f6067;
  --nw-line: #ececef;
  --nw-shadow: 0 10px 28px rgba(30, 30, 30, 0.09);
}

body {
  background: #f7f7f8;
}

.app-shell {
  width: min(100%, 430px);
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 20, 20, 0.13);
}

body:not(.login-active) .topbar,
body:not(.login-active)[data-active-screen="presence"] .topbar,
body:not(.login-active):not([data-active-screen]) .topbar {
  position: sticky;
  top: 0;
  bottom: auto;
  left: auto;
  z-index: 80;
  width: 100%;
  min-height: 76px;
  padding: 16px 22px 10px;
  transform: none;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

body:not(.login-active) .brand-lockup .brand-mark,
body:not(.login-active)[data-active-screen="presence"] .brand-lockup .brand-mark {
  width: 128px;
  max-height: 46px;
  object-fit: contain;
  object-position: left center;
}

body:not(.login-active) .brand-lockup .eyebrow,
body:not(.login-active)[data-active-screen="presence"] .brand-lockup .eyebrow {
  color: var(--nw-red);
  font-size: 0.62rem;
  font-weight: 950;
}

body:not(.login-active) .brand-lockup h1,
body:not(.login-active)[data-active-screen="presence"] .brand-lockup h1 {
  color: var(--nw-ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.header-more-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--nw-red);
  font-size: 0.74rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px var(--nw-line);
}

.header-more-button::before {
  position: absolute;
  inset: 9px 11px 10px;
  border: 2px solid var(--nw-ink);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  content: "";
}

.header-more-button::after {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--nw-red);
  content: "";
}

body:not(.login-active) main,
body:not(.login-active)[data-active-screen="presence"] main,
body:not(.login-active):not([data-active-screen]) main {
  padding: 0 20px calc(92px + env(safe-area-inset-bottom));
  background: #fff;
}

#presenceStep.screen {
  padding: 0 0 18px;
}

.home-greeting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.home-greeting-row h2 {
  margin: 0 0 4px;
  color: var(--nw-ink);
  font-size: 1.42rem;
  line-height: 1.05;
  font-weight: 950;
}

.home-greeting-row p {
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.store-status-strip {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.store-status-strip button {
  min-height: 38px;
  max-width: 158px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-ink);
  font-size: 0.68rem;
  font-weight: 950;
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.05);
}

.store-status-strip button + button {
  display: none;
}

.store-status-strip img {
  width: 14px;
  height: 14px;
}

.fresh-hero {
  position: relative;
  min-height: 210px;
  display: grid;
  align-content: end;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px 18px 16px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10, 34, 25, 0.96), rgba(10, 34, 25, 0.7) 45%, rgba(10, 34, 25, 0.2)),
    radial-gradient(circle at 78% 28%, #f03737 0 8px, transparent 9px),
    radial-gradient(circle at 88% 36%, #ca1a22 0 12px, transparent 13px),
    radial-gradient(circle at 70% 56%, #e73a2d 0 14px, transparent 15px),
    radial-gradient(circle at 82% 68%, #b9151c 0 10px, transparent 11px),
    radial-gradient(circle at 60% 38%, #78b84f 0 28px, transparent 30px),
    linear-gradient(135deg, #1f5c36 0%, #203a25 56%, #65311d 100%);
  color: #fff;
  box-shadow: var(--nw-shadow);
}

.fresh-hero::before {
  position: absolute;
  right: -24px;
  bottom: 44px;
  width: 188px;
  height: 76px;
  border: 13px solid rgba(128, 70, 33, 0.82);
  border-top: 0;
  border-radius: 0 0 28px 28px;
  transform: rotate(-8deg);
  content: "";
}

.fresh-hero::after {
  position: absolute;
  right: 52px;
  bottom: 74px;
  width: 118px;
  height: 80px;
  border-radius: 28px 28px 16px 16px;
  background:
    radial-gradient(circle at 24% 30%, #dd202a 0 12px, transparent 13px),
    radial-gradient(circle at 48% 24%, #f14a3a 0 11px, transparent 12px),
    radial-gradient(circle at 70% 38%, #c3121d 0 13px, transparent 14px),
    radial-gradient(circle at 44% 66%, #e7382c 0 14px, transparent 15px),
    radial-gradient(circle at 72% 70%, #a80f17 0 10px, transparent 11px),
    linear-gradient(120deg, #21834d, #63a843);
  filter: saturate(1.08);
  content: "";
}

.fresh-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 210px;
}

.fresh-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 1.62rem;
  line-height: 1.02;
  font-weight: 950;
}

.fresh-hero-copy span {
  display: block;
  width: 48px;
  height: 3px;
  margin: 12px 0;
  border-radius: 999px;
  background: var(--nw-red);
}

.fresh-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 800;
}

.fresh-hero-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  max-width: 74px;
  color: #fff;
  font-size: 0.68rem;
  font-style: italic;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.hero-offer-row {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.hero-offer-card {
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px;
  border-radius: 8px;
  background: #fff;
  color: var(--nw-ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.hero-offer-card img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.hero-offer-card strong,
.hero-offer-card small {
  display: block;
  line-height: 1.05;
}

.hero-offer-card strong {
  font-size: 0.58rem;
  font-weight: 950;
}

.hero-offer-card small {
  margin-top: 5px;
  color: var(--nw-red);
  font-size: 0.5rem;
  font-weight: 950;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.home-feature-card {
  position: relative;
  min-height: 156px;
  display: grid;
  align-content: start;
  justify-items: start;
  overflow: hidden;
  padding: 15px 13px;
  border: 0;
  border-radius: 8px;
  color: var(--nw-ink);
  text-align: left;
  box-shadow: var(--nw-shadow);
}

.home-feature-card strong {
  max-width: 122px;
  margin-top: 10px;
  color: var(--nw-ink);
  font-size: 0.78rem;
  line-height: 1.08;
  font-weight: 950;
}

.home-feature-card small {
  max-width: 112px;
  margin-top: 5px;
  color: #202226;
  font-size: 0.56rem;
  line-height: 1.25;
  font-weight: 760;
}

.home-feature-card img {
  position: absolute;
  right: -10px;
  bottom: -12px;
  width: 78px;
  max-height: 98px;
  object-fit: contain;
}

.home-feature-card.list-card img {
  right: -18px;
  bottom: -14px;
  width: 92px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.15);
}

.home-feature-card.recipe-card-home img {
  width: 88px;
}

.home-feature-card.win-card img {
  width: 84px;
}

.find-card {
  background: #fff0f2;
}

.list-card {
  background: var(--nw-mint);
}

.recipe-card-home {
  background: var(--nw-peach);
}

.win-card {
  background: var(--nw-lilac);
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 20, 0.08);
}

.feature-icon::before {
  color: var(--nw-red);
  font-size: 1.1rem;
  font-weight: 950;
}

.search-icon::before {
  content: "Q";
}

.list-icon::before {
  color: var(--nw-green);
  content: "=";
}

.route-icon::before {
  content: "⌂";
}

.gift-icon::before {
  color: #8a3bbf;
  content: "+";
}

.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 20, 20, 0.05);
}

.home-stat-card {
  min-height: 76px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 0;
  background: #fff;
  color: var(--nw-ink);
  text-align: center;
}

.home-stat-card + .home-stat-card {
  border-left: 1px solid var(--nw-line);
}

.home-stat-card > span {
  color: var(--nw-red);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
}

.home-stat-card strong {
  font-size: 0.58rem;
  line-height: 1.05;
  font-weight: 950;
}

.home-stat-card small {
  color: var(--nw-muted);
  font-size: 0.49rem;
  line-height: 1.12;
  font-weight: 750;
}

body[data-active-screen="presence"] .shopping-list-card,
body[data-active-screen="presence"] .current-shop-card,
body[data-active-screen="presence"] .shop-quick-actions {
  margin-bottom: 14px;
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 20, 20, 0.05);
}

body[data-active-screen="presence"] .current-shop-card {
  padding: 14px;
}

body[data-active-screen="presence"] .list-primary-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-active-screen="presence"] .list-primary-actions .action-button {
  min-height: 48px;
  padding: 8px;
  font-size: 0.66rem;
}

body[data-active-screen="presence"] .quick-map-button {
  display: none;
}

.parent-bar.shelfquest-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 90;
  width: min(386px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 7px 8px 8px;
  transform: translateX(-50%);
  border: 1px solid var(--nw-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 34px rgba(20, 20, 20, 0.14);
}

.parent-bar.shelfquest-bottom-nav button,
.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 10px;
  background: transparent;
  color: #74767e;
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav button img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.parent-bar.shelfquest-bottom-nav button span {
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1;
}

.parent-bar.shelfquest-bottom-nav button.active {
  color: var(--nw-red);
  background: transparent;
}

.parent-bar.shelfquest-bottom-nav button.active img {
  filter: none;
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  position: relative;
  top: -20px;
  min-height: 72px;
  color: var(--nw-red);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button img {
  width: 52px;
  height: 52px;
  padding: 13px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--nw-red);
  filter: brightness(0) invert(1);
  box-shadow: 0 10px 22px rgba(227, 27, 47, 0.32);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button span {
  margin-top: -7px;
}

@media (max-width: 374px) {
  body:not(.login-active) main,
  body:not(.login-active)[data-active-screen="presence"] main,
  body:not(.login-active):not([data-active-screen]) main {
    padding-inline: 14px;
  }

  .home-feature-grid {
    gap: 9px;
  }

  .home-feature-card {
    min-height: 138px;
    padding: 12px 10px;
  }

  .hero-offer-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* New World production UI
   This final layer is intentionally authoritative. It keeps the existing
   application contracts while giving every customer surface one retail system. */
:root {
  --nw-red: var(--brand-primary, #e31837);
  --nw-red-pressed: var(--brand-primary-pressed, #bd0f28);
  --nw-red-soft: color-mix(in srgb, var(--nw-red) 8%, var(--brand-surface, #fff));
  --nw-green: var(--brand-success, #167a45);
  --nw-green-soft: #edf8f2;
  --nw-amber: var(--brand-warning, #d76714);
  --nw-amber-soft: #fff5ec;
  --nw-purple: var(--brand-accent, #7b3fa0);
  --nw-purple-soft: #f6effa;
  --nw-blue: #156a9f;
  --nw-blue-soft: #eef7fb;
  --nw-ink: var(--brand-secondary, #171719);
  --nw-text: var(--brand-text-primary, #303034);
  --nw-muted: var(--brand-text-secondary, #66676d);
  --nw-subtle: #8b8c92;
  --nw-line: var(--brand-border, #e7e7ea);
  --nw-surface: var(--brand-surface, #ffffff);
  --nw-canvas: var(--brand-background, #f6f6f7);
  --nw-shadow-sm: var(--brand-shadow, 0 3px 12px rgba(22, 22, 24, 0.07));
  --nw-shadow-md: var(--brand-shadow, 0 10px 28px rgba(22, 22, 24, 0.1));
  --nw-radius: var(--brand-card-radius, 8px);
  --nw-content: var(--ux-content-max, 390px);
}

* {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--nw-canvas);
  color: var(--nw-text);
}

body {
  min-width: 0;
  margin: 0;
  background: var(--nw-canvas);
  color: var(--nw-text);
  font-family: var(--brand-body-font, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  display: none !important;
}

.app-shell {
  width: min(100%, calc(var(--nw-content) + 40px));
  min-height: 100dvh;
  display: block;
  margin: 0 auto;
  overflow: visible;
  background: var(--nw-surface);
  box-shadow: 0 0 44px rgba(22, 22, 24, 0.12);
}

h1,
h2,
h3,
h4 {
  font-family: var(--brand-heading-font, "Arial Rounded MT Bold", Inter, ui-sans-serif, system-ui, sans-serif);
}

body:not(.login-active) .app-shell,
body:not(.login-active)[data-active-screen="presence"] .app-shell,
body.login-active .app-shell {
  display: block;
  overflow: visible;
  padding-top: 78px;
}

body:not(.login-active) .topbar,
body:not(.login-active)[data-active-screen] .topbar,
body:not(.login-active)[data-active-screen="presence"] .topbar,
body:not(.login-active):not([data-active-screen]) .topbar,
body.login-active .topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 100%;
  max-width: 430px;
  min-height: 78px;
  display: grid;
  order: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 22px 10px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.brand-lockup {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.new-world-mark {
  position: relative;
  width: 38px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 2px solid #151515;
  border-radius: 3px;
  background: var(--nw-red);
  box-shadow: inset 0 0 0 2px #fff;
}

.new-world-mark::before,
.new-world-mark::after {
  position: absolute;
  width: 16px;
  height: 2px;
  background: #fff;
  content: "";
}

.new-world-mark::before {
  top: 6px;
  left: -6px;
}

.new-world-mark::after {
  right: -6px;
  bottom: 6px;
}

.new-world-mark > span {
  transform: rotate(-45deg);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 950;
}

body:not(.login-active) .brand-lockup .eyebrow,
body:not(.login-active)[data-active-screen="presence"] .brand-lockup .eyebrow,
.brand-lockup .eyebrow {
  margin: 0;
  color: var(--nw-red);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
}

body:not(.login-active) .brand-lockup h1,
body:not(.login-active)[data-active-screen="presence"] .brand-lockup h1,
.brand-lockup h1 {
  max-width: 220px;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--nw-ink);
  font-size: 0.54rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-more-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  box-shadow: none;
}

.header-more-button::before {
  position: absolute;
  inset: 11px 12px 9px;
  border: 2px solid var(--nw-ink);
  border-top: 0;
  border-radius: 0 0 9px 9px;
  content: "";
}

.header-more-button::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--nw-red);
  color: #fff;
  content: "3";
  font-size: 0.57rem;
  font-weight: 900;
}

body:not(.login-active) main,
body:not(.login-active)[data-active-screen="presence"] main,
body:not(.login-active):not([data-active-screen]) main,
body.login-active main {
  min-height: calc(100dvh - 78px);
  order: 0;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  background: #fff;
}

.screen {
  padding: 12px 0 24px;
}

.screen > h2,
.screen-heading h2,
.compact-screen-heading h2 {
  margin: 2px 0 7px;
  color: var(--nw-ink);
  font-size: 1.62rem;
  font-weight: 900;
  line-height: 1.08;
}

.screen-heading,
.compact-screen-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin: 0 0 18px;
}

.screen-heading .copy,
.compact-screen-heading .copy,
.screen > .copy {
  max-width: 34rem;
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.step-label {
  margin: 0 0 5px;
  color: var(--nw-red);
  font-size: 0.67rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.objective-title {
  color: var(--nw-ink);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.25;
}

.objective-meta,
.copy {
  color: var(--nw-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(227, 24, 55, 0.22);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.icon-submit,
.compact-button,
.action-button {
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: var(--nw-radius);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  box-shadow: none;
}

.primary-button,
.icon-submit {
  border-color: var(--nw-red);
  background: var(--nw-red);
  color: #fff;
}

.primary-button:hover,
.primary-button:active,
.icon-submit:hover,
.icon-submit:active {
  border-color: var(--nw-red-pressed);
  background: var(--nw-red-pressed);
}

.secondary-button,
.compact-button,
.action-button {
  border-color: #ef9aa7;
  background: #fff;
  color: var(--nw-red);
}

.secondary-button:hover,
.compact-button:hover,
.action-button:hover {
  background: var(--nw-red-soft);
}

.compact-button {
  min-height: 44px;
  padding: 8px 11px;
  font-size: 0.72rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.danger-button,
.icon-button.danger {
  border-color: #e6a9b2;
  background: #fff;
  color: #a6172c;
}

.shelf-card,
.store-card,
.recipe-card,
.recipe-detail-card,
.trophy-card,
.trophy-feature-card,
.camera-panel,
.objective-panel,
.result-panel,
.route-panel,
.empty-list,
.product-card,
.variant-chip,
.recipe-empty-card,
.add-choice-card,
.suggestion-row,
.more-tile,
.catalogue-search,
.catalogue-result,
.info-card {
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d7d7dc;
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-ink);
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #9a9aa0;
}

label {
  color: var(--nw-text);
  font-size: 0.75rem;
  font-weight: 800;
}

#presenceStep.screen {
  padding: 2px 0 20px;
}

.home-greeting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.home-greeting-row h2 {
  margin: 0 0 5px;
  color: var(--nw-ink);
  font-size: 1.34rem;
  font-weight: 900;
  line-height: 1.08;
}

.home-greeting-row p {
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.store-status-strip {
  display: flex;
  margin: 0;
  padding: 0;
}

.store-status-strip button {
  max-width: 158px;
  min-height: 38px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-ink);
  font-size: 0.65rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: var(--nw-shadow-sm);
}

.store-status-strip button + button {
  display: none;
}

.store-status-strip img {
  width: 14px;
  height: 14px;
  filter: grayscale(1) brightness(0.25);
}

.fresh-hero {
  position: relative;
  min-height: 246px;
  display: grid;
  align-content: end;
  margin: 0 0 12px;
  padding: 22px 16px 14px;
  overflow: hidden;
  border: 0;
  border-radius: var(--nw-radius);
  background:
    linear-gradient(90deg, rgba(7, 19, 14, 0.92) 0%, rgba(7, 19, 14, 0.7) 47%, rgba(7, 19, 14, 0.08) 100%),
    url("/prototype/assets/new-world-fresh-produce-hero.jpg") 58% center / cover no-repeat;
  color: #fff;
  box-shadow: var(--nw-shadow-md);
}

/* Sign in */
body.login-active main {
  padding-bottom: 30px;
}

#loginStep {
  min-height: calc(100dvh - 92px);
  display: none;
  align-content: center;
  padding-block: 18px 40px;
}

#loginStep.active {
  display: grid;
}

.login-hero {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.login-logo {
  width: 132px;
  max-height: 46px;
  margin: 0 0 24px;
  object-fit: contain;
  object-position: left;
  filter: none;
}

.login-kicker {
  margin: 0 0 8px;
  color: var(--nw-red);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-hero h2 {
  margin: 0 0 10px;
  color: var(--nw-ink);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.05;
}

.login-sub,
.login-privacy {
  color: var(--nw-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}

.login-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--nw-green);
  font-size: 0.78rem;
  font-weight: 750;
}

.login-message.error {
  color: var(--nw-red);
}

.login-dev-notice {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f0bbc3;
  border-radius: var(--nw-radius);
  background: var(--nw-red-soft);
}

.login-dev-label,
.login-dev-anchor {
  color: #9e1730;
  font-size: 0.74rem;
  font-weight: 800;
}

/* Add item and list management */
.add-item-primary-paths {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.freestyle-panel,
.scan-barcode-card {
  padding: 16px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}

.freestyle-panel {
  display: grid;
  gap: 9px;
}

.item-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
}

.item-composer .icon-submit {
  width: 48px;
  min-width: 48px;
  padding: 0;
}

/* Voice is an optional, lazy-loaded enhancement. Typed entry retains the full composer in
   every state; the extra column appears only when the fail-closed config reveals the button. */
.item-composer.has-voice-button {
  grid-template-columns: minmax(0, 1fr) auto 48px;
}

.item-composer .voice-input-button {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #b8c5bb;
  background: #f4f7f5;
  color: var(--green-dark);
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 850;
}

.voice-input-button.voice-listening {
  background: #fff0ef;
  border-color: #c93636;
  color: #a52222;
  animation: voice-pulse 1.1s ease-in-out infinite;
}

.voice-input-button.voice-processing {
  opacity: 0.72;
}

.voice-permission-help {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #d9a43b;
  border-radius: 12px;
  background: #fff9ea;
  color: #493814;
  font-size: 0.86rem;
  line-height: 1.45;
}

.voice-permission-help ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.2rem;
}

.voice-permission-help .secondary-button {
  justify-self: start;
}

.voice-live-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.voice-privacy-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.voice-privacy-note[hidden] {
  display: none;
}

.voice-cancel-button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: -0.35rem;
}

.voice-cancel-button[hidden] {
  display: none;
}

@keyframes voice-pulse {
  50% { box-shadow: 0 0 0 5px rgba(201, 54, 54, 0.14); }
}

body.voice-review-open {
  overflow: hidden;
}

.voice-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  align-items: end;
  padding: 12px;
  background: rgba(18, 28, 21, 0.56);
}

.voice-review-dialog {
  width: min(100%, 620px);
  max-height: min(90vh, 820px);
  margin: 0 auto;
  padding: 18px;
  overflow: auto;
  border-radius: 20px 20px 12px 12px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.voice-review-header,
.voice-proposal-heading,
.voice-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-review-header h2,
.voice-review-header p {
  margin: 0;
}

.voice-review-intro {
  margin: 14px 0;
  color: var(--muted);
  line-height: 1.45;
}

.voice-transcript-label,
.voice-proposal label {
  display: grid;
  gap: 6px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.voice-review-dialog textarea,
.voice-proposal input,
.voice-proposal select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.voice-review-dialog textarea {
  resize: vertical;
}

.voice-proposal-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.voice-proposal {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf8;
}

.voice-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.voice-review-status {
  min-height: 1.3em;
  color: var(--muted);
  font-weight: 750;
}

.voice-review-status.error {
  color: #a52222;
}

.voice-review-actions {
  position: sticky;
  bottom: -18px;
  margin: 0 -18px -18px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.voice-review-actions button {
  flex: 1;
}

.voice-empty-proposals {
  padding: 14px;
  border-radius: 10px;
  background: #f4f7f5;
  color: var(--muted);
}

@media (min-width: 700px) {
  .voice-review-backdrop { align-items: center; }
  .voice-review-dialog { border-radius: 20px; }
}

@media (max-width: 420px) {
  .item-composer .voice-input-button span { display: none; }
  .voice-match-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-input-button.voice-listening { animation: none; }
}

.item-suggestions,
.suggestion-list {
  display: grid;
  gap: 7px;
}

.suggestion-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  color: var(--nw-text);
  text-align: left;
}

.scan-barcode-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--nw-ink);
  text-align: left;
}

.scan-barcode-card img {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: var(--nw-red-soft);
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.scan-barcode-card strong,
.scan-barcode-card small {
  display: block;
}

.scan-barcode-card strong {
  font-size: 0.9rem;
  font-weight: 850;
}

.scan-barcode-card small {
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.add-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.add-choice-card {
  min-height: 132px;
  display: grid;
  grid-template-rows: 36px auto auto;
  align-content: start;
  justify-items: start;
  gap: 7px;
  padding: 14px;
  color: var(--nw-ink);
  text-align: left;
}

.add-choice-card:nth-child(1) {
  background: var(--nw-red-soft);
}

.add-choice-card:nth-child(2) {
  background: var(--nw-amber-soft);
}

.add-choice-card:nth-child(3) {
  background: var(--nw-green-soft);
}

.add-choice-card:nth-child(4) {
  background: var(--nw-purple-soft);
}

.add-choice-card img,
.add-choice-specials-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.add-choice-card > span:not(.add-choice-specials-icon) {
  font-size: 0.82rem;
  font-weight: 850;
}

.add-choice-card small {
  color: var(--nw-muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.hunt-builder-panel {
  margin-top: 12px;
  padding: 16px;
}

#listStep .shopping-list-card {
  padding: 16px;
}

.list-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.shopping-items {
  display: grid;
  gap: 8px;
}

.shopping-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: none;
}

.shopping-item.current {
  border-color: #ef9aa7;
  background: #fff8f9;
}

.shopping-item.shopping {
  border-color: #add8c2;
  background: #f7fcf9;
}

.item-check,
.item-select-wrap input {
  width: 22px;
  height: 22px;
  accent-color: var(--nw-green);
}

.item-main,
.item-actions {
  min-width: 0;
}

.item-main {
  display: grid;
  gap: 3px;
}

.item-name,
.shopping-item-heading {
  color: var(--nw-ink);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.shopping-item-summary,
.shopping-item .objective-meta {
  color: var(--nw-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.item-actions {
  display: flex;
  gap: 5px;
}

.item-icon-button,
.item-detail-trigger {
  min-width: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-red);
  font-size: 0.72rem;
  font-weight: 850;
}

.shopping-route-badge,
.route-stop-badge,
.route-index {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--nw-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.shopping-special-badge,
.product-location-chip,
.catalogue-age-chip,
.recipe-badge,
.reward-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--nw-red-soft);
  color: #a3162d;
  font-size: 0.62rem;
  font-weight: 850;
}

.list-route-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  background: #f8f8f9;
  box-shadow: none;
}

.list-route-summary-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.list-route-summary h3 {
  margin: 0 0 3px;
  color: var(--nw-ink);
  font-size: 0.9rem;
}

.list-route-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--nw-line);
}

.list-route-metrics span {
  padding: 9px 5px 0;
  color: var(--nw-muted);
  font-size: 0.58rem;
  text-align: center;
}

.list-route-metrics strong {
  display: block;
  color: var(--nw-ink);
  font-size: 0.78rem;
}

/* More, settings and informational screens */
.account-settings-card,
.install-card,
.info-card,
.safety-shield-card,
.guardian-note-card {
  padding: 16px;
}

.account-settings-card {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.account-settings-card h3,
.pantry-recipe-card h3 {
  margin: 0;
  color: var(--nw-ink);
  font-size: 1rem;
}

.account-settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-button {
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-ink);
  text-align: left;
}

.settings-button[aria-pressed="true"] {
  border-color: #ef9aa7;
  background: var(--nw-red-soft);
}

.settings-button-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1f1f3;
  font-size: 0.72rem;
  font-weight: 900;
}

.settings-button strong,
.settings-button small {
  display: block;
}

.settings-button strong {
  font-size: 0.76rem;
}

.settings-button small {
  margin-top: 3px;
  color: var(--nw-muted);
  font-size: 0.62rem;
  line-height: 1.25;
}

.account-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-chip-email {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-card,
.info-card,
.safety-shield-card,
.guardian-note-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.install-card {
  margin-bottom: 12px;
  background: var(--nw-green-soft);
}

.install-card > img,
.info-card > img,
.safety-shield-card > img,
.guardian-note-card > img {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.more-grid,
.guardian-ethos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.more-tile {
  min-height: 132px;
  display: grid;
  grid-template-rows: 38px auto auto;
  align-content: start;
  justify-items: start;
  gap: 7px;
  padding: 14px;
  color: var(--nw-ink);
  text-align: left;
}

.more-tile:nth-child(4n + 1) {
  background: var(--nw-red-soft);
}

.more-tile:nth-child(4n + 2) {
  background: var(--nw-green-soft);
}

.more-tile:nth-child(4n + 3) {
  background: var(--nw-amber-soft);
}

.more-tile:nth-child(4n + 4) {
  background: var(--nw-purple-soft);
}

.more-tile img {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.more-tile > span {
  font-size: 0.82rem;
  font-weight: 850;
}

.more-tile small {
  color: var(--nw-muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.plain-steps {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--nw-text);
  font-size: 0.8rem;
  line-height: 1.55;
}

.guardian-ethos-grid .info-card {
  grid-template-columns: 40px minmax(0, 1fr);
}

.guardian-ethos-grid .info-card p {
  margin: 5px 0 0;
  color: var(--nw-muted);
  font-size: 0.72rem;
  line-height: 1.42;
}

/* Store selection */
.store-card-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.store-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  color: var(--nw-text);
  text-align: left;
}

.store-card.selected {
  border-color: #ef9aa7;
  background: #fff8f9;
  box-shadow: inset 4px 0 0 var(--nw-red);
}

.store-card > img {
  width: 42px;
  height: 42px;
  grid-row: 1 / span 3;
  padding: 9px;
  border-radius: 8px;
  background: var(--nw-red-soft);
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.store-card-title {
  color: var(--nw-ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.store-card-meta {
  color: var(--nw-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.store-card-status {
  color: var(--nw-green);
  font-size: 0.62rem;
  font-weight: 850;
}

/* Catalogue and specials */
.catalogue-heading-actions {
  display: flex;
  gap: 7px;
}

.catalogue-search {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 13px;
  background: #fafafa;
  box-shadow: none;
}

.specials-toggle {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #f0bbc3;
  border-radius: var(--nw-radius);
  background: var(--nw-red-soft);
  color: var(--nw-ink);
  text-align: left;
}

.specials-toggle-badge,
.action-button-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--nw-red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.specials-toggle-copy strong,
.specials-toggle-copy small {
  display: block;
}

.specials-toggle-copy strong {
  font-size: 0.83rem;
  font-weight: 850;
}

.specials-toggle-copy small {
  margin-top: 3px;
  color: var(--nw-muted);
  font-size: 0.64rem;
  line-height: 1.25;
}

.specials-toggle-chevron {
  color: var(--nw-red);
  font-size: 1.35rem;
}

.catalogue-layout,
.catalogue-results {
  min-width: 0;
}

.catalogue-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalogue-results > .objective-meta {
  grid-column: 1 / -1;
}

.catalogue-match-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 1px;
}

.catalogue-match-heading strong {
  color: var(--nw-ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.catalogue-match-heading span {
  color: var(--nw-muted);
  font-size: 0.64rem;
  text-align: right;
}

.catalogue-result,
.product-card {
  min-width: 0;
  display: grid;
  align-content: start;
  padding: 0;
  overflow: hidden;
  color: var(--nw-text);
  text-align: left;
  box-shadow: none;
}

.catalogue-result > img,
.catalogue-product-media {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  padding: 10px;
  border-bottom: 1px solid var(--nw-line);
  background: #fafafa;
  object-fit: contain;
}

.catalogue-result-copy,
.product-card-text {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
}

.catalogue-result-copy strong,
.product-card-name {
  min-height: 2.5em;
  color: var(--nw-ink);
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.25;
}

.catalogue-result-copy small,
.product-card-meta,
.catalogue-department-hint {
  color: var(--nw-muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.catalogue-actions,
.specials-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 11px 11px;
}

.catalogue-actions button,
.specials-result-actions button {
  min-height: 38px;
  padding: 7px;
  font-size: 0.65rem;
}

.catalogue-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  display: grid;
  place-items: center;
  background: #f4f4f5;
  color: var(--nw-subtle);
  font-size: 0.7rem;
}

.catalogue-modal {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px 12px max(12px, env(safe-area-inset-bottom));
  overflow: auto;
  background: rgba(20, 20, 22, 0.54);
  backdrop-filter: blur(4px);
}

.catalogue-modal[hidden] {
  display: none !important;
}

.catalogue-detail > *,
.specials-panel > * {
  width: min(100%, 430px);
}

.catalogue-detail .product-detail-card,
.specials-panel {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 0;
  border-radius: 14px 14px 8px 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.catalogue-modal-close {
  position: sticky;
  z-index: 2;
  top: 10px;
  float: right;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin: 10px 10px 0 0;
  padding: 0;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--nw-ink);
  font-size: 1.2rem;
  box-shadow: var(--nw-shadow-sm);
}

.product-detail-header,
.product-detail-main {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.product-detail-main {
  grid-template-columns: minmax(0, 1fr);
}

.product-detail-header h2 {
  margin: 2px 0 0;
  padding-right: 42px;
  color: var(--nw-ink);
  font-size: 1.22rem;
  line-height: 1.15;
}

.product-detail-brand {
  color: var(--nw-red);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-detail-card .catalogue-product-media {
  aspect-ratio: 1.5 / 1;
  max-height: 230px;
}

.product-detail-copy {
  display: grid;
  gap: 8px;
}

.product-detail-facts,
.recipe-meta-grid,
.activity-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
}

.product-detail-fact,
.recipe-meta-grid span,
.activity-summary-metrics span {
  min-width: 0;
  padding: 10px 6px;
  color: var(--nw-muted);
  font-size: 0.62rem;
  text-align: center;
}

.product-detail-fact + .product-detail-fact,
.recipe-meta-grid span + span,
.activity-summary-metrics span + span {
  border-left: 1px solid var(--nw-line);
}

.product-special-panel {
  padding: 12px;
  border-radius: var(--nw-radius);
  background: var(--nw-red-soft);
}

.product-shelf-position {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: var(--nw-radius);
  background: var(--nw-green-soft);
}

.item-mini-map {
  padding: 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fafafa;
}

.specials-panel {
  width: min(100%, 430px);
  padding: 0 0 18px;
}

.specials-panel > header,
.specials-panel .specials-search,
.specials-panel .specials-tabs,
.specials-panel .specials-list {
  margin-inline: 16px;
}

.specials-panel > header {
  padding-top: 16px;
}

.specials-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-block: 12px;
}

.specials-tabs,
.recipe-category-row {
  display: flex;
  gap: 7px;
  padding-bottom: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.specials-tabs::-webkit-scrollbar,
.recipe-category-row::-webkit-scrollbar {
  display: none;
}

.specials-tab,
.recipe-category-pill {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-text);
  font-size: 0.68rem;
  font-weight: 800;
}

.specials-tab.selected,
.recipe-category-pill.selected {
  border-color: var(--nw-red);
  background: var(--nw-red);
  color: #fff;
}

.specials-list,
.specials-department-items {
  display: grid;
  gap: 9px;
}

.specials-department-section {
  display: grid;
  gap: 8px;
}

.specials-department-heading {
  margin: 14px 0 2px;
  color: var(--nw-ink);
  font-size: 0.86rem;
}

.specials-result,
.specials-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.specials-result img,
.specials-card img {
  width: 72px;
  height: 72px;
  padding: 5px;
  border-radius: 6px;
  background: #fafafa;
  object-fit: contain;
}

.specials-result-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.specials-result-main strong {
  color: var(--nw-ink);
  font-size: 0.76rem;
  line-height: 1.25;
}

.specials-price {
  color: var(--nw-red);
  font-size: 0.95rem;
  font-weight: 900;
}

/* Recipes */
.recipe-list-context {
  margin-bottom: 12px;
  padding: 13px;
  background: var(--nw-green-soft);
  box-shadow: none;
}

.recipe-category-row {
  margin-bottom: 12px;
}

.recipe-layout {
  display: grid;
  gap: 12px;
}

#recipeStep:not(.mailer-recipes-mode) > .mailer-recipes-view,
#recipeStep.mailer-recipes-mode > :not(.mailer-recipes-view),
body.kiosk-mode #backToMailerRecipesButton {
  display: none;
}

.mailer-recipes-view {
  display: grid;
  gap: 16px;
}

.mailer-recipe-section h3 {
  margin: 0 0 8px;
}

.mailer-recipe-section .recipe-list > .objective-meta {
  grid-column: 1 / -1;
  margin: 0;
}

#retryMailerRecipesButton {
  margin-top: 8px;
}

.mailer-recipe-card {
  padding: 0 14px;
  align-self: start;
}

.mailer-recipe-card summary {
  display: flow-root list-item;
  min-height: 48px;
  padding: 12px 0;
  cursor: pointer;
}

.mailer-recipe-card summary small {
  display: block;
  margin-block-start: 4px;
}

.mailer-recipe-thumbnail {
  float: inline-end;
  width: 64px;
  height: 64px;
  margin-inline-start: 10px;
  border-radius: 8px;
  object-fit: cover;
}

.nuggets-recipe {
  padding: 0 14px;
}

.nuggets-recipe summary {
  min-height: 48px;
  padding: 12px 0;
  font-weight: 750;
  cursor: pointer;
}

.nuggets-recipe summary small {
  margin-inline-start: 6px;
  font-weight: 500;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recipe-card {
  min-width: 0;
  display: grid;
  align-content: start;
  padding: 0;
  overflow: hidden;
  color: var(--nw-text);
  text-align: left;
  box-shadow: none;
}

.recipe-card.selected {
  border-color: #ef9aa7;
  box-shadow: inset 0 0 0 1px var(--nw-red);
}

.recipe-card-image {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  border-bottom: 1px solid var(--nw-line);
  object-fit: cover;
}

.recipe-card-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
}

.recipe-card-main strong {
  color: var(--nw-ink);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
}

.recipe-card-main small {
  color: var(--nw-muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.recipe-controls {
  position: sticky;
  z-index: 8;
  bottom: calc(78px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -5px 18px rgba(22, 22, 24, 0.08);
  backdrop-filter: blur(12px);
}

.recipe-controls label {
  grid-column: 1;
}

.recipe-controls input {
  grid-column: 1;
  min-height: 44px;
}

.recipe-controls button {
  min-width: 0;
  min-height: 44px;
  padding: 7px;
  font-size: 0.61rem;
}

.recipe-detail {
  min-width: 0;
}

.recipe-detail-card {
  overflow: hidden;
  box-shadow: none;
}

.recipe-detail-hero {
  display: grid;
}

.recipe-detail-hero > img {
  width: 100%;
  max-height: 230px;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
}

.recipe-detail-hero > div {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.recipe-detail-hero h2 {
  margin: 0;
  color: var(--nw-ink);
  font-size: 1.25rem;
  line-height: 1.12;
}

.recipe-detail-card > .recipe-meta-grid,
.recipe-detail-card > .recipe-flow-card,
.recipe-detail-card > .ingredient-list,
.recipe-detail-card > .recipe-method,
.recipe-detail-card > .recipe-safety {
  margin: 0 16px 14px;
}

.recipe-flow-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: var(--nw-radius);
  background: var(--nw-green-soft);
  color: var(--nw-text);
  font-size: 0.72rem;
  line-height: 1.4;
}

.recipe-flow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recipe-flow-metrics span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--nw-green);
  font-size: 0.6rem;
  font-weight: 800;
}

.ingredient-list {
  display: grid;
  gap: 7px;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.ingredient-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--nw-green);
}

.ingredient-row strong,
.ingredient-row small {
  display: block;
}

.ingredient-row strong {
  color: var(--nw-ink);
  font-size: 0.76rem;
  line-height: 1.25;
}

.ingredient-row small {
  margin-top: 3px;
  color: var(--nw-muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.ingredient-row.pantry-have {
  background: var(--nw-green-soft);
}

.recipe-method {
  padding: 14px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.recipe-method h3 {
  margin: 3px 0 10px;
  color: var(--nw-ink);
  font-size: 0.9rem;
}

.recipe-method ol,
.recipe-safety ul {
  margin: 0;
  padding-left: 20px;
}

.recipe-method li,
.recipe-safety li {
  margin-top: 7px;
  color: var(--nw-text);
  font-size: 0.72rem;
  line-height: 1.45;
}

.recipe-method li:first-child,
.recipe-safety li:first-child {
  margin-top: 0;
}

.recipe-safety {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 13px;
  border-radius: var(--nw-radius);
  background: #fff5df;
}

.recipe-safety > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #6d4a00;
}

.recipe-safety svg {
  width: 20px;
  height: 20px;
}

.recipe-safety strong {
  display: block;
  margin-bottom: 6px;
  color: var(--nw-ink);
  font-size: 0.78rem;
}

.recipe-empty-card,
.recipe-error-card,
.recipe-loading-card {
  padding: 16px;
  box-shadow: none;
}

.pantry-recipe-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  background: #fafafa;
  box-shadow: none;
}

.pantry-recipe-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
}

.pantry-recipe-form label:first-of-type,
.pantry-recipe-form input:first-of-type {
  grid-column: 1;
}

.pantry-recipe-form label:nth-of-type(2),
.pantry-recipe-form input:nth-of-type(2) {
  grid-column: 2;
}

.pantry-recipe-actions,
.pantry-recipe-results {
  grid-column: 1 / -1;
}

.pantry-recipe-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pantry-recipe-results {
  display: grid;
  gap: 8px;
}

.pantry-suggestion-card {
  width: 100%;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-text);
  text-align: left;
}

.pantry-suggestion-card img {
  width: 82px;
  height: 82px;
  border-radius: 6px;
  object-fit: cover;
}

.pantry-suggestion-card strong,
.pantry-suggestion-card small {
  display: block;
}

.pantry-suggestion-card strong {
  color: var(--nw-ink);
  font-size: 0.77rem;
}

.pantry-suggestion-card small {
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 0.61rem;
  line-height: 1.3;
}

/* Quiz, activity and family features */
.quiz-body,
.trophy-grid,
.quest-template-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quiz-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  box-shadow: none;
}

.quiz-offer-card {
  background: var(--nw-purple-soft);
}

.store-quiz-form {
  display: grid;
  gap: 14px;
}

.quiz-question {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(123, 63, 160, 0.14);
}

.quiz-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-text);
  font-size: 0.76rem;
  line-height: 1.35;
}

.quiz-option input {
  width: 19px;
  height: 19px;
  accent-color: var(--nw-purple);
}

.quiz-time {
  color: var(--nw-purple);
  font-size: 0.68rem;
  font-weight: 850;
}

.quiz-result-card.passed {
  background: var(--nw-green-soft);
}

.quiz-result-card.try-again {
  background: var(--nw-amber-soft);
}

.quiz-review {
  display: grid;
  gap: 7px;
}

.quiz-review-item {
  padding: 10px;
  box-shadow: none;
}

.quiz-review-item.correct {
  border-color: #add8c2;
  background: var(--nw-green-soft);
}

.quiz-review-item.incorrect {
  border-color: #f0c498;
  background: var(--nw-amber-soft);
}

.quiz-claim {
  padding: 14px;
  background: #fff;
  box-shadow: none;
}

.quiz-claim-code {
  display: inline-flex;
  padding: 8px 10px;
  border: 1px dashed var(--nw-red);
  border-radius: 6px;
  background: var(--nw-red-soft);
  color: #9e1730;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 900;
}

.trophy-feature-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--nw-purple-soft);
  box-shadow: none;
}

.trophy-feature-card > img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: none;
}

.trophy-feature-card strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--nw-ink);
  font-size: 1rem;
}

.trophy-feature-card p {
  margin: 0 0 9px;
  color: var(--nw-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.activity-summary-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: none;
}

.trophy-section {
  display: grid;
  gap: 9px;
}

.trophy-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trophy-tile,
.trophy-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 7px;
  text-align: center;
}

.trophy-tile img,
.trophy-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.trophy-tile strong,
.trophy-card strong {
  color: var(--nw-ink);
  font-size: 0.63rem;
  line-height: 1.2;
}

.trophy-tile.locked,
.trophy-card.locked {
  opacity: 0.52;
  filter: grayscale(1);
}

.safety-shield-card {
  margin: 12px 0;
  background: var(--nw-green-soft);
  box-shadow: none;
}

.safety-shield-card strong {
  color: var(--nw-ink);
  font-size: 0.85rem;
}

.safety-shield-card p {
  margin: 5px 0 0;
  color: var(--nw-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.quest-template-card {
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-text);
  text-align: left;
}

.quest-template-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.quest-template-card strong {
  color: var(--nw-ink);
  font-size: 0.82rem;
}

.quest-template-card small {
  display: block;
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.quest-settings-card {
  margin: 12px 0;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.quest-settings-card summary {
  padding: 14px;
  color: var(--nw-ink);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.quest-settings-card[open] {
  padding-bottom: 14px;
}

.quest-settings-card[open] > :not(summary) {
  margin-inline: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.role {
  min-height: 88px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  color: var(--nw-muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.role.selected {
  border-color: #ef9aa7;
  background: var(--nw-red-soft);
  color: #9e1730;
}

.role img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.3);
}

/* Scanner, quest and result */
.camera-panel {
  position: relative;
  min-height: 340px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  margin: 14px 0 12px;
  padding: 28px 18px;
  overflow: hidden;
  border: 0;
  background: #171719;
  color: #fff;
  box-shadow: none;
}

.camera-panel .panel-icon {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.scan-instruction-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
}

.camera-panel .camera-frame {
  position: relative;
  width: min(250px, 82vw);
  aspect-ratio: 1.55 / 1;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--nw-radius);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
}

.camera-panel .camera-frame::after {
  position: absolute;
  right: 8px;
  bottom: 50%;
  left: 8px;
  height: 2px;
  background: var(--nw-red);
  box-shadow: 0 0 12px rgba(227, 24, 55, 0.8);
  content: "";
}

.scan-guide-mascot {
  display: none;
}

#scanCameraMessage {
  max-width: 270px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.scan-safety-card {
  background: var(--nw-blue-soft);
}

#scanStep .scan-actions,
#resultStep > .primary-button,
#questStep .scan-actions {
  margin-top: 12px;
}

#scanStep .scan-actions,
#questStep .scan-actions {
  grid-template-columns: 1fr;
}

.objective-panel,
.result-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 16px;
  box-shadow: none;
}

.objective-hero,
.result-hero,
.quest-clue-hero {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.objective-asset,
.result-hero img,
.quest-clue-hero img {
  width: 82px;
  height: 82px;
  border-radius: var(--nw-radius);
  object-fit: cover;
}

.quest-progress-chip,
.result-state-chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--nw-red-soft);
  color: #9e1730;
  font-size: 0.62rem;
  font-weight: 850;
}

.result-state-chip.success,
.reward-earned {
  background: var(--nw-green-soft);
  color: var(--nw-green);
}

.progress-track {
  margin: 10px 0;
}

.guardian-note-card {
  margin-top: 12px;
  padding: 12px;
  background: var(--nw-green-soft);
  box-shadow: none;
}

.result-detail {
  display: grid;
  gap: 7px;
  color: var(--nw-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

/* Routes and maps */
.pioneer-map-panel,
.route-map-frame,
.customer-route-map,
.shopper-map {
  width: 100%;
  min-width: 0;
}

.pioneer-map-panel {
  margin: 14px 0 10px;
  padding: 0;
  overflow: hidden;
  background: #f4f3ef;
  box-shadow: none;
}

.map-svg,
.store-map-svg,
.shopper-map svg,
.customer-route-map svg {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
}

.floor-plan-truth-note,
.route-guidance-status {
  padding: 9px 11px;
  border-top: 1px solid var(--nw-line);
  background: #fff;
  color: var(--nw-muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.shopper-map-key,
.map-support-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
}

.map-key-line,
.map-key-marker,
.map-support-pills span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--nw-muted);
  font-size: 0.59rem;
  font-weight: 750;
}

.map-status-panel {
  margin-top: 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  background: var(--nw-blue-soft);
}

.map-status-panel .panel-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  filter: grayscale(1) brightness(0.25);
}

.map-list-selection {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.map-list-selection-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.map-list-selection-items span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--nw-red-soft);
  color: #9e1730;
  font-size: 0.59rem;
  font-weight: 800;
}

.route-panel {
  box-shadow: none;
}

.route-now-card,
.route-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.route-now-card {
  margin-bottom: 9px;
  border-color: #ef9aa7;
  background: #fff8f9;
}

.route-now-main,
.route-summary-detail {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.route-now-main strong,
.route-step strong {
  color: var(--nw-ink);
  font-size: 0.8rem;
}

.route-now-main span,
.route-step span {
  color: var(--nw-muted);
  font-size: 0.67rem;
  line-height: 1.35;
}

.route-now-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.route-summary,
.regroup-list {
  display: grid;
  gap: 8px;
}

.route-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.map-improve-details {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.map-improve-details summary {
  padding: 13px;
  color: var(--nw-muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.map-improve-details[open] {
  padding: 0 12px 12px;
}

.custom-map-panel,
.map-visual-panel,
.map-log-panel {
  margin-top: 10px;
  padding: 12px;
}

.custom-map-header {
  display: grid;
  gap: 10px;
}

.custom-map-points {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.custom-map-point {
  padding: 9px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

body.map-overlay-open::before {
  display: none !important;
}

#expandedMapStep.map-overlay-active {
  position: fixed;
  z-index: 130;
  inset: 0;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow: hidden;
  background: #fff;
}

.expanded-map-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.expanded-map-header h2 {
  margin: 0;
  color: var(--nw-ink);
  font-size: 1.2rem;
}

.expanded-map-actions {
  display: flex;
  gap: 7px;
}

.expanded-map-dismiss {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-ink);
  font-size: 1.3rem;
  box-shadow: var(--nw-shadow-sm);
}

.expanded-map-viewport {
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #f5f3ed;
  touch-action: none;
}

.expanded-map-canvas {
  min-width: 100%;
}

.expanded-map-progress {
  margin: 14px;
  padding: 12px 14px;
  border: 1px solid #e1d8cd;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--nw-ink);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--nw-shadow-sm);
}

.expanded-map-progress.map-ready::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--nw-red);
  animation: map-route-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes map-route-pulse {
  to { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .expanded-map-progress.map-ready::before { animation: none; }
}

/* Live camera overlay */
#cameraOverlay {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: none;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: #111;
}

#cameraOverlay.open,
#cameraOverlay.active,
#cameraOverlay[aria-hidden="false"] {
  display: grid;
}

.camera-preview {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--nw-radius);
  background: #000;
}

.camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#cameraOverlay .camera-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(300px, 82vw);
  aspect-ratio: 1.55 / 1;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: var(--nw-radius);
}

#cameraOverlay .camera-frame::after {
  position: absolute;
  right: 8px;
  bottom: 50%;
  left: 8px;
  height: 2px;
  background: var(--nw-red);
  content: "";
}

#cameraOverlayMessage {
  margin: 0;
  color: #fff;
  font-size: 0.78rem;
  text-align: center;
}

.camera-overlay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.camera-overlay-actions button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--nw-radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 850;
}

.catalogue-inline-list {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--nw-line);
}

.catalogue-inline-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.catalogue-inline-list-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.catalogue-shopping-list {
  display: grid;
  gap: 10px;
}

.compact-empty-list {
  padding: 12px;
}

/* Scanner composition guard: feed and guide share one bounded viewport. */
#cameraOverlay .camera-preview {
  display: grid;
  width: min(100%, 1000px);
  min-height: 0;
  max-height: min(72vh, 720px);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  align-self: center;
  overflow: hidden;
  background: #000;
  contain: layout paint;
}

#cameraOverlay .camera-preview > .camera-feed,
#cameraOverlay .camera-preview > .camera-frame {
  grid-area: 1 / 1;
}

#cameraOverlay .camera-preview > .camera-feed {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
}

#cameraOverlay .camera-preview > .camera-frame {
  place-self: center;
  position: relative;
  inset: auto;
  width: min(72%, 620px);
  height: auto;
  aspect-ratio: 1.55 / 1;
  transform: none;
  pointer-events: none;
}

@media (orientation: portrait) {
  #cameraOverlay .camera-preview {
    aspect-ratio: 4 / 5;
  }
}

/* Accessibility modes keep the same information architecture. */
body.large-text {
  font-size: 17px;
}

body.high-contrast {
  --nw-line: #73737a;
  --nw-muted: #333338;
}

body.high-contrast button,
body.high-contrast input,
body.high-contrast select,
body.high-contrast .shelf-card {
  border-width: 2px;
}

@media (min-width: 700px) {
  .catalogue-modal {
    align-items: center;
  }

  .catalogue-detail .product-detail-card,
  .specials-panel {
    border-radius: 14px;
  }
}

@media (max-width: 374px) {
  body:not(.login-active) .topbar,
  body:not(.login-active)[data-active-screen="presence"] .topbar,
  body:not(.login-active):not([data-active-screen]) .topbar,
  body.login-active .topbar {
    padding-inline: 15px;
  }

  body:not(.login-active) main,
  body:not(.login-active)[data-active-screen="presence"] main,
  body:not(.login-active):not([data-active-screen]) main,
  body.login-active main {
    padding-inline: 14px;
  }

  .home-greeting-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-status-strip {
    justify-content: flex-start;
  }

  .fresh-hero {
    min-height: 236px;
    padding-inline: 13px;
  }

  .hero-offer-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-offer-card img {
    height: 28px;
  }

  .home-feature-card {
    min-height: 148px;
    padding: 12px 10px;
  }

  .home-feature-card > img {
    width: 84px;
    height: 84px;
  }

  .home-stat-card {
    padding-inline: 2px;
  }

  .home-stat-card strong {
    font-size: 0.49rem;
  }

  .list-tools {
    grid-template-columns: minmax(0, 1fr) repeat(3, 38px);
  }

  .icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .list-primary-actions,
  body[data-active-screen="presence"] .list-primary-actions,
  .list-action-row,
  .route-actions {
    grid-template-columns: 1fr;
  }

  .more-grid,
  .guardian-ethos-grid,
  .catalogue-results,
  .recipe-list {
    grid-template-columns: 1fr 1fr;
  }

  .recipe-controls {
    grid-template-columns: 54px repeat(3, minmax(0, 1fr));
    padding: 8px;
  }

  .recipe-controls button {
    font-size: 0.56rem;
  }

  .trophy-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 339px) {
  .home-feature-grid,
  .add-choice-grid,
  .more-grid,
  .guardian-ethos-grid,
  .catalogue-results,
  .recipe-list,
  .account-settings-actions {
    grid-template-columns: 1fr;
  }

  .home-feature-card {
    min-height: 140px;
  }

  .home-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stat-card:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--nw-line);
  }

  .home-stat-card:nth-child(4) {
    border-top: 1px solid var(--nw-line);
  }

  .recipe-controls {
    position: static;
    grid-template-columns: 1fr;
  }

  .recipe-controls label,
  .recipe-controls input {
    grid-column: 1;
  }
}

/* Keep the next-shop action beside the final row so long lists never require a
   return trip to the header. The card stays deliberately quiet until collected
   items make the action useful. */
.list-reuse-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, auto);
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--nw-red) 28%, var(--nw-line));
  border-radius: var(--nw-radius);
  background: linear-gradient(135deg, var(--nw-red-soft), var(--nw-surface) 72%);
}

.list-reuse-footer-copy {
  min-width: 0;
}

.list-reuse-footer-copy h3 {
  margin: 0 0 4px;
  color: var(--nw-ink);
  font-size: 1.08em;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.list-reuse-footer-copy p {
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.95em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.list-reuse-footer-button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  font-size: 1em;
  line-height: 1.2;
  white-space: normal;
}

.list-reuse-footer-button svg {
  flex: 0 0 auto;
}

body.high-contrast .list-reuse-footer {
  border-width: 2px;
  border-color: var(--nw-ink);
  background: var(--nw-surface);
}

@media (max-width: 520px) {
  .list-reuse-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

@media (max-width: 374px) {
  .list-reuse-footer {
    padding: 12px;
  }
}

/* 2026-08-30 shopper legibility and map interaction refinements. */
.store-map-visual,
.route-mini-map {
  cursor: zoom-in;
}

#recipeHomeButton {
  min-width: 0;
  min-height: 48px;
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.shopping-item .item-detail-trigger {
  height: auto;
  border-radius: 12px;
  white-space: normal;
  overflow: visible;
}

.shopping-item .item-name,
.catalogue-result-copy strong,
.recipe-card-main strong,
.catalogue-actions button,
.specials-result-actions button,
.map-list-selection-items button {
  height: auto;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

@media (max-width: 420px) {
  #recipesStep .screen-heading {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 40%);
  }
}

/* Guest-first product finder: the store tablet can be useful immediately while
   personal lists and saved activity remain an explicit sign-in choice. */
.guest-finder-card,
.guest-sign-in-card {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 2px solid rgba(227, 24, 55, 0.22);
  background: linear-gradient(145deg, #fff 0%, #fff5f7 100%);
}

.guest-finder-heading,
.guest-sign-in-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.guest-finder-heading {
  display: grid;
  gap: 12px;
}

.guest-finder-heading h2,
.guest-sign-in-card h3 {
  margin: 2px 0 5px;
}

.guest-finder-heading p:last-child,
.guest-sign-in-card p:not(.step-label) {
  margin: 0;
  color: var(--nw-muted);
  line-height: 1.45;
}

.guest-finder-icon,
.guest-sign-in-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
}

.guest-finder-icon svg,
.guest-sign-in-icon svg {
  width: 22px;
  height: 22px;
}

.guest-finder-form {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
}

.guest-finder-form label {
  font-size: 0.78rem;
  font-weight: 800;
}

.guest-finder-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.guest-finder-form input {
  min-width: 0;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid var(--nw-line);
  border-radius: var(--brand-button-radius, 8px);
  background: #fff;
  color: var(--nw-text);
  font: inherit;
}

.guest-finder-form button,
.guest-sign-in-card button,
.login-back-button {
  min-height: 50px;
}

.guest-finder-hint {
  min-height: 1.25em;
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.guest-sign-in-card button {
  width: 100%;
  margin-top: 13px;
}

.login-back-button {
  width: 100%;
  margin-top: 8px;
}

body[data-auth-state="guest"] #shoppingListCard,
body[data-auth-state="guest"] .shop-quick-actions,
body[data-auth-state="guest"] #currentShopCard,
body[data-auth-state="guest"] #catalogueInlineList {
  display: none;
}

body[data-auth-state="guest"] #guestSignInCard {
  display: grid !important;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 374px) {
  .guest-finder-form > div {
    grid-template-columns: 1fr;
  }

  .catalogue-match-heading {
    display: grid;
  }

  .catalogue-match-heading span {
    text-align: left;
  }
}

/* Published customer catalogues: permanent evidence surfaces for the live
   specials contract and the Russell-governed visual system. */
.more-tile-priority {
  border-color: #d7d7da;
  background: #fff;
}

.brand-studio-modules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.brand-studio-module-card {
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
  min-height: 72px;
  padding: 10px;
  border-color: var(--nw-line);
  border-radius: var(--nw-radius);
  background: var(--nw-surface);
  color: var(--nw-text);
  box-shadow: none;
}

.brand-studio-module-card img {
  width: 40px;
  height: 40px;
}

.brand-studio-module-card strong {
  color: var(--nw-ink);
  font-size: 0.72rem;
  line-height: 1.25;
}

.brand-studio-module-card small {
  color: var(--nw-muted);
  font-size: 0.61rem;
}

.more-tile-priority:first-child {
  background: #fff5f6;
}

.more-tile-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}

.specials-symbol {
  background: var(--nw-red);
}

.design-symbol {
  background: #171719;
}

.evidence-screen {
  padding-bottom: 34px;
}

.evidence-screen .compact-screen-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.evidence-screen .compact-screen-heading > div {
  min-width: 0;
}

.evidence-screen .compact-screen-heading .copy {
  max-width: 620px;
  margin-bottom: 0;
}

.evidence-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
}

.evidence-metric-strip > span {
  display: grid;
  min-width: 0;
  min-height: 68px;
  padding: 12px 8px;
  place-content: center;
  text-align: center;
}

.evidence-metric-strip > span + span {
  border-left: 1px solid var(--nw-line);
}

.evidence-metric-strip strong {
  color: var(--nw-ink);
  font-size: 1.18rem;
  line-height: 1.1;
}

.evidence-metric-strip small {
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-search {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.evidence-search > label {
  display: block;
  margin-bottom: 6px;
  color: var(--nw-ink);
  font-size: 0.72rem;
  font-weight: 850;
}

.evidence-search .item-composer {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.evidence-search input {
  min-width: 0;
}

.evidence-tabs {
  margin: 0 -2px;
  padding: 2px 2px 8px;
}

.evidence-result-count {
  margin: 2px 0 12px;
  color: var(--nw-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.full-specials-list {
  display: grid;
  gap: 18px;
}

.full-specials-list .specials-department-section {
  margin: 0;
}

.full-specials-list .specials-department-items {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

.full-specials-list .specials-result,
.specials-panel .specials-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: auto;
  padding: 0;
}

.full-specials-list .specials-result-main,
.specials-panel .specials-result-main {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 11px;
  min-height: 96px;
  padding: 10px;
}

.full-specials-list .specials-result-main .catalogue-result-copy,
.specials-panel .specials-result-main .catalogue-result-copy {
  align-content: center;
  padding: 0;
}

.full-specials-list .specials-result-actions,
.specials-panel .specials-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px 10px 10px;
}

.full-specials-list .specials-department-heading {
  position: static;
  padding: 8px 0;
  background: var(--nw-canvas);
}

.catalogue-loading {
  width: 30px;
  height: 30px;
  margin: 30px auto;
  border: 3px solid #e8e8ea;
  border-top-color: var(--nw-red);
  border-radius: 50%;
  animation: catalogue-spin 0.8s linear infinite;
}

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

.catalogue-empty-state {
  margin: 20px 0;
  padding: 18px 0;
  border-top: 1px solid var(--nw-line);
  border-bottom: 1px solid var(--nw-line);
  color: var(--nw-muted);
}

.russell-principle-band {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 -18px 18px;
  padding: 22px 18px;
  background: #171719;
  color: #fff;
}

.russell-principle-band .new-world-mark {
  display: grid;
  width: 50px;
  height: 42px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--nw-red);
  font-size: 0.8rem;
  font-weight: 950;
}

.russell-principle-band .step-label {
  color: #ff7b8f;
}

.russell-principle-band h3 {
  margin: 2px 0 5px;
  color: #fff;
  font-size: 1.05rem;
}

.russell-principle-band p:last-child {
  margin: 0;
  color: #d7d7da;
  font-size: 0.74rem;
  line-height: 1.45;
}

.design-catalogue-section {
  margin: 0 -18px;
  padding: 24px 18px;
  border-top: 1px solid var(--nw-line);
}

.design-section-heading {
  margin-bottom: 15px;
}

.design-section-heading h3 {
  margin: 2px 0 0;
  color: var(--nw-ink);
  font-size: 1.05rem;
}

.design-token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.design-token-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.design-token-grid > div > span {
  display: block;
  height: 42px;
  border: 1px solid #d9d9dc;
  border-radius: 6px;
  background: var(--token-color);
}

.design-token-grid strong,
.design-token-grid small {
  overflow-wrap: anywhere;
}

.design-token-grid strong {
  margin-top: 3px;
  color: var(--nw-ink);
  font-size: 0.67rem;
}

.design-token-grid small {
  color: var(--nw-muted);
  font-size: 0.6rem;
}

.design-type-specimens {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--nw-line);
}

.type-display {
  color: var(--nw-ink);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.03;
}

.type-title {
  color: var(--nw-ink);
  font-size: 1.1rem;
  font-weight: 850;
}

.type-body {
  color: var(--nw-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.type-label {
  color: var(--nw-red);
  font-size: 0.62rem;
  font-weight: 900;
}

.design-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.design-control-row button {
  width: auto;
}

.design-field-row {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.design-field-row > label:not(.design-check) {
  color: var(--nw-ink);
  font-size: 0.7rem;
  font-weight: 850;
}

.design-field-row input[type="search"] {
  width: 100%;
}

.design-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  color: var(--nw-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.design-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--nw-red);
}

.design-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.design-state {
  min-width: 0;
  padding: 13px;
  border-left: 4px solid #9b9ba1;
  border-radius: 4px;
  background: #f5f5f6;
}

.design-state strong,
.design-state small {
  display: block;
}

.design-state strong {
  color: var(--nw-ink);
  font-size: 0.76rem;
}

.design-state small {
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.design-state.success {
  border-left-color: #167a45;
  background: #eef8f2;
}

.design-state.warning {
  border-left-color: #c87c00;
  background: #fff7e8;
}

.design-state.information {
  border-left-color: #1668a8;
  background: #eef7fd;
}

.design-pattern-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.design-pattern-list span {
  padding: 7px 9px;
  border: 1px solid var(--nw-line);
  border-radius: 5px;
  background: #fff;
  color: var(--nw-ink);
  font-size: 0.68rem;
  font-weight: 750;
}

.design-screen-inventory {
  border-top: 1px solid var(--nw-line);
}

.design-screen-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--nw-line);
}

.design-screen-index {
  color: var(--nw-red);
  font-size: 0.67rem;
  font-weight: 900;
}

.design-screen-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.design-screen-title h4 {
  margin: 0;
  color: var(--nw-ink);
  font-size: 0.79rem;
}

.design-screen-title span {
  padding: 2px 5px;
  border-radius: 3px;
  background: #ededee;
  color: var(--nw-muted);
  font-size: 0.55rem;
  font-weight: 850;
  text-transform: uppercase;
}

.design-screen-row p {
  margin: 4px 0 2px;
  color: var(--nw-muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.design-screen-row small {
  color: #6d6d72;
  font-size: 0.61rem;
}

.design-implemented-status {
  color: #167a45;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.design-proof-section ul {
  margin: 0;
  padding-left: 19px;
}

.design-proof-section li {
  margin: 0 0 8px;
  color: var(--nw-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 374px) {
  .brand-studio-modules {
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence-screen .compact-screen-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .evidence-screen .compact-screen-heading .compact-button {
    width: auto;
    justify-self: start;
  }

  .evidence-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-metric-strip > span:nth-child(3) {
    border-top: 1px solid var(--nw-line);
    border-left: 0;
  }

  .evidence-metric-strip > span:nth-child(4) {
    border-top: 1px solid var(--nw-line);
  }

  .design-token-grid,
  .design-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-screen-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .design-implemented-status {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.fresh-hero::before,
.fresh-hero::after {
  display: none;
}

.fresh-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 190px;
  margin-bottom: 3px;
}

.fresh-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.03;
}

.fresh-hero-copy span {
  width: 42px;
  height: 3px;
  display: block;
  margin: 11px 0;
  border-radius: 999px;
  background: var(--nw-red);
}

.fresh-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.fresh-hero-badge {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 18px;
  color: #fff;
  font-size: 0.66rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-offer-row {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
}

.hero-offer-card {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--nw-ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.hero-offer-card img {
  width: 32px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.hero-offer-card strong,
.hero-offer-card small {
  display: block;
  overflow-wrap: normal;
  line-height: 1.1;
}

.hero-offer-card strong {
  color: var(--nw-ink);
  font-size: 0.49rem;
  font-weight: 900;
}

.hero-offer-card small {
  margin-top: 5px;
  color: var(--nw-red);
  font-size: 0.48rem;
  font-weight: 900;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.home-feature-card {
  position: relative;
  min-height: 154px;
  display: grid;
  align-content: start;
  justify-items: start;
  padding: 14px 12px;
  overflow: hidden;
  border: 0;
  border-radius: var(--nw-radius);
  color: var(--nw-ink);
  text-align: left;
  box-shadow: var(--nw-shadow-sm);
}

.home-feature-card.find-card {
  background: #fff0f2;
}

.home-feature-card.list-card {
  background: #edf8f5;
}

.home-feature-card.recipe-card-home {
  background: #fff4ec;
}

.home-feature-card.win-card {
  background: #f5effa;
}

.home-feature-card strong {
  max-width: 112px;
  margin: 9px 0 0;
  color: var(--nw-ink);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.12;
}

.home-feature-card small {
  position: relative;
  z-index: 2;
  max-width: 108px;
  margin-top: 6px;
  color: #4f5055;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.3;
}

.home-feature-card > img {
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 98px;
  height: 98px;
  object-fit: contain;
  filter: none;
}

.home-feature-card.recipe-card-home > img {
  right: -5px;
  bottom: -4px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(93, 52, 20, 0.13);
}

.home-feature-card.list-card > img {
  right: -12px;
  width: 92px;
  height: 116px;
  object-fit: cover;
  object-position: top left;
  border-radius: 14px 0 0 0;
  box-shadow: -5px 0 12px rgba(22, 22, 24, 0.08);
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 22, 24, 0.08);
  border-radius: 7px;
  background: #fff;
  color: var(--nw-red);
}

.feature-icon::before {
  font-size: 1rem;
  font-weight: 900;
}

.search-icon::before {
  content: "Q";
}

.list-icon::before {
  content: "≡";
}

.route-icon::before {
  content: "⌂";
}

.gift-icon::before {
  content: "+";
}

.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}

.home-stat-card {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--nw-ink);
  text-align: center;
}

.home-stat-card + .home-stat-card {
  border-left: 1px solid var(--nw-line);
}

.home-stat-card > span {
  color: var(--nw-red);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
}

.home-stat-card strong {
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.08;
}

.home-stat-card small {
  max-width: 64px;
  color: var(--nw-muted);
  font-size: 0.47rem;
  font-weight: 650;
  line-height: 1.2;
}

body[data-active-screen="presence"] .shopping-list-card,
body[data-active-screen="presence"] .current-shop-card,
body[data-active-screen="presence"] .shop-quick-actions {
  margin: 0 0 12px;
  padding: 15px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}

.list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.list-header h2,
.current-shop-card h2 {
  margin: 0;
  color: var(--nw-ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.2;
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
  gap: 7px;
}

.list-tools select {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d9d9de;
  border-radius: 999px;
  background: #fff;
  color: var(--nw-ink);
  font-size: 0.85rem;
  font-weight: 900;
}

.list-primary-actions,
.list-action-row,
.action-footer,
.current-shop-secondary,
.route-actions,
.scan-actions {
  display: grid;
  gap: 8px;
}

body[data-active-screen="presence"] .list-primary-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-active-screen="presence"] .list-primary-actions .action-button {
  min-width: 0;
  min-height: 48px;
  padding: 7px;
  font-size: 0.61rem;
}

.action-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.25);
}

.shopping-list-body {
  display: grid;
  gap: 9px;
}

.empty-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  padding: 17px;
  border-style: dashed;
  background: #fafafa;
}

.empty-list h3,
.empty-list strong {
  margin: 0;
  color: var(--nw-ink);
  font-size: 0.95rem;
  font-weight: 850;
}

.empty-list p {
  margin: 0;
  color: var(--nw-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.empty-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.shop-quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.current-shop-card {
  display: grid;
  gap: 13px;
}

.current-shop-loading,
.current-shop-main {
  display: grid;
  gap: 5px;
}

.current-shop-progress-track,
.progress-track,
.trophy-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececef;
}

.current-shop-progress,
#progressFill,
.trophy-progress > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--nw-green);
}

.parent-bar.shelfquest-bottom-nav {
  position: fixed;
  z-index: 90;
  right: auto;
  bottom: 0;
  left: 50%;
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 7px 14px max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 0;
  border-top: 1px solid var(--nw-line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(22, 22, 24, 0.08);
  backdrop-filter: blur(18px);
}

.parent-bar.shelfquest-bottom-nav button,
.parent-bar.shelfquest-bottom-nav .floating-scan-button {
  position: relative;
  top: auto;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 4px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #707177;
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav button img,
.parent-bar.shelfquest-bottom-nav .floating-scan-button img {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: grayscale(1) brightness(0.35);
  box-shadow: none;
}

.parent-bar.shelfquest-bottom-nav button span,
.parent-bar.shelfquest-bottom-nav .floating-scan-button span {
  margin: 0;
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1;
}

.parent-bar.shelfquest-bottom-nav button.active {
  background: transparent;
  color: var(--nw-red);
  box-shadow: inset 0 -2px 0 var(--nw-red);
}

.parent-bar.shelfquest-bottom-nav button.active img {
  filter: sepia(1) saturate(8) hue-rotate(315deg) brightness(0.82);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button::before {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 50px;
  height: 50px;
  transform: translateX(-50%);
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--nw-red);
  box-shadow: 0 8px 20px rgba(227, 24, 55, 0.28);
  content: "";
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button img {
  position: relative;
  z-index: 1;
  top: -9px;
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.parent-bar.shelfquest-bottom-nav .floating-scan-button span {
  position: relative;
  top: -7px;
}

body.login-active .parent-bar,
body[data-active-screen="expandedMap"] .parent-bar {
  display: none;
}

.quick-map-button {
  position: fixed;
  z-index: 78;
  top: auto;
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: var(--nw-red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(227, 24, 55, 0.28);
}

.quick-map-button {
  display: none !important;
}

.quick-map-button img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.quick-map-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.toast {
  position: fixed;
  z-index: 140;
  right: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  transform: translateX(50%) translateY(18px);
  border-radius: var(--nw-radius);
  background: #202023;
  color: #fff;
  font-size: 0.79rem;
  font-weight: 750;
  box-shadow: var(--nw-shadow-md);
}

/* Final narrow-device corrections must stay last because the legacy stylesheet
   contains older breakpoint blocks with higher source-order precedence. */
.home-feature-card > img,
.home-feature-card.list-card > img,
.home-feature-card.recipe-card-home > img {
  right: 0;
}

@media (max-width: 374px) {
  body[data-active-screen="presence"] .list-primary-actions,
  .list-action-row,
  .route-actions {
    grid-template-columns: 1fr;
  }

  .home-feature-card > img {
    width: 84px;
    height: 84px;
  }

  .home-feature-card.list-card > img {
    width: 80px;
    height: 108px;
  }

  .home-feature-card.recipe-card-home > img {
    width: 92px;
    height: 92px;
  }
}

@media (max-width: 339px) {
  .home-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stat-card:nth-child(3) {
    border-top: 1px solid var(--nw-line);
    border-left: 0;
  }

  .home-stat-card:nth-child(4) {
    border-top: 1px solid var(--nw-line);
  }

  .recipe-controls {
    position: static;
    grid-template-columns: 1fr;
  }

  .recipe-controls label,
  .recipe-controls input {
    grid-column: 1;
  }
}

.shopper-feedback {
  padding: 1rem;
}

.shopper-feedback > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  align-content: center;
}

.shopper-feedback form {
  display: grid;
  gap: .65rem;
}

.shopper-feedback form :is(textarea, input) {
  width: 100%;
  min-width: 0;
}

.shopper-feedback form button {
  justify-self: start;
}

/* Fixed kiosks and landscape floor plans */
body.assigned-kiosk [data-home-chip="store"],
body.assigned-kiosk #navStoreButton,
body.assigned-kiosk #mapStartButton {
  display: none;
}

.kiosk-location-marker circle {
  fill: #1746a2;
  stroke: #fff;
  stroke-width: 0.4;
}

.kiosk-location-key,
.kiosk-product-key {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-inline-end: 0.25rem;
  border-radius: 50%;
  background: #1746a2;
}

.kiosk-product-key {
  background: #e31837;
}

.store-map-visual .store-map-highlight.product .kiosk-product-pulse {
  fill: none;
  stroke: #b90026;
  stroke-width: 0.4;
  transform-box: fill-box;
  transform-origin: center;
  animation: kiosk-product-sonar 1.8s ease-out infinite;
}

@keyframes kiosk-product-sonar {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .store-map-visual .store-map-highlight.product .kiosk-product-pulse {
    animation: none;
    transform: scale(1.5);
  }
}

#expandedMapCanvas {
  width: var(--expanded-map-width, 100%);
}

@media (orientation: landscape) and (min-width: 900px) {
  .expanded-map-header {
    width: min(100%, 1100px);
    margin-inline: auto;
  }

  #expandedMapViewport {
    container-type: size;
    height: 100%;
    max-height: none;
    overflow: auto;
  }

  #expandedMapCanvas {
    min-width: 0;
    margin-inline: auto;
    width: min(var(--expanded-map-width, 100%), calc(max(260px, 100cqh - 52px) * (var(--expanded-map-aspect, 4 / 3)) * var(--expanded-map-zoom, 1)));
  }
}
