@font-face {
  font-family: "Roboto";
  src: url("/assets/shared/fonts/roboto-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/shared/fonts/roboto-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/shared/fonts/roboto-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/shared/fonts/roboto-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/shared/fonts/roboto-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-synthesis: none;
  --sim-accent: #229ed9;
  --sim-overlay: rgb(13 18 24 / 72%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.profile-status {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  min-height: 100dvh;
  padding: 20px;
  place-items: center;
  color: #17202a;
  background: #f4f6f8;
  font-family: Roboto, Arial, sans-serif;
}

body[data-site-id="fansly"] .profile-status {
  color: #f4f7fb;
  background: #0d0f13;
}

.profile-status-card {
  display: grid;
  width: min(100%, 420px);
  justify-items: center;
  padding: 34px 28px;
  border: 1px solid #dce2e7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 70px rgb(18 28 38 / 13%);
  text-align: center;
}

body[data-site-id="fansly"] .profile-status-card {
  border-color: #2a303a;
  background: #15181e;
  box-shadow: 0 22px 70px rgb(0 0 0 / 34%);
}

.profile-status-card > p {
  margin: 18px 0 4px;
  color: #77818c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-status-card h1 {
  margin: 0;
  color: inherit;
  font-size: 22px;
  line-height: 1.3;
}

.profile-status-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #d8e0e7;
  border-top-color: #229ed9;
  border-radius: 50%;
  animation: profile-spin .8s linear infinite;
}

.profile-status-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
}

.profile-status-actions button,
.profile-status-actions a {
  display: grid;
  min-height: 44px;
  padding: 0 14px;
  place-items: center;
  border: 1px solid #cad3dc;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

.profile-status-actions button {
  border-color: #229ed9;
  color: #fff;
  background: #229ed9;
}

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

.site-toast {
  position: fixed;
  z-index: 140;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 10px;
  color: #fff;
  background: rgb(20 24 30 / 94%);
  box-shadow: 0 12px 34px rgb(0 0 0 / 24%);
  font: 600 13px/1.3 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-toast[data-visible="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

.test-auth {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  min-height: 100dvh;
  place-items: center;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.test-auth[data-open="true"] {
  display: grid;
}

.test-auth[data-mandatory="true"] [data-test-close] {
  display: none;
}

.test-auth-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--sim-overlay);
  backdrop-filter: blur(8px);
}

.test-auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid #dfe4ea;
  border-radius: 14px;
  color: #17191c;
  background: #fff;
  box-shadow: 0 28px 90px rgb(0 0 0 / 34%);
}

.test-auth-body {
  position: relative;
  padding: 28px;
}

.telegram-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  height: 48px;
  margin-bottom: 24px;
}

.telegram-brand-row .telegram-brand-telegram {
  width: 44px;
  height: 44px;
}

.telegram-brand-divider {
  color: #b3bac3;
  font-size: 20px;
}

.telegram-brand-site {
  max-width: 150px;
  overflow: hidden;
  color: #333a43;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

img.telegram-brand-site {
  width: auto;
  max-width: 150px;
  max-height: 36px;
  height: auto;
  object-fit: contain;
}

.telegram-roundel,
.test-success {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
}

.telegram-roundel {
  background: #eaf7fd;
}

.telegram-roundel img {
  width: 42px;
  height: 42px;
}

.test-success {
  color: #fff;
  background: #23a66f;
  font-size: 30px;
}

.test-auth h2 {
  margin: 0;
  color: #17191c;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.test-auth-copy {
  max-width: 330px;
  margin: 10px auto 24px;
  color: #717984;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.test-back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #69727c;
  background: #f1f3f5;
  font-size: 20px;
}

.field-label {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  color: #505963;
  font-size: 12px;
  font-weight: 700;
}

.field-input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #cad1d8;
  border-radius: 10px;
  outline: none;
  color: #17191c;
  background: #fff;
  font-size: 16px;
}

.field-input:focus {
  border-color: var(--sim-accent);
  box-shadow: 0 0 0 3px rgb(34 158 217 / 14%);
}

.telegram-button,
.quiet-button {
  width: 100%;
  border-radius: 10px;
  font-weight: 700;
}

.telegram-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  border: 0;
  color: #fff;
  background: var(--sim-accent);
}

.telegram-button-icon { width: 22px; height: 22px; }

.telegram-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.quiet-button {
  min-height: 42px;
  margin-top: 8px;
  border: 0;
  color: #6b747f;
  background: transparent;
}

