/* ГородНК — визуальный слой: фон, шапка, объём. Подключается после style.css */

/* ---------- Фон страницы ---------- */
body {
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(108, 92, 231, .16), transparent 60%),
    radial-gradient(900px 520px at 92% 2%, rgba(255, 90, 60, .13), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}

/* Тонкая сетка поверх фона */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 18, 58, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 18, 58, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 70%);
}

/* Плавающие цветные пятна */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.bg-blob--1 { width: 520px; height: 520px; left: -160px; top: -120px; background: rgba(108, 92, 231, .5); animation: blobFloat1 22s ease-in-out infinite; }
.bg-blob--2 { width: 460px; height: 460px; right: -140px; top: 180px; background: rgba(255, 90, 60, .38); animation: blobFloat2 26s ease-in-out infinite; }
.bg-blob--3 { width: 600px; height: 600px; left: 38%; top: 62%; background: rgba(74, 63, 212, .22); animation: blobFloat1 30s ease-in-out infinite reverse; }
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 60px) scale(1.12); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 90px) scale(1.08); }
}

/* Контент над декором */
.topline, .page-head, .container, .footer { position: relative; z-index: 1; }

/* Шапка липкая, окна поверх всего */
.header { position: sticky; top: 0; z-index: 60; }
.modal { z-index: 200; }
.searchlayer { z-index: 210; }
.welcome { z-index: 220; }

/* ---------- Шапка ---------- */
.topline { background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(231, 231, 240, .8); }
.topline__in { height: 40px; }

.header {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(231, 231, 240, .9);
  transition: box-shadow .3s, background .3s;
}
.header.is-stuck { box-shadow: 0 10px 34px -22px rgba(22, 18, 58, .55); background: rgba(255, 255, 255, .93); }
.header__in { height: 72px; gap: 20px; }

/* Логотип */
.logo { gap: 12px; }
.logo__mark { width: 44px; height: 44px; border-radius: 14px; overflow: hidden; background: none; box-shadow: 0 8px 20px -10px rgba(74, 63, 212, .9); }
.logo__mark svg { width: 100%; height: 100%; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name { font-size: 23px; font-weight: 800; letter-spacing: -.045em; color: var(--ink); }
.logo__name b {
  background: linear-gradient(100deg, var(--brand), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo__sub { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* Меню */
.nav { gap: 2px; margin-left: 8px; margin-right: auto; }
.nav__link { padding: 9px 13px; font-size: 15px; font-weight: 600; border-radius: 12px; }
.nav__link::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--coral)); transform: scaleX(0); transform-origin: left;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}
.nav__link:hover::after { transform: scaleX(1); }
.nav__link:hover, .nav__item:hover > .nav__link { background: transparent; color: var(--ink); }
.nav__link.is-active {
  background: linear-gradient(120deg, rgba(74, 63, 212, .12), rgba(255, 90, 60, .12));
  color: var(--brand);
}
.nav__link.is-active::after { transform: scaleX(1); }
.nav__drop { border-radius: 16px; box-shadow: 0 24px 50px -28px rgba(22, 18, 58, .5); border-color: rgba(231, 231, 240, .9); }

/* Инструменты справа */
.header__tools { gap: 8px; flex: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 13px; background: rgba(255, 255, 255, .8); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-offer { padding: 11px 20px; border-radius: 14px; white-space: nowrap; }

/* Слой поиска */
.searchlayer { position: fixed; inset: 0; z-index: 210; display: none; }
.searchlayer.is-open { display: block; }
.searchlayer__back { position: absolute; inset: 0; background: rgba(16, 12, 40, .5); backdrop-filter: blur(5px); animation: fadeIn .2s ease; }
.searchlayer__win {
  position: relative; margin: 14vh auto 0; width: min(680px, calc(100vw - 28px));
  background: var(--card); border-radius: 22px; padding: 22px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 40px 80px -40px rgba(22, 18, 58, .7); animation: popIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.searchlayer__input {
  flex: 1; border: 0; background: none; font: inherit; font-size: 21px; font-weight: 600;
  letter-spacing: -.02em; color: var(--ink); outline: none; min-width: 0;
}
.searchlayer__win .modal__close { position: static; flex: none; }

/* ---------- Объём у блоков ---------- */
.block, .card, .detail, .poll, .cat-tile, .item {
  box-shadow: 0 1px 2px rgba(22, 18, 58, .04), 0 12px 30px -26px rgba(22, 18, 58, .5);
}
.card:hover, .item:hover, .cat-tile:hover { box-shadow: 0 20px 44px -26px rgba(22, 18, 58, .5); }

/* Заголовки секций с акцентом */
.section__head h2 { position: relative; padding-left: 18px; }
.section__head h2::before {
  content: ''; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--coral));
}

/* Заголовок страницы */
.page-head { padding: 40px 0 32px; }
.page-head h1 {
  background: linear-gradient(120deg, var(--ink) 20%, var(--brand) 75%, var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Карточки: цветные метки типов */
.card__cat { background: linear-gradient(120deg, rgba(74, 63, 212, .12), rgba(255, 90, 60, .12)); color: var(--brand); }
.card { backdrop-filter: blur(6px); background: rgba(255, 255, 255, .88); }
.block { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }

/* ---------- Полоса статистики ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; overflow: hidden;
  border-radius: var(--r-card); background: var(--line); margin-bottom: 46px;
}
.stats__item { background: rgba(255, 255, 255, .92); padding: 24px 26px; text-align: center; transition: background .25s; }
.stats__item:hover { background: #fff; }
.stats__value {
  font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  background: linear-gradient(120deg, var(--brand), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats__label { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- Плитки разделов ---------- */
.tiles-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 46px; }
.tile-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 12px; border-radius: 20px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; font-size: 14.5px; text-align: center; transition: .22s;
}
.tile-link:hover {
  transform: translateY(-4px); color: var(--brand); border-color: transparent;
  box-shadow: 0 18px 34px -20px rgba(74, 63, 212, .6);
}
.tile-link__ico {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(74, 63, 212, .14), rgba(255, 90, 60, .16));
  transition: transform .3s;
}
.tile-link:hover .tile-link__ico { transform: scale(1.1) rotate(-6deg); }

