:root {
  --wa-green: #25d366;
  --wa-green-light: #dcf8c6;
  --wa-green-dark: #128c7e;
  --wa-teal-dark: #075e54;

  --cream: #faf3ea;
  --cream-2: #f3e9db;
  --ink: #1f2328;
  --muted: #5b6470;
  --border: rgba(31, 35, 40, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-highlight: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 20px 50px rgba(31, 35, 40, 0.14), 0 1px 0 rgba(255, 255, 255, 0.7) inset;

  --field-bg: rgba(120, 120, 128, 0.08);
  --field-bg-strong: rgba(120, 120, 128, 0.14);

  --chat-wallpaper: #e9e0d3;
  --chat-incoming: #ffffff;
  --chat-outgoing: var(--wa-green-light);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #0e1712;
    --cream-2: #121d17;
    --ink: #edf1ef;
    --muted: #9aa5a0;
    --border: rgba(255, 255, 255, 0.08);

    --glass-bg: rgba(28, 36, 32, 0.55);
    --glass-bg-strong: rgba(28, 36, 32, 0.78);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.06) inset;

    --field-bg: rgba(255, 255, 255, 0.06);
    --field-bg-strong: rgba(255, 255, 255, 0.1);

    --chat-wallpaper: #0b141a;
    --chat-incoming: #202c33;
    --chat-outgoing: #005c4b;

    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
}

/* ---------- background blobs (liquid glass depth) ---------- */

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
}

.blob-a {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--wa-green), transparent 70%);
}

.blob-b {
  width: 420px;
  height: 420px;
  top: 20%;
  right: -160px;
  background: radial-gradient(circle at 60% 40%, var(--wa-green-dark), transparent 70%);
  opacity: 0.25;
}

.blob-c {
  width: 360px;
  height: 360px;
  bottom: -140px;
  left: 30%;
  background: radial-gradient(circle at 50% 50%, var(--cream-2), transparent 70%);
  opacity: 0.5;
}

/* ---------- layout shell ---------- */

.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* higher than .site-footer so fixed-position descendants (e.g. .floating-cta) aren't
   click-trapped by the footer's transparent box winning DOM-order stacking ties */
.page {
  position: relative;
  z-index: 2;
}

.site-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  color: var(--wa-green-dark);
  display: inline-flex;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--field-bg);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover { color: var(--ink); }

.lang-btn.active {
  background: var(--glass-bg-strong);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(31, 35, 40, 0.12);
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.hero {
  max-width: 640px;
  margin: 20px 0 24px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

.brand-em {
  font-style: italic;
  font-weight: 800;
  color: var(--wa-green-dark);
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- view switch ---------- */

.view-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  width: 100%;
  max-width: 620px;
  margin: 0 0 20px;
  border-radius: 999px;
}

.view-tab {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 420px) {
  .view-tab {
    font-size: 12.5px;
    padding: 8px 4px;
  }
}

.view-tab:hover { color: var(--ink); }

.view-tab.active {
  background: var(--glass-bg-strong);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(31, 35, 40, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.view-panel[hidden] { display: none; }

/* ---------- glass primitive ---------- */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: var(--glass-shadow);
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-highlight), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card { padding: 28px; }

/* ---------- layout grid ---------- */

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
}

/* ---------- form ---------- */

.form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 18px 0 8px;
}

.form label:first-of-type { margin-top: 0; }

.form input,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  background: var(--field-bg);
  color: var(--ink);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.form input::placeholder,
.form textarea::placeholder { color: var(--muted); }

.form input:focus,
.form textarea:focus {
  outline: none;
  background: var(--field-bg-strong);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.4;
}

/* ---------- message template + inline item picker ---------- */

.message-template {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--field-bg);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.item-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.item-select-wrap .chevron {
  position: absolute;
  right: 10px;
  color: var(--wa-green-dark);
  pointer-events: none;
}

.message-template select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--wa-green-dark);
  background: rgba(37, 211, 102, 0.16);
  border-radius: 999px;
  padding: 5px 28px 5px 12px;
  cursor: pointer;
}

.message-template select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

.custom-item-row { margin-top: 8px; }

.custom-item-row input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}

