/* Compatibility with app.js */
.hidden { display: none !important; }
#landing.hidden, #cabinet-readonly.hidden, #cabinet-onboarding.hidden, #public-stats.hidden { display: none !important; }

/* Ранний boot: не показывать лендинг, пока app.js поднимает кабинет */
html.mp-auth-boot #landing { display: none !important; }
html.mp-auth-boot #cabinet-readonly.hidden { display: block !important; }
html.mp-auth-boot body { visibility: visible; }

/* Сессия: не мелькать «Войти» до renderHeader(me) */
html.mp-session #site-header [data-action="login"] { display: none !important; }
html.mp-session #header-user-wrap { display: flex !important; }
html.mp-session #landing { display: none !important; }

/* /search — не показывать лендинг до cabinet-app.js */
html.mp-search-boot #landing { display: none !important; }
html.mp-search-boot #site-search-root { display: block !important; }
html.mp-search-boot body.in-search-page #site-header { display: block !important; }
html.mp-film-boot #landing,
html.mp-staff-boot #landing { display: none !important; }
html.mp-film-boot #cabinet-readonly,
html.mp-staff-boot #cabinet-readonly,
html.mp-film-boot #cabinet-readonly.hidden,
html.mp-staff-boot #cabinet-readonly.hidden { display: block !important; }
html.mp-film-boot #section-film,
html.mp-staff-boot #section-film,
html.mp-film-boot #section-film.hidden,
html.mp-staff-boot #section-film.hidden { display: block !important; }
html.mp-film-boot #cabinet-readonly .cabinet-section:not(#section-film),
html.mp-staff-boot #cabinet-readonly .cabinet-section:not(#section-film) { display: none !important; }
html.mp-film-boot #cabinet-home-stats,
html.mp-staff-boot #cabinet-home-stats { display: none !important; }
html.mp-film-boot #cabinet-readonly .cabinet-topbar,
html.mp-staff-boot #cabinet-readonly .cabinet-topbar { display: none !important; }
html.mp-film-boot body,
html.mp-staff-boot body { visibility: visible; }

#login-modal { display: none; z-index: 12000; }
#login-modal.mp-login-portal {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}
#login-modal:not(.hidden) { display: flex !important; }
.plan-guest-auth-hint { margin: 0 0 8px; text-align: center; opacity: 0.85; }
.cabinet-section.hidden { display: none !important; }

/* Header search: shared by landing and cabinet */
#header-search {
  display: none !important;
}
html.mp-landing-boot #header-search,
body.landing-root-page #header-search,
body.in-cabinet #header-search,
body.in-search-page #header-search,
body.film-standalone-page #header-search,
body.staff-standalone-page #header-search,
body.user-standalone-page #header-search {
  display: block !important;
}
.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 560px;
  min-width: 220px;
}
.header-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, rgba(255,255,255,.55));
  pointer-events: none;
}
.header-search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 86px 0 46px;
  border: 1px solid var(--border-color, rgba(255,255,255,.12));
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--text-primary, #fff);
  font: inherit;
  font-weight: 700;
  outline: none;
}
.header-search-input:focus {
  border-color: rgba(255,45,123,.55);
  box-shadow: 0 0 0 4px rgba(255,45,123,.1);
}
.header-search-mic,
.header-search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: var(--text-primary, #fff);
  cursor: pointer;
}
.header-search-mic { right: 52px; }
.header-search-clear { right: 12px; }
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-color, rgba(255,255,255,.12));
  border-radius: 20px;
  background: rgba(12,12,24,.97);
  box-shadow: 0 22px 58px rgba(0,0,0,.42);
}
.hs-result {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  color: var(--text-primary, #fff);
}
.hs-result:hover { background: rgba(255,255,255,.08); }
.hs-result-poster {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
}
.hs-result-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-result-meta,
.header-search-empty,
.header-search-loading,
.header-search-recent-title {
  color: var(--text-muted, rgba(255,255,255,.58));
  font-size: 12px;
}
.hs-result-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text-primary, #fff);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.hs-btn-add { background: linear-gradient(135deg, #ff2d7b, #7c3cff); border: 0; }
.header-search-chip {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  color: var(--text-primary, #fff);
  cursor: pointer;
}
.header-search-recent-row { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) {
  .header-content { flex-wrap: wrap; }
  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

.inbox-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(18,18,30,.86);
  color: #ffd64d;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.inbox-fab-icon {
  line-height: 1;
  pointer-events: none;
}
.inbox-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid rgba(18, 18, 30, 0.95);
  pointer-events: none;
}
.inbox-fab-badge.hidden {
  display: none;
}
.inbox-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(255,214,77,.4);
}

body.in-cabinet #section-inbox {
  max-width: 720px;
  margin: 0 auto;
}

.base-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.base-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--text-muted, rgba(255,255,255,.68));
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.base-tab.active {
  color: #fff;
  border-color: rgba(255,45,123,.45);
  background: linear-gradient(135deg, rgba(255,45,123,.8), rgba(124,60,255,.8));
}
.base-user-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.base-user-tags-row:empty {
  display: none;
}
.base-user-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f6ff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.base-user-tag-pill:hover,
.base-user-tag-pill:focus-visible {
  border-color: rgba(255, 45, 123, 0.42);
  background: rgba(255, 45, 123, 0.1);
  transform: translateY(-1px);
}
.base-user-tag-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.base-user-tag-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.film-card-v2,
.home-dash-row[data-film-id],
.home-dash-row[data-kp-id],
.home-dash-row[data-kp],
.premiere-poster-tile[data-film-id],
.premiere-poster-tile[data-kp-id],
.premiere-poster-tile[data-kp] {
  cursor: pointer;
}

@media (min-width: 900px) {
  #section-film .film-page-outer,
  #section-film .film-page-container {
    max-width: 1180px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  #section-film .film-modal-content {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
  }
  #section-film .film-modal-info h2 {
    font-size: clamp(34px, 4.6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.06em;
  }
  #section-film .film-modal-desc {
    max-width: 760px;
    font-size: 20px;
    line-height: 1.65;
  }
  #section-film .film-modal-crew,
  #section-film .film-modal-meta {
    max-width: 760px;
    font-size: 18px;
  }
}
.parallax-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.content-wrapper {
  position: relative;
  z-index: 1;
}
.parallax-emoji {
  position: absolute;
  user-select: none;
  will-change: transform;
  filter: blur(0.1px);
  animation: parallaxEmojiDrift 12s ease-in-out infinite alternate;
}
@keyframes parallaxEmojiDrift {
  from { margin-top: -4px; }
  to { margin-top: 8px; }
}
.header-dropdown-title { font-size: 12px; color: var(--text-muted); padding: 8px 12px; }
.header-dropdown-account { padding: 10px 14px; border-radius: 8px; cursor: pointer; }
.header-dropdown-account .header-dropdown-account-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.header-dropdown-account .header-dropdown-account-name {
  flex: 1;
  min-width: 0;
  text-align: left;
  word-break: break-word;
}
.header-settings-nav-item--external {
  text-decoration: none !important;
}
.header-dropdown-account:hover { background: rgba(255,255,255,0.05); }
.header-dropdown-account.is-active { background: rgba(255,45,123,0.08); }
.header-dropdown-account-type { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.header-dropdown-account-remove { flex-shrink: 0; background: none; border: none; color: #ff4444; cursor: pointer; padding: 4px 6px; font-size: 18px; line-height: 1; }
.header-dropdown-divider { height: 1px; background: var(--border-color); margin: 6px 0; }
.header-dropdown-add { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: 13px; border-radius: 8px; }
.header-dropdown-add:hover:not(.disabled) { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.header-dropdown-add.disabled { opacity: 0.5; cursor: not-allowed; }
.header-dropdown-logout { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: none; color: #ff4444; cursor: pointer; font-size: 13px; border-radius: 8px; font-family: inherit; }
.header-dropdown-logout:hover { background: rgba(255, 68, 68, 0.08); }

.header-user-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-profile-pill,
.header-coins-btn,
.header-settings-btn {
  min-height: 44px;
}

.header-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  max-width: 220px;
}

.header-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #ff2d7b, #7c3cff);
  color: #fff;
  font-weight: 800;
}

.header-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-profile-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.header-coins-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffb547;
  cursor: pointer;
}

.header-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
}
.header-settings-btn:hover,
.header-settings-btn:focus,
.header-settings-btn:focus-visible {
  text-decoration: none;
}
.header-settings-btn-text,
.header-settings-btn-icon {
  text-decoration: none;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.header-settings-btn-icon {
  flex-shrink: 0;
}

.header-coins-sprite {
  width: 20px;
  height: 20px;
}

/* Account switcher button (header) */
.header-user-wrap .account-current {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 10px 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}
.header-user-wrap .account-current:hover {
  border-color: #ff2d7b;
}
.account-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.account-badge.personal {
  background: rgba(255, 45, 123, 0.15);
  color: #ff2d7b;
}
.account-badge.group {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}
#header-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
#header-account-dropdown.hidden { display: none !important; }
.film-streaming-btn .streaming-btn-emoji { margin-left: 6px; }
.plan-info { padding: 24px; }
.plan-meta, .plan-date-line, .plan-time-line, .plan-type { font-size: 14px; color: var(--text-muted); }
.plan-title { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.plans-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
@media (max-width: 768px) { .plans-split { grid-template-columns: 1fr; } }
.plans-today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 0; margin-bottom: 0; }
.plans-today-wrap.hidden { display: none !important; }
.cabinet-plans-today { margin-bottom: 24px; }
.cabinet-subtitle { font-size: 18px; margin-bottom: 10px; }
/* Планы: вкладки «Все / Дома / Кино / Премьеры» */
.plans-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
}
.plans-filter-tab {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.plans-filter-tab:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.plans-filter-tab.active { color: #ff2d7b; border-color: rgba(255, 45, 123, 0.5); background: rgba(255, 45, 123, 0.08); }
.plans-today-list .plans-empty-actions .btn { min-width: 0; }
/* Пустой список планов: один элемент на всю ширину сетки (иначе auto-fill даёт узкую колонку и ломает кнопки) */
.plans-list-empty-wrap {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.empty-hint { color: var(--text-muted); margin-bottom: 16px; }
.plans-empty-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.plans-empty-actions .btn { min-width: 240px; flex: 1 1 0; }
.cabinet-hint { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.section-title-row, .section-unwatched-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.section-with-search { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.section-with-search .section-title { margin-bottom: 0; }
.base-section-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.base-section-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.base-section-tools-row .section-search {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  margin-left: auto;
}
.base-section-toolbar .section-filter-row {
  margin-top: 0;
}
@media (max-width: 640px) {
  .base-section-tools-row {
    flex-direction: column;
    align-items: stretch;
  }
  .base-section-tools-row .section-search {
    max-width: none;
    margin-left: 0;
  }
}
.base-section-tools-row--stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.base-section-tools-row--stack .base-search-wrap {
  flex: 1 1 180px;
  min-width: 0;
}
.base-section-tools-row--search-only {
  width: 100%;
}
.base-section-tools-row--search-only .section-search {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  width: 100%;
}
.base-filter-toolbar-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.base-filter-toolbar-inner .base-filter-toolbar-scroll {
  flex: 1;
  min-width: 0;
}
.base-sort-icon-group {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.base-sort-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.base-sort-icon-btn .mp-icon { font-size: 18px; line-height: 1; }
.base-sort-icon-btn[data-sort="za"] .mp-icon { transform: scaleX(-1); display: inline-block; }
.base-sort-icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.base-sort-icon-btn.active {
  background: rgba(236, 72, 153, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.35);
}
.base-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.base-search-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  opacity: 0.55;
}
.base-search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-primary, #fff);
  font-size: 15px;
}
.base-search-input::placeholder { color: rgba(255, 255, 255, 0.38); }
.base-sort-select {
  width: auto;
  flex: 0 0 auto;
  min-width: 148px;
  max-width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 600;
}
.base-filter-toolbar {
  margin: 0;
  overflow: hidden;
}
.base-filter-toolbar-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
}
.base-filter-toolbar-scroll::-webkit-scrollbar { display: none; }
.base-filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 7px 12px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  max-width: min(46vw, 200px);
  cursor: pointer;
}
.base-filter-chip--wide { max-width: min(56vw, 240px); }
.base-filter-chip-k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.1;
}
.base-filter-chip-native {
  width: 100%;
  min-width: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
}
.base-filter-chip-native:focus { outline: none; }
.base-filter-chip--select .base-filter-chip-native {
  cursor: pointer;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff88' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
.base-filter-chip--field .base-filter-chip-native::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}
.unwatched-toolbar { display: flex; align-items: center; gap: 12px; }
.unwatched-sort-select { padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; }
.section-search { padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; flex: 1; min-width: 0; }
.section-filter-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 8px; }
.section-filter-select,
.section-filter-input { padding: 8px 10px; font-size: 13px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface); color: var(--text-primary); }
.section-filter-year { width: 88px; }
.section-filter-genre { min-width: 130px; flex: 1; }
.login-status { margin-top: 12px; font-size: 14px; }
.login-status.error { color: #ff4444; }
.login-status.success { color: #4ade80; }
.login-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 18px 0 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.login-auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.58);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.login-auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,45,123,0.24), rgba(168,85,247,0.22));
  box-shadow: inset 0 0 0 1px rgba(255,45,123,0.28);
}
.login-auth-pane { min-width: 0; }
.login-register-card {
  width: 100%;
  box-sizing: border-box;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
}
.login-register-title,
.login-oauth-caption,
.login-email-caption {
  margin: 0 0 12px;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-register-form,
.login-email-section,
.login-bot-panel { min-width: 0; }
.login-bot-wait-lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(244,246,255,.72);
}
.login-bot-fallback {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(244,246,255,.58);
  word-break: break-word;
}
.login-bot-reopen { width: 100%; margin-top: 8px; }
.login-register-name-row,
.login-email-request-row,
.login-email-code-row,
.login-bot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.login-register-name-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 10px;
}
.login-register-input,
.login-email-input,
.login-email-code-input,
.login-bot-code-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.login-register-form > .login-register-input {
  margin-bottom: 10px;
}
.login-register-form .login-register-privacy {
  margin: 0;
  padding: 0;
}
.login-register-form .login-status {
  margin-top: 0;
}
.login-register-form .login-status:not(:empty) {
  margin-top: 8px;
}
.login-register-form .login-status:empty {
  display: none;
}
.login-register-privacy { margin-top: 0; margin-bottom: 0; }
.login-register-card .login-register-privacy {
  margin-top: 0;
}
.login-register-oauth-block {
  margin-bottom: 16px;
}
.login-oauth-block--login {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.login-register-oauth-block .login-methods-grid {
  margin-top: 10px;
}
.login-register-card {
  margin-top: 4px;
}
.login-register-switch {
  margin-top: 16px;
  padding-top: 4px;
  color: rgba(255,255,255,0.58);
  font-size: 13px;
  text-align: center;
}
.login-register-switch button {
  border: 0;
  background: transparent;
  color: #ff5aa5;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
@media (max-width: 640px) {
  .login-register-name-row,
  .login-email-request-row,
  .login-email-code-row,
  .login-bot-form {
    grid-template-columns: 1fr;
  }
  .login-register-card { padding: 14px; }
}
.film-description { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.btn { padding: 10px 20px; border-radius: 50px; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.btn-small { padding: 10px 16px; font-size: 13px; }
.series-alarm-icon {
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: 17px;
}
.series-alarm-icon--off::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  top: 50%;
  height: 2.5px;
  margin-top: -1.25px;
  background: #ef5350;
  transform: rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35);
}
.series-sub-toggle {
  min-width: 0;
  white-space: nowrap;
}
.series-poster-alarm {
  position: absolute !important;
  top: 8px;
  right: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.series-poster-alarm:hover {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 255, 255, 0.42);
  transform: scale(1.06);
}
.series-poster-alarm.is-active {
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.88), rgba(155, 77, 255, 0.88));
  border-color: rgba(255, 255, 255, 0.35);
}
.series-poster-alarm .series-alarm-icon {
  font-size: 15px;
  line-height: 1;
}
.film-card-v2-poster .series-poster-alarm,
.film-card-v2-poster .series-sub-toggle.series-poster-alarm {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 6 !important;
  inset: auto auto auto auto;
}
.series-poster-alarm:disabled {
  opacity: 0.55;
  cursor: wait;
}
.cabinet-nav { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); overflow-x: auto; padding-bottom: 4px; }
.cabinet-nav-btn { padding: 14px 18px; background: none; border: none; border-bottom: 3px solid transparent; color: rgba(255, 255, 255, 0.78); font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cabinet-nav-btn-emoji { flex-shrink: 0; }
.cabinet-nav-btn.active { color: #ff2d7b; border-bottom-color: #ff2d7b; }
.cabinet-nav-extension { margin-left: auto; flex-shrink: 0; align-self: center; }
.cabinet-nav-extension:hover,
#cabinet-extension-link-onboard:hover { transform: none !important; }
#cabinet-extension-link-onboard.btn-primary:hover,
#cabinet-extension-link-onboard.btn-secondary:hover {
  transform: none !important;
}
@media (max-width: 768px) { .cabinet-nav-extension { display: none !important; } }
#cabinet-readonly, #cabinet-onboarding { display: none; padding: 40px 24px; max-width: var(--site-max); margin: 0 auto; }
#cabinet-readonly:not(.hidden), #cabinet-onboarding:not(.hidden) { display: block; }
.cabinet-sections { max-width: var(--site-max); margin: 0 auto; }
.section-title-emoji { margin-right: 6px; }
.section-title-text { }
.about-project-block { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 600px; margin: 0 auto; }
.about-photo-wrap { margin-bottom: 20px; }
.about-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); }
.about-project-text { text-align: left; }
.about-project-text p { margin-bottom: 16px; line-height: 1.7; }
.about-project-text a { color: #ff2d7b; }
.cabinet-articles { margin-top: 32px; }
.cabinet-articles h3 { font-size: 20px; }
.cabinet-articles .articles-grid { margin-top: 0; }
.onboard-scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 24px; }
.onboard-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; }
.onboard-card h3 { font-size: 18px; margin-bottom: 12px; }
.onboard-card ul { margin: 12px 0 20px; padding-left: 20px; }
.onboard-card a { color: #ff2d7b; }
.onboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 18px;
}
.onboard-hero-actions .btn {
  min-height: 44px;
}
.onboard-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.onboard-feature-strip > div {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}
.onboard-feature-strip b {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}
.onboard-feature-strip span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .onboard-feature-strip { grid-template-columns: 1fr; }
}
.cabinet-welcome { font-size: 28px; margin-bottom: 12px; }
.cabinet-empty-lead { font-size: 18px; color: var(--text-muted); margin-bottom: 24px; }
.cabinet-onboard-intro { margin-bottom: 20px; }
.cabinet-onboard-note { color: var(--text-muted); margin-top: 24px; }
.onboard-empty-hint { color: var(--text-muted); margin-bottom: 20px; }
.article-card-icon { font-size: 28px; }
.article-card-title { font-family: 'Unbounded', sans-serif; font-size: 16px; font-weight: 700; }
.article-card-desc { font-size: 14px; color: var(--text-muted); }
.faq-block { max-width: 800px; margin: 0 auto; }
.faq-block h3, .cabinet-articles h3 { margin-bottom: 16px; }
.faq-head { padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface); font-weight: 600; }
.faq-body { padding: 0 20px; max-height: 0; overflow: hidden; transition: all 0.3s; background: rgba(255,255,255,0.02); }
.faq-item.open .faq-body { padding: 20px; max-height: 500px; }

:root {
  /* Ширина контента на больших экранах (кабинет + шапка выравниваются) */
  --site-max: 1600px;
  --bg-main: #09090b;
  --bg-surface: #131318;
  --bg-surface-alt: #1a1a22;
  --text-primary: #eeeef0;
  --text-muted: #6b6b76;
  --stats-pink: #ff2d7b;
  --stats-purple: #9b4dff;
  --stats-cyan: #00d4ff;
  --stats-green: #34d399;
  --stats-amber: #fbbf24;
  --gradient: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-alt: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.in-cabinet,
body.film-standalone-page,
body.user-standalone-page,
body.staff-standalone-page {
  background: var(--bg-main);
}

body.in-cabinet .parallax-bg,
body.in-cabinet .parallax-emoji,
body.film-standalone-page .parallax-bg,
body.film-standalone-page .parallax-emoji,
body.user-standalone-page .parallax-bg,
body.user-standalone-page .parallax-emoji,
body.staff-standalone-page .parallax-bg,
body.staff-standalone-page .parallax-emoji {
  display: none !important;
}

.parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.parallax-emoji {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

header {
  position: sticky;
  top: 0;
  z-index: 220;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #0c0c12;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  isolation: isolate;
}

.header-content {
  max-width: var(--site-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-login-btn {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  min-height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.header-login-btn:hover,
.header-login-btn:focus-visible {
  background: #fff;
  color: #09090b;
  border-color: #fff;
  transform: none;
  box-shadow: none;
  outline: none;
}

.header-login-btn:active {
  background: rgba(255, 255, 255, 0.88);
  transform: none;
}

@media (min-width: 861px) {
  .header-login-btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 13px;
  }
}

.mp-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(12, 8, 28, 0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.mp-lang-toggle:hover {
  transform: scale(1.06);
  border-color: rgba(255, 45, 123, 0.55);
  box-shadow: 0 0 16px rgba(155, 77, 255, 0.35);
}

body.in-cabinet .mp-lang-toggle {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.mp-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mp-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

body.in-cabinet .mp-lang-toggle {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.settings-lang-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-lang-btn.active {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.12);
}


.btn-primary {
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: white;
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(255, 45, 123, 0.3);
  height: 60px;
  box-sizing: border-box;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(255, 45, 123, 0.5);
}

.btn-secondary {
  background: transparent;
  color: #eeeef0;
  border: 2px solid transparent;
  padding: 16px 38px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background-image: linear-gradient(#09090b, #09090b), linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  height: 60px;
  box-sizing: border-box;
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

#landing {
  display: block;
  position: relative;
  z-index: 1;
  padding: 40px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* app.js uses .hidden to toggle visibility */
#landing.hidden {
  display: none !important;
}

.hero-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title .gradient {
  background: none;
  -webkit-text-fill-color: #ffd67a;
  color: #ffd67a;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 28px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-subtext {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

section {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.what-is {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px;
  margin: 60px auto;
  max-width: 800px;
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* what-is-v2 (redesigned block) */
.what-is-v2 {
  position: relative;
  margin: 60px auto;
  max-width: 900px;
  padding: 56px 48px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08));
  overflow: hidden;
  text-align: center;
}
.what-is-v2::before {
  content: none;
}
.what-is-v2::after {
  content: none;
}
.what-is-v2-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.what-is-v2-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  overflow-wrap: break-word;
  word-break: break-word;
}
.what-is-v2-title .gradient-text {
  display: inline;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  background: none;
  -webkit-text-fill-color: #ffd67a;
  color: #ffd67a;
}
.what-is-v2-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}
.what-is-v2-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: none;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.what-is-v2-features--articles {
  justify-content: center;
}
.what-is-v2-feature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  text-align: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  line-height: 1.2;
  hyphens: none;
  word-break: keep-all;
}
a.what-is-v2-feature,
button.what-is-v2-feature {
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.what-is-v2-feature:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}
.what-is-v2-feature:focus-visible {
  outline: 2px solid rgba(255, 214, 122, 0.55);
  outline-offset: 2px;
}
.what-is-v2-feature--accent {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-weight: 600;
}
.what-is-v2-feature--accent:hover {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
}
.what-is-v2-feature .feat-icon { font-size: 18px; flex-shrink: 0; }
#landing-feat-watchlist,
#landing-feat-plans,
#landing-feat-series,
#landing-feat-tickets,
#landing-feat-groups,
#landing-feat-stats {
  scroll-margin-top: 96px;
}
@media (max-width: 768px) {
  body.in-cabinet {
    --mp-mobile-header-offset: 86px;
    background: var(--bg-main);
  }
  body.in-cabinet .parallax-bg,
  body.in-cabinet .parallax-emoji {
    display: none !important;
  }
  body.in-cabinet #cabinet-readonly,
  body.in-cabinet #cabinet-onboarding {
    padding: 14px 12px calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.in-cabinet .container {
    padding-left: 0;
    padding-right: 0;
  }
  body.in-cabinet .cabinet-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 0;
  }
  body.in-cabinet .cabinet-user-hero {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  body.in-cabinet .cabinet-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }
  body.in-cabinet .cabinet-user-name {
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  body.in-cabinet .cabinet-user-kicker {
    margin-bottom: 4px;
    font-size: 12px;
  }
  body.in-cabinet #site-header {
    position: sticky;
    top: 0;
    z-index: 220;
    background: #0c0c12;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.28s ease, opacity 0.28s ease;
    will-change: transform;
    isolation: isolate;
  }
  body.landing-root-page #site-header,
  body.film-standalone-page #site-header,
  body.user-standalone-page #site-header,
  body.staff-standalone-page #site-header {
    position: sticky;
    top: 0;
    z-index: 220;
    background: #0c0c12 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    transition: transform 0.28s ease, opacity 0.28s ease;
    will-change: transform;
    isolation: isolate;
  }
  body.landing-root-page .header-content,
  body.film-standalone-page .header-content,
  body.user-standalone-page .header-content,
  body.staff-standalone-page .header-content {
    background: #0c0c12 !important;
    border-radius: 0 !important;
  }
  body.in-cabinet #site-header.site-header--retracted,
  body.landing-root-page #site-header.site-header--retracted,
  body.film-standalone-page #site-header.site-header--retracted,
  body.user-standalone-page #site-header.site-header--retracted,
  body.staff-standalone-page #site-header.site-header--retracted {
    transform: translateY(calc(-100% - 2px));
    pointer-events: none;
    opacity: 0;
  }
  body.in-cabinet .header-buttons {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
  }
  body.in-cabinet .header-user-wrap {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  body.in-cabinet .header-profile-pill {
    flex-shrink: 0;
  }
  body.in-cabinet .header-util-row {
    margin-left: auto;
    margin-right: 0;
  }
  body.in-cabinet .header-settings-btn {
    flex-shrink: 0;
    margin-left: 4px;
    display: none !important;
  }
  body.in-cabinet .cabinet-home-stats {
    gap: 8px;
    margin: 0 0 16px;
  }
  body.in-cabinet .cabinet-home-stat {
    min-height: 84px;
    padding: 12px 6px;
    overflow: hidden;
  }
  body.in-cabinet .cabinet-home-stat span {
    font-size: 10px;
    letter-spacing: 0.05em;
    line-height: 1.15;
    max-width: 100%;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.in-cabinet .home-dash-empty--cta {
    padding: 4px 0 8px;
  }
  body.in-cabinet .home-dash-empty--cta .plans-empty-actions {
    justify-content: center;
  }
  body.in-cabinet .cabinet-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(12,12,18,0.97);
    backdrop-filter: blur(14px);
    overflow: visible;
  }
  body.in-cabinet .cabinet-nav .cabinet-nav-btn[data-section="premieres"],
  body.in-cabinet .cabinet-nav .cabinet-nav-btn[data-section="tournament"] {
    display: none !important;
  }
  body.in-cabinet .cabinet-nav-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    color: rgba(255,255,255,0.58);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
  body.in-cabinet .cabinet-nav-btn[data-section="home"] { order: 1; }
  body.in-cabinet .cabinet-nav-btn[data-section="plans"] { order: 2; }
  body.in-cabinet .cabinet-nav-btn[data-section="unwatched"] { order: 3; }
  body.in-cabinet .cabinet-nav-btn[data-section="whattowatch"] { order: 4; }
  body.in-cabinet .cabinet-nav-btn.active {
    color: #ff2d7b;
    border: 0;
    background: rgba(255,45,123,0.08);
  }
  body.in-cabinet .cabinet-nav-btn-emoji {
    font-size: 20px;
    line-height: 1;
  }
  body.in-cabinet .cabinet-nav-btn-text {
    font-size: 10px;
    line-height: 1.05;
  }
  body.in-cabinet .cabinet-nav-extension {
    display: none !important;
  }
  body.in-cabinet .cabinet-section {
    margin: 0 0 14px;
  }
  body.in-cabinet .cabinet-section > .section-title {
    font-size: 44px;
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin: 8px 0 12px;
  }
  body.in-cabinet .home-quick-actions {
    justify-content: center;
    gap: 12px;
    margin: 8px 0 14px;
  }
  body.in-cabinet .home-emoji-btn {
    width: 56px;
    height: 56px;
    font-size: 28px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
  }
  body.in-cabinet #home-dashboard-root {
    gap: 14px;
    margin-bottom: 16px;
  }
  body.in-cabinet .home-dash-block {
    padding: 14px 12px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
  }
  body.in-cabinet #section-home .section-title {
    display: none;
  }
  body.in-cabinet #section-home .home-group-suggestions-block .home-dash-h {
    font-size: 18px;
    letter-spacing: -0.01em;
  }
  body.in-cabinet #section-home #home-group-suggestions {
    margin-bottom: 8px;
  }
  body.in-cabinet .home-dash-head {
    margin-bottom: 10px;
  }
  body.in-cabinet .home-dash-h {
    font-size: 26px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.06;
    color: #fff;
  }
  body.in-cabinet .home-dash-more {
    font-size: 13px;
    font-weight: 700;
    color: #ff5aa5;
  }
  body.in-cabinet .home-dash-row {
    padding: 8px 4px;
    border-radius: 10px;
  }
  body.in-cabinet .inbox-fab {
    right: 12px;
    top: calc(var(--mp-mobile-header-offset, 86px) + env(safe-area-inset-top, 0px));
    bottom: auto;
    z-index: 160;
    width: 42px;
    height: 42px;
    font-size: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,.42);
  }
  body.in-cabinet .group-context-fab {
    right: 12px;
    top: calc(var(--mp-mobile-header-offset, 86px) + env(safe-area-inset-top, 0px) + 52px);
    bottom: auto;
    z-index: 159;
    width: 42px;
    height: 42px;
    font-size: 20px;
    border-width: 1px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  }
  body.in-cabinet .home-dash-rows {
    gap: 4px;
  }
  body.in-cabinet .home-film-preview,
  body.in-cabinet .home-premiere-preview,
  body.in-cabinet .home-poster-preview-pop {
    display: none !important;
  }
  body.in-cabinet .home-dash-row-poster {
    width: 34px;
    height: 50px;
    border-radius: 6px;
  }
  body.in-cabinet .home-dash-row-title {
    font-size: 15px;
    font-weight: 700;
  }
  body.in-cabinet .home-dash-row-meta {
    font-size: 13px;
    margin-top: 2px;
  }
  body.in-cabinet .plans-empty-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.in-cabinet .plans-empty-actions .btn {
    min-height: 44px;
    padding: 10px 10px;
    font-size: 14px;
  }
  body.in-cabinet .home-premiere-actions .premiere-bell-btn,
  body.in-cabinet .home-premiere-actions .film-share-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  body.in-cabinet .home-premiere-actions .home-premiere-share,
  body.in-cabinet .home-premiere-actions .film-share-icon-btn {
    display: none !important;
  }
  body.in-cabinet .home-more-section {
    margin-top: 6px;
  }
  body.in-cabinet .home-more-section .home-dash-h {
    font-size: 22px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
  }
  body.in-cabinet .home-more-row {
    min-height: 48px;
    border-radius: 12px;
    font-size: 14px;
  }
  body.in-cabinet .premiere-poster-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.in-cabinet .inbox-fab,
  body.in-cabinet .group-context-fab {
    opacity: 1;
    transform: none;
  }
  body.in-cabinet #section-inbox .inbox-tabs {
    gap: 6px;
  }
  body.in-cabinet #section-inbox .inbox-tab-btn {
    min-width: 0;
    flex: 1 1 0;
    min-height: 40px;
    font-size: 12px;
  }
  body.in-cabinet #section-inbox .site-inbox-item,
  body.in-cabinet #section-inbox .site-inbox-act-row {
    border-radius: 12px;
  }
  body.in-cabinet #section-plans .cabinet-plans-toolbar {
    grid-template-columns: 1fr;
  }
  body.in-cabinet #section-plans .cabinet-plans-toolbar .btn {
    min-height: 46px;
  }
  body.in-cabinet #section-unwatched .base-section-tools-row,
  body.in-cabinet #section-series .base-section-tools-row,
  body.in-cabinet #section-ratings .base-section-tools-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  body.in-cabinet #section-unwatched .base-search-wrap,
  body.in-cabinet #section-series .base-search-wrap,
  body.in-cabinet #section-ratings .base-search-wrap {
    max-width: none;
  }
  body.in-cabinet #section-unwatched .section-filter-row,
  body.in-cabinet #section-series .section-filter-row,
  body.in-cabinet #section-ratings .section-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.in-cabinet #section-unwatched .section-filter-year,
  body.in-cabinet #section-series .section-filter-year,
  body.in-cabinet #section-ratings .section-filter-year {
    width: 100%;
  }
  body.in-cabinet #section-unwatched .section-filter-genre,
  body.in-cabinet #section-series .section-filter-genre,
  body.in-cabinet #section-ratings .section-filter-genre {
    min-width: 0;
  }
  body.in-cabinet #section-premieres .premieres-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.in-cabinet #section-premieres .premieres-toolbar > * {
    width: 100%;
    min-width: 0;
  }
  body.in-cabinet #section-premieres .premiere-poster-tile-grid {
    gap: 10px;
  }
  body.in-cabinet #section-premieres .premiere-poster-tile {
    border-radius: 12px;
  }
  body.in-cabinet #section-whattowatch .wtw-mode-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body.in-cabinet #section-whattowatch .wtw-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body.in-cabinet #section-whattowatch .wtw-actions .btn {
    width: 100%;
  }
  body.in-cabinet #section-whattowatch .wtw-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.in-cabinet #section-settings .settings-panels-grid,
  body.in-cabinet #section-settings .settings-links-grid,
  body.in-cabinet #section-settings .settings-billing-actions {
    grid-template-columns: 1fr;
  }
  body.in-cabinet #section-settings .settings-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.in-cabinet #section-tournament .section-title {
    justify-content: center;
    text-align: center;
  }
  body.in-cabinet #section-tournament .tourn-lb-tabs {
    margin-bottom: 10px;
  }
  body.in-cabinet #section-tournament .home-tourn-row,
  body.in-cabinet #section-tournament .tourn-lb-row {
    border-radius: 12px;
    padding: 11px 12px;
  }
  body.in-cabinet #section-home .cabinet-hint,
  body.in-cabinet .cabinet-empty-hint,
  body.in-cabinet .empty-hint {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,0.68);
  }
  body.in-cabinet .mp-page-loading {
    min-height: min(48vh, 360px);
  }
  body.in-cabinet .user-profile-shell,
  body.in-cabinet .user-profile-page {
    gap: 14px;
  }
  body.in-cabinet .user-profile-name {
    font-size: 38px;
    line-height: 1.04;
  }
  body.in-cabinet .user-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.in-cabinet .user-profile-stat {
    min-height: 84px;
    border-radius: 14px;
    width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  body.in-cabinet .user-profile-stat-label {
    font-size: 10px;
    letter-spacing: 0.03em;
    line-height: 1.15;
    max-width: 100%;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.in-cabinet .cabinet.film-page-mode .cabinet-nav {
    display: grid !important;
  }
  body.in-cabinet .cabinet.film-page-mode .cabinet-topbar {
    display: none !important;
  }
  body.film-standalone-page .film-standalone-nav,
  body.staff-standalone-page .film-standalone-nav,
  body.user-standalone-page .film-standalone-nav,
  body.landing-root-page #landing-root-nav,
  html.mp-guest-cabinet-boot #landing-root-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    display: flex !important;
    justify-content: space-between;
    align-items: stretch;
    gap: 0;
    max-width: none;
    margin: 0 !important;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(12,12,18,0.97);
    backdrop-filter: blur(14px);
    overflow: visible;
  }
  body.film-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(3),
  body.film-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(6),
  body.landing-root-page #landing-root-nav .cabinet-nav-btn:nth-child(3),
  body.landing-root-page #landing-root-nav .cabinet-nav-btn:nth-child(6),
  body.staff-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(3),
  body.staff-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(6),
  body.user-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(3),
  body.user-standalone-page .film-standalone-nav .cabinet-nav-btn:nth-child(6) {
    display: none !important;
  }
  body.film-standalone-page .film-standalone-nav .cabinet-nav-btn,
  body.staff-standalone-page .film-standalone-nav .cabinet-nav-btn,
  body.user-standalone-page .film-standalone-nav .cabinet-nav-btn,
  body.landing-root-page #landing-root-nav .cabinet-nav-btn {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    border-bottom: none !important;
    color: rgba(255,255,255,0.58);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
  body.film-standalone-page .page-shell,
  body.staff-standalone-page .page-shell,
  body.user-standalone-page .page-shell,
  body.landing-root-page .page-shell {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.in-cabinet .user-profile-rating-row {
    min-height: 52px;
  }
  body.in-cabinet .cabinet-settings-root .settings-block,
  body.in-cabinet .cabinet-settings-root .settings-row {
    border-radius: 12px;
  }
  body.in-cabinet #section-shazam .home-shazam-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.in-cabinet #section-shazam #home-shazam-submit {
    width: 100%;
    min-height: 46px;
  }
  body.in-cabinet #section-groups .soc-search-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body.in-cabinet #section-groups .soc-search-btn {
    width: 100%;
    min-height: 42px;
  }
  body.in-cabinet[data-cabinet-section="inbox"] .inbox-fab {
    display: none !important;
  }
  body.in-cabinet[data-cabinet-section="inbox"] .group-context-fab {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .what-is-v2 { padding: 40px 24px; margin: 40px auto; }
  .what-is-v2-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    max-width: 100%;
  }
  .what-is-v2-features--articles {
    justify-content: flex-start;
  }
  .what-is-v2-feature {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 6px 12px;
    min-height: 0;
    white-space: nowrap;
    hyphens: none;
    word-break: keep-all;
  }
  .what-is-v2-feature .feat-icon {
    display: none;
  }
}
/* 375×667 и узкие: аккуратный перенос градиентной фразы */
@media (max-width: 420px) {
  .what-is-v2-title {
    font-size: clamp(1.35rem, 5vw, 1.6rem);
    line-height: 1.3;
  }
  .what-is-v2-title .gradient-text {
    word-break: normal;
    overflow-wrap: normal;
  }
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 48px;
  text-align: center;
}

