:root {
  color-scheme: dark;
  --bg: #16151A;
  --panel: #1C1B20;
  --panel-2: #262626;
  --border: rgba(135,135,135,.28);
  --text: #FBFBFB;
  --muted: #878787;
  --accent: #F4893D;
  --accent-2: #F4893D;
  --danger: #ff8c8c;
  --shadow: 0 20px 45px rgba(0,0,0,.38);
  /* Базовые RGB-тона, через которые прокинуты полупрозрачные поверхности.
     Тёмная тема — по умолчанию; светлая переопределяет их в body.theme-light. */
  --c-tint: 255,255,255;     /* лёгкая подсветка/границы поверх фона */
  --c-bg-rgb: 22,21,26;      /* глубокие фоновые поверхности */
  --c-panel-rgb: 28,27,32;   /* панели, попапы */
  --c-panel2-rgb: 38,38,38;  /* приподнятые поверхности, пузыри */
  --c-deep-rgb: 12,12,16;    /* самый тёмный край градиентов */
  --hero-glow: rgba(244,137,61,.18);
  --note-ink: #ffe0cc;       /* текст в подсказках/плашках поверх оранжевого тона */
}
body.theme-light,
html.theme-light {
  --bg: #EDEFF3;
  --panel: #FFFFFF;
  --panel-2: #F3F5F9;
  --border: rgba(22,26,38,.14);
  --text: #1B1D22;
  --muted: #5C6472;
  --danger: #d64545;
  --shadow: 0 18px 40px rgba(20,28,48,.12);
  --c-tint: 24,28,40;        /* лёгкое затемнение/границы поверх светлого */
  --c-bg-rgb: 237,239,243;
  --c-panel-rgb: 255,255,255;
  --c-panel2-rgb: 244,246,250;
  --c-deep-rgb: 226,229,236;
  --hero-glow: rgba(244,137,61,.12);
  --note-ink: #8a4b12;
}
body.theme-light .topnav a:hover { color: var(--text); }
body.theme-light .catalog-section-btn.active { color: var(--accent); }
html.theme-light { color-scheme: light; }
html.theme-light .note,
html.theme-light .marketplace-safety,
html.theme-light .marketplace-contact,
html.theme-light .editor-block {
  border: 1px solid rgba(244,137,61,.24);
}
html.theme-light .badge { color: #3a5068; }
* { box-sizing: border-box; }
html {
  /* Тёмный фон на уровне html убирает белые «просветы» в статус-баре, зонах safe-area
     и при overscroll/переключении вкладок. */
  background: var(--bg);
  min-height: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  background-color: var(--bg);
  background-image: radial-gradient(circle at top left, var(--hero-glow) 0%, var(--bg) 34%);
  color: var(--text);
}
@media (max-width: 860px) {
  body.mobile-copy-guard,
  body.mobile-copy-guard *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  body.mobile-copy-guard img,
  body.mobile-copy-guard video,
  body.mobile-copy-guard canvas,
  body.mobile-copy-guard svg {
    -webkit-user-drag: none;
    user-drag: none;
  }
  body.mobile-copy-guard input,
  body.mobile-copy-guard textarea,
  body.mobile-copy-guard select,
  body.mobile-copy-guard a[href],
  body.mobile-copy-guard [contenteditable="true"] {
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
  }
}
.app-shell { max-width: 1600px; margin: 0 auto; padding: 24px; }
body.auth-gate .news-section,
body.auth-gate .hero,
body.auth-gate .chat-section,
body.auth-gate .marketplace-section,
body.auth-gate .bottom-nav {
  display: none !important;
}
body.auth-gate .app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  grid-template-areas:
    "topbar topbar"
    "catalog access"
    "pricing access";
  gap: 18px;
  align-items: start;
}
body.auth-gate .access-panel {
  grid-area: access;
  position: sticky;
  top: 104px;
  width: 100%;
  margin: 0;
}
body.auth-gate .topbar {
  grid-area: topbar;
  margin-bottom: 0;
}
body.auth-gate .catalog-shell {
  grid-area: catalog;
  margin-top: 0;
}
body.auth-gate .pricing-wrap {
  grid-area: pricing;
  margin-top: 0;
}
body.auth-gate .access-grid {
  grid-template-columns: 1fr;
}
body.auth-gate .section-header {
  align-items: flex-start;
}
body.auth-gate .topnav a[href="#home"],
body.auth-gate .topnav a[href="#chat"],
body.auth-gate .topnav a[href="#marketplace"],
body.auth-gate .topnav a[href="https://keyacademy.ru/"] {
  display: none;
}
body.auth-gate .catalog-workspace {
  grid-template-columns: 1fr;
}
body.auth-gate .detail {
  display: none;
}
body.app-authenticated .access-panel {
  display: none;
}
body.user-authenticated .hero {
  display: none !important;
}
body.limited-access .catalog-shell {
  display: none !important;
}
body.limited-access .bottom-nav-item[data-tab="catalog"] {
  opacity: .46;
}
body.payment-gate .topbar,
body.payment-gate .access-panel,
body.payment-gate .news-section,
body.payment-gate .hero,
body.payment-gate .catalog-shell,
body.payment-gate .chat-section,
body.payment-gate .marketplace-section,
body.payment-gate .bottom-nav {
  display: none !important;
}
body.payment-gate .app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
body.payment-gate .pricing-wrap {
  width: min(920px, 100%);
  margin: 0;
}
body.payment-gate .pricing-header {
  text-align: center;
  justify-content: center;
}
.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(var(--c-panel-rgb),.94);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  z-index: 2;
}
.menu-toggle:hover {
  background: rgba(var(--c-tint),.05);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}
