/* Bright brand surfaces; functionality and media rules remain in style.css. */
:root {
  --brand-gradient: linear-gradient(120deg, #7e22ce 0%, #9333ea 48%, #be185d 100%);
  --brand-halo: 0 8px 24px rgba(147,51,234,.22);
}
body { -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.btn-primary, .btn-send { background: var(--brand-gradient); }
.btn-primary:hover, .btn-send:hover { background: var(--brand-gradient); filter: brightness(1.08); }
.btn-primary { min-height: 44px; font-weight: 700; box-shadow: var(--brand-halo); }
.btn-secondary { min-height: 44px; }
.btn-icon, .btn-input-action, .btn-send { min-width: 44px; min-height: 44px; }
.btn-primary:disabled, .btn-secondary:disabled { filter: none; transform: none; opacity: .5; box-shadow: none; cursor: not-allowed; }
#tab-discover .discover-header { padding: 24px; border-radius: 28px; background: var(--brand-gradient); color: #fff; box-shadow: var(--brand-halo); }
#tab-discover .discover-header .header-text-part h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.035em; }
#tab-discover .discover-header .header-text-part p { color: #fff; line-height: 1.5; font-size: .92rem; }
#tab-discover .discover-header .btn-icon { color: #fff; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); }
.discover-search-bar { min-width: 0; min-height: 48px; background: var(--bg-secondary); border-color: var(--border-light); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.discover-search-bar input { min-width: 0; min-height: 46px; }
#tab-discover .discover-tag-chip { color: #fff; background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.3); }
#tab-discover .discover-tag-chip.active { color: #6b21a8; background: #fff; border-color: #fff; }
.discover-people-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 14px; }
.discover-people-heading h2 { font-size: 1.2rem; letter-spacing: -.02em; }
.discover-people-heading span { color: var(--text-secondary); font-size: .85rem; }
.discover-grid { gap: 20px; }
.discover-card { border-radius: 24px; }
.discover-card:hover { transform: translateY(-4px); }
.discover-card-body { padding: 26px 16px 16px; background: linear-gradient(180deg, transparent, rgba(12,6,24,.65) 30%, rgba(12,6,24,.96)); }
.discover-card-actions .btn-primary { background: var(--brand-gradient); border-color: rgba(255,255,255,.25); min-height: 44px; font-size: .85rem; }
.discover-card-actions .btn-primary:hover { background: var(--brand-gradient); }
.discover-promo-row { margin-top: 28px; }
.ai-matchmaker-section, .qotd-section { border-radius: 24px; }
.ai-matchmaker-section .premium-lock { flex-wrap: wrap; line-height: 1.5; }
.profile-hero-card { border-color: rgba(147,51,234,.25); box-shadow: var(--brand-halo); }
.profile-hero-card::before { background: radial-gradient(ellipse at top right, rgba(219,39,119,.15), transparent 65%); }
.nav-btn { min-height: 44px; border-radius: 14px; }
.nav-btn.active { background: var(--brand-gradient); color: #fff; box-shadow: var(--brand-halo); }
.chat-thread-item { border-radius: 16px; padding: 14px 12px; }
.chat-thread-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.thread-top h4 { font-size: .9rem; }
.thread-snippet { font-size: .82rem; line-height: 1.5; }
.chat-header { min-height: 76px; }
.mask-level-badge { padding: 4px 8px; font-size: .72rem; font-weight: 600; }
.btn-reveal-identity { min-height: 44px; padding: 8px 12px; font-weight: 600; }
.msg-bubble { padding: 12px 15px; border-radius: 18px; font-size: .94rem; line-height: 1.55; }
.msg-row.sent .msg-bubble:not(.msg-bubble--image):not(.msg-bubble--video):not(.msg-bubble--gift) { background: var(--brand-gradient); }
.msg-bubble--image, .msg-bubble--video { padding: 0; }
.chat-input-area { border-top-color: var(--border-light); }
body.light-theme { --text-secondary: #5e536e; --text-dim: #6c607c; }
@media (max-width: 600px) {
  #tab-discover .discover-header { padding: 20px 16px; border-radius: 22px; }
  .discover-grid { gap: 12px; }
  .discover-card { border-radius: 20px; }
  .discover-card-body { padding: 24px 12px 12px; }
  .discover-card-actions .btn-primary { padding: 8px; font-size: .78rem; }
  .discover-people-heading { align-items: flex-start; flex-direction: column; }
  .chat-header { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Empty auxiliary sections should not push people below the fold. */
.nearby-section:not(:has(.nearby-chip)) { display: none; }
#qotdMiniSection:has(#qotdMiniQuestion:empty) { display: none; }

#tab-discover .discover-search-bar .btn-icon { color: var(--text-primary); background: var(--bg-glass); border-color: var(--border-light); flex-shrink: 0; }
.mobile-nav { display: none; }
@media (max-width: 768px) {
  .main-content { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 50; display: flex; gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-secondary); border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  }
  .mobile-nav .nav-btn { flex: 1; min-width: 0; min-height: 54px; margin: 0; padding: 8px 2px; display: flex; flex-direction: column; justify-content: center; gap: 5px; font-size: .64rem; }
  .mobile-nav .nav-btn i { font-size: 1.1rem; width: auto; }
  .mobile-nav .nav-btn span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
.chat-input-bar input { min-width: 0; }
.chat-input-bar > button { flex-shrink: 0; }
@media (max-width: 600px) {
  .chat-header { flex-wrap: wrap; gap: 10px; }
  .chat-user-meta { width: 100%; min-width: 0; }
  .chat-user-meta > div:last-child { min-width: 0; }
  .chat-user-meta h3 { overflow-wrap: anywhere; }
  .chat-actions { width: 100%; justify-content: flex-end; }
  .chat-actions .btn-reveal-identity { margin-right: auto; }
  .chat-list-panel { max-height: 30%; }
  .chat-input-bar { padding: 10px 8px; gap: 5px; }
}
@media (max-width: 768px) {
  #tab-chats { padding: 12px; }
  .chat-layout { height: calc(100vh - 102px - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - 102px - env(safe-area-inset-bottom, 0px)); }
  .chat-room-panel, .active-chat-container { min-height: 0; }
}
