/* Вахта Love — знакомства в вахтовом городке
   Собственная палитра:
     Тёплая: коралл #C92F3B · розово-оранжевый #F0625A · персик #F4A261
     Холодная: бирюза #0B7A88 · морская #08606C · аква #2AA0B0
   data-theme="warm" — кораллово-розовая
   data-theme="cool" — бирюзово-синяя */

:root,
[data-theme="warm"] {
  --bg: #fff5f3;
  --bg-deep: #ffe3dc;
  --bg-card: #ffffff;
  --text: #1c1110;
  --text-muted: #6b524e;
  --pink: #f0625a;
  --pink-hot: #c92f3b;
  --pink-soft: #ffe3dd;
  --coral: #f0625a;
  --coral-dark: #b02732;
  --peach: #f7b6aa;
  --lilac: #f08a7a;
  --lilac-soft: #fff0ec;
  --purple: #c92f3b;
  --border: #f0d2ca;
  --success: #1f9d6a;
  --danger: #e03b3b;
  --shadow: 0 10px 28px rgba(201, 47, 59, 0.14);
  --shadow-lg: 0 18px 40px rgba(240, 98, 90, 0.18);
  --radius: 18px;
  --max: 430px;
  --nav-h: calc(58px + env(safe-area-inset-bottom, 0px));
  --font: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", sans-serif;
  --body-rad-1: rgba(201, 47, 59, 0.18);
  --body-rad-2: rgba(240, 98, 90, 0.22);
  --body-rad-3: rgba(244, 162, 97, 0.16);
  --body-base-1: #fff8f6;
  --body-base-2: #ffefe9;
  --body-base-3: #ffe3dc;
  --dot: rgba(201, 47, 59, 0.28);
  --app-grad: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,245,243,0.92) 40%, rgba(255,227,220,0.9) 100%);
  --blob-1: rgba(240, 98, 90, 0.34);
  --blob-2: rgba(201, 47, 59, 0.22);
  --header-bg: rgba(255, 255, 255, 0.84);
  --nav-bg: rgba(255, 255, 255, 0.96);
  --btn-grad: linear-gradient(135deg, #c92f3b 0%, #f0625a 55%, #f4a261 125%);
  --accent: #c92f3b;
  --accent-rgb: 201, 47, 59;
  --accent-soft: #ffe3dd;
  --accent-label: "warm";
}

[data-theme="cool"] {
  --bg: #f0f8f9;
  --bg-deep: #d7eef1;
  --bg-card: #ffffff;
  --text: #0e1a1c;
  --text-muted: #4e666b;
  --pink: #0b7a88;
  --pink-hot: #08606c;
  --pink-soft: #d5eef1;
  --coral: #2aa0b0;
  --coral-dark: #0b7a88;
  --peach: #8ecdd6;
  --lilac: #3a9eaa;
  --lilac-soft: #e3f4f6;
  --purple: #0b7a88;
  --border: #c5e0e4;
  --success: #1f9d6a;
  --danger: #e03b3b;
  --shadow: 0 10px 28px rgba(11, 122, 136, 0.14);
  --shadow-lg: 0 18px 40px rgba(8, 96, 108, 0.16);
  --body-rad-1: rgba(11, 122, 136, 0.2);
  --body-rad-2: rgba(42, 160, 176, 0.16);
  --body-rad-3: rgba(8, 96, 108, 0.1);
  --body-base-1: #f3fafb;
  --body-base-2: #e7f4f6;
  --body-base-3: #dceef1;
  --dot: rgba(11, 122, 136, 0.28);
  --app-grad: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(240,248,249,0.93) 40%, rgba(215,238,241,0.9) 100%);
  --blob-1: rgba(11, 122, 136, 0.28);
  --blob-2: rgba(42, 160, 176, 0.2);
  --header-bg: rgba(247, 252, 253, 0.88);
  --nav-bg: rgba(247, 252, 253, 0.96);
  --btn-grad: linear-gradient(135deg, #0b7a88 0%, #08606c 50%, #2aa0b0 125%);
  --accent: #0b7a88;
  --accent-rgb: 11, 122, 136;
  --accent-soft: #d5eef1;
  --accent-label: "cool";
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--body-rad-1), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, var(--body-rad-2), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, var(--body-rad-3), transparent 55%),
    linear-gradient(165deg, var(--body-base-1) 0%, var(--body-base-2) 45%, var(--body-base-3) 100%);
  background-attachment: fixed;
  transition: background 0.35s ease;
}

