:root {
  color-scheme: light;
  --ink: #111019;
  --paper: #fff8d9;
  --cream: #fff3bb;
  --mint: #8dffcb;
  --aqua: #42ecff;
  --sky: #7ab8ff;
  --blue: #2547ff;
  --pink: #ff5fcf;
  --red: #ff405d;
  --orange: #ff9a23;
  --yellow: #f5ff3b;
  --green: #1dd884;
  --purple: #8c52ff;
  --brown: #6a3d1b;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,95,207,.3), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(66,236,255,.32), transparent 24%),
    #fff8d9;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.pop-nav {
  position: fixed;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid rgba(17,16,25,.18);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255,255,255,.58);
  box-shadow: 6px 6px 0 rgba(17,16,25,.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 1000; }
.brand i { width: 25px; height: 25px; border-radius: 9px; background: conic-gradient(from 40deg, var(--pink), var(--aqua), var(--yellow), var(--orange), var(--pink)); box-shadow: 0 0 18px rgba(66,236,255,.8); transform: rotate(-8deg); }
.nav-pills { display: flex; gap: 8px; font-size: 12px; font-weight: 1000; }
.nav-pills a { border: 1px solid rgba(17,16,25,.18); border-radius: 999px; padding: 6px 9px; background: rgba(255,255,255,.5); }

.stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 102px 20px 66px;
  isolation: isolate;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image: radial-gradient(rgba(17,16,25,.75) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}
