/*
 * Serial Engine by Sajmn — čtenářské bloky (v1.3.0).
 *
 * Směr: tištěný obrazový časopis čtený večer pod lampou.
 * Papír a inkoustová modř pro děti, noc pro Story Worlds, lampa jako
 * vzácný akcent. 1px linky místo stínů, jeden poloměr rohů (3px).
 *
 * Barvy a písma jsou proměnné na :root, aby šly napojit na globální
 * barvy Divi. Vše je pod třídou .dsx, nic mimo bloky to neovlivní.
 */

:root {
	--dsx-paper: #F5EFE3;
	--dsx-paper-2: #EDE5D4;
	--dsx-ink: #1D2742;
	--dsx-ink-2: #2E3651;
	--dsx-muted: #4A5168;
	--dsx-line: #D9CFBC;
	--dsx-line-2: #BFB39B;
	--dsx-lamp: #D99A2B;
	--dsx-night: #11151F;
	--dsx-night-line: #2A3040;
	--dsx-moon: #ECE6D8;
	--dsx-moon-2: #D6CFBE;
	--dsx-moon-muted: #B4AD99;
	--dsx-serif: 'Literata', Georgia, 'Times New Roman', serif;
	--dsx-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--dsx-radius: 3px;
}

/* ---- Základ a neutralizace stylů Divi uvnitř bloků ---- */
.dsx {
	--dsx-fg: var(--dsx-ink);
	--dsx-fg-2: var(--dsx-ink-2);
	--dsx-fg-muted: var(--dsx-muted);
	--dsx-rule: var(--dsx-line);
	color: var(--dsx-fg);
	font-family: var(--dsx-serif);
	font-size: 17px;
	line-height: 1.6;
	box-sizing: border-box;
}
.dsx *,
.dsx *::before,
.dsx *::after {
	box-sizing: inherit;
}
.dsx--dark {
	--dsx-fg: var(--dsx-moon);
	--dsx-fg-2: var(--dsx-moon-2);
	--dsx-fg-muted: var(--dsx-moon-muted);
	--dsx-rule: var(--dsx-night-line);
	color: var(--dsx-fg);
}
.dsx p,
.dsx h1,
.dsx h2,
.dsx h3,
.dsx h4 {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: var(--dsx-serif);
	font-weight: 500;
	letter-spacing: normal;
	text-transform: none;
}
.dsx p {
	font-size: inherit;
	line-height: inherit;
}
.dsx ol,
.dsx ul,
ol.dsx {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: inherit;
}
.dsx li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.dsx a {
	color: inherit;
	text-decoration: none;
}
.dsx a:hover {
	color: inherit;
}
.dsx a:focus-visible,
.dsx button:focus-visible {
	outline: 2px solid var(--dsx-lamp);
	outline-offset: 3px;
}
.dsx img.dsx-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--dsx-radius);
}
.dsx-img--wide {
	aspect-ratio: 16 / 9;
}
.dsx-img--card {
	aspect-ratio: 3 / 2;
}
.dsx img.dsx-thumb {
	width: 88px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--dsx-radius);
	flex: none;
	display: block;
}
.dsx-media {
	display: block;
	line-height: 0;
}

/* ---- Typografie ---- */
.dsx .dsx-display {
	font-size: clamp(38px, 4.6vw, 62px);
	line-height: 1.04;
	letter-spacing: -0.02em;
}
.dsx .dsx-h2 {
	font-size: clamp(30px, 3vw, 40px);
	line-height: 1.1;
	letter-spacing: -0.01em;
}
.dsx .dsx-h3 {
	font-size: clamp(24px, 2.2vw, 28px);
	line-height: 1.15;
}
.dsx .dsx-h4 {
	font-size: 23px;
	line-height: 1.2;
}
.dsx .dsx-lede {
	font-size: 20px;
	font-style: italic;
	color: var(--dsx-fg-2);
}
.dsx .dsx-body {
	font-size: 18px;
	color: var(--dsx-fg-2);
	max-width: 60ch;
}
.dsx .dsx-body-s {
	font-size: 16px;
	line-height: 1.55;
	color: var(--dsx-fg-2);
}
.dsx .dsx-muted {
	color: var(--dsx-fg-muted);
	max-width: 36ch;
}
.dsx .dsx-meta,
.dsx .dsx-facts,
.dsx .dsx-label,
.dsx .dsx-kicker {
	font-family: var(--dsx-sans);
	font-size: 14px;
	line-height: 1.45;
	color: var(--dsx-fg-muted);
}
.dsx .dsx-label {
	font-size: 13px;
	font-weight: 600;
}
.dsx .dsx-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}
.dsx-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

