/* ==========================================================================
   PetLuv — design system + screens
   Warm, rounded, playful but quiet. Mobile-first; phone frame on desktop.
   ========================================================================== */

:root {
  /* brand — sampled from the @pets logo (diagonal warm-orange gradient) */
  --luv:        #FF6249;   /* primary — brand orange (gradient top) */
  --luv-deep:   #F0512F;
  --luv-soft:   #FFE7DF;
  --warm:       #FF9656;   /* gradient partner (bottom) */
  --mint:       #2BBFA6;   /* "it's a match" / yes accent */
  --mint-soft:  #DDF5EF;
  --nope:       #FF5A5F;   /* pass accent */

  /* category — kept distinct from the brand orange */
  --dog:   #3C9EE8;
  --cat:   #8367C7;
  --other: #4CB944;

  /* surfaces */
  --bg:      #FFF7F2;
  --surface: #FFFFFF;
  --ink:     #2A2024;
  --muted:   #9B8E92;
  --line:    #F0E6E0;
  --slate:   #8A99A8;

  --shadow-card: 0 18px 40px -12px rgba(60, 30, 35, .28);
  --shadow-soft: 0 6px 20px -8px rgba(60, 30, 35, .22);

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --font: 'Nunito', ui-rounded, 'Segoe UI Rounded', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 80% -10%, #FFE9DF 0%, transparent 55%),
    radial-gradient(120% 80% at -10% 110%, #FFE3E8 0%, transparent 55%),
    var(--bg);
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0) 0 0;
  overscroll-behavior: none;
}

/* ---- phone frame (desktop) ---------------------------------------------- */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  max-height: 920px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 480px) {
  .app {
    border-radius: 44px;
    height: min(92dvh, 900px);
    box-shadow: 0 40px 90px -30px rgba(50, 25, 30, .5), 0 0 0 11px #1d1417, 0 0 0 13px #322227;
  }
}

/* ---- header ------------------------------------------------------------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo svg { width: 30px; height: 30px; display: block; }
.logo img { width: 30px; height: 30px; display: block; border-radius: 8px; object-fit: cover; }
.bico { width: 19px; height: 12px; fill: #FF8A3D; display: inline-block; vertical-align: -1px; }
.bico.sm { width: 15px; height: 9px; }
.unlock .bico, .boost-cta .bico { fill: currentColor; }
.logo .word { font-size: 23px; font-weight: 900; letter-spacing: -.02em; }
.logo .word b { color: var(--luv); }

.iconbtn {
  width: 42px; height: 42px;
  border: none; border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: grid; place-items: center;
  font-size: 18px; cursor: pointer;
  color: var(--ink);
  transition: transform .12s ease;
}
.iconbtn:active { transform: scale(.92); }

/* top-right actions + bone counter */
.top-actions { display: flex; align-items: center; gap: 9px; }
.bones {
  display: flex; align-items: center; gap: 7px;
  border: none; cursor: pointer;
  background: #fff; box-shadow: var(--shadow-soft);
  border-radius: 999px; padding: 8px 14px 8px 11px;
  font-family: var(--font); font-weight: 900; font-size: 15px; color: var(--ink);
  transition: transform .12s ease;
}
.bones:active { transform: scale(.94); }
.bones .bone-ico { width: 22px; height: 14px; color: #FF8A2B; flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(180,90,10,.25)); }
.bones.bump { animation: bonebump .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes bonebump { 30% { transform: scale(1.18); } }

/* ---- filter chips ------------------------------------------------------- */
.filters {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 4px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 800; font-size: 14px;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s ease;
}
.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.chip[data-species="dog"][aria-pressed="true"]   { background: var(--dog);   border-color: var(--dog); }
.chip[data-species="cat"][aria-pressed="true"]   { background: var(--cat);   border-color: var(--cat); }
.chip[data-species="other"][aria-pressed="true"] { background: var(--other); border-color: var(--other); }

/* ---- distance slider ---------------------------------------------------- */
.distance-row {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 2px 22px 8px;
}
.distance-row .dlabel { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.distance-row .dlabel b { color: var(--ink); font-weight: 800; }
.distance-row input[type="range"] {
  flex: 1; height: 6px; -webkit-appearance: none; appearance: none;
  background: var(--line); border-radius: 999px; cursor: pointer;
}
.distance-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(140deg, var(--luv), var(--warm));
  box-shadow: var(--shadow-soft); border: 3px solid #fff;
}
.distance-row input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff;
  background: var(--luv); box-shadow: var(--shadow-soft);
}

/* ---- card deck ---------------------------------------------------------- */
.deck-wrap {
  position: relative;
  flex: 1 1 auto;
  margin: 4px 16px 0;
  min-height: 0;
}
.card {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  will-change: transform;
  user-select: none;
  touch-action: none;
}
.card .photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.card .photo .fallback { font-size: 120px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.15)); }
.card .photo img {
  position: absolute; inset: 0;           /* overlap the fallback, fill the card */
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease;
}
.card .photo img.loaded { opacity: 1; }
.card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,10,12,.82) 0%, rgba(20,10,12,.28) 34%, transparent 56%);
}