.copy {
  position: relative;
  z-index: 20;
  width: min(100%, 1040px);
  text-align: center;
}
.tag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .03em;
}
.title {
  margin: 0;
  font-size: clamp(58px, 13vw, 152px);
  font-weight: 1000;
  line-height: .78;
  letter-spacing: -.1em;
}
.title mark {
  display: inline-block;
  color: #fff;
  background: var(--pink);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: .02em .12em .08em;
  box-shadow: 12px 12px 0 var(--ink), 20px 20px 0 var(--aqua);
  transform: rotate(-2deg);
}
.subtitle {
  max-width: 680px;
  margin: 28px auto 0;
  color: rgba(17,16,25,.72);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 1000;
  line-height: 1.5;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.actions a,
.actions button {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 12px 17px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}
.actions a:first-child { background: var(--yellow); }
.actions button { background: #fff; }

.shape, .ticket, .chat, .sticker, .disc, .cam, .price, .barcode, .pixel, .bottle { position: absolute; z-index: 3; }
.shape.blob-a { width: 360px; height: 460px; left: -110px; bottom: 6%; border-radius: 48% 52% 60% 40%; background: linear-gradient(180deg, var(--pink), rgba(255,95,207,.05)); }
.shape.blob-b { width: 280px; height: 360px; right: -92px; top: 16%; border-radius: 62% 38% 45% 55%; background: linear-gradient(180deg, var(--aqua), var(--purple)); }
.shape.star {
  width: 94px;
  aspect-ratio: 1;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  filter: drop-shadow(5px 5px 0 var(--ink));
}
.shape.star.one { top: 20%; right: 10%; }
.shape.star.two { bottom: 15%; left: 9%; width: 64px; background: var(--pink); }

.eta {
  background:
    radial-gradient(circle at 24% 24%, #fff 0 8%, transparent 9%),
    linear-gradient(135deg, #a9fff0 0%, #ffe86a 28%, #ff94df 62%, #7ab8ff 100%);
}
.eta .title { text-shadow: 6px 6px 0 #fff, 12px 12px 0 rgba(17,16,25,.18); }
.ticket {
  width: 230px;
  min-height: 108px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 13px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-10deg);
}
.ticket::after {
  content: "ETA 08:24\A SUGAR BUS\A LABEL ONLY";
  white-space: pre;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1.25;
}
.ticket.a { left: 7%; top: 17%; }
.ticket.b { right: 8%; bottom: 16%; transform: rotate(8deg); background: var(--mint); }
.chat {
  width: 248px;
  border: 3px solid var(--ink);
  border-radius: 24px 24px 24px 6px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #c8fff1, #d8d0ff);
  box-shadow: 7px 7px 0 var(--ink);
  font-size: 15px;
  font-weight: 1000;
  text-align: left;
}
.chat::before { content: "饮料含糖？"; display: block; }
.chat::after { content: "拍标签给我。"; display: block; margin-top: 6px; color: var(--blue); }
.chat.a { left: 11%; bottom: 27%; transform: rotate(5deg); }

.super {
  color: #0e1020;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.76), transparent 14%),
    conic-gradient(from 25deg, #ff4ecb, #48f4ff, #f9ff5a, #7a5cff, #ff8b2d, #ff4ecb);
}
.super .copy { mix-blend-mode: normal; }
.super .title {
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 9px 9px 0 rgba(255,95,207,.82), -9px -6px 0 rgba(66,236,255,.8);
}
.super .subtitle { color: rgba(17,16,25,.76); }
.disc {
  width: min(72vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 12%, rgba(255,255,255,.9) 13% 15%, transparent 16%),
    repeating-conic-gradient(rgba(255,255,255,.24) 0 8deg, rgba(0,0,0,.1) 8deg 14deg),
    conic-gradient(var(--pink), var(--aqua), var(--yellow), var(--purple), var(--orange), var(--pink));
  opacity: .72;
}
.disc.a { left: -18%; top: 14%; }
.disc.b { right: -22%; bottom: 6%; width: min(58vw, 420px); }
.barcode {
  right: 12%;
  top: 18%;
  width: 210px;
  height: 84px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 8px, var(--ink) 8px 11px, transparent 11px 17px),
    #fff;
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(8deg);
}
.price {
  left: 10%;
  bottom: 20%;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--ink);
  font-size: 18px;
  font-weight: 1000;
  transform: rotate(-7deg);
}
.price::after { content: "24g SUGAR"; }

.ditto {
  color: #f7f1e6;
  background:
    linear-gradient(rgba(20,28,40,.2), rgba(20,28,40,.7)),
    radial-gradient(circle at 24% 20%, rgba(255,176,92,.55), transparent 26%),
    linear-gradient(180deg, #263b5f, #101827 70%);
}
.ditto::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .24;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 4px),
    radial-gradient(rgba(255,255,255,.65) 1px, transparent 1px);
  background-size: auto, 6px 6px;
  mix-blend-mode: screen;
}
.ditto .tag, .ditto .actions a { color: #111; }
.ditto .subtitle { color: rgba(247,241,230,.78); }
.ditto .title { text-shadow: 0 0 18px rgba(255,255,255,.35), 8px 8px 0 rgba(255,95,207,.32); }
.cam {
  inset: 9% 7% auto;
  height: 62svh;
  border: 3px solid rgba(255,255,255,.72);
  border-radius: 18px;
  pointer-events: none;
}
.cam::before {
  content: "REC  00:08:24";
  position: absolute;
  top: 14px;
  left: 16px;
  color: #ff405d;
  font-size: 14px;
  font-weight: 1000;
}
.cam::after {
  content: "LABEL / SUGAR / SWEETENER";
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 1000;
}
.pixel {
  width: 136px;
  height: 136px;
  left: 8%;
  bottom: 17%;
  background:
    linear-gradient(90deg, var(--yellow) 25%, transparent 25% 50%, var(--yellow) 50% 75%, transparent 75%),
    linear-gradient(var(--pink) 25%, transparent 25% 50%, var(--pink) 50% 75%, transparent 75%);
  background-size: 34px 34px;
  opacity: .8;
}
.bottle {
  right: 9%;
  bottom: 13%;
  width: 86px;
  height: 176px;
  border: 4px solid rgba(255,255,255,.82);
  border-radius: 22px 22px 34px 34px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 24px rgba(255,255,255,.28);
  transform: rotate(8deg);
}
.bottle::before {
  content: "";
  position: absolute;
  top: -26px;
  left: 24px;
  width: 30px;
  height: 24px;
  border: 4px solid rgba(255,255,255,.82);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.sticker-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(calc(100% - 28px), 1180px);
  margin: 14px auto 80px;
}
.mini {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 20px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--ink);
}
.mini b { display: block; margin-top: 126px; font-size: 28px; line-height: .9; letter-spacing: -.06em; }
.mini span { color: rgba(17,16,25,.6); font-size: 12px; font-weight: 1000; }
.mini::before {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(var(--pink), var(--aqua), var(--yellow), var(--orange), var(--pink));
}
.mini:nth-child(2) { background: #c8fff1; }
.mini:nth-child(3) { background: #ffe0f6; }
.mini:nth-child(4) { background: #fff369; }
.mini:nth-child(5) { background: #d8d0ff; }
.mini:nth-child(6) { background: #ffbd73; }

@media (max-width: 820px) {
  .nav-pills a:not(:first-child) { display: none; }
  .stage { padding: 100px 20px 64px; }
  .tag { max-width: calc(100vw - 46px); font-size: 11px; box-shadow: 4px 4px 0 var(--ink); }
  .title { max-width: 342px; margin-inline: auto; font-size: clamp(52px, 16vw, 72px); line-height: .83; letter-spacing: -.085em; }
  .title mark { border-width: 3px; border-radius: 17px; box-shadow: 8px 8px 0 var(--ink), 14px 14px 0 var(--aqua); }
  .subtitle { width: min(312px, calc(100vw - 44px)); font-size: 15px; }
  .shape.blob-a { width: 260px; height: 350px; left: -120px; }
  .shape.blob-b { width: 230px; height: 310px; right: -118px; }
  .shape.star.one { right: 8px; width: 68px; }
  .shape.star.two { left: 16px; width: 48px; }
  .ticket { width: 176px; min-height: 86px; padding: 10px; }
  .ticket::after { font-size: 11px; }
  .ticket.a { left: 14px; top: 13%; transform: rotate(-8deg) scale(.84); transform-origin: left top; }
  .ticket.b { right: 10px; bottom: 12%; transform: rotate(7deg) scale(.82); transform-origin: right bottom; }
  .chat { width: 196px; left: 18px; bottom: 22%; font-size: 12px; transform: rotate(3deg); }
  .disc.a { left: -44%; width: 86vw; }
  .disc.b { right: -42%; width: 68vw; }
  .barcode { right: -34px; width: 160px; height: 66px; }
  .price { left: 12px; bottom: 18%; font-size: 14px; }
  .cam { inset: 11% 18px auto; height: 58svh; }
  .pixel { left: 10px; width: 92px; height: 92px; background-size: 23px 23px; }
  .bottle { right: 14px; width: 66px; height: 138px; }
  .sticker-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { min-height: 190px; border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
  .mini b { margin-top: 82px; font-size: 22px; }
}

.mvp-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(255,64,93,.24), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(29,216,132,.24), transparent 24%),
    #fff8d9;
}
.mvp-page .stage .ticket,
.mvp-page .stage .chat,
.mvp-page .stage .price,
.mvp-page .stage .shape {
  pointer-events: none;
}
.mvp-page .hero-mvp .copy { max-width: 760px; }
.mvp-page .hero-price { top: 18%; right: 10%; bottom: auto; left: auto; }
.mvp-page .hero-price::after { content: "TOTAL SUGAR"; }
.nav-rule {
  border: 1px solid rgba(17,16,25,.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.66);
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.mvp-shell,
.result-panel,
.compare-panel,
.history-section,
.rules-section {
  width: min(calc(100% - 28px), 1120px);
  margin: 18px auto 82px;
}
.mvp-heading,
.rules-section article {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 42px);
  background:
    radial-gradient(circle at 86% 0%, rgba(255,64,93,.28), transparent 24%),
    radial-gradient(circle at 8% 100%, rgba(66,236,255,.28), transparent 22%),
    #fff;
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}
.mvp-heading h2,
.rules-section h2,
.result-heading h2,
.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 1000;
  line-height: .86;
  letter-spacing: -.08em;
}
.mvp-heading p,
.rules-section p {
  max-width: 650px;
  margin: 18px auto 0;
  color: rgba(17,16,25,.7);
  font-weight: 1000;
  line-height: 1.55;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
}
.mode-tab {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  padding: 0 8px;
  background: transparent;
  color: rgba(17,16,25,.62);
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mode-tab.active {
  color: var(--ink);
  background: var(--yellow);
}

.scanner-card,
.result-panel,
.compare-panel,
.history-section {
  border: 3px solid var(--ink);
  border-radius: 34px;
  padding: clamp(18px, 4vw, 36px);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,95,207,.2), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(66,236,255,.22), transparent 26%),
    rgba(255,255,255,.82);
  box-shadow: 9px 9px 0 var(--ink);
}
.capture-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.capture-progress div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 8px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}
.capture-progress span {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #eee;
}
.capture-progress .active,
.capture-progress .done {
  background: var(--mint);
}
.camera-stage {
  position: relative;
  min-height: clamp(330px, 56vw, 560px);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18) 12px, transparent 12px),
    linear-gradient(rgba(255,255,255,.18) 12px, transparent 12px),
    linear-gradient(135deg, #ff94df, #a9fff0 48%, #ffe86a);
  background-size: 48px 48px, 48px 48px, auto;
}
#cameraVideo,
.barcode-video {
  width: 100%;
  height: clamp(330px, 56vw, 560px);
  object-fit: cover;
  background: #111019;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
}
.camera-placeholder strong,
.barcode-box strong,
.upload-drop strong {
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 1000;
  line-height: .92;
  letter-spacing: -.07em;
}
.camera-placeholder p,
.barcode-box p,
.upload-drop p,
.privacy-note,
.quality-tip {
  color: rgba(17,16,25,.7);
  font-weight: 900;
  line-height: 1.5;
}
.bottle-art {
  position: relative;
  width: 84px;
  height: 138px;
  margin-bottom: 24px;
  border: 4px solid var(--ink);
  border-radius: 22px 22px 34px 34px;
  background: rgba(255,255,255,.5);
  box-shadow: 8px 8px 0 var(--ink);
}
.bottle-art span {
  position: absolute;
  top: -24px;
  left: 24px;
  width: 30px;
  height: 24px;
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
}
.bottle-art b {
  display: grid;
  height: 100%;
  place-items: center;
  font-size: 44px;
}
.guide-frame {
  position: absolute;
  inset: 15% 9%;
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: 0 0 0 999px rgba(17,16,25,.32);
}
.guide-frame span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #fff;
  border-style: solid;
}
.guide-frame span:nth-child(1) { top: -3px; left: -3px; border-width: 5px 0 0 5px; border-radius: 10px 0 0; }
.guide-frame span:nth-child(2) { top: -3px; right: -3px; border-width: 5px 5px 0 0; border-radius: 0 10px 0 0; }
.guide-frame span:nth-child(3) { bottom: -3px; left: -3px; border-width: 0 0 5px 5px; border-radius: 0 0 0 10px; }
.guide-frame span:nth-child(4) { right: -3px; bottom: -3px; border-width: 0 5px 5px 0; border-radius: 0 0 10px; }
.guide-frame b {
  position: absolute;
  right: 10px;
  bottom: 12px;
  left: 10px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 2px 4px var(--ink);
}
.primary-button,
.secondary-button,
.analyze-button,
.manual-barcode button,
.ghost-button {
  min-height: 52px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-weight: 1000;
}
.primary-button,
.analyze-button {
  width: 100%;
  background: var(--yellow);
}
.analyze-button { margin-top: 16px; background: var(--mint); }
.secondary-button { width: 100%; }
.text-button {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 1000;
}
.barcode-box,
.upload-drop {
  display: grid;
  min-height: 310px;
  place-content: center;
  justify-items: center;
  border: 3px solid var(--ink);
  border-radius: 30px;
  padding: 24px;
  background: #fff;
  text-align: center;
}
.barcode-lines {
  width: 160px;
  height: 82px;
  margin-bottom: 24px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 8px, var(--ink) 8px 12px, transparent 12px 18px);
}
.manual-barcode {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  margin-top: 14px;
}
.manual-barcode input,
#feedbackForm textarea {
  min-width: 0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 0 15px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}
