:root {
  --yellow: #F7CC2E;
  --yellow-2: #FFE07A;
  --yellow-soft: #FFF6D3;
  --orange: #F0A23B;
  --orange-deep: #D9822B;
  --blue: #41B6F5;
  --blue-deep: #1F8FD1;
  --blue-soft: #E5F5FE;
  --ink: #2B2833;
  --muted: #736E80;
  --line: #D6E9F5;
  --bg: #EAF6FE;   /* light blue page background, same as the iOS app */
  --card: #FFFFFF;
  --green: #2FA36B;
  --green-soft: #E3F6EC;
  --red: #E0524F;
  --red-soft: #FDECEC;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 6px 20px rgba(60, 45, 10, .07);
  --tabbar-h: 64px;
  --font: 'Nunito', system-ui, -apple-system, Segoe UI, sans-serif;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- top bar & tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(234, 246, 254, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none !important; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.5px; color: var(--orange); }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); display: inline-grid; place-items: center; color: var(--ink);
  font-size: 1.15rem; text-decoration: none !important;
}
.icon-btn:hover { background: var(--yellow-soft); }
.icon-btn svg { width: 20px; height: 20px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: #fff; border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .72rem; font-weight: 700; position: relative; text-decoration: none !important;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--ink); }
.tab.active svg { color: var(--orange); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 800;
  display: grid; place-items: center;
}
.badge:empty, .badge[data-n="0"] { display: none; }

main.view { max-width: 980px; margin: 0 auto; padding: 18px 16px calc(var(--tabbar-h) + 32px); }
body.logged-out main.view { padding-bottom: 48px; }

@media (min-width: 900px) {
  .tabbar {
    position: sticky; top: 65px; height: auto; border: 0; background: var(--bg);
    max-width: 980px; margin: 0 auto; padding: 10px 16px; gap: 6px; justify-content: flex-start;
  }
  .tab { flex: 0 0 auto; flex-direction: row; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: .92rem; }
  .tab svg { width: 18px; height: 18px; }
  .tab.active { background: var(--yellow-soft); }
  .badge { position: static; }
  main.view { padding-bottom: 48px; }
}

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 800; font-size: .95rem;
  text-decoration: none !important; transition: transform .06s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #F2C11A; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); }
.btn-sm { padding: 7px 13px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-weight: 800; font-size: .88rem; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local],
input[type=search], input[type=url], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { resize: vertical; min-height: 84px; }
.input-prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.input-prefix span { padding: 0 2px 0 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.input-prefix input { border: 0; box-shadow: none !important; padding-left: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack > * + * { margin-top: 14px; }
.error { color: var(--red); font-weight: 700; font-size: .9rem; min-height: 1.2em; }

input[type=range] { width: 100%; accent-color: var(--orange); }

.seg { display: inline-flex; background: #E4F0F8; border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 800;
  color: var(--muted); font-size: .88rem; text-decoration: none !important;
}
.seg .on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #E3DCCB; position: relative; flex: none; transition: background .15s; cursor: pointer; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 21px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h3 { margin-bottom: .5em; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; }
.empty { text-align: center; padding: 40px 18px; color: var(--muted); }
.empty h3 { color: var(--ink); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: #E4F0F8; font-size: .78rem; font-weight: 800; color: var(--ink); white-space: nowrap;
}
/* a chip that's also a button (Share event, Edit): same size as the chips beside it */
.chip-btn { border: 0; font-family: inherit; line-height: inherit; cursor: pointer; text-decoration: none !important; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.chip-btn:hover { background: var(--yellow-soft); }
.chip-btn svg { width: 14px; height: 14px; }
.chip-blue { background: var(--blue-soft); color: var(--blue-deep); }
.chip-yellow { background: var(--yellow-soft); color: #8A6A00; }
.chip-dark { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* responsiveness badge (anti-ghosting) */
.resp { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.resp-chatty { background: var(--green-soft); color: #1B7A4D; }
.resp-sometimes { background: var(--yellow-soft); color: #8A6A00; }
.resp-quiet { background: var(--red-soft); color: #B23A37; }
.resp-new { background: var(--blue-soft); color: var(--blue-deep); }
.resp-lg { font-size: .92rem; padding: 8px 14px; }

/* ---------- people grid ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.pcard {
  display: block; background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important;
  transition: transform .12s ease;
}
.pcard:hover { transform: translateY(-2px); }
.pcard .ph { position: relative; aspect-ratio: 1; background: var(--yellow-soft); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .dist { position: absolute; left: 8px; bottom: 8px; }
.pcard .body { padding: 10px 12px 12px; }
.pcard .name { font-family: var(--display); font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 6px; }
.pcard .prompt { font-size: .82rem; color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .resp { margin-top: 6px; font-size: .7rem; padding: 3px 8px; }
.going-line { margin-top: 6px; font-size: .75rem; font-weight: 800; color: var(--orange-deep); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--yellow-soft); flex: none; }
.avatars { display: flex; }
.avatars img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -8px; }
.avatars img:first-child { margin-left: 0; }

/* ---------- discover controls ---------- */
.locbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.locbar .where { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.locbar .where small { font-weight: 700; }
.filters { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 640px) { .filters { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
.range-label { display: flex; justify-content: space-between; font-weight: 800; font-size: .88rem; margin-bottom: 4px; }
.range-label b { color: var(--orange-deep); }
.ages { display: flex; align-items: center; gap: 8px; }
.ages input { width: 80px; }


/* ---------- profile ---------- */
.profile { max-width: 560px; margin: 0 auto; }
.p-head { margin: 4px 0 14px; }
.p-head h1 { font-size: 2.2rem; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-weight: 700; font-size: .92rem; margin: 6px 0 10px; }
.p-item { position: relative; margin-bottom: 14px; }
.p-photo { border-radius: var(--radius); overflow: hidden; background: var(--yellow-soft); box-shadow: var(--shadow); }
.p-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.p-prompt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 26px; box-shadow: var(--shadow); }
.p-prompt .q { font-weight: 800; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.p-prompt .a { font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.2; }
.p-bio { background: var(--yellow-soft); border-radius: var(--radius); padding: 16px 18px; font-weight: 600; }
.like-btn {
  position: absolute; right: 14px; bottom: 14px; width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: grid; place-items: center;
  color: var(--orange); transition: transform .1s ease;
}
.like-btn:hover { transform: scale(1.07); }
.like-btn svg { width: 26px; height: 26px; }
.like-count {
  position: absolute; left: 12px; top: 12px; background: rgba(43, 40, 51, .82); color: #fff;
  border-radius: 999px; padding: 5px 11px; font-weight: 800; font-size: .82rem; display: inline-flex; gap: 5px; align-items: center;
}
.p-prompt .like-count { position: static; display: inline-flex; margin-top: 12px; background: var(--yellow-soft); color: #8A6A00; }
.banner {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
  background: var(--yellow-soft); border: 1.5px solid var(--yellow); margin-bottom: 14px;
}
.banner.blue { background: var(--blue-soft); border-color: var(--blue); }
.banner .grow { flex: 1; min-width: 0; }
.sticky-actions {
  position: sticky; bottom: calc(var(--tabbar-h) + 12px); display: flex; justify-content: center; gap: 12px; margin-top: 10px; z-index: 5;
}
@media (min-width: 900px) { .sticky-actions { bottom: 16px; } }
.pass-btn { width: 58px; height: 58px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); font-size: 1.5rem; color: var(--muted); }

/* ---------- likes you ---------- */
.like-item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; }
.like-item .ph img { width: 92px; height: 115px; border-radius: 14px; object-fit: cover; }
.liked-thing { display: flex; gap: 10px; align-items: center; background: #FBF8EF; border-radius: 12px; padding: 8px 10px; margin: 8px 0; font-size: .88rem; }
.liked-thing img { width: 44px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.liked-thing .q { font-weight: 800; color: var(--muted); font-size: .76rem; }
.comment-bubble { background: var(--blue); color: #fff; padding: 9px 13px; border-radius: 16px 16px 16px 4px; font-weight: 700; display: inline-block; max-width: 100%; margin: 4px 0 8px; }

/* ---------- matches & chat ---------- */
.mrow { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; color: var(--ink); text-decoration: none !important; }
.mrow:hover { background: #fff; }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .last { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow.unread .last { color: var(--ink); font-weight: 800; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.new-matches { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; }
.new-matches a { text-align: center; color: var(--ink); font-weight: 800; font-size: .82rem; text-decoration: none !important; }
.new-matches img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid var(--yellow); margin-bottom: 4px; }

.chat { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100dvh - 65px - var(--tabbar-h) - 36px); min-height: 420px; }
@media (min-width: 900px) { .chat { height: calc(100dvh - 65px - 58px - 50px); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-head .name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.msgs { flex: 1; overflow-y: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 9px 14px; border-radius: 18px 18px 18px 5px; background: #fff; border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--yellow); border-color: var(--yellow); border-radius: 18px 18px 5px 18px; }
.msg-time { font-size: .7rem; color: var(--muted); align-self: center; margin: 8px 0 2px; font-weight: 700; }
.starter { background: #FBF8EF; border-radius: 16px; padding: 12px 14px; font-size: .88rem; margin-bottom: 6px; }
.starter .liked-thing { background: #fff; }
.composer { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.composer textarea { min-height: 46px; height: 46px; max-height: 140px; border-radius: 23px; padding: 11px 16px; }
.composer .btn { flex: none; }

/* ---------- events ---------- */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ecard { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 16px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; }
.ecard:hover { border-color: var(--yellow); }
.ecard .top { display: flex; gap: 12px; align-items: flex-start; }
.ecat { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; flex: none; background: var(--yellow-soft); }
.ecard h3 { margin: 0; font-size: 1.15rem; }
.ecard .when { color: var(--orange-deep); font-weight: 800; font-size: .85rem; }
.ecard .where { color: var(--muted); font-size: .85rem; font-weight: 700; }
.ecard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.singles { font-weight: 800; font-size: .85rem; }

.event-hero { background: linear-gradient(135deg, var(--blue-soft), #FFFFFF 60%, var(--blue-soft)); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.event-hero h1 { font-size: 2rem; }
.event-meta { display: grid; gap: 8px; margin: 12px 0 16px; font-weight: 700; }
.event-meta div { display: flex; gap: 10px; align-items: center; }
.post { display: flex; gap: 12px; padding: 14px 0; }
.thread + .thread > .post:not(.reply) { border-top: 1px solid var(--line); }
.post .grow { flex: 1; min-width: 0; }
.post .who { font-weight: 800; color: var(--ink); }
.post img.photo { border-radius: 14px; margin-top: 8px; max-height: 420px; object-fit: cover; width: 100%; }
.post-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
/* every control under a post or reply is the same size: upvote, Reply, Like, Delete/Remove, Restrict, Report and the status chips */
.post-actions > .btn, .post-actions > .vote-btn, .post-actions > .chip {
  box-sizing: border-box; height: 32px; padding: 0 12px; gap: 5px; border-radius: 999px;
  font-size: .82rem; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.post-actions > .btn svg, .post-actions > .vote-btn svg { width: 16px; height: 16px; flex: none; }
/* replies nest under their post a little at a time; past 4 levels they stop indenting so deep threads stay readable on phones */
.replies { margin-left: 12px; padding-left: 8px; border-left: 2px solid var(--line); }
.replies.flat { margin-left: 0; padding-left: 0; border-left: 0; }
.post.reply { padding: 10px 0 4px; gap: 10px; }
.reply-form { margin-top: 8px; }
.post-sort { gap: 8px; align-items: center; justify-content: flex-end; margin: 14px 0 -4px; }
.post-sort select { padding-top: 6px; padding-bottom: 6px; }
/* upvote: a chevron pointing up, with the count */
.vote-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); font: 800 .85rem/1 var(--font); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.vote-btn:hover { border-color: #41B6F5; color: #1E8FD0; }
.vote-btn.on { background: #E3F4FD; border-color: #41B6F5; color: #1E8FD0; }
.vote-btn.mine { cursor: default; background: transparent; }
.vote-btn.mine:hover { border-color: var(--line); color: var(--muted); }
.more-replies { display: block; margin: 2px 0 8px 42px; font-weight: 800; font-size: .85rem; }
.reply-form textarea { min-height: 0; }
.attendee { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
/* host & admin tools on an event */
.host-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.switch-row, .check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.switch-row input, .check-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.check-row { padding: 10px 0; border-top: 1px solid var(--line); }
.check-row:first-of-type { border-top: 0; }
.restricted-list summary { cursor: pointer; font-weight: 800; }
.restricted-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.restricted-row a { font-weight: 800; color: var(--ink); }
.restricted-row .grow { flex: 1; min-width: 0; }
.report-target { margin: 6px 0; padding: 8px 10px; border-radius: 12px; background: #F7F3E8; display: grid; gap: 6px; justify-items: start; }
.report-target blockquote { margin: 0; padding-left: 10px; border-left: 3px solid var(--line); white-space: pre-wrap; }
.block-names { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.block-names .row { flex-wrap: nowrap; gap: 8px; }
.block-names input { flex: 1; min-width: 0; }
.posts-locked { padding: 18px 16px; }
.attendees { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.attendees a { text-align: center; color: var(--ink); font-weight: 800; font-size: .8rem; text-decoration: none !important; }
.attendees img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 4px; border: 2px solid var(--yellow); }
.photo-pick { display: flex; align-items: center; gap: 10px; }
.photo-pick img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }

/* ---------- my profile editor ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-slot { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #FBF8EF; border: 2px dashed var(--line); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .like-count { left: 6px; top: 6px; font-size: .74rem; padding: 3px 8px; }
.photo-slot .ops { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.photo-slot .ops button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: .9rem; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.photo-slot.add { display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 800; text-align: center; }
.photo-slot.add:hover { border-color: var(--orange); color: var(--orange-deep); }
.prompt-edit { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; background: #fff; }
.prompt-edit .q { font-weight: 800; color: var(--muted); font-size: .85rem; }
.prompt-edit .a { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin: 4px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #FBF8EF; border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 1.6rem; }
.stat span { font-size: .78rem; font-weight: 800; color: var(--muted); }

/* ---------- QR ---------- */
.qr-card { max-width: 400px; margin: 0 auto; text-align: center; background: #fff; border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; }
.qr-card canvas { width: 100%; max-width: 340px; height: auto; margin: 6px auto 12px; display: block; image-rendering: pixelated; }
.qr-url { font-weight: 800; word-break: break-all; background: var(--blue-soft); color: var(--blue-deep); border-radius: 12px; padding: 8px 12px; font-size: .9rem; }

.scanner { position: relative; max-width: 460px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #111; aspect-ratio: 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16%; border: 4px solid var(--blue); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
/* the Start camera button and any message sit together in the middle of the box (always visible); once the
   camera is live, the message moves to the bottom so it doesn't cover the view */
.scan-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 0 22%; text-align: center; }
.scanner.live .scan-center { justify-content: flex-end; padding: 0 16px 14px; }
.scan-msg { color: #fff; font-weight: 800; font-size: .92rem; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scan-msg:empty { display: none; }

/* ---------- modal, toast, call ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(30, 25, 10, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 24px; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .18s ease; }
.modal .liked-thing { margin-top: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.match-celebrate { text-align: center; }
.match-celebrate .pair { display: flex; justify-content: center; margin: 10px 0 14px; }
.match-celebrate .pair img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid var(--yellow); }
.match-celebrate .pair img + img { margin-left: -18px; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 800; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 80; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; }

.call { position: fixed; inset: 0; z-index: 70; background: #15131a; display: flex; flex-direction: column; }
.call .remote { flex: 1; width: 100%; height: 100%; object-fit: cover; background: #15131a; }
.call .local { position: absolute; right: 16px; top: 16px; width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255,255,255,.6); background: #000; transform: scaleX(-1); }
.call .status { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: #fff; font-weight: 800; font-size: 1.2rem; }
.call .status img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 4px solid var(--yellow); }
.call .controls { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 16px; }
.call .controls button { width: 60px; height: 60px; border-radius: 50%; border: 0; font-size: 1.4rem; background: rgba(255,255,255,.18); color: #fff; }
.call .controls button.off { background: #fff; color: var(--ink); }
.call .controls .hang { background: var(--red); }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; padding: 26px 0 10px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.hero img { width: 100%; max-width: 440px; margin: 0 auto; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero .row { justify-content: center; } .hero img { max-width: 280px; order: -1; } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 30px; }
.feature { background: #fff; border-radius: 22px; padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 12px; }
.feature ul { padding-left: 18px; margin: 8px 0 0; color: var(--muted); font-weight: 600; }
.feature li { margin-bottom: 6px; }
.auth { max-width: 440px; margin: 10px auto; }
.auth .logo { width: 120px; margin: 0 auto 6px; }
footer.site { text-align: center; color: var(--muted); font-size: .85rem; padding: 30px 0 0; }

/* the chick art ships on white — let it sit on the cream background */
.brand img, .hero img, .empty img, .auth .logo, .qr-card > img { mix-blend-mode: multiply; }

/* ---------- protected photos (painted as backgrounds; never an <img> you can copy) ---------- */
.pic {
  display: block; flex: none; background: var(--yellow-soft) center / cover no-repeat;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none;
}
.pic[data-logo] { background-image: url(/static/img/flockin-chicks.png); background-size: 86%; background-color: var(--yellow-soft); }
.pic.loading { animation: shimmer 1.2s ease-in-out infinite alternate; }
@keyframes shimmer { from { background-color: var(--yellow-soft); } to { background-color: #FBEFC0; } }
.pic.fill { width: 100%; height: 100%; aspect-ratio: 1; }
.pic.avatar { border-radius: 50%; }
.pic.round { border-radius: 50%; }
.pic.thumb { width: 54px; height: 54px; border-radius: 10px; }
.pic.av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; }
.avatars .pic.av:first-child { margin-left: 0; }
.p-photo .pic.fill { aspect-ratio: 1; }
.like-item .ph .pic { width: 92px; height: 92px; border-radius: 14px; }
.new-matches .pic.round { width: 68px; height: 68px; border: 3px solid var(--yellow); margin: 0 auto 4px; }
.attendees .pic.round { width: 64px; height: 64px; border: 2px solid var(--yellow); margin: 0 auto 4px; }
.match-celebrate .pair .pic.round { width: 96px; height: 96px; border: 4px solid var(--yellow); }
.match-celebrate .pair .pic.round + .pic.round { margin-left: -18px; }
.call .status .pic.round { width: 110px; height: 110px; border: 4px solid var(--yellow); margin: 0 auto 12px; }
.pic.post-photo { border-radius: 14px; margin-top: 8px; max-width: 420px; height: auto; }
.event-meta .pic.avatar { display: inline-block; }
.photo-pick .pic.thumb { width: 56px; height: 56px; }
.hint.ok { color: var(--green); }
.hint.bad { color: var(--red); }

/* ---------- crop page ---------- */
body.no-scroll { overflow: hidden; }
.cropper {
  position: fixed; inset: 0; z-index: 90; background: #17151c; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto; animation: fade .15s ease;
}
.crop-top { width: 100%; max-width: 560px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crop-top h2 { margin: 0; font-size: 1.25rem; color: #fff; text-align: center; flex: 1; }
.crop-top .crop-cancel { color: #fff; border-color: rgba(255,255,255,.25); }
.crop-help { margin: 0; color: rgba(255,255,255,.7); font-size: .88rem; text-align: center; max-width: 520px; }
.crop-stage {
  position: relative; width: min(100%, 520px, calc(100dvh - 260px)); aspect-ratio: 1; min-width: 220px;
  overflow: hidden; border-radius: 6px; background: #000; touch-action: none; cursor: grab; outline: none;
  box-shadow: 0 0 0 3px var(--yellow), 0 20px 60px rgba(0,0,0,.5);
}
.crop-stage:active { cursor: grabbing; }
.crop-stage:focus-visible { box-shadow: 0 0 0 3px var(--blue), 0 20px 60px rgba(0,0,0,.5); }
.crop-img { position: absolute; left: 0; top: 0; background-size: 100% 100%; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% + .5px), transparent calc(33.33% + .5px),
                    transparent calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% + .5px), transparent calc(33.33% + .5px),
                    transparent calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.crop-zoom { display: flex; align-items: center; gap: 12px; width: min(100%, 420px); font-weight: 800; font-size: 1.2rem; color: rgba(255,255,255,.8); }
.crop-actions { display: flex; gap: 10px; }
.crop-actions .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- onboarding (photo + location required) ---------- */
.onboard { max-width: 520px; margin: 0 auto; }
.onboard .logo { width: 110px; margin: 0 auto 4px; mix-blend-mode: multiply; }
.steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.step { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.step.current { border-color: var(--orange); }
.step.done { background: var(--green-soft); border-color: transparent; box-shadow: none; }
.step.locked { opacity: .6; }
.step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.step-head h3 { margin: 2px 0 2px; }
.step-head p { margin: 0; }
.step .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--yellow); }
.step.done .num { background: var(--green); color: #fff; }

/* ---------- profile details ---------- */
.p-details { margin: 0 0 10px; }
.pcard .looking { margin-top: 4px; font-size: .74rem; font-weight: 800; color: #B23A6A; }

/* ---------- "looking to date" filter ---------- */
.looking-filter { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.looking-filter .chips { margin: 4px 0 6px; }
.chip-toggle {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 6px 12px; font-weight: 800; font-size: .82rem;
}
.chip-toggle:hover { border-color: var(--orange); }
.chip-toggle[aria-pressed="true"] { background: var(--yellow-soft); border-color: var(--orange); color: #8A5A00; }
.chip-toggle[aria-pressed="true"]::before { content: '✓ '; }
.link-btn { border: 0; background: none; color: var(--blue-deep); font-weight: 800; font-size: .82rem; padding: 0; }

/* ---------- profile: info docked above the tab bar, photos & text scroll above it ---------- */
.profile { display: flex; flex-direction: column; }
.p-info {
  position: sticky; z-index: 6;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  margin-top: 14px; padding: 14px 16px 12px;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 -6px 24px rgba(60, 45, 10, .12), 0 2px 6px rgba(60, 45, 10, .06);
}
body.logged-out .p-info { bottom: 12px; }
@media (min-width: 900px) { .p-info { bottom: 16px; } }
.p-info-main { display: flex; align-items: flex-start; gap: 12px; }
.p-info-main .grow { flex: 1; min-width: 0; }
.p-name { font-size: 1.7rem; margin: 0 0 2px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p-age { font-weight: 700; color: var(--muted); font-size: 1.3rem; }
.p-info .p-facts { margin: 0; font-size: .84rem; gap: 2px 12px; }
.p-info .pass-btn { width: 50px; height: 50px; font-size: 1.3rem; flex: none; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
/* detail chips stay on one swipeable line until "More" is opened */
.chip-scroll { position: relative; margin: 10px -16px 0; }
.p-info .p-details { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0; padding: 0 16px 2px; }
.p-info .p-details::-webkit-scrollbar { display: none; }
.p-info.open .p-details { flex-wrap: wrap; overflow: visible; }
/* see-through scroll arrows over the chip row, like a "trending" carousel */
.chip-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; padding: 0 0 2px;
  display: grid; place-items: center; cursor: pointer;
  font: 700 1.1rem/1 var(--font); color: var(--ink);
  background: rgba(255, 255, 255, .25); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(43, 40, 51, .08); box-shadow: none;
  text-shadow: 0 0 4px #fff; transition: background .15s;
}
.chip-arrow:hover { background: rgba(255, 255, 255, .6); }
.chip-arrow.left { left: 6px; }
.chip-arrow.right { right: 6px; }
.chip-arrow[hidden] { display: none; }
.p-info.open .chip-arrow { display: none; }
.p-info-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }

/* ---------- six-tab bottom bar with QR in the middle ---------- */
.tabbar .tab span { white-space: nowrap; }
@media (max-width: 899px) {
  .tab-qr svg { width: 28px; height: 28px; color: var(--blue-deep); }
  .tab-qr.active svg { color: var(--blue-deep); }
}

/* ---------- QR page: my code above, scanner below ---------- */
.qr-page { max-width: 460px; margin: 0 auto; display: grid; gap: 18px; }
.qr-page h1 { margin-bottom: 0; }
.qr-page section { scroll-margin-top: 80px; }
.scan-card .scanner { margin-top: 6px; }
.scan-start { position: static; flex: none; }
.scan-start[hidden] { display: none; }

/* ---------- reports & moderation ---------- */
.radio { display: flex; gap: 10px; align-items: center; font-weight: 700; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--orange); background: var(--yellow-soft); }
.report-reasons > * + * { margin-top: 6px; }
.icon-admin { color: var(--blue-deep); }
.chip-danger { background: var(--red-soft); color: #B23A37; }
.chip-green { background: var(--green-soft); color: #1B7A4D; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.banner.danger { background: var(--red-soft); border-color: var(--red); }
.admin { max-width: 860px; margin: 0 auto; }
.admin h1 svg { width: 26px; height: 26px; vertical-align: -3px; color: var(--blue-deep); }
.admin-stats { margin-top: 14px; }
.admin-row { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; color: var(--ink); text-decoration: none !important; }
.admin-row:hover { border-color: var(--orange); }
.admin-row .grow { flex: 1; min-width: 0; }
.admin-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }
.admin-report.open { border-left: 4px solid var(--red); }
.admin-report.resolved, .admin-report.dismissed { opacity: .7; }
.admin-post .grow { min-width: 0; overflow-wrap: anywhere; }
.audit { padding: 8px 0; border-top: 1px solid var(--line); }
.audit:first-child { border-top: 0; }
@media (max-width: 640px) { .admin-stats[style] { grid-template-columns: repeat(3, 1fr) !important; } }

/* ---------- admin dashboard ---------- */
.dash-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.dash-label { display: flex; gap: 8px; align-items: center; font-weight: 800; color: var(--muted); font-size: .9rem; }
.dash-label span { font-size: 1.2rem; }
.dash-week { display: flex; align-items: baseline; gap: 8px; }
.dash-week b { font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.dash-week span { color: var(--muted); font-weight: 700; font-size: .85rem; }
.delta { font-size: .78rem; font-weight: 800; color: var(--muted); }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.dash-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: .9rem; }
.dash-total span { color: var(--muted); font-weight: 700; }
.dash-settings { margin-top: 16px; }
.dash-time { margin-top: 14px; padding-left: 58px; gap: 18px; align-items: flex-end; }
.dash-time.off { opacity: .5; }
.dash-time input[type=time] { width: 140px; }
@media (max-width: 640px) { .dash-time { padding-left: 0; } }

/* ---------- home QR icon, visibility choice, blocked & muted list ---------- */
/* same 52px box as the other feature icons */
.feature .ic.ic-qr { padding: 4px; background: #fff; border: 1.5px solid #CDEBFC; }
.feature .ic.ic-qr canvas { width: 100%; height: 100%; display: block; }
/* icon and title side by side */
.feature-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.feature-head .ic { margin-bottom: 0; flex: none; }
.feature-head h2 { margin: 0; }
/* hero illustration has its own background — don't blend it like the chick logo */
.hero img.hero-art { mix-blend-mode: normal; max-width: 520px; height: auto; border-radius: 28px; box-shadow: 0 12px 40px rgba(201, 113, 138, .25); }
@media (max-width: 720px) { .hero img.hero-art { max-width: 100%; } }
.radio.vis { align-items: flex-start; }
.radio.vis input { margin-top: 4px; }
.bm-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bm-row .grow { flex: 1; min-width: 0; }

/* ---------- profile order editor ---------- */
.arrange { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.arr-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: grab; }
.arr-item.main { border-color: var(--yellow); background: var(--yellow-soft); }
.arr-item.dragging { opacity: .45; }
.arr-item.over { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 162, 59, .2); }
.arr-item .grow { flex: 1; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.arr-item .pic.thumb { width: 46px; height: 46px; }
.arr-ic { width: 46px; height: 46px; border-radius: 10px; background: #FBF8EF; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.grip { color: var(--muted); font-weight: 800; letter-spacing: -2px; user-select: none; }
.arr-btns { display: flex; gap: 4px; flex: none; }
.arr-btns button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 800; }
.arr-btns button:disabled { opacity: .3; cursor: not-allowed; }

/* ---------- home photo, terms ---------- */
.hero-photo { margin: 0; }
.hero-photo .hero-art { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; border-radius: 28px; box-shadow: 0 12px 40px rgba(60, 45, 10, .18); }
.hero-photo figcaption { font-size: .72rem; color: var(--muted); margin-top: 6px; text-align: right; max-width: 560px; }
footer.site a { color: var(--muted); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; font-weight: 600; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--orange); flex: none; }
.terms-check { margin: 4px 0 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.legal { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.legal h2 { margin-top: 1.4em; padding-top: .4em; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.legal section:first-of-type h2 { border-top: 0; }
.legal h3 { margin-top: 1.2em; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .caps { text-transform: uppercase; font-size: .8rem; letter-spacing: .01em; }
.legal-toc { font-weight: 800; }
section[id] { scroll-margin-top: 80px; }
@media (max-width: 720px) { .hero-photo { order: -1; } .hero-photo figcaption { text-align: center; } }

/* ---------- cookie banner (floating card, like criticwave.com) ---------- */
.cookie-banner {
  position: fixed; z-index: 75; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  max-width: 520px; margin: 0 auto; padding: 16px 18px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 34px rgba(30, 25, 10, .18);
  animation: pop .2s ease;
}
body.logged-out .cookie-banner { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .cookie-banner { bottom: 20px; left: auto; right: 20px; margin: 0; } }
.cookie-banner p { margin: 0 0 12px; font-size: .95rem; }
.cookie-actions { display: flex; gap: 10px; align-items: center; }
.cookie-banner.leaving { opacity: 0; transform: translateY(10px); transition: all .2s ease; }

/* ---------- home: testimonials ---------- */
/* gold panel around the whole testimonials section */
.testimonials {
  margin-top: 40px; padding: 28px 20px 24px; border-radius: 28px;
  background: linear-gradient(135deg, #E8B12A 0%, #D4961A 50%, #B87A12 100%);
  border: 1px solid #A86D0E;
  box-shadow: 0 12px 32px rgba(150, 95, 5, .35), inset 0 1px 0 rgba(255, 236, 170, .55);
}
.testimonials h2 { font-size: 1.8rem; margin-bottom: 18px; color: var(--ink); }
.testimonials .t-card { border-color: rgba(255, 255, 255, .7); box-shadow: 0 6px 18px rgba(110, 70, 0, .28); }
.testimonials .t-avatar { border-color: #FFF3C4; box-shadow: 0 0 0 1px #C48A16; }
@media (min-width: 720px) { .testimonials { padding: 36px 32px 32px; } }
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.t-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.t-card blockquote { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.5; flex: 1; }
.t-card figcaption { display: flex; align-items: center; gap: 12px; }
.t-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--yellow-soft); box-shadow: 0 0 0 1px var(--line); }
.t-initial { display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }

/* ---------- profile order = the profile editor ---------- */
.arr-item { align-items: flex-start; }
.arr-item .grip, .arr-item .arr-btns { align-self: center; }
.pic.arr-photo { width: 64px; height: 64px; border-radius: 12px; }
.arr-likes { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 800; color: #8A6A00; background: var(--yellow-soft); border-radius: 999px; padding: 2px 8px; }
.arr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.arr-actions button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 800; color: var(--ink); }
.arr-actions button:hover { border-color: var(--orange); }
.arr-actions button.danger { color: var(--red); }
.arr-add { margin-top: 12px; }

/* "No prompt" text items on a profile */
.p-prompt.p-text .a { font-family: var(--font); font-weight: 600; font-size: 1.15rem; line-height: 1.45; }

/* "Use my current location" inside Pick city */
.here-btn { margin-bottom: 10px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; font-weight: 800; margin: 2px 0 10px; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* admin: locked accounts */
.admin-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 480px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
.locked-row { align-items: flex-start; }

/* ---------- Discover: one person at a time; filters (location + radius + ages + looking) in one panel behind a button */
.discover-filters { margin-top: 12px; display: grid; gap: 16px; }
.discover-filters[hidden] { display: none; }
.discover-filters .filter-loc { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.discover-filters .filters { margin: 0; }
.discover-count { margin-bottom: 8px; }
.discover-head .row { flex-wrap: nowrap; }
.discover-filters .looking-filter { margin-top: 0; }
/* "How you matched": what each person liked about the other */
.match-likes { display: grid; gap: 10px; margin-top: 10px; text-align: left; }
.match-likes .ml-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.match-likes .ml-label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.match-likes .liked-thing { margin: 6px 0 2px; background: #FBF8EF; }
.match-likes .comment-bubble { margin: 6px 0 2px; }
.match-likes .ml-side:nth-child(2) .comment-bubble { background: var(--yellow); color: var(--ink); border-radius: 16px 16px 4px 16px; }
@media (min-width: 640px) { .match-likes { grid-template-columns: 1fr 1fr; } }
.match-celebrate .match-likes { margin: 4px 0 14px; }
/* Likes You: one person at a time */
.likes-bar { margin: 12px 0 8px; }
/* Pass sits with Share / Mute / Report / Block under the profile */
.pass-inline { font-weight: 800; }
/* "It's a match!" confetti: above the dialog, but taps go through to it */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 80; pointer-events: none; }
/* chat header: ♥ opens what you liked about each other */
.liked-btn { color: var(--orange); }
.liked-btn svg { fill: currentColor; }
/* chat photos: shown at their own shape, never cropped */
.msg.has-photo { padding: 5px; white-space: normal; }
.msg.has-photo .msg-text { white-space: pre-wrap; }
.msg.has-photo .msg-text { padding: 5px 9px 4px; }
.msg.photo-only { background: transparent; border-color: transparent; padding: 0; }
.chat-photo-btn { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pic.chat-photo { display: block; max-width: 100%; height: auto; border-radius: 14px; background-size: contain; background-repeat: no-repeat; background-position: center; background-color: #E4F0F8; }
.attach-btn { flex: none; font-size: 1.15rem; align-self: center; }
/* a photo waiting to be sent sits in the message bar, in place of the text box */
.composer-photo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 4px 14px 4px 4px;
  border: 1px solid var(--line); border-radius: 23px; background: #fff; }
.composer-photo[hidden], .composer textarea[hidden] { display: none; }
.composer-photo .pic.chat-photo { width: auto; flex: none; border-radius: 19px; }
.composer-photo .grow { flex: 1; }
/* Discover word filters */
.word-add { flex-wrap: nowrap; gap: 8px; margin: 4px 0 6px; }
.word-add input { flex: 1; min-width: 0; }
.word-chip { gap: 6px; padding-right: 4px; }
.word-chip button { border: 0; background: rgba(0,0,0,.08); border-radius: 50%; width: 18px; height: 18px; font-size: .65rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.word-chips:empty { display: none; }
/* sample profiles: always visibly labeled */
.sample-chip { background: #1E8FD0; color: #fff; font-size: .7rem; align-self: center; }
/* admin: sample profiles */
.sample-list { display: grid; gap: 10px; margin-top: 12px; }
.sample-row { display: flex; gap: 12px; align-items: flex-start; }
.sample-row .grow { flex: 1; min-width: 0; }
.sample-row .pic.thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.sample-row.inactive { opacity: .6; }
.discover-count.row-between { flex-wrap: nowrap; align-items: center; gap: 8px; }
.email-step { gap: 8px; margin-top: 8px; }
.email-step input { flex: 1; min-width: 0; }
/* admin review: events and chats */
.review-card { display: block; margin-bottom: 10px; }
a.review-card, a.review-card:hover { color: var(--ink); text-decoration: none !important; }
a.chat-row:hover { border-color: #F2C11A; }
.admin-msgs { display: grid; gap: 8px; margin-top: 12px; }
.admin-msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.admin-msg.is-new { border-color: #F2C11A; background: #FFFBEA; }
/* video calls: "started / ended" line in chat, and the time left on the call screen */
.msg.call-msg { background: #EEF6FD; border-color: #A9DDF9; color: #1E6E9C; font-weight: 700; font-size: .9rem; }
.msg.call-msg.mine { background: #FFF6D6; border-color: #F2C11A; color: var(--ink); }
.call-timer { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3; color: #fff; font-weight: 800; font-size: .85rem;
  background: rgba(0,0,0,.45); padding: 4px 12px; border-radius: 999px; }
.call-timer:empty { display: none; }
/* a post from a banned account: hidden, but its replies stay */
.post.removed .removed-note { font-style: italic; color: var(--muted); font-size: .9rem; padding: 4px 0; }

/* Bump it (daily limits): the prompt, the page and the Settings card */
.bump-hero { font-size: 2.6rem; line-height: 1; text-align: center; margin-bottom: 6px; }
.modal .bump-hero + h2 { text-align: center; }
.bump-perks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.bump-perks li { background: var(--blue-soft); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.bump-usage { display: grid; gap: 4px; margin: 0 0 12px; }

/* The site ad: bottom of every page, logged-in members only */
.site-card { max-width: 980px; margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + 32px); }
.site-card[hidden] { display: none; }
body.has-sc main.view { padding-bottom: 16px; }
.sc-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sc-label { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sc-box > a, .sc-box > .pic, .sc-box > iframe { width: 100%; }
.sc-box > a { display: block; }
.pic.sc-img { display: block; width: 100%; height: auto; margin: 0 auto; border-radius: 12px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.sc-frame { display: block; width: 100%; border: 0; border-radius: 12px; background: transparent; }
@media (min-width: 900px) { .site-card { padding-bottom: 48px; } }
