@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f7f2e7;
  --cream-2: #fbf8f1;
  --paper: #fffdf9;
  --ink: #142033;
  --ink-2: #22314a;
  --muted: #6c7585;
  --line: rgba(20, 32, 51, 0.1);
  --line-strong: rgba(20, 32, 51, 0.16);
  --lime: #b6f04a;
  --lime-2: #d7ff7a;
  --lime-soft: #edfad2;
  --lime-deep: #5d8f0b;
  --coral: #ff7a59;
  --coral-soft: #ffe8e2;
  --navy: #0b1220;
  --red: #b3261e;
  --shadow-sm: 0 1px 2px rgba(20, 32, 51, 0.05), 0 8px 24px -18px rgba(20, 32, 51, 0.25);
  --shadow-md: 0 18px 40px -28px rgba(20, 32, 51, 0.4), 0 2px 6px rgba(20, 32, 51, 0.05);
  --radius: 22px;
  --header-h: 62px;
  --nav-h: 68px;
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(182, 240, 74, 0.24), transparent 60%),
    radial-gradient(700px 460px at -10% 30%, rgba(255, 122, 89, 0.1), transparent 65%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  word-spacing: 0.08em;
  overflow-x: clip;
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(20, 32, 51, 0.055) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  opacity: 0.55;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(93, 143, 11, 0.55);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.icon {
  flex: none;
  display: inline-block;
  vertical-align: -3px;
}

.spacer {
  flex: 1;
}

/* ---------- Header ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(247, 242, 231, 0.88);
  border-bottom: 1px solid rgba(20, 32, 51, 0.07);
  backdrop-filter: blur(16px) saturate(1.1);
}

.app-header-inner {
  max-width: 1080px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 12px rgba(20, 32, 51, 0.18));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-name strong {
  font-weight: 800;
}

.brand-tag {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.loc-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 46vw;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.85);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s;
}

.loc-chip:hover {
  border-color: rgba(93, 143, 11, 0.4);
}

.loc-chip:active {
  transform: scale(0.97);
}

.loc-chip .icon:first-child {
  color: var(--lime-deep);
}

.loc-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-chevron {
  opacity: 0.5;
}

/* ---------- Layout ---------- */

.app-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--nav-h) + 46px + env(safe-area-inset-bottom));
}

.pad {
  padding-bottom: 20px;
}

.section {
  margin-top: 30px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime-deep);
  padding: 6px 0;
}

.section-link:hover {
  text-decoration: underline;
}

.page-title {
  margin: 6px 0 20px;
}

.page-title.compact {
  margin-bottom: 16px;
}

.page-title h1 {
  margin: 6px 0 6px;
  font-size: clamp(1.65rem, 6vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 52ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime-deep);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream-2);
  box-shadow: 0 10px 22px -14px rgba(20, 32, 51, 0.8);
}

.btn-primary:hover {
  background: #1d2d47;
  box-shadow: 0 16px 28px -16px rgba(20, 32, 51, 0.8);
}

.btn-primary .icon {
  color: var(--lime-2);
}

.btn-ghost {
  background: rgba(255, 253, 249, 0.8);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(93, 143, 11, 0.45);
  background: #fff;
}

.btn-icon {
  width: 46px;
  padding: 0;
  flex: none;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 12.5px;
  border-radius: 11px;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(179, 38, 30, 0.22);
}

.btn-danger.is-armed {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  white-space: normal;
  line-height: 1.3;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lime-deep);
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 20px;
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(20, 32, 51, 0.09);
  background:
    radial-gradient(500px 260px at 92% 6%, rgba(182, 240, 74, 0.5), transparent 65%),
    linear-gradient(140deg, #fffdf8 0%, #f4f1e2 55%, #eef4dc 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  bottom: -150px;
  border-radius: 50%;
  border: 34px solid rgba(255, 122, 89, 0.14);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: '';
  position: absolute;
  left: 1%;
  right: 1%;
  bottom: 0.03em;
  height: 0.32em;
  background: var(--lime);
  border-radius: 4px;
  z-index: -1;
}

