:root {
  --bg: #f7fbf0;
  --surface: #ffffff;
  --surface-soft: #eef6ea;
  --surface-deep: #dcebdd;
  --ink: #172016;
  --muted: #64705f;
  --line: #dfe8da;
  --green: #0f7a2b;
  --green-deep: #0a6520;
  --green-soft: #e8f5e8;
  --orange: #ff9f2f;
  --orange-deep: #a75d00;
  --shadow: 0 24px 70px rgba(23, 32, 22, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 159, 47, 0.12), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(15, 122, 43, 0.12), transparent 30rem),
    linear-gradient(180deg, #fbfff7 0%, var(--bg) 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 14px auto calc(96px + env(safe-area-inset-bottom));
}

.startup-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 180px;
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.startup-logo,
.logo-mark,
.stat-icon,
.icon-tile {
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
}

.startup-logo {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-weight: 900;
}

.topbar,
.tabs,
.hero,
.panel,
.bottom-nav,
.product-card,
.shop-card,
.cart-row,
.quote-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.logo-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 18px;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.brand-subtitle {
  margin-top: 2px;
  font-weight: 800;
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  border-radius: 50%;
  background: #26b35c;
  box-shadow: 0 0 0 6px rgba(38, 179, 92, 0.12);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(247, 251, 240, 0.9);
  color: #3f4a3b;
  font-weight: 900;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(247, 251, 240, 0.9);
  color: var(--green);
  font-size: 20px;
}

.tabs {
  position: sticky;
  top: 94px;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin: 18px 0;
  padding: 12px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
}

.tab-button,
.bottom-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border-radius: 20px;
  background: transparent;
  color: #475146;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tab-button:hover,
.bottom-button:hover {
  transform: translateY(-1px);
}

.tab-button.is-active {
  background: linear-gradient(180deg, #f8fff7, #eaf5e9);
  color: var(--green);
  box-shadow: inset 0 0 0 1px #d6e8d6;
}

.tab-icon,
.nav-icon {
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.tab-icon svg,
.nav-icon svg,
.stat-icon svg,
.icon-button svg,
.icon-tile svg {
  width: 22px;
  height: 22px;
}

.hero {
  padding: 28px 30px;
  border-radius: var(--radius-xl);
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero h2 {
  margin-bottom: 6px;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.06em;
}

.primary-button,
.add-button,
.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(180deg, #2f8b3b, var(--green-deep));
  font-weight: 1000;
  box-shadow: 0 18px 34px rgba(15, 122, 43, 0.18);
}

.ghost-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  transition: transform 0.18s ease, color 0.18s ease;
}

.stat:hover,
.stat:focus-visible {
  color: var(--green);
  transform: translateY(-1px);
}

.stat:first-child {
  padding-left: 0;
}

.stat:last-child {
  border-right: 0;
  padding-right: 0;
}

.stat-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 17px;
  font-size: 20px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.panel {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.toolbar {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.85fr;
  gap: 12px;
  margin-bottom: 18px;
}

.search-box,
.select-box {
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbf4;
  color: var(--ink);
  outline: 0;
}

.search-box {
  padding: 0 18px;
}

.select-box {
  padding: 0 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  min-height: 150px;
  padding: 14px;
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(23, 32, 22, 0.06);
}

.product-image {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--surface-soft);
  align-self: start;
}

.product-title {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.product-meta,
.variant-line,
.small-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.variant-line {
  margin: 6px 0;
}

.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.price {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
  font-weight: 1000;
}

.shop-chip,
.category-chip,
.orange-chip,
.verification-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.shop-chip {
  background: var(--green-soft);
  color: var(--green-deep);
}

.category-chip {
  background: #edf2e8;
  color: #526050;
}

.orange-chip {
  background: #fff0db;
  color: var(--orange-deep);
}

.verification-chip.is-green {
  background: #eaf7e8;
  color: var(--green-deep);
}

.verification-chip.is-blue {
  background: #eef5ff;
  color: #205a96;
}

.verification-chip.is-yellow {
  background: #fff5d8;
  color: #8a5600;
}

.verification-chip.is-grey {
  background: #eef1eb;
  color: #687265;
}

.verification-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.add-button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 14px;
  font-size: 13px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 950;
}

.qty-control button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--green);
  background: #fff;
  font-weight: 1000;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.suggestions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.icon-tile {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
}

.cart-row img {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface-soft);
}

.remove-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff2f0;
  color: #b53525;
  font-weight: 1000;
}

.quote-card {
  position: sticky;
  top: 174px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7fff4, #ffffff);
}

.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  color: var(--muted);
  font-weight: 800;
}

.quote-total {
  color: var(--ink);
  font-size: 24px;
  font-weight: 1000;
}

.checkout-button {
  width: 100%;
  margin-top: 12px;
}

.checkout-section {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(247, 251, 240, 0.72);
}

.checkout-note {
  min-height: 88px;
  padding: 14px 18px;
  resize: vertical;
}

.pickup-note {
  padding: 12px;
  border-radius: 16px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.confirmation-card,
.history-card {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #f7fff4, #ffffff);
  box-shadow: 0 14px 40px rgba(23, 32, 22, 0.055);
}

.confirmation-card {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.confirmation-card strong {
  color: var(--green-deep);
  font-size: 20px;
}

.confirmation-card span {
  color: var(--muted);
  font-weight: 850;
}

.history-card {
  padding: 14px;
}

.history-heading,
.history-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-heading {
  margin-bottom: 10px;
}

.history-heading span {
  color: var(--green-deep);
  font-weight: 1000;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-row {
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.history-row span,
.history-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.shop-card {
  padding: 18px;
  border-radius: 24px;
}
.shop-media {
  position: relative;
  margin: 0 0 14px;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
}
.shop-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.shop-card:hover .shop-media img { transform: scale(1.05); }
.shop-chip-onmedia {
  position: absolute;
  top: 10px;
  left: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

.shop-card.is-selected {
  box-shadow: inset 0 0 0 2px rgba(15, 122, 43, 0.18), 0 20px 48px rgba(23, 32, 22, 0.08);
}

.shop-card-top,
.shop-meta-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.shop-card-top {
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.shop-meta-list {
  margin: 10px 0;
}

.shop-meta-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.shop-card h3 {
  margin-bottom: 6px;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.farm-map-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(260px, 1.22fr);
  gap: 14px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(234, 247, 232, 0.9), rgba(255, 255, 255, 0.94));
  box-shadow: var(--shadow-soft);
}

.farm-map-copy h3 {
  margin: 10px 0 6px;
  letter-spacing: -0.04em;
}

.farm-map-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 850;
}

.farm-map-frame {
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.farm-map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.pagination-bar.is-compact {
  margin-top: 16px;
}

.pagination-bar strong {
  color: var(--green-deep);
}

.pagination-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state,
.error-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 30;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  width: min(560px, calc(100% - 20px));
  padding: 8px;
  border-radius: 28px;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.bottom-button {
  min-height: 54px;
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.ration-panel {
  overflow: hidden;
}

.ration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.ration-hero h2 {
  margin-bottom: 8px;
}

.ration-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.ration-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.ration-empty,
.ration-result {
  margin-top: 16px;
}

.ration-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 850;
}

.ration-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.ration-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7fff4, #eef7eb);
}

.ration-summary div {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ration-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  line-height: 1;
}

.nutrition-bar {
  height: 12px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.nutrition-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--green));
}

.ration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.ration-actions .checkout-button,
.ration-actions .ghost-button {
  width: auto;
  flex: 1 1 220px;
}

.ration-list {
  display: grid;
  gap: 10px;
}

.ration-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
}

.ration-item img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface-soft);
}

