@import url("https://fonts.googleapis.com/css2?family=Geologica:wght@300;400;500;600;700;800;900&family=Russo+One&display=swap");

:root {
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font);
  --cursor-default: url("/static/cursors/dot.svg?v=65") 10 10, auto;
  --cursor-pointer: url("/static/cursors/pointer.svg?v=65") 6 2, pointer;
  --ui-scale: 1;
  --bg: #050508;
  --surface: #101018;
  --surface2: #171722;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5fa;
  --text-muted: #9494a8;
  --accent: #a855f7;
  --accent2: #f472b6;
  --accent-grad: linear-gradient(135deg, #9333ea, #ec4899, #fb7185);
  --danger: #fb7185;
  --like: #ff4d6d;
  --radius: 18px;
  --nav-h: 68px;
  --feed-w: 560px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --sel-bg: rgba(168, 85, 247, 0.18);
  --sel-border: rgba(168, 85, 247, 0.35);
  --sel-press: rgba(168, 85, 247, 0.14);
  --sel-ring: rgba(168, 85, 247, 0.3);
  --sel-focus: rgba(168, 85, 247, 0.45);
  --sel-glow: rgba(168, 85, 247, 0.12);
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface2: #ececf2;
  --border: rgba(0, 0, 0, 0.08);
  --text: #12121a;
  --text-muted: #6b6b7b;
  --accent: #9333ea;
  --accent2: #db2777;
  --accent-grad: linear-gradient(135deg, #7c3aed, #db2777, #f43f5e);
  --danger: #e11d48;
  --like: #e11d48;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .post-card {
  background: var(--surface);
  box-shadow: var(--shadow);
}

[data-theme="light"] .auth-card,
[data-theme="light"] .modal-card {
  background: rgba(255, 255, 255, 0.96);
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: var(--cursor-default);
}

html.boot-lock,
html.boot-lock body {
  overflow: hidden !important;
  height: 100%;
  width: 100%;
  overscroll-behavior: none;
  touch-action: none;
}

html.boot-lock body {
  position: fixed;
  inset: 0;
}

a,
button,
[role="button"],
.pressable,
.btn,
.nav-item,
.icon-btn,
.post-action-btn,
.comment-like,
.comment-reply-btn,
.theme-pill,
.skin-pill,
.grid-item,
.setting-link,
label.create-drop,
.file-label {
  cursor: var(--cursor-pointer);
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
[contenteditable="true"] {
  cursor: text;
}

button, input, textarea, select {
  font-family: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(147, 51, 234, 0.18), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(236, 72, 153, 0.12), transparent 40%);
  z-index: 0;
}

body.modal-open { overflow: hidden; }

.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: var(--cursor-pointer); border: none; background: none; }

.pressable,
.post-action-btn,
.like-btn,
.action-link,
.comment-like,
.btn,
.search-tab,
.brand {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease,
    filter 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.nav-item,
.icon-btn {
  position: relative;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease,
    filter 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.pressable::after,
.post-action-btn::after,
.like-btn::after,
.action-link::after,
.comment-like::after,
.nav-item::after,
.icon-btn::after,
.btn::after,
.search-tab::after,
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.3), transparent 58%);
  opacity: 0;
  transform: scale(0.35);
  pointer-events: none;
}

.pressable.ripple::after,
.post-action-btn.ripple::after,
.like-btn.ripple::after,
.action-link.ripple::after,
.comment-like.ripple::after,
.nav-item.ripple::after,
.icon-btn.ripple::after,
.btn.ripple::after,
.search-tab.ripple::after,
.brand.ripple::after {
  opacity: 1;
  transform: scale(2.1);
  transition: opacity 0.2s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.pressable.is-pressed,
.post-action-btn.is-pressed,
.like-btn.is-pressed,
.action-link.is-pressed,
.comment-like.is-pressed,
.nav-item.is-pressed,
.icon-btn.is-pressed,
.btn.is-pressed,
.search-tab.is-pressed {
  transform: scale(0.93);
  filter: brightness(1.1);
}

.btn-primary.is-pressed {
  box-shadow: 0 4px 20px var(--sel-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-item.is-pressed {
  background: var(--sel-press);
}

.like-btn.is-pressed,
.post-action-btn.like-btn.is-pressed {
  transform: scale(0.9);
}

.post-action-btn.like-btn.liked.is-pressed {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.comment-like.is-pressed.liked {
  box-shadow: 0 0 14px color-mix(in srgb, var(--like) 35%, transparent);
}

.icon-btn.is-pressed {
  box-shadow: 0 0 0 2px var(--sel-ring);
}

#app {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh / var(--ui-scale, 1));
  padding-bottom: calc((var(--nav-h) + 24px + env(safe-area-inset-bottom)) / var(--ui-scale, 1));
  zoom: var(--ui-scale, 1);
  background: transparent;
}

html.boot-lock #app {
  height: calc(100dvh / var(--ui-scale, 1));
  min-height: calc(100dvh / var(--ui-scale, 1));
  max-height: calc(100dvh / var(--ui-scale, 1));
  overflow: hidden;
  padding-bottom: 0;
}

.app-shell {
  min-height: 100vh;
}

.container {
  width: min(var(--feed-w), 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(5, 5, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.topbar-title {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-badge--ussr {
  line-height: 0;
}

.logo-ussr-img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.logo-badge--ussr svg {
  width: 22px;
  height: 22px;
}

.logo-badge--pride .pride-flag-svg {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

[data-skin="ussr"] .logo-word {
  font-family: "Russo One", "Geologica", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  transform: skewX(-8deg);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #f5f0e6;
  filter: none;
}

[data-skin="ussr"] .logo-bang {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #e8b830;
}

[data-skin="pride"] .logo-word {
  background: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982);
  filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.25));
}

[data-skin="pride"] .logo-bang {
  background: linear-gradient(105deg, #ff8c00, #e40303);
}

.logo-word {
  display: inline-block;
  font-family: var(--font);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  transform: skewX(-10deg);
  background: linear-gradient(105deg, #c084fc 0%, #e879f9 45%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.35));
}

.logo-word--sm { font-size: 1.28rem; }
.logo-word--lg { font-size: clamp(2.2rem, 8vw, 2.85rem); }

.logo-bang {
  background: linear-gradient(105deg, #fb7185, #fda4af);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35);
}

.topbar-back .topbar-inner {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
}
.topbar-back .topbar-title { grid-column: 2; }
.topbar-back .topbar-actions { grid-column: 3; }
.topbar-back .chat-topbar-head { grid-column: 2; justify-self: center; }

.topbar-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; overflow: visible; }

.topbar-actions .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.topbar-actions .icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.topbar-actions .icon-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
}

[data-theme="light"] .topbar-actions .icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: transform 0.12s, background 0.15s;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-dot {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  z-index: 4;
  pointer-events: none;
  box-sizing: border-box;
}

.nav-item .badge-dot {
  top: -4px;
  right: -7px;
  left: auto;
  transform: none;
}

.icon-btn .badge-dot {
  top: 3px;
  right: 3px;
  left: auto;
  transform: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(420px, calc(100% - 20px));
  transform: translateX(-50%);
  min-height: 58px;
  height: auto;
  background: rgba(16, 16, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 5px 6px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  gap: 2px;
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-icon-wrap .badge-dot {
  top: -4px;
  right: -7px;
  left: auto;
  transform: none;
  min-width: 15px;
  height: 15px;
  font-size: 0.54rem;
  padding: 0 3px;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--text-muted);
  border-radius: 14px;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 5px 4px;
  max-width: none;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

#bottom-nav .nav-item.pressable {
  transform: none;
  transition: color 0.18s ease, background 0.18s ease;
}

#bottom-nav .nav-item:focus,
#bottom-nav .nav-item:focus-visible {
  outline: none;
  box-shadow: none;
}

#bottom-nav .nav-item svg,
#bottom-nav .nav-item .nav-avatar {
  transition: transform 0.14s ease;
}

#bottom-nav .nav-item:active svg,
#bottom-nav .nav-item:active .nav-avatar {
  transform: scale(0.88);
}

.nav-item span {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-create svg { stroke-width: 2.2; }

.nav-item.active {
  color: #fff;
}

#bottom-nav .nav-item.active {
  background: rgba(168, 85, 247, 0.16);
  color: #fff;
  box-shadow: none;
}

[data-theme="light"] #bottom-nav .nav-item.active {
  background: rgba(147, 51, 234, 0.1);
  color: var(--accent);
}

#bottom-nav .nav-item::after {
  display: none;
}

#bottom-nav .nav-item.is-pressed,
#bottom-nav .nav-item.ripple {
  transform: none;
  filter: none;
  background: transparent;
  box-shadow: none;
}

