/* ==========================================================================
   Pani Chat — "Pani Glow" design system
   Candy gradients (rose → violet), glassy surfaces, soft pink-tinted depth,
   round, chubby shapes. RTL first. Light and dark, plus Telegram's own theme.
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --rose: #ff3d81;
  --berry: #d61f69;
  --peach: #ff8a7a;
  --violet: #a855f7;
  --lilac: #c4b5fd;
  --plum: #3a0f3f;
  --gold: #ffc94d;
  --gold-deep: #f59e0b;
  --mint: #34d399;
  --alert: #f43f5e;
  --info: #8b5cf6;

  --grad: linear-gradient(135deg, var(--rose) 0%, var(--violet) 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 61, 129, 0.14), rgba(168, 85, 247, 0.14));
  --grad-warm: linear-gradient(135deg, #ff8a7a, #ff3d81);

  --bg: #fff7fa;
  --bg-2: #ffeef5;
  --surface: #ffffff;
  --surface-2: #fff1f6;
  --surface-3: #ffe4ee;
  --glass: rgba(255, 255, 255, 0.72);
  --text: #2a1236;
  --text-2: #5b3d66;
  --text-3: #9a7fa3;
  --line: rgba(58, 15, 63, 0.08);
  --line-2: rgba(58, 15, 63, 0.14);
  --shadow-sm: 0 2px 8px rgba(214, 31, 105, 0.08);
  --shadow: 0 10px 30px rgba(214, 31, 105, 0.12), 0 2px 6px rgba(58, 15, 63, 0.05);
  --shadow-lg: 0 24px 60px rgba(168, 85, 247, 0.22);
  --bubble-mine: var(--grad);
  --bubble-mine-text: #fff;
  --bubble-theirs: #ffffff;
  --bubble-theirs-text: var(--text);
  --wallpaper: url('/img/wallpaper-light.webp');

  --r-xs: 10px;
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --r-pill: 999px;
  --dock-h: 76px;
  --appbar-h: 60px;
  /* In Telegram's fullscreen mode the SDK reports the notch and its own
     floating header as --tg-*safe-area-inset-* variables. */
  --safe-b: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  --safe-t: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #14081b;
    --bg-2: #1b0b24;
    --surface: #221030;
    --surface-2: #2a1438;
    --surface-3: #351a46;
    --glass: rgba(27, 11, 36, 0.72);
    --text: #fff0f6;
    --text-2: #e0c7e8;
    --text-3: #a587b0;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 70px rgba(168, 85, 247, 0.28);
    --bubble-theirs: #2a1438;
    --wallpaper: url('/img/wallpaper-dark.webp');
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #14081b;
  --bg-2: #1b0b24;
  --surface: #221030;
  --surface-2: #2a1438;
  --surface-3: #351a46;
  --glass: rgba(27, 11, 36, 0.72);
  --text: #fff0f6;
  --text-2: #e0c7e8;
  --text-3: #a587b0;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 70px rgba(168, 85, 247, 0.28);
  --bubble-theirs: #2a1438;
  --wallpaper: url('/img/wallpaper-dark.webp');
  color-scheme: dark;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

a {
  color: var(--rose);
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(255, 61, 129, 0.28);
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  line-height: 1.4;
  font-weight: 800;
}

h1 {
  font-size: 22px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}

p {
  margin: 0 0 10px;
}

.small {
  font-size: 13px;
}
.tiny {
  font-size: 11.5px;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}
.bold {
  font-weight: 700;
}
.center {
  text-align: center;
  justify-content: center;
}
.hidden {
  display: none !important;
}
.ltr {
  direction: ltr;
  unicode-bidi: plaintext;
}
.mono {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.2px;
}
.spacer {
  flex: 1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.link {
  font-weight: 700;
}

svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Boot ──────────────────────────────────────────────────────────────── */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 61, 129, 0.35), transparent 55%), var(--bg);
  transition: opacity 0.4s ease;
}
.boot.gone {
  opacity: 0;
  pointer-events: none;
}
.boot-logo {
  width: 120px;
  height: 120px;
}
.boot-dots {
  display: flex;
  gap: 6px;
}
.boot-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  animation: dot 1.2s infinite ease-in-out;
}
.boot-dots span:nth-child(2) {
  animation-delay: 0.15s;
  background: #d04aa8;
}
.boot-dots span:nth-child(3) {
  animation-delay: 0.3s;
  background: var(--violet);
}

@keyframes dot {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Shell ─────────────────────────────────────────────────────────────── */

.shell {
  height: 100dvh;
  display: flex;
  position: relative;
}

.main {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
}

.rail {
  display: none;
}

.dock {
  position: fixed;
  z-index: 30;
  inset-inline: 12px;
  bottom: calc(10px + var(--safe-b));
  height: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr 84px 1fr 1fr;
  align-items: center;
  padding: 0 6px;
  border-radius: 26px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}
.dock.away {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}
.shell.bare .dock,
.shell.bare .rail {
  display: none !important;
}

.dock-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0;
  transition: color 0.2s, transform 0.2s;
}
.dock-tab svg {
  width: 24px;
  height: 24px;
}
.dock-tab.active {
  color: var(--rose);
}
.dock-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose);
}
.dock-tab:active {
  transform: scale(0.92);
}
.dock-tab .count {
  position: absolute;
  top: 0;
  inset-inline-start: calc(50% + 4px);
}