.section-title.gradient {
  background: none;
  -webkit-text-fill-color: var(--text-primary);
  color: var(--text-primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-bottom: 48px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.bento-grid .card:nth-child(1) {
  grid-column: span 2;
}

.bento-grid .card:nth-child(6) {
  grid-column: span 2;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 45, 123, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.bento-card:hover {
  border-color: #ff2d7b;
  box-shadow: 0 0 30px rgba(255, 45, 123, 0.2);
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.bento-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Текстовые ссылки на тёмном лендинге — читаемый контраст */
#landing .bento-card a,
#landing .mp-llms-summary-body a {
  color: #9fd6ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#landing .bento-card a:hover,
#landing .mp-llms-summary-body a:hover {
  color: #d4ecff;
}

.mp-llms-summary-wrap {
  text-align: left;
}
.mp-llms-summary {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  max-width: 760px;
  margin: 0 auto;
}
.mp-llms-summary-summary {
  cursor: pointer;
  color: var(--text-muted, #aab);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}
.mp-llms-summary-summary::-webkit-details-marker {
  display: none;
}
.mp-llms-summary-body {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted, #aab);
}
.mp-llms-summary-body p {
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin: 60px auto;
}

.step {
  text-align: center;
}

.step-number {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 16px;
}

.step h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cta-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 64px 32px;
  text-align: center;
  margin: 60px auto;
}

.cta-section .section-title {
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item:hover {
  border-color: #ff2d7b;
}

.faq-question {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  font-weight: 600;
  transition: background 0.3s;
}

.faq-item.active .faq-question {
  background: rgba(255, 45, 123, 0.05);
}

.faq-toggle {
  display: inline-block;
  transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.02);
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
}

.faq-answer p {
  color: var(--text-muted);
  line-height: 1.6;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 60px auto;
}

.landing-articles-section .articles-grid {
  margin: 32px auto 20px;
}

.article-card-hidden {
  display: none !important;
}

.articles-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.articles-pagination[hidden] {
  display: none;
}

.articles-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.articles-page-btn:hover:not(:disabled) {
  border-color: #ff2d7b;
  color: #ff2d7b;
}

.articles-page-btn.is-active {
  border-color: #ff2d7b;
  background: rgba(255, 45, 123, 0.12);
  color: #ff2d7b;
}

.articles-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.articles-page-status {
  flex: 0 0 auto;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 4px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .articles-pagination {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    gap: 6px;
    padding: 0 12px 8px;
    scrollbar-width: none;
  }
  .articles-pagination::-webkit-scrollbar {
    display: none;
  }
  .articles-page-btn {
    flex-shrink: 0;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
  }
  .articles-page-status {
    flex-shrink: 0;
    margin-left: 6px;
  }
}

@media (min-width: 769px) {
  .articles-page-status {
    margin-left: 8px;
  }
}

.article-diagram {
  margin: 28px 0;
  padding: 20px 16px 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
}

.article-diagram svg {
  display: block;
  width: 100%;
  min-width: 320px;
  height: auto;
}

.article-diagram-caption {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card:hover {
  border-color: #ff2d7b;
  transform: translateY(-4px);
}

.article-icon {
  font-size: 32px;
}

.article-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 24px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  footer { padding: 32px 24px; margin-top: 24px; }
  .footer-bottom { padding-top: 20px; }
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-extension-cabinet { display: none; }
body.in-public-stats .footer-extension-cabinet {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.footer-extension-cabinet a { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 768px) {
  body.in-cabinet .footer-extension-cabinet {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
  }
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-section h4 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #ff2d7b;
}

.footer-socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-socials a:hover {
  color: #ff2d7b;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.footer a,
.footer-info a,
.footer-link-muted {
  color: var(--text-primary);
}
.footer a:hover,
.footer-info a:hover,
.footer-link-muted:hover {
  color: #ff2d7b;
}

#cabinet {
  display: none;
  position: relative;
  z-index: 1;
  padding: 40px 24px;
}

#cabinet.active {
  display: block;
}

.cabinet-header {
  max-width: 1200px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.account-switcher {
  position: relative;
}

.account-current {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 10px 18px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.account-current:hover {
  border-color: #ff2d7b;
}

.account-name {
  font-weight: 600;
}

.account-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 45, 123, 0.15);
  color: #ff2d7b;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.account-dropdown.open {
  display: block;
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  color: var(--text-primary);
}

.account-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.account-dropdown-item.active {
  background: rgba(255, 45, 123, 0.08);
}

.account-item-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

.account-item-badge.personal {
  background: rgba(255, 45, 123, 0.15);
  color: #ff2d7b;
}

.account-item-badge.group {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}

.account-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 0;
}

.account-dropdown-add,
.account-dropdown-logout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  transition: background 0.2s;
}

.account-dropdown-add {
  color: var(--text-muted);
}

.account-dropdown-add:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.account-dropdown-logout {
  color: #ff4444;
}

.account-dropdown-logout:hover {
  background: rgba(255, 68, 68, 0.08);
}

.account-remove-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.account-remove-btn:hover {
  background: rgba(255, 68, 68, 0.25);
}

.cabinet-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}

.cabinet-tabs::-webkit-scrollbar {
  display: none;
}

.cabinet-tabs-wrap {
  position: relative;
}

.cabinet-tabs-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, var(--bg-main));
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}

.cabinet-tabs-wrap.has-overflow::after {
  opacity: 1;
}

.cabinet-tab {
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.cabinet-tab.active {
  color: #ff2d7b;
  border-bottom-color: #ff2d7b;
}

.cabinet-content {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
}

.cabinet-content.active {
  display: block;
}

.cabinet-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.cabinet-search {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.cabinet-search::placeholder {
  color: var(--text-muted);
}

.cabinet-select {
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: #ff2d7b;
  box-shadow: 0 0 20px rgba(255, 45, 123, 0.15);
}

.film-card-main {
  display: flex;
  gap: 16px;
  padding: 16px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.card-poster-wrap {
  width: 96px;
  height: 144px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a22;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: #1a1a22;
}

.film-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.film-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  word-break: break-word;
}

.film-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.film-status {
  font-size: 13px;
  color: var(--text-muted);
}

.film-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 0 16px 16px;
  margin-top: auto;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.film-buttons .btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 50px;
}
.film-buttons .film-streaming-btn .streaming-btn-emoji { margin-left: 4px; }

/* Кнопки на всю ширину карточки, овальные (50px) */
.card .film-buttons,
.card.series-card .film-buttons {
  width: 100%;
  min-width: 0;
}
.card .film-buttons .btn,
.card.series-card .film-buttons .btn {
  border-radius: 50px;
  flex: 1 1 0;
  min-width: 0;
}

.film-buttons .btn-sm {
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s;
}

.btn-sm-primary {
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: white;
  border: none;
}

.btn-sm-primary:hover {
  transform: translateY(-1px);
}

.btn-sm-secondary {
  background: transparent;
  color: #eeeef0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-sm-secondary:hover {
  border-color: #ff2d7b;
  color: #ff2d7b;
}

.plan-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  color: var(--text-primary);
  text-decoration: none;
}

.plan-card:hover {
  border-color: #ff2d7b;
  box-shadow: 0 0 20px rgba(255, 45, 123, 0.15);
}

.plan-card-poster {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #1a1a22;
  display: block;
}

.plan-card-info {
  padding: 24px;
}

.plan-card-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.plan-card-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.plan-card-buttons {
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px;
  margin-top: auto;
}

/* Кабинет: шаринг события в паблик (POST /api/site/plans/:id/share → /p/<token>) */
.plan-card-share-row {
  margin: 10px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-card-share-btn {
  font-size: 13px !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(255, 181, 71, 0.45) !important;
  color: #ffb347 !important;
  background: rgba(255, 181, 71, 0.1) !important;
  border-radius: 12px !important;
  cursor: pointer;
  font-weight: 600;
}
.plan-card-share-btn:hover {
  background: rgba(255, 181, 71, 0.18) !important;
  border-color: #ffb347 !important;
}

.plan-card-buttons .btn-small,
.plan-card-buttons .btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s;
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #ff2d7b;
  border-color: #ff2d7b;
}

.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ——— Логин: сетка 2×2 + почта (cabinet modal) ——— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#login-modal .modal-content {
  max-width: 440px;
  padding: 36px 28px 32px;
}

#login-modal .modal-close {
  z-index: 2;
  pointer-events: auto;
}

.login-methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.yandex-id-login-btn {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.15s;
}

.yandex-id-login-btn:hover:not(:disabled):not(.is-locked) {
  opacity: 0.92;
}

.yandex-id-login-btn:disabled,
.yandex-id-login-btn.is-locked {
  opacity: 0.52;
  cursor: pointer;
}

.yandex-id-login-btn__svg {
  display: block;
  width: 100%;
  height: 56px;
  pointer-events: none;
}

.yandex-id-login-btn__svg--short {
  display: none;
}

@media (max-width: 220px) {
  .yandex-id-login-btn__svg--full {
    display: none;
  }

  .yandex-id-login-btn__svg--short {
    display: block;
  }
}

.login-oauth-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.login-oauth-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.login-oauth-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.login-oauth-btn.is-locked {
  opacity: 0.52;
  cursor: pointer;
}

.login-oauth-google {
  background: #fff;
  border-color: #dadce0;
}

.login-oauth-google:hover:not(:disabled) {
  background: #f8f9fa;
}

.login-oauth-yandex {
  background: #fff;
  border-color: #dadce0;
}

.login-oauth-yandex:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #dadce0;
}

.login-oauth-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Google «G» (официальная палитра) */
.login-oauth-icon--google {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303C33.432 32.905 29.307 36 24 36c-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='m6.306 14.691 6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238C29.211 35.091 26.715 36 24 36c-5.282 0-9.479-3.334-11.093-8.032l-6.548 5.045C9.876 39.934 16.498 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303c-.792 2.237-2.231 4.166-4.087 5.571l.003-.002 6.19 5.238C38.083 35.352 44 30.294 44 24c0-1.341-.138-2.65-.389-3.917z'/%3E%3C/svg%3E");
}

.login-oauth-icon--yandex {
  display: block;
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='14' fill='%23FC3F1D'/%3E%3Ctext x='14' y='19' text-anchor='middle' fill='%23fff' font-size='15' font-weight='700' font-family='system-ui,sans-serif'%3E%D0%AF%3C/text%3E%3C/svg%3E");
}
.login-oauth-img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.login-oauth-img--yandex {
  display: none;
}
.login-oauth-telegram {
  background: #fff;
  border-color: #dadce0;
  overflow: hidden;
}

.login-oauth-telegram:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #dadce0;
}

.login-oauth-icon--telegram {
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Ccircle cx='120' cy='120' r='120' fill='%232AABEE'/%3E%3Cpath fill='%23fff' d='M98.6 174.4c-3.9 0-3.2-1.5-4.5-5.2L82.8 132l87-51.6'/%3E%3Cpath fill='%23fff' d='M98.6 174.4c3 0 4.3-1.4 6-3l16-15.5-20-12.1'/%3E%3Cpath fill='%23d2e5f1' d='m100.6 143.8 48.4 35.7c5.5 3 9.5 1.5 10.9-5.1l19.7-92.9c2-8.1-3.1-11.8-8.4-9.4L55.6 116.7c-7.9 3.2-7.8 7.6-1.4 9.6l29.7 9.3 68.8-43.4c3.2-2 6.2-.9 3.8 1.2'/%3E%3C/svg%3E");
}

.login-oauth-bot {
  font-size: 26px;
  line-height: 1;
  padding: 0;
}

.login-tg-widget-wrap {
  overflow: hidden;
  transition: opacity 0.15s;
}

.login-tg-widget-wrap--locked {
  opacity: 0.52;
}

.login-tg-widget-mount {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.01;
  pointer-events: none;
  z-index: 2;
}

.login-tg-widget-mount iframe {
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px !important;
}

.login-oauth-privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 0;
  cursor: pointer;
  line-height: 1.45;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.login-oauth-privacy input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: #ff2d7b;
}

.login-oauth-privacy a {
  color: var(--accent, #ff5aa5);
}

.login-oauth-privacy.needs-attention {
  border-color: rgba(255, 45, 123, 0.65);
  background: rgba(255, 45, 123, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 45, 123, 0.12);
}

.login-privacy-hint {
  display: none !important;
}

.login-bot-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-bot-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.login-bot-code-input {
  flex: 1 1 140px;
  text-align: center;
  letter-spacing: 0.12em;
}

.login-bot-submit {
  flex: 0 0 auto;
  min-width: 100px;
}

.login-bot-tg-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--accent, #ff5aa5);
  text-decoration: none;
}

.login-bot-tg-link:hover {
  text-decoration: underline;
}

.login-email-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.login-register-card {
  margin-top: 0;
}
.login-register-title,
.login-oauth-caption,
.login-email-caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.login-oauth-caption {
  margin-top: 0;
  text-align: center;
}
.login-register-form {
  display: grid;
  gap: 10px;
}
.login-register-name-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.login-register-input {
  text-align: left !important;
  letter-spacing: normal !important;
  font-size: 16px !important;
}

.login-email-request-row,
.login-email-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.login-email-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: left !important;
  letter-spacing: normal !important;
  font-size: 16px !important;
}

#login-modal .login-register-input::placeholder,
#login-modal .login-email-input::placeholder {
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.35);
}

#login-modal .login-bot-code-input::placeholder,
#login-modal .login-email-code-input::placeholder {
  letter-spacing: normal;
}

.login-email-send-btn {
  flex: 0 0 auto;
  min-width: 72px;
  padding-left: 16px;
  padding-right: 16px;
}

.login-email-code-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  letter-spacing: 0.08em;
}

.login-email-back-btn {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

@media (max-width: 520px) {
  #login-modal .modal-content {
    padding: 28px 18px 24px;
    width: 92%;
  }

  .login-methods-grid {
    gap: 8px;
  }
  .login-register-name-row {
    grid-template-columns: 1fr;
  }

  .login-oauth-btn,
  .login-tg-widget-wrap {
    min-height: 48px;
  }

  .login-bot-form {
    flex-direction: column;
  }

  .login-bot-submit {
    width: 100%;
  }

  .login-email-request-row,
  .login-email-code-row {
    grid-template-columns: 1fr;
  }

  .login-email-send-btn {
    width: 100%;
  }
}

.modal-hint {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-form {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
}

.modal-input {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color 0.3s;
}

.modal-input:focus {
  border-color: #9b4dff;
}

.modal-input::placeholder {
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.3em;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.modal-button {
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.modal-button-primary {
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: white;
  white-space: nowrap;
  padding: 14px 28px;
}

.modal-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 45, 123, 0.3);
}

.modal-button-telegram {
  width: 100%;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: white;
  margin-bottom: 0;
}

.modal-button-telegram:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 45, 123, 0.3);
}