/* ---------- Подвал ---------- */
.footer {
  background:
    radial-gradient(900px 400px at 15% 0%, rgba(108, 92, 231, .5), transparent 60%),
    radial-gradient(700px 380px at 88% 20%, rgba(255, 90, 60, .32), transparent 60%),
    var(--indigo-950);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1400px) {
  .nav__link { padding: 9px 11px; font-size: 14.5px; }
  .logo__sub { display: none; }
}
@media (max-width: 1240px) {
  .nav__link { padding: 8px 9px; font-size: 14px; }
  .logo__name { font-size: 20px; }
  .logo__mark { width: 40px; height: 40px; }
  .btn-offer { padding: 10px 15px; font-size: 14px; }
  .tiles-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  /* вместо подписи показываем плюс, чтобы кнопка оставалась понятной */
  .btn-offer__label { display: none; }
  .btn-offer { padding: 12px 14px; }
  .btn-offer::before { content: '+'; font-size: 19px; font-weight: 700; line-height: 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .nav { position: fixed; inset: 72px 0 auto; margin: 0; padding: 14px; border-radius: 0 0 22px 22px; }
  .nav__link { padding: 12px 14px; font-size: 16px; }
  .btn-offer__label { display: inline; }
  .btn-offer { padding: 11px 18px; }
  .header__in { height: 68px; }
  .searchlayer__win { margin-top: 10vh; }
}
@media (max-width: 640px) {
  .btn-offer::before { content: '+'; font-size: 19px; font-weight: 700; line-height: 1; }
  .btn-offer { padding: 11px 14px; }
  .tiles-row { grid-template-columns: repeat(2, 1fr); }
  .stats__value { font-size: 27px; }
  .stats__item { padding: 18px 12px; }
  .logo__name { font-size: 19px; }
  .btn-offer__label { display: none; }
  .searchlayer__input { font-size: 18px; }
  .section__head h2 { padding-left: 14px; }
}

/* Блок «Читают сейчас» */
.popular-row { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line-2); }
.popular-row:first-of-type { border-top: 0; }
.popular-row__num {
  flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--brand);
  background: linear-gradient(135deg, rgba(74, 63, 212, .14), rgba(255, 90, 60, .16));
}