/* decorative dots pattern overlay on body */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.5px);
  background-size: 18px 18px;
}

a { color: var(--pink-hot); text-decoration: none; }
a:hover { text-decoration: underline; }

.app {
  width: 100%;
  max-width: var(--max);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: var(--app-grad);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.app::before {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blob-1), transparent 70%);
  top: -60px; right: -70px;
  pointer-events: none;
  z-index: 0;
}
.app::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blob-2), transparent 70%);
  bottom: 120px; left: -80px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 70%;
}
.logo .heart {
  color: var(--pink-hot);
  font-size: 1rem;
  filter: drop-shadow(0 2px 4px rgba(var(--accent-rgb), 0.4));
}
.logo-sub {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-top: 1px;
}

.header-actions { display: flex; gap: 8px; align-items: center; }

/* Nav bottom — fixed to viewport, never scrolls away */
.nav-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max);
  display: flex;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px color-mix(in srgb, var(--pink-hot) 18%, transparent);
  z-index: 40;
}
.nav-bottom a {
  flex: 1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 2px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  border-radius: 12px;
  transition: background 0.15s, color 0.15s;
}
.nav-bottom a .ico { font-size: 1.15rem; line-height: 1; }
.nav-bottom a.active {
  color: var(--pink-hot);
  background: linear-gradient(180deg, var(--pink-soft), color-mix(in srgb, var(--pink-soft) 70%, white));
}

.main {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(24px + var(--nav-h));
  position: relative;
  z-index: 1;
}
/* Pages without bottom nav (index/register/admin) can opt out */
.app.no-nav .main {
  padding-bottom: 24px;
}
.app.has-nav {
  padding-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--btn-grad);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--pink-hot) 40%, transparent);
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost {
  background: linear-gradient(135deg, var(--pink-soft), var(--lilac-soft));
  color: var(--coral-dark);
}
.btn-outline {
  background: rgba(255,255,255,0.7);
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-danger {
  background: #ffe5e5;
  color: var(--danger);
}
.btn-success {
  background: #d8f5e8;
  color: var(--success);
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; }
.btn:disabled, .btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(240, 207, 217, 0.85);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 77, 120, 0.18);
}
textarea { resize: vertical; min-height: 90px; }
.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.checkbox-row input { margin-top: 3px; flex-shrink: 0; width: auto; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--pink-soft);
  color: var(--coral-dark);
}
.badge-ok { background: #d8f5e8; color: var(--success); }
.badge-wait { background: #fff0c8; color: #9a6b00; }
.badge-rej { background: #ffe5e5; color: var(--danger); }
.badge-media { background: var(--lilac-soft); color: var(--purple); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2a1f28, #3d2a38);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  z-index: 100;
  max-width: calc(var(--max) - 32px);
  width: max-content;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  animation: fadeUp 0.25s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty .big { font-size: 2.5rem; margin-bottom: 8px; }

/* Hearts + blobs decor */
.hearts-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hearts-bg span {
  position: absolute;
  color: var(--pink-hot);
  opacity: 0.14;
  font-size: 1.5rem;
  user-select: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}
.blob-a {
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(255, 122, 89, 0.35), transparent 70%);
  top: 20px; left: -40px;
}
.blob-b {
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(201, 160, 255, 0.4), transparent 70%);
  top: 80px; right: -30px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.page-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}

.hidden { display: none !important; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 21, 32, 0.5);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal {
  background: linear-gradient(180deg, #fff, #fff5f8);
  border-radius: 22px 22px 0 0;
  padding: 22px;
  width: 100%;
  max-width: var(--max);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal h3 { margin: 0 0 8px; }
.modal p { margin: 0 0 16px; color: var(--text-muted); font-size: 0.95rem; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.avatar {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-soft), var(--lilac-soft));
  display: block;
}
.avatar-sm {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pink-soft);
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(255, 77, 120, 0.25);
}
.avatar-md {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pink-soft);
  box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(155, 107, 255, 0.3);
}

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

.notice {
  background: linear-gradient(135deg, var(--pink-soft), var(--lilac-soft));
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--coral-dark);
  margin-bottom: 14px;
  border: 1px solid rgba(255, 77, 120, 0.15);
}
.notice.warn {
  background: linear-gradient(135deg, #fff3d6, #ffe8d0);
  color: #8a6500;
  border-color: rgba(154, 107, 0, 0.15);
}

/* Feed photo overlay helpers (used from feed.html) */
.feed-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 10, 18, 0.72) 100%);
  color: #fff;
}
.feed-overlay h2 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.feed-overlay .bio { margin: 8px 0 0; font-size: 0.95rem; opacity: 0.95; line-height: 1.35; }