.hero-text {
  margin: 0 0 20px;
  max-width: 46ch;
  color: #4c5768;
  font-size: 14.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-loc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.hero-loc a {
  font-weight: 800;
  color: var(--lime-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Hero mini scanner */

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 270px;
}

.mini-phone {
  width: min(236px, 100%);
  padding: 11px;
  border-radius: 26px;
  background: linear-gradient(160deg, #1b2a42, #0b1220);
  box-shadow: 0 30px 45px -24px rgba(11, 18, 32, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: rotate(-3deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 4px 8px;
  color: #b8c4d6;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(182, 240, 74, 0.18);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.mini-live {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(182, 240, 74, 0.14);
  color: var(--lime-2);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.mini-scan {
  position: relative;
  height: 112px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 120%, rgba(182, 240, 74, 0.12), transparent 60%),
    linear-gradient(160deg, #24344e, #111c2e);
  overflow: hidden;
}

.mini-barcode {
  display: flex;
  align-items: center;
  gap: 2.5px;
  opacity: 0.9;
}

.mini-barcode i {
  display: block;
  width: 2.5px;
  background: #f6f1e4;
  border-radius: 1px;
}

.mini-barcode i:nth-child(3n) {
  width: 4px;
}

.mini-laser {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime-2);
  box-shadow: 0 0 14px 3px rgba(182, 240, 74, 0.7);
  animation: heroLaser 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.mini-corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--lime-2);
}

.mini-corner.tl {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 5px 0 0 0;
}

.mini-corner.tr {
  top: 12px;
  right: 12px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 5px 0 0;
}

.mini-corner.bl {
  bottom: 12px;
  left: 12px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 5px;
}

.mini-corner.br {
  bottom: 12px;
  right: 12px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 5px 0;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 4px 2px;
  color: var(--cream-2);
}

.mini-thumb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime-2);
  flex: none;
}

.mini-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
}

.mini-name small {
  color: #93a1b5;
  font-size: 7.5px;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-row strong {
  margin-left: auto;
  color: var(--lime-2);
  font-size: 12px;
  letter-spacing: -0.02em;
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 14px 22px -16px rgba(20, 32, 51, 0.5);
  white-space: nowrap;
  background: #fffdf9;
  border: 1px solid rgba(20, 32, 51, 0.08);
}

.chip-save {
  top: 12px;
  right: 0;
  color: var(--ink);
  background: var(--lime);
  border-color: rgba(20, 32, 51, 0.12);
  transform: rotate(3deg);
}

.chip-save .icon {
  color: var(--ink);
}

.chip-best {
  bottom: 6px;
  left: -2px;
  color: var(--ink);
  transform: rotate(-2deg);
}

.chip-best .icon {
  color: var(--coral);
}

/* ---------- Ticker ---------- */

.ticker {
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  border-radius: 15px;
  background: linear-gradient(90deg, #101b2d, #1a2942);
  color: #e8eef7;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 11px 13px;
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticker-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulseDot 1.6s infinite;
}

.ticker-window {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  font-size: 11.5px;
}

.ticker-item strong {
  color: var(--lime-2);
  font-size: 12px;
}

.ticker-chain {
  color: #9fb0c6;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Chains ---------- */

.chain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chain-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.chain-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--chain);
}

.chain-logo {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--chain);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0 3px;
  line-height: 1.05;
}

.chain-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.chain-info strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}

.chain-info span {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chain-info small {
  font-size: 10px;
  font-weight: 800;
  color: var(--lime-deep);
  margin-top: 2px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: auto;
  align-self: flex-start;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: #447009;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5d8f0b;
  animation: pulseDot 1.8s infinite;
}

.coverage-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.coverage-note .icon {
  margin-top: 1px;
  color: var(--coral);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.step-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}

.step-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 26px;
  font-weight: 800;
  color: rgba(20, 32, 51, 0.08);
  letter-spacing: -0.05em;
}