/* ---------- Городской чат ---------- */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 50px; }
.chat__rooms { display: grid; gap: 16px; position: sticky; top: 96px; }
.chat-room { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; color: var(--ink); transition: .18s; }
.chat-room:hover { background: var(--bg); color: var(--ink); }
.chat-room.is-active { background: linear-gradient(120deg, rgba(74, 63, 212, .14), rgba(255, 90, 60, .14)); color: var(--brand); }
.chat-room__ico { font-size: 20px; }
.chat-room b { display: block; font-size: 15px; }
.chat-room small { color: var(--muted); font-size: 12.5px; }

.chat__main { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 480px; padding: 0; overflow: hidden; }
.chat__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.chat__feed { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.chat__form { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat__form textarea { resize: none; min-height: 46px; max-height: 140px; }
.chat__form--guest { align-items: center; color: var(--muted); flex-wrap: wrap; }

.chat-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; animation: msgIn .25s ease; }
.chat-msg__ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--coral)); }
.chat-msg__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 3px; }
.chat-msg__text { background: var(--bg); padding: 10px 14px; border-radius: 4px 14px 14px 14px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.chat-msg.is-mine .chat-msg__text { background: linear-gradient(120deg, rgba(74, 63, 212, .12), rgba(255, 90, 60, .12)); }
.chat-karma { font-size: 12px; font-weight: 700; color: var(--coral); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; }
  .chat__rooms { position: static; }
  .chat__main { height: calc(100vh - 240px); }
}

/* ---------- Оценки и звёзды ---------- */
.rating { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; flex-wrap: wrap; }
.rating__btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; font-size: 14px;
  color: var(--muted); transition: .18s;
}
.rating__btn:hover { border-color: var(--brand); color: var(--brand); }
.rating__btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rating__btn.is-on.is-down { background: var(--coral); border-color: var(--coral); }
.rating__total { font-weight: 800; font-size: 18px; min-width: 34px; text-align: center; }
.rating__total.is-plus { color: var(--ok); }
.rating__total.is-minus { color: var(--err); }

.stars { display: inline-flex; gap: 2px; color: #d6d6e2; font-size: 17px; letter-spacing: 1px; }
.stars .is-on { color: #ffb020; }

.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 30px; }
.stars-input input { position: absolute; opacity: 0; width: 0; }
.stars-input label { color: #d6d6e2; cursor: pointer; transition: color .15s, transform .15s; }
.stars-input label:hover, .stars-input label:hover ~ label,
.stars-input input:checked ~ label { color: #ffb020; }
.stars-input label:hover { transform: scale(1.15); }

/* ---------- Блок «что можно на портале» ---------- */
.feature {
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: .2s;
}
.feature:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 20px 40px -24px rgba(74, 63, 212, .55); }
.feature__ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, rgba(74, 63, 212, .14), rgba(255, 90, 60, .16));
}
.feature b { font-size: 18px; letter-spacing: -.02em; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; flex: 1; line-height: 1.55; }
.feature__link {
  align-self: flex-start; background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  font-weight: 600; font-size: 14.5px; color: var(--brand);
}
.feature__link:hover { color: var(--coral); }

.join {
  margin-top: 22px; padding: 26px 30px; border-radius: var(--r-card);
  background: linear-gradient(120deg, rgba(74, 63, 212, .1), rgba(255, 90, 60, .12));
  border: 1px solid var(--line);
  display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap;
}

/* ---------- Топ горожан ---------- */
.user-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.user-row:first-child { border-top: 0; }
.user-row__ava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--coral)); background-size: cover; }
.user-row__karma { margin-left: auto; font-weight: 800; color: var(--coral); font-size: 18px; }

