/*
 * BRB.INK — мобильная версия (6.12.005).
 * Подключается в base.html.twig с media="(max-width: 760px)": на компьютере эти правила не действуют.
 * Светлая тема: белый фон, крупный системный шрифт, скруглённые постеры и плитки, жёлтый акцент,
 * нижняя панель «Главная · Каталог · Избранное · Профиль».
 * Элементы только для телефона помечены .m-only (в app.css скрыты), только для компьютера — .d-only.
 */
:root {
  --page-bg: #fff;
  --card-bg: #fff;
  --text: #111827;
  --muted: #6b7280;
  --link: #8a5a00;
  --link-poster: #111827;
  --title: #111827;
  --line: #e5e7eb;
  --panel: #f3f4f6;
  --panel-blue: #f3f4f6;
  --yellow: #fbbf24;
  --accent: #d49a06;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.m-only { display: revert; }
.d-only { display: none !important; }

html, body { background: #fff; }
body {
  color: var(--text); font-size: 16px; line-height: 1.45;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
.page { padding: 0; }

/* ---------- Шапка ---------- */
.header {
  flex-wrap: wrap; align-items: center; gap: 0; height: auto;
  padding: 14px 16px 0; background: #fff; border-radius: 0;
}
.header__logo { margin: 0; }
.header__logo img { display: none; }
.mlogo { display: inline; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.5px; color: #1f2937; }
.mlogo span { color: var(--accent); }
.mhead { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.mhead__btn {
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mhead__btn svg { width: 26px; height: 26px; fill: none; stroke: #111; stroke-width: 2; stroke-linecap: round; }
.mhead__avatar {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--yellow); color: #111; font-size: 20px; font-weight: 600;
}
.mhead__avatar:hover { text-decoration: none; }
.mhead__avatar svg { width: 24px; height: 24px; fill: none; stroke: #111; stroke-width: 2; }
#m-search:checked ~ .mhead label[for="m-search"],
#m-menu:checked ~ .mhead label[for="m-menu"] { background: var(--panel); }
.header__user, .header__icon-link { display: none !important; }

/* разделы — вкладки под логотипом, прокручиваются вбок */
.header__menu {
  order: 10; width: 100%; height: auto; gap: 22px; margin-top: 10px;
  border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.header__menu-link {
  height: auto; line-height: 1.3; padding: 10px 0 12px; font-size: 17px; color: var(--muted);
}
.header__menu-link:hover, .header__menu-link.is-active { background: none; color: #111; }
.header__menu-link.is-active { font-weight: 700; box-shadow: inset 0 -2px 0 #111; }

/* поиск открывается по кнопке-лупе */
.header__search { display: none; order: 5; flex: 1 1 100%; max-width: none; margin: 12px 0 0; }
#m-search:checked ~ .header__search { display: block; }
.header__search-input { height: 46px; padding: 0 14px 0 42px; border-radius: 14px; background: var(--panel); font-size: 16px; }
.header__search-icon { left: 14px; top: 15px; width: 17px; height: 17px; fill: #6b7280; }
.suggest { top: 52px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.suggest__item { padding: 10px 12px; }
.suggest__poster { border-radius: 6px; }
.suggest__text b { color: #111; }

/* меню-«гамбургер» */
.mmenu { display: none; order: 6; flex: 1 1 100%; margin-top: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
#m-menu:checked ~ .mmenu { display: block; }
.mmenu a { display: block; padding: 12px 2px; font-size: 17px; color: #111; border-bottom: 1px solid var(--line); }
.mmenu a:last-child { border-bottom: 0; }
.mmenu a:hover { text-decoration: none; }
.mmenu__logout { color: var(--muted) !important; }

/* ---------- Нижняя панель ---------- */
.mnav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mnav__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0; font-size: 12px; color: #4b5563; -webkit-tap-highlight-color: transparent;
}
.mnav__item:hover { text-decoration: none; }
.mnav__item svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mnav__item.is-active { color: #111; font-weight: 600; }
.mnav__item.is-active svg { stroke-width: 2.2; }

/* ---------- Каркас ---------- */
.content { margin: 0; padding: 16px; border-radius: 0; box-shadow: none; min-height: 0; }
.footer { flex-direction: column; gap: 6px; padding: 8px 16px 20px; color: var(--muted); font-size: 12px; }
.footer a { color: var(--muted); text-decoration: underline; }
.flash { border-radius: var(--radius); padding: 12px 14px; }
.empty { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  height: 42px; line-height: 42px; padding: 0 16px; border: 0; border-radius: var(--radius);
  font-size: 15px; font-weight: 500; box-shadow: none; text-shadow: none; filter: none;
}
.btn--blue, .btn--gray, .btn--light { background: var(--panel); color: #111; border: 0; }
.btn--yellow, .btn--watch { background: var(--yellow); color: #111; border: 0; }
.btn--green { background: #16a34a; border: 0; }
.btn--red { background: #dc2626; border: 0; }
.btn--on { background: #fef3c7; color: #111; border: 0; box-shadow: none; }
.btn--big { height: 48px; line-height: 48px; font-size: 16px; }
.btn.is-voted { box-shadow: 0 0 0 2px var(--yellow); }

/* ---------- Заголовки и блоки ---------- */
.block { margin: 4px 0 26px; }
.block--gray, .block--blue { padding: 0; background: none; }
.block__title, .block__title--small { margin: 0 0 14px; font-size: 22px; font-weight: 700; line-height: 1.25; font-family: inherit; color: #111; }

/* ---------- Постеры ---------- */
.poster__img { border: 0; box-shadow: none; border-radius: 14px; background: var(--panel); }
.poster__title { margin-top: 8px; font-size: 15px; line-height: 1.3; color: #111; }
.poster:hover .poster__title { text-decoration: none; }
.poster__stub { background: var(--panel); color: var(--muted); }
/* ряды постеров — лента с прокруткой вбок, по три на экран */
.strip, .strip--6 {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 3);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px;
}
.strip::-webkit-scrollbar { display: none; }
.strip .poster { scroll-snap-align: start; }
.grid { grid-template-columns: repeat(3, 1fr); gap: 20px 12px; }

/* ---------- Главная ---------- */
.tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; margin: 0 0 26px; background: none; }
.tile { height: 78px; gap: 6px; border: 0; border-radius: 16px; background: var(--panel); color: #111; font-size: 14px; box-shadow: none; text-align: center; }
.tile:hover { background: #e9eaee; }
.tile__icon { fill: var(--accent); }
.cards { gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: none; }
.card__body { padding: 12px; }
.card__poster { width: 84px; height: auto; align-self: flex-start; border: 0; border-radius: 10px; box-shadow: none; }
.card__title { font-size: 16px; font-weight: 600; }
.card__title a { color: #111; }
.card__meta { font-size: 13px; color: var(--muted); }
.card__text { font-size: 14px; color: #374151; }
.card__footer { background: #f9fafb; font-size: 12px; color: var(--muted); padding: 8px 12px; }
.badge { background: var(--panel); color: #374151; border-radius: 6px; padding: 1px 6px; }
.discussed__item { border: 1px solid var(--line); border-radius: 14px; }
.discussed__poster { border-radius: 8px; }
.discussed__title { color: #111; }

/* ---------- Раздел: фильтры, сортировка, страницы ---------- */
.filters {
  --ftile-bg: var(--panel); --ftile-line: transparent; --ftile-icon: var(--accent);
  grid-template-columns: repeat(2, 1fr); gap: 0 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line);
}
.filters__title { font-size: 15px; margin: 6px 0 10px; }
.ftile { height: 44px; border-radius: var(--radius); font-size: 14px; }
.ftile:hover { background: #e9eaee; border-color: transparent; }
.ftile.is-active { background: #fef3c7; border-color: transparent; }
.ftile--big { height: 84px; }
.fpop__list { border-radius: 14px; width: min(280px, 80vw); }
.list-head { flex-wrap: wrap; margin: 14px 0 16px; }
.list-head__title { font-size: 22px; color: #111; }
.filters__select, .chip { border-radius: 10px; font-size: 14px; padding: 8px 10px; color: #111; }
.list-head .filters__select { height: 42px; }
.pager { flex-wrap: wrap; gap: 8px; }
.pager__page, .pager__next { min-width: 40px; height: 40px; line-height: 38px; border-radius: 10px; box-shadow: none; border-color: var(--line); color: #111; }
.pager__page.is-active { background: var(--yellow); border-color: var(--yellow); }
.pager__next { position: static; }

/* ---------- Страница фильма / сериала ---------- */
/* шапка, колонка с постером и обёртка «Смотреть» — прозрачны для сетки: блоки выстраиваются в порядке макета */
.item {
  display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  column-gap: 18px; align-items: start;
}
.item__head, .item__head-inner, .item__aside, .item > [data-controller="watched"] { display: contents; }
.item > *, .item__tabs, .shelves, .files-card, .files { grid-column: 1 / -1; }
.item > :not(.item__head) { max-width: none; }
.item__poster { grid-column: 1; grid-row: 1; border: 0; border-radius: 16px; background: var(--panel); }
.item__main { grid-column: 2; grid-row: 1; }
.item__title { font-size: clamp(21px, 6.2vw, 28px); font-weight: 700; line-height: 1.18; font-family: inherit; color: #111; overflow-wrap: anywhere; }
.item__original { margin: 8px 0 10px; font-size: 15px; color: var(--muted); }
.item__main > .item__info { display: none; }
.item__m-meta { font-size: 16px; color: #111; margin-bottom: 10px; }
.item__m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { padding: 5px 12px; border-radius: 999px; background: var(--panel); color: #111; font-size: 14px; font-weight: 500; }
.mchip:hover { text-decoration: none; background: #e9eaee; }
.item__m-seasons { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* оценки — пальцы со счётчиками */
.rating { margin-top: 10px; padding: 0; border: 0; background: none; }
.rating > :not(.mvote) { display: none; }
.mvote { display: flex; gap: 20px; }
.mvote__btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none;
  font: inherit; font-size: 17px; color: #374151; cursor: pointer;
}
.mvote__btn:hover { text-decoration: none; }
.mvote__btn svg { width: 24px; height: 24px; fill: none; stroke: #111; stroke-width: 1.7; stroke-linejoin: round; }
.mvote__btn.is-on svg { fill: var(--yellow); }

/* большая жёлтая «Смотреть онлайн» */
.item__tabs { order: 1; display: block; margin: 20px 0 0; padding: 0; border: 0; }
.item__tab--files { display: none; }
.btn--watch {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 58px; line-height: 1; border-radius: 16px; font-size: 19px; font-weight: 700;
}
.btn--watch svg { width: 26px; height: 26px; fill: none; stroke: #111; stroke-width: 2; }
.btn--watch svg path { fill: #111; stroke: none; }

/* полки — три плитки с иконками */
.shelves { order: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.shelves .btn {
  display: flex; align-items: center; justify-content: center; height: 100%; min-height: 84px; margin: 0;
  padding: 12px 4px; border-radius: 16px; line-height: 1.2; white-space: normal; font-size: 14px;
}
.mshelf { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mshelf svg { width: 28px; height: 28px; fill: none; stroke: #111; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.shelves .btn--on .mshelf svg { fill: var(--yellow); }
.shelves .btn--on .mshelf svg circle + path { stroke: #111; }

/* «О сериале» + «Подробнее» */
.item__about { order: 3; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.item__about-title { margin: 0; font-size: 22px; font-weight: 700; color: #111; }
.item__about-more { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.item__about-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
#about-more:checked ~ .item__about .item__about-more svg { transform: rotate(180deg); }
.item__description {
  order: 4; margin: 0; padding: 0; border: 0; font-size: 16px; line-height: 1.5; color: #111;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
}
#about-more:checked ~ .item__description { display: block; -webkit-line-clamp: unset; }
.item__more { order: 5; display: none; margin-top: 14px; }
#about-more:checked ~ .item__more { display: block; }
.item__more .item__info { grid-template-columns: 110px 1fr; gap: 10px; margin: 0; font-size: 14px; }
.item__more .item__info dt { color: var(--muted); }
.tag { padding: 3px 10px; border: 0; border-radius: 999px; background: var(--panel); color: #111; font-size: 13px; }
a.tag:hover { background: #e9eaee; }

/* карточка «Файлы и папки» и само дерево (раскрывается по нажатию) */
.files-card {
  order: 6; display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.files-card__icon { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.files-card__text { display: flex; flex-direction: column; min-width: 0; }
.files-card__text b { font-size: 18px; color: #111; }
.files-card__text span { font-size: 15px; color: var(--muted); }
.files-card__chevron { flex: none; width: 24px; height: 24px; margin-left: auto; fill: none; stroke: #111; stroke-width: 2; transition: transform .2s; }
#files-open:checked ~ .files-card { border-radius: 16px 16px 0 0; border-bottom-color: transparent; }
#files-open:checked ~ .files-card .files-card__chevron { transform: rotate(90deg); }
.files { order: 7; display: none; margin: 0; padding: 4px 12px 10px; background: none; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; }
#files-open:checked ~ .files { display: block; }
.files__folder--lang, .files__folder--release { margin-left: 10px; }
.files__name { font-size: 15px; }
.files__meta { font-size: 12px; gap: 10px; flex-wrap: wrap; }
.files__list { margin-left: 0; }
.files__file { grid-template-columns: 38px 28px 1fr auto; height: 50px; border-bottom: 1px solid var(--line); }
.files__play { width: 26px; height: 26px; background-size: 26px 26px; }
.files__file-name b { font-size: 15px; }
.files__fname { display: none; }
.files__size { font-size: 13px; padding-left: 20px; color: var(--muted); }

/* «Вам также понравится» */
.item > .block--blue { order: 8; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); border-radius: 0; }

/* отзывы */
.reviews { order: 9; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.reviews__head { border: 0; padding: 0; align-items: center; }
.reviews__head .block__title { font-size: 22px; }
.reviews__head .btn { height: auto; line-height: 1.3; padding: 0; background: none; color: var(--link); font-size: 17px; font-weight: 500; }
.reviews__empty { font-size: 15px; }
.review { border-radius: 14px; padding: 12px; }
.review__author { font-size: 15px; color: #111; }
.review__time { font-size: 12px; }
.review__text { font-size: 15px; line-height: 1.5; font-family: inherit; color: #111; }
.review__answer { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.review__foot { font-size: 13px; }

.crumbs { order: 10; flex-direction: column; gap: 4px; margin-top: 26px; padding: 16px 0 0; background: none; border-top: 1px solid var(--line); font-size: 12px; }

/* ---------- Личный кабинет и формы ---------- */
.account { max-width: none; margin: 6px 0 20px; }
.form label { font-size: 14px; color: #374151; }
.form input[type=email], .form input[type=password], .form input[type=text], .form textarea, .form select,
.security__confirm input, .security__add input, .passkeys__rename input {
  min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 16px;
}
.form textarea { padding: 10px 14px; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid #fde68a; border-color: var(--accent); }
.cabinet__head { gap: 14px; margin-bottom: 14px; }
.cabinet__avatar { width: 56px; height: 56px; line-height: 56px; border-radius: 50%; }
.cabinet__name { font-size: 22px; font-weight: 700; color: #111; }
.cabinet__since { font-size: 13px; }
.cabinet__tabs { gap: 8px; border: 0; padding-bottom: 4px; scrollbar-width: none; }
.cabinet__tab { padding: 8px 14px; border-radius: 999px; background: var(--panel); color: #111; font-size: 14px; }
.cabinet__tab:hover { background: #e9eaee; }
.cabinet__tab.is-active { background: #111; color: #fff; }
.history__poster { border-radius: 8px; }
.history__title { font-size: 16px; }
.history__title a { color: #111; }
.progress span { background: var(--yellow); }
.sessions, .passkeys { border-radius: 14px; }
.passkey-offer { border-radius: 14px; background: #fffbeb; border-color: #fde68a; }

/* главная кнопка формы (вход, регистрация, сохранение) — жёлтая */
.form .btn--blue, .account .btn--blue { background: var(--yellow); color: #111; }
.passkey-login__btn { height: auto; min-height: 46px; line-height: 1.3; padding: 10px 14px; white-space: normal; }

/* на телефоне «наведение» залипает после нажатия — без подчёркивания ссылок (логотип, вкладки, постеры) */
a:hover { text-decoration: none; }
.header__logo, .header__logo:hover, .header__logo:focus { text-decoration: none; -webkit-tap-highlight-color: transparent; }
/* подписи в ленте постеров — не длиннее двух строк, чтобы длинное название за краем не раздувало ряд */
.strip .poster__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
