/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Global utility: anything with class="hidden" is not displayed */
.hidden { display: none !important; }

:root {
  /* ── Dark mode (default) ── */
  --bg: #0d0d12;
  --surface: #16161e;
  --surface2: #1e1e2a;
  --accent: #a855f7;
  --accent2: #7c3aed;
  --text: #f0f0f5;
  --text-muted: #8888a0;
  --border: rgba(255,255,255,0.07);
  --radius: 14px;
  --header-h: 58px;
  --banner-h: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* accent companions */
  --rose: #f472b6;
  --amber: #f59e0b;

  /* role colors — red / rose / purple spectrum / gray */
  --top-c: #e05a5a;
  --vers-top-c: #f472b6;
  --bottom-c: #a855f7;
  --vers-bottom-c: #8b5cf6;
  --vers-c: #9b72e0;
  --side-c: #8888a0;
}

/* ── Light mode overrides ── */
body.light {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface2: #ebebf2;
  --accent: #8b35d6;
  --accent2: #6d28b0;
  --text: #111118;
  --text-muted: #666680;
  --border: rgba(0,0,0,0.08);
  --rose: #db2777;
  --amber: #d97706;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px; /* slightly larger than browser default 16px */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Support Banner ── */
.support-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 40px 7px 16px;
  text-align: center;
  line-height: 1.35;
}
.support-banner a {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.6);
  display: block;
  width: 100%;
  text-align: center;
}
.support-banner-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.support-banner-close:hover { background: rgba(255,255,255,0.35); }
.support-banner.hidden { display: none; }

/* ── Header ── */
.app-header {
  position: fixed;
  top: var(--banner-h); left: 0; right: 0;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  gap: 10px;
}
.header-title-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, var(--accent), #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.header-cruise-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.header-cruise-name:empty { display: none; }
.header-btn {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.header-btn:active { background: var(--surface); }

/* ── Filter Bar ── */
.filter-bar {
  position: fixed;
  top: calc(var(--banner-h) + var(--header-h));
  left: 0; right: 0;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 90;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.filter-bar-inner {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - var(--banner-h) - var(--header-h) - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}
.chip:active { transform: scale(0.95); }

/* ── Tab Bar ── */
:root { --tab-h: 62px; }

.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 150;
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0 2px var(--safe-bottom);
  cursor: pointer;
  transition: color 0.15s;
}
.tab-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tab-btn svg { transition: stroke 0.15s; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active svg { stroke: var(--accent); }

/* ── Screens ── */
.screen {
  min-height: 100vh;
}
.screen.hidden { display: none; }


/* ── Cruise Card Page ── */
.card-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-h) + 20px) 20px calc(var(--tab-h) + var(--safe-bottom) + 24px);
  min-height: 100vh;
  gap: 16px;
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.card-page.has-card-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  transform: none;
  z-index: 0;
  pointer-events: none;
}
.card-page.has-card-bg > * {
  position: relative;
  z-index: 1;
}
.card-page-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ── The Card ── */
.cruise-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* Top stripe */
.card-stripe {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: linear-gradient(90deg, #120d1a, #1a1025);
  border-bottom: 1px solid rgba(168,85,247,0.25);
}
.card-stripe-logo { font-size: 16px; }
.card-stripe-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, var(--accent), #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Photo section */
.card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.card-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
}
.card-identity {
  position: absolute;
  bottom: 12px; left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.card-role-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  text-transform: capitalize;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
/* inherit role colors from existing .role-badge classes */

/* Info row */
.card-info-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.card-info-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-info-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  margin: 0 16px;
  flex-shrink: 0;
}
.card-info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.card-info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.card-id {
  font-family: "SF Mono", "Fira Code", "Courier New", monospace;
  letter-spacing: 2px;
  font-size: 13px;
  color: var(--accent);
}
.card-handle {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* QR section */
.card-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px 20px;
  gap: 8px;
  background: var(--surface2);
  transform: scale(0.90);
  transform-origin: top center;
}
#cardQR canvas,
#cardQR img {
  border-radius: 10px;
  display: block;
}
.card-qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.card-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

/* ── Profiles Page Layout ── */
.profiles-page {
  padding-top: calc(var(--banner-h) + var(--header-h));
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 6px);
  min-height: 100vh;
}

/* Section headers (Verified / All Cruisers) */
.section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 12px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.verified-section-header {
  color: var(--amber);
  border-top: none;
}
.verified-section-header svg {
  flex-shrink: 0;
  fill: var(--amber);
  filter: drop-shadow(0 0 3px rgba(167,139,250,0.5));
}

/* Both grids share the base grid rule */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding-top: 0 !important;
  padding-bottom: 0;
  min-height: 0;
}

/* The main "all" grid adds bottom padding for tab bar */
#profileGrid {
  padding-bottom: 6px;
}


/* Filter-open pushes the whole profiles-page content down */
.profiles-page.filter-open {
  padding-top: calc(var(--banner-h) + var(--header-h) + 440px);
}

/* ── Profile Tile ── */
.profile-tile {
  position: relative;
  aspect-ratio: 1 / 1.15;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  /* Skip rendering off-screen tiles — critical for 5000-tile grids */
  content-visibility: auto;
  contain-intrinsic-size: 0 140px;
}
.profile-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.profile-tile:active img { transform: scale(1.04); }

.tile-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  pointer-events: none;
}
.tile-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 7px 7px;
}
.tile-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.tile-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,0.72);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.tile-photo-count {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.85);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}
.tile-fav-btn {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, transform 0.12s;
  z-index: 2;
}
.tile-fav-btn:active { transform: scale(0.88); }
.tile-fav-btn.fav-on {
  color: var(--rose);
  background: rgba(0,0,0,0.5);
}

/* empty state */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 10px;
  text-align: center;
}
.empty-state svg { opacity: 0.3; }
.empty-state-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  opacity: 0.8;
  border-radius: 12px;
}
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.empty-state-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 700;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  width: 100%;
  max-height: 92vh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
  position: relative;
}
.modal-overlay.open .modal {
  transform: translateY(0);
}

/* pill handle */
.modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  margin: 10px auto 0;
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

/* ── Carousel ── */
.modal-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.2;
  overflow: hidden;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}
.carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}
.carousel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
/* Visibility badge shown on own-profile photo carousel */
.carousel-vis-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.vis-badge--everyone  { background: rgba(0,0,0,0.45); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.15); }
.vis-badge--confirmed { background: rgba(234,179,8,0.25); color: #fde047; border: 1px solid rgba(234,179,8,0.4); }
.vis-badge--private   { background: rgba(239,68,68,0.25); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.modal-photo-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
  pointer-events: none;
}

/* Tap zones (invisible left/right halves) */
.carousel-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  z-index: 2;
  cursor: pointer;
}
.carousel-zone[data-dir="prev"] { left: 0; }
.carousel-zone[data-dir="next"] { right: 0; }

/* Counter pill (top-right) */
.carousel-counter {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 3;
  pointer-events: none;
}

/* Per-photo report button (bottom-right of carousel) */
.carousel-report-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 5px 11px 5px 8px;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.carousel-report-btn:active {
  background: rgba(220,60,60,0.55);
  color: #fff;
  border-color: rgba(255,100,100,0.4);
}
.carousel-report-btn.reported {
  color: rgba(255,100,100,0.65);
  border-color: rgba(255,100,100,0.3);
  pointer-events: none;
}

/* Dot indicators */
.carousel-dots {
  position: absolute;
  bottom: 52px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}
.modal-header-info {
  position: absolute;
  bottom: 14px; left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 20;
}
.modal-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.modal-age-badge {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}
.modal-age-badge.hidden { display: none; }
.modal-cruise-info.hidden { display: none; }
.modal-fav-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  transition: color 0.15s, background 0.15s, transform 0.12s;
  flex-shrink: 0;
  position: relative;
  z-index: 21;
}
.modal-fav-btn:active { transform: scale(0.88); }
.modal-fav-btn.fav-on {
  color: var(--rose);
  border-color: rgba(244,114,182,0.5);
  background: rgba(0,0,0,0.45);
}

