/* SIBO Scanner v1.1 — Komiks pastelowy */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bg: #FFF0F3;
  --bg2: #EEF4FF;
  --panel: #FFFFFF;
  --ink: #1a1a2e;
  --pink: #FFB3C6;
  --pink-dark: #FF6B8A;
  --mint: #A8E6CF;
  --mint-dark: #5BBFA8;
  --lavender: #C9B1FF;
  --peach: #FFD4A3;
  --yellow: #FFE566;
  --blue: #9DD4F0;
  --danger: #FF5C7A;
  --safe: #5BC878;
  --text: #1a1a2e;
  --text-light: #5a6070;
  --border: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 68px;
  --header-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max-w: 430px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle, rgba(26,26,46,0.06) 1px, transparent 1px);
  background-size: 12px 12px;
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* === APP SHELL === */
.app-shell {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: var(--safe-top);
}

.app-main {
  flex: 1;
  padding: 0 14px 16px;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 20px);
  width: 100%;
  overflow-x: hidden;
}

/* === COMIC ICONS === */
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.ico svg { width: 100%; height: 100%; display: block; }

.ico-sm { width: 20px; height: 20px; }
.ico-md { width: 28px; height: 28px; }
.ico-lg { width: 40px; height: 40px; }
.ico-xl { width: 56px; height: 56px; }
.ico-nav { width: 26px; height: 26px; }
.ico-hero { width: 100%; max-width: 140px; height: auto; }

/* === COMIC PANELS === */
.comic-panel {
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.comic-panel.safe { border-color: var(--safe); }
.comic-panel.danger { border-color: var(--danger); }

/* === HEADER === */
.app-header {
  margin: 10px 14px 12px;
  padding: 10px 14px;
  flex-shrink: 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-icon .cauli-svg {
  width: 52px;
  height: 52px;
  animation: cauli-bob 2.2s ease-in-out infinite;
}

.logo-icon .cauli-florets {
  transform-origin: 40px 36px;
  animation: cauli-wiggle 3.5s ease-in-out infinite;
}

.logo-icon .cauli-leaf-l {
  transform-origin: 40px 58px;
  animation: cauli-leaf-l 2.8s ease-in-out infinite;
}

.logo-icon .cauli-leaf-r {
  transform-origin: 40px 60px;
  animation: cauli-leaf-r 2.8s ease-in-out infinite 0.4s;
}

.hero-art .cauli-svg {
  width: 140px;
  height: auto;
  animation: cauli-bob 2.5s ease-in-out infinite;
}

.hero-art .cauli-florets {
  transform-origin: 60px 46px;
  animation: cauli-wiggle 4s ease-in-out infinite;
}

@keyframes cauli-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes cauli-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-2deg) scale(1.02); }
  75% { transform: rotate(2deg) scale(1.02); }
}

@keyframes cauli-leaf-l {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}

@keyframes cauli-leaf-r {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg); }
}

.ico-logo { width: 52px; height: 52px; }

.logo {
  font-family: 'Bangers', 'Comic Neue', cursive;
  font-size: 1.65rem;
  letter-spacing: 1px;
  color: var(--pink-dark);
  text-shadow: 2px 2px 0 var(--yellow);
  line-height: 1;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 700;
  margin-top: 2px;
}

/* === VIEWS === */
.view {
  display: none;
  width: 100%;
  animation: popIn 0.25s ease;
}

.view.active { display: block; }

#view-home.active,
#view-settings.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.view-title {
  font-family: 'Bangers', 'Comic Neue', cursive;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 4px;
}

.home-hero .hero-art {
  width: 140px;
  max-width: 160px;
}

.home-tagline {
  font-family: 'Bangers', cursive;
  font-size: 1.45rem;
  letter-spacing: 0.5px;
  margin: 0;
}

.home-intro {
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-light);
  margin: 0;
  padding: 0 8px;
  max-width: 320px;
}

.profile-panel {
  margin: 0;
  padding: 14px 16px;
}

.profile-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid var(--ink);
}

