/**
 * TSV Heiligenrode – Hallenheft reading view ("Leseansicht") for phones and tablets (since 1.14.0).
 *
 * Loaded with the magazine styles on the page /hallenheft/ (incl. the release preview) and on the
 * editorial screen "Hallenheft" (phone preview), see tsvt_mag_assets() in inc/magazine.php. The
 * markup comes from inc/magazine-reader.php, the behaviour from assets/js/magazine-reader.js.
 *
 * 1. View switch: below 860 px the reading view, from 860 px the flip book; the switch
 *    "Lesen / Als Heft" (data-view on .magv) changes that. Release preview: tabs, reading view in
 *    phone width.
 * 2. Reading view: bar, opening, contents, home game, articles, text boxes, ads, photos, data blocks,
 *    partners, offline saving. Uses the colour tokens of the theme (light and dark mode); text size
 *    comes from --mread-fs (three steps, data-fs on .mread).
 * 3. Tablets (container 760 px and wider): contents as a sticky column beside the articles.
 * 4. Contents sheet, image layer, toast.
 * 5. Page editor: phone preview.
 */

/* =====================================================================
   1. View switch
   ===================================================================== */
.magv__read {
	display: none;
}
@media (max-width: 859px) {
	.magv:not([data-view='heft']) .magv__read {
		display: block;
	}
	.magv:not([data-view='heft']) .magv__heft {
		display: none;
	}
}
@media (min-width: 860px) {
	.magv[data-view='lesen'] .magv__read {
		display: block;
	}
	.magv[data-view='lesen'] .magv__heft {
		display: none;
	}
}
.magv__switch {
	display: none;
	gap: 2px;
	width: max-content;
	max-width: 100%;
	margin: 0 0 18px;
	padding: 3px;
	border-radius: 999px;
	background: var(--alt-solid);
}
/* Shown with JavaScript on phones, tablets, whenever the reading view is on and in the preview. */
@media (max-width: 859px) {
	.magv[data-js] .magv__switch {
		display: flex;
	}
}
@media (min-width: 860px) and (hover: none) and (pointer: coarse) {
	.magv[data-js] .magv__switch {
		display: flex;
	}
}
.magv[data-js][data-view='lesen'] .magv__switch,
.magv.is-preview[data-js] .magv__switch {
	display: flex;
}
.magv__switch button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: 600 14px/1 var(--font);
	cursor: pointer;
}
.magv__switch button[aria-pressed='true'] {
	background: var(--ink);
	color: var(--bg);
}
.magv__switch button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
/* Release preview: the reading view in phone width. */
.magv.is-preview .magv__read .mread {
	max-width: 430px;
	margin: 0 auto;
	border: 1px solid var(--line2);
	border-radius: 28px;
	box-shadow: var(--card-shadow);
	overflow: clip;
}
.magv.is-preview .magv__read .mread-bar {
	border-width: 0 0 1px;
	border-radius: 0;
}
.magv.is-preview .magv__read .mread__c {
	padding: 0 16px 16px;
}

/* =====================================================================
   2. Reading view
   ===================================================================== */
.mread {
	--mread-fs: 17px;
	--mread-top: 72px;
	--mread-r: 18px;
	position: relative;
	color: var(--ink);
	font-family: var(--font);
}
.mread[data-fs='2'] {
	--mread-fs: 19px;
}
.mread[data-fs='3'] {
	--mread-fs: 22px;
}
.mread *,
.mread *::before,
.mread *::after {
	box-sizing: border-box;
}
.mread h2,
.mread h3,
.mread p,
.mread figure,
.mread ul {
	margin: 0;
}
.mread__c {
	container-type: inline-size;
	container-name: mread;
	background: var(--bg);
}
.mread img {
	max-width: 100%;
	height: auto;
}

