/* User app screens. Tokens only (see shared/ui/base.css). */

/* ---------- Chats: layout ---------- */
.split.has-detail .split-list {
  display: none;
}
.split.has-detail .split-detail {
  display: block;
}
.shell.in-thread .nav {
  display: none;
}
.shell.in-thread .shell-main {
  padding-bottom: 0;
}
@media (min-width: 900px) {
  .split.has-detail .split-list {
    display: block;
  }
  .split.has-detail .split-detail {
    display: block;
  }
  .split-list {
    height: 100dvh;
    overflow-y: auto;
  }
  .shell.in-thread .nav {
    display: flex;
  }
}

/* ---------- Chat list ---------- */
.convs {
  display: grid;
  gap: 2px;
  margin: 0 calc(-1 * var(--s2));
  padding: 0;
  list-style: none;
}
.conv {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.conv:hover {
  background: var(--surface-2);
}
.conv.current {
  background: var(--brand-soft);
}
.conv-main {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.conv-top,
.conv-bottom {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}
.conv-name {
  flex: 1;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv-time {
  flex: none;
  color: var(--ink-2);
  font-size: 0.8rem;
}
.conv-preview {
  flex: 1;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv.unread .conv-preview {
  color: var(--ink);
  font-weight: 600;
}
.matches {
  margin-bottom: var(--s4);
}
.matches .section-title {
  margin-top: 0;
}
.matches-strip {
  display: flex;
  gap: var(--s4);
  margin: 0 calc(-1 * var(--s4));
  padding: var(--s1) var(--s4);
  overflow-x: auto;
  scrollbar-width: none;
}
.match {
  display: grid;
  justify-items: center;
  gap: var(--s1);
  width: 72px;
  flex: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.match span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match .avatar {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand);
}

/* ---------- Thread ---------- */
.thread {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg);
}
.thread-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 60px;
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s3) var(--s2);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.thread-person {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.thread-name {
  flex: 1;
  margin: 0;
  overflow: hidden;
  font-size: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .thread-back {
    display: none;
  }
  .thread-head {
    padding-left: var(--s5);
  }
}
.thread-body {
  flex: 1;
  padding: var(--s4) var(--s4) var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.thread-error {
  text-align: center;
}
.thread-start {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  margin: var(--s5) auto;
  max-width: 320px;
  color: var(--ink-2);
  text-align: center;
}
.older {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s3);
}
.day-label {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s4) 0 var(--s3);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}
.day-label::before,
.day-label::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--s2);
}
.msg.mine {
  align-items: flex-end;
}
.msg.system {
  align-items: center;
}
.bubble-msg {
  max-width: min(78%, 520px);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  cursor: default;
}
.mine .bubble-msg {
  border-color: transparent;
  border-radius: 18px 18px 6px 18px;
  background: var(--brand);
  color: var(--brand-ink);
}
.bubble-msg.selected {
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.bubble-msg.deleted {
  background: transparent;
  color: var(--ink-2);
  font-style: italic;
}
.failed .bubble-msg {
  opacity: 0.6;
}
.msg-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-quote {
  margin: 0 0 var(--s1);
  padding-left: var(--s2);
  border-left: 3px solid currentColor;
  font-size: 0.85rem;
  opacity: 0.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msg-caption {
  margin: 0 var(--s1) var(--s1);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}
.msg-meta {
  margin: 2px var(--s1) 0;
  color: var(--ink-2);
  font-size: 0.72rem;
}
.msg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s1);
}
.msg-confirm {
  font-size: 0.85rem;
  color: var(--ink-2);
}
.icebreakers {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s4);
}
.icebreakers .section-title {
  margin: 0;
}
.icebreaker {
  display: grid;
  gap: 2px;
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.icebreaker:hover {
  background: var(--brand-soft);
}
.icebreaker-label {
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Composer (pinned above the keyboard) ---------- */
.composer-wrap {
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: var(--s2);
}
.composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  padding: 10px var(--s4);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  resize: none;
}
.composer textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.send-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  cursor: pointer;
  transition: opacity var(--ease);
}
.send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.reply-bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
  padding-left: var(--s3);
  border-left: 3px solid var(--brand);
}
.reply-text {
  flex: 1;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.locked-note {
  margin: var(--s2) 0;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Profile: onboarding, edit, card ---------- */
/* Text over photos stays light on a dark shade in both themes: photos are not themed. */
:root {
  --on-photo: #fff;
  --photo-shade: #000;
}
.grow {
  flex: 1;
  min-width: 0;
}
.small {
  font-size: 0.85rem;
}
.btn-sm {
  min-height: 40px;
  padding: 0 var(--s4);
  font-size: 0.9rem;
}
.field textarea {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
.field textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.notice {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-2);
}
.notice-warn {
  background: color-mix(in srgb, var(--warn) 14%, var(--surface));
  color: var(--ink);
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s3);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.chips-stack {
  flex-direction: column;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}
.chips-stack .chip {
  justify-content: flex-start;
  min-height: var(--tap);
  border-radius: var(--radius);
}
.chip[aria-pressed='true'] {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
.chip:disabled {
  opacity: 0.45;
  cursor: default;
}
.switch-row {
  margin-top: var(--s2);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  max-width: 480px;
}
.photo-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-badge {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  padding: 2px var(--s2);
  border-radius: var(--pill);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.photo-tools {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: var(--s1);
  background: linear-gradient(transparent, color-mix(in srgb, var(--photo-shade) 45%, transparent));
}
.photo-tools .icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  color: var(--on-photo);
}
.photo-tools .icon-btn:disabled {
  visibility: hidden;
}
.photo-slot-add,
.photo-slot-busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  border: 2px dashed var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
  cursor: pointer;
}
.photo-slot-add:hover,
.photo-slot-add:focus-within {
  border-color: var(--brand);
  color: var(--brand-text);
}

.prompt-editor {
  display: grid;
  gap: var(--s3);
}
.prompt-card {
  position: relative;
  padding: var(--s4) var(--s5);
}
.prompt-q {
  margin: 0 0 var(--s1);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.prompt-a {
  margin: 0;
  white-space: pre-line;
}
.prompt-editor .prompt-card {
  padding-right: 96px;
}
.prompt-actions {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  display: flex;
}

.li-label,
.li-value {
  display: block;
}
.li-label {
  font-size: 0.8rem;
  color: var(--ink-2);
}
.me-actions {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s3);
}
.me-actions .btn {
  flex: 1;
  padding: 0 var(--s4);
  white-space: nowrap;
}

.profile-card {
  display: grid;
  gap: var(--s3);
}
.pc-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.pc-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80dvh;
  object-fit: cover;
}
.pc-name {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: var(--s7) var(--s5) var(--s4);
  background: linear-gradient(transparent, color-mix(in srgb, var(--photo-shade) 55%, transparent));
  color: var(--on-photo);
}
.pc-name h2 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  font-size: 1.8rem;
}
.pc-name .pc-age {
  font-weight: 400;
}
.pc-name p {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin: var(--s1) 0 0;
}
.pc-answer {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.3;
}
.pc-opening {
  margin-bottom: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
}
.pc-opening .prompt-a {
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s1) var(--s3);
  border-radius: var(--pill);
  background: var(--surface-2);
  font-size: 0.9rem;
}