.dock-heart {
  justify-self: center;
  width: 66px;
  height: 66px;
  margin-top: -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  box-shadow: 0 10px 26px rgba(255, 61, 129, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border: 4px solid var(--bg);
  transition: transform 0.2s;
}
.dock-heart img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 3px rgba(58, 15, 63, 0.3));
}
.dock-heart.active {
  box-shadow: 0 0 0 4px rgba(255, 61, 129, 0.25), 0 10px 26px rgba(255, 61, 129, 0.5);
}
.dock-heart:active {
  transform: scale(0.92);
}


.offline-bar {
  position: fixed;
  top: calc(8px + var(--safe-t));
  inset-inline: 0;
  margin: 0 auto;
  width: max-content;
  z-index: 60;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background: var(--plum);
  color: #fff;
  font-size: 13px;
  /* Hidden by fading, not by sliding a fixed distance: in a fullscreen Mini App
     the top safe area is taller than any slide, which left the bar in the notch. */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0s linear 0.3s;
}
.offline-bar.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s, transform 0.3s;
}

@media (min-width: 900px) {
  .rail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 250px;
    flex-shrink: 0;
    padding: 18px 14px;
    background: var(--surface);
    border-inline-end: 1px solid var(--line);
    overflow-y: auto;
  }
  .rail-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px;
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
  }
  .rail-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .rail-brand span {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .rail-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
  }
  .rail-item:hover {
    background: var(--surface-2);
  }
  .rail-item.active {
    background: var(--grad-soft);
    color: var(--rose);
  }
  .rail-item .count {
    margin-inline-start: auto;
  }
  .rail-cta {
    margin: 4px 0 10px;
    background: var(--grad);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(255, 61, 129, 0.35);
  }
  .rail-cta:hover {
    background: var(--grad);
    filter: brightness(1.05);
  }
  .rail-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .dock {
    display: none;
  }
}

/* ─── Views ─────────────────────────────────────────────────────────────── */

.view {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px calc(var(--dock-h) + 30px + var(--safe-b));
}
.page.narrow {
  max-width: 620px;
}
@media (min-width: 900px) {
  .page {
    padding: 18px 28px 40px;
  }
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: calc(var(--appbar-h) + var(--safe-t));
  padding: var(--safe-t) 10px 0;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.appbar.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(58, 15, 63, 0.05);
}
.title-block {
  flex: 1;
  min-width: 0;
  padding-inline: 6px;
}
.title-block h1 {
  margin: 0;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-block .sub {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
}

/* Fullscreen inside Telegram: the page fills the whole screen and the app
   bar steps below Telegram's floating close / menu buttons. */
.in-telegram .shell {
  height: var(--tg-viewport-height, 100dvh);
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--text-2);
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn:active {
  transform: scale(0.9);
}
.icon-btn .dot,
.dot {
  position: absolute;
  top: 9px;
  inset-inline-end: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid var(--surface);
}

.count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 2px 6px rgba(255, 61, 129, 0.35);
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, rgba(255, 201, 77, 0.22), rgba(245, 158, 11, 0.18));
  color: #a35d00;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
:root[data-theme='dark'] .coin-pill {
  color: var(--gold);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .coin-pill {
    color: var(--gold);
  }
}
.coin-pill img {
  width: 22px;
  height: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 2px 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.15s, filter 0.2s, box-shadow 0.2s, background 0.2s;
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}
.btn.block {
  width: 100%;
}
.btn.sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13.5px;
}
.btn.lg {
  height: 54px;
  border-radius: 18px;
  font-size: 16px;
}
.btn.xl {
  height: 62px;
  border-radius: 22px;
  font-size: 18px;
}
.btn svg {
  width: 20px;
  height: 20px;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 61, 129, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-primary.glow {
  animation: glow 2.8s ease-in-out infinite;
}
@keyframes glow {
  50% {
    box-shadow: 0 10px 34px rgba(168, 85, 247, 0.5), 0 0 0 6px rgba(255, 61, 129, 0.12);
  }
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--rose);
  border: 1px solid var(--line);
}
.btn-soft {
  background: var(--grad-soft);
  color: var(--rose);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-danger {
  background: var(--alert);
  color: #fff;
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.3);
}
.btn-telegram {
  background: linear-gradient(135deg, #37aee2, #1e96c8);
  color: #fff;
  box-shadow: 0 8px 22px rgba(30, 150, 200, 0.32);
}
.btn .price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 800;
}
.btn .price img {
  width: 18px;
  height: 18px;
}
.btn.loading {
  color: transparent !important;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn-secondary.loading::after,
.btn-ghost.loading::after,
.btn-soft.loading::after {
  border-color: rgba(255, 61, 129, 0.25);
  border-top-color: var(--rose);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 61, 129, 0.2);
  border-top-color: var(--rose);
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ─── Inputs ────────────────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label,
.field .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.hint {
  font-size: 12px;
  color: var(--text-3);
}

.input,
.textarea,
.select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input.xl {
  height: 60px;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}
.textarea {
  height: auto;
  min-height: 110px;
  padding: 12px 16px;
  resize: vertical;
  line-height: 1.8;
}
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(255, 61, 129, 0.14);
}