/* ---- Tlačítka a odkazy ---- */
.dsx .dsx-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
}
.dsx a.dsx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	border-radius: var(--dsx-radius);
	font-family: var(--dsx-sans);
	font-size: 16px !important;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	text-align: center;
	transition: background-color 0.15s ease;
}
.dsx a.dsx-btn--primary {
	background: var(--dsx-ink) !important;
	color: var(--dsx-paper) !important;
}
.dsx a.dsx-btn--primary:hover {
	background: #2B3A62 !important;
}
.dsx a.dsx-btn--light {
	background: var(--dsx-moon) !important;
	color: var(--dsx-night) !important;
}
.dsx a.dsx-btn--light:hover {
	background: #FFFFFF !important;
}
.dsx a.dsx-textlink {
	font-family: var(--dsx-sans);
	font-size: 15px;
	font-weight: 500;
	padding: 12px 0;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}
.dsx a.dsx-textlink--strong {
	font-weight: 600;
	align-self: flex-start;
	margin-top: auto;
}

/* ---- Měsíc ---- */
.dsx-moon {
	flex: none;
	vertical-align: middle;
}
.dsx-moon .dsx-moon-disc {
	fill: currentColor;
	fill-opacity: 0.1;
	stroke: currentColor;
	stroke-opacity: 0.35;
	stroke-width: 1;
}
.dsx-moon .dsx-moon-lit {
	fill: var(--dsx-lamp);
}
.dsx .dsx-kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	color: var(--dsx-fg-muted);
}
.dsx .dsx-kicker strong {
	color: var(--dsx-fg);
	font-weight: 600;
}