.onboarding {
  min-height: 100dvh;
}
.onb-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) var(--s3);
  background: var(--bg);
}
.progress {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: var(--pill);
  background: var(--surface-2);
}
.progress span {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--brand);
  transition: width var(--ease);
}
.onb-main {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s4) var(--s4) var(--s7);
}
.onb-step h1 {
  margin: var(--s2) 0 var(--s2);
}
.onb-step > .muted {
  margin-top: 0;
}
.onb-done {
  display: grid;
  gap: var(--s4);
  padding-top: 20dvh;
  text-align: center;
}
.profile-page .profile-card,
.profile-page .notice {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
}

/* ---------- Discover, likes, match ---------- */
.discover-page .profile-card,
.likes-page .profile-card {
  max-width: 560px;
  margin: 0 auto;
}
.discover-page {
  padding-bottom: calc(var(--s7) * 2);
}
.like-btn {
  position: absolute;
  right: var(--s3);
  bottom: var(--s3);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--brand-text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--ease);
}
.like-btn:active {
  transform: scale(0.94);
}
.pc-photo .like-btn {
  bottom: auto;
  top: var(--s3);
}
.like-btn-card {
  width: 44px;
  height: 44px;
}
.prompt-card:has(.like-btn) {
  padding-right: 72px;
}
.discover-actions {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--s3) + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: var(--s6);
  margin-top: var(--s4);
  pointer-events: none;
}
@media (min-width: 900px) {
  .discover-actions {
    bottom: var(--s5);
  }
}
/* The "inline" Discover layout (A/B experiments): the buttons follow the profile instead of floating. */
.discover-actions.discover-actions-inline {
  position: static;
  margin-top: var(--s5);
  pointer-events: auto;
}
.round-btn {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  pointer-events: auto;
  transition: transform var(--ease);
}
.round-btn:active:not(:disabled) {
  transform: scale(0.94);
}
.round-btn-like {
  border-color: transparent;
  background: var(--brand);
  color: var(--brand-ink);
}
.like-preview {
  width: 120px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
}
.like-preview img {
  display: block;
  width: 100%;
}
.like-preview-prompt {
  padding: var(--s3) var(--s4);
}
.range-pair {
  display: grid;
  gap: var(--s2);
}
.field input[type='range'] {
  min-height: 0;
  padding: 0;
  border: 0;
  accent-color: var(--brand);
}
.locked-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.match-sheet {
  display: grid;
  gap: var(--s3);
  text-align: center;
}
.match-photos {
  display: flex;
  justify-content: center;
}
.match-photos .avatar + .avatar {
  margin-left: calc(var(--s4) * -1);
  outline: 4px solid var(--surface);
}
.match-text {
  margin: var(--s2) 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.like-note {
  display: grid;
  gap: var(--s3);
  max-width: 560px;
  margin: 0 auto var(--s4);
  padding: var(--s4) var(--s5);
}
.like-what {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  color: var(--brand-text);
  font-weight: 600;
}
.like-thumb {
  width: 72px;
  border-radius: calc(var(--radius) / 2);
}
.like-quote {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.bubble-in {
  justify-self: start;
  max-width: 85%;
  margin: 0;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  background: var(--surface-2);
  white-space: pre-line;
}
.locked-likes {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  max-width: 560px;
  margin: var(--s4) auto 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.locked-faces {
  display: flex;
}
.locked-faces span {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface);
  border-radius: var(--pill);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 45%, var(--surface)), var(--brand-soft));
  filter: blur(1.5px);
}
.locked-faces span + span {
  margin-left: -14px;
}
.like-actions .btn {
  flex: 1;
  padding: 0 var(--s3);
  white-space: nowrap;
}
.likes-page .locked-likes {
  margin-bottom: var(--s4);
}