.custom-item-row input:focus {
  outline: none;
  background: var(--field-bg-strong);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

/* ---------- phone field + country picker ---------- */

.phone-field {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: var(--field-bg);
  border-radius: 14px;
  padding: 2px;
}

.phone-field input {
  background: transparent;
  border-radius: 12px;
}

.phone-field input:focus {
  background: var(--field-bg-strong);
  box-shadow: none;
}

.phone-field:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

.country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.country-btn:hover { background: rgba(120, 120, 128, 0.12); }

.country-flag { font-size: 18px; line-height: 1; }
.chevron { color: var(--muted); }

.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  max-width: 90vw;
  padding: 10px;
  z-index: 20;
  border-radius: 20px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}

.country-dropdown input {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: var(--field-bg-strong);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 8px;
}

.country-dropdown input:focus { outline: none; box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35); }

.country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.country-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.country-list li:hover,
.country-list li.active { background: rgba(37, 211, 102, 0.16); }

.country-list .cl-flag { font-size: 17px; }
.country-list .cl-name { flex: 1; }
.country-list .cl-dial { color: var(--muted); font-size: 13px; }

/* ---------- buttons ---------- */

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

.btn-primary {
  margin-top: 26px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: rgba(18, 140, 126, 0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 8px 20px rgba(18, 140, 126, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary:hover {
  background: rgba(18, 140, 126, 0.94);
  box-shadow: 0 10px 24px rgba(18, 140, 126, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:active { transform: scale(0.97); }

.btn-glass {
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn-glass:hover { background: var(--field-bg-strong); }
.btn-glass:active { transform: scale(0.97); }

/* ---------- result / sticker ---------- */

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.result[hidden] { display: none; }

.sticker {
  width: min(280px, 100%);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  background: #fff;
  color: #1f2328;
  box-shadow: 0 12px 30px rgba(31, 35, 40, 0.12);
}

.sticker-footer {
  font-weight: 700;
  font-size: 20px;
  word-wrap: break-word;
  margin-top: 16px;
}

.qr-wrap { display: flex; justify-content: center; }

.actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.actions button { flex: 1; margin-top: 0; }

.link-preview {
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
  margin: 0;
}

.link-preview a { color: var(--wa-green-dark); }

/* ---------- chat demo ---------- */

.demo-section {
  text-align: center;
  padding-bottom: 70px;
}

.demo-section .subtitle {
  margin: 0 auto 20px;
  max-width: 540px;
}

/* ---------- "create a tag" cta, inside the phone-mock card ---------- */

/* independent of the phone-mock so its own animated overlays can never wash over it */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  width: calc(100% - 32px);
  max-width: 320px;
  display: flex;
  justify-content: center;
  transition: opacity 0.2s ease;
}

/* hidden once the footer disclaimer scrolls into view, so the two never overlap */
.floating-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.floating-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: var(--wa-green-dark);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(18, 140, 126, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.floating-cta-btn:hover {
  background: var(--wa-teal-dark);
  box-shadow: 0 16px 36px rgba(18, 140, 126, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.floating-cta-btn:active { transform: scale(0.97); }

/* ---------- how it works: one animated story ---------- */
/* The phone-mock card shows a plain "physical world" scene (tag it, scan it)
   first, then crossfades into the WhatsApp chat UI. Both layers share one
   14s timeline so the story reads as a single continuous loop. */

.phone-mock {
  width: min(320px, 100%);
  margin: 0 auto;
  border-radius: 32px;
  padding: 14px 14px 10px;
  text-align: left;
  overflow: hidden;
}

.story-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--glass-bg-strong);
  border-radius: 30px;
  pointer-events: none;
  animation: storySceneFade 20s ease infinite;
}

@keyframes storySceneFade {
  0%, 58% { opacity: 1; }
  61% { opacity: 0; }
  96% { opacity: 0; }
  100% { opacity: 1; }
}

.scene-flash {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #fff;
  border-radius: 30px;
  pointer-events: none;
  opacity: 0;
  animation: sceneFlash 20s ease infinite;
}

/* a quick bright pulse right as the story cuts from "you" to the finder's pov */
@keyframes sceneFlash {
  0%, 39% { opacity: 0; }
  41% { opacity: 0.85; }
  43%, 100% { opacity: 0; }
}

.chat-ui {
  animation: chatUiFade 20s ease infinite;
}

@keyframes chatUiFade {
  0%, 60% { opacity: 0; }
  64% { opacity: 1; }
  93% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

.story-caption-stack {
  position: relative;
  height: 18px;
  width: 100%;
}

.story-caption {
  position: absolute;
  inset: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.caption-headphones { animation: capHeadphones 20s ease infinite; }
.caption-keys { animation: capKeys 20s ease infinite; }
.caption-wallet { animation: capWallet 20s ease infinite; }
.caption-lose { animation: capLose 20s ease infinite; }
.caption-switch { animation: capSwitch 20s ease infinite; }
.caption-scan { animation: capScan 20s ease infinite; }

@keyframes capHeadphones {
  0%, 100% { opacity: 0; }
  2% { opacity: 0; }
  4% { opacity: 1; }
  11% { opacity: 1; }
  13% { opacity: 0; }
}

@keyframes capKeys {
  0%, 100% { opacity: 0; }
  14% { opacity: 0; }
  16% { opacity: 1; }
  22% { opacity: 1; }
  24% { opacity: 0; }
}

@keyframes capWallet {
  0%, 100% { opacity: 0; }
  24% { opacity: 0; }
  26% { opacity: 1; }
  30% { opacity: 1; }
  32% { opacity: 0; }
}

@keyframes capLose {
  0%, 100% { opacity: 0; }
  32% { opacity: 0; }
  34% { opacity: 1; }
  39% { opacity: 1; }
  41% { opacity: 0; }
}

@keyframes capSwitch {
  0%, 100% { opacity: 0; }
  40% { opacity: 0; }
  42% { opacity: 1; }
  47% { opacity: 1; }
  49% { opacity: 0; }
}

@keyframes capScan {
  0%, 100% { opacity: 0; }
  48% { opacity: 0; }
  50% { opacity: 1; }
  55% { opacity: 1; }
  57% { opacity: 0; }
}

/* ---------- product slot: three items take turns being tagged ---------- */

.product-slot {
  position: relative;
  width: 180px;
  height: 130px;
}

.prod-headphones,
.prod-keys,
.wallet-group {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-sticker {
  position: absolute;
  filter: drop-shadow(0 4px 8px rgba(31, 35, 40, 0.28));
}

/* --- headphones --- */

.prod-headphones { animation: headphonesFade 20s ease infinite; }

@keyframes headphonesFade {
  0%, 100% { opacity: 0; }
  1% { opacity: 0; }
  3% { opacity: 1; }
  12% { opacity: 1; }
  15% { opacity: 0; }
}

.hp-band {
  position: absolute;
  top: 20px;
  left: 55px;
  right: 55px;
  height: 55px;
  border: 9px solid #e3ded3;
  border-bottom: none;
  border-radius: 60px 60px 0 0;
}

.hp-cup {
  position: absolute;
  bottom: 26px;
  width: 28px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #f0efe9);
  box-shadow: 0 8px 16px rgba(31, 35, 40, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hp-cup-l { left: 50px; }
.hp-cup-r { right: 50px; }

.sticker-headphones {
  bottom: 32px;
  right: 44px;
  animation: stickHeadphones 20s ease infinite;
}

@keyframes stickHeadphones {
  0%, 100% { opacity: 0; transform: translate(14px, -18px) rotate(-24deg) scale(0.6); }
  3% { opacity: 0; transform: translate(14px, -18px) rotate(-24deg) scale(0.6); }
  6% { opacity: 1; transform: translate(-3px, 2px) rotate(10deg) scale(1.1); }
  8% { transform: translate(0, 0) rotate(-8deg) scale(1); }
  12% { opacity: 1; transform: translate(0, 0) rotate(-8deg) scale(1); }
  15% { opacity: 0; transform: translate(14px, -18px) rotate(-24deg) scale(0.6); }
}

/* --- keys, hung on a keychain fob (the sticker sits on the fob) --- */

.prod-keys { animation: keysFade 20s ease infinite; }

@keyframes keysFade {
  0%, 100% { opacity: 0; }
  13% { opacity: 0; }
  16% { opacity: 1; }
  22% { opacity: 1; }
  25% { opacity: 0; }
}

.key-ring {
  position: absolute;
  top: 18px;
  left: 50%;
  margin-left: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 5px solid #cfcac0;
}

.key-cluster {
  position: absolute;
  top: 44px;
  left: 40px;
  width: 50px;
  height: 64px;
}

.key-item {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

.key-item.k1 { left: 0; transform: rotate(-17deg); }
.key-item.k2 { left: 16px; transform: rotate(-1deg); z-index: 2; }
.key-item.k3 { left: 30px; transform: rotate(14deg); }

/* the bow is the hollow ring you'd slide onto a keychain */
.key-bow {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 3px solid #cfcac0;
  box-shadow: 0 2px 4px rgba(31, 35, 40, 0.15);
  flex-shrink: 0;
}

/* the blade, with a couple of notches cut into one edge like real key teeth */
.key-shaft {
  position: relative;
  width: 5px;
  height: 26px;
  margin-top: -2px;
  border-radius: 0 0 1px 1px;
  background: linear-gradient(180deg, #e7e2d5, #c9c2b2);
  box-shadow: 0 4px 8px rgba(31, 35, 40, 0.22);
}

.key-item.k2 .key-shaft { height: 32px; }
.key-item.k3 .key-shaft { height: 21px; }

.key-tooth {
  position: absolute;
  right: -4px;
  width: 4px;
  height: 3px;
  background: inherit;
}

.key-tooth.t1 { bottom: 3px; }
.key-tooth.t2 { bottom: 10px; width: 6px; }

.fob-strap {
  position: absolute;
  top: 46px;
  left: 100px;
  width: 2px;
  height: 18px;
  background: rgba(31, 35, 40, 0.28);
  transform: rotate(22deg);
}

.keychain-fob {
  position: absolute;
  top: 58px;
  left: 91px;
  width: 38px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3c3833, #2a2723);
  box-shadow: 0 8px 16px rgba(31, 35, 40, 0.28);
}

.sticker-keys {
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -9px;
  animation: stickKeys 20s ease infinite;
}

@keyframes stickKeys {
  0%, 100% { opacity: 0; transform: translate(-10px, -14px) rotate(20deg) scale(0.6); }
  16% { opacity: 0; transform: translate(-10px, -14px) rotate(20deg) scale(0.6); }
  19% { opacity: 1; transform: translate(2px, 2px) rotate(-6deg) scale(1.1); }
  21% { transform: translate(0, 0) rotate(4deg) scale(1); }
  22% { opacity: 1; transform: translate(0, 0) rotate(4deg) scale(1); }
  25% { opacity: 0; transform: translate(-10px, -14px) rotate(20deg) scale(0.6); }
}

/* --- wallet with cards peeking out (the one that gets lost) --- */

.wallet-group {
  animation: walletFade 20s ease infinite, walletTumble 20s ease infinite;
}

@keyframes walletFade {
  0%, 100% { opacity: 0; }
  23% { opacity: 0; }
  26% { opacity: 1; }
  95% { opacity: 1; }
  96% { opacity: 0; }
}

/* a harder, more dramatic drop: bigger rotation and fall, more desaturated once it lands */
@keyframes walletTumble {
  0%, 32% { transform: rotate(0deg) translate(0, 0); filter: none; }
  35% { transform: rotate(-19deg) translate(-10px, 15px); filter: grayscale(0.2) brightness(0.96); }
  37% { transform: rotate(25deg) translate(12px, 9px); filter: grayscale(0.4) brightness(0.9); }
  40%, 93% { transform: rotate(12deg) translate(5px, 10px); filter: grayscale(0.45) brightness(0.86); }
  96%, 100% { transform: rotate(0deg) translate(0, 0); filter: none; }
}

.prod-wallet {
  position: relative;
  width: 180px;
  height: 130px;
}

.wallet-card {
  position: absolute;
  width: 50px;
  height: 32px;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(31, 35, 40, 0.2);
}

.wallet-card-1 { top: 24px; left: 58px; background: linear-gradient(135deg, #3a4d6e, #25324a); transform: rotate(-10deg); }
.wallet-card-2 { top: 20px; left: 70px; background: linear-gradient(135deg, #6b7280, #4b5160); transform: rotate(2deg); }
.wallet-card-3 { top: 24px; left: 82px; background: linear-gradient(135deg, #cbb989, #a9976a); transform: rotate(12deg); }

.wallet-body {
  position: absolute;
  bottom: 18px;
  left: 34px;
  width: 112px;
  height: 70px;
  border-radius: 14px;
  background: linear-gradient(180deg, #4b4640, #322e29);
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wallet-body::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.sticker-wallet {
  bottom: 40px;
  left: 79px;
  animation: stickWallet 20s ease infinite;
}

@keyframes stickWallet {
  0%, 100% { opacity: 0; transform: translate(0, -20px) rotate(-16deg) scale(0.6); }
  26% { opacity: 0; transform: translate(0, -20px) rotate(-16deg) scale(0.6); }
  29% { opacity: 1; transform: translate(0, 3px) rotate(8deg) scale(1.1); }
  31% { transform: translate(0, 0) rotate(-5deg) scale(1); }
  95% { opacity: 1; transform: translate(0, 0) rotate(-5deg) scale(1); }
  96% { opacity: 0; transform: translate(0, -20px) rotate(-16deg) scale(0.6); }
}

/* ---------- scan reticle: frames the lost item once the finder spots it ---------- */

.scan-reticle {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  bottom: 6px;
  animation: reticleFade 20s ease infinite;
}

@keyframes reticleFade {
  0%, 100% { opacity: 0; }
  43% { opacity: 0; }
  46% { opacity: 1; }
  53% { opacity: 1; }
  56% { opacity: 0; }
}

.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--wa-green);
}

.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 6px 0; }

.scan-line {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: var(--wa-green);
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.7);
  animation: scanSweep 1.6s ease-in-out infinite alternate;
}

@keyframes scanSweep {
  0% { top: 6px; }
  100% { top: calc(100% - 6px); }
}

.chat-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 12px;
  color: var(--ink);
}

.chat-back { color: var(--muted); flex-shrink: 0; }

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--field-bg-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.chat-contact { display: flex; flex-direction: column; line-height: 1.25; }
.chat-name { font-weight: 700; font-size: 15px; }
.chat-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa-green);
  display: inline-block;
}

.chat-body {
  position: relative;
  background: var(--chat-wallpaper);
  background-image:
    radial-gradient(rgba(140, 140, 140, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 20px;
  padding: 12px 12px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.chat-date-pill {
  align-self: center;
  background: rgba(120, 120, 128, 0.18);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.chat-bubble {
  max-width: 78%;
  padding: 9px 12px 7px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  opacity: 0;
  animation-duration: 20s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}

.chat-bubble.outgoing {
  align-self: flex-end;
  background: var(--chat-outgoing);
  border-bottom-right-radius: 4px;
  animation-name: bubbleOutgoing;
}

.chat-bubble.incoming {
  align-self: flex-start;
  background: var(--chat-incoming);
  border-bottom-left-radius: 4px;
  animation-name: bubbleIncoming;
}

.bubble-meta {
  align-self: flex-end;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.ticks { color: #53bdeb; }

.chat-typing {
  align-self: flex-start;
  background: var(--chat-incoming);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 10px 14px;
  display: flex;
  gap: 4px;
  opacity: 0;
  animation: typingIndicator 20s ease infinite;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingDot 1s ease infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes bubbleOutgoing {
  0%, 62% { opacity: 0; transform: translateY(8px); }
  66%, 93% { opacity: 1; transform: translateY(0); }
  97%, 100% { opacity: 0; transform: translateY(8px); }
}

@keyframes typingIndicator {
  0%, 73% { opacity: 0; }
  76%, 82% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

@keyframes bubbleIncoming {
  0%, 86% { opacity: 0; transform: translateY(8px); }
  89%, 93% { opacity: 1; transform: translateY(0); }
  97%, 100% { opacity: 0; transform: translateY(8px); }
}

.chat-inputbar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
}

.chat-emoji { font-size: 18px; }

.chat-placeholder {
  flex: 1;
  background: var(--field-bg-strong);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 14px;
}

.chat-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- history ---------- */

.history-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.history-head h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

.history-head .subtitle {
  margin: 0;
  font-size: 14px;
  max-width: none;
}

.history-empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 48px 0;
  margin: 0;
}

.history-empty[hidden] { display: none; }

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

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--field-bg);
}

.history-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(31, 35, 40, 0.1);
}

.history-thumb img { width: 100%; height: 100%; display: block; }

.history-info { flex: 1; min-width: 0; }

.history-info-title {
  font-weight: 700;
  font-size: 14.5px;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-info-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-info-date {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.history-actions a,
.history-actions button {
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.history-open {
  background: rgba(18, 140, 126, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.history-delete {
  background: transparent;
  color: var(--muted);
}

.history-delete:hover { color: #d64545; }

/* ---------- footer ---------- */

.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  text-align: center;
}

.site-footer p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.site-footer code {
  background: var(--field-bg);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- print: a sheet of small stickers, 10 per row on A4 ---------- */

.print-sheet {
  display: none;
}

.print-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  break-inside: avoid;
}

.print-cell-qr {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.print-cell-footer {
  font-size: 4.5pt;
  line-height: 1.1;
  margin: 0.4mm 0 0;
  color: #000;
}

@media print {
  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }

  .print-sheet {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1.5mm;
    position: fixed;
    inset: 0;
  }

  @page {
    size: A4;
    margin: 6mm;
  }
}