.segmented {
  display: flex;
  padding: 4px;
  border-radius: 16px;
  background: var(--surface-2);
  gap: 4px;
}
.segmented button {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.segmented button.on {
  background: var(--surface);
  color: var(--rose);
  box-shadow: var(--shadow-sm);
}

.switch {
  position: relative;
  width: 50px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--line-2);
  transition: background 0.2s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: inset-inline-start 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.switch.on {
  background: var(--grad);
}
.switch.on::after {
  inset-inline-start: 23px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-2);
  transition: all 0.18s;
}
.chip img {
  width: 20px;
  height: 20px;
}
.chip.on {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 61, 129, 0.28);
}
.chip:active {
  transform: scale(0.95);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
}
.tag.common {
  background: var(--grad-soft);
  color: var(--rose);
}
.tag.success {
  background: rgba(52, 211, 153, 0.16);
  color: #0e9f6e;
}
.free-tag {
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: rgba(52, 211, 153, 0.15);
  color: #0e9f6e;
  font-size: 11.5px;
  font-weight: 800;
}
.coin-price,
.cp {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-size: 13px;
  color: #b26b00;
}
.coin-price img,
.cp img,
.who .coin-price img,
.filter-toggle .coin-price img {
  width: 18px;
  height: 18px;
}
:root[data-theme='dark'] .coin-price,
:root[data-theme='dark'] .cp {
  color: var(--gold);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .coin-price,
  :root:not([data-theme='light']) .cp {
    color: var(--gold);
  }
}
.btn .cp {
  color: inherit;
}

/* ─── Cards and lists ───────────────────────────────────────────────────── */

.card,
.panel {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.panel {
  margin-bottom: 14px;
}
.panel-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--grad-soft);
  color: var(--text-2);
  font-size: 13.5px;
  margin-bottom: 12px;
}
.notice img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.notice svg {
  color: var(--rose);
}
.notice.warn,
.notice.warning {
  background: rgba(255, 201, 77, 0.18);
  color: #8a5300;
}
:root[data-theme='dark'] .notice.warn {
  color: var(--gold);
}

.list {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: start;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item:hover {
  background: var(--surface-2);
}
.list-item.danger {
  color: var(--alert);
}
.li-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
}
.li-icon img {
  width: 30px;
  height: 30px;
}
.li-body {
  flex: 1;
  min-width: 0;
}
.li-title {
  font-weight: 700;
}
.li-sub {
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chev {
  color: var(--text-3);
  width: 18px;
  height: 18px;
}

/* ─── Avatars ───────────────────────────────────────────────────────────── */

.avatar {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar.sm {
  width: 40px;
  height: 40px;
  font-size: 15px;
}
.avatar.md {
  width: 48px;
  height: 48px;
}
.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.avatar.ring {
  padding: 3px;
  background: var(--grad);
}
.avatar.ring img {
  border: 3px solid var(--bg);
}
.avatar .online-dot,
.online-dot {
  position: absolute;
  bottom: 1px;
  inset-inline-end: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mint);
  border: 2.5px solid var(--surface);
}
.verified {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-inline-start: 4px;
  vertical-align: -2px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
}
.verified svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

/* ─── Home ──────────────────────────────────────────────────────────────── */

.home-bar {
  padding-inline: 14px 8px;
}
.hello {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}
.hello-name {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}
.hello-sub {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 200px;
  margin-top: 6px;
  padding: 22px 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 40%), var(--grad);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}
.hero-card:active {
  transform: scale(0.985);
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.hero-copy {
  position: relative;
  flex: 1;
  z-index: 1;
}
.hero-kicker {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}
.hero-copy h2 {
  font-size: 23px;
  margin-bottom: 6px;
}
.hero-copy p {
  font-size: 13.5px;
  opacity: 0.92;
  margin-bottom: 14px;
  max-width: 300px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 15px;
  background: #fff;
  color: var(--berry);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(58, 15, 63, 0.18);
}
.hero-mascot {
  position: relative;
  z-index: 1;
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(58, 15, 63, 0.3));
}
@media (max-width: 380px) {
  .hero-mascot {
    width: 110px;
    height: 110px;
  }
}

.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.rc-body {
  flex: 1;
  min-width: 0;
}
.more-link {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.story-row,
.card-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-inline: -16px;
  padding-inline: 16px;
  scrollbar-width: none;
}
.story-row::-webkit-scrollbar,
.card-row::-webkit-scrollbar {
  display: none;
}
.story {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 70px;
  color: var(--text);
}
.story .avatar.lg {
  width: 66px;
  height: 66px;
}
.story-name {
  font-size: 12px;
  font-weight: 700;
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story .count {
  position: absolute;
  top: -2px;
  inset-inline-end: 0;
}
.story-tg {
  position: absolute;
  top: 46px;
  inset-inline-start: 2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2aabee;
  color: #fff;
  border: 2px solid var(--bg);
}
.story-tg svg {
  width: 12px;
  height: 12px;
}

.nearby-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px dashed var(--line-2);
  color: var(--text);
}
.nearby-cta img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.nearby-cta > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nearby-cta span {
  font-size: 12.5px;
  color: var(--text-3);
}

