:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: #121417;
  --panel-2: #171a1e;
  --line: rgba(255, 255, 255, .10);
  --text: #f3f2ec;
  --muted: #92958f;
  --lime: #c8f169;
  --coral: #ff7058;
  --radius: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(680px 380px at 84% -8%, rgba(200, 241, 105, .18), transparent 70%),
    radial-gradient(500px 300px at -10% 18%, rgba(255, 112, 88, .08), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 120px;
  overflow: clip;
}

.ambient {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 390px;
  overflow: hidden;
  pointer-events: none;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .8;
}
.ambient::before {
  top: -150px;
  left: -12%;
  width: 68%;
  height: 340px;
  background: radial-gradient(circle, rgba(200, 241, 105, .24), transparent 68%);
  animation: ambient-lime 16s ease-in-out infinite alternate;
}
.ambient::after {
  top: -90px;
  right: -24%;
  width: 58%;
  height: 310px;
  background: radial-gradient(circle, rgba(255, 112, 88, .14), transparent 68%);
  animation: ambient-coral 21s ease-in-out infinite alternate-reverse;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}
.brand { display: flex; align-items: center; gap: 7px; color: var(--text); }
.brand-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 241, 105, .12);
}
.city { margin-left: auto; }
.beta {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: .08em;
}

.hero { padding: 48px 0 10px; }
.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(48px, 14vw, 82px);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.075em;
}
h1 span { color: var(--lime); }
.ask {
  display: flex;
  align-items: center;
  margin-top: 26px;
  gap: 8px;
  padding: 7px 7px 7px 18px;
  border: 1px solid rgba(200, 241, 105, .35);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.ask:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 241, 105, .10), 0 18px 50px rgba(0, 0, 0, .35);
}
.ask input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.ask input::placeholder { color: #6c706a; }
.ask-go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 16px;
  background: var(--lime);
  color: #101408;
}
.ask-go svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 12px 0 0;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.suggestions::-webkit-scrollbar { display: none; }
.suggestions button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: .16s ease;
}
.suggestions button:hover { color: var(--text); border-color: rgba(255, 255, 255, .28); }

.smart {
  margin: 12px 0 0;
  padding: 4px 0 8px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.045em;
}
.section-head .kicker { margin-bottom: 6px; }
.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.smart-note {
  display: inline-block;
  margin: 2px 0 7px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .03em;
}
.smart-summary {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.smart-summary b { color: var(--text); font-weight: 700; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 44%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  position: relative;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  text-align: left;
  color: inherit;
  padding: 0;
}
.media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--panel-2);
}
.rail-card .media { height: 132px; }
.rail-card .media img,
.card .media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media .ph {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.media .ph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.rail-card .body { padding: 10px 11px 12px; }
.rail-card .name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.rail-card .meta { display: flex; align-items: baseline; gap: 7px; }
.rail-card .price { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.rail-card .old { color: var(--muted); font-size: 10px; text-decoration: line-through; }
.rail-card .shop { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rail-card .badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--coral);
  color: #260a05;
  font-size: 9px;
  font-weight: 900;
}

.browse { padding-top: 14px; scroll-margin-top: 16px; }
.hero { scroll-margin-top: 16px; }
.browse-head { margin-bottom: 16px; }
.found { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.filters { display: grid; gap: 10px; margin-bottom: 18px; }
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.chip.active { border-color: var(--lime); background: var(--lime); color: #11150b; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-row select {
  width: 100%;
  min-height: 46px;
  padding: 11px 34px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 16px) 21px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 11px) 21px / 5px 5px no-repeat,
    var(--panel);
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
}
.filter-row option { color: #111; background: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: inherit;
  text-align: left;
  padding: 0;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-1px); border-color: rgba(200, 241, 105, .35); }
.card .media { aspect-ratio: 1 / .82; }
.card .media .ph svg { width: 34px; height: 34px; }
.card .body { padding: 9px 10px 11px; }
.card .name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card .shop { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card .row { display: flex; align-items: baseline; gap: 5px; margin-top: 8px; }
.card .price { font-size: 15px; font-weight: 800; letter-spacing: -.03em; }
.card .old { color: var(--muted); font-size: 9px; text-decoration: line-through; }
.card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  border-radius: 7px;
  background: var(--coral);
  color: #260a05;
  font-size: 8px;
  font-weight: 900;
}
.card .save {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 50%;
  background: rgba(10, 11, 13, .45);
  color: #fff;
  backdrop-filter: blur(6px);
  font-size: 13px;
}

.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 54px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.empty-line { width: 28px; height: 3px; border-radius: 999px; background: var(--lime); }
.empty h3 { margin: 0; font-size: 18px; }
.empty p { margin: 0; color: var(--muted); font-size: 12px; }
.pill-btn {
  margin-top: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: #11150b;
  font-size: 12px;
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .06em;
}

.dock {
  position: fixed;
  right: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  gap: 4px;
  width: min(calc(100% - 32px), 360px);
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(18, 20, 23, .82);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .38);
  backdrop-filter: blur(18px);
  transform: translateX(50%);
}
.dock-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  z-index: 0;
  width: calc(50% - 7px);
  border-radius: 999px;
  background: var(--text);
  transition: transform 280ms cubic-bezier(.23, 1, .32, 1);
}
.dock[data-active="search"] .dock-indicator {
  transform: translateX(calc(100% + 4px));
}
.dock-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}
.dock-item.active { color: #101216; }
.dock-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(4px);
}
.sheet-card {
  position: relative;
  width: min(100%, 560px);
  max-height: 88vh;
  margin: 0 auto;
  overflow: auto;
  padding: 10px 18px 28px;
  border-radius: 30px 30px 0 0;
  background: var(--panel);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .4);
  animation: sheet-up .24s ease-out both;
}
.sheet-grab { width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.sheet-img { width: 100%; height: min(42vh, 280px); object-fit: cover; border-radius: 20px; background: var(--panel-2); }
.sheet h3 { margin: 17px 0 5px; font-size: 22px; line-height: 1.15; letter-spacing: -.04em; }
.sheet .sheet-shop { color: var(--muted); font-size: 12px; }
.sheet .sheet-price { display: flex; align-items: baseline; gap: 9px; margin-top: 17px; }
.sheet .sheet-price strong { font-size: 30px; letter-spacing: -.05em; }
.sheet .sheet-price s { color: var(--muted); font-size: 13px; }
.sheet .sheet-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--lime);
  color: #11150b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.sheet .sheet-note { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@keyframes ambient-lime {
  from { transform: translate3d(-3%, -2%, 0) scale(1); opacity: .65; }
  to { transform: translate3d(5%, 4%, 0) scale(1.08); opacity: 1; }
}
@keyframes ambient-coral {
  from { transform: translate3d(3%, 2%, 0) scale(1.04); opacity: .5; }
  to { transform: translate3d(-4%, -3%, 0) scale(1); opacity: .85; }
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .5; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 620px) {
  .app { padding-left: 26px; padding-right: 26px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: minmax(220px, 31%); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet-card { animation: none; }
  .card { transition: none; }
  .ambient::before,
  .ambient::after { animation: none; }
  .dock-indicator { transition: none; }
}