.menu-user-card {
  display: none;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: contain;
  background: var(--panel);
}
.brand-title { font-size: 17px; font-weight: 900; letter-spacing: .03em; }
.brand-title span { color: var(--accent); }
.brand-subtitle { color: var(--muted); font-size: 11px; letter-spacing: .03em; }
.topnav {
  display: flex;
  gap: 12px;
}
.topnav a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: normal;
}
.topnav a:hover { color: white; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--c-tint),.04);
}
.lang-switch button {
  width: auto;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.lang-switch button.active {
  background: linear-gradient(180deg, #F4893D, #c96825);
  color: #16151A;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(var(--c-tint),.04);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}
.theme-toggle:hover {
  background: rgba(var(--c-tint),.1);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.topbar-account-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar-action {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--c-tint),.04);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.topbar-action:hover {
  border-color: rgba(244,137,61,.55);
  color: var(--accent);
}
.topbar-account-actions .hidden {
  display: none;
}
.menu-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.auth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(var(--c-tint),.03);
}
.auth-card.hidden { display: none; }
.auth-user-label {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
.auth-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.auth-card .ghost,
.auth-card .admin-top-link {
  width: auto;
  padding: 0 18px;
  height: 40px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-card .ghost:hover,
.auth-card .admin-top-link:hover {
  background: rgba(var(--c-tint),.06);
  border-color: var(--accent);
}
.auth-card .hidden { display: none; }
@media (max-width: 720px) {
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
  .brand-title { font-size: 15px; }
  .brand-subtitle { font-size: 10px; }
}
@media (max-width: 380px) {
  .phone-verify-row {
    grid-template-columns: 1fr;
  }
}
.hero {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}
.hero-copy-block {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 12%, rgba(244,137,61,.28), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(255,190,91,.12), transparent 38%),
    linear-gradient(180deg, rgba(var(--c-panel-rgb),.98), rgba(var(--c-bg-rgb),.98));
  box-shadow: var(--shadow);
}
.hero-copy-block::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    conic-gradient(from 110deg, transparent 0 64%, rgba(244,137,61,.18), transparent 76%),
    radial-gradient(circle, rgba(244,137,61,.16), transparent 34%);
  opacity: .55;
  animation: heroGlow 12s linear infinite;
  pointer-events: none;
}
.hero-copy-block::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  background: linear-gradient(120deg, rgba(var(--c-tint),.09), transparent 18%, transparent 72%, rgba(244,137,61,.08));
  pointer-events: none;
}
.hero-copy-block > * {
  position: relative;
  z-index: 1;
}
@keyframes heroGlow {
  to { transform: rotate(360deg); }
}
.eyebrow { color: var(--accent-2); letter-spacing: .18em; font-size: 12px; text-transform: uppercase; margin-bottom: 10px; }
h1 { margin: 0 0 12px; font-size: 42px; line-height: 1.05; font-weight: 900; }
.hero-copy { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 820px; }
.hero-regalia {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.hero-regalia article {
  position: relative;
  min-height: 112px;
  padding: 15px 15px 14px;
  border: 1px solid rgba(var(--c-tint),.11);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(var(--c-tint),.08), rgba(var(--c-tint),.025)),
    rgba(var(--c-tint),.035);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.hero-regalia article::before {
  content: "";
  position: absolute;
  inset: auto -22px -34px auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(244,137,61,.18);
  filter: blur(2px);
}
.hero-regalia article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 35%, rgba(var(--c-tint),.12), transparent 62%);
  transform: translateX(-120%);
  animation: regaliaShine 7s ease-in-out infinite;
}
.hero-regalia article:nth-child(2)::after { animation-delay: 1s; }
.hero-regalia article:nth-child(3)::after { animation-delay: 2s; }
.hero-regalia article:nth-child(4)::after { animation-delay: 3s; }
.hero-regalia article:hover {
  transform: translateY(-2px);
  border-color: rgba(244,137,61,.5);
  background:
    linear-gradient(135deg, rgba(244,137,61,.14), rgba(var(--c-tint),.035)),
    rgba(var(--c-tint),.04);
}
@keyframes regaliaShine {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
.hero-regalia small {
  display: inline-flex;
  margin-bottom: 10px;
  color: rgba(244,137,61,.95);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.hero-regalia strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.05;
}
.hero-regalia span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  max-width: 92%;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
}
.primary-link { background: linear-gradient(180deg, #F4893D, #c96825); color: #16151A; }
.ghost-link { border: 1px solid var(--border); color: var(--text); background: rgba(251,251,251,.03); }
.hero-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(244,137,61,.28);
  border-radius: 16px;
  color: var(--text);
  background: rgba(244,137,61,.08);
  line-height: 1.5;
}
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-showcase {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 42%, rgba(244,137,61,.22), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(var(--c-tint),.08), transparent 34%),
    linear-gradient(180deg, rgba(var(--c-panel-rgb),.94), rgba(var(--c-deep-rgb),.96));
  box-shadow: var(--shadow);
}
.showcase-orbit {
  position: absolute;
  width: 420px;
  height: 420px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(244,137,61,.22);
  border-radius: 50%;
  animation: showcasePulse 5s ease-in-out infinite;
}
.showcase-orbit::before,
.showcase-orbit::after {
  content: "";
  position: absolute;
  inset: 48px;
  border: 1px dashed rgba(var(--c-tint),.12);
  border-radius: 50%;
}
.showcase-orbit::after {
  inset: 112px;
  border-style: solid;
  border-color: rgba(244,137,61,.18);
}
.showcase-card {
  position: absolute;
  border: 1px solid rgba(var(--c-tint),.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(38,37,43,.96), rgba(18,18,23,.96));
  box-shadow: 0 24px 70px rgba(0,0,0,.36);
}
.showcase-card-main {
  left: 50%;
  top: 48%;
  width: min(78%, 360px);
  min-height: 330px;
  padding: 18px;
  transform: translate(-50%, -50%);
  animation: showcaseFloat 6s ease-in-out infinite;
}
.showcase-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.showcase-top span {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .12em;
}
.showcase-car {
  margin-top: 24px;
  font-size: 30px;
  font-weight: 900;
}
.showcase-key {
  position: relative;
  width: 190px;
  height: 160px;
  margin: 28px auto 20px;
  transform: rotate(-14deg);
  animation: keyFloat 4.5s ease-in-out infinite;
}
.key-head {
  position: absolute;
  left: 28px;
  top: 0;
  width: 118px;
  height: 92px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 32%, rgba(var(--c-tint),.18), transparent 18%),
    linear-gradient(145deg, #111216, #373840);
  border: 6px solid #0a0b0f;
  box-shadow: inset 0 0 0 1px rgba(var(--c-tint),.12), 0 22px 50px rgba(0,0,0,.4);
}
.key-head::after {
  content: "";
  position: absolute;
  inset: 30px 38px;
  border-radius: 10px;
  border: 2px solid rgba(var(--c-tint),.2);
}
.key-blade {
  position: absolute;
  left: 118px;
  top: 58px;
  width: 94px;
  height: 28px;
  background: linear-gradient(90deg, #cfd3d8, #f2f4f7, #a9adb5);
  clip-path: polygon(0 18%, 78% 18%, 100% 0, 100% 100%, 78% 82%, 0 82%);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
}
.showcase-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.showcase-pills span,
.showcase-ticker span {
  border: 1px solid rgba(244,137,61,.24);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--note-ink);
  background: rgba(244,137,61,.08);
  font-size: 12px;
  font-weight: 800;
}
.showcase-card-side {
  display: grid;
  gap: 6px;
  padding: 14px;
  width: 190px;
  z-index: 2;
}
.showcase-card-side span,
.showcase-card-side small {
  color: var(--muted);
  font-size: 12px;
}
.showcase-card-side strong {
  font-size: 22px;
}
.showcase-card-one {
  right: 24px;
  top: 42px;
  animation: cardSlideOne 8s ease-in-out infinite;
}
.showcase-card-two {
  left: 24px;
  bottom: 42px;
  animation: cardSlideTwo 8s ease-in-out infinite;
}
.showcase-ticker {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  overflow: hidden;
}
@keyframes showcaseFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-12px); }
}
@keyframes keyFloat {
  0%, 100% { transform: rotate(-14deg) translateY(0); }
  50% { transform: rotate(-10deg) translateY(-10px); }
}
@keyframes showcasePulse {
  0%, 100% { opacity: .68; transform: translate(-50%, -50%) scale(.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes cardSlideOne {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(18px) rotate(-1deg); }
}
@keyframes cardSlideTwo {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}
.stat-card, .panel {
  background: linear-gradient(180deg, rgba(var(--c-panel-rgb),.98), rgba(var(--c-bg-rgb),.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 20px;
}
.stat-card { padding: 18px; }
.stat-value { font-size: 30px; font-weight: 700; margin-bottom: 6px; }
.stat-label { color: var(--muted); font-size: 14px; }
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.news-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 861px) {
  .news-section {
    display: none !important;
  }
}
.news-search {
  position: relative;
  max-width: 760px;
  width: 100%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
}
.news-search-ic {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat center / contain;
}
.news-search input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
}
.news-search input:focus { outline: 2px solid rgba(244,137,61,.32); border-color: var(--accent); }
.news-search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(var(--c-bg-rgb),.28);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.news-search-clear.hidden { display: none; }
.news-search-empty {
  max-width: 760px;
  margin: 8px auto;
  padding: 22px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.news-list {
  display: grid;
  gap: 14px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.news-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(var(--c-panel-rgb),.98), rgba(var(--c-bg-rgb),.98));
  box-shadow: var(--shadow);
}
.news-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
}
.news-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid rgba(var(--c-tint),.12);
}
.news-card-head > div {
  display: grid;
  gap: 2px;
}
.news-card-head strong {
  font-size: 14px;
  color: var(--text);
}
.news-card-head span {
  font-size: 12px;
  color: var(--muted);
}
.news-image {
  display: block;
  width: 100%;
  height: auto;
  /* Показываем картинку целиком, без обрезки. Соотношение сторон приходит с сервера
     (inline aspect-ratio), поэтому место под картинку резервируется заранее и лента
     не прыгает на iOS, где нет scroll anchoring. Очень высокие картинки ограничиваем
     по высоте и вписываем целиком (object-fit: contain), тоже без обрезки. */
  max-height: 80vh;
  object-fit: contain;
  background: rgba(var(--c-tint),.04);
  border-top: 1px solid rgba(var(--c-tint),.08);
  border-bottom: 1px solid rgba(var(--c-tint),.08);
}
.news-card h3 {
  margin: 0;
  padding: 12px 14px 6px;
  font-size: 20px;
}
.news-body {
  margin: 0;
  padding: 0 14px 12px;
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--text);
}
.news-actions {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 8px 12px;
  border-top: 1px solid rgba(var(--c-tint),.08);
  border-bottom: 1px solid rgba(var(--c-tint),.08);
}
.news-action-btn {
  width: auto;
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(var(--c-tint),.72);
  font-size: 15px;
  cursor: pointer;
}
html.theme-light .news-action-btn {
  color: rgba(var(--c-tint),.58);
}
.news-action-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: block;
  color: inherit;
}
.news-action-btn b {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  letter-spacing: -.01em;
}
.news-action-btn.active {
  color: rgba(var(--c-tint),.72);
  background: transparent;
}
html.theme-light .news-action-btn.active {
  color: rgba(var(--c-tint),.58);
}
.news-like-btn.active {
  color: #ff3347;
}
html.theme-light .news-like-btn.active {
  color: #ff3347;
}
.news-share-btn {
  min-width: 0;
}
.news-comments-panel {
  display: none;
}
.news-comments-panel.open {
  display: block;
}
.news-comments {
  display: grid;
  gap: 8px;
  max-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 0;
  overscroll-behavior: contain;
}
.news-no-comments {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0;
}
.news-comment {
  max-width: 100%;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(var(--c-tint),.035);
  overflow-wrap: anywhere;
}
.news-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.news-comment strong,
.news-comment span {
  font-size: 12px;
}
.news-comment span {
  color: var(--muted);
  margin-left: 6px;
}
.news-comment p {
  margin: 5px 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}
.news-comment-reaction,
.news-reply-btn,
.news-replying-to button {
  width: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}
