/*
 * Magical Library — The Goblin Library (the guides archive) and one guide.
 *
 * The archive half is ported from the <style> block of
 * design-reference/library.html, scoped under .rpg-ml-library. The single-guide
 * half has no reference (see templates/ml-guide.php) and is built from the same
 * primitives so the two read as one place.
 *
 * Depends on ml-chrome.css for tokens and the shared .btn / .eyebrow / .sec /
 * .sechead / .textlink / .crumb / .celestial / .rv primitives.
 */

/* ───────────────────────────────────────────────── the hero + chips */

.rpg-ml-library .libhero,
.rpg-ml-guide .ghero {
	position: relative;
	overflow: hidden;
	background: radial-gradient(70% 90% at 18% 8%, #33402c, #12271f);
	color: #fff;
	/* Side padding lives on `.in` now — ml-chrome.css, THE HERO GRID. */
	padding-block: 56px 46px;
}

/* THE SCENE'S FLOOR (round 10). Everything in the reading room is sized in
   percentages of this band — the lamp is 62% of it, the case 96% — so the
   hero's height IS the scene's scale, and that height was an accident of how
   the headline happened to wrap. Giving the h1 `width:fit-content` below (so it
   stops covering the shelves) put "The Goblin Library" on one line instead of
   the two `text-wrap:balance` had been giving it, and the whole reading room
   shrank by 56px — which is round 9's complaint, caused by round 10's fix.
   384 is the height round 9 tuned the case against. A MIN, so a longer title or
   a second line of lede grows the room rather than being cropped by it. Same
   pattern and same reason as the shop hero's `min-height:400px`.
   NOT on `.ghero`: the single guide's header has no scene in it, and a 384px
   band over an article is a band with nothing in it. */
.rpg-ml-library .libhero { min-height: 384px; }

@media (max-width: 1100px) {
	/* The scene is a corner sliver at this width and the copy runs full width,
	   so the floor comes out and the band is as tall as what is in it. */
	.rpg-ml-library .libhero { min-height: 0; }
}

.rpg-ml-library .libhero .in,
.rpg-ml-guide .ghero .in {
	position: relative;
	z-index: 2;
}

/* THE SHEET OVER THE SCENE (round 10).
   `.in` is a full-container-width block at z-index 2 holding an eyebrow, a
   heading and a lede — most of it empty, and all of it in front of the reading
   room. The poke suite caught the leftmost book spine sitting under the h1's
   own empty right-hand half and taking none of 25 real clicks.

   This is the third time this exact bug has been found in this suite: rpg-shop
   1.20.0 on the general store's lamp, rpg-events 1.4.0 on the sundial's gnomon,
   and now here. It is invisible to a synthetic `el.click()` and to
   `elementFromPoint` when the overlay has no background, which is why it only
   ever turns up when something clicks at real coordinates.

   Same fix as the shop's: the wrapper hands pointer events to its children,
   which are the actual content, and each child shrinks to the text in it. No
   visual change — the copy is left-aligned and already capped at 56ch — and
   the gaps between the lines let a poke through to the shelf behind. */
/* The objects the fade has swallowed — see ml-library.js, "nothing in the fade
   is clickable". Drawn, dim, and not pretending to be a control. */
.rpg-ml-library .rrspine.dim,
.rpg-ml-library .rrware.dim,
.rpg-ml-library .rrmagic.dim { pointer-events: none; cursor: default; }

.rpg-ml-library .libhero .in { pointer-events: none; }
.rpg-ml-library .libhero .in > * { pointer-events: auto; }

/* …but ONLY the eyebrow and the headline shrink to their text, and that limit
   is measured rather than tidy. The shop hero gives `width:fit-content` to
   every child of its `.in`; doing the same here put the CHIP ROW on one line
   instead of two, which took 81px out of the hero — and this scene is sized in
   percentages of the hero, so the whole reading room shrank by a fifth. Round 9
   was Kevin telling us the scene was too small. The two children that are
   short, single-line and mostly empty box give their space back; the lede and
   the chips keep their own. */
.rpg-ml-library .libhero .in > :is(.eyebrow, h1) { width: fit-content; max-width: 100%; }

.rpg-ml-library .libhero .eyebrow,
.rpg-ml-guide .ghero .eyebrow { color: var(--gold-hi); }

.rpg-ml-library .libhero h1 {
	font-size: clamp(32px, 4.6vw, 54px);
	color: #f7edd6;
	max-width: 18ch;
	margin: 10px 0;
}

.rpg-ml-library .libhero p {
	color: #d9e6cf;
	max-width: 58ch;
	font-family: var(--book);
}

.rpg-ml-library .libcats {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.rpg-ml-library .libcats .chip {
	background: rgba(247, 240, 228, .1);
	border: 1px solid rgba(200, 162, 74, .4);
	color: #f0e4c8;
	border-radius: 999px;
	padding: 8px 15px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	/* The chips are the archive's whole navigation on a phone; the
	   prototype's 8px padding leaves them at 35px. */
	min-height: 40px;
	transition: background .18s, color .18s;
}

.rpg-ml-library .libcats .chip:hover { background: rgba(247, 240, 228, .18); }

.rpg-ml-library .libcats .chip.on {
	background: var(--gold);
	color: #231a07;
	border-color: var(--gold);
}

/* ────────────────────────────────────────────── the featured guide */

.rpg-ml-library .featguide {
	max-width: var(--wrap);
	margin: 26px auto;
	padding: 0 26px;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 0;
}

.rpg-ml-library .featguide .art {
	background: linear-gradient(135deg, #2e4636, #67b83e);
	min-height: 230px;
	display: grid;
	place-items: center;
	font-size: 64px;
	color: #fff;
	border-radius: 14px 0 0 14px;
	overflow: hidden;
}

/* A real featured image where the prototype has only a glyph. */
.rpg-ml-library .featguide .art img,
.rpg-ml-library .guide .art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rpg-ml-library .featguide .body {
	background: var(--card);
	border: 1px solid var(--line);
	border-left: 0;
	border-radius: 0 14px 14px 0;
	padding: 26px;
}

.rpg-ml-library .featguide h2 { font-size: 26px; margin: 6px 0 8px; }
.rpg-ml-library .featguide h2 a { color: inherit; text-decoration: none; }
.rpg-ml-library .featguide h2 a:hover { text-decoration: underline; }

.rpg-ml-library .featguide .flede {
	color: #4c4a3c;
	font-family: var(--book);
	font-size: 15px;
	line-height: 1.65;
}

.rpg-ml-library .featguide .btn { width: max-content; margin-top: 14px; }

/* ──────────────────────────────────────────────── the byline chip */

.rpg-ml-library .gmeta,
.rpg-ml-guide .gmeta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	color: var(--muted);
	font-size: 12px;
	margin: 4px 0 10px;
}

.rpg-ml-library .gmeta i,
.rpg-ml-guide .gmeta i {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--forest);
	color: var(--gold-hi);
	display: grid;
	place-items: center;
	font-style: normal;
	font-weight: 700;
	font-size: 10px;
	flex: 0 0 auto;
}

.rpg-ml-guide .ghero .gmeta { color: #cfd8c8; }
.rpg-ml-guide .ghero .gmeta a { color: var(--gold-hi); }

/* ───────────────────────────────────────────────── the guide grid */

.rpg-ml-library .libsec { padding-top: 8px; }

.rpg-ml-library .guidegrid,
.rpg-ml-guide .guidegrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* Round 4: "the guide cards want more style ... richer library character".
   The card is a CATALOGUE CARD now: a bound brass edge down the left, the way
   a card pulled from a drawer has a spine side, and a warm vignette in the
   corner so the paper is not a flat fill. Both are drawn, so neither costs a
   request.

   Ruled lines were tried here first and removed: at any opacity a full-width
   horizontal rule crossing a card reads as a table divider, not as texture,
   and it never lines up with the text baseline above it. */
.rpg-ml-library .guide,
.rpg-ml-guide .guide {
	position: relative;
	background:
		radial-gradient(120% 80% at 100% 100%, rgba(120, 96, 48, .09), transparent 60%),
		var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s, box-shadow .2s;
}

.rpg-ml-library .guide::before,
.rpg-ml-guide .guide::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 5px;
	background: linear-gradient(180deg, var(--brass), rgba(140, 106, 47, .45));
	z-index: 1;
}

/* The rod hole, near the foot of the spine — the detail that says the card
   came out of a drawer rather than a printer. Decorative and inside the
   card's own overflow, so it can never affect layout. */
.rpg-ml-library .guide::after,
.rpg-ml-guide .guide::after {
	content: "";
	position: absolute;
	left: 11px;
	bottom: 12px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(60, 45, 20, .16);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25);
	z-index: 1;
	pointer-events: none;
}

.rpg-ml-library .guide:hover,
.rpg-ml-guide .guide:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px rgba(60, 45, 20, .12);
}