.ration-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.ration-item-total {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 92px;
}

.ration-item-total strong {
  color: var(--green);
}

.ration-item-total span {
  font-weight: 1000;
}

.ration-item-total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.lead-actions-compact {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.lead-mode-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbf4);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 44px rgba(23, 32, 22, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.lead-mode-card:hover {
  transform: translateY(-2px);
}

.lead-mode-card.is-active {
  border-color: rgba(15, 122, 43, 0.38) !important;
  background: linear-gradient(180deg, #f2fff0, #e5f5e3) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 122, 43, 0.12), 0 18px 44px rgba(15, 122, 43, 0.08);
}
html[data-theme="dark"] .lead-mode-card.is-active {
  background: var(--green-soft) !important; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)) !important;
}

.lead-mode-card strong,
.lead-mode-card span {
  display: block;
}

.lead-mode-card strong {
  font-size: 16px;
  line-height: 1.12;
}

.lead-mode-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.lead-mode-card.is-compact {
  min-height: 92px;
}

.lead-panel {
  overflow: hidden;
}

.lead-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lead-heading h2 {
  margin-bottom: 8px;
}

.success-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 1000;
}

.lead-form,
.delivery-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.lead-form .checkout-button,
.lead-form .lead-note,
.delivery-form .checkout-button,
.delivery-form .lead-note,
.legal-note {
  grid-column: 1 / -1;
}

.lead-note {
  min-height: 110px;
  padding: 14px 18px;
  resize: vertical;
}

.legal-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 850;
}

.delivery-info-grid,
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.mini-info-card,
.legal-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 32px rgba(23, 32, 22, 0.045);
}

.mini-info-card {
  display: grid;
  gap: 5px;
}

.mini-info-card strong,
.legal-card h3 {
  color: var(--green-deep);
}

.mini-info-card span,
.legal-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.legal-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 4px;
}

.link-button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.consent-status,
.consent-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.consent-status span,
.consent-pills span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 950;
}

