/* Rainbow Family — только тёмная тема, светлой версии нет (ТЗ 7). */

:root {
  --bg:        #0b0c0d;
  --surface:   #121314;
  --inset:     #191a1c;
  --placeholder:#191a1b;
  --raised:    #1b1d1f;
  --divider:   rgba(255,255,255,.055);
  --line:      rgba(255,255,255,.07);
  --control:   rgba(255,255,255,.08);
  --t-main:    #f0f1f2;
  --t-post:    #d9dbde;
  --t-2:       #9a9ea4;
  --t-3:       #8b8f95;
  --t-4:       #7b7f85;
  --t-5:       #6b6f75;
  --t-6:       #5d6167;
  --t-7:       #4f5359;
  --accent:    #2ecc71;
  --on-accent: #062c16;
  --danger:    #ff9a9a;
  --danger-2:  #ffb3b3;
  --danger-3:  #ff8f8f;
  --overlay:   rgba(6,7,8,.8);

  --foot-h:    54px;   /* высота закреплённого подвала */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--t-main);
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Полосу прокрутки окна рисует корневой элемент, а не body — правило нужно на html.
   В панели её возвращает mod.css, который грузится следом. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }

/* Подвал закреплён у нижней кромки экрана и виден всегда. */
body:not(.is-panel) { padding-bottom: var(--foot-h); }
.main { min-height: 1px; }

a { color: inherit; }

button { font-family: inherit; }

/* Числа в счётчиках не должны дёргать соседей при инкременте. */
.tnum { font-variant-numeric: tabular-nums; }

[data-scroll] { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
[data-scroll]::-webkit-scrollbar { width: 10px; }
[data-scroll]::-webkit-scrollbar-track { background: transparent; }
[data-scroll]::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 99px;
}
[data-scroll]::-webkit-scrollbar-thumb:hover { background: rgba(46,204,113,.5); background-clip: content-box; }

@keyframes rfpop { 0% { transform: scale(1); } 40% { transform: scale(1.24); } 100% { transform: scale(1); } }
@keyframes rfsk  { to { background-position: 200px 0; } }
@keyframes rfin  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rfout { to { opacity: 0; transform: translateX(28px); height: 0; margin-bottom: -14px; } }

/* ─── шапка ─────────────────────────────────────────────────────────── */

.hdr {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11,12,13,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: padding .22s ease;
}

.hdr__in {
  max-width: 1280px; margin: 0 auto;
  padding: 34px 40px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  transition: padding .22s ease;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__emoji { font-size: 30px; line-height: 1; transition: font-size .22s ease; }

.brand__name {
  margin: 0;
  font: 600 40px/1.1 Unbounded, sans-serif;
  letter-spacing: -.03em;
  white-space: nowrap;
  transition: font-size .22s ease;
}
.brand__name b { color: var(--accent); font-weight: 600; }
.brand__name span { color: var(--t-main); }

/* Липкая полоса: лента — главное, шапка уступает ей место (ТЗ 3.1). */
.hdr.is-shrunk .hdr__in { padding: 11px 40px; }
.hdr.is-shrunk .brand__emoji { font-size: 18px; }
.hdr.is-shrunk .brand__name  { font-size: 19px; }

/* ─── главная кнопка ────────────────────────────────────────────────── */

/* Главная кнопка. Цвет один — акцентный; объём даёт мягкий градиент,
   верхний блик и подсветка снизу, а не вторая краска. */
.cta {
  position: relative;
  flex: none;
  width: 252px; height: 48px;
  border: none; border-radius: 12px; cursor: pointer;
  color: var(--on-accent);
  font: 600 15px/1 Inter, sans-serif;
  letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #45e089 0%, var(--accent) 52%, #24b562 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(0,0,0,.14),
    0 1px 2px rgba(0,0,0,.35),
    0 8px 22px -8px rgba(46,204,113,.55);
  transition: transform .16s ease, box-shadow .22s ease, filter .16s ease;
}

/* Блик, пробегающий по кнопке при наведении. */
.cta::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,.3) 50%, transparent 66%);
  transform: translateX(-120%);
  transition: transform .55s ease;
  pointer-events: none;
}
.cta:hover:not(:disabled)::after { transform: translateX(120%); }

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -1px 0 rgba(0,0,0,.14),
    0 2px 4px rgba(0,0,0,.35),
    0 14px 30px -10px rgba(46,204,113,.7);
}
.cta:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.22),
    0 2px 8px -4px rgba(46,204,113,.5);
}
.cta:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 0 0 3px rgba(46,204,113,.32),
    0 8px 22px -8px rgba(46,204,113,.55);
}