.mini-person {
  flex-shrink: 0;
  width: 116px;
  color: var(--text);
}
.mp-photo {
  position: relative;
  width: 116px;
  height: 148px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow-sm);
}
.mp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mp-photo .online-dot {
  top: 8px;
  bottom: auto;
  inset-inline-end: 8px;
}
.mp-name {
  margin-top: 6px;
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-sub {
  font-size: 12px;
  color: var(--text-3);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px) {
  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  overflow: hidden;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tile-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-2);
}
.tile-icon img {
  width: 40px;
  height: 40px;
}
.tile.pink .tile-icon {
  background: rgba(255, 61, 129, 0.12);
}
.tile.violet .tile-icon {
  background: rgba(168, 85, 247, 0.14);
}
.tile.plum .tile-icon {
  background: rgba(58, 15, 63, 0.1);
}
.tile.gold .tile-icon {
  background: rgba(255, 201, 77, 0.22);
}
.tile-title {
  font-weight: 800;
}
.tile-sub {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
}
.help-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px auto 0;
  font-weight: 700;
  color: var(--text-2);
}
.help-link img {
  width: 26px;
  height: 26px;
}

/* ─── Matchmaking ───────────────────────────────────────────────────────── */

.match-hero {
  text-align: center;
  padding: 6px 10px 14px;
}
.match-hero img {
  width: 128px;
  height: 128px;
}
.match-hero p {
  color: var(--text-2);
  font-size: 13.5px;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 6px 10px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 2px solid transparent;
  transition: all 0.2s;
}
.who > img {
  width: 44px;
  height: 44px;
  transition: transform 0.2s;
}
.who-label {
  font-weight: 800;
  font-size: 13px;
}
.who.on {
  background: var(--surface);
  border-color: var(--rose);
  box-shadow: 0 8px 20px rgba(255, 61, 129, 0.2);
}
.who.on > img {
  transform: scale(1.1) rotate(-4deg);
}

.filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  text-align: start;
  border-bottom: 1px solid var(--line);
}
.filter-toggle:last-child {
  border-bottom: 0;
}
.filter-toggle > img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.ft-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.ft-body small {
  font-size: 12px;
  color: var(--text-3);
}
.ft-switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--line-2);
  transition: background 0.2s;
}
.ft-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: inset-inline-start 0.22s;
}
.filter-toggle.on .ft-switch {
  background: var(--grad);
}
.filter-toggle.on .ft-switch::after {
  inset-inline-start: 21px;
}

.match-cta {
  position: sticky;
  bottom: calc(var(--dock-h) + 12px + var(--safe-b));
  padding-top: 8px;
}
@media (min-width: 900px) {
  .match-cta {
    bottom: 16px;
  }
}

.radar-stage {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 20px auto 10px;
  display: grid;
  place-items: center;
}
.pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 61, 129, 0.5);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
  animation: pulse 2.4s ease-out infinite;
}
.pulse.p2 {
  animation-delay: 0.8s;
}
.pulse.p3 {
  animation-delay: 1.6s;
}
@keyframes pulse {
  from {
    transform: scale(0.3);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}
.radar-mascot {
  position: relative;
  width: 160px;
  height: 160px;
}
.radar-timer {
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.center-chips {
  justify-content: center;
  margin-bottom: 14px;
}

/* ─── People grids (nearby, search) ─────────────────────────────────────── */

.nearby-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.nearby-q {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
}
.nearby-q img {
  width: 40px;
  height: 40px;
}
.km-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.km {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  line-height: 1.2;
  transition: all 0.2s;
}
.km b {
  font-size: 19px;
  font-weight: 900;
}
.km small {
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 700;
}
.km.on {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 61, 129, 0.3);
}
.km.on small {
  color: rgba(255, 255, 255, 0.85);
}
.result-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  margin: 2px 2px 10px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 640px) {
  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1100px) {
  .people-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.person {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  animation: rise 0.35s both;
  transition: transform 0.18s, box-shadow 0.18s;
}
.person:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.p-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-3);
}
.p-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.p-photo::after {
  content: '';
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(to top, rgba(27, 11, 36, 0.55), transparent);
}
.p-distance {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  inset-inline-start: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--berry);
  font-size: 11.5px;
  font-weight: 800;
}
.p-distance svg {
  width: 13px;
  height: 13px;
}
.p-online {
  position: absolute;
  z-index: 1;
  top: 10px;
  inset-inline-end: 10px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--mint);
  color: #053b2a;
  font-size: 11px;
  font-weight: 800;
  min-width: 12px;
  min-height: 12px;
}
.p-info {
  padding: 10px 12px 12px;
}
.p-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-sub {
  font-size: 12.5px;
  color: var(--text-3);
}
.p-common {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--rose);
}

.locate {
  text-align: center;
  padding: 26px 10px;
}
.locate img {
  width: 170px;
  height: 170px;
}
.locate p {
  color: var(--text-2);
  max-width: 380px;
  margin: 0 auto 16px;
}

/* ─── Empty states, skeletons ───────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 34px 16px;
  color: var(--text-2);
}
.empty > img {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
}
.empty .empty-art {
  width: 200px;
  height: 200px;
}
.empty p {
  font-size: 13.5px;
  max-width: 360px;
  margin: 0 auto 14px;
}

.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ─── Wallet ────────────────────────────────────────────────────────────── */

.balance-card {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 6px;
  padding: 22px;
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 80% 0%, rgba(255, 201, 77, 0.45), transparent 45%), linear-gradient(135deg, #2a1236, #5b1d6e 55%, #a855f7);
  box-shadow: var(--shadow-lg);
  margin-bottom: 8px;
}
.bc-text {
  flex: 1;
}
.bc-label {
  font-size: 13px;
  opacity: 0.85;
}
.bc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bc-row img {
  width: 40px;
  height: 40px;
}
.bc-value {
  font-size: 38px;
  font-weight: 900;
}
.bc-art {
  width: 120px;
  height: 120px;
  margin-inline-end: -10px;
}