.about-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.about-author {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 24px;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.about-bio {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.about-contact { font-size: 15px; margin-bottom: 32px; }
.about-contact a { color: #ff2d7b; text-decoration: none; }
.about-contact a:hover { text-decoration: underline; }
.about-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.about-links a {
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}
.about-links a:hover { border-color: #ff2d7b; color: #ff2d7b; }

/* ===== TABLET (768px) ===== */
@media (max-width: 768px) {
  #landing {
    padding: 28px 20px 48px;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-description {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    font-size: 15px;
    padding: 16px 24px;
    height: 54px;
  }

  .section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 32px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid .card:nth-child(1),
  .bento-grid .card:nth-child(6) {
    grid-column: span 1;
  }

  .bento-card {
    padding: 24px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .what-is {
    padding: 32px 24px;
    font-size: 16px;
  }

  .footer-sections {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cabinet-header .section-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem) !important;
  }

  .account-current {
    padding: 8px 12px;
    font-size: 13px;
  }

  .account-dropdown {
    min-width: 200px;
  }

  .cabinet-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 10px 14px;
  }

  .cards-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .header-content {
    flex-direction: row;
    gap: 12px;
  }

  .logo {
    font-size: 16px;
  }

  .logo img {
    width: 28px;
    height: 28px;
  }

  .header-buttons .btn-primary {
    padding: 10px 20px;
    font-size: 14px;
    height: auto;
  }

  .header-login-btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 11px;
  }

  .plan-card {
    max-width: 100%;
  }

  .plan-card-buttons {
    flex-direction: column;
  }

  .plan-card-buttons .btn-small,
  .plan-card-buttons .btn-sm {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .modal-content {
    padding: 32px 24px;
    margin: 16px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-form {
    flex-direction: column;
    gap: 12px;
  }

  .modal-button-primary {
    width: 100%;
  }

  section {
    padding: 40px 20px;
  }

  .faq-answer {
    font-size: 14px;
  }

  .about-author {
    width: 100px;
    height: 100px;
  }

  .about-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ===== MOBILE SMALL (480px) ===== */
@media (max-width: 480px) {
  #landing {
    padding: 20px 16px 40px;
  }

  .hero-label {
    font-size: 11px;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .hero-description {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    font-size: 14px;
    padding: 14px 20px;
    height: 48px;
  }

  section {
    padding: 32px 16px;
  }

  .section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
    margin-bottom: 24px;
  }

  .bento-card {
    padding: 20px;
  }

  .bento-card h3 {
    font-size: 17px;
  }

  .bento-card p {
    font-size: 14px;
  }

  .step-number {
    font-size: 32px;
  }

  .what-is {
    padding: 24px 20px;
    font-size: 15px;
    margin: 32px auto;
  }

  .faq-question {
    font-size: 15px;
    padding: 16px;
  }

  .faq-answer {
    padding: 0 16px 16px;
    font-size: 13px;
  }

  header {
    padding: 12px 16px;
  }

  .logo {
    font-size: 14px;
    gap: 8px;
  }

  .logo img {
    width: 24px;
    height: 24px;
  }

  .header-buttons .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
  }

  .modal-content {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-hint {
    font-size: 13px;
  }

  .modal-input {
    font-size: 16px;
    padding: 12px 14px;
  }

  .footer-content {
    padding: 40px 16px 20px;
  }

  .footer-logo {
    font-size: 18px;
  }

  .about-content h3 {
    font-size: 20px;
  }

  .about-content p {
    font-size: 14px;
  }

  .plan-card {
    padding: 16px;
  }

  .plan-card h3 {
    font-size: 15px;
  }

  .plan-card p {
    font-size: 13px;
  }

  .cards-list {
    gap: 12px;
  }
}

/* Subpages: terms, articles */
.subpage-wrapper { min-height: 100vh; }
.site-header-subpage {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(9, 9, 11, 0.7);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
}
.subpage-main { padding: 40px 24px 60px; max-width: 800px; margin: 0 auto; }
.article-content {
  padding: 0;
  max-width: none;
  text-align: left;
}
.article-content h1 { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 12px; text-align: left; }
.article-content .date { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; text-align: left; }
.article-content h2,
.article-content h3 { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; margin: 28px 0 12px; text-align: left; }
.article-content h3 { font-size: 17px; margin: 22px 0 10px; }
.article-content p,
.article-content li { margin-bottom: 12px; line-height: 1.7; color: var(--text-muted); text-align: left; }
.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 1.45em;
  list-style-position: outside;
  text-align: left;
}
.article-content li::marker { color: rgba(255, 255, 255, 0.45); }
.article-content a { color: var(--text-primary); }
.article-content a:hover { color: #ff2d7b; }
.article-content code { background: rgba(255, 45, 123, 0.15); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.terms-page .terms-title { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.terms-lead { font-size: 18px; color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; }
.terms-block { margin-bottom: 36px; }
.terms-block h2 { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.terms-block p, .terms-block li { color: var(--text-muted); }
.terms-block code { background: rgba(255, 45, 123, 0.15); padding: 2px 6px; border-radius: 4px; }
.terms-footer-note { margin-top: 40px; font-size: 14px; color: var(--text-muted); }
.back-links { margin-top: 32px; font-size: 15px; }
.back-links a { color: var(--text-primary); }
.back-links a:hover { color: #ff2d7b; }
.site-header-subpage .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
}
.site-header-subpage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.article-cta {
  margin-top: 36px;
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.article-cta-lead {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.article-cta .footer-store-row {
  justify-content: center;
  margin-bottom: 14px;
}
.article-cta-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}
.article-cta-secondary a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}
.article-cta-secondary a:hover { color: #ff2d7b; }
.article-cta-secondary span { color: rgba(255, 255, 255, 0.22); }
.article-footer-apps {
  margin-bottom: 20px;
  text-align: center;
}
.article-footer-apps h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-content th, .article-content td { border: 1px solid var(--border-color); padding: 12px 16px; text-align: left; color: var(--text-muted); }
.article-content th { background: var(--bg-surface); font-weight: 600; color: var(--text-primary); }

/* Ratings: member filter (group cabinets) */
.section-ratings-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ratings-member-select { padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; }

/* Stats section */
.month-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.month-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.month-pill { padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08)); background: var(--bg-surface); color: var(--text-muted); transition: all 0.3s ease; }
.month-pill:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); background: var(--bg-surface-alt, #1a1a22); }
.month-pill.active { background: linear-gradient(135deg, #ff2d7b, #9b4dff); color: white; border-color: transparent; }
.year-select { padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; font-family: inherit; border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08)); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b76' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.stats-month-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.stats-month-selector label { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.stats-debug-link { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.stats-debug-link:hover { color: var(--primary-color); }
.stats-month-select, .stats-year-select { padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; }
.stats-loading, .stats-error { margin-bottom: 20px; color: var(--text-muted); }
.stats-error { color: #ff4444; }
.stats-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; }
.stat-card-value { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.stat-card-label { font-size: 13px; color: var(--text-muted); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr; } }
.stats-block { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; }
.stats-block-full { grid-column: 1 / -1; }
.stats-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.stats-block-title > span:last-child { min-width: 0; }
.stats-block-title-icon { flex-shrink: 0; color: rgba(255, 255, 255, 0.88); }
.stats-rating-inline,
.stats-inline-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.top-film-rating .stats-rating-inline { gap: 5px; }
.mp-action-btn,
.tv-launch-title,
.mp-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tv-launch-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.header-search-icon-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.header-search-glyph {
  display: block;
  flex-shrink: 0;
}

.header-search-glyph.hidden {
  display: none !important;
}

body.header-search-dropdown-open .header-search-glyph--search {
  display: none !important;
}

body.header-search-dropdown-open .header-search-glyph--close {
  display: block !important;
  color: #fff;
}

.header-search-mic svg {
  display: block;
}

.header-search .header-search-icon.mp-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.72;
}
.header-search .header-search-icon.mp-icon i { font-size: 18px; }
.base-search-icon.mp-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.55;
}
.base-search-icon.mp-icon i { font-size: 16px; }
.top-film-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.top-film-row:last-child { border-bottom: none; }
.top-film-rank { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 900; width: 36px; text-align: center; flex-shrink: 0; }
.top-film-row:nth-child(1) .top-film-rank { color: #fbbf24; }
.top-film-row:nth-child(2) .top-film-rank { color: #c0c0c0; }
.top-film-row:nth-child(3) .top-film-rank { color: #cd7f32; }
.top-film-row:nth-child(n+4) .top-film-rank { color: var(--text-muted); }
.top-film-poster { width: 40px; height: 56px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.top-film-info { flex: 1; min-width: 0; }
.top-film-name { font-weight: 600; font-size: 14px; }
.top-film-meta { font-size: 12px; color: var(--text-muted); }
.top-film-rating { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.top-films-expand-wrap { margin-top: 12px; }
.top-films-expand-btn { padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--bg-surface-alt, #1a1a22); color: var(--text-primary); border: 1px solid var(--border-color); font-family: inherit; transition: all 0.2s; }
.top-films-expand-btn:hover { border-color: #ff2d7b; color: #ff2d7b; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rating-bar-label { font-size: 14px; font-weight: 600; width: 24px; text-align: right; flex-shrink: 0; }
.rating-bar-track { flex: 1; height: 24px; background: var(--bg-surface-alt); border-radius: 6px; overflow: hidden; }
.rating-bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: white; transition: width 0.6s ease; }
.platform-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.watched-block-wrap { }
.watched-list-collapsed .watched-item:nth-child(n+17) { display: none; }
@media (max-width: 768px) {
  .watched-list-collapsed .watched-item:nth-child(n+8) { display: none; }
}
.watched-expand-wrap { margin-top: 16px; }
.watched-expand-btn { padding: 10px 20px; border-radius: 50px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--bg-surface-alt, #1a1a22); color: var(--text-primary); border: 1px solid var(--border-color); font-family: inherit; transition: all 0.2s; }
.watched-expand-btn:hover { border-color: #ff2d7b; color: #ff2d7b; }

.watched-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.watched-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--bg-surface-alt, #1a1a22); border: 1px solid var(--border-color); border-radius: 14px; transition: all 0.2s; }
.watched-item:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-1px); }
.watched-poster { width: 40px; height: 56px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg-main, #09090b); }
.watched-info { flex: 1; min-width: 0; }
.watched-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watched-meta { font-size: 12px; color: var(--text-muted); }
.watched-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 50px; flex-shrink: 0; }
.badge-film { background: rgba(255, 45, 123, 0.15); color: #ff2d7b; }
.badge-series { background: rgba(0, 212, 255, 0.15); color: #00d4ff; }
.badge-cinema { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.watched-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.watched-row:last-child { border-bottom: none; }
.film-rated-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Group stats */
.stats-group-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; min-width: 0; }
.stats-group-header-inner { flex: 1; min-width: 0; overflow: hidden; }
.stats-group-title { font-family: 'Unbounded', sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; word-break: break-word; }
.stats-group-name { background: linear-gradient(135deg, #ff2d7b, #9b4dff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stats-group-meta { font-size: 14px; color: var(--text-muted); }
.stats-personal-share { margin-bottom: 24px; }
.stats-share-views { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 8px; }
.stats-personal-share-note { font-size: 14px; color: var(--text-muted); }
.stats-personal-share-note a { color: #ff2d7b; text-decoration: none; }
.stats-personal-share-note a:hover { text-decoration: underline; }
.stats-group-share { display: flex; align-items: center; gap: 8px; background: var(--bg-surface); border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08)); border-radius: 12px; padding: 8px 12px 8px 16px; font-size: 13px; color: var(--text-muted); min-width: 0; }
.stats-group-share-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.stats-group-copy-btn { flex-shrink: 0; }
.stats-group-copy-btn { padding: 6px 14px; border-radius: 8px; background: linear-gradient(135deg, #ff2d7b, #9b4dff); color: white; border: none; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; }

.stat-card-pink .stat-card-value { color: #ff2d7b; }
.stat-card-purple .stat-card-value { color: #9b4dff; }
.stat-card-cyan .stat-card-value { color: #00d4ff; }
.stat-card-green .stat-card-value { color: #34d399; }
.stat-card-amber .stat-card-value { color: #fbbf24; }
.stat-card-icon { font-size: 24px; margin-bottom: 8px; }
.stats-group-summary .stat-card { position: relative; overflow: hidden; }
.stats-group-summary .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 16px 16px 0 0; }
.stat-card-pink::before { background: #ff2d7b; }
.stat-card-purple::before { background: #9b4dff; }
.stat-card-cyan::before { background: #00d4ff; }
.stat-card-green::before { background: #34d399; }
.stat-card-amber::before { background: #fbbf24; }

.stats-mvp-card { background: linear-gradient(135deg, rgba(255,45,123,0.08), rgba(155,77,255,0.08)); border: 1px solid rgba(255,45,123,0.2); border-radius: 20px; padding: 32px; text-align: center; margin-bottom: 32px; position: relative; }
.stats-mvp-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(135deg, #ff2d7b, #9b4dff); border-radius: 20px 20px 0 0; }
.stats-mvp-crown { font-size: 36px; margin-bottom: 8px; }
.stats-mvp-card .avatar { margin-left: auto; margin-right: auto; }
.stats-mvp-title { font-family: 'Unbounded', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 12px; }
.stats-mvp-name { font-family: 'Unbounded', sans-serif; font-size: 22px; font-weight: 700; background: linear-gradient(135deg, #ff2d7b, #9b4dff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stats-mvp-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; margin-bottom: 16px; }
.stats-mvp-stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.stats-mvp-stat { text-align: center; }
.stats-mvp-stat-val { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; display: block; }
.stats-mvp-stat-lbl { font-size: 12px; color: var(--text-muted); }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; color: white; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-xl { width: 72px; height: 72px; font-size: 28px; }
.stats-top-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 50px; font-size: 10px; font-weight: 600; background: var(--bg-surface-alt, #1a1a22); border: 1px solid var(--border-color); margin-right: 4px; margin-top: 4px; }
.stats-top-voters { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.top-film-avg-sub { font-size: 10px; color: var(--text-muted); }
.stats-block-sub { font-size: 13px; color: var(--text-muted); margin: -12px 0 16px; }

.rating-bar-count { font-size: 13px; color: var(--text-muted); width: 28px; flex-shrink: 0; text-align: right; }

.stats-lb-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-shrink: 0; padding-bottom: 4px; }
.stats-lb-tab { padding: 6px 14px; flex-shrink: 0; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--bg-surface-alt, #1a1a22); color: var(--text-muted); border: 1px solid var(--border-color); transition: all 0.2s; font-family: inherit; }
.stats-lb-tab:hover { color: var(--text-primary); }
.stats-lb-tab.active { background: #9b4dff; color: white; border-color: #9b4dff; }
.stats-lb-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.stats-lb-row:last-child { border-bottom: none; }
.stats-lb-rank { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 900; width: 28px; text-align: center; flex-shrink: 0; }
.stats-lb-row:nth-child(1) .stats-lb-rank { color: #fbbf24; }
.stats-lb-row:nth-child(2) .stats-lb-rank { color: #c0c0c0; }
.stats-lb-row:nth-child(3) .stats-lb-rank { color: #cd7f32; }
.stats-lb-info { flex: 1; min-width: 0; overflow: hidden; }
.stats-lb-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-lb-bar-wrap { flex: 1; height: 8px; background: var(--bg-surface-alt, #1a1a22); border-radius: 4px; overflow: hidden; min-width: 60px; max-width: 140px; flex-shrink: 0; }
.stats-lb-bar { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.stats-lb-value { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; flex-shrink: 0; }

.stats-contro-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.stats-contro-row:last-child { border-bottom: none; }
.stats-contro-poster { width: 48px; height: 68px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-surface-alt, #1a1a22); }
.stats-contro-info { flex: 1; min-width: 0; }
.stats-contro-title { font-weight: 600; font-size: 15px; }
.stats-contro-year { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.stats-contro-ratings { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.stats-contro-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; background: var(--bg-surface-alt, #1a1a22); border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08)); }
.stats-contro-spread { font-family: 'Unbounded', sans-serif; font-size: 16px; font-weight: 700; color: #ff2d7b; flex-shrink: 0; text-align: center; min-width: 50px; }
.stats-contro-spread-lbl { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.stats-compat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stats-compat-card { background: var(--bg-surface-alt, #1a1a22); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; text-align: center; transition: all 0.3s; }
.stats-compat-card:hover { border-color: rgba(255,255,255,0.12); }
.stats-compat-avatars { display: flex; justify-content: center; align-items: center; gap: -10px; margin-bottom: 10px; }
.stats-compat-avatars .avatar:last-child { margin-left: -10px; }
.stats-compat-ring { width: 80px; height: 80px; margin: 0 auto 8px; position: relative; }
.stats-compat-ring svg { transform: rotate(-90deg); }
.stats-compat-value { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; }
.stats-compat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.stats-genre-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stats-genre-row:last-child { margin-bottom: 0; }
.stats-genre-label { font-size: 12px; font-weight: 600; width: 90px; text-align: right; flex-shrink: 0; color: var(--text-muted); }
.stats-genre-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.stats-genre-bar-line { display: flex; align-items: center; gap: 6px; }
.stats-genre-bar-user { font-size: 10px; color: var(--text-muted); width: 16px; flex-shrink: 0; }
.stats-genre-bar-track { flex: 1; height: 14px; background: var(--bg-surface-alt, #1a1a22); border-radius: 4px; overflow: hidden; }
.stats-genre-bar-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 6px; font-size: 10px; font-weight: 700; color: white; transition: width 0.6s ease; min-width: 20px; }
.stats-genre-legend { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.stats-genre-legend span { display: flex; align-items: center; gap: 6px; }

.stats-achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.stats-achievement { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; overflow: hidden; background: var(--bg-surface-alt, #1a1a22); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; text-align: center; transition: all 0.3s; box-sizing: border-box; }
.stats-achievement:hover { transform: translateY(-2px); }
.stats-achievement.earned { border-color: rgba(251, 191, 36, 0.3); }
.stats-achievement.earned::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(251,191,36,0.06) 0%, transparent 70%); border-radius: 14px; pointer-events: none; }
.stats-achievement-icon { font-size: 32px; margin-bottom: 8px; flex-shrink: 0; }
.stats-achievement-name { width: 100%; font-size: 11px; font-weight: 700; margin-bottom: 4px; overflow-wrap: break-word; word-break: break-word; }
.stats-achievement-desc { width: 100%; font-size: 11px; color: var(--text-muted); line-height: 1.3; overflow-wrap: break-word; word-break: break-word; }
.stats-achievement-holder { width: 100%; font-size: 11px; color: #fbbf24; font-weight: 600; margin-top: 6px; overflow-wrap: break-word; word-break: break-word; }
.stats-achievement-locked { color: var(--text-muted); }

.stats-heatmap-wrap { overflow-x: auto; padding: 16px 0; min-height: 140px; }
.stats-heatmap { display: flex; gap: 6px; }
.stats-heatmap-col { display: flex; flex-direction: column; gap: 6px; }
.stats-heatmap-day { font-size: 10px; color: var(--text-muted); text-align: center; margin-bottom: 4px; }
.stats-heatmap-cell { width: 24px; height: 24px; min-width: 24px; min-height: 24px; border-radius: 4px; background: var(--bg-surface-alt, #1a1a22); transition: all 0.2s; }
.stats-heatmap-cell:hover { transform: scale(1.3); z-index: 1; position: relative; }
.stats-heatmap-cell.l1 { background: rgba(155, 77, 255, 0.2); }
.stats-heatmap-cell.l2 { background: rgba(155, 77, 255, 0.4); }
.stats-heatmap-cell.l3 { background: rgba(155, 77, 255, 0.6); }
.stats-heatmap-cell.l4 { background: rgba(155, 77, 255, 0.85); }
.stats-heatmap-legend { display: flex; gap: 8px; margin-bottom: 12px; font-size: 11px; color: var(--text-muted); }
.stats-heatmap-legend span { display: flex; align-items: center; gap: 4px; }
.stats-heatmap-legend-bar { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--text-muted); }
@media (max-width: 600px) {
  .stats-heatmap-cell { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .stats-heatmap { gap: 4px; }
  .stats-heatmap-col { gap: 4px; }
}

/* Stats profile (compact header for public stats page) */
.stats-profile {
  background: var(--bg-surface);
  border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08));
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.stats-profile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
}
.stats-profile-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stats-profile-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: #9b4dff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.stats-profile-info { flex: 1; min-width: 180px; }
.stats-profile-name { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; line-height: 1.2; }
.stats-profile-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 12px; flex-wrap: wrap; }
.stats-profile-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.badge-mini {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
  transition: all 0.25s; cursor: default; position: relative;
}
.badge-mini:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.15); }
.badge-mini-icon { font-size: 14px; }
.badge-mini.rare { border-color: rgba(0,212,255,0.2); background: rgba(0,212,255,0.05); }
.badge-mini.rare .badge-mini-name { color: #00d4ff; }
.badge-mini.epic { border-color: rgba(155,77,255,0.2); background: rgba(155,77,255,0.05); }
.badge-mini.epic .badge-mini-name { color: #9b4dff; }
.badge-mini.legendary {
  border-color: rgba(251,191,36,0.25);
  background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(255,45,123,0.04));
}
.badge-mini.legendary .badge-mini-name {
  background: linear-gradient(135deg, #fbbf24, #ff2d7b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge-mini .badge-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #1e1e28; border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08));
  border-radius: 10px; padding: 10px 14px; min-width: 180px;
  font-size: 11px; color: var(--text-muted); opacity: 0; pointer-events: none;
  transition: opacity 0.2s; z-index: 10; text-align: center; line-height: 1.4; white-space: normal;
}
.badge-mini .badge-tip strong { display: block; color: var(--text-primary); font-size: 12px; margin-bottom: 3px; }
.badge-mini:hover .badge-tip { opacity: 1; }
.badges-more {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 14px; border-radius: 50px; font-size: 12px; font-weight: 600;
  color: #9b4dff; background: rgba(155,77,255,0.08); border: 1px solid rgba(155,77,255,0.15);
  cursor: pointer; text-decoration: none; transition: all 0.25s;
}
.badges-more:hover { background: rgba(155,77,255,0.15); transform: translateY(-1px); }

/* Центрированный диалог — .cursor/rules/ui-popups-modals.mdc */
.mp-dialog-overlay,
.mp-surprise-dialog-overlay,
.ach-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.62);
  overflow: hidden;
}
.mp-dialog-card,
.mp-surprise-dialog-card,
.ach-celebration-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  max-height: min(88vh, calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-y: auto;
  margin: auto;
  flex-shrink: 0;
  border-radius: 22px;
  padding: 22px 20px 18px;
  background: var(--bg-surface, #131318);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
  box-sizing: border-box;
}
.ach-celebration-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber, #fbbf24);
  margin-bottom: 10px;
}
.ach-celebration-icon-wrap {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff7d6 0%, #fbbf24 42%, #b45309 100%);
  border: 3px solid #fde68a;
  box-shadow: 0 0 22px 4px rgba(251, 191, 36, 0.45);
}
.ach-celebration-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}
.ach-celebration-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.ach-celebration-rarity {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #78350f;
  background: linear-gradient(90deg, #fde68a, #fbbf24);
}
.ach-celebration-btn {
  width: 100%;
  margin-top: 4px;
}

/* Achievement panel (Все ачивки) */
.ach-panel {
  display: none;
  background: var(--bg-surface, #131318);
  border: 1px solid var(--border-color-alt, rgba(255,255,255,0.08));
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 28px;
  animation: achPanelSlide 0.3s ease;
}
.ach-panel.open { display: block; }
@keyframes achPanelSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ach-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.ach-panel-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.ach-panel-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-surface-alt, #1a1a22);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.ach-panel-close:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.ach-panel-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ach-panel-filters .ach-panel-filter-btn { flex-shrink: 0; }
.ach-panel-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ach-panel-category { }
.ach-panel-category-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.ach-panel-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.ach-panel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-surface-alt, #1a1a22);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.ach-panel-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-1px); }
.ach-panel-card.locked { opacity: 0.35; }
.ach-panel-card.earned { border-color: rgba(251,191,36,0.2); }
.ach-panel-icon { font-size: 24px; flex-shrink: 0; }
.ach-panel-info { flex: 1; min-width: 0; }
.ach-panel-name { font-weight: 700; font-size: 13px; }
.ach-panel-desc { font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.ach-panel-rarity {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 2px 8px; border-radius: 50px;
  flex-shrink: 0;
}
.ach-panel-rarity.r-common { background: rgba(107,107,118,0.15); color: var(--text-muted); }
.ach-panel-rarity.r-rare { background: rgba(0,212,255,0.12); color: #00d4ff; }
.ach-panel-rarity.r-epic { background: rgba(155,77,255,0.12); color: #9b4dff; }
.ach-panel-rarity.r-legendary { background: rgba(251,191,36,0.12); color: #fbbf24; }
.ach-panel-progress {
  height: 4px; background: var(--bg-main, #09090b);
  border-radius: 2px; margin-top: 6px; overflow: hidden;
}
.ach-panel-progress-fill { height: 100%; border-radius: 2px; }
.ach-panel-filter-btn {
  font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: all 0.2s;
}
.ach-panel-filter-btn:hover { color: var(--text-primary); }

@media (max-width: 768px) {
  .stats-profile-top { flex-direction: column; text-align: center; align-items: center; }
  .stats-profile-badges { justify-content: center; }
  .stats-profile-meta { justify-content: center; }
  .ach-panel-category-grid { grid-template-columns: 1fr; }
}

/* Public stats page (share link) */
#public-stats { padding: 32px 0 80px; min-height: 100vh; }
@media (max-width: 768px) {
  #public-stats { padding: 24px 0 32px; min-height: auto; }
}
#public-stats .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 420px) {
  #public-stats .container { padding: 0 12px; }
  .stats-block { padding: 16px; }
  #public-stats-content { overflow-x: hidden; max-width: 100%; }
}
.public-stats-header-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.public-stats-owner-bar {
  margin: 0 0 16px;
}
.public-stats-owner-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  max-width: 100%;
}
.public-stats-owner-link:hover { opacity: 0.9; }
.public-stats-owner-back {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
}
.public-stats-owner-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff2d7b, #7c3cff);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.public-stats-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.public-stats-owner-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.public-stats-page-title {
  margin-top: 0;
  margin-bottom: 12px;
}
body.in-public-stats #site-header {
  display: block;
}
body.in-public-stats .header-search {
  display: flex;
}
.public-stats-header-wrap .logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text-primary); text-decoration: none; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 20px; }
.public-stats-header-wrap .logo img { width: 32px; height: 32px; border-radius: 8px; }
.public-stats-subtitle { font-size: 18px; color: var(--text-muted); margin: 12px 0 0; }
.public-stats-selector { margin-bottom: 24px; }

@media (max-width: 768px) {
  .stats-compat-grid { grid-template-columns: 1fr; }
  .stats-group-header { flex-direction: column; flex-wrap: wrap; }
  .stats-group-header-inner { min-width: 0; max-width: 100%; }
  .stats-group-title { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .stats-group-name { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .stats-group-share { min-width: 0; max-width: 100%; }
  .stats-group-share-url { min-width: 0; }
  .stats-achievements-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .stats-grid, .stats-group-grid { min-width: 0; grid-template-columns: 1fr; }
  .stats-block { min-width: 0; max-width: 100%; overflow: hidden; box-sizing: border-box; }
  .rating-bar-row { min-width: 0; }
  .rating-bar-track { min-width: 0; }
  #section-stats, #section-stats .stats-content, #section-stats .stats-group-grid { overflow-x: hidden; max-width: 100%; }
  /* Блок «Всё просмотренное»: minmax(280px) вызывал overflow на 375px */
  .watched-list { grid-template-columns: minmax(0, 1fr); }
  /* Leaderboard mobile: hide bar, show colored value */
  .stats-lb-bar-wrap { display: none; }
  .stats-lb-value { padding: 4px 12px; border-radius: 8px; font-size: 16px; }
  .stats-lb-value.value-high { background: linear-gradient(135deg, rgba(52,211,153,0.25), rgba(251,191,36,0.2)); color: #34d399; }
  .stats-lb-value.value-mid { background: rgba(255,255,255,0.06); color: var(--text-primary); }
  .stats-lb-value.value-low { background: rgba(107,107,118,0.15); color: var(--text-muted); }
  /* Карточки: кнопка «На стриминг» только иконка ▶️, в один ряд с «В Telegram» */
  .film-buttons .film-streaming-btn .streaming-btn-text { display: none; }
  .film-buttons .film-streaming-btn .streaming-btn-emoji { margin-left: 0; }
  .film-buttons .film-streaming-btn { min-width: 0; padding: 6px 10px; }
}

/* ── Watched ⋮ three-dots menu (stats section) ── */
.watched-item-actions {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}
.watched-menu-dots {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.watched-menu-dots:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}
.watched-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  z-index: 200;
  min-width: 220px;
  padding: 6px;
}
.watched-menu-dropdown.hidden { display: none; }
.watched-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.watched-menu-dropdown button:hover {
  background: rgba(255, 45, 123, 0.1);
  color: #ff2d7b;
}

/* ── Change month modal selects ── */
.change-month-fields {
  display: flex;
  gap: 16px;
  margin: 20px 0 24px;
  align-items: center;
  flex-wrap: wrap;
}
.change-month-fields label {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.change-month-fields select {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.change-month-fields select:focus {
  border-color: #9b4dff;
}

/* ———— TV cabinet section ———— */
.tv-settings-wrap { margin-top: 12px; }
.tv-settings-hint { color: var(--text-muted, #aaa); font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
.tv-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tv-disconnect-wrap { margin-top: 14px; max-width: 320px; }
.tv-disconnect-btn { width: 100%; color: #ef4444 !important; border-color: rgba(239, 68, 68, 0.45) !important; }
.tv-disconnect-btn:hover { background: rgba(239, 68, 68, 0.12) !important; }
.tv-type-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); cursor: pointer; transition: all .18s ease;
  text-align: left; color: inherit; font: inherit;
}
.tv-type-btn:hover { border-color: #9b4dff; background: rgba(155,77,255,0.08); transform: translateY(-1px); }
.tv-type-btn.active { border-color: #9b4dff; background: rgba(155,77,255,0.14); box-shadow: 0 0 0 2px rgba(155,77,255,0.35); }
.tv-type-emoji { font-size: 22px; }
.tv-type-title { font-weight: 600; font-size: 15px; }
.tv-type-sub { font-size: 12.5px; color: var(--text-muted, #aaa); }
.tv-current-status {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(52, 199, 89, 0.12); border: 1px solid rgba(52, 199, 89, 0.3);
  font-size: 14px;
}
.tv-current-status.hidden { display: none; }
.tv-agent-block {
  margin-top: 28px; padding: 18px; border-radius: 16px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.tv-agent-block.hidden { display: none; }
.tv-agent-block h3 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tv-agent-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 10px;
  background: rgba(255,255,255,0.08); color: var(--text-muted, #aaa);
}
.tv-agent-badge.online { background: rgba(52,199,89,0.2); color: #34c759; }
.tv-agent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.tv-agent-token-wrap { margin-top: 14px; }
.tv-agent-token-wrap.hidden { display: none; }
.tv-agent-token-wrap code {
  display: block; padding: 10px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.3); color: #b68cff; font-size: 14px;
  word-break: break-all; font-family: 'JetBrains Mono', Menlo, monospace;
}
.tv-agent-install { margin-top: 14px; margin-bottom: 6px; }
.tv-agent-token-wrap pre {
  background: rgba(0,0,0,0.3); padding: 12px; border-radius: 8px;
  overflow-x: auto; font-size: 13px; color: #ccc; line-height: 1.5;
  font-family: 'JetBrains Mono', Menlo, monospace;
}
.tv-agent-hint { font-size: 13px; color: var(--text-muted, #aaa); margin-top: 8px; }

/* ———— TV launch button on film cards ———— */
.film-tv-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 10px; border: 1px solid rgba(155,77,255,0.4);
  background: rgba(155,77,255,0.1); color: #d4baff; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s ease;
}
.film-tv-btn:hover { background: rgba(155,77,255,0.22); border-color: #9b4dff; color: #fff; }

/* ———— Streaming services popover ———— */
.streaming-popover {
  position: absolute; z-index: 1000; margin-top: 8px;
  background: rgba(25,22,38,0.98); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 10px; min-width: 240px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
}
.streaming-popover-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px;
  transition: background .15s;
}
.streaming-popover-item:hover { background: rgba(255,255,255,0.08); }
.streaming-popover-empty { padding: 16px; color: var(--text-muted, #aaa); font-size: 13px; text-align: center; }

/* ———— Tickets popover ———— */
.tickets-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 10px; border: 1px solid rgba(255,200,60,0.45);
  background: rgba(255,200,60,0.1); color: #ffd97a; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s ease;
}
.tickets-btn:hover { background: rgba(255,200,60,0.22); color: #fff; border-color: #ffc83c; }

/* ———— TV modal ———— */
.tv-launch-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.7); }
.tv-launch-modal .tv-launch-box {
  width: min(440px, 94vw); padding: 26px; border-radius: 20px;
  background: linear-gradient(160deg, #1c1730, #0f0d1a);
  border: 1px solid rgba(255,255,255,0.1); text-align: center;
}
.tv-launch-modal h3 { margin: 0 0 8px; font-size: 20px; }
.tv-launch-modal .tv-launch-sub { color: var(--text-muted, #aaa); font-size: 14px; margin-bottom: 16px; }
.tv-launch-modal .tv-launch-qr { width: 200px; height: 200px; border-radius: 10px; margin: 0 auto 14px; display: block; background: #fff; padding: 8px; }
.tv-launch-modal .tv-launch-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tv-launch-modal .tv-launch-close { position: absolute; top: 14px; right: 18px; background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

/* ———— Film modal ———— */
.film-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 3vh 16px; overflow-y: auto; }
.film-modal.hidden { display: none; }
.film-modal-backdrop { position: absolute; inset: 0; background: rgba(5, 3, 16, 0.72); backdrop-filter: blur(6px); cursor: pointer; }
.film-modal-body {
  position: relative; z-index: 1; width: min(960px, 96vw);
  background: linear-gradient(165deg, #1c1630 0%, #100c1f 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 22px; color: #e9e4f4;
  box-shadow: 0 28px 60px rgba(0,0,0,0.55);
  animation: fm-in .18s ease-out;
}
@media (min-width: 900px) {
  .film-modal-body { padding: 28px 32px; }
  .film-modal-content { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .film-modal-info h2 { font-size: 26px; }
  .film-modal-desc { font-size: 16px; line-height: 1.58; }
  .film-modal-poster-wrap { box-shadow: 0 20px 48px rgba(0,0,0,0.4); }
}
.film-modal-random-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
@keyframes fm-in { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.film-modal-close {
  position: absolute; top: 12px; right: 14px; width: 36px; height: 36px;
  border: 0; background: rgba(255,255,255,0.06); color: #fff; font-size: 22px; line-height: 1;
  border-radius: 50%; cursor: pointer; transition: background .15s;
}
.film-modal-close:hover { background: rgba(255,255,255,0.14); }
.film-modal-content { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.film-modal-content.loading { grid-template-columns: 1fr; text-align: center; color: #aaa; padding: 40px 0; }
.film-modal-poster-wrap { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 2 / 3; background: #0a0818; }
.film-modal-poster-wrap img { width: 100%; height: 100%; object-fit: cover; }
.film-modal-poster-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
  color: #fff; font-size: 46px; cursor: pointer; opacity: .85; transition: opacity .2s;
}
.film-modal-poster-play:hover { opacity: 1; }
.film-modal-info h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.2; font-family: 'Unbounded', sans-serif; }
.film-modal-meta { color: #bdb0d9; font-size: 13.5px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.film-modal-meta span.dot { opacity: .4; }
.film-modal-rkp { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; background: rgba(255,200,60,0.14); color: #ffd97a; font-weight: 600; font-size: 12.5px; }
.film-modal-desc { font-size: 14.5px; line-height: 1.55; color: #d6d0e8; margin-bottom: 14px; white-space: pre-wrap; }
.film-modal-crew { font-size: 13.5px; color: #b8aed2; line-height: 1.4; margin-bottom: 12px; }
.film-modal-crew b { color: #e9e4f4; }
.film-actors-more-btn {
  border: 0;
  background: transparent;
  color: var(--accent, #ff2d7b);
  font-size: 12px;
  font-weight: 700;
  padding: 0 0 0 4px;
  cursor: pointer;
  font-family: inherit;
}
.film-modal-section { margin-top: 18px; }
.film-modal-section h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: #e9e4f4; letter-spacing: .2px; }
.film-modal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 4px; align-items: stretch; }
.film-modal-actions .btn,
.film-modal-actions .film-tv-btn,
.film-modal-actions .tickets-btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

/* Rating stars */
.rating-stars { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rating-star {
  width: 34px; height: 34px; border-radius: 11px; border: 1px solid rgba(255,255,255,0.08); padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.07); color: #d7ccef; font-size: 14px; font-weight: 800;
  transition: all .12s ease;
}
.rating-star.filled { background: linear-gradient(135deg, #ffcc5c, #ff9c3c); color: #2a1a00; }
.rating-star.preview { background: rgba(255,204,92,0.35); color: #fff; }
.rating-star:hover { transform: translateY(-1px); }
.rating-current { color: #ffd97a; font-weight: 700; margin-left: 8px; font-size: 14px; }
.rating-remove-btn { margin-left: 10px; padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: #bdb0d9; cursor: pointer; font-size: 12.5px; }
.rating-remove-btn:hover { color: #fff; border-color: #fff; }
.rating-group-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.rating-group-list .rg-row { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.035); }
.rating-group-list .rg-row.mine { background: rgba(155,77,255,0.16); color: #fff; }
.rating-group-list .rg-rating { color: #ffd97a; font-weight: 700; }

/* Watched toggle */
.watched-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); cursor: pointer; user-select: none; font-size: 14px; }
.watched-toggle.on { background: rgba(52,199,89,0.18); border-color: rgba(52,199,89,0.45); color: #b0f1bf; }
.watched-toggle .wt-mark { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.3); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.watched-toggle.on .wt-mark { background: #34c759; border-color: #34c759; color: #000; }

/* Trailer */
.film-modal-trailer { margin-top: 14px; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.film-modal-trailer iframe { width: 100%; height: 100%; border: 0; }

/* Similar grid */
.similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.similar-card { position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; cursor: pointer; background: #0a0818; border: 1px solid rgba(255,255,255,0.06); transition: transform .15s; }
.similar-card:hover { transform: translateY(-2px); border-color: rgba(155,77,255,0.5); }
.similar-card img { width: 100%; height: 100%; object-fit: cover; }
.similar-card .similar-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); color: #fff; padding: 22px 8px 8px; font-size: 12px; line-height: 1.3; }
.similar-card .similar-in-base { position: absolute; top: 6px; right: 6px; background: rgba(52,199,89,0.9); color: #001f0a; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }

.film-similar-under-poster { margin: 14px 0 4px; padding: 0; }
.film-similar-under-poster .film-similar-rail-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.92);
}
.similar-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.similar-rail-card {
  flex: 0 0 92px;
  min-width: 92px;
  max-width: 108px;
  scroll-snap-align: start;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.similar-rail-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0818;
  border: 1px solid rgba(255,255,255,0.08);
}
.similar-rail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-rail-poster .similar-in-base {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(52,199,89,0.92);
  color: #001f0a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
}
.similar-rail-title {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255,255,255,0.88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Страница фильма /f/:kp (в кабинете) */
#section-film.film-page { padding: 0 0 32px; }
#section-film .film-page-outer {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 24px);
}
#section-film .movie-page {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}
#section-film .movie-page.loading {
  text-align: center;
  padding: 32px 16px;
  color: #aaa;
}
#film-page-content.film-page-container {
  max-width: 100%;
  margin: 0 auto;
}
#film-page-content.film-modal-content { grid-template-columns: minmax(200px, 300px) minmax(0,1fr); gap: 32px; align-items: start; }
#film-page-content.film-modal-content.loading { grid-template-columns: 1fr; text-align: center; padding: 32px; color: #aaa; }
#film-page-content h2 { font-size: 26px; }
#film-page-content .film-modal-info { min-width: 0; }
#film-page-content .film-modal-desc { font-size: 16px; line-height: 1.58; }
#film-page-content .film-modal-crew { font-size: 14.5px; }
#film-page-content .film-modal-poster-wrap { box-shadow: 0 20px 48px rgba(0,0,0,0.4); }
.film-page-error-hint, .film-page-error-actions { text-align: center; }
@media (max-width: 900px) {
  #film-page-content.film-modal-content { grid-template-columns: 1fr; }
  #film-page-content .film-modal-poster-wrap { max-width: 240px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .film-modal-content { grid-template-columns: 1fr; }
  .film-modal-poster-wrap { max-width: 180px; margin: 0 auto; }
  .film-modal-body { padding: 16px; }
}

/* Card become pointer when clickable */
.card.film-card, .card.plan-card, .card.series-card { cursor: pointer; }

/* ———————————————————————————— Phase 3 ———————————————————————————— */

/* Top bar: profile switcher + add film button */
.cabinet-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.cabinet-user-hero-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1 1 280px;
}
.cabinet-user-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.cabinet-user-hero-block .cabinet-profile-switcher {
  position: relative;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}
.cabinet-user-hero-block .cabinet-profile-btn {
  width: auto;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  min-height: 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.cabinet-user-hero-block .cabinet-profile-btn:hover,
.cabinet-user-hero-block .cabinet-profile-btn[aria-expanded="true"] {
  background: #fff;
  color: #09090b;
  border-color: #fff;
}
.cabinet-user-hero-block .cabinet-profile-btn[aria-expanded="true"] .cabinet-profile-caret {
  opacity: 1;
}
.cabinet-user-hero-block .cabinet-profile-menu {
  left: 0;
  right: auto;
  min-width: 260px;
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
}
.profile-menu-scroll {
  max-height: min(280px, 46vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.profile-menu-scroll::-webkit-scrollbar { width: 6px; }
.profile-menu-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.profile-menu-create-group {
  display: block;
  width: calc(100% - 8px);
  margin: 6px 4px 2px;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 200, 80, 0.35);
  border-radius: 10px;
  background: rgba(255, 200, 80, 0.08);
  color: #ffd07a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.profile-menu-create-group:hover { background: rgba(255, 200, 80, 0.14); }
.mp-seo-intents { padding-top: 0; }
.mp-seo-intents-inner { margin-top: 0; }
.mp-seo-intents-links { margin-top: 18px; }
.cabinet-user-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cabinet-user-avatar,
.profile-settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #ff2d7b, #7c3cff);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(255, 45, 123, 0.18);
}
.cabinet-user-avatar img,
.profile-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cabinet-user-copy {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.cabinet-user-kicker {
  color: var(--text-muted, #999);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cabinet-user-name {
  color: var(--text-primary, #fff);
  font-size: 22px;
  font-weight: 900;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cabinet-profile-switcher { position: relative; }
.cabinet-profile-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text, #fff); font-size: 14px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.cabinet-profile-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.cabinet-profile-emoji { font-size: 16px; }
.cabinet-profile-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cabinet-profile-caret { opacity: 0.72; font-size: 10px; line-height: 1; margin-left: 1px; flex-shrink: 0; }
.cabinet-profile-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 500; min-width: 280px; max-height: min(360px, 58vh); padding: 8px; background: rgba(18,18,22,0.98); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,0.45); backdrop-filter: blur(12px); overflow: hidden; display: flex; flex-direction: column; }
.cabinet-profile-menu.hidden { display: none; }
.profile-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background 0.12s; }
.profile-menu-item:hover { background: rgba(255,255,255,0.06); }
.profile-menu-item.active { background: rgba(255,200,80,0.12); border: 1px solid rgba(255,200,80,0.28); }
.profile-menu-item-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-menu-item-emoji { font-size: 18px; }
.profile-menu-item-info { min-width: 0; }
.profile-menu-item-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-menu-item-meta { font-size: 11px; color: var(--text-muted, #999); }
.profile-menu-item-active-tag { font-size: 11px; color: rgba(255,200,80,0.9); white-space: nowrap; }
.profile-menu-hint { padding: 8px 12px; font-size: 11px; color: var(--text-muted, #999); line-height: 1.4; }

.cabinet-add-film-btn { padding: 9px 18px; font-size: 14px; border-radius: 14px; white-space: nowrap; }

/* Add Film modal */
.add-film-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.add-film-modal.hidden { display: none; }
.add-film-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(6px); }
.add-film-modal-body { position: relative; z-index: 1; width: min(720px, 100%); padding: 26px 26px 32px; background: linear-gradient(180deg, rgba(28,28,34,0.98), rgba(18,18,22,0.98)); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); }
.add-film-modal-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; background: transparent; color: #fff; font-size: 24px; cursor: pointer; opacity: 0.6; }
.add-film-modal-close:hover { opacity: 1; }
.add-film-title { margin: 0 0 4px; font-size: 22px; }
.add-film-hint { margin: 0 0 14px; font-size: 13px; color: var(--text-muted, #999); }
.add-film-search-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.add-film-input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #fff; font-size: 15px; outline: none; transition: border-color 0.12s, background 0.12s; }
.add-film-input:focus { border-color: rgba(255,200,80,0.55); background: rgba(255,255,255,0.06); }
.add-film-type-toggle { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255,255,255,0.04); border-radius: 12px; align-self: flex-start; }
.add-film-type-btn { padding: 7px 14px; border: none; background: transparent; color: var(--text-muted, #999); border-radius: 9px; cursor: pointer; font-size: 13px; transition: background 0.12s, color 0.12s; }
.add-film-type-btn.active { background: rgba(255,255,255,0.1); color: #fff; }
.add-film-status { min-height: 20px; font-size: 13px; color: var(--text-muted, #999); margin-bottom: 10px; }
.add-film-status.error { color: #ff6b6b; }
.add-film-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.add-search-section { margin-top: 14px; }
.add-search-section:first-child { margin-top: 0; }
.add-search-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}
.add-search-result { display: flex; flex-direction: column; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; transition: transform 0.12s, border-color 0.12s; }
.add-search-result:hover { border-color: rgba(255,200,80,0.4); transform: translateY(-2px); }
.add-search-result-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: rgba(255,255,255,0.04);
}
.add-search-result-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: rgba(255,255,255,0.04); }
.add-search-result-poster-wrap .add-search-result-poster { height: 100%; display: block; }
.add-search-result-info { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.add-search-result-title { font-size: 13px; font-weight: 600; line-height: 1.25; max-height: 3.1em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.add-search-result-meta { font-size: 11px; color: var(--text-muted, #999); }
.add-search-result-btn { margin-top: auto; padding: 7px 10px; font-size: 12px; border-radius: 8px; border: 1px solid rgba(255,200,80,0.4); background: rgba(255,200,80,0.12); color: #ffd07a; cursor: pointer; transition: background 0.12s; }
.add-search-result-btn:hover { background: rgba(255,200,80,0.2); }
.add-search-result-btn[disabled] { opacity: 0.55; cursor: default; color: var(--text-muted, #999); border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.add-search-poster-action,
.add-search-share-action {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  transition: transform .13s ease, filter .13s ease;
}
.add-search-poster-action {
  right: 8px;
  bottom: 8px;
  background: linear-gradient(135deg, #ffb13c, #ff7a2f);
  color: #1b0f05;
}
.add-search-poster-action.is-open {
  background: rgba(255,255,255,0.9);
  color: #17171f;
}
.add-search-share-action {
  left: 8px;
  bottom: 8px;
  background: rgba(16,16,24,0.82);
  color: #fff;
  backdrop-filter: blur(8px);
}
.add-search-poster-action:hover,
.add-search-share-action:hover { transform: translateY(-1px) scale(1.04); filter: brightness(1.08); }
.add-search-poster-action[disabled] { opacity: .7; cursor: default; transform: none; }
.add-search-people-list { display: flex; flex-direction: column; gap: 8px; }
.add-search-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}
.add-search-person-name { flex: 1; min-width: 0; font-weight: 700; color: #fff; }
.add-search-person-add {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ff2d7b, #ff8a3a);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.add-search-person-status { color: rgba(255,255,255,0.62); font-size: 12px; font-weight: 700; }

/* Premieres */
.premieres-toolbar { display: flex; gap: 8px; }
.premieres-period-select, .premieres-sort-select { padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: #fff; font-size: 13px; }
.premieres-loading, .premieres-error { padding: 16px; color: var(--text-muted, #999); font-size: 14px; }
.premieres-error { color: #ff6b6b; }
.premieres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
@media (min-width: 900px) {
  .premieres-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  body.in-cabinet #section-premieres .premieres-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 14vw, 240px), 1fr));
    gap: 18px;
  }
  body.in-cabinet #section-premieres .premiere-poster-tile-title {
    font-size: 14px;
    padding: 10px 10px 4px;
  }
  body.in-cabinet #section-premieres .premiere-poster-tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
}
.premiere-poster-tile {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.premiere-poster-tile:hover { transform: scale(0.98); }
.premiere-poster-media { position: relative; }
.premiere-poster-tile-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
  display: block;
}
.premiere-poster-tile-img--ph { background: rgba(255,255,255,0.06); }
.premiere-poster-date-pill {
  position: absolute;
  left: 5px;
  bottom: 5px;
  z-index: 2;
  height: 22px;
  line-height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.premiere-poster-media {
  position: relative;
}
.premiere-poster-media > span[data-stop-card-click] {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  line-height: 0;
}
.premiere-poster-bell--overlay {
  position: static !important;
  right: auto;
  bottom: auto;
  z-index: 3;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.premiere-poster-bell--overlay:not(.active) {
  background: linear-gradient(135deg, #ff2d7b, #ff8c42) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.premiere-poster-bell--overlay.active {
  background: rgba(30, 30, 38, 0.94) !important;
  border: 1.5px solid #ff2d7b !important;
  color: inherit !important;
}
.premiere-poster-tile-body { padding: 6px 8px 8px; }
.premiere-poster-tile-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.premiere-poster-tile-meta { font-size: 11px; color: var(--text-muted, #999); margin-top: 3px; }
.premiere-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.12s, transform 0.12s; cursor: pointer; }
.premiere-card:hover { border-color: rgba(255,200,80,0.35); transform: translateY(-2px); }
.premiere-card-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: rgba(255,255,255,0.04); }
.premiere-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.premiere-card-title { font-size: 15px; font-weight: 600; line-height: 1.25; }
.premiere-card-meta { font-size: 12px; color: var(--text-muted, #999); }
.premiere-card-date {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 200, 92, 0.13);
  color: #ffd07a;
  font-size: 14px;
  font-weight: 800;
}
.premiere-card-desc {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.68);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.premiere-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.premiere-card-actions button { padding: 6px 10px; font-size: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #fff; cursor: pointer; transition: background 0.12s; }
.premiere-card-actions button:hover { background: rgba(255,255,255,0.1); }
.premiere-card-actions button.active { background: rgba(255,200,80,0.18); border-color: rgba(255,200,80,0.45); color: #ffd07a; }
.premiere-card-actions button[disabled] { opacity: 0.6; cursor: default; }
.premiere-card-actions .premiere-card-bell,
.premiere-card-actions .premiere-card-share {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
}
.premiere-card-actions .premiere-card-bell.active {
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.95), rgba(255, 200, 92, 0.95));
  border-color: transparent;
  color: #fff;
}

/* Groups */
.groups-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.group-card { position: relative; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; }
.group-card.active { border-color: rgba(255,200,80,0.45); background: rgba(255,200,80,0.06); }
.group-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.group-card-emoji { font-size: 22px; }
.group-card-name { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-card-type { flex-shrink: 0; font-size: 11px; color: var(--text-muted, #999); text-transform: uppercase; letter-spacing: 0.04em; }
.group-card-meta { font-size: 12px; color: var(--text-muted, #999); display: flex; gap: 12px; }
.group-card-actions { margin-top: 0; padding-top: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.group-card-actions button { padding: 7px 12px; font-size: 13px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #fff; cursor: pointer; }
.group-card-actions button.primary { border-color: rgba(255,200,80,0.45); background: rgba(255,200,80,0.15); color: #ffd07a; }
.group-card-actions button[disabled] { opacity: 0.55; cursor: default; }
.groups-howto { margin-top: 12px; padding: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; }
.groups-howto h3 { margin: 0 0 10px; font-size: 16px; }
.groups-howto-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: #ddd; }
.groups-howto-list code { padding: 2px 6px; background: rgba(255,255,255,0.08); border-radius: 6px; font-size: 13px; }

.soc-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0 12px;
}
.soc-search-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.soc-search-field:focus-within {
  border-color: rgba(255, 45, 123, 0.5);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(255, 45, 123, 0.12);
}
.soc-search-icon { color: rgba(255,255,255,0.5); font-size: 16px; }
.soc-search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
}
.soc-search-field input::placeholder { color: rgba(255,255,255,0.42); }
.soc-search-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 123, 0.45);
  background: linear-gradient(135deg, rgba(255,45,123,0.18), rgba(64,178,255,0.12));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.soc-search-btn:hover { background: linear-gradient(135deg, rgba(255,45,123,0.28), rgba(64,178,255,0.18)); }
#soc-search-results,
#grp-search-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
#grp-search-results.hidden { display: none; }
.grp-discover-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.grp-discover-pill--club { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.grp-discover-pill--media { background: rgba(64, 178, 255, 0.15); color: #40b2ff; }
.soc-search-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.soc-search-user-main { flex: 1; min-width: 0; color: #fff; }
.soc-search-add-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: linear-gradient(135deg, #ff2d7b, #ff8a3a);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.soc-search-status { color: rgba(255,255,255,0.62); font-size: 12px; font-weight: 700; white-space: nowrap; }
.soc-search-state { padding: 10px 2px; color: rgba(255,255,255,0.58); font-size: 13px; }
.soc-search-state.error { color: #ff8a8a; }

.share-film-modal-body { max-width: 520px; }
.share-film-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.share-film-tab.active {
  border-color: var(--accent, #ff2d7b);
  color: var(--accent, #ff2d7b);
  background: rgba(255, 45, 123, 0.12);
}
.modal-sheet {
  transition: transform 0.22s ease-out;
  will-change: transform;
}
.modal-sheet-handle {
  padding: 10px 0 14px;
  margin: -4px 0 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  display: flex;
  justify-content: center;
}
.modal-sheet-handle:active { cursor: grabbing; }
.modal-sheet-handle-bar {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}
.film-rating-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.film-share-mini-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}
.share-film-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin: 12px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
}
.share-film-preview-poster {
  width: 58px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-film-preview-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-film-preview-title { font-weight: 800; color: #fff; line-height: 1.25; }
.share-film-preview-meta { margin-top: 4px; color: rgba(255,255,255,0.55); font-size: 12px; }
.share-film-select,
.share-film-textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 7px 0 12px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.055);
  color: #fff;
  outline: 0;
}
.share-film-select { height: 42px; padding: 0 12px; }
.share-film-textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
}

/* Film modal trailer */
.film-modal-trailer { margin-top: 16px; }
.film-modal-trailer-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); color: #fff; cursor: pointer; font-size: 13px; transition: background 0.12s; }
.film-modal-trailer-btn:hover { background: rgba(255,255,255,0.12); }
.film-modal-trailer-embed { margin-top: 12px; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.film-modal-trailer-embed iframe { width: 100%; height: 100%; border: 0; }

/* Mobile polish */
@media (max-width: 640px) {
  .cabinet-topbar { gap: 8px; }
  .cabinet-profile-btn { padding: 7px 10px; font-size: 13px; }
  .cabinet-profile-name { max-width: 120px; }
  .cabinet-add-film-btn { padding: 8px 12px; font-size: 13px; }
  .add-film-modal-body { padding: 20px 18px 24px; }
  .add-film-title { font-size: 18px; }
  .add-film-results { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .premieres-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
  .premiere-card-body { padding: 10px; }
  .home-dash-row--premiere { align-items: flex-start; }
  .home-premiere-actions { gap: 6px; margin-top: 4px; }
  .home-premiere-bell, .home-premiere-share { width: 38px; height: 38px; }
  .home-premiere-desc { -webkit-line-clamp: 1; }
  .home-premiere-preview,
  .home-film-preview,
  .home-poster-preview-pop { display: none; }
  .group-card { grid-template-columns: 1fr; align-items: stretch; }
  .group-card-actions { justify-content: flex-start; }
  .soc-search-row { grid-template-columns: 1fr; }
  .soc-search-btn { width: 100%; }
  .cabinet-profile-menu { min-width: 240px; }
}

/* ============================================================
   Phase 4: UX-полировка — унификация, комнаты, поиск, футер, nav
   ============================================================ */

/* --- Header search --- */
.header-search {
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0 18px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.header-search:focus-within {
  border-color: rgba(255, 45, 123, 0.5);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(255, 45, 123, 0.12);
}
.header-search-icon {
  flex: 0 0 auto;
  padding: 0 10px 0 14px;
  font-size: 15px;
  opacity: 0.75;
  user-select: none;
}
.header-search-input {
  flex: 1 1 auto;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 14px;
  min-width: 0;
}
.header-search-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.header-search-clear {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-right: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.header-search-clear:hover { background: rgba(255, 255, 255, 0.14); }
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(18, 18, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-height: min(72vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  z-index: 100;
  padding: 6px;
  box-sizing: border-box;
}
.hs-hub {
  padding: 2px 0 6px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.hs-hub-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 10px 10px;
  flex-wrap: wrap;
  max-width: 100%;
  box-sizing: border-box;
}
.header-search-dropdown .header-search-recent-title {
  padding: 8px 10px 4px;
  box-sizing: border-box;
}
.header-search-dropdown .hs-hub-chips-row,
.header-search-dropdown .header-search-recent-row {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 0 10px 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.header-search-dropdown .header-search-chip {
  flex: 0 1 auto;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  text-align: center;
  word-break: break-word;
}
.hs-hub-tab {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}
.hs-hub-tab.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.38), rgba(168, 85, 247, 0.28));
  border-color: rgba(236, 72, 153, 0.48);
  color: #fff;
}
.hs-hub-prem-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 10px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.hs-hub-prem-card {
  flex: 0 0 88px;
  scroll-snap-align: start;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.hs-hub-prem-img {
  width: 88px;
  height: 132px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}
.hs-hub-prem-title {
  display: -webkit-box;
  font-size: 11px;
  font-weight: 600;
  color: #eee;
  margin-top: 6px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.hs-hub-recent-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 10px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.site-search-status .hs-hub {
  text-align: left;
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: 8px 0 24px;
}
.site-search-status .hs-hub-tabs {
  padding-left: 0;
  padding-right: 0;
}
.site-search-status .header-search-recent-title {
  padding-left: 0;
  padding-right: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 246, 255, 0.55);
  margin-top: 18px;
}
.site-search-status .header-search-recent-row {
  padding-left: 0;
  padding-right: 0;
}
.site-search-status .hs-hub-prem-scroll,
.site-search-status .hs-hub-recent-scroll {
  padding-left: 0;
  padding-right: 0;
  gap: 12px;
  margin-bottom: 4px;
}
.site-search-status .hs-hub-prem-card {
  flex: 0 0 clamp(96px, 11vw, 128px);
  scroll-snap-align: start;
}
.site-search-status .hs-hub-prem-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  min-height: 132px;
  max-height: 192px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.site-search-status .hs-hub-prem-title {
  font-size: 12px;
  min-height: 2.4em;
}
@media (max-width: 640px) {
  .site-search-status .hs-hub-prem-card {
    flex-basis: 92px;
  }
  .site-search-status .hs-hub-prem-img {
    min-height: 124px;
    max-height: 138px;
    border-radius: 10px;
  }
  .site-search-status .hs-hub-prem-scroll,
  .site-search-status .hs-hub-recent-scroll {
    gap: 10px;
    padding-bottom: 8px;
  }
}
.hs-hub-foot {
  padding: 8px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.hs-preview-body {
  min-width: 0;
}
.hs-preview-foot {
  position: sticky;
  bottom: 0;
  margin-top: 2px;
  padding: 8px 4px 4px;
  background: linear-gradient(to bottom, rgba(18, 18, 26, 0) 0%, rgba(18, 18, 26, 0.96) 28%, rgba(18, 18, 26, 0.98) 100%);
}
.hs-hub-more {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.hs-hub-more:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.hs-hub-empty { text-align: left; padding: 4px 12px 10px; font-size: 12px; }
.header-search-chip--genre { border-color: rgba(168, 85, 247, 0.22); }
.header-search-empty { padding: 8px 6px; font-size: 14px; color: var(--text-muted, #aaa); text-align: center; }
.header-search-dropdown .mp-search-loading {
  min-height: 96px;
  padding: 12px 8px 8px;
}
.header-search-dropdown .mp-search-loading-text {
  font-size: 13px;
}
.hs-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.hs-result + .hs-result { margin-top: 2px; }
.hs-result:hover { background: rgba(255, 255, 255, 0.05); }
.hs-result-poster {
  width: 42px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}
.hs-result-info { flex: 1 1 auto; min-width: 0; }
.hs-result-title { font-size: 14px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-result-meta { font-size: 12px; color: var(--text-muted, #999); margin-top: 2px; }
.hs-in-base { color: #ffc85c; }
.hs-result-btn {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.hs-btn-add { background: linear-gradient(135deg, #ff2d7b 0%, #ff6b5b 100%); color: #fff; border: 0; }
.hs-btn-add:hover { transform: translateY(-1px); }
.hs-btn-open { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.14); }
.hs-btn-open:hover { background: rgba(255, 255, 255, 0.14); }
.hs-result-more { margin-top: 6px; padding: 6px; }
.hs-result-more button {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--text-muted, #bbb);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.hs-result-more button:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

@media (max-width: 900px) {
  .header-search { margin: 0 10px; max-width: none; }
}
@media (max-width: 640px) {
  .header-search { margin: 8px 0 0; flex-basis: 100%; order: 3; }
  .header-content { flex-wrap: wrap; }
}

/* --- Cabinet topbar: extension icon --- */
.cabinet-topbar-actions { display: flex; align-items: center; gap: 8px; }
.cabinet-topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.cabinet-topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.cabinet-topbar-icon-btn .topbar-icon-emoji { font-size: 15px; }
@media (max-width: 640px) {
  .cabinet-topbar-icon-btn .topbar-icon-label { display: none; }
  .cabinet-topbar-icon-btn { padding: 8px 10px; }
}

/* --- Cabinet nav: улучшенный overflow на мобильных --- */
.cabinet-nav {
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.cabinet-nav::-webkit-scrollbar { height: 4px; }
.cabinet-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
#cabinet-readonly .cabinet-nav,
#cabinet-onboarding .cabinet-nav {
  justify-content: center;
  gap: 6px;
}
#cabinet-readonly .cabinet-nav-btn,
#cabinet-onboarding .cabinet-nav-btn {
  font-family: 'Unbounded', Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
  justify-content: center;
}
#cabinet-readonly .cabinet-nav-btn-text,
#cabinet-onboarding .cabinet-nav-btn-text {
  font-family: inherit;
}
.mp-page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: min(52vh, 420px);
  width: 100%;
  padding: 32px 16px;
  box-sizing: border-box;
}
.mp-page-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ff2d7b;
  animation: mp-page-spin 0.75s linear infinite;
  flex-shrink: 0;
}
.mp-page-loading-text {
  margin: 0;
  max-width: min(92vw, 420px);
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(244, 246, 255, 0.72);
  letter-spacing: -0.01em;
}
.staff-page--boot .mp-route-boot-loading {
  min-height: min(28vh, 220px);
  padding-top: 12px;
}
.user-public-content,
.user-profile-root,
#user-public-root {
  min-height: min(52vh, 420px);
}
.user-public-content .mp-page-loading,
.user-profile-root .mp-page-loading,
#user-public-root > .mp-page-loading {
  min-height: min(52vh, 420px);
}
.film-page-error-hint--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(40vh, 320px);
  width: 100%;
  text-align: center;
  margin: 0;
}
@keyframes mp-page-spin {
  to { transform: rotate(360deg); }
}
@media (min-width: 1100px) {
  /* Десктоп-меню: одна горизонтальная линия как раньше */
  .cabinet .cabinet-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    align-items: center;
    padding-bottom: 4px;
    justify-content: center;
  }
  .cabinet-nav-btn { white-space: nowrap; }
}

/* --- Унификация кнопок в карточках фильмов --- */
.film-buttons,
.plan-card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  align-items: stretch;
}

.film-buttons > a,
.film-buttons > button,
.film-buttons > span,
.plan-card-buttons > a,
.plan-card-buttons > button,
.plan-card-buttons > span {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f4f6;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.film-buttons > a:hover,
.film-buttons > button:hover,
.plan-card-buttons > a:hover,
.plan-card-buttons > button:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* «В Telegram» — акцентная */
.film-buttons > a.btn-primary,
.plan-card-buttons > .btn-primary,
.film-buttons > span.btn-primary {
  background: linear-gradient(135deg, #ff2d7b 0%, #ff6b5b 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 45, 123, 0.25);
}
.film-buttons > a.btn-primary:hover,
.plan-card-buttons > .btn-primary:hover {
  background: linear-gradient(135deg, #ff1f6d 0%, #ff5a49 100%);
  box-shadow: 0 6px 16px rgba(255, 45, 123, 0.35);
}

/* «На ТВ» */
.film-buttons > .film-tv-btn,
.plan-card-buttons > .film-tv-btn {
  background: rgba(118, 163, 255, 0.12);
  border-color: rgba(118, 163, 255, 0.3);
  color: #c3d6ff;
}
.film-buttons > .film-tv-btn:hover,
.plan-card-buttons > .film-tv-btn:hover {
  background: rgba(118, 163, 255, 0.2);
  border-color: rgba(118, 163, 255, 0.5);
  color: #fff;
}

/* «Онлайн-кинотеатр» */
.film-buttons > .film-streaming-btn,
.plan-card-buttons > .film-streaming-btn {
  background: rgba(255, 200, 92, 0.10);
  border-color: rgba(255, 200, 92, 0.26);
  color: #ffd67a;
}
.film-buttons > .film-streaming-btn:hover,
.plan-card-buttons > .film-streaming-btn:hover {
  background: rgba(255, 200, 92, 0.18);
  border-color: rgba(255, 200, 92, 0.44);
  color: #fff;
}

/* «Купить билет» */
.film-buttons > .tickets-btn,
.plan-card-buttons > .tickets-btn {
  background: rgba(116, 255, 180, 0.10);
  border-color: rgba(116, 255, 180, 0.26);
  color: #a5f6cb;
}
.film-buttons > .tickets-btn:hover,
.plan-card-buttons > .tickets-btn:hover {
  background: rgba(116, 255, 180, 0.18);
  border-color: rgba(116, 255, 180, 0.44);
  color: #fff;
}

/* --- TV status: цветовые состояния --- */
.tv-current-status.is-ok {
  background: rgba(75, 200, 140, 0.10);
  border-color: rgba(75, 200, 140, 0.32);
  color: #b8ecd0;
}
.tv-current-status.is-warn {
  background: rgba(255, 180, 70, 0.10);
  border-color: rgba(255, 180, 70, 0.32);
  color: #f4d48a;
}

/* --- Groups section: header + create btn --- */
.groups-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.groups-create-btn {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 14px;
  white-space: nowrap;
}
.group-card-virtual {
  border-color: rgba(145, 120, 255, 0.35) !important;
  background: linear-gradient(135deg, rgba(145, 120, 255, 0.08), rgba(255, 120, 200, 0.05)) !important;
}
.groups-howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.groups-howto-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
.groups-howto-emoji { font-size: 24px; margin-bottom: 6px; }
.groups-howto-title { font-weight: 600; margin-bottom: 4px; color: #fff; }
.groups-howto-text { font-size: 13px; color: var(--text-muted, #bbb); line-height: 1.5; }
.groups-howto-text code { padding: 2px 6px; background: rgba(255, 255, 255, 0.08); border-radius: 6px; font-size: 12px; }

/* --- Create Room & Share Invite modals --- */
.create-room-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.create-room-label { font-size: 12px; color: var(--text-muted, #aaa); text-transform: uppercase; letter-spacing: 0.05em; }
.create-room-emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.create-room-emoji-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.create-room-emoji-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.create-room-emoji-btn.active {
  border-color: rgba(255, 45, 123, 0.6);
  background: rgba(255, 45, 123, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 45, 123, 0.18);
}
.create-room-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.create-room-kind-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.create-room-kind-btn {
  flex: 1 1 29%;
  min-width: 92px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-body, #fff);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.create-room-kind-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}
.create-room-kind-btn.active {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.14);
  box-shadow: 0 0 0 2px rgba(255, 45, 123, 0.15);
}
.create-room-kind-extra {
  margin-top: 4px;
}
.create-room-approval-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.create-room-approval-btn {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-body, #eee);
  cursor: pointer;
}
.create-room-approval-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.create-room-approval-btn.active {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.15);
}

/* Уведомления (инбокс) в кабинете */
.site-inbox-root { margin-top: 12px; }
.site-inbox-panel { margin-top: 12px; }
.site-inbox-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.site-inbox-card--rich {
  padding: 0;
  overflow: hidden;
}
.site-inbox-card--unread {
  border-color: rgba(255, 90, 165, 0.35);
  box-shadow: inset 3px 0 0 #ff5aa5;
}
.site-inbox-card-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
}
.site-inbox-card-main {
  flex: 1;
  min-width: 0;
}
.site-inbox-thumb {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.site-inbox-thumb--poster {
  width: 72px;
  aspect-ratio: 2 / 3;
}
.site-inbox-thumb--avatar,
.site-inbox-thumb--emoji {
  width: 52px;
  height: 52px;
}
.site-inbox-thumb--sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.site-inbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-inbox-thumb--emoji,
.site-inbox-thumb--avatar {
  display: grid;
  place-items: center;
}
.site-inbox-thumb--emoji span { font-size: 24px; line-height: 1; }
.site-inbox-thumb-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 90, 165, 0.35), rgba(120, 80, 255, 0.35));
}
.site-inbox-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #aaa);
  margin-bottom: 6px;
}
.site-inbox-headline {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}
.site-inbox-headline--film {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.site-inbox-title { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.35; }
.site-inbox-body {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  white-space: pre-wrap;
}
.site-inbox-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.site-inbox-actions--compact .btn { font-size: 12px; padding: 6px 10px; }
.site-inbox-time { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.42); }
.site-inbox-card--friend-req.site-inbox-card--rich {
  padding: 14px 16px;
}
.site-inbox-card--friend-req.site-inbox-card--rich .site-inbox-actions--stack {
  margin-top: 8px;
}
.site-inbox-fr-row--rich {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-inbox-fr-row--rich:first-child { border-top: none; padding-top: 0; }
.site-inbox-fr-main { flex: 1; min-width: 0; }
.site-inbox-fr-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.site-inbox-act-row--rich { align-items: flex-start; gap: 10px; }
.site-inbox-act-text { flex: 1; font-size: 13px; line-height: 1.45; min-width: 0; }
.site-inbox-act-ts { color: var(--hint, #888); }

.header-inbox-wrap {
  position: relative;
  flex-shrink: 0;
}
.header-inbox-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 320;
  width: min(420px, calc(100vw - 24px));
  max-height: min(560px, 72vh);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 16, 22, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.header-inbox-dropdown.hidden { display: none !important; }
.header-inbox-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.header-inbox-dropdown-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.header-inbox-dropdown-all {
  font-size: 13px;
  font-weight: 700;
  color: #ff5aa5;
}
.header-inbox-dropdown-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
  -webkit-overflow-scrolling: touch;
}
.header-inbox-dropdown-list .site-inbox-card { margin-bottom: 8px; }
.header-inbox-dropdown-list .site-inbox-card-row { padding: 10px 12px; gap: 10px; }
.header-inbox-dropdown-list .site-inbox-thumb--poster { width: 56px; }
.header-inbox-dropdown-list .site-inbox-thumb--avatar,
.header-inbox-dropdown-list .site-inbox-thumb--emoji { width: 44px; height: 44px; }
.header-inbox-empty { padding: 24px 12px; text-align: center; }

@media (min-width: 769px) {
  #section-inbox .site-inbox-root {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
  #section-inbox .site-inbox-card--rich .site-inbox-thumb--poster { width: 88px; }
  #section-inbox .site-inbox-headline--film { font-size: 22px; }
}

.share-invite-box {
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-top: 8px;
}
.share-invite-url {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  color: #ffd67a;
  margin-bottom: 10px;
}
.share-invite-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-invite-actions .btn { flex: 1; min-width: 120px; text-align: center; }
.share-invite-meta { font-size: 12px; color: var(--text-muted, #999); margin-top: 8px; text-align: center; }

/* --- Красивый футер (Phase 4) --- */
footer.footer {
  position: relative;
  background: linear-gradient(180deg, rgba(12, 12, 18, 0) 0%, rgba(12, 12, 18, 0.65) 50%, rgba(8, 8, 14, 0.92) 100%);
  margin-top: 80px;
  padding: 48px 0 24px;
  border: 0;
}
footer.footer::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 45, 123, 0.55) 30%, rgba(118, 163, 255, 0.55) 70%, transparent 100%);
}
footer.footer .footer-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}
footer.footer .footer-info h3,
footer.footer .footer-social h3 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #bbb);
  margin: 0 0 14px;
  font-weight: 600;
}
footer.footer .footer-info p { margin: 6px 0; font-size: 14px; color: #ddd; }
footer.footer .footer-info a { color: #ffd67a; text-decoration: none; transition: color .15s ease; }
footer.footer .footer-info a:hover { color: #fff; }
footer.footer .social-links { display: flex; gap: 10px; margin-top: 2px; }
footer.footer .social-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}
footer.footer .social-link:hover {
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.18) 0%, rgba(118, 163, 255, 0.18) 100%);
  border-color: rgba(255, 45, 123, 0.4);
  color: #fff;
  transform: translateY(-2px);
}
/* VC.ru: без тёмной «плашки», логотип читается на чёрном фоне */
footer.footer .social-link.social-link-vc {
  background: transparent;
  border: none;
  padding: 2px;
}
footer.footer .social-link.social-link-vc:hover {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  transform: translateY(-2px);
}
footer.footer .social-link.social-link-vc img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: none;
}
footer.footer .footer-extension-cabinet { align-self: center; }
footer.footer .footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #999);
}
footer.footer .footer-bottom a { color: var(--text-muted, #bbb); }
footer.footer .footer-bottom a:hover { color: #fff; }

@media (max-width: 768px) {
  footer.footer { margin-top: 48px; padding: 36px 0 20px; }
  footer.footer .footer-content { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  footer.footer .social-links { justify-content: center; }
  footer.footer .footer-extension-cabinet { justify-self: center; }
}

/* =====================================================================
   Film Card v2 — постер во главе угла, треугольник Telegram в углу,
   две кнопки-дропдаун (Запланировать / Смотреть)
   ===================================================================== */

.cards-list .film-card-v2,
.cards-list .card.film-card-v2 {
  height: 100%;
}
.film-card-v2 {
  display: flex;
  flex-direction: column;
  overflow: visible;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.3s, box-shadow 0.3s;
}
.film-card-v2-body .film-action-bar {
  margin-top: auto;
  padding-top: 4px;
}
.film-card-v2:hover {
  transform: translateY(-3px);
  border-color: #ff2d7b;
  box-shadow: 0 12px 32px rgba(255, 45, 123, 0.18);
}

.film-card-v2-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #1a1a22;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.film-card-v2-poster .card-poster,
.film-card-v2-poster img.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.film-card-v2-poster .film-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #1a1a22 0%, #0f0f17 100%);
}

/* Прозрачный треугольник Telegram в верхнем-правом углу постера.
   Используем clip-path: polygon — чистый «уголок», без фона вокруг. */
.film-card-tg-triangle {
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 7px 8px 0 0;
  color: #fff;
  text-decoration: none;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  background: linear-gradient(225deg, rgba(34, 158, 217, 0.85) 0%, rgba(34, 158, 217, 0.15) 70%, rgba(34, 158, 217, 0) 100%);
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.film-card-tg-triangle:hover {
  opacity: 1;
  background: linear-gradient(225deg, rgba(34, 158, 217, 1) 0%, rgba(34, 158, 217, 0.35) 70%, rgba(34, 158, 217, 0) 100%);
}
.film-card-tg-triangle svg { display: block; fill: currentColor; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }

/* Прозрачная звёздочка в верхнем-ЛЕВОМ углу постера — быстрая оценка. */
.film-card-rate-star {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffd466;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease, color 0.2s ease;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.film-card-rate-star:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 212, 102, 0.6);
  transform: scale(1.06);
}
.film-card-rate-star svg { display: block; fill: currentColor; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.film-card-rate-star.is-rated {
  background: linear-gradient(135deg, rgba(255, 196, 58, 0.85), rgba(255, 138, 58, 0.85));
  border-color: rgba(255, 212, 102, 0.9);
  color: #1a1a1a;
}
.film-card-rate-star-label { color: inherit; }

/* Поповер быстрой оценки */
.rate-popover {
  position: absolute;
  background: #17171f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  min-width: 280px;
  max-width: min(360px, calc(100vw - 24px));
  color: #fff;
  z-index: 200;
  animation: rate-popover-in 0.15s ease-out;
}
@keyframes rate-popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.rate-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rate-popover-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.rate-popover-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}
.rate-popover-close:hover { color: #fff; }
.rate-popover-stars {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}
.rate-popover-star {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  padding: 0;
}
.rate-popover-star:hover {
  background: rgba(255, 212, 102, 0.15);
  border-color: rgba(255, 212, 102, 0.5);
  color: #ffd466;
  transform: translateY(-1px);
}
.rate-popover-star.is-filled {
  background: linear-gradient(135deg, #ffc43a, #ff8a3a);
  border-color: transparent;
  color: #1a1a1a;
}
.rate-popover-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.rate-popover-remove {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rate-popover-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
@media (max-width: 420px) {
  .rate-popover { min-width: 260px; padding: 10px 12px; }
  .rate-popover-stars { grid-template-columns: repeat(5, 1fr); }
}

.film-card-v2-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.film-card-v2-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}
.film-card-v2-meta .plan-date-line,
.film-card-v2-meta .plan-time-line,
.film-card-v2-meta .plan-type {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.film-card-v2-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.film-card-v2-status {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.film-card-v2-body .film-rated-date {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Панель действий — две овальные кнопки в одну строку */
.film-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  padding-top: 0;
}
.action-dropdown {
  position: relative;
  flex: 1 1 220px;
  min-width: 220px;
}
.cards-list .card.film-card-v2 {
  overflow: visible;
}
.cards-list .card.film-card-v2:has(.action-dropdown.open) {
  z-index: 120;
}
.action-dropdown.open {
  z-index: 121;
}
.action-dropdown-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  /* на кнопках не нужен user-select — чтобы по двойному клику не выделять текст */
  user-select: none;
  -webkit-user-select: none;
}
.action-dropdown-btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.action-dropdown-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.cards-list .film-card-v2 .action-dropdown-btn {
  padding: 0 14px;
  gap: 6px;
}
.cards-list .film-card-v2 .action-dropdown-btn-label,
.cards-list .film-card-v2 .action-dropdown-btn-text {
  overflow: visible;
  text-overflow: clip;
  flex-shrink: 0;
}
.action-dropdown-btn-emoji {
  flex-shrink: 0;
  line-height: 1;
}
.action-dropdown-btn:active { transform: scale(0.97); }
.action-dropdown-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.action-dropdown-btn-plan {
  background: linear-gradient(135deg, #ff2d7b 0%, #9b4dff 100%);
  border-color: transparent;
  color: #fff;
}
.action-dropdown-btn-plan:hover {
  filter: brightness(1.08);
  border-color: transparent;
  background: linear-gradient(135deg, #ff2d7b 0%, #9b4dff 100%);
}
.action-dropdown-btn-watch {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #6ee7a0;
}
.action-dropdown-btn-watch:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.55);
  color: #9cf0be;
}
.action-dropdown-caret {
  font-size: 11px;
  opacity: 0.85;
}

.action-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 220px;
  background: #17171f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-dropdown.open .action-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #f4f6ff;
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.action-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Сетка карточек теперь тяготеет к более крупным плиткам, чтобы постер действительно доминировал */
.cards-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.plans-today-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

/* Внутри .plans-split (две колонки) карточки всё ещё крупные, но их умещается 2 в ряд */
.plans-split .cards-list,
.plans-split [class*="plan"] + .cards-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* v2 полностью заменяет стили старой .plan-card — обнуляем их в контексте v2 */
.plan-card.film-card-v2 .plan-card-poster,
.plan-card.film-card-v2 .plan-card-buttons,
.plan-card.film-card-v2 .plan-card-info { all: unset; }

/* v2 заменяет .film-card-main / .film-buttons в контексте v2 */
.film-card-v2 .film-card-main,
.film-card-v2 .film-buttons,
.film-card-v2 .card-poster-wrap { all: unset; }

@media (max-width: 480px) {
  .cards-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .plans-today-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .film-card-v2-body { padding: 10px 12px 12px; }
  .film-card-v2-title { font-size: 13px; }
  .action-dropdown { flex-basis: 100%; min-width: 0; }
  .action-dropdown-btn { font-size: 14px; min-height: 46px; padding: 0 14px; }
  .film-card-tg-triangle { width: 44px; height: 44px; }
}

@media (min-width: 900px) {
  #section-film .film-modal-actions {
    gap: 14px;
  }
  #section-film .film-modal-actions > .watched-toggle,
  #section-film .film-modal-actions > .btn,
  #section-film .film-modal-actions > .film-action-bar {
    flex: 0 1 auto;
  }
  #section-film .film-action-bar {
    flex: 1 1 460px;
    max-width: 620px;
  }
  #section-film .action-dropdown {
    min-width: 260px;
  }
  #section-film .action-dropdown-btn {
    min-height: 58px;
    padding: 0 24px;
    font-size: 17px;
  }
  #section-film .watched-toggle {
    min-height: 58px;
    padding: 0 22px;
    font-size: 17px;
    font-weight: 900;
  }
}

/* —— Header: настройки, голосовой поиск —— */
.header-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  max-width: none;
  text-decoration: none;
}
.header-settings-btn:hover { opacity: 0.85; background: transparent; text-decoration: none; }
.header-settings-dropdown { min-width: 260px; max-width: 92vw; }
#header-settings-dropdown.hidden { display: none !important; }
#header-settings-dropdown:not(.open) { display: none !important; }
body:not(.account-menu-open) #header-settings-dropdown { display: none !important; }
body.account-menu-open #site-header {
  overflow: visible !important;
  z-index: 290 !important;
}
body.account-menu-open #header-settings-dropdown.open {
  z-index: 291 !important;
  pointer-events: auto;
}
.mp-touch-blocker {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: transparent;
}
.mp-touch-blocker.active { display: block; }
@media (max-width: 768px) {
  body.account-menu-open .header-settings-dropdown.open {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
    overflow-y: auto;
    z-index: 300;
  }
}
html.mp-route-pending body { visibility: hidden; }
html.mp-route-pending .mp-seo-article { display: none !important; }
html.mp-route-ready body { visibility: visible; }
html.mp-has-seo-body .mp-seo-article,
html.mp-route-ready .mp-seo-article,
body.film-page-mode .mp-seo-article {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.mp-film-title-loading { opacity: 0.72; }
a.home-poster-tile,
a.home-pre-card {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.header-settings-nav-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: transparent; color: #fff;
  font-size: 14px; cursor: pointer; border-radius: 8px;
}
.header-settings-nav-item:hover { background: rgba(255,255,255,0.08); }
.header-search-mic {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: none; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  cursor: pointer; font-size: 16px;
}
.header-search-mic:hover { background: rgba(255,255,255,0.12); }
.header-search-mic.recording { background: rgba(200,40,40,0.4); animation: mp-pulse 1s ease infinite; }
@keyframes mp-pulse { 50% { opacity: 0.75; } }
.header-search-recent-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #889; padding: 8px 12px 4px; }
.header-search-recent-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.header-search-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); color: #ddd; cursor: pointer; }
.cabinet-profile-emoji:empty { display: none; }

/* —— Группы: крестик, участники —— */
.group-card { position: relative; }
.group-card-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border: none; border-radius: 8px;
  background: rgba(255,80,80,0.2); color: #faa; font-size: 18px; line-height: 1; cursor: pointer; z-index: 2;
}
.group-card-close:hover { background: rgba(255,80,80,0.35); }
.group-card-manage { margin-top: 4px; }
.room-members-body { max-height: 60vh; overflow: auto; }
.room-member-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); flex-wrap: wrap; }
.room-member-name { font-weight: 500; }
.room-member-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room-member-controls select { max-width: 140px; }

/* —— Что посмотреть / настройки —— */
.whattowatch-modes { display: flex; flex-direction: column; gap: 10px; }
.whattowatch-mode-btn {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07); color: #fff; cursor: pointer; font-size: 15px;
  transition: background 0.12s, border-color 0.12s;
}
.whattowatch-mode-btn:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255, 45, 123, 0.35);
}
.whattowatch-mode-btn > div { flex: 1; min-width: 0; }
.whattowatch-mode-btn b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}
.whattowatch-mode-btn .cabinet-hint {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}
.whattowatch-mode-emoji { font-size: 26px; line-height: 1.2; flex-shrink: 0; }
.whattowatch-result { margin-top: 16px; }
.settings-block { margin-bottom: 20px; }
.profile-settings-card,
.profile-import-card,
.settings-block {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
}
.profile-settings-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.profile-settings-avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
}
.profile-settings-avatar-block {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.avatar-picker-item {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: var(--bg-surface-alt, rgba(255, 255, 255, 0.06));
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.avatar-picker-item:hover {
  border-color: rgba(255, 45, 123, 0.45);
}
.avatar-picker-item:active {
  transform: scale(0.96);
}
.avatar-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-settings-name-preview {
  margin: 4px 0 4px;
  color: var(--text-primary, #fff);
}
.profile-settings-form,
.profile-settings-avatar-form,
.profile-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.profile-settings-avatar-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.profile-settings-form label,
.profile-settings-file {
  display: grid;
  gap: 7px;
  color: var(--text-muted, #999);
  font-size: 12px;
  font-weight: 700;
}
.profile-settings-form input,
.profile-import-form input,
.profile-settings-file input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary, #fff);
  padding: 10px 12px;
}
.profile-settings-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted, #999);
}
.profile-settings-status.success { color: #6ee7a8; }
.profile-settings-status.error { color: #ff6b8a; }
.profile-import-progress {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-import-progress.hidden { display: none; }
.profile-import-progress-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.profile-import-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #ff2d7b, #ff6b9d);
  transition: width 0.25s ease;
}
.profile-import-progress-fill.indeterminate {
  width: 35% !important;
  animation: profile-import-indeterminate 1.1s ease-in-out infinite;
}
@keyframes profile-import-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.profile-import-progress-label {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted, #999);
}
.profile-import-progress-label.success { color: #6ee7a8; }
.profile-import-progress-label.error { color: #ff6b8a; }
.profile-searchable-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary, #fff);
  cursor: pointer;
}
.profile-searchable-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #ff2d7b;
}
.profile-searchable-toggle span {
  display: grid;
  gap: 3px;
}
.profile-searchable-toggle small {
  color: var(--text-muted, #999);
  font-size: 12px;
  line-height: 1.35;
}
.settings-connectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.settings-accounts-list {
  display: grid;
  gap: 8px;
}
.settings-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  padding: 12px 14px;
  cursor: pointer;
}
.settings-account-row.is-active {
  border-color: rgba(255, 45, 123, 0.42);
  background: rgba(255, 45, 123, 0.10);
}
.settings-account-row span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted, #999);
  font-size: 12px;
}
.settings-account-remove {
  border: none;
  background: transparent;
  color: #ff4d73;
  font-size: 22px;
  cursor: pointer;
}
.settings-list a, .settings-list button.settings-row {
  display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 6px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04); color: #fff; text-decoration: none; font-size: 14px; cursor: pointer;
}
.settings-row {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  min-height: 44px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}
.settings-list a:hover, .settings-list button.settings-row:hover { background: rgba(255,255,255,0.08); }
.section-title--text-only .section-title-text { font-size: 1.35rem; }

@media (max-width: 720px) {
  .header-profile-name { display: none; }
  .header-user-wrap { gap: 8px; }
  .header-coins-btn,
  .header-settings-btn { padding-inline: 12px; }
  .cabinet-user-name { max-width: 220px; font-size: 19px; }
  .profile-settings-form,
  .profile-import-form,
  .profile-settings-avatar-form {
    grid-template-columns: 1fr;
  }
}

/* —— Страница настроек (десктоп) —— */
.cabinet-settings .settings-content,
#section-settings .settings-content {
  max-width: min(1200px, 96vw);
  margin: 0 auto;
}
.settings-photo-editor {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.settings-photo-editor.hidden {
  display: none !important;
}
#profile-settings-edit-photo.hidden {
  display: none !important;
}
@media (min-width: 1100px) {
  .settings-panels-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }
  .settings-panel--wide {
    grid-column: 1 / -1;
  }
  .settings-panel--compact {
    min-height: 0;
  }
  .settings-hero-card {
    padding: 28px 32px;
  }
  .settings-panel {
    padding: 22px 26px;
  }
  .settings-panel-title {
    font-size: 14px;
  }
  .settings-toggle-title {
    font-size: 16px;
  }
}
.settings-loading {
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 15px;
}
.settings-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-hero-card {
  padding: 24px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.1), rgba(124, 60, 255, 0.08));
}
.settings-hero-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.settings-hero-avatar,
.settings-hero-avatar img,
.settings-hero-avatar .avatar-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 36px;
}
.settings-hero-name {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.settings-pro-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: #fff;
}
.settings-hero-meta {
  margin-top: 6px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.68);
}
.settings-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
}
.settings-hero-stat {
  min-width: 72px;
}
.settings-hero-stat b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.settings-hero-stat span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.settings-name-form {
  display: grid;
  gap: 8px;
}
.settings-name-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}
.settings-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.settings-name-row input {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 16px;
}
.settings-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.settings-panel {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}
.settings-panel--wide {
  grid-column: 1 / -1;
}
.settings-panel-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.settings-panel-lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}
.settings-toggle-list {
  display: grid;
  gap: 10px;
}
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.settings-toggle-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.settings-toggle-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.settings-toggle-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.settings-toggle-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.settings-toggle-hint {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}
.settings-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 46px;
  height: 28px;
}
.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.settings-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.18s ease;
}
.settings-switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.settings-switch input:checked + .settings-switch-slider {
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
}
.settings-switch input:checked + .settings-switch-slider::before {
  transform: translateX(18px);
}
.settings-switch--compact {
  width: 40px;
  height: 24px;
}
.settings-switch--compact .settings-switch-slider::before {
  width: 18px;
  height: 18px;
}
.settings-switch--compact input:checked + .settings-switch-slider::before {
  transform: translateX(16px);
}
.settings-avatar-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 12px;
}
.settings-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.settings-import-form input {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 15px;
}
.settings-import-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.settings-import-tab--on {
  background: #ff2d7b;
  border-color: #ff2d7b;
  color: #0f0f13;
}
.settings-import-pane.hidden {
  display: none;
}
.settings-import-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}
.settings-import-count--on {
  background: #ff2d7b;
  border-color: #ff2d7b;
  color: #0f0f13;
}
#profile-import-form {
  grid-template-columns: minmax(0, 1fr);
}
#profile-import-form button[type="submit"] {
  grid-column: 1 / -1;
}
#profile-import-external-form {
  grid-template-columns: minmax(0, 1fr);
}
#profile-import-external-form select,
#profile-import-external-form textarea {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 15px;
}
#profile-import-external-form textarea {
  min-height: 120px;
  resize: vertical;
}
.settings-home-sections {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-home-sections-label {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}
.settings-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
}
.settings-sec-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.settings-sec-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-sec-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.settings-sec-reset {
  margin-top: 8px;
}
.settings-billing-pro {
  text-align: center;
  padding: 8px 0;
}
.settings-billing-pro-badge {
  font-size: 28px;
  margin-bottom: 8px;
}
.settings-billing-pro-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.settings-billing-pro-meta,
.settings-billing-pro-hint {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}
.settings-billing-lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}
.settings-billing-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}
.settings-billing-terms a {
  color: #9fd6ff;
}
.settings-billing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.settings-billing-foot {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.settings-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.settings-link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.settings-link-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 45, 123, 0.35);
}
@media (max-width: 900px) {
  .settings-panels-grid,
  .settings-links-grid,
  .settings-billing-actions {
    grid-template-columns: 1fr;
  }
  .settings-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .settings-name-row,
  .settings-import-form {
    grid-template-columns: 1fr;
  }
  .settings-hero-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Главная кабинета, модалка конструктора, Шазам —— */
.home-dash-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.home-emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: background 0.15s ease, transform 0.12s ease;
}
.home-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.home-dashboard-root {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

/* Каждый блок — чистая карточка без жёсткой высоты */
.home-dash-block {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Заголовок секции: название + ссылка «Все» */
.home-dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.home-dash-h {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-body, #fff);
}
.home-dash-more {
  font-size: 13px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #ff5aa5);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-dash-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Текстовые ссылки-кнопки без серой подложки (везде: «Главная», «Вся таблица», inbox и т.д.) */
.link-inline,
button.link-inline,
a.link-inline {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent !important;
  box-shadow: none;
  color: var(--accent, #ff5aa5);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.link-inline:hover,
button.link-inline:hover,
a.link-inline:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent !important;
}
.shazam-page-back-wrap {
  margin-bottom: 8px;
}
.shazam-page-back-wrap .link-inline {
  color: var(--text-muted);
  font-weight: 600;
}
.shazam-page-back-wrap .link-inline:hover {
  color: var(--accent, #ff5aa5);
}

/* Список строк */
.home-dash-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Одна строка — фильм/сериал/план */
.home-dash-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.13s;
}
.home-dash-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Премьера: текст + кнопка рядом */
.home-dash-row--premiere {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
}
.home-dash-row.film-card-v2 { position: relative; }

.home-dash-rows {
  overflow: visible;
}

/* Текст внутри строки */
.home-dash-row-text {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.home-dash-row-main {
  min-width: 0;
  flex: 1;
}
.home-dash-row-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-dash-row-meta {
  font-size: 12px;
  color: var(--text-muted, #aab);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-premiere-date-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 200, 92, 0.13);
  color: #ffd681;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-right: 8px;
}
.home-premiere-inline-meta { color: rgba(255,255,255,0.58); }
.home-premiere-desc {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(255,255,255,0.66);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-premiere-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.premiere-bell-btn,
.film-share-icon-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.film-share-icon-btn { font-size: 18px; }
.premiere-bell-btn:hover,
.film-share-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 200, 92, 0.34);
}
.premiere-bell-btn.active {
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.95), rgba(255, 200, 92, 0.95));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 45, 123, 0.23);
}
.premiere-bell-btn[disabled],
.premiere-bell-btn[aria-disabled="true"] {
  opacity: .65;
  cursor: default;
  transform: none;
}
.home-premiere-preview,
.home-film-preview {
  position: absolute;
  left: 62px;
  bottom: calc(100% - 4px);
  z-index: 80;
  width: min(360px, calc(100vw - 44px));
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(19, 17, 29, 0.98);
  box-shadow: 0 22px 52px rgba(0,0,0,0.52);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.home-dash-row:hover .home-premiere-preview,
.home-dash-row:hover .home-film-preview,
.premiere-poster-tile:hover .home-film-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.premiere-poster-tile .home-film-preview {
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(8px) scale(.98);
}
.premiere-poster-tile:hover .home-film-preview {
  transform: translateX(-50%) translateY(0) scale(1);
}
.home-premiere-preview-poster,
.home-film-preview-poster {
  width: 86px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-premiere-preview-poster img,
.home-film-preview-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-premiere-preview-body,
.home-film-preview-body { min-width: 0; }
.home-premiere-preview-title,
.home-film-preview-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 5px;
}
.home-premiere-preview-date,
.home-film-preview-meta {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  margin-bottom: 8px;
  line-height: 1.35;
}
.home-premiere-preview-date {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 200, 92, 0.14);
  color: #ffd681;
  font-size: 12px;
  font-weight: 700;
}
.home-film-preview-meta .home-premiere-date-pill {
  margin-right: 6px;
}
.home-premiere-preview-desc,
.home-film-preview-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255,255,255,0.74);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Карточка превью при наведении на постер в ленте главной */
.home-poster-tile-wrap {
  position: relative;
  flex: 0 0 42%;
  min-width: 120px;
  max-width: 150px;
  scroll-snap-align: start;
}
.home-poster-tile-wrap > .home-poster-tile {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
}
.home-poster-preview-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px) scale(0.97);
  z-index: 120;
  width: min(400px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(28, 24, 40, 0.98), rgba(14, 12, 22, 0.98));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 45, 123, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.home-poster-tile-wrap:hover .home-poster-preview-pop,
.home-poster-tile-wrap:focus-within .home-poster-preview-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}
.home-poster-preview-pop-poster {
  width: 108px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.home-poster-preview-pop-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-poster-preview-pop-body { min-width: 0; }
.home-poster-preview-pop-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 6px;
}
.home-poster-preview-pop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.home-poster-preview-pop-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}
.home-poster-preview-pop-chip--rating {
  background: rgba(255, 200, 92, 0.16);
  color: #ffd681;
}
.home-poster-preview-pop-desc {
  font-size: 13px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.76);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-poster-preview-pop-desc.is-loading {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  -webkit-line-clamp: 2;
}
.home-rail-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  padding: 0 2px;
}
.home-poster-rail.home-rail--draggable {
  cursor: grab;
}

/* Пустое состояние */
.home-dash-empty {
  padding: 8px 0 4px;
  color: var(--text-muted, #aab);
}
.home-dash-empty .empty-hint {
  font-size: 14px;
  margin: 0 0 12px;
}
.home-dash-empty .plans-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-shazam-block {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* Отдельная страница «Подбор по описанию»: без разделителя как под главной */
#section-shazam .home-shazam-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
#section-shazam .home-shazam-row {
  max-width: 920px;
}
.home-shazam-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.home-shazam-textarea {
  flex: 1;
  min-width: 200px;
  min-height: 88px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.home-shazam-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.home-shazam-results {
  margin-top: 12px;
}
.home-shazam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.home-shazam-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.home-shazam-card:hover {
  border-color: rgba(255, 200, 80, 0.4);
  transform: translateY(-2px);
}
.home-shazam-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.home-shazam-poster--empty {
  aspect-ratio: 2 / 3;
}
.home-shazam-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px;
  min-height: 0;
}
.home-shazam-card-open {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: 100%;
}
.home-shazam-card-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-shazam-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.home-shazam-card-actions {
  margin-top: auto;
  padding-top: 10px;
}
.shazam-card-add-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 200, 80, 0.4);
  background: rgba(255, 200, 80, 0.12);
  color: #ffd07a;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.shazam-card-add-btn:hover {
  background: rgba(255, 200, 80, 0.2);
  border-color: rgba(255, 200, 80, 0.55);
}
.home-shazam-tg-wrap {
  margin-top: 12px;
  font-size: 13px;
}

/* ===== Страница «Подбор по описанию» (/shazam) ===== */
@keyframes mp-shazam-spin {
  to { transform: rotate(360deg); }
}
.site-shazam-page,
#section-shazam .shazam-page {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 32px;
}
.shazam-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin-bottom: 6px;
  gap: 10px;
}
.shazam-coin-pill {
  flex-shrink: 0;
  margin: 0;
}
.poster-reco-coin-pill,
.shazam-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.poster-reco-coin-pill-val {
  font-variant-numeric: tabular-nums;
}
.global-coins-sprite,
.poster-reco-coin-pill-sprite,
.shazam-coin-pill .global-coins-sprite {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-image: url('coin_gold.png');
  background-size: calc(8 * 18px) 18px;
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: site-coin-spin 0.8s steps(8) infinite;
}
.shazam-history-ic {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-primary, #fff);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.shazam-history-ic:hover { opacity: 0.9; }
.shazam-history-ic:active { transform: scale(0.96); }
.shazam-hero {
  text-align: center;
  padding: 8px 12px 12px;
  margin-bottom: 4px;
}
.shazam-hero-emoji { font-size: 42px; line-height: 1; }
.shazam-hero-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text-primary, #fff);
}
.shazam-hero-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}
.shazam-search-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.shazam-native-input {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary, #fff);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  line-height: 1.4;
  box-sizing: border-box;
}
.shazam-native-input::placeholder { color: var(--text-muted); opacity: 0.85; }
.shazam-native-input:focus {
  border-color: rgba(255, 45, 123, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 45, 123, 0.12);
}
.shazam-run-btn {
  background: linear-gradient(135deg, var(--accent, #ff2d7b), var(--accent-end, #9b4dff));
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.shazam-run-btn:disabled { opacity: 0.65; cursor: default; }
.shazam-run-btn.is-loading { opacity: 0.92; }
.shazam-run-btn-text { color: #fff; font-weight: 700; font-size: 15px; }
.shazam-run-btn-text.hidden,
.shazam-run-btn-spinner.hidden { display: none !important; }
.shazam-run-btn-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mp-shazam-spin 0.9s linear infinite;
}
.shazam-voice-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  width: 100%;
}
.shazam-voice-btn.recording {
  background: rgba(58, 30, 38, 0.95);
  border-color: var(--accent, #ff2d7b);
}
.shazam-voice-btn:disabled { opacity: 0.6; cursor: default; }
.shazam-voice-btn-text { color: var(--text-primary, #fff); font-weight: 600; font-size: 14px; }
.shazam-examples { margin-top: 4px; margin-bottom: 8px; }
.shazam-examples-label { margin-bottom: 6px; }
.shazam-example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.shazam-example-chips .chip {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  word-break: break-word;
}
.shazam-example-chips .chip:hover { background: rgba(255, 255, 255, 0.08); }
.shazam-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 1.25em;
}
.shazam-loading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 14px;
}
.shazam-find-more-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  width: 100%;
}
.shazam-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 28px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.shazam-new-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 200, 80, 0.35);
}
@media (min-width: 900px) {
  body.in-cabinet #section-shazam .site-shazam-page {
    max-width: 980px;
  }
  body.in-cabinet #section-shazam .home-shazam-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
  body.in-cabinet #section-shazam .home-shazam-card-title {
    font-size: 14px;
  }
  body.in-cabinet #section-shazam .home-shazam-card-body {
    padding: 10px 10px 12px;
  }
}
.shazam-history-sheet { max-height: min(88vh, 620px); }
.shazam-hist-sheet-body {
  max-height: min(62vh, 480px);
  overflow-y: auto;
  padding-right: 4px;
}
.shazam-hist-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.shazam-hist-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.shazam-hist-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.shazam-hist-query {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  line-height: 1.4;
  margin-bottom: 10px;
}
.shazam-hist-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.shazam-hist-result:hover { background: rgba(255, 255, 255, 0.07); }
.cabinet-plans-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
#modal-home-layout:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-home-layout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 16, 0.78);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 0;
}
.modal-home-layout-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
}
.home-layout-emoji-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
  font-size: 14px;
}
.home-layout-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.home-layout-blocks-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.home-layout-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.home-layout-li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.home-layout-vis {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.home-layout-order {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
a.header-settings-nav-item {
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}
#cabinet-profile-name {
  cursor: pointer;
}

/* ===== Cabinet hardening: standalone web UX ===== */
.cabinet a[href] {
  color: #9fd6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cabinet a[href]:hover { color: #d8efff; }
.cabinet #home-dashboard-root a.home-poster-tile,
.cabinet #home-dashboard-root a.home-pre-card,
.cabinet #home-dashboard-root .home-poster-tile-wrap a.home-poster-tile {
  color: inherit;
  text-decoration: none;
}
.cabinet #home-dashboard-root a.home-poster-tile:hover,
.cabinet #home-dashboard-root a.home-pre-card:hover {
  color: inherit;
  text-decoration: none;
}
/* Глобальный section-стиль landing не должен сжимать секции кабинета */
.cabinet .cabinet-section {
  max-width: none;
  margin: 0 0 20px;
  padding: 0;
}
.cabinet .cabinet-section > .section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  text-align: left;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.cabinet .cabinet-section > .section-title .section-title-text {
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cabinet .cabinet-section > .section-title .section-title-emoji {
  -webkit-text-fill-color: initial;
}
.cabinet .premieres-toolbar {
  margin-bottom: 4px;
}

/* Карточки главной — сбросить max-width от глобального section-лендинга */
#home-dashboard-root > section.home-dash-block {
  max-width: none;
  width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/* Home quick actions: big + centered */
.home-quick-actions {
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 6px 0 20px;
}
.home-emoji-btn {
  width: 64px;
  height: 64px;
  font-size: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.home-emoji-btn:hover { transform: translateY(-2px) scale(1.03); }

/* Постер в строке */
.home-dash-row-poster {
  width: 40px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.home-dash-row-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Home preview rows must stay as rows even though app.js reuses film-card-v2. */
#section-home .home-dash-row.film-card-v2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  transform: none;
  box-shadow: none;
  text-align: left;
}
#section-home .home-dash-row.film-card-v2:hover {
  transform: none;
  box-shadow: none;
}
#section-home .home-dash-row-text {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
}
#section-home .home-dash-row-main,
#section-home .home-dash-row-title,
#section-home .home-dash-row-meta {
  text-align: left;
}
/* Десктоп: полноширинные карусели, заголовки по центру */
@media (min-width: 901px) {
  body.in-cabinet #section-home .section-title {
    display: none;
  }
  body.in-cabinet #section-home .home-quick-actions {
    justify-content: center;
    gap: 22px;
    margin: 8px 0 14px;
  }
  body.in-cabinet #section-home .home-emoji-btn {
    width: 80px;
    height: 80px;
    font-size: 40px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }
  body.in-cabinet #section-home .home-dashboard-root {
    display: flex;
    flex-direction: column;
    gap: 44px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }
  body.in-cabinet #section-home .home-dashboard-root .home-dash-block {
    min-width: 0;
    overflow: visible;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
  }
  body.in-cabinet #section-home .home-dash-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 18px;
  }
  body.in-cabinet #section-home .home-dash-h {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #fff;
  }
  body.in-cabinet #section-home .home-dash-more {
    font-size: 14px;
    font-weight: 700;
  }
  body.in-cabinet #section-home .home-section-body {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
  body.in-cabinet #section-home .home-poster-rail,
  body.in-cabinet #section-home .home-prem-rail {
    gap: 18px;
    padding: 0 0 18px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(24px, env(safe-area-inset-left, 0px));
  }
  body.in-cabinet #section-home .home-poster-tile-wrap,
  body.in-cabinet #section-home .home-poster-tile,
  body.in-cabinet #section-home .home-pre-card {
    flex: 0 0 clamp(180px, 16vw, 260px);
    min-width: clamp(180px, 16vw, 260px);
    max-width: none;
    border-radius: 14px;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  body.in-cabinet #section-home .home-poster-tile-wrap > .home-poster-tile {
    flex: none;
    min-width: 0;
    width: 100%;
  }
  body.in-cabinet #section-home .home-poster-tile-wrap:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
  body.in-cabinet #section-home .home-poster-tile-wrap:hover .home-poster-tile {
    transform: translateY(-4px);
  }
  body.in-cabinet #section-home .home-pre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
  body.in-cabinet #section-home .home-poster-tile-title,
  body.in-cabinet #section-home .home-pre-card-title {
    font-size: 15px;
    padding: 10px 10px 4px;
  }
  body.in-cabinet #section-home .home-poster-tile-year,
  body.in-cabinet #section-home .home-pre-card-meta {
    font-size: 13px;
    padding: 0 10px 10px;
  }
  body.in-cabinet #section-home .home-dashboard-root .home-dash-rows {
    overflow: visible;
  }
  body.in-cabinet #section-home .home-dash-row--premiere {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body.in-cabinet .cabinet-home-stats {
    gap: 18px;
    margin: 4px 0 32px;
  }
  body.in-cabinet .cabinet-home-stat {
    min-height: 112px;
    padding: 22px 16px;
    gap: 10px;
    border-radius: 18px;
    border-width: 1.5px;
  }
  body.in-cabinet .cabinet-home-stat b {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(40px, 4.5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.04em;
  }
  body.in-cabinet .cabinet-home-stat span {
    font-size: 14px;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.72);
  }
}

/* Plans toolbar and empty actions: no overlap */
.cabinet-plans-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cabinet-plans-toolbar .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: normal;
  text-align: center;
  min-height: 44px;
}
.plans-empty-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 900px) {
  .plans-empty-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
  }
}
.plans-empty-actions .btn {
  min-width: 0;
  width: 100%;
  justify-content: center;
  white-space: normal;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  box-sizing: border-box;
}
/* Крупные глобальные .btn-primary / .btn-secondary не должны ломать сетку пустых состояний */
.plans-empty-actions .btn.btn-primary,
.plans-empty-actions .btn.btn-secondary {
  height: auto;
  min-height: 48px;
  box-shadow: none;
}
.plans-empty-actions .btn.btn-primary {
  padding: 12px 18px;
}
.plans-empty-actions .btn.btn-secondary {
  padding: 11px 18px;
}

/* What to watch cards and wizard */
.whattowatch-result-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}
.whattowatch-result-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.whattowatch-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.whattowatch-result-body .btn { margin-right: 8px; }

.wtw-wizard {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}
.wtw-wizard-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.wtw-wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.wtw-wizard-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.wtw-wizard-grid input,
.wtw-wizard-grid select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  padding: 8px 10px;
}
.wtw-wizard-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 12px 0;
}
.wtw-wizard-genres label {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wtw-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.wtw-cards {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.wtw-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}
.wtw-card-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wtw-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wtw-card-body { padding: 10px; }
.wtw-card-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}
.wtw-card-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin: 4px 0 8px;
}
.wtw-card-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Mobile-first final overrides */
@media (max-width: 900px) {
  .cabinet-plans-toolbar { grid-template-columns: 1fr 1fr; }
  .home-dash-row--premiere {
    flex-wrap: wrap;
    gap: 8px;
  }
  .home-dash-row--premiere .btn {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 680px) {
  .home-emoji-btn {
    width: 58px;
    height: 58px;
    font-size: 27px;
  }
  .home-dash-page-head { justify-content: center; }
  .cabinet-plans-toolbar { grid-template-columns: 1fr; }
  .plans-empty-actions { grid-template-columns: 1fr; }
  .plans-filter-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  .whattowatch-result-card {
    grid-template-columns: 1fr;
  }
  .wtw-wizard-grid { grid-template-columns: 1fr; }
  .wtw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .wtw-cards { grid-template-columns: 1fr; }
}

/* Виртуальная группа: оценки админов (карточка фильма в кабинете) */
.film-admin-ratings-details {
  background: var(--bg-surface, rgba(255,255,255,0.04));
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 0 12px 12px;
  margin-top: 8px;
}
.film-admin-ratings-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary, #fff);
}
.film-admin-ratings-summary::-webkit-details-marker { display: none; }
.film-admin-ratings-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 45, 123, 0.2);
  color: #ff6ba8;
}
.film-admin-ratings-body {
  border-top: 1px solid var(--border-color, rgba(255,255,255,0.08));
  padding-top: 4px;
}
.film-admin-rating-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}
.film-admin-rating-row:last-child { border-bottom: 0; }
.film-admin-rating-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.film-admin-rating-name { font-weight: 600; font-size: 14px; word-break: break-word; }
.film-admin-rating-role { font-size: 12px; color: var(--text-muted, #999); }
.film-admin-rating-score {
  font-size: 16px;
  font-weight: 800;
  color: #ff2d7b;
  flex-shrink: 0;
}
.film-admin-rating-denom { font-size: 12px; font-weight: 600; color: var(--text-muted, #999); margin-left: 1px; }
.film-admin-ratings-empty { color: var(--text-muted, #999); font-size: 14px; margin: 8px 0; }
.film-rating-locked {
  border: 1px dashed var(--border-color, rgba(255,255,255,0.15));
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.15);
}
.film-rating-locked-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted, #aaa);
}

/* Друзья высоко оценили — узкая плашка по центру под иконками тулбара */
.film-toolbar-friends-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
#film-friends-social-block {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
}
#film-friends-social-block.hidden {
  display: none;
}
#film-friends-social-block > section.film-friends-social,
#film-friends-social-block .film-friends-social,
.film-friends-social {
  display: inline-block;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
.film-friends-social-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.film-friends-social-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(233, 228, 244, 0.92);
}
.film-friends-social-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 45, 123, 0.2);
  color: #ff6ba8;
}
.film-friends-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.film-friend-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.film-friend-rating-chip:hover,
.film-friend-rating-chip:focus-visible {
  border-color: rgba(255, 45, 123, 0.45);
  background: rgba(255, 45, 123, 0.12);
  outline: none;
}
.film-friend-rating-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.film-friend-rating-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.film-friend-rating-score {
  font-size: 14px;
  font-weight: 800;
  color: #ff2d7b;
  flex-shrink: 0;
}
.film-friend-rating-denom {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #999);
  margin-left: 1px;
}
.film-friends-social-more {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: #ff6ba8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.film-friends-social-more:hover {
  text-decoration: underline;
}
.movie-page .hero-content .film-friends-social {
  margin-top: 4px;
}
@media (min-width: 861px) {
  .film-friends-social--compact {
    display: inline-block;
    width: auto;
    max-width: 100%;
    padding: 8px 12px;
  }
  .film-friends-social--compact .film-friends-social-head {
    margin-bottom: 6px;
  }
  .film-friends-social--compact .film-friends-social-list {
    flex-wrap: nowrap;
  }
}

/* ── Coins + план в группу (строка без увеличения высоты шапки) ─────── */
.header-util-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin-right: 8px;
  flex-shrink: 0;
}
.header-plan-target {
  max-width: 132px;
  height: 28px;
  padding: 0 22px 0 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 181, 71, 0.35);
  background: rgba(20, 22, 28, 0.92);
  color: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23a1a1aa' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.header-plan-target.hidden { display: none; }
.header-util-row .header-coins-btn { margin-right: 0; }

/* ── Coins widget ────────────────────────────────────────────────────── */
.header-coins-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffb547;
  cursor: pointer;
  margin-right: 8px;
  transition: opacity .15s;
}
.header-coins-btn:hover { opacity: 0.85; background: transparent; }
.header-coins-sprite {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('coin_gold.png');
  background-size: calc(8 * 20px) 20px;
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: site-coin-spin .8s steps(8) infinite;
}
@keyframes site-coin-spin {
  from { background-position: 0 0; }
  to   { background-position: calc(-8 * 20px) 0; }
}
.header-coins-btn {
  position: relative;
}
#header-coins-delta {
  position: absolute;
  right: -4px;
  top: -10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  animation: header-coins-delta-float 1s ease-out forwards;
}
#header-coins-delta.coins-flash-up { color: #4ade80; }
#header-coins-delta.coins-flash-down { color: #ff6b6b; }
.header-coins-btn.coins-flash-up {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.45), 0 0 18px rgba(74, 222, 128, 0.35);
}
.header-coins-btn.coins-flash-down {
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.45), 0 0 18px rgba(255, 107, 107, 0.35);
}
@keyframes header-coins-delta-float {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); }
  20% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 0; transform: translateY(-14px) scale(1); }
}
.coin-action-pop {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px 5px 5px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.94);
  border: 1px solid rgba(255, 45, 123, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  animation: coin-action-float 1.25s cubic-bezier(.16,1,.3,1) forwards;
}
.coin-action-pop--up {
  color: #4ade80;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 18px rgba(74, 222, 128, 0.35);
}
.coin-action-pop--down { color: #ff6b6b; }
.coin-action-pop-sprite {
  width: 18px;
  height: 18px;
  background-image: url('coin_gold.png');
  background-size: calc(8 * 18px) 18px;
  image-rendering: pixelated;
  animation: site-coin-spin .65s steps(8) infinite;
}
.coin-action-pop-value {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
@keyframes coin-action-float {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.74) rotate(-8deg); }
  16% { opacity: 1; transform: translate(-50%, -76%) scale(1.16) rotate(5deg); }
  42% { opacity: 1; transform: translate(-50%, -118%) scale(1) rotate(-2deg); }
  76% { opacity: 1; transform: translate(-50%, -154%) scale(1.02) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -196%) scale(0.94) rotate(0); }
}
/* ── /Coins widget ───────────────────────────────────────────────────── */

/* ── Friends / Social (Друзья и группы) ──────────────────────────────── */
.soc-tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}
.soc-tab {
  flex: 1;
  padding: 12px 10px;
  background: transparent;
  border: none;
  border-radius: 12px;
  margin-bottom: 0;
  color: var(--text-muted, #888);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}
.soc-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,45,123,0.18), rgba(64,178,255,0.12));
  box-shadow: inset 0 0 0 1px rgba(255,45,123,0.24);
}
.soc-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent, #ff2d7b);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 5px;
}
.soc-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0 14px;
}
.soc-search-row .input { flex: 1; }
.soc-friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.soc-friend-card:hover { background: rgba(255,255,255,0.07); }
.soc-friend-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent, #ff2d7b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.soc-friend-name { font-weight: 700; font-size: 14px; }
.soc-friend-meta { font-size: 12px; color: var(--text-muted, #888); margin-top: 2px; }
.soc-request-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
}
.soc-activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #eee);
}
.list-title-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #aaa);
  margin: 14px 0 6px;
}
@media (max-width: 640px) {
  .soc-search-row { grid-template-columns: 1fr; }
  .soc-search-btn { width: 100%; }
  .group-card { grid-template-columns: 1fr; align-items: stretch; }
  .group-card-actions { justify-content: flex-start; }
}
/* ── /Friends / Social ────────────────────────────────────────────────── */

/* Круглая кнопка «в личный профиль» при активной группе */
.group-context-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, var(--accent, #ff2d7b), var(--accent-end, #9b4dff));
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s;
}
.group-context-fab:active { transform: scale(0.94); }
.group-context-fab.hidden { display: none !important; }

.home-group-suggestions.hidden { display: none !important; }
.home-group-suggestions .home-dash-block { margin-bottom: 1rem; }
.home-suggestion-row { cursor: pointer; }

.inbox-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.inbox-tab-btn { flex: 1; min-width: 120px; }
.site-inbox-panel.hidden { display: none !important; }
.site-inbox-act-day { margin-bottom: 12px; }
.site-inbox-act-day-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hint, #888);
  margin-bottom: 6px;
}
.site-inbox-act-row { margin-bottom: 4px; }

/* Film page in cabinet (desktop): hide duplicate profile topbar only */
@media (min-width: 769px) {
  .cabinet.film-page-mode .cabinet-topbar {
    display: none !important;
  }
  .cabinet.film-page-mode .cabinet-nav {
    display: flex !important;
  }
}
/* Профиль уже в #site-header — дублирующий topbar в кабинете не показываем */
#cabinet-readonly .cabinet-topbar {
  display: none !important;
}
body.guest-cabinet-preview #cabinet-readonly .cabinet-topbar {
  display: none !important;
}
/* Standalone /f/: gap between header, nav and hero */
body.film-standalone-page .page-shell > #site-header {
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
body.film-standalone-page .film-standalone-nav,
body.user-standalone-page .film-standalone-nav,
body.staff-standalone-page .film-standalone-nav {
  max-width: 1280px;
  margin: 0 auto clamp(16px, 2vw, 24px);
  padding: 0 12px 6px;
  justify-content: flex-start;
  gap: 6px;
}
@media (min-width: 1100px) {
  body.film-standalone-page .film-standalone-nav,
  body.user-standalone-page .film-standalone-nav,
  body.staff-standalone-page .film-standalone-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    overflow-x: visible;
  }
  body.film-standalone-page .film-standalone-nav .cabinet-nav-btn,
  body.user-standalone-page .film-standalone-nav .cabinet-nav-btn,
  body.staff-standalone-page .film-standalone-nav .cabinet-nav-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
}
body.film-standalone-page main.film-page .hero {
  overflow: hidden;
}
body.film-standalone-page main.film-page .hero-content {
  min-height: 280px;
}
body.film-standalone-page #film-title {
  min-height: 1.15em;
}
body.film-standalone-page .film-page-toolbar {
  min-height: 56px;
}
body.film-standalone-page .action-dropdown-menu {
  z-index: 50;
}
body.film-standalone-page .page-shell > main.film-page {
  margin-top: clamp(12px, 2vw, 20px);
}
body.film-standalone-page .page-shell > main.film-page > section.hero {
  margin-top: 0;
}
.film-standalone-nav .cabinet-nav-btn {
  text-decoration: none;
  font-family: 'Unbounded', Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
}
#film-standalone-nav .cabinet-nav-btn-text {
  font-family: inherit;
}
#film-standalone-nav .cabinet-nav-btn:hover {
  color: var(--text-primary, #fff);
}
#film-standalone-nav .cabinet-nav-btn.active {
  color: #ff2d7b;
  border-bottom-color: #ff2d7b;
}
#film-desc.hidden {
  display: none !important;
}
.cabinet.film-page-mode .inbox-fab {
  display: none !important;
}
#section-film .hero,
#section-film .film-hero,
main.film-page .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
  min-height: 560px;
  padding: clamp(18px, 4vw, 38px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
  box-shadow: 0 28px 90px rgba(0,0,0,.42);
}
.film-hero::before,
#section-film .hero::before,
main.film-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(7,7,17,.96) 0%, rgba(7,7,17,.84) 44%, rgba(7,7,17,.42) 100%),
    var(--film-backdrop, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .92;
}
.film-hero::after,
#section-film .hero::after,
main.film-page .hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent, rgba(7,7,17,.9));
  pointer-events: none;
}
#section-film .hero-content {
  min-width: 0;
  overflow: visible;
}
.film-hero-poster-wrap,
.film-hero-main,
#section-film .poster-wrap,
#section-film .hero-content {
  position: relative;
  z-index: 1;
}
.film-hero-poster-wrap,
#section-film .poster-wrap,
main.film-page .poster-wrap {
  align-self: center;
}
.film-hero-poster,
#section-film .poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  object-fit: cover;
  object-position: center center;
  background: #151528;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.film-hero-poster-empty,
#section-film .poster.poster-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.film-hero-chips,
#section-film .eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 0;
}
.film-hero-chip,
#section-film .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(244,246,255,.82);
  font-size: 13px;
  font-weight: 800;
}
#section-film .chip.chip-link {
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
#section-film .chip.chip-link:hover,
#section-film .chip.chip-link:focus-visible {
  border-color: rgba(255,45,123,.45);
  color: #f9a8d4;
}
.film-hero h2,
#section-film .hero h1 {
  margin: 0;
  max-width: 820px;
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: clamp(34px, 6vw, 76px) !important;
  line-height: .95;
  letter-spacing: -.07em;
}
.film-hero h2 span {
  opacity: .62;
  font-weight: 500;
}
.film-hero-desc,
#section-film .description,
main.film-page .description,
#film-desc {
  margin: 12px 0 0;
  max-width: 760px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(244,246,255,.78);
  letter-spacing: 0;
  white-space: pre-wrap;
}
.film-hero-crew,
.film-modal-crew,
#film-cast-root,
main.film-page .film-hero-crew {
  margin-top: 10px;
  max-width: 760px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(244,246,255,.78);
}
.film-cast-skel-line {
  display: inline-block;
  height: 12px;
  min-width: 72px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.08) 100%);
  background-size: 200% 100%;
  animation: film-cast-skel-pulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}
.film-cast-skel-line-wide { min-width: 220px; width: 55%; max-width: 420px; }
@keyframes film-cast-skel-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.film-cast-row { margin-top: 4px; }
.film-cast-row:first-child { margin-top: 0; }
.film-cast-label {
  color: #fff;
  font-weight: 600;
}
.film-cast-sep { opacity: .55; }
.film-hero-crew b,
.film-modal-crew b,
#film-cast-root b {
  color: #fff;
  font-weight: 600;
}
.film-hero-rating {
  margin-top: 0;
  max-width: 620px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.film-hero-rating h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}
.film-hero-actions {
  margin-top: 26px;
}
.film-page-toolbar {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  max-width: 720px;
  position: relative;
  top: auto;
  z-index: 4;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  overflow: visible;
}
.film-toolbar-plan-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
.film-toolbar-plan-wrap .action-dropdown {
  width: min(100%, 520px);
}
.film-toolbar-plan-wrap > .film-toolbar-plan {
  width: min(100%, 520px);
}
.film-toolbar-plan,
.film-toolbar-plan-wrap .action-dropdown-btn {
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg,#a855f7,#ec4899);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(236,72,153,.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.film-toolbar-plan-wrap .action-dropdown-caret {
  margin-left: 4px;
}
main.film-page .hero-content,
#section-film .hero-content,
main.film-page .film-page-toolbar,
main.film-page .film-toolbar-plan-wrap {
  overflow: visible;
}
main.film-page .film-toolbar-plan-wrap .action-dropdown.open {
  z-index: 40;
}
main.film-page .film-toolbar-plan-wrap .action-dropdown-menu,
#section-film .film-toolbar-plan-wrap .action-dropdown-menu {
  z-index: 41;
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(6px);
}
main.film-page .film-toolbar-plan-wrap .action-dropdown.open .action-dropdown-menu,
#section-film .film-toolbar-plan-wrap .action-dropdown.open .action-dropdown-menu {
  transform: translateY(0);
}
.film-toolbar-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  overflow: visible;
}
.film-toolbar-panels {
  width: 100%;
  max-width: 720px;
  display: grid;
  gap: 10px;
}
.film-toolbar-panels > .film-toolbar-expand {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  z-index: auto;
  box-shadow: none;
  background: rgba(8, 8, 18, 0.55);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 12px 14px;
}
.film-toolbar-rate-anchor,
.film-toolbar-facts-anchor {
  position: static;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.film-toolbar-rate-anchor > #rating-expand-panel,
.film-toolbar-rate-anchor > .film-toolbar-expand#rating-expand-panel,
.film-toolbar-facts-anchor > #facts-expand-panel,
.film-toolbar-facts-anchor > .film-toolbar-expand#facts-expand-panel {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  z-index: auto;
}
.film-icon-btn {
  width: 58px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  transition: width .32s cubic-bezier(.16,1,.3,1), padding .32s ease, background .18s ease, border-color .18s ease;
}
.film-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: rgba(244,246,255,0.88);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.film-watch-btn.on {
  border-color: rgba(74,222,128,0.45);
  background: rgba(74,222,128,0.14);
  color: #b0f1bf;
}
.film-watch-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.film-watch-btn.on .film-watch-mark {
  background: #34c759;
  border-color: #34c759;
  color: #001a08;
}
.film-icon-btn.is-active {
  border-color: rgba(236,72,153,.55);
  background: rgba(236,72,153,.16);
}
.film-icon-btn--watched.on {
  border-color: rgba(74,222,128,0.45);
  background: rgba(74,222,128,0.14);
  color: #b0f1bf;
}
.film-icon-btn--watched.on .film-icon-ico {
  color: #4ade80;
}
.film-icon-btn--watched .film-icon-label {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}
.film-icon-btn--watched:hover .film-icon-label,
.film-icon-btn--watched:focus-visible .film-icon-label {
  max-width: 180px;
  opacity: 1;
  margin-left: 8px;
}
.film-icon-btn--watched.on {
  width: 58px;
  min-width: 58px;
  padding: 0;
}
.film-icon-btn--watched.on:hover,
.film-icon-btn--watched.on:focus-visible {
  width: auto;
  min-width: 58px;
  padding: 0 16px;
}
.film-icon-btn--rated .film-icon-ico {
  font-size: 18px;
  font-weight: 900;
  font-family: Unbounded, Inter, sans-serif;
}
.film-icon-btn--premiere.on {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}
.film-icon-btn--premiere.on:hover,
.film-icon-btn--premiere.on:focus-visible {
  background: rgba(34, 197, 94, 0.32);
  border-color: rgba(34, 197, 94, 0.58);
}
.film-icon-btn:hover,
.film-icon-btn:focus-visible {
  width: auto;
  min-width: 58px;
  padding: 0 16px;
}
.film-icon-btn .film-icon-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  font-size: 14px;
  font-weight: 800;
  transition: max-width .32s cubic-bezier(.16,1,.3,1), opacity .22s ease, margin-left .22s ease;
}
.film-icon-btn:hover .film-icon-label,
.film-icon-btn:focus-visible .film-icon-label,
.film-icon-btn.is-active .film-icon-label {
  max-width: 180px;
  opacity: 1;
  margin-left: 8px;
}
.film-toolbar-expand {
  padding: 12px 0 0;
  width: 100%;
}
#rating-expand-panel,
.film-toolbar-expand#rating-expand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.public-rating-title {
  margin: 0 0 10px;
  width: 100%;
  text-align: center;
  font-weight: 900;
  color: #fff;
}
.film-toolbar-rating-grid,
.film-toolbar-rating-grid.rating-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: min(100%, 500px);
  margin: 0 auto;
  flex-wrap: nowrap;
}
.film-toolbar-rating-grid .rating-stars {
  display: contents;
}
.film-toolbar-rating-grid .rating-current {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  text-align: center;
}
.film-toolbar-rating-grid .rate-btn,
.film-toolbar-rating-grid .rating-stars button {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  padding: 0 4px;
  font-size: clamp(12px, 1.6vw, 14px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.film-toolbar-rating-grid .rate-btn:hover,
.film-toolbar-rating-grid .rating-stars button:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.28);
}
.film-toolbar-rating-grid .rate-btn:active,
.film-toolbar-rating-grid .rating-stars button:active {
  transform: scale(0.96);
}
.film-toolbar-rating-grid .rate-btn.is-selected,
.film-toolbar-rating-grid .rating-stars button.is-selected {
  background: rgba(236, 72, 153, 0.35);
  border-color: rgba(236, 72, 153, 0.65);
  color: #fff;
}
.film-toolbar-expand.hidden {
  display: none !important;
}
/* Series episode picker in film toolbar */
.film-icon-btn--series {
  width: auto;
  min-width: 58px;
  max-width: 88px;
  padding: 0 8px;
}
.film-icon-btn--series.is-active {
  border-color: rgba(155, 77, 255, 0.55);
  background: rgba(155, 77, 255, 0.22);
}
.film-series-code {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
#series-expand-panel.film-toolbar-expand {
  text-align: left;
}
.film-series-toolbar-panel {
  position: relative;
  width: 100%;
  max-width: min(100%, 500px);
  margin: 0 auto;
}
.film-series-toolbar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.film-series-toolbar-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.film-series-toolbar-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.film-series-seasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.film-series-season-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.film-series-season-tab.is-active {
  border-color: rgba(236, 72, 153, 0.55);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.45), rgba(155, 77, 255, 0.45));
  color: #fff;
}
.film-series-ep-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.film-series-ep-btn {
  min-height: 38px;
  padding: 6px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Unbounded', sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.film-series-ep-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}
.film-series-ep-btn:active {
  transform: scale(0.96);
}
.film-series-ep-btn.is-watched {
  border-color: transparent;
  background: linear-gradient(135deg, #ec4899, #9b4dff);
  color: #fff;
}
.film-series-ep-btn.is-selected {
  box-shadow: 0 0 0 2px rgba(155, 77, 255, 0.35), 0 0 0 3px rgba(236, 72, 153, 0.75);
}
.film-series-ep-btn.is-watched.is-selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 3px #fff;
}
.film-series-ep-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}
.film-series-ep-pager-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.film-series-ep-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.film-series-ep-pager-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
}
.film-series-mark-up-to-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ec4899, #9b4dff);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
}
.film-series-mark-up-to-btn:hover {
  opacity: 0.92;
}
.film-series-mark-up-to-btn:active {
  transform: scale(0.98);
}
.film-series-toolbar-loading {
  text-align: center;
  padding: 16px 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}
