/* Страница серии видеоблога GlassBaker — «Эпизод сериала».
   Токены — DESIGN.md: медь для акцентов и фокуса, глубокая медь для действий и мелкого
   текста (обычная медь на белом не дотягивает до 4.5:1), плоско, без карточек в карточках. */

.gb-ep-page {
	--gb-ink: #252525;
	--gb-muted: #5f625e;
	--gb-copper: #b18b66;
	--gb-copper-deep: #765033;
	--gb-surface: #f6f7f5;
	--gb-line: #dde0db;
	--gb-sage: #e8f0ea;
	--gb-sage-ink: #2c4a35;
	--gb-copper-tint: rgba(177, 139, 102, 0.14);
	--gb-display: "Roboto Slab", Georgia, serif;
	--gb-text: Roboto, "Helvetica Neue", Arial, sans-serif;
	--gb-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.gb-ep-page ::selection {
	background: rgba(177, 139, 102, 0.3);
	color: var(--gb-ink);
}

.gb-ep {
	background: #fff;
	color: var(--gb-ink);
	font-family: var(--gb-text);
	font-size: 17px;
	line-height: 1.62;
	padding-bottom: 8px;
}

.gb-ep *,
.gb-ep *::before,
.gb-ep *::after {
	box-sizing: border-box;
}

.gb-ep-wrap {
	max-width: 1088px;
	margin: 0 auto;
	padding: 0 24px;
}

.gb-ep a {
	color: var(--gb-copper-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.2s var(--gb-ease);
}

.gb-ep a:hover {
	color: var(--gb-ink);
}

.gb-ep a:focus-visible,
.gb-ep button:focus-visible {
	outline: 3px solid rgba(177, 139, 102, 0.6);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ── Полоса серий ─────────────────────────────────────────── */

.gb-ep-season {
	background: var(--gb-surface);
	border-bottom: 1px solid var(--gb-line);
}

.gb-ep-season__inner {
	display: flex;
	align-items: stretch;
	gap: 28px;
	min-height: 64px;
}

.gb-ep-season__name {
	align-self: center;
	margin: 0;
	font-family: var(--gb-display);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.gb-ep-season__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.gb-ep-season__list::-webkit-scrollbar {
	display: none;
}

.gb-ep-season__item {
	margin: 0;
	flex: 0 0 auto;
}

.gb-ep-season__item > a,
.gb-ep-season__item > span {
	display: flex;
	align-items: baseline;
	gap: 8px;
	height: 100%;
	padding: 20px 14px 18px;
	border-bottom: 2px solid transparent;
	color: var(--gb-muted);
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.gb-ep-season__item.is-current > span {
	border-bottom-color: var(--gb-copper-deep);
	color: var(--gb-ink);
}

.gb-ep-season__n {
	font-size: 13px;
	font-weight: 700;
	color: var(--gb-copper-deep);
	font-variant-numeric: tabular-nums;
}

.gb-ep-season__item.is-soon .gb-ep-season__n {
	color: var(--gb-muted);
}

.gb-ep-season__title {
	font-weight: 500;
}

.gb-ep-season__state {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: var(--gb-muted);
}

.gb-ep-season__item.is-soon .gb-ep-season__state {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--gb-copper-tint);
	color: var(--gb-copper-deep);
	font-weight: 600;
}

.gb-ep .gb-ep-season__follow {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	align-self: center;
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

/* ── Шапка серии ──────────────────────────────────────────── */

.gb-ep-head {
	padding-top: 44px;
}

.gb-ep-title {
	max-width: 900px;
	margin: 0;
	font-family: var(--gb-display);
	font-size: 42px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.012em;
	color: var(--gb-ink);
	text-wrap: balance;
}

.gb-ep-body > * {
	max-width: 38em;
}

.gb-ep-body > .gb-ep-player,
.gb-ep-body > .gb-ep-chapters,
.gb-ep-body > .gb-ep-mk,
.gb-ep-body > .gb-st-pairs,
.gb-ep-body > .gb-st-sheet {
	max-width: none;
}

.gb-ep-body p {
	margin: 0 0 18px;
}

.gb-ep-body .gb-ep-lead {
	max-width: 34em;
	margin: 16px 0 28px;
	font-size: 20px;
	line-height: 1.5;
	color: var(--gb-ink);
	text-wrap: pretty;
}

/* ── Плеер ────────────────────────────────────────────────── */

.gb-ep-player {
	margin: 0 0 10px;
}

.gb-ep-player__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: #111 center / cover no-repeat;
}

.gb-ep-player__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.gb-ep-body .gb-ep-meta {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--gb-muted);
	font-variant-numeric: tabular-nums;
}

/* ── Главы ────────────────────────────────────────────────── */

.gb-ep-body h2 {
	margin: 56px 0 16px;
	font-family: var(--gb-display);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--gb-ink);
	text-wrap: balance;
}

.gb-ep-chapters {
	margin-top: 40px;
}

.gb-ep-chapters h2 {
	margin-top: 0;
}

.gb-ep-chapters__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb-ep-chapters__list li {
	margin: 0;
	border-top: 1px solid var(--gb-line);
}

.gb-ep-chapter {
	display: grid;
	grid-template-columns: 52px 1fr;
	align-items: baseline;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 12px 10px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: var(--gb-ink);
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 0.25s var(--gb-ease);
}

.gb-ep-chapter:hover {
	background: var(--gb-surface);
}

.gb-ep-chapter__t {
	font-weight: 700;
	color: var(--gb-copper-deep);
	font-variant-numeric: tabular-nums;
}

.gb-ep-chapter.is-active {
	background: var(--gb-copper-tint);
}

.gb-ep-chapter.is-active .gb-ep-chapter__label {
	font-weight: 600;
}

/* ── Живой блок мастер-класса ─────────────────────────────── */

.gb-ep-mk {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 32px;
	margin: 28px 0 8px;
	padding: 24px;
	background: var(--gb-surface);
	border-radius: 8px;
}

.gb-ep .gb-ep-mk__media {
	display: block;
	align-self: start;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.gb-ep-mk__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--gb-ease);
}

.gb-ep-mk__media:hover img {
	transform: scale(1.03);
}

.gb-ep-mk__title {
	margin: 0 0 6px;
	font-family: var(--gb-display);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

.gb-ep .gb-ep-mk__title a {
	color: var(--gb-ink);
	text-decoration: none;
}

.gb-ep .gb-ep-mk__title a:hover {
	color: var(--gb-copper-deep);
}

.gb-ep-body .gb-ep-mk__facts {
	margin: 0 0 18px;
	color: var(--gb-muted);
	font-size: 16px;
}

.gb-ep-mk__facts strong {
	color: var(--gb-ink);
	font-weight: 700;
}

.gb-ep-body .gb-ep-mk__label {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.gb-ep-mk__slots {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.gb-ep-mk__slots li {
	margin: 0;
}

.gb-ep .gb-ep-mk__slots a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 48px;
	padding: 8px 12px;
	border: 1px solid var(--gb-line);
	border-radius: 2px;
	background: #fff;
	color: var(--gb-ink);
	font-size: 15px;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	transition: border-color 0.2s var(--gb-ease);
}

.gb-ep .gb-ep-mk__slots a:hover {
	border-color: var(--gb-copper-deep);
	color: var(--gb-ink);
}

.gb-ep-mk__slots time b {
	font-weight: 700;
	margin-left: 4px;
}

.gb-ep-mk__slots span {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--gb-sage);
	color: var(--gb-sage-ink);
	font-size: 13px;
	font-weight: 600;
}

.gb-ep-body .gb-ep-mk__empty {
	margin: 0 0 20px;
	color: var(--gb-muted);
}

/* ── Кнопки ───────────────────────────────────────────────── */

.gb-ep-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 8px;
}

.gb-ep .gb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid var(--gb-line);
	border-radius: 2px;
	background: #fff;
	color: var(--gb-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s var(--gb-ease), border-color 0.2s var(--gb-ease), color 0.2s var(--gb-ease);
}

.gb-ep .gb-btn:hover {
	border-color: var(--gb-copper-deep);
	color: var(--gb-ink);
}

.gb-ep .gb-btn--primary {
	border-color: var(--gb-copper-deep);
	background: var(--gb-copper-deep);
	color: #fff;
}

.gb-ep .gb-btn--primary:hover {
	border-color: var(--gb-ink);
	background: var(--gb-ink);
	color: #fff;
}

.gb-ep-body .gb-ep-cta-text {
	margin-bottom: 14px;
}

/* ── Следующая серия ──────────────────────────────────────── */

.gb-ep-next {
	margin-top: 72px;
	padding: 40px 0;
	background: var(--gb-surface);
	border-top: 1px solid var(--gb-line);
	border-bottom: 1px solid var(--gb-line);
}

.gb-ep-next__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.gb-ep-next__text {
	max-width: 620px;
}

.gb-ep-next h2 {
	margin: 0 0 8px;
	font-family: var(--gb-display);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

.gb-ep-next p {
	margin: 0;
	color: var(--gb-ink);
}

.gb-ep-next .gb-ep-actions {
	flex: 0 0 auto;
	margin: 0;
}

/* ── Читать дальше ────────────────────────────────────────── */

.gb-ep-more {
	padding: 56px 0 72px;
}

.gb-ep-more__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.gb-ep-more h2 {
	margin: 0;
	font-family: var(--gb-display);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
}

.gb-ep .gb-ep-more__all {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.gb-ep-more__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb-ep-more__item {
	margin: 0;
}

.gb-ep .gb-ep-more__item > a {
	display: block;
	color: var(--gb-ink);
	text-decoration: none;
}

.gb-ep-more__item img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 12px;
}

.gb-ep-more__title {
	display: block;
	font-family: var(--gb-display);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-wrap: balance;
	transition: color 0.2s var(--gb-ease);
}

.gb-ep .gb-ep-more__item > a:hover .gb-ep-more__title {
	color: var(--gb-copper-deep);
}

.gb-ep-more__links {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--gb-line);
}

.gb-ep-more__links .gb-related-links h4 {
	margin: 0 0 10px;
	font-family: var(--gb-text);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--gb-ink);
}

