@font-face {
  font-family: Bayon;
  src: url("assets/bayon.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alex Brush";
  src: url("assets/alex-brush.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Oswald Cyrillic";
  src: url("assets/oswald-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --body-font: Helvetica, Arial, sans-serif;
  --heading-font: Bayon, "Oswald Cyrillic", "Arial Narrow", sans-serif;
  --hero-top: #95a26c;
  --hero-bottom: #596e44;
  --ink: #3e5531;
  --button: #3e5531;
  --button-hover: #304626;
  --on-button: white;
  --script: #293d23;
  --moss: #95a26c;
  --moss-ink: #95a26c;
  --on-moss: white;
  --olive: #adac7c;
  --olive-ink: #adac7c;
  --paper-top: #f3f5ea;
  --paper-bottom: #cfcba6;
  --card: white;
  --wash: #eee;
  --muted: #808080;
  --band: #3b5235;
  --analysis-paper: #f1f3e7;
  --result-row: #cfcba6;
  --result-badge: #c0bc91;
  --error: #9c2828;
  --shadow: 0 4px 8px #0004;
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--paper-top);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --hero-top: #303e2a;
  --hero-bottom: #1c2719;
  --ink: #e8eedb;
  --button: #b6c68b;
  --button-hover: #cbd9a7;
  --on-button: #23321f;
  --script: #d3dfa8;
  --moss: #435439;
  --moss-ink: #bac994;
  --on-moss: #f3f5ea;
  --olive: #4a5036;
  --olive-ink: #d0d5a5;
  --paper-top: #242d20;
  --paper-bottom: #191f17;
  --card: #303a29;
  --wash: #263023;
  --muted: #c9cdbf;
  --band: #111911;
  --analysis-paper: #242d20;
  --result-row: #303a29;
  --result-badge: #262f22;
  --error: #ffc0b7;
  --shadow: 0 4px 8px #0006;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
button:disabled { cursor: default; opacity: .58; }
[hidden] { display: none !important; }

:where(a, button, summary):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.hero {
  --hero-lip: 30px;
  position: relative;
  height: clamp(590px, 62.443vw, 716px);
  overflow: hidden;
  background: linear-gradient(var(--hero-top), var(--hero-bottom));
  text-align: center;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: -38px;
  left: 0;
  height: calc(var(--hero-lip) + 38px);
  border-radius: 68px 68px 0 0;
  background: var(--moss);
  content: "";
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(96% - 6px, 1376px);
  min-height: 68px;
  margin-inline: auto;
  padding: 0 0 0 11px;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 53%, transparent);
}

.wordmark, .main-link, .header-controls, .theme-options, .language-options {
  display: flex;
  align-items: center;
}

.wordmark {
  justify-self: start;
  gap: 7px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
  text-decoration: none;
  translate: 0 3px;
}

.brand-mark {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  background: var(--button);
}

.brand-mark::after {
  width: 20px;
  height: 20px;
  background: var(--on-button);
  clip-path: polygon(50% 0%, 57% 33%, 86% 13%, 67% 42%, 100% 50%, 67% 57%, 86% 86%, 57% 67%, 50% 100%, 42% 67%, 13% 86%, 33% 57%, 0% 50%, 33% 42%, 13% 13%, 42% 33%);
  content: "";
}

.site-header nav { translate: -8px 2px; }

.main-link {
  justify-content: center;
  gap: 27px;
  min-width: 112px;
  min-height: 34px;
  padding-inline: 13px;
  border-radius: 14px;
  background: var(--button);
  color: var(--on-button);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.home-icon {
  width: 16px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 50%, 90% 50%, 90% 95%, 60% 95%, 60% 67%, 40% 67%, 40% 95%, 10% 95%, 10% 50%, 0 50%);
}

.header-controls {
  justify-self: end;
  gap: 8px;
  translate: 2px 1px;
}

.theme-options {
  padding-inline: 5px;
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
}

.language-options {
  flex: none;
  padding: 2px;
  border-radius: 99px;
  background: var(--card);
}

.language-options button {
  min-width: 26px;
  min-height: 23px;
  padding: 0 4px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.language-options button[aria-pressed="true"] {
  background: var(--button);
  color: var(--on-button);
}

.theme-options button {
  display: grid;
  width: 28px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--moss-ink);
}

.theme-options button[aria-pressed="true"] { color: var(--ink); }
.theme-options button:focus-visible { outline-offset: -2px; }

.sun-icon, .moon-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.sun-icon::before {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.sun-icon::after {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -8px, 0 8px, -8px 0, 8px 0, -6px -6px, 6px -6px, -6px 6px, 6px 6px;
  content: "";
}

.moon-icon {
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: currentColor;
  clip-path: polygon(0 0, 68% 0, 61% 20%, 62% 35%, 70% 48%, 83% 54%, 100% 54%, 100% 100%, 0 100%);
}

.avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--button);
  color: var(--on-button);
  font-size: 11px;
  font-weight: 700;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 54px 16px 0;
  color: #fff;
}

.hero h1, .section-pill, .analysis h3, .results h4, .analysis-upload strong {
  font-family: var(--heading-font);
  font-weight: 400;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 48px;
  line-height: 1;
  translate: -4px 2px;
}

.hero-script {
  margin-top: -26px;
  color: var(--script);
  font: 40px/1 "Alex Brush", cursive;
  translate: 3px;
}

.hero-description {
  max-width: 300px;
  margin: 6px auto 0;
  font-size: 10px;
  line-height: 14px;
  translate: 7px;
}

.action {
  display: inline-grid;
  place-items: center;
  padding: 0 20px;
  border: 0;
  border-radius: 99px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
  text-decoration: none;
}

.action:hover, .main-link:hover { background: var(--button-hover); }

.hero-action {
  min-width: 206px;
  min-height: 38px;
  margin-top: 47px;
  font-size: 11px;
}

.hero-visual {
  position: absolute;
  bottom: var(--hero-lip);
  left: calc(50% - 6px);
  width: min(66.513%, 719px);
  transform: translateX(-50%);
}

.hero-visual img {
  width: 100%;
  height: auto;
}

.showcase {
  --inset: clamp(22px, 4vw, 42px);
  background: linear-gradient(var(--paper-top), var(--paper-bottom) 882px);
  text-align: center;
}

.quick-start {
  max-width: 990px;
  margin-inline: auto;
  padding: 31px var(--inset) 0;
  scroll-margin-top: 12px;
}

.section-pill {
  display: inline-grid;
  min-height: 27px;
  place-items: center;
  padding-inline: 16px;
  border-radius: 99px;
  font-size: 20px;
  line-height: 1;
}

.start-pill {
  min-width: 124px;
  min-height: 23px;
  background: #607348;
  color: #fff;
  translate: 9px;
}

.quick-copy {
  margin-top: 12px;
  color: var(--moss-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  translate: min(34px, 3.2vw);
}

.upload-card {
  width: min(100%, 736px);
  margin: 35px auto 0;
  padding: 23px 25px 25px;
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
  translate: 13px;
}

.upload-card:has(.analysis:not([hidden])) { width: 100%; }

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 99px;
  background: var(--wash);
}

.mode-options { margin-bottom: 15px; }

.segmented label, .fruit-filters label { position: relative; }

.segmented input, .fruit-filters input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.segment {
  display: flex;
  min-width: 86px;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 99px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.segmented input:checked + .segment {
  background: var(--button);
  color: var(--on-button);
}

.segmented input:focus-visible + .segment,
.fruit-filters input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.segmented input:disabled + .segment { opacity: .45; cursor: default; }

.mode-icon {
  position: relative;
  width: 14px;
  height: 12px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.photo-icon::after, .video-icon::after, .live-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  content: "";
}

.photo-icon::after { width: 5px; height: 5px; border-radius: 50%; }
.video-icon::after { width: 5px; height: 6px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.live-icon { width: 12px; border-radius: 50%; }
.live-icon::after { width: 4px; height: 4px; border-radius: 50%; }
.box-icon { border-radius: 2px; }
.mask-icon { border: 0; background: currentColor; border-radius: 45% 55% 60% 40%; }

.drop-zone {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 2px dotted var(--ink);
  border-radius: 11px;
  background: var(--wash);
  color: var(--moss-ink);
}

.upload-card.is-dragging :is(.drop-zone, .analysis-photo) {
  outline: 3px solid var(--button);
  outline-offset: -4px;
}

.upload-icon {
  position: relative;
  width: 52px;
  height: 23px;
  flex: none;
  margin-top: 14px;
  border-radius: 18px;
  background: currentColor;
}

.upload-icon::before {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 12px 10px currentColor;
  content: "";
}

.upload-icon::after {
  position: absolute;
  bottom: -1px;
  left: 19px;
  width: 17px;
  height: 23px;
  background: var(--wash);
  clip-path: polygon(50% 0, 100% 52%, 65% 52%, 65% 100%, 35% 100%, 35% 52%, 0 52%);
  content: "";
}

.drop-zone p {
  max-width: 245px;
  margin-top: 13px;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.choose-photo {
  min-width: 148px;
  min-height: 35px;
  margin-top: 12px;
  font-size: 10px;
}

.text-action {
  min-height: 31px;
  margin-top: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.text-action:hover { text-decoration: underline; }

.fruit-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 15px;
}

.fruit-filters legend {
  width: 100%;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.fruit-filters label > span {
  display: flex;
  min-height: 35px;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--moss);
  border-radius: 99px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fruit-filters label > span::before {
  width: 11px;
  height: 11px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 3px;
  content: "";
}

.fruit-filters input:checked + span {
  border-color: var(--button);
  background: var(--button);
  color: var(--on-button);
}

.fruit-filters input:checked + span::before {
  border: 0;
  background: currentColor;
  clip-path: polygon(8% 50%, 0 66%, 35% 98%, 100% 20%, 85% 6%, 34% 72%);
}

.fruit-filters .fruit-filter-all > span { border-width: 2px; }

.fruit-filters input:indeterminate + span {
  background: var(--result-row);
}

.fruit-filters input:indeterminate + span::before {
  background: linear-gradient(currentColor, currentColor) center / 6px 2px no-repeat;
}

.upload-error {
  margin-top: 12px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.4;
}

.upload-error:empty { margin: 0; }

.statistics { margin-top: 62px; }

.statistics-pill {
  min-width: 132px;
  background: var(--moss);
  color: var(--on-moss);
  translate: 9px;
}

.statistics-board {
  display: flow-root;
  width: min(100% - 68px, 1160px);
  margin: 38px auto 0;
  padding: 0 var(--inset) 29px;
  border-radius: 0 0 86px 86px;
  background: var(--moss);
  box-shadow: var(--shadow);
  color: var(--on-moss);
  translate: 14px;
}

.statistics-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 738px;
  margin: -19px auto 0;
  translate: -17px;
}

.statistic {
  display: flex;
  min-height: 105px;
  flex-direction: column;
  padding: 21px 6px 12px;
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.statistic dt {
  max-width: 130px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
}

.statistic dd {
  order: -1;
  color: var(--moss-ink);
  font-size: 48px;
  line-height: 43px;
}

.statistics-copy {
  margin: 20px auto 0;
  font-size: 13px;
  line-height: 18px;
  translate: -12px;
}

.confidence {
  position: relative;
  width: min(81%, 960px);
  margin: 87px auto 0;
  padding: 67px var(--inset) 23px;
  border-radius: 196px 196px 0 0;
  background: var(--olive);
  color: var(--on-moss);
}

.confidence-info, .confidence-pill {
  position: absolute;
  left: calc(50% + 4px);
  transform: translateX(-50%);
}

.confidence-info {
  z-index: 1;
  top: -39px;
  width: max-content;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.confidence-info summary {
  display: flex;
  min-height: 16px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
}

.confidence-info summary::-webkit-details-marker { display: none; }

.info-icon {
  display: grid;
  width: 10px;
  height: 10px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 7px;
  line-height: 1;
}

.confidence-info p {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  width: 210px;
  padding: 10px 12px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.confidence-pill {
  top: -20px;
  width: max-content;
  min-width: 222px;
  min-height: 47px;
  background: var(--card);
  color: var(--olive-ink);
}

.confidence-copy {
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
}

.confidence-card {
  display: grid;
  gap: 11.5px;
  width: min(100%, 477px);
  margin: 36px auto 0;
  padding: 18px 22px 14px;
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
  translate: 3px;
}

.confidence-row {
  display: grid;
  min-height: 25px;
  grid-template-columns: 53px minmax(0, 1fr) 47px;
  align-items: center;
  gap: 9px;
  color: var(--moss-ink);
  font-size: 15px;
  font-weight: 700;
}

:lang(ru) .confidence-row { grid-template-columns: 67px minmax(0, 1fr) 40px; }
:lang(ru) .confidence-row span:first-child { font-size: 13px; }

.confidence-row span:last-child {
  color: var(--ink);
  font-size: 13px;
}

meter {
  display: block;
  width: 100%;
  height: 4px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: var(--wash);
}

meter::-webkit-meter-bar {
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: var(--wash);
}

meter::-webkit-meter-optimum-value {
  border-radius: 99px;
  background: var(--button);
}

meter::-moz-meter-bar {
  border-radius: 99px;
  background: var(--button);
}

.bottom-band {
  height: 98px;
  border-radius: 88px 88px 0 0;
  background: var(--band);
}

.analysis {
  padding: clamp(12px, 2.2vw, 22px);
  border-radius: 14px;
  background: var(--analysis-paper);
  text-align: left;
}

.analysis-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.analysis-header h3 {
  color: var(--ink);
  font-size: clamp(25px, 3.2vw, 34px);
  line-height: 1.1;
}

.analysis-header h3:focus { outline: none; }

.overlay-options { background: var(--card); }
.overlay-options .segment { min-width: 0; }

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: start;
  gap: 19px;
}

#preview-filters .fruit-filters {
  justify-content: flex-start;
  margin: 0 0 10px;
}

#preview-filters .fruit-filters legend {
  margin-bottom: 5px;
  text-align: left;
}

#preview-filters .fruit-filters label > span {
  min-height: 34px;
  padding-inline: 8px;
  font-size: 11px;
}

.analysis-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
}

.analysis-photo[data-loading] { aspect-ratio: 662 / 392; }

.analysis-photo video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(760px, max(240px, 69svh));
  object-fit: contain;
}

#annotated-frame {
  display: block;
  max-width: 100%;
}