.film-series-toolbar-loading--overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 18, 0.72);
  border-radius: 12px;
}
.film-series-toolbar-empty {
  text-align: center;
  margin: 0;
  padding: 12px 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}
@media (max-width: 520px) {
  .film-series-ep-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }
  .film-series-ep-btn {
    min-height: 34px;
    padding: 4px 2px;
    font-size: 9px;
    border-radius: 10px;
    letter-spacing: -0.02em;
  }
  .film-series-code {
    font-size: 10px;
  }
}
.film-icon-btn.hidden,
#facts-toggle-btn.hidden {
  display: none !important;
}
.film-toolbar-facts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: rgba(244,246,255,.92);
  font-size: 14px;
  line-height: 1.55;
}
.film-toolbar-facts-list li {
  position: relative;
  padding-left: 18px;
}
.film-toolbar-facts-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: rgba(236,72,153,.78);
}
/* Film hero: keep plan CTA + icon row visible at ~1280×800 / ~1024×784 without scroll */
@media (min-width: 861px) and (max-height: 860px) {
  #section-film .hero,
  #section-film .film-hero,
  .movie-page .hero {
    min-height: 0;
    padding: 14px 22px 18px;
    gap: 20px;
    align-items: center;
  }
  #section-film .film-hero,
  #section-film .hero,
  main.film-page .hero,
  .film-hero {
    grid-template-columns: minmax(240px, min(300px, 34vw)) minmax(0, 1fr);
  }
  .film-hero-poster-wrap,
  #section-film .poster-wrap,
  main.film-page .poster-wrap {
    width: 100%;
    max-width: none;
    align-self: center;
  }
  .film-hero-poster,
  #section-film .poster,
  main.film-page .poster {
    width: 100%;
    max-height: min(calc(100vh - 210px), 440px);
    height: auto;
    aspect-ratio: 2 / 3;
  }
  #section-film .hero h1,
  .movie-page h1 {
    font-size: clamp(26px, 3.6vw, 44px) !important;
    line-height: 1;
  }
  #section-film .eyebrow,
  .movie-page .eyebrow {
    margin-top: 8px;
  }
  .film-hero-crew,
  .film-modal-crew,
  .movie-page .film-hero-crew {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.35;
  }
  #section-film .description,
  .movie-page .description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .film-page-toolbar {
    margin-top: 10px;
    gap: 10px;
  }
  .film-toolbar-plan,
  .film-toolbar-plan-wrap .action-dropdown-btn {
    min-height: 48px;
    font-size: 15px;
  }
  .film-icon-btn {
    width: 52px;
    height: 48px;
  }
  .film-hero-watched {
    margin-top: 8px;
  }
}
.app-open-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto 14px;
  max-width: 1180px;
  padding: 10px 14px;
  border: 1px solid rgba(168,85,247,.35);
  border-radius: 16px;
  background: rgba(124,58,237,.14);
}
.app-open-banner.hidden { display: none !important; }
.app-open-text { font-size: 14px; font-weight: 800; color: #fff; }
.app-open-actions { display: flex; gap: 8px; }
.btn-app-open {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg,#a855f7,#ec4899);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.btn-app-dismiss {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: transparent;
  color: rgba(244,246,255,.78);
  font-weight: 700;
  cursor: pointer;
}
body.login-only-overlay #landing,
body.login-only-overlay .parallax-bg {
  display: none !important;
}
.film-hero-similar {
  margin-top: 22px;
}
@media (max-width: 860px) {
  .film-hero,
  #section-film .hero,
  main.film-page .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
    padding: 16px;
    border-radius: 26px;
  }
  .film-hero::before,
  #section-film .hero::before,
  main.film-page .hero::before {
    background: linear-gradient(180deg, rgba(7,7,17,.98) 0%, rgba(7,7,17,.94) 100%);
    opacity: 1;
  }
  .film-hero-poster-wrap,
  #section-film .poster-wrap,
  main.film-page .poster-wrap {
    max-width: 230px;
    width: min(230px, 100%);
    margin: 0 auto;
  }
  .film-hero h2,
  #section-film .hero h1,
  main.film-page .hero h1 {
    font-size: clamp(32px, 11vw, 54px) !important;
  }
    .film-toolbar-plan-wrap .action-dropdown,
    .film-toolbar-plan {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    .film-icon-btn:hover,
    .film-icon-btn:focus-visible {
      width: 100%;
      min-width: 0;
      padding: 0;
    }
  .film-icon-btn:hover .film-icon-label,
  .film-icon-btn:focus-visible .film-icon-label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
  }
}