/* Buttons */
.mread-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	font: 600 15px/1.2 var(--font);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.mread-btn--accent {
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
}
.mread-btn--dark {
	background: var(--ink);
	color: var(--bg);
}
.mread-btn--line {
	border: 1.5px solid var(--line2);
	background: var(--card);
	color: var(--ink);
}
.mread-btn--soft {
	background: var(--alt-solid);
	color: var(--ink);
}
.mread-btn--ghost {
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	background: transparent;
	color: #ffffff;
}
.mread-btn:focus-visible,
.mread-ibtn:focus-visible,
.mread a:focus-visible,
.mread-chip:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.mread-link {
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--link);
	font: 600 14px/1.3 var(--font);
	text-decoration: underline;
	cursor: pointer;
}
.mread-eyebrow {
	color: var(--link) !important;
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3 !important;
	text-transform: uppercase;
}
.mread-h {
	font-size: 24px;
	font-style: italic;
	font-weight: 800;
	line-height: 1.15;
}
.mread-empty {
	color: var(--muted);
	font-size: 14px;
}

/* Bar: sticky below the site header. */
.mread-bar {
	position: sticky;
	top: var(--mread-top);
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 2px;
	height: 54px;
	padding: 0 4px;
	border: 1px solid var(--line);
	border-radius: 0 0 14px 14px;
	background: var(--bg);
	box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.35);
}
.mread-bar__t {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 6px;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mread-bar__prog {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: -1px;
	height: 3px;
	border-radius: 3px;
	background: var(--accent);
	transform: scaleX(var(--p, 0));
	transform-origin: left center;
}
.mread-ibtn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--ink);
	font: 700 16px/1 var(--font);
	cursor: pointer;
}
.mread-ibtn[hidden] {
	display: none;
}
@media (hover: hover) {
	.mread-ibtn:hover {
		background: var(--alt-solid);
	}
}

/* Opening */
.mread-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 440px;
	margin-top: 14px;
	overflow: hidden;
	border-radius: var(--mread-r);
	background: #1b7d1b linear-gradient(160deg, #30bf30 0%, #145c14 100%);
	color: #ffffff;
}
.mread-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: 50% 30%;
}
.mread-hero.has-img::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 78%;
	background: linear-gradient(180deg, rgba(8, 18, 8, 0) 0%, rgba(8, 18, 8, 0.9) 62%);
}
.mread-hero__in {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	padding: 22px 20px;
}
.mread-hero__issue {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.mread-hero__t {
	color: #ffffff;
	font-size: clamp(30px, 9cqw, 46px);
	font-style: italic;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}
.mread-hero__sub {
	font-size: 17px;
	font-weight: 500;
}
.mread-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
}
.mread-hero__chips span {
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
}
.mread-hero__act {
	display: flex;
	gap: 10px;
	margin-top: 6px;
}
.mread-hero__act .mread-btn--accent {
	flex: 1 1 auto;
}

/* Layout: one column; tablets see section 3. */
.mread__grid {
	display: block;
}
.mread__main {
	min-width: 0;
}