.analysis-photo[data-media] #annotated-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.analysis-image-wrap {
  width: 100%;
}

.analysis-image-wrap img {
  width: 100%;
  max-height: 69svh;
  object-fit: contain;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  border-radius: 12px;
  background: var(--card);
}

.video-controls button {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
}

.video-controls input { flex: 1; min-width: 0; accent-color: var(--button); }
.video-controls span { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.frame-rate { display: block; margin-top: 4px; font-size: .85rem; font-variant-numeric: tabular-nums; }

.analysis-upload {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 22px 8px 28px;
  border: 0;
  border-radius: 15px;
  background: var(--moss);
  color: var(--on-moss);
  text-align: left;
}

.analysis-upload:hover { background: color-mix(in srgb, var(--moss), var(--ink) 15%); }

.analysis-upload strong, .analysis-upload span span { display: block; }
.analysis-upload strong { font-size: 14px; letter-spacing: .15px; line-height: 1; }
.analysis-upload span span { margin-top: 1px; font-size: 11px; line-height: 1.3; }

.upload-arrow {
  position: relative;
  width: 13px;
  height: 5px;
  flex: none;
  margin-top: 6px;
  border: 1px solid var(--ink);
  border-top: 0;
}

.upload-arrow::before {
  position: absolute;
  bottom: 3px;
  left: 5px;
  width: 1px;
  height: 9px;
  background: var(--ink);
  content: "";
}

.upload-arrow::after {
  position: absolute;
  bottom: 6px;
  left: 3px;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  content: "";
}

.results {
  width: 100%;
  padding: 13px 11px 21px;
  border-radius: 18px;
  background: var(--moss);
}

.results h4 {
  margin: 0;
  color: var(--on-moss);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: .3px;
  line-height: 1;
  translate: 0 2px;
}

.results p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.results .analysis-note {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--result-row);
}

