:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --ink: #182227;
  --muted: #545e62;
  --blue: #1641ae;
  --line: #dcded8;
  --frame-width: 1280px;
  font-family: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box }
body { margin: 0 }
button, input, select { font: inherit }
button, select { cursor: pointer }
button, a, input, select { -webkit-tap-highlight-color: transparent }
button { color: inherit }
a { color: var(--blue) }
:focus-visible { outline: 3px solid #bf6100; outline-offset: 3px }
.frame { --frame-gutter: clamp(18px, 4vw, 60px); max-width: var(--frame-width); margin: auto; padding: 0 var(--frame-gutter) }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none }
.symbols { display: none }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap }
[hidden] { display: none !important }
header, nav, .wordmark, .nav-link, .city, .hero form, .primary, .input-wrap, .examples, .heading-row, .filters, .store-name, .dialog-head, .footer-link { display: flex; align-items: center }
header { min-height: 58px; justify-content: space-between; gap: 14px; }
.wordmark { color: var(--ink); text-decoration: none; gap: 9px; white-space: nowrap }
.wordmark b { font-size: 30px; line-height: 1; letter-spacing: -2px; font-weight: 800 }
.wordmark b span, h1 span { color: var(--blue) }
.barcode { width: 29px; height: 26px; background: linear-gradient(90deg,var(--blue) 0 3px,transparent 3px 5px,var(--blue) 5px 11px,transparent 11px 14px,var(--blue) 14px 16px,transparent 16px 19px,var(--blue) 19px 23px,transparent 23px 26px,var(--blue) 26px) }
.division { border-left: 1px solid #bcc1bb; margin: 4px 0 0 7px; padding-left: 14px; font-size: 15px; color: var(--muted) }
nav { gap: 25px; font-size: 14px }
.nav-link, .footer-link { border: 0; background: none; padding: 8px 0; gap: 8px }
.nav-link:hover, .footer-link:hover { color: var(--blue); text-decoration: underline }
.city { gap: 4px; color: var(--blue); font-weight: 650 }
.hero { display: grid; grid-template-columns: minmax(166px,.6fr) minmax(230px,1.6fr) minmax(68px,.35fr); align-items: center; gap: clamp(10px,2vw,26px); padding: 7px clamp(14px,2vw,26px); border-radius: 11px; background: #fbdc92 }
.hero-basket { display: block; width: min(100%,100px); height: 69px; object-fit: contain; justify-self: end; mask-image: linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent) }
h1, h2, p { margin: 0 }
h1 { font-size: clamp(22px,2.35vw,31px); line-height: 1.05; letter-spacing: -.045em; font-weight: 730 }
.hero form { --lens-size: 19px; --lens-pad: 12px; --lens-gap: 10px; position: relative; min-width: 0; background: #fff; border-radius: 8px; gap: 4px; padding: 3px }
.input-wrap { gap: var(--lens-gap); padding-left: var(--lens-pad); flex: 1; min-width: 0 }
.input-wrap svg { color: #60676b; width: var(--lens-size); height: var(--lens-size) }
.input-wrap input { background: transparent; border: 0; width: 100%; min-width: 0; height: 48px; padding: 0; color: var(--ink); font-size: 15px }
.input-wrap input:focus { outline: none; caret-color: var(--blue) }
.input-wrap:focus-within svg { color: #fff; background: var(--blue); box-shadow: 0 0 0 3px var(--blue); border-radius: 50% }
input::placeholder { color: #62686c }
.primary { color: #fff; font-weight: 650; gap: 10px; padding: 0 16px; height: 48px; background: var(--blue); border: 0; border-radius: 6px }
.primary:hover { background: #082e91 }
.primary:focus-visible { outline: 2px solid #fff; outline-offset: -4px }
.search-action { flex: 0 0 48px; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px; color: #384c60; background: #f2f4f6 }
.search-action svg { width: 21px; height: 21px; stroke-width: 2.2 }
.search-action[aria-expanded="true"], .search-action:active { background: #e4ebf8; color: var(--blue) }
.search-action[aria-expanded="true"] svg { transform: rotate(180deg) }
.search-action:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px }
.search-history {
  position: absolute; z-index: 4; inset-inline: 0; top: calc(100% + 4px);
  max-height: min(250px, 45dvh, var(--history-room, 100dvh)); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 4px 0; list-style: none; background: #fff;
  border: 1px solid #c9ceca; border-radius: 8px; box-shadow: 0 5px 16px #18222720;
}
.search-history li { display: flex; align-items: center; gap: var(--lens-gap); min-height: 48px; padding: 8px 14px 8px calc(var(--lens-pad) + 2px); cursor: pointer; overflow-wrap: anywhere }
.search-history li svg { color: var(--muted); width: var(--lens-size); height: var(--lens-size) }
.search-history li[aria-selected="true"] { color: var(--blue); background: #e8eef9; box-shadow: inset 3px 0 var(--blue) }
@media (hover: hover) {
  .search-action:hover, .search-history li:hover { background: #edf1f6; color: var(--blue) }
}
@media (forced-colors: active) {
  .input-wrap:focus-within svg { outline: 2px solid Highlight; outline-offset: 2px }
  .search-history li[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px }
}
.examples { min-height: 27px; margin-top: 6px; gap: 11px; font-size: 13px; flex-wrap: wrap }
.examples span { color: #504b3a }
.examples button { background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #82754e }
.examples button:hover { color: var(--blue) }
.search-results { margin-top: 22px; scroll-margin-top: 18px }
.heading-row { justify-content: space-between; align-items: center; gap: 16px }
.result-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; max-width: 100% }
.select-wrap { max-width: 100% }
.select-wrap select { max-width: 100% }
h2 { font-size: clamp(25px,3vw,38px); letter-spacing: -.048em; line-height: 1.08; font-weight: 710 }
#summary, .intro, .search-note { color: var(--muted); font-size: 14px; line-height: 1.45 }
#summary { margin-top: 6px }
.select-wrap select { padding: 9px 28px 9px 12px; color: var(--ink); background: transparent; border: 1px solid #c9ceca; border-radius: 7px; font-size: 14px }
.filters { gap: 7px; flex-wrap: wrap; margin: 20px 0 17px }
.filter { min-height: 34px; border: 1px solid #cdd1ca; border-radius: 30px; background: transparent; padding: 6px 13px; font-size: 14px; white-space: nowrap }
.filter:hover { border-color: var(--blue); color: var(--blue) }
#store-list h3 { margin: 20px 0 0; font-size: 17px }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff }
.search-note { padding: 8px 0 12px }
.search-note button, .empty button { background: none; color: var(--blue); border: 0; text-decoration: underline; text-underline-offset: 3px; padding: 3px 5px }
.category-filter { max-width: 490px; margin-bottom: 14px }
.category-toggle {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 18px;
  align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 8px 12px;
  border: 1px solid #b8c7df; border-radius: 8px; background: #eff4fc; color: var(--blue);
  font-size: 14px; text-align: start;
}
.category-toggle:hover, .category-toggle[aria-expanded="true"] { border-color: #7e9ad2; background: #e8effb }
.category-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px }
.category-label { color: var(--muted); font-size: 13px }
.category-current { font-weight: 680; text-align: end; line-height: 1.2; overflow-wrap: anywhere }
.category-toggle svg { width: 18px; height: 18px }
.category-toggle[aria-expanded="true"] svg { rotate: 180deg }
.category-options {
  max-height: min(48vh, 420px); max-height: min(48dvh, 420px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 4px 6px; margin-top: 5px;
  scroll-padding-block-start: 46px;
  border: 1px solid #b8c7df; border-radius: 8px; background: var(--paper); box-shadow: 0 4px 12px #18222714;
}
.category-option {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 46px; width: 100%; padding: 7px 9px; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: start; font-size: 14px; line-height: 1.25;
}
.category-option:first-child { position: sticky; inset-block-start: 0; z-index: 1; background: var(--paper) }
.category-option:last-child { border-bottom-color: transparent }
.category-option:hover, .category-option:focus-visible { background: #eef3fc; border-radius: 5px }
.category-option:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px }
.category-option[aria-pressed="true"] {
  background: #e2eafa; color: #173c90; border-radius: 5px; border-bottom-color: transparent; font-weight: 680;
}
.category-option span:first-child { overflow-wrap: anywhere }
.category-option-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums }
.category-heading { scroll-margin-top: 10px }
.search-results { --photo-size: clamp(126px, 12vw, 156px) }
.column-head, .offer { display: grid; grid-template-columns: var(--photo-size) minmax(0,2.35fr) minmax(120px,.82fr) minmax(148px,.7fr) 32px; gap: 0 18px; align-items: center }
.column-head > :first-child, .offer-product { grid-column: 1 / 3 }
.has-photo .offer-product { grid-column: 2 }
.column-head { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 12px; }
.offer-group + .offer-group { margin-top: 20px }
.category-heading { margin: 0; padding: 11px 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 12px; border-inline-start: 3px solid var(--blue); background: #edf1ed; font-size: 18px; line-height: 1.25; letter-spacing: -.02em }
.category-count { color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: normal }
.offer { min-height: 78px; width: 100%; padding: 13px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left }
.offer-row { display: grid; grid-template-columns: 1fr; isolation: isolate }
.offer-row > * { grid-column: 1; grid-row: 1 }
.has-photo .offer { min-height: calc(var(--photo-size) + 22px) }
.photo-button { z-index: 1; align-self: center; justify-self: start; width: var(--photo-size); height: var(--photo-size); margin-inline-start: 12px; position: relative; display: grid; place-items: center; padding: 5px; cursor: zoom-in; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff }
.photo-button img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain }
.photo-button svg { position: absolute; inset: auto 3px 3px auto; padding: 3px; width: 23px; height: 23px; color: var(--blue); background: rgb(255 255 255 / 92%); border-radius: 50% }
.photo-button:hover, .photo-button:focus-visible { border-color: var(--blue) }
.offer:hover { background: #f0f2ec }
.product-name { display: block; font-weight: 610; line-height: 1.28; font-size: 16px; overflow-wrap: anywhere }
.secondary { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 4px }
.store-name { gap: 8px; font-size: 14px; font-weight: 570 }
.store-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none }
.offer-price { display: block; font-size: 19px; font-weight: 680; white-space: nowrap; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.035em }
.detail-arrow { justify-self: end; width: 29px; height: 29px; display: grid; place-items: center; color: var(--blue); border: 1px solid #d5dacf; border-radius: 50% }
.detail-arrow svg { width: 15px }
#results-end { height: 1px; overflow-anchor: none }
.search-overlay { position: fixed; z-index: 5; inset: 0; display: grid; place-items: center; padding: 18px; background: rgb(24 34 39 / 24%) }
html:has(.search-overlay:not([hidden]):not(.inline)), html:has(#photo-dialog[open]) { overflow: hidden }
.search-overlay.inline { position: static; min-height: 170px; padding: 24px 0; background: transparent }
.search-overlay.inline .loading-card { box-shadow: none; background: transparent }
.loading-card { display: flex; align-items: center; gap: 18px; width: fit-content; max-width: min(100%, 400px); padding: 20px 24px; border-radius: 16px; background: var(--paper); box-shadow: 0 12px 48px #18222730 }
.loading-card strong { font-size: 19px; letter-spacing: -.025em }
.loading-card p { margin-top: 4px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere }
.loading-ring { position: relative; flex: none; width: 64px; height: 64px; display: grid; place-items: center; color: var(--blue); font-weight: 650; font-variant-numeric: tabular-nums }
.loading-ring::before, .loading-ring::after { content: ""; position: absolute; border-radius: 50% }
.loading-ring::before { inset: 5px; background: conic-gradient(var(--blue) var(--progress, 0%), #dce3ef 0); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), black calc(100% - 4px)) }
.loading-ring::after { inset: 0; border: 2px solid transparent; border-top-color: var(--blue); animation: store-spin 1s linear infinite }
@keyframes store-spin { to { transform: rotate(1turn) } }
@media (prefers-reduced-motion: reduce) { .loading-ring::after { animation: none } }
.empty { padding: 28px 12px; border-bottom: 1px solid var(--line) }
.empty strong { font-size: 19px }
.empty p { max-width: 610px; margin: 6px 0; color: var(--muted) }
.back-to-search {
  --bottom-gap: calc(14px + env(safe-area-inset-bottom, 0px));
  position: fixed; z-index: 3;
  inset-inline-start: max(12px, env(safe-area-inset-left, 0px)); inset-block-end: var(--bottom-gap);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-inline-size: 48px; min-block-size: 48px; padding: 0 15px;
  border: 1px solid #0f3698; border-radius: 24px;
  color: #fff; background: var(--blue); box-shadow: 0 4px 12px #18222730;
  font-size: 14px; font-weight: 650; line-height: 1.2;
}
.back-to-search svg { width: 22px; height: 22px; stroke-width: 2.1; rotate: -90deg }
.back-to-search:is(:hover,:active) { background: #082e91 }
@media (min-width: 1280px) {
  .back-to-search {
    inset-inline-start: max(4px, calc((100% - var(--frame-width)) / 2 - 4px));
    inset-block: 50% auto; translate: 0 -50%;
    min-inline-size: 44px; min-block-size: 44px; padding: 0; border-radius: 14px;
  }
  .back-to-search span { display: none }
}
@media (width < 1280px) {
  html:has(.back-to-search:not([hidden])) { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) }
  .back-to-search:not([hidden]) + footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) }
}
footer { border-top: 1px solid var(--line); margin: 34px 0 0; padding: 18px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); overflow-anchor: none }
footer b { color: var(--blue) }
.footer-link { font-size: 13px }
.footer-link svg { width: 15px }
dialog { background: var(--paper); color: var(--ink); border: 0; border-radius: 16px; width: min(560px,calc(100% - 24px)); max-height: 86dvh; padding: clamp(20px,4vw,32px); box-shadow: 0 15px 70px #10222433 }
dialog::backdrop { background: #17212c72 }
dialog h2 { font-size: clamp(24px,4vw,31px); overflow-wrap: anywhere }
.dialog-head { justify-content: space-between; gap: 12px; margin-bottom: 12px }
.close { border: 0; background: #e8eae4; width: 35px; height: 35px; border-radius: 50%; font-size: 24px; line-height: 1 }
#photo-dialog { width: min(960px,calc(100% - 24px)); max-height: 94dvh; padding: clamp(12px,2vw,24px); background: #fff }
#photo-dialog .dialog-head { align-items: flex-start }
#photo-dialog h2 { margin-block: 3px; font-size: clamp(17px,2.4vw,24px); line-height: 1.2; letter-spacing: -.025em }
#photo-dialog .close { width: 40px; height: 40px }
#photo-dialog::backdrop { background: rgb(16 24 30 / 74%) }
.photo-stage { display: grid; place-items: center; min-height: 140px }
.photo-stage img { display: block; width: 100%; height: min(70dvh,710px); object-fit: contain }
#photo-status { color: var(--muted); text-align: center }
.store-info { padding: 13px 0; border-bottom: 1px solid var(--line) }
.store-info:last-child { border: 0 }
.store-info p { margin: 3px 0 4px; font-size: 14px; color: var(--muted) }
.store-info a { font-size: 13px }
.detail-price { font-size: 31px; margin: 15px 0 4px; font-weight: 700; letter-spacing: -.045em }
.detail-price + .secondary { font-size: 14px }
dl { margin: 20px 0 }
dl div { border-top: 1px solid var(--line); padding: 8px 0; display: grid; grid-template-columns: minmax(100px,.65fr) 1.35fr; gap: 10px; font-size: 14px }
dt { color: var(--muted) }
dd { margin: 0; overflow-wrap: anywhere }
.ingredients-field { grid-template-columns: 1fr; gap: 4px }
.source-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 620; text-underline-offset: 3px }
@media (max-width: 800px) {
  .heading-row { align-items: flex-start; flex-direction: column; gap: 11px }
  .result-controls { justify-content: flex-start }
  .hero { grid-template-columns: minmax(145px,.8fr) minmax(180px,1.7fr) 60px }
  .hero-basket { height: 51px }
  .search-results { --photo-size: 116px }
  .column-head, .offer { grid-template-columns: var(--photo-size) minmax(0,1.9fr) minmax(90px,.7fr) 148px 29px; column-gap: 10px }
  .primary { gap: 5px; padding: 0 13px }
}
@media (max-width: 620px) {
  .frame { --frame-gutter: 15px }
  header { min-height: 49px }
  .wordmark { gap: 5px }
  .wordmark b { font-size: 24px }
  .barcode { width: 22px; height: 21px }
  .division { font-size: 12px; margin-left: 3px; padding-left: 8px }
  nav { font-size: 12px; gap: 13px }
  .nav-link svg { display: none }
  .city svg { width: 15px }
  .hero { grid-template-columns: minmax(0,1fr) 48px; gap: 4px 6px; padding: 6px 11px 10px }
  .hero-basket { grid-column: 2; grid-row: 1; width: 48px; height: 33px }
  h1 { font-size: clamp(18px,4.6vw,22px) }
  .hero form { --lens-size: 16px; --lens-pad: 8px; --lens-gap: 8px; grid-column: 1/-1; grid-row: 2; border-radius: 7px }
  .input-wrap input { font-size: 16px }
  .primary { font-size: 14px; padding: 0 12px }
  .primary svg { display: none }
  .examples { gap: 8px; font-size: 12px }
  .search-results { margin-top: 17px }
  .select-wrap select { padding: 6px 10px; min-height: 32px; font-size: 13px }
  .filters { gap: 5px; margin: 11px 0 14px }
  .filter { font-size: 13px; min-height: 32px; padding: 5px 10px }
  #results { border-top: 1px solid var(--line) }
  .offer { padding: 13px 2px; grid-template-columns: minmax(0,1fr) auto; gap: 7px 12px }
  .offer-product { grid-column: 1; grid-row: 1 }
  .offer .store-name { grid-column: 1; grid-row: 2; font-size: 12px; gap: 5px }
  .product-name { font-size: 15px }
  .price-cell { grid-row: 1 / 3; grid-column: 2; text-align: right }
  .offer-price { font-size: 17px }
  .detail-arrow { display: none }
  footer { align-items: flex-start; flex-direction: column; gap: 0 }
}
@media (max-width: 620px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) and (max-width: 960px) {
  .column-head { display: none }
  .offer-row.has-photo {
    margin-inline: calc(0px - var(--frame-gutter));
    grid-template-columns: 7% minmax(0, 1fr) 7%;
    padding-top: 16px;
  }
  .has-photo .photo-button {
    grid-area: 1 / 2;
    width: 100%; height: auto; max-height: 78svh; aspect-ratio: 1;
    margin: 0; padding: 0;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  }
  .has-photo .offer { grid-area: 2 / 2; grid-template-columns: minmax(0, 1fr); gap: 6px; min-height: 0; padding: 10px 0 16px }
  .has-photo .offer-product { grid-area: 1 / 1 }
  .has-photo .product-name { font-size: 16px }
  .has-photo .price-cell { grid-area: 2 / 1; text-align: left }
  .has-photo .offer-price { font-size: 20px }
  .has-photo .store-name { grid-area: 3 / 1; gap: 6px; margin-top: 2px; font-size: 13px }
  .has-photo .detail-arrow { display: none }
  #photo-dialog { width: 100%; max-width: 100%; padding-inline: 0 }
  #photo-dialog .dialog-head { padding-inline: 12px }
  .photo-stage img { height: min(72dvh, 120vw) }
}
@media (max-width: 370px) {
  nav { gap: 8px }
  .division { display: none }
  .hero form { --lens-pad: 6px; --lens-gap: 6px; gap: 2px; margin-inline: -5px }
  .primary { padding-inline: 9px }
}