.news-comment-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 38px;
  justify-content: flex-end;
  font-size: 13px;
}
.news-comment-reaction.active {
  color: var(--accent);
}
.news-comment-reaction b {
  font-size: 12px;
}
.news-reply-ref {
  display: inline-flex;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 8px;
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(244,137,61,.08);
  font-size: 12px;
}
.news-reply-btn {
  margin-top: 6px;
  font-size: 12px;
}
.news-comment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.news-comment-actions .news-reply-btn {
  margin-top: 6px;
}
.news-comment-delete {
  width: auto;
  border: 0;
  background: transparent;
  color: #ef6a6a;
  padding: 0;
  margin-top: 6px;
  font-size: 12px;
  cursor: pointer;
}
.news-comment-delete:hover {
  color: #ff8585;
  text-decoration: underline;
}
.news-replying-to {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(244,137,61,.09);
  color: var(--muted);
  font-size: 12px;
}
.news-replying-to button {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}
.news-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
}
.news-comment-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 999px;
}
.news-send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.news-empty {
  min-height: 160px;
}
.broadcasts-section {
  margin-bottom: 18px;
}
.broadcasts-panel {
  min-height: auto;
  border-color: rgba(244,137,61,.34);
}
.broadcasts-list {
  display: grid;
  gap: 12px;
}
.broadcast-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(244,137,61,.08);
}
.broadcast-card h3 {
  margin: 0 0 8px;
}
.broadcast-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text);
}
.value-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(var(--c-panel-rgb),.94);
  box-shadow: var(--shadow);
}
.value-card h3 { margin: 0 0 10px; font-size: 18px; }
.value-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.showcase { margin-bottom: 18px; }
.showcase-panel { min-height: auto; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}
.section-header h2 { margin: 0; font-size: 30px; }
.access-panel {
  min-height: auto;
  margin-bottom: 18px;
}
.access-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.access-grid.admin-mode {
  grid-template-columns: minmax(0, 1fr);
}
.auth-form {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
#registerForm {
  gap: 8px;
}
.auth-form h3 {
  margin: 0;
}
#registerForm h3 {
  font-size: 24px;
  line-height: 1.15;
}
#registerForm > p {
  margin-bottom: 6px !important;
  font-size: 12px !important;
  line-height: 1.35;
}
.auth-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}
.auth-form input,
.auth-form select,
.auth-form textarea,
.auth-form button {
  min-width: 0;
  max-width: 100%;
}
#loginForm button {
  width: 100%;
  min-height: 44px;
  white-space: nowrap;
}
.auth-form .muted {
  min-width: 0;
  overflow-wrap: anywhere;
}
#registerForm input,
#registerForm button {
  min-height: 44px;
  padding: 9px 14px;
}
.phone-verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.phone-verify-row #sendSmsCodeBtn {
  grid-column: 1 / -1;
}
.phone-verify-row button {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.phone-verify-row input {
  min-height: 40px;
  min-width: 0;
}
.phone-verify-row.verified button,
.phone-verify-row.verified input {
  border-color: rgba(101, 214, 139, .45);
}
.auth-form .consent-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(244,137,61,.22);
  border-radius: 14px;
  background: rgba(244,137,61,.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.auth-form .consent-check input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
}
.auth-form .consent-check span {
  flex: 1 1 auto;
  min-width: 0;
}
.consent-check a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 26, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.2s;
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform 0.2s;
  overscroll-behavior: contain;
}
#installHintTitle {
  margin: 0 40px 8px 0;
  font-size: 18px;
  line-height: 1.3;
}
#installHintOk {
  white-space: nowrap;
  height: 44px;
}
.install-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}
.install-steps article {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(var(--c-tint), .04);
}
.install-steps h4 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.3;
}
.install-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.install-hint-menu { display: none; }
.modal-overlay.hidden .modal-content {
  transform: translateY(20px);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(var(--c-bg-rgb),.9);
  border: 1px solid rgba(var(--c-tint),.08);
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-close:hover {
  color: var(--text);
  background: rgba(var(--c-tint),0.05);
}

/* Мобильная модалка. ВАЖНО: этот блок должен идти ПОСЛЕ базовых правил .modal-*,
   иначе базовые (align-items:center, padding:20px) перебивают его по порядку в коде —
   высокая форма центрируется, её верх с крестиком уезжает под статус-бар и его не нажать.
   Открываем модалку от верха (flex-start) с гарантированным отступом под чёлку. */
@media (max-width: 720px) {
  .modal-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    /* Плоский фолбэк на случай, если Safari не понимает max()/env() — крестик всё равно ниже чёлки. */
    padding-top: 64px;
    /* max(env, 64) гарантирует минимум 64px даже когда система отдаёт safe-area-inset-top = 0. */
    padding-top: max(env(safe-area-inset-top), 64px);
    overflow-y: auto;
  }
  .modal-content {
    width: min(100%, 430px);
    max-width: 430px;
    max-height: calc(100dvh - 84px);
    padding: 18px;
    padding-top: 38px;
    margin: 0 auto 12px;
  }
  .modal-close {
    top: 8px;
    right: 8px;
    z-index: 5;
  }
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.checkbox-label input {
  width: auto;
}
.pro-plan-card {
  grid-column: auto;
}
.pro-plan-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.pro-plan-options .payment-btn {
  width: 100%;
}
.access-lock {
  min-height: 360px;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
}
.chips-wrap { display: flex; gap: 10px; flex-wrap: wrap; }
.chips-secondary { margin-top: 12px; }
.chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(var(--c-tint),.03);
  border: 1px solid var(--border);
}
.chip-pill strong { font-size: 14px; }
.chip-pill span { color: var(--muted); font-size: 13px; }
.catalog-shell {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.catalog-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 20px;
  align-items: start;
}
.catalog-workspace.detail-only {
  grid-template-columns: minmax(0, 1fr);
}
.catalog-workspace.detail-only .results {
  display: none;
}
.catalog-workspace.detail-only .detail {
  position: static;
  min-height: auto;
}
.panel { padding: 18px; }
.catalog-sections-panel {
  overflow: hidden;
}
.catalog-section-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.catalog-section-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
  width: 100%;
  padding: 13px 14px 13px 46px;
  border-radius: 18px;
  border: 1px solid rgba(var(--c-tint),.1);
  background:
    linear-gradient(180deg, rgba(var(--c-tint),.055), rgba(var(--c-tint),.025));
  color: var(--text);
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(var(--c-tint),.06);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.catalog-section-btn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  background: rgba(244,137,61,.16);
  border: 1px solid rgba(244,137,61,.34);
  transform: translateY(-50%);
}
.catalog-section-btn::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}
.catalog-section-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(244,137,61,.34);
}
.catalog-section-btn.active {
  border-color: rgba(244,137,61,.75);
  background:
    radial-gradient(circle at 18px 18px, rgba(244,137,61,.28), transparent 34px),
    linear-gradient(180deg, rgba(244,137,61,.18), rgba(244,137,61,.07));
  color: #fff;
}
.catalog-section-btn.active::before {
  background: rgba(244,137,61,.28);
  border-color: rgba(244,137,61,.72);
}
.knowledge-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.knowledge-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}
.knowledge-head h3 { margin: 0 0 6px; font-size: 24px; }
.knowledge-head p { margin: 0; }
.knowledge-head input { max-width: 360px; }
.knowledge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}
.knowledge-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(var(--c-tint),.1);
  background: rgba(var(--c-tint),.035);
}
.knowledge-card h4 { margin: 0; font-size: 16px; }
.knowledge-card p,
.knowledge-card pre {
  margin: 0;
  color: var(--muted);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.knowledge-card a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.knowledge-tags span {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 12px;
}
.filters { min-height: auto; }
.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.filter-grid label.hidden { display: none; }
.filter-grid label.has-suggest { position: relative; }
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-suggest.hidden { display: none; }
.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item.active { background: rgba(244,137,61,.16); }
.search-suggest-item .ss-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-suggest-item .ss-ic {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(244,137,61,.18);
  position: relative;
}
.search-suggest-item .ss-ic::before {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--accent);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.search-suggest-item .ss-ic--brand::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82Z'/%3E%3Ccircle cx='7' cy='7' r='1.2' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82Z'/%3E%3Ccircle cx='7' cy='7' r='1.2' fill='black'/%3E%3C/svg%3E");
}
.search-suggest-item .ss-ic--model::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M18.92 6.01A2 2 0 0 0 17 5H7a2 2 0 0 0-1.92 1.01L3 11v7a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-7l-2.08-4.99ZM6.5 15A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 15Zm11 0a1.5 1.5 0 1 1 1.5-1.5 1.5 1.5 0 0 1-1.5 1.5ZM5.5 11l1.2-3h10.6l1.2 3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M18.92 6.01A2 2 0 0 0 17 5H7a2 2 0 0 0-1.92 1.01L3 11v7a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-7l-2.08-4.99ZM6.5 15A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 15Zm11 0a1.5 1.5 0 1 1 1.5-1.5 1.5 1.5 0 0 1-1.5 1.5ZM5.5 11l1.2-3h10.6l1.2 3Z'/%3E%3C/svg%3E");
}
.filters .filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.filters label { display: block; margin-bottom: 0; }
.filters span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
input, select, button, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
}
input:focus, select:focus { outline: 2px solid rgba(244,137,61,.32); border-color: var(--accent); }
.button-row { display: flex; gap: 10px; margin-top: 10px; }
.filter-actions {
  max-width: 360px;
}
button { cursor: pointer; font-weight: 600; }
button.primary { background: linear-gradient(180deg, #F4893D, #c96825); border-color: #F4893D; color: #16151A; }
button.ghost { background: transparent; }
.note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(244,137,61,.08);
  color: var(--note-ink);
  font-size: 13px;
  line-height: 1.5;
}
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.results,
.detail {
  min-height: 720px;
}
.results.guest-locked {
  min-height: auto;
}
.results-list { display: grid; gap: 12px; max-height: 980px; overflow: auto; padding-right: 4px; }
.results-list.guest-locked {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.results-list.compact-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 8px;
}
.result-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(var(--c-tint),.02);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.result-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.result-card.active { border-color: var(--accent-2); background: rgba(244,137,61,.08); }
.result-card-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.result-thumb-wrap {
  width: 100%;
  min-height: 108px;
  border-radius: 14px;
  overflow: visible;
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: grid;
  place-items: center;
}
.result-thumb-wrap.is-empty {
  background: linear-gradient(180deg, rgba(var(--c-tint),.03), rgba(var(--c-tint),.01));
}
.result-thumb {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}
.result-thumb-placeholder {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 10px;
  line-height: 1.45;
}
.missing-photo-card {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}
.missing-photo-card img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  opacity: .9;
}
.result-thumb-placeholder .missing-photo-card img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.missing-photo-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}
.missing-photo-card span {
  color: var(--accent);
}
.missing-photo-card small {
  color: var(--muted);
  line-height: 1.4;
}
.request-photo-btn {
  width: auto;
  margin-top: 8px;
  padding: 10px 14px;
  border-color: rgba(244,137,61,.42);
}
.result-thumb-placeholder small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #8fa0c9;
}
.result-main {
  min-width: 0;
}
.result-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.result-title { font-size: 18px; font-weight: 700; }
/* Компактная карточка (напр. профили Lishi): одна строка, меньше высоты — помещается больше. */
.knowledge-result-card--compact { padding: 10px 12px; }
.knowledge-result-card--compact .result-top { margin-bottom: 0; align-items: center; flex-direction: row; }
.knowledge-result-card--compact .result-title { font-size: 16px; }
.knowledge-result-card--compact .muted { font-size: 12px; }
.knowledge-result-card--compact .result-open-btn { padding: 6px 14px; flex: 0 0 auto; }
.knowledge-show-more {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  font-weight: 600;
}
.result-open-btn {
  width: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
  border: 1px solid rgba(var(--c-tint),.12);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #d7e4ff;
  background: rgba(var(--c-tint),.03);
}
.result-snippet { color: var(--muted); font-size: 14px; line-height: 1.45; }
.detail-content { display: grid; gap: 12px; }
.keycard-detail-content {
  gap: 10px;
}
.detail {
  position: sticky;
  top: 18px;
}
.hidden { display: none; }
.empty-state { display: grid; place-content: center; min-height: 100%; text-align: center; color: var(--muted); }
.empty-state.guest-lock {
  min-height: 128px;
  place-content: start center;
  padding: 18px;
  border: 1px dashed rgba(244,137,61,.28);
  border-radius: 16px;
  background: rgba(244,137,61,.06);
}
.empty-state.guest-lock h3 {
  margin: 0 0 8px;
}
.empty-state.guest-lock p {
  margin: 0;
}
.detail-photo {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
  background: var(--panel-2);
}
.detail-photo-wrap {
  width: 100%;
  min-height: 240px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  overflow: visible;
  display: grid;
  place-items: center;
  padding: 10px;
}
.keycard-detail-content .detail-photo-wrap {
  min-height: 180px;
  max-height: 300px;
  padding: 6px;
  overflow: hidden;
}
.keycard-detail-content .detail-photo {
  max-height: 288px;
}
.detail-photo-wrap.is-empty {
  background: var(--panel-2);
  border: 1px dashed rgba(var(--c-tint), .18);
}
.detail-photo-placeholder {
  display: grid;
  gap: 8px;
  padding: 16px;
  text-align: center;
  width: 100%;
}
.detail-photo-placeholder .missing-photo-card strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}
.detail-photo-placeholder .missing-photo-card span {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}
.detail-photo-placeholder .missing-photo-card small,
.detail-photo-placeholder .missing-photo-hint {
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}
.upload-photo-label {
  display: inline-grid;
  margin-top: 4px;
  cursor: pointer;
}
.upload-photo-label.is-busy {
  opacity: .7;
  pointer-events: none;
}
.upload-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.missing-photo-card .request-photo-btn {
  width: auto;
  margin-top: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  border-color: var(--border);
  background: rgba(var(--c-tint), .04);
}
.detail-photo-placeholder strong {
  font-size: 26px;
  line-height: 1.2;
}
.detail-photo-placeholder span {
  color: var(--accent-2);
  font-size: 18px;
}
.detail-photo-placeholder small {
  color: var(--muted);
  line-height: 1.5;
}
.detail-header h3 { margin: 0 0 6px; font-size: 24px; }
.detail-subtitle { color: var(--muted); }
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.info-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(var(--c-tint),.02);
}
.info-label { color: var(--muted); font-size: 10px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.info-value { font-size: 13px; line-height: 1.3; white-space: pre-wrap; word-break: break-word; }
.section-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  background: rgba(var(--c-tint),.02);
}
.section-block h4 { margin: 0 0 7px; font-size: 13px; }
.section-block p { margin: 0; white-space: pre-wrap; line-height: 1.55; color: var(--text); }
.section-block a,
.chat-message-body a,
.chat-reply-text a,
.news-body a,
.news-comment p a,
.broadcast-card p a,
.support-ticket-card p a,
.support-ticket-message p a,
.marketplace-card p a,
.marketplace-thread-message p a,
.participant-about a,
.menu-user-about a,
.result-snippet a,
.eq-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-message.own .chat-message-body a,
.chat-message.own .chat-reply-text a {
  color: #16151A;
}
.keycard-compact-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.keycard-compact-main {
  display: grid;
  gap: 10px;
  align-content: start;
  max-width: 780px;
}
.keycard-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.keycard-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.keycard-section-grid .section-block {
  max-height: 170px;
  overflow: auto;
}
.keycard-section-grid .section-block p {
  font-size: 13px;
  line-height: 1.36;
}
.keycard-primary-info {
  max-height: 132px;
  overflow: auto;
}
.keycard-primary-info p {
  font-size: 13px;
  line-height: 1.36;
}
.keycard-links-block .links-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.links-list { display: grid; gap: 8px; }
.links-list a { color: #9bc1ff; text-decoration: none; }
.links-list a:hover { text-decoration: underline; }
.keycard-links-block .links-list { gap: 10px; }
.blank-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(var(--c-tint), .04);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.blank-link:hover {
  border-color: rgba(244,137,61,.5);
  background: rgba(244,137,61,.1);
  text-decoration: none !important;
}
.blank-link:active { transform: scale(.99); }
.blank-link .blank-link-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.blank-link .blank-link-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #57c26a;
}
.blank-link.is-catalog .blank-link-dot { background: #f4893d; }
.blank-link.is-catalog { color: var(--text) !important; }
.material-preview {
  display: block;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #f5f2eb;
  text-decoration: none;
}
.material-preview img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  display: block;
}
.material-preview-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  gap: 8px;
  color: #17151a;
  text-align: center;
}
.material-preview-empty strong {
  font-size: 42px;
}
.material-preview-empty span {
  color: #5f6470;
}
.material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.material-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}
.material-btn.primary {
  background: linear-gradient(180deg, #F4893D, #c96825);
  border-color: #F4893D;
  color: #16151A;
}
.footer-tip { color: var(--muted); font-size: 13px; }
.editor-block {
  border-color: rgba(244,137,61,.28);
  background: rgba(244,137,61,.06);
}
.editor-block summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.editor-block summary::-webkit-details-marker {
  display: none;
}
.editor-block summary span {
  font-weight: 800;
}
.editor-block summary small {
  color: var(--muted);
}
.editor-block[open] summary {
  margin-bottom: 14px;
}
.keycard-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.keycard-edit-form label {
  display: grid;
  gap: 7px;
}
.keycard-edit-form label:nth-of-type(n+9) {
  grid-column: 1 / -1;
}
.keycard-edit-form button,
.keycard-edit-form .muted {
  grid-column: 1 / -1;
}
.keycard-edit-form textarea {
  min-height: 86px;
  resize: vertical;
}
.chat-section {
  margin-top: 22px;
  max-width: 100%;
  overflow-x: hidden;
}
.chat-panel {
  min-height: auto;
  max-width: 100%;
  overflow: hidden;
}
.chat-app {
  display: grid;
  grid-template-columns: var(--chat-list-width, 320px) 8px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  height: min(560px, 72vh);
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}
.chat-resizer {
  align-self: stretch;
  width: 8px;
  cursor: col-resize;
  border-radius: 999px;
  background: transparent;
  position: relative;
  transition: background .15s ease;
}
.chat-resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 42px;
  border-radius: 999px;
  background: rgba(var(--c-tint),.14);
  transition: background .15s ease, height .15s ease;
}
.chat-resizer:hover::before,
.chat-app.chat-resizing .chat-resizer::before {
  background: rgba(244,137,61,.7);
  height: 64px;
}
.chat-app.chat-resizing {
  cursor: col-resize;
  user-select: none;
}
.chat-rooms {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(var(--c-bg-rgb),.8);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-rooms::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.chat-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(var(--c-tint),.08);
  margin-bottom: 4px;
}
.chat-list-head .chat-list-tabs {
  flex: 1;
  min-width: 0;
  padding: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.chat-refresh-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--c-tint),.1);
  background: rgba(var(--c-tint),.04);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chat-refresh-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.chat-refresh-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: rgba(244,137,61,.28);
  background: rgba(244,137,61,.08);
}
.chat-refresh-btn:disabled {
  opacity: .65;
  cursor: wait;
}
.chat-refresh-btn.is-spinning svg {
  animation: chat-refresh-spin .75s linear infinite;
}
@keyframes chat-refresh-spin {
  to { transform: rotate(360deg); }
}
.chat-list-tabs {
  display: flex;
  gap: 26px;
  align-items: center;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(var(--c-tint),.08);
  margin-bottom: 4px;
}
.chat-list-tabs button {
  width: auto;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.chat-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent, #f4893d);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.chat-list-tabs button.active {
  color: var(--text);
}
.chat-list-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 3px;
  border-radius: 999px;
  background: var(--text);
}
.chat-room-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.chat-room-filters::-webkit-scrollbar {
  display: none;
}
.chat-room-filters button {
  width: auto;
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--c-tint),.08);
  background: rgba(251,251,251,.04);
  color: var(--muted);
  font-size: 12px;
}
.chat-room-filters button.active {
  border-color: rgba(244,137,61,.5);
  background: rgba(244,137,61,.12);
  color: var(--text);
}
.chat-search {
  padding: 2px 0 8px;
}
.chat-search input {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(251,251,251,.06);
  border: 1px solid rgba(var(--c-tint),.08);
  color: var(--text);
}
.chat-notify-btn {
  width: 100%;
  padding: 9px 12px;
  margin: 2px 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(244,137,61,.24);
  background: rgba(244,137,61,.07);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}