.step-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--lime-soft);
  color: #4d7c07;
  margin-bottom: 10px;
}

.step-card h3 {
  margin: 0 0 3px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

/* ---------- History rows ---------- */

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s;
}

.history-row:hover {
  border-color: rgba(93, 143, 11, 0.35);
  transform: translateY(-1px);
}

.history-icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink-2);
}

.history-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.history-main strong {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-main small {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.history-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  line-height: 1.2;
}

.history-price strong {
  font-size: 13px;
  color: var(--lime-deep);
}

.history-price small {
  font-size: 9.5px;
  color: var(--muted);
}

.history-row > .icon {
  color: var(--muted);
  opacity: 0.6;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  color: var(--muted);
  font-size: 12px;
}

.app-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 7px;
}

.app-footer p {
  margin: 4px 0;
  max-width: 50ch;
  margin-inline: auto;
}

.footer-links {
  margin-top: 8px !important;
}

.footer-links a {
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Search ---------- */

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 15px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: rgba(93, 143, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(182, 240, 74, 0.22);
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.search-box input::placeholder {
  color: #9aa3b0;
  font-weight: 500;
}

.search-box .btn-icon {
  width: 43px;
  height: 43px;
  min-height: 43px;
  border-radius: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-chips {
  margin-top: 11px;
}

.chip {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.75);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.18s, border-color 0.18s;
}

.chip:hover {
  background: var(--lime-soft);
  border-color: rgba(93, 143, 11, 0.35);
}

.search-results {
  margin-top: 20px;
}

.search-start {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-pick {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  min-width: 0;
}

.demo-pick:hover {
  border-color: rgba(93, 143, 11, 0.35);
}

.demo-pick-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink-2);
}

.demo-pick > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.demo-pick strong {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-pick small {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.demo-pick > .icon {
  color: var(--muted);
  opacity: 0.6;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.result-meta strong {
  color: var(--ink);
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0;
}

.product-card:hover {
  border-color: rgba(93, 143, 11, 0.35);
  transform: translateY(-1px);
}

.product-thumb {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px;
}

.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.img-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--cream);
}

.product-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.24;
}

.product-brand {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-name {
  margin: 2px 0 4px;
  font-size: 13px;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-offers {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chain-dot {
  display: inline-block;
  border-radius: 50%;
  background: var(--dot);
  flex: none;
}

.product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
  line-height: 1.1;
}

.product-price > strong {
  font-size: 16px;
  letter-spacing: -0.03em;
}

.product-price small {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 700;
}

.save-mini {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--lime);
  font-size: 9px;
  font-weight: 800;
  color: var(--ink);
}

.price-tag {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--lime-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card > .icon {
  color: var(--muted);
  opacity: 0.55;
}

.results-hint {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

/* ---------- Notices / empty / skeleton ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.notice p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.notice strong {
  font-size: 12.5px;
}

.notice .icon {
  margin-top: 1px;
  flex: none;
}

.notice-soft {
  background: #fff9ee;
  border-color: rgba(255, 122, 89, 0.2);
}

.notice-soft .icon {
  color: var(--coral);
}

.notice-demo {
  background: #f0f6ff;
  border-color: rgba(29, 78, 216, 0.16);
}

.notice-demo .icon {
  color: #1d4ed8;
}

.notice-error {
  background: #fff4f2;
  border-color: rgba(179, 38, 30, 0.18);
  align-items: flex-start;
}

.notice-error .icon {
  color: var(--red);
}

.notice-body {
  min-width: 0;
}

.notice-icon {
  flex: none;
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--lime-soft);
  color: #4d7c07;
}

.empty-state h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.empty-state p {
  margin: 0 auto 14px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 12px;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #ece7dc;
  border-radius: 8px;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.4s infinite;
}

.skeleton-thumb {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 12px;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.skeleton-line {
  height: 10px;
  width: 70%;
}

.skeleton-line.short {
  width: 45%;
  height: 8px;
}

.skeleton-line.tiny {
  width: 30%;
  height: 8px;
}

.skeleton-hero {
  height: 120px;
  margin-bottom: 14px;
  border-radius: 18px;
}

.product-loading {
  padding-top: 8px;
}

/* ---------- Product detail ---------- */

.product-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  border-color: rgba(93, 143, 11, 0.4);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-demo {
  background: #e8efff;
  color: #1d4ed8;
}

.product-head {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.product-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 17px;
  background: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
}

.product-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-head-info {
  min-width: 0;
}

.product-head-info h1 {
  margin: 3px 0 8px;
  font-size: clamp(1.15rem, 4.6vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.product-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.best-card {
  position: relative;
  margin-top: 14px;
  padding: 19px;
  border-radius: 23px;
  background:
    radial-gradient(420px 200px at 95% -20%, rgba(182, 240, 74, 0.25), transparent 60%),
    linear-gradient(140deg, #17253b, #0b1220);
  color: var(--cream-2);
  overflow: hidden;
  box-shadow: 0 24px 40px -26px rgba(11, 18, 32, 0.9);
}

.best-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -60px;
  bottom: -100px;
  border-radius: 50%;
  background: rgba(255, 122, 89, 0.22);
  filter: blur(6px);
  pointer-events: none;
}

.best-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.best-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.best-branch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 700;
  color: #b9c5d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-main {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.best-main > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.best-chain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.best-price {
  font-size: clamp(2rem, 9vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.055em;
  color: var(--lime-2);
}

.best-list {
  padding-bottom: 4px;
  color: #8fa0b6;
  font-size: 13px;
  text-decoration: line-through;
}

.best-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.savings-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(182, 240, 74, 0.14);
  color: var(--lime-2);
  font-size: 10.5px;
  font-weight: 800;
}

.savings-pill.plain {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-weight: 600;
}

.best-updated {
  font-size: 9.5px;
  color: #8fa0b6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.offers-section {
  margin-top: 24px;
}

.offer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 10px;
  padding: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.offer-row::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--chain);
}

.offer-logo {
  width: 46px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--chain);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.05;
  padding: 0 2px;
}

.offer-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.offer-info > strong {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.offer-info small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-flag {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--lime);
  color: var(--ink);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.discount {
  align-self: flex-start;
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--coral);
}

.offer-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  line-height: 1.15;
}

.offer-price strong {
  font-size: 15px;
  letter-spacing: -0.025em;
}

.offer-price small {
  color: var(--muted);
  font-size: 9.5px;
  text-decoration: line-through;
}

.offer-link {
  width: 22px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.offer-link:hover {
  color: var(--lime-deep);
}

.offer-link.is-disabled {
  opacity: 0.35;
}

.product-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.product-actions .btn {
  flex: 1;
  min-width: 0;
  padding-inline: 10px;
  font-size: 12.5px;
}

/* ---------- Scanner ---------- */

.scanner {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  height: clamp(340px, 56vh, 500px);
  border-radius: 27px;
  background: #0b1220;
  overflow: hidden;
  box-shadow: 0 28px 50px -30px rgba(11, 18, 32, 0.9);
  isolation: isolate;
}

.scanner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
}

.scan-frame {
  position: absolute;
  inset: 19% 9%;
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(5, 10, 18, 0.32);
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--lime-2);
}