.gb-ep-more__links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb-ep-more__links li {
	margin: 0;
	font-size: 15px;
}


/* ── История: «Отпечатки рядом с текстом» ─────────────────── */

.gb-st-head {
	padding-top: 48px;
}

.gb-st-from {
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--gb-muted);
}

.gb-st-pairs {
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin: 40px 0 24px;
}

.gb-st-pair {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: 40px;
	align-items: center;
}

.gb-st-pair.is-flip {
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}

.gb-st-pair.is-flip .gb-st-print {
	order: 2;
}

.gb-st-print {
	margin: 0;
}

/* Единый горизонтальный формат: вертикальный снимок рядом с абзацем в 4–6 строк
   оставлял пустоту выше и ниже текста (замечание владельца 30.10). Кадр смещён вверх,
   чтобы не срезать лица. */
.gb-st-print img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: 50% 28%;
	border-radius: 2px;
}

.gb-st-print figcaption {
	margin-top: 10px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--gb-muted);
}

.gb-ep-body .gb-st-pair__text p,
.gb-ep-body .gb-st-solo p {
	margin: 0;
	font-size: 20px;
	line-height: 1.6;
	max-width: 32em;
	text-wrap: pretty;
}

.gb-st-solo {
	max-width: 38em;
}

.gb-st-sheet {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin: 0 0 18px;
}

