:root {
  --ink: #222;
  --muted: #6f6f6f;
  --line: #d4d4d4;
  --line-dark: #a8a8a8;
  --paper: #f4f4f1;
  --surface: #fff;
  --soft: #ececea;
  --soft-dark: #dededb;
  --accent: #343434;
  --success: #d9e1da;
  --warning: #e7e0d4;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    #e9e9e5;
  background-size: 24px 24px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.prototype-stage {
  display: grid;
  grid-template-columns: minmax(220px, 290px) 390px minmax(180px, 240px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 34px;
}

.flow-panel,
.notes-panel {
  align-self: center;
}

.prototype-label {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.flow-panel h1 {
  max-width: 260px;
  margin: 18px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.flow-panel > p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.flow-map {
  display: grid;
  gap: 7px;
}

.flow-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.flow-step:hover,
.flow-step.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.flow-step span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.flow-step strong {
  font-size: 12px;
}

.flow-step small {
  margin-top: 2px;
  font-size: 10px;
}

.legend {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.legend strong {
  margin-bottom: 2px;
  color: var(--ink);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  vertical-align: 0;
}

.legend-dot.ingredient {
  background: #fff;
}

.legend-dot.product {
  background: #aaa;
}

.legend-dot.smart {
  background: repeating-linear-gradient(45deg, #fff 0 2px, #aaa 2px 4px);
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.reset-prototype {
  margin-top: 22px;
}

.phone-frame {
  position: relative;
  width: 390px;
  height: min(844px, calc(100vh - 40px));
  min-height: 670px;
  overflow: hidden;
  border: 1px solid #989898;
  border-radius: 38px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 5px #e4e4e4;
}

.phone-speaker {
  position: absolute;
  z-index: 30;
  top: 10px;
  left: 50%;
  width: 82px;
  height: 20px;
  border-radius: 20px;
  background: #222;
  transform: translateX(-50%);
}

.home-indicator {
  position: absolute;
  z-index: 30;
  bottom: 7px;
  left: 50%;
  width: 120px;
  height: 4px;
  border-radius: 6px;
  background: #242424;
  transform: translateX(-50%);
}

#app {
  height: 100%;
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 24px;
  background: var(--paper);
}

.screen {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 104px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 12px;
}

.topbar h1,
.topbar h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.topbar .eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 4px;
  font-size: 11px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.icon-button.is-active {
  color: #fff;
  background: var(--accent);
}

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon.small {
  width: 15px;
  height: 15px;
}

.hero-card,
.panel,
.action-card,
.summary-card,
.insight-card,
.gdo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  background: var(--soft-dark);
}

.hero-card::after {
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 136px;
  height: 136px;
  border: 1px solid #b5b5b5;
  border-radius: 50%;
  content: "";
}

.hero-card .kicker,
.section-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-card h2 {
  max-width: 240px;
  margin: 9px 0 8px;
  font-size: 25px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-card p {
  max-width: 250px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.button.secondary {
  border-color: var(--line-dark);
  color: var(--ink);
  background: var(--surface);
}

.button.ghost {
  border-color: transparent;
  color: var(--ink);
  background: var(--soft);
}

.button.wide {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 10px 0 22px;
}

.action-card {
  min-height: 112px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.action-card .action-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: var(--soft);
}

.action-card strong,
.action-card small {
  display: block;
}

.action-card strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.action-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.inline-link {
  padding: 4px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.active-list-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.active-list-card h3 {
  margin: 3px 0 4px;
  font-size: 15px;
}

.active-list-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.progress-ring {
  --progress: 0deg;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) var(--progress), var(--soft) 0);
}

.progress-ring::before {
  grid-area: 1 / 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.progress-ring strong {
  z-index: 1;
  font-size: 10px;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.source-pill,
.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}

.source-pill {
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 700;
}

.source-pill.product-source {
  color: var(--ink);
  background: var(--soft-dark);
}

.recipe-mini {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
}

.wire-image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  color: #737373;
  background:
    linear-gradient(135deg, transparent 49.5%, #bebebe 50%, transparent 50.5%),
    linear-gradient(45deg, transparent 49.5%, #bebebe 50%, transparent 50.5%),
    #e2e2df;
}

.wire-image::after {
  position: absolute;
  inset: 9px;
  border: 1px dashed #b8b8b8;
  border-radius: 8px;
  content: "";
}

.recipe-mini .wire-image {
  width: 68px;
  height: 58px;
}

.recipe-mini strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.recipe-mini small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.bottom-nav {
  position: absolute;
  z-index: 20;
  right: 8px;
  bottom: 9px;
  left: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 70px;
  padding: 7px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 22px 22px 28px 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.nav-item.is-active {
  color: var(--ink);
  background: var(--soft);
}

.nav-item .badge {
  position: absolute;
  margin: -18px 0 0 17px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  font-size: 8px;
  line-height: 15px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin: 4px 0 10px;
}

.search-box input {
  width: 100%;
  height: 47px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  outline: none;
  background: var(--surface);
  font-size: 12px;
}

.search-box input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.search-box > .icon {
  position: absolute;
  left: 15px;
}

.search-box .icon-button {
  position: absolute;
  right: 5px;
  width: 37px;
  height: 37px;
  color: #fff;
  background: var(--ink);
}

.chip-row {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 1px 1px 8px;
  scrollbar-width: none;
}

.chip {
  padding: 7px 10px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.chip.is-active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.scan-cta {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 12px 0 19px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--soft-dark);
  text-align: left;
  cursor: pointer;
}

.scan-cta .scan-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #aaa;
  border-radius: 15px;
  background: var(--surface);
}

.scan-cta strong,
.scan-cta small {
  display: block;
}

.scan-cta strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.scan-cta small {
  color: var(--muted);
  font-size: 9px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.product-card {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.product-card .wire-image {
  width: 100%;
  height: 104px;
  margin-bottom: 9px;
}

.product-card .score {
  position: absolute;
  top: 14px;
  left: 14px;
}

.product-card strong,
.product-card small {
  display: block;
}

.product-card strong {
  min-height: 30px;
  font-size: 11px;
  line-height: 1.3;
}

.product-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.score {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #8d8d8d;
  border-radius: 7px;
  color: var(--ink);
  background: #d9d9d6;
  font-size: 11px;
  font-weight: 900;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state p {
  max-width: 220px;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.product-hero {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 14px;
  align-items: end;
  margin-bottom: 13px;
}

.product-hero .wire-image {
  width: 136px;
  height: 174px;
  border-radius: 20px;
}

.product-hero h1 {
  margin: 7px 0 5px;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.product-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.product-actions .button:first-child {
  grid-column: 1 / -1;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 11px 0;
}

.fact {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.fact strong,
.fact small {
  display: block;
}

.fact strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.fact small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.detail-row:first-child {
  border-radius: 15px 15px 0 0;
}

.detail-row:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 15px 15px;
}

.detail-row div {
  flex: 1;
}

.detail-row strong,
.detail-row small {
  display: block;
}

.detail-row strong {
  margin-bottom: 2px;
  font-size: 11px;
}

.detail-row small {
  color: var(--muted);
  font-size: 9px;
}

.sticky-action {
  position: sticky;
  z-index: 5;
  bottom: -89px;
  margin: 16px -8px -90px;
  padding: 10px 8px 13px;
  border-top: 1px solid var(--line);
  background: rgba(244, 244, 241, 0.95);
  backdrop-filter: blur(10px);
}

.compare-intro {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  line-height: 1.45;
}

.comparison {
  display: grid;
  grid-template-columns: 92px repeat(2, 1fr);
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.comparison > div {
  min-height: 44px;
  padding: 9px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.3;
}

.comparison > div:nth-child(3n) {
  border-right: 0;
}

.comparison > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.comparison .metric {
  color: var(--muted);
  background: var(--soft);
  font-weight: 700;
}

.comparison .product-col {
  text-align: center;
}

.comparison .product-col strong,
.comparison .product-col small {
  display: block;
}

.comparison .product-col strong {
  font-size: 9px;
}

.comparison .product-col small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.comparison .best {
  background: #e4e7e3;
  font-weight: 800;
}

.recipe-cover {
  position: relative;
  display: grid;
  align-content: end;
  height: 178px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 70%),
    linear-gradient(135deg, #cfcfcb 0 50%, #e4e4e1 50%);
}

.recipe-cover::before {
  position: absolute;
  inset: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.62);
  border-radius: 13px;
  content: "";
}

.recipe-cover h1,
.recipe-cover p {
  position: relative;
  z-index: 1;
  color: #fff;
}

.recipe-cover h1 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.045em;
}

.recipe-cover p {
  margin: 0;
  font-size: 10px;
}

.recipe-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 9px 0 18px;
}

.recipe-meta div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
  text-align: center;
}

.ingredient-selector {
  display: grid;
  gap: 7px;
}

.select-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
}

.select-row.is-selected {
  border-color: var(--ink);
  background: var(--soft);
}

.fake-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--surface);
}

.select-row.is-selected .fake-check {
  color: #fff;
  background: var(--ink);
}

.select-row strong,
.select-row small {
  display: block;
}

.select-row strong {
  font-size: 11px;
}

.select-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.select-row > small {
  margin: 0;
}

.list-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.list-summary h2 {
  margin: 3px 0;
  font-size: 17px;
}

.list-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.summary-progress {
  width: 74px;
}

.summary-progress span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--soft);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.list-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 8px 0 11px;
}

.list-toolbar .button {
  min-height: 39px;
  font-size: 10px;
}

.insight-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 11px;
  border-style: dashed;
  background: var(--warning);
}

.insight-card .insight-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #aaa;
  border-radius: 10px;
  background: var(--surface);
}

.insight-card strong,
.insight-card small {
  display: block;
}

.insight-card strong {
  font-size: 10px;
}

.insight-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.aisle-group {
  margin-bottom: 16px;
}

.aisle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 6px;
}

.aisle-head h3 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aisle-head span {
  color: var(--muted);
  font-size: 9px;
}

.shopping-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 66px;
  padding: 9px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
}

.shopping-item:first-of-type {
  border-radius: 14px 14px 0 0;
}

.shopping-item:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
}