.packages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 560px) {
  .packages {
    grid-template-columns: repeat(3, 1fr);
  }
}
.package {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}
.package:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 61, 129, 0.4);
  box-shadow: var(--shadow);
}
.package.featured {
  border-color: var(--rose);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  border: 2px solid transparent;
}
.pk-ribbon {
  position: absolute;
  top: 10px;
  inset-inline-end: -30px;
  transform: rotate(-35deg);
  width: 120px;
  text-align: center;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 0;
}
.pk-coins {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pk-coins img {
  width: 34px;
  height: 34px;
}
.pk-coins b {
  font-size: 24px;
  font-weight: 900;
}
.pk-coins small {
  color: var(--text-3);
  font-weight: 700;
}
.pk-price {
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--grad-soft);
  color: var(--rose);
  font-weight: 900;
  font-size: 16px;
  direction: ltr;
}
.pay-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 2px;
  font-size: 12.5px;
  color: var(--text-3);
}
.pay-note img {
  width: 26px;
  height: 26px;
}
.tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.tx:last-child {
  border-bottom: 0;
}
.tx-amount {
  font-weight: 900;
  direction: ltr;
}
.tx-amount.plus {
  color: #0e9f6e;
}
.tx-amount.minus {
  color: var(--alert);
}

.network {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1.5px solid transparent;
  text-align: start;
  transition: all 0.18s;
}
.network:hover {
  border-color: var(--rose);
  background: var(--surface);
}
.network img {
  width: 44px;
  height: 44px;
}
.nw-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nw-body small {
  color: var(--text-3);
  font-size: 12px;
}

.invoice {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inv-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inv-head img {
  width: 46px;
  height: 46px;
}
.inv-head div {
  display: flex;
  flex-direction: column;
}
.inv-head small {
  color: var(--text-3);
}
.qr {
  align-self: center;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.qr img {
  display: block;
  width: 210px;
  height: 210px;
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  text-align: start;
}
.copy-row svg {
  color: var(--rose);
}
.cr-label {
  font-size: 12px;
  color: var(--text-3);
  flex-shrink: 0;
}
.cr-value {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  word-break: break-all;
  text-align: left;
}
.inv-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text-2);
}
.inv-timer b {
  color: var(--rose);
  direction: ltr;
}
.paid {
  text-align: center;
  padding: 10px 0;
}
.paid img {
  width: 150px;
  height: 150px;
}

/* ─── Auth & onboarding ─────────────────────────────────────────────────── */