.consent-banner {
  position: fixed;
  left: 16px;
  right: auto;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: min(320px, calc(100% - 32px));
  max-height: min(280px, calc(100dvh - 32px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.consent-banner h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.consent-banner p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.bottom-button.is-active {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 16px 30px rgba(255, 159, 47, 0.28);
  transform: translateY(-3px) scale(1.01);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 40;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(23, 32, 22, 0.92);
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.floating-cart {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 80;
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--orange), #bd6f09);
  box-shadow: 0 20px 45px rgba(167, 93, 0, 0.28);
}

.floating-cart.is-visible {
  display: inline-flex;
}

.floating-cart svg {
  width: 18px;
  height: 18px;
}

.floating-cart strong {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.floating-cart em {
  font-style: normal;
  font-weight: 1000;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin-bottom: 4px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.market-toolbar {
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 0.8fr) minmax(120px, 0.9fr) minmax(120px, 0.8fr);
}

.farm-toolbar {
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 0.85fr) minmax(160px, 1fr);
}

.section-subtitle {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-card .price {
  color: var(--green-deep);
}

.split-line {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.market-plan-box {
  display: grid;
  gap: 8px;
}

.plan-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-select {
  min-height: 40px;
  border-radius: 14px;
  font-size: 12px;
}

.plan-lines {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.plan-lines div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.assortment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.assortment-list span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
}

.empty-state.is-compact {
  padding: 10px;
  border-radius: 14px;
  font-size: 12px;
}

.city-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(23, 32, 22, 0.22);
  backdrop-filter: blur(12px);
}

.language-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(23, 32, 22, 0.26);
  backdrop-filter: blur(14px);
}

.language-modal.is-open {
  display: flex;
}

.language-sheet {
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.language-sheet h2 {
  margin-bottom: 8px;
}

.language-sheet p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 800;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.language-option {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbf4;
  color: var(--ink);
  text-align: left;
}

.language-option strong {
  color: var(--green);
  font-size: 18px;
}

.language-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.language-option.is-active {
  border-color: rgba(15, 122, 43, 0.3);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 122, 43, 0.08);
}

.city-picker-modal.is-open {
  display: flex;
}

.city-picker-sheet {
  width: min(620px, 100%);
  max-height: min(76dvh, 680px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.city-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.city-picker-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  margin-top: 12px;
  overflow: auto;
  padding-right: 4px;
}

.city-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.city-option.is-active {
  border-color: rgba(15, 122, 43, 0.28);
  background: var(--green-soft);
  color: var(--green-deep);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-card {
  display: grid;
  gap: 10px;
  min-height: 136px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.settings-card strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf7ff;
  color: #24618b;
  font-size: 9.5px;
  font-weight: 950;
  white-space: nowrap;
}

.source-chip.is-fallback {
  background: #f1f5eb;
  color: var(--muted);
}

/* Compact Telegram Mini App density, closer to the reference dashboard. */
.app-shell {
  width: min(1040px, calc(100% - 22px));
  margin-top: 10px;
}

.topbar {
  padding: 12px 14px;
  border-radius: 24px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.brand h1 {
  font-size: clamp(18px, 2.5vw, 24px);
}

.pill,
.icon-button {
  min-height: 38px;
  border-radius: 15px;
  font-size: 13px;
}

.icon-button {
  width: 40px;
  height: 40px;
}

.tabs {
  top: 76px;
  gap: 6px;
  margin: 10px 0;
  padding: 7px;
  border-radius: 22px;
}

.tab-button {
  min-height: 42px;
  border-radius: 16px;
  font-size: 13px;
}

.hero {
  padding: 18px;
  border-radius: 24px;
}

.hero h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 4px;
}

.hero .muted {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.42;
}

.primary-button,
.add-button,
.checkout-button {
  min-height: 40px;
  border-radius: 15px;
  font-size: 13px;
}

.stats-grid {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 16px;
  padding-top: 14px;
}

.stat {
  gap: 8px;
  padding: 0 10px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.stat strong {
  font-size: 20px;
}

.panel {
  margin-top: 12px;
  padding: 16px;
  border-radius: 24px;
}

.search-box,
.select-box {
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
}

.search-box {
  padding: 0 13px;
}

.select-box {
  padding: 0 10px;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.product-card {
  grid-template-columns: 64px 1fr;
  gap: 10px;
  min-height: 118px;
  padding: 10px;
  border-radius: 18px;
}

.product-image {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.product-title {
  font-size: 14px;
}

.product-meta,
.variant-line,
.small-note,
.verification-note {
  font-size: 10.5px;
}

.shop-chip,
.category-chip,
.orange-chip,
.verification-chip {
  min-height: 21px;
  padding: 0 7px;
  font-size: 9.5px;
}

.price {
  font-size: 19px;
}

.add-button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 11px;
}

.quote-card {
  top: 130px;
  padding: 14px;
  border-radius: 20px;
}

.bottom-nav {
  width: min(500px, calc(100% - 18px));
  padding: 6px;
  border-radius: 23px;
}

.bottom-button {
  min-height: 46px;
  border-radius: 16px;
  font-size: 7px;
}

.bottom-button.is-active {
  transform: translateY(-2px) scale(1.005);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 560px);
    margin-top: 8px;
  }

  .topbar {
    top: 6px;
  }

  .top-actions .pill:nth-child(2) {
    display: none;
  }

  .tabs {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .hero-main,
  .search-layout,
  .lead-heading,
  .ration-hero,
  .consent-banner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat {
    padding: 0;
    border-right: 0;
  }

  .toolbar,
  .market-toolbar,
  .farm-toolbar {
    grid-template-columns: 1fr;
  }

  .farm-map-panel {
    grid-template-columns: 1fr;
  }

  .farm-map-frame,
  .farm-map-frame iframe {
    min-height: 210px;
  }

  .pagination-bar {
    align-items: stretch;
  }

  .pagination-actions,
  .pagination-bar .compact-select {
    width: 100%;
  }

  .pagination-actions .ghost-button {
    flex: 1;
  }

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

  .lead-form,
  .ration-form,
  .delivery-form,
  .ration-summary,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .consent-actions {
    min-width: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .quote-card {
    position: static;
  }
}

@media (max-width: 520px) {
  .brand h1 {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 13px;
  }

  .logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  .top-actions .pill {
    display: none;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero-main {
    gap: 12px;
  }

  .lead-actions-compact {
    display: none;
  }

  .panel-heading {
    display: grid;
  }

  .bottom-nav {
    width: min(560px, calc(100% - 12px));
    padding: 5px;
    border-radius: 22px;
  }

  .bottom-button {
    min-height: 44px;
    border-radius: 15px;
    font-size: 6.5px;
    gap: 2px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .bottom-button.is-active {
    transform: translateY(-2px) scale(1.005);
  }

  .consent-banner {
    right: 8px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    padding: 12px;
    border-radius: 20px;
  }

  .city-picker-modal {
    padding: 10px;
  }

  .city-picker-sheet {
    max-height: 80dvh;
    padding: 14px;
    border-radius: 24px;
  }

  .city-picker-list {
    max-height: 54dvh;
  }

  .language-modal {
    padding: 10px;
  }

  .language-sheet {
    padding: 16px;
    border-radius: 24px;
  }

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

  .language-option {
    min-height: 62px;
    border-radius: 15px;
  }

  .cart-row {
    grid-template-columns: 58px 1fr;
  }

  .cart-row img {
    width: 58px;
    height: 58px;
  }

  .cart-row .remove-button {
    grid-column: 2;
    justify-self: end;
  }

  .ration-item {
    grid-template-columns: 56px 1fr;
  }

  .ration-item img {
    width: 56px;
    height: 56px;
  }

  .ration-item-total {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    justify-items: start;
    min-width: 0;
  }
}

/* =====================================================================
   SaleGermany — 2026 fresh-market redesign overlay
   Appended last so it wins by cascade order. Reversible: delete from here.
   Matches the green grocery storefront reference (vertical product cards,
   image-on-white, corner badges, full-width add button, soft action chips).
   ===================================================================== */
:root {
  --green: #1f8f3a;
  --green-deep: #0c6b27;
  --green-soft: #e7f4e8;
  --bg: #f3f8ee;
  --sand: #fbf3e2;
  --sand-deep: #f3e6c9;
  --ink: #18241a;
  --muted: #6b7866;
  --line: #e3ebdd;
  --sale: #e23b3b;
  --shadow: 0 18px 50px rgba(20, 40, 22, 0.08);
  --shadow-card: 0 10px 30px rgba(20, 40, 22, 0.07);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

body {
  background:
    radial-gradient(120% 60% at 8% 0%, rgba(31, 143, 58, 0.07), transparent 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(255, 175, 64, 0.08), transparent 55%),
    linear-gradient(180deg, #fbfdf7 0%, var(--bg) 100%);
}

/* ---- Top bar ---- */
.topbar {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 34px rgba(20, 40, 22, 0.07);
}
.logo-mark,
.startup-logo,
.stat-icon,
.icon-tile {
  color: #fff;
  background: linear-gradient(160deg, #36ac51, var(--green-deep));
  box-shadow: 0 8px 20px rgba(12, 107, 39, 0.22);
}
.brand h1 { letter-spacing: -0.03em; }
.pill {
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: transparent;
}
.icon-button {
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: transparent;
  transition: transform 0.16s ease, background 0.16s ease;
}
.icon-button:hover { transform: translateY(-1px); background: #d8eedb; }

/* ---- Tabs (top) — soft Jarvis-style chips ---- */
.tabs { background: rgba(255, 255, 255, 0.9); border-radius: 22px; }
.tab-button {
  border-radius: 14px;
  color: #51624f;
  background: transparent;
}
.tab-button:hover { background: #f0f7ee; transform: translateY(-1px); }
.tab-button.is-active {
  color: var(--green-deep);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(31, 143, 58, 0.2);
}

/* ---- Hero banner ---- */
.hero {
  border-radius: var(--radius-xl);
  border: 1px solid var(--sand-deep);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(54, 172, 81, 0.1), transparent 60%),
    linear-gradient(135deg, var(--sand) 0%, #fffdf6 70%);
  box-shadow: var(--shadow);
}
.hero .eyebrow,
.eyebrow { color: var(--green-deep); }
.hero h2 { letter-spacing: -0.04em; color: var(--ink); }
.stats-grid { border-top: 1px solid rgba(20, 40, 22, 0.08); }
.stat { border-right-color: rgba(20, 40, 22, 0.08); }

/* ---- Buttons ---- */
.primary-button,
.add-button,
.checkout-button {
  border-radius: 14px;
  background: linear-gradient(180deg, #2ea64a, var(--green-deep));
  box-shadow: 0 12px 26px rgba(12, 107, 39, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.primary-button:hover,
.add-button:hover,
.checkout-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 30px rgba(12, 107, 39, 0.28);
}
.primary-button:active,
.add-button:active,
.checkout-button:active { transform: translateY(0); }
.ghost-button {
  border-radius: 13px;
  border-color: var(--line);
  background: #fff;
  color: var(--green-deep);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.ghost-button:hover { transform: translateY(-1px); border-color: #b9d7bd; background: #f6fbf4; }

/* ---- Toolbar / filters ---- */
.panel {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}
.search-box,
.select-box {
  border-radius: 13px;
  background: #f6faf2;
  border-color: var(--line);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.search-box:focus,
.select-box:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 143, 58, 0.12);
}

/* ---- Product grid + cards: vertical storefront layout ---- */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 16px;
}
.product-card,
.product-card.market-card {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: #cfe6d2;
  box-shadow: 0 20px 44px rgba(20, 40, 22, 0.12);
}
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.product-card .product-image {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  background: var(--surface-soft);
  align-self: stretch;
  transition: transform 0.25s ease;
}
.product-card:hover .product-image { transform: scale(1.04); }
.media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.01em;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}
.media-badge.is-sale { background: linear-gradient(180deg, #f4564f, var(--sale)); }
.media-badge.is-organic { background: linear-gradient(180deg, #36ac51, var(--green-deep)); }
.media-badge.is-lowest { top: auto; bottom: 10px; left: 10px; background: linear-gradient(180deg, #ff8a33, #e8553a); font-size: 10px; }
.product-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 13px 14px;
}
.product-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.product-card .price { font-size: 21px; color: var(--green-deep); }
.unit-price { font-size: 12px; font-weight: 700; color: #0c6b27; margin-top: 1px; }
.alert-cta { display: block; width: 100%; margin: 4px 0 12px; padding: 12px 16px; border-radius: 14px;
  border: 1px dashed #f2a33c; background: rgba(242,163,60,.1); color: #a85d00; font: inherit; font-weight: 800;
  cursor: pointer; transition: .18s; text-align: center; }
.alert-cta:hover { background: rgba(242,163,60,.18); }
html[data-theme="dark"] .alert-cta { color: #f2b85c; background: rgba(242,184,92,.1); border-color: rgba(242,184,92,.4); }
html[data-theme="dark"] .unit-price { color: var(--green-deep) !important; }
.product-card .price-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
.product-card .price-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.product-card .add-button {
  flex: 1 1 100%;
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  font-size: 13px;
}
.product-card .qty-control {
  flex: 1 1 100%;
  width: 100%;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--green-soft);
}
.product-card .qty-control button {
  width: 30px;
  height: 30px;
  background: #fff;
  color: var(--green-deep);
  box-shadow: 0 2px 6px rgba(12, 107, 39, 0.14);
}
.small-note s { color: #98a394; }

/* ---- Chips ---- */
.shop-chip { background: var(--green-soft); color: var(--green-deep); }
.category-chip { background: #eef3e9; color: #5b6957; }
.orange-chip { background: #fff1d9; color: #a85d00; }
.source-chip { background: #eef5fb; color: #2f6699; }

/* ---- Floating cart + bottom nav ---- */
.floating-cart {
  background: linear-gradient(180deg, #2ea64a, var(--green-deep));
  box-shadow: 0 18px 40px rgba(12, 107, 39, 0.32);
}
.bottom-nav { background: rgba(255, 255, 255, 0.94); }
.bottom-button.is-active {
  background: linear-gradient(180deg, #2ea64a, var(--green-deep));
  box-shadow: 0 14px 26px rgba(12, 107, 39, 0.3);
}

/* ---- Shop cards ---- */
.shop-card {
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 40, 22, 0.1); }

@media (max-width: 820px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Brand logo glyph inside the green tiles (header + splash) */
.logo-mark .brand-logo { width: 60%; height: 60%; }
.startup-logo .brand-logo { width: 58%; height: 58%; }
.brand-logo { display: block; }

/* =====================================================================
   $10K refinement layer — typography, hierarchy, motion, a11y, mobile.
   Appended last so it wins the cascade. Display: Fraunces. Body: Hanken Grotesk.
   ===================================================================== */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink-2: #3a463640;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Editorial display type for the big headings only (cards stay grotesque). */
.startup-card h1,
.section-head h2,
.market-toolbar ~ * h2,
h1, h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.06;
}
h1, .startup-card h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1rem + 1.8vw, 2.15rem); }

/* Eyebrow / kicker — quiet, tracked, confident POV signal. */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--green);
}

/* Card titles: grotesque, tight, readable at density. */
.product-title { font-family: var(--font-body); font-weight: 700; letter-spacing: -0.01em; }
.muted, .product-meta, .variant-line, .small-note { color: var(--muted); }

/* Hierarchy that breathes — section rhythm. */
.section-head { margin-bottom: 6px; }
.market-toolbar { gap: 10px; }

/* Prices read as the primary signal. */
.price { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

/* ---- Motion that whispers (guarded by reduced-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px) scale(0.995); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .reveal.is-visible { opacity: 1; transform: none; }
  .product-card { transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.32s ease, border-color 0.32s ease; }
  .product-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(15, 122, 43, 0.14); }
  .add-button, .primary-button, .ghost-button { transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
  .add-button:active, .primary-button:active { transform: translateY(1px) scale(0.98); }
  [data-screen] { transition: color 0.2s ease, background 0.2s ease; }
}

/* ---- The invisible expensive stuff: focus + a11y ---- */
:focus-visible {
  outline: 2.5px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}
a, .link-button { color: var(--green-deep); }

/* ---- Mobile: deliberate, not shrunk ---- */
@media (max-width: 640px) {
  .app-shell { width: calc(100% - 18px); margin: 8px auto calc(92px + env(safe-area-inset-bottom)); }
  h1, .startup-card h1 { font-size: clamp(1.7rem, 1.2rem + 4vw, 2.3rem); }
  h2 { font-size: clamp(1.3rem, 1rem + 3vw, 1.7rem); }
  /* Toolbar stacks into full-width controls — designed for thumb reach. */
  .market-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .market-toolbar .search-box { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-title { font-size: 0.95rem; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Search screen: input + chain selector row */
.search-filter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.search-filter-row .search-box { flex: 1 1 auto; width: auto !important; min-width: 0; }
.search-filter-row .select-box { flex: 0 0 210px; width: 210px !important; min-width: 0; }
@media (max-width: 640px) {
  .search-filter-row { flex-direction: column; align-items: stretch; }
  .search-filter-row .search-box,
  .search-filter-row .select-box { width: 100% !important; flex: 1 1 auto; }
}

/* OFF full-catalog (non-promo) item badge */
.media-badge.is-catalog { background: rgba(28,52,38,.78); color: #fff; }

/* Delivery = survey: banner + "soon" lead-card badge */
.survey-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px;
  background: rgba(242,163,60,.12); border: 1px solid rgba(242,163,60,.32); margin: 8px 0 14px; }
.survey-banner .survey-emoji { font-size: 22px; line-height: 1; }
.survey-banner strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.survey-banner p { margin: 0; font-size: 12.8px; color: var(--muted, #5d6f63); line-height: 1.45; }
.lead-mode-card.is-soon { position: relative; }
.lead-mode-card.is-soon strong { padding-right: 104px; }
.soon-badge { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; white-space: nowrap;
  background: rgba(242,163,60,.16); color: #b06a12; border: 1px solid rgba(242,163,60,.4); }

/* Account / auth cabinet */
.auth-tabs { display: flex; gap: 8px; margin: 6px 0 12px; }
.auth-tab { flex: 1; border: 1px solid #d7e6d8; background: #fff; color: #5d6f63; font-weight: 700; padding: 11px; border-radius: 12px; cursor: pointer; transition: .18s; font: inherit; }
.auth-tab.is-active { background: linear-gradient(160deg,#2bb35a,#0c6b27) !important; color: #fff !important; border-color: transparent !important; }
.auth-tab:not(.is-active):hover { border-color: #2bb35a; color: #0c6b27; }

/* ===== Рацион 2.0 ===== */
.goal-row { display: flex; gap: 10px; margin: 6px 0 14px; flex-wrap: wrap; }
.goal-card { flex: 1; min-width: 140px; cursor: pointer; border: 1px solid #d7e6d8; background: #fff;
  border-radius: 16px; padding: 14px 16px; text-align: left; font: inherit; transition: .18s; display: flex; flex-direction: column; gap: 3px; }
.goal-card strong { font-size: 15px; }
.goal-card span { font-size: 12px; color: #5d6f63; }
.goal-card.is-active { background: linear-gradient(160deg,#2bb35a,#0c6b27) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 12px 26px -14px rgba(12,107,39,.7); }
.goal-card.is-active strong { color: #fff !important; }
.goal-card.is-active span { color: rgba(255,255,255,.85) !important; }
.meal-controls { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.slider-field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.slider-field label { font-size: 13px; font-weight: 600; color: #3a4a40; }
.slider-field label b { color: #0c6b27; }
.slider-field input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 6px; background: linear-gradient(90deg,#2bb35a,#7bd389); }
.slider-field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #2bb35a; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.plan-summary { display: flex; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.plan-stat { flex: 1; min-width: 100px; background: #f1f7ee; border: 1px solid #e0ecdd; border-radius: 14px; padding: 12px 14px; }
.plan-stat span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #5d6f63; }
.plan-stat strong { font-size: 22px; color: #0c6b27; }
.plan-stat.over strong { color: #e8553a; }
.store-compare { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.store-opt { flex: 1; min-width: 200px; border-radius: 16px; padding: 14px 16px; border: 1px solid #e0ecdd; }
.store-opt.cheapest { background: linear-gradient(160deg,#eaf7ee,#f4faf1); border-color: #b8e0c2; }
.store-opt.onestore { background: #fff; }
.store-opt-head { display: flex; justify-content: space-between; align-items: baseline; }
.store-opt-head strong { font-size: 14.5px; }
.store-total { font-family: "Fraunces", serif; font-weight: 700; font-size: 22px; color: #0c6b27; }
.store-opt-note { font-size: 12.5px; color: #5d6f63; margin-top: 4px; }
.store-opt-note em { color: #e8553a; font-style: normal; font-weight: 700; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 14px; margin-bottom: 8px; }
.dish-card { border: 1px solid #e6efe3; border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .2s; }
.dish-card:hover { transform: translateY(-4px); }
.dish-media { position: relative; aspect-ratio: 1/.7; background: #eef5ea; overflow: hidden; }
.dish-media img { width: 100%; height: 100%; object-fit: cover; }
.dish-kcal { position: absolute; bottom: 8px; left: 8px; background: rgba(12,107,39,.9); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 9px; }
.dish-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.dish-body h4 { font-size: 14px; line-height: 1.2; }
.dish-macros { font-size: 11.5px; font-weight: 700; color: #2bb35a; }
.dish-ings { font-size: 11.5px; color: #5d6f63; line-height: 1.35; }
.dish-credit { font-size: 9.5px; color: #9aa89f; margin-top: 2px; }
.shop-list { display: flex; flex-direction: column; gap: 6px; }
.shop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px 16px;
  border-radius: var(--radius-md, 16px);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .15s, box-shadow .15s;
}
.shop-row:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.shop-row > span:first-child {
  grid-column: 1; grid-row: 1;
  font-weight: 700; font-size: 14px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-item {
  grid-column: 1; grid-row: 2;
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-price {
  grid-column: 2; grid-row: 1 / 3;
  align-self: center; text-align: right;
  font-weight: 800; font-size: 15px; color: var(--green);
  white-space: nowrap;
}
.shop-price em { display: block; font-style: normal; font-weight: 600; font-size: 11px; color: var(--muted); margin-top: 1px; }
.pantry-note { margin-top: 12px; font-size: 12.5px; color: #5d6f63; background: rgba(242,163,60,.1); border: 1px solid rgba(242,163,60,.3); border-radius: 12px; padding: 10px 14px; }

/* ============================================================
   C2 THEME LAYER — Cinematic (dark default) + Light, токены + полировка
   ============================================================ */
:root{
  /* refined LIGHT (C2-light) — redefines existing tokens so components follow */
  --bg:#eef5ea; --surface:#ffffff; --surface-soft:#f2f8ef; --surface-deep:#e4efdf;
  --ink:#10231a; --muted:#5a6b60; --line:#d9e7d8;
  --green:#1f9d4d; --green-deep:#0c6b27; --green-soft:#e9f6ec;
  --orange:#ef9d3a; --orange-deep:#a75d00;
  --accent:#1f9d4d; --accent-2:#0c6b27; --on-accent:#ffffff;
  --glass:rgba(255,255,255,.72); --glass-line:rgba(255,255,255,.85);
  --aurora-1:rgba(123,211,137,.45); --aurora-2:rgba(242,163,60,.22); --aurora-3:rgba(31,157,77,.32);
  --shadow:0 24px 60px -28px rgba(20,60,35,.4);
  --card-shadow:0 16px 40px -24px rgba(20,60,35,.32);
}
html[data-theme="dark"]{
  --bg:#070b08; --surface:#121a15; --surface-soft:#0e1611; --surface-deep:#0b120d;
  --ink:#eef3ec; --muted:#8ba292; --line:rgba(255,255,255,.09);
  --green:#3ee07f; --green-deep:#c4f548; --green-soft:rgba(196,245,72,.12);
  --orange:#f2b85c; --orange-deep:#f2b85c;
  --accent:#c4f548; --accent-2:#3ee07f; --on-accent:#06250f;
  --glass:rgba(18,26,20,.6); --glass-line:rgba(255,255,255,.08);
  --aurora-1:rgba(62,224,127,.35); --aurora-2:rgba(196,245,72,.20); --aurora-3:rgba(62,224,127,.30);
  --shadow:0 30px 70px -30px rgba(0,0,0,.85);
  --card-shadow:0 24px 50px -28px rgba(0,0,0,.7);
}

/* base canvas + aurora */
body{ background:var(--bg) !important; color:var(--ink); }
body::before{
  content:""; position:fixed; inset:-25%; z-index:-2; pointer-events:none;
  background:
    radial-gradient(34% 32% at 16% 14%, var(--aurora-1), transparent 60%),
    radial-gradient(30% 30% at 86% 12%, var(--aurora-2), transparent 60%),
    radial-gradient(40% 38% at 78% 90%, var(--aurora-3), transparent 60%);
  filter:blur(40px) saturate(1.1); animation:sgAurora 24s ease-in-out infinite alternate;
}
@keyframes sgAurora{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(0,-3%,0) scale(1.08)}}

/* typography: display headings */
.brand-name, .hero h1, .hero h2, .panel-heading h2, .section-subtitle,
h1, h2, .price, .store-total, .plan-stat strong, .stat strong{
  font-family:"Fraunces", Georgia, serif !important; letter-spacing:-0.02em;
}
.price, .store-total{ color:var(--green-deep) !important; }

/* glass topbar + surfaces */
.topbar{ background:var(--glass) !important; backdrop-filter:blur(18px) saturate(1.3);
  -webkit-backdrop-filter:blur(18px) saturate(1.3); border:1px solid var(--glass-line) !important; }
.panel, .product-card, .dish-card, .store-opt, .plan-stat, .mini-info-card,
.lead-mode-card, .auth-tab, .goal-card, .quote-card{
  background:var(--surface) !important; color:var(--ink); border-color:var(--line) !important;
  box-shadow:var(--card-shadow);
}
.product-card:hover, .dish-card:hover{ border-color:color-mix(in srgb, var(--accent) 45%, var(--line)) !important; }

/* inputs */
.search-box, .select-box, input, textarea, select{
  background:var(--surface-soft) !important; color:var(--ink) !important; border-color:var(--line) !important;
}
.search-box::placeholder, textarea::placeholder{ color:var(--muted); }

/* buttons: accent fill needs readable on-accent text */
.primary-button, .add-button, .checkout-button, .new-cart-button, .btn-main{
  background:linear-gradient(150deg, var(--accent), var(--accent-2)) !important;
  color:var(--on-accent) !important; border:none !important;
}
.ghost-button, .secondary-button{ background:transparent !important; color:var(--ink) !important; border:1px solid var(--line) !important; }

/* chips */
.shop-chip, .category-chip, .tag, .chip{ background:var(--green-soft) !important; color:var(--green-deep) !important; }
.chip.active, .chip.on{ background:linear-gradient(150deg,var(--accent),var(--accent-2)) !important; color:var(--on-accent) !important; }

/* bottom / tab nav */
.bottom-nav, .tab-bar{ background:var(--glass) !important; backdrop-filter:blur(16px); border-color:var(--line) !important; }
[data-screen].is-active, .tab.is-active, .nav-button.is-active{ color:var(--green-deep) !important; }

/* misc text surfaces */
.muted, .small-note, .product-meta, .variant-line, .dish-ings{ color:var(--muted) !important; }
.empty-state{ background:var(--surface-soft) !important; color:var(--muted) !important; border-color:var(--line) !important; }
.section-subtitle{ color:var(--ink) !important; }

/* theme toggle button */
.theme-btn{ width:40px; height:40px; border-radius:13px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink); cursor:pointer; display:grid; place-items:center; transition:.2s; }
.theme-btn:hover{ border-color:var(--accent); color:var(--green-deep); }
.theme-btn svg{ width:18px; height:18px; }
.theme-btn .ic-sun{ display:none; }
html[data-theme="dark"] .theme-btn .ic-moon{ display:none; }
html[data-theme="dark"] .theme-btn .ic-sun{ display:block; }

@media (prefers-reduced-motion: reduce){ body::before{ animation:none; } }

/* ===== DARK theme hardening — secondary surfaces (modals, sheets, banner, cards) ===== */
html[data-theme="dark"] .startup-card,
html[data-theme="dark"] .city-picker-sheet,
html[data-theme="dark"] .language-sheet,
html[data-theme="dark"] .language-modal,
html[data-theme="dark"] .shop-card,
html[data-theme="dark"] .quote-card,
html[data-theme="dark"] .cart-row,
html[data-theme="dark"] .mini-info-card,
html[data-theme="dark"] .legal-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .consent-banner,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .icon-button {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .icon-button { color: var(--ink) !important; }
html[data-theme="dark"] .floating-cart {
  background: linear-gradient(150deg, var(--accent), var(--accent-2)) !important;
  color: var(--on-accent) !important;
}
/* text inside dark cards / sheets */
html[data-theme="dark"] .legal-note,
html[data-theme="dark"] .legal-footer,
html[data-theme="dark"] .consent-status,
html[data-theme="dark"] .settings-card span,
html[data-theme="dark"] .mini-info-card span,
html[data-theme="dark"] .shop-card .muted,
html[data-theme="dark"] .cart-row .muted { color: var(--muted) !important; }
/* warning / status chips readable on dark */
html[data-theme="dark"] .orange-chip {
  background: rgba(242,184,92,.16) !important; color: #f2b85c !important;
}
html[data-theme="dark"] .verification-chip,
html[data-theme="dark"] .consent-pills span,
html[data-theme="dark"] .success-pill {
  background: var(--green-soft) !important; color: var(--accent) !important; border-color: var(--line) !important;
}
/* tab pills / segmented inside dark */
html[data-theme="dark"] .tabs button,
html[data-theme="dark"] .tab { color: var(--muted) !important; }
html[data-theme="dark"] .tabs button.is-active,
html[data-theme="dark"] .tab.is-active { color: var(--ink) !important; background: var(--surface-soft) !important; }
/* extra surfaces that were hardcoded light */
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .ration-summary,
html[data-theme="dark"] .store-opt.onestore,
html[data-theme="dark"] .quote-card {
  background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .qty-control button,
html[data-theme="dark"] .product-card .qty-control button {
  background: var(--surface-soft) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .tab-button { color: var(--muted) !important; }
html[data-theme="dark"] .tab-button.is-active {
  background: var(--green-soft) !important; color: var(--green-deep) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .store-logo { background: rgba(255,255,255,.92) !important; }
/* farm map featured card was hardcoded light → fix for dark */
html[data-theme="dark"] .farm-map-panel {
  background: var(--surface) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .farm-map-copy h3 { color: var(--ink) !important; }
html[data-theme="dark"] .farm-map-copy p,
html[data-theme="dark"] .farm-map-copy .small-note { color: var(--muted) !important; }
html[data-theme="dark"] .pagination-bar { background: var(--surface) !important; border-color: var(--line) !important; }
/* hero / panel white gradients → flat dark surface */
html[data-theme="dark"] .hero { background: transparent !important; }
html[data-theme="dark"] .panel { background: var(--surface) !important; }
/* map frame / iframe border */
html[data-theme="dark"] .map, html[data-theme="dark"] .map-frame, html[data-theme="dark"] iframe {
  border-color: var(--line) !important; filter: brightness(.92);
}

/* ===== Магазины: сети с логотипами ===== */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; margin-top: 14px; }
.store-card { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; text-align: left;
  transition: transform .18s, border-color .2s, box-shadow .2s; position: relative; }
.store-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--card-shadow); }
.store-logo { width: 54px; height: 40px; flex: none; display: grid; place-items: center; background: #fff;
  border-radius: 10px; padding: 5px 8px; box-shadow: 0 4px 12px -6px rgba(0,0,0,.25); }
.store-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chain-letter { font-family: "Fraunces", serif; font-weight: 700; font-size: 18px; color: var(--green-deep); }
.store-info { flex: 1; min-width: 0; }
.store-info strong { display: block; font-size: 15px; color: var(--ink); }
.store-info span { font-size: 12.5px; color: var(--muted); }
.store-go { font-size: 12px; font-weight: 700; color: var(--green-deep); white-space: nowrap; }

/* КБЖУ chip (nutrition flag) */
.kcal-chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 9px;
  background: var(--surface-soft); color: var(--muted); }
.kcal-chip.is-off { background: var(--green-soft); color: var(--green-deep); }
html[data-theme="dark"] .kcal-chip { background: var(--surface-soft); color: var(--muted); }
html[data-theme="dark"] .kcal-chip.is-off { background: var(--green-soft); color: var(--accent); }

/* Subscription (Telegram Stars) card */
.sub-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 16px 18px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(242,184,92,.12), var(--surface)); }
.sub-info { flex: 1; min-width: 200px; }
.sub-info strong { display: block; font-size: 15px; }
.sub-info span { font-size: 12.5px; color: var(--muted); }
.sub-card .primary-button { white-space: nowrap; }

/* Per-item alternatives (cheapest/bio per store) in the cart plan */
.plan-note { font-size: 12px; color: var(--orange-deep, #a75d00); background: rgba(242,163,60,.12); border: 1px solid rgba(242,163,60,.3); border-radius: 10px; padding: 7px 10px; margin: 6px 0; }
html[data-theme="dark"] .plan-note { color: #f2b85c; }
.item-options { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.opt-group { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: var(--surface-soft); }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.bio-tag { font-size: 11px; font-weight: 800; color: var(--green-deep); background: var(--green-soft); padding: 2px 8px; border-radius: 8px; }
html[data-theme="dark"] .bio-tag { color: var(--accent); }
.nobio-tag { font-size: 11px; font-weight: 700; color: var(--muted); }
.opt-rows { display: flex; flex-direction: column; gap: 3px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; color: var(--muted); }
.opt-row strong { color: var(--ink); }
.opt-row em { font-style: normal; color: var(--green-deep); font-weight: 700; }
html[data-theme="dark"] .opt-row em { color: var(--accent); }
.opt-row.is-chosen { background: var(--green-soft); }
.opt-row.is-chosen strong { color: var(--green-deep); }
html[data-theme="dark"] .opt-row.is-chosen strong { color: var(--accent); }

/* Analog/brand option rows */
.opt-row { align-items: flex-start; }
.opt-name { line-height: 1.3; }
.opt-chain { color: var(--muted); font-size: 11px; }
.opt-count { color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* ============================================================
   SOFT PASTEL SKIN (выбранное направление B) — слой поверх базы.
   Дружелюбная пастельная палитра, Nunito, мягкие тени, скругления.
   ============================================================ */
:root{
  --bg:#f3f7f0; --surface:#ffffff; --surface-soft:#eef5ec; --surface-deep:#e3efe0;
  --ink:#27322a; --muted:#7d8a80; --line:#e8efe6;
  --green:#39a85a; --green-deep:#2e8c4a; --green-soft:#e6f4e9;
  --orange:#ff9f5c; --orange-deep:#c9601f; --sale:#ff7a59;
  --mint:#cfeed6; --mint-2:#ddf2c8; --peach:#ffd9c2; --lav:#e2dcff; --sky:#cfe9ff;
  --accent:#39a85a; --accent-2:#2e8c4a; --on-accent:#ffffff;
  --radius-xl:32px; --radius-lg:26px; --radius-md:18px;
  --shadow:0 22px 50px -28px rgba(40,80,50,.45);
  --shadow-card:0 18px 44px -26px rgba(40,80,50,.42);
  --shadow-sm:0 10px 26px -16px rgba(40,80,50,.40);
  font-family:"Nunito","Hanken Grotesk",system-ui,-apple-system,sans-serif;
}
html[data-theme="dark"]{
  --bg:#101510; --surface:#18211a; --surface-soft:#13201a; --surface-deep:#0f1a13;
  --ink:#eaf2ea; --muted:#8ea394; --line:#243027;
  --green:#5fd07f; --green-deep:#bdf06a; --green-soft:rgba(95,208,127,.13);
  --accent:#5fd07f; --accent-2:#bdf06a; --on-accent:#06250f;
  --mint:#1d3a27; --mint-2:#22361f; --peach:#37291f; --lav:#26223a; --sky:#1b2a38;
}
body{ font-family:"Nunito","Hanken Grotesk",system-ui,sans-serif;
  background:
    radial-gradient(60% 50% at 0% 0%, color-mix(in srgb,var(--mint) 55%, transparent), transparent 60%),
    radial-gradient(55% 45% at 100% 4%, color-mix(in srgb,var(--lav) 50%, transparent), transparent 55%),
    var(--bg) !important; }
h1,h2,h3,.hero h2,.section-subtitle,.panel-heading h2{ font-family:"Nunito",sans-serif !important; font-weight:900 !important; letter-spacing:-.02em; }

/* topbar — почти непрозрачная, чтобы контент не просвечивал и иконки не сливались */
.topbar{ background:var(--bg) !important; background:color-mix(in srgb,var(--bg) 96%,transparent) !important; border:0 !important;
  border-bottom:1px solid var(--line) !important; backdrop-filter:blur(20px) saturate(1.3); border-radius:0 !important;
  box-shadow:0 6px 20px -16px rgba(40,80,50,.45) !important; }
.logo-mark{ border-radius:16px !important; background:linear-gradient(140deg,var(--green),var(--green-deep)) !important; }
.pill{ border-radius:999px !important; background:var(--surface) !important; border:1px solid var(--line) !important;
  box-shadow:var(--shadow-sm) !important; font-weight:800 !important; }
.theme-btn,.icon-button{ border-radius:14px !important; background:var(--surface) !important; border:1px solid var(--line) !important; box-shadow:var(--shadow-sm) !important; }

/* pill nav (top + bottom) */
.tabs{ background:var(--bg) !important; border:0 !important; box-shadow:none !important; gap:6px; padding:10px 0 !important; }
.tab-button,.bottom-button{ border-radius:999px !important; border:0 !important; background:transparent !important;
  color:var(--muted) !important; font-weight:800 !important; box-shadow:none !important; padding:9px 15px !important; }
.tab-button.is-active,.bottom-button.is-active{ background:var(--green) !important; color:#fff !important; box-shadow:var(--shadow-sm) !important; }
.tab-button.is-active .tab-icon,.bottom-button.is-active .nav-icon{ color:#fff !important; }
html[data-theme="dark"] .tab-button.is-active,html[data-theme="dark"] .bottom-button.is-active{ background:var(--green) !important; color:#06250f !important; }
html[data-theme="dark"] .tab-button.is-active .tab-icon{ color:#06250f !important; }
.bottom-nav{ background:color-mix(in srgb,var(--bg) 86%,transparent) !important; border-top:1px solid var(--line) !important; backdrop-filter:blur(16px); }

/* hero */
.hero{ border-radius:var(--radius-xl) !important; padding:30px 30px !important; border:0 !important; box-shadow:var(--shadow) !important;
  background:
    radial-gradient(90% 130% at 0% 0%, var(--mint), transparent 58%),
    radial-gradient(80% 120% at 100% 10%, var(--lav), transparent 52%),
    linear-gradient(180deg, var(--mint-2), var(--surface)) !important; }
html[data-theme="dark"] .hero{ background:
    radial-gradient(90% 130% at 0% 0%, var(--mint), transparent 60%),
    linear-gradient(180deg, var(--surface-soft), var(--surface)) !important; }
.hero h2{ font-size:clamp(26px,4vw,40px) !important; }
.hero .primary-button{ align-self:flex-start; }

/* stat tiles — пастельная ротация */
.stats-grid{ gap:14px !important; }
.stat{ border-radius:var(--radius-lg) !important; border:0 !important; box-shadow:var(--shadow-sm) !important; padding:16px 18px !important; }
.stat:nth-child(5n+1){ background:var(--mint) !important; }
.stat:nth-child(5n+2){ background:var(--peach) !important; }
.stat:nth-child(5n+3){ background:var(--lav) !important; }
.stat:nth-child(5n+4){ background:var(--sky) !important; }
.stat:nth-child(5n+5){ background:var(--mint-2) !important; }
.stat .stat-icon{ background:rgba(255,255,255,.6) !important; color:var(--green-deep) !important; border-radius:13px !important; }
.stat strong{ color:var(--ink) !important; }
html[data-theme="dark"] .stat .stat-icon{ background:rgba(255,255,255,.08) !important; color:var(--accent) !important; }

/* cards */
.product-card,.market-card{ border-radius:var(--radius-lg) !important; border:1px solid var(--line) !important;
  box-shadow:var(--shadow-sm) !important; }
.product-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow) !important; }
.product-media{ margin:10px 10px 0 !important; border-radius:20px !important; border:0 !important; aspect-ratio:1/1 !important; background:var(--surface-soft) !important; }
.product-image{ border-radius:20px !important; }
.add-button{ border-radius:14px !important; background:var(--green) !important; color:#fff !important; font-weight:900 !important; box-shadow:var(--shadow-sm) !important; }
.product-card .price{ font-family:"Nunito",sans-serif !important; font-weight:900 !important; color:var(--green-deep) !important; }
html[data-theme="dark"] .add-button{ background:linear-gradient(150deg,var(--accent),var(--accent-2)) !important; color:#06250f !important; }

/* buttons */
.primary-button,.checkout-button,.new-cart-button{ border-radius:999px !important; background:var(--green) !important; color:#fff !important;
  font-weight:900 !important; box-shadow:var(--shadow-sm) !important; border:0 !important; }
html[data-theme="dark"] .primary-button,html[data-theme="dark"] .checkout-button,html[data-theme="dark"] .new-cart-button{
  background:linear-gradient(150deg,var(--accent),var(--accent-2)) !important; color:#06250f !important; }
.ghost-button,.secondary-button{ border-radius:999px !important; }

/* inputs */
.search-box,.select-box{ border-radius:16px !important; }
.search-box:focus,.select-box:focus{ border-color:var(--green) !important; }

/* chips */
.shop-chip,.category-chip,.chip,.kcal-chip{ border-radius:999px !important; }

/* panels + misc cards */
.panel,.dish-card,.shop-card,.quote-card,.mini-info-card,.lead-mode-card,.goal-card,.plan-stat,.history-card,.settings-card,.legal-card{
  border-radius:var(--radius-lg) !important; }
.floating-cart{ border-radius:999px !important; background:linear-gradient(150deg,var(--green),var(--green-deep)) !important; box-shadow:var(--shadow) !important; }


/* ── Consent blocking modal overlay ──────────────────────── */
body:has(#consentHost:not(:empty)) {
  overflow: hidden;
}

#consentHost:not(:empty) {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#consentHost:not(:empty) .consent-banner {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: min(440px, 100%) !important;
  max-height: 88dvh !important;
  padding: 28px 24px !important;
  border-radius: 28px !important;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45) !important;
  animation: consent-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#consentHost:not(:empty) .consent-actions {
  margin-top: 4px;
}

@keyframes consent-in {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Dark mode shop-row override ─────────────────────────── */
html[data-theme="dark"] .shop-row {
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
html[data-theme="dark"] .shop-row:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
}

/* ── Meal structure selector ─────────────────────────────── */
.structure-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.structure-row .goal-card {
  flex: 1; min-width: 100px; padding: 10px 14px;
  font-size: 13px;
}

/* ── Day plan layout ─────────────────────────────────────── */
.day-block {
  margin-bottom: 20px;
}
.day-heading {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.day-meals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.meal-type-tag {
  display: inline-block;
  padding: 2px 8px; margin-bottom: 4px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
html[data-theme=dark] .meal-type-tag {
  background: var(--green-soft);
  color: var(--accent);
}