/* ---------- Perks: rewind, super like, boost, discovery settings ---------- */
.round-btn-sm {
  width: 48px;
  height: 48px;
}
.round-btn-super {
  color: var(--accent);
}
.discover-actions {
  align-items: center;
  gap: var(--s4);
}
.filters-sub {
  margin: var(--s3) 0 0;
  font-size: 1rem;
}
.like-note.super {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}
.like-note.super .like-what {
  color: var(--accent);
}
.boost-card {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-top: var(--s4);
  padding: var(--s4);
}
.boost-card p {
  margin: var(--s1) 0 0;
}
.boost-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--ink-2);
}
.boost-card.on {
  border-color: var(--accent);
}
.boost-card.on .boost-icon {
  background: var(--accent);
  color: var(--brand-ink);
}
.switch-item input[type='checkbox'] {
  width: 44px;
  height: 26px;
  margin: 0;
  accent-color: var(--brand);
}
.tag-x {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: var(--s1);
  padding: 0;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.inline-form {
  display: flex;
  align-items: flex-end;
  gap: var(--s3);
}
.inline-form .field {
  flex: 1;
  min-width: 0;
}
.inline-form .field input {
  width: 100%;
}
.inline-form .btn {
  flex: none;
}
.credit-confirm {
  display: grid;
  gap: var(--s3);
}
.credit-confirm p {
  margin: 0;
}
.height-pair {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.height-pair input {
  width: 96px;
  min-height: var(--tap);
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

/* ---------- Groups ---------- */
.group-cards {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.group-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.group-cover,
.group-hero {
  display: block;
  aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)) center / cover;
}
.group-card-body {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--s3) var(--s4);
}
.group-unread {
  position: absolute;
  top: var(--s3);
  right: var(--s4);
}
.join-card {
  max-width: 480px;
  margin: var(--s5) auto;
  padding: 0 0 var(--s5);
  overflow: hidden;
}
.join-card > :not(.group-hero) {
  margin-left: var(--s5);
  margin-right: var(--s5);
}
.join-card .group-hero {
  margin-bottom: var(--s4);
}
.join-card .btn-block {
  width: auto;
}

/* Group page: header + tabs, then the chat fills the rest of the screen. */
.group-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom));
}
@media (min-width: 900px) {
  .group-page {
    height: 100dvh;
  }
}
.group-head {
  flex: none;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.group-hero {
  position: relative;
  aspect-ratio: auto;
  height: 120px;
}
.hero-back {
  position: absolute;
  top: calc(var(--s2) + env(safe-area-inset-top));
  left: var(--s2);
  background: var(--surface);
  color: var(--ink);
}
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4) 0;
}
.group-title h1 {
  margin: 0;
  font-size: 1.5rem;
}
.group-desc {
  margin: var(--s1) var(--s4) var(--s2);
  font-size: 0.92rem;
}
.group-page .tabs {
  display: flex;
  gap: var(--s2);
  margin: 0 var(--s4);
  border-bottom: 1px solid var(--line);
}
.group-page .tab {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.group-page .tab[aria-selected='true'] {
  border-bottom-color: var(--brand);
  color: var(--ink);
}
.thread.embedded {
  flex: 1;
  height: auto;
  min-height: 0;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.msg-sender {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin: var(--s2) 0 2px;
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Chat requests (author line) */
.post-author {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.textarea {
  width: 100%;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;

  resize: vertical;
}
.row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

/* ---------- Verification ---------- */
.verified-badge {
  color: var(--accent);
  vertical-align: -2px;
}
.verify-state {
  display: grid;
  justify-items: center;
  gap: var(--s3);
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.verify-state h2,
.verify-state p {
  margin: 0;
}
.verify-badge {
  color: var(--accent);
}
.verify-flow {
  display: grid;
  gap: var(--s4);
  max-width: 560px;
  margin: 0 auto;
}
.pose-card {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.pose-card h2,
.pose-card p {
  margin: 0;
}
.pose-emoji {
  font-size: 3.5rem;
  line-height: 1;
}
.verify-camera,
.verify-shot {
  display: grid;
  gap: var(--s3);
}
.verify-camera video,
.verify-shot img {
  width: 100%;
  max-height: 60dvh;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.verify-camera video {
  transform: scaleX(-1); /* mirror the live preview like a mirror; the captured photo is not mirrored */
}
.file-btn {
  cursor: pointer;
}

/* ---------- Chat photos and voice notes ---------- */
.msg-media {
  display: grid;
  gap: 4px;
  margin: 0 0 var(--s1);
}
.msg-media.many {
  grid-template-columns: 1fr 1fr;
}
.msg-photo {
  position: relative;
  display: block;
  width: min(260px, 60vw);
  max-height: 340px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface-2);
  cursor: zoom-in;
}
.msg-media.many .msg-photo {
  width: min(140px, 32vw);
  aspect-ratio: 1 / 1 !important;
}
.msg-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.msg-photo.blurred img {
  filter: blur(18px);
  transform: scale(1.1);
}
.msg-photo.blurred {
  cursor: pointer;
}
.blur-note {
  position: absolute;
  inset: auto var(--s2) var(--s2);
  padding: 4px var(--s2);
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
}
.voice-note {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.voice-note audio {
  flex: 1 1 auto;
  width: min(190px, 44vw);
  min-width: 0;
  height: 36px;
}
.voice-len {
  font-size: 0.8rem;
  opacity: 0.8;
}
.attach-btn {
  flex: none;
  cursor: pointer;
}
.mic-btn {
  background: var(--surface-2);
  color: var(--ink);
}
.pending-photos {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s2);
  overflow-x: auto;
}
.pending-photo {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: calc(var(--radius) / 2);
  background: var(--surface-2);
}
.pending-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pending-photo .spinner {
  position: relative;
  color: var(--brand-ink);
}
.pending-photo .icon-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  color: var(--bg);
}
.recording {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
}
.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse {
  50% {
    opacity: 0.3;
  }
}
.rec-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
/* Video calls */
.call-incoming {
  position: fixed;
  left: var(--s4);
  right: var(--s4);
  top: calc(var(--s4) + env(safe-area-inset-top));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.call-incoming p {
  flex: 1;
  margin: 0;
}
.call-screen {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #000;
  color: #fff;
}
.call-remote {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.call-local {
  position: absolute;
  right: var(--s4);
  top: calc(var(--s6) + env(safe-area-inset-top));
  width: 28vw;
  max-width: 180px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.call-top {
  position: absolute;
  left: var(--s4);
  top: calc(var(--s4) + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.6);
}
.call-actions {
  display: flex;
  gap: var(--s4);
  justify-content: center;
}
.call-screen .call-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--s6) + env(safe-area-inset-bottom));
}
.call-decline {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.call-accept {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

/* ---------- Notifications ---------- */
.notes .list-item.unread {
  background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface));
}
.notes .list-item.unread .li-value {
  font-weight: 700;
}
.note-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--ink-2);
}
.switch-grid {
  flex-wrap: wrap;
  cursor: default;
}
.switch-grid .check {
  min-height: 0;
  font-size: 0.9rem;
}

/* ---------- Rooms and "now" posts ---------- */
a.msg-sender {
  text-decoration: none;
}
.room-chips {
  display: grid;
  gap: var(--s2);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: var(--s4);
}
.room-chip {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.room-chip.joined {
  border-color: var(--brand);
}
.room-chip .row-main {
  flex: 1;
}
.room-head {
  padding-bottom: var(--s2);
}
.room-head .group-title {
  gap: var(--s2);
  padding-top: calc(var(--s2) + env(safe-area-inset-top));
}
.room-rules {
  margin: 0 var(--s4) var(--s2);
  font-size: 0.9rem;
}
.room-rules summary {
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
}
.room-rules p {
  margin: var(--s2) 0 0;
  white-space: pre-line;
}
.now-strip {
  display: flex;
  gap: var(--s2);
  padding: 0 var(--s4) var(--s2);
  overflow-x: auto;
}
.now-card {
  display: grid;
  align-content: start;
  gap: var(--s2);
  flex: none;
  width: 220px;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.now-card header {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.now-card p {
  margin: 0;
  font-size: 0.92rem;
}
.now-name {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-left {
  margin-left: auto;
  font-size: 0.78rem;
}
.now-new {
  width: 128px;
  place-items: center;
  border: 1px dashed var(--brand);
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}
.now-empty {
  margin: 0;
}
.requests {
  margin-bottom: var(--s4);
}
.request {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s2);
  padding: var(--s3) var(--s4);
}
.request header {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.request-actions {
  display: flex;
  gap: var(--s2);
}

/* ---------- People: handles, requests, connections ---------- */
.people-btn {
  position: relative;
}
.people-btn .badge,
.tab-chip .badge {
  margin-left: var(--s1);
}
.handle-line {
  margin: 0 0 var(--s3);
}
.handle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
}
.tabs-row {
  display: flex;
  gap: var(--s2);
  margin: var(--s4) 0;
}
.tab-chip[aria-selected='true'] {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
.people-request {
  display: grid;
  gap: var(--s3);
  margin-bottom: var(--s3);
  padding: var(--s4);
}
.people-who {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.people-who p {
  margin: var(--s1) 0 0;
}
.people-page .me-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.people-page .me-actions .btn {
  padding: 0 var(--s3);
  font-size: 0.9rem;
  white-space: normal;
  line-height: 1.2;
}
.people-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.people-actions .btn {
  padding: 0 var(--s2);
}

/* ---------- Group channels and threads (#40) ---------- */
.group-layout {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}
.channel-nav {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 260px;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.channel-nav-head {
  flex: none;
  height: 72px;
  padding: var(--s2);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)) center / cover;
}
.channel-nav-head .icon-btn {
  background: var(--surface);
  color: var(--ink);
}
.channel-nav-title {
  display: grid;
  gap: 2px;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.channel-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--s2);
}
.channel-category {
  margin: var(--s3) var(--s2) var(--s1);
  color: var(--ink-2);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.channel-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--radius);
  color: var(--ink-2);
  text-decoration: none;
}
.channel-item:hover {
  background: var(--surface-2);
}
.channel-item.unread {
  color: var(--ink);
  font-weight: 600;
}
.channel-item.active {
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 600;
}
.channel-hash {
  margin-right: 2px;
  color: var(--ink-2);
  font-weight: 600;
}
.channel-nav-foot {
  flex: none;
  padding: var(--s2);
  border-top: 1px solid var(--line);
}
.channel-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.channel-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--s2);
  min-height: 56px;
  padding: 0 var(--s2);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.channel-name {
  margin: 0;
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-group {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-panel {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 380px;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--bg);
}
.drawer-scrim {
  display: none;
}
@media (max-width: 899px) {
  /* Phones: drawer and thread end above the tab bar (it stays usable). */
  .channel-nav {
    position: fixed;
    inset: 0 auto calc(var(--tabbar-h) + env(safe-area-inset-bottom)) 0;
    z-index: 30;
    width: min(300px, 85vw);
    padding-top: env(safe-area-inset-top);
    visibility: hidden;
  }
  .channel-nav.open {
    visibility: visible;
    box-shadow: 0 0 24px rgb(0 0 0 / 0.2);
  }
  .drawer-scrim {
    display: block;
    position: fixed;
    inset: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 29;
    background: rgb(0 0 0 / 0.35);
  }
  .thread-panel {
    position: fixed;
    inset: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 25;
    width: auto;
    padding-top: env(safe-area-inset-top);
    border-left: 0;
  }
}
@media (min-width: 900px) {
  .channel-menu {
    display: none;
  }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .thread-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    width: 360px;
    box-shadow: -8px 0 24px rgb(0 0 0 / 0.08);
  }
}

/* Message reactions, thread link, pins */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-top: 4px;
}
.msg.mine .reactions {
  justify-content: flex-end;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.reaction.mine {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.reaction:disabled {
  cursor: default;
}
.reaction-n {
  font-variant-numeric: tabular-nums;
}
.react-row {
  display: flex;
  gap: 2px;
}
.react-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 1.2rem;
  cursor: pointer;
}
.thread-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 32px;
  margin-top: 4px;
  padding: 0 var(--s2);
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--brand-text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.pin-mark {
  color: var(--ink-2);
}
.pin-item {
  display: grid;
  gap: 2px;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line);
}
.pin-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.call-note {
  align-self: flex-start;
  margin-top: var(--s1);
  padding: 2px var(--s2);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  font-size: 0.85rem;
}

.wallet-balance { font-size: 1.6rem; margin: 0; }

/* Locked photos (#69) */
.locked-row .locked-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s2); }
.locked-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); cursor: pointer; }
.locked-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.locked-price-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px var(--s2); border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--ink); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.locked-full { width: 100%; height: auto; border-radius: var(--radius); }
.locked-count { position: absolute; top: var(--s2); right: var(--s2); padding: 2px var(--s2); border-radius: var(--pill);
  background: var(--surface); color: var(--ink); font-size: 0.75rem; }