.modal-body {
  padding: 16px 18px calc(var(--safe-bottom) + 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-cabin {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 15px;
}
.modal-cabin svg { flex-shrink: 0; stroke: var(--accent); }

/* New: cruise name + cabin combined display */
.modal-cruise-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.modal-cruise-info svg { flex-shrink: 0; stroke: var(--accent); }
.modal-cruise-info-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.modal-cruise-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.modal-cruise-cabin {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}
.modal-cruise-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.modal-cruise-confirmed {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Each cruise entry (ship icon + cruise name + cabin) inside the cruise-info block */
.modal-cruise-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
}
.modal-cruise-ship-icon { flex-shrink: 0; margin-top: 2px; opacity: 0.75; }
.modal-cruise-row-text { display: flex; flex-direction: column; gap: 1px; }
/* Separator between a first and second cruise */
.modal-cruise-row + .modal-cruise-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.modal-section { display: flex; flex-direction: column; gap: 8px; }
.section-row {
  display: flex;
  gap: 16px;
}
.info-block {
  flex: 1;
  background: var(--surface2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.info-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Role badge colors */
.role-badge { text-transform: capitalize; }
.role-badge.top          { color: var(--top-c); }
.role-badge.vers-top     { color: var(--vers-top-c); }
.role-badge.vers         { color: var(--vers-c); }
.role-badge.vers-bottom  { color: var(--vers-bottom-c); }
.role-badge.bottom       { color: var(--bottom-c); }
.role-badge.side         { color: var(--side-c); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.tag.looking      { border-color: rgba(244,114,182,0.45); color: var(--rose); }
.tag.label-groups { border-color: rgba(168,85,247,0.35);  color: var(--accent); }
.tag.label-gamer  { border-color: rgba(245,158,11,0.4);   color: var(--amber); }
.tag.label-hung   { border-color: rgba(224,90,90,0.4);    color: #e05a5a; }

.modal-about {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ── Socials (Modal — prominent card style) ── */
.socials-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.social-card:active { opacity: 0.75; transform: scale(0.98); }

.social-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.social-card-icon svg { width: 20px; height: 20px; }

.social-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.social-card-platform {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.6;
}
.social-card-handle {
  font-size: 15px;
  font-weight: 700;
}
.social-card-chevron {
  flex-shrink: 0;
  opacity: 0.4;
}

.social-instagram {
  background: rgba(225, 48, 108, 0.1);
  border-color: rgba(225, 48, 108, 0.3);
  color: #e1306c;
}
.social-telegram {
  background: rgba(38, 162, 223, 0.1);
  border-color: rgba(38, 162, 223, 0.3);
  color: #26a2df;
}
.social-x {
  background: rgba(160, 160, 170, 0.1);
  border-color: rgba(160, 160, 170, 0.3);
  color: #a0a0aa;
}
/* Legacy pill classes kept for any other usage */
.social-icon { display: flex; align-items: center; flex-shrink: 0; }
.social-handle { white-space: nowrap; }

.msg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--accent);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 15px;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.msg-btn:active {
  background: var(--accent2);
  transform: scale(0.98);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(40,40,52,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Placeholder shimmer ── */
.profile-tile.loading {
  background: var(--surface2);
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0%   { background-color: var(--surface2); }
  50%  { background-color: var(--surface); }
  100% { background-color: var(--surface2); }
}

/* ── Edit / My Profile Screen ── */
.edit-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: calc(var(--banner-h) + var(--header-h) + 16px) 16px calc(var(--tab-h) + var(--safe-bottom) + 24px);
  gap: 12px;
}

/* Avatar */
.edit-avatar-wrap {
  position: relative;
  align-self: center;
  margin-bottom: 4px;
}
.edit-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  display: block;
}
.edit-avatar-badge {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--accent);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  border: 2px solid var(--bg);
}

/* Sections */
.edit-section {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
}
.edit-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.edit-section-title svg { flex-shrink: 0; }

/* Fields */
.edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-row {
  display: flex;
  gap: 10px;
}
.edit-row .edit-field { flex: 1; }

.edit-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-input {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.edit-input:focus {
  border-color: var(--accent);
}
.edit-input::placeholder { color: var(--text-muted); }

.edit-textarea {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.edit-textarea:focus { border-color: var(--accent); }
.edit-textarea::placeholder { color: var(--text-muted); }

.edit-char-count {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* Select */
.select-wrap {
  position: relative;
}
.edit-select {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 36px 10px 12px;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
  cursor: pointer;
}
.edit-select:focus { border-color: var(--accent); }
.edit-select option, .edit-select optgroup {
  background: var(--surface2);
  color: var(--text);
}
.select-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  stroke: var(--text-muted);
}

/* Joined badge */
.cruise-joined-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.35);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.cruise-joined-badge svg { flex-shrink: 0; stroke: var(--accent); }
.cruise-joined-badge.hidden { display: none; }
.cruise-verified-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 10px;
  padding: 2px 8px;
  margin-left: 6px;
}
.cruise-inactive-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
  border-radius: 10px;
  padding: 2px 7px;
  margin-left: 4px;
  white-space: nowrap;
}
.cruise-inactive-tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Edit chip groups (role, looking for, tags) */
.edit-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.edit-chip {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.edit-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.edit-chip:active { transform: scale(0.95); }

/* Social inputs */
.edit-social-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.edit-social-input-wrap:focus-within { border-color: var(--accent); }
.edit-social-prefix {
  padding: 0 8px 0 12px;
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.edit-social-input {
  border: none !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  background: transparent !important;
}
.edit-social-input:focus { border-color: transparent !important; }

/* Handle availability feedback */
.handle-feedback {
  font-size: 11px;
  display: block;
  min-height: 14px;
}
.handle-feedback.available { color: #4ade80; }
.handle-feedback.taken     { color: #f87171; }
.handle-feedback.checking  { color: rgba(255,255,255,0.45); }

/* Save button */
.save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 15px;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}
.save-btn:active {
  background: var(--accent2);
  transform: scale(0.98);
}

/* ── Verified Badge ── */

/* Tile inline badge (next to name) */
.tile-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  vertical-align: middle;
  margin-left: 2px;
}

/* Modal overlay badge (small shield icon, top-left photo area) */
.modal-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,158,11,0.2);
  border: 1.5px solid rgba(245,158,11,0.55);
  border-radius: 50%;
  width: 26px; height: 26px;
  color: var(--amber);
  flex-shrink: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-verified-badge.hidden { display: none; }

/* Modal body meta row (cabin + verified pill side by side) */
.modal-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Verified pill in modal body */
.modal-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  flex-shrink: 0;
}
.modal-verified-pill svg { flex-shrink: 0; }
.modal-verified-pill.hidden { display: none; }

/* Verified filter chip special style */
.chip-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip-verified svg { flex-shrink: 0; }
.chip-verified.active {
  background: rgba(168,85,247,0.9);
  border-color: #a855f7;
  color: #fff;
}

/* ── Relationship Status Colors (modal) ── */
.modal-relationship { font-size: 14px; } /* slightly smaller for 3-col row */
.rel-single              { color: var(--text); }
.rel-dating              { color: var(--rose); }
.rel-exclusive           { color: var(--accent); }
.rel-committed           { color: var(--text-muted); }
.rel-engaged             { color: var(--amber); }
.rel-partnered           { color: var(--text-muted); }
.rel-married             { color: var(--amber); }
.rel-open-relationship   { color: var(--rose); }
.rel-not-specified       { color: var(--text-muted); }

/* 3-column section-row (height / weight / relationship) */
.section-row .info-block:last-child { min-width: 0; }
.section-row .info-value { font-size: 14px; }

/* ── Edit label hint ── */
.edit-label-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

/* ── Side chip — visually distinct so it feels like an add-on toggle ── */
.edit-chip-side {
  border-style: dashed;
}
.edit-chip-side.selected {
  background: var(--side-c);
  border-color: var(--side-c);
  border-style: solid;
  color: #0d0d12;
}

/* ── Cruise Menu (hamburger panel) ── */
.cruise-menu {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
  align-items: flex-end;
}
.cruise-menu-inner {
  width: 100%;
  max-height: 72vh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  animation: slideUp 0.28s cubic-bezier(0.34,1.1,0.64,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cruise-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cruise-menu-title {
  font-size: 16px;
  font-weight: 700;
}
.cruise-menu-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text);
  font-size: 20px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.cruise-menu-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 18px 4px;
}
.cruise-menu-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + 20px);
}
.cruise-menu-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}
.cruise-menu-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  padding: 12px 18px 4px;
}
.cruise-menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 13px 18px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.cruise-menu-item:active { background: var(--surface2); }
.cruise-menu-item.active {
  background: rgba(168,85,247,0.1);
}
.cruise-menu-item.active .cruise-menu-item-name {
  color: var(--accent);
}
.cruise-menu-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.cruise-menu-item-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Delete Profile Button ── */
.delete-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: rgba(255,100,100,0.55);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,100,100,0.2);
  border-radius: 12px;
  padding: 11px 16px;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  margin-top: -4px;
}
.delete-profile-btn:active {
  color: rgba(255,100,100,0.9);
  border-color: rgba(255,100,100,0.5);
  background: rgba(255,100,100,0.06);
}
.delete-profile-btn svg { stroke: currentColor; flex-shrink: 0; }