/* ─────────────────────────────────── the fortune-teller card (verdicts)
   Round 4: "or their own fortune-teller-card variant (purple) for
   featured/verdict cards — Kevin explicitly likes the purple."

   Same palette and the same gilt double frame as the card tent
   (rpg-shop/assets/ml-tarot.css), because they are the same idea in two
   places: the tent is where the shop tells fortunes, and a verdict is the one
   thing in the library that is a judgement rather than an instruction.

   A REPAINT: the card's structure, its links and its "games in this guide" row
   are untouched, so nothing about how it works changes. */
.rpg-ml-library .guide.tarot,
.rpg-ml-library .featguide.tarot .body {
	--tarot-plum: #2f1c33;
	--tarot-lilac: #c9a6d4;
	--tarot-quiet: #b9a6bf;
	position: relative;
	background:
		radial-gradient(circle at 18% 12%, rgba(201, 166, 212, .16), transparent 42%),
		linear-gradient(165deg, #3a2440, var(--tarot-plum) 55%, #1d1121);
	border-color: #6d4a78;
	color: #f2e4d6;
}

/* The featured guide is a two-panel GRID, not a panel: repainting the wrapper
   would colour the gutter and leave the copy panel beige, so the treatment
   lands on `.body`, which is the piece that has a background of its own. */
.rpg-ml-library .featguide.tarot .art { border-color: #6d4a78; }

/* The gilt inner rule — the frame that makes it a card and not a panel. It
   takes over `::after` from the catalogue card's rod hole, which is right:
   a fortune-teller's card was never filed in a drawer. The brass spine
   (`::before`) stays, in gold. */
.rpg-ml-library .guide.tarot::after,
.rpg-ml-library .featguide.tarot .body::after {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(220, 183, 95, .38);
	border-radius: 9px;
	pointer-events: none;
	z-index: 2;
}

.rpg-ml-library .guide.tarot::before {
	background: linear-gradient(180deg, #dcb75f, rgba(140, 106, 47, .5));
}

.rpg-ml-library .guide.tarot .eyebrow,
.rpg-ml-library .featguide.tarot .eyebrow { color: var(--tarot-lilac); }
.rpg-ml-library .guide.tarot h3 a,
.rpg-ml-library .featguide.tarot h2 a { color: #f6e8d0; }
.rpg-ml-library .guide.tarot p,
.rpg-ml-library .featguide.tarot .flede { color: var(--tarot-quiet); }
.rpg-ml-library .guide.tarot .gmeta,
.rpg-ml-library .featguide.tarot .gmeta { color: var(--tarot-quiet); }

/* The "games in this guide" chips invert too, or they stay a beige row on a
   plum card. Their shape comes from the base `.ing a` rule — only the three
   colours change here. */
.rpg-ml-library .guide.tarot .ing a,
.rpg-ml-library .featguide.tarot .ing a {
	background: rgba(246, 232, 208, .12);
	border-color: rgba(201, 166, 212, .45);
	color: #f0e2d2;
}
.rpg-ml-library .guide.tarot .ing a:hover,
.rpg-ml-library .featguide.tarot .ing a:hover { border-color: var(--tarot-lilac); }

/* a scatter of stars behind the copy, drawn not placed */
.rpg-ml-library .guide.tarot .b {
	position: relative;
	background:
		radial-gradient(circle at 84% 18%, rgba(255, 244, 214, .5) 0 1px, transparent 1.6px),
		radial-gradient(circle at 12% 62%, rgba(255, 244, 214, .35) 0 1px, transparent 1.6px),
		radial-gradient(circle at 68% 82%, rgba(255, 244, 214, .3) 0 1px, transparent 1.6px),
		radial-gradient(circle at 40% 34%, rgba(255, 244, 214, .22) 0 1px, transparent 1.6px);
}

/* The tilt the tent uses: it sits slightly off-square and straightens as you
   reach for it. The GRID card only — the featured guide is a wide banner, and
   a rotating banner is a crooked page. */
@media (min-width: 720px) {
	.rpg-ml-library .guide.tarot { transform: rotate(-.7deg); }
	.rpg-ml-library .guide.tarot:hover { transform: rotate(0) translateY(-3px); }
}

/* ──────────────────────────────────────────────── the live chip filter
   Filtering hides cards, and a hidden card must not keep its grid slot or the
   shelf fills with holes — `display:none`, not visibility. */
.rpg-ml-library .guide[hidden],
.rpg-ml-library .featguide[hidden] { display: none; }

/* Shown when a chip matches nothing on this page. (`.libempty` further down is
   a different thing: the server-rendered state of an archive with no posts at
   all.) It is never reached from a server render — the chip row is built from
   terms that have posts. */
.rpg-ml-library .libnone {
	margin: 8px 0 0;
	padding: 26px 18px;
	text-align: center;
	font-family: var(--book);
	font-style: italic;
	color: var(--muted);
	background: var(--card);
	border: 1px dashed var(--line);
	border-radius: 14px;
}

/* The honesty line — "showing 2 of 9 on this page", with a link to the full
   category archive. Quiet by design: it is a footnote about the pager, not a
   call to action competing with the cards above it. */
.rpg-ml-library .libmore {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--muted);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: baseline;
}

.rpg-ml-library .libmore a {
	color: var(--gold);
	font-weight: 600;
	text-decoration: none;
}

.rpg-ml-library .libmore a:hover { text-decoration: underline; }

.rpg-ml-library .guide .art,
.rpg-ml-guide .guide .art {
	height: 120px;
	display: grid;
	place-items: center;
	font-size: 40px;
	color: #fff;
	overflow: hidden;
	text-decoration: none;
}

.rpg-ml-library .guide .b,
.rpg-ml-guide .guide .b {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.rpg-ml-library .guide .eyebrow { color: var(--gold); }

.rpg-ml-library .guide h3,
.rpg-ml-guide .guide h3 { font-size: 16px; line-height: 1.3; }

.rpg-ml-library .guide h3 a,
.rpg-ml-guide .guide h3 a { color: inherit; text-decoration: none; }
.rpg-ml-library .guide h3 a:hover,
.rpg-ml-guide .guide h3 a:hover { text-decoration: underline; }

.rpg-ml-library .guide p { font-size: 13px; color: var(--muted); }
.rpg-ml-library .guide .gmeta { margin: 0; }

/* "Games in this guide" — the row that makes this a specialist's shopfront
   rather than a blog. Pushed to the bottom of the card so a short guide and a
   long one line up. */
.rpg-ml-library .ing {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: auto;
}

.rpg-ml-library .ing a {
	font-size: 11px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 4px 10px;
	color: var(--ink);
	text-decoration: none;
}

.rpg-ml-library .ing a:hover { border-color: var(--forest); }

.rpg-ml-library .featguide .ing { margin: 14px 0 0; }

.rpg-ml-library .libpager {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 26px;
}

.rpg-ml-library .libpager .page-numbers {
	border: 1px solid var(--line);
	background: var(--card);
	border-radius: 999px;
	min-width: 40px;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

.rpg-ml-library .libpager .page-numbers.current {
	background: var(--forest);
	color: #f3ead6;
	border-color: var(--forest);
}

.rpg-ml-library .libempty {
	text-align: center;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 46px 24px;
}

.rpg-ml-library .libempty h2 { font-size: 24px; }
.rpg-ml-library .libempty p { color: var(--muted); margin: 8px 0 18px; }

/* ─────────────────────────────────────────────────────── one guide */

.rpg-ml-guide .ghero h1 {
	font-size: clamp(30px, 4.2vw, 48px);
	color: #f7edd6;
	max-width: 24ch;
	margin: 10px 0 6px;
}

.rpg-ml-guide .ghero .crumb a { color: #cfd8c8; }

.rpg-ml-guide .gcover {
	max-width: var(--wrap);
	margin: -28px auto 0;
	padding: 0 26px;
	position: relative;
	z-index: 3;
}

.rpg-ml-guide .gcover img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 20px 44px rgba(30, 22, 10, .28);
	display: block;
}

/* A reading measure, not a full-width wall of text. 68ch is the usual
   comfortable range for body prose; the shop's own font is on the wide side,
   so this lands near 640px. */
.rpg-ml-guide .gbody {
	max-width: 68ch;
	margin: 34px auto 0;
	padding: 0 26px;
	font-family: var(--book);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ink);
}

.rpg-ml-guide .gbody > * + * { margin-top: 1.1em; }

.rpg-ml-guide .gbody h2 {
	font-size: 27px;
	margin-top: 1.8em;
}

.rpg-ml-guide .gbody h3 { font-size: 21px; margin-top: 1.5em; }

.rpg-ml-guide .gbody :is(ul, ol) {
	padding-left: 1.3em;
	list-style: revert;
}

.rpg-ml-guide .gbody li + li { margin-top: .3em; }

.rpg-ml-guide .gbody blockquote {
	border-left: 3px solid var(--gold);
	padding-left: 18px;
	font-style: italic;
	color: #4c4a3c;
}

.rpg-ml-guide .gbody img { border-radius: 10px; }

.rpg-ml-guide .gbody a {
	color: var(--forest);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rpg-ml-guide .gpages {
	display: flex;
	gap: 8px;
	margin-top: 26px;
	font-family: var(--mono);
	font-size: 12px;
}

.rpg-ml-guide .gshop {
	max-width: var(--wrap);
	margin: 40px auto 0;
	padding: 0 26px;
}

.rpg-ml-guide .gshoprow {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}

.rpg-ml-guide .gprod {
	display: flex;
	gap: 12px;
	align-items: center;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px;
	text-decoration: none;
	color: var(--ink);
	transition: transform .2s, box-shadow .2s;
}

.rpg-ml-guide .gprod:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 26px rgba(60, 45, 20, .12);
}

.rpg-ml-guide .gprod .pimg {
	width: 56px;
	height: 72px;
	flex: 0 0 auto;
	border-radius: 4px 7px 7px 4px;
	overflow: hidden;
	background: #1c3a30;
}

.rpg-ml-guide .gprod .pimg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rpg-ml-guide .gprod .pb {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.rpg-ml-guide .gprod b {
	font-family: var(--serif);
	font-size: 14px;
	line-height: 1.25;
}

.rpg-ml-guide .gprod .price { font-size: 13px; }

.rpg-ml-guide .gmore { padding-top: 26px; }

/* Comments. WordPress's default form is the last unstyled thing on an
   otherwise finished page, and "no page ships default-styled" includes the
   half of a page a reader only sees at the bottom. Structure is core's —
   `comment_form()` output, its nonces and its fields — dressed only. */
.rpg-ml-guide .gcomments {
	max-width: 68ch;
	margin: 40px auto 0;
	padding: 0 26px 20px;
}

.rpg-ml-guide .gcomments .comment-reply-title,
.rpg-ml-guide .gcomments .comments-title {
	font-family: var(--serif);
	font-size: 22px;
	margin-bottom: 6px;
}

.rpg-ml-guide .gcomments .comment-notes,
.rpg-ml-guide .gcomments .logged-in-as {
	font-size: 12.5px;
	color: var(--muted);
	margin-bottom: 14px;
}

.rpg-ml-guide .gcomments .comment-form {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 20px;
}

.rpg-ml-guide .gcomments .comment-form p { margin: 0 0 14px; }

.rpg-ml-guide .gcomments label {
	display: block;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 5px;
}

.rpg-ml-guide .gcomments .comment-form-cookies-consent label {
	display: inline;
	font-family: inherit;
	font-size: 13px;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ink);
}

.rpg-ml-guide .gcomments :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px;
	/* 16px, or iOS Safari zooms the viewport on focus. */
	font-size: 16px;
	background: #fff;
	color: var(--ink);
	font-family: var(--sans);
}

.rpg-ml-guide .gcomments textarea { min-height: 150px; line-height: 1.6; }

.rpg-ml-guide .gcomments .submit {
	background: linear-gradient(180deg, var(--gold-hi), var(--gold));
	color: #2a1a06;
	border: 0;
	border-radius: 10px;
	padding: 12px 22px;
	font-weight: 700;
	font-size: 14px;
	min-height: 44px;
	cursor: pointer;
}

.rpg-ml-guide .gcomments .comment-list {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
}

.rpg-ml-guide .gcomments .comment-list li { margin-bottom: 14px; }

.rpg-ml-guide .gcomments .comment-body {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 16px 18px;
}

.rpg-ml-guide .gcomments .comment-meta {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	margin-bottom: 8px;
}

.rpg-ml-guide .gcomments .comment-author img {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 8px;
}

/* ──────────────────────────────────────────────────── breakpoints */

@media (max-width: 1000px) {
	.rpg-ml-library .guidegrid,
	.rpg-ml-guide .guidegrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.rpg-ml-library .featguide { grid-template-columns: 1fr; }
	.rpg-ml-library .featguide .art {
		border-radius: 14px 14px 0 0;
		min-height: 170px;
	}
	.rpg-ml-library .featguide .body {
		border-left: 1px solid var(--line);
		border-top: 0;
		border-radius: 0 0 14px 14px;
	}
	.rpg-ml-library .guidegrid,
	.rpg-ml-guide .guidegrid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.rpg-ml-library .libhero,
	.rpg-ml-guide .ghero { padding-block: 38px 32px; }
	.rpg-ml-library .featguide { padding: 0 16px; }
	.rpg-ml-guide .gcover,
	.rpg-ml-guide .gbody,
	.rpg-ml-guide .gshop,
	.rpg-ml-guide .gcomments { padding-left: 16px; padding-right: 16px; }
	.rpg-ml-guide .gbody { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.rpg-ml-library .guide,
	.rpg-ml-guide .guide,
	.rpg-ml-guide .gprod { transition: none; }
	.rpg-ml-library .guide:hover,
	.rpg-ml-guide .guide:hover,
	.rpg-ml-guide .gprod:hover { transform: none; }
}

/* ═══════════════════════════════════════════════ THE READING ROOM (1.21.0)
   Round 6: "a library-themed effects scene like the shop got: shelves,
   drifting dust motes in lamplight, maybe a book that peeks/slides out when
   poked, a quill that scribbles." Round 8 moved the general store's lamp and
   ladder in. ROUND 9 REBUILT IT, and Kevin's note is the reason:

   *"Current scene is too small/sparse and the old general-store scene was much
   more pleasant in design — match THAT richness: warmer shading, fuller
   composition. A BIGGER bookcase that reads as a proper LIBRARY case (taller,
   3–4+ shelves, crown moulding, fills more of the hero); MAGICAL OBJECTS among
   the books (orb, hourglass, candle, crystal, small globe — a couple pokeable);
   reposition the LADDER believably against the tall case; the open BOOK goes on
   a PEDESTAL/lectern; the LAMP gets a WIDER beam of light."*

   THE DIAGNOSIS UNDER ALL OF THAT IS ONE THING: there was no case. Two boards
   floated on a dark green wall with nothing holding them up, a ladder leaned on
   nothing, and a book lay flat in mid-air. The general store read as a room
   because it had a floor, a back wall and a ceiling; this had a light and some
   objects. What round 9 adds is the FURNITURE — a back panel, two stiles, a
   cornice and a plinth — and everything else follows from having something to
   stand things on and lean things against.

   Built from the general store's lessons rather than from its code — the two
   scenes share no markup, and that shelf generator lives in rpg-shop, which
   this plugin does not load. What IS shared is the set of rules that made the
   store work:

   • z-index ABOVE `.libhero .in`. That wrapper is a full-height block the
     width of the container at z-index:2, so anything drawn under it is
     unclickable however correct the handler is — the bug the agenda's sundial
     hit an hour before this was written.
   • The layer is pointer-events:none and only the pokeable items opt back in,
     so an aria-hidden decoration can never swallow a click meant for the page.
   • Everything is dealt to the RIGHT of the copy and the scene fades out
     towards it, because an item under the fade is invisible — merely dim for a
     book, and a trap for something you are meant to click.
   ══════════════════════════════════════════════════════════════════════════ */

.rpg-ml-library .readingroom {
	position: absolute;
	inset: 0 0 0 auto;
	/* Wider than round 8's `min(52%, 620px)`: "fills more of the hero" is half
	   the note, and a case with sides and a cornice needs the room its parts
	   take up before any of it counts as bigger. */
	width: min(58%, 700px);
	z-index: 3;
	pointer-events: none;
	/* The fade towards the headline. The scene is furniture behind the words,
	   not a picture beside them. */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 32%, #000);
	mask-image: linear-gradient(90deg, transparent, #000 32%, #000);
}

/* ---- THE CASE (round 9) -------------------------------------------------
   A back panel, two stiles, a cornice and a plinth. Everything else in the
   scene stands on it or leans against it, which is what round 8 had no way to
   do: its two shelves were boards with a bottom border and a drop shadow, and
   a board with nothing under it does not read as furniture however good the
   books on it are. */
.rpg-ml-library .rrcase {
	position: absolute;
	right: 4%;
	top: 14px;
	bottom: 34px;
	/* Wide enough that the LEFT stile falls under the mask's fade and dissolves.
	   At 78% it landed at 18% of the layer, where the mask is still at .56, and
	   drew a hard vertical edge down the middle of the hero — which also said
	   the library was exactly one bookcase wide. One visible side and one
	   running off into the dark reads as a wall of them. */
	width: 96%;
}

/* The back panel is warm and only a little lighter than the wall. Wood in a
   dark room is not brown, it is a slightly warmer dark — paint it #6b4a26 and
   the case reads as a cardboard box lit from the front. The vertical grain is
   two repeating gradients on different periods so it does not stripe. */
.rpg-ml-library .rrback {
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(90deg, rgba(255, 226, 170, .028) 0 2px, transparent 2px 9px),
		repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 23px),
		linear-gradient(170deg, #2b1f14, #1d1610 62%, #150f0b);
	box-shadow: inset 0 12px 22px rgba(0, 0, 0, .55);
}

/* the two stiles, which are the case's edges and the thing the shelves die
   into */
.rpg-ml-library .rrside {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 13px;
	background: linear-gradient(90deg, #4a3420, #2f2115 62%, #241a10);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3);
}

.rpg-ml-library .rrside.l { left: 0; background: linear-gradient(90deg, #241a10, #3f2c1b 55%, #513a23); }
.rpg-ml-library .rrside.r { right: 0; }

/* THE CORNICE. It overhangs the case on both sides and carries a dentil row
   under it — the two details that separate a bookcase from a shelving unit,
   and both cost one gradient. */
.rpg-ml-library .rrcrown {
	position: absolute;
	left: -15px;
	right: -15px;
	top: -14px;
	height: 22px;
	border-radius: 2px 2px 0 0;
	background: linear-gradient(#6b4f2c, #4a3420 42%, #2c1f13);
	box-shadow: 0 5px 12px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 226, 170, .3);
}

.rpg-ml-library .rrcrown::after {
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 0;
	height: 5px;
	background: repeating-linear-gradient(90deg, #332415 0 4px, transparent 4px 9px);
}

/* the plinth the whole thing stands on */
.rpg-ml-library .rrplinth {
	position: absolute;
	left: -11px;
	right: -11px;
	bottom: -12px;
	height: 16px;
	border-radius: 0 0 2px 2px;
	background: linear-gradient(#4a3420, #2b1e12 60%, #1a120c);
	box-shadow: 0 8px 16px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 226, 170, .22);
}

/* THE WARM WASH. Kevin asked for "warmer shading", and this is the half of it
   that is not the lamp: a pool of warm light on the case where the beam lands,
   and the corners falling away from it. It sits over the shelves and under
   nothing — `pointer-events:none`, because the general store spent a round
   learning that a light is not an object. */
.rpg-ml-library .rrwarm {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(58% 78% at 62% 22%, rgba(255, 198, 112, .3), rgba(255, 198, 112, 0) 74%),
		radial-gradient(90% 60% at 70% 74%, rgba(255, 176, 84, .12), rgba(255, 176, 84, 0) 72%),
		radial-gradient(126% 104% at 52% 40%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .46));
}

/* ---- the lamp -----------------------------------------------------------
   The cone starts at the shade's bottom LIP and is exactly as wide there as
   the shade is. rpg-shop 1.20.0 found the alternative the hard way: a
   `radial-gradient(closest-side at 50% 0)` is degenerate — distance zero — so
   it renders as nothing at all, which reads as a glow detached from its
   lamp.

   ROUND 9 WIDENED IT, as asked: a 64px shade over a beam that opens to nearly
   four times its own width by the foot of the case, against round 8's 46px
   over a beam that reached 178%. The old cone lit a column down the middle of
   the wall; this one washes the shelves, which is what a reading lamp does. */
/* ⚠ THE LAMP'S BOX IS MOSTLY AIR — a cord one pixel wide, a shade, a bulb.
   Until round 8 the box itself took the pointer events, so a transparent
   rectangle a fifth of the wall wide was swallowing the poke of every book,
   scroll and ink pot standing behind it: measured with `elementFromPoint`, all
   25 probe points over the first ware returned `rrlamp`. It is the same bug
   rpg-shop 1.20.0 fixed on the general store's lamp, and this lamp — written
   after it, from its lessons — inherited the geometry without the fix. You grab
   a lamp by its SHADE.

   The cord opts in too: it is 1px wide and nobody will ever hit it, but a cord
   that cannot be pulled is a cord, and it costs nothing. */
.rpg-ml-library .rrlamp {
	position: absolute;
	right: 26%;
	top: 0;
	width: 74px;
	height: 62%;
	pointer-events: none;
	transform-origin: 50% 0;
	z-index: 4;
}

.rpg-ml-library .rrcord,
.rpg-ml-library .rrshade { pointer-events: auto; cursor: pointer; }

.rpg-ml-library .rrcord {
	position: absolute;
	left: 50%;
	top: 0;
	width: 1px;
	height: 30px;
	margin-left: -.5px;
	background: rgba(226, 199, 140, .4);
}

.rpg-ml-library .rrshade {
	position: absolute;
	left: 50%;
	top: 30px;
	width: 64px;
	height: 27px;
	margin-left: -32px;
	background: linear-gradient(#7a5e2c, #43331a);
	clip-path: polygon(31% 0, 69% 0, 100% 100%, 0 100%);
	/* the shade-glow the general store's lamp had — the light caught on the
	   inside of the shade, which is what stops it reading as a paper cone */
	box-shadow: inset 0 -6px 9px rgba(255, 226, 160, .6), 0 3px 9px rgba(0, 0, 0, .45);
}

/* ---- the filament (round 8) ---------------------------------------------
   This lamp swung from the day it was built but had no bulb to fail, so the
   poke moved the light without ever disturbing it. The general store's lamp
   did both, and the sputter is the half that reads: a lamp that swings in
   silence is a lamp on a hinge, and a lamp whose filament stutters when it
   swings is a lamp on a wire. It was a `::after` on the shade until round 8 — a
   pseudo-element cannot carry an animation of its own independently of the
   shade's, which is exactly what the sputter needs. */
.rpg-ml-library .rrbulb {
	position: absolute;
	left: 50%;
	top: 54px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border-radius: 50%;
	background: #ffeec2;
	box-shadow: 0 0 20px 9px rgba(255, 226, 160, .5);
	pointer-events: auto;
	cursor: pointer;
	animation: rpg-rr-flick 4.6s ease-in-out infinite;
}

@keyframes rpg-rr-flick {
	0%, 100% { opacity: .88 }
	42% { opacity: 1 }
	55% { opacity: .82 }
	70% { opacity: .96 }
}

/* The CONE sputters with the bulb. Flickering the filament while the beam it
   casts holds perfectly steady is the tell that the two are unrelated. */
.rpg-ml-library .rrlamp.swing .rrbulb,
.rpg-ml-library .rrlamp.swing .rrcone { animation: rpg-rr-sputter 1.5s steps(1, end); }

@keyframes rpg-rr-sputter {
	0%, 8%, 20%, 44% { opacity: 1 }
	4%, 14%, 30% { opacity: .12 }
	60% { opacity: .7 }
	100% { opacity: .88 }
}

.rpg-ml-library .rrcone {
	position: absolute;
	left: 50%;
	top: 57px;
	width: 64px;
	height: 296px;
	margin-left: -32px;
	background: linear-gradient(rgba(255, 222, 158, .3), rgba(255, 222, 158, .08) 52%, rgba(255, 222, 158, 0));
	clip-path: polygon(0 0, 100% 0, 296% 100%, -196% 100%);
	filter: blur(3px);
	/* The cone is LIGHT, not an object — and at this width that matters more
	   than it did at 46px. It falls across all four shelves, so with pointer
	   events on it would swallow the pokes of every book standing in the
	   lamplight; rpg-site-styles 1.21.0 measured five spines of 28 lost to the
	   narrow version. Light does not intercept a hand. Only the shade and its
	   cord answer for the lamp, and a book behind the shade itself still
	   answers with a swing, which is the right answer for something you cannot
	   reach past a lampshade. */
	pointer-events: none;
}

.rpg-ml-library .rrlamp.swing { animation: rpg-rr-swing 1.5s var(--ease-out); }

@keyframes rpg-rr-swing {
	0% { transform: rotate(0) }
	22% { transform: rotate(4.5deg) }
	48% { transform: rotate(-3deg) }
	72% { transform: rotate(1.6deg) }
	100% { transform: rotate(0) }
}

/* ---- dust motes ---------------------------------------------------------
   In the cone, not over the whole hero: dust you can see is dust in a light
   beam, and motes drifting across a dark corner read as snow. */
.rpg-ml-library .rrmotes {
	position: absolute;
	right: 10%;
	top: 60px;
	width: 40%;
	height: 56%;
	z-index: 4;
	pointer-events: none;
}

.rpg-ml-library .rrmote {
	position: absolute;
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: rgba(255, 240, 205, .75);
	opacity: 0;
	animation: rpg-rr-drift linear infinite;
}

@keyframes rpg-rr-drift {
	0% { opacity: 0; transform: translate3d(0, 12px, 0) }
	14% { opacity: .8 }
	72% { opacity: .55 }
	100% { opacity: 0; transform: translate3d(var(--dx, 8px), -70px, 0) }
}

/* ---- the shelves ---------------------------------------------------------
   Four now, inside the case and dying into its stiles. The board is a real
   board — a lit top edge, a dark front face and a shadow thrown down onto the
   shelf below — rather than round 8's bottom border. */
.rpg-ml-library .rrshelf {
	position: absolute;
	left: 13px;
	right: 13px;
	height: 74px;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 2px;
	padding: 0 9px 5px;
	background: linear-gradient(180deg, transparent 0 calc(100% - 6px), #4a3420 calc(100% - 6px), #241a0f);
	box-shadow: 0 7px 13px rgba(0, 0, 0, .48);
}

.rpg-ml-library .rrshelf.s1 { top: 22px; }
.rpg-ml-library .rrshelf.s2 { top: 98px; }
.rpg-ml-library .rrshelf.s3 { top: 174px; }
.rpg-ml-library .rrshelf.s4 { top: 250px; }

/* ---- the rolling ladder (round 8, repositioned round 9) ------------------
   Round 8 hooked it over a floating board halfway up a wall, which was the
   best available answer when there was no case. It runs the FULL HEIGHT of the
   case now: hooked on the rail under the cornice, foot on the floor in front
   of the plinth. That is what a library ladder is, and it is what Kevin's
   "reposition the ladder believably against the tall case" asks for.

   IT IS GRABBED BY ITS RAILS. The box is 52px wide and the height of the case
   and the rungs are 6px every 34px, so most of it is air — as a single hit
   target it swallows the poke of every spine standing behind it. These two
   strips lie over the painted rails and nothing else in it answers. */
.rpg-ml-library .rrladder {
	position: absolute;
	/* Clear of BOTH the lamp (26%) and the lectern (9%). At 31% it ran straight
	   through the lampshade and its foot landed in the lectern's column, so the
	   three objects in the scene with the most drawing in them were stacked on
	   one another. */
	right: 40%;
	top: 20px;
	bottom: 20px;
	width: 52px;
	/* .82, not round 8's .62. That value was set against a dark GREEN wall; on
	   the case it is dark wood on dark wood and the ladder disappeared into the
	   back panel. The rails are lighter than the case for the same reason. */
	opacity: .82;
	pointer-events: none;
	/* Pivot on the FOOT it would actually turn on, and fall LEFT. Falling right
	   swings a 300px ladder past the hero's right edge, where `overflow:hidden`
	   cuts it in half mid-fall; to the left it goes over into the shadow the
	   scene is already fading into. */
	transform-origin: bottom left;
	transform: rotate(5deg);
	z-index: 3;
	background:
		linear-gradient(90deg, #7a5c33 0 9px, transparent 9px calc(100% - 9px), #7a5c33 calc(100% - 9px)),
		repeating-linear-gradient(180deg, transparent 0 28px, #6b4f2c 28px 34px);
	filter: drop-shadow(-3px 4px 5px rgba(0, 0, 0, .55));
}

.rpg-ml-library .rrrail {
	position: absolute;
	top: 0;
	bottom: 0;
	/* 9px, not the general store's 7. A tall ladder leaning at 5deg shears its
	   rails across a probe grid, so a 7px strip took 3 of 25 real clicks —
	   geometrically correct and still too hard to hit. 18 of the ladder's 52px
	   are grab now, and the 34px of air between them is what the spines behind
	   it are still reachable through. */
	width: 9px;
	pointer-events: auto;
	cursor: pointer;
}

.rpg-ml-library .rrrail.l { left: 0; }
.rpg-ml-library .rrrail.r { right: 0; }

/* the bar hooked over the top rail — the detail that makes it a library
   ladder rather than a stepladder somebody left leaning on a bookcase */
.rpg-ml-library .rrladder::before {
	content: "";
	position: absolute;
	left: -7px;
	right: -7px;
	top: -9px;
	height: 6px;
	border-radius: 3px;
	background: #8a6a3c;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

/* …and a foot, so it stands on the floor instead of stopping in mid-air */
.rpg-ml-library .rrladder::after {
	content: "";
	position: absolute;
	left: -3px;
	right: -3px;
	bottom: -4px;
	height: 5px;
	border-radius: 2px;
	background: #3a2818;
	box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}

/* Poke it and it tips past its balance, goes over, lies there a moment and
   picks itself back up. */
.rpg-ml-library .rrladder.tips { animation: rpg-rr-ladderfall 3.4s cubic-bezier(.5, 0, .6, 1); }

@keyframes rpg-rr-ladderfall {
	0% { transform: rotate(5deg) }
	10% { transform: rotate(12deg) }
	30% { transform: rotate(-42deg) }
	38% { transform: rotate(-58deg) }
	44% { transform: rotate(-52deg) }
	50%, 66% { transform: rotate(-59deg) }
	86% { transform: rotate(-2deg) }
	94% { transform: rotate(9deg) }
	100% { transform: rotate(5deg) }
}

.rpg-ml-library .rrspine {
	position: relative;
	flex: 0 0 auto;
	border-radius: 1px 1px 0 0;
	pointer-events: auto;
	cursor: pointer;
	transform-origin: 50% 100%;
	box-shadow: inset -1px 0 0 rgba(0, 0, 0, .35), inset 1px 0 0 rgba(255, 255, 255, .07);
	transition: transform .28s var(--ease-out), filter .28s;
}

.rpg-ml-library .rrspine.lean { transform: rotate(-7deg); }
.rpg-ml-library .rrspine.gap { margin-right: 9px; }

/* Hovering GROWS the book rather than tilting it. rpg-shop 1.20.0: a 3deg tilt
   on an 11px object moves it out from under the cursor between the mousemove
   and the mousedown, so the click never lands on the thing that just reacted. */
.rpg-ml-library .rrspine:hover { filter: brightness(1.25); transform: scaleY(1.04); }
.rpg-ml-library .rrspine.lean:hover { transform: rotate(-7deg) scaleY(1.04); }

/* THE BOOK SLIDING OUT. It rises out of the row, tips towards the reader and
   settles back — a book taken half off a shelf and thought better of. */
.rpg-ml-library .rrspine.pulled { animation: rpg-rr-pull 1.15s var(--ease-out); }

@keyframes rpg-rr-pull {
	0% { transform: translateY(0) rotate(0) }
	26% { transform: translateY(-15px) rotate(0) }
	52% { transform: translateY(-17px) rotate(-11deg) }
	80% { transform: translateY(-6px) rotate(-3deg) }
	100% { transform: translateY(0) rotate(0) }
}

/* ONE spine per load is the one with something in it. It pulls further out and
   a gold seam shows down its edge, which is the whole pay-off — a scene that
   promises a secret and delivers a slightly different animation is worse than
   one that promises nothing. */
.rpg-ml-library .rrspine.secret.pulled { animation: rpg-rr-secret 1.5s var(--ease-out); }

.rpg-ml-library .rrspine.secret.pulled::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: 0 0 14px 2px rgba(226, 199, 140, .85);
	animation: rpg-rr-seam 1.5s var(--ease-out);
}

@keyframes rpg-rr-secret {
	0% { transform: translateY(0) rotate(0) }
	22% { transform: translateY(-26px) rotate(0) }
	46% { transform: translateY(-30px) rotate(-16deg) }
	70% { transform: translateY(-26px) rotate(-13deg) }
	100% { transform: translateY(0) rotate(0) }
}

@keyframes rpg-rr-seam {
	0%, 100% { opacity: 0 }
	30%, 62% { opacity: 1 }
}

/* ---- the wares on the shelves (round 8) ---------------------------------
   Kevin left the choice open — "if any ware fits the Library (scrolls, ink
   pots), Claude Code's call" — and these two are the whole list. A library has
   rolled documents in it and something to write with; it does not have a
   cauldron, and the tankards that came off the shop's bottom shelf stayed
   there. They are dealt in among the spines by ml-library.js and poke like
   them, with a wobble rather than a pull: a scroll does not slide off a shelf
   the way a book does, it rocks. */
.rpg-ml-library .rrware {
	position: relative;
	flex: 0 0 auto;
	align-self: flex-end;
	width: var(--w);
	height: var(--h);
	margin: 0 3px;
	pointer-events: auto;
	cursor: pointer;
	transform-origin: 50% 100%;
	transition: transform .28s var(--ease-out), filter .28s;
}

/* GROWS on hover, never tilts — the same rule the spines follow, and for the
   same measured reason. */
.rpg-ml-library .rrware:hover { transform: scale(1.09); filter: brightness(1.25); }

.rpg-ml-library .rrware.nudged { animation: rpg-rr-nudge .62s cubic-bezier(.3, .9, .4, 1.1); }

@keyframes rpg-rr-nudge {
	0% { transform: rotate(0) }
	18% { transform: rotate(-8deg) }
	42% { transform: rotate(6deg) }
	66% { transform: rotate(-3.5deg) }
	84% { transform: rotate(1.5deg) }
	100% { transform: rotate(0) }
}

/* a rolled sheet stood on end, ribbon round the middle */
.rpg-ml-library .rrware.scroll .rrbody {
	position: absolute;
	inset: 0;
	border-radius: 2px;
	background: linear-gradient(90deg, #6b5a3e, #c9b183 30%, #e6d5ac 46%, #a28c60 72%, #5c4c33);
	box-shadow: inset 0 2px 3px rgba(0, 0, 0, .4);
}

.rpg-ml-library .rrware.scroll .rrband {
	position: absolute;
	left: -1px;
	right: -1px;
	top: 46%;
	height: 4px;
	background: linear-gradient(#8f2f28, #5c1c17);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}

/* an ink pot. The stopper hangs OUTSIDE the body, so the body carries the
   overflow clip and the pot does not. */
.rpg-ml-library .rrware.ink .rrbody {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 3px 3px 6px 6px;
	background: linear-gradient(100deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 46%, rgba(0, 0, 0, .34));
	box-shadow: inset -2px -2px 5px rgba(0, 0, 0, .45), inset 1px 1px 0 rgba(255, 255, 255, .2);
}

.rpg-ml-library .rrware.ink .rrbody::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--fill, 64%);
	background: linear-gradient(#2f3f66, #121a2e);
}

.rpg-ml-library .rrware.ink .rrstopper {
	position: absolute;
	left: 50%;
	bottom: 100%;
	width: 8px;
	height: 5px;
	margin-left: -4px;
	border-radius: 2px 2px 1px 1px;
	background: linear-gradient(#5b3a1c, #2f1d0c);
}

.rpg-ml-library .rrware.ink .rrglint {
	position: absolute;
	left: 20%;
	top: 16%;
	width: 2px;
	height: 40%;
	border-radius: 2px;
	background: rgba(255, 255, 255, .45);
	transform: rotate(9deg);
}

/* ---- THE MAGICAL OBJECTS (round 9) --------------------------------------
   Kevin: *"add MAGICAL OBJECTS among the books (orb, hourglass, candle,
   crystal, small globe — a couple pokeable)."* All five, and ALL of them poke:
   with five kinds dealt one per shelf, "a couple" would mean a visitor finding
   a dead object more often than a live one, and an object that lights up when
   you touch it teaches that the whole shelf is touchable.

   They are dealt among the spines like the wares, so they sit IN the row
   rather than in front of it. Each has its own reaction, because five objects
   sharing one wobble is one object painted five ways. */
.rpg-ml-library .rrmagic {
	position: relative;
	flex: 0 0 auto;
	align-self: flex-end;
	width: var(--w);
	height: var(--h);
	margin: 0 4px;
	pointer-events: auto;
	cursor: pointer;
	transform-origin: 50% 100%;
	transition: transform .28s var(--ease-out), filter .28s;
}

.rpg-ml-library .rrmagic:hover { transform: scale(1.1); filter: brightness(1.2); }

/* A magical object shares its shelf with fourteen book spines and has to read
   at a glance against them. What separates it is not size — the books are
   bigger — but that it is the only thing on the shelf giving off light. */
.rpg-ml-library .rrmagic { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55)); }

/* every one of them stands on a small brass foot, which is what puts them on
   the shelf instead of hovering a pixel above it */
.rpg-ml-library .rrfoot {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 72%;
	height: 4px;
	margin-left: -36%;
	border-radius: 1px 1px 2px 2px;
	background: linear-gradient(#a8843c, #5b4319);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}

/* THE ORB — a glass sphere with something moving in it. The swirl is a second
   radial gradient on its own slow rotation, offset from the centre, because a
   glow that pulses in place is a lamp and a glow that travels is alive. */
.rpg-ml-library .rrmagic.orb .rrglass {
	position: absolute;
	left: 50%;
	top: 0;
	width: var(--w);
	height: var(--w);
	margin-left: calc(var(--w) / -2);
	border-radius: 50%;
	overflow: hidden;
	background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .5), rgba(126, 186, 228, .28) 38%, rgba(24, 40, 60, .8));
	box-shadow: 0 0 12px rgba(126, 200, 228, .45), inset -2px -3px 6px rgba(0, 0, 0, .5);
}

.rpg-ml-library .rrmagic.orb .rrglass::after {
	content: "";
	position: absolute;
	inset: -30%;
	background: radial-gradient(closest-side, rgba(150, 230, 220, .85), rgba(90, 190, 200, 0) 70%);
	animation: rpg-rr-swirl 7s linear infinite;
}

@keyframes rpg-rr-swirl {
	0% { transform: rotate(0) translateX(22%) }
	100% { transform: rotate(360deg) translateX(22%) }
}

.rpg-ml-library .rrmagic.orb.charged .rrglass { animation: rpg-rr-orbflare 1.5s ease-out; }

@keyframes rpg-rr-orbflare {
	0% { box-shadow: 0 0 12px rgba(126, 200, 228, .45), inset -2px -3px 6px rgba(0, 0, 0, .5) }
	22% { box-shadow: 0 0 26px 6px rgba(160, 240, 230, .95), inset -2px -3px 6px rgba(0, 0, 0, .3) }
	100% { box-shadow: 0 0 12px rgba(126, 200, 228, .45), inset -2px -3px 6px rgba(0, 0, 0, .5) }
}

.rpg-ml-library .rrmagic.orb.charged .rrglass::after { animation-duration: 1.1s; }

/* THE HOURGLASS. Round 6 shipped one of these on a page motif as TWO LOOSE
   TRIANGLES — the one shape the celestial layer's sigil rule forbids, and it
   read as exactly that. This one has glass: a single waisted silhouette with
   the frame above and below it, which is what the shape actually is. */
.rpg-ml-library .rrmagic.glass .rrbody {
	position: absolute;
	left: 12%;
	right: 12%;
	top: 5px;
	bottom: 9px;
	clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%, 42% 50%);
	background: linear-gradient(100deg, rgba(255, 255, 255, .3), rgba(210, 235, 245, .12) 46%, rgba(0, 0, 0, .3));
	box-shadow: 0 0 7px rgba(226, 199, 140, .3);
}

.rpg-ml-library .rrmagic.glass .rrsand {
	position: absolute;
	left: 12%;
	right: 12%;
	top: 5px;
	bottom: 9px;
	clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%, 42% 50%);
	background: linear-gradient(180deg, transparent 0 52%, #d8a648 52%, #8a6420);
}

.rpg-ml-library .rrmagic.glass .rrcap {
	position: absolute;
	left: 4%;
	right: 4%;
	height: 5px;
	border-radius: 1px;
	background: linear-gradient(#a8843c, #5b4319);
}

.rpg-ml-library .rrmagic.glass .rrcap.t { top: 0; }
.rpg-ml-library .rrmagic.glass .rrcap.b { bottom: 4px; }

/* POKE IT AND IT TURNS OVER, AND STAYS TURNED (round 10).
   Kevin: *"HOURGLASS poke: rotates 180 degrees then RESETS weirdly — make it
   flip and SETTLE (transition both ways, or 180 to 360 continuing forward)."*
   It was a one-shot animation holding at 180deg, and when its class came off
   the element went back to 0 in a single frame: a turn followed by an unturn.

   It is a TRANSITION on a persistent angle now. `--rrturn` is written by
   ml-library.js and only ever grows — poke it four times and it is at 720deg —
   so it always turns FORWARD and never rewinds, which is the second of the two
   options in the note and the truer one: turning an hourglass over twice is two
   turns, not a turn and its undo. */
.rpg-ml-library .rrmagic.glass {
	/* The INDIVIDUAL `rotate` property, not `transform`. Every object on these
	   shelves already grows on hover through `.rrmagic:hover{transform:scale}`,
	   and a `transform:rotate()` here would take that rule's place — a flipped
	   hourglass that stops answering the pointer, or a hover that un-turns it,
	   depending which rule won. `rotate` composes with `transform` instead of
	   replacing it, and transitions on its own clock: a slow turn under a
	   quick hover. */
	rotate: var(--rrturn, 0deg);
	transition: rotate 1.15s cubic-bezier(.4, 0, .3, 1),
		transform .28s var(--ease-out), filter .28s;
}

/* The sand falls again on every poke — the one part of the turn that DOES end
   where it started, so it stays a one-shot class. It runs behind the rotation,
   which is why it is slower than it: sand settles after the glass stops. */
.rpg-ml-library .rrmagic.glass.charged .rrsand { animation: rpg-rr-sand 1.45s ease-in-out; }

@keyframes rpg-rr-sand {
	0% { transform: scaleY(1); transform-origin: 50% 0 }
	38% { transform: scaleY(.34); transform-origin: 50% 0 }
	100% { transform: scaleY(1); transform-origin: 50% 0 }
}

/* THE CANDLE. Its flame is the one live light on the shelf, so it flickers on
   its own clock — a candle that only moves when poked is a peg. */
.rpg-ml-library .rrmagic.candle .rrwax {
	position: absolute;
	left: 50%;
	bottom: 3px;
	width: 7px;
	height: calc(100% - 16px);
	margin-left: -3.5px;
	border-radius: 2px 2px 1px 1px;
	background: linear-gradient(90deg, #6b5c40, #efe2c4 42%, #a6926a);
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35);
}

/* the drip down one side, which is what makes it wax rather than a dowel */
.rpg-ml-library .rrmagic.candle .rrwax::after {
	content: "";
	position: absolute;
	left: 0;
	top: 18%;
	width: 3px;
	height: 34%;
	border-radius: 0 0 2px 2px;
	background: rgba(255, 250, 230, .55);
}

.rpg-ml-library .rrmagic.candle .rrflame {
	position: absolute;
	left: 50%;
	top: 0;
	width: 7px;
	height: 13px;
	margin-left: -3.5px;
	border-radius: 50% 50% 46% 46% / 68% 68% 32% 32%;
	background: linear-gradient(#fff3c4, #ffb43a 46%, #e2571a);
	box-shadow: 0 0 12px 4px rgba(255, 176, 70, .55);
	transform-origin: 50% 100%;
	animation: rpg-rr-flame 2.4s ease-in-out infinite;
}

@keyframes rpg-rr-flame {
	0%, 100% { transform: scaleY(1) skewX(0) }
	28% { transform: scaleY(1.14) skewX(-5deg) }
	54% { transform: scaleY(.94) skewX(4deg) }
	78% { transform: scaleY(1.08) skewX(-2deg) }
}

/* poked, it gutters — nearly out, then back */
.rpg-ml-library .rrmagic.candle.charged .rrflame { animation: rpg-rr-gutter 1.3s ease-in-out; }

@keyframes rpg-rr-gutter {
	0% { transform: scaleY(1) skewX(0); opacity: 1 }
	18% { transform: scaleY(.4) skewX(-24deg); opacity: .5 }
	34% { transform: scaleY(.2) skewX(18deg); opacity: .25 }
	52% { transform: scaleY(1.5) skewX(-6deg); opacity: 1 }
	74% { transform: scaleY(.9) skewX(4deg); opacity: 1 }
	100% { transform: scaleY(1) skewX(0); opacity: 1 }
}

/* THE CRYSTAL — three shards from one cluster, so the tallest reads as the
   point and the two beside it as the growth around it. */
.rpg-ml-library .rrmagic.crystal .rrshard {
	position: absolute;
	bottom: 3px;
	clip-path: polygon(50% 0, 100% 34%, 78% 100%, 22% 100%, 0 34%);
	background: linear-gradient(160deg, #d9b0f0, #8a5fc4 56%, #3a2360);
	filter: drop-shadow(0 0 5px rgba(180, 130, 235, .6));
}

.rpg-ml-library .rrmagic.crystal .rrshard.a { left: 8%; width: 34%; height: 62%; }
.rpg-ml-library .rrmagic.crystal .rrshard.b { left: 30%; width: 42%; height: 96%; }
.rpg-ml-library .rrmagic.crystal .rrshard.c { right: 4%; width: 30%; height: 48%; }

.rpg-ml-library .rrmagic.crystal.charged .rrshard { animation: rpg-rr-facet 1.5s ease-out; }
.rpg-ml-library .rrmagic.crystal.charged .rrshard.b { animation-delay: .1s; }
.rpg-ml-library .rrmagic.crystal.charged .rrshard.c { animation-delay: .2s; }

@keyframes rpg-rr-facet {
	0%, 100% { filter: drop-shadow(0 0 5px rgba(180, 130, 235, .6)) }
	30% { filter: drop-shadow(0 0 14px rgba(214, 176, 255, 1)) brightness(1.4) }
}

/* THE GLOBE — a sphere in an armillary ring. The ring is an ellipse laid over
   the sphere, not around it: a circle round a circle is a target. */
.rpg-ml-library .rrmagic.globe .rrsphere {
	position: absolute;
	left: 50%;
	top: 2px;
	width: calc(var(--w) * .78);
	height: calc(var(--w) * .78);
	margin-left: calc(var(--w) * -.39);
	border-radius: 50%;
	overflow: hidden;
	background:
		radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 46%),
		linear-gradient(150deg, #3c6a56, #1d3e33 60%, #10211c);
}

/* two land masses, because a plain sphere is a marble */
.rpg-ml-library .rrmagic.globe .rrsphere::after {
	content: "";
	position: absolute;
	left: 16%;
	top: 24%;
	width: 46%;
	height: 34%;
	border-radius: 46% 54% 38% 62%;
	background: rgba(168, 132, 60, .6);
	box-shadow: 6px 7px 0 -2px rgba(168, 132, 60, .5);
}

.rpg-ml-library .rrmagic.globe .rrring {
	position: absolute;
	left: 50%;
	top: 0;
	width: var(--w);
	height: calc(var(--w) * .9);
	margin-left: calc(var(--w) / -2);
	border: 2px solid #a8843c;
	border-radius: 50%;
	transform: rotate(-18deg) scaleX(.44);
	box-shadow: 0 0 5px rgba(226, 199, 140, .4);
}

.rpg-ml-library .rrmagic.globe.charged .rrsphere { animation: rpg-rr-spin 1.6s cubic-bezier(.2, .7, .3, 1); }

/* The sphere's markings travel; the sphere does not turn, because a `rotate`
   on a circle with a radial highlight is invisible. */
@keyframes rpg-rr-spin {
	0% { background-position: 0 0, 0 0 }
	100% { background-position: 0 0, -44px 0 }
}

.rpg-ml-library .rrmagic.globe.charged .rrsphere::after { animation: rpg-rr-land 1.6s cubic-bezier(.2, .7, .3, 1); }

@keyframes rpg-rr-land {
	0% { transform: translateX(0); opacity: 1 }
	48% { transform: translateX(-16px); opacity: .3 }
	52% { transform: translateX(14px); opacity: .3 }
	100% { transform: translateX(0); opacity: 1 }
}

/* ---- THE LECTERN, the open book and the quill (round 9) ------------------
   Kevin: *"the open BOOK goes on a PEDESTAL/lectern (a proper display piece,
   maybe pages that flutter on poke)."* Round 8's book lay flat on nothing in
   the bottom corner of the hero — the one object in the scene with no support
   under it at all, which is exactly the thing that made the whole composition
   read as parts rather than as a room.

   It stands in FRONT of the case, overlapping the plinth, because a lectern
   pushed back against the shelves is a shelf with a book on it. */
.rpg-ml-library .rrdesk {
	position: absolute;
	right: 9%;
	bottom: 2px;
	width: 190px;
	height: 150px;
	z-index: 5;
}

.rpg-ml-library .rrlectern {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 150px;
	height: 118px;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
}

/* the splayed foot */
.rpg-ml-library .rrlectern .rrbase {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 78px;
	height: 11px;
	margin-left: -39px;
	border-radius: 3px;
	clip-path: polygon(0 100%, 14% 0, 86% 0, 100% 100%);
	background: linear-gradient(#5a4128, #2b1e12);
}

/* the column, waisted so it is turned rather than sawn */
.rpg-ml-library .rrlectern .rrcolumn {
	position: absolute;
	left: 50%;
	bottom: 9px;
	width: 20px;
	height: 62px;
	margin-left: -10px;
	background: linear-gradient(90deg, #2b1e12, #6b4f2c 44%, #33241a 78%, #241a10);
	clip-path: polygon(22% 0, 78% 0, 68% 22%, 78% 44%, 66% 72%, 82% 100%, 18% 100%, 34% 72%, 22% 44%, 32% 22%);
}

/* the slanted top the book rests on, with a lip at its foot */
.rpg-ml-library .rrlectern .rrslope {
	position: absolute;
	left: 50%;
	bottom: 62px;
	width: 122px;
	height: 40px;
	margin-left: -61px;
	border-radius: 3px;
	background: linear-gradient(170deg, #6b4f2c, #4a3420 52%, #2b1e12);
	box-shadow: inset 0 1px 0 rgba(255, 226, 170, .3), 0 4px 9px rgba(0, 0, 0, .45);
	transform: perspective(220px) rotateX(38deg);
	transform-origin: 50% 100%;
}

.rpg-ml-library .rrlectern .rrlip {
	position: absolute;
	left: 50%;
	bottom: 58px;
	width: 126px;
	height: 6px;
	margin-left: -63px;
	border-radius: 3px;
	background: linear-gradient(#8a6a3c, #4a3420);
}

/* THE BOOK, open on the slope. It carries the slope's own rake so it is lying
   on the lectern rather than floating in front of it. */
.rpg-ml-library .rrbook {
	position: absolute;
	left: 50%;
	bottom: 66px;
	width: 128px;
	height: 44px;
	margin-left: -64px;
	display: flex;
	transform: perspective(240px) rotateX(34deg);
	transform-origin: 50% 100%;
	filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5));
}

/* EACH PAGE HINGES ON THE SPINE (round 10).
   Kevin: *"LECTERN left page flips oddly — set the flip anchor/transform-origin
   to the page's LEFT (spine) edge so it reads as a real page turn."* The
   diagnosis is right and the round-9 comment three rules below even claimed the
   fix was already in ("rotateY about the SPINE — the inner edge"), but the
   origin said `50% 100%`: the middle of the page's own foot. A page hinged
   there does not turn, it waves.

   The spine is the INNER edge, which is the left page's RIGHT side and the
   right page's LEFT side — so it is Kevin's "left edge" for the page that
   actually turns, and its mirror for the one that answers. Getting that
   backwards hinges the left page on the outside of the book. */
.rpg-ml-library .rrpage {
	position: relative;
	flex: 1 1 50%;
	background: linear-gradient(#efe2c4, #cfbf9c);
}

.rpg-ml-library .rrpage.l {
	transform: perspective(180px) rotateY(11deg);
	transform-origin: 100% 50%;
	border-radius: 3px 0 0 3px;
}

.rpg-ml-library .rrpage.r {
	transform: perspective(180px) rotateY(-11deg);
	transform-origin: 0 50%;
	border-radius: 0 3px 3px 0;
}

/* THE GUTTER. Hinging each page on the spine (above) made the two of them read
   as one flat sheet: at 11 degrees over a 180px perspective, a pivot at the
   INNER edge foreshortens both halves the same way, so the V that used to be
   visible went away with the bug that caused it. A page darkens towards its
   spine because that is where the paper curves out of the light — one gradient
   each, mirrored, and the book is a book again. */
.rpg-ml-library .rrpage::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
}

.rpg-ml-library .rrpage.l::after {
	background: linear-gradient(90deg, transparent 34%, rgba(88, 68, 38, .1) 62%, rgba(72, 54, 30, .46));
}

.rpg-ml-library .rrpage.r::after {
	background: linear-gradient(270deg, transparent 34%, rgba(88, 68, 38, .1) 62%, rgba(72, 54, 30, .46));
}

/* the ruled lines on the right-hand page */
.rpg-ml-library .rrpage.r::before {
	content: "";
	position: absolute;
	inset: 8px 10px 8px 8px;
	background: repeating-linear-gradient(rgba(90, 70, 40, .28) 0 1px, transparent 1px 8px);
}

/* THE FLUTTER. Poking the book riffles it: the right-hand page lifts, turns
   most of the way over and drops back. `rotateY` about the SPINE — the inner
   edge — because a page hinged on its own middle does not turn, it flaps. */
.rpg-ml-library .rrbook { cursor: pointer; pointer-events: auto; }
.rpg-ml-library .rrbook.fluttering .rrpage.r { animation: rpg-rr-riffle 1.5s ease-in-out; }
.rpg-ml-library .rrbook.fluttering .rrpage.l { animation: rpg-rr-riffleL 1.5s ease-in-out; }

@keyframes rpg-rr-riffle {
	0% { transform: perspective(180px) rotateY(-11deg) }
	30% { transform: perspective(180px) rotateY(-64deg) }
	46% { transform: perspective(180px) rotateY(-92deg) }
	62% { transform: perspective(180px) rotateY(-38deg) }
	80% { transform: perspective(180px) rotateY(-19deg) }
	100% { transform: perspective(180px) rotateY(-11deg) }
}

@keyframes rpg-rr-riffleL {
	0%, 100% { transform: perspective(180px) rotateY(11deg) }
	40% { transform: perspective(180px) rotateY(15deg) }
}

/* THE SCRIBBLE. An ink stroke that draws itself across the page and then dries
   out of sight. WIDTH is what animates, not opacity — ink arrives at the nib's
   pace and does not fade in behind it. */
.rpg-ml-library .rrink {
	position: absolute;
	left: 9px;
	top: 15px;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #2b2318, #4a3c26);
	border-radius: 1px;
}

.rpg-ml-library .rrdesk.writing .rrink { animation: rpg-rr-write 1.9s ease-out; }

@keyframes rpg-rr-write {
	0% { width: 0; opacity: 1 }
	46% { width: 54px; opacity: 1 }
	70% { width: 54px; opacity: 1 }
	100% { width: 54px; opacity: 0 }
}

/* THE QUILL RESTS ON THE PAGE (round 10).
   Kevin: *"FEATHER PEN should rest ON the paper (reposition onto the open page,
   nib down)."* It stood at `right:2px` — clear of the lectern entirely, its nib
   in mid-air beside the book, which is a pen nobody put down.

   The numbers are the book's. `.rrbook` is 128 wide at the middle of a 150px
   lectern, so its right-hand page runs from x=75 to x=139 in the desk's own
   coordinates, and the ink stroke inside that page starts 9px in — x=84. The
   nib is the bottom-centre of this box (which is also its transform origin), so
   `left:67px` puts the nib exactly on the start of the stroke it draws, and
   `bottom:88px` sets it down on the page's rake rather than through it. It
   leans further over than it did, because a pen resting on a page leans; a pen
   at 18 degrees is a pen standing up. */
.rpg-ml-library .rrquill {
	position: absolute;
	left: 67px;
	bottom: 88px;
	width: 34px;
	height: 66px;
	pointer-events: auto;
	cursor: pointer;
	transform-origin: 50% 100%;
	transform: rotate(31deg);
	transition: transform .22s var(--ease-out);
	z-index: 6;
}

.rpg-ml-library .rrfeather {
	position: absolute;
	left: 50%;
	top: 0;
	width: 13px;
	height: 100%;
	margin-left: -6.5px;
	background: linear-gradient(200deg, #f0e6cf, #b9a67e 58%, #6d5f42);
	/* a feather: broad at the shoulder, drawn to a nib at the foot */
	clip-path: polygon(52% 0, 100% 26%, 84% 74%, 56% 100%, 46% 100%, 22% 72%, 6% 26%);
	box-shadow: 0 3px 7px rgba(0, 0, 0, .4);
}

/* the shaft down the middle, which is what makes it read as a quill rather
   than as a leaf */
.rpg-ml-library .rrfeather::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 8%;
	width: 1px;
	height: 88%;
	margin-left: -.5px;
	background: rgba(60, 48, 28, .55);
}

.rpg-ml-library .rrquill:hover { transform: rotate(27deg) scale(1.06); }

/* IT WRITES LEFT TO RIGHT NOW. The stroke it leaves (`.rrink`) grows rightward
   from x=9 inside the right-hand page, and the quill used to travel the other
   way — 58px LEFT of a rest position that was off the book altogether, so the
   pen and its own ink were moving in opposite directions across the page. The
   travel matches the stroke: 54px, the ink's full width. */
.rpg-ml-library .rrquill.scribbling { animation: rpg-rr-scribble 1.9s ease-in-out; }

@keyframes rpg-rr-scribble {
	0% { transform: rotate(31deg) translate(0, 0) }
	12% { transform: rotate(35deg) translate(2px, 3px) }
	26% { transform: rotate(32deg) translate(16px, 0) }
	38% { transform: rotate(35deg) translate(28px, 3px) }
	52% { transform: rotate(32deg) translate(38px, 0) }
	66% { transform: rotate(35deg) translate(48px, 3px) }
	78% { transform: rotate(32deg) translate(54px, 0) }
	100% { transform: rotate(31deg) translate(0, 0) }
}

@media (max-width: 1100px) {
	.rpg-ml-library .readingroom { width: min(64%, 520px); }
	.rpg-ml-library .rrdesk { transform: scale(.78); transform-origin: 100% 100%; }
	.rpg-ml-library .rrshelf { height: 64px; }
	.rpg-ml-library .rrshelf.s1 { top: 20px; }
	.rpg-ml-library .rrshelf.s2 { top: 86px; }
	.rpg-ml-library .rrshelf.s3 { top: 152px; }
	.rpg-ml-library .rrshelf.s4 { top: 218px; }
}

@media (max-width: 900px) {
	/* Below this the copy runs under the scene, so it steps back to a texture
	   and — the important half — HANDS ITS POINTER EVENTS BACK. A pokeable
	   book at 22% opacity over a paragraph is an invisible click target, which
	   is the trap the general store was fixed for. */
	.rpg-ml-library .readingroom {
		width: 100%;
		opacity: .22;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.rpg-ml-library .rrspine,
	.rpg-ml-library .rrware,
	.rpg-ml-library .rrmagic,
	.rpg-ml-library .rrbook,
	.rpg-ml-library .rrrail,
	.rpg-ml-library .rrquill,
	.rpg-ml-library .rrcord,
	.rpg-ml-library .rrbulb,
	.rpg-ml-library .rrshade { pointer-events: none; cursor: default; }
	.rpg-ml-library .rrdesk { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	/* ml-chrome.css already kills every animation under `.rpg-ml`, so the motes
	   stand still in the beam, the candle stands still in its holder and the
	   pokes are never bound (see ml-library.js). The hover growth goes too: it
	   is movement nobody asked for on an element that no longer does anything. */
	.rpg-ml-library .rrspine,
	.rpg-ml-library .rrware,
	.rpg-ml-library .rrmagic,
	.rpg-ml-library .rrquill { transition: none; cursor: default; }
	.rpg-ml-library .rrspine:hover,
	.rpg-ml-library .rrware:hover,
	.rpg-ml-library .rrmagic:hover,
	.rpg-ml-library .rrquill:hover { transform: none; filter: none; }
	.rpg-ml-library .rrspine.lean:hover { transform: rotate(-7deg); }
	.rpg-ml-library .rrmote { opacity: .5; }
}
