/* PetnZoo — original look. Every species equal: no paw-print/dog-first art. Big touch targets.
   10-30 Leonard: "make the background of all pages a gradient of sky blue and white. Pastel." -> one pastel sky
   (light only: a dark-mode phone would have hidden the sky, so every page stays in the sky look). */
:root {
  --bg: #eaf5ff; --card: #ffffff; --ink: #231d33; --muted: #5f6680; --line: #d9e8f5; --soft: #eef5fb;
  --brand: #6a4bd8; --brand-ink: #ffffff; --brand-soft: #efeaff; --coral: #ff8a5b; --ok: #16865a; --warn: #9a6a00;
  --danger: #c4323f; --focus: #ffb703; --radius: 14px; --shadow: 0 1px 2px rgba(35, 60, 90, .06), 0 4px 16px rgba(35, 60, 90, .07);
  --sky: linear-gradient(180deg, #bfe2ff 0%, #d6edff 30%, #ecf7ff 60%, #ffffff 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; min-height: 100%; background: #ffffff var(--sky) no-repeat fixed; }
body { margin: 0; min-height: 100vh; background: transparent; color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }

/* layout */
.app { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
/* 10-31: minmax(0,…) + min-width:0 stop a wide chip row from stretching the page past a phone screen */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: rgba(191, 226, 255, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.5px; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.logo b { color: var(--brand); }
.logo .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: #231d33; font-size: 14px; }
.spacer { flex: 1; }
main.view { width: 100%; min-width: 0; max-width: 680px; margin: 0 auto; padding: 16px 16px 96px; }
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; min-height: 56px;
  text-decoration: none; color: var(--muted); font-size: 12px; position: relative; }
nav.tabs a .ic { font-size: 22px; line-height: 1; }
nav.tabs a[aria-current="page"] { color: var(--brand); font-weight: 700; }
nav.tabs a .dot { position: absolute; top: 6px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
@media (min-width: 900px) {
  .app { grid-template-columns: 240px minmax(0, 1fr); }
  nav.tabs { position: sticky; top: 62px; height: calc(100vh - 62px); grid-template-columns: 1fr; grid-auto-rows: min-content; border-top: 0;
    border-right: 1px solid var(--line); padding: 12px; gap: 4px; z-index: 10; }
  nav.tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 16px; padding: 12px 14px; border-radius: 12px; min-height: 0; }
  nav.tabs a[aria-current="page"] { background: var(--brand-soft); }
  nav.tabs a .dot { position: static; }
  .top, .offline { grid-column: 1 / -1; }
  main.view { padding-bottom: 40px; grid-column: 2; }
  .app.no-nav { grid-template-columns: 1fr; }
  .app.no-nav main.view { grid-column: 1; }
}

/* pieces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.card.flat { box-shadow: none; }
h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 12px; letter-spacing: -.3px; }
h2 { font-size: 19px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 12px 0 6px; }
p { margin: 6px 0 10px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink);
  font-size: 13px; border: 1px solid var(--line); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips button.chip { cursor: pointer; white-space: nowrap; min-height: 36px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.quiet { background: var(--soft); color: var(--ink); border-color: var(--line); font-weight: 600; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 6px 10px;
  border-radius: 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 15px; }
.iconbtn:hover { background: var(--soft); }
.iconbtn.on { color: var(--danger); }
.iconbtn.saved { color: var(--brand); }

label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=search],
input[type=tel], input[type=number], select, textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; vertical-align: middle; margin-right: 8px; accent-color: var(--brand); }
label.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 500; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; margin: 12px 0; background: var(--card); }
details summary { cursor: pointer; padding: 10px 0; font-weight: 600; min-height: 44px; }

/* avatars + pet chip */
.av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); flex: none; display: grid;
  place-items: center; font-size: 22px; overflow: hidden; }
.av.lg { width: 104px; height: 104px; font-size: 48px; border: 4px solid var(--card); }
.av.sm { width: 32px; height: 32px; font-size: 16px; }
.petchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; max-width: 220px; min-height: 44px; }
.petchip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 14px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.who .nm { font-weight: 700; }
.who .sub { color: var(--muted); font-size: 13px; }
.memorial { color: var(--muted); font-size: 12px; }