.corner.tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 8px 0 0 0;
}

.corner.tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 8px 0 0;
}

.corner.bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 8px;
}

.corner.br {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 8px 0;
}

.scan-laser {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime-2);
  box-shadow: 0 0 18px 4px rgba(182, 240, 74, 0.75);
  will-change: transform;
}

.scanner-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(9, 16, 28, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #e8eef7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scanner-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulseDot 1.6s infinite;
}

.scanner-badge.is-off i {
  background: var(--coral);
  animation: none;
}

.torch-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(9, 16, 28, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e8eef7;
  backdrop-filter: blur(8px);
}

.torch-btn.is-on {
  background: var(--lime);
  color: var(--ink);
}

.scan-status {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(9, 16, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #eef3fa;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.scan-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(11, 18, 32, 0.66);
  backdrop-filter: blur(3px);
  color: var(--lime-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  z-index: 5;
}

.scan-success .icon {
  padding: 12px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  animation: pop 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.scan-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(5px);
  z-index: 6;
}

.scan-error-card {
  width: min(300px, 100%);
  text-align: center;
  color: var(--cream-2);
}

.scan-error-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 122, 89, 0.16);
  color: var(--coral);
}

.scan-error-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.scan-error-card p {
  margin: 0 auto 13px;
  color: #b9c5d6;
  font-size: 11.5px;
  max-width: 32ch;
}

