/* Compatibility with app.js */
.hidden { display: none !important; }
#landing.hidden, #cabinet-readonly.hidden, #cabinet-onboarding.hidden, #public-stats.hidden { display: none !important; }
#login-modal { display: none; }
#login-modal:not(.hidden) { display: flex !important; }
.cabinet-section.hidden { display: none !important; }

/* Header search: shared by landing and cabinet */
.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);
}
.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 0 16px;
}
.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));
}

.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-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;
}

.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; }
.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-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-privacy { margin-top: 12px; }
.login-register-switch {
  margin-top: 14px;
  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; }
.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: var(--text-muted); 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;
}

.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: 10;
  backdrop-filter: blur(10px);
  background: rgba(9, 9, 11, 0.7);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
}

.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;
}


.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: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.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: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
}
.what-is-v2::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 200px;
  background: radial-gradient(ellipse, rgba(155, 77, 255, 0.08) 0%, transparent 70%);
  pointer-events: 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-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.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;
  justify-content: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.what-is-v2-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}
.what-is-v2-feature:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}
.what-is-v2-feature .feat-icon { font-size: 18px; }
@media (max-width: 768px) {
  .what-is-v2 { padding: 40px 24px; margin: 40px auto; }
  .what-is-v2-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    max-width: 100%;
  }
  .what-is-v2-feature {
    font-size: 12px;
    padding: 6px 12px;
  }
}
/* 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: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.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;
  background: linear-gradient(135deg, #ff2d7b, #9b4dff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  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;
}

.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-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.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: rgba(255, 255, 255, 0.18);
}

.login-oauth-yandex:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: rgba(255, 255, 255, 0.28);
}

.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: none;
}
.login-oauth-img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.login-oauth-img--yandex {
  border-radius: 50%;
  background: transparent;
}
.login-oauth-telegram {
  background: #229ed9;
  border-color: #229ed9;
  overflow: hidden;
}

.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.38;
}

.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;
  margin: 4px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 45, 123, 0.1);
  border: 1px solid rgba(255, 45, 123, 0.28);
  color: #ff9ac3;
  font-size: 12.5px;
  line-height: 1.35;
}
.login-privacy-hint.is-visible {
  display: block;
}

.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;
  }

  .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; }
.article-content h1 { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.article-content .date { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.article-content h2 { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.article-content p, .article-content li { margin-bottom: 12px; line-height: 1.7; color: var(--text-muted); }
.article-content ul, .article-content ol { margin-bottom: 20px; padding-left: 24px; }
.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; }
.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 { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 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); }

/* 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 {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.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: flex-start; 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(840px, 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;
}
@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;
}
#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: center; justify-content: space-between; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.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: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-profile-caret { opacity: 0.6; font-size: 11px; }
.cabinet-profile-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 500; min-width: 280px; 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); }
.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; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 4px; }

.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(180px, 1fr)); }
}
.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.12s;
  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-bell--overlay {
  position: absolute !important;
  right: 5px;
  bottom: 5px;
  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 { 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: 70vh;
  overflow-y: auto;
  z-index: 100;
  padding: 6px;
}
.header-search-loading,
.header-search-empty { padding: 14px; font-size: 14px; color: var(--text-muted, #aaa); text-align: center; }
.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; }
@media (min-width: 1100px) {
  /* Десктоп-меню: одна горизонтальная линия как раньше */
  .cabinet .cabinet-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    align-items: center;
    padding-bottom: 4px;
  }
  .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-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-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #aaa);
  margin-bottom: 8px;
}
.site-inbox-title { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.35; }
.site-inbox-body { margin-top: 8px; font-size: 14px; line-height: 1.45; opacity: 0.9; }
.site-inbox-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.site-inbox-time { margin-top: 10px; font-size: 12px; }

.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 в углу,
   две кнопки-дропдаун (Запланировать / Смотреть)
   ===================================================================== */

.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: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;
}
.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 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.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: 30;
  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;
}
.header-settings-btn:hover { opacity: 0.85; background: transparent; }
.header-settings-dropdown { min-width: 260px; max-width: 92vw; }
.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;
  }
}