/* Final search geometry override: one rounded search across landing, cabinet and film pages. */
.header-content {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.header-search {
  --search-left-lane: 52px;
  --search-right-lane: 72px;
  flex: 1 1 240px !important;
  max-width: min(560px, 100%) !important;
  min-width: 0 !important;
  margin: 0 12px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
.header-search:not(.hidden) {
  display: block !important;
}
.header-search.hidden {
  display: none !important;
  flex: 0 0 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.header-search .header-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  opacity: .68;
}
.header-search .header-search-input {
  width: 100%;
  min-height: 48px;
  padding-left: var(--search-left-lane) !important;
  padding-right: var(--search-right-lane) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.07) !important;
  line-height: 48px;
  font-size: 15px;
  font-weight: 800;
}
.header-search:focus-within .header-search-input {
  border-color: rgba(255,255,255,.28) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08) !important;
}
.header-search .header-search-mic,
.header-search .header-search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  background: rgba(255,255,255,.08);
}
.header-search .header-search-mic { right: 14px; color: rgba(255, 255, 255, 0.88); }
.header-search .header-search-mic > i[class^="ph"] {
  font-size: 18px;
  line-height: 1;
  color: inherit;
}
.header-search .header-search-clear { right: 14px; }
.header-search .header-search-mic:not(.hidden) + .header-search-clear:not(.hidden) {
  right: 54px;
}
.header-search-dropdown {
  border-radius: 24px !important;
}
.hs-result {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px !important;
  align-items: center;
  padding: 10px !important;
}
.hs-result-poster {
  width: 52px !important;
  height: 74px !important;
  border-radius: 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.52);
}
.hs-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-search-page {
  max-width: 1180px;
  margin: 0 auto 44px;
  padding: 8px clamp(16px, 4vw, 56px) 24px;
}
.site-search-nav-wrap {
  max-width: 1180px;
  margin: 0 auto 12px;
  padding: 0 clamp(16px, 4vw, 56px);
}
.site-search-nav-wrap .cabinet-nav {
  margin-bottom: 0;
}
.site-search-hero {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 30px;
  background: rgba(13,13,26,.72);
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
}
.site-search-title {
  margin: 0;
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -.06em;
}
.site-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.site-search-field {
  position: relative;
  min-width: 0;
}
.site-search-field .site-search-input {
  width: 100%;
  padding-right: 52px;
}
.site-search-mic {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.site-search-mic:hover { background: rgba(255,255,255,.12); }
.site-search-mic.recording { background: rgba(200,40,40,.4); animation: mp-pulse 1s ease infinite; }
.site-search-input {
  min-height: 56px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #fff;
  padding: 0 20px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  outline: 0;
}
.site-search-input:focus {
  border-color: rgba(236,72,153,.62);
  box-shadow: 0 0 0 4px rgba(236,72,153,.12);
}
.site-search-submit {
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg,#a855f7,#ec4899);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
/* Фильтры поиска — как в Mini App */
.search-filter-toolbar {
  margin: 10px 0 4px;
}
.search-filter-toolbar-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.search-filter-toolbar-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.search-filter-toolbar-scroll::-webkit-scrollbar { display: none; }
.search-filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 7px 12px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  max-width: min(46vw, 200px);
}
.search-filter-chip.active {
  border-color: rgba(236,72,153,.42);
  background: rgba(236,72,153,.14);
}
.search-filter-chip-k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(244,246,255,.55);
  line-height: 1.1;
}
.search-filter-chip.active {
  border-color: rgba(236,72,153,.45);
  background: rgba(236,72,153,.14);
}
.search-filter-funnel-btn,
.search-sort-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  position: relative;
}
.search-sort-icon-btn .mp-icon { font-size: 20px; line-height: 1; }
.search-sort-icon-btn .search-sort-glyph {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.92;
}
.search-sort-icon-btn.active {
  border-color: rgba(236,72,153,.42);
  background: rgba(236,72,153,.16);
}
.search-filter-panel {
  margin-top: 8px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
}
.search-filter-panel.hidden { display: none; }
.search-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-filter-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.search-filter-pill.active {
  border-color: rgba(236,72,153,.45);
  background: rgba(236,72,153,.2);
}
.search-filter-pill:hover { background: rgba(255,255,255,.1); }
.search-filter-panel .site-search-year-range-wrap { padding: 4px 0 0; }
.search-filter-panel .search-genre-quick { margin-top: 4px; }
.search-filter-panel .site-search-filter-input { margin-top: 8px; width: 100%; }
.search-filters-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2d7b;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
  pointer-events: none;
}
.search-genre-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.search-genre-quick-chip {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.site-search-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
body.site-search-sheet-open { overflow: hidden; }
.site-search-sheet-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(85vh, 520px);
  overflow: auto;
  border-radius: 20px 20px 0 0;
  background: #12121e;
  border: 1px solid rgba(255,255,255,.1);
  padding: 16px 16px 22px;
}
.site-search-sheet-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}
.site-search-filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(244,246,255,.55);
  margin: 12px 0 6px;
}
.site-search-filter-label:first-child { margin-top: 0; }
.site-search-filter-select,
.site-search-filter-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}
.site-search-year-range-wrap { padding: 4px 0 8px; }
.site-search-year-range-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.site-search-year-range-track {
  position: relative;
  height: 40px;
  margin: 0 2px;
}
.site-search-year-range-track input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: auto;
  background: transparent;
}
.site-search-sheet-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.site-search-sheet-footer .btn { flex: 1; }
.site-search-filters {
  display: none;
}
.site-search-status {
  min-height: 20px;
  color: rgba(244,246,255,.62);
  font-size: 14px;
}
.site-search-section {
  margin-top: 18px;
}
.site-search-section.hidden {
  display: none;
}
#site-search-persons-section {
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(255, 45, 123, 0.08));
  box-shadow: 0 12px 40px rgba(8, 6, 24, 0.35);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}
.site-search-section-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(244, 246, 255, 0.78);
  margin: 0 0 14px;
}
.site-search-section-label.hidden {
  display: none;
}
.site-search-persons {
  margin-top: 18px;
  margin-bottom: 4px;
}
.site-search-persons-label {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(244,246,255,.55);
  margin: 0 0 10px;
}
.site-search-persons-row {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.site-search-persons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 2px 0;
}
.site-search-persons-grid--compact {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
}
.site-search-persons-grid--compact .site-search-person-card {
  min-width: 0;
}
.site-search-persons-more {
  display: contents;
}
.site-search-persons-more.hidden {
  display: none;
}
.site-search-persons-expand-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: rgba(8, 6, 24, 0.45);
  color: rgba(244, 246, 255, 0.88);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.site-search-persons-grid--compact .site-search-persons-expand-btn {
  grid-column: 1;
  grid-row: auto;
  justify-self: center;
  width: 100%;
  max-width: 220px;
  height: 36px;
  border-radius: 8px;
  margin: 4px auto 0;
}
.site-search-persons-grid--compact .site-search-persons-more:not(.hidden) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.site-search-persons-expand-btn:hover {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(168, 85, 247, 0.16);
}
@media (max-width: 640px) {
  .site-search-persons-grid {
    grid-template-columns: 1fr;
  }
  .site-search-person-photo {
    width: 64px;
    height: 64px;
  }
  .site-search-person-name {
    font-size: 16px;
  }
  .site-search-person-card {
    gap: 12px;
    padding: 12px 14px;
  }
  #site-search-persons-section {
    padding: 14px 12px 16px;
  }
}

body.landing-root-page .page-shell > #site-header {
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
body.landing-root-page #header-search:not(.hidden) {
  visibility: visible;
}
body.landing-root-page #site-header .header-content {
  min-height: 52px;
}
@media (max-width: 860px) {
  body.landing-root-page #site-header .header-content {
    min-height: 96px;
  }
}
body.landing-root-page .header-search.hidden {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  order: 3;
  flex: 1 1 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}
@media (min-width: 861px) {
  body.landing-root-page .header-search.hidden {
    order: unset;
    visibility: visible;
    opacity: 1;
    flex: unset !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
}
body.landing-root-page #landing-root-nav {
  display: flex;
  max-width: 1280px;
  margin: 0 auto clamp(16px, 2vw, 24px);
  padding: 0 12px 6px;
  justify-content: flex-start;
  gap: 6px;
}
@media (min-width: 1100px) {
  body.landing-root-page #landing-root-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    overflow-x: visible;
  }
  body.landing-root-page #landing-root-nav .cabinet-nav-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
}
body.landing-root-page #landing-root-nav .cabinet-nav-btn {
  text-decoration: none;
  font-family: 'Unbounded', Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
}
body.landing-root-page #landing-root-nav.hidden {
  display: none !important;
}