.scan-error-card .btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream-2);
  border-color: rgba(255, 255, 255, 0.2);
}

.manual-block {
  margin-top: 20px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow-sm);
}

.manual-block h2 {
  margin: 0 0 10px;
  font-size: 13.5px;
}

.manual-row {
  display: flex;
  gap: 8px;
}

.manual-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 16px;
  letter-spacing: 0.06em;
  outline: none;
}

.manual-row input:focus {
  border-color: rgba(93, 143, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(182, 240, 74, 0.22);
}

.manual-row .btn {
  min-height: 44px;
  padding-inline: 14px;
}

.field-error {
  margin: 7px 0 0;
  min-height: 14px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-code-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.demo-code {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  min-width: 0;
}

.demo-code > span:first-child {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--cream);
  color: var(--ink-2);
}

.demo-code > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.demo-code strong {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-code small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.demo-code:hover {
  border-color: rgba(93, 143, 11, 0.35);
}

/* ---------- History page ---------- */

.danger-zone {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

/* ---------- Settings ---------- */

.settings-card {
  padding: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 13px;
}

.settings-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--lime-soft);
  color: #4d7c07;
}

.settings-head h2 {
  margin: 1px 0 2px;
  font-size: 14px;
  letter-spacing: -0.015em;
}

.settings-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.location-current {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: baseline;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--cream);
  margin-bottom: 11px;
}

.location-current span {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  color: var(--muted);
}

.location-current strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.location-current small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10.5px;
}

.select {
  width: 100%;
  max-width: 100%;
  padding: 11px 36px 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c7585' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-size: 16px;
  appearance: none;
  outline: none;
  margin-bottom: 4px;
}

.select:focus {
  border-color: rgba(93, 143, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(182, 240, 74, 0.22);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  cursor: pointer;
}

.switch-row > span:first-child {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.switch-row strong {
  font-size: 12px;
}

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

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  flex: none;
  width: 42px;
  height: 25px;
  border-radius: 999px;
  background: #d6d2c6;
  position: relative;
  transition: background 0.2s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 32, 51, 0.3);
  transition: transform 0.2s;
}

.switch-row input:checked + .switch {
  background: var(--lime-deep);
}

.switch-row input:checked + .switch::after {
  transform: translateX(17px);
}