.test-note {
  margin: 18px 0 0;
  padding: 11px 12px;
  border: 1px solid #e7eaed;
  border-radius: 9px;
  color: #6f7780;
  background: #f7f8f9;
  font-size: 11px;
  line-height: 1.5;
}

.test-error {
  min-height: 18px;
  margin: 4px 0 7px;
  color: #c3353c;
  font-size: 12px;
}

.auth-action-sheet {
  position: fixed;
  z-index: 195;
  inset: 0;
  display: none;
  min-height: 100dvh;
  padding: 18px;
  place-items: center;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-action-sheet[data-open="true"] {
  display: grid;
}

.auth-action-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgb(8 12 18 / 72%);
  backdrop-filter: blur(8px);
}

.auth-action-card {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid #dde3e8;
  border-radius: 16px;
  color: #171b20;
  background: #fff;
  box-shadow: 0 28px 90px rgb(0 0 0 / 32%);
}

.auth-action-card > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7ebef;
  background: inherit;
}

.auth-action-card header small {
  display: block;
  margin-bottom: 3px;
  color: #87919b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-action-card h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.auth-action-card header button {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #dce2e7;
  border-radius: 10px;
  color: #68727c;
  background: #f5f7f9;
  font-size: 24px;
}

.auth-action-card > p {
  margin: 0;
  padding: 18px 20px 0;
  color: #68727c;
  font-size: 14px;
  line-height: 1.5;
}

.auth-action-content {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.auth-action-content > article {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #e5e9ed;
  border-radius: 12px;
  background: #f7f9fa;
}

.auth-action-content > article > span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--sim-accent);
}

.auth-action-content article strong,
.auth-action-content article p {
  margin: 0;
}

.auth-action-content article p {
  margin-top: 3px;
  color: #77818b;
  font-size: 12px;
  line-height: 1.45;
}

.auth-action-thread {
  display: grid;
  min-height: 112px;
  align-content: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1e6ea;
  border-radius: 12px;
  background: #f7f9fa;
}

.auth-action-thread > p {
  margin: 0;
  color: #7a848e;
  font-size: 13px;
}

.auth-action-thread .auth-action-message {
  justify-self: end;
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 12px 12px 3px;
  color: #fff;
  background: var(--sim-accent);
}

.auth-action-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-action-composer input {
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #dbe1e6;
  border-radius: 10px;
  outline: none;
  background: #fff;
}

.auth-action-composer input:focus {
  border-color: var(--sim-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sim-accent) 16%, transparent);
}

.auth-action-composer button,
.auth-action-upload {
  display: grid;
  min-height: 44px;
  padding: 0 16px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--sim-accent);
  font-weight: 700;
}

.auth-action-media {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.auth-action-media button {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  background: #eef1f4;
  aspect-ratio: 1;
}

.auth-action-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-action-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-action-choices button {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid #dce2e7;
  border-radius: 10px;
  color: inherit;
  background: #f7f9fa;
  font-weight: 700;
}

.auth-action-choices button[aria-pressed="true"] {
  border-color: var(--sim-accent);
  box-shadow: inset 0 0 0 1px var(--sim-accent);
}

.auth-action-upload {
  cursor: pointer;
}

.auth-action-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auth-action-preview {
  display: grid;
  min-height: 120px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #d7dde2;
  border-radius: 12px;
  background: #f7f9fa;
}

.auth-action-preview:empty::before {
  color: #858f99;
  content: "Предпросмотр появится здесь";
  font-size: 13px;
}

.auth-action-preview img,
.auth-action-preview video {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.auth-action-status {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--sim-accent) 28%, #dfe5e9);
  border-radius: 12px;
  background: color-mix(in srgb, var(--sim-accent) 8%, #fff);
}

.auth-action-status span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--sim-accent);
}

.auth-action-status div {
  min-width: 0;
}

.auth-action-status p {
  margin: 3px 0 0;
  color: #75808a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.auth-action-navigation {
  display: grid;
  overflow: hidden;
  border: 1px solid #e1e6ea;
  border-radius: 12px;
  background: #fff;
}

.auth-action-navigation button {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #e8ecef;
  color: inherit;
  background: transparent;
  text-align: left;
}

.auth-action-navigation button:last-child {
  border-bottom: 0;
}

.auth-action-navigation button:hover,
.auth-action-navigation button:focus-visible {
  background: color-mix(in srgb, var(--sim-accent) 7%, transparent);
}

.auth-action-navigation button > span {
  display: grid;
  gap: 3px;
}

.auth-action-navigation strong {
  font-size: 14px;
}

.auth-action-navigation small {
  color: #7b858f;
  font-size: 12px;
  font-weight: 400;
}