/* ── Cruise Menu Settings ── */
.cruise-menu-settings {
  padding-bottom: 4px;
}
.cruise-menu-settings-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 0;
}
.cruise-menu-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  gap: 12px;
}
.cruise-menu-setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cruise-menu-setting-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.cruise-menu-setting-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* NSFW Toggle switch */
.nsfw-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  padding: 0;
}
.nsfw-toggle.on {
  background: var(--accent);
}
.nsfw-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34,1.3,0.64,1);
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.nsfw-toggle.on .nsfw-toggle-thumb {
  transform: translateX(22px);
}

/* ── Delete Divider ── */
.delete-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
}
.delete-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255,100,100,0.15);
}
.delete-divider-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,100,100,0.35);
  white-space: nowrap;
}

/* ── Vibes Page ── */
.vibes-page {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: calc(var(--banner-h) + var(--header-h));
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + var(--safe-bottom));
  overflow: hidden;
}

/* Compose box (pinned to bottom) */
.vibes-compose {
  padding: 12px 16px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.vibes-compose-body {
  display: flex;
  flex-direction: column;
}
.vibes-compose-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.vibes-compose-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.vibes-compose-count {
  font-size: 12px;
  color: var(--text-muted);
}
.vibes-compose-count.near-limit { color: var(--amber); }
.vibes-compose-count.at-limit   { color: #e05a5a; }
.vibes-compose-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 10px 12px;
  outline: none;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.15s;
  min-height: 60px;
}
.vibes-compose-input:focus { border-color: var(--accent); }
.vibes-compose-input::placeholder { color: var(--text-muted); }
.vibes-post-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.vibes-post-btn:active { background: var(--accent2); transform: scale(0.96); }
.vibes-post-btn:disabled {
  background: var(--surface2);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Feed */
.vibes-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.vibe-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeSlideIn 0.28s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vibe-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  width: 40px;
}
.vibe-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.vibe-time {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.vibe-body {
  flex: 1;
  min-width: 0;
}
.vibe-header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.vibe-verified-badge {
  flex-shrink: 0;
  margin-left: -1px;
}
.vibe-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.vibe-handle {
  font-size: 12px;
  color: var(--text-muted);
}
.vibe-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}
.vibe-role-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}
.vibes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--text-muted);
  gap: 12px;
  font-size: 15px;
  text-align: center;
}
.vibes-empty svg { opacity: 0.25; }

/* ── Modal Report / Block actions ── */
.modal-actions-row {
  display: flex;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.modal-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.modal-action-btn svg { stroke: currentColor; flex-shrink: 0; }
.modal-block-btn:active  { background: rgba(255,255,255,0.06); color: var(--text); }
.modal-report-btn:active { background: rgba(255,100,100,0.08); color: rgba(255,100,100,0.8); border-color: rgba(255,100,100,0.25); }
.modal-buddy-btn.active-buddy,
.modal-cabinmate-btn.active-buddy {
  border-color: rgba(168,85,247,0.4);
  color: var(--accent);
  background: rgba(168,85,247,0.08);
}

/* ── Buddies Tab ── */
.buddies-page {
  padding: calc(var(--header-h) + 12px) 0 calc(var(--tab-h) + var(--safe-bottom) + 16px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.buddies-section { display: flex; flex-direction: column; gap: 6px; }
.buddies-section .section-header,
.buddies-section .buddies-section-desc,
.buddies-section .buddies-empty {
  padding-left: 14px;
  padding-right: 14px;
}
.buddies-section-header {
  color: var(--rose);
}
.buddies-section-header svg { fill: var(--rose); flex-shrink: 0; }
.buddies-cabinmate-header { color: var(--accent); }
.buddies-cabinmate-header svg { fill: none; stroke: var(--accent); flex-shrink: 0; }
.buddies-list-header { color: var(--text-muted); }
.buddies-list-header svg { fill: none; stroke: var(--text-muted); flex-shrink: 0; }
.buddies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.buddies-section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: -4px 0 4px;
  line-height: 1.45;
}
.buddies-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  grid-column: 1 / -1;
}
.buddies-cabinmate-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
/* Tile action button (top-right corner of each buddies tile) */
/* "Not on this cruise" badge — shown on favorite tiles and in modal */
.off-cruise-badge {
  position: absolute;
  top: 5px; left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 2px 5px 2px 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
.off-cruise-badge svg { flex-shrink: 0; }
.off-cruise-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Modal off-cruise note */
.modal-off-cruise-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0 2px;
}
.modal-off-cruise-note svg { flex-shrink: 0; opacity: 0.7; }
.modal-off-cruise-note.hidden { display: none; }

.buddy-tile-action {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.12s, background 0.15s;
}
.buddy-tile-action:active { transform: scale(0.88); }
.buddy-tile-unfav {
  background: rgba(244, 114, 182, 0.25);
  color: var(--rose);
}
.buddy-tile-unfav:active { background: rgba(244,114,182,0.45); }
.buddy-tile-report {
  background: rgba(245,158,11,0.2);
  color: var(--amber);
}
.buddy-tile-report:active { background: rgba(245,158,11,0.4); }
.buddy-tile-delete {
  background: rgba(255,80,80,0.2);
  color: #ff6060;
}
.buddy-tile-delete:active { background: rgba(255,80,80,0.4); }
/* Scan direction pill (bottom-left, above tile-info) */
.buddy-tile-scan-dir {
  position: absolute;
  top: 6px; left: 6px;
  display: flex; align-items: center; gap: 3px;
  padding: 4px 5px;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  pointer-events: none;
  z-index: 3;
}
.buddy-scan-sent {
  background: rgba(168,85,247,0.25);
  color: var(--accent);
  border: 1px solid rgba(168,85,247,0.35);
}
.buddy-scan-received {
  background: rgba(244,114,182,0.22);
  color: var(--rose);
  border: 1px solid rgba(244,114,182,0.35);
}

/* ── Vibe report button ── */
.vibe-report-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}
.vibe-report-btn svg { stroke: currentColor; }
.vibe-card:hover .vibe-report-btn,
.vibe-card:focus-within .vibe-report-btn { opacity: 1; }
.vibe-report-btn:active {
  opacity: 1;
  color: rgba(255,100,100,0.75);
  background: rgba(255,100,100,0.08);
}
/* On touch devices always show it */
@media (hover: none) {
  .vibe-report-btn { opacity: 0.45; }
}

/* ── Cabin visibility toggle ── */
.edit-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.cabin-visibility-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
/* Cabin number input + toggle on same row */
.cabin-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cabin-visibility-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cabin-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  border: none;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  padding: 0;
}
.cabin-toggle.on {
  background: var(--accent);
}
.cabin-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34,1.3,0.64,1);
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.cabin-toggle.on .cabin-toggle-thumb {
  transform: translateX(18px);
}

/* ── Cruise Slots (My Profile — up to 2 cruises) ── */
.cruise-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cruise-slot {
  /* wrapper */
}
.cruise-slot-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1.5px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.cruise-slot-btn:active {
  background: rgba(168,85,247,0.08);
  border-color: rgba(168,85,247,0.4);
  color: var(--text);
}
.cruise-slot-btn svg { flex-shrink: 0; stroke: currentColor; }

.cruise-slot-filled {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 12px;
  padding: 12px 14px;
}
.cruise-slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cruise-slot-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cruise-slot-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.cruise-slot-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.cruise-slot-code-error {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #ef4444;
  line-height: 1.4;
  white-space: normal;
}
.cruise-slot-remove {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.cruise-slot-remove:active {
  background: rgba(255,100,100,0.15);
  color: rgba(255,100,100,0.8);
}
.cruise-slot-remove svg { stroke: currentColor; }

/* Deck + cabin fields within a filled slot */
.cruise-slot-details {
  padding: 10px 0 2px;
}
.cruise-slot-detail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ── Cruise Verification Modal ── */
.cruise-verify-modal {
  max-height: 88vh;
}
.cruise-verify-body {
  padding: 8px 18px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(88vh - 30px);
}
.cruise-verify-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.cruise-verify-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: -4px;
}
.cruise-verify-list {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.cruise-verify-list .cruise-menu-group-label {
  background: rgba(255,255,255,0.03);
  padding: 8px 14px 4px;
}
.cruise-verify-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  width: 100%;
}
.cruise-verify-item:last-child { border-bottom: none; }
.cruise-verify-item:active { background: rgba(168,85,247,0.08); }
.cruise-verify-item.active {
  background: rgba(168,85,247,0.12);
}
.cruise-verify-item.active .cruise-menu-item-name {
  color: var(--accent);
}
.cruise-verify-code-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.cruise-verify-code-section.hidden { display: none; }
.cruise-verify-selected-pill {
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}
.cruise-verify-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cruise-verify-skip-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  padding: 6px;
  text-decoration: underline;
  font-family: inherit;
  transition: color 0.15s;
}
.cruise-verify-skip-btn:active { color: var(--text); }