.cta span { position: relative; z-index: 1; transition: opacity .36s ease; white-space: nowrap; }
.cta.is-fading span { opacity: 0; }
.cta:disabled {
  width: auto; height: 48px; padding: 0 22px;
  border: 1px solid var(--control);
  background: transparent; color: var(--t-5);
  font: 500 14px/1 Inter, sans-serif;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.cta:disabled::after { display: none; }
.hdr.is-shrunk .cta { height: 38px; font-size: 14px; }
.hdr.is-shrunk .cta:disabled { height: 38px; width: auto; font-size: 12.5px; }

.cta-sticky {
  position: fixed; right: 26px; bottom: calc(var(--foot-h) + 22px); z-index: 27;
  height: 46px; padding: 0 24px;
  border: none; border-radius: 12px; cursor: pointer;
  color: var(--on-accent);
  font: 600 14.5px/1 Inter, sans-serif;
  letter-spacing: -.01em;
  background: linear-gradient(180deg, #45e089 0%, var(--accent) 52%, #24b562 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 12px 30px rgba(0,0,0,.55),
    0 10px 26px -10px rgba(46,204,113,.6);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .22s ease;
}
.cta-sticky.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cta-sticky.is-on:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 16px 36px rgba(0,0,0,.6),
    0 16px 34px -12px rgba(46,204,113,.75);
}
.cta-sticky.is-on:active { transform: translateY(1px); }
.cta-sticky span { transition: opacity .36s ease; }
.cta-sticky.is-fading span { opacity: 0; }

/* ─── лента ─────────────────────────────────────────────────────────── */

.feed {
  max-width: 700px; margin: 0 auto;
  padding: 32px 0 110px;
  display: flex; flex-direction: column; gap: 14px;
}

.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  animation: rfin .3s ease both;
}

.post__head { display: flex; align-items: center; gap: 10px; }

.post__author {
  font: 500 14px/1.3 Unbounded, sans-serif;
  letter-spacing: -.02em; color: var(--t-main);
}

.pill {
  height: 22px; flex: none;
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.09);
  font: 500 11.5px/1 Inter, sans-serif; color: var(--t-3);
  white-space: nowrap;
}
.pill__emoji { font-size: 11px; }

.post__date {
  margin-left: auto; flex: none;
  font: 500 12.5px/1 Inter, sans-serif; color: var(--t-6);
}

.post__text {
  margin: 14px 0 0;
  font: 400 16.5px/1.68 Inter, sans-serif;
  color: var(--t-post);
  text-wrap: pretty;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post__text a { color: var(--accent); text-decoration: none; }
.post__text a:hover { text-decoration: underline; }

/* Длинный текст сворачивается после ~8 строк (ТЗ 3.2). */
.clamp { position: relative; max-height: 142px; overflow: hidden; }
.clamp::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 64px;
  background-image: linear-gradient(180deg, rgba(18,19,20,0), var(--surface) 80%);
}
.more {
  margin-top: 8px; padding: 0;
  border: none; background: none; cursor: pointer;
  font: 600 13.5px/1 Inter, sans-serif; color: var(--accent);
}

.shots { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.shots.is-one { grid-template-columns: 1fr; }
.shot {
  position: relative;
  aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 11px, transparent 11px 22px);
  cursor: pointer; border: none; padding: 0; display: block; width: 100%;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot__more {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,9,10,.62);
  font: 600 22px/1 Inter, sans-serif; color: #e8eaec;
}

/* ─── голосовое ─────────────────────────────────────────────────────── */

.voice {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 10px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
}
.voice.is-rec { background: rgba(255,110,110,.05); border-color: rgba(255,120,120,.24); }

.voice__btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  background: rgba(46,204,113,.14);
}
.voice.is-rec .voice__btn { background: rgba(255,105,105,.16); }