.auth-action-navigation b {
  color: var(--sim-accent);
  font-size: 18px;
}

body[data-site-id="fansly"] .auth-action-card {
  border-color: #2c333d;
  color: #f4f7fa;
  background: #15191f;
}

body[data-site-id="fansly"] .auth-action-card > header,
body[data-site-id="fansly"] .auth-action-content > article,
body[data-site-id="fansly"] .auth-action-thread,
body[data-site-id="fansly"] .auth-action-choices button,
body[data-site-id="fansly"] .auth-action-preview,
body[data-site-id="fansly"] .auth-action-navigation {
  border-color: #303741;
  background: #1d222a;
}

body[data-site-id="fansly"] .auth-action-navigation button {
  border-color: #303741;
}

body[data-site-id="fansly"] .auth-action-composer input {
  border-color: #343c47;
  color: #f4f7fa;
  background: #101318;
}

body[data-site-id="fansly"] .auth-action-status {
  border-color: color-mix(in srgb, var(--sim-accent) 46%, #303741);
  background: color-mix(in srgb, var(--sim-accent) 11%, #1d222a);
}

body[data-site-id="fansly"] .auth-action-status p,
body[data-site-id="fansly"] .auth-action-navigation small {
  color: #929ca8;
}

body[data-site-id="bongacams"] { --sim-accent: #12b96f; }
body[data-site-id="chaturbate"] { --sim-accent: #f36b25; }

/* Закрытые наборы (альбомы): превью под блюром, как на площадках. */
.media-card[data-media-locked="true"] :is(img, video) {
  filter: blur(18px) saturate(.65);
  transform: scale(1.08);
  pointer-events: none;
}

.media-card[data-media-locked="true"] {
  overflow: hidden;
}

[data-media-viewer="true"][data-media-locked="false"] img,
[data-media-viewer="true"][data-media-locked="false"] video,
html[data-unlocked="true"] [data-media-viewer="true"] img,
html[data-unlocked="true"] [data-media-viewer="true"] video {
  filter: none !important;
  transform: none !important;
}

[data-media-viewer="true"][data-media-locked="false"] .fansly-media-lock,
[data-media-viewer="true"][data-media-locked="false"] .of-lock-icon,
[data-media-viewer="true"][data-media-locked="false"] > b,
html[data-unlocked="true"] [data-media-viewer="true"] .fansly-media-lock,
html[data-unlocked="true"] [data-media-viewer="true"] .of-lock-icon,
html[data-unlocked="true"] [data-media-viewer="true"] > b {
  display: none !important;
}

.media-viewer {
  position: fixed;
  z-index: 190;
  inset: 0;
  display: none;
  min-height: 100dvh;
  place-items: center;
  padding: 18px;
  font-family: Roboto, Arial, sans-serif;
}

.media-viewer[data-open="true"] {
  display: grid;
}

.media-viewer-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgb(8 12 16 / 84%);
  backdrop-filter: blur(10px);
}

.media-viewer-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(760px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 14px;
  color: #fff;
  background: #11161c;
  box-shadow: 0 28px 90px rgb(0 0 0 / 45%);
}

.media-viewer-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.media-viewer-card header p {
  margin: 0 0 2px;
  color: #9da8b3;
  font-size: 11px;
  text-transform: uppercase;
}

.media-viewer-card h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.media-viewer-card header button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 9px;
  color: #fff;
  background: #202830;
  font-size: 24px;
}

.media-viewer-stage {
  display: grid;
  min-height: 280px;
  max-height: min(68dvh, 720px);
  place-items: center;
  overflow: hidden;
  background: #070a0d;
}

.media-viewer-stage img,
.media-viewer-stage video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(68dvh, 720px);
  object-fit: contain;
}

.media-viewer-card > p {
  margin: 0;
  padding: 14px 16px 16px;
  color: #c5cdd5;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .test-auth {
    align-items: end;
    padding: 0;
  }

  .test-auth-card {
    width: 100%;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .test-auth-body {
    padding: 26px 22px max(24px, env(safe-area-inset-bottom));
  }

  .media-viewer {
    padding: 0;
  }

  .media-viewer-card {
    width: 100%;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .media-viewer-stage {
    max-height: 72dvh;
  }

  .auth-action-sheet {
    align-items: end;
    padding: 0;
  }

  .auth-action-card {
    width: 100%;
    max-height: min(82dvh, 720px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .auth-action-card > header {
    padding: 16px;
  }

  .auth-action-card > p {
    padding: 15px 16px 0;
  }

  .auth-action-content {
    padding: 15px 16px max(18px, env(safe-area-inset-bottom));
  }

  .auth-action-media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Пустое состояние: блок без данных объясняет себя, а не оставляет дырку. */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  margin: 0;
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: color-mix(in srgb, currentColor 55%, transparent);
}

/* Скрытое состояние не должно спорить с display: flex выше. */
.empty-state[hidden] {
  display: none;
}


/* Фид-овэрлей под сеткой медиа: ghost-слой «фантомных карточек» имитирует
   продолжение сетки, поверх — градиент-туман, поверх — заголовок и primary-
   кнопка регистрации. Каждая площадка выставляет CSS-переменные под свой
   бренд. После входа — скрываем. */
.feed-cta-wall {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 720px;
  padding: 48px 20px 24px;
  text-align: center;
  pointer-events: auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--feed-cta-bg, #0b0d10);
}

/* Ghost-grid: настоящая сетка плиток, имитирует продолжение медиа-ленты.
   Абсолютно на весь wall; grid-auto-rows:1fr растягивает ряды, чтобы
   плитки заполнили ВСЮ высоту блока (а не только верхнюю треть).
   CTA (заголовок + кнопка) z-index:2 поверх. Blur/opacity нарастают
   построчно: вверху чётко — внизу густой туман. */
.feed-ghost-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 10px;
  padding: 12px;
  pointer-events: none;
}

/* Разноцветные градиенты — имитация «разных размытых фоток».
   6 вариантов, циклично по nth-child; поверх ещё один слой-highlight,
   чтобы плитка не читалась плоским прямоугольником. */
.feed-ghost-tile {
  border-radius: 12px;
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #4a2a5c 0%, #8a3a6c 55%, #c56a7f 100%);
}
.feed-ghost-tile:nth-child(6n + 2) {
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #1a3a5c 0%, #2d6ea8 55%, #58b0d8 100%);
}
.feed-ghost-tile:nth-child(6n + 3) {
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #3a2a1a 0%, #a05a2c 55%, #e8a76b 100%);
}
.feed-ghost-tile:nth-child(6n + 4) {
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #1a3a2a 0%, #2c7a5a 55%, #78c89a 100%);
}
.feed-ghost-tile:nth-child(6n + 5) {
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #3a1a3a 0%, #7a2c7a 55%, #c878c8 100%);
}
.feed-ghost-tile:nth-child(6n) {
  background:
    radial-gradient(120% 80% at 30% 25%, rgb(255 255 255 / 18%), transparent 55%),
    linear-gradient(135deg, #2a2a3a 0%, #4a4a7c 55%, #8a8ac8 100%);
}

/* Blur-ramp по рядам (3 плитки = 1 ряд). Верхний ряд почти чёткий —
   даёт плавное продолжение реальной сетки; дальше туман растёт до
   нечитаемого. */
.feed-ghost-tile:nth-child(-n + 3)                     { opacity: 0; }
.feed-ghost-tile:nth-child(n + 4):nth-child(-n + 6)    { filter: blur(4px);  opacity: 0.78; }
.feed-ghost-tile:nth-child(n + 7):nth-child(-n + 9)    { filter: blur(9px);  opacity: 0.58; }
.feed-ghost-tile:nth-child(n + 10):nth-child(-n + 12)  { filter: blur(16px); opacity: 0.42; }
.feed-ghost-tile:nth-child(n + 13):nth-child(-n + 15)  { filter: blur(24px); opacity: 0.28; }
.feed-ghost-tile:nth-child(n + 16)                     { filter: blur(30px); opacity: 0.18; }

/* Полнокадровый туман: сверху — плотный, чтобы спрятать шов с реальной
   сеткой; середина полупрозрачная (видно разноцветные плитки); низ опять
   плотный под CTA — заголовок и кнопка читаются без доп. фона. */
.feed-cta-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--feed-cta-bg, #0b0d10) 0,
    var(--feed-cta-bg, #0b0d10) 20%,
    color-mix(in srgb, var(--feed-cta-bg, #0b0d10) 70%, transparent) 30%,
    color-mix(in srgb, var(--feed-cta-bg, #0b0d10) 25%, transparent) 48%,
    color-mix(in srgb, var(--feed-cta-bg, #0b0d10) 55%, transparent) 68%,
    color-mix(in srgb, var(--feed-cta-bg, #0b0d10) 88%, transparent) 100%
  );
}

@media (max-width: 640px) {
  .feed-cta-wall {
    min-height: 560px;
  }
}

.feed-cta-wall > strong {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--feed-cta-fg, #fff);
}

.feed-cta-wall > button {
  position: relative;
  z-index: 2;
  min-width: 240px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--feed-cta-btn-fg, #fff);
  background: var(--feed-cta-btn-bg, #2699f7);
}

.feed-cta-wall > button:hover {
  filter: brightness(1.08);
}

html[data-unlocked="true"] .feed-cta-wall {
  display: none;
}


/* Имя и описание вводит менеджер: строка без пробелов на 4000 знаков
   растягивала страницу на десятки тысяч пикселей вбок. Рвём по буквам. */
[data-profile-name],
[data-profile-description],
[data-profile-handle],
[data-profile-location],
[data-profile-plan-caption],
[data-profile-plan-price],
[data-profile-plan-total],
[data-media-albums] figcaption {
  overflow-wrap: anywhere;
}

/* Описание и подпись плана вводит менеджер как есть: перенос строки в анкете
   должен остаться переносом, а не схлопнуться в пробел (default white-space).
   textContent сохраняется — никакого HTML из данных не вставляем. */
[data-profile-description],
[data-profile-plan-caption] {
  white-space: pre-wrap;
}

/* Длинное описание свёрнуто до нескольких строк; profile.js вешает кнопку
   «ещё», только когда текст реально не влез. Разворот снимает атрибут. */
[data-profile-description][data-clamp="collapsed"] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

[data-read-more-toggle] {
  display: inline-block;
  padding: 0;
  margin: 0 0 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Био-параграф и «ещё» живут в одной связке: на мобилке зажатый текст
   заканчивается «…», а кнопка стоит сразу следом, не уезжая под описание. */
@media (max-width: 640px) {
  [data-profile-description] { display: inline; }
  [data-profile-description][data-clamp="collapsed"] {
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
  }
}

/* Плитка-приманка закрыта всегда, даже после входа: за ней нет файла анкеты,
   а показывать демо-снимок как её содержимое — тот же обман, что и раньше. */
[data-media-teaser="true"] img,
[data-media-teaser="true"] video {
  filter: blur(20px) saturate(0.72) !important;
  transform: scale(1.06) !important;
}

/* Превью закрытой карточки: слева снимок под блюром, справа скрытые
   комментарии. Ни одной придуманной фразы — только полосы-заглушки. */
.locked-card {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.locked-card[data-open="true"] { display: flex; }

.locked-card-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.locked-card-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  width: min(880px, 100%);
  max-height: min(560px, 90dvh);
  overflow: hidden;
  border-radius: 14px;
  background: var(--sim-card, #16181c);
  color: #fff;
  box-shadow: 0 24px 60px rgb(0 0 0 / 55%);
}

.locked-card-shot {
  position: relative;
  /* Блюр размазывает картинку за её границы, а масштаб доводит: без обрезки
     снимок наползал на колонку комментариев. */
  overflow: hidden;
  min-height: 260px;
  background: #0b0d10;
}

.locked-card-shot img {
  width: 50%; /* Обязательно должна быть указана ширина */
  margin-left: auto;
  margin-right: auto;

  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(0.7);
  transform: scale(1.08);
}

.locked-card-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid rgb(255 255 255 / 10%);
}

/* Шапка/подвал/отступы/типографика закрытой карточки — тот же набор, что и у
   «Медиа профиля»: один визуальный язык модалок, менять только текст. */
.locked-card-side header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.locked-card-side header h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.locked-card-side header button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 9px;
  color: #fff;
  background: #202830;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.locked-card-comments {
  flex: 1;
  overflow: hidden;
  margin: 0;
  padding: 14px 16px;
  list-style: none;
}

.locked-card-comments li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.locked-card-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  font-size: 12px;
  font-weight: 600;
  color: rgb(255 255 255 / 70%);
}

/* Лента читается: она и должна дразнить. Закрыт сам снимок, а не разговор
   вокруг него — если менеджер не закрыл и её. */
[data-comments-locked="true"] .locked-card-text {
  filter: blur(4px);
  user-select: none;
}

.locked-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.locked-card-text b { color: rgb(255 255 255 / 82%); }
.locked-card-text span { color: rgb(255 255 255 / 60%); }

.locked-card-side footer {
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.locked-card-side footer p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgb(255 255 255 / 62%);
}

.locked-card-side footer .telegram-button { width: 100%; }

@media (max-width: 720px) {
  .locked-card-body { grid-template-columns: 1fr; max-height: 92dvh; }
  .locked-card-shot { min-height: 180px; max-height: 34dvh; }
  .locked-card-side { border-left: 0; border-top: 1px solid rgb(255 255 255 / 10%); }
  .locked-card-comments li:nth-child(n+4) { display: none; }
}
