/*
Theme Name: Esfiya
Theme URI: https://www.esfiya.com/
Author: Esfiya
Description: The Esfiya website in the look of the Esfiya app. Standalone: needs no page builder or options framework.
Version: 0.9.36
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: esfiya
*/

/* Fonts
   Thaana only, so English and numbers fall through to the system font as in the app.
-------------------------------------------------------------- */
@font-face {
	font-family: 'Faruma';
	src: url('assets/fonts/Faruma.woff') format('woff');
	font-display: swap;
	unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2;
}
@font-face {
	font-family: 'MVWaheed';
	src: url('assets/fonts/MVWaheed.woff') format('woff');
	font-display: swap;
	/* Thaana, and the digits: a number in a heading is drawn in the heading's own face, as in the app */
	unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2, U+0030-0039;
}

/* Tokens (EsfiyaReactNativeApp/src/contexts/ThemeContext.js)
-------------------------------------------------------------- */
:root {
	--bg: #F4F4F4;
	--surface: #FFFFFF;
	--hover: #E0E0E0;
	--text: #161616;
	--text2: #525252;
	--border: #DDE1E6;
	--primary: #0f6bff;
	--tint: rgba(15, 107, 255, .09);
	--gold: #a86a00;
	--gold-tint: rgba(214, 150, 20, .14);
	--tip: #B45309;
	--tip-tint: rgba(245, 158, 11, .16);
	--glass: rgba(255, 255, 255, .74);
	--error: #DA1E28;
	--success: #24A148;
	--pro: #F1C21B;
	--done: #1F8F55;
	--track: #E4E6EA;
	--glass: rgba(255, 255, 255, .62);
	--glass-thin: rgba(255, 255, 255, .22);
	--glass-line: rgba(255, 255, 255, .8);
	--idle: #333333;
	--faint: rgba(28, 38, 64, .08);
	--cover-line: rgba(255, 255, 255, .12);
	--wash: rgba(244, 244, 244, .72);
	--chip: rgba(0, 0, 0, .08);
	--ink: #161616;
	--quiet: #525252;
	--shadow: rgba(0, 0, 0, .1);
	--cover-shadow: rgba(0, 0, 0, .28);
	--skeleton: #E9EBEE;

	--r-sm: 8px;
	--r-md: 12px;
	--r-lg: 16px;
	--r-xl: 24px;

	--font-body: 'Faruma', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-title: 'MVWaheed', 'Faruma', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-latin: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;

	--reader-size: 28px;
	--wrap: 1240px;
	--gutter: 16px;
	--bar: 76px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #161616;
	--surface: #262626;
	--hover: #393939;
	--text: #F4F4F4;
	--text2: #A8A8A8;
	--border: #393939;
	--tint: rgba(15, 107, 255, .2);
	--gold: #f2b544;
	--gold-tint: rgba(242, 181, 68, .16);
	--tip: #FBBF24;
	--tip-tint: rgba(245, 158, 11, .18);
	--glass: rgba(38, 38, 38, .74);
	--error: #FA4D56;
	--success: #42BE65;
	--track: #232325;
	--glass: rgba(22, 22, 26, .62);
	--glass-thin: rgba(22, 22, 26, .28);
	--glass-line: rgba(255, 255, 255, .16);
	--idle: #A8A8A8;
	--faint: rgba(255, 255, 255, .08);
	--cover-line: transparent;
	--wash: rgba(0, 0, 0, .5);
	--chip: rgba(255, 255, 255, .16);
	--ink: #FFFFFF;
	--quiet: #D0D0D0;
	--shadow: rgba(0, 0, 0, .5);
	--cover-shadow: rgba(0, 0, 0, .65);
	--skeleton: #333333;
	color-scheme: dark;
}

/* Base
-------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 20px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
svg { flex: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.en { font-family: var(--font-latin); }
/* Names are written in either script; each reads in its own order, set to the right. */
.cover .a, .story-card .a, .tile .nm, .by, .author-name, .series-en { unicode-bidi: plaintext; text-align: right; }
.comment-author { unicode-bidi: isolate; }
.tile .nm, .author-name { text-align: center; }
/* English chips keep their own order: icon first, then the word. */
.pro-badge, .story-card .pro, span.tag.pro, .level, .pro-pill, .series-hero .btn, .voice, .spill { direction: ltr; }
.ltr { direction: ltr; }