.shopping-item:only-child {
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
}

.shopping-item.is-done {
  opacity: 0.55;
}

.shopping-item.is-done .item-name {
  text-decoration: line-through;
}

.item-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.shopping-item.is-done .item-check {
  color: #fff;
  background: var(--ink);
}

.item-main {
  min-width: 0;
}

.item-name {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.origin-mark {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
  font-size: 7px;
  font-weight: 900;
}

.origin-mark.product {
  color: #fff;
  background: #777;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-control button {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  font-size: 12px;
  cursor: pointer;
}

.qty-control span {
  min-width: 19px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.gdo-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  margin-top: 18px;
  padding: 13px;
  background: var(--soft-dark);
  cursor: pointer;
}

.gdo-card .gdo-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #aaa;
  border-radius: 12px;
  background: var(--surface);
}

.gdo-card strong,
.gdo-card small {
  display: block;
}

.gdo-card strong {
  font-size: 11px;
}

.gdo-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.gdo-card .tag {
  padding: 4px 6px;
  color: var(--ink);
  background: var(--surface);
  font-size: 7px;
  font-weight: 800;
}

.shopping-mode {
  background: #ededeb;
}

.shopping-mode .screen {
  padding-bottom: 92px;
}

.shopping-mode-head {
  margin: -14px -16px 16px;
  padding: 20px 16px 14px;
  color: #fff;
  background: #2b2b2b;
}

