:root {
  --bg: #f4f1fb;
  --surface: #ffffff;
  --primary: #6f4cf6;
  --primary-2: #8d72ff;
  --text: #1f1c2e;
  --muted: #726d88;
  --border: #e9e4f7;
  --success: #19a35b;
  --warning: #ff8a00;
  --shadow: 0 12px 40px rgba(47, 32, 104, 0.12);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f6f3ff 0%, #eef3ff 100%);
  color: var(--text);
}

body { min-height: 100vh; }

.app-shell {
  display: grid;
  grid-template-columns: 390px minmax(280px, 420px);
  gap: 32px;
  justify-content: center;
  align-items: start;
  padding: 36px 20px;
}

.phone-frame {
  position: relative;
  width: 390px;
  height: 844px;
  background: #121018;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 22px 70px rgba(32, 20, 74, 0.25);
}

.screen {
  position: absolute;
  inset: 12px;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.notes-panel { display: grid; gap: 18px; padding-top: 8px; }
.brand-row, .demo-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(233,228,247,0.9);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.brand-row { display: flex; gap: 14px; align-items: center; }
.brand-mark {
  width: 54px; height: 54px; border-radius: 18px; background: #efe9ff;
  display: grid; place-items: center; color: var(--primary); font-size: 28px; font-weight: 700;
}
.brand-row h1, .demo-card h2 { margin: 0 0 6px; }
.brand-row p, .demo-card p, .demo-card li { color: var(--muted); line-height: 1.45; }
.demo-card ul { padding-left: 18px; margin: 10px 0 0; }
.compact p { margin: 0; }

.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 12px; font-size: 14px; font-weight: 700;
}