/* Число колонок под количество снимков, чтобы последний ряд не оставался с одним кадром. */
.gb-st-sheet[style*="--gb-sheet-n"] {
	grid-template-columns: repeat(var(--gb-sheet-n), minmax(0, 1fr));
}

.gb-st-sheet img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 2px;
}

.gb-st-body figure {
	margin: 0 0 24px;
}

.gb-st-body img {
	max-width: 100%;
	height: auto;
}

.gb-st-body figure img {
	display: block;
	width: 100%;
	border-radius: 2px;
}

.gb-st-follow {
	margin-top: 64px;
}

.gb-st-wide figure {
	margin: 0;
}

.gb-st-cap {
	margin-top: 10px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--gb-muted);
}

.gb-st-single {
	max-width: 32em;
	margin: 0 0 24px;
}

.gb-st-book {
	margin: 20px 0 8px;
}


/* ── История: единая колонка (замечание владельца 30.10: «тексты и картинки выглядят
   раздельно, контент не выглядит как единое целое»). Вся статья — одна колонка 720px:
   заголовок, снимки по ширине колонки в ритме с абзацами, блок МК, лист, запись. ── */

.gb-st-page .gb-ep-wrap {
	max-width: 768px;
}

.gb-st-page .gb-ep-body > * {
	max-width: none;
}

.gb-st-page .gb-ep-title {
	font-size: 40px;
}

.gb-st-page .gb-st-pairs {
	gap: 32px;
	margin: 32px 0 8px;
}

.gb-st-page .gb-st-pair,
.gb-st-page .gb-st-pair.is-flip {
	display: block;
}

.gb-st-page .gb-st-print {
	margin: 0 0 22px;
}

.gb-st-page .gb-st-print img {
	aspect-ratio: 3 / 2;
	object-position: 50% 35%;
}

.gb-st-page .gb-ep-body .gb-st-pair__text p,
.gb-st-page .gb-ep-body .gb-st-solo p {
	font-size: 19px;
	line-height: 1.65;
	max-width: none;
}