.photo-tools .locked-price { min-height: 32px; padding: 0 var(--s1); font-size: 0.8rem; max-width: 70%; }
.locked-msg { position: relative; display: grid; place-items: center; min-width: 160px; }
.locked-send-preview { max-width: 100%; max-height: 40vh; border-radius: var(--radius); justify-self: center; }
.pc-open { cursor: zoom-in; }
.msg-video { position: relative; }
.play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, #000 55%, transparent); color: #fff; font-size: 1.2rem; }
.video-len { position: absolute; right: var(--s2); bottom: var(--s2); padding: 1px 6px; border-radius: var(--pill); background: color-mix(in srgb, #000 55%, transparent); color: #fff; font-size: 0.75rem; }
.video-wait { display: grid; place-items: center; gap: var(--s2); min-width: 200px; aspect-ratio: 16 / 9; background: var(--surface-2); padding: var(--s3); text-align: center; }
.pending-photo video { width: 100%; height: 100%; object-fit: cover; }
.locked-tile .play-badge { left: var(--s2); top: var(--s2); transform: none; width: 28px; height: 28px; font-size: 0.75rem; }
.pay-method { margin-bottom: var(--s4); }
.pay-method .muted { margin-top: var(--s2); }

/* ---------- Calls: gifts (#69) and the minimized call window ---------- */
.call-size {
  position: absolute;
  left: var(--s4);
  bottom: calc(var(--s6) + env(safe-area-inset-bottom) + 76px);
  color: #fff;
  background: rgb(0 0 0 / 0.35);
}
.call-gift-btn {
  color: var(--accent);
}
.call-gift-panel {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s6) + env(safe-area-inset-bottom) + 88px);
  transform: translateX(-50%);
  width: min(360px, calc(100% - 2 * var(--s4)));
  padding: var(--s4);
  display: grid;
  gap: var(--s3);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.call-gift-panel p {
  margin: 0;
}
.call-gift-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.call-amount {
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.call-amount[aria-pressed='true'] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}
.call-gift-low {
  color: var(--danger-text);
}
.call-gifts {
  position: absolute;
  left: 0;
  right: 0;
  top: 35%;
  display: grid;
  justify-items: center;
  gap: var(--s2);
  pointer-events: none;
}
.call-gift-banner {
  margin: 0;
  padding: var(--s2) var(--s4);
  border-radius: var(--pill);
  background: rgb(0 0 0 / 0.6);
  font-weight: 600;
  animation: call-gift-in 0.4s ease-out;
}
@keyframes call-gift-in {
  from { transform: translateY(16px) scale(0.9); opacity: 0; }
}
/* Minimized: a small window over the chat; tap the video (or the button) for the full screen again. */
.call-screen.call-mini {
  inset: auto var(--s3) auto auto;
  top: calc(64px + env(safe-area-inset-top));
  width: 148px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.call-mini .call-remote {
  cursor: pointer;
}
.call-mini .call-local,
.call-mini .call-top span:not(:first-of-type) {
  display: none;
}
.call-mini .call-top {
  left: var(--s2);
  top: var(--s2);
  font-size: 0.8rem;
}
.call-mini .call-actions {
  bottom: var(--s2);
  gap: var(--s1, 4px);
}
.call-mini .round-btn-sm {
  width: 36px;
  height: 36px;
}
.call-mini .call-gifts {
  top: 30%;
  font-size: 0.75rem;
}

/* The "grid" Discover layout (A/B experiments): everyone the filters let through, as tiles, a page at a time. */
.discover-grid-status {
  margin: 0 0 var(--s3);
}
.discover-grid-status:focus {
  outline: none;
}
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.discover-grid.is-loading {
  opacity: 0.6;
}
.grid-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.grid-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.grid-tile::after {
  content: '';
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.72));
  pointer-events: none;
}
.grid-tile:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.grid-tile-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--ink-3);
}
.grid-tile-name,
.grid-tile-city {
  position: absolute;
  left: var(--s3);
  right: var(--s3);
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid-tile-name {
  bottom: calc(var(--s3) + 1.3em);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.grid-tile-city {
  bottom: var(--s3);
  font-size: 0.85em;
}
.grid-tile-video,
.grid-tile-badge {
  position: absolute;
  top: var(--s2);
  z-index: 1;
  padding: 2px 8px;
  border-radius: var(--pill);
  background: rgb(0 0 0 / 0.6);
  font-size: 0.8em;
}
.grid-tile-video {
  right: var(--s2);
  display: grid;
  place-items: center;
}
.grid-tile-badge {
  left: var(--s2);
}
.grid-tile.is-liked .grid-tile-badge {
  background: var(--brand);
  color: var(--brand-ink);
}
.grid-tile.is-skipped img {
  filter: grayscale(1);
  opacity: 0.7;
}
.discover-grid-back {
  margin-bottom: var(--s3);
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin: var(--s5) 0;
}
.pager-pages {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pager-page {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.pager-page.is-current {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
}
.pager-gap {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 40px;
}

/* The "reel" Discover layout (A/B experiments): one photo or video of each person, full height, snapping. */
.discover-page.is-reel {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom));
  padding-bottom: var(--s3);
}
@media (min-width: 900px) {
  .discover-page.is-reel {
    height: 100dvh;
  }
}
.discover-page.is-reel .page-head {
  flex: none;
}
.reel-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.reel {
  flex: 1;
  width: 100%;
  max-width: 520px;
  min-height: 0;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  border-radius: var(--radius);
  background: #000;
  scrollbar-width: none;
}
.reel::-webkit-scrollbar {
  display: none;
}
.reel:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.reel-item,
.reel-end {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.reel-end {
  display: grid;
  place-items: center;
  background: var(--surface);
}
.reel-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.reel-item::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.75));
  pointer-events: none;
}
.reel-info {
  position: absolute;
  left: var(--s4);
  right: 96px;
  bottom: var(--s4);
  z-index: 1;
  color: #fff;
}
.reel-info p {
  margin: 0 0 var(--s1);
}
.reel-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.35em;
  font-weight: 700;
}
.reel-city {
  opacity: 0.9;
}
.reel-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--pill);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.85em;
}
.reel-info .btn {
  margin-top: var(--s2);
}
.reel-actions {
  position: absolute;
  right: var(--s3);
  bottom: var(--s4);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.reel-more {
  display: grid;
  place-items: center;
  padding: var(--s4);
}
@media (prefers-reduced-motion: reduce) {
  .reel {
    scroll-behavior: auto;
  }
}