/* —— Главная кабинета, модалка конструктора, Шазам —— */
.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; }

/* Список строк */
.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] {
  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);
}

/* Пустое состояние */
.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;
}
.shazam-page-back-wrap {
  margin-bottom: 8px;
}
.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;
}
.home-shazam-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.home-shazam-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.3);
}
.home-shazam-poster--empty {
  aspect-ratio: 2 / 3;
}
.home-shazam-card-body {
  padding: 10px;
}
.home-shazam-card-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}
.home-shazam-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.home-shazam-tg-wrap {
  margin-top: 12px;
  font-size: 13px;
}
.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;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Cabinet hardening: standalone web UX ===== */
.cabinet a[href] {
  color: #9fd6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cabinet a[href]:hover { color: #d8efff; }
/* Глобальный section-стиль landing не должен сжимать секции кабинета */
.cabinet .cabinet-section {
  max-width: none;
  margin: 0 0 20px;
  padding: 0;
}

/* Карточки главной — сбросить 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: 900px) {
  #section-home .home-dashboard-root {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    align-items: start;
    width: 100%;
    min-width: 0;
  }
  #section-home .home-dashboard-root .home-dash-block {
    min-width: 0;
    overflow: visible;
  }
  #section-home .home-dashboard-root .home-dash-rows {
    overflow: visible;
  }
  #section-home .home-dash-row--premiere {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* 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);
}

/* ── 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: hide duplicate topbar/nav */
.cabinet.film-page-mode .cabinet-topbar,
.cabinet.film-page-mode .cabinet-nav {
  display: none !important;
}
/* Cabinet topbar only on home section */
#cabinet-readonly:not(.cabinet-home-root) .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 {
  max-width: 1180px;
  margin: 0 auto clamp(16px, 2vw, 24px);
}
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;
}
#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;
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: end;
  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 {
  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;
  background-repeat: no-repeat;
  opacity: .92;
}
.film-hero::after,
#section-film .hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(7,7,17,.9));
  pointer-events: none;
}
#section-film .hero-content {
  min-width: 0;
  overflow: hidden;
}
.film-hero-poster-wrap,
.film-hero-main,
#section-film .poster-wrap,
#section-film .hero-content {
  position: relative;
  z-index: 1;
}
.film-hero-poster,
#section-film .poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: cover;
  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;
}
.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 {
  margin: 16px 0 0;
  max-width: 760px;
  color: rgba(244,246,255,.78);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.6;
  white-space: pre-wrap;
}
.film-hero-crew,
.film-modal-crew {
  margin-top: 10px;
  max-width: 760px;
  color: rgba(244,246,255,.76);
  font-size: 14px;
  line-height: 1.4;
}
.film-cast-row { margin-top: 4px; }
.film-cast-row:first-child { margin-top: 0; }
.film-cast-label {
  color: #fff;
  font-weight: 800;
}
.film-cast-sep { opacity: .55; }
.film-hero-crew b,
.film-modal-crew b {
  color: #fff;
}
.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: static;
  top: auto;
  z-index: auto;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}
.film-toolbar-plan-wrap {
  display: flex;
  justify-content: center;
}
.film-toolbar-plan-wrap .action-dropdown {
  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;
}
.film-toolbar-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.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--rated .film-icon-ico {
  font-size: 18px;
  font-weight: 900;
  font-family: Unbounded, Inter, sans-serif;
}
.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;
}
.film-toolbar-expand.hidden {
  display: none !important;
}
.film-toolbar-rating-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.film-toolbar-rating-grid .rate-btn,
.film-toolbar-rating-grid .rating-stars button {
  min-width: 44px;
  min-height: 44px;
}
.film-toolbar-facts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: rgba(244,246,255,.74);
  font-size: 14px;
  line-height: 1.5;
}
.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 without scroll */
@media (min-width: 1100px) 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: end;
  }
  #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%;
  }
  .film-icon-btn:hover,
  .film-icon-btn:focus-visible {
    width: 58px;
    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(236,72,153,.62) !important;
  box-shadow: 0 0 0 4px rgba(236,72,153,.12) !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; }
