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

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

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

:root {
  color-scheme: light;
  --cb-orange: #d75b0d;
  --cb-orange-dark: #d75b0d;
  --cb-blue: #14688e;
  --cb-text: #2b2b2b;
  --cb-muted: #777;
  --cb-line: #c8c8c8;
  --cb-soft: #f3f3f3;
}

html { background: #fff; }

html[data-root-entry="true"] .cb-header,
html[data-root-entry="true"] .cb-page,
html[data-root-entry="true"] .cb-footer { visibility: hidden; }

body {
  color: var(--cb-text);
  background: #fff;
  font: 12px/1.4 UbuntuRegular, Arial, Helvetica, sans-serif;
}

button, input { color: inherit; font-family: inherit; }
a { color: var(--cb-blue); text-decoration: none; }
button { cursor: pointer; }

.cb-register-short { display: none; }
.cb-hamburger,
.cb-mobile-title,
.cb-mobile-follow { display: none; }                    /* base — только мобилка */

.cb-register,
.cb-login,
.cb-follow,
.cb-stage-overlay button,
.cb-chat-form button,
.cb-search-mobile,
.cb-anon-menu,
.cb-broadcast,
.cb-header-nav a,
.cb-header-nav button,
.cb-detail-tabs button,
.cb-profile-bar > button {
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.cb-register:active,
.cb-login:active,
.cb-follow:active,
.cb-stage-overlay button:active,
.cb-chat-form button:active,
.cb-search-mobile:active,
.cb-anon-menu:active,
.cb-broadcast:active,
.cb-profile-bar > button:active {
  transform: translateY(1px) scale(.985);
}

.cb-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid #bbb;
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
}

.cb-header-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100% - 28px);
  height: 64px;
  margin: 0 auto;
}

.cb-logo { flex: 0 0 150px; }
.cb-logo img { width: 133px; height: 31px; }

.cb-search {
  display: flex;
  align-items: center;
  flex: 1 1 300px;
  max-width: 390px;
  height: 40px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  background: #fff;
}