.chat-notify-btn.active {
  border-color: rgba(244,137,61,.42);
  background: rgba(244,137,61,.12);
  color: var(--accent);
}
.chat-list-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.chat-room-btn {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 9px 11px;
  transition: background .15s ease, border-color .15s ease;
}
.chat-room-btn:hover {
  background: rgba(var(--c-tint),.04);
}
.chat-room-avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(244,137,61,.22), rgba(207,104,37,.16));
  border: 1px solid rgba(244,137,61,.28);
  color: var(--accent, #f4893d);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
  flex: 0 0 auto;
}
.chat-room-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}
.chat-room-avatar[class*="chat-room-avatar--"],
.direct-avatar[class*="chat-room-avatar--"] {
  border: none;
  font-size: 0;
  background: var(--room-bg);
  color: var(--room-fg);
}
.chat-room-avatar--img {
  padding: 0;
  overflow: hidden;
  background: none !important;
}
.chat-room-avatar--img .chat-room-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.chat-room-btn.active .chat-room-avatar--img { background: none !important; }
.chat-room-avatar--general { --room-bg: rgba(244,137,61,.2); --room-fg: #c96825; }
.chat-room-avatar--fludilka { --room-bg: rgba(236,72,153,.14); --room-fg: #db2777; }
.chat-room-avatar--support { --room-bg: rgba(37,99,235,.14); --room-fg: #2563eb; }
.chat-room-avatar--marketplace { --room-bg: rgba(22,163,74,.14); --room-fg: #16a34a; }
.chat-room-avatar--gate-remotes { --room-bg: rgba(124,58,237,.14); --room-fg: #7c3aed; }
.chat-room-avatar--expert { --room-bg: rgba(202,138,4,.16); --room-fg: #b45309; }
.chat-room-avatar--keyacademy-staff { --room-bg: rgba(234,88,12,.14); --room-fg: #ea580c; }
.chat-room-avatar--training { --room-bg: rgba(8,145,178,.14); --room-fg: #0891b2; }
.chat-room-avatar--important-ilya { --room-bg: rgba(79,70,229,.14); --room-fg: #4f46e5; }
.chat-room-avatar--wins-losses { --room-bg: rgba(217,119,6,.14); --room-fg: #d97706; }
.chat-room-avatar--franchise { --room-bg: rgba(71,85,105,.14); --room-fg: #475569; }
.chat-room-avatar--keyacademy-news { --room-bg: rgba(225,29,72,.12); --room-fg: #e11d48; }
.chat-room-avatar--ai-expert { --room-bg: rgba(5,150,105,.16); --room-fg: #059669; }
html.theme-light .chat-room-avatar--expert { --room-fg: #92400e; }
html.theme-light .chat-room-avatar--franchise { --room-fg: #334155; }
.pinned-chat-btn .direct-avatar.chat-room-avatar--ai-expert {
  background: var(--room-bg);
  color: var(--room-fg);
}
.chat-room-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.chat-room-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.chat-room-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.chat-room-btn strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.chat-room-btn.has-unread strong {
  color: var(--text);
}
.chat-role-icon {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
  filter: saturate(1.1);
}
.chat-row-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.chat-row-time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.chat-room-btn.has-unread .chat-row-time {
  color: var(--accent, #f4893d);
}
.chat-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.chat-room-preview {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}
.chat-preview-author {
  color: rgba(var(--c-tint),.75);
  font-weight: 600;
}
.chat-preview-muted {
  color: var(--muted);
  text-transform: capitalize;
}
.chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #34d399, #16a34a);
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(var(--c-bg-rgb),.95), 0 6px 14px rgba(22,163,74,.28);
}
.chat-room-btn.active {
  border-color: rgba(244,137,61,.5);
  background: rgba(244,137,61,.12);
}
.chat-room-btn.active .chat-room-avatar {
  background: linear-gradient(180deg, rgba(244,137,61,.95), rgba(207,104,37,.95));
  border-color: transparent;
  color: #16151A;
}
.pinned-chat-btn {
  border-color: rgba(244,137,61,.22);
  background: rgba(244,137,61,.07);
}
.pinned-chat-btn .direct-avatar {
  background: linear-gradient(180deg, rgba(244,137,61,.95), rgba(207,104,37,.95));
  color: #16151A;
}
.pinned-chat-btn .direct-avatar.chat-room-avatar--admin-club {
  background: linear-gradient(180deg, rgba(63,166,255,.95), rgba(37,120,207,.95));
  color: #fff;
}

/* Закреплённый чат «Администратор» — уведомления о подписке и быстрая оплата */
.chat-app.admin-chat-open .chat-form { display: none; }
.admin-club-chat {
  display: flex;
  justify-content: center;
  padding: 18px 14px 26px;
}
.admin-club-bubble {
  width: 100%;
  max-width: 460px;
  background: rgba(var(--c-tint), .05);
  border: 1px solid rgba(var(--c-tint), .12);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-club-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-club-title .admin-club-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(63,166,255,.95), rgba(37,120,207,.95));
  color: #fff;
}
.admin-club-title .admin-club-avatar .chat-room-icon {
  width: 24px;
  height: 24px;
}
.admin-club-title strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.admin-club-title span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.admin-club-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
}
.admin-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-pay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(244,137,61,.28);
  background: rgba(244,137,61,.08);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.admin-pay-btn span { font-size: 13px; font-weight: 700; }
.admin-pay-btn b {
  font-size: 15px;
  font-weight: 800;
  color: #f4893d;
}
.admin-pay-btn:hover {
  background: rgba(244,137,61,.16);
  border-color: rgba(244,137,61,.45);
}
.admin-pay-btn:active { transform: scale(.98); }
.admin-pay-btn:disabled { opacity: .6; cursor: default; }
.admin-club-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.direct-chat-btn {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.direct-avatar {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(251,251,251,.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
img.direct-avatar,
img.menu-user-avatar,
img.chat-message-avatar {
  object-fit: cover;
}
.direct-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.direct-meta strong,
.direct-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.direct-meta small {
  color: var(--muted);
  font-size: 12px;
}
.chat-box {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(244,137,61,.08), transparent 32%),
    rgba(var(--c-bg-rgb),.92);
  height: 100%;
}
.chat-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--c-panel-rgb),.95);
}
.chat-back-btn {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(251,251,251,.06);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}
.chat-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.chat-head strong {
  font-size: 18px;
}
.chat-head span {
  color: var(--muted);
  font-size: 13px;
}
.chat-head-info.clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 8px;
  margin: -4px -8px;
  transition: background .15s ease;
}
.chat-head-info.clickable:hover {
  background: rgba(var(--c-tint),.05);
}
.menu-user-about {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.menu-edit-profile-btn {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--c-tint),.12);
  background: rgba(var(--c-tint),.04);
  color: var(--text);
  font-size: 13px;
}
.menu-edit-profile-btn:hover {
  border-color: rgba(244,137,61,.4);
  background: rgba(244,137,61,.08);
}
.profile-avatar-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.profile-avatar-preview .profile-avatar-img,
.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-size: 30px;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(251,251,251,.06);
  color: var(--text);
  font-weight: 800;
}
.participant-card {
  padding: 6px 2px;
}
.participant-loading,
.participant-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 10px 0;
}
.participant-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.participant-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 26px;
  object-fit: cover;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(251,251,251,.06);
  color: var(--text);
  font-weight: 800;
}
.participant-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.participant-title strong {
  font-size: 19px;
}
.participant-role {
  color: var(--accent, #f4893d);
  font-size: 13px;
  font-weight: 700;
}
.participant-section-title {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.participant-about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-select-btn {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.chat-select-btn.active {
  border-color: rgba(244,137,61,.55);
  background: rgba(244,137,61,.14);
  color: var(--accent);
}
.chat-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(var(--c-bg-rgb),.96), rgba(var(--c-panel-rgb),.97));
  border-radius: 22px;
}
.chat-loading-overlay.hidden { display: none; }
.chat-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(var(--c-text-rgb, 255, 255, 255), .16);
  border-top-color: var(--accent, #f4893d);
  animation: chat-spin .7s linear infinite;
}
@keyframes chat-spin { to { transform: rotate(360deg); } }
.chat-messages {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(var(--c-bg-rgb),.72), rgba(var(--c-panel-rgb),.74));
}
.chat-messages::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(78%, 100%);
  min-width: 0;
  width: fit-content;
}
.chat-select-check {
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(var(--c-tint),.06);
  color: var(--accent);
  font-size: 15px;
}
.chat-message.select-mode {
  max-width: 92%;
}
.chat-message.select-mode .chat-select-check {
  display: grid;
}
.chat-message.selected .chat-bubble {
  outline: 2px solid rgba(244,137,61,.55);
}
.chat-message:has(.voice-message) {
  max-width: min(78%, 330px);
}
.chat-message:has(.voice-message) .chat-bubble {
  padding: 7px 8px 6px;
}
.chat-message.own {
  align-self: flex-end;
}
.chat-message.own .chat-message-avatar {
  order: 2;
}
.chat-message.own .chat-bubble {
  order: 1;
}
.chat-message.other {
  align-self: flex-start;
}
.chat-message-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  border-radius: 50%;
  background: rgba(251,251,251,.08);
  color: var(--text);
  border: 1px solid rgba(var(--c-tint),.08);
  font-size: 11px;
  font-weight: 800;
}
/* Кликабельный автор в общем чате — по нажатию открывается личный чат с ним. */
.chat-author-link { cursor: pointer; }
.chat-message-meta strong.chat-author-link:hover { text-decoration: underline; }
.chat-message-avatar.chat-author-link:hover { filter: brightness(1.08); }
.chat-bubble {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px 8px;
  border-radius: 18px;
  border: 1px solid rgba(var(--c-tint),.08);
  background: rgba(var(--c-panel2-rgb),.96);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
  transition: transform .16s ease, box-shadow .16s ease;
  user-select: text;
  -webkit-user-select: text;
  touch-action: pan-y;
  overflow: hidden;
}
.chat-message.swipe-reply .chat-bubble {
  box-shadow: -8px 0 0 rgba(74,139,255,.55), 0 10px 24px rgba(0,0,0,.16);
}
.chat-message.swipe-delete .chat-bubble {
  box-shadow: 8px 0 0 rgba(255,92,92,.55), 0 10px 24px rgba(0,0,0,.16);
}
.chat-message.swiping .chat-bubble,
.chat-message.swiping .chat-message-body {
  user-select: none;
  -webkit-user-select: none;
}
.chat-message.swiping {
  transition: none;
}
.chat-message.own .chat-bubble {
  background: linear-gradient(180deg, rgba(244,137,61,.95), rgba(207,104,37,.95));
  color: #16151A;
}
.chat-message.own .chat-message-meta,
.chat-message.own time,
.chat-message.own .chat-file-link {
  color: rgba(22,21,26,.72);
}
.chat-message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.chat-message-meta strong {
  color: var(--text);
}
.chat-message.own .chat-message-meta strong {
  color: #16151A;
}
.chat-message-body {
  white-space: pre-wrap;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-reply-quote {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: min(240px, 100%);
  margin-bottom: 5px;
  padding: 3px 9px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: rgba(var(--c-tint),.06);
  cursor: pointer;
}
.chat-reply-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chat-reply-text {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chat-message.own .chat-reply-quote {
  border-left-color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.16);
}
.chat-message.own .chat-reply-author {
  color: #fff;
}
.chat-message.own .chat-reply-text {
  color: rgba(255,255,255,.82);
}
.chat-message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 3px;
}
.chat-text-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 10px;
  row-gap: 0;
}
.chat-text-line .chat-message-body {
  flex: 1 1 auto;
  min-width: 0;
}
.chat-time-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  flex: 0 0 auto;
  gap: 3px;
  margin-left: auto;
  white-space: nowrap;
}
.chat-inline-time {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-left: auto;
  font-size: 11px;
  line-height: 1.9;
  white-space: nowrap;
  opacity: .75;
  user-select: none;
}
.chat-time-status .chat-inline-time {
  margin-left: 0;
}
.chat-read-indicator {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  user-select: none;
}
.chat-read-indicator.is-sent {
  color: rgba(55,55,60,.62);
}
.chat-read-indicator.is-read {
  width: 18px;
  color: #087fc3;
}
.chat-read-indicator svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chat-read-indicator path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-message-footer .chat-inline-time {
  line-height: 1;
}
.chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.chat-reaction-chip,
.chat-reaction-add {
  width: auto;
  min-width: 30px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--c-tint),.12);
  background: rgba(var(--c-tint),.06);
  color: inherit;
  font-size: 13px;
  line-height: 1;
}
.chat-reaction-chip.active {
  border-color: rgba(42,171,238,.55);
  background: rgba(42,171,238,.18);
}
.chat-reaction-chip b {
  font-size: 11px;
  font-weight: 800;
}
.chat-reaction-add {
  color: var(--muted);
  opacity: .72;
}
.chat-reaction-picker {
  position: fixed;
  z-index: 1001;
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(var(--c-tint),.14);
  border-radius: 18px;
  background: rgba(var(--c-panel-rgb),.98);
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
}
.chat-reaction-picker button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--c-tint),.08);
  background: rgba(var(--c-tint),.05);
  font-size: 20px;
}
.chat-message time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.chat-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  background: rgba(var(--c-panel-rgb),.96);
}
.chat-forward-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  background: rgba(var(--c-panel-rgb),.96);
}
.chat-forward-bar.hidden {
  display: none;
}
.chat-forward-bar span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.chat-forward-bar select,
.chat-forward-bar button {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}
.share-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.news-action-btn .share-icon {
  stroke: currentColor;
}
.chat-input-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  stroke: currentColor;
}
.lishi-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.lishi-photo {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(251,251,251,.04);
}
.lishi-photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.lishi-photo:hover img {
  transform: scale(1.03);
}
/* --- Контакты в профиле (телефон / Telegram) --- */
.profile-contact { margin-bottom: 4px; }
.profile-contact-input { display: block; }
.profile-contact-input small { display: block; margin-top: 4px; font-size: 12px; }
.profile-contact-locked {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(var(--c-tint),.04);
}
.profile-contact-label { color: var(--muted); font-size: 13px; }
.profile-contact-value { font-weight: 500; margin-left: auto; }
.profile-contact-ok { color: #63d18a; font-weight: 700; }
/* --- Красный индикатор незаполненного профиля --- */
.profile-alert-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 3px rgba(255,77,77,.2);
  flex: 0 0 auto;
}
.menu-profile-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,77,77,.4);
  background: rgba(255,77,77,.12);
  color: #ffb3b3;
  font-size: 13px;
  line-height: 1.35;
}
.menu-profile-warning .profile-alert-dot { margin-top: 3px; }
.tg-transfer-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,77,77,.4);
  background: rgba(255,77,77,.1);
  color: #ffc2c2;
  font-size: 12.5px;
  line-height: 1.4;
}
.tg-transfer-note .profile-alert-dot { margin-top: 3px; }
.profile-password-block {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.profile-password-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.menu-edit-profile-btn.has-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-toggle { position: relative; }
.menu-toggle-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4d4d;
  border: 2px solid var(--bg);
}
.chat-forward-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.chat-message-menu button[data-forward-message] {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-message-menu button[data-forward-message] .share-icon {
  width: 16px;
  height: 16px;
}
.chat-reply-bar.hidden {
  display: none;
}
.chat-reply-bar div {
  min-width: 0;
  display: grid;
  gap: 2px;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}
.chat-reply-bar strong {
  color: var(--accent);
  font-size: 12px;
}
.chat-reply-bar span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-reply-bar button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
}
.chat-delete-actions {
  display: none;
  gap: 5px;
  opacity: .72;
}
.chat-delete-actions button {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(var(--c-tint),.16);
  background: rgba(0,0,0,.12);
  color: inherit;
  font-size: 10px;
  line-height: 1.4;
}
.chat-delete-actions button:hover {
  border-color: rgba(var(--c-tint),.32);
}
.chat-message-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(var(--c-tint),.14);
  border-radius: 16px;
  background: rgba(var(--c-panel-rgb),.96);
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
}
.chat-menu-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 2px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(var(--c-tint),.08);
}
.chat-menu-reactions button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--c-tint),.06);
  font-size: 19px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.chat-menu-reactions button:hover {
  transform: scale(1.18);
  background: rgba(244,137,61,.18);
}
.chat-message-menu > button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(var(--c-tint),.06);
  color: var(--text);
  text-align: left;
  font-size: 14px;
}
@keyframes quickReactPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.chat-bubble.quick-react-pop {
  animation: quickReactPop .28s ease;
}
.chat-message-menu > button:hover {
  background: rgba(244,137,61,.14);
}
.chat-message-menu > button.danger {
  color: #ff6b6b;
}
.chat-message-menu > button.danger:hover {
  background: rgba(255,107,107,.14);
}
.chat-ai-welcome {
  align-self: center;
  max-width: 620px;
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(244,137,61,.28);
  border-radius: 18px;
  background: rgba(244,137,61,.08);
  text-align: center;
  color: var(--text);
}
.chat-ai-welcome span {
  color: var(--muted);
  line-height: 1.45;
}
.support-ticket-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(244,137,61,.28);
  border-radius: 18px;
  background: rgba(244,137,61,.08);
}
.support-ticket-panel > span,
.support-ticket-panel em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}
.support-ticket-list {
  display: grid;
  gap: 8px;
}
.support-ticket-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(var(--c-bg-rgb),.72);
}
.support-ticket-card div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
}
.support-ticket-card span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251,251,251,.08);
  color: var(--muted);
  font-size: 12px;
}
.support-ticket-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}
.support-ticket-thread {
  display: grid;
  gap: 7px;
}
.support-ticket-message {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(251,251,251,.05);
}
.support-ticket-message.admin-reply {
  border: 1px solid rgba(244,137,61,.28);
  background: rgba(244,137,61,.08);
}
.support-ticket-message p {
  color: var(--text);
}
.support-ticket-message span {
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.support-ticket-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.support-ticket-reply-form input {
  width: 100%;
}
.support-ticket-card button {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 12px;
}
.marketplace-section {
  margin-top: 22px;
}
.marketplace-app {
  display: grid;
  gap: 16px;
}
.marketplace-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 180px 160px 120px;
  gap: 12px;
  align-items: end;
}
.marketplace-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.marketplace-create-btn {
  justify-self: start;
}
.marketplace-status-tabs {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin: 8px 0 12px;
  padding: 8px;
  border: 1px solid rgba(244,137,61,.18);
  border-radius: 16px;
  background: rgba(var(--c-tint),.035);
  scrollbar-width: none;
}
.marketplace-status-tabs::-webkit-scrollbar {
  display: none;
}
.marketplace-status-tabs span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}
.marketplace-status-tabs button {
  width: auto;
  flex: 0 0 auto;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(var(--c-tint),.04);
  color: var(--muted);
  font-size: 13px;
}
.marketplace-status-tabs button.active {
  border-color: rgba(244,137,61,.55);
  background: rgba(244,137,61,.14);
  color: var(--accent);
}
.marketplace-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(var(--c-bg-rgb),.72);
}
.marketplace-form.hidden {
  display: none;
}
@media (min-width: 861px) {
  .marketplace-create-btn {
    display: none;
  }
  .marketplace-form.hidden {
    display: grid;
  }
}
.marketplace-form h3,
.marketplace-card h3 {
  margin: 0;
}
.marketplace-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.marketplace-form label {
  display: grid;
  gap: 7px;
}
.marketplace-form span {
  color: var(--muted);
  font-size: 13px;
}
.marketplace-wide {
  grid-column: 1 / -1;
}
.marketplace-form textarea {
  min-height: 96px;
  resize: vertical;
}
.marketplace-list {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}
.marketplace-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(var(--c-tint),.025);
}
.marketplace-card.no-photo {
  grid-template-columns: 1fr;
}
.marketplace-card.is-sold {
  opacity: .68;
}
.marketplace-photo {
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
  display: grid;
  place-items: center;
}
.marketplace-photo img {
  width: 100%;
  height: 100%;
  max-height: 190px;
  object-fit: cover;
  display: block;
}
.marketplace-card-body {
  display: grid;
  gap: 10px;
}
.marketplace-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.marketplace-card-head strong {
  color: var(--accent);
  white-space: nowrap;
}
.marketplace-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}
.marketplace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.marketplace-contact {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(244,137,61,.08);
  color: var(--note-ink);
}
.marketplace-safety {
  padding: 10px 12px;
  border: 1px solid rgba(244,137,61,.28);
  border-radius: 12px;
  background: rgba(244,137,61,.08);
  color: var(--note-ink);
  font-size: 13px;
  line-height: 1.45;
}
.marketplace-thread-btn,
.marketplace-status-btn {
  width: fit-content;
}
.marketplace-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}
.stars-read {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
}
.stars-read .star {
  color: rgba(var(--c-tint),.22);
  font-size: 13px;
  line-height: 1;
}
.stars-read .star.on {
  color: #f7b955;
}
.marketplace-assignee .stars-read .star {
  font-size: 12px;
}
.marketplace-review {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(247,185,85,.28);
  border-radius: 12px;
  background: rgba(247,185,85,.08);
}
.marketplace-review.is-done {
  border-color: rgba(120,200,140,.28);
  background: rgba(120,200,140,.08);
}
.marketplace-review-label {
  font-size: 13px;
  color: var(--muted);
}
.marketplace-review-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--note-ink);
}
.star-rating {
  display: inline-flex;
  gap: 2px;
}
.star-rating .star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: rgba(var(--c-tint),.25);
  transition: color .12s ease, transform .12s ease;
}
.star-rating .star-btn:hover,
.star-rating:hover .star-btn {
  color: #f7b955;
}
.star-rating .star-btn:hover ~ .star-btn {
  color: rgba(var(--c-tint),.25);
}
.star-rating .star-btn:active {
  transform: scale(1.15);
}
.marketplace-thread {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
}
.marketplace-thread-messages {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.marketplace-thread-message {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--c-tint),.08);
  border-radius: 14px;
  background: rgba(var(--c-tint),.035);
}
.marketplace-thread-message.own {
  border-color: rgba(244,137,61,.28);
  background: rgba(244,137,61,.08);
}
.marketplace-thread-message strong {
  font-size: 13px;
  color: var(--accent);
}
.marketplace-thread-message p {
  margin: 0;
}
.marketplace-thread-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 8px;
  align-items: end;
}
.marketplace-thread-form textarea {
  min-height: 52px;
  resize: vertical;
}
.marketplace-empty {
  min-height: 260px;
}
.chat-form {
  display: grid;
  position: relative;
  grid-template-columns: 46px 46px minmax(0, 1fr) 46px 46px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(var(--c-panel-rgb),.95);
}
.chat-form textarea {
  min-height: 46px;
  max-height: 168px;
  height: 46px;
  resize: none;
  overflow-y: hidden;
  overflow-x: hidden;
  border-radius: 23px;
  padding: 13px 16px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.file-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(251,251,251,.06);
  color: var(--text);
  text-align: center;
  padding: 0;
}
.file-button input {
  display: none;
}
.emoji-button,
.voice-button,
.chat-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
}
.emoji-button {
  border: 1px solid var(--border);
  background: rgba(251,251,251,.06);
  color: var(--text);
}
.emoji-picker {
  position: absolute;
  left: 60px;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(var(--c-tint),.14);
  border-radius: 18px;
  background: rgba(var(--c-panel-rgb),.98);
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
}
.emoji-picker.hidden {
  display: none;
}
.emoji-picker button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--c-tint),.08);
  background: rgba(var(--c-tint),.05);
  font-size: 20px;
}
.voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(251,251,251,.06);
  color: var(--text);
}
.voice-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-button:not(.recording) {
  color: #2AABEE;
}
.voice-button.recording {
  border-color: rgba(255,92,92,.5);
  background: rgba(255,92,92,.14);
  color: #ff9b9b;
}
.voice-stop-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
}
.voice-record-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255,92,92,.1);
  border-top: 1px solid rgba(255,92,92,.22);
  color: #ffb8b8;
  font-size: 13px;
}
.voice-record-bar > span {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #ffd0d0;
}
.voice-record-bar > div {
  display: flex;
  gap: 8px;
}
.voice-record-bar.hidden {
  display: none;
}
.voice-record-bar button {
  width: auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.voice-record-bar .voice-delete-btn {
  border: 1px solid rgba(255,92,92,.42);
  background: rgba(255,92,92,.14);
  color: #ffd0d0;
}
.voice-record-bar .voice-send-btn {
  border: 1px solid rgba(244,137,61,.55);
  background: rgba(244,137,61,.22);
  color: var(--accent);
}
.chat-file-name {
  padding: 0 16px 10px 66px;
  background: rgba(var(--c-panel-rgb),.95);
  font-size: 12px;
}
.chat-file-name:empty {
  display: none;
}
#chatStatus {
  min-height: 0;
  padding: 0 16px 8px 66px;
  background: rgba(var(--c-panel-rgb),.95);
  line-height: 18px;
  overflow: visible;
  white-space: normal;
}
#chatStatus:empty {
  display: none;
}
.chat-attachment {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
  cursor: zoom-in;
}
/* Встроенный просмотрщик фото (лайтбокс) с кнопкой закрытия */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0,0,0,.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  animation: lightbox-fade .15s ease;
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.image-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.image-lightbox-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.image-lightbox-close:active { background: rgba(255,255,255,.32); }
body.lightbox-open { overflow: hidden; }
.chat-attachment span {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.voice-message {
  display: grid;
  grid-template-columns: 26px 36px minmax(88px, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 228px;
  max-width: calc(100vw - 120px);
  padding: 5px 8px;
  margin: 0 0 3px;
  border-radius: 999px;
  background: rgba(var(--c-bg-rgb),.22);
  overflow: hidden;
}
.voice-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--c-tint),.18);
  color: inherit;
  font-size: 12px;
}
.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  opacity: .72;
}
.voice-wave span {
  width: 2px;
  border-radius: 999px;
  background: currentColor;
}
.voice-wave span:nth-child(1) { height: 8px; }
.voice-wave span:nth-child(2) { height: 15px; }
.voice-wave span:nth-child(3) { height: 20px; }
.voice-wave span:nth-child(4) { height: 12px; }
.voice-wave span:nth-child(5) { height: 17px; }
.voice-wave span:nth-child(6) { height: 9px; }
.voice-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--c-tint),.22);
}
.voice-progress {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}
.voice-duration {
  min-width: 30px;
  color: inherit;
  font-size: 11px;
  opacity: .78;
  text-align: right;
}
.chat-attachment img,
.chat-attachment video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(360px, 52vh);
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--panel-2);
}
.chat-file-link {
  display: inline-block;
  max-width: 100%;
  margin: 4px 0 8px;
  color: var(--accent);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pricing-wrap { margin-top: 22px; }
.pricing-header { margin-bottom: 18px; }
.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr);
  gap: 16px;
}
.pricing-card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(var(--c-panel-rgb),.94);
  box-shadow: var(--shadow);
}
.pricing-card.featured {
  border-color: rgba(244,137,61,.45);
  background: linear-gradient(180deg, rgba(74,139,255,.15), rgba(var(--c-tint),.02));
}
.plan-name { color: var(--accent-2); text-transform: uppercase; font-size: 12px; letter-spacing: .14em; margin-bottom: 10px; }
.plan-price { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.pricing-card ul { margin: 0; padding-left: 18px; color: var(--text); line-height: 1.7; }
.payment-btn {
  margin-top: 16px;
}
.payment-status {
  margin-top: 14px;
}
@media (max-width: 1280px) {
  body.auth-gate .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "access"
      "catalog"
      "pricing";
  }
  body.auth-gate .access-panel {
    position: static;
  }
  .catalog-workspace { grid-template-columns: 1fr; }
  .catalog-section-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail {
    position: static;
    min-height: 420px;
  }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-grid,
  .marketplace-layout { grid-template-columns: 1fr; }
  .marketplace-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid,
  .value-grid { grid-template-columns: 1fr; }
}
.bottom-nav {
  display: none;
}
/* Пока открыто редактирование профиля — прячем нижнюю навигацию, чтобы она не
   перекрывала кнопку «Сохранить». Специфичность выше базового .bottom-nav в медиазапросе. */