/* Contents */
.mread-toc {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 26px 0 6px;
}
.mread-toc > * {
	flex-shrink: 0;
}
.mread-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
}
.mread-chips::-webkit-scrollbar {
	display: none;
}
.mread-chip {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0 15px;
	border: 1.5px solid var(--line2);
	border-radius: 999px;
	background: var(--card);
	color: var(--ink);
	font: 600 13px/1 var(--font);
	cursor: pointer;
}
.mread-chip[aria-pressed='true'] {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--bg);
}
.mread-toc__g[hidden] {
	display: none;
}
.mread-toc__g > .mread-eyebrow {
	padding: 10px 0 2px;
}
.mread-toc__list {
	padding: 0;
	list-style: none;
}
.mread-toc__list a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
}
.mread-toc__p {
	flex: 0 0 40px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
}
.mread-toc__t {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.mread-toc__t b {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}
.mread-toc__t small {
	color: var(--muted);
	font-size: 12px;
}
.mread-toc__list .ico {
	flex: 0 0 auto;
	color: var(--muted);
}
.mread-toc__list a.is-read b {
	color: var(--text2);
}
.mread-toc__dot {
	flex: 0 0 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 22px;
}
a.is-read .mread-toc__dot::before {
	content: '';
	width: 10px;
	height: 5px;
	margin-top: -3px;
	border-left: 2.4px solid var(--link);
	border-bottom: 2.4px solid var(--link);
	transform: rotate(-45deg);
}
a.is-now .mread-toc__dot::before {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
}

/* Next home game */
.mread-game {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 18px 0 6px;
	padding: 18px 16px;
	border-radius: var(--mread-r);
	background: #18181a;
	color: #ffffff;
}
.mread-game[hidden] {
	display: none;
}
.mread-game__label {
	color: #5fd35f;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.mread-game__teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	overflow-wrap: break-word;
	hyphens: auto;
}
.mread-game__time {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.mread-game__time b {
	font-size: 24px;
	font-style: italic;
	font-weight: 800;
}
.mread-game__time small {
	color: #c9cdc9;
	font-size: 12px;
	font-weight: 500;
}
.mread-game__title {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 16px;
}
.mread-game__where {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #c9cdc9;
	font-size: 13px;
	text-align: center;
}
.mread-game__act {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

/* Articles */
.mread-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-top: 10px;
	scroll-margin-top: calc(
		var(--mread-top) - 36px
	); /* + 100 px scroll-padding of the page (theme.css) = below the bar */
}
/* Release preview: nothing to share yet. */
.mread[data-preview] [data-mread-share],
.mread[data-preview] [data-mread-share-now] {
	display: none;
}
.mread-art {
	padding: 26px 0 18px;
	border-top: 1px solid var(--line);
	scroll-margin-top: calc(
		var(--mread-top) - 36px
	); /* + 100 px scroll-padding of the page (theme.css) = below the bar */
}
.mread-items > .mread-art:first-child {
	border-top: 0;
}
.mread-art__head {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.mread-art__t {
	color: var(--ink);
	font-size: clamp(26px, 7.4cqw, 34px);
	font-style: italic;
	font-weight: 800;
	line-height: 1.12;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.mread-art__meta {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.45;
}
.mread-fig {
	margin: 18px 0 0 !important;
	cursor: zoom-in;
}
.mread-fig img {
	display: block;
	width: 100%;
	border-radius: 14px;
}
.mread-art__body {
	position: relative;
	padding-top: 16px;
}
.mread-art__body.is-cut {
	max-height: calc(var(--mread-fs) * 1.62 * 14);
	overflow: hidden;
}
.mread-art__body.is-cut::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 7em;
	background: linear-gradient(180deg, transparent, var(--bg));
	pointer-events: none;
}
.mread-art__more {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
}
.mread-art__more[hidden] {
	display: none;
}
.mread-art__more .mread-btn {
	min-height: 50px;
}
.mread-art__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.mread-art__foot .mread-btn--dark {
	flex: 1 1 auto;
}
.mread-cont {
	margin: 1.4em 0 0.6em !important;
	color: var(--link);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Text */
.mread-text {
	color: var(--text);
	font-size: var(--mread-fs);
	line-height: 1.62;
	overflow-wrap: break-word;
	hyphens: auto;
}
.mread-text p,
.mread-text ul,
.mread-text ol,
.mread-text blockquote,
.mread-text aside {
	margin: 0 0 0.9em;
}
.mread-text > :last-child {
	margin-bottom: 0;
}
.mread-text h2 {
	margin: 1.3em 0 0.45em;
	color: var(--ink);
	font-size: 1.12em;
	font-weight: 800;
	line-height: 1.25;
}
.mread-text ul,
.mread-text ol {
	padding-left: 1.3em;
}
.mread-text li {
	margin-bottom: 0.3em;
}
.mread-text strong,
.mread-text b {
	color: var(--ink);
	font-weight: 700;
}
.mread-text a {
	color: var(--link);
	text-decoration: underline;
}
.mread-text blockquote {
	padding-left: 0.9em;
	border-left: 4px solid var(--accent);
	color: var(--ink);
	font-style: italic;
}
.mread-text .mag-c-gruen {
	color: var(--link);
}
.mread-text .mag-c-rot {
	color: #c62828;
}
.mread-text .mag-c-grau {
	color: var(--muted);
}
.mread-text .mag-c-gruen strong,
.mread-text .mag-c-rot strong,
.mread-text .mag-c-grau strong,
.mread-text .mag-c-gruen b,
.mread-text .mag-c-rot b,
.mread-text .mag-c-grau b {
	color: inherit;
}
/* Text boxes */
.mread-text blockquote.mag-quote {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0.4em 0 1.1em;
	padding: 18px 18px 16px;
	border: 0;
	border-radius: 16px;
	background: #18181a;
	color: #ffffff;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.4;
}
.mread-text blockquote.mag-quote::before {
	content: '\201E';
	height: 0.55em;
	color: var(--accent);
	font-size: 2.6em;
	font-style: normal;
	font-weight: 800;
	line-height: 0.3;
}
.mread-text blockquote.mag-quote p {
	margin: 0;
}
.mread-text blockquote.mag-quote cite,
.mread-text blockquote.mag-quote strong {
	color: #ffffff;
}
.mread-text cite {
	display: block;
	color: #c9cdc9 !important;
	font-size: 0.75em;
	font-style: normal;
	font-weight: 500;
}
.mread-text aside.mag-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: 8px;
	margin: 0.3em 0 1.1em;
}
.mread-text aside.mag-facts p {
	margin: 0;
	padding: 12px 10px;
	border-radius: 14px;
	background: var(--alt-solid);
	color: var(--text2);
	font-size: 12px;
	line-height: 1.35;
}
.mread-text aside.mag-facts strong,
.mread-text aside.mag-facts b {
	display: block;
	margin-bottom: 2px;
	color: var(--ink);
	font-size: 22px;
	font-style: italic;
	font-weight: 800;
	line-height: 1.1;
}
.mread-text aside.mag-info {
	padding: 14px 16px;
	border: 1px solid var(--greenline);
	border-radius: 14px;
	background: var(--greenwash);
}
.mread-text aside.mag-info p {
	margin: 0 0 0.5em;
}
.mread-text aside.mag-info > p:last-child {
	margin-bottom: 0;
}
.mread-text aside.mag-info > p:first-child strong:only-child,
.mread-text aside.mag-info > p:first-child b:only-child {
	color: var(--link);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Ads */
.mread-ad {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 14px 16px;
	border-radius: var(--mread-r);
	background: var(--alt-solid);
}
.mread-ad__label {
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.mread-ad__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #ffffff;
	color: var(--ink);
	text-decoration: none;
}
.mread-ad__img {
	display: block;
	width: 100%;
}
.mread-ad__go {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 46px;
	padding: 8px 14px;
	background: var(--ink);
	color: var(--bg);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

/* Photos */
.mread-photo {
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: zoom-in;
}
.mread-photo img {
	display: block;
	width: 100%;
	border-radius: 14px;
}
.mread-photo figcaption {
	color: var(--muted);
	font-size: 12px;
}

/* Data blocks */
.mread-blk {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--mread-r);
	background: var(--card);
	color: var(--text);
	font-size: 14px;
	line-height: 1.4;
}
.mread-blk__head h2 {
	color: var(--ink);
	font-size: 18px;
	font-style: italic;
	font-weight: 800;
	line-height: 1.2;
}
.mread-blk__head p {
	margin-top: 2px;
	color: var(--muted);
	font-size: 12px;
}
.mread-blk .mag-tbl {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.mread-blk .mag-tbl th {
	padding: 6px 4px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	text-align: left;
}
.mread-blk .mag-tbl td {
	padding: 8px 4px;
	border-top: 1px solid var(--line);
	color: var(--ink);
}
.mread-blk .mag-tbl td:nth-child(n + 3),
.mread-blk .mag-tbl th:nth-child(n + 3) {
	text-align: right;
	white-space: nowrap;
}
.mread-blk .mag-tbl tr.is-us td {
	border-top-color: transparent;
	background: var(--active);
	font-weight: 700;
}
.mread-blk .mag-games__h {
	margin: 10px 0 2px;
	color: var(--ink);
	font-size: 14px;
	font-weight: 700;
}
.mread-blk .mag-games {
	margin: 0;
	padding: 0;
	list-style: none;
}
.mread-blk .mag-games li {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	line-height: 1.35;
}
.mread-blk .mag-games--next li {
	grid-template-columns: 44px minmax(0, 1fr);
}
.mread-blk .mag-games__d {
	display: flex;
	flex-direction: column;
	color: var(--muted);
	font-size: 12px;
}
.mread-blk .mag-games__d b {
	color: var(--ink);
	font-weight: 600;
}
.mread-blk .mag-games__m {
	color: var(--ink);
}
.mread-blk .mag-games__m small {
	display: block;
	color: var(--muted);
	font-size: 12px;
}
.mread-blk .mag-games__r {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}
.mread-blk .mag-games__r b {
	color: var(--ink);
	font-size: 17px;
	font-style: italic;
	font-weight: 800;
}
.mread-blk .mag-games__r i {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--alt-solid);
	color: var(--text2);
	font-size: 11px;
	font-style: normal;
	font-weight: 700;
}
.mread-blk .mag-games__r i.is-sieg {
	background: var(--okbg);
	color: var(--okfg);
}
.mread-blk .mag-album {
	display: flex;
	gap: 8px;
	margin-right: -16px;
	padding-right: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.mread-blk .mag-album::-webkit-scrollbar {
	display: none;
}
.mread-blk .mag-album img {
	flex: 0 0 auto;
	width: 72%;
	max-width: 320px;
	height: auto;
	aspect-ratio: 3 / 2;
	border-radius: 12px;
	object-fit: cover;
	scroll-snap-align: start;
}
.mread-blk .mag-evs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}
.mread-blk .mag-evs li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 14px;
	color: var(--text);
	font-size: 13px;
}
.mread-blk .mag-evs b {
	color: var(--ink);
	font-size: 16px;
	line-height: 1.3;
}
.mread-blk .mag-evs .mread-btn {
	margin-top: 6px;
}
.mread-blk .mag-evs__badge {
	background: var(--active);
	color: var(--link);
}

/* Partners (block and end of the issue) */
.mread .mag-partners__h {
	margin: 10px 0 2px;
	color: var(--link);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.mread .mag-partners {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.mread .mag-partners__i {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	padding: 8px 10px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #ffffff;
	color: #262629;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.mread .mag-partners__i img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.mread-partners {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 26px;
	padding: 24px 0 8px;
	border-top: 1px solid var(--line);
}
.mread-partners h2 {
	font-size: 22px;
	font-style: italic;
	font-weight: 800;
}
.mread-partners .mread-btn {
	margin-top: 6px;
}

/* Offline saving */
.mread-off {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	margin: 22px 0 6px;
	text-align: center;
}
.mread-off[hidden] {
	display: none;
}
.mread-off .mread-btn {
	min-height: 52px;
}
.mread-off__note {
	color: var(--muted);
	font-size: 12px;
}
.mread-off.is-saved .mread-btn {
	border-color: var(--greenline);
	background: var(--greenwash);
	color: var(--link);
}

/* =====================================================================
   3. Tablets: contents beside the articles
   ===================================================================== */
@container mread (min-width: 760px) {
	.mread__grid {
		display: grid;
		grid-template-columns: 250px minmax(0, 1fr);
		align-items: start;
		gap: 28px;
		margin-top: 22px;
	}
	.mread-toc {
		position: sticky;
		top: calc(var(--mread-top) + 66px);
		max-height: calc(100vh - var(--mread-top) - 90px);
		padding: 18px 16px;
		overflow: auto;
		border: 1px solid var(--line);
		border-radius: var(--mread-r);
		background: var(--card);
	}
	.mread-toc .mread-h {
		font-size: 18px;
	}
	.mread-toc .mread-chips {
		flex-wrap: wrap;
		gap: 6px;
	}
	.mread-toc .mread-chip {
		min-height: 32px;
		padding: 0 11px;
		font-size: 12px;
	}
	.mread-toc__p {
		display: none;
	}
	.mread-toc__list a {
		min-height: 44px;
		border-bottom: 0;
		padding: 7px 10px;
		margin: 0 -10px;
		border-radius: 10px;
	}
	.mread-toc__list a.is-now {
		background: var(--active);
	}
	.mread-toc__t b {
		font-size: 13px;
	}
	.mread-toc__list .ico {
		display: none;
	}
	.mread__main {
		max-width: 680px;
	}
	.mread-art {
		padding-top: 30px;
	}
	.mread .mag-partners {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* =====================================================================
   4. Contents sheet, image layer, toast
   ===================================================================== */
.mread-sheet {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(10, 12, 10, 0.55);
}
.mread-sheet[hidden] {
	display: none;
}
.mread-sheet__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: min(88vh, 760px);
	max-height: min(88dvh, 760px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	border-radius: 22px 22px 0 0;
	background: var(--bg);
	color: var(--ink);
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
	animation: mread-up 0.25s var(--ease);
	outline: none;
}
@keyframes mread-up {
	from {
		transform: translateY(40px);
		opacity: 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mread-sheet__panel {
		animation: none;
	}
}
.mread-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 10px 0 20px;
}
.mread-sheet__head h2 {
	font-size: 20px;
	font-style: italic;
	font-weight: 800;
}
.mread-sheet__prog {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 4px 20px 12px;
	color: var(--muted);
	font-size: 13px;
}
.mread-meter {
	display: block;
	height: 6px;
	overflow: hidden;
	border-radius: 3px;
	background: var(--track);
}
.mread-meter i {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 3px;
	background: var(--accent);
}
.mread-size {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 20px;
	padding: 12px;
	border-radius: 14px;
	background: var(--alt-solid);
	font-size: 13px;
	font-weight: 600;
}
.mread-size div {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}
.mread-size button {
	min-height: 44px;
	border: 1.5px solid var(--line2);
	border-radius: 10px;
	background: var(--card);
	color: var(--ink);
	font: 600 14px/1 var(--font);
	cursor: pointer;
}
.mread-size button[data-mread-fs='2'] {
	font-size: 15px;
}
.mread-size button[data-mread-fs='3'] {
	font-size: 17px;
}
.mread-size button[aria-pressed='true'] {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--bg);
}
.mread-sheet__list {
	flex: 1 1 auto;
	min-height: 0;
	padding: 8px 20px 4px;
	overflow: auto;
	overscroll-behavior: contain;
}
.mread-sheet__list .mread-toc__list a {
	min-height: 48px;
	margin: 0 -8px;
	padding: 8px;
	border-bottom: 0;
	border-radius: 10px;
}
.mread-sheet__list .mread-toc__list a.is-now {
	background: var(--active);
}
.mread-sheet__list .mread-toc__t b {
	font-size: 14px;
}
.mread-sheet__list .mread-toc__list .ico {
	display: none;
}
.mread-sheet__foot {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 12px 20px 16px;
	border-top: 1px solid var(--line);
}
.mread-sheet__foot .mread-btn {
	padding: 0 10px;
	font-size: 14px;
}
.mread-sheet__foot .mread-btn[hidden] {
	display: none;
}
.mread-sheet__foot .mread-btn:only-child {
	grid-column: 1 / -1;
}
html.mread-lock {
	overflow: hidden;
}
.mread-lightbox {
	position: fixed;
	inset: 0;
	z-index: 130;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 8px 16px;
	overflow: auto;
	background: rgba(8, 8, 10, 0.94);
}
.mread-lightbox img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 6px;
	touch-action: pinch-zoom;
}
.mread-lightbox .mread-ibtn {
	position: fixed;
	top: max(10px, env(safe-area-inset-top, 0px));
	right: 10px;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
}
.mread-toast {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 140;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: 12px;
	background: var(--ink);
	color: var(--bg);
	font-size: 14px;
	font-weight: 600;
	transform: translateX(-50%);
	box-shadow: var(--float-shadow);
}
.mread-toast[hidden] {
	display: none;
}
html.is-app .mread-toast {
	bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}

/* =====================================================================
   5. Page editor: phone preview
   ===================================================================== */
.mread--phone {
	--mread-fs: 15px;
}
.mread--phone .mread-items {
	padding: 0 14px 14px;
}
.mread--phone .mread-art {
	padding-top: 18px;
}
.mread--phone .mread-art__foot {
	display: none;
}
.mread--phone .mread-art__body.is-cut {
	max-height: none;
}
.mread--phone .mread-art__body.is-cut::after {
	display: none;
}
.mread-cont.is-here {
	display: table;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--active);
}
.mread-phone__hints {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 10px;
	padding: 10px 12px 10px 28px;
	border-radius: 12px;
	background: var(--warnbg);
	color: var(--warnfg);
	font-size: 13px;
	line-height: 1.4;
}