#bottom-nav .nav-item.is-pressed svg,
#bottom-nav .nav-item.is-pressed .nav-avatar {
  transform: scale(0.88);
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
}

.nav-item.active .nav-avatar { border-color: var(--accent); }

.nav-item .avatar.nav-avatar { width: 24px; height: 24px; font-size: 0.55rem; }

.section-label, .page-title {
  padding: 16px 16px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.inbox-head .page-title { padding-bottom: 4px; }

.inbox-sub {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}

.post-card {
  background: linear-gradient(180deg, rgba(23, 23, 34, 0.95), rgba(16, 16, 24, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 14px 10px 0;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.post-header .avatar { width: 38px; height: 38px; font-size: 0.75rem; }

.post-header-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.post-author {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.post-time-ago {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.post-location {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.post-location svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  opacity: 0.85;
}

.post-menu {
  margin-left: auto;
  opacity: 0.7;
  font-size: 1.1rem;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 12px;
}

.post-menu-sheet {
  width: min(420px, 100%);
  padding: 14px;
}

.post-menu-head {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 4px 8px 10px;
}

.post-menu-actions {
  display: grid;
  gap: 6px;
}

.post-menu-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
}

.post-menu-action:hover {
  border-color: var(--sel-border);
  background: var(--sel-bg);
}

.post-menu-action.is-danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.28);
}

.post-menu-action-icon {
  width: 1.35rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.post-menu-cancel {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.post-media {
  width: 100%;
  background: var(--surface2);
  overflow: hidden;
  position: relative;
}

.post-media.is-multi:not(.post-carousel--video) {
  aspect-ratio: 1;
}

.post-media--natural,
.post-video-wrap,
.post-carousel.post-media--natural,
.post-carousel.post-carousel--video {
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 900px);
}

.post-media--natural .post-carousel-viewport,
.post-media--natural .post-carousel-track,
.post-media--natural .post-carousel-slide {
  height: auto;
}

.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-media--natural img,
.post-media--natural .post-carousel-slide img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 900px);
  object-fit: contain;
  background: #0a0a10;
}

.post-carousel-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.post-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s ease;
}

.post-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.post-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.post-carousel-slide--video {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a10;
  height: auto;
}

.post-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 900px);
  background: #0a0a10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-video-watermark {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  user-select: none;
}

.post-video-stage .post-video {
  width: 100%;
  height: 100%;
  max-height: min(70vh, 900px);
  object-fit: contain;
  display: block;
  background: #000;
}

.post-carousel-slide--video .post-video-stage,
.post-carousel--video .post-video-stage {
  max-height: min(70vh, 900px);
}

.post-carousel-slide--video .post-video,
.post-carousel--video .post-video {
  width: 100%;
  height: 100%;
  max-height: min(70vh, 900px);
  object-fit: contain;
}

.post-carousel--video .post-carousel-viewport {
  background: #000;
  height: auto;
}

.post-carousel--video.post-media--natural .post-carousel-track {
  align-items: stretch;
}

.post-carousel-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: none;
}

.post-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-carousel-arrow.prev { left: 10px; }
.post-carousel-arrow.next { right: 10px; }

.post-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.post-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.post-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 0.15s, background 0.15s;
}

.post-carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.grid-multi-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.grid-media { position: relative; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.94);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0;
}

.lightbox.hidden { display: none; }

.lightbox-stage {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.lightbox-img {
  max-width: min(100vw, 920px);
  max-height: min(88vh, 920px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.08s linear;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.1rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
}

.lightbox-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
}

.create-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  padding: 8px;
}

.create-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
}

.create-thumb img,
.create-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.create-photo-count {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: -4px 0 8px;
  font-weight: 600;
}