/* ── Profile modal navigation hint ── */
.modal.nav-next {
  animation: modalSlideNext 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
}
.modal.nav-prev {
  animation: modalSlidePrev 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
}
@keyframes modalSlideNext {
  from { opacity: 0.4; transform: translateX(40px); }
  to   { opacity: 1;   transform: translateX(0); }
}
@keyframes modalSlidePrev {
  from { opacity: 0.4; transform: translateX(-40px); }
  to   { opacity: 1;   transform: translateX(0); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ── Privacy Options ── */
.edit-privacy-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}
.edit-privacy-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}
.privacy-option.selected {
  border-color: var(--accent);
  background: rgba(168,85,247,0.08);
}
.privacy-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(168,85,247,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.privacy-option:not(.selected) .privacy-option-icon {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.privacy-option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.privacy-option-label {
  font-size: 14px;
  font-weight: 700;
}
.privacy-option-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.privacy-option-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.privacy-option.selected .privacy-option-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Photo Upload Grid ── */
.edit-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
/* Each column: image tile stacked above visibility pill */
.edit-photo-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: grab;
}
.edit-photo-col.drag-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.edit-photo-col.drag-over .edit-photo-tile {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.edit-photos-row-sep {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 3px 0;
}
.edit-photo-tile {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
}
.edit-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.edit-photo-tile::before {
  content: "⠿";
  position: absolute;
  top: 4px; left: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}
.edit-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
/* ── Per-photo Visibility label + cycling pill ── */
.edit-photo-vis-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 5px;
  margin-bottom: 2px;
  text-align: center;
}
.edit-photo-vis-row {
  display: flex;
  margin-top: 6px;
}
.edit-photo-vis-single {
  flex: 1;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1.5px solid;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.12s, transform 0.1s;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}
.edit-photo-vis-single:active {
  transform: scale(0.96);
  filter: brightness(1.15);
}
.edit-photo-vis-single.vis-everyone  { background: rgba(100,116,139,0.22); color: var(--text-muted); border-color: rgba(100,116,139,0.45); }
.edit-photo-vis-single.vis-confirmed { background: rgba(245,158,11,0.18);  color: #f59e0b;           border-color: rgba(245,158,11,0.55); }
.edit-photo-vis-single.vis-private   { background: rgba(239,68,68,0.18);   color: #ef4444;           border-color: rgba(239,68,68,0.55);  }

.edit-photo-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  border-radius: 11px;
  border: 1.5px dashed rgba(168,85,247,0.4);
  background: rgba(168,85,247,0.05);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.edit-photo-add-btn:active {
  background: rgba(168,85,247,0.12);
  border-color: var(--accent);
}

/* ── Card Background Upload ── */
.card-bg-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.card-bg-upload-label {
  cursor: pointer;
  flex-shrink: 0;
}
.card-bg-preview {
  width: 110px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
  border: 1.5px dashed rgba(168,85,247,0.35);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.card-bg-upload-label:active .card-bg-preview {
  border-color: var(--accent);
}
.card-bg-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.card-bg-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.card-bg-remove-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  align-self: center;
}
.card-bg-remove-btn:active {
  background: rgba(255,80,80,0.1);
  color: #ff7070;
}

/* Cruise card — full-bleed background layer */
.card-bg-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.45;
}
/* Ensure profile photo sits on top of bg, but blends in */
.card-photo-wrap .card-photo {
  position: relative;
  z-index: 1;
  /* when bg is set, show profile photo as a centred portrait inset */
}
/* When background is present, shrink the profile photo to a portrait inset */
.card-photo-wrap.has-bg .card-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  z-index: 1;
}

/* ── Vibe card tappable avatar / name ── */
.vibe-avatar-tap {
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.vibe-avatar-tap:active {
  opacity: 0.75;
  transform: scale(0.94);
}
.vibe-name-tap {
  cursor: pointer;
  transition: color 0.15s;
}
.vibe-name-tap:hover,
.vibe-name-tap:active {
  color: var(--accent);
  text-decoration: underline;
}

/* ── In-app Confirm Modal ── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transition: background 0.22s;
}
.confirm-overlay.open {
  background: rgba(0,0,0,0.55);
  pointer-events: all;
}
.confirm-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 24px 20px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.confirm-overlay.open .confirm-sheet {
  transform: translateY(0);
}
.confirm-message {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
  padding: 0 4px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-btn {
  flex: 1;
  padding: 13px;
  border-radius: 13px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.confirm-btn:active { opacity: 0.75; }
.confirm-cancel {
  background: var(--surface2);
  color: var(--text-muted);
}
/* ── Report reason chips ── */
.report-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-reason-chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.report-reason-chip.selected {
  border-color: #c0392b;
  background: rgba(192,57,43,0.12);
  color: #c0392b;
}
.report-other-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  resize: none;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.report-other-input:focus { border-color: var(--accent); }

.confirm-ok {
  background: #c0392b;
  color: #fff;
}

/* ── Delete Profile typed-confirmation modal ── */
.delete-confirm-prompt {
  font-size: 13px;
  color: var(--text-muted);
  margin: -8px 0 6px;
}
.delete-confirm-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: monospace;
  letter-spacing: 2px;
  padding: 11px 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.delete-confirm-input:focus { border-color: #c0392b; }

/* ── Unit Toggle (Imperial / Metric) ── */
.unit-toggle-row {
  display: flex;
  gap: 3px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 2px;
  border: 1px solid var(--border);
}
.unit-toggle-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.unit-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── Settings rows in My Profile ── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.settings-row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.settings-row-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Drum Picker ── */
.drum-picker {
  position: relative;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}
.drum-picker-root {
  position: relative;
}
.drum-vp {
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  position: relative;
  /* fade top/bottom */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}
.drum-vp:active { cursor: grabbing; }
.drum-list {
  will-change: transform;
  padding: 0;
  margin: 0;
}
.drum-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s, font-weight 0.15s;
  cursor: pointer;
}
.drum-item.drum-blank { pointer-events: none; }
.drum-item.drum-selected {
  color: var(--text);
  font-weight: 700;
}
/* Selection highlight bar */
.drum-hl {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  background: rgba(168, 85, 247, 0.12);
  border-top: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  border-radius: 4px;
  z-index: 2;
}
/* Compact picker for filter panes */
.drum-picker-sm .drum-vp {
  border-radius: 10px;
}
.drum-picker-sm .drum-item {
  font-size: 13px;
}

/* Filter range row */
.filter-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}
.filter-range-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-range-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  text-align: center;
}
.filter-range-sep {
  font-size: 18px;
  color: var(--text-muted);
  padding-bottom: 4px;
  flex-shrink: 0;
}