.shopping-mode-head .topbar {
  margin: 0;
}

.shopping-mode-head .icon-button {
  color: #fff;
  background: transparent;
}

.shopping-mode-head p {
  margin: 7px 0 10px;
  color: #c8c8c8;
  font-size: 10px;
}

.shopping-mode-head .progress-track {
  background: #555;
}

.shopping-mode-head .progress-track i {
  background: #fff;
}

.shopping-finish {
  position: absolute;
  z-index: 20;
  right: 15px;
  bottom: 21px;
  left: 15px;
}

.shopping-finish .button {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
}

.account-hero {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--soft);
}

.account-avatar .icon {
  width: 27px;
  height: 27px;
}

.account-hero h2 {
  margin: 0 0 7px;
  font-size: 17px;
}

.account-hero p {
  max-width: 240px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.profile-menu {
  margin-top: 12px;
}

.profile-menu .detail-row:first-child:last-child {
  border: 1px solid var(--line);
  border-radius: 15px;
}

.notes-panel {
  display: grid;
  gap: 10px;
}

.note-card {
  position: relative;
  padding: 14px 14px 14px 43px;
  border-left: 1px solid var(--line-dark);
  color: var(--muted);
}

.note-index {
  position: absolute;
  top: 14px;
  left: 11px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.note-card strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.note-card p {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(350px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 40px));
  overflow: auto;
  padding: 17px;
  border: 1px solid var(--line-dark);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.modal-options {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.modal-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.modal-option.recommended {
  border-color: var(--ink);
  background: var(--soft);
}

.modal-option strong,
.modal-option small {
  display: block;
}

.modal-option strong {
  font-size: 11px;
}

.modal-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.modal-option .tag {
  padding: 4px 6px;
  font-size: 7px;
  font-weight: 800;
}

.scan-modal {
  position: relative;
  width: min(370px, calc(100vw - 20px));
  height: min(720px, calc(100vh - 30px));
  overflow: hidden;
  padding: 0;
  color: #fff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 5px),
    #292929;
}

.scan-modal::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.12), transparent 44%);
  content: "";
}

