@import url('https://fonts.googleapis.com/css2?family=Anton&family=Lilita+One&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --green: #18df63;
  --green-dark: #00ad49;
  --deep: #087b42;
  --mint: #baffca;
  --mint-soft: #ebfff0;
  --yellow: #ffd83d;
  --orange: #ff5c27;
  --pink: #ff4778;
  --ink: #191b19;
  --muted: #6c756e;
  --line: #d9e7dc;
  --white: #fff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: #edf2ee;
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.phone {
  width: min(100%, 390px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--mint-soft);
  box-shadow: 0 0 42px rgba(8, 48, 25, .12);
}

/* Keep absolute reward overlays within the rounded overview device only. */
.in-embed .phone { overflow: hidden; border-radius: 27px; }

.appbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  position: relative;
  z-index: 20;
}

.appbar.green { background: var(--green); }
.appbar.white { background: white; border-bottom: 1px solid var(--line); }

.brand {
  font-family: "Lilita One", sans-serif;
  font-size: 16px;
  line-height: 1;
}

.brand strong {
  color: white;
  font-family: "Anton", sans-serif;
  font-size: 21px;
  font-weight: 400;
  text-shadow: 2px 2px 0 var(--deep);
}

.back, .icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: white;
  font-size: 20px;
  font-weight: 800;
}

.appbar-title { flex: 1; font-size: 15px; font-weight: 800; text-align: center; }
.appbar-spacer { width: 36px; }

.content { padding: 16px 14px 100px; }
.content.tight { padding-top: 8px; }

.card {
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: white;
  box-shadow: 5px 6px 0 rgba(0,0,0,.12);
}

.kicker {
  color: var(--deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.display {
  margin: 0;
  font-family: "Lilita One", sans-serif;
  font-size: 37px;
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.5px;
}

.display .number,
.big-number {
  color: var(--orange);
  font-family: "Anton", sans-serif;
  font-weight: 400;
}

.muted { color: var(--muted); }
.center { text-align: center; }

.btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.dark { background: var(--ink); color: white; box-shadow: 0 5px 0 rgba(0,0,0,.16); }
.btn.green { background: var(--green); color: var(--ink); box-shadow: 0 5px 0 var(--deep); }
.btn.yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #bd8e00; }
.btn.white { background: white; color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.13); }
.btn + .btn { margin-top: 10px; }
.text-button { border: 0; background: transparent; color: var(--deep); font-size: 13px; font-weight: 800; cursor: pointer; }

.bottom-action {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}

.gift-hero {
  min-height: 480px;
  padding: 6px 18px 26px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.24) 0 2px, transparent 3px) 0 0 / 14px 14px,
    var(--green);
}

.gift-hero::before {
  content: "";
  position: absolute;
  width: 254px;
  height: 210px;
  left: 50%;
  top: 221px;
  transform: translateX(-50%) rotate(-3deg);
  border: 3px solid var(--ink);
  border-radius: 30px 18px 28px 20px;
  background: #fff0a8;
  box-shadow: 7px 8px 0 rgba(0,0,0,.14);
}

.from-pill {
  width: min(100%, 318px);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px auto 0;
  padding: 9px 14px 9px 9px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: white;
  text-align: left;
  box-shadow: 5px 6px 0 rgba(0,0,0,.16);
}

.avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--yellow);
}

.avatar img {
  width: 51px;
  height: 70px;
  margin-top: -3px;
  object-fit: contain;
}

.from-copy { min-width: 0; }
.from-copy strong { display: block; }
.from-copy strong { font-size: 19px; line-height: 1.05; }

.gift-hero h1 {
  max-width: 340px;
  margin: 16px auto 0;
  position: relative;
  z-index: 3;
  font-family: "Lilita One", sans-serif;
  font-size: 39px;
  font-weight: 400;
  line-height: .96;
}

.gift-hero h1 strong {
  color: white;
  font-family: "Anton", sans-serif;
  font-size: 70px;
  font-weight: 400;
  text-shadow: 4px 5px 0 var(--deep);
}

.gift-product {
  width: 218px;
  height: 218px;
  margin: 8px auto -4px;
  position: relative;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(0,83,35,.22));
}

.gift-note {
  display: inline-block;
  position: relative;
  z-index: 4;
  padding: 8px 15px;
  border: 2px solid var(--ink);
  background: white;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(-1.5deg);
  box-shadow: 3px 4px 0 rgba(0,0,0,.12);
}

.landing-actions { margin-top: -1px; padding: 18px 16px 22px; background: var(--mint-soft); }
.fine-print { margin: 11px 10px 0; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.35; text-align: center; }

.handoff-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.25) 0 2px, transparent 3px) 0 0 / 15px 15px,
    var(--green);
}

.handoff-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px 100px;
  text-align: center;
}

.app-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: white;
  color: var(--deep);
  font-family: "Lilita One", sans-serif;
  font-size: 38px;
  box-shadow: 7px 8px 0 rgba(0,0,0,.17);
  transform: rotate(-2deg);
}