/* ---------- Личный кабинет ---------- */
.lk-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.lk-ava {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--coral));
  background-size: cover; background-position: center;
}
.lk-karma { text-align: center; }
.lk-karma b { display: block; font-size: 26px; color: var(--coral); }
.lk-tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- Карточка партнёра ---------- */
.partner-card { position: relative; overflow: hidden; }
.partner-flag {
  position: absolute; right: -46px; top: 22px; transform: rotate(38deg);
  background: linear-gradient(120deg, var(--coral), var(--brand)); color: #fff;
  padding: 8px 56px; font-weight: 800; font-size: 15px;
}
.partner-top { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.partner-logo {
  width: 140px; height: 140px; border-radius: 22px; flex: none;
  background: var(--bg) center/cover no-repeat; border: 1px solid var(--line);
}
.partner-offer {
  position: relative; overflow: hidden; border-radius: var(--r-card); padding: 28px 32px; margin-bottom: 24px;
  background: linear-gradient(135deg, var(--indigo-900), var(--brand) 60%, var(--coral) 140%); color: #fff;
}
.partner-offer__glow {
  position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 65%);
  animation: floatGlow 9s ease-in-out infinite;
}
.partner-offer__label {
  position: relative; z-index: 2; display: inline-block; font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 10px;
}
.partner-offer__text { position: relative; z-index: 2; font-size: 23px; font-weight: 700; line-height: 1.3; }
.partner-offer__until { position: relative; z-index: 2; margin-top: 14px; font-size: 14px; opacity: .85; }
.promo-code {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 14px; margin-top: 18px;
  background: rgba(255, 255, 255, .16); border: 1px dashed rgba(255, 255, 255, .6);
  border-radius: 14px; padding: 12px 16px;
}
.promo-code__value { font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.promo-code__btn {
  border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; font: inherit; font-weight: 600;
  font-size: 14px; background: #fff; color: var(--brand); transition: .18s;
}
.promo-code__btn:hover { transform: translateY(-1px); }
.promo-code.is-copied .promo-code__btn { background: #d6ffe4; color: #147a41; }
.partner-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

@media (max-width: 640px) {
  .partner-offer { padding: 22px 20px; }
  .partner-offer__text { font-size: 19px; }
  .partner-logo { width: 100px; height: 100px; }
}

/* ---------- Блок «Портал делают горожане» ---------- */
.portal {
  position: relative; overflow: hidden; border-radius: 28px; padding: 40px 44px; margin-bottom: 56px;
  background: linear-gradient(135deg, #1a1550 0%, #2f2585 45%, #4a3fd4 100%); color: #fff;
}
.portal__glow { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.portal__glow--1 { width: 380px; height: 380px; right: -100px; top: -160px; background: rgba(255, 90, 60, .55); animation: floatGlow 12s ease-in-out infinite; }
.portal__glow--2 { width: 300px; height: 300px; left: -80px; bottom: -140px; background: rgba(108, 92, 231, .6); animation: floatGlow 16s ease-in-out infinite reverse; }

.portal__head { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.portal__label { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .7; margin-bottom: 10px; }
.portal__head h2 { color: #fff; margin: 0 0 8px; font-size: clamp(26px, 3vw, 38px); }
.portal__head p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 560px; font-size: 16.5px; }
.portal__top {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26); color: #fff;
  font-weight: 600; font-size: 15px; backdrop-filter: blur(8px); transition: .2s;
}
.portal__top:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-2px); }

.portal__grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pcard {
  display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .17); border-radius: 20px;
  padding: 24px 22px; color: #fff; font: inherit; backdrop-filter: blur(10px); transition: .22s;
}
.pcard:hover { background: rgba(255, 255, 255, .18); transform: translateY(-5px); color: #fff; border-color: rgba(255, 255, 255, .4); }
.pcard__ico {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 24px;
  background: rgba(255, 255, 255, .16); transition: transform .3s;
}
.pcard:hover .pcard__ico { transform: scale(1.1) rotate(-6deg); }
.pcard b { font-size: 17.5px; letter-spacing: -.02em; }
.pcard p { color: rgba(255, 255, 255, .74); font-size: 14.5px; margin: 0; flex: 1; line-height: 1.5; }
.pcard__go { font-weight: 600; font-size: 14.5px; color: #ffd2c6; }
.pcard:hover .pcard__go { color: #fff; }

.portal__cta {
  position: relative; z-index: 2; margin-top: 24px; padding: 22px 26px; border-radius: 20px;
  background: rgba(0, 0, 0, .22); display: flex; justify-content: space-between; align-items: center;
  gap: 22px; flex-wrap: wrap; backdrop-filter: blur(8px);
}
.portal__cta b { display: block; font-size: 18px; margin-bottom: 4px; }
.portal__cta span { color: rgba(255, 255, 255, .74); font-size: 14.5px; }

/* Рейтинг заведения в карточке списка */
.card__rating { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.card__rating b { color: var(--ink); font-size: 15px; }

@media (max-width: 1100px) { .portal__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .portal { padding: 28px 22px; border-radius: 22px; }
  .portal__grid { grid-template-columns: 1fr; }
}

/* ---------- Блок оценки материала ---------- */
.ratebox {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: 32px 0 0; padding: 24px 28px; border-radius: var(--r-card);
  background: linear-gradient(120deg, rgba(74, 63, 212, .07), rgba(255, 90, 60, .09));
  border: 1px solid var(--line);
}
.ratebox__left b { display: block; font-size: 18px; letter-spacing: -.02em; margin-bottom: 4px; }
.ratebox__left span { color: var(--muted); font-size: 14.5px; }
.ratebox__actions { display: flex; align-items: center; gap: 14px; }
.ratebox__score { text-align: center; min-width: 74px; }
.ratebox__score b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ratebox__score span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ratebox__score.is-plus b { color: var(--ok); }
.ratebox__score.is-minus b { color: var(--err); }
.ratebox__note { width: 100%; font-size: 13.5px; color: var(--muted); }

.votebtn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit;
  font-weight: 700; font-size: 15px; color: var(--ink-2); transition: .2s;
}
.votebtn span { min-width: 14px; }
.votebtn:hover { transform: translateY(-2px); }
.votebtn--up:hover, .votebtn--up.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.votebtn--down:hover, .votebtn--down.is-on { background: var(--err); border-color: var(--err); color: #fff; }
.votebtn.is-on { box-shadow: 0 10px 22px -12px currentColor; }

/* Компактный рейтинг в строке мета */
.rate-inline {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.rate-inline:hover { border-color: var(--brand); color: var(--brand); }
.rate-inline.is-plus { color: var(--ok); border-color: rgba(31, 157, 85, .35); background: rgba(31, 157, 85, .08); }
.rate-inline.is-minus { color: var(--err); border-color: rgba(217, 54, 54, .3); background: rgba(217, 54, 54, .07); }

@media (max-width: 640px) {
  .ratebox { padding: 20px; }
  .ratebox__actions { width: 100%; justify-content: space-between; }
}

/* ---------- Быстрая оценка в шапке материала ---------- */
.ratequick { display: inline-flex; align-items: center; gap: 6px; }
.ratequick__btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px;
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: .18s;
}
.ratequick__btn:hover { border-color: var(--brand); color: var(--brand); }
.ratequick__btn.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ratequick__btn.is-on.is-down { background: var(--err); border-color: var(--err); }
.ratequick__total { font-weight: 800; font-size: 15px; min-width: 26px; text-align: center; color: var(--muted); }
.ratequick__total.is-plus { color: var(--ok); }
.ratequick__total.is-minus { color: var(--err); }

/* ---------- Оценка заведения ---------- */
.placerate {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 24px;
  padding: 20px 24px; border-radius: var(--r-card);
  background: linear-gradient(120deg, rgba(255, 176, 32, .12), rgba(255, 90, 60, .1));
  border: 1px solid var(--line);
}
.placerate__score {
  width: 88px; height: 88px; border-radius: 24px; flex: none; display: grid; place-items: center; align-content: center;
  background: #fff; border: 1px solid var(--line);
}
.placerate__score b { font-size: 30px; font-weight: 800; line-height: 1; color: #ffb020; letter-spacing: -.04em; }
.placerate__score span { font-size: 12px; color: var(--muted); }
.placerate__body { flex: 1; min-width: 240px; }
.placerate__title { font-weight: 700; font-size: 16px; margin-bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.placerate__mine { font-size: 13px; font-weight: 600; color: var(--coral); }
.placerate__stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.placerate__star {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); transition: .15s;
}
.placerate__star:hover, .placerate__star:hover ~ .placerate__star,
.placerate__star.is-on { background: #ffb020; border-color: #ffb020; color: #fff; }
.placerate__star:hover { transform: translateY(-2px); }
.placerate__hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

@media (max-width: 640px) {
  .placerate { padding: 16px; gap: 14px; }
  .placerate__score { width: 68px; height: 68px; border-radius: 18px; }
  .placerate__score b { font-size: 24px; }
  .placerate__star { width: 32px; height: 32px; font-size: 13px; }
}

.card__mark {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px;
  border-radius: 8px; background: #ffb020; color: #fff; font-weight: 800; font-size: 14px;
}
.card__vote { font-weight: 700; font-size: 13px; }
.card__vote.is-plus { color: var(--ok); }
.card__vote.is-minus { color: var(--err); }
.review-mark {
  display: inline-grid; place-items: center; min-width: 42px; height: 24px; padding: 0 8px;
  border-radius: 8px; background: #ffb020; color: #fff; font-weight: 700; font-size: 13px;
}

/* ---------- Страница сотрудничества ---------- */
.collab-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 50px; }
.collab-side { display: grid; gap: 18px; }
.collab-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; }
.collab-steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.collab-steps li > div { min-width: 0; }
.collab-steps li::before {
  content: counter(step); flex: none; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--coral));
}
.collab-steps b { display: block; font-size: 16px; }
.collab-steps span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .collab-grid { grid-template-columns: 1fr; } }

/* Логотип-картинка из настроек */
.logo__img { max-height: 46px; width: auto; display: block; }

/* Сортировка списков */
.sortbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }

/* Голосование в карточках списка */
.cardvote { display: flex; gap: 8px; margin-top: 10px; }
.cardvote__btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px;
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: .18s;
}
.cardvote__btn:hover { border-color: var(--brand); color: var(--brand); }
.cardvote__btn.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cardvote__btn.is-on.is-down { background: var(--err); border-color: var(--err); }