/* ---- [ds_tonight] ---- */
.dsx-tonight {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.dsx-tonight-body {
	display: flex;
	flex-wrap: wrap;
	gap: 28px 40px;
	align-items: flex-start;
}
.dsx-tonight-text {
	flex: 3 1 340px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.dsx-tonight-text .dsx-actions {
	margin-top: 8px;
}
.dsx-tonight .dsx-question {
	flex: 2 1 260px;
}

/* 1.3.2: [ds_tonight layout="split"] — hlavní tip na landingu, obrázek vedle textu. */
@media (min-width: 900px) {
	.dsx-tonight--split {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: center;
		gap: 20px 48px;
	}
	.dsx-tonight--split > .dsx-kicker {
		grid-column: 1 / -1;
	}
	.dsx-tonight--split .dsx-display {
		font-size: clamp(32px, 3.2vw, 44px);
		line-height: 1.08;
	}
}

/* ---- Otázka po příběhu ---- */
.dsx-question {
	min-width: 0;
	background: var(--dsx-paper-2);
	border-top: 2px solid var(--dsx-lamp);
	border-radius: 0 0 var(--dsx-radius) var(--dsx-radius);
	padding: 22px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: var(--dsx-ink);
}
.dsx .dsx-question .dsx-label {
	color: var(--dsx-muted);
}
.dsx .dsx-question-text {
	font-size: 22px;
	line-height: 1.35;
	font-style: italic;
}
.dsx .dsx-question-hint {
	font-family: var(--dsx-sans);
	font-size: 14px;
	line-height: 1.5;
	color: var(--dsx-muted);
}

/* ---- [ds_by_time] ---- */
.dsx-bytime {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 64px;
	scroll-margin-top: 96px;
}
.dsx-bytime-head {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.dsx-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.dsx-filter[hidden] {
	display: none;
}
.dsx button.dsx-chip {
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--dsx-radius);
	border: 1px solid var(--dsx-line-2);
	background: transparent;
	color: var(--dsx-fg);
	font-family: var(--dsx-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}
.dsx button.dsx-chip:hover {
	border-color: var(--dsx-fg);
}
.dsx button.dsx-chip[aria-pressed="true"] {
	background: var(--dsx-ink);
	border-color: var(--dsx-ink);
	color: var(--dsx-paper);
}
.dsx ol.dsx-rows {
	flex: 2 1 560px;
	min-width: 0;
	border-top: 1px solid var(--dsx-rule) !important;
}
.dsx-rows li {
	border-bottom: 1px solid var(--dsx-rule);
}
.dsx-rows li[hidden] {
	display: none;
}
.dsx a.dsx-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 20px;
	justify-content: space-between;
	padding: 16px 0;
	min-height: 64px;
}
.dsx-row-main {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.dsx-row-title {
	font-size: 21px;
	line-height: 1.3;
}
.dsx a.dsx-row:hover .dsx-row-title {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}
.dsx-row-line {
	font-size: 16px;
	color: var(--dsx-fg-muted);
}
.dsx-row-meta {
	display: flex;
	gap: 16px;
	font-family: var(--dsx-sans);
	font-size: 14px;
	color: var(--dsx-fg-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.dsx-row-meta b {
	font-weight: 600;
	color: var(--dsx-fg);
	min-width: 52px;
	text-align: right;
}
.dsx-rows--thumbs .dsx-row-main {
	flex-basis: 240px;
}

/* ---- [ds_after_asleep] ---- */
.dsx-asleep {
	background: var(--dsx-night);
	border-radius: var(--dsx-radius);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.dsx-asleep .dsx-stack {
	gap: 8px;
}
.dsx-asleep a.dsx-btn {
	align-self: stretch;
}
.dsx-asleep a.dsx-textlink {
	padding: 4px 0;
	font-size: 14px;
}
.dsx-asleep a.dsx-asleep-resume[hidden] {
	display: none;
}
.dsx-asleep .dsx-h4 a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.dsx-also {
	border-top: 1px solid var(--dsx-rule);
	padding-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.dsx a.dsx-also-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.dsx-also-title {
	font-size: 18px;
	line-height: 1.3;
}
.dsx a.dsx-also-item:hover .dsx-also-title {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---- [ds_series_shelf] ---- */
.dsx-shelf {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: stretch;
}
.dsx-shelf-item {
	--dsx-series: var(--dsx-ink);
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-top: 6px solid var(--dsx-series);
	padding-top: 18px;
}
.dsx-shelf-item:first-child {
	flex: 1.4 1 440px;
}
.dsx-shelf-item .dsx-stack {
	flex: 1;
}
.dsx .dsx-shelf-item h3 a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}
/* Varianta s výpisem dílů (landing Bedtime): obrázek vedle textu. */
.dsx-shelf--parts {
	flex-direction: column;
	gap: 40px;
}
.dsx-shelf--parts .dsx-shelf-item,
.dsx-shelf--parts .dsx-shelf-item:first-child {
	flex: none;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 24px 48px;
	padding-top: 24px;
}
.dsx-shelf--parts .dsx-media,
.dsx-shelf--parts .dsx-stack {
	flex: 1 1 400px;
	min-width: 0;
}
.dsx-shelf--parts .dsx-h3 {
	font-size: clamp(28px, 2.6vw, 34px);
}
.dsx ol.dsx-parts {
	margin-top: 8px !important;
	border-top: 1px solid var(--dsx-rule);
}
.dsx-parts li {
	border-bottom: 1px solid var(--dsx-rule);
}
.dsx-parts a {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 12px 0;
	min-height: 48px;
}
.dsx-part-n {
	width: 52px;
	flex: none;
	font-family: var(--dsx-sans);
	font-size: 13px;
	font-weight: 600;
	color: var(--dsx-fg-muted);
}
.dsx-part-title {
	flex: 1;
	min-width: 0;
	font-size: 18px;
}
.dsx-parts a:hover .dsx-part-title {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}
.dsx-part-min {
	font-family: var(--dsx-sans);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

/* ---- [ds_worlds] ---- */
.dsx-worlds {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
}
.dsx-worlds-main {
	flex: 2 1 580px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.dsx-worlds-main .dsx-h2 {
	font-size: clamp(34px, 3.4vw, 44px);
	line-height: 1.05;
}
.dsx-worlds-side {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.dsx-worlds-item {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.dsx-worlds-item + .dsx-worlds-item {
	border-top: 1px solid var(--dsx-rule);
	padding-top: 24px;
}
.dsx-worlds h3 a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

/* ---- [ds_recent] ---- */
ol.dsx.dsx-recent {
	border-top: 1px solid var(--dsx-rule) !important;
	font-family: var(--dsx-sans);
	font-size: 15px;
}
.dsx-recent li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 24px;
	padding: 14px 0;
	border-bottom: 1px solid var(--dsx-rule);
}
.dsx-recent time {
	width: 72px;
	flex: none;
	color: var(--dsx-fg-muted);
	font-variant-numeric: tabular-nums;
}
.dsx-recent a {
	flex: 1 1 260px;
	min-width: 0;
	font-family: var(--dsx-serif);
	font-size: 18px;
}
.dsx-recent a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}
.dsx-recent-line {
	color: var(--dsx-fg-muted);
}
.dsx-recent-min {
	width: 52px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ---- [ds_story_end] ---- */
.dsx-end {
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin: 48px 0;
}
.dsx-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--dsx-ink);
}
.dsx-divider span {
	flex: 1;
	height: 1px;
	background: var(--dsx-line);
}
.dsx-end .dsx-question {
	padding: 28px 32px 30px;
}
.dsx-end .dsx-question-text {
	font-size: 27px;
}
.dsx-next {
	--dsx-series: var(--dsx-ink);
	display: flex;
	gap: 24px;
	align-items: center;
	border: 1px solid var(--dsx-line);
	border-radius: var(--dsx-radius);
	padding: 20px;
}
.dsx-next-n {
	width: 112px;
	height: 112px;
	flex: none;
	border-radius: var(--dsx-radius);
	background: var(--dsx-series);
	color: #F5F3EE;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
}
.dsx-next .dsx-actions {
	margin-top: 6px;
}
.dsx-recs {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.dsx-recs-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.dsx a.dsx-rec {
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.dsx-rec-title {
	font-size: 19px;
	line-height: 1.3;
}
.dsx a.dsx-rec:hover .dsx-rec-title {
	text-decoration: underline;
	text-underline-offset: 4px;
}
.dsx a.dsx-adult {
	background: var(--dsx-night);
	color: var(--dsx-moon);
	border-radius: var(--dsx-radius);
	padding: 18px 22px;
	display: flex;
	align-items: center;
	gap: 18px;
}
.dsx-adult .dsx-label {
	font-family: var(--dsx-sans);
	font-size: 12px;
	font-weight: 600;
	color: var(--dsx-moon-muted);
}
.dsx-adult-title {
	font-size: 18px;
	line-height: 1.3;
}

/* ---- Textové moduly Divi s třídou .dsx (nadpisy a texty sekcí) ---- */
.et_pb_text.dsx .et_pb_text_inner > * + * {
	margin-top: 12px;
}
.et_pb_text.dsx .et_pb_text_inner > .dsx-label + * {
	margin-top: 6px;
}

/* ---- Telefon ---- */
@media (max-width: 600px) {
	.dsx {
		font-size: 16px;
	}
	.dsx .dsx-lede {
		font-size: 18px;
	}
	.dsx .dsx-question-text,
	.dsx-end .dsx-question-text {
		font-size: 20px;
	}
	.dsx-question,
	.dsx-end .dsx-question {
		padding: 18px 18px 20px;
	}
	.dsx-asleep {
		padding: 20px;
	}
	.dsx-tonight .dsx-actions a.dsx-btn {
		width: 100%;
	}
	.dsx-filter {
		flex-wrap: nowrap;
		overflow-x: auto;
	}
	.dsx button.dsx-chip {
		flex: none;
		padding: 0 14px;
	}
	.dsx-next {
		align-items: flex-start;
	}
	.dsx-next-n {
		width: 56px;
		height: 56px;
		font-size: 24px;
	}
	.dsx-recent time {
		width: auto;
	}
}