.handoff-card { padding: 28px 20px 21px; }
.handoff-card p { margin: 13px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.4; }
.handoff-actions { margin-top: 22px; }

.search-shell { padding: 8px 14px 100px; }
.keemart-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 8px 10px;
  color: #a2aaa4;
}
.keemart-logo {
  color: #83dfa5;
  font-family: "Lilita One", sans-serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -1px;
}
.keemart-mark { color: #c3ee68; font-size: 22px; vertical-align: 7px; }
.delivery-time { white-space: nowrap; font-size: 15px; font-weight: 700; }
.delivery-time span { color: #ffdc3e; font-size: 21px; vertical-align: -1px; }
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 3px solid #18c95c;
  border-radius: 14px;
  background: white;
  box-shadow: 3px 4px 0 rgba(0,0,0,.11);
}
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); font-weight: 800; background: transparent; }
.code-search > span { color: var(--ink); font-size: 22px; font-weight: 800; line-height: 1; }
.search-go { min-width: 68px; min-height: 42px; border: 0; border-radius: 10px; background: #18c95c; color: white; font-size: 15px; font-weight: 900; cursor: pointer; }
.search-go span { font-size: 22px; line-height: .7; vertical-align: -1px; }
.guide-hand {
  position: absolute;
  right: 112px;
  bottom: -20px;
  z-index: 2;
  width: 76px;
  height: 76px;
  object-fit: contain;
  transform: rotate(-18deg);
  filter: drop-shadow(1px 2px 1px rgba(0,0,0,.15));
  pointer-events: none;
}
.search-empty { margin: 13px 4px 0; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }

.claim-card { margin-top: 18px; overflow: hidden; }
.claim-card-top {
  min-height: 250px;
  padding: 20px 18px 6px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--green);
}
.claim-card-top::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  left: 50%;
  top: 78px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
}
.claim-card-top h1 { margin: 8px 0 0; position: relative; z-index: 3; font-family: "Lilita One", sans-serif; font-size: 30px; font-weight: 400; line-height: .96; }
.claim-card-top h1 strong { color: white; font-family: "Anton", sans-serif; font-size: 58px; font-weight: 400; text-shadow: 3px 4px 0 var(--deep); }
.claim-card-top img { width: 160px; height: 160px; position: relative; z-index: 3; object-fit: contain; margin-top: -3px; filter: drop-shadow(0 8px 7px rgba(0,0,0,.15)); }
.claim-card-copy { padding: 18px; }
.claim-card-copy p { margin: 9px 0 17px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.35; }

.app-preview {
  min-height: 100vh;
  background: var(--mint-soft);
}
.fake-home { padding: 14px; filter: blur(1.5px); opacity: .58; }
.popup-page-background { padding: 0; height: 100vh; overflow: hidden; }
.popup-background-image, .popup-background-frame { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.fake-banner { height: 190px; border-radius: 22px; background: var(--green); }
.fake-card { height: 105px; margin-top: 13px; border-radius: 18px; background: white; border: 1px solid var(--line); }

.scrim {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13,29,19,.69);
  backdrop-filter: blur(5px);
}

.dialog {
  width: 100%;
  max-width: 344px;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 27px;
  background: white;
  box-shadow: 9px 10px 0 rgba(0,0,0,.23);
}

.dialog-close {
  position: absolute;
  z-index: 10;
  right: 13px;
  top: 13px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: white;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
}

.dialog-hero {
  min-height: 154px;
  padding: 25px 21px 18px;
  text-align: center;
  background: var(--green);
  border-bottom: 3px solid var(--ink);
}
.dialog-hero .big-number { display: block; color: white; font-size: 76px; line-height: .82; text-shadow: 4px 5px 0 var(--deep); }
.dialog-hero h1 { margin: 5px 0 0; font-family: "Lilita One", sans-serif; font-size: 29px; font-weight: 400; line-height: 1; }
.claimed-hero { min-height: 0; padding: 29px 18px 22px; }
.claimed-hero h1 { margin: 0; font-size: 31px; white-space: nowrap; }
.claimed-hero h1 strong { color: white; font-family: "Anton", sans-serif; font-size: 43px; font-weight: 400; text-shadow: 3px 4px 0 var(--deep); }
.claimed-hero .kicker { display: block; margin: 11px auto 0; padding: 4px 7px; background: white; color: var(--ink); font-size: 10px; letter-spacing: .1px; white-space: nowrap; }
.dialog-content { padding: 21px 19px 20px; text-align: center; }
.dialog-content h2 { margin: 0; font-family: "Lilita One", sans-serif; font-size: 28px; font-weight: 400; line-height: 1; }
.dialog-content > p { margin: 10px auto 17px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.35; }
.blocker-dialog .dialog-hero { min-height: 0; padding: 25px 22px 18px; }
.blocker-dialog .dialog-content { padding: 16px 19px 12px; }
.blocker-dialog .dialog-content > p { margin: 0 auto 14px; }