/* Theme toggle */
.theme-toggle {
  white-space: nowrap;
  font-size: 0.72rem !important;
  padding: 7px 10px !important;
}
.theme-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.theme-panel h3 { margin: 0 0 8px; font-size: 1rem; }
.theme-row { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-row .btn.active-theme {
  outline: 2px solid var(--pink-hot);
  outline-offset: 1px;
}

/* Chips (goals / interests) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  appearance: none;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  user-select: none;
}
.chip:hover { border-color: var(--pink); }
.chip.selected {
  background: var(--pink-soft);
  border-color: var(--pink-hot);
  color: var(--pink-hot);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.14);
}
.chip-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.chip-count.ok { color: var(--success); }
.chip-count.bad { color: var(--danger); }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.meta-pill.soft {
  background: var(--pink-soft);
  border-color: var(--border);
  color: var(--pink-hot);
}
.overlap-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(31, 157, 106, 0.85);
  border-radius: 8px;
  padding: 4px 8px;
}
.interests-inline {
  margin-top: 6px;
  font-size: 0.78rem;
  opacity: 0.95;
  line-height: 1.35;
}

/* About / credits */
.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 18px 0 8px;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.about-block strong { color: var(--text); }
.about-block ul { margin: 6px 0 0; padding-left: 18px; }
.about-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--pink-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
.about-block .hint { font-size: 0.75rem; }


/* Language switcher */
.lang-switch {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 4px;
}
.lang-switch.compact { justify-content: center; margin: 0 0 10px; }
.lang-btn {
  appearance: none; border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text);
  border-radius: 999px; padding: 6px 10px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em;
  cursor: pointer; line-height: 1;
}
.lang-btn.active {
  background: var(--pink-soft); border-color: var(--pink-hot); color: var(--pink-hot);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.14);
}
.bubble .tr-line {
  display: block; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.35);
  font-size: 0.82rem; opacity: 0.95; font-weight: 500;
}
.bubble.them .tr-line { border-top-color: var(--border); color: var(--text-muted); }
.bubble .tr-note {
  display: block; font-size: 0.65rem; opacity: 0.65; margin-top: 2px; font-weight: 500;
}
.tr-toggle {
  font-size: 0.78rem !important; padding: 6px 10px !important;
}