.mp-guest-cabinet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 16px 14px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.22);
  background: rgba(8, 6, 24, 0.72);
}
.mp-guest-cabinet-nav-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 246, 255, 0.86);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mp-guest-cabinet-nav-btn:hover {
  border-color: rgba(255, 45, 123, 0.45);
  background: rgba(168, 85, 247, 0.14);
}
.mp-landing-guest-nav {
  margin: 28px auto 0;
  max-width: 720px;
  border-radius: 16px;
}
.film-hero-tag-btn .film-hero-tag-ico {
  font-size: 22px;
}
.site-search-person-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 6, 24, 0.42);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.site-search-person-card:hover {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.18);
}
.site-search-person-card:active,
.site-search-person-card:focus-visible {
  border-color: rgba(255, 45, 123, 0.72);
  background: rgba(168, 85, 247, 0.14);
  transform: none;
  box-shadow: 0 0 0 1px rgba(255, 45, 123, 0.45), 0 10px 28px rgba(168, 85, 247, 0.18);
  outline: none;
}
.site-search-person-photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.site-search-person-copy {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.site-search-person-name {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.site-search-person-en {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: rgba(244, 246, 255, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-search-person-prof {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: rgba(244,246,255,.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 120px;
  padding: 8px 0 4px;
}
.mp-search-loading-rings {
  position: relative;
  width: 52px;
  height: 52px;
}
.mp-search-loading-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.mp-search-loading-rings span:first-child {
  border-top-color: #ff2d7b;
  border-right-color: rgba(255, 45, 123, 0.35);
  animation: mp-search-spin 0.9s linear infinite;
}
.mp-search-loading-rings span:last-child {
  inset: 8px;
  border-bottom-color: #a855f7;
  border-left-color: rgba(168, 85, 247, 0.35);
  animation: mp-search-spin 1.2s linear infinite reverse;
}
.mp-search-loading-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(244, 246, 255, 0.72);
  animation: mp-search-pulse 1.4s ease-in-out infinite;
}
.site-search-results-loading {
  grid-column: 1 / -1;
  min-height: 180px;
}
@keyframes mp-search-spin {
  to { transform: rotate(360deg); }
}
@keyframes mp-search-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.hs-result-person {
  text-decoration: none;
  color: inherit;
}
.hs-result-person-photo,
.hs-result-person .hs-result-poster {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.site-search-person-photo {
  border-radius: 50%;
  object-fit: cover;
}
.site-search-results {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
}
.site-search-results .home-poster-tile-wrap {
  min-width: 0;
  display: flex;
}
.site-search-results .home-poster-tile {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.site-search-results .home-poster-tile-img {
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  overflow: hidden;
}
.site-search-results .home-poster-tile-title {
  min-height: calc(2 * 1.25 * 13px + 10px);
  flex: 0 0 auto;
}
.site-search-results .home-poster-tile-year {
  margin-top: auto;
  flex: 0 0 auto;
}
.site-search-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: #fff;
  text-decoration: none;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
}
.site-search-card > span {
  display: contents;
}
.site-search-card:hover {
  border-color: rgba(236,72,153,.36);
  transform: translateY(-1px);
}
.site-search-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0;
  object-fit: cover;
  background: rgba(255,255,255,.07);
  display: block;
}
.site-search-card-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  padding: 8px 8px 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  text-align: left;
}
.site-search-card-meta {
  padding: 0 8px 8px;
  color: rgba(244,246,255,.58);
  font-size: 11px;
  width: 100%;
  text-align: left;
}
@media (max-width: 768px) {
  body.in-search-page .site-search-title,
  body.in-search-page .site-search-controls {
    display: none !important;
  }
  body.in-search-page .site-search-hero {
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.in-search-page .site-search-page {
    padding-top: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }
  body.in-search-page .search-filter-toolbar {
    margin-top: 14px;
    margin-bottom: 6px;
  }
  body.in-search-page #landing-root-nav {
    display: none !important;
  }
  body.in-search-page .site-search-nav-wrap {
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
    max-width: none;
    overflow: visible;
    border: 0;
  }
  body.in-search-page .site-search-nav-wrap .cabinet-nav,
  body.in-search-page .site-search-nav-wrap .film-standalone-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    display: flex !important;
    justify-content: space-between;
    align-items: stretch;
    gap: 0;
    max-width: none;
    margin: 0 !important;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 12, 18, 0.97);
    backdrop-filter: blur(14px);
    overflow: visible;
    flex-wrap: nowrap;
  }
  body.in-search-page .site-search-nav-wrap .film-standalone-nav .cabinet-nav-btn:nth-child(3),
  body.in-search-page .site-search-nav-wrap .film-standalone-nav .cabinet-nav-btn:nth-child(6),
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="premieres"],
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="tournament"] {
    display: none !important;
  }
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    border-bottom: none !important;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    flex-shrink: 1;
  }
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="home"] { order: 1; }
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="plans"] { order: 2; }
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="unwatched"] { order: 3; }
  body.in-search-page .site-search-nav-wrap .cabinet-nav-btn[data-section="whattowatch"] { order: 4; }
  body.in-search-page .page-shell {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 769px) {
  body.in-search-page #header-search {
    display: none !important;
  }
  body.in-search-page .header-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
body.header-search-body-locked {
  overflow: hidden !important;
}
body.header-search-dropdown-open #site-header {
  overflow: visible !important;
  z-index: 420 !important;
}
body.header-search-dropdown-open #site-header.site-header--retracted {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
body.header-search-dropdown-open .header-search {
  z-index: 421;
}
body.header-search-dropdown-open .header-search-dropdown {
  z-index: 422 !important;
  pointer-events: auto;
}
@media (max-width: 768px) {
  body.header-search-dropdown-open #cabinet-readonly,
  body.header-search-dropdown-open #site-search-root,
  body.header-search-dropdown-open #landing,
  body.header-search-dropdown-open #public-stats {
    pointer-events: none;
  }
}
.hs-result--recent {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.header-search-chip {
  touch-action: manipulation;
}
@media (max-width: 720px) {
  .header-search { margin: 8px 0 0 !important; flex-basis: 100% !important; }
  .header-search .header-search-input {
    min-height: 40px !important;
    line-height: 40px !important;
    font-size: 14px !important;
  }
  .header-search {
    --search-left-lane: 44px;
    --search-right-lane: 64px;
  }
  .site-search-controls { grid-template-columns: 1fr; }
  .site-search-submit { width: 100%; }
  .site-search-results { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .site-search-year,
  .site-search-genre { width: calc(50% - 4px); }
}

/* Staff page /s/:kp */
.staff-page-content { padding-bottom: 48px; max-width: 1180px; margin: 0 auto; width: 100%; }
#film-page-content.staff-page-content .staff-film-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 640px) {
  #film-page-content.staff-page-content .staff-film-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  #film-page-content.staff-page-content .staff-film-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  #film-page-content.staff-page-content .staff-film-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.staff-page { display: flex; flex-direction: column; gap: 8px; }
.staff-hero {
  display: flex; gap: 18px; align-items: center; margin-bottom: 20px;
  padding: 18px 20px; border-radius: 18px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.staff-hero-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.staff-hero-ph { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); font-size: 44px; }
.staff-hero-text { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.staff-hero-name { margin: 0; font-family: Unbounded, Inter, sans-serif; font-size: clamp(22px, 4vw, 30px); font-weight: 800; line-height: 1.15; }
.staff-hero-sub { color: rgba(244,246,255,.62); margin: 4px 0 0; font-size: 15px; }
.staff-hero-meta { color: rgba(244,246,255,.5); margin: 4px 0 0; font-size: 13px; font-weight: 600; }
.staff-loading { padding: 24px 0; color: rgba(244,246,255,.55); }
/* Person filters — как в Mini App */
.person-filters { margin: 12px 0 18px; }
.person-filters-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.person-filter-field { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 4px; }
.person-filter-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: rgba(244,246,255,.55); }
.person-filter-select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
}
.person-filters-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-page .chip,
.staff-standalone-page .chip {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(244,246,255,.62);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  font: inherit;
}
.staff-page .chip-on,
.staff-standalone-page .chip-on {
  border-color: rgba(255,45,123,.55);
  background: rgba(255,45,123,.12);
  color: #fff;
  font-weight: 600;
}
.staff-page .chip.chip-disabled,
.staff-standalone-page .chip.chip-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(244,246,255,.38);
}
.staff-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; align-items: flex-end; }
.staff-filter { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.staff-filter span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: rgba(244,246,255,.55); }
.staff-filter select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}
.staff-filter-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-role-block { margin-bottom: 28px; }
.staff-role-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.staff-role-head h2, .staff-role-head h3 { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,246,255,.55); font-weight: 800; }
.staff-role-head .staff-import-btn,
.staff-import-btn.link-inline,
button.staff-import-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  opacity: 0.92;
}
.staff-role-head .staff-import-btn:hover,
.staff-import-btn.link-inline:hover,
button.staff-import-btn:hover {
  color: #fff !important;
  opacity: 1;
  text-decoration: underline;
}
.person-filters-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.person-filters-sort .person-filter-k {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(244,246,255,.45);
  font-weight: 800;
  margin-right: 4px;
}
.staff-role-count { font-size: 12px; color: rgba(244,246,255,.4); font-weight: 700; }
.staff-film-grid {
  display: grid;
  gap: 12px 14px;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
@media (min-width: 640px) {
  .staff-film-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .staff-film-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1180px) {
  .staff-film-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.staff-film-card {
  border: none; background: transparent; padding: 0; text-align: left; cursor: pointer; color: inherit;
  text-decoration: none; display: flex; flex-direction: column; height: 100%; min-width: 0; width: 100%;
}
.staff-film-card:hover .staff-film-poster { transform: scale(0.98); }
.staff-film-media { position: relative; flex: 0 0 auto; width: 100%; }
.staff-film-poster {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px;
  background: #120818; display: block; transition: transform .12s ease;
}
.staff-film-poster.mp-poster-placeholder { object-fit: cover; }
.staff-film-ph { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.staff-film-rating {
  position: absolute; right: 6px; top: 6px; z-index: 2;
  padding: 2px 7px; border-radius: 8px; font-size: 11px; font-weight: 800;
  background: rgba(0,0,0,.72); color: #fff;
}
.staff-film-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.25em);
  flex: 0 0 auto;
}
.staff-film-year {
  font-size: 11px;
  color: rgba(244,246,255,.55);
  margin-top: 2px;
  min-height: 1.1em;
  flex: 0 0 auto;
}
.staff-empty-role { margin: 0; }
.staff-role-expand {
  display: block;
  width: fit-content;
  margin: 14px auto 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,45,123,.38);
  background: rgba(255,45,123,.1);
  color: #ff5a96;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.staff-role-expand:hover {
  background: rgba(255,45,123,.16);
  border-color: rgba(255,45,123,.55);
}
.staff-role-expand:active { transform: scale(0.98); }

/* Person filters — как в Mini App */
.staff-standalone-page .person-filters { margin: 4px 0 18px; }
.staff-standalone-page .person-filters-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.staff-standalone-page .person-filter-field { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 4px; }
.staff-standalone-page .person-filter-k {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: rgba(244,246,255,.55);
}
.staff-standalone-page .person-filter-select {
  width: 100%; min-height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px;
}
.staff-standalone-page .person-filters-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-standalone-page .chip {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(244,246,255,.62);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.staff-standalone-page .chip-on {
  border-color: rgba(255,45,123,.55);
  background: rgba(255,45,123,.12);
  color: #fff;
  font-weight: 600;
}
.staff-standalone-main { padding-bottom: 32px; }
.staff-standalone-footer { margin-top: 24px; opacity: .7; }
body.staff-standalone-page .staff-standalone-shell { min-height: 100vh; }
body.staff-standalone-page .page-shell > #site-header {
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
body.staff-standalone-page .film-standalone-nav {
  max-width: 1180px;
  margin: 0 auto clamp(16px, 2vw, 24px);
}
body.staff-standalone-page .page-shell > main.staff-standalone-main {
  max-width: 1180px;
  margin: 0 auto;
  margin-top: clamp(12px, 2vw, 20px);
  width: 100%;
  box-sizing: border-box;
}
body.staff-standalone-page .staff-page-content {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
@media (min-width: 900px) {
  body.staff-standalone-page .staff-hero {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: clamp(18px, 4vw, 38px);
    gap: clamp(22px, 4vw, 46px);
    border-radius: 34px;
    min-height: 0;
    margin-bottom: clamp(20px, 3vw, 32px);
  }
  body.staff-standalone-page .staff-hero-photo {
    width: clamp(140px, 16vw, 200px);
    height: clamp(140px, 16vw, 200px);
  }
  body.staff-standalone-page .staff-hero-name {
    font-size: clamp(28px, 3.2vw, 40px);
  }
  body.staff-standalone-page .staff-film-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1180px) {
  body.staff-standalone-page .staff-film-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .staff-hero { flex-direction: column; align-items: center; text-align: center; padding: 16px; }
  .staff-hero-photo { width: 96px; height: 96px; }
  .staff-film-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .staff-film-title { font-size: 11px; }
  .staff-role-head { flex-wrap: wrap; }
}
.staff-cast-link { color: var(--accent, #ff2d7b); text-decoration: none; font-weight: 600; }
.staff-cast-link:hover { text-decoration: underline; }
.staff-hover-preview {
  position: fixed; z-index: 100010; width: 200px; padding: 10px;
  background: rgba(18,18,26,.96); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.45); pointer-events: none;
}
.staff-hover-preview.hidden { display: none; }
.staff-hover-preview img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 8px; }
.staff-hover-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.chip {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(244,246,255,.72);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.chip-on {
  border-color: var(--accent, #ff2d7b);
  background: rgba(255,45,123,.14);
  color: #fff;
  font-weight: 600;
}

/* Standalone film page (/f/) — from 404.html */
body.film-standalone-page {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: #f4f6ff;
  min-height: 100vh;
}
:root { color-scheme: dark; }
    a { color: inherit; }
    body.film-standalone-page .page-shell { min-height: 100vh; padding: 18px clamp(16px, 4vw, 56px) 0; overflow-x: hidden; }
    body.film-standalone-page .page-shell > main { margin-top: clamp(12px, 2vw, 24px); }
    body.film-standalone-page #site-header {
      max-width: 1180px;
      margin: 0 auto clamp(16px, 2.5vw, 28px);
      position: sticky;
      top: 14px;
      z-index: 20;
      padding: 0 !important;
      background: transparent !important;
      border: 0 !important;
      border-bottom: 0 !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      box-shadow: none !important;
    }
    body.film-standalone-page header#site-header {
      background: transparent !important;
      border: 0 !important;
      padding: 0 !important;
    }
    body.film-standalone-page .header-content {
      display: grid;
      grid-template-columns: auto minmax(var(--hdr-grid-search-min, 280px), var(--hdr-grid-search-max, 1fr)) auto;
      align-items: center;
      gap: clamp(12px, 2vw, 20px);
      max-width: 1180px;
      margin: 0 auto;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent !important;
      box-shadow: none;
    }
    body.film-standalone-page .logo {
      grid-column: 1;
      justify-self: start;
      min-width: 0;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      font-family: Unbounded, Inter, sans-serif;
      font-weight: 800;
      letter-spacing: -.04em;
    }
    body.film-standalone-page .header-buttons {
      grid-column: 3;
      justify-self: end;
      flex-shrink: 0;
    }
    body.film-standalone-page .logo img { width: 34px; height: 34px; border-radius: 10px; }
    body.film-standalone-page .header-search {
      --search-left-lane: 52px;
      --search-right-lane: 72px;
      grid-column: 2;
      position: relative;
      justify-self: stretch;
      width: 100%;
      max-width: none;
      min-width: 0;
      margin: 0 !important;
    }
    .header-search-icon {
      position: absolute;
      left: 18px;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      line-height: 1;
      color: rgba(244,246,255,.56);
      pointer-events: none;
    }
    .header-search-input {
      width: 100%;
      min-height: 48px;
      padding: 0 var(--search-right-lane) 0 var(--search-left-lane);
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 999px;
      background: rgba(255,255,255,.07);
      color: #fff;
      outline: none;
      font: inherit;
      font-weight: 700;
    }
    .header-search-input:focus { border-color: rgba(236,72,153,.55); box-shadow: 0 0 0 4px rgba(236,72,153,.1); }
    .header-search-mic,
    .header-search-clear {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 50%;
      background: rgba(255,255,255,.1);
      color: #fff;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      line-height: 1;
    }
    .header-search-mic { right: 14px; }
    .header-search-clear { right: 14px; }
    .header-search-mic:not(.hidden) + .header-search-clear:not(.hidden) { right: 54px; }
    .header-search-dropdown {
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% + 10px);
      display: grid;
      gap: 6px;
      padding: 8px;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 20px;
      background: rgba(13,13,26,.96);
      box-shadow: 0 22px 58px rgba(0,0,0,.42);
      z-index: 40;
    }
    .search-result {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      padding: 10px;
      border-radius: 14px;
      text-decoration: none;
      color: #fff;
    }
    .search-result:hover { background: rgba(255,255,255,.08); }
    .search-result-poster {
      width: 52px;
      height: 74px;
      border-radius: 10px;
      object-fit: cover;
      background: rgba(255,255,255,.08);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: rgba(244,246,255,.54);
      font-size: 24px;
    }
    .search-result-title { display: block; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .search-result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; color: rgba(244,246,255,.58); font-size: 12px; }
    .search-result-meta span { display: inline-flex; }
    .header-buttons { display: flex; align-items: center; gap: 10px; }
    .btn-primary {
      min-height: 46px;
      padding: 0 20px;
      border: 0;
      border-radius: 999px;
      background: linear-gradient(135deg,#a855f7,#ec4899);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 14px 36px rgba(236,72,153,.22);
    }
    main.film-page { max-width: 1180px; margin: 0 auto; }
    .hero {
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
      gap: clamp(22px, 4vw, 46px);
      align-items: center;
      min-height: 560px;
      padding: clamp(18px, 4vw, 38px);
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 34px;
      background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
      box-shadow: 0 28px 90px rgba(0,0,0,.42);
    }
    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(90deg, rgba(7,7,17,.96) 0%, rgba(7,7,17,.84) 44%, rgba(7,7,17,.42) 100%),
        var(--film-backdrop, none);
      background-size: cover;
      background-position: center;
      opacity: .92;
    }
    .hero::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      height: 46%;
      background: linear-gradient(180deg, transparent, rgba(7,7,17,.9));
      pointer-events: none;
    }
    .poster-wrap,
    .hero-content { position: relative; z-index: 1; }
    .hero-content {
      min-width: 0;
      overflow: visible;
    }
    .poster {
      width: 100%;
      aspect-ratio: 2 / 3;
      border-radius: 24px;
      object-fit: cover;
      object-position: center center;
      background: #151528;
      box-shadow: 0 24px 70px rgba(0,0,0,.55);
    }
    .eyebrow {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin: 14px 0 0;
    }
    .chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 32px;
      padding: 7px 11px;
      border-radius: 999px;
      background: rgba(255,255,255,.1);
      border: 1px solid rgba(255,255,255,.12);
      color: rgba(244,246,255,.82);
      font-size: 13px;
      font-weight: 700;
    }
    body.film-standalone-page .hero h1,
    main.film-page .hero h1,
    #section-film .hero h1 {
      margin: 0;
      max-width: 820px;
      font-family: Unbounded, Inter, sans-serif;
      font-size: clamp(34px, 6vw, 76px);
      line-height: .95;
      letter-spacing: -.07em;
    }
    .description {
      margin: 12px 0 0;
      max-width: 760px;
      font-family: Inter, sans-serif;
      font-size: 15px;
      font-weight: 400;
      line-height: 1.55;
      color: rgba(244,246,255,.78);
    }
    .film-page-toolbar .film-icon-btn.is-active .film-icon-label {
      max-width: 0 !important;
      opacity: 0 !important;
      margin-left: 0 !important;
    }
    main.film-page .film-icon-btn.is-active,
    main.film-page .film-icon-btn.is-active:hover,
    main.film-page .film-icon-btn.is-active:focus-visible {
      width: 58px !important;
      min-width: 58px !important;
      padding: 0 !important;
    }
    .film-toolbar-expand {
      padding: 12px 0 0;
      background: transparent !important;
      border: 0 !important;
      max-width: 100%;
      overflow: visible;
    }
    .film-toolbar-facts-list {
      margin: 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 10px;
      max-width: 760px;
      width: 100%;
    }
    .film-toolbar-facts-list li {
      position: relative;
      padding-left: 18px;
      color: rgba(244,246,255,.78);
      font-size: 14.5px;
      line-height: 1.55;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .film-toolbar-facts-list li::before {
      content: "•";
      position: absolute;
      left: 4px;
      color: rgba(236,72,153,.78);
    }
    .hero-actions {
      margin-top: 26px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .public-rating-panel {
      margin-top: 24px;
      max-width: 620px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
    }
    .public-rating-title {
      margin: 0 0 12px;
      font-weight: 900;
      color: #fff;
    }
    .btn {
      appearance: none;
      border: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 48px;
      padding: 13px 18px;
      border-radius: 16px;
      font-weight: 800;
      font-size: 14px;
      text-decoration: none;
      color: #fff;
      cursor: pointer;
      transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    }
    .btn:hover { transform: translateY(-1px); }
    .btn-main { background: linear-gradient(135deg,#a855f7,#ec4899); box-shadow: 0 18px 42px rgba(236,72,153,.24); }
    .btn-secondary { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
    .btn-ghost { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); color: rgba(244,246,255,.86); }
    .icon-actions {
      margin-top: 26px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
    }
    .icon-action {
      width: 58px;
      min-width: 58px;
      height: 54px;
      padding: 0;
      overflow: hidden;
      gap: 10px;
      border-radius: 18px;
      white-space: nowrap;
    }
    .icon-action .ico {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      font-size: 24px;
      line-height: 1;
      text-align: center;
    }
    .icon-action .label {
      max-width: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-width .32s cubic-bezier(.16,1,.3,1), opacity .22s ease;
    }
    .icon-action:hover,
    .icon-action:focus-visible {
      width: auto;
      min-width: 190px;
      padding: 0 18px;
    }
    .icon-action:hover .label,
    .icon-action:focus-visible .label {
      max-width: 220px;
      opacity: 1;
    }
    .plan-action {
      min-width: 280px;
      height: 58px;
      border-radius: 18px;
      font-size: 16px;
      gap: 10px;
    }
    .sections { display: none; }
    .facts-inline {
      margin-top: 24px;
      max-width: 780px;
    }
    .facts-inline-title {
      margin: 0 0 10px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #fff;
      font-weight: 900;
      font-size: 16px;
    }
    .facts-inline-title .emoji { font-size: 22px; }
    .facts-list {
      display: grid;
      gap: 8px;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    .facts-list li {
      position: relative;
      padding-left: 22px;
      color: rgba(244,246,255,.74);
      line-height: 1.5;
      font-size: 14.5px;
    }
    .facts-list li::before {
      content: "•";
      position: absolute;
      left: 7px;
      color: rgba(236,72,153,.78);
      font-weight: 900;
    }
    .film-hero-crew {
      margin-top: 10px;
      max-width: 760px;
      font-family: Inter, sans-serif;
      font-size: 15px;
      font-weight: 400;
      line-height: 1.55;
      color: rgba(244,246,255,.78);
    }
    .film-cast-row { margin-top: 4px; }
    .film-cast-row:first-child { margin-top: 0; }
    .film-cast-label { color: #fff; font-weight: 600; }
    .film-cast-sep { opacity: .55; }
    .staff-cast-link {
      color: #f472b6;
      text-decoration: none;
      font-weight: 700;
    }
    .staff-cast-link:hover { text-decoration: underline; }
    .film-actors-more-btn {
      border: 0;
      background: transparent;
      color: #f472b6;
      font-size: 12px;
      font-weight: 700;
      padding: 0 0 0 4px;
      cursor: pointer;
    }
    .staff-hover-preview {
      position: fixed;
      z-index: 100010;
      width: 200px;
      padding: 10px;
      background: rgba(18,18,26,.96);
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0,0,0,.45);
      pointer-events: none;
    }
    .staff-hover-preview.hidden { display: none; }
    .staff-hover-preview img {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      object-fit: cover;
      display: block;
      margin-bottom: 8px;
    }
    .staff-hover-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
    @media (min-width: 1100px) and (max-height: 860px) {
      .page-shell { padding-top: 10px; }
      #site-header { margin-bottom: 10px; }
      .hero {
        min-height: 0;
        padding: 14px 20px 18px;
        gap: 20px;
        align-items: center;
      }
      body.film-standalone-page .hero h1,
      main.film-page .hero h1,
      #section-film .hero h1 { font-size: clamp(26px, 3.8vw, 44px); }
      .eyebrow { margin-top: 8px; }
      .film-hero-crew { margin-top: 6px; font-size: 12.5px; }
      .description {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }
      .film-page-toolbar { margin-top: 10px; gap: 10px; }
      .film-toolbar-plan { min-height: 48px; font-size: 15px; }
      .film-icon-btn { width: 52px; height: 48px; }
      .status { margin-top: 6px; }
    }
    .rating-grid {
      display: grid;
      grid-template-columns: repeat(10, minmax(0, 1fr));
      gap: 6px;
      margin: 0 auto;
      max-width: min(100%, 500px);
      width: 100%;
    }
    .rate-btn {
      min-height: 44px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 14px;
      background: rgba(255,255,255,.06);
      color: #fff;
      font-weight: 800;
      cursor: pointer;
    }
    .status {
      margin-top: 12px;
      min-height: 20px;
      color: rgba(244,246,255,.64);
      font-size: 13px;
    }
    .public-toast {
      position: fixed;
      left: 50%;
      bottom: 28px;
      z-index: 9999;
      max-width: min(520px, 88vw);
      padding: 12px 18px;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 16px;
      background: rgba(16,16,30,.96);
      color: #fff;
      font-weight: 800;
      text-align: center;
      box-shadow: 0 18px 50px rgba(0,0,0,.42);
      transform: translateX(-50%) translateY(18px);
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease, transform .18s ease;
    }
    .public-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    #login-modal:not(.hidden) { display: flex !important; }
    .public-coin-pop {
      position: fixed;
      z-index: 10000;
      pointer-events: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 11px;
      border-radius: 999px;
      background: rgba(20,22,28,.95);
      border: 1px solid rgba(74,222,128,.46);
      color: #4ade80;
      font-weight: 900;
      box-shadow: 0 14px 36px rgba(0,0,0,.38), 0 0 22px rgba(74,222,128,.28);
      transform: translate(-50%, -50%);
      animation: publicCoinFloat 1.25s cubic-bezier(.16,1,.3,1) forwards;
    }
    @keyframes publicCoinFloat {
      0% { opacity: 0; transform: translate(-50%, -30%) scale(.74) rotate(-8deg); }
      16% { opacity: 1; transform: translate(-50%, -76%) scale(1.16) rotate(5deg); }
      76% { opacity: 1; transform: translate(-50%, -154%) scale(1.02); }
      100% { opacity: 0; transform: translate(-50%, -196%) scale(.94); }
    }
    .footer {
      margin: 42px calc(-1 * clamp(16px, 4vw, 56px)) 0;
      padding: 34px clamp(16px,4vw,56px) 22px;
      border-top: 1px solid rgba(255,255,255,.08);
      background:
        radial-gradient(720px 220px at 78% 0%, rgba(168,85,247,.1), transparent 60%),
        rgba(4,4,12,.86);
    }
    .footer .container {
      max-width: 1180px;
      margin: 0 auto;
    }
    .footer-content {
      max-width: 1180px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      justify-content: space-between;
      gap: 28px;
      color: rgba(244,246,255,.66);
      font-size: 14px;
    }
    .footer h3 { margin: 0 0 10px; color: rgba(244,246,255,.8); font-size: 14px; }
    .footer p { margin: 5px 0; }
    .footer-bottom {
      margin-top: 24px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,.08);
      text-align: center;
      color: rgba(244,246,255,.5);
      font-size: 12px;
    }
    .footer-bottom p { margin: 0; }
    .footer a { color: rgba(244,246,255,.76); text-decoration: none; }
    .social-links { display: flex; gap: 10px; align-items: center; }
    .social-link {
      width: 34px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(255,255,255,.08);
      color: #fff;
    }
    .social-link img { width: 20px; height: 20px; object-fit: contain; }
    .social-link:has(img) {
      background: rgba(255,255,255,.92);
      color: #111;
    }
    .social-link-vc {
      background: transparent;
      color: #fff;
    }
    .social-link-vc img {
      width: 22px;
      height: 22px;
      filter: none;
    }
    .skeleton {
      position: relative;
      overflow: hidden;
      color: transparent !important;
      background: rgba(255,255,255,.08) !important;
      border-radius: 10px;
    }
    .skeleton::after {
      content: "";
      position: absolute;
      inset: 0;
      transform: translateX(-100%);
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
      animation: shimmer 1.1s infinite;
    }
    @keyframes shimmer { 100% { transform: translateX(100%); } }
    @media (min-width: 861px) and (max-width: 1100px) {
      body.film-standalone-page .page-shell {
        padding-left: 16px;
        padding-right: 16px;
      }
      body.film-standalone-page .header-content {
        grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
        gap: 10px;
      }
      body.film-standalone-page .logo span {
        max-width: 108px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      body.film-standalone-page .header-search {
        --search-left-lane: 44px;
        --search-right-lane: 64px;
      }
      body.film-standalone-page .header-search-input {
        min-height: 44px;
        font-size: 14px;
      }
      body.film-standalone-page .header-user-wrap {
        gap: 8px;
      }
      body.film-standalone-page .header-profile-name {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      body.film-standalone-page .footer .container {
        padding-left: 0;
        padding-right: 0;
      }
      body.film-standalone-page .footer-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 20px;
      }
      .hero,
      main.film-page .hero,
      #section-film .hero,
      #section-film .film-hero,
      .film-hero {
        min-height: 0;
        grid-template-columns: minmax(220px, min(280px, 32vw)) minmax(0, 1fr);
        gap: 14px;
        padding: 14px 16px;
        align-items: center;
      }
      .film-hero-poster-wrap,
      .poster-wrap,
      #section-film .poster-wrap,
      main.film-page .poster-wrap {
        width: 100%;
        max-width: none;
      }
      body.film-standalone-page .hero h1,
      main.film-page .hero h1,
      #section-film .hero h1 {
        font-size: clamp(22px, 3.1vw, 34px) !important;
        line-height: 1.08;
        letter-spacing: -.05em;
      }
      .eyebrow { margin-top: 8px; }
      .film-hero-crew,
      #film-cast-root,
      .description,
      #film-desc {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.5;
      }
      .film-page-toolbar {
        margin-top: 12px;
        gap: 10px;
      }
      .film-toolbar-plan,
      .film-toolbar-plan-wrap .action-dropdown-btn {
        min-height: 48px;
        font-size: 15px;
      }
    }
    @media (min-width: 861px) and (max-width: 1100px) and (max-height: 820px) {
      body.film-standalone-page .hero h1,
      main.film-page .hero h1,
      #section-film .hero h1 {
        font-size: clamp(20px, 2.6vw, 30px) !important;
      }
      .hero,
      main.film-page .hero,
      #section-film .hero,
      #section-film .film-hero,
      .film-hero {
        padding: 12px 14px;
        gap: 12px;
        grid-template-columns: minmax(250px, min(300px, 36vw)) minmax(0, 1fr);
        align-items: center;
      }
      .film-hero-poster-wrap,
      .poster-wrap,
      #section-film .poster-wrap,
      main.film-page .poster-wrap {
        width: 100%;
        max-width: none;
      }
      .film-hero-poster,
      .poster,
      #section-film .poster,
      main.film-page .poster {
        width: 100%;
        max-height: min(calc(100vh - 200px), 420px);
        height: auto;
      }
      body.film-standalone-page #site-header {
        margin-bottom: 12px;
      }
      body.film-standalone-page .film-standalone-nav,
      body.staff-standalone-page .film-standalone-nav,
      body.user-standalone-page .film-standalone-nav,
      body.landing-root-page #landing-root-nav {
        margin-bottom: 0 !important;
      }
    }
    @media (max-width: 860px) {
      body.film-standalone-page .page-shell,
      body.staff-standalone-page .page-shell,
      body.user-standalone-page .page-shell { padding: 14px 12px 32px; min-height: 0; }
      body.film-standalone-page .page-shell > main.film-page,
      body.staff-standalone-page .page-shell > main.staff-standalone-main,
      body.user-standalone-page .page-shell > main.user-standalone-main { margin-top: 10px; }
      body.film-standalone-page #site-header,
      body.staff-standalone-page #site-header,
      body.user-standalone-page #site-header { top: 8px; margin-bottom: 12px; }
      body.landing-root-page.film-standalone-page #site-header,
      body.landing-root-page.film-standalone-page header#site-header {
        top: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding-top: max(20px, calc(env(safe-area-inset-top, 0px) + 12px)) !important;
        padding-bottom: 12px !important;
        padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
        background: #0c0c12 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
      }
      body.film-standalone-page .app-open-banner,
      body.staff-standalone-page .app-open-banner,
      body.user-standalone-page .app-open-banner { margin-bottom: 10px; }

#section-user .app-open-banner {
  margin: 0 0 14px;
  max-width: none;
}
      body.film-standalone-page .header-content,
      body.staff-standalone-page .header-content,
      body.user-standalone-page .header-content {
        grid-template-columns: 1fr auto;
        grid-template-areas:
          "logo login"
          "search search";
      }
      body.film-standalone-page .logo,
      body.staff-standalone-page .logo,
      body.user-standalone-page .logo { grid-area: logo; }
      body.film-standalone-page .header-buttons,
      body.staff-standalone-page .header-buttons,
      body.user-standalone-page .header-buttons { grid-area: login; }
      body.film-standalone-page .header-user-wrap,
      body.staff-standalone-page .header-user-wrap,
      body.user-standalone-page .header-user-wrap {
        grid-area: login;
        justify-self: end;
      }
      body.film-standalone-page .header-search,
      body.staff-standalone-page .header-search,
      body.user-standalone-page .header-search {
        grid-area: search;
        justify-self: stretch;
        width: 100%;
        max-width: none;
        margin: 8px 0 0 !important;
      }
      .header-search-input {
        min-height: 40px;
        padding-top: 0;
        padding-bottom: 0;
        font-size: 14px;
        line-height: 40px;
      }
      .hero::before,
      main.film-page .hero::before {
        background: linear-gradient(180deg, rgba(7,7,17,.98) 0%, rgba(7,7,17,.94) 100%);
        opacity: 1;
      }
      .hero,
      main.film-page .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        align-items: start;
        padding: 16px;
        border-radius: 26px;
      }
      .poster-wrap,
      main.film-page .poster-wrap { width: min(230px, 100%); max-width: 230px; margin: 0 auto; }
      .hero-actions, .icon-actions { display: flex; }
      .icon-actions { align-items: stretch; }
      .plan-action { min-width: 0; flex: 1 1 220px; }
      .icon-action { flex: 0 0 58px; }
      .icon-action:hover,
      .icon-action:focus-visible {
        flex-basis: 190px;
      }
      .rating-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
      .rate-btn { min-width: 0; }
      body.film-standalone-page .hero h1,
      main.film-page .hero h1,
      #section-film .hero h1 { font-size: clamp(32px, 11vw, 54px); }
      body.film-standalone-page .footer-content { grid-template-columns: 1fr; }
    }

