:root {
  --bg: #0c1210;
  --card: #15201a;
  --line: #2a4034;
  --text: #e8f5ee;
  --mute: #8eab9a;
  --accent: #3dd68c;
  --warn: #f5c542;
  --hot: #ff6a3d;
  --font: "Space Grotesk", system-ui, sans-serif;
  --display: "Russo One", "RussoOneGameloft", Impact, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.fridge-body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  padding: 18px 16px 48px;
  background:
    radial-gradient(900px 480px at 10% -10%, #1a3a28 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, #243018 0%, transparent 50%),
    var(--bg);
}
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
.fridge-top, .fridge-main { position: relative; z-index: 1; }
.fridge-top {
  max-width: 920px;
  margin: 0 auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
  justify-content: space-between;
}
.back {
  color: var(--mute);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.back:hover { color: #fff; }
.epic-tag {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}
.fridge-brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.tagline {
  margin: 4px 0 0;
  color: var(--mute);
  font-weight: 500;
}

.fridge-main {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 800px) {
  .fridge-main { grid-template-columns: 1fr; }
}

.panel {
  background: linear-gradient(180deg, #1a2820, var(--card));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.concept p { margin: 0 0 12px; line-height: 1.45; color: #d5ebe0; }
.feature {
  margin: 14px 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(61,214,140,.08);
  border: 1px solid rgba(61,214,140,.25);
}
.feature h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--accent); }
.feature em { color: var(--warn); font-style: normal; font-weight: 600; }
.privacy {
  margin: 0;
  padding-left: 18px;
  color: var(--mute);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hint {
  margin: 0 0 12px;
  color: var(--mute);
  font-size: 0.88rem;
}
.scan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #3dd68c, #1f9a5c);
  color: #062416;
}
.scan-btn.alt {
  background: #24352c;
  color: var(--text);
  border: 1px solid var(--line);
}
.scan-btn.danger {
  background: rgba(255, 90, 54, 0.12);
  color: var(--hot);
  border-color: rgba(255, 90, 54, 0.35);
}
.scan-btn.danger:hover {
  background: rgba(255, 90, 54, 0.22);
}
.process {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1612;
  border: 1px solid var(--line);
}
.process-bar {
  height: 6px;
  border-radius: 999px;
  background: #1a2820;
  overflow: hidden;
  margin-bottom: 8px;
}
.process-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--warn));
  transition: width .25s ease;
}
#process-text { margin: 0; font-size: 0.8rem; color: var(--mute); }

.preview-wrap {
  position: relative;
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed var(--line);
  max-height: 160px;
}
.preview-wrap img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9);
}
.preview-badge {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6,20,12,.8);
  color: var(--accent);
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 8px;
}
.block-head .block-title {
  margin: 0;
}
.block-head .scan-btn {
  padding: 8px 12px;
  font-size: 0.78rem;
  border-radius: 10px;
}
.block-title {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  font-family: var(--display);
}
.inventory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.inventory li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0e1612;
  border: 1px solid var(--line);
}
.inventory .name { font-weight: 700; }
.inventory .meta { grid-column: 1 / -1; font-size: 0.78rem; color: var(--mute); }
.inventory .badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  align-self: start;
}
.inventory .rm {
  border: 0;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  align-self: start;
}
.inventory .rm:hover { color: var(--hot); }
.badge.ok { background: rgba(61,214,140,.15); color: var(--accent); }
.badge.warn { background: rgba(245,197,66,.15); color: var(--warn); }
.badge.hot { background: rgba(255,90,54,.18); color: var(--hot); }

.recipe-btn {
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(180deg, #f5d76e, #e0a800);
  color: #1a1408;
}
.recipe-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.recipe-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--mute);
}
.ai-recipe {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(61,214,140,.1), transparent 55%), #0e1612;
  border: 1px solid rgba(61,214,140,.35);
}
.ai-recipe h4 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.15rem;
}
.ai-recipe .summary {
  margin: 0 0 10px;
  color: #d5ebe0;
  line-height: 1.4;
}
.ai-recipe .meta {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--warn);
  font-weight: 600;
}
.ai-recipe h5 {
  margin: 10px 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.ai-recipe ul, .ai-recipe ol {
  margin: 0;
  padding-left: 18px;
  color: #d5ebe0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.recipes { display: grid; gap: 8px; }
.recipe {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,197,66,.08), transparent 60%), #0e1612;
  border: 1px solid #4a4030;
}
.recipe h4 { margin: 0 0 4px; font-size: 1rem; }
.recipe p { margin: 0; font-size: 0.82rem; color: var(--mute); line-height: 1.35; }
.empty { margin: 0; color: var(--mute); font-size: 0.85rem; }
.empty[hidden], [hidden] { display: none !important; }

.push {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  z-index: 50;
  max-width: min(420px, 92vw);
  padding: 14px 16px;
  border-radius: 14px;
  background: #1a2420;
  border: 1px solid var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
.push.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.push small {
  display: block;
  margin-top: 4px;
  color: var(--mute);
  font-weight: 500;
  font-size: 0.78rem;
}