.thanks-list { display: grid; gap: 8px; margin: 13px 0 12px; }
.thanks-choice {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #f8fbf8;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.thanks-choice.selected { border-color: var(--deep); background: #dcffe6; box-shadow: 0 0 0 2px rgba(24,223,99,.2); }
.refresh-row { display: flex; justify-content: center; margin-bottom: 16px; }

.quick-thanks {
  margin: 19px 0 15px;
  padding: 11px 2px 8px;
  border-top: 1px dashed #b9d8c1;
  text-align: center;
}
.thanks-hint { display: block; color: var(--deep); font-size: 9px; font-weight: 900; letter-spacing: .8px; text-align: left; text-transform: none; }
.thanks-message-row { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 7px; }
.letter-paper {
  flex: 1;
  position: relative;
  padding: 10px 12px 11px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 28%, rgba(39,116,69,.09) 0 1px, transparent 1.5px) 0 0 / 17px 15px,
    repeating-linear-gradient(0deg, rgba(39,116,69,.1) 0 1px, transparent 1px 19px),
    #fffef4;
  color: var(--ink);
  text-align: left;
  transform: rotate(-.7deg);
  box-shadow: 2px 3px 0 rgba(46,94,57,.1);
}
.letter-paper::before {
  content: "";
  position: absolute;
  right: -12px;
  top: -12px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.55);
  transform: rotate(45deg);
}
.letter-paper p { margin: 0; font-size: 12px; font-weight: 650; line-height: 1.3; }
.refresh-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #a8d9b6;
  border-radius: 50%;
  background: white;
  color: var(--deep);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.reward-summary {
  margin: 4px 14px 0;
  padding: 23px 18px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--green);
}
.reward-summary::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -86px;
  top: -75px;
  border: 26px solid rgba(255,255,255,.25);
  border-radius: 50%;
}
.reward-summary h1 { margin: 0; position: relative; z-index: 2; font-family: "Lilita One", sans-serif; font-size: 30px; font-weight: 400; }
.reward-summary .big-number { display: block; margin: 7px 0 0; color: white; font-size: 92px; line-height: .85; text-shadow: 4px 5px 0 var(--deep); }
.reward-summary p { margin: 8px 0 0; position: relative; z-index: 2; font-size: 12px; font-weight: 700; }

.reward-card { margin: 14px; padding: 18px; }
.reward-card h2 { margin: 0; font-size: 16px; }
.reward-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
.reward-units { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 15px; }
.reward-unit { padding: 12px 5px 10px; border: 2px solid var(--ink); border-radius: 14px; background: #ecfff1; text-align: center; }
.reward-unit img { width: 50px; height: 50px; object-fit: contain; }
.reward-unit b { display: block; margin-top: 4px; font-size: 10px; }
.reward-unit span { color: var(--deep); font-size: 9px; font-weight: 800; }
.rule-list { display: grid; gap: 10px; margin-top: 14px; }
.rule-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; font-weight: 600; line-height: 1.35; }
.rule-index { width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font-size: 10px; font-weight: 800; }

.status-shell { padding: 28px 18px 110px; }
.status-visual {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  margin: 16px auto 20px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: "Anton", sans-serif;
  font-size: 54px;
  box-shadow: 6px 7px 0 rgba(0,0,0,.15);
}
.status-card { padding: 25px 20px 21px; text-align: center; }
.status-card h1 { margin: 0; font-family: "Lilita One", sans-serif; font-size: 31px; font-weight: 400; line-height: 1; }
.status-card p { margin: 11px 0 20px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; }
.state-picker { display: flex; gap: 7px; overflow-x: auto; padding: 15px 0 3px; scrollbar-width: none; }
.state-picker::-webkit-scrollbar { display: none; }
.state-chip { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.state-chip.selected { border-color: var(--ink); background: var(--ink); color: white; }

.hub { padding: 18px 14px 36px; }
.hub-header { padding: 22px 20px; background: var(--green); }
.hub-header h1 { margin: 4px 0 0; font-family: "Lilita One", sans-serif; font-size: 34px; font-weight: 400; line-height: 1; }
.hub-header p { margin: 9px 0 0; font-size: 12px; font-weight: 600; }
.flow-list { display: grid; gap: 10px; margin-top: 14px; }
.flow-link { display: flex; align-items: center; gap: 12px; padding: 13px; border: 2px solid var(--ink); border-radius: 15px; background: white; box-shadow: 3px 4px 0 rgba(0,0,0,.1); }
.flow-step { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: var(--yellow); font-family: "Anton", sans-serif; font-size: 18px; }
.flow-link b { display: block; font-size: 13px; }
.flow-link span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
.flow-arrow { margin-left: auto; font-size: 20px; font-weight: 800; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 22px;
  transform: translate(-50%, -70px);
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transition: .25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 500px) {
  body { padding: 24px 0; }
  .phone { min-height: calc(100vh - 48px); border-radius: 30px; }
  .app-preview, .handoff-page { min-height: calc(100vh - 48px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