/* top-right stack: owner's face + a small species notifier beneath it */
.tr {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.owner-ava {
  position: relative;
  width: 50px; height: 50px; border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid rgba(255,255,255,.95);
  box-shadow: 0 4px 12px rgba(20,10,12,.35);
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--luv), var(--warm));
  color: #fff; font-weight: 800; font-size: 19px;
}
.owner-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.species-tag {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c, #fff);
  display: grid; place-items: center;
  font-size: 18px; line-height: 1;
  box-shadow: 0 3px 9px rgba(20,10,12,.28);
}

.card .info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 22px 22px;
  color: #fff;
}
.card .nameline { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.card .nameline h2 { font-size: 31px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.card .nameline .age { font-size: 23px; font-weight: 600; opacity: .9; }
.card .nameline .sex { font-size: 19px; font-weight: 700; opacity: .8; margin-left: -2px; }
.card .breed { font-size: 14.5px; font-weight: 700; opacity: .88; margin-top: 5px; letter-spacing: -.01em; }
.card .bio { font-size: 14.5px; font-weight: 500; line-height: 1.5; opacity: .94; margin-top: 9px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.card .tag {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.card .human {
  margin-top: 13px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 8px 12px; border-radius: 14px;
  font-size: 13px; font-weight: 700;
}
.card .human .heart { color: var(--luv); }
.card .human b { font-weight: 800; }

/* swipe stamps */
.stamp {
  position: absolute; top: 28px;
  font-size: 30px; font-weight: 900;
  padding: 8px 16px; border-radius: 14px;
  border: 4px solid; letter-spacing: .04em;
  opacity: 0; transition: opacity .05s linear;
  text-transform: uppercase;
}
.stamp.luv  { right: 22px; color: var(--mint); border-color: var(--mint); transform: rotate(14deg); }
.stamp.nope { left: 22px;  color: var(--nope); border-color: var(--nope); transform: rotate(-14deg); }

/* ---- action buttons ----------------------------------------------------- */
.actions {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 18px;
  padding: 14px 0 10px;
}
.act {
  border: none; cursor: pointer;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .14s cubic-bezier(.34,1.56,.64,1);
}
.act:active { transform: scale(.88); }
.act.pass { width: 60px; height: 60px; color: var(--nope); font-size: 28px; }
.act.bone { width: 58px; height: 58px; color: #fff;
  background: linear-gradient(140deg, #FFB04D 0%, #FF8A2B 100%); }
.act.bone svg { width: 30px; height: 19px; }
.act.luv  { width: 70px; height: 70px; color: #fff; font-size: 32px;
  background: linear-gradient(140deg, var(--luv) 0%, var(--warm) 100%); }
.act svg { width: 1em; height: 1em; }

/* boost banner */
.boost-banner {
  flex: 0 0 auto; margin: 0 16px 4px;
  background: linear-gradient(135deg, #7C5CFF, #A97BFF);
  color: #fff; font-weight: 800; font-size: 13px; text-align: center;
  padding: 9px 12px; border-radius: 12px; box-shadow: var(--shadow-soft);
}
.boost-banner[hidden] { display: none; }
.boost-banner span { font-weight: 900; }

/* likers reveal (Matches screen) */
.likers-banner {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(135deg, var(--luv-soft), #fff);
  border: 1.5px solid var(--luv-soft); border-radius: 18px;
  padding: 13px 14px; margin-bottom: 16px;
}
.likers-banner .stack { display: flex; flex: 0 0 auto; }
.likers-banner .stack .av {
  width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid #fff;
  background-size: cover; background-position: center; margin-left: -16px;
  display: grid; place-items: center; font-size: 22px; overflow: hidden;
}
.likers-banner .stack .av.blur img, .likers-banner .stack .av.blur { filter: blur(5px); }
.likers-banner .stack .av:first-child { margin-left: 0; }
.likers-banner .stack .av img { width: 100%; height: 100%; object-fit: cover; }
.likers-banner .meta { flex: 1; min-width: 0; }
.likers-banner .meta b { font-weight: 900; font-size: 15px; display: block; }
.likers-banner .meta small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.likers-banner .unlock {
  flex: 0 0 auto; border: none; cursor: pointer; font-family: var(--font);
  font-weight: 900; font-size: 13px; color: #fff;
  background: linear-gradient(140deg, #FFB04D, #FF8A2B);
  padding: 10px 13px; border-radius: 999px; display: flex; align-items: center; gap: 5px;
}
.likers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.liker-card { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 3/4;
  background-size: cover; background-position: center; box-shadow: var(--shadow-soft);
  display: grid; place-items: end stretch; }
.liker-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.liker-card .lc-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,10,12,.8), transparent 55%); }
.liker-card .lc-info { position: relative; padding: 10px 12px; color: #fff; }
.liker-card .lc-info b { font-weight: 900; font-size: 16px; }
.liker-card .lc-info small { display: block; font-weight: 700; font-size: 12px; opacity: .9; }
.liker-card .lc-like {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(140deg, var(--luv), var(--warm)); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-soft); font-size: 18px;
}

/* treat button in match rows */
.match-row .treat {
  flex: 0 0 auto; border: none; cursor: pointer; font-family: var(--font);
  width: 40px; height: 40px; border-radius: 50%; background: #FFF2E6; font-size: 18px;
}
.match-row .actions-mini { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* ---- bottom nav --------------------------------------------------------- */
.nav {
  flex: 0 0 auto;
  display: flex;
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0));
  background: #fff;
}
.navbtn {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-family: var(--font); font-weight: 800; font-size: 11px;
  padding: 4px 0;
}
.navbtn svg { width: 24px; height: 24px; }
.navbtn[aria-current="true"] { color: var(--luv); }
.navbtn .count {
  position: absolute; transform: translate(14px,-6px);
  background: var(--luv); color: #fff; font-size: 10px; font-weight: 900;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; display: grid; place-items: center;
}

/* ---- screens ------------------------------------------------------------ */
.screen { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.screen.active { display: flex; }
#screen-deck.active { display: flex; }

.empty {
  flex: 1; display: grid; place-items: center; text-align: center; padding: 30px;
}
.empty .big { font-size: 64px; margin-bottom: 14px; }
.empty h3 { font-size: 21px; font-weight: 900; margin-bottom: 6px; }
.empty p { color: var(--muted); font-weight: 600; max-width: 240px; margin: 0 auto 18px; line-height: 1.5; }
.btn {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 800; font-size: 15px;
  padding: 13px 24px; border-radius: 999px; color: #fff;
  background: linear-gradient(140deg, var(--luv) 0%, var(--warm) 100%);
  box-shadow: var(--shadow-soft);
}
.btn:active { transform: scale(.96); }

/* matches list */
.list { overflow-y: auto; padding: 8px 16px 20px; }
.list h2.title, .prof h2.title { font-size: 22px; font-weight: 900; padding: 8px 4px 12px; }
.match-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--r-md);
  background: #fff; box-shadow: var(--shadow-soft); margin-bottom: 12px;
}
.match-row .ava {
  width: 60px; height: 60px; border-radius: 16px; flex: 0 0 auto;
  overflow: hidden;
  background-size: cover; background-position: center; display: grid; place-items: center;
  font-size: 30px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.match-row .ava img { width: 100%; height: 100%; object-fit: cover; }
.match-row .meta { flex: 1; min-width: 0; }
.match-row .meta .n { font-weight: 800; font-size: 16px; }
.match-row .meta .s { color: var(--muted); font-weight: 700; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-row .say {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 900; font-size: 13px;
  padding: 9px 15px; border-radius: 999px; color: var(--luv); background: var(--luv-soft);
}
.match-row { cursor: pointer; transition: transform .12s ease, box-shadow .15s ease; }
.match-row:active { transform: scale(.985); }
.match-row.unread { box-shadow: var(--shadow-soft), inset 3px 0 0 var(--luv); }
.match-row.unread .meta .s { color: var(--ink); font-weight: 800; }
.match-row .meta .n { display: flex; align-items: center; gap: 7px; }
.unread-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--luv), var(--warm));
  box-shadow: 0 0 0 3px rgba(255,98,73,.14);
}

/* ---- chat ---------------------------------------------------------------- */
.chat {
  position: absolute; inset: 0; z-index: 70;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: chatIn .26s cubic-bezier(.22,.61,.36,1);
}
.chat[hidden] { display: none; }
@keyframes chatIn { from { transform: translateX(8%); opacity: 0; } }
.chat-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 11px;
  padding: 14px 16px 12px; background: #fff; border-bottom: 1px solid var(--line);
}
.chat-ava {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  background-size: cover; background-position: center; display: grid; place-items: center;
  font-size: 22px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.chat-ava img { width: 100%; height: 100%; object-fit: cover; }
.chat-who { min-width: 0; }
.chat-who b { font-weight: 900; font-size: 16px; display: block; line-height: 1.1; }
.chat-who small { color: var(--muted); font-weight: 700; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.chat-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 16px 14px; }
.chat-msgs { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 20px;
  font-weight: 600; font-size: 14.5px; line-height: 1.4; position: relative;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.bubble .bx { white-space: pre-wrap; }
.bubble.them {
  align-self: flex-start; background: #fff; color: var(--ink);
  border-bottom-left-radius: 7px; box-shadow: var(--shadow-soft);
}
.bubble.me {
  align-self: flex-end; color: #fff;
  background: linear-gradient(140deg, var(--luv) 0%, var(--warm) 100%);
  border-bottom-right-radius: 7px; box-shadow: var(--shadow-soft);
}
.bubble .bt { display: block; font-size: 10.5px; font-weight: 700; opacity: .65; margin-top: 4px; }
.bubble.me .bt { text-align: right; }

/* typing indicator (matched pet) */
.bubble.typing {
  align-self: flex-start; background: #fff; box-shadow: var(--shadow-soft);
  border-bottom-left-radius: 7px; display: flex; gap: 5px; padding: 14px 16px;
}
.bubble.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: typedot 1.1s infinite ease-in-out;
}
.bubble.typing span:nth-child(2) { animation-delay: .15s; }
.bubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typedot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0));
  background: #fff; border-top: 1px solid var(--line);
}
.chat-input {
  flex: 1; min-width: 0; font-family: var(--font); font-weight: 600; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 12px 17px; outline: none; transition: border-color .15s;
}
.chat-input:focus { border-color: var(--luv); }
.chat-input::placeholder { color: #c4b8bc; }
.chat-send {
  flex: 0 0 auto; width: 46px; height: 46px; border: none; cursor: pointer; border-radius: 50%;
  background: linear-gradient(140deg, var(--luv) 0%, var(--warm) 100%); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-soft); transition: transform .12s ease;
}
.chat-send:active { transform: scale(.9); }
.chat-send svg { width: 20px; height: 20px; }