/* —— Compact feature pack —— */
.stories-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin: 0 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-ring {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
}
.story-ring .ring {
  width: 52px; height: 52px; margin: 0 auto 4px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--pink, #e91e8c));
}
.story-ring .ring img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--card, #fff);
  display: block;
}
.story-ring .ring.add {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2, #f0f0f4);
  color: var(--text-muted);
  font-size: 1.4rem; font-weight: 600;
  border: 1.5px dashed var(--border, #ccc);
}
.story-ring .name {
  font-size: 0.65rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 64px;
}
.status-line {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 6px; font-size: 0.78rem;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.22); color: #fff;
  font-size: 0.72rem; font-weight: 600;
}
.status-pill.soft {
  background: var(--surface-2, #eee); color: var(--text);
}
.status-pill.quiet { background: #333; color: #fff; }
.leisure-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.leisure-chip {
  border: 0; border-radius: 999px; padding: 4px 10px;
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,0.25); color: #fff;
}
.leisure-chip.solid {
  background: var(--surface-2, #eee); color: var(--text);
}
.leisure-chip:active { opacity: 0.85; }
.chip-pick {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--border, #ddd);
  background: var(--card, #fff); font-size: 0.82rem; cursor: pointer;
  color: var(--text);
}
.chip-pick.on {
  border-color: var(--accent); background: var(--accent-soft, #ffe8f3);
  color: var(--accent); font-weight: 600;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.story-viewer {
  position: fixed; inset: 0; z-index: 80;
  background: #111; color: #fff;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.story-viewer.hidden { display: none; }
.story-viewer .sv-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; font-weight: 600;
}
.story-viewer .sv-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; padding: 20px;
}
.story-viewer .sv-body img {
  max-width: 100%; max-height: 55vh; border-radius: 12px; object-fit: contain;
}
.story-viewer .sv-text { font-size: 1.15rem; line-height: 1.4; }
.head-more { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: 100%; z-index: 30;
  background: var(--card, #fff); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  min-width: 180px; padding: 6px; display: none;
}
.menu-pop.open { display: block; }
.menu-pop button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 10px 12px;
  border-radius: 8px; font-size: 0.9rem; color: var(--text); cursor: pointer;
}
.menu-pop button:hover { background: var(--surface-2, #f3f3f6); }
.menu-pop button.danger { color: var(--danger); }
.msg-tr {
  margin-top: 4px; padding-top: 4px;
  border-top: 1px dashed rgba(255,255,255,0.25);
  font-size: 0.82rem; opacity: 0.92; font-style: italic;
}
.bubble.them .msg-tr { border-top-color: rgba(0,0,0,0.12); }

/* —— Stories video / feed spice / voice / news —— */
.story-viewer .sv-body video {
  max-width: 100%; max-height: 55vh; border-radius: 12px; background: #000;
}
.story-preview-video {
  display: block; max-width: 100%; max-height: 120px; border-radius: 10px; margin-top: 8px; background: #111;
}
.feed-tip {
  font-size: 0.78rem; color: var(--text-muted);
  padding: 6px 10px; margin: 0 0 10px;
  background: rgba(255,255,255,0.65);
  border: 1px dashed var(--border);
  border-radius: 12px;
  line-height: 1.35;
}
.news-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
}
.news-card .news-banner {
  height: 88px;
  display: flex; align-items: flex-end;
  padding: 12px 14px;
  color: #fff; font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.news-card .news-body {
  padding: 12px 14px 14px;
}
.news-card .news-meta {
  font-size: 0.72rem; color: var(--text-muted); margin-bottom: 6px;
}
.news-card .news-excerpt {
  font-size: 0.88rem; color: var(--text); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .news-actions {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center;
}
.news-sheet .comments { max-height: 220px; overflow-y: auto; margin: 10px 0; }
.news-sheet .comment {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.news-sheet .comment .who { font-weight: 700; margin-right: 6px; }
.news-sheet .comment .when { font-size: 0.7rem; color: var(--text-muted); }
.voice-bubble {
  display: flex; align-items: center; gap: 10px;
  min-width: 140px;
}
.voice-bubble button.play {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.25);
  color: inherit; font-size: 0.95rem; cursor: pointer;
  flex-shrink: 0;
}
.bubble.them .voice-bubble button.play {
  background: var(--pink-soft); color: var(--pink-hot);
}
.voice-bubble .dur { font-size: 0.85rem; font-variant-numeric: tabular-nums; opacity: 0.9; }
.btn-mic {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  touch-action: none;
  user-select: none;
}
.btn-mic.recording {
  background: #ff3b5c; color: #fff; border-color: #ff3b5c;
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,92,0.45); }
  50% { box-shadow: 0 0 0 10px rgba(255,59,92,0); }
}
.feed-card.tapable { cursor: pointer; }
.view-actions { display: flex; gap: 10px; margin-top: 16px; }
.view-actions .btn { flex: 1; }


/* Feed pinned one-liner → Городок */
.pin-banner {
  display: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--lilac-soft), var(--pink-soft));
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.pin-banner .meta { font-weight: 500; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.legal-links { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin: 16px 0 8px; line-height: 1.5; }
.legal-links a { color: var(--text-muted); text-decoration: underline; }
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 80; max-width: 430px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 14px 14px 12px;
}
.cookie-banner p { margin: 0 0 10px; font-size: 0.85rem; color: var(--text); line-height: 1.4; }
.cookie-banner .row { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-banner .btn { flex: 1; min-width: 120px; }