.auth,
.onboarding {
  min-height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  position: relative;
}
.auth-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 10%, rgba(255, 61, 129, 0.28), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.3), transparent 45%), var(--bg);
}
.auth-card,
.ob-wrap {
  width: 100%;
  max-width: 430px;
  text-align: center;
}
.auth-card {
  padding: 26px 22px;
  border-radius: 32px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.auth-mascot {
  width: 150px;
  height: 150px;
  margin: -6px auto 2px;
}
.auth-title {
  font-size: 32px;
  font-weight: 900;
  margin: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-lead,
.lead {
  color: var(--text-2);
  font-size: 14.5px;
}
.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
  text-align: start;
}
.auth-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.auth-perk img {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.auth-perk div {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.auth-perk span {
  font-size: 12.5px;
  color: var(--text-3);
}
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-note {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
}
.auth-wait {
  padding: 4px 0 6px;
}
.auth-wait-ring {
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  position: relative;
}
.auth-wait-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--rose);
  border-inline-start-color: var(--violet);
  animation: spin 1.1s linear infinite;
}
.auth-wait-ring img {
  width: 52px;
  height: 52px;
}
.auth-wait p {
  font-size: 13.5px;
  color: var(--text-2);
}
.auth-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}
.auth-timer span {
  direction: ltr;
  font-weight: 800;
  color: var(--rose);
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  color: var(--text-3);
  font-size: 12px;
}
.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.auth-widget iframe {
  margin: 0 auto;
}
.auth-foot {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.ob-mascot {
  width: 110px;
  height: 110px;
}
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 14px;
}
.ob-dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line-2);
  transition: all 0.3s;
}
.ob-dots span.on {
  width: 26px;
  background: var(--grad);
}
.ob-dots span.done {
  background: var(--rose);
}
.ob-card {
  padding: 24px 20px;
  border-radius: 30px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ob-card.enter {
  animation: rise 0.32s both;
}
.ob-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.ob-nav .btn svg {
  transform: scaleX(-1);
}
.age-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.age-step {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--rose);
}
.age-value {
  min-width: 110px;
  font-size: 64px;
  font-weight: 900;
  line-height: 1.1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.age-range {
  width: 100%;
  accent-color: var(--rose);
}
.sex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sex-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 24px;
  background: var(--surface);
  border: 2.5px solid transparent;
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.sex-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
}
.sex-card.on {
  border-color: var(--rose);
  transform: scale(1.03);
  box-shadow: 0 12px 26px rgba(255, 61, 129, 0.25);
}
.city-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
}
.ob-done img {
  width: 160px;
  height: 160px;
}
.ob-done {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.split {
  height: 100%;
  display: flex;
}
.split-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.split-detail {
  display: none;
  min-width: 0;
}
.split.has-detail .split-list {
  display: none;
}
.split.has-detail .split-detail {
  display: flex;
  flex: 1;
}
@media (min-width: 900px) {
  .split-list {
    width: 360px;
    flex-shrink: 0;
    border-inline-end: 1px solid var(--line);
  }
  .split.has-detail .split-list {
    display: flex;
  }
  .split-detail {
    display: flex;
    flex: 1;
  }
}
.detail-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  background: var(--wallpaper) repeat, var(--bg-2);
  background-size: 360px;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 18px;
  color: var(--text);
  transition: background 0.15s;
}
.chat-row:hover {
  background: var(--surface-2);
}
.chat-row.selected {
  background: var(--grad-soft);
}
.chat-row.ended {
  opacity: 0.6;
}
.cr-body {
  flex: 1;
  min-width: 0;
}
.cr-top,
.cr-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cr-name {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cr-time {
  font-size: 11.5px;
  color: var(--text-3);
}
.cr-last {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-row.unread .cr-last {
  color: var(--text);
  font-weight: 700;
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: rgba(42, 171, 238, 0.14);
  color: #1e88c8;
  font-size: 10.5px;
  font-weight: 800;
  margin-inline-start: 6px;
}
.channel-chip svg {
  width: 11px;
  height: 11px;
}

/* ─── Conversation ──────────────────────────────────────────────────────── */

.conversation {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.conv-peer {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  padding: 4px;
  border-radius: 14px;
}
.conv-peer .name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.presence.online {
  color: #0e9f6e;
}

.messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 8px;
}
.messages.wallpaper {
  background: var(--wallpaper) repeat, var(--bg-2);
  background-size: 360px;
}
.messages-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.day-sep {
  align-self: center;
  margin: 12px 0 6px;
  padding: 2px 12px;
  border-radius: var(--r-pill);
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.sys-msg {
  align-self: center;
  max-width: 88%;
  margin: 8px 0;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  text-align: center;
  color: var(--text-2);
}

.msg {
  display: flex;
  margin-top: 2px;
}
.msg.gap {
  margin-top: 8px;
}
.msg.mine {
  justify-content: flex-start;
}
.msg.theirs {
  justify-content: flex-end;
}
.bubble {
  position: relative;
  max-width: min(78%, 520px);
  padding: 8px 12px 6px;
  border-radius: 20px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 6px rgba(58, 15, 63, 0.08);
  transition: transform 0.2s;
}
.msg.mine .bubble {
  background: var(--bubble-mine);
  color: var(--bubble-mine-text);
  border-start-start-radius: 6px;
}
.msg.mine.cont .bubble {
  border-start-start-radius: 20px;
}
.msg.theirs .bubble {
  background: var(--bubble-theirs);
  color: var(--bubble-theirs-text);
  border-start-end-radius: 6px;
}
.msg.theirs.cont .bubble {
  border-start-end-radius: 20px;
}
.bubble.pending {
  opacity: 0.7;
}
.bubble.failed {
  background: rgba(244, 63, 94, 0.15) !important;
  color: var(--text) !important;
  cursor: pointer;
}
.bubble.highlight {
  animation: highlight 1.2s;
}
@keyframes highlight {
  30% {
    transform: scale(1.04);
    box-shadow: 0 0 0 4px rgba(255, 61, 129, 0.35);
  }
}
.bubble .text {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.75;
}
.bubble .meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 1px;
  font-size: 10.5px;
  opacity: 0.75;
  direction: ltr;
}
.bubble .meta svg {
  width: 15px;
  height: 15px;
}
.bubble .edited {
  font-style: normal;
}
.bubble.media-only {
  padding: 4px;
}
.bubble.media-only .meta {
  position: absolute;
  bottom: 10px;
  left: 12px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 1;
}
.bubble.sticker-bubble {
  background: transparent !important;
  box-shadow: none;
  padding: 0;
}
.failed-note {
  display: block;
  font-size: 11.5px;
  color: var(--alert);
  font-weight: 700;
}
.reply-quote {
  margin-bottom: 4px;
  padding: 4px 10px;
  border-inline-start: 3px solid currentColor;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}
.msg.theirs .reply-quote {
  background: var(--surface-2);
  border-color: var(--rose);
}
.rq-name {
  font-size: 12px;
  font-weight: 800;
}
.rq-text {
  font-size: 12.5px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-pill {
  position: absolute;
  bottom: 92px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 5;
}

.composer-wrap {
  padding: 8px 10px calc(10px + var(--safe-b));
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.composer-inner {
  max-width: 780px;
  margin: 0 auto;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.composer textarea {
  flex: 1;
  min-height: 46px;
  max-height: 160px;
  padding: 11px 16px;
  border-radius: 23px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  resize: none;
  outline: none;
  line-height: 1.6;
}
.composer textarea:focus {
  border-color: var(--rose);
}
.send {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 61, 129, 0.35);
  transition: transform 0.15s;
}
.send:active {
  transform: scale(0.9);
}
.send svg {
  transform: scaleX(-1);
}
.send.mic svg {
  transform: none;
}
.composer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--surface-2);
  border-inline-start: 3px solid var(--rose);
}
.composer-bar .lead {
  color: var(--rose);
}
.cb-body {
  flex: 1;
  min-width: 0;
}
.cb-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--rose);
}
.cb-text {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
}
.rec-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--alert);
  animation: blink 1s infinite;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}
.rec-time {
  font-weight: 800;
  direction: ltr;
  min-width: 44px;
}
.rec-level {
  flex: 1;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}