.profile-tag.tag-sibo { background: #FFB3C6; }
.profile-tag.tag-lactose { background: #FFD166; }
.profile-tag.tag-fodmap { background: #A8E6CF; }

.profile-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}

.lactose-alert {
  margin: 10px 0;
  padding: 10px 12px;
  background: #FFF3CD;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.avoid-alert {
  background: #FFD6E0;
}

.avoid-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avoid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.avoid-info {
  flex: 1;
  min-width: 0;
}

.avoid-info strong {
  display: block;
  font-size: 0.9rem;
}

.avoid-info small {
  display: block;
  color: var(--text-light);
  margin-top: 2px;
}

.avoid-empty {
  margin-top: 10px;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-art {
  width: 140px;
}

.speech-bubble {
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  text-align: center;
  width: 100%;
  position: relative;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-bottom-color: var(--ink);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--yellow);
  z-index: 1;
}

.speech-bubble h2 {
  font-family: 'Bangers', cursive;
  font-size: 1.35rem;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.speech-bubble p {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-light);
}

/* === ACTION GRID === */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  min-height: 96px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.action-card:active { transform: translate(2px, 2px); box-shadow: none; }
.action-card.primary { background: var(--mint); }
.action-card.secondary { background: var(--peach); }
.action-card.tertiary { background: var(--blue); }
.action-card.quaternary { background: var(--lavender); }

/* === STORES === */
.stores-panel {
  padding: 14px;
  text-align: center;
  margin: 0;
}

.stores-label {
  font-family: 'Bangers', cursive;
  font-size: 0.95rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.stores-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.store-tag {
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.tag-biedronka { background: #FFE566; }
.tag-lidl { background: #9DD4F0; }
.tag-kaufland { background: #FFB3C6; }
.tag-dino { background: #A8E6CF; }
.tag-zabka { background: #C9B1FF; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}

.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: var(--mint); }
.btn-secondary { background: var(--peach); }
.btn-danger { background: var(--danger); color: white; }
.btn-scan { background: var(--lavender); font-size: 0.95rem; }
.btn-camera { background: var(--pink); font-size: 1rem; margin-bottom: 8px; }

/* === SCANNER === */
.scanner-container {
  position: relative;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  aspect-ratio: 4/3;
  background: #111;
  overflow: hidden;
  width: 100%;
}

.scanner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
  color: white;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

.scanner-placeholder.hidden { display: none; }

.scanner-placeholder p {
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.9;
}

.scanner-error {
  color: #FFB3C6 !important;
  font-size: 0.8rem !important;
  font-weight: 700;
}

#scanner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 1;
}

#scanner-video.active { display: block; }

.scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.scanner-frame {
  width: 75%;
  height: 38%;
  border: 3px dashed rgba(255,255,255,0.85);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}

.scanner-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  border: 2px solid rgba(255,255,255,0.3);
}

.scan-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.scan-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scan-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.4;
}

.scan-status {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 1.2em;
  padding: 4px 8px;
  border-radius: 10px;
}

.scan-status.scanning {
  background: var(--blue);
  border: 2px solid var(--ink);
}

.scan-status.found {
  background: var(--mint);
  border: 2px solid var(--ink);
  animation: popIn 0.2s ease;
}

.scan-status.error {
  background: #FFE0E8;
  border: 2px solid var(--danger);
  color: var(--danger);
}

/* === RESULT === */
.result-card {
  padding: 20px 14px;
  text-align: center;
  width: 100%;
}

.verdict-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border: var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  font-family: 'Bangers', cursive;
  font-size: 1.6rem;
  letter-spacing: 1px;
}

.verdict-bubble.yes { background: var(--mint); }
.verdict-bubble.no { background: var(--danger); color: white; }

.product-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: var(--border);
  margin: 0 auto 10px;
  display: block;
  background: white;
}

.product-name {
  font-family: 'Bangers', cursive;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  word-break: break-word;
}

.product-brand { color: var(--text-light); font-size: 0.85rem; }

.store-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  margin: 6px 0;
}

.barcode { font-size: 0.75rem; color: var(--text-light); }

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.82rem;
  margin: 10px 0;
}

.grams-display { margin: 16px 0; }

.grams-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  background: var(--bg2);
  box-shadow: var(--shadow);
}

.grams-num {
  font-family: 'Bangers', cursive;
  font-size: 2.2rem;
  line-height: 1;
}

.grams-unit { font-size: 0.7rem; color: var(--text-light); font-weight: 700; }
.grams-note { font-size: 0.82rem; color: var(--text-light); }