.results-list {
  display: grid;
  gap: 13px;
  margin-top: 17px;
}

.results-list div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px 5px 12px;
  border-radius: 8px;
  background: var(--result-row);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.results-list dt {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}

.results-list div[style*="--fruit-color"] dt::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid #101711;
  border-radius: 50%;
  background: var(--fruit-color);
}

.results-list dd {
  display: grid;
  flex: none;
  min-width: 44px;
  min-height: 33px;
  place-items: center;
  padding: 6px 7px;
  border-radius: 13px;
  background: var(--result-badge);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.results-list dd[data-pending] { font-size: 0; line-height: 0; }
.results-list dd:not([data-pending]) { color: var(--ink); }

.results-list dd[data-pending]::after {
  width: 29px;
  height: 3px;
  background: currentColor;
  content: "";
}

.calorie-summary {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}

.calorie-summary .calorie-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  margin: 0;
}

.calorie-total output {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.calorie-summary .calorie-note { font-size: 13px; }

.retry-analysis {
  min-height: 36px;
  margin-top: 12px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .hero { --hero-lip: 21px; height: auto; }
  .hero::after { border-radius: 44px 44px 0 0; }
  .site-header {
    width: calc(100% - 28px);
    min-height: 60px;
    grid-template-columns: auto 1fr auto;
    gap: 6px;
    padding: 0;
  }
  .site-header nav { justify-self: center; }
  .site-header nav { translate: none; }
  .wordmark { gap: 5px; font-size: 19px; translate: none; }
  .brand-mark { width: 21px; height: 21px; }
  .brand-mark::after { width: 17px; height: 17px; }
  .main-link { min-width: auto; min-height: 42px; gap: 8px; padding-inline: 11px; font-size: 13px; }
  .header-controls { gap: 5px; translate: none; }
  .theme-options { padding-inline: 1px; }
  .theme-options button { width: 31px; height: 40px; }
  .language-options button { min-width: 28px; min-height: 36px; }
  .avatar { width: 24px; height: 24px; }

  .hero-copy { padding-top: 41px; }
  .hero h1 { font-size: clamp(32px, 10.5vw, 48px); translate: none; }
  .hero-script { margin-top: -.54em; font-size: clamp(28px, 8.5vw, 39px); translate: none; }
  .hero-description { margin-top: 10px; font-size: 12px; line-height: 16px; translate: none; }
  .hero-action { min-height: 44px; margin-top: 27px; font-size: 12px; }
  .hero-visual {
    position: relative;
    bottom: auto;
    width: min(92%, 529px);
    margin: clamp(30px, 8vw, 50px) 0 var(--hero-lip);
  }

  .showcase { --inset: 18px; }
  .quick-start { padding-top: 27px; }
  .start-pill, .quick-copy, .upload-card, .statistics-pill, .statistics-board,
  .statistics-cards, .confidence-card { translate: none; }
  .desktop-break { display: none; }
  .upload-card { margin-top: 24px; padding: 14px; }
  .drop-zone { min-height: 172px; }
  .choose-photo { min-height: 44px; font-size: 12px; }

  .statistics { margin-top: 46px; }
  .statistics-board {
    width: calc(100% - 36px);
    margin-top: 30px;
    padding-bottom: 24px;
    border-radius: 0 0 38px 38px;
  }
  .statistics-cards { max-width: 480px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .statistic { min-height: 94px; padding-top: 13px; }
  .statistic dd { font-size: 42px; line-height: 41px; }
  .statistics-copy { max-width: 440px; margin-top: 16px; translate: none; }

  .confidence {
    width: calc(100% - 36px);
    margin-top: 78px;
    padding: 53px 15px 24px;
    border-radius: 72px 72px 0 0;
  }
  .confidence-info, .confidence-pill { left: 50%; }
  .confidence-copy { max-width: 390px; margin-inline: auto; font-size: 12px; line-height: 16px; }
  .confidence-card { gap: 9px; margin-top: 22px; padding: 13px 12px; }
  .confidence-row { grid-template-columns: 50px minmax(0, 1fr) 34px; gap: 7px; font-size: 14px; }
  .confidence-row span:last-child { font-size: 12px; }
  .bottom-band { height: 64px; border-radius: 44px 44px 0 0; }

  .analysis-grid { grid-template-columns: 1fr; gap: 14px; }
  .analysis-photo { border-radius: 16px; }
  #preview-filters .fruit-filters label > span { min-height: 40px; }
  .analysis-upload { padding-inline: 12px; }
  .segment { min-height: 44px; }
  .fruit-filters label > span { min-height: 43px; }
  .analysis-header { gap: 10px; }
  .retry-analysis { min-height: 44px; }
}

@media (max-width: 380px) {
  .site-header .avatar { display: none; }
  .mode-options .segment { min-width: 0; padding-inline: 9px; }
  .overlay-options .segment { gap: 4px; padding-inline: 8px; font-size: 12px; }
}