.rec-level span {
  width: 3px;
  border-radius: 3px;
  background: var(--rose);
  flex-shrink: 0;
}
.chat-ended-bar {
  text-align: center;
  padding: 6px 0;
}
.chat-ended-bar p {
  color: var(--text-2);
  font-size: 13.5px;
}

.msg-menu {
  position: fixed;
  z-index: 70;
  min-width: 180px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: rise 0.15s both;
}
.msg-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.msg-menu button:hover {
  background: var(--surface-2);
}
.msg-menu svg {
  color: var(--rose);
}

/* ─── Media ─────────────────────────────────────────────────────────────── */

.media-photo,
.media-video {
  display: block;
  max-width: 300px;
  max-height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
}
.media-photo img,
.media-video,
.bubble video {
  display: block;
  max-width: 100%;
  max-height: 380px;
  border-radius: 16px;
}
.video-note {
  width: 220px !important;
  height: 220px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.sticker,
.sticker img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}
.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  padding: 2px 0;
}
.voice .play {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.25);
}
.msg.theirs .voice .play {
  background: var(--grad);
  color: #fff;
}
.wave {
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.wave span {
  flex: 1;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.35;
}
.wave span.played {
  opacity: 1;
}
.vtime {
  font-size: 11.5px;
  direction: ltr;
  opacity: 0.85;
}
.file-card,
.location-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  min-width: 200px;
}
.msg.theirs .file-card,
.msg.theirs .location-card {
  background: var(--surface-2);
}
.file-card img,
.location-card img,
.fc-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.fc-name {
  font-weight: 700;
  font-size: 13px;
  word-break: break-all;
}
.media-missing {
  padding: 18px;
  font-size: 12.5px;
  opacity: 0.75;
}
.upload-preview {
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-2);
  text-align: center;
}
.upload-preview img,
.upload-preview video {
  max-width: 100%;
  max-height: 320px;
  display: block;
  margin: 0 auto;
}
.progress {
  height: 6px;
  border-radius: 6px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress > * ,
.progress span {
  display: block;
  height: 100%;
  background: var(--grad);
  transition: width 0.2s;
}

/* ─── Sheets, dialogs, toasts, lightbox ─────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(27, 11, 36, 0.45);
  backdrop-filter: blur(3px);
  animation: fade 0.2s both;
}
.overlay.closing {
  animation: fade 0.2s reverse both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  border-radius: 30px 30px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: sheet-up 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  padding-bottom: var(--safe-b);
}
.overlay.closing .sheet {
  animation: sheet-up 0.2s reverse both;
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}
@media (min-width: 640px) {
  .overlay {
    align-items: center;
  }
  .sheet {
    border-radius: 30px;
    max-height: 86dvh;
    animation: pop 0.25s both;
  }
  @keyframes pop {
    from {
      transform: scale(0.94);
      opacity: 0;
    }
  }
}
.sheet-grip {
  width: 44px;
  height: 5px;
  margin: 10px auto 0;
  border-radius: 5px;
  background: var(--line-2);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 4px 18px;
}
.sheet-head h2 {
  flex: 1;
  margin: 0;
  font-size: 17px;
}
.sheet-body {
  padding: 10px 18px 20px;
  overflow-y: auto;
}
.dialog-icon {
  display: grid;
  place-items: center;
  margin: 4px 0 8px;
}
.dialog-icon img {
  width: 72px;
  height: 72px;
}
.dialog-title {
  text-align: center;
  font-size: 18px;
}
.dialog-text {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}
.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.toasts {
  position: fixed;
  z-index: 90;
  top: calc(10px + var(--safe-t));
  inset-inline: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 440px);
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast.leaving {
  animation: toast-in 0.2s reverse both;
}
@keyframes toast-in {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
}
.toast img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.toast-body {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
}
.toast button {
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--grad-soft);
  color: var(--rose);
  font-weight: 800;
  font-size: 13px;
}
.toast.error {
  border-color: rgba(244, 63, 94, 0.35);
}
.toast.success {
  border-color: rgba(52, 211, 153, 0.4);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(10, 4, 14, 0.92);
  animation: fade 0.2s both;
}
.lightbox img {
  max-width: 96vw;
  max-height: 90dvh;
  border-radius: 12px;
}
.lightbox .icon-btn {
  position: absolute;
  top: calc(12px + var(--safe-t));
  inset-inline-end: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* ─── Profiles (user.js / me.js) ────────────────────────────────────────── */

/*
 * One card: the photo fills the card's full width with the name and details
 * laid over its bottom edge, and the info / actions below it. From 760px the
 * card turns sideways: photo on the start side, details beside it.
 */
.profile-hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-top: 6px;
}
.profile-photo {
  position: relative;
  width: 100%;
  height: clamp(300px, 112vw, 62dvh);
  background: var(--surface-3);
  overflow: hidden;
}
.profile-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.profile-photo.zoomable {
  cursor: zoom-in;
}
.profile-photo::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to top, rgba(27, 11, 36, 0.82), rgba(27, 11, 36, 0.2) 70%, transparent);
  pointer-events: none;
}
.ph-caption {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  padding: 18px 18px 16px;
  color: #fff;
  pointer-events: none;
}
.ph-name {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.ph-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0.95;
}
.ph-meta img {
  width: 18px;
  height: 18px;
}
.ph-badge,
.pending-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--berry);
  font-size: 12px;
  font-weight: 800;
}
.ph-badge .pending-badge {
  position: static;
  padding: 0;
  background: none;
}
.pending-badge img {
  width: 18px;
  height: 18px;
}
.ph-edit {
  position: absolute !important;
  z-index: 2;
  top: 14px;
  inset-inline-end: 14px;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--berry) !important;
  box-shadow: 0 6px 16px rgba(27, 11, 36, 0.25);
}
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  min-width: 0;
}
.profile-info {
  min-width: 0;
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-body {
  padding: 0;
}
.id-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 700;
  direction: ltr;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-chip svg {
  width: 16px;
  height: 16px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  transition: background 0.18s, transform 0.18s;
}
a.stat:hover {
  background: var(--grad-soft);
  transform: translateY(-2px);
}
.stat b {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}
.stat span {
  font-size: 12px;
  color: var(--text-3);
}
.stat.ok b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.me-interests {
  margin-top: 12px;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-weight: 700;
  text-align: start;
  color: var(--text);
  transition: background 0.18s;
}
.action:hover {
  background: var(--grad-soft);
}
.action.on {
  background: var(--grad-soft);
  color: var(--rose);
}
.action img {
  width: 30px;
  height: 30px;
}

/* Sideways card: photo beside the details, on tablets and wide windows. */
@media (min-width: 760px) {
  .profile-hero {
    display: grid;
    grid-template-columns: minmax(300px, 42%) 1fr;
    align-items: stretch;
  }
  .profile-photo {
    height: auto;
    min-height: 420px;
    max-height: 560px;
    aspect-ratio: 4 / 5;
  }
  .profile-side {
    justify-content: center;
    padding: 28px;
    gap: 18px;
  }
  .ph-name {
    font-size: 30px;
  }
  .action-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/*
 * The own-profile screen: one column on phones; on wide windows the card stays
 * put on one side (stacked again, so the photo keeps its shape) while the
 * settings scroll beside it.
 */
.me-layout {
  display: block;
}
@media (min-width: 1040px) {
  .me-layout {
    display: grid;
    grid-template-columns: minmax(340px, 420px) 1fr;
    gap: 28px;
    align-items: start;
  }
  .me-main {
    position: sticky;
    top: 12px;
  }
  .me-main .profile-hero {
    display: block;
  }
  .me-main .profile-photo {
    aspect-ratio: auto;
    height: min(520px, 58dvh);
    min-height: 0;
    max-height: none;
  }
  .me-main .profile-side {
    padding: 18px;
  }
  .me-settings > .section-title:first-child {
    margin-top: 6px;
  }
}

/* ─── Inbox, ghost, notifications ───────────────────────────────────────── */

.inbox-item,
.notification {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.notification {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.notification img {
  width: 36px;
  height: 36px;
}
.n-body {
  flex: 1;
  font-size: 14px;
}
.n-time {
  font-size: 11.5px;
  color: var(--text-3);
}
.ii-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ii-head > img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.guest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
}
.guest-card > img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.gcard-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--text-2);
}
.gcard-body b {
  color: var(--text);
  font-size: 14px;
}
.guest-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--grad-soft);
}
.sender-tag {
  padding: 1px 9px;
  border-radius: var(--r-pill);
  background: var(--grad-soft);
  color: var(--rose);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sender-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sender-filter svg {
  width: 14px;
  height: 14px;
}
.ii-text {
  white-space: pre-wrap;
  font-size: 14.5px;
}
.ii-quote {
  padding: 6px 10px;
  border-inline-start: 3px solid var(--rose);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}
.ii-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inbox-item.sealed {
  background: var(--grad);
  color: #fff;
  border: 0;
}
.ghost-card {
  padding: 22px 18px;
  border-radius: var(--r-lg);
  text-align: center;
  color: #fff;
  background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 40%), linear-gradient(135deg, #3a0f3f, #7c2a8c 60%, #ff3d81);
  box-shadow: var(--shadow-lg);
}
.gc-label {
  font-size: 13px;
  opacity: 0.85;
}
.gc-name {
  font-size: 22px;
  font-weight: 900;
}
.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  direction: ltr;
  font-size: 13px;
  word-break: break-all;
}

.rules {
  line-height: 2;
}
.rules b {
  color: var(--rose);
}

/* Legacy matchmaking pieces some screens still compose. */
.hero {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-art {
  width: 80px;
  height: 80px;
}
.filter-label {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
}
.choice-row,
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.choice-pill,
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 13px;
}
.choice-pill.on,
.choice.on {
  border-color: var(--rose);
  background: var(--surface);
}
.choice-pill > img,
.choice > img {
  width: 34px;
  height: 34px;
}
.check-grid {
  display: grid;
  gap: 8px;
}
.check-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  text-align: start;
  border: 2px solid transparent;
}
.check-tile.on {
  border-color: var(--rose);
  background: var(--surface);
}
.ct-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--line-2);
  display: grid;
  place-items: center;
  color: transparent;
}
.check-tile.on .ct-box {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.ct-box svg {
  width: 14px;
  height: 14px;
}
.ct-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ct-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.ct-label img {
  width: 22px;
  height: 22px;
}
.ct-sub {
  font-size: 12px;
  color: var(--text-3);
}
.timer {
  font-size: 26px;
  font-weight: 900;
  color: var(--rose);
  direction: ltr;
}
.dev-code {
  direction: ltr;
}
