:root {
  --bg: #F5F1EA;
  --ink: #1C1A17;
  --ink-soft: #6B655C;
  --coral: #F2846B;
  --coral-soft: #F6BFAE;
  --teal: #49C6C0;
  --blue: #A9E1E8;
  --yellow: #E9C468;
  --olive: #ABBE6E;
  --pink: #F3B7C6;
  --white: #FFFFFF;
  --line: #E7E1D6;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(28,26,23,0.04), 0 8px 24px rgba(28,26,23,0.06);
  --font-display: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

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

button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.get-app-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
}

/* ---------- Landing hero ---------- */
.hero-wrap {
  max-width: 900px;
  margin: 60px auto 0;
  padding: 0 24px;
  text-align: center;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  margin-bottom: 36px;
}

.hero-logo .logo-mark { width: 44px; height: 44px; }

.hero-box {
  background: var(--coral-soft);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
}

.hero-box h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 26px;
  color: var(--ink);
}

.search-form {
  display: flex;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 22px;
  box-shadow: var(--shadow);
}

.search-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  font-family: var(--font-body);
  color: var(--ink);
  padding: 14px 0;
}

.search-form input::placeholder { color: #A69E90; }

.search-submit {
  border: none;
  background: var(--ink);
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.pill-row-label {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: -16px;
}

.pill {
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}

.pill:nth-child(8n+1) { background: var(--blue); }
.pill:nth-child(8n+2) { background: var(--coral); color: var(--white); }
.pill:nth-child(8n+3) { background: var(--pink); }
.pill:nth-child(8n+4) { background: var(--yellow); }
.pill:nth-child(8n+5) { background: var(--olive); }
.pill:nth-child(8n+6) { background: var(--teal); color: var(--white); }
.pill:nth-child(8n+7) { background: var(--coral-soft); }
.pill:nth-child(8n+0) { background: var(--blue); }

.footer-links {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 70px 0 30px;
}

.footer-links span { margin: 0 10px; }

/* ---------- Results view ---------- */
.results-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 140px;
  display: none;
}

body.mode-results .hero-wrap { display: none; }
body.mode-results .results-wrap { display: block; }

.results-query-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 30px;
}

.results-query-bar .search-form { flex: 1; }

.new-search-btn {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  font-size: 17px;
  line-height: 1.7;
  color: #33302B;
}

.summary-card q, .summary-card .quote { font-style: italic; }

.summary-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skel-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #EFEAE0 25%, #F7F3EC 37%, #EFEAE0 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel-line.w-full { width: 100%; }
.skel-line.w-90 { width: 90%; }
.skel-line.w-70 { width: 70%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.sources-row {
  display: flex;
  gap: 14px;
  margin: 26px 4px;
  flex-wrap: wrap;
}

.source-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.source-chip .dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 11px; font-weight: 700;
}

.cards-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 4px 20px;
  scroll-snap-type: x proximity;
}

.pick-card {
  scroll-snap-align: start;
  flex: 0 0 260px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.pick-card-label {
  position: absolute;
  margin: 14px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}

.pick-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #F0ECE3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pick-card-media img { width: 100%; height: 100%; object-fit: cover; }

.pick-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pick-card-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  min-height: 40px;
}

.pick-card-reason {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.pick-card-price {
  font-weight: 700;
  font-size: 16px;
  margin-top: 4px;
}

.pick-card-cta {
  margin-top: 10px;
  border: none;
  background: var(--ink);
  color: var(--white);
  padding: 11px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.offers-panel {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}

.offer-row .merchant { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.offer-row .merchant img { width: 16px; height: 16px; border-radius: 3px; }
.offer-row .price { font-weight: 700; }
.offer-row .go {
  background: var(--teal);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.offers-loading { font-size: 13px; color: var(--ink-soft); padding: 8px 0; }

.error-box {
  background: #FBE4DF;
  color: #A6412C;
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14px;
  font-weight: 500;
}

.followup-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(245,241,234,0) 0%, var(--bg) 40%);
  padding: 30px 24px 26px;
}

.followup-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow);
}

.followup-inner input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: var(--font-body); padding: 12px 0;
}

.followup-inner button {
  border: none; background: var(--ink); color: white;
  width: 40px; height: 40px; border-radius: 50%;
}

@media (max-width: 640px) {
  .topbar { padding: 16px; }
  .hero-wrap { margin-top: 30px; }
  .hero-box { padding: 32px 20px 28px; }
  .hero-box h1 { font-size: 26px; }
  .pick-card { flex-basis: 220px; }
}

/* Kuponly integration */
.kuponly-logo-img{height:42px;width:auto;max-width:150px;object-fit:contain}.kuponly-ai-logo span{display:inline-flex;background:#f05a28;color:#fff;border-radius:999px;padding:5px 9px;font-size:13px}.hero-kuponly-logo{height:62px;width:auto;max-width:210px;object-fit:contain}.hero-logo span{font-size:28px}.get-app-btn{text-decoration:none}.search-submit,.pick-card-cta,.offer-row .go{background:#f05a28!important}.hero-box{background:#dbeff0}.quote{background:rgba(240,90,40,.14)!important}.pill:nth-child(8n+2){background:#f05a28}.pill:nth-child(8n+6){background:#334155}@media(max-width:640px){.topbar{padding:14px 16px}.kuponly-logo-img{height:36px}.hero-wrap{margin-top:28px}.hero-kuponly-logo{height:48px}.hero-logo{gap:8px;margin-bottom:24px}.hero-logo span{font-size:21px}.hero-box{padding:32px 18px 24px}.hero-box h1{font-size:27px}.results-wrap{padding-left:14px;padding-right:14px}}