.summary-bubble {
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 14px 0;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.ingredients-details {
  text-align: left;
  margin: 14px 0;
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
}

.ingredients-details summary {
  padding: 10px 14px;
  background: var(--bg2);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ingredients-details p {
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

.matches-section {
  text-align: left;
  margin: 14px 0;
  width: 100%;
}

.matches-section h3 {
  font-size: 0.88rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.match-item {
  padding: 8px 10px;
  margin-bottom: 5px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  font-size: 0.82rem;
}

.match-item.level-forbidden, .match-item.level-high { background: #FFE0E8; }
.match-item.level-moderate { background: #FFF3CD; }
.match-item.level-low { background: #D4F5E4; }
.match-item.level-safe, .match-item.level-excellent { background: #D1F2EB; }

.match-term { font-weight: 800; display: block; }
.match-reason { color: var(--text-light); font-size: 0.76rem; }

.no-matches {
  padding: 10px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* === SEARCH / LISTS === */
.search-box {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
}

.search-box input:focus {
  outline: none;
  border-color: var(--mint-dark);
  box-shadow: 3px 3px 0 var(--mint-dark);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.list-scroll {
  width: 100%;
  overflow-x: hidden;
}

.search-item, .history-item, .product-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 12px;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.search-item:active, .history-item:active, .product-list-item:active {
  transform: scale(0.98);
}

.search-verdict, .history-verdict, .pl-verdict {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.7rem;
  font-family: 'Bangers', cursive;
}

.search-verdict.yes, .history-verdict, .pl-verdict { background: var(--mint); }
.search-verdict.no { background: var(--danger); color: white; }

.search-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.search-info strong {
  display: block;
  font-size: 0.88rem;
  word-break: break-word;
  line-height: 1.3;
}

.search-info small {
  color: var(--text-light);
  font-size: 0.74rem;
  display: block;
  word-break: break-word;
}

.search-grams { color: var(--mint-dark) !important; font-weight: 800 !important; }

/* === GUIDE === */
.guide-section {
  padding: 14px;
  margin-bottom: 12px;
}

.guide-section h3 {
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-section h3.avoid { background: #FFE0E8; }
.guide-section h3.ok { background: var(--mint); }
.guide-section h3.tips { background: var(--yellow); }

.guide-list {
  list-style: none;
  padding: 0;
}

.guide-list li {
  padding: 7px 10px;
  border-bottom: 2px dashed rgba(26,26,46,0.1);
  font-size: 0.86rem;
  line-height: 1.35;
}

.guide-list li:last-child { border-bottom: none; }

.guide-list li::before {
  content: '▸ ';
  font-weight: 900;
  color: var(--pink-dark);
}

/* === SETTINGS === */
.settings-group {
  padding: 14px;
  margin: 12px 0;
}

.settings-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.settings-group input {
  width: 100%;
  padding: 11px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.settings-hint {
  font-size: 0.76rem;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.4;
}

.install-steps {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-light);
}

.footer-note {
  padding: 14px;
  margin-top: 14px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
}

.disclaimer { margin-top: 6px; font-weight: 700; }

/* === NAV === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--panel);
  border-top: var(--border);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 6px;
  z-index: 100;
  box-shadow: 0 -4px 0 var(--ink);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--text-light);
  flex: 1;
  max-width: 72px;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
  color: var(--pink-dark);
  transform: translateY(-2px);
}

/* === LOADING === */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,240,243,0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}

.loading-overlay.active { display: flex; }

.comic-loader {
  animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
  from { transform: scale(1) rotate(-3deg); }
  to { transform: scale(1.08) rotate(3deg); }
}

.loading-text {
  font-family: 'Bangers', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

/* === TOAST === */
.toast {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: calc(100% - 28px);
  max-width: calc(var(--max-w) - 28px);
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 300;
  transition: transform 0.3s ease;
  text-align: center;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.toast.active { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--peach); color: var(--text); }

/* === INSTALL BANNER === */
.install-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: calc(var(--max-w) - 28px);
  padding: 10px 12px;
  background: var(--lavender);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.install-banner.hidden { display: none; }

.install-banner button {
  padding: 7px 14px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 20px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* === MISC === */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-light);
  font-size: 0.92rem;
}

.store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.store-chip {
  padding: 5px 12px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.store-chip:active { background: var(--mint); transform: translate(1px,1px); box-shadow: none; }

.products-count {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 700;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 8px 0;
  border: 2px solid var(--ink);
}

.source-badge.verified { background: var(--mint); color: var(--ink); }
.source-badge.unverified { background: var(--yellow); color: var(--ink); }

.dish-description {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 8px 0;
  line-height: 1.4;
}

.dish-portion-hint {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 6px 0 10px;
}

.dish-risks {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.condition-note {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 8px;
}

.fodmap-groups {
  margin: 12px 0;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.fodmap-groups h4 {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.fodmap-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  margin: 2px 4px 2px 0;
  background: var(--lavender);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.no-ingredients {
  font-size: 0.85rem;
  color: var(--coral);
  font-weight: 700;
  padding: 10px;
  border: 2px dashed var(--coral);
  border-radius: 10px;
  margin: 10px 0;
}

.disclaimer-inline {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 8px;
}

#view-settings .btn { margin-bottom: 10px; }

@media (max-width: 360px) {
  .action-card { min-height: 88px; font-size: 0.76rem; }
  .logo { font-size: 1.4rem; }
  .nav-item { font-size: 0.52rem; padding: 4px 4px; }
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.landscape-block {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.landscape-block.active {
  display: flex;
}

.landscape-block-inner {
  text-align: center;
  padding: 28px 24px;
  max-width: 320px;
}

.landscape-block-inner p {
  font-family: 'Bangers', cursive;
  font-size: 1.4rem;
  margin: 14px 0 6px;
}

.landscape-block-inner small {
  color: var(--text-light);
  font-size: 0.85rem;
}

@media (orientation: landscape) and (max-height: 520px) {
  .landscape-block {
    display: flex;
  }

  .app-shell {
    display: none;
  }
}