.post-media.text-only {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  padding: 10px 14px;
  text-align: left;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.post-media.text-only .post-text-content {
  line-height: 1.45;
}

.post-text-block { width: 100%; }

.post-text-content {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

.post-text-block.is-collapsed .post-text-content {
  max-height: 168px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.post-text-more {
  display: block;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.post-text-more:hover { color: #e879f9; }

.post-caption .post-text-block { margin-top: 4px; }

.post-body { padding: 0 14px 14px; }

.post-actions {
  display: flex;
  gap: 12px;
  padding: 12px 0 8px;
  align-items: center;
}

.post-action-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #e8e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-action-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--sel-border);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-action-btn.like-btn .heart-shape {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.85;
  transform-origin: center;
  transition: fill 0.22s ease, stroke 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-action-btn.like-btn.liked {
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--like) 30%, transparent), color-mix(in srgb, var(--accent2) 22%, transparent));
  border-color: color-mix(in srgb, var(--like) 45%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--like) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.post-action-btn.like-btn.liked .heart-shape {
  fill: var(--like);
  stroke: color-mix(in srgb, var(--like) 75%, #fff);
}

.post-action-btn.like-btn.like-pop .heart-shape {
  animation: heartPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.32); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.post-action-btn.copied,
[data-share].copied {
  color: var(--accent) !important;
  border-color: var(--sel-border) !important;
  background: linear-gradient(145deg, var(--sel-bg), color-mix(in srgb, var(--accent2) 18%, transparent)) !important;
  box-shadow: 0 0 0 2px var(--sel-glow), 0 0 24px var(--sel-glow) !important;
  transform: scale(1.04);
}

.toast-host {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(380px, calc(100% - 32px));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--sel-border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 28px var(--sel-glow);
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-14px) scale(0.94);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-bump {
  animation: toastBump 0.22s ease;
}

@keyframes toastBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  font-size: 0.72rem;
  color: #fff;
  flex-shrink: 0;
}


.post-likes {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.post-likes.is-empty {
  display: none;
  margin: 0;
}

.post-author,
.nav-item span,
.topbar-title,
.grid-overlay,
.profile-stats strong,
.stat strong,
.page-title,
.section-label,
.post-meta,
.badge-dot,
.admin-tag,
.setting-label {
  font-family: var(--font-display);
}

.post-caption, .post-comment { font-size: 0.92rem; line-height: 1.32; overflow-wrap: anywhere; word-break: break-word; }
.post-caption { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.post-caption-user {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.post-caption-text { color: var(--text); font-weight: 400; }
.post-caption b, .post-comment b { margin-right: 6px; }

.post-meta { color: var(--text-muted); font-size: 0.74rem; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.04em; }

.post-comments { margin-top: 8px; display: grid; gap: 6px; }

.post-comment-wrap { display: grid; gap: 2px; }
.post-comment-wrap.is-reply { margin-left: 10px; padding-left: 10px; border-left: 2px solid var(--sel-border); }

.comment-replies { display: grid; gap: 6px; margin-top: 0; }

.post-comment { display: flex; flex-direction: column; gap: 0; cursor: context-menu; }

.comment-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-line {
  display: inline;
}

.comment-body b { margin-right: 4px; }

.translatable-inline {
  display: inline;
}

.translatable-inline .translatable-original,
.translatable-inline .translatable-result:not(.hidden) {
  display: inline;
}

.translatable {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
}

.translate-link,
.translate-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 2px 0 0;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.5;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.translate-link:hover,
.translate-link:focus-visible,
.translate-btn:hover,
.translate-btn:focus-visible {
  opacity: 0.85;
  color: var(--muted);
}
.translate-link:disabled,
.translate-btn:disabled {
  opacity: 0.4;
  cursor: wait;
}
.translatable-result {
  width: 100%;
  font-size: 0.9em;
  line-height: 1.45;
  color: var(--muted);
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.comment-text .translatable,
.post-caption-text .translatable,
.post-text-content .translatable {
  display: inline;
  width: auto;
  max-width: 100%;
}
.comment-text .translate-link,
.post-caption-text .translate-link,
.post-text-content .translate-link {
  display: inline;
  margin: 0 0 0 6px;
  vertical-align: baseline;
}
.msg-bubble .translatable-plain {
  gap: 4px;
}
.msg-bubble .translatable-result {
  color: inherit;
  opacity: 0.92;
  border-left-color: rgba(255, 255, 255, 0.35);
}
.msg-bubble.theirs .translatable-result {
  border-left-color: var(--border);
  opacity: 1;
  color: var(--muted);
}

.comment-actions {
  display: none;
}

.comment-reply-btn {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0;
  margin: 1px 0 0;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.comment-reply-btn:hover { color: var(--accent); }

.comment-reply-to {
  color: var(--accent);
  font-weight: 600;
  margin-right: 2px;
}

.comment-reply-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 4px 0 2px;
}

.comment-form-error {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fca5a5;
}

.comment-form-error.hidden { display: none; }

.comment-reply-form.hidden { display: none; }

.comment-reply-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  font-size: 0.84rem;
}

.comment-reply-form .btn-primary {
  background: transparent;
  color: var(--accent);
  padding: 6px 8px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}

.comment-reply-form .comment-send-btn {
  font-size: 0.78rem;
  padding: 6px 2px;
}

.comment-reply-form .btn-primary:disabled { color: var(--text-muted); opacity: 0.5; }

.comment-reply-cancel {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 6px;
  line-height: 1;
}

.comment-text { color: var(--text); }

.comment-like {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0;
  background: none;
  border: none;
  transition: color 0.15s, transform 0.12s;
  touch-action: manipulation;
}

.comment-like.liked { color: var(--like); }

.comment-like-error {
  border-color: rgba(251, 113, 133, 0.8) !important;
  animation: likeShake 0.35s ease;
}

@keyframes likeShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.btn-link { color: var(--text-muted); font-size: 0.85rem; padding: 6px 0; display: inline-block; }

.comment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.comment-form .comment-form-error {
  flex: 1 1 100%;
}

.comment-form input { flex: 1; border: none; background: transparent; padding: 8px 0; }
.comment-form .btn-primary { background: transparent; color: var(--accent); padding: 8px; font-weight: 700; }
.comment-form .btn-primary:disabled { color: var(--text-muted); opacity: 0.5; }

.comment-send-btn {
  border: none;
  background: none;
  box-shadow: none;
  color: var(--accent);
  padding: 6px 4px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0;
  min-width: 0;
}

.comment-send-btn:disabled {
  color: var(--text-muted);
  opacity: 0.45;
  cursor: default;
}

.comment-send-btn:not(:disabled):hover {
  color: var(--accent2);
}

.profile-header {
  padding: 16px 16px 12px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 0;
  overflow: visible;
}

.profile-row .avatar-wrap--lg {
  margin-top: 0;
}

.profile-row .avatar.lg {
  width: 92px;
  height: 92px;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--sel-border);
}

.profile-stats { display: flex; gap: 20px; flex: 1; justify-content: center; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.12rem; }
.stat span { font-size: 0.74rem; color: var(--text-muted); }

.stat.stat-cookies {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

.stat.stat-cookies strong {
  color: inherit;
}

.post-comment-wrap.comment-highlight {
  animation: commentFlash 2.4s ease;
}

@keyframes commentFlash {
  0%, 100% { background: transparent; }
  15%, 45% { background: rgba(168, 85, 247, 0.12); border-radius: 8px; }
}


.deco-picker {
  display: grid;
  gap: 12px;
}

.deco-picker-main {
  display: grid;
  gap: 16px;
}

.deco-picker-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: visible;
}

.deco-picker-preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.deco-picker-preview-avatar .avatar-wrap--lg .avatar,
.deco-picker-preview-avatar .avatar-wrap--lg img.avatar {
  width: 88px;
  height: 88px;
  font-size: 1.35rem;
  box-shadow: 0 0 0 3px var(--sel-border);
}

.deco-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.deco-tile {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  min-height: 92px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.deco-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.deco-tile-preview {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  position: relative;
}

.deco-tile-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.deco-tile-preview--none {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.deco-tile-label {
  width: 100%;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
  color: var(--text-muted);
}

.admin-deco-grant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.admin-deco-grant {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 0.82rem;
}

.admin-deco-grant-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-deco-active {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.admin-deco-active select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.profile-name {
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25em;
  line-height: 1.25;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  vertical-align: 1px;
  touch-action: manipulation;
}

.verified-badge:hover {
  filter: brightness(1.08);
}

.verified-badge.verified-badge--admin {
  color: #5c3a00;
  background: linear-gradient(145deg, #fff176 0%, #ffc107 42%, #ff9800 100%);
  box-shadow: 0 0 0 1px rgba(255, 214, 64, 0.55) inset;
}

.verified-badge.verified-badge--admin:hover {
  filter: brightness(1.08);
}

.verified-badge.verified-badge--admin svg {
  width: 12px;
  height: 12px;
  display: block;
}

.verified-badge.verified-badge--admin.is-pressed {
  transform: scale(0.93);
}

.profile-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  width: 100%;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.profile-username {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.app-splash {
  min-height: calc(100dvh / var(--ui-scale, 1));
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.app-splash-inner {
  display: grid;
  gap: 16px;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.app-splash-logo {
  animation: splash-float 2.4s ease-in-out infinite;
}

.app-splash-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 1.4em;
  text-align: center;
}

.app-splash-bar {
  width: min(220px, 70vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.app-splash-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-grad);
  animation: splash-progress 2.8s ease forwards;
}

.app-splash-hint {
  display: none;
}

.app-splash {
  cursor: default;
}

.settings-hub-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes splash-progress {
  to { width: 100%; }
}

.app-splash--ussr {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(180, 20, 20, 0.35), transparent 55%),
    linear-gradient(180deg, #140808 0%, #0a0606 100%);
}

.app-splash-ussr-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-splash-ussr-rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    transparent 0deg 16deg,
    rgba(204, 0, 0, 0.14) 16deg 32deg,
    transparent 32deg 48deg,
    rgba(255, 215, 0, 0.1) 48deg 64deg,
    transparent 64deg 80deg,
    rgba(204, 0, 0, 0.12) 80deg 96deg,
    transparent 96deg 360deg
  );
  animation: splash-ussr-spin 18s linear infinite;
  opacity: 0.9;
}

.app-splash-ussr-stars {
  position: absolute;
  inset: 0;
}

.app-splash-ussr-stars span {
  position: absolute;
  color: rgba(255, 215, 0, 0.55);
  font-size: 0.85rem;
  animation: splash-star-pulse 2.2s ease-in-out infinite;
}

.app-splash-ussr-stars span:nth-child(1) { left: 12%; top: 18%; animation-delay: 0s; }
.app-splash-ussr-stars span:nth-child(2) { right: 14%; top: 22%; animation-delay: 0.4s; }
.app-splash-ussr-stars span:nth-child(3) { left: 20%; bottom: 24%; animation-delay: 0.8s; }
.app-splash-ussr-stars span:nth-child(4) { right: 18%; bottom: 20%; animation-delay: 1.2s; }
.app-splash-ussr-stars span:nth-child(5) { left: 50%; top: 12%; transform: translateX(-50%); animation-delay: 0.6s; font-size: 1.1rem; }

.app-splash-tagline--ussr {
  color: #f0ead8;
  letter-spacing: 0.02em;
  max-width: 18rem;
}

.app-splash-bar--ussr {
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: rgba(0, 0, 0, 0.35);
}

.app-splash-bar--ussr .app-splash-bar-fill {
  background: linear-gradient(90deg, #b91c1c, #fbbf24);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}

@keyframes splash-ussr-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes splash-star-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.chat-topbar-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  border: none;
  background: none;
  color: inherit;
  padding: 2px 8px;
  cursor: pointer;
  max-width: 100%;
}

.chat-topbar-head--simple {
  align-items: center;
  text-align: center;
}

.chat-topbar-head:hover .topbar-title { color: var(--accent); }

.chat-topbar-status {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.chat-compose-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 16px 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.chat-compose-hint.hidden { display: none; }
#chat-compose-hint-text {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.chat-reply-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}
.chat-reply-user {
  font-size: 0.78rem;
  font-weight: 700;
}
.chat-reply-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-compose-cancel {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  padding: 4px;
}

.msg-status {
  letter-spacing: -0.12em;
  opacity: 0.65;
  font-size: 0.72rem;
}
.msg-status.read { color: #7dd3fc; opacity: 1; }

.password-confirm-card {
  max-width: 360px;
  padding: 20px;
}

.password-confirm-field {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.password-confirm-field input {
  text-transform: none;
  letter-spacing: normal;
}

.msg-confirm-card {
  max-width: 360px;
  padding: 20px;
}
.msg-confirm-text {
  margin: 0 0 16px;
  line-height: 1.45;
}
.msg-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.msg-confirm-actions .btn {
  flex: 1;
  width: auto;
}

.app-splash-text {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.65);
}

.status-dot.offline {
  background: #6b7280;
}

.status-dot.banned {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.status-dot.admin {
  background: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}

.avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  overflow: visible;
}

.avatar-wrap--deco .avatar,
.avatar-wrap--deco img.avatar {
  position: relative;
  z-index: 1;
}

.avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 142%;
  height: 142%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  object-fit: contain;
  user-select: none;
}

.avatar-wrap--lg .avatar-deco {
  width: 136%;
  height: 136%;
}

.avatar-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 5;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-sizing: content-box;
}

.avatar-wrap--lg .avatar-presence {
  width: 12px;
  height: 12px;
  right: 1px;
  bottom: 1px;
}

.avatar-presence.online { background: #4ade80; }
.avatar-presence.offline { background: #6b7280; }
.avatar-presence.banned { background: #ef4444; }

.profile-bio {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
}
.profile-actions .btn {
  min-width: 120px;
  text-align: center;
}
.profile-actions .btn:only-child {
  flex: 0 0 auto;
  align-self: flex-start;
}
.profile-actions .btn:not(:only-child) {
  flex: 1;
}

.profile-tabs { display: flex; border-top: 1px solid var(--border); }
.profile-tabs span {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-tabs span.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.post-grid,
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 6px 6px 24px;
}

.grid-item {
  aspect-ratio: 1;
  background: var(--surface2);
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.grid-media,
.grid-media img,
.grid-text-card {
  width: 100%;
  height: 100%;
}

.grid-media img {
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.grid-text-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.grid-text-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.2), transparent 48%),
    radial-gradient(circle at 82% 88%, rgba(0, 0, 0, 0.22), transparent 42%);
  pointer-events: none;
}

.grid-text-icon {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: 8px;
  opacity: 0.55;
}

.grid-text-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.grid-text-preview {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(0.68rem, 2.6vw, 0.8rem);
  line-height: 1.4;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.grid-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.18s ease;
  font-weight: 700;
  font-size: 0.84rem;
  color: #fff;
  z-index: 2;
}

.grid-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.grid-stat svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.grid-stat svg path {
  fill: currentColor;
}

.grid-item:hover,
.grid-item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--sel-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.grid-item:hover .grid-media img,
.grid-item:focus-visible .grid-media img {
  transform: scale(1.05);
}

.grid-item:hover .grid-overlay,
.grid-item:focus-visible .grid-overlay,
.grid-item:active .grid-overlay {
  opacity: 1;
}

.grid-item:hover .grid-shade,
.grid-item:focus-visible .grid-shade,
.grid-item:active .grid-shade {
  opacity: 0;
}

@media (hover: none) {
  .grid-overlay {
    opacity: 1;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
    align-items: flex-end;
    padding-bottom: 8px;
    font-size: 0.72rem;
    gap: 10px;
  }

  .grid-shade { display: none; }
}

.search-bar { padding: 12px 16px; }
.search-bar input {
  width: 100%; padding: 13px 16px; border-radius: 16px;
  background: var(--surface2); border: 1px solid var(--border);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--sel-focus);
  box-shadow: 0 0 0 3px var(--sel-glow);
}

.explore-grid { padding: 0 6px 16px; }

.user-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}

.user-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.user-list-login {
  display: block;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
}

.user-list-name {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-item.unread { background: var(--sel-glow); }
.notif-item .avatar { width: 44px; height: 44px; }
.notif-text { flex: 1; font-size: 0.9rem; line-height: 1.4; }
.notif-time { color: var(--text-muted); font-size: 0.75rem; margin-top: 4px; }

.chat-list-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-list-item .badge-dot { top: 50%; right: 16px; transform: translateY(-50%); }
.chat-list-item.active {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
}

.messages-split {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.messages-sidebar {
  flex: 0 0 min(300px, 36vw);
  max-width: 300px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.messages-sidebar .inbox-head--compact {
  padding: 12px 14px 8px;
  flex-shrink: 0;
}

.messages-sidebar .inbox-head--compact .page-title {
  font-size: 0.95rem;
  margin: 0;
}

.messages-sidebar .inbox-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.messages-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages-main .chat-page {
  flex: 1;
  min-height: 0;
}

.layout-messages-split {
  height: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layout-messages-split .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.layout-messages-split .topbar {
  width: 100%;
  border-radius: 0;
  position: relative;
  top: auto;
  flex-shrink: 0;
}

.layout-messages-split .topbar-inner {
  width: 100%;
  max-width: none;
  padding-left: 16px;
  padding-right: 16px;
}

.layout-messages-split .chat-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.layout-messages-split .chat-input {
  flex-shrink: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  gap: 8px;
  align-items: center;
}

.layout-messages-split .chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.layout-messages-split .chat-typing { padding: 0 16px 8px; }

.layout-messages-split .chat-send {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}

.layout-messages-split .chat-send svg {
  width: 18px;
  height: 18px;
}

.page-other.layout-messages-split ~ .bottom-nav,
.layout-messages-split .bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  .messages-split .messages-sidebar {
    display: none;
  }

  .messages-sidebar {
    max-width: none;
    flex-basis: auto;
  }
}

.chat-preview { flex: 1; min-width: 0; }
.chat-preview span { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.layout-chat {
  height: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layout-chat .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.layout-chat .topbar {
  width: 100%;
  border-radius: 0;
  position: relative;
  top: auto;
  flex-shrink: 0;
}

.layout-chat .topbar-inner {
  width: 100%;
  max-width: none;
  padding-left: 16px;
  padding-right: 16px;
}

.layout-chat .chat-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
}

.layout-chat .chat-input {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(5, 5, 8, 0.96);
  backdrop-filter: blur(12px);
}

.layout-chat .chat-typing {
  flex-shrink: 0;
  width: min(var(--feed-w), 100%);
  margin: 0 auto;
  padding: 0 16px 6px;
  box-sizing: border-box;
}

.layout-chat .chat-input-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(var(--feed-w), 100%);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.layout-chat .chat-input input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--surface2);
  box-sizing: border-box;
}

.layout-chat #app,
.layout-chat.page-other {
  padding-bottom: 0;
}

.page-other.layout-chat ~ .bottom-nav,
.layout-chat .bottom-nav {
  position: fixed;
}

.layout-chat .chat-messages {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  width: min(var(--feed-w), 100%);
  margin: 0 auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.layout-chat .chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.layout-chat .chat-send {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.layout-chat .chat-send svg {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout-admin-thread {
  height: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layout-admin-thread .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.layout-admin-thread .topbar {
  width: 100%;
  border-radius: 0;
  position: relative;
  top: auto;
  flex-shrink: 0;
}

.layout-admin-thread .admin-nav {
  flex-shrink: 0;
}

.layout-admin-thread .admin-page--thread,
.layout-admin-thread .admin-page--modlog {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 0;
}

.layout-admin-thread .admin-chat-thread-toolbar,
.layout-admin-thread .admin-modlog-filters {
  flex-shrink: 0;
}

.layout-admin-thread .admin-chat-thread-scroll,
.layout-admin-thread .admin-scroll-list--page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chat-page { display: flex; flex-direction: column; min-height: 320px; overflow: hidden; }
.chat-messages {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.chat-empty { padding: 24px !important; }

.msg-bubble {
  width: fit-content;
  max-width: min(78vw, 420px);
  padding: 0;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
}

.msg-bubble-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  column-gap: 6px;
  row-gap: 2px;
  padding: 6px 10px 5px;
  min-width: 44px;
}

.msg-text {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.msg-quote,
.msg-forward-label {
  flex: 1 1 100%;
  width: 100%;
}

.msg-bubble-footer {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.52);
  user-select: none;
  white-space: nowrap;
}

.msg-bubble.theirs .msg-bubble-footer {
  color: var(--text-muted);
}

.msg-time {
  white-space: nowrap;
}

.msg-status {
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: -0.08em;
  opacity: 0.85;
}

.msg-row {
  margin-top: 8px;
}

.chat-messages > .msg-row:first-child {
  margin-top: 0;
}

.msg-row.is-grouped {
  margin-top: 2px;
}

.msg-row.is-grouped .msg-bubble.theirs {
  border-top-left-radius: 7px;
}

.msg-row.mine.is-grouped .msg-bubble.mine {
  border-top-right-radius: 18px;
}

.msg-row.theirs {
  display: grid;
  grid-template-columns: 36px max-content;
  column-gap: 6px;
  align-items: end;
  width: fit-content;
  max-width: calc(100% - 12px);
  align-self: flex-start;
}

.msg-row.mine {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  align-self: flex-end;
}

.msg-row.mine .msg-bubble {
  margin-left: auto;
}

.msg-avatar,
.msg-avatar-spacer {
  flex-shrink: 0;
  width: 36px;
  min-height: 36px;
  height: auto;
  overflow: visible;
  align-self: flex-end;
  grid-row: 1 / -1;
}

.msg-avatar {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 3px;
  box-sizing: border-box;
}

.msg-avatar .avatar-wrap--deco {
  margin-top: 0;
}

.msg-avatar .avatar-deco {
  width: 150%;
  height: 150%;
}

.msg-avatar-spacer {
  display: block;
}

.msg-avatar .avatar,
.msg-avatar img {
  width: 28px;
  height: 28px;
  font-size: 0.64rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.msg-avatar .avatar-wrap {
  overflow: visible;
}

.msg-avatar .avatar-presence {
  border-color: var(--bg);
}

.msg-bubble.mine {
  background: var(--accent-grad);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.msg-bubble.theirs {
  background: rgba(24, 24, 32, 0.96);
  border: none;
  border-bottom-left-radius: 5px;
}

.msg-row.mine .msg-status.read,
.msg-bubble.mine .msg-status.read {
  color: #93c5fd;
  opacity: 1;
}
.msg-bubble.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.msg-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 188px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 26, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.msg-context-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  padding: 11px 14px;
  border-radius: 9px;
}
.msg-quote {
  display: grid;
  gap: 1px;
  margin: -2px -2px 5px;
  padding: 5px 8px 5px 9px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.msg-bubble.mine .msg-quote {
  border-left-color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.14);
}

.msg-quote-user {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.msg-bubble.mine .msg-quote-user { color: #fecdd3; }

.msg-quote-text {
  font-size: 0.78rem;
  opacity: 0.88;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.msg-forward-label {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.78;
  margin-bottom: 4px;
  font-style: italic;
}

.chat-select-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 16, 0.92);
  flex-shrink: 0;
}
.chat-select-bar.hidden { display: none; }
.chat-select-count {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.chat-select-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 8px;
}
.chat-select-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.chat-select-btn.is-danger { color: #f87171; }
.chat-page.is-select-mode .msg-bubble { cursor: pointer; }
.msg-forward-card {
  width: min(420px, 100%);
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
}
.msg-forward-title {
  margin: 0 0 12px;
  font-size: 1rem;
}
.msg-forward-list {
  display: grid;
  gap: 4px;
}
.msg-forward-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 10px 8px;
  border-radius: 10px;
  text-align: left;
}
.msg-forward-item:hover,
.msg-forward-item:focus-visible {
  background: var(--surface2);
}
.msg-context-menu.hidden { display: none; }
.msg-context-item:hover,
.msg-context-item:focus-visible {
  background: var(--surface2);
}
.msg-context-item.is-danger { color: #f87171; }

.chat-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-typing {
  flex-shrink: 0;
  padding: 0 16px 8px;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 1.2em;
}
.chat-typing.hidden { display: none; }
.layout-chat .chat-typing { padding: 0 16px 8px; }
.chat-input input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; background: var(--surface2); }
.settings-section { padding: 20px 16px; border-bottom: 1px solid var(--border); }
.settings-section h2 { margin: 0 0 12px; font-size: 1rem; }

.settings-page { padding: 16px 12px 28px; }

.settings-group {
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--border);
}

.settings-group:last-child { border-bottom: none; }

.settings-group-title {
  margin: 0;
  padding: 14px 16px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.settings-group-body {
  display: grid;
  gap: 0;
}

.settings-subsection { padding: 0 16px 12px; }
.settings-subtitle { margin: 0 0 10px; font-size: 0.9rem; font-weight: 600; }
.settings-actions { padding: 8px 16px 16px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  min-height: 52px;
}

.setting-row--col {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.setting-row--static { align-items: flex-start; }

.setting-link {
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.setting-link:hover { background: var(--sel-glow); }

.setting-info { flex: 1; min-width: 0; }

.setting-label { font-size: 0.95rem; font-weight: 600; }

.setting-desc {
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.setting-desc.muted { margin-top: 0; }

.setting-hint {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.settings-footnote { margin-top: 8px; }

.profile-edit-page .settings-group + .settings-group {
  margin-top: 14px;
}

.profile-edit-page .settings-group-body {
  padding: 0 16px 16px;
}

.profile-edit-page .settings-subsection {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.profile-edit-page .settings-subtitle {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.profile-avatar-change {
  display: grid;
  gap: 12px;
}

.profile-avatar-preview .avatar-wrap--lg .avatar,
.profile-avatar-preview .avatar-wrap--lg img.avatar {
  width: 88px;
  height: 88px;
  font-size: 1.35rem;
  box-shadow: 0 0 0 3px var(--sel-border);
}

.setting-chevron {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.theme-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-pill {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.theme-pill.active {
  color: #fff;
  border-color: transparent;
  background: var(--accent-grad);
}

[data-theme="light"] .theme-pill.active { color: #fff; }

.setting-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .switch-track {
  background: var(--accent);
  border-color: transparent;
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
  background: #fff;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-settings-btn svg {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  margin-right: 4px;
}

.btn-danger {
  width: 100%;
  justify-content: center;
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--danger);
}

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth-glow {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 70%);
  top: 8%; left: 50%; transform: translateX(-50%); pointer-events: none;
}

.auth-card {
  width: min(420px, 100%); padding: 32px 28px; border-radius: 26px;
  background: rgba(16, 16, 24, 0.92); border: 1px solid var(--border); position: relative; z-index: 1;
}

.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 8px;
}

.auth-logo .logo-lockup {
  gap: 16px;
}

.auth-logo .logo-ussr-img {
  width: 34px;
  height: 34px;
}

.auth-card h1 { text-align: center; margin: 0 0 6px; }
.auth-title { text-align: center; margin: 0 0 8px; font-size: 1.15rem; }
.auth-sub { text-align: center; color: var(--text-muted); margin: 0 0 20px; }
.auth-links { margin-top: 12px; font-size: 0.88rem; }

.password-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.password-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 1rem;
}

.verify-wizard-modal { z-index: 120; place-items: center; }
.verify-wizard-card {
  width: min(520px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 24px 24px 18px;
}
.verify-wizard-card .modal-close {
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
}
.verify-wizard-viewport { overflow: hidden; min-height: 340px; }
.verify-wizard-track { transition: transform 0.25s ease; }
.verify-slide {
  display: grid;
  gap: 18px;
  padding: 8px 4px 12px;
  min-height: 320px;
  align-content: start;
}
.verify-slide h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
}
.verify-slide p,
.verify-benefits,
.verify-steps-list {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 1rem;
}
.verify-slide--intro p { font-size: 1.02rem; }
.verify-benefits,
.verify-steps-list {
  padding-left: 1.25rem;
  display: grid;
  gap: 10px;
}
.verify-slide--form label {
  font-size: 0.78rem;
  gap: 8px;
}
.verify-slide--form input,
.verify-slide--form textarea {
  font-size: 1rem;
  padding: 14px 16px;
  min-height: 52px;
}
.verify-slide--form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}
.verify-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.verify-wizard-nav-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.verify-wizard-dots { display: flex; gap: 8px; flex: 1; justify-content: center; align-items: center; }
.verify-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.verify-dot.active { background: var(--accent); transform: scale(1.15); }
.verify-signature-preview img { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.verify-review { display: grid; gap: 10px; font-size: 1rem; color: var(--text); }
.verify-review p {
  margin: 0;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--border);
  line-height: 1.45;
}
.verify-slide #verify-submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px 16px;
  font-size: 1rem;
}

.admin-recovery-card {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.admin-recovery-head { margin-bottom: 8px; }

.form-stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface2); }
input:focus, textarea:focus { outline: none; border-color: var(--sel-focus); }

.btn { border-radius: 14px; padding: 12px 16px; font-weight: 700; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 28px var(--sel-glow); }
.btn-ghost { background: var(--surface2); border: 1px solid var(--border); }
.btn-follow { background: var(--accent-grad); color: #fff; padding: 8px 18px; font-size: 0.88rem; position: relative; overflow: visible; }
.btn-follow::after { display: none !important; }
.btn-follow.active { background: var(--surface2); border: 1px solid var(--border); color: var(--text); box-shadow: none; }

.error-text { color: var(--danger); font-size: 0.88rem; }
.success-text { color: #4ade80; font-size: 0.88rem; }
.muted-link { text-align: center; margin-top: 16px; color: var(--text-muted); }
.muted-link a { color: var(--accent); font-weight: 700; }
.muted-center { color: var(--text-muted); text-align: center; }

.empty-state { text-align: center; padding: 40px 24px; color: var(--text-muted); }
.empty-state.wide { grid-column: 1 / -1; }
.empty-state a { color: var(--accent); font-weight: 700; }

.hidden { display: none !important; }

.file-label {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); cursor: pointer;
}

.file-label input { display: none; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  background: var(--accent-grad); display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); }

.modal-card {
  position: relative; width: min(520px, 100%); max-height: 92vh; overflow: auto;
  background: rgba(16, 16, 24, 0.98); border: 1px solid var(--border);
  border-radius: 26px 26px 18px 18px; padding: 18px; animation: sheetUp 0.25s ease;
}

.create-modal { width: min(480px, 100%); }

.create-modal #create-form { display: grid; gap: 14px; }

.create-drop {
  display: block;
  cursor: pointer;
  border-radius: 18px;
  overflow: hidden;
}

.create-drop input { display: none; }

.create-drop.drag .create-preview { border-color: var(--accent); background: var(--sel-glow); }

.create-preview {
  width: 100%;
  aspect-ratio: 1;
  max-height: 42vh;
  background: var(--surface2);
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  overflow: hidden;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  transition: border-color 0.15s, background 0.15s;
}

.create-preview.has-image { border-style: solid; padding: 0; }

.create-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.create-drop-icon { font-size: 2rem; line-height: 1; color: var(--accent); }

.create-drop-hint { font-size: 0.82rem; opacity: 0.8; }

.create-caption {
  display: grid;
  gap: 10px;
}

#create-location {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 11px 14px;
  font-size: 0.9rem;
}

.create-caption textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 12px 14px;
}

.create-submit { width: 100%; }

.search-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.search-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-tab.active {
  color: #fff;
  background: var(--sel-bg);
  border-color: var(--sel-border);
}

.search-posts .post-card { margin-left: 0; margin-right: 0; }

#app:has(.layout-chat),
#app:has(.layout-messages-split),
#app:has(.layout-admin-thread) {
  padding-bottom: 0;
  height: calc(100dvh / var(--ui-scale, 1));
  min-height: calc(100dvh / var(--ui-scale, 1));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#app:has(.layout-chat),
#app:has(.layout-messages-split),
#app:has(.layout-admin-thread),
body:has(#app .layout-chat),
body:has(#app .layout-messages-split),
body:has(#app .layout-admin-thread) {
  overflow: hidden;
}

#app:has(.layout-chat) .app-shell,
#app:has(.layout-messages-split) .app-shell,
#app:has(.layout-admin-thread) .app-shell {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
}

#app:has(.layout-chat) .container,
#app:has(.layout-messages-split) .container,
#app:has(.layout-admin-thread) .container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.skel { color: var(--text-muted); }

@keyframes sheetUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }

@media (min-width: 768px) {
  :root { --feed-w: 620px; --nav-h: 72px; }
  .post-card { margin-left: 0; margin-right: 0; }
  .container { padding: 0 8px; }
  .modal { place-items: center; }
  .modal-card { border-radius: 24px; }
  .create-preview { max-height: 360px; }
}

@media (min-width: 1024px) {
  :root { --feed-w: 680px; }

  #app:not(:has(.layout-chat)):not(:has(.layout-messages-split)) {
    padding-bottom: calc(var(--nav-h) + 32px);
  }

  .bottom-nav {
    width: min(480px, calc(100% - 48px));
  }

  .post-card:hover {
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(168, 85, 247, 0.08);
  }
}

@media (max-width: 380px) {
  .nav-item span { display: none; }
  .bottom-nav { width: calc(100% - 12px); }
  .profile-stats { gap: 12px; }
}

@media (pointer: fine) {
  .nav-item:not(.active):hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
  .post-action-btn:hover,
  .action-link:hover { background: rgba(255, 255, 255, 0.08); }
}

/* --- App skins --- */
[data-skin="ussr"] {
  --font: "Geologica", system-ui, sans-serif;
  --font-display: "Russo One", "Geologica", sans-serif;
  --bg: #0a0606;
  --surface: #161010;
  --surface2: #1e1414;
  --border: rgba(212, 175, 90, 0.16);
  --text: #f0ead8;
  --text-muted: #b0a090;
  --accent: #d4af37;
  --accent2: #991b1b;
  --accent-grad: linear-gradient(135deg, #7f1d1d 0%, #991b1b 45%, #b45309 100%);
  --like: #d4af37;
  --danger: #f87171;
  --sel-bg: rgba(153, 27, 27, 0.18);
  --sel-border: rgba(212, 175, 90, 0.32);
  --sel-press: rgba(127, 29, 29, 0.22);
  --sel-ring: rgba(212, 175, 90, 0.35);
  --sel-focus: rgba(212, 175, 90, 0.42);
  --sel-glow: rgba(153, 27, 27, 0.2);
  --cursor-default: url("/static/cursors/dot-ussr.svg?v=65") 10 10, auto;
  --cursor-pointer: url("/static/cursors/pointer-ussr.svg?v=65") 6 2, pointer;
}

[data-skin="ussr"] body,
[data-skin="ussr"] .post-caption,
[data-skin="ussr"] .post-comment,
[data-skin="ussr"] .comment-body,
[data-skin="ussr"] .setting-label,
[data-skin="ussr"] .chat-preview,
[data-skin="ussr"] .user-list-info {
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

[data-skin="ussr"] .post-likes {
  color: #f0d878;
  font-weight: 400;
}

[data-skin="ussr"] b,
[data-skin="ussr"] strong,
[data-skin="ussr"] .post-author,
[data-skin="ussr"] .comment-body b,
[data-skin="ussr"] .post-caption b {
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
}

[data-skin="ussr"] .topbar-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #f8f2e4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

[data-skin="ussr"] .btn {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.02em;
}

[data-skin="ussr"] .btn-ghost,
[data-skin="ussr"] .profile-settings-btn {
  color: #f5f0e6;
  background: rgba(28, 18, 18, 0.9);
  border-color: rgba(212, 175, 90, 0.3);
}

[data-skin="ussr"] .setting-label {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f0ead8;
}

[data-skin="ussr"] .settings-group-title {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #c8b890;
}

[data-skin="ussr"] .nav-item span {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.56rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

[data-skin="ussr"] .nav-item.active span {
  color: #f0d878;
}

[data-skin="ussr"] .post-author,
[data-skin="ussr"] .comment-body a b {
  color: #f0d878;
}

[data-skin="ussr"] .comment-reply-to,
[data-skin="ussr"] a:not(.btn):not(.nav-item):not(.brand) {
  color: #d4af37;
}

html[data-skin="ussr"] {
  background: #0a0606;
}

html[data-skin="ussr"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(55, 8, 8, 0.72) 0%, rgba(25, 6, 6, 0.82) 45%, rgba(12, 4, 4, 0.9) 100%),
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(153, 27, 27, 0.35), transparent 70%),
    url("/static/assets/ussr-bg.png?v=66") center top / cover no-repeat;
}

html[data-skin="ussr"] body::before {
  display: none;
}

[data-skin="ussr"] .layout-chat .chat-input,
[data-skin="ussr"] .layout-messages-split .chat-input {
  background: rgba(18, 12, 12, 0.96);
  border-top-color: rgba(212, 175, 90, 0.12);
}

[data-skin="ussr"] .topbar {
  background: rgba(18, 12, 12, 0.94);
  border-bottom-color: rgba(212, 175, 90, 0.12);
}

[data-skin="ussr"] .bottom-nav {
  background: rgba(18, 12, 12, 0.96);
  border-color: rgba(212, 175, 90, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

[data-skin="ussr"] .post-media.text-only {
  border-color: rgba(212, 175, 90, 0.08);
}

[data-skin="ussr"] .post-card {
  background: linear-gradient(180deg, rgba(28, 18, 18, 0.98), rgba(20, 12, 12, 0.98));
  border-color: rgba(212, 175, 90, 0.1);
}

[data-skin="ussr"] #bottom-nav .nav-item.active {
  color: #f0d878;
  background: rgba(153, 27, 27, 0.28);
  box-shadow: none;
}

[data-skin="ussr"] .avatar-deco {
  filter:
    drop-shadow(0 0 6px rgba(255, 224, 138, 0.55))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

[data-skin="ussr"] .search-tab.active,
[data-skin="ussr"] .admin-nav-link.active {
  color: #fff8e7;
}

[data-skin="ussr"] .toast {
  background: rgba(22, 12, 12, 0.96);
  color: #f5ead8;
}

[data-skin="ussr"] .toast-icon {
  color: #fff8e7;
}

[data-skin="ussr"] .badge-dot {
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
  border-color: var(--bg);
  color: #fff8e7;
}

[data-skin="ussr"] .btn-primary,
[data-skin="ussr"] .chat-send {
  color: #fff8e7;
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.28);
}

[data-skin="ussr"] .msg-bubble.mine {
  color: #fff8e7;
}

[data-skin="ussr"] .comment-like.liked {
  color: #d4af37;
}

[data-skin="ussr"] .comment-like.is-pressed.liked {
  box-shadow: 0 0 12px rgba(212, 175, 90, 0.25);
}

[data-skin="ussr"] .auth-glow {
  background: radial-gradient(circle, rgba(153, 27, 27, 0.2), transparent 70%);
}

[data-skin="ussr"] .app-splash-tagline--ussr {
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  line-height: 1.55;
}

[data-skin="ussr"] .nav-item.is-pressed {
  background: var(--sel-press);
}

[data-skin="ussr"] #bottom-nav .nav-item.is-pressed {
  background: transparent;
}

[data-skin="ussr"] .theme-pill.active,
[data-skin="ussr"] .skin-pill.active {
  background: linear-gradient(135deg, #991b1b, #b45309);
  color: #fff8e7;
}

[data-skin="ussr"] .btn-primary {
  color: #fff8e7;
}

[data-skin="ussr"] .auth-card,
[data-skin="ussr"] .modal-card {
  background: rgba(24, 16, 16, 0.97);
}

[data-skin="pride"] {
  --accent-grad: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982);
  --accent: #ff6bcb;
  --accent2: #7c3aed;
  --like: #ff4d8d;
  --sel-bg: rgba(255, 107, 203, 0.12);
  --sel-border: rgba(255, 140, 0, 0.35);
  --sel-press: rgba(116, 40, 130, 0.14);
  --sel-ring: rgba(255, 140, 0, 0.32);
  --sel-focus: rgba(255, 107, 203, 0.42);
  --sel-glow: rgba(228, 3, 3, 0.1);
}

[data-skin="pride"] body::before {
  background:
    radial-gradient(circle at 10% 12%, rgba(228, 3, 3, 0.16), transparent 34%),
    radial-gradient(circle at 85% 8%, rgba(116, 40, 130, 0.18), transparent 32%),
    radial-gradient(circle at 50% 90%, rgba(0, 128, 38, 0.12), transparent 36%);
}

[data-skin="pride"] .topbar {
  background: rgba(10, 8, 18, 0.88);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982) 1;
}

[data-skin="pride"] .bottom-nav {
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(16, 16, 24, 0.94), rgba(16, 16, 24, 0.94)) padding-box,
    linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982) border-box;
}

[data-skin="pride"] .btn-primary,
[data-skin="pride"] .theme-pill.active,
[data-skin="pride"] .skin-pill.active {
  background: var(--accent-grad);
}

[data-skin="pride"] #bottom-nav .nav-item.active {
  color: #fff;
  background: rgba(116, 40, 130, 0.22);
  box-shadow: none;
}

.skin-pill[data-skin-pick="ussr"].active {
  background: linear-gradient(135deg, #cc0000, #ffd700) !important;
  color: #3b0505 !important;
}

.skin-pill[data-skin-pick="pride"].active {
  background: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982) !important;
  color: #fff !important;
}

/* --- Admin panel --- */
.admin-page { padding: 8px 0 28px; }

.admin-report-reason {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--sel-bg);
  border: 1px solid var(--sel-border);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.admin-tag--warn {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

.admin-report-card .admin-post-head {
  flex-wrap: wrap;
  gap: 6px 10px;
}

.admin-section--collapsible .admin-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  padding: 0;
  margin: 0 0 8px;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
}

.admin-section--collapsible .admin-section-toggle h3 {
  margin: 0;
  font-size: 0.92rem;
}

.admin-section-count {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.admin-section-chevron {
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.admin-section-toggle.is-open .admin-section-chevron {
  transform: rotate(90deg);
}

.admin-section-body.is-collapsed {
  display: none;
}

.admin-nav {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

.admin-nav-link {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav-link.active {
  color: #fff;
  background: var(--sel-bg);
  border-color: var(--sel-border);
}

.admin-stat--link {
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.admin-stat--link:hover {
  background: var(--sel-glow);
  border-color: var(--sel-border);
}

.admin-post-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-post-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
}

.admin-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-post-main {
  flex: 1;
  min-width: 0;
}

.admin-post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.admin-post-head strong { font-size: 0.9rem; }

.admin-post-text {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.admin-post-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.admin-post-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-post-btn {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.admin-chat-row {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.admin-chat-row-users {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.admin-chat-row-preview {
  margin: 0 0 6px;
  font-size: 0.84rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-chat-row-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-chat-back-link {
  display: inline-block;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.admin-chat-back-link:hover {
  text-decoration: underline;
}

.admin-chat-back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.admin-page--thread,
.admin-page--modlog {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.admin-chat-thread-toolbar {
  flex-shrink: 0;
  padding: 0 16px 8px;
}

.admin-chat-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-chat-filters input[type="search"],
.admin-chat-filters input[type="date"],
.admin-chat-filters input[type="time"],
.admin-modlog-filters input,
.admin-modlog-filters select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  padding: 9px 11px;
  font-size: 0.84rem;
  font-family: inherit;
}

.admin-modlog-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 10px;
}

.admin-chat-filter-count {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-chat-thread-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
}

.admin-scroll-list {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  padding: 0;
  margin: 0 16px;
}

.admin-scroll-list--page {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0 16px 16px;
  display: flex;
  flex-direction: column;
}

.admin-log-list {
  display: flex;
  flex-direction: column;
}

.admin-scroll-list .admin-log-row {
  padding: 12px 14px;
  margin: 0;
}

.admin-scroll-list .admin-log-row:last-child {
  border-bottom: none;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 8px;
}

.admin-section-head h3 {
  margin: 0;
}

.admin-section-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.admin-section--compact {
  margin-bottom: 12px;
}

.admin-log-time,
.admin-log-who,
.admin-log-target {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-log-target {
  color: var(--accent);
  text-decoration: none;
}

.admin-chat-thread-head {
  padding: 0;
}

.admin-chat-thread-head h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.admin-chat-msg {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.admin-chat-msg-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.admin-chat-msg-meta a {
  color: var(--accent);
  text-decoration: none;
}

.admin-chat-msg-body {
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 16px 12px;
}

.admin-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.admin-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.admin-stat strong { font-size: 1.1rem; }

.admin-toolbar {
  padding: 0 16px 12px;
  display: grid;
  gap: 10px;
}

.admin-toolbar input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

.admin-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-filter {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-filter.active {
  color: var(--text);
  border-color: var(--sel-border);
  background: var(--sel-bg);
}

.admin-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.admin-section h3 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.admin-user-card:hover { background: var(--sel-glow); }

.admin-user-main {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.admin-user-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-user-head strong { font-size: 0.95rem; }

.admin-user-name { color: var(--text); font-weight: 600; }

.admin-user-email,
.admin-user-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.admin-user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.admin-tag--admin { color: var(--accent); border-color: var(--sel-border); }
.admin-tag--verified { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); }
.admin-tag--ban { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }
.admin-tag--mute { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.admin-tag--twin { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); }
.admin-tag--online { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }

.admin-empty-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.admin-log-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.4;
}

.admin-log-row--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-log-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-log-reason { margin-top: 4px; color: var(--text); }

.admin-detail-head {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  align-items: center;
}

.admin-detail-title h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-detail-title p {
  margin: 4px 0 8px;
  color: var(--text-muted);
}

.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 12px;
}

.admin-info-cell {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.admin-info-cell span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.admin-info-cell strong {
  font-size: 0.84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-alert {
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
}

.admin-alert--ban {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fecaca;
}

.admin-alert--mute {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde68a;
}

.admin-punish-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.admin-punish-quick .btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (min-width: 520px) {
  .admin-punish-quick {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#admin-punish-reason,
#admin-note {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.admin-twin-row {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.admin-ip-table { display: grid; gap: 6px; }

.admin-ip-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  font-size: 0.78rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.admin-ip-row code {
  font-family: ui-monospace, monospace;
  color: var(--accent);
}

.admin-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.admin-detail-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 0.78rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 420px) {
  .admin-detail-actions {
    grid-template-columns: 1fr;
  }
}

.topbar-back + .container {
  padding-top: 4px;
}

.settings-hub-page {
  display: grid;
  gap: 10px;
}
.settings-hub-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.settings-hub-card:hover { border-color: rgba(168, 85, 247, 0.35); }
.settings-hub-icon { font-size: 1.4rem; flex-shrink: 0; }
.settings-hub-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.settings-hub-text strong {
  font-size: 0.95rem;
  white-space: normal;
  word-break: normal;
}
.settings-hub-text span { font-size: 0.8rem; color: var(--text-muted); }
.settings-hub-arrow { color: var(--text-muted); font-size: 1.2rem; }

.profile-links-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.profile-links-toggle {
  margin: 0;
  align-self: flex-start;
  font-size: 0.84rem;
  padding: 6px 12px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  width: 100%;
}
.profile-link {
  font-size: 0.84rem;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.comment-delete-btn {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0;
}
.comment-delete-btn:hover { color: #f87171; }

.post-video-wrap { background: #0a0a10; }
.post-video-wrap .post-video-stage { max-height: min(70vh, 900px); }

.grid-media--video {
  position: relative;
  background: #111;
  display: grid;
  place-items: center;
  min-height: 100%;
  overflow: hidden;
}

.grid-video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.grid-video-badge {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
  color: #fff;
  opacity: 0.95;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.create-video-preview {
  width: 100%;
  max-height: 280px;
  border-radius: 12px;
  background: #000;
}

.streak-card {
  width: min(400px, 100%);
  padding: 20px;
  text-align: center;
}
.streak-emoji { font-size: 2.4rem; margin-bottom: 8px; }
.streak-slide-body h3 { margin: 0 0 8px; }
.streak-slide-body p { margin: 0; color: var(--text-muted); line-height: 1.45; }
.streak-slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0;
}
.streak-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
}
.streak-dot.active { background: var(--accent); }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.notif-item.unread { background: rgba(168, 85, 247, 0.06); }
.notif-text { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

.chat-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.chat-topbar-user .avatar { width: 36px; height: 36px; flex-shrink: 0; }
.chat-topbar-titles { min-width: 0; text-align: left; }
.chat-topbar-titles.solo { text-align: center; width: 100%; }

.topbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.chat-partner-card {
  width: min(360px, calc(100% - 24px));
  padding: 20px;
}

.chat-partner-body {
  display: grid;
  gap: 16px;
}

.chat-partner-profile {
  display: flex;
  gap: 14px;
  align-items: center;
}

.chat-partner-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-partner-info strong {
  font-size: 1rem;
}

.chat-partner-name,
.chat-partner-status-line {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chat-partner-bio {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text);
}

.chat-partner-profile-btn {
  width: 100%;
  text-align: center;
}

.report-modal-card {
  width: min(400px, calc(100% - 24px));
}

.report-modal-desc {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.report-modal-card textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 12px 14px;
  font-size: 0.9rem;
}

.report-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