body.profile-modal-open .bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    touch-action: manipulation;
  }
  html.mobile-chat-locked,
  body.mobile-chat-locked {
    height: var(--chat-full-height, 100dvh);
    min-height: var(--chat-full-height, 100dvh);
    width: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }
  body.mobile-chat-locked {
    /* iOS 26 PWA обрезает любой полноэкранный fixed-контейнер по ложной
       уменьшенной высоте viewport. Корень чата обязан оставаться normal-flow. */
    position: static !important;
    inset: auto !important;
  }
  body.chat-dialog-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  body.chat-dialog-open .topbar {
    display: none;
  }
  /* Открытый диалог остаётся absolute, а не fixed: iOS 26 в standalone PWA
     обрезает полноэкранные fixed-слои по ошибочно уменьшенному viewport.
     100vh в standalone — стабильная полная высота; при открытой клавиатуре
     JS временно подставляет точную видимую высоту в пикселях. */
  body.chat-dialog-open .chat-section {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    max-width: 100vw;
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    height: var(--chat-viewport-height, var(--chat-full-height, 100dvh)) !important;
    min-height: 0;
    max-height: none !important;
    z-index: 200;
    padding-top: env(safe-area-inset-top);
    padding-bottom: 0;
    overflow: hidden;
    display: block;
  }
  body.chat-dialog-open .chat-panel,
  body.chat-dialog-open .chat-app {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: block;
    overflow: hidden;
  }
  body.chat-dialog-open .chat-box {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding-bottom: 0 !important;
    /* flex: поле ввода всегда у нижнего края, без пустых рядов grid. */
    display: flex !important;
    flex-direction: column;
  }
  body.chat-dialog-open .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.chat-dialog-open .chat-form,
  body.chat-dialog-open .chat-reply-bar,
  body.chat-dialog-open .chat-forward-bar,
  body.chat-dialog-open .voice-record-bar,
  body.chat-dialog-open .chat-file-name,
  body.chat-dialog-open #chatStatus,
  body.chat-dialog-open .chat-head {
    flex: 0 0 auto;
  }
  body.chat-dialog-open .chat-rooms {
    touch-action: pan-y;
    overscroll-behavior: contain;
  }
  .app-shell {
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }
  .catalog-sections-panel {
    padding: 14px;
  }
  .catalog-sections-panel .section-header {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
  }
  .catalog-sections-panel .section-header h2 {
    font-size: 24px;
  }
  .catalog-section-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .catalog-section-btn {
    min-height: 52px;
    padding: 11px 10px 11px 38px;
    border-radius: 15px;
    font-size: 13px;
  }
  .catalog-section-btn::before {
    left: 11px;
    width: 18px;
    height: 18px;
    border-radius: 7px;
  }
  .catalog-section-btn::after {
    left: 17px;
  }
  .chat-delete-actions {
    display: flex;
  }
  .voice-message {
    grid-template-columns: 24px 32px minmax(74px, 1fr) auto;
    gap: 6px;
    width: 210px;
    max-width: calc(100vw - 112px);
    padding: 5px 7px;
    background: rgba(var(--c-bg-rgb),.18);
  }
  .voice-play {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  body.app-authenticated .hero,
  body.app-authenticated .access-panel,
  body.app-authenticated .pricing-wrap {
    display: none;
  }
  
  .desktop-only {
    display: none !important;
  }
  
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 18px;
    right: 18px;
    background: rgba(var(--c-panel-rgb),.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--c-tint),.12);
    border-radius: 22px;
    justify-content: space-around;
    align-items: center;
    padding: 7px 8px;
    z-index: 100;
    box-shadow: 0 14px 34px rgba(0,0,0,.26);
  }
  
  .bottom-nav-item {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-decoration: none;
    font-size: 9.5px;
    gap: 3px;
    padding: 6px 9px;
    border-radius: 14px;
    transition: color 0.2s, background 0.2s, transform 0.2s;
  }
  
  .bottom-nav-item svg {
    width: 22px;
    height: 22px;
  }
  
  .bottom-nav-item.active {
    color: var(--accent);
    background: rgba(244,137,61,.08);
  }
  .bottom-nav-unread-badge {
    position: absolute;
    top: 2px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #34d399, #16a34a);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 0 0 2px rgba(var(--c-panel-rgb),.88);
  }
  
  .chat-section,
  .marketplace-section {
    margin-top: 0;
  }
  .marketplace-panel {
    padding: 12px;
    border-radius: 18px;
    overflow: hidden;
  }
  .chat-section {
    /* Выходим из padding app-shell, но не шире экрана — иначе появляется горизонтальный скролл. */
    width: auto;
    max-width: 100%;
    margin-left: -12px;
    margin-right: -12px;
    margin-top: -12px;
    overflow: hidden;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 0;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    background: var(--bg);
  }
  .chat-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }
  
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    padding-right: 10px;
  }
  /* Верхняя плашка нужна только на «Главной» — на остальных вкладках она мешает обзору. */
  body.topbar-hidden .topbar {
    display: none;
  }
  .topbar .brand-lockup {
    max-width: none;
    min-width: 0;
  }
  .topbar .brand-lockup > div {
    min-width: 0;
  }
  .topbar .brand-title,
  .topbar .brand-subtitle {
    white-space: nowrap;
  }
  .topbar .brand-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-toggle {
    display: flex;
    position: static;
    width: 42px;
    height: 42px;
    padding: 0;
    margin-left: 0;
    justify-self: end;
    transform: none;
  }
  .menu-toggle:hover {
    background: rgba(var(--c-tint),.05);
  }
  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(var(--c-panel-rgb),.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 240px;
  }
  .menu-user-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(244,137,61,.24);
    border-radius: 14px;
    background: rgba(244,137,61,.08);
  }
  .menu-user-profile {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }
  .menu-user-avatar {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(244,137,61,.95), rgba(207,104,37,.95));
    color: #16151A;
    border: 1px solid rgba(var(--c-tint),.1);
    font-size: 13px;
    font-weight: 900;
  }
  .menu-user-card strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
  }
  .menu-user-card span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
  }
  .menu-user-profile div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }
  .avatar-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(244,137,61,.32);
    background: rgba(244,137,61,.12);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }
  .avatar-upload-btn input {
    display: none;
  }
  .avatar-upload-status {
    min-height: 14px;
    color: var(--muted);
    font-size: 11px;
  }
  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .topnav {
    display: none;
  }
  .install-hint-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 14px;
    white-space: nowrap;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
  }
  .topnav a {
    font-size: 14px;
    padding: 4px 0;
  }
  .lang-switch {
    align-self: stretch;
    justify-content: center;
  }
  .topbar-account-actions {
    align-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .topbar-action {
    min-height: 38px;
    padding: 0 12px;
  }
  /* Все быстрые действия (RU/EN, тема, Выйти) — в одну строку. */
  .menu-quick-actions {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .menu-quick-actions .lang-switch {
    align-self: auto;
    flex: 0 0 auto;
  }
  .menu-quick-actions .lang-switch button {
    padding: 0 11px;
  }
  .menu-quick-actions .theme-toggle {
    flex: 0 0 38px;
  }
  .menu-quick-actions .topbar-account-actions {
    align-self: auto;
    display: inline-flex;
    grid-template-columns: none;
    flex: 1 1 auto;
    gap: 6px;
  }
  .menu-quick-actions .topbar-action {
    flex: 1 1 auto;
    padding: 0 10px;
  }
  .hero { grid-template-columns: 1fr; }
  .hero-regalia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-showcase { min-height: 420px; }
  .showcase-card-main { width: min(84%, 340px); }
  .showcase-card-one,
  .showcase-card-two { width: 170px; }
  .keycard-compact-hero,
  .keycard-info-grid,
  .keycard-section-grid { grid-template-columns: 1fr; }
  .catalog-workspace { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .results,
  .detail { min-height: auto; }
  h1 { font-size: 34px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .topnav { width: 100%; }
  .lang-switch { align-self: stretch; justify-content: center; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pro-plan-options { grid-template-columns: 1fr; }
  .keycard-edit-form { grid-template-columns: 1fr; }
  .chat-app,
  .marketplace-toolbar,
  .marketplace-form-grid,
  .marketplace-card,
  .marketplace-thread-form { grid-template-columns: 1fr; }
  .news-card {
    padding: 0;
    border-radius: 18px;
  }
  .news-card h3 {
    font-size: 20px;
  }
  .chat-app {
    display: block;
    /* Фиксированная высота экрана: скролл только внутри .chat-rooms, а не у body.
       Иначе на iOS жест по кнопкам чатов не крутит страницу — крутится только
       узкая полоска у правого края (жалоба в поддержку #68). */
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 0;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    background: var(--bg);
    max-width: 100vw;
    overflow: hidden;
  }
  .chat-resizer {
    display: none;
  }
  .chat-rooms {
    /* Сам список — единственный скролл-контейнер на вкладке «Чат».
       height/max-height ограничены экраном, иначе элемент растёт вместе с контентом,
       overflow не срабатывает, и iOS не скроллит по кнопкам комнат. */
    height: 100%;
    min-height: 0;
    max-height: 100%;
    /* Автоматические grid-строки по умолчанию ужимались до высоты контейнера:
       строка фильтров становилась 18px при кнопках 30px и налезала на первый чат. */
    grid-auto-rows: max-content;
    border: 0;
    border-radius: 0;
    /* Нижний padding — чтобы последний чат доскролливался над bottom-nav. */
    padding: 0 0 calc(104px + env(safe-area-inset-bottom));
    background: var(--bg);
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
  }
  .chat-room-btn,
  .direct-chat-btn {
    /* Разрешаем вертикальный pan по самим кнопкам — без этого iOS «съедает» жест. */
    touch-action: pan-y;
  }
  .chat-box {
    display: none;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 0;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  body.chat-dialog-open .app-shell {
    padding-bottom: 0;
  }
  body.chat-dialog-open .bottom-nav {
    display: none;
  }
  .chat-app.chat-dialog-open .chat-rooms {
    display: none;
  }
  .chat-app.chat-dialog-open .chat-box {
    display: flex;
    flex-direction: column;
  }
  .chat-app.chat-dialog-open {
    overflow: hidden;
  }
  .chat-list-head {
    padding: 0 14px 0 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(var(--c-tint),.08);
    background: var(--bg);
    min-height: 40px;
  }
  .chat-list-head .chat-list-tabs {
    overflow-x: auto;
    gap: 24px;
    padding: 0 0 0 14px;
    min-height: 40px;
    scrollbar-width: none;
  }
  .chat-refresh-btn {
    margin-right: 2px;
  }
  .chat-list-tabs {
    overflow-x: auto;
    gap: 24px;
    padding: 0 14px;
    margin-bottom: 0;
    min-height: 40px;
    border-bottom: 1px solid rgba(var(--c-tint),.08);
    background: var(--bg);
    scrollbar-width: none;
  }
  .chat-list-tabs::-webkit-scrollbar {
    display: none;
  }
  .chat-list-tabs button {
    flex: 0 0 auto;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .01em;
    gap: 6px;
  }
  .chat-tab-badge {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    padding: 0 5px;
  }
  .chat-list-tabs button.active::after {
    bottom: -1px;
    height: 2px;
  }
  .chat-room-filters {
    box-sizing: border-box;
    min-height: 46px;
    padding: 8px 14px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(var(--c-tint),.06);
    background: var(--bg);
  }
  .chat-room-filters button {
    min-height: 30px;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 999px;
  }
  .chat-search {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(var(--c-tint),.06);
  }
  .chat-search input {
    min-height: 36px;
    border-radius: 12px;
    font-size: 14px;
    padding: 8px 12px;
  }
  .chat-notify-btn {
    width: calc(100% - 28px);
    min-height: 34px;
    margin: 8px 14px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 12px;
  }
  .chat-room-btn {
    width: 100%;
    min-height: 62px;
    border-radius: 0;
    border-bottom: 1px solid rgba(var(--c-tint),.07);
    padding: 9px 14px;
    background: transparent;
  }
  .chat-room-btn.active {
    background: rgba(var(--c-tint),.045);
  }
  .chat-room-btn strong {
    font-size: 15px;
  }
  .chat-room-btn span {
    font-size: 12px;
  }
  .chat-room-avatar {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }
  .direct-chat-btn {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
  }
  .direct-avatar {
    width: 48px;
    height: 48px;
  }
  .chat-unread-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    font-size: 12px !important;
  }
  .direct-meta strong {
    font-size: 15px;
  }
  .direct-meta small {
    font-size: 13px;
  }
  .chat-back-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }
  .chat-head {
    padding: 10px 12px;
  }
  .chat-head div {
    min-width: 0;
  }
  .chat-head strong,
  .chat-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-select-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
  .chat-forward-bar {
    grid-template-columns: 1fr auto;
  }
  .chat-forward-bar span,
  .chat-forward-bar select {
    grid-column: 1 / -1;
  }
  .chat-messages {
    min-height: 0;
    padding: 10px 12px 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .chat-message {
    max-width: min(90%, 100%);
  }
  .chat-message.own .chat-message-meta {
    display: none;
  }
  .chat-message-meta span {
    display: none;
  }
  .chat-form {
    grid-template-columns: 40px 40px minmax(0, 1fr) 40px 40px;
    gap: 6px;
    padding: 6px 8px;
    min-width: 0;
    max-width: 100%;
    /* overflow:hidden обрезал бы всплывающий пикер emoji (он позиционируется НАД формой).
       Горизонтальный вылет не даёт сетка с minmax(0,1fr), поэтому overflow не нужен. */
    overflow: visible;
  }
  /* Как в Telegram: фон формы доходит до самого низа, а содержимое приподнято над
     home indicator за счёт нижнего safe-area внутри самой формы (а не в секции). */
  body.chat-dialog-open .chat-form {
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }
  /* Клавиатура открыта — home indicator скрыт, любой нижний safe-area = видимый зазор. */
  body.chat-keyboard-open.chat-dialog-open .chat-form {
    padding-bottom: 2px !important;
  }
  body.chat-keyboard-open.chat-dialog-open .chat-section,
  body.chat-keyboard-open.chat-dialog-open .chat-box,
  body.chat-keyboard-open.chat-dialog-open .chat-panel,
  body.chat-keyboard-open.chat-dialog-open .chat-app {
    padding-bottom: 0 !important;
  }
  body.chat-keyboard-open.chat-dialog-open .chat-file-name,
  body.chat-keyboard-open.chat-dialog-open #chatStatus {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
  }
  .file-button,
  .emoji-button,
  .voice-button,
  .chat-send-btn {
    width: 40px;
    height: 40px;
  }
  .emoji-picker {
    left: 54px;
    grid-template-columns: repeat(6, 34px);
  }
  .chat-form textarea {
    min-height: 40px;
    height: 40px;
    padding: 10px 14px;
  }
  .chat-file-name,
  #chatStatus {
    padding-left: 12px;
    padding-right: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .marketplace-toolbar {
    gap: 8px;
  }
  .marketplace-toolbar input,
  .marketplace-toolbar select,
  .marketplace-toolbar button {
    width: 100%;
  }
  .marketplace-layout {
    display: block;
  }
  .marketplace-form {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
  }
  .marketplace-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .marketplace-card {
    padding: 12px;
    border-radius: 16px;
  }
  .marketplace-photo {
    min-height: 150px;
  }
  .marketplace-card-head {
    display: grid;
    gap: 6px;
  }
  .marketplace-card-head strong {
    white-space: normal;
  }
  .marketplace-thread-btn,
  .marketplace-status-btn {
    width: 100%;
  }
  .marketplace-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    order: 2;
  }
  .marketplace-actions .marketplace-status-btn {
    min-height: 44px;
    justify-content: center;
  }
  .marketplace-thread {
    padding: 10px;
  }
  .marketplace-thread-form {
    gap: 8px;
  }
  .marketplace-thread-form button {
    width: 100%;
  }
  .hero-actions { flex-direction: column; }
  .cta { width: 100%; }
  .result-card-layout { grid-template-columns: 1fr; }
  .result-thumb-wrap { min-height: 180px; }
  .result-top { flex-direction: column; align-items: flex-start; }
  .knowledge-head { flex-direction: column; align-items: stretch; }
  .knowledge-head input { max-width: none; }
  .knowledge-list { grid-template-columns: 1fr; }
}

/* ── Подбор оборудования (мастер) ─────────────────────────────────────── */
.equipment-wizard { display: flex; flex-direction: column; gap: 22px; }
.equipment-wizard.hidden { display: none; }
.eq-step { display: flex; flex-direction: column; gap: 12px; }
.eq-step-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--text); }
.eq-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #16151A; font-size: 13px; font-weight: 700;
}
.eq-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.eq-pill {
  border: 1px solid var(--border); background: rgba(251,251,251,.03);
  color: var(--text); border-radius: 999px; padding: 8px 14px;
  font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; line-height: 1.2;
}
.eq-pill:hover { border-color: var(--accent); }
.eq-pill.active { background: var(--accent); border-color: var(--accent); color: #16151A; font-weight: 600; }
.eq-pill-sm { padding: 6px 11px; font-size: 12.5px; }
.eq-substep { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.eq-substep-hint { font-size: 13px; }
.eq-budget-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eq-budget-select {
  min-width: 220px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 14px;
}
.eq-budget-custom-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.eq-budget-custom {
  min-width: 220px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--panel-2); color: var(--text); font-size: 14px;
}
.eq-budget-custom:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(244,137,61,.25); }
.eq-results { margin-top: 6px; }
.eq-hint, .eq-empty { color: var(--muted); font-size: 14px; padding: 18px 0; }
.eq-social {
  border: 1px solid var(--accent); border-radius: 14px; padding: 18px 20px;
  background: rgba(244,137,61,.10); margin-bottom: 18px;
}
.eq-social h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.eq-social p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.eq-social .primary {
  display: inline-block; text-decoration: none;
  background: var(--accent); color: #16151A; font-weight: 700;
  border: none; border-radius: 10px; padding: 10px 18px;
}
.eq-social .primary:hover { filter: brightness(1.06); }
.eq-recommend {
  border: 1px solid var(--accent); border-radius: 14px; padding: 18px 20px;
  background: rgba(244,137,61,.06); display: flex; flex-direction: column; gap: 10px;
}
.eq-recommend-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eq-recommend-tag {
  background: var(--accent); color: #16151A; font-weight: 700; font-size: 12px;
  border-radius: 999px; padding: 3px 10px; text-transform: uppercase; letter-spacing: .04em;
}
.eq-cover { color: var(--muted); font-size: 13px; }
.eq-recommend-title { font-size: 18px; font-weight: 600; color: var(--text); }
.eq-recommend-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eq-price { color: var(--accent); font-weight: 700; font-size: 16px; }
.eq-recommend-covers { color: var(--muted); font-size: 13px; line-height: 1.5; }
.eq-note { color: var(--muted); font-size: 12.5px; font-style: italic; }
.eq-buy {
  display: inline-block; text-decoration: none; align-self: flex-start; margin-top: 4px;
  background: var(--accent); color: #16151A; font-weight: 700;
  border: none; border-radius: 10px; padding: 11px 20px;
}
.eq-buy:hover { filter: brightness(1.06); }
.eq-others-title { margin: 22px 0 12px; font-size: 15px; color: var(--text); }
.eq-cards { display: flex; flex-direction: column; gap: 10px; }
.eq-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--panel-2);
}
.eq-card-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eq-card-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.eq-card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.eq-card-covers { color: var(--muted); font-size: 12px; line-height: 1.4; }
.eq-card-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.eq-card-side .ghost {
  text-decoration: none; color: var(--accent); font-weight: 600;
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; background: transparent;
}
.eq-card-side .ghost:hover { border-color: var(--accent); }
.eq-addons-note { color: var(--muted); font-size: 12.5px; margin: 2px 0 12px; }
@media (max-width: 720px) {
  .eq-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .eq-card-side { width: 100%; justify-content: space-between; }
  .eq-budget-select { min-width: 0; flex: 1; }
}