.cb-search span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: #777; }
.cb-search span svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cb-search input { width: 100%; height: 100%; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.cb-search-mobile { display: none; }

.cb-broadcast,
.cb-header-nav button,
.cb-mobile-menu button,
.cb-footer button {
  padding: 0;
  border: 0;
  background: transparent;
}

.cb-auth-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cb-broadcast,
.cb-search-mobile,
.cb-anon-menu {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--cb-blue);
  background: #f8f9fa;
}
.cb-broadcast { width: auto; gap: 7px; padding: 0 8px; font-weight: 700; }
.cb-broadcast svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.cb-search-mobile { display: none; }
.cb-anon-menu { color: #494949; }
.cb-anon-menu svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.cb-register, .cb-login, .cb-follow, .cb-stage-overlay button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid;
  border-radius: 32px;
  font-family: UbuntuMedium, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
}
.cb-register, .cb-login { padding: 12px 24px; line-height: 22px; }
.cb-register { min-width: 182px; border-color: var(--cb-orange); color: #fff; background: var(--cb-orange); }
.cb-login { min-width: 89px; border-color: var(--cb-orange); color: var(--cb-orange); background: #f8f9fa; }
.cb-register:hover, .cb-stage-overlay button:hover { background: var(--cb-orange-dark); }

.cb-header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(100% - 28px);
  height: 38px;
  margin: 0 auto;
  border-top: 1px solid #e5e5e5;
  font-size: 13px;
}

.cb-header-nav a, .cb-header-nav button { display: inline-flex; height: 38px; align-items: center; padding: 0 16px; color: #525252; font-family: UbuntuMedium, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 500; }
.cb-header-nav a:hover, .cb-header-nav button:hover { color: var(--cb-orange-dark); }
.cb-header-nav b { padding-left: 4px; color: #999; font-weight: 400; }

.cb-popover {
  position: absolute;
  z-index: 40;
  top: 60px;
  right: 275px;
  display: none;
  width: 160px;
  padding: 5px;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
}
.cb-popover[data-open="true"] { display: grid; }
.cb-popover button { min-height: 34px; padding: 0 10px; border: 0; background: #fff; text-align: left; }
.cb-popover button:hover { background: var(--cb-soft); }
.cb-mobile-menu-button, .cb-mobile-menu { display: none; }

.cb-page { width: min(100% - 28px); margin: 12px auto 32px; }

/* Offline-блок дремлет; чтобы включить — html[data-room-state="offline"] .cb-offline-block { display:block } + гасить .cb-room. */
.cb-offline-block { display: none; }

.cb-offline-notice { padding: 12px 14px; background: #ececec; border-radius: 2px; }
.cb-offline-notice a { color: var(--cb-blue); font-size: 12px; text-decoration: none; }
.cb-offline-notice a:hover { text-decoration: underline; }

.cb-offline-actions { display: flex; gap: 6px; margin: 8px 0 14px; }
.cb-btn-tip-lg, .cb-btn-msg-lg {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border: 0; color: #fff;
  font-family: UbuntuMedium, Arial, sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.cb-btn-tip-lg { background: #4a9c31; }
.cb-btn-tip-lg:hover { background: #3d8228; }
.cb-btn-msg-lg { background: var(--cb-orange); }
.cb-btn-msg-lg:hover { background: var(--cb-orange-dark); }
.cb-btn-tip-lg svg, .cb-btn-msg-lg svg { width: 18px; height: 18px; }

.cb-offline-tabs-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 8px; background: #4a4a4a;
  border-bottom: 1px solid #333;
}
.cb-offline-tabs { display: flex; align-items: center; gap: 0; }
.cb-offline-tabs button {
  height: 34px; padding: 0 14px;
  border: 0; background: transparent;
  color: #fff; font-family: UbuntuMedium, Arial, sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer;
  box-shadow: inset 0 -3px transparent;
}
.cb-offline-tabs button[data-active="true"] {
  color: var(--cb-orange);
  box-shadow: inset 0 -3px var(--cb-orange);
}

.cb-offline-tabs-side { display: flex; align-items: center; gap: 8px; }
.cb-rating { display: inline-flex; align-items: center; gap: 4px; color: #ddd; font-size: 12px; }
.cb-rating svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.cb-rating svg:nth-of-type(1) { color: #4a9c31; }
.cb-rating svg:nth-of-type(2) { color: #c94848; }
.cb-rating b { color: #fff; font-weight: 700; }

.cb-fanclub, .cb-follow-lg {
  height: 30px; padding: 0 12px;
  border: 1px solid; border-radius: 3px;
  font-family: UbuntuMedium, Arial, sans-serif;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.cb-fanclub { color: #fff; background: #4a9c31; border-color: #3d8228; }
.cb-fanclub:hover { background: #3d8228; }
.cb-follow-lg { color: var(--cb-orange); background: transparent; border-color: var(--cb-orange); }
.cb-follow-lg:hover { background: var(--cb-orange); color: #fff; }

.cb-offline-panels { padding: 16px 0; background: #fff; }
.cb-offline-panel { display: block; }
.cb-offline-panel[hidden] { display: none; }
.cb-offline-panel .cb-bio-list { max-width: 720px; }
.cb-offline-panel .cb-bio-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 100%; }
.cb-room { overflow: hidden; border: 1px solid #aaa; border-radius: 2px; background: #fff; }

.cb-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 7px 12px;
  border-bottom: 1px solid #aaa;
}
.cb-room-heading h1 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--cb-orange-dark); font-size: 18px; }
.cb-room-heading p { margin: 2px 0 0; color: #777; font-size: 12px; }
.cb-status-dot { flex: 0 0 8px; width: 8px; height: 8px; overflow: hidden; border-radius: 50%; background: #43a047; font-size: 0; }
.cb-follow { border-color: var(--cb-orange); color: var(--cb-orange-dark); background: #fff; }

.cb-room-heading { width: calc(100% - 330px); box-sizing: border-box; border-right: 1px solid #aaa; }    /* ширина под стрим; border-right продолжает вертикальную линию чата вверх */
.cb-room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 530px; }
.cb-stage {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 530px;
  height: 100%;
  overflow: hidden;
  background: #111;
}
/* 9:16 внутри широкой области: letterbox по бокам, без белых дыр в grid. */
.cb-stage > :is(img, video) {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center;
  filter: blur(11px) brightness(.55);
  transform: scale(1.04);
}
.cb-stage-overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; padding: 24px; color: #fff; text-align: center; }
.cb-stage-overlay h2 { margin: 15px 0 5px; font-size: 24px; }
.cb-stage-overlay p { max-width: 480px; margin: 0 0 20px; color: #ddd; }
.cb-stage-overlay button { border-color: var(--cb-orange-dark); color: #fff; background: var(--cb-orange); }
.cb-lock { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: rgb(0 0 0 / 44%); font-size: 25px; }
.cb-lock svg { width: 25px; height: 25px; fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.cb-stage-toolbar { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 75%)); }
.cb-stage-toolbar button { width: 30px; height: 30px; padding: 0; border: 0; color: #fff; background: transparent; }
.cb-stage-toolbar img { width: 20px; height: 20px; margin: auto; }
.cb-stage-toolbar button:last-child { margin-left: auto; }

html[data-unlocked="true"] .cb-stage > :is(img, video) { filter: none; transform: none; }
html[data-unlocked="true"] .cb-stage-overlay { display: none; }
html[data-stage-locked="false"] .cb-stage > :is(img, video) { filter: none; transform: none; }
html[data-stage-locked="false"] .cb-stage-overlay { display: none; }

.cb-chat { position: relative; display: grid; grid-template-rows: 55px minmax(0, 1fr) 48px; min-width: 0; margin-top: -55px; border-left: 1px solid #aaa; background: #fff; }    /* margin-top: -55 подтягивает чат к уровню cb-room-heading */
/* Chat tabs desktop (Chaturbate-style): серая подложка, боксовые вкладки,
   активная — белый фон + оранжевая верхняя полоса, справа шестерня. */
.cb-chat-tabs {
  display: flex; align-items: flex-end; gap: 2px;
  padding: 6px 4px 0;
  background: #c8c8c8;
  border-bottom: 1px solid #999;
}
.cb-chat-tabs button {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 28px; padding: 0 12px;
  border: 1px solid #999; border-bottom: 0;
  border-radius: 8px 8px 0 0;                         /* округлённые верхние края */
  color: #444; background: #dcdcdc;
  font-family: UbuntuMedium, Arial, Helvetica, sans-serif;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  white-space: nowrap; cursor: pointer;
  box-shadow: none;
}
.cb-chat-tabs button:hover { background: #e6e6e6; color: #222; }
.cb-chat-tabs button[data-active="true"] {
  color: var(--cb-orange);
  background: #fff;                                   /* без верхней оранжевой полосы */
}
.cb-chat-tabs [data-chat-tab="tokens"],
.cb-chat-tabs [data-chat-tab="bio"] { display: none; }    /* Токены + О модели — только на мобилке */
.cb-chat-tabs button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cb-token-badge { display: inline-grid; width: 14px; height: 14px; place-items: center; border-radius: 50%; color: #fff; background: var(--cb-blue); font-size: 9px; font-weight: 800; }
.cb-token-badge { display: inline-grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: #fff; background: var(--cb-orange); font-size: 10px; font-weight: 800; }
.cb-chat-body { min-height: 0; overflow-y: auto; padding: 14px 12px; }
.cb-chat-body p { margin: 0 0 10px; overflow-wrap: anywhere; }
.cb-chat-body b { color: var(--cb-blue); }
.cb-system-message { padding: 9px; border: 1px solid #e0c5b8; border-radius: 3px; color: #8a4d34; background: #fff6f2; font-size: 12px; }
html[data-unlocked="true"] .cb-system-message { display: none; }
/* Длинная строка смены темы с хэштегами — читаемый блок, а не сплошная простыня. */
.cb-subject-change {
  padding: 8px 10px;
  border-left: 3px solid var(--cb-orange);
  border-radius: 0 3px 3px 0;
  background: #fafafa;
  color: #555;
  font-size: 12px; line-height: 1.5;
  overflow-wrap: break-word;
}
.cb-subject-change a { color: var(--cb-orange-dark); font-weight: 600; }
.cb-subject-change a:hover { text-decoration: underline; }
.cb-empty-state { display: grid; gap: 4px; margin: 52px auto; color: #777; text-align: center; }

.cb-bio-title { margin: 18px 0 10px; font-size: 15px; font-weight: 800; }
.cb-bio-title:first-child { margin-top: 0; }
.cb-bio-list { display: grid; gap: 6px; margin: 0 0 8px; font-size: 13px; }
.cb-bio-list > div { display: grid; grid-template-columns: 40% 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eee; }
.cb-bio-list dt { color: #666; }
.cb-bio-list dd { margin: 0; text-align: right; color: #222; overflow-wrap: anywhere; }
.cb-bio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.cb-bio-cards figure {
  margin: 0; display: grid; gap: 6px;
  padding: 6px; border: 1px solid #e6e0da; border-radius: 4px;   /* видимое разделение соседних наборов */
  background: #fff;
}
/* Карточки набора рисует shared/profile.js классами .media-* — стилизуем их. */
.cb-bio-cards .media-card { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #111; }
.cb-bio-cards .media-card :is(img, video) { width: 100%; height: 100%; object-fit: cover; }
.cb-bio-cards .media-badge-free { position: absolute; top: 8px; left: 8px; padding: 3px 7px; border-radius: 3px; color: #fff; background: #00a651; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
/* Цена справа снизу, время слева снизу — не сливаются на видео-карточке. */
.cb-bio-cards .media-price { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 10px; color: #fff; background: var(--cb-orange); font-size: 11px; font-weight: 700; }
.cb-bio-cards .media-duration { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 10px; color: #fff; background: rgb(0 0 0 / 70%); font-size: 11px; }
.cb-bio-cards figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #222; font-size: 13px; }
.cb-bio-cards figcaption strong { overflow-wrap: anywhere; }
.cb-bio-cards figcaption em { flex: 0 0 auto; color: #666; font-style: normal; font-size: 12px; }

html[data-unlocked="true"] .cb-bio-card img { filter: none; transform: none; }
html[data-unlocked="true"] .cb-bio-lock,
html[data-unlocked="true"] .cb-bio-badge { display: none; }
.cb-user-row { display: flex; align-items: center; gap: 8px; min-height: 32px; border-bottom: 1px solid #eee; }
.cb-user-dot { width: 7px; height: 7px; border-radius: 50%; background: #42a846; }
.cb-chat-form { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 7px; background: #fff; border-top: 1px solid #bbb; }
.cb-chat-input-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; min-width: 0; border: 1px solid #aaa; border-radius: 3px; background: #fff; }
.cb-chat-input-wrap:focus-within { border-color: var(--cb-orange); }
.cb-chat-form input { min-width: 0; height: 100%; padding: 0 9px; border: 0; background: transparent; outline: none; }
.cb-send-msg { display: inline-grid; place-items: center; width: 45px; height: 100%; min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent; }
.cb-send-tip { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; color: #fff; background: #14688e; font-weight: 700; }
.cb-send-tip:hover { background: #105774; }
.cb-send-tip-icon { flex: 0 0 20px; }

/* Desktop-only: квадратный инпут-wrap, жёлтый смайлик и красная квадратная SEND — обе внутри wrap.
   Мобилка (@media max-width:900) не задета. */
@media (min-width: 901px) {
  /* Чат — абсолютно внутри .cb-room: от верха (уровень heading) до низа стрима.
     Так форма не «болтается» с 55px пустоты снизу. Стрим держит ширину сам. */
  .cb-room { position: relative; }
  .cb-room-grid { display: block; }
  .cb-stage { width: calc(100% - 330px); min-height: 530px; }
  .cb-chat {
    position: absolute; top: 0; right: 0; bottom: 0; width: 330px;
    margin-top: 0;
    display: flex; flex-direction: column;              /* flex вместо grid: форма всегда последняя, не «убегает» */
  }
  .cb-chat-tabs { flex: 0 0 auto; }
  .cb-chat-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .cb-chat-form { flex: 0 0 auto; position: relative; z-index: 4; }    /* z-index выше оверлея (z:2) */

  .cb-chat-form { padding: 8px; gap: 0; grid-template-columns: 1fr; }
  .cb-chat-input-wrap {
    grid-template-columns: 1fr auto auto;             /* input | smiley | SEND — все в одном wrap */
    border-radius: 0;                                 /* квадратный */
    padding: 0 0 0 6px;
    border-color: #c8c8c8;
  }
  .cb-chat-form button {
    min-height: 26px;
    padding: 0 17px;
    border: 1px solid;
    border-radius: 32px;
    font-family: UbuntuMedium, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
  }
  .cb-chat-form input { padding: 0 12px; font-size: 13px; height: 28px; }
  .cb-send-msg {
    width: 34px; height: 100%; min-height: 28px;
    border-radius: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="10" cy="10" r="9.5" fill="%23ffcc4d"/><circle cx="7" cy="8" r="1.3" fill="%23000"/><circle cx="13" cy="8" r="1.3" fill="%23000"/><path d="M6.2 12c1 1.5 2.4 2.2 3.8 2.2s2.8-.7 3.8-2.2" stroke="%23000" stroke-width="1.4" fill="none" stroke-linecap="round"/></svg>') no-repeat center / 22px;
  }
  .cb-send-msg svg { display: none; }
  .cb-send-msg::before { content: none; }
  .cb-send-tip {
    min-height: 24px !important; 
    height: 24px;
    padding: 0 8px !important;
    border: 0; 
    border-radius: 5px !important;                       /* квадратная и компактная */
    color: #fff; background: #d22b2b;
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: .02em;
  }
  .cb-send-tip:hover { background: #b31d1d; }
  .cb-send-tip-icon { display: none; }
}

html[data-chat-locked="true"]:not([data-unlocked="true"]) .cb-chat-body { filter: blur(4px); user-select: none; }
html[data-chat-locked="true"]:not([data-unlocked="true"]) .cb-chat::after {   /* десктоп: tabs row 55px, form 48px */
  position: absolute;
  z-index: 2;
  top: 55px;
  right: 0;
  bottom: 48px;
  left: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  content: "Войдите, чтобы открыть чат";
  color: #fff;
  background: rgb(45 45 45 / 66%);
  font-weight: 700;
  text-align: center;
}

.cb-profile-bar { display: grid; grid-template-columns: 72px minmax(170px, 1fr) auto auto; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid #bbb; background: #fff; }
.cb-profile-bar > img { width: 64px; height: 64px; border-radius: 3px; object-fit: cover; }
.cb-profile-bar > div { display: grid; gap: 3px; }
.cb-profile-bar strong { display: flex; align-items: center; gap: 5px; font-size: 18px; }
.cb-profile-bar > div > span { color: #777; }
.cb-verified { display: inline-grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: #fff; background: var(--cb-orange); font-size: 11px; }
.cb-profile-bar dl { display: flex; gap: 28px; margin: 0; }
.cb-profile-bar dl div { display: grid; gap: 2px; }
.cb-profile-bar dt { color: #888; font-size: 11px; text-transform: uppercase; }
.cb-profile-bar dd { margin: 0; font-size: 16px; font-weight: 700; }
.cb-profile-bar > button { min-height: 34px; padding: 0 13px; border: 1px solid #aaa; border-radius: 3px; color: var(--cb-blue); background: #fff; }

.cb-details { margin-top: 12px; border: 1px solid #bbb; background: #fff; }
.cb-detail-tabs {
  display: flex; align-items: flex-end; gap: 2px;
  padding: 6px 8px 0;
  background: #7f7f7f;                                /* тёмная подложка по просьбе */
  border-bottom: 1px solid #666;
}
.cb-detail-tabs button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 18px;
  border: 1px solid #666; border-bottom: 0;
  border-radius: 8px 8px 0 0;                         /* округлённые верхние края */
  color: #eee; background: #6b6b6b;
  font-family: UbuntuMedium, Arial, Helvetica, sans-serif;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  white-space: nowrap; cursor: pointer;
}
.cb-detail-tabs button:hover { background: #7a7a7a; color: #fff; }
.cb-detail-tabs button[data-active="true"] {
  color: var(--cb-orange);
  background: #fff;                                   /* без верхней оранжевой полосы */
}

.cb-about { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; padding: 24px; }
.cb-about h2 { margin: 0 0 10px; font-size: 19px; }
.cb-about p { max-width: 700px; margin: 0; line-height: 1.6; }
.cb-about dl { margin: 0; border: 1px solid #ddd; }
.cb-about dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px; border-bottom: 1px solid #eee; }
.cb-about dl div:last-child { border-bottom: 0; }
.cb-about dt { color: #777; }
.cb-about dd { margin: 0; text-align: right; }

.cb-media { padding: 18px; }
.cb-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cb-media-grid button { position: relative; aspect-ratio: 9 / 16; padding: 0; overflow: hidden; border: 1px solid #aaa; border-radius: 3px; background: #eee; }
.cb-media-grid img, .cb-media-grid video, .cb-related img, .cb-related video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(9px) saturate(.7);
  transform: scale(1.04);
}
/* Клик по закрытому видео уходит на родительскую плитку, а не поглощается <video>. */
.cb-media-grid video { pointer-events: none; }
.cb-media-grid span { position: absolute; right: 0; bottom: 0; left: 0; padding: 18px 10px 8px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 75%)); text-align: left; }
html[data-unlocked="true"] .cb-media-grid img, html[data-unlocked="true"] .cb-media-grid video { filter: none; transform: none; }
html[data-unlocked="true"] .cb-media-grid video { pointer-events: auto; }

.cb-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; }
.cb-related button { display: grid; grid-template-columns: 94px 1fr; min-height: 94px; padding: 0; overflow: hidden; border: 1px solid #bbb; border-radius: 3px; background: #fff; text-align: left; }
.cb-related img { filter: none; transform: none; }
.cb-related span { display: grid; align-content: center; gap: 5px; padding: 10px; }
.cb-related small { color: #777; }

.cb-footer { padding: 22px max(14px, calc((100% - 1280px) / 2)); border-top: 1px solid #ccc; color: #777; background: #f3f3f3; font-size: 12px; }
.cb-footer div { display: flex; flex-wrap: wrap; gap: 18px; }
.cb-footer p { margin: 12px 0 0; }
.cb-footer button { color: var(--cb-blue); }

@media (max-width: 900px) {
  .cb-header { overflow: visible; background: #1a2029; border-bottom-color: #0d1218; }
  .cb-header-top { width: 100%; min-width: 0; height: 48px; padding: 0 12px; gap: 10px; }
  .cb-logo,
  .cb-register,
  .cb-header-nav { display: none; }                   /* мобилка: title вместо лого, регистрация в бургер-меню, нав скрыта */
  .cb-hamburger { display: inline-grid; width: 32px; height: 32px; flex: 0 0 32px; padding: 0; place-items: center; border: 0; color: #fff; background: transparent; }
  .cb-hamburger svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .cb-mobile-spacer { flex: 1 1 auto; }               /* спейсер: прижимает ник+юзернейм и Follow к правому краю */
  .cb-mobile-title { display: grid; min-width: 0; line-height: 1.15; color: #fff; text-align: right; }
  .cb-mobile-title strong { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cb-mobile-title span { font-size: 11px; color: #9aa0a6; }
  .cb-mobile-follow { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: 4px; color: #202124; background: #e8eaed; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .cb-mobile-follow svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
  .cb-search { position: fixed; z-index: 60; top: 50px; right: 10px; left: 10px; display: none; width: auto; max-width: none; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
  .cb-search[data-mobile-open="true"] { display: flex; }
  .cb-search-mobile { display: inline-grid; order: 99; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; padding: 0 0 0 10px; margin-left: 6px; border: 0; border-left: 1px solid #3a4048; border-radius: 0; color: #fff; background: transparent; }
  .cb-search-mobile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .cb-auth-actions { display: flex; min-width: 0; flex: 0 0 auto; justify-content: flex-end; gap: 6px; margin-left: 0; }
  .cb-broadcast,
  .cb-login { display: none; }
  .cb-register-long { display: none; }
  .cb-register-short { display: inline; }
  .cb-anon-menu { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; background: #edf0f2; }
  .cb-mobile-menu { position: fixed; z-index: 70; top: 58px; right: 8px; display: none; width: min(240px, calc(100% - 16px)); padding: 7px; overflow: hidden; border: 1px solid #aaa; border-radius: 8px; background: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / 18%); }
  .cb-mobile-menu[data-open="true"] { display: grid; }
  .cb-mobile-menu a, .cb-mobile-menu button { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-bottom: 1px solid #eee; color: #444; text-align: left; }
  .cb-header-nav { display: flex; width: 100%; min-width: 0; height: 38px; margin: 0; overflow-x: auto; border-top: 1px solid #e5e5e5; scrollbar-width: none; }
  .cb-header-nav::-webkit-scrollbar { display: none; }
  .cb-header-nav a, .cb-header-nav button { flex: 0 0 auto; padding: 0 16px; }
  .cb-header-nav button:nth-of-type(n+3), .cb-header-nav b { display: none; }
  .cb-page { width: 100%; margin: 0 0 24px; }
  .cb-room { border-width: 0 0 1px; }
  .cb-room-heading { padding: 8px 12px; }
  .cb-room-grid { grid-template-columns: 1fr; min-height: 0; }
  .cb-chat { grid-template-rows: 42px minmax(180px, 1fr) 50px; height: 400px; margin-top: 0; border-top: 1px solid #aaa; border-left: 0; }    /* мобилка не подтягивается: сбрасываем десктопный margin-top: -55 */
  .cb-chat-tabs [data-chat-tab="tokens"],
  .cb-chat-tabs [data-chat-tab="bio"] { display: inline-flex; }    /* на мобилке показываем — десктоп базово прячет */
  html[data-chat-locked="true"]:not([data-unlocked="true"]) .cb-chat::after { top: 42px; }    /* мобильный tabs row 42px */
  .cb-room-heading,
  .cb-profile-bar,
  .cb-details,
  .cb-footer,
  .cb-offline-block { display: none; }                /* на мобилке — только .cb-room */
  .cb-room { display: block; }                        /* десктоп его прячет — здесь возвращаем */
  .cb-profile-bar { grid-template-columns: 58px 1fr auto; margin-top: 0; border-width: 0 0 1px; }
  .cb-profile-bar > img { width: 52px; height: 52px; }
  .cb-profile-bar dl { grid-column: 1 / -1; justify-content: space-around; gap: 10px; padding-top: 10px; border-top: 1px solid #eee; }
  .cb-profile-bar > button { grid-column: 3; grid-row: 1; }
  .cb-details { margin-top: 0; border-width: 0 0 1px; }
  .cb-about { grid-template-columns: 1fr; padding: 18px 14px; }
  .cb-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .cb-related { grid-template-columns: 1fr; }
  
}

@media (max-width: 520px) {
  .cb-room-heading { align-items: flex-start; }
  .cb-room-heading h1 { font-size: 16px; }
  .cb-follow { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .cb-stage { min-height: min(440px, 70vh); }
  .cb-stage-overlay { padding: 14px 14px 56px; }
  .cb-lock { width: 48px; height: 48px; }
  .cb-lock svg { width: 22px; height: 22px; }
  .cb-stage-overlay h2 { margin: 8px 0 4px; font-size: 18px; }
  .cb-stage-overlay p { max-width: 300px; margin-bottom: 10px; font-size: 11px; line-height: 1.3; }
  .cb-stage-overlay button { min-height: 36px; padding-inline: 14px; font-size: 12px; }
  .cb-detail-tabs { overflow-x: auto; scrollbar-width: none; }
  .cb-detail-tabs::-webkit-scrollbar { display: none; }
  .cb-detail-tabs button { flex: 0 0 auto; min-width: 130px; padding: 0 14px; }
  .cb-profile-bar > button { padding: 0 9px; font-size: 12px; }
  .cb-chat-form { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 4px; }
  .cb-chat-form input { min-width: 0; height: 28px; padding: 0 12px; border-radius: 8px; }
  .cb-chat-form button { min-height: 40px; padding: 0 13px; border-radius: 4px; }
}

@media (max-width: 380px) {
  .cb-header-top { padding-inline: 8px; gap: 5px; }
  .cb-logo { flex-basis: 90px; }
  .cb-logo img { width: 90px; }
  .cb-search-mobile,
  .cb-anon-menu { width: 36px; height: 36px; flex-basis: 36px; }
  .cb-register { width: 108px; min-height: 36px; padding-inline: 7px; font-size: 12px; }
}