.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-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-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;
}
.site-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.site-search-filter,
.site-search-year,
.site-search-genre {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
}
.site-search-filter.active {
  border-color: rgba(236,72,153,.62);
  background: rgba(236,72,153,.18);
}
.site-search-year { width: 112px; }
.site-search-genre { width: 150px; }
.site-search-status {
  min-height: 20px;
  color: rgba(244,246,255,.62);
  font-size: 14px;
}
.site-search-results {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.site-search-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-decoration: none;
}
.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: 14px;
  object-fit: cover;
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: rgba(255,255,255,.52);
}
.site-search-card-title {
  font-weight: 900;
  line-height: 1.2;
}
.site-search-card-meta {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(244,246,255,.58);
  font-size: 13px;
}
@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(2, minmax(0, 1fr)); }
  .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: flex-start; 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; }
.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: 6px 0 0; font-size: 15px; }
.staff-hero-meta { color: rgba(244,246,255,.5); margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.staff-loading { padding: 24px 0; color: rgba(244,246,255,.55); }
.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-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));
}
@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: block; min-width: 0; width: 100%;
}
.staff-film-card:hover .staff-film-poster { transform: scale(0.98); }
.staff-film-media { position: relative; }
.staff-film-poster {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px;
  background: rgba(255,255,255,.08); display: block; transition: transform .12s ease;
}
.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; }
.staff-film-year { font-size: 11px; color: rgba(244,246,255,.55); margin-top: 2px; }
.staff-empty-role { margin: 0; }
.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:
    radial-gradient(900px 620px at 20% -10%, rgba(168,85,247,.22), transparent 60%),
    radial-gradient(760px 520px at 84% 4%, rgba(236,72,153,.16), transparent 58%),
    #070711;
  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: 1fr minmax(280px, 560px) 1fr;
      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: end;
      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: hidden;
    }
    .poster {
      width: 100%;
      aspect-ratio: 2 / 3;
      border-radius: 24px;
      object-fit: cover;
      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;
    }
    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: 16px 0 0;
      max-width: 760px;
      color: rgba(244,246,255,.78);
      font-size: clamp(16px, 1.7vw, 20px);
      line-height: 1.6;
    }
    .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: hidden;
    }
    .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;
      color: rgba(244,246,255,.78);
      font-size: 13.5px;
      line-height: 1.4;
    }
    .film-cast-row { margin-top: 4px; }
    .film-cast-row:first-child { margin-top: 0; }
    .film-cast-label { color: #fff; font-weight: 800; }
    .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: end;
      }
      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(42px, 1fr));
      gap: 8px;
      margin-top: 0;
      max-width: 620px;
    }
    .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 (max-width: 860px) {
      body.film-standalone-page .page-shell,
      body.staff-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 { margin-top: 10px; }
      body.film-standalone-page #site-header,
      body.staff-standalone-page #site-header { top: 8px; margin-bottom: 12px; }
      body.film-standalone-page .app-open-banner { margin-bottom: 10px; }
      body.film-standalone-page .header-content,
      body.staff-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 { grid-area: logo; }
      body.film-standalone-page .header-buttons,
      body.staff-standalone-page .header-buttons { grid-area: login; }
      body.film-standalone-page .header-search,
      body.staff-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(5, minmax(0, 1fr)); }
      .rate-btn { min-width: 0; }
      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) .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:not(.film-standalone-page) .header-search {
    order: 3;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

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

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

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

  body:not(.in-cabinet) 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: normal;
    flex-shrink: 1;
  }

  .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;
  }

  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-row,
button.home-tourn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  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-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-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tourn-score {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent, #ff2d7b);
}
.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);
}
.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-x: clip;
}

body:not(.film-standalone-page):not(.staff-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) .header-buttons,
body:not(.film-standalone-page):not(.staff-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;
  }
}