.voice__glyph {
  display: block; width: 0; height: 0; margin-left: 3px;
  border-style: solid; border-width: 5.5px 0 5.5px 9px;
  border-color: transparent transparent transparent var(--accent);
}
.voice__glyph.is-pause {
  width: 10px; height: 10px; margin-left: 0; border: none;
  background: var(--accent);
  -webkit-mask: linear-gradient(#000 0 0) 0/3px 10px no-repeat, linear-gradient(#000 0 0) 7px/3px 10px no-repeat;
          mask: linear-gradient(#000 0 0) 0/3px 10px no-repeat, linear-gradient(#000 0 0) 7px/3px 10px no-repeat;
}
.voice.is-rec .voice__glyph {
  width: 10px; height: 10px; margin-left: 0;
  border: none; border-radius: 1px; background: var(--danger-3);
}

.voice__wave {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 3px; height: 26px;
  cursor: pointer;
}
.voice__wave span { flex: 1; min-width: 2px; border-radius: 1px; background: rgba(255,255,255,.15); }
.voice__wave span.on { background: var(--accent); }
.voice.is-rec .voice__wave span.on { background: rgba(255,120,120,.8); }

.voice__time {
  flex: none; font: 500 12px/1 Inter, sans-serif; color: #71757b;
  font-variant-numeric: tabular-nums;
}
.voice.is-rec .voice__time { color: var(--danger); }

/* ─── реакции ───────────────────────────────────────────────────────── */

.rx { margin-top: 18px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rx__addwrap { position: relative; display: flex; }

.rx__pill {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px 0 9px;
  border-radius: 8px; cursor: pointer;
  font: 600 12.5px/1 Inter, sans-serif;
  border: 1px solid var(--control);
  background: transparent; color: #95989e;
  transition: background .16s, border-color .16s, color .16s;
  font-variant-numeric: tabular-nums;
}
.rx__pill[aria-pressed="true"] {
  background: rgba(46,204,113,.1);
  border-color: rgba(46,204,113,.42);
  color: var(--accent);
}
.rx__pill em { font-size: 13px; line-height: 1; font-style: normal; }
.rx__pill.is-pop em { animation: rfpop .3s ease; }

.rx__add {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer;
  font: 400 16px/1 Inter, sans-serif;
  border: 1px solid var(--control); background: transparent; color: #6f7379;
}

.rx__picker {
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; gap: 2px; padding: 5px;
  border-radius: 10px; background: var(--raised);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
}
.rx__picker button {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; cursor: pointer; font-size: 16px;
  border: none; background: transparent;
}
.rx__picker button.is-mine { background: rgba(46,204,113,.14); }

/* ─── скелетон и пустые состояния ───────────────────────────────────── */

.skel {
  background: var(--surface); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 11px; opacity: .55;
}
.skel i { display: block; height: 11px; border-radius: 3px; background: var(--placeholder); }
.skel i:first-child {
  width: 170px; height: 12px; margin-bottom: 6px;
  background-color: #1b1c1e;
  background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  background-size: 200px 100%; background-repeat: no-repeat;
  animation: rfsk 1.4s linear infinite;
}

.empty { padding: 90px 0 140px; text-align: center; }
.empty h2 { margin: 0; font: 600 17px/1.5 Inter, sans-serif; color: var(--t-2); }
.empty p  { margin: 9px 0 0; font: 400 15px/1.5 Inter, sans-serif; color: var(--t-6); }
.empty .cta { margin: 22px auto 0; }

.retry {
  margin-top: 16px; height: 40px; padding: 0 18px;
  border-radius: 9px; border: 1px solid var(--control);
  background: transparent; color: var(--t-post);
  font: 600 13.5px/1 Inter, sans-serif; cursor: pointer;
}

/* ─── подвал ────────────────────────────────────────────────────────── */

.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 26;
  height: var(--foot-h);
  border-top: 1px solid var(--divider);
  background: rgba(11,12,13,.94);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  gap: 20px;
  font: 500 12.5px/1.4 Inter, sans-serif; color: var(--t-4);
}
.foot__link {
  padding: 0; border: none; background: none; cursor: pointer;
  font: 500 12.5px/1.4 Inter, sans-serif;
  color: var(--accent); text-decoration: none;
  transition: color .16s;
}
.foot__link:hover { color: #52e08d; }
.foot__link:focus-visible { outline: 2px solid rgba(46,204,113,.5); outline-offset: 3px; border-radius: 3px; }

/* Обращение — не акцентное действие. В покое чуть светлее соседей по подвалу,
   на наведении уходит в основной белый: так шаг заметен, а в покое не кричит. */
.foot__link--plain { color: #a9adb3; }
.foot__link--plain:hover { color: var(--t-main); }
.foot__link--plain:focus-visible { outline-color: rgba(255,255,255,.4); }
.foot b { color: #a9adb3; font-weight: 500; }
.foot .year { color: var(--t-7); }

/* ─── модалки ───────────────────────────────────────────────────────── */

.ov {
  position: fixed; inset: 0; z-index: 60;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: rfin .18s ease both;
}
.ov[hidden] { display: none; }

.modal {
  width: 600px; max-width: 100%; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal--rules { width: 760px; box-shadow: 0 28px 70px rgba(0,0,0,.65); overflow: hidden; }
.modal--fb { width: 520px; }

.modal__head {
  padding: 24px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.modal__head h3 { margin: 0; font: 600 18px/1.2 Inter, sans-serif; letter-spacing: -.02em; }

.x {
  width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--control);
  background: transparent; color: var(--t-4);
  cursor: pointer; font-size: 13px;
  transition: background .16s, color .16s, border-color .16s;
}
.x:hover  { background: rgba(255,255,255,.09); color: var(--t-main); border-color: rgba(255,255,255,.2); }
.x:active { background: rgba(255,255,255,.14); color: #fff; }

.modal__body { padding: 18px 24px 24px; overflow-y: auto; }

/* Форма: поля прокручиваются, кнопка отправки остаётся на виду. */
.modal__wrap { flex: 1; min-height: 0; display: flex; }
.form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.form .fields { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 6px; }
.sheet-foot { flex: none; padding: 12px 24px 24px; }

/* Ручка шторки — только на мобильном. */
.grip { display: none; }

/* правила */
.rules__head {
  padding: 20px 24px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.rules__head h2 { margin: 0; font: 600 22px/1.25 Inter, sans-serif; letter-spacing: -.025em; color: var(--t-main); }
.rules__head p  { margin: 6px 0 0; font: 400 12.5px/1.4 Inter, sans-serif; color: var(--t-6); }
.rules__head .x { width: 34px; height: 34px; border-radius: 9px; color: var(--t-3); font-size: 15px; }

.rules__body { max-height: 520px; overflow-y: auto; padding: 24px 26px 28px; }
.rules__body h3 {
  margin: 26px 0 0; font: 600 13.5px/1.3 Inter, sans-serif;
  color: var(--accent); letter-spacing: .02em;
}
.rules__body h3:first-child { margin-top: 0; }
.rules__body p  { margin: 9px 0 0; font: 400 16px/1.7 Inter, sans-serif; color: var(--t-post); text-wrap: pretty; }
.rules__body ul { margin: 9px 0 0; padding-left: 20px; font: 400 16px/1.85 Inter, sans-serif; color: var(--t-post); }

/* форма */
.fields { display: flex; flex-direction: column; gap: 14px; }
.field  { display: flex; flex-direction: column; gap: 7px; }

.label { font: 600 12.5px/1 Inter, sans-serif; color: var(--t-2); }
.label small { color: var(--t-7); font-weight: 500; font-size: 12.5px; }

.inp, .ta, .sel {
  width: 100%; padding: 0 13px; height: 44px;
  border-radius: 9px; background: var(--inset);
  border: 1px solid var(--control); color: var(--t-main);
  font: 400 15px/1 Inter, sans-serif;
  outline: none; transition: border-color .16s, box-shadow .16s;
}
.inp::placeholder, .ta::placeholder { color: var(--t-6); }
.inp:focus, .ta:focus, .sel:focus {
  border-color: rgba(46,204,113,.35);
  box-shadow: 0 0 0 3px rgba(46,204,113,.07);
}
.inp--nick { font: 500 14.5px/1 Unbounded, sans-serif; letter-spacing: -.02em; }
.ta {
  min-height: 104px; height: auto; padding: 12px 13px;
  font: 400 15px/1.6 Inter, sans-serif; resize: vertical;
}
.ta.is-bad, .inp.is-bad { border-color: rgba(255,140,140,.4); box-shadow: none; }

.hint  { font: 400 11.5px/1.4 Inter, sans-serif; color: var(--t-6); }
.hints { display: flex; justify-content: space-between; gap: 12px; }
.hints--end { justify-content: flex-end; }
.err   { font: 500 12.5px/1.5 Inter, sans-serif; color: var(--danger); }
.err mark { background: rgba(255,120,120,.14); color: inherit; border-bottom: 1.5px solid var(--danger-3); padding: 0 2px; }

/* Список серверов — свой, а не системный: тёмный <select> рисует ОС. */
.combo { position: relative; }

.combo__control {
  width: 100%; height: 44px; padding: 0 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 9px; background: var(--inset);
  border: 1px solid var(--control); cursor: pointer;
  font: 500 15px/1 Inter, sans-serif; color: var(--t-4);
  transition: border-color .16s, box-shadow .16s;
  text-align: left;
}
.combo__control.is-set { color: var(--t-post); }
.combo__control:hover { border-color: rgba(255,255,255,.14); }
.combo__control:focus-visible,
.combo.is-open .combo__control {
  outline: none;
  border-color: rgba(46,204,113,.35);
  box-shadow: 0 0 0 3px rgba(46,204,113,.07);
}

.combo__value { display: flex; align-items: center; gap: 9px; min-width: 0; }
.combo__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo__emoji { font-size: 14px; line-height: 1; flex: none; }

.combo__chev {
  flex: none; width: 9px; height: 9px; margin-right: 1px;
  border-right: 1.5px solid var(--t-4); border-bottom: 1.5px solid var(--t-4);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}
.combo.is-open .combo__chev { transform: rotate(-135deg) translate(-3px, -3px); }

.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 12;
  max-height: 264px; overflow-y: auto;
  padding: 6px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--control);
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
  animation: rfin .14s ease both;
}
.combo__list[hidden] { display: none; }

.combo__opt {
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  font: 500 13.5px/1 Inter, sans-serif; color: var(--t-post);
}
.combo__opt.is-active { background: rgba(255,255,255,.055); }
.combo__opt.is-on { background: rgba(46,204,113,.1); color: var(--accent); }
.combo__opt.is-on.is-active { background: rgba(46,204,113,.16); }

.drop {
  flex: 1; min-height: 78px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px; border: 1px dashed rgba(255,255,255,.11);
  font: 500 13px/1 Inter, sans-serif; color: var(--t-4); cursor: pointer;
  text-align: center; padding: 0 12px;
}
.drop.is-over { border-color: rgba(46,204,113,.5); color: var(--accent); }
.drop b { color: var(--accent); font-weight: 500; }

.attach-row { display: flex; flex-direction: column; gap: 14px; }
.files-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.drop__short { display: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumb {
  position: relative; width: 78px; height: 78px; flex: none;
  border-radius: 9px; overflow: hidden;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 9px, transparent 9px 18px);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb__x {
  position: absolute; top: -6px; right: -6px;
  width: 21px; height: 21px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: #232527; color: var(--t-post);
  cursor: pointer; font-size: 10px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.thumb__size {
  position: absolute; left: 7px; bottom: 6px;
  font: 500 9.5px/1 Inter, sans-serif; color: var(--t-4);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

.rec-start {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--control); background: transparent;
  cursor: pointer; width: 100%; text-align: left;
}
.rec-start__dot {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: rgba(255,105,105,.14);
  display: flex; align-items: center; justify-content: center;
}
.rec-start__dot i { width: 11px; height: 11px; border-radius: 50%; background: var(--danger-3); display: block; }
.rec-start span { font: 600 13.5px/1 Inter, sans-serif; color: var(--t-post); }

.rec-row { margin-top: 12px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.btn {
  height: 40px; padding: 0 16px; border-radius: 9px;
  border: 1px solid var(--control); background: transparent;
  color: var(--t-post); font: 600 13.5px/1 Inter, sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn--stop { border-color: rgba(255,120,120,.28); background: rgba(255,105,105,.1); color: var(--danger); }
.btn--stop i { width: 9px; height: 9px; border-radius: 1px; background: var(--danger); display: block; }
.btn--ghost { color: var(--t-4); }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; }

.agree { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.box {
  width: 19px; height: 19px; flex: none; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 11px; font-weight: 700;
}
.agree input:checked + .box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.agree input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(46,204,113,.2); }
.agree__txt { font: 500 13px/1.4 Inter, sans-serif; color: var(--t-2); }
.agree__txt a { color: var(--accent); text-decoration: none; }

.submit {
  width: 100%; height: 50px; border: none; border-radius: 12px;
  cursor: pointer; color: var(--on-accent);
  font: 600 15.5px/1 Inter, sans-serif;
  letter-spacing: -.01em;
  background: linear-gradient(180deg, #45e089 0%, var(--accent) 52%, #24b562 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(0,0,0,.14),
    0 8px 22px -10px rgba(46,204,113,.6);
  transition: transform .16s ease, box-shadow .22s ease, filter .16s ease;
}
.submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 14px 30px -12px rgba(46,204,113,.75);
}
.submit:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(0,0,0,.22); }
.submit:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Тип обращения — два переключателя вместо выпадающего списка на два пункта. */
.kinds { display: flex; gap: 8px; }
.kind {
  flex: 1; height: 40px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--control); background: transparent;
  color: var(--t-4); font: 600 13.5px/1 Inter, sans-serif;
  transition: background .16s, border-color .16s, color .16s;
}
.kind:hover { border-color: rgba(255,255,255,.16); color: var(--t-post); }
.kind.is-on {
  border-color: rgba(46,204,113,.42);
  background: rgba(46,204,113,.1);
  color: var(--accent);
}

.sent { padding: 46px 36px 40px; text-align: center; }
.sent span { font-size: 30px; line-height: 1; }
.sent h3 { margin: 16px 0 0; font: 500 18px/1.5 Inter, sans-serif; color: #e8eaec; text-wrap: pretty; }
.sent button {
  margin-top: 24px; height: 44px; padding: 0 30px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: transparent; color: var(--t-main);
  font: 600 14.5px/1 Inter, sans-serif; cursor: pointer;
}

/* лайтбокс */
.lb {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(6,7,8,.94);
  display: flex; align-items: center; justify-content: center;
  animation: rfin .18s ease both;
}
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 88vh; border-radius: 12px; display: block; }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--control); background: rgba(18,19,20,.8);
  color: var(--t-main); cursor: pointer; font-size: 18px;
}
.lb__nav--prev { left: 24px; }
.lb__nav--next { right: 24px; }
.lb__x { position: absolute; top: 20px; right: 20px; }
.lb__n {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font: 500 12.5px/1 Inter, sans-serif; color: var(--t-4);
}

/* ─── мобильные ─────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  :root { --foot-h: 44px; }

  .hdr__in { padding: 14px 18px; gap: 12px; }
  .brand { gap: 7px; }
  .hdr.is-shrunk .hdr__in { padding: 10px 18px; }
  .brand__emoji { font-size: 16px; }
  .brand__name  { font-size: 16px; }
  .hdr.is-shrunk .brand__name { font-size: 15px; }

  /* Кнопка в шапке — только для заблокированного состояния (макет S7). */
  .hdr .cta:not(:disabled) { display: none; }
  .hdr .cta:disabled {
    width: 100%; min-height: 52px; height: auto; padding: 9px 16px;
    border-radius: 12px; font: 500 14px/1.4 Inter, sans-serif;
    white-space: normal;
  }
  body.is-locked .hdr__in { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 20px 22px; }
  body.is-locked .brand__emoji { font-size: 22px; }
  body.is-locked .brand__name  { font-size: 24px; letter-spacing: -.035em; }
  body.is-locked .hdr { position: static; }

  .feed { padding: 14px 14px 92px; gap: 12px; }
  .post { padding: 18px; }
  .post__head { flex-wrap: wrap; }
  .post__author { font-size: 13px; }
  .pill { height: 20px; padding: 0 7px; font-size: 10.5px; }
  .post__date { margin-left: 0; width: 100%; margin-top: 5px; font-size: 11.5px; }
  .post__text { margin-top: 12px; font-size: 16px; line-height: 1.65; }
  .rx { margin-top: 16px; }

  .empty { padding: 60px 24px 90px; }

  /* Затемнение, чтобы контент не подлезал под липкую кнопку. */
  .scrim {
    position: fixed; left: 0; right: 0; bottom: var(--foot-h); height: 120px; z-index: 24;
    background-image: linear-gradient(180deg, rgba(11,12,13,0), rgba(11,12,13,.9) 45%, #0b0c0d);
    pointer-events: none; opacity: 0; transition: opacity .2s ease;
  }
  .scrim.is-on { opacity: 1; }

  .cta-sticky {
    left: 16px; right: 16px; bottom: calc(var(--foot-h) + 12px);
    width: auto; height: 50px; padding: 0;
    border-radius: 12px; font: 600 15.5px/1 Inter, sans-serif;
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
  }

  .foot { gap: 10px; padding: 0 12px; font-size: 11px; }
  .foot .year { display: none; }
  .foot__link { font-size: 11px; }

  /* bottom sheet */
  .ov { padding: 0; align-items: flex-end; }
  .modal, .modal--rules {
    width: 100%; max-width: 100%;
    height: calc(100% - 24px); max-height: calc(100% - 24px);
    border-radius: 18px 18px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    border-top: 1px solid rgba(255,255,255,.09);
  }
  .grip { display: flex; justify-content: center; padding: 9px 0 2px; }
  .grip i { width: 38px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); display: block; }
  .modal__head { padding: 8px 18px 0; }
  .modal__head h3 { font-size: 17px; }
  .modal__body { padding: 18px 18px 24px; flex: 1; }
  .form .fields { padding: 18px 18px 6px; }
  .rules__head { padding: 8px 18px 14px; }
  .rules__head h2 { font-size: 18px; }
  .rules__head p { display: none; }
  .rules__body { max-height: none; flex: 1; padding: 18px 18px 28px; font-size: 15.5px; }
  .rules__body p, .rules__body ul { font-size: 15.5px; line-height: 1.65; }

  .inp, .combo__control { height: 48px; font-size: 15px; }
  .ta { min-height: 112px; }

  /* Два вложения — плитками в ряд, как в макете; поля разворачиваются, когда есть что показать. */
  .attach-row { flex-direction: row; flex-wrap: wrap; gap: 9px; align-items: flex-start; }
  .attach-row .field { flex: 1 1 0; min-width: 0; gap: 0; }
  .attach-row .label { display: none; }
  .attach-row .drop {
    min-height: 50px; height: 50px; border-radius: 10px;
    font: 600 13px/1 Inter, sans-serif;
  }
  .drop__full  { display: none; }
  .drop__short { display: inline; }
  .attach-row .rec-start { height: 50px; border-radius: 10px; padding: 0 12px; gap: 8px; }
  .attach-row .rec-start__dot { width: 18px; height: 18px; }
  .attach-row .rec-start__dot i { width: 8px; height: 8px; }
  .attach-row .rec-start span { font-size: 13px; }
  .attach-row .err { margin-top: 7px; }

  /* Как только появились превью или идёт запись — блок занимает всю ширину. */
  .attach-row .field.is-wide { flex: 1 1 100%; gap: 7px; }
  .attach-row .field.is-wide .label { display: block; }
  .attach-row .field.is-wide .drop { flex: 1; min-height: 78px; height: auto; }
  .attach-row .field.is-wide .drop__full  { display: inline; }
  .attach-row .field.is-wide .drop__short { display: none; }

  .grip { display: flex; justify-content: center; padding: 9px 0 2px; }
  .sheet-foot {
    padding: 14px 18px 20px;
    background: linear-gradient(180deg, rgba(18,19,20,0), var(--surface) 42%);
  }
  .sheet-foot .submit { height: 52px; border-radius: 12px; }

  .lb__nav--prev { left: 8px; }
  .lb__nav--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.rules__cards { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rules__card {
  background: var(--inset); border: 1px solid var(--line);
  border-radius: 11px; padding: 16px 18px;
}
.rules__card h3 { margin: 0; font: 600 13px/1.3 Inter, sans-serif; color: var(--accent); }
.rules__card p  { margin: 8px 0 0; font: 400 14.5px/1.6 Inter, sans-serif; color: var(--t-2); }
.rules__card ul { margin: 8px 0 0; padding-left: 18px; font: 400 14.5px/1.6 Inter, sans-serif; color: var(--t-2); }

@media (max-width: 760px) {
  .rules__cards { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .rules__card p, .rules__card ul { font-size: 14.5px; }
}