/* ── Picker Trigger Button ── */
.picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  gap: 8px;
}
.picker-trigger:hover, .picker-trigger:focus-visible {
  background: var(--surface);
  border-color: var(--accent);
  outline: none;
}
.picker-trigger:active {
  background: rgba(168,85,247,0.1);
}
.picker-trigger-value {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-trigger-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}
/* Compact version for filters */
.picker-trigger-sm {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

/* ── Picker Modal (bottom sheet) ── */
.picker-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.picker-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.picker-modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding-bottom: calc(var(--safe-bottom) + 12px);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.34,1.2,0.64,1);
  will-change: transform;
}
.picker-modal-overlay.open .picker-modal {
  transform: translateY(0);
}
.picker-modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 10px auto 0;
}
.picker-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
}
.picker-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.picker-modal-done {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.picker-modal-done:active { opacity: 0.8; }
.picker-modal-body {
  padding: 8px 18px 4px;
}

/* ── Auth Page ────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid var(--border);
}
.auth-logo {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  background: linear-gradient(90deg, var(--accent), #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.auth-tab.active {
  background: var(--accent);
  color: #fff;
}
.auth-input-group {
  margin-bottom: 14px;
}
.auth-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.auth-input:focus {
  border-color: var(--accent);
}
.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.auth-submit-btn:hover { opacity: 0.9; }
.auth-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-sso-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
  transition: background 0.15s;
}
.auth-sso-btn:hover { background: var(--surface); }
.auth-verify-banner {
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-top: 16px;
}
.auth-verify-banner p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.auth-verify-resend {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.auth-forgot {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  display: block;
  margin: 8px auto 0;
}
.auth-view.hidden { display: none; }
.auth-recovery { margin-top: 4px; }
.auth-recovery.hidden { display: none; }
.auth-recovery-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin-bottom: 14px;
}
.auth-recovery-back:hover { color: var(--text); }
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  white-space: nowrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.auth-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Admin Dashboard ──────────────────────────────────────────────────────── */
.admin-mobile-warn {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg);
  flex-direction: column;
  gap: 16px;
}
.admin-mobile-warn h2 { font-size: 22px; font-weight: 800; color: var(--text); }
.admin-mobile-warn p { color: var(--text-muted); font-size: 15px; line-height: 1.5; }
@media (max-width: 767px) {
  .admin-mobile-warn { display: flex; }
  .admin-layout { display: none !important; }
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  background: var(--bg);
}
.admin-sidebar {
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 24px 20px 20px;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar-logo span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-text-fill-color: var(--text-muted);
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-nav {
  padding: 12px 0;
  flex: 1;
}
.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.15s;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}
.admin-nav-btn:hover { background: var(--surface2); color: var(--text); }
.admin-nav-btn.active { background: rgba(168,85,247,0.12); color: var(--accent); border-left: 3px solid var(--accent); padding-left: 17px; }
.admin-nav-btn svg { flex-shrink: 0; }
.admin-main {
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-topbar-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-right: auto;
}
.admin-search {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 220px;
  transition: border-color 0.15s;
}
.admin-search:focus { border-color: var(--accent); }
.admin-logout-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.admin-logout-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.admin-content {
  padding: 24px 28px;
  flex: 1;
}
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.admin-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 11px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr { background: var(--surface2); }
.admin-table tr:nth-child(even) { background: var(--surface); }
.admin-table tr:hover td { background: rgba(168,85,247,0.05); }
.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
}
.admin-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.admin-badge-active { background: rgba(34,197,94,0.15); color: #22c55e; }
.admin-badge-blocked { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-badge-pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.admin-badge-resolved { background: rgba(100,116,139,0.15); color: #94a3b8; }
.admin-action-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity 0.15s;
  margin-right: 6px;
}
.admin-action-btn:last-child { margin-right: 0; }
.admin-action-view { background: rgba(168,85,247,0.15); color: var(--accent); }
.admin-action-view:hover { background: rgba(168,85,247,0.28); }
.admin-action-block { background: rgba(239,68,68,0.12); color: #ef4444; }
.admin-action-block:hover { background: rgba(239,68,68,0.25); }
.admin-action-unban { background: rgba(34,197,94,0.12); color: #22c55e; }
.admin-action-unban:hover { background: rgba(34,197,94,0.25); }
.admin-action-dismiss { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }
.admin-action-dismiss:hover { background: var(--surface2); }
/* Drawer */
.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.admin-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.admin-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 95vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.admin-drawer.open { transform: translateX(0); }
.admin-drawer-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-drawer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-drawer-name { font-size: 17px; font-weight: 800; color: var(--text); }
.admin-drawer-handle { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.admin-drawer-close {
  margin-left: auto;
  background: var(--surface2);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.admin-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.admin-drawer-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 14px 20px 4px;
  border-bottom: 1px solid var(--border);
}
.admin-drawer-no-photos {
  padding: 14px 20px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.admin-drawer-photo-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.admin-drawer-photo-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
.admin-drawer-photo-thumb:hover { opacity: 0.85; }
.admin-drawer-photo-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1.5;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
}
.admin-drawer-photo-badge:hover { filter: brightness(1.18); transform: scale(1.06); }
.admin-drawer-photo-badge:active { transform: scale(0.95); }
.admin-drawer-photo-badge.sfw {
  background: rgba(34,197,94,0.85);
  color: #fff;
}
.admin-drawer-photo-badge.nsfw {
  background: rgba(239,68,68,0.88);
  color: #fff;
}
.admin-drawer-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.admin-drawer-field:last-child { border-bottom: none; }
.admin-drawer-field-key { color: var(--text-muted); font-weight: 500; }
.admin-drawer-field-val { color: var(--text); font-weight: 600; text-align: right; max-width: 60%; }
.admin-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.admin-drawer-block-btn {
  flex: 1;
  padding: 11px;
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.admin-drawer-block-btn:hover { background: rgba(239,68,68,0.25); }
.admin-drawer-close-btn {
  flex: 1;
  padding: 11px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.admin-drawer-close-btn:hover { background: var(--surface); }
.admin-drawer-delete-btn {
  flex: 1;
  padding: 11px;
  background: rgba(185,28,28,0.12);
  color: #dc2626;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.admin-drawer-delete-btn:hover { background: rgba(185,28,28,0.25); }
/* Banner panel */
.admin-banner-preview {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 12px;
  padding: 14px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  text-align: center;
}
.admin-banner-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 14px;
}
.admin-banner-textarea:focus { border-color: var(--accent); }
.admin-save-btn {
  padding: 11px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.admin-save-btn:hover { opacity: 0.9; }
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  white-space: nowrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.admin-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
/* Logout button in My Profile */
.profile-logout-btn {
  width: 100%;
  padding: 13px;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.profile-logout-btn:hover { background: rgba(239,68,68,0.2); }

/* Admin filter row */
.admin-filter-row th {
  background: var(--bg);
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
}
.admin-filter-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.admin-filter-input:focus { border-color: var(--accent); }
/* Banner toggle pill */
.admin-banner-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.admin-banner-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.admin-banner-toggle-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-banner-on-off {
  display: flex;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-banner-on-off button {
  padding: 7px 18px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-muted);
}
.admin-banner-on-off button.on-active  { background: rgba(34,197,94,0.18); color: #22c55e; }
.admin-banner-on-off button.off-active { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-banner-url-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 10px;
}
.admin-banner-url-input:focus { border-color: var(--accent); }

/* ── Admin: Verify button in drawer footer ─────────────────────────────────── */
.admin-drawer-verify-btn {
  flex: 1;
  padding: 11px;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.admin-drawer-verify-btn:hover { background: rgba(34,197,94,0.25); }
.admin-drawer-verify-btn.unverify { background: rgba(245,158,11,0.12); color: #f59e0b; }
.admin-drawer-verify-btn.unverify:hover { background: rgba(245,158,11,0.25); }

/* Moderator button in drawer footer */
.admin-drawer-mod-btn {
  flex: 1;
  padding: 11px;
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.admin-drawer-mod-btn:hover { background: rgba(245,158,11,0.22); }

/* Moderator modal */
.admin-mod-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
}
.admin-mod-modal-overlay.open { display: block; }
.admin-mod-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  z-index: 2001;
  padding: 24px;
  font-family: inherit;
}
.admin-mod-modal.open { display: block; }
.admin-mod-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 18px;
}
.admin-mod-modal-body { display: flex; flex-direction: column; gap: 10px; }
.admin-mod-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
}
.admin-mod-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.admin-mod-current {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
}
.admin-mod-modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ── Admin: Cruise pills in users table ────────────────────────────────────── */
.admin-cruise-pill {
  display: inline-block;
  background: rgba(168,85,247,0.1);
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}

/* ── Admin: Orange action button (Remove Photo) ────────────────────────────── */
.admin-action-orange { background: rgba(245,158,11,0.15); color: #f59e0b; }
.admin-action-orange:hover { background: rgba(245,158,11,0.28); }

/* ── Admin: Photo lightbox modal ───────────────────────────────────────────── */
.admin-photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.admin-photo-modal.open { display: flex; }
.admin-photo-modal-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* ── Admin Pagination ─────────────────────────────────────────────────────────*/
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-page-info {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.admin-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.admin-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  background: var(--surface2, rgba(255,255,255,0.04));
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.admin-page-btn:hover:not(:disabled) {
  background: rgba(168,85,247,0.12);
  border-color: rgba(168,85,247,0.3);
  color: var(--accent, #a855f7);
}
.admin-page-btn.active {
  background: rgba(168,85,247,0.18);
  border-color: rgba(168,85,247,0.4);
  color: var(--accent, #a855f7);
}
.admin-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.admin-page-ellipsis {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 4px;
  line-height: 32px;
}

/* ── Admin: Cruises panel ──────────────────────────────────────────────────── */
.admin-cruise-form {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px 16px;
  margin-bottom: 24px;
}
.admin-cruise-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.admin-cruise-form .admin-filter-input {
  padding: 8px 12px;
  font-size: 13px;
  width: 100%;
}
.admin-cruise-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.admin-cruise-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.2s;
}
.admin-cruise-card.inactive { opacity: 0.5; }
.admin-cruise-card-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-cruise-card-ship  { font-size: 12px; color: var(--text-muted); }
.admin-cruise-card-dates { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-cruise-card-id {
  display: inline-block;
  background: rgba(168,85,247,0.1);
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  width: fit-content;
}
.admin-cruise-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

/* ── Admin: Sortable table headers ─────────────────────────────────────────── */
.admin-th-sort { cursor: pointer; user-select: none; position: relative; padding-right: 22px !important; }
.admin-th-sort:hover { color: var(--text); background: var(--surface2); }
.admin-th-sort::after { content: ''; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text-muted); opacity: 0.4; }
.admin-th-sort.asc::after  { content: '▲'; opacity: 1; color: var(--accent); }
.admin-th-sort.desc::after { content: '▼'; opacity: 1; color: var(--accent); }

/* ── Admin: Photo block overlay in drawer ──────────────────────────────────── */
.admin-photo-wrap { position: relative; border-radius: 8px; overflow: hidden; }
.admin-photo-wrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; transition: filter 0.2s; }
.admin-photo-wrap.blocked img { filter: brightness(0.25) grayscale(1); }
.admin-photo-block-btn {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: rgba(239,68,68,0.88); color: #fff; border: none; border-radius: 6px;
  padding: 4px 9px; font-size: 10px; font-weight: 700; font-family: inherit;
  cursor: pointer; opacity: 0; transition: opacity 0.15s; white-space: nowrap; z-index: 2;
}
.admin-photo-wrap:hover .admin-photo-block-btn { opacity: 1; }
.admin-photo-wrap.blocked .admin-photo-block-btn { background: rgba(34,197,94,0.88); opacity: 0; }
.admin-photo-wrap.blocked:hover .admin-photo-block-btn { opacity: 1; }
.admin-photo-blocked-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; pointer-events: none; z-index: 1;
}
.admin-photo-blocked-overlay span { font-size: 10px; font-weight: 700; color: #ef4444; letter-spacing: 0.05em; text-transform: uppercase; }
.admin-avatar-wrap { position: relative; display: inline-block; }
.admin-avatar-photo-blocked-dot {
  position: absolute; top: -2px; right: -2px; width: 10px; height: 10px;
  background: #ef4444; border-radius: 50%; border: 2px solid var(--surface2);
}

/* ── Admin: Additional report status badges ────────────────────────────────── */
.admin-badge-dismissed     { background: rgba(100,116,139,0.15); color: #94a3b8; }
.admin-badge-user-blocked  { background: rgba(239,68,68,0.15);   color: #ef4444; }
.admin-badge-photo-removed { background: rgba(245,158,11,0.15);  color: #f59e0b; }

/* ── Admin: Verification codes panel ───────────────────────────────────────── */
.admin-code-pill {
  display: inline-block; font-family: 'Menlo','Consolas',monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  background: rgba(168,85,247,0.1); color: var(--accent); border-radius: 6px; padding: 3px 9px;
}
.admin-codes-add-form {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 20px 16px; margin-bottom: 24px;
}
.admin-codes-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.admin-codes-form-grid .admin-filter-input { padding: 8px 12px; font-size: 13px; width: 100%; }

/* ── Sexual Health Section (My Profile) ──────────────────────────────────── */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Sexual Health Section (Profile Modal) ───────────────────────────────── */
.modal-health-body { display: flex; flex-direction: column; gap: 8px; }
.health-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.health-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; min-width: 90px; }
.health-value { font-size: 14px; color: var(--text); }

/* ── NSFW Share Button (Profile Modal) ────────────────────────────────────── */
.modal-nsfw-share-wrap { padding: 4px 0; }
.nsfw-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.nsfw-share-btn:active { background: rgba(168,85,247,0.18); transform: scale(0.98); }
.nsfw-share-btn:disabled { opacity: 0.55; cursor: default; }
.nsfw-share-btn svg { stroke: currentColor; flex-shrink: 0; }

/* ── Chats Tab ─────────────────────────────────────────────────────────────── */

/* Full-height page container */
/* ── Chats tab unread dot ──────────────────────────────────────────────────── */
.chats-unread-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--bg, #0a0a0a);
  pointer-events: none;
}
.chats-unread-dot.hidden { display: none; }

.chats-page {
  position: fixed;
  top: var(--header-h, 56px);
  left: 0;
  right: 0;
  bottom: calc(var(--tab-bar-h, 64px) + var(--banner-h, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Thread list view ───────────────────────────────────────────────── */
.chats-thread-list-view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chats-thread-list {
  display: flex;
  flex-direction: column;
}

/* Empty state */
.chats-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted, #888);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
  padding: 24px;
}
.chats-empty-thread {
  color: var(--text-muted, #888);
  font-size: 14px;
  text-align: center;
  padding: 32px 24px;
}

/* Thread row */
.chats-thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.chats-thread-row:active { background: var(--surface2, rgba(255,255,255,0.06)); }

/* Avatar (DMs with photo) */
.chats-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2, #2a2a2a);
}
.chats-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Icon (group / announcements) */
.chats-thread-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chats-thread-icon--announcements {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.chats-thread-icon--group,
.chats-thread-icon--custom_group {
  background: rgba(168,85,247,0.15);
  border: 1.5px solid rgba(168,85,247,0.25);
  color: var(--accent, #a855f7);
}
.chats-thread-icon--dm {
  background: var(--surface2, #2a2a2a);
  color: var(--text-muted, #888);
}

/* Thread text */
.chats-thread-text {
  flex: 1;
  min-width: 0;
}
.chats-thread-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}
.chats-thread-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #f0f0f0);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chats-thread-ts {
  font-size: 11px;
  color: var(--text-muted, #888);
  white-space: nowrap;
  flex-shrink: 0;
}
.chats-thread-preview {
  font-size: 13px;
  color: var(--text-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chats-thread-preview--empty {
  font-style: italic;
}

/* ── Pull-to-refresh indicator ──────────────────────────────────────── */
.chats-ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.15s ease, opacity 0.15s ease;
  color: var(--text-muted, #888);
}
.chats-ptr-indicator--loading {
  height: 40px !important;
  opacity: 1 !important;
}
.chats-ptr-spinner {
  transition: transform 0.15s ease;
}
.chats-ptr-indicator--loading .chats-ptr-spinner {
  animation: chats-ptr-spin 0.8s linear infinite;
}
@keyframes chats-ptr-spin {
  to { transform: rotate(360deg); }
}

/* ── Thread list header (title + New Group button) ──────────────────── */
.chats-thread-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  flex-shrink: 0;
}
.chats-thread-list-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #f0f0f0);
}
.chats-new-group-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #e55a5a);
  background: none;
  border: 1.5px solid var(--accent, #e55a5a);
  border-radius: 20px;
  padding: 4px 12px 4px 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.chats-new-group-btn:hover {
  background: var(--accent, #e55a5a);
  color: #fff;
}

/* ── Unread badge on thread list rows ───────────────────────────────── */
.chats-unread-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #e55a5a);
  flex-shrink: 0;
  align-self: center;
}
.chats-thread-name--unread {
  font-weight: 700;
}

/* ── Leave group button in detail header ────────────────────────────── */
.chats-leave-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #888);
  background: none;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 14px;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.chats-leave-btn:hover {
  color: #e55a5a;
  border-color: #e55a5a;
}

/* ── Add People button in detail header ──────────────────────────────── */
.chats-add-people-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.chats-add-people-btn:hover {
  color: var(--accent, #a855f7);
  background: rgba(168, 85, 247, 0.1);
}

/* ── Notification bell toggle in detail header ───────────────────────── */
.chats-notif-btn {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.chats-notif-btn--on {
  color: var(--accent, #a855f7);
}
.chats-notif-btn:active { background: var(--surface2, rgba(255,255,255,0.06)); }

/* ── System messages ("X left the group", "X added Y") ──────────────── */
.chats-system-message {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #8888a0);
  padding: 6px 16px;
  margin: 6px 0;
  font-style: italic;
  user-select: none;
  pointer-events: none;
}

/* ── Create group name-row (hidden in add-people mode) ───────────────── */
.create-group-name-row { display: contents; }
.create-group-name-row.hidden { display: none !important; }

/* ── Create Group Chat Modal ─────────────────────────────────────────── */
.create-group-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.create-group-overlay.hidden { display: none; }
.create-group-modal {
  background: var(--surface, #1c1c1e);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.create-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}
.create-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #f0f0f0);
}
.create-group-close {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted, #888);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}
.create-group-body {
  padding: 14px 18px 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.create-group-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #888);
  margin-bottom: 6px;
}
.create-group-name-input {
  width: 100%;
  background: var(--surface2, #2c2c2e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  color: var(--text, #f0f0f0);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  box-sizing: border-box;
}
.create-group-name-input:focus {
  border-color: var(--accent, #e55a5a);
}
.create-group-required {
  color: var(--accent, #e55a5a);
  font-weight: 700;
  margin-left: 2px;
}
.create-group-search-wrap {
  margin: 8px 0 6px;
}
.create-group-search {
  width: 100%;
  background: var(--surface2, #2c2c2e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  color: var(--text, #f0f0f0);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  box-sizing: border-box;
}
.create-group-search:focus {
  border-color: var(--accent, #e55a5a);
}
.create-group-search::placeholder {
  color: var(--text-muted, #888);
}
.create-group-loading {
  color: var(--text-muted, #888);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}
.create-group-member-list {
  margin-top: 4px;
  max-height: 40vh;
  overflow-y: auto;
}
.create-group-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.create-group-member-row:hover,
.create-group-member-row.selected {
  background: var(--surface2, #2c2c2e);
}
.create-group-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2, #333);
  display: flex;
  align-items: center;
  justify-content: center;
}
.create-group-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.create-group-member-initial {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted, #888);
}
.create-group-member-name {
  flex: 1;
  font-size: 14px;
  color: var(--text, #f0f0f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.create-group-member-check {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #e55a5a);
  flex-shrink: 0;
}
.create-group-member-check.hidden { display: none; }
.create-group-footer {
  padding: 12px 18px 20px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}
.create-group-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent, #e55a5a);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.create-group-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Thread detail view ─────────────────────────────────────────────── */
.chats-thread-detail-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.chats-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  background: var(--bg);
  flex-shrink: 0;
}
.chats-back-btn {
  background: none;
  border: none;
  color: var(--accent, #7c3aed);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.chats-back-btn:active { background: var(--surface2, rgba(255,255,255,0.06)); }
.chats-detail-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.chats-detail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.08);
}
.chats-detail-avatar--group {
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #a855f7);
}
.chats-detail-avatar--announcements {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.chats-detail-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #f0f0f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chats-detail-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  flex-shrink: 0;
}

/* Message feed */
.chats-message-feed {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Bubbles */
.chats-bubble {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
.chats-bubble--own {
  align-self: flex-end;
  align-items: flex-end;
}
.chats-bubble--other {
  align-self: flex-start;
  align-items: flex-start;
}
.chats-bubble-author {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #888);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chats-admin-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}
.chats-bubble-body {
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.chats-bubble--own .chats-bubble-body {
  background: var(--accent, #7c3aed);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chats-bubble--other .chats-bubble-body {
  background: var(--surface2, rgba(255,255,255,0.08));
  color: var(--text, #f0f0f0);
  border-bottom-left-radius: 4px;
}
.chats-bubble-body--deleted {
  font-style: italic;
  opacity: 0.45;
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px dashed var(--border, rgba(255,255,255,0.1));
}
.chats-bubble-meta {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chats-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.12s;
}
.chats-delete-btn:hover { opacity: 1; }

.chats-report-btn {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.12s, color 0.12s;
}
.chats-report-btn:hover { opacity: 1; color: rgba(255, 80, 80, 0.8); }
.chats-report-btn:disabled { opacity: 0.25; cursor: default; }

/* Typing indicator */
.chats-typing-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 16px 6px;
  min-height: 22px;
  flex-shrink: 0;
}
.chats-typing-indicator.hidden { display: none; }
.chats-typing-text {
  font-size: 12px;
  color: var(--text-muted, #888);
  font-style: italic;
}
.chats-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.chats-typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted, #888);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.chats-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chats-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* Thread-list row typing indicator */
.chats-thread-preview--typing {
  display: flex;
  align-items: center;
  gap: 5px;
  font-style: italic;
  color: var(--text-muted, #888);
}
.chats-thread-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.chats-thread-typing-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted, #888);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.chats-thread-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chats-thread-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
.chats-thread-typing-label {
  font-size: 12px;
  color: var(--text-muted, #888);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compose box */
.chats-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.07));
  background: var(--bg);
  flex-shrink: 0;
}
.chats-compose-input {
  flex: 1;
  background: var(--surface2, rgba(255,255,255,0.07));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 20px;
  color: var(--text, #f0f0f0);
  font-size: 14px;
  font-family: inherit;
  padding: 9px 14px;
  resize: none;
  outline: none;
  line-height: 1.4;
  max-height: 100px;
  overflow-y: auto;
}
.chats-compose-input::placeholder { color: var(--text-muted, #888); }
.chats-compose-input:focus { border-color: var(--accent, #7c3aed); }
.chats-compose-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.chats-char-count {
  font-size: 10px;
  color: var(--text-muted, #888);
}
.chats-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent, #7c3aed);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  flex-shrink: 0;
}
.chats-send-btn:active { transform: scale(0.92); }

/* Camera / photo-picker button in compose bar */
.chats-photo-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--surface2, rgba(255,255,255,0.07));
  color: var(--text-muted, #888);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.chats-photo-btn:hover, .chats-photo-btn:focus-visible {
  background: rgba(168,85,247,0.15);
  color: var(--accent, #7c3aed);
}
.chats-photo-btn:active { transform: scale(0.92); }

/* Photo picker panel (slides up above compose bar) */
.chat-photo-picker {
  display: flex;
  flex-direction: column;
  background: var(--surface, rgba(255,255,255,0.05));
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  flex-shrink: 0;
  max-height: 220px;
}
.chat-photo-picker.hidden { display: none; }
.chat-photo-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #888);
}
.chat-photo-picker-close {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.chat-photo-picker-grid {
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 0 14px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-picker-tile {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
}
.chat-picker-tile:hover, .chat-picker-tile:active {
  border-color: var(--accent, #7c3aed);
  transform: scale(0.96);
}
.chat-picker-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-picker-img--blurred { filter: blur(8px); }
.chat-picker-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1.3;
}
.chat-picker-badge--nsfw {
  background: rgba(255,70,70,0.85);
  color: #fff;
}
.chat-picker-badge--private {
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
}
.chat-picker-empty {
  font-size: 13px;
  color: var(--text-muted, #888);
  padding: 4px 0 12px;
}

/* Message bubble: image */
.chats-bubble-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.chats-bubble-img {
  display: block;
  max-width: 220px;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}
.chats-bubble-img-wrap.chats-bubble-img--blurred img {
  filter: blur(14px);
  pointer-events: none;
}
.chats-bubble-img-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}
.chats-bubble-caption {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

/* Group chat — row wrapper that holds avatar + bubble column side by side */
.chats-bubble-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
  align-self: flex-start;
}
.chats-bubble-own-wrap {
  display: flex;
  justify-content: flex-end;
}

/* Sender avatar in group chats */
.chats-bubble-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2, rgba(255,255,255,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #aaa);
  flex-shrink: 0;
  cursor: pointer;
  margin-bottom: 18px; /* align bottom of avatar with bottom of bubble (above meta row) */
}
.chats-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* When bubble is inside a row, remove its own max-width constraint (row handles width) */
.chats-bubble-row > .chats-bubble {
  max-width: 100%;
}

/* ── Chat image lightbox ─────────────────────────────────────────────────── */
.chat-img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chatLightboxIn 0.18s ease;
}
.chat-img-lightbox.hidden { display: none; }
@keyframes chatLightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.chat-img-lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  user-select: none;
}
.chat-img-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chat-img-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Announcements notice (non-admin read-only) */
.chats-announce-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.07));
  font-size: 13px;
  color: var(--text-muted, #888);
  background: var(--bg);
  flex-shrink: 0;
}
.chats-announce-notice svg { stroke: currentColor; flex-shrink: 0; }

/* ── Modal Message button — sits between carousel and profile body ─────── */
.modal-message-btn-wrap {
  padding: 10px 16px 0;
}
.modal-message-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 13px 16px;
  background: var(--accent, #7c3aed);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}
.modal-message-btn:active { opacity: 0.85; transform: scale(0.98); }
.modal-message-btn svg { stroke: currentColor; flex-shrink: 0; }

/* ── Modal Moderator badge ────────────────────────────────────────────── */
.modal-mod-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.4);
  color: #3b82f6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 6px;
  vertical-align: middle;
  line-height: 1.5;
}

/* ── Modal Moderator section label ───────────────────────────────────── */
.modal-mod-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(251,146,60,0.7);
  margin: 0;
}

/* ── Modal Moderator action buttons ──────────────────────────────────── */
.modal-mod-actions {
  display: flex;
  gap: 8px;
  margin: 4px 0 8px;
}
.modal-mod-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 11px 14px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 12px;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.modal-mod-action-btn:active { background: rgba(245,158,11,0.18); transform: scale(0.98); }
.modal-mod-action-btn svg { flex-shrink: 0; }
.modal-mod-ban-btn {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.modal-mod-ban-btn:active { background: rgba(239,68,68,0.18); }

/* ── Mod ban reason row ───────────────────────────────────────────────── */
.modal-ban-reason-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
}
.modal-ban-reason-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 10px;
  outline: none;
}
.modal-ban-reason-input::placeholder { color: var(--text-muted); }
.modal-ban-reason-input:focus {
  border-color: rgba(239,68,68,0.5);
}
.modal-ban-confirm-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.modal-ban-confirm-btn:active { background: rgba(239,68,68,0.22); }

/* ── Carousel ban-photo button (moderator only) ───────────────────────── */
.carousel-ban-btn {
  position: absolute;
  bottom: 40px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(239,68,68,0.82);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
  z-index: 5;
}
.carousel-ban-btn:active { background: rgba(220,38,38,0.9); }

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITIES TAB
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page layout ─────────────────────────────────────────────────────────── */
.activities-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-h, 58px);
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  background: var(--bg);
}

.activities-header {
  display: flex;
  align-items: center;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}

.activities-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  flex: 1;
}

.activities-new-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent, #a855f7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.activities-new-btn:active { opacity: 0.75; }

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 8px;
}

/* 2-column tile layout when > 6 active events */
.activities-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 10px 8px;
}

.activities-list--grid .activity-card-cover,
.activities-list--grid .activity-card-cover--placeholder {
  height: 100px;
}

.activities-list--grid .activity-card-title {
  font-size: 13px;
}

.activities-list--grid .activity-card-meta {
  font-size: 11px;
}

.activities-list--grid .activity-card-body {
  padding: 8px 10px 10px;
}

.activities-list--grid .activity-card-footer {
  font-size: 11px;
}

.activities-list--grid .activity-card-chip {
  font-size: 10px;
  padding: 2px 7px;
}

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

.activities-empty-inline {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
}

/* ── Activity Card ───────────────────────────────────────────────────────── */
.activity-card {
  background: var(--surface2, #1e1e2a);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.14s;
}
.activity-card:active { transform: scale(0.985); }

.activity-card-cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.activity-card-cover--placeholder {
  background: linear-gradient(135deg, var(--accent2, #7c3aed), var(--accent, #a855f7));
  height: 150px;
}

.activity-card-body {
  padding: 12px 14px 14px;
}

.activity-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.activity-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.activity-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.activity-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-card-attendees {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-card-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
}

.activity-card-chip--going {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.activity-card-chip--join {
  background: var(--accent, #a855f7);
  color: #fff;
}

/* ── Create / Edit Activity Modal ────────────────────────────────────────── */
.act-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.act-modal-overlay.hidden { display: none; }

.act-modal {
  background: var(--surface, #1c1c1e);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease;
}

.act-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}

.act-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.act-modal-close {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}

.act-modal-body {
  padding: 14px 18px 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.act-modal-footer {
  padding: 12px 18px 24px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}

.act-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 10px;
}
.act-label:first-child { margin-top: 0; }

.act-input {
  width: 100%;
  background: var(--surface2, #2c2c2e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.act-input:focus { border-color: var(--accent, #a855f7); }

.act-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.4;
}

/* Start date + time side-by-side */
.act-start-row {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.act-start-date {
  flex: 1.4;
  min-width: 0;
}

.act-start-time {
  flex: 1;
  min-width: 0;
}

/* Cover photo picker */
.act-cover-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.act-cover-preview {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2, #2c2c2e);
  flex-shrink: 0;
}
.act-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.act-cover-btn {
  background: none;
  border: none;
  color: var(--accent, #a855f7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* Photo source picker panel (inside modal body) */
.act-photo-source {
  background: var(--surface2, #2c2c2e);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.act-photo-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.act-photo-source-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #fff);
}

.act-photo-source-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-family: inherit;
}

.act-photo-source-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.act-photo-source-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}

.act-photo-source-thumb:active { opacity: 0.7; }

.act-photo-source-thumb--selected {
  border-color: var(--accent, #a855f7);
}

.act-photo-source-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  margin: 0;
  grid-column: 1 / -1;
}

.act-photo-source-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px;
  background: var(--surface, #1c1c1e);
  border: 1px solid var(--border, #3a3a3c);
  border-radius: 10px;
  color: var(--accent, #a855f7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Date validation error */
.act-date-error {
  color: #f87171;
  font-size: 13px;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.4;
}
.act-date-error.hidden { display: none; }

/* Submit button */
.act-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.act-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Activity Detail Sheet ────────────────────────────────────────────────── */
.act-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.act-detail-overlay.hidden { display: none; }

.act-detail-sheet {
  background: var(--surface, #1c1c1e);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: slideUp 0.22s ease;
}

.act-detail-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  line-height: 1;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.act-detail-cover {
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
}
.act-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.act-detail-body {
  padding: 18px 18px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.act-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.act-detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.act-detail-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Attendee strip */
.act-detail-attendees {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.act-attendee-avatars {
  display: flex;
  gap: -4px;
}

.act-attendee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface, #1c1c1e);
  margin-left: -6px;
  background: var(--surface2);
}
.act-attendee-avatar:first-child { margin-left: 0; }

.act-attendee-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.act-attendee-avatar--more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.act-attendees-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* Host / guest people sections */
.act-people-section {
  margin-bottom: 16px;
}

.act-people-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.act-people-count {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.act-people-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.act-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.act-person-row:active {
  background: var(--surface2, #2c2c2e);
}

.act-person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.act-person-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.act-person-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #fff);
}

/* Blocked member stub in activity member lists */
.act-person-row--blocked {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.act-person-avatar--blocked {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2, #2c2c2e);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-person-avatar--blocked::after {
  content: "🚫";
  font-size: 16px;
}

.act-person-name--blocked {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted, #8e8e93);
  font-style: italic;
}

/* Share + Report button row */
.act-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

/* Share button */
.act-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2, rgba(255,255,255,0.07));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  color: var(--text-muted, #aaa);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.act-share-btn:active { opacity: 0.7; }

/* Report button */
.act-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.25);
  color: rgba(239,68,68,0.7);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.act-report-btn:active { opacity: 0.7; }

/* Expired event banner */
.act-expired-banner {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
}

/* Join / chat / creator buttons */
.act-join-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent, #a855f7);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
  margin-bottom: 10px;
}
.act-join-btn--going {
  background: rgba(239,68,68,0.14);
  color: #f87171;
}
.act-join-btn:active { opacity: 0.8; }

.act-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: var(--surface2, #2c2c2e);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 14px;
  transition: background 0.15s;
}
.act-chat-btn:active { background: var(--surface, #1c1c1e); }

.act-creator-actions {
  display: flex;
  gap: 10px;
}

.act-edit-btn,
.act-delete-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

.act-edit-btn {
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  color: var(--text-muted);
}

.act-delete-btn {
  border: 1px solid rgba(239,68,68,0.4);
  color: #ef4444;
}

/* ── Cruise Card Fullscreen Overlay ── */
.card-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.card-fullscreen-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.card-fullscreen-inner {
  max-width: min(420px, 92vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 20px;
}
.card-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 36px;
  text-align: center;
  padding: 0;
}
#cruiseCard { cursor: pointer; }

/* ── Push / iOS install banner ─────────────────────────────────────────────── */
.push-banner {
  position: fixed;
  bottom: 68px;          /* sit just above the bottom nav bar */
  left: 12px;
  right: 12px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: #1e1e2e;
  border: 1px solid rgba(168,85,247,0.30);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  font-size: 13px;
  color: var(--text);
  /* hidden off-screen below until shown */
  transform: translateY(calc(100% + 80px));
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34,1.20,0.64,1), opacity 0.22s ease;
  pointer-events: none;
}
.push-banner--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.push-banner__text {
  flex: 1;
  line-height: 1.35;
}
.push-banner__enable {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.push-banner__enable:active { opacity: 0.75; }
.push-banner__dismiss {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: background 0.15s;
}
.push-banner__dismiss:active { background: rgba(255,255,255,0.15); }
/* iOS variant: no Enable button, slightly different text colour */
.push-banner--ios { border-color: rgba(99,179,237,0.30); }
.push-banner--ios .push-banner__text { color: var(--text-muted); }