.manual-barcode input { min-height: 52px; border-radius: 999px; }
.captured-strip { display: flex; gap: 10px; margin-top: 16px; overflow-x: auto; }
.captured-strip figure { flex: 0 0 104px; margin: 0; }
.captured-strip img { width: 104px; height: 116px; object-fit: cover; border: 3px solid var(--ink); border-radius: 18px; }
.captured-strip figcaption { margin-top: 6px; font-size: 11px; font-weight: 1000; text-align: center; }
.upload-drop figure { margin: 0; }
.upload-drop img { width: 92px; height: 104px; object-fit: cover; border: 3px solid var(--ink); border-radius: 16px; }

.result-heading,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.result-heading p { margin: 8px 0 0; color: rgba(17,16,25,.68); font-weight: 900; }
.confidence {
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 12px;
  font-weight: 1000;
}
.disclaimer-banner,
.sweetener-card,
.explain-card,
.evidence-card {
  margin-top: 16px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  padding: 20px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
}
.disclaimer-banner {
  display: grid;
  gap: 6px;
  background: #fff0b8;
}
.truth-grid,
.definition-grid,
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.definition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric,
.definition-grid article,
.compare-grid article,
.compare-placeholder,
.history-item,
.empty-state {
  border: 3px solid var(--ink);
  border-radius: 26px;
  padding: 22px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
}
.sugar-metric {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--pink));
}
.metric span,
.metric small,
.definition-grid span,
.definition-grid small {
  display: block;
  color: rgba(17,16,25,.64);
  font-weight: 1000;
}
.sugar-metric span,
.sugar-metric small { color: rgba(255,255,255,.78); }
.metric strong { display: block; margin: 28px 0 12px; font-size: 22px; }
.metric strong b {
  font-size: clamp(54px, 10vw, 108px);
  line-height: .8;
  letter-spacing: -.08em;
}
.definition-grid b { display: block; margin: 22px 0 8px; font-size: 22px; line-height: .95; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.tag-list .tag {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--mint);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 12px;
}
.evidence-list { display: grid; gap: 10px; margin-top: 14px; }
.evidence-list div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; border-bottom: 2px dashed rgba(17,16,25,.18); padding-bottom: 10px; }
.result-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.history-list { display: grid; gap: 10px; margin-top: 16px; }
.history-item { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; }
.history-item span b,
.history-item span small { display: block; }
.history-item > strong { font-size: 30px; letter-spacing: -.05em; }
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: #fff;
  background: rgba(17,16,25,.88);
  text-align: center;
}
.loader {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
dialog {
  width: min(calc(100% - 34px), 560px);
  max-height: 86vh;
  overflow-y: auto;
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 28px;
  color: var(--ink);
  background: #fff;
  box-shadow: 9px 9px 0 var(--ink);
}
dialog::backdrop { background: rgba(17,16,25,.34); backdrop-filter: blur(6px); }
dialog h2 { margin: 12px 0; font-size: 38px; line-height: .9; letter-spacing: -.07em; }
dialog p { line-height: 1.55; font-weight: 800; }
.dialog-close { float: right; border: 0; background: transparent; font-size: 30px; font-weight: 1000; }
#feedbackForm { display: grid; gap: 10px; }
#feedbackForm label { border: 2px solid var(--ink); border-radius: 16px; padding: 12px; font-weight: 900; }
#feedbackForm textarea { min-height: 112px; padding: 14px; resize: vertical; border-radius: 18px; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .nav-rule { display: none; }
  .mvp-page .hero-mvp .copy { max-width: 342px; }
  .mvp-page .hero-price { top: auto; right: -28px; bottom: 14%; }
  .mvp-shell,
  .result-panel,
  .compare-panel,
  .history-section,
  .rules-section { width: min(calc(100% - 28px), 362px); margin-bottom: 58px; }
  .mvp-heading h2,
  .rules-section h2,
  .result-heading h2,
  .section-title h2 { font-size: 38px; line-height: .9; }
  .mode-tabs { gap: 4px; padding: 5px; }
  .mode-tab { min-height: 38px; padding: 0 4px; font-size: 11px; }
  .scanner-card,
  .result-panel,
  .compare-panel,
  .history-section { padding: 18px; border-radius: 28px; box-shadow: 6px 6px 0 var(--ink); }
  .capture-progress { gap: 5px; }
  .capture-progress div { gap: 4px; padding: 6px 4px; font-size: 10px; }
  .capture-progress span { width: 20px; height: 20px; }
  .camera-stage,
  #cameraVideo,
  .barcode-video { min-height: 330px; height: 330px; }
  .manual-barcode { grid-template-columns: 1fr; }
  .truth-grid,
  .definition-grid,
  .compare-grid,
  .result-actions { grid-template-columns: 1fr; }
  .definition-grid article { min-height: 128px; }
  .result-heading,
  .section-title { display: grid; }
  .confidence { width: max-content; }
  .evidence-list div { grid-template-columns: 1fr; }
}