.camera-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px;
}

.camera-top strong {
  font-size: 13px;
}

.camera-top .icon-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.scanner-area {
  position: absolute;
  z-index: 2;
  top: 30%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 250px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  transform: translateX(-50%);
}

.scanner-area::before,
.scanner-area::after {
  position: absolute;
  width: 35px;
  height: 35px;
  border-color: #fff;
  border-style: solid;
  content: "";
}

.scanner-area::before {
  top: -2px;
  left: -2px;
  border-width: 3px 0 0 3px;
  border-radius: 20px 0 0;
}

.scanner-area::after {
  right: -2px;
  bottom: -2px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 20px;
}

.scan-line {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  animation: scan 1.8s ease-in-out infinite;
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-60px);
  }
  50% {
    transform: translateY(60px);
  }
}

.camera-bottom {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 22px;
  left: 20px;
  text-align: center;
}

.camera-bottom p {
  margin: 0 0 15px;
  color: #ddd;
  font-size: 11px;
}

.camera-bottom .button {
  border-color: #fff;
  color: var(--ink);
  background: #fff;
}

.login-form {
  display: grid;
  gap: 8px;
}

.field {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--paper);
  font-size: 11px;
}

.field:focus {
  border-color: var(--ink);
}

.modal-note {
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed var(--line-dark);
  border-radius: 12px;
  color: var(--muted);
  background: var(--soft);
  font-size: 9px;
  line-height: 1.45;
}

#toast-root {
  position: fixed;
  z-index: 200;
  right: 0;
  bottom: 26px;
  left: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 30px);
  padding: 10px 13px;
  border: 1px solid #555;
  border-radius: 999px;
  color: #fff;
  background: #252525;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.23);
  font-size: 10px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1050px) {
  .prototype-stage {
    grid-template-columns: minmax(200px, 260px) 390px;
  }

  .notes-panel {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    background: var(--paper);
  }

  .prototype-stage {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .flow-panel,
  .phone-speaker,
  .home-indicator {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    min-height: 560px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-shell {
    padding-top: 0;
  }

  .screen {
    padding-top: 13px;
  }
}