/* Layout
-------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.site-main { padding-block: 16px 120px; min-height: 70vh; }
.layout { display: block; }
.layout > .content { min-width: 0; }
.rail { display: none; }
.narrow { max-width: 760px; margin-inline: auto; }

@media (min-width: 768px) {
	.site-main { padding-block: 24px 64px; }
}
@media (min-width: 1024px) {
	.layout.has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
	.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--bar) + 16px); }
	.admin-bar .rail { top: calc(var(--bar) + 48px); }
}

/* Top bar (tablet and desktop)
-------------------------------------------------------------- */
.top { display: none; }
@media (min-width: 768px) {
	.top {
		display: block; position: sticky; top: 0; z-index: 50; height: var(--bar);
		background: var(--glass); border-bottom: 1px solid var(--border);
		-webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
	}
	.admin-bar .top { top: 32px; }
	.top-in { height: 100%; display: flex; align-items: center; gap: 20px; }
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 30px; line-height: 44px; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.links a { height: 44px; padding-inline: 14px; display: flex; align-items: center; border-radius: 22px; font-size: 20px; color: var(--text2); white-space: nowrap; }
.links a:hover { color: var(--text); background: var(--hover); }
.links .current-menu-item > a, .links a[aria-current="page"] { color: var(--primary); background: var(--tint); }
.links li { position: relative; }
.links .sub-menu {
	display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 200px; margin: 0; padding: 8px; list-style: none;
	background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 12px var(--shadow);
}
.links li:hover > .sub-menu, .links li:focus-within > .sub-menu { display: block; }
.links .sub-menu a { border-radius: 10px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
/* A long menu never squeezes the search box out: links that do not fit are left to the menu sheet. */
.top nav { flex: 0 1 auto; min-width: 0; height: 44px; overflow: hidden; }
.top .links { flex-wrap: wrap; }
.top .search { flex: 1 1 220px; min-width: 220px; }
@media (max-width: 1099px) { .top nav { display: none; } }
@media (max-width: 899px) { .top .brand { font-size: 0; gap: 0; } }

/* Search pill. Named with its element: WordPress puts the classes search, tag and date on <body> on those pages.
-------------------------------------------------------------- */
form.search {
	display: flex; align-items: center; gap: 10px; min-height: 48px; border-radius: 24px; padding-inline: 16px;
	background: var(--surface); border: 1px solid var(--border); color: var(--text2); flex: 1 1 0; min-width: 0; margin: 0;
}
form.search input {
	flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--font-title);
	font-size: 20px; line-height: 34px; color: var(--text); text-align: start; -webkit-appearance: none; appearance: none;
}
form.search input::placeholder { color: var(--text2); font-family: var(--font-body); }
form.search input::-webkit-search-cancel-button { display: none; }
form.search button { border: 0; background: none; padding: 0; display: flex; color: inherit; }

/* Phone header: the app's floating glass search pill */
.phone-top { position: sticky; top: 0; z-index: 50; padding: 8px var(--gutter) 0; pointer-events: none; }
.admin-bar .phone-top { top: 46px; }
@media (max-width: 600px) { .admin-bar .phone-top { top: 0; } }
.phone-top .search {
	pointer-events: auto; min-height: 56px; border-radius: 28px; padding-inline: 8px 16px;
	background: var(--glass); border-color: var(--glass-line); box-shadow: 0 3px 4px var(--shadow);
	-webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.phone-top .search img { width: 40px; height: 40px; border-radius: 50%; display: block; }
@media (min-width: 768px) { .phone-top { display: none; } }

/* Bottom bar (phones): the app's floating glass tab bar. As in the app it is
   as wide as its tabs and sits in the middle, not stretched from side to side.
-------------------------------------------------------------- */
.tabs {
	position: fixed; inset-inline: 16px; bottom: calc(max(env(safe-area-inset-bottom), 8px) + 8px); z-index: 60;
	width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
	height: 64px; border-radius: 32px; padding-inline: 16px; display: flex; align-items: center; justify-content: center;
	background: var(--glass-thin); border: 1px solid var(--glass-line); box-shadow: 0 4px 7px rgba(0, 0, 0, .16);
	-webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.tabs a, .tabs button {
	flex: 0 1 auto; min-width: 48px; height: 52px; padding: 0 10px; border: 0; background: none; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 4px; color: var(--idle);
	font-family: var(--font-latin); font-weight: 600; font-size: 12px; line-height: 14px; transition: transform .15s;
}
.tabs a:active, .tabs button:active { transform: scale(.94); }
.tabs .on { color: var(--primary); }
@media (min-width: 768px) { .tabs { display: none; } }

/* Category chips
-------------------------------------------------------------- */
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 16px 0; margin: 0; list-style: none; padding-inline: 0; }
.cats::-webkit-scrollbar { display: none; }
.cat { display: inline-flex; align-items: center; height: 36px; border-radius: 18px; padding-inline: 16px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; white-space: nowrap; }
.cat:hover { background: var(--hover); }
.cat.on, .current-cat > .cat { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Buttons and small parts
-------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: var(--r-md);
	padding: 0 18px; background: var(--primary); color: #fff; font-size: 19px; box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.ghost {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--r-md);
	padding: 0 16px; border: 1px solid var(--border); background: var(--surface); font-size: 19px;
}
.ghost:hover { background: var(--hover); }
.round {
	width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
	color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.round:hover { background: var(--hover); }
.h { font-family: var(--font-title); font-size: 28px; line-height: 44px; }
.h-sm { font-family: var(--font-title); font-size: 24px; line-height: 36px; }
.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block { padding-bottom: 24px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 34px; border-radius: 17px; padding-inline: 14px; background: var(--surface); font-size: 18px; line-height: 28px; white-space: nowrap; }
.pill:hover { background: var(--hover); }
.count { display: inline-flex; align-items: center; height: 30px; border-radius: 15px; padding-inline: 12px; background: var(--tint); color: var(--primary); font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.field { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; background: var(--bg); color: var(--text); font-size: 18px; font-family: var(--font-body); }
.field:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.empty { padding: 48px 16px; text-align: center; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 14px; font-family: var(--font-title); font-size: 20px; }
.empty .disc { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; }

/* Series / latest switch, with the Shorts link when it is set.
   Look 01 with icons (Ariph, 2026-09-29; docs/design/home-switch): each part has
   its icon and dark words, and a thin line parts two that are not chosen, so
   they read as buttons.
-------------------------------------------------------------- */
.switch { --switch-line: rgba(22, 22, 22, .2); display: flex; height: 48px; border-radius: 24px; padding: 4px; background: var(--track); margin-bottom: 14px; }
:root[data-theme="dark"] .switch { --switch-line: rgba(255, 255, 255, .18); }
.switch a { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 20px; font-size: 20px; color: var(--text); white-space: nowrap; }
.switch a svg { flex: none; opacity: .8; }
.switch a:hover { background: var(--faint); }
.switch a.on, .switch a.on:hover { background: var(--primary); color: #fff; box-shadow: 0 2px 5px rgba(15, 107, 255, .45); }
.switch a.on svg { opacity: 1; }
.switch a + a::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 1px; height: 20px; margin-top: -10px; background: var(--switch-line); }
.switch a.on::before, .switch a.on + a::before, .switch a:hover::before, .switch a:hover + a::before { display: none; }
.switch.three a { flex: 1 1 auto; padding: 0 8px; }
@media (max-width: 379px) { .switch.three a { font-size: 18px; gap: 5px; padding: 0 5px; } .switch.three a svg { width: 16px; height: 16px; } }
@media (max-width: 339px) { .switch.three a svg { display: none; } }
@media (min-width: 768px) { .switch { max-width: 380px; } .switch.three { max-width: 520px; } }

/* Rows and grids
-------------------------------------------------------------- */
.row {
	display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
	margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; flex: none; }
.row.tight { gap: 10px; }
.row.tiles { gap: 8px; }
@media (min-width: 1024px) { .row { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
/* The tile that ends a row when the list goes on */
.row-end {
	min-width: 116px; border-radius: var(--r-md); border: 1px dashed var(--border); background: var(--surface); color: var(--text);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-title); font-size: 20px; line-height: 30px;
}
.row-end:hover { background: var(--hover); }
.row-end .disc { width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.row.tiles .row-end { min-width: 96px; border-radius: 14px; }

/* A sideways list that is cut off at a side fades out there, into whatever is behind it:
   the page's own colour, light or dark. theme.js says which sides are cut. */
.cut-left, .cut-right {
	--cut-l: 0px; --cut-r: 0px;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--cut-l), #000 calc(100% - var(--cut-r)), transparent);
	mask-image: linear-gradient(to right, transparent, #000 var(--cut-l), #000 calc(100% - var(--cut-r)), transparent);
}
.cut-left { --cut-l: 48px; }
.cut-right { --cut-r: 48px; }
@media (min-width: 1024px) {
	.cut-left { --cut-l: 72px; }
	.cut-right { --cut-r: 72px; }
}

/* A row's arrow buttons, for readers with a mouse */
.row-wrap { position: relative; }
.row.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.row.dragging a { pointer-events: none; }
.row img { -webkit-user-drag: none; }
.row-btn { display: none; }
@media (hover: hover) and (pointer: fine) {
	.row { cursor: grab; }
	.row-btn {
		position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -22px; padding: 0; border-radius: 50%;
		border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 4px 8px var(--shadow);
		display: flex; align-items: center; justify-content: center;
	}
	.row-btn:hover { background: var(--hover); }
	.row-btn[hidden] { display: none; }
	.row-btn.back { inset-inline-start: -14px; }
	.row-btn.more { inset-inline-end: -14px; }
	.row-wrap.block .row-btn { margin-top: -34px; }
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.w-top { width: min(180px, calc((100vw - 60px) / 2.25)); }

/* Home Top 10 as the Cover Glow stage (assets/js/top-stage.js). Hidden until the
   stage starts; the row of cards above stays for readers it cannot run for. */
/* The stage is --stage tall. Its top 7% and bottom are empty wall and floor fading
   into the page, so it rises under the heading (which stays on top) and the title
   line rises onto the floor, 10px under the numerals' feet (81% down). */
.marquee { --stage: clamp(420px, 56vw, 520px); margin-inline: calc(-1 * var(--gutter)); margin-top: calc(-0.07 * var(--stage)); }
.top-head { position: relative; z-index: 2; }
.marquee.block { padding-bottom: 40px; }   /* room between the title line and the next row */
.marquee[hidden] { display: none; }
.top-stage .marquee[hidden] { display: block; }   /* the stage's space is kept while Three.js loads */
.top-stage #topRow, .top-stage .row-wrap:has(> #topRow) { display: none; }
.mq-stage { position: relative; height: var(--stage); }
/* The stage as a still while Three.js and the covers load (drawn by front-page.php, as the app's StageLoading):
   wall and floor, the glass 1 and 2, the card in focus and the next one as shimmering bones. It fades once the
   stage has drawn (top-stage.js adds .on). Light by default; the dark look under [data-theme="dark"]. */
.mq-skel { --wall: linear-gradient(#eceae7, #f0eeeb 45%, #ebe9e6); --floor: linear-gradient(rgba(235,233,230,0), rgba(222,220,217,.9) 10%, #e4e2df); --glow: rgba(210,196,176,.18);
	--bone: #dcdad6; --bone-hi: #ebe9e5; --line: rgba(0,0,0,.07); --shine: rgba(200,198,194,.45); --glass: rgba(255,255,255,.55); --halo: rgba(90,96,110,.12); --rim: rgba(87,92,107,.75); --near-shadow: rgba(0,0,0,.22);
	position: absolute; inset: 0; overflow: hidden; background: var(--wall); pointer-events: none; transition: opacity .35s ease; }
:root[data-theme="dark"] .mq-skel { --wall: linear-gradient(#0b0b0e, #101015 45%, #08080a); --floor: linear-gradient(rgba(8,8,10,0), rgba(24,24,30,.9) 10%, #08080a); --glow: rgba(120,112,100,.1);
	--bone: #1c1c21; --bone-hi: #2c2c33; --line: rgba(255,255,255,.08); --shine: rgba(40,40,48,.5); --glass: rgba(255,255,255,.045); --halo: rgba(214,222,236,.22); --rim: rgba(236,240,248,.78); --near-shadow: rgba(0,0,0,.6); }
.mq-skel > * { position: absolute; display: block; }
.mq-skel .glow { background: var(--glow); border-radius: 50%; filter: blur(24px); }
.mq-skel .floor { left: 0; right: 0; bottom: 0; background: var(--floor); }
.mq-skel .num { fill: var(--glass); stroke: var(--rim); stroke-width: 1.4px; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px var(--halo)); }
.mq-skel .num.soft { opacity: .45; filter: blur(2.5px); }
.mq-skel .bone, .mq-skel-line .bone { background: linear-gradient(100deg, var(--bone) 40%, var(--bone-hi) 50%, var(--bone) 60%) 100% 0 / 300% 100% var(--bone); animation: mq-sweep 1.5s ease-in-out infinite; }
.mq-skel .far { border-radius: 12px; opacity: .4; }
.mq-skel .near { border-radius: 13px; box-shadow: 0 12px 18px var(--near-shadow); }
.mq-skel .near b { position: absolute; right: 14px; bottom: 36px; width: 72%; height: 12px; border-radius: 6px; background: var(--line); }
.mq-skel .near b + b { bottom: 16px; width: 38%; height: 8px; }
.mq-skel .shine { border-radius: 12px; background: linear-gradient(var(--shine), transparent); }
.mq-skel .edges { inset: 0; background: linear-gradient(to right, var(--bg), transparent var(--edge), transparent calc(100% - var(--edge)), var(--bg)), linear-gradient(var(--bg), transparent 24%, transparent 80%, var(--bg)); }
.mq-skel-line { --bone: var(--skeleton); --bone-hi: var(--hover); position: absolute; inset-inline: var(--gutter); top: 16px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; transition: opacity .35s ease; }
.mq-skel-line i { display: block; height: 28px; width: min(380px, 62%); border-radius: 8px; }
.mq-skel-line i + i { height: 12px; width: min(180px, 30%); border-radius: 6px; }
.mq-stage.on .mq-skel, .mq-now.on .mq-skel-line { opacity: 0; }
.mq-now:not(.on) .mq-text { visibility: hidden; }   /* its dot would show on the bone before the title comes */
.mq-stage.on .bone, .mq-now.on .bone { animation: none; }
@keyframes mq-sweep { 0% { background-position: 100% 0; } 75%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .mq-skel .bone, .mq-skel-line .bone { animation: none; } }
#stage { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline: 0; -webkit-tap-highlight-color: transparent; }
#stage.dragging { cursor: grabbing; }
#stage:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.mq-stage .row-btn { display: none; }
@media (hover: hover) and (pointer: fine) {
	.mq-stage .row-btn { display: flex; top: 50%; bottom: auto; margin-top: -22px; background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
	.mq-stage .row-btn[hidden] { display: none; }
	.mq-stage .row-btn.back { inset-inline-start: 18px; }
	.mq-stage .row-btn.more { inset-inline-end: 18px; }
}
.mq-now { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: var(--gutter); margin-top: calc(10px - 0.19 * var(--stage)); min-height: 76px; }
.mq-text { min-width: 0; flex: 1 1 0; transition: opacity .18s ease; }
.mq-text.swap { opacity: 0; }
.mq-text .t { display: block; font-family: var(--font-title); font-size: 36px; line-height: 54px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 4px 10px; }
.mq-text .a { display: flex; align-items: center; gap: 8px; font-family: var(--font-latin); font-weight: 600; font-size: 14px; line-height: 22px; color: var(--text2); }
.mq-text .a bdi { unicode-bidi: plaintext; }
.mq-text .a i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.mq-text .a .e { font-family: var(--font-title); font-weight: 400; font-size: 16px; }
@media (min-width: 768px) {
	.mq-text .t { font-size: 42px; line-height: 62px; }
}
@media (min-width: 1024px) {
	.marquee { margin-inline: 0; }
	.mq-now { padding-inline: 28px; }   /* the title sits inside the stage's edge, its slanted letters not cut */
}
@media (prefers-reduced-motion: reduce) { .mq-text { transition: none; } }
.w-row { width: 142px; }
@media (min-width: 768px) { .w-row { width: 160px; } }

/* Series cover card (SeriesCoverCard.js)
-------------------------------------------------------------- */
.cover {
	position: relative; display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 2 / 3;
	background: var(--skeleton) center / cover no-repeat; border: 1px solid var(--cover-line);
}
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .6) 70%, rgba(0, 0, 0, .92) 100%); }
.cover .cap { position: absolute; inset-inline: 10px; bottom: 10px; display: block; text-align: start; }
.cover .t {
	font-family: var(--font-title); font-size: 22px; line-height: 34px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cover .a { display: block; font-family: var(--font-latin); font-weight: 600; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover.has-audio .cap { inset-inline-end: 44px; }
.cover:hover > img { transform: scale(1.03); }
.cover > img { transition: transform .25s ease; }
.ribbon {
	position: absolute; top: 0; inset-inline-start: 12px; width: 34px; height: 47px; padding-top: 8px; background: var(--primary); color: #fff;
	font-family: var(--font-latin); font-weight: 800; font-size: 18px; line-height: 22px; text-align: center;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 9px), 0 100%);
}
.eps { position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 10px; padding: 2px 8px; font-family: var(--font-title); font-size: 15px; line-height: 22px; }
.stamp { position: absolute; top: 0; inset-inline-end: 0; background: rgba(0, 0, 0, .6); color: #fff; border-end-start-radius: 12px; padding: 6px 10px 3px; text-align: center; }
.stamp b { display: block; font-family: var(--font-latin); font-weight: 800; font-size: 22px; line-height: 24px; }
.stamp i { display: block; font-style: normal; font-family: var(--font-title); font-size: 13px; line-height: 18px; }
span.tag { position: absolute; top: 8px; inset-inline-start: 8px; border-radius: 9px; padding: 2px 7px; background: var(--done); color: #fff; font-family: var(--font-title); font-size: 14px; line-height: 20px; }
/* PRO is written left to right, and an offset follows the direction of the element it is on: named here so that it stays on the side away from the episode count */
span.tag.pro { inset-inline: auto 8px; background: var(--pro); color: #000; font-family: var(--font-latin); font-weight: 800; font-size: 12px; line-height: 18px; }
.audio-badge { position: absolute; inset-inline-end: 10px; bottom: 8px; display: flex; border-radius: 999px; padding: 4px 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.audio-badge.plain { position: static; display: inline-flex; background: var(--tint); color: var(--primary); }

/* A series with more than one episode shows two book spines behind the cover */
.set { position: relative; padding-inline-end: 10px; }
.set::before, .set::after { content: ""; position: absolute; width: 30px; border-radius: var(--r-md); border: 1.5px solid var(--bg); }
.set::before { inset-inline-end: 0; top: 12px; bottom: 12px; background: #777; }
.set::after { inset-inline-end: 5px; top: 7px; bottom: 7px; background: #4d4d4d; }
.set .cover { z-index: 1; }
.set.single::before, .set.single::after { display: none; }

/* Story card (ArticleCard.js, compact)
-------------------------------------------------------------- */
.story-card {
	position: relative; display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 3 / 4;
	background: var(--skeleton); border: 1px solid var(--cover-line);
}
.story-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.story-card:hover > img { transform: scale(1.03); }
.story-card .scrim {
	position: absolute; inset: 0;
	background:
		radial-gradient(circle at 100% 100%, rgba(0, 0, 0, .6), rgba(0, 0, 0, .25) 45%, transparent 90%),
		linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .8) 82%, rgba(0, 0, 0, .95) 100%);
}
.story-card .badges { position: absolute; top: 8px; inset-inline: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.story-card .kind { border-radius: 6px; padding: 2px 8px; background: var(--primary); color: #fff; font-family: var(--font-title); font-size: 16px; line-height: 24px; }
.story-card .pro, .pro-badge { display: inline-flex; align-items: center; gap: 3px; border-radius: 6px; padding: 4px 7px; background: var(--pro); color: #000; font-family: var(--font-latin); font-weight: 700; font-size: 12px; line-height: 14px; }
.story-card .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 24px 12px 10px; display: block; text-align: start; }
.story-card .t {
	font-family: var(--font-title); font-size: 20px; line-height: 32px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
	display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story-card .a { display: block; font-family: var(--font-latin); font-weight: 600; font-size: 14px; line-height: 20px; color: #fff; }
.story-card .d { display: block; font-family: var(--font-latin); font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .75); }

/* Cover without a picture: the app's fallback art */
.no-art { background-image: linear-gradient(135deg, #294C68, #101B32); }
.no-art::before { content: ""; position: absolute; width: 90%; aspect-ratio: 1; inset-inline-start: -30%; top: -12%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); }
.no-art::after { content: ""; position: absolute; width: 26%; aspect-ratio: 1; inset-inline-end: 14%; top: 14%; border-radius: 50%; background: rgba(255, 255, 255, .22); }

/* Author tile (AuthorsSection.js) and avatar
-------------------------------------------------------------- */
.tile {
	position: relative; width: calc((100vw - 32px - 24px) / 4); max-width: 120px; min-width: 84px; height: 140px; border-radius: 14px;
	border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center;
	justify-content: center; overflow: hidden; padding-inline: 4px;
}
:root[data-theme="dark"] .tile { background: linear-gradient(to bottom, #393939, #262626); }
.tile .rk { position: absolute; top: -6px; inset-inline-end: 6px; font-family: var(--font-latin); font-weight: 800; font-size: 64px; line-height: 72px; color: var(--faint); }
.tile .rk.two { font-size: 50px; }
.tile .nm { font-family: var(--font-latin); font-weight: 700; font-size: 16px; line-height: 24px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .ct { font-size: 16px; line-height: 24px; color: var(--text2); }
.avatar {
	position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 2px solid var(--border); overflow: hidden;
	display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-latin); font-weight: 700; font-size: 22px;
	background: #294C68; margin-bottom: 4px;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.t1 { background: #6A3B57; } .avatar.t2 { background: #2F5D50; } .avatar.t3 { background: #5A4A2F; } .avatar.t4 { background: #3D3F7A; }
.avatar.big { width: 104px; height: 104px; font-size: 40px; border-color: rgba(255, 255, 255, .6); }
.avatar.small { width: 32px; height: 32px; font-size: 14px; border: 0; margin: 0; }
.avatar.mid { width: 44px; height: 44px; font-size: 17px; border: 0; margin: 0; }

/* Adverts
-------------------------------------------------------------- */
.ad { display: block; border-radius: var(--r-md); overflow: hidden; }
.ad { line-height: 0; }
.ad figure, .ad p { margin: 0; }
.ad a { display: block; }
/* A picture narrower than its place is widened to it: the block styles keep a picture at its own width. */
.rail .ad img, .ad-banners .ad img, .ad-inline .ad img { display: block; width: 100%; height: auto; }
.ad-banners { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.pager + .ad-banners { padding-top: 24px; }
.ad-banners.limit .ad, .ad-inline.limit .ad { background: var(--card); }
.ad-banners.limit .ad img, .ad-inline.limit .ad img { width: auto; max-width: 100%; max-height: var(--ad-tall); margin-inline: auto; }
/* One advert between other things: the paragraphs of a story, the cards of a list. */
.ad-inline { display: block; }
.story-body .ad-inline { margin-block: 4px 28px; }
.story-body .ad-inline .ad { max-width: 560px; margin-inline: auto; }
.grid > .ad-inline { grid-column: 1 / -1; }
@media (min-width: 1024px) { .ad-inline.phone { display: none; } }
@media (max-width: 1023.98px) { .ad-inline.desk { display: none; } }
.ad-banners.swipe { flex-direction: row; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.ad-banners.swipe::-webkit-scrollbar { display: none; }
.ad-banners.swipe .ad { flex: 0 0 86%; scroll-snap-align: start; }
.ad-banners.swipe .ad:only-child { flex-basis: 100%; }
@media (min-width: 1024px) { .ad-banners { display: none; } }
.inpostad:empty { display: none; }
.inpostad { margin-block: 0 24px; }

/* Reading page (StoryHeader.js, StoryDetailScreen.js)
-------------------------------------------------------------- */
.read { position: relative; }
.read-head { position: relative; padding: 106px 24px 36px; margin-inline: calc(-1 * var(--gutter)); margin-top: -16px; overflow: hidden; }
.read-head .backdrop { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.read-head .backdrop img { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); max-width: none; object-fit: cover; filter: blur(40px); }
.read-head .backdrop::before { content: ""; position: absolute; inset: 0; background: var(--wash); z-index: 1; }
.read-head .backdrop::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 220px; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: 2; }
.read-head > :not(.backdrop) { position: relative; z-index: 3; }
.read-title { font-family: var(--font-title); font-size: 36px; line-height: 54px; color: var(--ink); overflow-wrap: anywhere; }
.read-row { display: flex; gap: 14px; margin-top: 10px; align-items: flex-start; }
.read-art { width: clamp(140px, 42vw, 200px); flex: none; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 18px 24px var(--cover-shadow); background: var(--skeleton); }
.read-art img { display: block; width: 100%; height: auto; min-height: 140px; max-height: 356px; object-fit: cover; }
.byline { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.episode { font-family: var(--font-latin); font-weight: 700; font-size: 13px; line-height: 18px; letter-spacing: 1.7px; text-transform: uppercase; color: var(--quiet); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; border-radius: 12px; padding: 2px 10px; background: var(--chip); color: var(--ink); font-family: var(--font-title); font-size: 16px; line-height: 24px; }
.by { font-family: var(--font-latin); font-weight: 700; font-size: 17px; color: var(--ink); }
.level { display: inline-flex; align-items: center; gap: 5px; border-radius: 12px; padding: 3px 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text2); font-family: var(--font-latin); font-weight: 600; font-size: 13px; line-height: 18px; }
.level img { width: 16px; height: 16px; object-fit: contain; }
time.date { font-family: var(--font-latin); font-size: 14px; color: var(--quiet); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges img { width: 28px; height: 28px; object-fit: contain; }
.pro-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 12px; padding: 4px 10px; background: var(--primary); color: #fff; font-family: var(--font-latin); font-weight: 800; font-size: 13px; letter-spacing: .4px; margin-bottom: 6px; }
.pro-pill.open { background: rgba(0, 0, 0, .55); }

.read-head > .fabs { position: absolute; top: 50px; inset-inline: 16px; z-index: 5; display: flex; justify-content: space-between; direction: ltr; }
.fabs > div { display: flex; gap: 10px; }
.fab { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.fab:hover { background: rgba(0, 0, 0, .75); color: #fff; }
[data-copied] { outline: 2px solid var(--success); outline-offset: 2px; }

/* Heart, save, follow author, tip (SocialControls.js, TipControl.js)
-------------------------------------------------------------- */
.social { display: flex; gap: 8px; }
.social-note { margin: 8px 0 0; font-family: var(--font-latin); font-size: 14px; line-height: 22px; color: var(--text2); text-align: center; }
.social-note a { color: var(--primary); font-weight: 700; }
.spill[data-busy], .pbtn[data-busy], .arow[data-busy] { opacity: .7; }
.spill {
	flex: 1 1 0; min-width: 0; min-height: 44px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
	display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-latin); font-weight: 700; font-size: 14px; padding: 0 8px;
}
.spill[aria-pressed="true"] { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.spill[aria-pressed="true"] svg { fill: currentColor; }
/* Quiet: icon and text with no pill, grey until on */
.social.quiet { gap: 14px; }
.social.quiet .spill { flex: 0 1 auto; min-height: 44px; border: 0; border-radius: var(--r-md); background: none; color: var(--text2); gap: 8px; padding: 0 6px; font-weight: 600; font-size: 16px; white-space: nowrap; }
.social.quiet .spill svg { flex: none; }
.social.quiet .spill[aria-pressed="true"] { background: none; color: var(--primary); }
/* Follow author and Tip the author */
.pbtn {
	min-height: 48px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 18px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-latin); font-weight: 700; font-size: 16px; white-space: nowrap; direction: ltr;
}
.pbtn svg { flex: none; }
.pbtn:hover { filter: brightness(1.06); }
.pbtn[aria-pressed="true"] { background: var(--tint); border-color: var(--primary); color: var(--primary); }
.pbtn.fill { background: var(--primary); border-color: var(--primary); color: #fff; }
.pbtn.fill[aria-pressed="true"] { background: var(--tint); border-color: transparent; color: var(--primary); }
.pbtn.tip svg { color: var(--tip); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; direction: ltr; color: inherit; }
.who .id { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.who .nm { font-family: var(--font-latin); font-weight: 700; font-size: 18px; line-height: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.who .sub { font-family: var(--font-latin); font-size: 14px; line-height: 20px; color: var(--text2); white-space: nowrap; }

/* The author's panel on the reading page: under the cover on a phone, beside it on a wide page */
.read-row { flex-wrap: wrap; }
.read-panel {
	flex: 1 1 100%; min-width: 0; margin-top: 6px; border-radius: 20px; border: 1px solid var(--border); background: var(--glass); padding: 14px 16px; direction: ltr;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who follow" "rule rule" "quiet tip" "note note"; align-items: center; column-gap: 10px; row-gap: 10px;
}
.read-panel .who { grid-area: who; }
.read-panel [data-act="follow"] { grid-area: follow; min-height: 40px; padding: 0 12px; font-size: 15px; }
.read-panel .rule { grid-area: rule; height: 1px; background: var(--border); }
.read-panel [data-tip] { grid-area: tip; min-height: 44px; padding: 0 12px; font-size: 15px; }
.read-panel .social.quiet { grid-area: quiet; }
.read-panel .social-note { grid-area: note; margin: 0; }
/* On a phone the heart shows its number alone, to leave room for Tip the author */
.read-panel .social.quiet [data-unit] { display: none; }

/* Where the story ends: rows that say what they do */
.end-list { margin: 8px 0 24px; direction: ltr; }
.end-list .rows { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; }
.end-list .social-note { text-align: left; }
.arow { width: 100%; min-height: 72px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; font-family: var(--font-latin); }
.arow:last-child { border-bottom: 0; }
.arow:hover { background: var(--hover); }
.arow .tile-i { width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--bg); color: var(--text2); display: flex; align-items: center; justify-content: center; }
.arow .rt { flex: 1 1 0; min-width: 0; }
.arow b { display: block; font-weight: 700; font-size: 16px; line-height: 24px; }
.arow small { display: block; font-size: 14px; line-height: 20px; color: var(--text2); }
.arow > svg { flex: none; color: var(--text2); }
.arow[aria-pressed="true"] .tile-i { background: var(--primary); color: #fff; }
.arow[aria-pressed="true"] b { color: var(--primary); }
.arow[data-act="heart"][aria-pressed="true"] svg, .arow[data-act="save"][aria-pressed="true"] svg { fill: currentColor; }
.arow.tip .tile-i { background: var(--tip-tint); color: var(--tip); }

.story-body { font-size: var(--reader-size); line-height: 1.75; text-align: start; overflow-wrap: break-word; padding-block: 8px 0; }
.story-body p { margin: 0 0 24px; }
.story-body h1, .story-body h2 { font-weight: 700; margin: 0 0 16px; }
.story-body h1 { font-size: 28px; } .story-body h2 { font-size: 24px; }
.story-body a { color: var(--primary); text-decoration: underline; }
.story-body blockquote { margin: 16px 0; padding-inline-start: 16px; border-inline-start: 4px solid var(--primary); font-style: italic; color: var(--text2); }
.story-body img { border-radius: var(--r-md); }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 24px; }
.after-story { display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 768px) {
	.read-head { max-width: 760px; margin: 0 auto; border-radius: var(--r-xl); padding: 32px 32px 24px; }
	.read-head .backdrop::after { height: 120px; }
	.read-head > .fabs { position: relative; top: auto; inset-inline: auto; margin-bottom: 16px; }
	.read-title { font-size: 44px; line-height: 66px; }
	.read-row { gap: 24px; }
	.read-art { width: 200px; }
	.read-row { flex-wrap: nowrap; }
	.byline:not(:last-child) { flex: 0 1 auto; max-width: 200px; }
	.read-panel { flex: 1 1 0; align-self: stretch; align-content: center; margin-top: 0; padding: 18px 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "follow" "tip" "quiet" "note"; }
	.read-panel .rule { display: none; }
	.read-panel [data-act="follow"], .read-panel [data-tip] { min-height: 48px; font-size: 16px; }
	.read-panel .social.quiet { justify-content: space-around; }
	.read-panel .social.quiet [data-unit] { display: inline; }
	.end-list .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 0; border-radius: 0; background: none; overflow: visible; }
	.arow, .arow:last-child { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
	.arow:hover { background: var(--hover); }
}

/* Audio card (StoryAudioPlayer.js)
-------------------------------------------------------------- */
.audio { direction: ltr; border-radius: var(--r-xl); font-family: var(--font-latin); margin-block: 24px 8px; }
.audio-top { display: flex; align-items: center; gap: 10px; }
.audio-play .when-playing, [data-playing] .audio-play .when-paused { display: none; }
[data-playing] .audio-play .when-playing, .audio-play span { display: flex; }
.audio[data-loading] .audio-play { opacity: .6; }
.audio .social-note { text-align: left; }
.audio audio { display: none; }
.audio-play { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; padding: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.audio-name { flex: 1 1 0; min-width: 0; }
.audio-name b { display: block; font-weight: 700; font-size: 17px; line-height: 24px; }
.audio-name span { font-size: 14px; line-height: 20px; color: var(--text2); }
.audio-name .voice { margin-inline-start: 6px; font-size: 12px; vertical-align: 1px; }
/* The slider is the clip's own waveform, blue where it has played; without one, a plain slider */
.audio-wave { position: relative; margin-top: 16px; }
.wave-bars { display: flex; align-items: center; gap: 2px; }
.wave-bars i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--border); }
.wave-bars i.p { background: var(--primary); }
.audio-wave .wave-bars { display: none; height: 56px; }
.has-wave .audio-wave .wave-bars { display: flex; }
.has-wave .audio-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.has-wave .audio-wave:focus-within { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
/* Follow text: a switch, between the two times */
.follow { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; min-height: 32px; background: none; color: var(--text2); font-weight: 600; font-size: 14px; }
.follow i { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--border); transition: background .15s; }
.follow i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.follow[aria-checked="true"] i { background: var(--primary); }
.follow[aria-checked="true"] i::after { transform: translateX(16px); }
.audio .round { font-weight: 700; font-size: 13px; }
.audio .round[aria-pressed="true"] { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.audio-seek { display: block; width: 100%; margin: 0; }

/* Sliders: a thin track in the theme's colours, in both modes */
.audio-seek, .size-row input, .short-scrub { -webkit-appearance: none; appearance: none; height: 24px; background: transparent; cursor: pointer; }
.audio-seek::-webkit-slider-runnable-track, .size-row input::-webkit-slider-runnable-track, .short-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--border); }
.audio-seek::-moz-range-track, .size-row input::-moz-range-track, .short-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: var(--border); }
.audio-seek::-webkit-slider-thumb, .short-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--primary); }
.audio-seek::-moz-range-thumb, .short-scrub::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--primary); }
.size-row input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); }
.size-row input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); }
.short-scrub::-webkit-slider-runnable-track { background: rgba(255, 255, 255, .25); }
.short-scrub::-moz-range-track { background: rgba(255, 255, 255, .25); }
.short-scrub::-webkit-slider-thumb { background: var(--accent); }
.short-scrub::-moz-range-thumb { background: var(--accent); }
.audio-times { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text2); }
.voice { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; border-radius: 11px; padding: 0 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text2); font-weight: 600; font-size: 12px; }
.voice .bars { display: inline-flex; align-items: center; gap: 1.5px; }
.voice .bars i { display: block; width: 2px; border-radius: 1px; background: var(--primary); }
/* The text as it is read: the line tinted, the word marked (dimmer while the voice rests on it). Nothing here moves the text. */
.story-body.is-read { position: relative; isolation: isolate; }
.said-line { position: absolute; z-index: -1; inset-inline: -6px; border-radius: 8px; background: rgba(15, 107, 255, .08); pointer-events: none; }
.said-word { border-radius: 4px; cursor: pointer; }
.story-body:not([data-look]) .said-word.on { background: rgba(15, 107, 255, .35); }
.story-body:not([data-look]) .said-word.on.rest { background: rgba(15, 107, 255, .15); }
:root[data-theme="dark"] .said-line { background: rgba(15, 107, 255, .18); }
:root[data-theme="dark"] .story-body:not([data-look]) .said-word.on { background: rgba(15, 107, 255, .55); }
:root[data-theme="dark"] .story-body:not([data-look]) .said-word.on.rest { background: rgba(15, 107, 255, .3); }

/*
 * Word highlight looks (read-looks.js deals one per page load; theme setting
 * "Story audio: word highlight looks"). audio.js gives the word being read "on"
 * and --p (how far through it the voice is, 0 to 1), the words already read
 * "done", and the words on the line being read "ln"; the story box is "is-live"
 * while it plays with Follow text on. Words fill from the right, as they are read.
 */
.story-body[data-look] .said-word { --p: 0; transition: color .3s, background-color .3s, opacity .4s, text-shadow .4s; }
.story-body[data-look] .said-word.done { --p: 1; }
.story-body[data-look]:not([data-look="blue"]):not([data-look="band"]) .said-line { display: none; }
.said-slide, .said-dot { position: absolute; pointer-events: none; transition: left .22s ease-out, top .3s ease, width .22s ease-out; }
.said-slide[hidden], .said-dot[hidden] { display: none; }

/* Looks that colour the text: the word being read fills with the colour; words read keep it. */
.story-body[data-look="glow"], .story-body[data-look="spotlight"], .story-body[data-look="karaoke"], .story-body[data-look="gold"],
.story-body[data-look="fireflies"], .story-body[data-look="stardust"], .story-body[data-look="embers"],
.story-body[data-look="petals"], .story-body[data-look="dot"], .story-body[data-look="neon"], .story-body[data-look="lift"] { --hi: var(--ink); --read: var(--ink); }
.story-body[data-look] .said-word.done { color: var(--read, inherit); }
.story-body[data-look="glow"] .said-word.on, .story-body[data-look="spotlight"] .said-word.on, .story-body[data-look="karaoke"] .said-word.on,
.story-body[data-look="gold"] .said-word.on, .story-body[data-look="fireflies"] .said-word.on,
.story-body[data-look="stardust"] .said-word.on, .story-body[data-look="embers"] .said-word.on, .story-body[data-look="petals"] .said-word.on {
	background-image: linear-gradient(to left, var(--hi) calc(var(--p) * 112% - 6%), var(--ink) calc(var(--p) * 112% + 6%));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.story-body[data-look="glow"] { --hi: #0f9d58; --read: #188a4c; }
.story-body[data-look="glow"] .said-word.done { text-shadow: 0 0 10px rgba(61, 220, 132, .35); }
.story-body[data-look="karaoke"] { --hi: #0f9d58; --read: #0f9d58; }
.story-body[data-look="gold"], .story-body[data-look="fireflies"] { --hi: #b07800; --read: #8a6a1c; }
.story-body[data-look="stardust"] { --hi: #3558b8; --read: #3b5bab; }
.story-body[data-look="embers"] { --hi: #d9480f; --read: #c2410c; }
.story-body[data-look="petals"] { --hi: #d6337a; --read: #be185d; }
.story-body[data-look="dot"] { --read: #177a45; }
.story-body[data-look="neon"] { --read: #b0247a; }
.story-body[data-look="spotlight"] { --read: var(--ink); }
:root[data-theme="dark"] .story-body[data-look="glow"] { --hi: #caffdf; --read: #8fe8b5; }
:root[data-theme="dark"] .story-body[data-look="karaoke"] { --hi: #3ddc84; --read: #3ddc84; }
:root[data-theme="dark"] .story-body[data-look="gold"], :root[data-theme="dark"] .story-body[data-look="fireflies"] { --hi: #ffd66b; --read: #e3cb8c; }
:root[data-theme="dark"] .story-body[data-look="stardust"] { --hi: #dbe8ff; --read: #b9ccf5; }
:root[data-theme="dark"] .story-body[data-look="embers"] { --hi: #ff9a4a; --read: #f5a36b; }
:root[data-theme="dark"] .story-body[data-look="petals"] { --hi: #ff9ccf; --read: #f7b3d6; }
:root[data-theme="dark"] .story-body[data-look="dot"] { --read: #bff5d6; }
:root[data-theme="dark"] .story-body[data-look="neon"] { --read: #ffc3e4; }
:root[data-theme="dark"] .story-body[data-look="gold"] .said-word.done, :root[data-theme="dark"] .story-body[data-look="fireflies"] .said-word.done { text-shadow: 0 0 10px rgba(255, 180, 0, .25); }
:root[data-theme="dark"] .story-body[data-look="embers"] .said-word.done { text-shadow: 0 0 10px rgba(255, 90, 20, .25); }
:root[data-theme="dark"] .story-body[data-look="stardust"] .said-word.done { text-shadow: 0 0 10px rgba(140, 180, 255, .3); }

/* Spotlight: while listening, only the line being read is bright. */
.story-body.is-live[data-look="spotlight"] .said-word:not(.ln) { opacity: .3; }

/* Looks that mark behind the text: a band fills behind the word being read and stays behind the words read. */
.story-body[data-look="blue"] .said-word.on, .story-body[data-look="trail"] .said-word.on, .story-body[data-look="seaglow"] .said-word, .story-body[data-look="burst"] .said-word {
	background-image: linear-gradient(to left, var(--band) calc(var(--p) * 100%), transparent calc(var(--p) * 100%));
}
.story-body[data-look="seaglow"] .said-word:not(.on):not(.done), .story-body[data-look="burst"] .said-word:not(.on):not(.done) { background-image: none; }
.story-body[data-look="blue"] { --band: rgba(15, 107, 255, .35); }
.story-body[data-look="blue"] .said-word.done { background-color: rgba(15, 107, 255, .1); }
.story-body[data-look="trail"] { --band: rgba(61, 220, 132, .55); }
.story-body[data-look="trail"] .said-word.done { background-color: rgba(61, 220, 132, 0); transition: background-color 1.8s; }
.story-body[data-look="trail"] .said-word.fresh { background-color: rgba(61, 220, 132, .5); transition: none; }
.story-body[data-look="seaglow"] { --band: rgba(20, 180, 165, .2); }
.story-body[data-look="burst"] { --band: rgba(155, 60, 255, .18); }
:root[data-theme="dark"] .story-body[data-look="blue"] { --band: rgba(15, 107, 255, .55); }
:root[data-theme="dark"] .story-body[data-look="blue"] .said-word.done { background-color: rgba(15, 107, 255, .16); }
:root[data-theme="dark"] .story-body[data-look="seaglow"] { --band: rgba(20, 200, 180, .22); }
:root[data-theme="dark"] .story-body[data-look="burst"] { --band: rgba(155, 60, 255, .28); }

/* Marker and underline: a stroke under the words, drawn as they are read. */
.story-body[data-look="marker"] .said-word, .story-body[data-look="underline"] .said-word, .story-body[data-look="fade"] .said-word.on {
	background-image: linear-gradient(to left, var(--stroke) calc(var(--p) * 100%), transparent calc(var(--p) * 100%));
	background-repeat: no-repeat; background-size: 100% var(--stroke-h); background-position: 0 var(--stroke-at);
}
.story-body[data-look="marker"] .said-word:not(.on):not(.done), .story-body[data-look="underline"] .said-word:not(.on):not(.done) { background-image: none; }
.story-body[data-look="marker"] { --stroke: rgba(245, 196, 20, .55); --stroke-h: 42%; --stroke-at: 88%; }
.story-body[data-look="marker"] .said-word.done { --stroke: rgba(245, 196, 20, .28); }
.story-body[data-look="underline"] { --stroke: #0f9d58; --stroke-h: 3px; --stroke-at: 94%; }
.story-body[data-look="underline"] .said-word.done { --stroke: rgba(15, 157, 88, .5); }
.story-body[data-look="fade"] { --stroke: var(--primary); --stroke-h: 2px; --stroke-at: 94%; }
.story-body.is-live[data-look="fade"] .said-word.done { opacity: .4; }
:root[data-theme="dark"] .story-body[data-look="marker"] { --stroke: rgba(230, 194, 41, .5); }
:root[data-theme="dark"] .story-body[data-look="marker"] .said-word.done { --stroke: rgba(230, 194, 41, .24); }
:root[data-theme="dark"] .story-body[data-look="underline"] { --stroke: #3ddc84; }
:root[data-theme="dark"] .story-body[data-look="underline"] .said-word.done { --stroke: rgba(61, 220, 132, .5); }

/* Lift: the word rises as a tile that fills green. */
.story-body[data-look="lift"] .said-word.on { display: inline-block; position: relative; z-index: 2; transform: translateY(-2px) scale(1.08); background-color: var(--ink); color: var(--bg);
	background-image: linear-gradient(to left, rgba(61, 220, 132, .6) calc(var(--p) * 100%), transparent calc(var(--p) * 100%)); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); padding-inline: 3px; transition: transform .25s; }

/* Neon box and band: a frame, or a pill, that slides from word to word. */
.said-slide.neon { border-radius: 7px; box-shadow: 0 0 0 2px #ff3dac, 0 0 16px rgba(255, 61, 172, .8), inset 0 0 10px rgba(255, 61, 172, .35); }
.said-slide.pill { z-index: -1; border-radius: 999px; background: rgba(155, 60, 255, .35); box-shadow: 0 0 16px rgba(155, 60, 255, .45); }
.story-body[data-look="band"] .said-line { background: rgba(155, 60, 255, .08); }
:root[data-theme="dark"] .story-body[data-look="band"] .said-line { background: rgba(155, 60, 255, .14); }
:root[data-theme="dark"] .said-slide.pill { background: rgba(155, 60, 255, .55); }
/* Dot: a green dot glides along the word being read. */
.said-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 12px #3ddc84; transition: top .3s cubic-bezier(.3, 1.6, .5, 1); }
/* Particle looks: the light layer over the page (read-looks.js). */
.said-sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* Story page backgrounds (read-looks.js): a layer fixed behind the whole page; the page's own colour is taken off the body so it shows. Below the mode switch's sky. */
.page-look { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; overflow: hidden; background: var(--bg); }
html.has-page-look body { background: transparent; }
/* The top of the story fades into the background instead of into the plain page colour. */
html.has-page-look .read-head .backdrop { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
html.has-page-look .read-head .backdrop::after { display: none; }
.page-look.cover img { position: absolute; inset: -80px; width: calc(100% + 160px); height: calc(100% + 160px); max-width: none; object-fit: cover; filter: blur(60px) saturate(1.3); animation: esfiya-breathe 10s ease-in-out infinite alternate; }
.page-look.cover::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: .8; }
:root[data-theme="dark"] .page-look.cover::after { opacity: .55; }
@keyframes esfiya-breathe { to { transform: scale(1.12) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .page-look.cover img { animation: none; } }

/* The floating play button: the card has scrolled away and nothing has played yet */
.audio-fab {
	position: fixed; z-index: 60; left: 16px; bottom: 20px; min-height: 52px; border-radius: 26px; padding: 0 18px 0 6px; direction: ltr;
	display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(16, 20, 28, .88); color: #fff;
	-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 12px 28px rgba(0, 0, 0, .3); font-family: var(--font-latin); font-weight: 700; font-size: 15px;
}
.audio-fab[hidden] { display: none; }
.audio-fab[data-loading] { opacity: .7; }
.audio-fab:hover { background: rgba(16, 20, 28, .96); }
.audio-fab .disc { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff; color: #10141c; display: flex; align-items: center; justify-content: center; }
.audio-fab small { font-weight: 600; font-size: 13px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .audio-fab { bottom: calc(92px + env(safe-area-inset-bottom)); } }

/*
 * The floating player: once something has played and the card has scrolled away.
 * Dark glass over the story's cover, in light and dark mode alike, with every
 * control the card has. Two rows on a wide page and on a phone.
 */
.audio-dock {
	position: fixed; z-index: 60; left: 16px; bottom: 20px; width: min(620px, calc(100% - 32px)); direction: ltr; overflow: hidden;
	display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, .8fr); grid-template-areas: "open mid side" "seek seek seek"; align-items: center; column-gap: 10px; row-gap: 10px;
	padding: 14px 16px 12px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(16, 20, 28, .88); color: #fff;
	-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); font-family: var(--font-latin);
}
.audio-dock[hidden] { display: none; }
.audio-dock > * { position: relative; }
.dock-back { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.audio-dock > .dock-back { position: absolute; }
.dock-back img { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); max-width: none; object-fit: cover; filter: blur(30px); opacity: .45; }
.dock-open { grid-area: open; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; padding: 0; background: none; color: inherit; text-align: left; }
.dock-open img { width: 48px; height: 48px; flex: none; border-radius: 14px; object-fit: cover; }
.dock-text { min-width: 0; display: flex; flex-direction: column; }
.dock-text b { font-family: var(--font-title); font-weight: 400; font-size: 18px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: left; }
.voice-line { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; font-weight: 600; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-line .bars { display: inline-flex; align-items: center; gap: 1.5px; flex: none; }
.voice-line .bars i { display: block; width: 2px; border-radius: 1px; background: #fff; }
.dock-mid { grid-area: mid; display: flex; align-items: center; gap: 6px; }
.dock-side { grid-area: side; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.dock-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid transparent; padding: 0; background: none; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.dock-btn:hover { background: rgba(255, 255, 255, .14); }
.dock-btn.soft { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }
/* Follow text: lit when on; struck through when off */
.dock-btn.mark { position: relative; color: rgba(255, 255, 255, .55); }
.dock-btn.mark::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(-45deg); }
.dock-btn.mark[aria-pressed="true"] { color: #10141c; background: #fff; }
.dock-btn.mark[aria-pressed="true"]::after { display: none; }
.audio-say { position: fixed; z-index: 61; margin: 0; display: flex; justify-content: center; pointer-events: none; font-family: var(--font-latin); font-weight: 600; font-size: 14px; line-height: 20px; direction: ltr; }
.audio-say[hidden] { display: none; }
.audio-say span { max-width: 100%; border-radius: 14px; padding: 8px 14px; background: rgba(16, 20, 28, .92); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); text-align: center; }
.dock-btn.close { color: rgba(255, 255, 255, .7); }
.audio-dock .audio-play { width: 56px; height: 56px; background: #fff; color: #10141c; }
.dock-seek { grid-area: seek; display: flex; align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .72); }
.dock-seek .audio-wave { flex: 1 1 0; min-width: 0; margin: 0; }
.dock-seek .wave-bars { height: 34px; }
.audio-dock .wave-bars i { background: rgba(255, 255, 255, .26); }
.audio-dock .wave-bars i.p { background: #fff; }
.audio-dock .audio-wave:focus-within { outline-color: #fff; }
.audio-dock .audio-seek::-webkit-slider-runnable-track { background: rgba(255, 255, 255, .25); }
.audio-dock .audio-seek::-moz-range-track { background: rgba(255, 255, 255, .25); }
.audio-dock .audio-seek::-webkit-slider-thumb { background: #fff; }
.audio-dock .audio-seek::-moz-range-thumb { background: #fff; }
@media (max-width: 767px) {
	/* Above the bottom bar; play and the waveform share the second row, to keep it low */
	.audio-dock { bottom: calc(92px + env(safe-area-inset-bottom)); padding: 12px 12px 10px; border-radius: 22px; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "open open side" "mid seek seek"; column-gap: 8px; row-gap: 8px; }
	.dock-open img { width: 40px; height: 40px; border-radius: 12px; }
	.dock-text b { font-size: 17px; line-height: 24px; }
	.voice-line { font-size: 11px; gap: 5px; }
	.dock-btn { width: 36px; height: 36px; }
	.dock-mid { gap: 2px; }
	.audio-dock .audio-play { width: 44px; height: 44px; }
	.dock-seek { gap: 6px; font-size: 12px; }
	.dock-seek .wave-bars { height: 30px; }
	.audio-top .round[data-audio-skip] { display: none; }
	.audio-name .voice { display: flex; width: fit-content; margin: 4px 0 0; }
}

/* What the plugins print inside the story
-------------------------------------------------------------- */
/* Esfiya Pro's tip form is shown in the tip sheet, already open; its copy at the story's end is left out */
.story-body .esfiya-tip-control { display: none; }
.sheet .esfiya-tip-control { direction: ltr; text-align: left; margin: 0; padding: 0; border: 0; background: none; font-family: var(--font-latin); font-size: 16px; line-height: 24px; }
.sheet .esfiya-tip-control p { margin: 0 0 10px; color: var(--text2); }
.sheet .esfiya-tip-control [data-tip-open] { display: none; }
.sheet .esfiya-tip-control button { min-height: 44px; border: 0; border-radius: var(--r-md); padding: 0 16px; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; }
.sheet .esfiya-tip-control button[hidden] { display: none; }
.sheet .esfiya-tip-control input[type="text"] { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--bg); color: var(--text); font-size: 16px; }
.sheet .esfiya-tip-control label { display: block; margin-bottom: 10px; color: var(--text); }
.story-body .content-preview { margin-bottom: 24px; }
.story-body .content-preview h2 { font-family: var(--font-title); font-weight: 400; }

/* Series navigation card
-------------------------------------------------------------- */
.series-nav { border-radius: var(--r-md); padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-latin); direction: ltr; }
.series-nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; font-weight: 600; font-size: 15px; }
.series-nav .all { border-radius: 8px; padding: 0 14px; background: var(--primary); color: #fff; font-weight: 700; }
.series-nav .off { color: var(--text2); opacity: .5; pointer-events: none; }

/* Comments
-------------------------------------------------------------- */
.comments { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.comments-title { font-family: var(--font-latin); font-weight: 700; font-size: 20px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
/* The list item is the card, so its replies sit inside it */
.comment-list > li { background: var(--surface); border-radius: var(--r-lg); padding: 16px; }
.comment-list .children { margin-top: 14px; gap: 10px; }
.comment-list .children > li { margin-inline-start: 28px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg); }
.comment-list .children .children > li { margin-inline-start: 14px; background: var(--surface); }
.comment-list .children .children .children > li { margin-inline-start: 0; background: var(--bg); }
.comment-meta { display: flex; align-items: center; gap: 10px; }
.comment-meta .comment-date { margin-inline-start: auto; }
.comment-author { font-family: var(--font-latin); font-weight: 700; font-size: 15px; }
.comment-date { font-family: var(--font-latin); font-size: 13px; color: var(--text2); }
.comment-to { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; margin-inline-start: 42px; border-radius: 10px; padding: 2px 8px; background: var(--tint); color: var(--primary); font-family: var(--font-latin); font-weight: 600; font-size: 13px; line-height: 20px; }
.comment-text { font-size: 20px; line-height: 1.7; padding-inline-start: 42px; text-align: start; overflow-wrap: anywhere; }
.comment-text p { margin: 6px 0 0; }
.comment-reply-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; margin-inline-start: 42px; border-radius: 8px; padding: 4px 8px; background: var(--primary); color: #fff; font-family: var(--font-latin); font-size: 13px; font-weight: 600; direction: ltr; }
.comment-list .comment-respond { margin-top: 12px; }
@media (max-width: 559px) {
	.comment-list > li { padding: 12px; }
	.comment-list .children > li { margin-inline-start: 16px; padding: 12px; }
	.comment-list .children .children > li { margin-inline-start: 8px; }
	.children .comment-text, .children .comment-to, .children .comment-reply-link { padding-inline-start: 0; margin-inline-start: 0; }
	.children .comment-text { padding-top: 2px; }
}
.comment-respond { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.comment-reply-title { font-family: var(--font-latin); font-weight: 700; font-size: 20px; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.comment-reply-title small a { font-size: 14px; color: var(--primary); }
.comment-form { display: flex; flex-direction: column; gap: 12px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: 16px; color: var(--text2); margin-bottom: 6px; }
.comment-form .form-submit { display: flex; }
.comment-form .submit { flex: 1; min-height: 48px; border: 0; border-radius: var(--r-md); background: var(--primary); color: #fff; font-family: var(--font-latin); font-weight: 700; font-size: 17px; }
.comment-form .logged-in-as, .comment-form .comment-notes { font-size: 15px; color: var(--text2); }
.comment-form .logged-in-as a { color: var(--primary); }

/* Series page (SeriesDetailScreen.js)
-------------------------------------------------------------- */
.series-hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 16px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
/* The series' author beside the cover: numbers, Follow author, Tip the author */
.series-hero .side { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 12px; direction: ltr; border-top: 1px solid var(--border); padding-top: 14px; }
.nums { display: flex; gap: 8px; }
.nums div { flex: 1 1 auto; min-width: 0; border-radius: 16px; background: var(--bg); padding: 10px; font-family: var(--font-latin); }
.nums b { display: block; font-size: 18px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nums span { font-size: 14px; line-height: 20px; color: var(--text2); }
.series-hero .acts { display: flex; gap: 10px; }
.series-hero .acts > * { flex: 1 1 0; min-width: 0; padding: 0 8px; }
.series-hero .social-note { margin: 0; text-align: left; }
.series-hero .cover { width: 116px; flex: none; }
.series-hero .info { flex: 1 1 0; min-width: 0; min-height: 174px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.eyebrow { font-family: var(--font-latin); font-weight: 800; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); }
.state { font-family: var(--font-latin); font-weight: 600; font-size: 14px; color: var(--text2); }
.series-title { font-family: var(--font-title); font-size: 30px; line-height: 46px; }
.series-en { font-family: var(--font-latin); font-size: 16px; line-height: 24px; color: var(--text2); }
.series-hero .btn { min-height: 42px; border-radius: 10px; font-family: var(--font-latin); font-weight: 700; font-size: 15px; margin-top: auto; }
.details { font-family: var(--font-latin); font-size: 15px; line-height: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; color: var(--text2); }
.episodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.episode-row { display: flex; align-items: center; gap: 12px; min-height: 78px; border-radius: 14px; padding: 10px 14px; background: var(--surface); }
.episode-row:hover { background: var(--hover); }
.episode-row .t { font-family: var(--font-title); font-size: 20px; line-height: 32px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-row .m { display: flex; align-items: center; gap: 8px; font-family: var(--font-latin); font-size: 14px; line-height: 20px; color: var(--text2); }
.episode-row .body { flex: 1 1 0; min-width: 0; }
.episode-row > svg { color: var(--text2); }
.episode-row .num { width: 44px; height: 44px; flex: none; border-radius: var(--r-md); background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; font-family: var(--font-latin); font-weight: 800; font-size: 17px; }
/* Tags on an episode: a gold pill with the lock and price, a blue one for audio (look 7 of the episode tags sheet). */
.episode-row .ep-tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 13px; line-height: 18px; direction: ltr; }
.episode-row .ep-tag svg { flex: none; stroke-width: 2.2; }
.episode-row .ep-tag.lock { background: var(--gold-tint); color: var(--gold); }
.episode-row .ep-tag.audio { background: var(--tint); color: var(--primary); }
.series-page { max-width: 760px; margin-inline: auto; }
@media (min-width: 768px) {
	.series-hero { flex-wrap: nowrap; gap: 24px; padding: 24px; }
	.series-hero .cover { width: 180px; }
	.series-hero .info { min-height: 270px; }
	/* The author's side keeps its width; a long series name wraps beside it */
	.series-hero .side { flex: 0 0 290px; align-self: stretch; justify-content: space-between; border-top: 0; padding-top: 0; }
	.series-hero .acts { flex-direction: column; }
	.series-hero .acts > * { flex: none; }
	.series-title { font-size: 38px; line-height: 58px; }
	.episodes { gap: 6px; }
	.episode-row { padding: 12px 16px; }
	.episode-row .t { font-size: 22px; line-height: 34px; }
}

/* Author page (AuthorProfileScreen.js)
-------------------------------------------------------------- */
/* Picture, name and numbers side by side; the bio under them; Follow author and Tip the author */
.author-hero {
	position: relative; border-radius: 22px; padding: 20px 16px; overflow: hidden; color: #fff; background: #26324a; margin-bottom: 24px;
	display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "face ident" "bio bio" "acts acts" "note note"; column-gap: 16px; row-gap: 14px; align-items: center;
}
.author-hero .avatar.big { grid-area: face; width: 72px; height: 72px; font-size: 28px; margin: 0; }
.author-hero .ident { grid-area: ident; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.author-hero .acts { grid-area: acts; display: flex; gap: 10px; }
.author-hero .acts > * { flex: 1 1 0; min-width: 0; padding: 0 10px; }
.author-hero .pbtn { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .45); color: #fff; }
.author-hero .pbtn.fill { background: #fff; border-color: #fff; color: #111; }
.author-hero .pbtn[aria-pressed="true"] { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .6); color: #fff; }
.author-hero .pbtn.tip svg { color: #FBBF24; }
.author-hero .backdrop { position: absolute; inset: 0; }
.author-hero .backdrop img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(24px); }
.author-hero .backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, .75)); }
.author-hero > :not(.backdrop) { position: relative; }
.author-name { font-family: var(--font-latin); font-weight: 700; font-size: 27px; line-height: 38px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.author-hero .level { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .45); color: #fff; }
.author-count { font-size: 17px; line-height: 26px; }
.author-bio { grid-area: bio; margin: 0; font-size: 17px; line-height: 28px; color: rgba(255, 255, 255, .9); text-align: start; }
.author-hero .social-note { grid-area: note; margin: 0; text-align: start; }
.author-hero .social-note, .author-hero .social-note a { color: #fff; }
@media (min-width: 768px) {
	.author-hero { padding: 24px; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "face ident acts" "bio bio bio" "note note note"; }
	.author-hero .avatar.big { width: 88px; height: 88px; font-size: 34px; }
	.author-hero .acts > * { flex: 0 0 auto; padding: 0 18px; }
}

/* Lists with a search box and filters (series, authors, search)
-------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 16px; }
.filters .search { flex: 1 1 240px; min-height: 48px; border-radius: 14px; }
.filter { display: inline-flex; align-items: center; min-height: 36px; border-radius: 18px; padding-inline: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 18px; }
.filter:hover { background: var(--hover); }
.filter.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tiles-grid .tile { width: auto; max-width: none; min-width: 0; }

/* Archive headings, pagination
-------------------------------------------------------------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.page-head .sub { color: var(--text2); font-size: 18px; }
.pager { display: flex; justify-content: center; gap: 8px; padding-top: 24px; flex-wrap: wrap; font-family: var(--font-latin); }
.pager .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.pager .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager a.page-numbers:hover { background: var(--hover); }
.pager .dots { min-width: 0; padding: 0 2px; border: 0; background: none; color: var(--text2); }
.pager .dots.narrow { display: none; }
@media (max-width: 559px) {
	/* Three numbers around the page being read, with the first and the last */
	.pager { gap: 4px; }
	.pager .page-numbers { min-width: 36px; height: 40px; padding: 0 8px; font-size: 14px; }
	.pager .far, .pager .dots.wide { display: none; }
	.pager .dots.narrow { display: inline-flex; }
}

/* Plain pages (rules, contact, Pro and so on)
-------------------------------------------------------------- */
.page-body { font-size: 22px; line-height: 1.9; overflow-wrap: break-word; }
.page-body > * { margin-block: 0 20px; }
.page-body h1, .page-body h2, .page-body h3 { font-family: var(--font-title); line-height: 1.6; }
.page-body h1 { font-size: 32px; } .page-body h2 { font-size: 26px; } .page-body h3 { font-size: 22px; }
.page-body a { color: var(--primary); text-decoration: underline; }
.page-body img { border-radius: var(--r-md); }
.page-body table { width: 100%; border-collapse: collapse; }
.page-body th, .page-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: start; }
.page-body input[type="text"], .page-body input[type="email"], .page-body input[type="tel"], .page-body input[type="number"], .page-body input[type="password"], .page-body textarea, .page-body select {
	width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--bg); color: var(--text);
}
.page-body input[type="submit"], .page-body button[type="submit"] { min-height: 48px; border: 0; border-radius: var(--r-md); padding: 0 20px; background: var(--primary); color: #fff; }
.page-title { font-family: var(--font-title); font-size: 32px; line-height: 52px; padding-bottom: 12px; }
.alignleft { float: left; margin: 0 16px 16px 0; } .alignright { float: right; margin: 0 0 16px 16px; }
.aligncenter { display: block; margin-inline: auto; } .wp-caption { max-width: 100%; } .wp-caption-text { font-size: 15px; color: var(--text2); }

/* Sheets (text size, menu)
-------------------------------------------------------------- */
.sheet-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: flex-end; justify-content: center; }
.sheet-back[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head b { font-family: var(--font-latin); font-weight: 700; font-size: 17px; }
.size-row { display: flex; align-items: center; gap: 14px; }
.size-row input { flex: 1; }
.size-row .s { font-size: 16px; } .size-row .l { font-size: 28px; }
.size-sample { margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: var(--bg); font-size: var(--reader-size); line-height: 1.75; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-list a { display: flex; align-items: center; min-height: 52px; padding-inline: 12px; border-radius: var(--r-md); font-size: 21px; }
.menu-list a:hover { background: var(--hover); }
.menu-list .sub-menu { list-style: none; margin: 0; padding: 0 16px 0 0; }
.menu-label { font-family: var(--font-latin); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); padding: 16px 12px 6px; }
@media (min-width: 768px) {
	.sheet-back { align-items: center; }
	.sheet { border-radius: var(--r-xl); }
}

/* Footer
-------------------------------------------------------------- */
.foot { border-top: 1px solid var(--border); padding-block: 24px 120px; color: var(--text2); font-size: 17px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a:hover { color: var(--text); }
.foot .copy { font-family: var(--font-latin); font-size: 14px; }
@media (min-width: 768px) { .foot { padding-bottom: 32px; } }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* Shorts (ShortsScreen.js): always dark, one teaser to a screen
-------------------------------------------------------------- */
.is-shorts { background: #080C15; }
.is-shorts .site-main { padding: 0; min-height: 0; }
.is-shorts .foot { display: none; }
.is-shorts .tabs { --glass-thin: rgba(22, 22, 26, .75); --glass-line: rgba(255, 255, 255, .16); --idle: #A8A8A8; }
.shorts { position: relative; height: 100dvh; max-width: 480px; margin-inline: auto; color: #fff; background: #080C15; overflow: hidden; }
.admin-bar .shorts { height: calc(100dvh - 46px); }
.shorts-head { position: absolute; top: 0; inset-inline: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; pointer-events: none; }
.shorts-head > * { pointer-events: auto; }
.shorts-title { font-family: var(--font-title); font-size: 28px; line-height: 44px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.shorts-sound, .shorts-start .disc { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; color: #fff; }
.shorts-sound { width: 44px; height: 44px; padding: 0; background: rgba(0, 0, 0, .3); }
.shorts-sound .when-off, .shorts-sound[aria-pressed="false"] .when-on { display: none; }
.shorts-sound[aria-pressed="false"] .when-off, .shorts-sound span { display: flex; }
.shorts-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.shorts-feed::-webkit-scrollbar { display: none; }
/* Moved by a mouse, a pen or a key (shorts.js): the feed follows and glides, and snaps again at rest. */
.shorts-feed[data-moving] { scroll-snap-type: none; user-select: none; -webkit-user-select: none; cursor: grabbing; }
.shorts-feed[data-moving] .short-tap { cursor: grabbing; }
/* The play button dims the feed and shows its disc, and lets every press, wheel, finger and drag
   through to the feed under it, so the feed scrolls before play is pressed. A press on the picture,
   the disc's place included, starts the sound (shorts.js); the keyboard uses the button itself. */
.shorts-start { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; border: 0; background: rgba(0, 0, 0, .25); pointer-events: none; }
.shorts[data-locked]:not([data-loading]):not([data-empty]) .shorts-start { display: flex; }
.shorts-start .disc { width: 84px; height: 84px; background: rgba(0, 0, 0, .55); padding-inline-start: 0; }
.shorts-start:focus-visible { outline: 0; }
.shorts-start:focus-visible .disc { outline: 2px solid #fff; outline-offset: 3px; }
.shorts-empty { display: none; position: absolute; inset: 0; margin: 0; align-items: center; justify-content: center; font-family: var(--font-title); font-size: 18px; color: #A8A8A8; }
.shorts[data-empty] .shorts-empty { display: flex; }
/* A link to a story that is not a short (shorts.js): one line under the head, gone on the first swipe. */
.shorts-notice { position: absolute; top: 60px; inset-inline: 16px; z-index: 6; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .6); font-family: var(--font-title); font-size: 15px; line-height: 1.4; text-align: center; color: #fff; }
.shorts-notice[hidden] { display: none; }
.shorts audio { display: none; }

.short { --accent: #A4C9FF; position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #080C15; }
.short-cover { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.short-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .33), rgba(0, 0, 0, .6) 48%, rgba(0, 0, 0, .93)); }
.short-tap { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; }
/* The heart a double press leaves (shorts.js): pops in tilted, holds, floats up and fades. */
.short-burst { position: absolute; z-index: 4; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #FF6288; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); animation: short-burst .9s linear forwards; }
.short-burst svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes short-burst {
	0% { opacity: 0; transform: rotate(var(--tilt)) scale(.4); }
	10% { opacity: 1; }
	15% { transform: rotate(var(--tilt)) scale(1.2); }
	25% { transform: rotate(var(--tilt)) scale(1); }
	70% { opacity: 1; transform: translateY(0) rotate(var(--tilt)) scale(1); }
	100% { opacity: 0; transform: translateY(-60px) rotate(var(--tilt)) scale(1.3); }
}
@media (prefers-reduced-motion: reduce) {
	.short-burst { animation-duration: .6s; animation-name: short-burst-still; }
	@keyframes short-burst-still { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }
}
.short-meter { position: absolute; inset-inline: 88px 24px; top: 38%; height: 96px; width: calc(100% - 112px); pointer-events: none; }
.short-full {
	position: absolute; top: 64px; inset-inline-end: 16px; z-index: 2; display: inline-flex; align-items: center; min-height: 44px; border-radius: 22px; padding-inline: 16px;
	background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .19); color: #fff; font-size: 20px; line-height: 28px;
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.short-caption { position: absolute; inset-inline: 84px 16px; bottom: 132px; z-index: 2; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.short-caption a { pointer-events: auto; }
.short-by { display: flex; align-items: center; gap: 8px; font-family: var(--font-latin); font-size: 18px; line-height: 26px; }
.short-by .disc { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #080C15; display: flex; align-items: center; justify-content: center; }
.short-by bdi { unicode-bidi: plaintext; }
.short-title { font-family: var(--font-title); font-size: 32px; line-height: 50px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.short-rail { position: absolute; inset-inline-start: 12px; bottom: 132px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0; }
.short-acts { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.short-act { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; padding: 0; background: none; color: #fff; font-family: var(--font-latin); font-weight: 600; font-size: 13px; line-height: 18px; }
.short-act .disc { width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; }
.short-act[data-act="heart"][aria-pressed="true"] { color: #FF6288; }
.short-act[data-act="save"][aria-pressed="true"] { color: #FFE09A; }
.short-act[aria-pressed="true"] svg { fill: currentColor; }
.short-act[data-busy] { opacity: .7; }
.short-rail .social-note { position: absolute; inset-inline-start: 60px; bottom: 0; width: 220px; margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .75); color: #fff; text-align: start; }
.short-rail .social-note a { color: var(--accent); }
.short-scrub { position: absolute; inset-inline: 16px; bottom: 96px; z-index: 3; width: calc(100% - 32px); margin: 0; direction: ltr; }

/* Shorts visual styles (assets/js/shorts-looks.js): a card dealt a look carries
   data-style, a moving picture over its cover and the spoken words. A card
   without one is the look the page had before: cover, shade and sound bars.
   A look's own rules for its words come with the look (shorts-styles.js). */
.short-gl { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; pointer-events: none; opacity: 0; }
.short-gl[data-ready] { opacity: 1; }
.short[data-style] .short-meter { display: none; }
.short-shade[data-k="app"] { background: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .8) 72%, rgba(0, 0, 0, .95)); }
.short-shade[data-k="low"] { background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, .72) 78%, rgba(0, 0, 0, .92)); }
.short-shade[data-k="none"] { background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 12%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .55)); }
.short-shade[data-k="clear"] { background: none; }
/* The caption effects of the second set of looks: two canvases, one behind the words and one in front of them. */
.short-fx { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 2; pointer-events: none; display: block; }
/* The theme's fonts hold Thaana only, so a space comes from the system font and is narrow.
   Spoken words are set apart as the fonts' own spaces would set them. */
.short-words { position: absolute; inset-inline: 84px 16px; z-index: 2; pointer-events: none; direction: rtl; font-family: var(--font-body); color: #fff; word-spacing: .27em; }
.short-words[data-font="title"] { font-family: var(--font-title); word-spacing: .37em; }
.short-words[data-pos="top"] { top: 128px; }
.short-words[data-pos="mid"] { top: 50%; transform: translateY(-62%); }
.short-words[data-pos="low"] { bottom: 270px; }
.short-words[data-wide] { inset-inline: 16px 16px; }
.short-words[data-align="center"] { text-align: center; }
.short-words[data-align="start"] { text-align: start; }
.short-words-window { overflow: hidden; position: relative; }
.short-words-flow { position: absolute; top: 0; inset-inline: 0; transition: transform .22s ease; }
.short-word { display: inline-block; border-radius: 10px; padding-inline: 5px; margin: 0; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); transition: color .12s, background-color .12s, opacity .12s; }
.short-word.ahead { color: rgba(255, 255, 255, .42); }
.short-words[data-mark="pill"] .short-word.now { background: var(--primary); text-shadow: none; }
.short-words[data-mark="color"] .short-word.now { color: var(--accent); }
.short-words[data-mark="box"] .short-word.now { background: var(--accent); color: #0a0d14; text-shadow: none; border-radius: 6px; }
.short-words[data-mark="under"] .short-word.now { box-shadow: inset 0 -4px 0 var(--accent); }
.short-words[data-mark="glow"] .short-word.now { text-shadow: 0 0 18px var(--accent), 0 0 6px #fff; }
.short-words[data-mark="bright"] .short-word.said, .short-words[data-mark="bright"] .short-word.now { color: #fff; }
/* Dark ink, for words that lie on a light surface the picture draws (paper, a page, a card). */
.short-words[data-ink="dark"] .short-word { color: #1b1d24; text-shadow: none; }
.short-words[data-ink="dark"] .short-word.ahead { color: rgba(27, 29, 36, .42); }
.short-words[data-ink="dark"][data-mark="bright"] .short-word.said, .short-words[data-ink="dark"][data-mark="bright"] .short-word.now { color: #1b1d24; }
.short-words[data-ink="dark"][data-mark="glow"] .short-word.now { text-shadow: 0 0 14px var(--accent); }
.short-words-chunk { display: block; }
.short-words-chunk .short-word.hide { visibility: hidden; }
.short-words-chunk.in-pop { animation: short-words-pop .22s cubic-bezier(.2, 1.4, .4, 1) both; }
.short-words-chunk.in-rise { animation: short-words-rise .26s ease-out both; }
.short-words-chunk.in-fade { animation: short-words-fade .3s ease-out both; }
.short-words-chunk.in-slide { animation: short-words-slide .26s ease-out both; }
.short-words-trail { display: block; opacity: .45; transition: opacity .3s, transform .3s; }
.short-words-trail[data-age="2"] { opacity: .22; }
@keyframes short-words-pop { from { transform: scale(.72); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes short-words-rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes short-words-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes short-words-slide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.short-words-panel { border-radius: 16px; padding: 12px 10px; }
.short-words-panel[data-panel="glass"] { background: rgba(10, 14, 22, .46); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.short-words-panel[data-panel="dark"] { background: rgba(0, 0, 0, .62); }
.short-words-panel[data-panel="paper"] { background: #f3f1ea; color: #15181f; }
.short-words-panel[data-panel="paper"] .short-word { text-shadow: none; color: #15181f; }
.short-words-panel[data-panel="paper"] .short-word.ahead { color: rgba(21, 24, 31, .42); }

@media (min-width: 1024px) {
	.shorts-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 32px; }
	.shorts-wrap .shorts { margin: 0; flex: none; width: 480px; }
	.shorts-wrap .rail { position: static; width: 300px; flex: none; padding-block: 16px; max-height: calc(100dvh - var(--bar)); overflow-y: auto; scrollbar-width: none; }
}
@media (min-width: 768px) {
	.shorts { height: calc(100dvh - var(--bar)); border-inline: 1px solid rgba(255, 255, 255, .08); }
	.admin-bar .shorts { height: calc(100dvh - var(--bar) - 32px); }
	.short-caption, .short-rail { bottom: 60px; }
	.short-scrub { bottom: 24px; }
}

/* Switching colour mode (theme.js switchMode): a sunset or sunrise is the page's background while it runs */
.mode-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
html.mode-sky-on, html.mode-sky-on body { background: transparent !important; }
html.mode-fading, html.mode-fading * {
	transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease !important;
}