/* ===== Mobile: landing/cabinet — no horizontal overflow, centered guest blocks ===== */
@media (max-width: 768px) {
  html {
    overflow-x: clip;
    max-width: 100%;
  }

  body {
    overflow-x: clip;
    max-width: 100%;
  }

  .content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-content {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.film-standalone-page .header-content,
  body.staff-standalone-page .header-content,
  body.user-standalone-page .header-content {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: unset !important;
    grid-template-areas: unset !important;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-search {
    order: 3;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.film-standalone-page .header-search,
  body.staff-standalone-page .header-search,
  body.user-standalone-page .header-search {
    order: 3;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    grid-area: unset !important;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .logo,
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-buttons {
    grid-column: unset;
    grid-area: unset;
  }

  body.film-standalone-page .logo,
  body.staff-standalone-page .logo,
  body.user-standalone-page .logo,
  body.film-standalone-page .header-buttons,
  body.staff-standalone-page .header-buttons,
  body.user-standalone-page .header-buttons {
    grid-column: unset;
    grid-area: unset;
  }

  body.film-standalone-page .header-buttons,
  body.staff-standalone-page .header-buttons,
  body.user-standalone-page .header-buttons {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
  }

  body.film-standalone-page .header-user-wrap,
  body.staff-standalone-page .header-user-wrap,
  body.user-standalone-page .header-user-wrap {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px;
    justify-self: unset !important;
  }

  body.film-standalone-page .header-util-row,
  body.staff-standalone-page .header-util-row,
  body.user-standalone-page .header-util-row {
    margin-left: auto;
    margin-right: 0;
  }

  body.film-standalone-page .header-profile-pill,
  body.staff-standalone-page .header-profile-pill,
  body.user-standalone-page .header-profile-pill {
    flex-shrink: 0;
  }

  body.film-standalone-page .header-settings-btn,
  body.staff-standalone-page .header-settings-btn,
  body.user-standalone-page .header-settings-btn {
    flex-shrink: 0;
    margin-left: 4px;
  }

  #landing,
  #landing > section {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    text-align: center;
  }

  body.article-standalone-page main.subpage-main > .article-content,
  body.article-standalone-page .article-content {
    text-align: left;
  }

  #landing {
    padding-left: 16px;
    padding-right: 16px;
  }

  body:not(.in-cabinet):not(.article-standalone-page) section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-buttons,
  .what-is-v2-features,
  .steps,
  .bento-grid,
  .cta-section,
  .faq-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .bento-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .what-is-v2 {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .what-is-v2-feature {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .bento-card,
  .step,
  .cta-section {
    text-align: center;
  }

  .parallax-bg {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    clip-path: inset(0);
  }

  .parallax-emoji {
    max-width: 90vw;
    animation-duration: 18s;
  }

  body:not(.in-cabinet) .parallax-bg .parallax-emoji {
    filter: blur(0.15px);
  }

  body.in-cabinet .cabinet-section,
  body.in-cabinet #section-home .home-dash-row.film-card-v2,
  body.in-cabinet #section-home .home-dash-row-text,
  body.in-cabinet #section-home .home-dash-row-main,
  body.in-cabinet #section-home .home-dash-row-title,
  body.in-cabinet #section-home .home-dash-row-meta {
    text-align: left;
  }

  body.in-cabinet .cabinet-topbar,
  body.in-cabinet .cabinet-nav,
  body.in-cabinet .home-quick-actions {
    max-width: 100%;
    min-width: 0;
  }

  .footer-sections {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— Турнирная таблица (главная + страница) ——— */
.home-tourn-rows,
.tourn-lb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.home-tourn-block .home-tourn-rows {
  gap: 6px;
  margin-top: 0;
}
.home-tourn-block .home-tourn-tabs {
  margin: 8px 0 6px;
}
.home-tourn-block .home-tourn-tabs .chip {
  padding: 8px 12px;
  font-size: 13px;
}
.home-tourn-block .home-tourn-empty {
  margin: 0;
  padding: 8px 0;
  font-size: 14px;
}
.home-tourn-row,
button.home-tourn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #f3f3f8);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.13s, border-color 0.13s;
}
.home-tourn-block .home-tourn-row,
.home-tourn-block button.home-tourn-row {
  padding: 10px 12px;
  gap: 10px;
  border-radius: 12px;
}
.home-tourn-row:hover {
  background: rgba(255, 255, 255, 0.08);
}
.home-tourn-row-me {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.08);
}
.home-tourn-rank {
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}
.home-tourn-block .home-tourn-rank {
  width: 28px;
  font-size: 18px;
}
.home-tourn-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tourn-block .home-tourn-name {
  font-size: 16px;
  font-weight: 700;
}
.home-tourn-score {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent, #ff2d7b);
}
.home-tourn-block .home-tourn-score {
  font-size: 15px;
}
.tourn-lb-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.tourn-lb-tabs .chip {
  flex-shrink: 0;
  white-space: nowrap;
}
.tourn-lb-tabs .chip.active {
  border-color: rgba(255, 45, 123, 0.55);
  color: var(--accent, #ff2d7b);
  background: rgba(255, 45, 123, 0.12);
}

/* Итоги турнира */
body.in-cabinet #section-tournament .tournament-page-root,
body.in-cabinet #section-tournament .tourn-page {
  max-width: min(1100px, 96vw);
  margin: 0 auto;
  text-align: center;
}
.tourn-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  text-align: left;
}
.tourn-nom-block {
  width: 100%;
  min-width: 0;
}
@media (min-width: 640px) {
  .tourn-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (min-width: 1100px) {
  .tourn-sections {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  body.in-cabinet #section-tournament .tourn-podium-row {
    padding: 12px 14px;
    gap: 10px;
  }
  body.in-cabinet #section-tournament .tourn-podium-rank {
    width: 28px;
    font-size: 18px;
  }
  body.in-cabinet #section-tournament .tourn-podium-avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }
  body.in-cabinet #section-tournament .tourn-podium-name {
    font-size: 14px;
    line-height: 1.25;
  }
  body.in-cabinet #section-tournament .tourn-podium-score {
    font-size: 12px;
  }
  body.in-cabinet #section-tournament .tourn-nom-title {
    font-size: 14px;
    min-height: 2.8em;
    margin-bottom: 10px;
  }
}
.tourn-page-kicker {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #ff2d7b);
  margin: 0 0 8px;
}
.tourn-page-head {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tourn-page-sub {
  margin: 0 0 20px;
  text-align: center;
}
.tourn-page-foot {
  margin-top: 22px;
  text-align: center;
}
.tourn-nom-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 16px;
  color: var(--text-primary, #f3f3f8);
}
.tourn-nom-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tourn-podium-row,
button.tourn-podium-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #f3f3f8);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.13s, border-color 0.13s;
}
.tourn-podium-row:hover {
  background: rgba(255, 255, 255, 0.09);
}
.tourn-podium-row-me {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.1);
}
.tourn-podium-rank {
  width: 34px;
  flex-shrink: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1;
}
.tourn-podium-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.35), rgba(155, 77, 255, 0.35));
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
}
.tourn-podium-avatar-letter {
  line-height: 1;
}
.tourn-page-headbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.tourn-page-headbar-text {
  flex: 1;
  min-width: 0;
}
.tourn-month-switch {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 123, 0.45);
  background: rgba(255, 45, 123, 0.1);
  color: #ff6ba8;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tourn-month-switch:hover {
  background: rgba(255, 45, 123, 0.18);
  border-color: rgba(255, 45, 123, 0.65);
}
.tourn-lb-row {
  width: 100%;
}
.site-wtw-mode-icon .mp-icon i,
.site-wtw-mode-icon i[class^="ph"] {
  font-size: 24px;
}
.mp-list-icon.mp-icon i {
  font-size: 22px;
}
.header-inbox-icon.mp-icon i,
.inbox-fab-icon.mp-icon i {
  font-size: 22px;
}
.header-settings-btn-icon.mp-icon i {
  font-size: 18px;
}
.header-nav-item-icon.mp-icon i {
  font-size: 16px;
  vertical-align: -2px;
  margin-right: 6px;
}
.home-more-row-icon {
  display: inline-flex;
  width: 28px;
  flex-shrink: 0;
  justify-content: center;
}
.site-pick-plan .mp-icon,
.site-pick-again .mp-icon {
  margin-right: 6px;
  vertical-align: -2px;
}
.tourn-podium-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tourn-podium-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tourn-podium-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
}
.tourn-podium-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #ff2d7b);
}
.tourn-page-empty {
  padding: 28px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

/* ——— Страница пользователя ——— */
.cabinet-user-profile .user-profile-shell {
  max-width: none;
  margin: 0;
  width: 100%;
}
.cabinet-user-profile .user-profile-root {
  width: 100%;
}
.cabinet-user-profile .profile-hub--friend {
  width: 100%;
}
.user-profile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #f3f3f8);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.user-profile-back:hover {
  border-color: rgba(255, 45, 123, 0.4);
  background: rgba(255, 45, 123, 0.08);
}
.user-profile-page {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}
.user-profile-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.user-profile-block-head .user-profile-block-title {
  margin: 0;
}
.user-profile-header {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
}
.user-profile-avatar {
  width: clamp(80px, 10vw, 120px);
  height: clamp(80px, 10vw, 120px);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 45, 123, 0.35);
  overflow: hidden;
  color: #fff;
}
.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-profile-name {
  margin: 0;
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.user-profile-status {
  margin-top: 4px;
  font-size: 14px;
  color: #ff6ba8;
  font-weight: 600;
}
.user-profile-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted, #aaa);
}
.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .user-profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.user-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: clamp(84px, 10vw, 108px);
  padding: 16px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}
.user-profile-stat--static {
  cursor: default;
}
.user-profile-stat:not(.user-profile-stat--static):hover {
  border-color: rgba(255, 45, 123, 0.45);
  background: rgba(255, 45, 123, 0.1);
}
.user-profile-stat-val {
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--accent, #ff2d7b);
  line-height: 1;
}
.user-profile-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #999);
  max-width: 100%;
  text-align: center;
  line-height: 1.15;
}
@media (max-width: 768px) {
  .user-profile-stat-label {
    font-size: 10px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
  }
}
.user-profile-taste {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.user-profile-taste:hover {
  border-color: rgba(255, 45, 123, 0.4);
}
.user-profile-taste-pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent, #ff2d7b);
}
.user-profile-taste-meta {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted, #bbb);
}
.user-profile-actions--row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.user-profile-action-main {
  flex: 1;
}
.user-profile-action-side {
  flex-shrink: 0;
}
.user-profile-hint {
  margin: 0 0 8px;
}
.user-profile-block-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}
.user-profile-rating-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 900px) {
  .user-profile-rating-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
.user-profile-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.user-profile-rating-row:hover {
  border-color: rgba(255, 45, 123, 0.35);
}
.user-profile-rating-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-profile-rating-score {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent, #ff2d7b);
}
.user-profile-rating-denom {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #999);
}
.user-profile-rating-year {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted, #999);
}
.user-profile-more {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}
.user-profile-ach-row-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 4px 20px 4px 4px;
  scrollbar-width: thin;
}
.user-profile-ach-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: min-content;
}
.user-profile-ach-row--full {
  flex-wrap: wrap;
  padding-right: 0;
}
@media (min-width: 900px) {
  .user-profile-ach-row-wrap {
    overflow: visible;
    padding-right: 4px;
  }
  .user-profile-ach-row {
    flex-wrap: wrap;
  }
  .user-profile-rating-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .user-profile-rating-row {
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 15px;
  }
  .user-profile-block-title {
    font-size: 18px;
  }
}
.user-profile-ach {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 45, 123, 0.45);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: inherit;
  font: inherit;
  line-height: 1;
  padding: 0;
}
.user-profile-ach-icon {
  font-size: 22px;
}
.user-profile-ach-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  z-index: 30;
  min-width: 160px;
  max-width: min(240px, 70vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18, 18, 28, 0.96);
  border: 1px solid rgba(255, 107, 168, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.user-profile-ach-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(18, 18, 28, 0.96);
}
.user-profile-ach-tip-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.user-profile-ach-tip-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted, #aab);
}
@media (hover: hover) and (pointer: fine) {
  .user-profile-ach:hover .user-profile-ach-tip,
  .user-profile-ach:focus-visible .user-profile-ach-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
.user-profile-ach-all {
  flex-shrink: 0;
  border: 1px solid rgba(255, 107, 168, 0.45);
  border-radius: 999px;
  background: rgba(255, 45, 123, 0.1);
  color: #ff8fc4;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 14px;
  white-space: nowrap;
}
.user-profile-ach-all:hover {
  background: rgba(255, 45, 123, 0.2);
}
.user-profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.user-profile-modal-panel {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow: auto;
  background: var(--surface-elevated, #1a1a22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
}
.user-profile-modal-close {
  width: 100%;
  margin-top: 16px;
}
.user-profile-taste-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
.user-profile-taste-row strong {
  color: var(--accent, #ff2d7b);
  flex-shrink: 0;
}
.user-profile-ach-sub-count {
  margin: 0 0 12px;
}
.user-profile-sub-back {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #ff6ba8;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.user-profile-sub-back:hover {
  text-decoration: underline;
}
.tourn-lb-row[data-user-profile],
.home-tourn-row[data-user-profile] {
  cursor: pointer;
}

/* Публичная страница /u/:id */
.user-standalone-main {
  max-width: min(1120px, 96vw);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 32px) 56px;
}
body.user-standalone-page .user-profile-page,
body.user-standalone-page .user-public-page {
  width: 100%;
}
.user-public-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.user-public-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.user-public-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 45, 123, 0.4);
  overflow: hidden;
}
.user-public-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-public-name {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
}
.user-public-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted, #bbb);
}
.user-public-stats strong {
  color: var(--accent, #ff2d7b);
  font-weight: 800;
}
.user-public-ach-row-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 18px;
}
.user-public-ach-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: min-content;
}
.user-public-ach-row--modal {
  flex-wrap: wrap;
}
.user-public-ach {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 45, 123, 0.4);
  background: rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}
.user-public-ach-all {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: #ff6ba8;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 10px;
  white-space: nowrap;
}
.user-public-ach-all:hover {
  text-decoration: underline;
}
.user-public-ach-login-hint {
  margin-top: 14px;
}
.user-public-page .user-profile-actions,
.user-public-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.user-public-page .user-profile-action-main,
.user-public-page #user-public-add-friend {
  width: 100%;
  min-height: 52px;
  height: auto;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 45, 123, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.user-public-page .user-profile-action-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(255, 45, 123, 0.45);
}
.user-public-ach-detail-icon {
  font-size: 52px;
  line-height: 1;
  text-align: center;
  margin: 0 0 12px;
}
.user-public-page .user-profile-head-text {
  min-width: 0;
}

.home-more-section {
  margin-top: 16px;
}
.home-more-section .home-dash-h {
  margin-bottom: 8px;
}
.home-more-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-more-row,
button.home-more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #f3f3f8);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.home-more-row:hover {
  background: rgba(255, 255, 255, 0.08);
}
.home-more-row .list-arrow {
  margin-left: auto;
  opacity: 0.45;
}

/* Desktop: landing centered, header must not widen the page */
html {
  overflow-x: clip;
}

.content-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

#site-header {
  overflow: visible;
}

@media (min-width: 769px) and (max-width: 1100px) {
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page):not(.in-search-page) .header-content {
    display: grid !important;
    grid-template-columns: auto minmax(160px, min(280px, 30vw)) auto !important;
    grid-template-rows: auto !important;
    align-items: center;
    gap: 10px 12px !important;
  }
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page):not(.in-search-page) .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
  }
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page):not(.in-search-page) .header-buttons {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
  }
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page):not(.in-search-page) .header-search:not(.hidden) {
    grid-column: 2;
    grid-row: 1;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.in-cabinet .header-profile-name {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.in-cabinet .header-settings-btn-text {
    display: none;
  }
  body.in-cabinet .header-user-wrap {
    gap: 6px;
  }
}

body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-content {
  width: 100%;
  max-width: var(--site-max);
  min-width: 0;
  box-sizing: border-box;
}

body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-buttons,
body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-user-wrap {
  min-width: 0;
  flex-shrink: 1;
}

#landing,
#landing > section,
body:not(.in-cabinet):not(.in-search-page) main > section {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  text-align: center;
}

#landing .hero-label,
#landing .hero-title,
#landing .hero-subtitle,
#landing .hero-description,
#landing .hero-buttons,
#landing .hero-subtext {
  margin-left: auto;
  margin-right: auto;
}

#landing .bento-grid .card:nth-child(1),
#landing .bento-grid .card:nth-child(6) {
  grid-column: span 1;
}

@media (min-width: 900px) {
  #landing .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #landing .bento-grid .card:nth-child(1),
  #landing .bento-grid .card:nth-child(6) {
    grid-column: span 2;
  }
}

/* Landing: search in header + hero copy centered on viewport, not between logo and actions */
@media (min-width: 769px) {
  html.mp-landing-boot .header-content,
  body.landing-root-page.film-standalone-page .header-content {
    display: grid !important;
    grid-template-columns: auto minmax(320px, 1fr) auto !important;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
  }

  html.mp-landing-boot .logo,
  body.landing-root-page.film-standalone-page .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
  }

  html.mp-landing-boot .header-buttons,
  body.landing-root-page.film-standalone-page .header-buttons {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
    min-width: max-content;
  }

  html.mp-landing-boot #header-search,
  body.landing-root-page.film-standalone-page #header-search {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html.mp-session.mp-landing-boot .header-content,
  html.mp-session body.landing-root-page.film-standalone-page .header-content,
  body.in-cabinet .header-content,
  .header-content:has(#header-user-wrap:not(.hidden)) {
    grid-template-columns: auto minmax(220px, min(400px, 36vw)) auto !important;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-content {
    display: grid !important;
    grid-template-columns: auto minmax(var(--hdr-grid-search-min, 280px), var(--hdr-grid-search-max, 1fr)) auto;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
  }

  body.film-standalone-page .header-content,
  body.landing-root-page .header-content,
  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-content {
    --hdr-grid-search-min: 280px;
    --hdr-grid-search-max: 1fr;
  }

  /* Гость: поиск тянется между логотипом и «Войти» */
  html:not(.mp-session) body.film-standalone-page .header-content,
  html:not(.mp-session) body.landing-root-page .header-content,
  html:not(.mp-session) body:not(.in-cabinet):not(.staff-standalone-page):not(.user-standalone-page) .header-content {
    --hdr-grid-search-min: 300px;
    --hdr-grid-search-max: 1fr;
  }

  /* Сессия: уже поиск, больше места под профиль / колокол / настройки */
  html.mp-session .header-content,
  body.in-cabinet .header-content,
  .header-content:has(#header-user-wrap:not(.hidden)) {
    --hdr-grid-search-min: 200px;
    --hdr-grid-search-max: min(400px, 36vw);
  }

  html.mp-session .header-buttons,
  body.in-cabinet .header-buttons,
  .header-content:has(#header-user-wrap:not(.hidden)) .header-buttons {
    justify-self: end;
    flex-shrink: 0;
    min-width: max-content;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-search:not(.hidden) {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
  }

  body:not(.film-standalone-page):not(.staff-standalone-page):not(.user-standalone-page) .header-buttons {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
  }
}

#landing > section:first-of-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-top: 24px;
  padding-bottom: 12px;
  padding-inline: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
  text-align: center;
}

#landing > section:first-of-type .hero-label,
#landing > section:first-of-type .hero-title,
#landing > section:first-of-type .hero-subtitle,
#landing > section:first-of-type .hero-description,
#landing > section:first-of-type .hero-buttons,
#landing > section:first-of-type .hero-subtext {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  text-align: center;
}

#landing > section:first-of-type .hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* App download platform picker (site profile + shared with miniapp pattern) */
.mp-dl-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  animation: mpDlFadeIn 0.15s ease;
}
.mp-dl-sheet {
  width: 100%;
  max-width: 420px;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #131318;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: mpDlSlideUp 0.22s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.mp-dl-sheet-title {
  font-family: 'Unbounded', Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
}
.mp-dl-sheet-cancel {
  width: 100%;
  margin-top: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mp-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.mp-platform-card:active { transform: scale(0.98); }
.mp-platform-card--ios {
  background: linear-gradient(160deg, rgba(255, 45, 123, 0.16), rgba(155, 77, 255, 0.12));
  border-color: rgba(255, 45, 123, 0.28);
}
.mp-platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.mp-platform-svg {
  display: block;
  width: 34px;
  height: 34px;
}
.mp-platform-icon--apple .mp-platform-svg {
  width: 30px;
  height: 30px;
  color: #fff;
}
.mp-platform-body { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mp-platform-label { font-size: 15px; font-weight: 800; }
.mp-platform-hint { font-size: 12px; color: var(--text-muted); font-weight: 600; }
@keyframes mpDlFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpDlSlideUp { from { transform: translateY(30%); } to { transform: translateY(0); } }

.site-tournament-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 12050;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.site-tournament-intro-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--card-bg, #1a1a22);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 22px 18px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.site-tournament-intro-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted, #888);
  opacity: 0.42;
  font-size: 17px;
  cursor: pointer;
}
.site-tournament-intro-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary, #f3f3f8);
}
.site-tournament-intro-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #b8b8c8);
  margin: 0 0 10px;
}
.site-tournament-intro-foot {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted, #888);
  opacity: 0.78;
  margin: 0 0 14px;
}

/* Онбординг и тур по кабинету (веб) */
.mp-onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 12060;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.mp-onboard-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg, #1a1a22);
  border-radius: 16px;
  padding: 22px 18px 18px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.mp-onboard-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary, #f3f3f8);
  line-height: 1.25;
}
.mp-onboard-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #b8b8c8);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mp-first-onboard-card {
  position: relative;
  max-width: 420px;
}
.mp-onboard-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, #888);
  opacity: 0.42;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.site-onboard-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.tour-highlight {
  border-radius: 12px;
}
.home-tour-overlay-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.home-tour-shade {
  display: block;
}
.home-tour-card-wrap {
  pointer-events: auto;
  animation: siteTourCardIn 0.22s ease-out;
}
@keyframes siteTourCardIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.home-tour-card {
  width: 100%;
  background: var(--card-bg, #1a1a22);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.home-tour-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary, #f3f3f8);
  line-height: 1.25;
}
.home-tour-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #c8c8d8);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: min(42vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.home-tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.mp-site-home-tour-active {
  overflow: hidden;
}

/* ── Web cabinet mobile parity (mini-app style) ─────────────────────── */
.header-inbox-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.header-inbox-btn:hover { background: rgba(255, 255, 255, 0.1); }
.header-inbox-icon { font-size: 18px; line-height: 1; }
.header-inbox-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid rgba(12, 12, 18, 0.95);
}
.header-inbox-badge.hidden { display: none; }

body.in-cabinet .inbox-fab { display: none !important; }

.cabinet.film-page-mode .cabinet-home-stats {
  display: none !important;
}

.cabinet-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.cabinet-home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.cabinet-home-stat:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 90, 165, 0.35);
  transform: translateY(-2px);
}
.cabinet-home-stat b {
  font-size: 26px;
  font-weight: 800;
  color: #ff5aa5;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.cabinet-home-stat span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.2;
  text-align: center;
}

.home-poster-rail,
.home-prem-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
  margin: 0;
  width: 100%;
  min-width: 0;
  scrollbar-width: thin;
}
.home-rail--draggable {
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-rail--draggable::-webkit-scrollbar {
  display: none;
  height: 0;
}
.home-rail--draggable.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.home-rail--draggable.is-dragging .home-poster-tile,
.home-rail--draggable.is-dragging .home-pre-card {
  pointer-events: none;
}
.home-poster-tile,
.home-pre-card {
  flex: 0 0 42%;
  min-width: 120px;
  max-width: 150px;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  flex-direction: column;
}
body.guest-cabinet-preview .cabinet-nav-btn[data-section="tournament"],
body.guest-cabinet-preview #landing-root-nav .cabinet-nav-btn[href="/tournament"] {
  display: none !important;
}
.home-poster-tile-img,
.home-pre-card-poster {
  aspect-ratio: 2 / 3;
  width: 100%;
  background: rgba(255, 255, 255, 0.06) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.home-pre-card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-pre-card-poster.premiere-poster-media > span[data-stop-card-click] {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  line-height: 0;
}
body.guest-cabinet-preview #section-home .home-prem-rail,
#home-dashboard-root .home-prem-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 8px;
}
body.guest-cabinet-preview #section-home .home-pre-card,
#home-dashboard-root .home-pre-card {
  flex: 0 0 clamp(132px, 38vw, 168px);
  min-width: 132px;
  max-width: 168px;
  scroll-snap-align: start;
}
#home-dashboard-root .home-section-body {
  min-width: 0;
  width: 100%;
}
#home-dashboard-root .home-section-body > .home-prem-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  min-width: 0;
}
#home-dashboard-root .home-prem-rail > .home-pre-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 clamp(132px, 38vw, 168px);
  min-width: 132px;
  max-width: 168px;
}
.home-poster-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.28s ease;
}
.home-poster-tile:hover .home-poster-tile-img img,
.home-poster-tile-wrap:hover .home-poster-tile-img img {
  transform: scale(1.06);
}
.home-poster-tile-img--empty,
.home-poster-tile-img--empty::after { display: none; }
.home-poster-tile-title,
.home-pre-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  padding: 8px 8px 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-poster-tile-year,
.home-pre-card-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  padding: 0 8px 8px;
}
.home-pre-card-body { padding: 0 0 2px; }
.home-rated-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(12, 12, 18, 0.92);
  border: 1.5px solid #ff5aa5;
  color: #ff5aa5;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}

.mp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.mp-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.mp-list-item:last-child { border-bottom: 0; }
.mp-list-item:active { background: rgba(255, 255, 255, 0.05); }
.mp-list-emoji { font-size: 20px; flex-shrink: 0; width: 28px; text-align: center; }
.mp-list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mp-list-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.25; }
.mp-list-hint { font-size: 12px; color: rgba(255, 255, 255, 0.55); line-height: 1.35; margin-top: 1px; }
.mp-list-arrow { color: rgba(255, 255, 255, 0.35); font-size: 18px; flex-shrink: 0; }

.profile-hub { display: flex; flex-direction: column; gap: 14px; }
.profile-hub-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  padding-top: 12px;
  padding-right: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.profile-hub-header-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.profile-hub-avatar,
.profile-hub-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
}
.profile-hub-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 90, 165, 0.35), rgba(120, 80, 255, 0.28));
  color: #fff;
}
.profile-hub-avatar img {
  object-fit: cover;
  display: block;
}
.profile-hub-info { flex: 1; min-width: 0; }
.profile-hub-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.profile-hub-meta { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.profile-hub-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: auto;
  height: auto;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ff5aa5;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}
.profile-hub-edit:hover { opacity: 0.85; }
.profile-hub-header-top .profile-hub-info { padding-right: 28px; }
.profile-hub-stats,
.profile-hub-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 8px;
  width: 100%;
}
.profile-hub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.profile-hub-stat b { font-size: 17px; font-weight: 800; color: #ff5aa5; }
.profile-hub-stat span {
  font-size: 10px;
  line-height: 1.2;
  padding: 0 2px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  text-transform: lowercase;
  white-space: nowrap;
}
.profile-hub-achievements { margin-top: 0; }
.profile-hub-achievements .user-profile-block { margin-top: 0; }
.profile-hub-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-ach-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.profile-ach-preview-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.profile-ach-preview .user-profile-ach-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  flex-wrap: nowrap;
  padding: 0;
  width: 100%;
}
.profile-ach-preview .user-profile-ach {
  width: 100%;
  max-width: 64px;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 0;
  background: transparent;
  justify-self: center;
}
.profile-ach-preview .user-profile-ach-icon { font-size: 28px; }
.profile-ach-dialog { max-width: 520px; max-height: min(88vh, calc(100dvh - 32px)); overflow: hidden; display: flex; flex-direction: column; }
.profile-ach-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.profile-ach-dialog-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.profile-hub-mutual { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.profile-film-block { margin-bottom: 14px; }
.profile-film-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.profile-film-block-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.profile-film-block-more,
.profile-film-block-more.link-inline {
  border: 0;
  background: none;
  color: #ff5aa5;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.profile-film-block-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.profile-activity-block { margin-bottom: 14px; }
.profile-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.profile-activity-row:hover { background: rgba(255, 255, 255, 0.06); }
.profile-activity-row-icon {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 18px;
}
.profile-activity-row-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}
.profile-activity-row-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.profile-film-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.profile-film-rail--grid {
  flex-wrap: wrap;
  overflow: visible;
}
.profile-film-rail--dense-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  flex-wrap: unset;
  width: 100%;
}
.profile-film-rail--dense-grid .profile-film-card {
  width: 100%;
  flex: unset;
  max-width: none;
}
.profile-film-rail--dense-grid .profile-film-card-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
}
.profile-film-rail--dense-grid .profile-film-card-poster img {
  width: 100%;
  height: 100%;
}
.profile-film-card {
  flex: 0 0 92px;
  width: 92px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.profile-film-card-poster {
  position: relative;
  display: block;
  width: 92px;
  height: 138px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-film-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-film-card-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 28px;
}
.profile-film-card-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ff5aa5;
  font-size: 10px;
  font-weight: 800;
}
.profile-film-card-badge--plan { color: #fff; }
.profile-film-card-title {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.user-friend-profile { max-width: 720px; margin: 0 auto; }
.user-friend-profile .user-profile-block { margin-top: 4px; }
.user-friend-profile .user-profile-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.user-friend-profile .user-profile-section-icon { color: rgba(255, 255, 255, 0.72); }
.user-friend-profile .user-profile-taste-row { width: 100%; margin-top: 2px; }
.user-friend-profile .user-profile-actions { margin-top: 2px; }
.user-friend-profile .user-profile-action-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.user-profile-ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.user-profile-ach-card {
  min-height: 72px;
  cursor: default;
}
.user-profile-ach-card .ach-panel-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.user-profile-sub .profile-sub-title {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.cabinet-user-profile .user-profile-shell .mp-sub-back.user-profile-back {
  margin-bottom: 12px;
}

.profile-sub-page { display: flex; flex-direction: column; gap: 12px; }
.profile-sub-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.mp-sub-back {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: #ff5aa5;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-logout {
  margin-top: 8px;
  min-height: 46px;
  border: 1px solid rgba(255, 68, 68, 0.35) !important;
  background: rgba(255, 68, 68, 0.08) !important;
  color: #ff6b6b !important;
  font-weight: 700;
}
.settings-panels-grid--stack { grid-template-columns: 1fr !important; }
.settings-panels-grid--profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-panels-grid--prefs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-import-hero {
  padding: 24px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 45, 123, 0.22);
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.12), rgba(124, 60, 255, 0.08));
}
.settings-import-hero .settings-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: none;
}
.settings-import-lead {
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 16px;
}
.settings-import-lead strong {
  color: #ff5aa5;
}
.settings-panel--links {
  padding: 0;
  background: transparent;
  border: 0;
}
.settings-panel--links .mp-list-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.settings-preferences-page .settings-panels-grid--prefs .settings-panel--wide,
.settings-preferences-page .settings-import-hero {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .profile-hub {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 20px 24px;
    align-items: start;
  }
  .profile-hub-left {
    grid-column: 1;
    grid-row: 1;
  }
  .profile-hub-header {
    padding: 20px;
  }
  .profile-hub-header .profile-hub-highlights { margin-top: 8px; }
  .profile-hub > .mp-list,
  .profile-hub > .profile-hub-right {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  .profile-hub > .btn-logout {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 420px;
    justify-self: center;
    margin-top: 4px;
  }
  .profile-hub--friend .profile-hub-left {
    align-self: stretch;
  }
  .profile-hub--friend .profile-hub-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
    min-width: 0;
    align-self: stretch;
  }
  .profile-hub--friend > .btn-logout {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 320px;
    margin-top: 8px;
  }
  .profile-film-rail--dense-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .profile-hub-avatar,
  .profile-hub-avatar img {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
  .profile-hub-name {
    font-size: 22px;
  }
  .settings-preferences-page {
    gap: 24px;
  }
  .settings-panels-grid--prefs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .settings-panels-grid--profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }
  .settings-import-hero {
    padding: 28px 32px;
  }
  .settings-import-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
  }
  .settings-import-form .btn-full {
    grid-column: 1 / -1;
  }
  .settings-import-counts {
    grid-column: 1 / -1;
  }
  #settings-import-ext .settings-import-form {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1024px) {
  .profile-hub-header-top { align-items: flex-start; }
  .profile-hub-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
  }
  .profile-hub-highlights { margin-top: 0; }
  .profile-hub-stat span { font-size: 11px; }
  .profile-hub-stat { min-height: 52px; padding: 8px 2px; }
  .profile-ach-preview .user-profile-ach { max-width: 72px; }
  .profile-ach-preview .user-profile-ach-icon { font-size: 30px; }
  .user-friend-profile .user-profile-actions,
  .user-friend-profile .user-profile-block {
    max-width: 640px;
  }
}
.settings-import-form--ext {
  grid-template-columns: 1fr;
}
.settings-import-form--ext select,
.settings-import-form--ext textarea {
  grid-column: 1 / -1;
}
.settings-import-friend-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 45, 123, 0.25);
  background: rgba(255, 45, 123, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-import-friend-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.settings-import-friend-foot {
  margin: 0;
  font-size: 13px;
}
.profile-import-progress-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}
.profile-import-cancel {
  margin-top: 12px;
  color: #ff8a8a !important;
}
.profile-import-done {
  padding: 14px 16px;
  border-radius: 12px;
}
.profile-import-done.success {
  border: 1px solid rgba(76, 217, 100, 0.35);
  background: rgba(76, 217, 100, 0.08);
}
.profile-import-done.error {
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(255, 80, 80, 0.08);
}
.profile-import-done-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.profile-import-done-detail {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}
#profile-import-friend-host.hidden {
  display: none;
}
.settings-hero-avatar--inline { margin: 0 auto 12px; }

.footer-apps-cabinet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
  text-align: center;
}
.footer-apps-cabinet h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.footer-store-badge {
  display: block;
  line-height: 0;
  border-radius: 7px;
  overflow: hidden;
  opacity: 0.92;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.footer-store-badge:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.footer-store-badge img {
  display: block;
  height: 40px;
  width: auto;
}
.footer-apps-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
  align-items: center;
  max-width: 320px;
}
.footer-app-mini {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.footer-app-mini:hover { color: #fff; }
.footer-apps-sep {
  color: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  user-select: none;
}
.footer-apps-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.footer-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.footer-app-link:hover { border-color: rgba(255, 90, 165, 0.45); }

@media (max-width: 900px) {
  body.in-cabinet .cabinet-section > .section-title:not(.section-title--compact) {
    display: none;
  }
  body.in-cabinet .cabinet-section > .section-title.section-title--compact {
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px;
    text-align: left;
    letter-spacing: -0.02em;
  }
  body.in-cabinet .home-dash-h {
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    font-family: inherit !important;
    color: rgba(255, 255, 255, 0.72) !important;
  }
  body.in-cabinet .home-dash-block {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.in-cabinet .home-dash-head { margin-bottom: 8px; }
  body.in-cabinet .home-dash-more {
    font-size: 12px;
    font-weight: 700;
    color: #5ec4d4;
  }
  body.in-cabinet .cabinet-user-name { font-size: 24px; }
  body.in-cabinet .home-emoji-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    box-shadow: none;
  }
  body.in-cabinet .plans-empty-actions--compact .btn,
  body.in-cabinet #section-plans .cabinet-plans-toolbar .btn,
  body.in-cabinet .base-tab {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
  body.in-cabinet #section-plans .cabinet-plans-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  body.in-cabinet .settings-billing-actions .btn {
    min-height: 42px;
    font-size: 14px;
  }
  body.in-cabinet .profile-hub-stats,
  body.in-cabinet .profile-hub-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.in-cabinet .profile-hub-stats .profile-hub-stat:nth-child(3),
  body.in-cabinet .profile-hub-stats .profile-hub-stat:nth-child(4),
  body.in-cabinet .profile-hub-highlights .profile-hub-stat:nth-child(3),
  body.in-cabinet .profile-hub-highlights .profile-hub-stat:nth-child(4) {
    /* keep 2x2 on very narrow */
  }
  /* Home premieres rail — force horizontal carousel (regression: cards stacked vertically) */
  body.in-cabinet #home-dashboard-root .home-section-body > .home-prem-rail,
  #home-dashboard-root .home-section-body > .home-prem-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  body.in-cabinet #home-dashboard-root .home-prem-rail > .home-pre-card,
  #home-dashboard-root .home-prem-rail > .home-pre-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 clamp(132px, 42vw, 168px);
    width: clamp(132px, 42vw, 168px);
    min-width: 132px;
    max-width: 168px;
    scroll-snap-align: start;
  }
}

/* Extended onboarding v2 (shared with onboarding-flow.js) */
.mp-onboard-dialog-overlay { z-index: 12060; touch-action: none; overscroll-behavior: contain; }
.mp-onboard-dialog-card {
  max-width: 380px;
  text-align: left;
  position: relative;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.mp-onboard-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text, #f4f4f5);
}
.mp-onboard-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #a1a1aa);
  margin: 0 0 10px;
}
.mp-onboard-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #f4f4f5);
  opacity: 0.82;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.mp-onboard-back {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0 0 2px 1px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text, #f4f4f5);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-onboard-dialog-card--with-back .mp-onboard-title {
  text-align: center;
  padding-left: 36px;
  padding-right: 36px;
  box-sizing: border-box;
}
.mp-onboard-import-started { text-align: center; padding: 4px 0 0; }
.mp-onboard-import-spinner {
  width: 40px;
  height: 40px;
  margin: 14px auto 16px;
  border: 3px solid rgba(255, 45, 123, 0.22);
  border-top-color: var(--amber, #fbbf24);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.mp-onboard-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mp-onboard-db-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.mp-onboard-db-btn {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f4f4f5);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mp-onboard-db-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.mp-onboard-db-emoji {
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}
.mp-onboard-db-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.mp-onboard-db-arrow {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted, #a1a1aa);
}
html.mp-scroll-lock {
  overflow: hidden;
  height: 100%;
}
body.mp-scroll-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.mp-onboard-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.mp-onboard-opt input { accent-color: var(--amber, #fbbf24); flex-shrink: 0; }
.mp-onboard-opt-label { font-size: 15px; font-weight: 600; line-height: 1.3; }
.mp-onboard-field-wrap { margin-top: 10px; width: 100%; box-sizing: border-box; }
.mp-onboard-field-wrap.hidden { display: none; }
.mp-onboard-field { width: 100%; box-sizing: border-box; margin: 0; }
.mp-onboard-em { font-style: normal; color: #fbbf24; font-weight: 700; }
.mp-onboard-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 12070;
  background: var(--bg, #09090b);
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  touch-action: none;
  overscroll-behavior: contain;
}
.mp-onboard-picker-x { position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 2; color: #888; }
.mp-onboard-picker-inner { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: 44px; overflow: hidden; }
.mp-onboard-picker-inner--with-head { padding-top: 0; }
.mp-onboard-picker-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  position: relative;
  z-index: 5;
}
.mp-onboard-picker-head .mp-onboard-back,
.mp-onboard-picker-head .mp-onboard-dismiss {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}
.mp-onboard-picker-title { font-size: 17px; font-weight: 700; text-align: center; margin: 0 0 12px; line-height: 1.35; flex-shrink: 0; }
.mp-onboard-grid-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.mp-onboard-grid-wrap.mp-onboard-grid-dimmed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  pointer-events: none;
  border-radius: 12px;
}
.mp-onboard-grid-scroll { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.mp-onboard-pick-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 8px; }
.movies-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.movie-poster {
  background: var(--bg-surface, #131318);
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  padding: 0;
  cursor: pointer;
}
.movie-poster-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #222; display: block; }
.movie-poster-body { padding: 8px 10px 10px; }
.movie-poster-title { font-size: 13px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.movie-poster-meta { font-size: 11px; color: var(--text-muted, #a1a1aa); margin-top: 3px; }
.search-poster-media { position: relative; }
.mp-onboard-pick-tile { border: 2px solid transparent; border-radius: 12px; transition: border-color .15s ease, opacity .32s ease, transform .32s ease; }
.mp-onboard-pick-tile--watched { border-color: #a855f7; box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35); }
.mp-onboard-pick-tile--want { border-color: #f59e0b; box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35); }
.mp-onboard-pick-tile--exit { opacity: 0; transform: scale(.88); pointer-events: none; }
@keyframes mp-onboard-rec-enter {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.mp-onboard-pick-tile--rec-enter { animation: mp-onboard-rec-enter .42s ease-out both; }
.mp-onboard-picker-confirm { flex-shrink: 0; margin-top: 10px; position: relative; z-index: 5; min-height: 48px; }
.guest-onboard-cta {
  margin: 0 0 16px;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.14), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(168, 85, 247, 0.28);
  text-align: center;
}
.landing-guest-onboard-cta {
  max-width: 720px;
  margin: 28px auto 36px;
  padding: 22px 18px;
}
.landing-guest-onboard-cta .guest-onboard-cta-title {
  font-size: clamp(18px, 4.5vw, 24px);
  line-height: 1.35;
}
.guest-onboard-cta-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.guest-onboard-cta-btn {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
}
@media (max-width: 480px) {
  .mp-onboard-picker-inner { padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .mp-onboard-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mp-onboard-picker-title { font-size: 16px; padding: 0 4px; }
  .mp-onboard-picker-confirm { margin-top: 12px; margin-bottom: max(2px, env(safe-area-inset-bottom)); }
  .guest-onboard-cta { margin-left: 0; margin-right: 0; padding: 14px 12px; }
  .guest-onboard-cta-title { font-size: 16px; }
}
.mp-onboard-picker-confirm.btn-disabled,
.btn-primary.btn-disabled { opacity: 0.45; pointer-events: none; }
.mp-onboard-weekend-rail { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 12px; scroll-snap-type: x mandatory; }
.mp-onboard-weekend-card { flex: 0 0 42%; max-width: 180px; scroll-snap-align: center; border: 2px solid transparent; border-radius: 14px; padding: 0; background: rgba(255,255,255,0.04); overflow: hidden; cursor: pointer; }
.mp-onboard-weekend-card--on { border-color: var(--amber, #fbbf24); }
.mp-onboard-weekend-poster { width: 100%; aspect-ratio: 2/3; background: #222 center/cover no-repeat; }
.mp-onboard-weekend-title { font-size: 13px; font-weight: 600; padding: 8px 10px 10px; line-height: 1.3; }
@media (min-width: 900px) {
  .mp-onboard--desktop .mp-dialog-card,
  .mp-onboard--desktop .mp-onboard-dialog-card { max-width: 520px; padding: 26px 24px 22px; }
  .mp-onboard--desktop .mp-onboard-title { font-family: 'Unbounded', sans-serif; font-size: 22px; font-weight: 800; line-height: 1.3; }
  .mp-onboard--desktop .mp-onboard-text { font-size: 16px; line-height: 1.55; }
  .mp-onboard--desktop .mp-onboard-opt-label { font-size: 16px; }
  .mp-onboard--desktop .mp-onboard-picker-title { font-family: 'Unbounded', sans-serif; font-size: 20px; }
  .mp-onboard--desktop .mp-onboard-pick-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 960px; margin: 0 auto; width: 100%; }
  .mp-onboard--desktop .movie-poster-title { font-size: 14px; }
  .mp-onboard--desktop .movie-poster-meta { font-size: 12px; }
  .mp-onboard--desktop .mp-onboard-weekend-card { max-width: 200px; }
  .mp-onboard--desktop .mp-onboard-weekend-title { font-size: 14px; }
}

/* ---- Plan modal (mini-app parity) ---- */
.mp-plan-modal-card {
  position: relative;
  max-width: 400px;
  text-align: left;
  padding: 20px 18px 16px;
}
.mp-plan-modal-card > .mp-onboard-dismiss {
  z-index: 4;
  opacity: 0.82;
  pointer-events: auto;
}
.mp-plan-modal-card .mp-onboard-title {
  text-align: center;
  margin-bottom: 12px;
}
.mp-plan-modal-body { text-align: left; }
.mp-plan-modal-body .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.mp-plan-modal-body .field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, rgba(255,255,255,.55));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-plan-modal-body .field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-mode-toggle {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,.06);
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.plan-mode {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, rgba(255,255,255,.55));
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.plan-mode.active {
  background: linear-gradient(135deg, #ff2d7b 0%, #9b4dff 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255,45,123,.25);
}
.plan-mode-icon { font-size: 18px; }
.wtw-scope-toggle {
  margin: 8px 0 12px;
}
.wtw-scope-toggle .plan-mode {
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  min-height: 58px;
}
.wtw-scope-toggle .plan-mode-icon {
  line-height: 1;
  flex-shrink: 0;
}
.wtw-scope-label {
  display: block;
  line-height: 1.2;
  font-size: 12px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}
.wtw-scope-label-line {
  display: inline;
}
.site-wtw-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.site-wtw-mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.site-wtw-mode-row:hover {
  background: rgba(255, 255, 255, 0.07);
}
.site-wtw-mode-icon,
.site-wtw-mode-emoji {
  flex-shrink: 0;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}
.site-wtw-mode-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-wtw-mode-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.site-wtw-mode-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}
.site-wtw-mode-arrow {
  color: rgba(255, 255, 255, 0.35);
  font-size: 22px;
  flex-shrink: 0;
}
.search-relative { position: relative; }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.65;
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text-muted, rgba(255,255,255,.55));
  font-size: 14px;
  cursor: pointer;
}
.search-input,
.plan-modal-input,
.mp-plan-modal-body input[type="date"],
.mp-plan-modal-body input[type="time"] {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text-primary, #fff);
  outline: none;
}
.search-input { padding-left: 42px; padding-right: 40px; }
.search-input:focus,
.plan-modal-input:focus,
.mp-plan-modal-body input[type="date"]:focus,
.mp-plan-modal-body input[type="time"]:focus {
  border-color: rgba(255,45,123,.55);
}
.dt-row { display: flex; gap: 8px; margin-top: 6px; }
.dt-row .dt-date { flex: 2 1 auto; min-width: 0; }
.dt-row .dt-time { flex: 1 1 auto; min-width: 96px; }
.dt-row input[type="date"],
.dt-row input[type="time"] {
  color-scheme: dark;
  font-variant-numeric: tabular-nums;
}
.dt-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--text-muted, rgba(255,255,255,.72));
  font-size: 13px;
  cursor: pointer;
}
.chip:hover, .chip:active {
  background: rgba(255,45,123,.12);
  border-color: rgba(255,45,123,.45);
  color: #fff;
}
.chip-fav { border-color: rgba(255,184,0,.4); }
.selected-film {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,45,123,.1);
  border: 1px solid rgba(255,45,123,.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.selected-film-poster {
  width: 40px;
  height: 60px;
  border-radius: 6px;
  background: #222 center/cover no-repeat;
  flex-shrink: 0;
}
.selected-film-body { min-width: 0; flex: 1; }
.selected-film-title { font-size: 14px; font-weight: 600; }
.selected-film-meta { font-size: 12px; color: var(--text-muted, rgba(255,255,255,.55)); }
.picker-results {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.picker-result {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.picker-result:last-child { border-bottom: none; }
.picker-result:active { background: rgba(255,255,255,.06); }
.picker-result-title { font-size: 14px; font-weight: 500; }
.picker-result-meta { font-size: 12px; color: var(--text-muted, rgba(255,255,255,.55)); }
.picker-empty { padding: 12px 14px; color: var(--text-muted); font-size: 13px; text-align: center; }
.plan-voice-active-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,45,123,.08);
  border: 1px solid rgba(255,45,123,.25);
}
.plan-voice-active-panel.hidden { display: none !important; }
.plan-voice-active-head { display: flex; align-items: flex-start; gap: 10px; }
.plan-voice-active-pulse {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #ff2d7b;
  animation: plan-voice-pulse 1s ease-in-out infinite;
}
@keyframes plan-voice-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.92); }
}
.plan-voice-active-title { font-size: 14px; font-weight: 700; }
.plan-voice-active-sub { font-size: 12px; color: rgba(255,255,255,.75); margin: 4px 0 0; }
.plan-voice-active-panel.processing .plan-voice-active-pulse {
  animation: none;
  background: #9b4dff;
}
#mp-plan-voice-btn.recording {
  border-color: #e44;
  color: #f88;
}
.plan-pending-tickets { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.plan-pending-ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
}
.plan-pending-ticket-name {
  font-size: 13px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-pending-ticket-del {
  border: 0;
  background: transparent;
  color: #f66;
  font-size: 16px;
  cursor: pointer;
}
.ticket-upload-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.ticket-upload-row .ticket-upload-cam {
  flex-shrink: 0;
  width: 52px;
  padding-left: 0;
  padding-right: 0;
  font-size: 22px;
}
.mp-plan-modal-body .btn-full { width: 100%; }
.mp-plan-modal-body .muted.small { font-size: 12px; color: var(--text-muted, rgba(255,255,255,.55)); }
.plan-natural-preview-line b { color: #fff; }
.plan-nl-err { color: #f88; }
@media (min-width: 900px) {
  .mp-plan-modal-card { max-width: 480px; }
}

.plans-filter-tabs.hidden {
  display: none !important;
}
.plans-filter-tab.hidden {
  display: none !important;
}

/* ——— Plans empty hub + desktop plan cards ——— */
.plans-empty-hub-wrap,
.plans-empty-premieres {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 12px 36px;
  grid-column: 1 / -1;
}
.plans-empty-hub-hint {
  text-align: center;
  font-size: 16px;
  margin-bottom: 22px;
}
.plans-empty-hub {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 420px;
}
.plans-empty-hub-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 96px;
  min-width: 96px;
  max-width: 120px;
}
.plans-empty-hub-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
}
body.in-cabinet #section-plans .plans-empty-hub .home-emoji-btn {
  width: 72px;
  height: 72px;
  font-size: 34px;
}
body.in-cabinet #section-plans .home-emoji-btn--plan {
  width: 84px;
  height: 84px;
  font-size: 40px !important;
}
.home-emoji-btn--plan {
  background: linear-gradient(135deg, #7c3aed 0%, #ff2d7b 55%, #ff8c42 100%) !important;
  border: none !important;
  color: #fff !important;
  font-size: 42px !important;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.45) !important;
}
@media (min-width: 901px) {
  body.in-cabinet #section-plans .plans-empty-hub .home-emoji-btn {
    width: 88px;
    height: 88px;
    font-size: 38px;
  }
  body.in-cabinet #section-plans .home-emoji-btn--plan {
    width: 96px;
    height: 96px;
    font-size: 44px !important;
  }
  body.in-cabinet #section-plans .plans-filter-tabs {
    justify-content: center;
    margin-bottom: 20px;
  }
  body.in-cabinet #section-plans .plans-today-list.cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
  }
  body.in-cabinet #section-plans .plan-card.film-card-v2 {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  body.in-cabinet #section-plans .plan-card.film-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  }
}