/* Опрос внутри материала */
.entry-poll {
  margin: 30px 0; padding: 26px 28px; border-radius: var(--r-card);
  background: linear-gradient(120deg, rgba(74, 63, 212, .09), rgba(255, 90, 60, .09));
  border: 1px solid var(--line);
}
.entry-poll__label {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 8px;
}
.entry-poll__title { font-size: 21px; margin: 0 0 18px; }
.entry-poll__options { display: flex; gap: 10px; flex-wrap: wrap; }
.entry-poll__btn {
  padding: 13px 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  cursor: pointer; font: inherit; font-weight: 600; font-size: 15.5px; color: var(--ink); transition: .2s;
}
.entry-poll__btn:hover {
  background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px);
}

/* ---------- Ярлык оценки на карточке ---------- */
.mark-badge {
  position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; background: rgba(255, 176, 32, .95); color: #fff;
  font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px -8px rgba(120, 70, 0, .8);
}
.mark-badge b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.mark-badge--empty { background: rgba(22, 18, 58, .72); font-weight: 500; }

/* ---------- Приветственное обучение ---------- */
.welcome { position: fixed; inset: 0; z-index: 220; display: none; }
.welcome.is-open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.welcome__back { position: absolute; inset: 0; background: rgba(16, 12, 40, .62); backdrop-filter: blur(6px); animation: fadeIn .3s ease; }
.welcome__win {
  position: relative; width: min(620px, calc(100vw - 28px)); background: var(--card); border-radius: 28px;
  padding: 38px 40px 26px; animation: popIn .38s cubic-bezier(.2, .9, .3, 1.2); max-height: 88vh; overflow: auto;
}
.welcome__slide { display: none; }
.welcome__slide.is-active { display: block; animation: fadeIn .3s ease; }
.welcome__badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
  background: linear-gradient(120deg, var(--brand), var(--coral)); color: #fff;
}
.welcome__win h2 { font-size: 27px; margin-bottom: 12px; }
.welcome__win p { color: var(--ink-2); font-size: 16.5px; }
.welcome__list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.welcome__list b { color: var(--ink); }
.welcome__pic {
  font-size: 64px; text-align: center; margin: 18px 0 4px;
  animation: floatIcon 3.4s ease-in-out infinite;
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.welcome__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}
.welcome__dots { display: flex; gap: 8px; }
.welcome__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: .25s; }
.welcome__dots span.is-active { background: var(--coral); width: 26px; border-radius: 5px; }