.safe-screen {
  padding: 0 20px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  padding: 24px 22px 28px;
  background:
    linear-gradient(180deg, rgba(44, 31, 85, 0.08), rgba(20, 16, 44, 0.66)),
    radial-gradient(circle at top, rgba(141, 114, 255, 0.75), rgba(111, 76, 246, 0.4), transparent 45%),
    linear-gradient(160deg, #8798c8, #d8d2f2 35%, #9a8ae4 100%);
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.02;
}
.hero p { margin: 0 0 24px; font-size: 17px; line-height: 1.5; color: rgba(255,255,255,0.92); }

.logo-line {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 800; font-size: 32px;
}
.logo-line .pin { color: #d7cdff; }
.logo-line .here { color: #d7cdff; }

.btn {
  appearance: none; border: none; border-radius: 16px; padding: 16px 18px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(111, 76, 246, 0.28); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--primary); }
.button-stack { display: grid; gap: 12px; }
.legal { margin-top: 18px; font-size: 12px; color: rgba(255,255,255,0.75); }

.home {
  background: linear-gradient(180deg, #fbfbfe 0%, #f5f1ff 100%);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 0 12px;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--border); background: white;
  display: grid; place-items: center; font-size: 18px; color: var(--text);
}

.search-box {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; background: white;
  border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 16px;
}
.search-box input {
  border: none; outline: none; width: 100%; font-size: 16px; background: transparent;
}
.chips { display: flex; gap: 10px; overflow: auto; padding-bottom: 4px; margin-bottom: 16px; }
.chip {
  white-space: nowrap; padding: 10px 14px; border-radius: 999px; background: white; border: 1px solid var(--border);
  color: var(--text); font-weight: 600; cursor: pointer;
}
.chip.active { background: #efe9ff; color: var(--primary); border-color: #ddcffd; }

.map-card {
  position: relative; min-height: 290px; border-radius: 28px; padding: 18px; background:
  radial-gradient(circle at center, rgba(111,76,246,0.18) 0, rgba(111,76,246,0.18) 16%, transparent 17%),
  linear-gradient(180deg, #eef1f6 0%, #f6f8fb 100%);
  border: 1px solid var(--border); overflow: hidden;
}
.map-card::before, .map-card::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 0 14%, rgba(197,204,220,0.7) 14% 15%, transparent 15% 36%, rgba(197,204,220,0.7) 36% 37%, transparent 37% 100%),
    linear-gradient(transparent 0 20%, rgba(197,204,220,0.7) 20% 21%, transparent 21% 46%, rgba(197,204,220,0.7) 46% 47%, transparent 47% 74%, rgba(197,204,220,0.7) 74% 75%, transparent 75% 100%);
  opacity: 0.35;
}
.pin-dot, .offer-pin {
  position: absolute; width: 18px; height: 18px; border-radius: 999px; background: var(--primary); border: 4px solid rgba(111,76,246,0.2);
}
.offer-pin.orange { background: var(--warning); border-color: rgba(255, 138, 0, 0.18); }
.offer-pin.green { background: var(--success); border-color: rgba(25, 163, 91, 0.18); }

.section-head {
  display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px;
}
.section-head h3 { margin: 0; font-size: 15px; }
.section-head a { color: var(--primary); text-decoration: none; font-weight: 700; }
.cards-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.offer-mini {
  background: white; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; cursor: pointer;
}
.mini-image { height: 94px; display: grid; place-items: end start; padding: 10px; color: white; font-size: 12px; font-weight: 800; }
.food { background: linear-gradient(135deg, #2a1b0b, #845c2a 45%, #f4c04a); }
.fashion { background: linear-gradient(135deg, #221826, #734963 48%, #cfb49d); }
.coffee { background: linear-gradient(135deg, #1d0f09, #6f4733 45%, #d4b198); }
.mini-content { padding: 12px; }
.mini-content h4 { margin: 0 0 4px; font-size: 14px; }
.mini-content p { margin: 0; font-size: 12px; color: var(--muted); }

.results-screen { background: #fbfbfe; }
.results-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.results-toolbar .search-box { margin: 0; flex: 1; }
.subtle { color: var(--muted); font-size: 13px; }
.results-list { display: grid; gap: 14px; overflow: auto; padding-bottom: 110px; }
.offer-item {
  display: grid; grid-template-columns: 108px 1fr; gap: 12px; background: white; border-radius: 22px; padding: 10px;
  border: 1px solid var(--border); cursor: pointer;
}
.offer-thumb {
  border-radius: 16px; min-height: 96px; position: relative; overflow: hidden;
}
.badge {
  position: absolute; top: 10px; left: 10px; background: var(--primary); color: white; padding: 7px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 800;
}
.offer-meta h4 { margin: 2px 0 4px; font-size: 20px; }
.offer-meta p { margin: 0 0 8px; color: var(--muted); }
.meta-row { display: flex; gap: 12px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

.bottom-nav {
  position: absolute; left: 16px; right: 16px; bottom: 14px; background: rgba(255,255,255,0.96); border: 1px solid var(--border);
  border-radius: 22px; padding: 12px 16px; display: flex; justify-content: space-between; box-shadow: var(--shadow);
}
.bottom-nav span { font-size: 12px; color: var(--muted); font-weight: 700; }
.bottom-nav .active { color: var(--primary); }

.detail-screen { background: #fbfbfe; }
.hero-image {
  height: 250px; border-radius: 24px; position: relative; overflow: hidden; margin-bottom: 18px;
}
.offer-body h2 { margin: 0 0 8px; font-size: 34px; }
.offer-body p { color: var(--muted); line-height: 1.5; }
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0;
}
.info-box {
  background: white; border: 1px solid var(--border); border-radius: 18px; padding: 14px;
}
.info-box label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.info-box strong { font-size: 14px; }
.cta-row {
  position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; grid-template-columns: 1fr 66px; gap: 10px;
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; justify-items: center; }
  .notes-panel { width: min(390px, calc(100vw - 40px)); }
}

@media (max-width: 460px) {
  .app-shell { padding: 14px; }
  .phone-frame { width: calc(100vw - 28px); height: calc(100vh - 28px); }
  .notes-panel { display: none; }
  .cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