/* Telegram login */
.tg-login-block { margin-top: 14px; }
.tg-login-block.hidden { display: none; }
.tg-login-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted, #8a8a92); font-size: 12px; margin-bottom: 10px;
}
.tg-login-divider::before, .tg-login-divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(var(--c-tint),0.12);
}
.tg-login-container { display: flex; justify-content: center; }
.tg-link-row {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(var(--c-tint),0.1);
  display: flex; flex-direction: column; gap: 8px;
}
.tg-link-hint { font-size: 12px; color: var(--muted, #8a8a92); }

/* Заявка на экспертность (биржа) */
.expert-request-block {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; margin-bottom: 16px;
  border: 1px solid rgba(244,137,61,.28);
  border-radius: 16px;
  background: rgba(244,137,61,.08);
}
.expert-request-block.hidden { display: none; }
.expert-request-text { display: flex; flex-direction: column; gap: 4px; }
.expert-request-text strong { font-size: 15px; }
.expert-request-text span { font-size: 13px; color: var(--muted, #8a8a92); }
.expert-request-block .primary { width: 100%; }
.expert-request-block .primary:disabled { opacity: .6; cursor: default; }
.expert-request-gate {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(244,137,61,.12);
  border: 1px solid rgba(244,137,61,.24);
}
.expert-request-gate.hidden { display: none; }
.expert-request-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.expert-request-form.hidden { display: none; }
.expert-request-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted, #8a8a92); }
.expert-request-form label.er-inline { flex-direction: row; align-items: center; gap: 8px; color: var(--text, #1c1c1e); }
.expert-request-form input,
.expert-request-form select,
.expert-request-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(120,120,128,.24);
  border-radius: 12px;
  font: inherit;
  background: var(--card-bg, #fff);
  color: var(--text, #1c1c1e);
}
.expert-request-form textarea { resize: vertical; }
.er-check-group {
  border: 1px solid rgba(120,120,128,.2);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
}
.er-check-group legend { font-size: 13px; color: var(--muted, #8a8a92); padding: 0 4px; }
.er-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.er-check {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text, #1c1c1e);
  white-space: nowrap;
}
.er-check input { width: auto; }
.expert-request-form-actions { display: flex; gap: 10px; }
.expert-request-form-actions .primary,
.expert-request-form-actions .secondary { flex: 1; }
.expert-new-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(52,199,89,.16);
  color: #248a3d;
  white-space: nowrap;
}

/* Pull-to-refresh */
.pull-refresh {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  transform: translateY(-64px);
  margin-left: -22px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,19,24,.95);
  border: 1px solid rgba(244,137,61,.45);
  border-radius: 50%;
  z-index: 6000;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.pull-refresh.visible { opacity: 1; }
.pull-refresh-spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(244,137,61,.22);
  border-top-color: var(--accent, #f4893d);
  border-radius: 50%;
}
.pull-refresh.ready { border-color: rgba(101,214,139,.6); }
.pull-refresh.ready .pull-refresh-spinner { border-top-color: #65d68b; }
.pull-refresh.refreshing .pull-refresh-spinner { animation: pull-refresh-spin .7s linear infinite; }
@keyframes pull-refresh-spin { to { transform: rotate(360deg); } }

/* Объявления (broadcasts) */
.broadcasts-section { margin: 0 0 16px; display: grid; gap: 10px; }
.broadcasts-section.hidden { display: none; }
.broadcasts-head { display: flex; align-items: center; }
.broadcasts-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent, #f4893d);
  background: rgba(244,137,61,.12);
  border: 1px solid rgba(244,137,61,.35);
  padding: 5px 11px; border-radius: 999px;
}
.broadcasts-list { display: grid; gap: 10px; }
.broadcast-card {
  border: 1px solid rgba(244,137,61,.35);
  background: linear-gradient(135deg, rgba(244,137,61,.10), rgba(244,137,61,.03));
  border-radius: 16px;
  padding: 14px 16px;
}
.broadcast-card h3 { margin: 0 0 6px; font-size: 16px; }
.broadcast-card p { margin: 0; color: var(--muted, #b6b6c0); white-space: pre-wrap; overflow-wrap: anywhere; }