/* profile */
.prof { overflow-y: auto; padding: 8px 18px 24px; }
.prof .hero {
  border-radius: var(--r-lg); overflow: hidden; position: relative;
  aspect-ratio: 3/4; box-shadow: var(--shadow-card); margin-bottom: 14px;
  background: linear-gradient(140deg, var(--luv-soft), #fff);
  display: grid; place-items: center;
}
.prof .hero img { width: 100%; height: 100%; object-fit: cover; }
.prof .hero .fallback { font-size: 110px; }
.prof .pname { font-size: 26px; font-weight: 900; }
.prof .psub { color: var(--muted); font-weight: 700; margin: 2px 0 12px; }
.prof .pbio { font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.prof .ptags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.prof .ptag { background: #fff; box-shadow: var(--shadow-soft); padding: 7px 13px;
  border-radius: 999px; font-size: 13px; font-weight: 800; }
.prof .note { background: var(--mint-soft); color: #1d7a6a; border-radius: var(--r-md);
  padding: 14px 16px; font-weight: 700; font-size: 14px; line-height: 1.45; }

/* ---- match modal -------------------------------------------------------- */
.modal {
  position: absolute; inset: 0; z-index: 50;
  display: none; place-items: center;
  background: rgba(25,12,16,.55);
  backdrop-filter: blur(8px);
  padding: 30px;
}
.modal.open { display: grid; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal .sheet {
  text-align: center; color: #fff; width: 100%; max-width: 340px;
  animation: pop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.modal .its { font-size: 16px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.modal h2 {
  font-size: 42px; font-weight: 900; line-height: 1; margin: 6px 0 22px;
  background: linear-gradient(120deg, #fff, var(--luv-soft));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.modal .pair { display: flex; justify-content: center; gap: 18px; margin-bottom: 22px; }
.modal .pair .ava {
  width: 112px; height: 112px; border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff; background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 54px; box-shadow: var(--shadow-card);
}
.modal .pair .ava:first-child { transform: rotate(-6deg); }
.modal .pair .ava:last-child  { transform: rotate(6deg); margin-left: -14px; }
.modal .pair .ava img { width: 100%; height: 100%; object-fit: cover; }
.modal .spark {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 14px; margin-bottom: 20px;
}
.modal .spark b { font-weight: 900; }
.modal .btn { width: 100%; margin-bottom: 10px; }
.modal .ghost {
  width: 100%; border: none; background: none; color: #fff; opacity: .85;
  font-family: var(--font); font-weight: 800; font-size: 14px; padding: 10px; cursor: pointer;
}

/* ---- bottom-sheet modal (bones store) ----------------------------------- */
.sheet-modal {
  position: absolute; inset: 0; z-index: 75;
  background: rgba(25,12,16,.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
.sheet-modal[hidden] { display: none; }
.sheet-card {
  background: #fff; width: 100%;
  border-radius: 26px 26px 0 0; padding: 6px 22px calc(24px + env(safe-area-inset-bottom,0));
  max-height: 88%; overflow-y: auto;
  animation: sheetUp .32s cubic-bezier(.22,.61,.36,1);
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 0 8px; }
.sheet-head b { font-size: 21px; font-weight: 900; }
.sheet-head small { display: block; color: var(--muted); font-weight: 800; font-size: 13px; margin-top: 3px; }
.sheet-note { color: var(--muted); font-weight: 600; line-height: 1.5; font-size: 14px; margin-bottom: 18px; }
.sheet-fine { text-align: center; color: var(--muted); font-weight: 700; font-size: 11.5px; margin-top: 14px; }

.bone-packs { display: flex; flex-direction: column; gap: 11px; }
.bone-pack {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--line); border-radius: 18px; padding: 15px 16px;
  cursor: pointer; background: #fff; transition: border-color .15s, transform .12s;
  position: relative; font-family: var(--font);
}
.bone-pack:active { transform: scale(.98); }
.bone-pack.feature { border-color: var(--luv); background: var(--luv-soft); }
.bone-pack .amt { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 20px; color: var(--ink); flex: 1; }
.bone-pack .amt .b { font-size: 24px; }
.bone-pack .price {
  border: none; font-family: var(--font); font-weight: 900; font-size: 15px; color: #fff;
  background: linear-gradient(140deg, var(--luv), var(--warm));
  padding: 10px 18px; border-radius: 999px; cursor: pointer; flex: 0 0 auto;
}
.bone-pack .pill {
  position: absolute; top: -9px; left: 16px;
  background: var(--luv); color: #fff; font-size: 10.5px; font-weight: 900;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}

/* ---- onboarding wizard -------------------------------------------------- */
.onboard {
  position: absolute; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.onboard[hidden] { display: none; }
.ob-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px 6px;
}
.ob-icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  border: none; background: #fff; border-radius: 50%;
  box-shadow: var(--shadow-soft); cursor: pointer;
  font-size: 20px; color: var(--ink); line-height: 1;
}
.ob-progress { flex: 1; height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ob-progress span { display: block; height: 100%; width: 16%;
  background: linear-gradient(90deg, var(--luv), var(--warm)); border-radius: 999px;
  transition: width .3s cubic-bezier(.22,.61,.36,1); }
.ob-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 22px 24px; }
.ob-foot { flex: 0 0 auto; padding: 12px 22px calc(16px + env(safe-area-inset-bottom, 0)); border-top: 1px solid var(--line); background: #fff; }
.ob-foot .btn { width: 100%; }

.ob-h { font-size: 25px; font-weight: 900; letter-spacing: -.02em; margin-top: 6px; }
.ob-sub { color: var(--muted); font-weight: 600; line-height: 1.45; margin: 6px 0 20px; }

.ob-field { display: block; margin-bottom: 18px; }
.ob-field > span { display: block; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.ob-row { display: flex; gap: 14px; }
.ob-row .ob-field { flex: 1; }
.ob-input {
  width: 100%; font-family: var(--font); font-weight: 600; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 13px 15px; outline: none; transition: border-color .15s;
}
.ob-input:focus { border-color: var(--luv); }
.ob-input::placeholder { color: #c4b8bc; }
.ob-area { resize: none; min-height: 84px; line-height: 1.45; }
.ob-count { display: block; text-align: right; color: var(--muted); font-weight: 700; font-size: 12px; margin-top: 5px; }

/* species picker */
.ob-species { display: flex; gap: 10px; }
.ob-spec {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 16px;
  padding: 14px 6px; cursor: pointer; font-family: var(--font); font-weight: 800; font-size: 14px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all .15s;
}
.ob-spec .e { font-size: 30px; }
.ob-spec.on { border-color: var(--luv); background: var(--luv-soft); }

/* segmented (sex) */
.ob-seg { display: flex; gap: 8px; }
.ob-seg button {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 14px;
  padding: 13px 4px; cursor: pointer; font-family: var(--font); font-weight: 800; font-size: 14px; color: var(--muted);
}
.ob-seg button.on { border-color: var(--luv); background: var(--luv-soft); color: var(--luv-deep); }

/* photos grid */
.ob-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob-photo {
  position: relative; aspect-ratio: 3/4; border-radius: 16px;
  background-size: cover; background-position: center; background-color: var(--luv-soft);
  border: none; cursor: pointer; overflow: visible;
}
.ob-photo .ph-main {
  position: absolute; left: 6px; bottom: 6px; z-index: 1;
  background: var(--luv); color: #fff; font-size: 10px; font-weight: 900;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}
.ob-photo .ph-del {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  background: var(--ink); color: #fff; font-size: 11px; cursor: pointer; line-height: 1;
  box-shadow: var(--shadow-soft);
}
.ob-add-photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: #fff; border: 2px dashed var(--line); color: var(--muted);
  font-size: 28px; font-weight: 400;
}
.ob-add-photo small { font-size: 12px; font-weight: 800; }

/* tags */
.ob-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ob-tag {
  border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  font-family: var(--font); font-weight: 700; font-size: 13.5px;
  padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.ob-tag.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ob-tag-add { margin-top: 2px; }

/* prompts */
.ob-empty-prompts { color: var(--muted); font-weight: 600; padding: 6px 0 14px; }
.ob-prompt { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.ob-prompt .pr-q { font-weight: 800; font-size: 14.5px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ob-prompt .pr-del { border: none; background: none; color: var(--muted); font-size: 14px; cursor: pointer; flex: 0 0 auto; }
.ob-prompt textarea { min-height: 60px; border-color: transparent; background: var(--bg); padding: 10px 12px; }
.ob-add {
  width: 100%; border: 2px dashed var(--line); background: #fff; color: var(--luv-deep);
  font-family: var(--font); font-weight: 800; font-size: 15px; padding: 14px; border-radius: 16px; cursor: pointer;
}
.ob-add.ob-danger { color: var(--nope); border-style: solid; margin-top: 12px; }

/* prompt picker sheet */
.ob-picker { position: absolute; inset: 0; z-index: 5; background: rgba(25,12,16,.5); display: flex; align-items: flex-end; }
.ob-picker[hidden] { display: none; }
.ob-picker-sheet { background: #fff; width: 100%; border-radius: 24px 24px 0 0; max-height: 75%; display: flex; flex-direction: column; animation: sheetUp .3s cubic-bezier(.22,.61,.36,1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.ob-picker-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 10px; font-size: 17px; }
.ob-picker-list { overflow-y: auto; padding: 4px 14px 20px; }
.picker-item { display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 15px; color: var(--ink);
  padding: 14px 12px; border-radius: 12px; }
.picker-item:hover { background: var(--luv-soft); }

/* voice */
.ob-voice { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0; }
.ob-rec {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(140deg, var(--luv), var(--warm)); padding: 16px 28px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-card);
}
.ob-rec .dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.ob-rec.recording { background: var(--ink); }
.ob-rec.recording .dot { background: var(--nope); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ob-rec-time { font-weight: 800; color: var(--nope); }
.ob-rec-time[hidden] { display: none; }
.ob-audio { width: 100%; }
.ob-note { background: var(--mint-soft); color: #1d7a6a; border-radius: 14px; padding: 14px 16px; font-weight: 700; font-size: 14px; line-height: 1.45; }

/* owner toggle switch */
.ob-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 4px 0; }
.ob-switch > span { font-weight: 800; font-size: 14.5px; }
.ob-switch > span small { display: block; font-weight: 600; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ob-switch input { display: none; }
.ob-switch i { flex: 0 0 auto; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.ob-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft); transition: transform .2s; }
.ob-switch input:checked + i { background: var(--luv); }
.ob-switch input:checked + i::after { transform: translateX(20px); }

/* error toast */
#ob-error { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(8px);
  background: var(--nope); color: #fff; font-weight: 800; font-size: 13.5px; padding: 11px 18px; border-radius: 999px;
  box-shadow: var(--shadow-card); opacity: 0; pointer-events: none; transition: all .25s; max-width: 84%; text-align: center; z-index: 8; }
#ob-error.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* edit-profile button */
.prof .edit-btn { width: 100%; margin-bottom: 10px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink); font-family: var(--font); font-weight: 800; font-size: 15px; padding: 13px; border-radius: 14px; cursor: pointer; }
.prof .boost-cta { color: #7C5CFF; border-color: #E7DEFF; margin-bottom: 16px; }

/* profile extras: prompts + voice */
.prof .pprompt { background: #fff; box-shadow: var(--shadow-soft); border-radius: 16px; padding: 15px 16px; margin-bottom: 12px; }
.prof .pprompt .q { color: var(--muted); font-weight: 800; font-size: 13px; margin-bottom: 5px; }
.prof .pprompt .a { font-weight: 700; font-size: 16px; line-height: 1.4; }
.prof .pvoice { display: flex; align-items: center; gap: 10px; background: var(--luv-soft); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; font-weight: 800; font-size: 14px; color: var(--luv-deep); }
.prof .pvoice audio { flex: 1; height: 36px; }

/* profile completeness nudge (Hinge/Bumble-style strength meter) */
.prof .pcomplete { background: #fff; box-shadow: var(--shadow-soft); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 16px; }
.prof .pcomplete .pc-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.prof .pcomplete .pc-pct { font-weight: 900; font-size: 18px; color: var(--luv); flex: 0 0 auto;
  font-variant-numeric: tabular-nums; }
.prof .pcomplete .pc-msg { font-weight: 800; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.prof .pcomplete .pc-bar { height: 8px; border-radius: 999px; background: var(--luv-soft); overflow: hidden; }
.prof .pcomplete .pc-bar span { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--luv), var(--warm)); transition: width .5s cubic-bezier(.22,.61,.36,1); }
.prof .pcomplete .pc-cta { display: block; width: 100%; margin-top: 12px; border: none; cursor: pointer;
  background: var(--luv-soft); color: var(--luv-deep); font-family: var(--font); font-weight: 800;
  font-size: 14px; padding: 11px; border-radius: 12px; transition: transform .12s ease, filter .12s ease; }
.prof .pcomplete .pc-cta:active { transform: scale(.98); filter: brightness(.97); }
.prof .pcomplete.done .pc-pct { color: var(--mint); }
.prof .pcomplete.done .pc-bar span { background: linear-gradient(90deg, var(--mint), #7AD9C7); }

/* ---- onboarding / splash ----------------------------------------------- */
#splash {
  position: absolute; inset: 0; z-index: 80;
  background: linear-gradient(160deg, var(--luv) 0%, var(--warm) 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px; transition: opacity .4s ease, visibility .4s;
}
#splash.hidden { opacity: 0; visibility: hidden; }
#splash .mark { margin-bottom: 8px; animation: bob 2.4s ease-in-out infinite; }
#splash .mark-img { width: 116px; height: 116px; border-radius: 26px; box-shadow: 0 12px 34px rgba(0,0,0,.20); display: block; }
@keyframes bob { 50% { transform: translateY(-10px); } }
#splash h1 { font-size: 44px; font-weight: 900; letter-spacing: -.02em; }
#splash p { font-weight: 700; opacity: .92; margin: 8px 0 30px; max-width: 280px; line-height: 1.5; }
#splash .btn { background: #fff; color: var(--luv); }
#splash .fine { margin-top: 16px; font-size: 12px; font-weight: 700; opacity: .8; }

/* ---- age gate (18+) ----------------------------------------------------- */
#agegate {
  position: absolute; inset: 0; z-index: 95;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
#agegate[hidden] { display: none; }
.ag-card {
  width: 100%; max-width: 360px; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 30px 24px 24px; text-align: center;
}
.ag-emoji { font-size: 52px; line-height: 1; }
.ag-card h2 { font-size: 27px; font-weight: 900; letter-spacing: -.02em; margin-top: 12px; }
.ag-card p { color: var(--muted); font-weight: 600; line-height: 1.5; font-size: 14px; margin: 8px 0 20px; }
.ag-row { display: flex; gap: 12px; text-align: left; margin-bottom: 6px; }
.ag-field { flex: 1; display: block; }
.ag-field.ag-year { flex: 1.3; }
.ag-field > span { display: block; font-weight: 800; font-size: 13px; margin-bottom: 7px; }
.ag-err { color: var(--nope); font-weight: 800; font-size: 13.5px; margin: 12px 0 0; }
.ag-err[hidden] { display: none; }
.ag-card .btn { width: 100%; margin-top: 18px; }

/* ---- card overflow (report/block affordance) ---------------------------- */
.card-flag {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(20,12,16,.32); backdrop-filter: blur(6px);
  color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background .15s, transform .12s;
}
.card-flag:active { transform: scale(.9); }
.card-flag:hover { background: rgba(20,12,16,.5); }
.card-flag svg { width: 20px; height: 20px; }

/* ---- report / block sheet ----------------------------------------------- */
.report-reasons { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.report-reason {
  width: 100%; text-align: left; font-family: var(--font); font-weight: 800; font-size: 15px;
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
}
.report-reason:hover { border-color: var(--luv); background: var(--luv-soft); }
.report-reason:active { transform: scale(.98); }
.report-block {
  width: 100%; font-family: var(--font); font-weight: 900; font-size: 15px;
  color: var(--nope); background: #fff; border: 1.5px solid var(--nope); border-radius: 999px;
  padding: 14px; cursor: pointer; margin-top: 4px; transition: background .15s, transform .12s;
}
.report-block:hover { background: #fff0f0; }
.report-block:active { transform: scale(.98); }

/* ==========================================================================
   Accessibility polish (2026-06-08, from Primer findings)
   Additive + safe: focus rings use `outline` (no layout impact, won't disturb
   the JS-driven .card swipe transforms); reduced-motion only DISABLES motion.
   PetLuv already has rich micro-interactions — this fills the a11y gap only.
   ========================================================================== */
button:focus-visible,
.iconbtn:focus-visible,
.act:focus-visible,
.btn:focus-visible,
.bones:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--luv);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