@media (max-width: 640px) {
  .welcome__win { padding: 28px 22px 20px; border-radius: 22px; }
  .welcome__win h2 { font-size: 22px; }
  .welcome__pic { font-size: 48px; }
}

/* ---------- Размер логотипа ---------- */
.logo__img { max-height: 56px; max-width: 260px; width: auto; }
@media (max-width: 1240px) { .logo__img { max-height: 46px; max-width: 210px; } }
@media (max-width: 640px) { .logo__img { max-height: 38px; max-width: 170px; } }

/* ---------- Мобильное меню: подменю в потоке ---------- */
@media (max-width: 960px) {
  .nav { border-radius: 0 0 22px 22px; box-shadow: 0 24px 40px -30px rgba(22, 18, 58, .7); }
  .nav__item { border-bottom: 1px solid var(--line-2); }
  .nav__item:last-child { border-bottom: 0; }
  .nav__drop {
    position: static !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
    box-shadow: none !important; border: 0 !important; background: transparent !important;
    padding: 0 0 8px 12px !important; min-width: 0;
  }
  .nav__drop a { padding: 8px 12px; font-size: 15px; color: var(--muted); }
  .nav__link { padding: 13px 12px; }
  .nav__link::after { display: none; }
}

/* ---------- Мобильная версия: шапка, меню, таббар ---------- */
@media (max-width: 960px) {
  .header__tools { margin-left: auto; }
  .nav { z-index: 70; box-shadow: 0 30px 50px -30px rgba(22, 18, 58, .8); }
  .topline__in { justify-content: flex-end; }

  /* нижняя панель как в мобильных приложениях */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar__item {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px;
    color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: -.01em;
  }
  .tabbar__item svg { width: 21px; height: 21px; }
  .tabbar__item.is-active { color: var(--brand); }
  .tabbar__item.is-active svg { filter: drop-shadow(0 4px 8px rgba(74, 63, 212, .5)); }
  body { padding-bottom: 66px; }
  .totop { bottom: 82px; right: 16px; }

  /* компактный подвал */
  .footer { padding: 34px 0 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 0; }
  .footer__col { border-top: 1px solid rgba(255, 255, 255, .1); }
  .footer__col summary {
    list-style: none; cursor: pointer; padding: 14px 0; font-weight: 700; color: #fff; font-size: 15.5px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .footer__col summary::-webkit-details-marker { display: none; }
  .footer__col summary::after { content: '+'; font-size: 20px; font-weight: 400; color: #7f7ba8; }
  .footer__col[open] summary::after { content: '−'; }
  .footer__list { padding-bottom: 14px; }
  .footer__bottom { margin-top: 22px; font-size: 13px; }
  .footer__about { padding-bottom: 18px; }
}

@media (min-width: 961px) {
  .tabbar { display: none; }
  .footer__col summary { display: none; }
}

/* Компактная витрина на телефоне */
@media (max-width: 640px) {
  .bento { gap: 14px; margin-bottom: 34px; }
  .bento__tile { min-height: 210px; }
  .bento__tile--hero { min-height: 280px; }
  .bento__tile::after {
    background: linear-gradient(to top, rgba(12, 9, 33, .95) 10%, rgba(12, 9, 33, .55) 55%, rgba(12, 9, 33, .2) 100%);
  }
  .bento__body { padding: 18px 20px; }
  .bento__tile--hero .bento__title { font-size: 22px; }
  .bento__lead { font-size: 14.5px; }
  .section { margin-bottom: 36px; }
  .portal { margin-bottom: 34px; }
  .stats { margin-bottom: 32px; }
  .tiles-row { margin-bottom: 32px; gap: 10px; }
}