.gb-st-page .gb-st-single {
	max-width: none;
}

.gb-st-page .gb-ep-mk {
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 24px;
	padding: 20px;
}

.gb-st-page .gb-ep-mk__slots {
	grid-template-columns: 1fr;
}

.gb-st-page .gb-ep-next__inner {
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
}

.gb-st-page .gb-ep-more__list {
	gap: 20px;
}

/* ── Телефон и планшет ────────────────────────────────────── */

@media (max-width: 960px) {
	.gb-ep-season__inner {
		flex-wrap: wrap;
		gap: 0 16px;
		padding-top: 10px;
	}

	.gb-ep-season__name {
		flex: 1 1 auto;
	}

	.gb-ep-season__list {
		order: 3;
		flex: 1 0 100%;
		flex-direction: column;
		gap: 0;
		overflow: visible;
		margin: 0;
		padding: 0 0 4px;
	}

	.gb-ep-season__item > a,
	.gb-ep-season__item > span {
		align-items: center;
		min-height: 44px;
		padding: 8px 0;
		border-bottom: 0;
		border-top: 1px solid var(--gb-line);
		white-space: normal;
	}

	.gb-ep-season__item.is-current > span {
		border-bottom: 0;
	}

	.gb-ep-season__item.is-current .gb-ep-season__title {
		font-weight: 700;
	}

	.gb-ep-chapters__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gb-ep-mk {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.gb-ep .gb-ep-mk__media {
		aspect-ratio: 16 / 9;
	}

	.gb-ep-next__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 640px) {
	.gb-ep {
		font-size: 16px;
	}

	.gb-st-pairs {
		gap: 40px;
		margin-top: 28px;
	}

	.gb-st-pair,
	.gb-st-pair.is-flip {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.gb-st-pair.is-flip .gb-st-print {
		order: 0;
	}

	.gb-st-print img {
		aspect-ratio: 4 / 3;
	}

	.gb-st-wide .gb-ep-player__frame {
		margin-left: -16px;
		margin-right: -16px;
		border-radius: 0;
	}

	.gb-ep-body .gb-st-pair__text p,
	.gb-ep-body .gb-st-solo p {
		font-size: 17px;
	}

	.gb-st-head {
		padding-top: 28px;
	}

	.gb-st-page .gb-ep-title {
		font-size: 27px;
	}

	.gb-st-page .gb-ep-body .gb-st-pair__text p,
	.gb-st-page .gb-ep-body .gb-st-solo p {
		font-size: 17px;
	}

	.gb-st-page .gb-ep-mk {
		grid-template-columns: 1fr;
		padding: 20px 16px;
	}

	.gb-st-sheet,
	.gb-st-sheet[style*="--gb-sheet-n"] {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}

	.gb-ep-wrap {
		padding: 0 16px;
	}

	.gb-ep-head {
		padding-top: 28px;
	}

	.gb-ep-title {
		font-size: 27px;
		line-height: 1.16;
	}

	.gb-ep-body .gb-ep-lead {
		font-size: 18px;
		margin-bottom: 20px;
	}

	.gb-ep-player {
		margin-left: -16px;
		margin-right: -16px;
	}

	.gb-ep-player__frame {
		border-radius: 0;
	}

	.gb-ep-body .gb-ep-meta {
		padding: 0;
	}

	.gb-ep-body h2 {
		font-size: 24px;
		margin-top: 44px;
	}

	.gb-ep-chapters__list {
		grid-template-columns: 1fr;
	}

	.gb-ep-mk {
		margin-left: -16px;
		margin-right: -16px;
		padding: 20px 16px;
		border-radius: 0;
	}

	.gb-ep-mk__slots {
		grid-template-columns: 1fr;
	}

	.gb-ep .gb-btn {
		flex: 1 1 auto;
	}

	.gb-ep-next {
		margin-top: 56px;
		padding: 32px 0;
	}

	.gb-ep-next h2,
	.gb-ep-more h2 {
		font-size: 22px;
	}

	.gb-ep-more__list {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.gb-ep .gb-ep-more__item > a {
		display: grid;
		grid-template-columns: 112px 1fr;
		gap: 14px;
		align-items: start;
	}

	.gb-ep-more__item img {
		margin-bottom: 0;
		aspect-ratio: 1;
	}

	.gb-ep .gb-ep-more__all {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gb-ep *,
	.gb-ep *::before,
	.gb-ep *::after {
		transition: none !important;
	}
}