/* posts */
.post { padding: 0; overflow: hidden; }
.post .hd { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; }
.post .cap { padding: 4px 16px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .media { display: grid; gap: 2px; background: #000; }
.post .media img, .post .media video { width: 100%; max-height: 560px; object-fit: contain; background: #000; }
.post .media.multi { grid-template-columns: 1fr 1fr; }
.post .media.multi img, .post .media.multi video { aspect-ratio: 1; object-fit: cover; }
.post .ft { display: flex; align-items: center; gap: 2px; padding: 4px 6px 6px; border-top: 1px solid var(--line); }
.vis { font-size: 12px; color: var(--muted); }
.tag { color: var(--brand); text-decoration: none; font-weight: 600; }
.comments { border-top: 1px solid var(--line); padding: 8px 16px 12px; }
.cmt { display: flex; gap: 8px; margin: 10px 0; }
.cmt .bubble { background: var(--soft); border-radius: 12px; padding: 8px 12px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmt.reply { margin-left: 40px; }

/* profile */
.cover { height: 150px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(120deg, var(--brand-soft), var(--soft));
  margin: -16px -16px 0; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.prof .av.lg { margin-top: -52px; }
.counts { display: flex; gap: 18px; margin: 8px 0; }
.counts a { text-decoration: none; color: var(--ink); }
.counts b { font-size: 17px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.lost-banner { background: var(--danger); color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.found-banner { background: var(--ok); color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.note { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.warnbox { background: color-mix(in srgb, var(--warn) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.codes { font-family: ui-monospace, Menlo, monospace; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 16px; }
.codes span { background: var(--soft); padding: 6px 10px; border-radius: 8px; text-align: center; }
.list > * { border-bottom: 1px solid var(--line); padding: 10px 0; }
.list > *:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.empty .big { font-size: 40px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.thumbs .t { position: relative; width: 96px; }
.thumbs .t img, .thumbs .t video { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.thumbs .t .x { position: absolute; top: 2px; right: 2px; background: rgba(0, 0, 0, .65); color: #fff; border: 0; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; }
.thumbs .t input { margin-top: 4px; min-height: 36px; font-size: 12px; padding: 6px 8px; }
progress { width: 100%; height: 8px; accent-color: var(--brand); }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: 220px; margin: 0 auto; }
.qr svg { width: 100%; height: auto; display: block; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 520px); box-shadow: var(--shadow); font-weight: 600; }
.toast.err { background: var(--danger); color: #fff; }
.offline { background: var(--warn); color: #000; text-align: center; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.menu { position: relative; }
.menu .pop { position: absolute; right: 0; top: 100%; z-index: 40; min-width: 220px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu .pop button { display: block; width: 100%; text-align: left; padding: 12px; border: 0; background: transparent; border-radius: 8px;
  cursor: pointer; min-height: 44px; }
.menu .pop button:hover { background: var(--soft); }
.menu .pop button.danger { color: var(--danger); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 18px;
  width: min(92vw, 480px); max-height: 86vh; overflow: auto; }
dialog::backdrop { background: rgba(10, 8, 20, .55); }
.hero { text-align: center; padding: 26px 8px 8px; }
.hero h1 { font-size: 32px; }
.zoo { font-size: 34px; letter-spacing: 6px; margin: 8px 0 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.petgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.petgrid .card { text-align: center; margin: 0; padding: 14px 10px; }
.petgrid .av { margin: 0 auto 8px; width: 64px; height: 64px; font-size: 30px; }
.active-tag { font-size: 11px; font-weight: 700; color: var(--ok); }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* plain server pages (finder, sitter share) */
body.plain { background: transparent; }
.sheet { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.sheet .finder-photo { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; margin: 8px auto; }
.sheet h1 { text-align: center; }
.sheet .muted { text-align: center; }
.sheet .safety { background: color-mix(in srgb, var(--warn) 16%, var(--card)); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.sheet form.finder { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.sheet form.finder .btn { width: 100%; margin-top: 10px; }
.sheet ul.care { padding-left: 18px; }
.sheet ul.care li { margin: 10px 0; }

@media print {
  nav.tabs, .top, .noprint { display: none !important; }
  main.view { max-width: none; padding: 0; }
  .label { border: 2px dashed #999; padding: 16px; width: 3.5in; text-align: center; }
}

.hero .row { justify-content: center; }
[hidden] { display: none !important; }
a.card, a.chip, .chips a, .iconbtn, a.btn, .counts a, a.who { text-decoration: none; }
a.card { display: flex; color: var(--ink); }
/* show-password eye (10-30) */
.pw { position: relative; display: block; }
.pw input { padding-right: 56px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.pw .eye:hover { background: var(--soft); }

/* ── intro page (10-30): the familiar social-app front door, PetnZoo's own look ── */
.app.bare .top { display: none; }
.app.bare main.view { max-width: 960px; padding-top: 28px; }
.landing { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.landing .show { display: none; }
.door { max-width: 400px; width: 100%; margin: 0 auto; }
.doorcard { text-align: center; padding: 28px 24px 22px; }
.brand { font-weight: 800; letter-spacing: -1px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.brand b { color: var(--brand); }
.brand .n { display: inline-grid; place-items: center; border-radius: 50%; background: var(--coral); color: #231d33; }
.brand.big { font-size: 44px; }
.brand.big .n { width: 40px; height: 40px; font-size: 26px; }
.brand.sm { font-size: 18px; }
.brand.sm .n { width: 18px; height: 18px; font-size: 12px; }
.doorcard .tag { color: var(--muted); font-size: 17px; margin: 4px 0 16px; }
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -8px 8px; scrollbar-width: none; justify-content: flex-start; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 62px; }
.storypic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 28px; background: var(--card);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--brand), 0 0 0 7px #bfe2ff; }
.story .lbl { font-size: 11px; color: var(--muted); }
form.auth { display: grid; gap: 10px; text-align: left; }
form.auth input { min-height: 48px; background: var(--soft); }
form.auth .forgot { justify-self: center; font-size: 14px; text-decoration: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.points { padding: 18px 20px; }
.points p { margin: 8px 0; font-size: 15px; }
.center { text-align: center; }

/* the phone showing the feed (wide screens) */
.phone { position: relative; width: 300px; height: 600px; margin: 0 auto; border-radius: 44px; background: #1d2333; padding: 12px;
  box-shadow: 0 24px 60px rgba(40, 80, 130, .25); transform: rotate(-3deg); }
.phone .notch { position: absolute; top: 12px; left: 50%; width: 110px; height: 24px; margin-left: -55px; background: #1d2333; border-radius: 0 0 16px 16px; z-index: 2; }
.phone .screen { height: 100%; border-radius: 34px; overflow: hidden; background: linear-gradient(180deg, #d6edff, #ffffff 55%); padding: 34px 12px 12px; }
.mtop { padding: 0 4px 8px; }
.mstories { display: flex; gap: 8px; padding: 2px 2px 10px; }
.mstories .storypic { width: 40px; height: 40px; font-size: 20px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.mpost { background: #fff; border-radius: 14px; margin-bottom: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(40, 80, 130, .1); }
.mhd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; }
.mhd small { display: block; color: var(--muted); font-size: 11px; }
.mav { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); }
.mpic { height: 150px; display: grid; place-items: center; font-size: 72px; }
.mpic.g1 { background: linear-gradient(135deg, #c8f0d8, #8fd3b0); }
.mpic.g2 { background: linear-gradient(135deg, #ffe3c8, #ffc59a); }
.mft { padding: 6px 10px 0; font-size: 15px; letter-spacing: 2px; }
.mcap { margin: 2px 10px 10px; font-size: 12px; }
@media (min-width: 860px) {
  .landing { grid-template-columns: 1fr 1fr; gap: 40px; min-height: calc(100vh - 80px); }
  .landing .show { display: block; }
  .door { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .phone { transform: none; } }
.landing > *, .door, .doorcard, form.auth { min-width: 0; }
.stories { margin: 0 0 8px; }
/* phone preview feed: dog, cat, fish, birds, hamster (10-30), scrolling gently in a loop */
.phone .screen { display: flex; flex-direction: column; }
.mfeed { animation: pz-feed 30s linear infinite; }
.phone .screen { overflow: hidden; }
@keyframes pz-feed { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.mpic { height: 130px; font-size: 64px; }
.mpic.g-dog { background: linear-gradient(135deg, #ffe7c2, #f5c58c); }
.mpic.g-cat { background: linear-gradient(135deg, #ece3ff, #cdbcff); }
.mpic.g-fish { background: linear-gradient(135deg, #cdeeff, #8fd0f5); }
.mpic.g-bird { background: linear-gradient(135deg, #fff6c2, #c8f0b8); }
.mpic.g-ham { background: linear-gradient(135deg, #ffe0ea, #ffc3d4); }
@media (prefers-reduced-motion: reduce) { .mfeed { animation: none; } }
.mwin { flex: 1; min-height: 0; overflow: hidden; border-radius: 12px; }
.mtop, .mstories { position: relative; z-index: 1; }

/* ── professional pass (10-30): line icons, initials, real photos ── */
svg.ic { width: 22px; height: 22px; flex: none; vertical-align: middle; }
nav.tabs svg.ic.tab { width: 26px; height: 26px; }
.iconbtn svg.ic { width: 22px; height: 22px; }
.iconbtn.on { color: var(--danger); }
.vis { display: inline-flex; align-items: center; gap: 4px; }
.vis svg.ic, .place svg.ic { width: 15px; height: 15px; }
.place { display: flex; align-items: center; gap: 4px; padding: 0 16px; }
.empty .big svg.ic { width: 44px; height: 44px; color: var(--muted); }
.av.initial { background: linear-gradient(135deg, #e3d9ff, #cfe7ff); color: var(--brand); font-weight: 800; font-size: 18px; }
.av.initial.lg { font-size: 44px; }
.av.initial.sm { font-size: 14px; }
.av svg.ic { width: 18px; height: 18px; color: var(--brand); }
.note.row { gap: 8px; flex-wrap: nowrap; }
.pw .eye { display: inline-grid; place-items: center; color: var(--muted); }
.thumbs .t .x { display: grid; place-items: center; }
.thumbs .t .x svg.ic { width: 16px; height: 16px; }
/* real photos in the circles and the phone preview */
.storypic { overflow: hidden; padding: 0; }
.storypic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mav { overflow: hidden; }
.mav img { width: 100%; height: 100%; object-fit: cover; }
.mpic { height: 150px; overflow: hidden; background: var(--soft); }
.mpic img { width: 100%; height: 100%; object-fit: cover; }
.mft { display: flex; align-items: center; gap: 10px; padding: 8px 10px 0; color: var(--ink); }
.mft svg.ic { width: 18px; height: 18px; }