.switch-row input:focus-visible + .switch {
  outline: 3px solid rgba(93, 143, 11, 0.55);
  outline-offset: 2px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.privacy-note .icon {
  margin-top: 1px;
  color: var(--lime-deep);
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.source-blocked {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.source-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: var(--cream-2);
  border-radius: 10px;
  min-width: 0;
}

.source-row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
  flex: 1;
}

.source-row strong {
  font-size: 11.5px;
}

.source-row small {
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-row.is-blocked {
  opacity: 0.82;
}

.status-ok,
.status-off {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-ok {
  color: var(--lime-deep);
}

.status-off {
  color: var(--muted);
}

.installed-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--lime-soft);
  color: #447009;
  font-size: 11.5px;
  font-weight: 700;
}

.install-help {
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.install-help strong {
  color: var(--ink);
}

.stack-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-actions .btn {
  justify-content: flex-start;
}

.about-card {
  background:
    radial-gradient(280px 140px at 100% 0%, rgba(182, 240, 74, 0.35), transparent 70%),
    var(--paper);
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.about-brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.about-brand strong {
  font-size: 14px;
}

.about-brand small {
  color: var(--muted);
  font-size: 10px;
}

.about-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.about-card a {
  color: var(--lime-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-note {
  font-style: italic;
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(250, 247, 238, 0.94);
  border-top: 1px solid rgba(20, 32, 51, 0.09);
  backdrop-filter: blur(18px) saturate(1.15);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  max-width: 560px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.nav-item,
.nav-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  color: #8a91a0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.18s;
  padding: 4px 0;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--ink);
}

.nav-item.is-active .icon {
  color: var(--lime-deep);
}

.nav-scan {
  position: relative;
  justify-content: flex-end;
  padding-bottom: 10px;
  color: var(--ink);
  font-weight: 800;
}

.scan-fab {
  position: absolute;
  top: -22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  border: 4px solid var(--cream);
  box-shadow: 0 14px 26px -12px rgba(93, 143, 11, 0.85), inset 0 -2px 0 rgba(20, 32, 51, 0.12);
  transition: transform 0.2s, background 0.2s;
}

.nav-scan:hover .scan-fab {
  background: var(--lime-2);
  transform: translateY(-2px);
}

.nav-scan.is-active .scan-fab {
  background: var(--lime-2);
  box-shadow: 0 0 0 4px rgba(182, 240, 74, 0.35), 0 14px 26px -12px rgba(93, 143, 11, 0.85);
}

.nav-scan-label {
  font-size: 9.5px;
  line-height: 1;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100vw - 28px);
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream-2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 18px 30px -18px rgba(11, 18, 32, 0.85);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone='error'] {
  background: var(--red);
}

.noscript {
  padding: 18px;
  text-align: center;
  background: var(--coral-soft);
  color: var(--red);
  font-size: 13px;
}

/* ---------- Animations ---------- */

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

@keyframes heroLaser {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  10%,
  90% {
    opacity: 1;
  }
  50% {
    transform: translateY(84px);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 25px 20px 20px;
    gap: 10px;
  }

  .hero-visual {
    min-height: 225px;
    margin: 6px 0 -2px;
  }

  .mini-phone {
    width: min(220px, 82%);
  }

  .chip-save {
    right: max(0px, 4vw);
  }

  .chip-best {
    left: max(0px, 4vw);
  }

  .chain-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .chain-card {
    padding: 12px 13px;
  }

  .live-pill {
    align-self: center;
  }

  .steps {
    gap: 8px;
  }

  .step-card {
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    column-gap: 11px;
    align-items: center;
    padding: 13px 15px;
  }

  .step-icon {
    grid-row: 1 / 3;
    margin: 0;
  }

  .step-card h3 {
    margin: 0;
  }

  .step-card p {
    grid-column: 2;
  }

  .step-num {
    font-size: 22px;
    top: 9px;
    right: 12px;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app-main {
    padding: 14px 13px calc(var(--nav-h) + 42px + env(safe-area-inset-bottom));
  }

  .hero {
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9.2vw, 2.5rem);
  }

  .hero-text {
    font-size: 13px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
    font-size: 12.5px;
  }

  .mini-phone {
    width: min(210px, 84%);
  }

  .section {
    margin-top: 24px;
  }

  .section-head h2 {
    font-size: 17px;
  }

  .product-card {
    grid-template-columns: 54px minmax(0, 1fr) auto 12px;
    gap: 8px;
    padding: 9px 10px;
  }

  .product-thumb {
    width: 54px;
    height: 54px;
  }

  .product-name {
    font-size: 12px;
  }

  .product-price > strong {
    font-size: 14.5px;
  }

  .product-price small {
    font-size: 8.5px;
  }

  .save-mini {
    font-size: 8px;
  }

  .product-head {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-head-info h1 {
    font-size: 1.18rem;
  }

  .best-card {
    padding: 16px;
  }

  .best-price {
    font-size: 2.1rem;
  }

  .offer-row {
    grid-template-columns: 38px minmax(0, 1fr) auto 18px;
    gap: 8px;
    padding: 10px;
  }

  .offer-logo {
    width: 38px;
    height: 38px;
    font-size: 7px;
  }

  .offer-info > strong {
    font-size: 11.5px;
  }

  .offer-info small {
    font-size: 9.5px;
  }

  .offer-price strong {
    font-size: 13.5px;
  }

  .scanner {
    height: clamp(330px, 50vh, 460px);
    border-radius: 22px;
  }

  .manual-row {
    flex-wrap: nowrap;
  }

  .manual-row .btn {
    padding-inline: 10px;
    font-size: 12px;
  }

  .manual-row .btn .icon {
    display: none;
  }

  .settings-card {
    padding: 14px;
  }

  .app-footer {
    margin-bottom: 2px;
  }
}

@media (max-width: 380px) {
  .app-header-inner {
    padding: 0 13px;
    gap: 8px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-tag {
    display: none;
  }

  .brand-mark svg {
    width: 34px;
    height: 34px;
  }

  .loc-chip {
    max-width: 44vw;
    padding: 7px 9px;
    font-size: 11.5px;
  }

  .app-main {
    padding-inline: 11px;
  }

  .hero {
    padding: 21px 16px 16px;
  }

  .hero h1 {
    font-size: 1.78rem;
  }

  .hero-actions {
    gap: 7px;
  }

  .hero-actions .btn {
    font-size: 11.5px;
    min-height: 43px;
  }

  .hero-actions .btn .icon {
    width: 16px;
    height: 16px;
  }

  .mini-phone {
    width: min(198px, 88%);
  }

  .chip-save,
  .chip-best {
    font-size: 9.5px;
    padding: 6px 8px;
  }

  .ticker-label {
    padding: 10px;
    font-size: 9px;
  }

  .ticker-item {
    padding: 9px 13px;
    font-size: 10.5px;
  }

  .nav-item,
  .nav-scan-label {
    font-size: 8.5px;
  }

  .scan-fab {
    width: 52px;
    height: 52px;
    border-width: 3px;
  }

  .product-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px 9px;
  }

  .product-card > .icon {
    display: none;
  }

  .product-thumb {
    width: 48px;
    height: 48px;
  }

  .product-brand {
    font-size: 8.5px;
  }

  .product-name {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
  }

  .product-offers {
    font-size: 9.5px;
  }

  .product-price > strong {
    font-size: 13.5px;
  }

  .product-price small {
    display: none;
  }

  .product-head {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .product-head-info h1 {
    font-size: 1.05rem;
  }

  .product-meta {
    font-size: 10px;
  }

  .best-price {
    font-size: 1.95rem;
  }

  .savings-pill {
    font-size: 9.5px;
  }

  .offer-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 9px;
  }

  .offer-row > .offer-link {
    display: none;
  }

  .offer-logo {
    width: 34px;
    height: 34px;
    font-size: 6.5px;
  }

  .offer-info > strong {
    font-size: 11px;
  }

  .offer-price strong {
    font-size: 12.5px;
  }

  .scanner {
    height: 330px;
  }

  .scan-frame {
    inset: 17% 7%;
  }

  .manual-block,
  .settings-card {
    padding: 12px;
  }

  .location-current {
    padding: 9px 11px;
  }

  .location-current strong {
    font-size: 13.5px;
  }

  .source-row {
    padding: 7px 8px;
  }
}

@media (max-width: 355px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 1000px) {
  .app-main {
    padding: 24px 24px 130px;
  }

  .app-header-inner {
    padding-inline: 24px;
  }

  .section {
    margin-top: 38px;
  }

  .hero {
    padding: 42px;
  }

  .chain-card {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