/* ——— What to watch flip cards ——— */
body.in-cabinet #section-whattowatch > .cabinet-hint { display: none; }
.wtw-mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.wtw-flip-card {
  perspective: 1000px;
  min-height: 220px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
}
.wtw-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.wtw-flip-front,
.wtw-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  text-align: center;
  box-sizing: border-box;
}
.wtw-flip-back {
  transform: rotateY(180deg);
  justify-content: space-between;
  background: rgba(18, 18, 28, 0.96);
}
.wtw-flip-emoji { font-size: 42px; line-height: 1; margin-bottom: 12px; }
.wtw-flip-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.wtw-flip-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}
.wtw-flip-action {
  width: 100%;
  max-width: 180px;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 700;
}
@media (hover: hover) and (min-width: 901px) {
  .wtw-flip-card:hover .wtw-flip-inner,
  .wtw-flip-card.is-flipped .wtw-flip-inner {
    transform: rotateY(180deg);
  }
}
.wtw-flip-card.is-flipped .wtw-flip-inner { transform: rotateY(180deg); }

/* Unified pick result card */
.site-pick-result {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.site-pick-result-poster {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.site-pick-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-pick-poster-ph {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 42px;
  opacity: 0.35;
}
.site-pick-result-title {
  margin: 0 0 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.site-pick-year { opacity: 0.55; font-weight: 600; font-size: 0.82em; }
.site-pick-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.mp-genre-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 165, 0.35);
  background: rgba(255, 90, 165, 0.12);
  color: #ffb8da;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.mp-genre-pill--pick {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}
.mp-genre-pill--pick.mp-genre-pill--on {
  border-color: rgba(255, 90, 165, 0.55);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(255, 45, 123, 0.45));
  color: #fff;
}
.mp-rating-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 200, 60, 0.15);
  border: 1px solid rgba(255, 200, 60, 0.35);
  color: #ffd56a;
  font-size: 12px;
  font-weight: 800;
}
.site-pick-reco-blurb {
  margin: 0 0 8px;
  font-size: 13px;
  color: #5ec4d4;
  line-height: 1.4;
}
.site-pick-result-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}
.site-pick-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-pick-result-actions .btn {
  flex: 1 1 140px;
  min-height: 44px;
  justify-content: center;
  font-weight: 700;
}
.site-pick-loading,
.site-pick-empty {
  margin: 16px auto;
  max-width: 640px;
  text-align: center;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
}

/* WTW wizard overlay */
.wtw-wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 13050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wtw-wizard-overlay.hidden { display: none !important; }
.wtw-wizard-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.wtw-wizard-overlay-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 96vw);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #12121a;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
@media (min-width: 901px) {
  .wtw-wizard-overlay-panel.wtw-wizard-overlay-panel--result {
    width: min(920px, 96vw);
    max-height: min(92vh, 860px);
  }
  .wtw-wizard-overlay-panel--result .site-pick-result {
    max-width: none;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
    align-items: start;
  }
  .wtw-wizard-overlay-panel--result .site-pick-result-poster {
    position: sticky;
    top: 0;
  }
}
.wtw-wizard-overlay-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.wtw-wizard-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}
.wtw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.wtw-dot-on { background: linear-gradient(135deg, #7c3aed, #ff2d7b); }
.wtw-step-title {
  margin: 0 0 14px;
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.wtw-wizard-opt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.wtw-wizard-opt--on {
  border-color: rgba(255, 90, 165, 0.45);
  background: rgba(255, 90, 165, 0.1);
}
.wtw-wizard-opt-title { grid-column: 1; grid-row: 1; font-weight: 700; font-size: 14px; }
.wtw-wizard-opt-hint { grid-column: 1; grid-row: 2; font-size: 12px; color: rgba(255,255,255,0.55); }
.wtw-wizard-opt-check { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #ff5aa5; font-weight: 800; }
.wtw-wizard-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wtw-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.wtw-wizard-nav .btn { flex: 1; min-height: 44px; }

@media (max-width: 1100px) {
  .wtw-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wtw-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-pick-result { grid-template-columns: 1fr; }
  .site-pick-result-poster { max-width: 200px; margin: 0 auto; }
}
@media (min-width: 901px) {
  body.in-cabinet #section-whattowatch .section-title {
    text-align: center;
  }
  .wtw-flip-card { min-height: 260px; }
  .wtw-flip-inner { min-height: 260px; }
  .wtw-flip-emoji { font-size: 52px; }
  .wtw-flip-title { font-size: 15px; }
}

/* —— Phosphor icons + branded poster placeholder —— */
.mp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
}
.mp-icon i { font-size: 1em; line-height: 1; }
.mp-icon--xs i { font-size: 14px; }
.mp-icon--sm i { font-size: 16px; }
.mp-icon--md i { font-size: 20px; }
.mp-icon--lg i { font-size: 28px; }
.mp-icon--brand-blue { color: #4da3ff; }
.mp-icon--brand-red { color: #ff6b6b; }
.mp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mp-icon-btn .mp-icon,
.mp-icon-btn > i[class^="ph"] {
  font-size: 22px;
}
.cabinet-nav-btn-emoji .mp-icon i,
.section-title-emoji .mp-icon i {
  font-size: 18px;
}
.section-title-emoji .mp-icon {
  margin-right: 2px;
}
.settings-toggle-icon.mp-icon i,
.site-inbox-thumb--icon .mp-icon i {
  font-size: 22px;
}
.stat-card-icon .mp-icon i {
  font-size: 26px;
}
.home-pre-card-meta .mp-icon {
  margin-right: 4px;
  vertical-align: -2px;
}
.plan-date-line .mp-icon {
  margin-right: 4px;
  vertical-align: -2px;
}
button[data-mp-icon-inline="1"] > i[class^="ph"] {
  margin-right: 8px;
  font-size: 18px;
  vertical-align: -2px;
}
.mp-poster-placeholder,
img.mp-poster-placeholder,
.card-poster.mp-poster-placeholder {
  object-fit: cover;
  background: #120818;
}
.film-card-v2-poster .card-poster,
.home-dash-row-poster .card-poster,
.home-film-preview-poster img,
.home-poster-preview-pop-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-poster-tile,
.home-poster-tile-wrap > .home-poster-tile {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.site-search-poster,
.hs-result-poster {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #120818;
}
/* Полноразмерные постеры в grid «Скоро выходят» / «Рекомендации» — не сжимать до 48px */
.series-hub-discovery-grid .card-poster,
.series-hub-discovery-grid .film-card-v2-poster img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: initial;
}
.series-hub-grid-panel {
  margin-top: 16px;
}
.series-hub-grid-panel .cards-list {
  margin-top: 0;
}
.series-hub-library-panel .base-filter-toolbar {
  margin-bottom: 18px;
}
#section-series .base-filter-toolbar-scroll,
.series-hub-library-panel .base-filter-toolbar-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
}
#section-series .base-filter-chip,
.series-hub-library-panel .base-filter-chip {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 10px;
  max-width: none;
  flex: 1 1 0;
  min-width: 0;
}
#section-series .base-filter-chip--wide,
.series-hub-library-panel .base-filter-chip--wide {
  flex: 1.4 1 0;
}
#section-series .base-filter-chip-k,
.series-hub-library-panel .base-filter-chip-k {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
#section-series .base-filter-chip-native,
.series-hub-library-panel .base-filter-chip-native {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.series-hub-library-panel #series-hub-list.cards-list {
  margin-top: 4px;
}
.series-hub-discovery-card {
  cursor: pointer;
}
.plans-filter-tab .mp-icon {
  margin-right: 4px;
  vertical-align: -2px;
}
.ph-duotone.ph-shuffle { --ph-duotone-opacity: 0.35; }
.ph-duotone.ph-magic-wand { --ph-duotone-opacity: 0.35; }
.ph-duotone.ph-microphone { --ph-duotone-opacity: 0.35; }

/* Landing: карусель премьер (SEO-ссылки на /f/) */
.landing-premieres {
  margin: 36px 0 12px;
  padding: 0 4px;
}
.landing-premieres-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.landing-premieres-all {
  color: #c4b5fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.landing-premieres-all:hover { text-decoration: underline; }
.landing-premieres-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.landing-premieres-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  width: max-content;
}
.landing-pre-card {
  flex: 0 0 140px;
  width: 140px;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 20, 36, 0.92);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.landing-pre-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.45);
}
.landing-pre-card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #12151c;
  overflow: hidden;
}
.landing-pre-card-poster.premiere-poster-media > span[data-stop-card-click] {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  line-height: 0;
}
.landing-pre-card-poster img,
.landing-pre-card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.landing-pre-date {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
}
.landing-pre-card-body { padding: 8px 10px 10px; }
.landing-pre-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.landing-pre-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(170, 179, 210, 0.92);
}
.landing-series-vitrine {
  margin-top: 8px;
}
.landing-series-vitrine .landing-pre-card--series {
  border-color: rgba(129, 140, 248, 0.22);
}

/* Film user tags */
.film-hero-with-tag {
  position: relative;
}
.film-hero-tag-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 58px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 14, 24, 0.82);
  color: #f4f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.film-hero-tag-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 45, 123, 0.35);
}
.film-hero-tag-btn--tagged {
  border-color: rgba(255, 45, 123, 0.45);
  background: rgba(255, 45, 123, 0.14);
}
.film-hero-tag-ico {
  font-size: 24px;
  line-height: 1;
}
.mp-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f6ff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.film-tag-dialog-card {
  position: relative;
  padding: 20px 16px 16px;
  max-width: 440px;
}
.film-tag-dialog-card .mp-dialog-title {
  margin: 0 28px 6px 0;
  font-size: 20px;
  font-weight: 800;
}
.film-tag-pick-sub {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(244, 246, 255, 0.62);
}
.film-tag-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.film-tag-emoji-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.film-tag-emoji-btn--mini {
  width: 34px;
  height: 34px;
  font-size: 17px;
  border-radius: 8px;
}
.film-tag-emoji-btn.active {
  border-color: #ff2d7b;
  background: rgba(255, 45, 123, 0.18);
}
.film-tag-emoji-plus,
.film-tag-emoji-custom {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}
.film-tag-emoji-more {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 112px;
  overflow-y: auto;
  padding: 4px 2px 2px;
  margin-top: -2px;
}
.film-tag-emoji-more.hidden {
  display: none;
}
.film-tag-emoji-native {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.film-tag-name-field {
  display: block;
  margin-top: 14px;
}
.film-tag-name-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}
.film-tag-name-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.film-tag-name-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}
.film-tag-name-input:focus {
  border-color: rgba(255, 45, 123, 0.45);
  background: rgba(255, 255, 255, 0.08);
}
.film-tag-dialog-actions {
  margin-top: 16px;
}
.film-tag-dialog-actions--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.film-tag-btn-create {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.22);
}
.film-tag-btn-create--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
  color: #f4f6ff;
}
.film-tag-btn-create:disabled {
  opacity: 0.55;
  cursor: default;
}
.film-tag-pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 360px);
  overflow-y: auto;
}
.film-tag-pick-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4f6ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.film-tag-pick-item:hover,
.film-tag-pick-item:focus-visible {
  border-color: rgba(255, 45, 123, 0.35);
  background: rgba(255, 45, 123, 0.08);
}
.film-tag-pick-item--assigned {
  border-color: rgba(255, 45, 123, 0.55);
  background: rgba(255, 45, 123, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 123, 0.12);
}
.film-tag-pick-emoji {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}
.film-tag-pick-check {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.film-tag-pick-item--assigned .film-tag-pick-check {
  border-color: #ff2d7b;
  background: #ff2d7b;
  color: #fff;
}
.film-tag-pick-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.film-tag-pick-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.film-tag-pick-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.film-tag-pick-empty {
  padding: 12px 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  text-align: center;
}
.film-tag-btn-emoji {
  font-size: 26px;
  line-height: 1;
}
.film-tag-btn-count {
  font-size: 11px;
  font-weight: 800;
  color: #ff6ba8;
}
.film-icon-btn--tagged .film-hero-tag-ico,
.film-hero-tag-btn--tagged .film-hero-tag-ico {
  display: none;
}
.film-tag-view-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.film-tag-view-head .section-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.film-tag-view-meta {
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
  font-size: 13px;
  margin-bottom: 14px;
}
.film-tag-view-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 900px) {
  .film-tag-view-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

/* —— Коллекции (/features/collections) —— */
.base-tab--collections {
  margin-left: auto;
  border-color: rgba(124, 60, 255, 0.35);
  background: rgba(124, 60, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}
.base-tab--collections:hover {
  border-color: rgba(124, 60, 255, 0.55);
  background: rgba(124, 60, 255, 0.16);
}
@media (max-width: 560px) {
  .base-tabs .base-tab--collections {
    margin-left: 0;
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }
}
.collections-content {
  margin-top: 8px;
}
.collections-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.collections-intro {
  margin: 0 0 4px;
  line-height: 1.55;
}
.collections-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.collections-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.collections-block-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}
.collections-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 6px 10px;
  margin: -4px -6px -4px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ff5aa5;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.collections-link-btn:hover {
  color: #ff2d7b;
  background: rgba(255, 45, 123, 0.1);
}
.collections-link-btn-icon.mp-icon i {
  font-size: 15px;
}
.collections-list-host .settings-loading {
  padding: 12px 2px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}
.collections-empty-wrap {
  padding: 2px 0 4px;
}
.collections-empty-hint {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
}
.collections-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 90, 165, 0.35);
  background: rgba(255, 45, 123, 0.08);
  color: #ff5aa5;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.collections-action-btn:hover {
  background: rgba(255, 45, 123, 0.14);
  border-color: rgba(255, 90, 165, 0.55);
  color: #ff2d7b;
}
.collections-action-btn-icon.mp-icon i {
  font-size: 16px;
}
.mp-list.collections-list {
  margin: 0;
}
.collections-list-item {
  min-height: 58px;
}
.collections-list-item .mp-list-icon {
  flex-shrink: 0;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
}
.collections-list-item .mp-list-icon--public {
  color: #7cb8ff;
}
.collections-list-item .mp-list-title {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.collections-guest {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0 12px;
}
.collections-page--detail .collections-detail-head {
  margin-top: 4px;
}
.collections-detail-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(17px, 4vw, 20px);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.collections-detail-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.collections-films-grid {
  margin: 12px 0 16px;
}
.collections-delete-btn {
  margin-top: 8px;
}
.collections-dialog-card .mp-dialog-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
}
.collections-dialog-card {
  text-align: left;
}
.collections-seo-title {
  margin-bottom: 12px;
}
.landing-feature-promo {
  padding: 28px 20px 32px;
  margin: 0 auto 24px;
  max-width: 720px;
}
.landing-feature-promo-inner {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 22px;
  background: linear-gradient(145deg, rgba(124, 60, 255, 0.12), rgba(255, 45, 123, 0.08));
}
.landing-feature-promo-title {
  margin: 0 0 12px;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.landing-feature-promo-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}
.landing-feature-promo-text--muted {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}
.landing-feature-promo-text--muted a {
  color: #ff5aa5;
  text-decoration: none;
}
.landing-feature-promo-text--muted a:hover { text-decoration: underline; }
.landing-feature-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.landing-feature-promo.collections-landing-promo {
  margin: 0 0 28px;
  padding: 28px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.18), rgba(255, 45, 123, 0.12));
}
@media (min-width: 640px) {
  .collections-films-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .collections-page {
    gap: 24px;
  }
  .collections-block-head {
    margin-bottom: 10px;
  }
  .collections-films-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Film/staff routes: tighter header → nav gap on desktop/tablet */
@media (min-width: 1024px) {
  body.in-cabinet #cabinet-readonly.cabinet.film-page-mode {
    padding-top: 12px;
  }
  body.in-cabinet #cabinet-readonly.cabinet.film-page-mode > .container > .cabinet-nav {
    margin-top: -4px;
    margin-bottom: 10px;
  }
  body.film-standalone-page .page-shell > #site-header,
  body.staff-standalone-page .page-shell > #site-header,
  body.user-standalone-page .page-shell > #site-header {
    margin-bottom: 10px;
  }
  body.film-standalone-page .film-standalone-nav,
  body.staff-standalone-page .film-standalone-nav,
  body.user-standalone-page .film-standalone-nav,
  body.landing-root-page #landing-root-nav {
    margin-bottom: 0 !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

/* Film toolbar: fit plan button, icons and friends block on narrow phones */
@media (max-width: 480px) {
  #film-page-content,
  #film-page-content > section.hero,
  #film-page-content .hero-content,
  #section-film .hero-content,
  main.film-page .hero-content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #film-page-content > section.hero,
  #section-film .hero,
  main.film-page .hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  #film-page-content .film-page-toolbar,
  #section-film .film-page-toolbar,
  main.film-page .film-page-toolbar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 10px;
    gap: 8px;
    box-sizing: border-box;
  }

  #film-page-content .film-toolbar-plan-wrap,
  #section-film .film-toolbar-plan-wrap,
  main.film-page .film-toolbar-plan-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  #film-page-content .film-toolbar-plan-wrap .action-dropdown,
  #section-film .film-toolbar-plan-wrap .action-dropdown,
  main.film-page .film-toolbar-plan-wrap .action-dropdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #film-page-content .film-toolbar-plan,
  #film-page-content .film-toolbar-plan-wrap .action-dropdown-btn,
  #film-page-content .film-toolbar-plan-wrap > button,
  #section-film .film-toolbar-plan,
  #section-film .film-toolbar-plan-wrap .action-dropdown-btn,
  #section-film .film-toolbar-plan-wrap > button,
  main.film-page .film-toolbar-plan,
  main.film-page .film-toolbar-plan-wrap .action-dropdown-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 800;
    min-height: 46px;
    gap: 6px;
    box-shadow: 0 8px 22px rgba(236, 72, 153, 0.22);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #film-page-content .film-toolbar-plan .film-icon-ico,
  #section-film .film-toolbar-plan .film-icon-ico {
    flex-shrink: 0;
    font-size: 16px;
  }

  #film-page-content .film-toolbar-icons,
  #section-film .film-toolbar-icons,
  main.film-page .film-toolbar-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #film-page-content .film-icon-btn,
  #section-film .film-icon-btn,
  main.film-page .film-icon-btn,
  #film-page-content .film-icon-btn:hover,
  #film-page-content .film-icon-btn:focus-visible,
  #film-page-content .film-icon-btn.is-active,
  #film-page-content .film-icon-btn--watched.on,
  #section-film .film-icon-btn:hover,
  #section-film .film-icon-btn:focus-visible,
  #section-film .film-icon-btn.is-active,
  #section-film .film-icon-btn--watched.on,
  main.film-page .film-icon-btn:hover,
  main.film-page .film-icon-btn:focus-visible,
  main.film-page .film-icon-btn.is-active {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex: 0 0 42px;
    height: 42px;
    padding: 0 !important;
    font-size: 16px;
    border-radius: 12px;
    box-sizing: border-box;
  }

  #film-page-content .film-icon-btn .film-icon-label,
  #section-film .film-icon-btn .film-icon-label,
  main.film-page .film-icon-btn .film-icon-label {
    display: none !important;
  }

  #film-page-content .film-toolbar-friends-wrap,
  #section-film .film-toolbar-friends-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #film-page-content #film-friends-social-block,
  #section-film #film-friends-social-block,
  #film-friends-social-block {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #film-page-content #film-friends-social-block > section,
  #section-film #film-friends-social-block > section,
  #film-friends-social-block > section.film-friends-social,
  #film-friends-social-block .film-friends-social {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
  }

  #film-friends-social-block .film-friends-social-list {
    flex-wrap: wrap;
    gap: 6px;
  }

  #film-friends-social-block .film-friend-rating-chip {
    max-width: 100%;
  }

  #film-friends-social-block .film-friend-rating-name {
    max-width: min(120px, 42vw);
  }
}

/* legacy narrow breakpoint — keep in sync */
@media (max-width: 400px) {
  #section-film .film-page-toolbar,
  main.film-page .film-page-toolbar {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}

.footer-apps-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 768px) {
  body.header-search-dropdown-open #site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
    z-index: 500 !important;
  }

  body.header-search-dropdown-open.landing-root-page .content-wrapper,
  body.header-search-dropdown-open.film-standalone-page .page-shell {
    padding-top: var(--header-pinned-h, 140px);
  }

  body.header-search-dropdown-open .header-search-dropdown:not(.hidden) {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    bottom: auto !important;
    max-height: var(--header-search-dd-max-h, min(60vh, 420px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    z-index: 502 !important;
  }

  body.header-search-dropdown-open .header-search-dropdown:not(.hidden) .hs-hub-foot {
    padding-bottom: 16px;
    scroll-margin-bottom: 24px;
  }

  body.header-search-dropdown-open .header-search-dropdown:not(.hidden) .hs-hub {
    padding-bottom: 8px;
  }

  body.in-cabinet #cabinet-readonly.cabinet.film-page-mode {
    padding-bottom: 12px;
  }

  body.in-cabinet.film-page-mode #cabinet-readonly + footer.footer {
    margin-top: 20px;
    padding-top: 20px;
  }

  #section-film.film-page {
    padding-bottom: 8px;
  }
}

/* Landing: carousel, centered sections, cinematic accents */
.landing-section-title--center {
  text-align: center !important;
}

.landing-feats-carousel {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-feats-viewport {
  overflow: hidden;
  min-width: 0;
}

.landing-feats-arrow {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 214, 122, 0.22);
  background: rgba(255, 214, 122, 0.06);
  color: #ffd67a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.landing-feats-arrow:hover {
  background: rgba(255, 214, 122, 0.12);
  border-color: rgba(255, 214, 122, 0.38);
}

.landing-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(255, 214, 122, 0.08);
  border: 1px solid rgba(255, 214, 122, 0.18);
  color: #ffd67a;
  font-size: 28px;
}

.landing-feat-icon i[class^="ph"] {
  font-size: 28px;
}

.landing-feat-card h3 {
  margin-bottom: 8px;
}

.landing-feat-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.landing-tv-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.landing-tv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffd67a;
  font-weight: 600;
  white-space: nowrap;
}

.landing-step-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.landing-step-emoji {
  color: #ffd67a;
  font-size: 1.15em;
  flex-shrink: 0;
  line-height: 1;
}

.landing-step-emoji i {
  font-size: 1em;
}

.landing-steps--center,
.landing-steps--center .step {
  text-align: center;
}

.landing-steps--center {
  gap: 0;
  margin: 24px auto;
}

.landing-steps--center .step {
  padding: 14px 8px;
}

.landing-steps--center .step-number {
  margin-bottom: 8px;
}

.landing-steps--center .step h3 {
  margin-bottom: 6px;
}

.landing-steps--center .step p {
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.45;
}

@media (min-width: 769px) {
  .landing-feats-arrow {
    display: none;
  }

  .landing-feats-carousel {
    grid-template-columns: 1fr;
  }

  .landing-feats-viewport {
    overflow: visible;
  }

  .landing-feats-track {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
  }

  .landing-feat-card {
    text-align: center;
    padding: 28px 22px;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(28, 24, 20, 0.55) 0%, rgba(14, 13, 18, 0.92) 100%);
    border: 1px solid rgba(255, 214, 122, 0.12);
  }
}

/* Landing mobile polish */
@media (max-width: 768px) {
  body.landing-root-page {
    background: #0c0c12;
  }

  body.landing-root-page .content-wrapper {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  body.landing-root-page footer.footer {
    margin-bottom: 0;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  body.landing-root-page footer.footer .footer-bottom {
    padding-bottom: 8px;
  }

  /* Шапка: отступ от края + прячется при скролле вниз */
  body.landing-root-page #site-header,
  body.landing-root-page.film-standalone-page #site-header,
  body.landing-root-page.film-standalone-page header#site-header {
    top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    background: #0c0c12 !important;
    padding-top: max(20px, calc(env(safe-area-inset-top, 0px) + 12px)) !important;
    padding-bottom: 12px !important;
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  body.header-search-input-focused #site-header,
  body.header-search-dropdown-open #site-header {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.landing-root-page .header-search .header-search-input,
  body.header-search-input-focused .header-search .header-search-input {
    background: #1a1a22 !important;
    border-radius: 8px !important;
  }

  body.landing-root-page .header-search {
    border-radius: 8px !important;
  }

  body.landing-root-page #landing-root-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: stretch;
    align-items: stretch;
    padding-left: 8px;
    padding-right: 8px;
  }

  body.landing-root-page #landing-root-nav .cabinet-nav-btn {
    flex: unset !important;
    width: 100%;
    min-width: 0;
    padding: 4px 0;
    min-height: 44px;
  }

  body.landing-root-page #landing-root-nav .cabinet-nav-btn-text {
    display: block;
    width: 100%;
    white-space: nowrap;
    text-align: center;
    font-size: 10px;
    letter-spacing: -0.01em;
  }

  body.landing-root-page #landing {
    padding: 8px 16px 40px;
    text-align: left;
  }

  body.landing-root-page #landing > section {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 8px;
  }

  body.landing-root-page .hero-label,
  body.landing-root-page .hero-title,
  body.landing-root-page .hero-subtitle {
    text-align: left;
  }

  body.landing-root-page .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.75rem);
    line-height: 1.12;
  }

  body.landing-root-page .hero-subtitle {
    font-size: 16px;
    line-height: 1.45;
    max-width: none;
  }

  body.landing-root-page .hero-buttons {
    justify-content: flex-start;
    gap: 10px;
  }

  body.landing-root-page .hero-buttons .btn-primary,
  body.landing-root-page .hero-buttons .btn-secondary {
    border-radius: 8px;
    min-height: 44px;
    height: auto;
    padding: 10px 16px;
    font-size: 14px;
  }

  body.landing-root-page .hero-buttons .btn-primary {
    background: #fff;
    color: #09090b;
    box-shadow: none;
  }

  body.landing-root-page .hero-buttons .btn-secondary {
    background-image: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #eeeef0;
  }

  body.landing-root-page .what-is-v2,
  body.landing-root-page .mp-seo-intents-inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 24px 18px;
    margin: 20px 0;
    max-width: none;
    text-align: center;
  }

  body.landing-root-page .what-is-v2-label,
  body.landing-root-page .what-is-v2-title,
  body.landing-root-page .what-is-v2-text {
    text-align: center;
  }

  body.landing-root-page .what-is-v2-title {
    font-size: clamp(1.25rem, 5.2vw, 1.65rem);
    line-height: 1.22;
  }

  body.landing-root-page .what-is-v2-text {
    max-width: none;
    font-size: 15px;
    line-height: 1.55;
  }

  body.landing-root-page .what-is-v2-features,
  body.landing-root-page .mp-seo-intents-links {
    justify-content: center;
  }

  body.landing-root-page .landing-features-section,
  body.landing-root-page .landing-how-section,
  body.landing-root-page .landing-tv-section {
    text-align: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  body.landing-root-page .landing-section-title--center {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
    margin-bottom: 16px;
  }

  /* Карусель возможностей */
  body.landing-root-page .landing-feats-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.landing-root-page .landing-feats-viewport::-webkit-scrollbar {
    display: none;
  }

  body.landing-root-page .landing-feats-track {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0;
    border: 0;
    grid-template-columns: unset !important;
  }

  body.landing-root-page .landing-feat-card {
    flex: 0 0 calc(100% - 4px);
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    text-align: center;
    padding: 24px 18px 20px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(36, 30, 22, 0.65) 0%, rgba(14, 13, 18, 0.96) 100%);
    border: 1px solid rgba(255, 214, 122, 0.14);
    min-height: 0;
  }

  body.landing-root-page .landing-feat-card::before {
    display: none;
  }

  body.landing-root-page .landing-feat-card h3 {
    font-size: 17px;
    justify-content: center;
  }

  body.landing-root-page .landing-steps--center {
    max-width: 100%;
    margin: 12px auto 0;
  }

  body.landing-root-page .landing-steps--center .step {
    padding: 12px 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.landing-root-page .landing-steps--center .step-number {
    font-size: 1.45rem;
    color: rgba(255, 214, 122, 0.35);
    margin-bottom: 4px;
  }

  body.landing-root-page .landing-steps--center .step h3 {
    margin-bottom: 4px;
    font-size: 16px;
  }

  body.landing-root-page .landing-steps--center .step p {
    font-size: 14px;
    line-height: 1.4;
  }

  body.landing-root-page .landing-tv-lead {
    padding: 0 4px;
  }

  body.landing-root-page .landing-articles-section {
    text-align: left;
  }

  body.landing-root-page .landing-articles-section > .section-title {
    text-align: left !important;
    margin-bottom: 16px;
  }

  body.landing-root-page .landing-articles-section .articles-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 16px 0 12px;
  }

  body.landing-root-page .article-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding: 14px 0;
    text-align: left;
    background: transparent;
  }

  body.landing-root-page .article-card-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: start;
    font-size: 22px;
    margin: 0;
    width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
  }

  body.landing-root-page .article-card-title {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  body.landing-root-page .article-card-desc {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  body.landing-root-page .cta-section {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 28px 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
  }

  body.landing-root-page .cta-section .section-title,
  body.landing-root-page .cta-section .cta-subtitle,
  body.landing-root-page .cta-section .hero-buttons {
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  #site-header .header-content {
    background: #0c0c12 !important;
  }

  .header-search-mic {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }

  .header-search .header-search-input {
    background: #1a1a22 !important;
    border-radius: 10px !important;
  }

  .header-search {
    border-radius: 10px !important;
  }
}

/* —— Site cabinet: подбор «По эмоции» (/whattowatch) —— */
.site-emotion-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 920px;
  margin: 12px auto 0;
  min-height: min(560px, calc(100vh - 220px));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 45, 123, 0.06) 0%, rgba(18, 18, 26, 0.98) 28%);
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}
.site-emotion-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}
.site-emotion-toolbar-title {
  flex: 1;
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.site-emotion-chat {
  flex: 1;
  min-height: 200px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-emotion-msg {
  display: flex;
  max-width: 88%;
}
.site-emotion-msg--assist { align-self: flex-start; }
.site-emotion-msg--user { align-self: flex-end; }
.site-emotion-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.site-emotion-msg--assist .site-emotion-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
}
.site-emotion-msg--user .site-emotion-bubble {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.75), rgba(255, 45, 123, 0.65));
  border-bottom-right-radius: 4px;
  color: #fff;
}
.site-emotion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}
.site-emotion-chip {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 165, 0.35);
  background: rgba(255, 90, 165, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.12s ease;
}
.site-emotion-chip:hover {
  background: rgba(255, 90, 165, 0.22);
  transform: translateY(-1px);
}
.site-emotion-composer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}
.site-emotion-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.site-emotion-hint {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.site-emotion-hint:hover {
  border-color: rgba(255, 90, 165, 0.45);
  background: rgba(255, 90, 165, 0.08);
}
.site-emotion-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-emotion-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.site-emotion-input:focus {
  border-color: rgba(255, 90, 165, 0.5);
}
.site-emotion-mic,
.site-emotion-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.site-emotion-mic {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.site-emotion-mic.recording {
  background: rgba(255, 45, 123, 0.35);
  animation: mp-pulse 1.2s ease infinite;
}
.site-emotion-send {
  background: linear-gradient(135deg, #7c3aed, #ff2d7b);
  color: #fff;
  font-weight: 800;
}
.site-emotion-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}
.site-emotion-film-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.site-emotion-film-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 90, 165, 0.35);
}
.site-emotion-film-poster {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.site-emotion-film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-emotion-film-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.site-emotion-film-meta,
.site-emotion-desc {
  margin: 0 0 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}
.site-emotion-rating {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #ffd166;
  margin-bottom: 4px;
}
.site-emotion-reason {
  margin: 0 0 4px;
  font-size: 12px;
  color: rgba(255, 184, 218, 0.92);
  line-height: 1.35;
}
.site-emotion-footer {
  padding: 0 16px 16px;
}
.site-emotion-footer .btn {
  width: 100%;
  min-height: 44px;
}

@media (min-width: 901px) {
  body.in-cabinet #section-whattowatch .site-emotion-panel {
    min-height: 580px;
    max-width: min(840px, 92vw);
  }
  body.in-cabinet #section-whattowatch .site-emotion-chat {
    max-height: min(56vh, 520px);
    padding: 20px 24px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-bubble {
    font-size: 15px;
    padding: 12px 16px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-film-card {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 14px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-composer {
    padding: 14px 20px 20px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-input {
    font-size: 16px;
    padding: 13px 16px;
  }
  body.in-cabinet #section-whattowatch .site-emotion-toolbar-title {
    font-size: 18px;
  }
  body.in-cabinet #section-whattowatch .site-wtw-mode-row {
    padding: 16px 18px;
  }
  body.in-cabinet #section-whattowatch .whattowatch-content {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1200px) {
  body.in-cabinet #section-whattowatch .site-emotion-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
