/* ─────────────────────────────────────────────────────────────
   The exercise library: /exercises/ and its 12 group pages (2026-10-20).

   Loaded after styles.css and content.css, which own the header, footer,
   buttons, the hero's navy and type, and the dark band's colours. The pages
   are written by scripts/exercise-library/build.mjs from the app's own
   library; the spec is the "Exercise Library Page Spec" doc. Everything here
   is scoped to .lib-page.

   Sizes follow the A1 Gallery measurements in the spec: a 1160px shell,
   16px card corners, a 1px border and no shadow on a white page, 4 / 3 / 2
   columns with a 20px gap, a 48px hero title and a 44px closing band title.
   ───────────────────────────────────────────────────────────── */

.lib-page { --also: #9fbcf7; --figure-bg: linear-gradient(180deg, #edf2ff, #f6f8fc); }

/* ── Hero: the photo hero's navy and type, shorter ───────── */
.lib-page .page-hero.lib-hero { min-height: 0; }
.lib-page .page-hero.lib-hero .page-hero-inner { padding: 72px 28px 48px; }
.lib-page .page-hero.lib-hero.has-image { min-height: 440px; }
.lib-page .page-hero.lib-hero.has-image .page-hero-inner { padding-top: 140px; }
.lib-page .page-hero.lib-hero h1 { font-size: clamp(36px, 4.2vw, 48px); letter-spacing: -1.6px; }
.lib-page .lib-hero-glow { position: absolute; inset: -60% -10% -40%; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 36% 44% at 14% 42%, rgba(59, 130, 246, 0.5), transparent 66%), radial-gradient(ellipse 30% 40% at 84% 26%, rgba(139, 92, 246, 0.42), transparent 62%); filter: blur(26px); }
.lib-page .page-hero.lib-hero.has-image .lib-hero-glow { display: none; }

/* ── The shell and the equipment chips ─────────────────── */
.lib-page .lib-shell { max-width: var(--shell); margin: 0 auto; padding: 36px 28px 8px; }
.lib-page .lib-filter-label { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.lib-page .lib-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-page .lib-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px 6px 16px; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; touch-action: manipulation; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }
.lib-page .lib-chip:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.lib-page .lib-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lib-page .lib-chip-n { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--bg-sunk); color: var(--muted); font-size: 12.5px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.lib-page .lib-chip[aria-pressed="true"] .lib-chip-n { background: rgba(255, 255, 255, 0.16); color: #fff; }
.lib-page .lib-chip:disabled { opacity: 0.45; cursor: default; }
.lib-page .lib-chip:disabled:hover { border-color: var(--line-strong); color: var(--ink-2); }
.lib-page .lib-status { margin: 12px 0 0; min-height: 1.5em; font-size: 14.5px; color: var(--muted); }
/* The chips and tabs need the script; without it every card is already shown */
html:not(.js) .lib-page .lib-filter,
html:not(.js) .lib-page .lib-toolbar { display: none; }

/* ── The hub: three sections of muscle tiles ───────────── */
.lib-page .lib-section { margin-top: 48px; }
.lib-page .lib-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.lib-page .lib-section-head h2 { margin: 0; padding: 0; font-size: 32px; line-height: 1.15; letter-spacing: -1px; font-weight: 830; color: var(--ink); }
.lib-page .lib-section-head p { margin: 0; font-size: 15px; font-weight: 650; color: var(--muted); }
.lib-page .lib-tiles,
.lib-page .lib-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lib-page .lib-tiles li { margin: 0; }
.lib-page .lib-tile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease; }
.lib-page .lib-tile:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.lib-page .lib-tile-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.lib-page .lib-tile-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.lib-page .lib-tile:hover .lib-tile-pic.is-photo img { transform: scale(1.04); }
.lib-page .lib-tile-pic.is-figure { display: flex; align-items: center; justify-content: center; background: var(--figure-bg); }
.lib-page .lib-tile-pic.is-figure img { width: 74%; height: auto; object-fit: contain; }
.lib-page .lib-tile-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.lib-page .lib-tile-name { font-size: 18px; line-height: 1.25; letter-spacing: -0.3px; font-weight: 800; color: var(--ink); }
.lib-page .lib-tile:hover .lib-tile-name { color: var(--accent-deep); }
.lib-page .lib-tile-count { font-size: 14px; font-weight: 750; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.lib-page .lib-tile-parts { font-size: 13px; line-height: 1.45; color: var(--muted); }
.lib-page .lib-tile.is-empty { opacity: 0.45; }
.lib-page .lib-tile.is-empty:hover { transform: none; }

.lib-page .lib-about { max-width: 760px; margin: 64px 0 0; padding-top: 30px; border-top: 1px solid var(--line); }
.lib-page .lib-about h2 { margin: 0 0 12px; padding: 0; font-size: 26px; letter-spacing: -0.6px; font-weight: 830; color: var(--ink); }
.lib-page .lib-about p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.lib-page .lib-about .lib-updated { font-size: 14.5px; color: var(--muted); }
.lib-page .lib-credits,
.lib-page .lib-about .lib-credits { margin: 22px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.lib-page .lib-credits a { color: inherit; }

/* ── A group page: part tabs, then the cards ───────────── */
.lib-page .lib-tabs { display: flex; gap: 4px; margin: 0 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lib-page .lib-tabs::-webkit-scrollbar { display: none; }
.lib-page .lib-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; margin-bottom: -1px; padding: 10px 12px; font: inherit; font-size: 15.5px; font-weight: 750; color: var(--muted); background: none; border: 0; border-bottom: 2.5px solid transparent; cursor: pointer; touch-action: manipulation; }
.lib-page .lib-tab:hover { color: var(--ink); }
.lib-page .lib-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.lib-page .lib-tab-n { font-size: 12.5px; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; }
.lib-page .lib-toolbar .lib-filter-label { margin-top: 2px; }

.lib-page .lib-part { margin-top: 36px; }
.lib-page .lib-part[hidden] { display: none; }
.lib-page .lib-part-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; padding: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.7px; font-weight: 830; color: var(--ink); }
.lib-page .lib-part-n { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--muted); }

.lib-page .lib-card { position: relative; display: flex; flex-direction: column; margin: 0; padding-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; transition: border-color 0.15s ease, transform 0.2s ease; }
.lib-page .lib-card[hidden] { display: none; }
.js .lib-page .lib-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.lib-page .lib-card-pic { display: block; aspect-ratio: 1; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.lib-page .lib-card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lib-page .lib-card-pic.is-figure { display: flex; align-items: center; justify-content: center; background: var(--figure-bg); }
.lib-page .lib-card-pic.is-figure img { width: 70%; height: auto; object-fit: contain; }
.lib-page .lib-card-name { margin: 0; padding: 13px 16px 2px; font-size: 17px; line-height: 1.3; letter-spacing: -0.2px; font-weight: 750; color: var(--ink); }
.lib-page .lib-open { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; letter-spacing: inherit; cursor: pointer; }
.js .lib-page .lib-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.lib-page .lib-open:focus-visible { outline: none; }
.lib-page .lib-open:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; }
.js .lib-page .lib-card:hover .lib-open { color: var(--accent-deep); }
.lib-page .lib-card-kit { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 16px 0; padding: 0; }
.lib-page .lib-card-kit span { padding: 3px 9px; border-radius: 999px; background: var(--bg-sunk); color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.lib-page .lib-card-more { margin: 12px 16px 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.lib-page .lib-card-more summary { cursor: pointer; font-weight: 750; color: var(--accent-deep); }
.lib-page .lib-card-more h4 { margin: 12px 0 6px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.lib-page .lib-card-more ol,
.lib-page .lib-card-more ul { margin: 0 0 8px 18px; padding: 0; }
.js .lib-page .lib-card-more { display: none; }

.lib-page .lib-empty { margin: 34px 0 0; padding: 26px; border: 1px dashed var(--line-strong); border-radius: 16px; text-align: center; color: var(--muted); }
.lib-page .lib-empty[hidden] { display: none; }
.lib-page .lib-empty p { margin: 0 0 12px; font-size: 16px; }
.lib-page .lib-clear { min-height: 44px; padding: 8px 18px; font: inherit; font-size: 15px; font-weight: 750; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; cursor: pointer; }

/* "Also works your triceps": the exercises filed under another muscle */
.lib-page .lib-also { margin-top: 56px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-alt); }
.lib-page .lib-also summary { list-style: none; cursor: pointer; position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 20px 56px 20px 22px; }
.lib-page .lib-also summary::-webkit-details-marker { display: none; }
.lib-page .lib-also summary::after { content: ""; position: absolute; right: 24px; top: 28px; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.2s ease; }
.lib-page .lib-also[open] summary::after { transform: rotate(-135deg); top: 32px; }
.lib-page .lib-also-title { display: inline; margin: 0; padding: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.5px; font-weight: 830; color: var(--ink); }
.lib-page .lib-also-n { font-size: 15px; font-weight: 700; color: var(--accent-deep); }
.lib-page .lib-also > p { margin: 0 22px 10px; font-size: 15.5px; color: var(--muted); }
.lib-page .lib-also-list { list-style: none; margin: 0; padding: 0 22px 20px; columns: 3 220px; column-gap: 28px; }
.lib-page .lib-also-list li { break-inside: avoid; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lib-page .lib-also-list a { font-weight: 650; text-decoration: none; }
.lib-page .lib-also-list a:hover { text-decoration: underline; }
.lib-page .lib-also-list span { flex: none; font-size: 13px; color: var(--muted); }

.lib-page .lib-others { margin-top: 56px; }
.lib-page .lib-others h2 { margin: 0 0 14px; padding: 0; font-size: 22px; letter-spacing: -0.5px; font-weight: 830; color: var(--ink); }
.lib-page .lib-others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lib-page .lib-others li { margin: 0; }
.lib-page .lib-others ul a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px 6px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.lib-page .lib-others ul a:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.lib-page .lib-others ul a span { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--bg-sunk); color: var(--muted); font-size: 12.5px; text-align: center; }
.lib-page .lib-others p { margin: 18px 0 0; }
.lib-page .lib-back { font-weight: 750; text-decoration: none; }

/* ── The exercise view ─────────────────────────────────── */
.lib-page .lib-dialog { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--bg); color: var(--ink); box-shadow: 0 40px 100px -20px rgba(11, 21, 48, 0.55); overflow: hidden; }
.lib-page .lib-dialog::backdrop { background: rgba(11, 21, 48, 0.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lib-page .lib-d-card { position: relative; display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.lib-page .lib-d-media { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-right: 1px solid var(--line); background: #fff; }
.lib-page .lib-d-demo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.lib-page .lib-d-demo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lib-page .lib-d-demo.is-figure { background: var(--figure-bg); }
.lib-page .lib-d-demo.is-figure img { width: 74%; height: auto; }
.lib-page .lib-d-play { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); min-height: 44px; padding: 8px 18px; font: inherit; font-size: 14.5px; font-weight: 750; color: #fff; background: var(--ink); border: 0; border-radius: 999px; cursor: pointer; }
.lib-page .lib-d-yt { top: 50%; bottom: auto; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 20px; white-space: nowrap; box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.6); }
.lib-page .lib-d-yt-label { display: inline-flex; align-items: center; gap: 9px; }
.lib-page .lib-d-yt-label::before { content: ""; width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.lib-page .lib-d-yt-note { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.lib-page .lib-d-demo.is-video { background: #000; border-color: #000; }
.lib-page .lib-d-demo iframe { display: block; width: 100%; height: 100%; border: 0; }
/* The title takes focus when a video starts, so Escape still reaches the view; it needs no ring. */
.lib-page #lib-d-title:focus { outline: none; }
.lib-page .lib-d-map { display: flex; justify-content: center; min-height: 120px; }
.lib-page .lib-d-map svg { display: block; width: 100%; max-width: 320px; height: auto; }
.lib-page .lib-d-map path[data-p] { fill: #e3e8f0; }
.lib-page .lib-d-map path.is-also { fill: var(--also); }
.lib-page .lib-d-map path.is-main { fill: var(--accent); }
.lib-page .lib-d-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.lib-page .lib-d-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lib-page .lib-d-legend i { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }
.lib-page .lib-d-legend i.also { background: var(--also); }
.lib-page .lib-d-text { min-width: 0; padding: 28px 30px 24px; }
.lib-page .lib-d-kicker { margin: 0 0 6px; padding-right: 48px; font-size: 12.5px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--accent-deep); }
.lib-page .lib-d-text h2 { margin: 0 0 14px; padding: 0 48px 0 0; font-size: 30px; line-height: 1.12; letter-spacing: -1px; font-weight: 850; color: var(--ink); }
.lib-page .lib-d-howto > p { margin: 0 0 16px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.lib-page .lib-d-howto h3 { margin: 20px 0 8px; padding: 0; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.lib-page .lib-d-howto ol,
.lib-page .lib-d-howto ul { margin: 0 0 4px 20px; padding: 0; }
.lib-page .lib-d-howto li { margin: 0 0 8px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.lib-page .lib-d-howto .lib-more-yt { margin: 18px 0 0; font-size: 16px; }
.lib-page .lib-d-howto .lib-more-yt a { font-weight: 750; }
.lib-page .lib-d-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.lib-page .lib-d-step { min-height: 44px; padding: 8px 16px; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.lib-page .lib-d-step:hover:not(:disabled) { border-color: var(--accent-line); color: var(--accent-deep); }
.lib-page .lib-d-step:disabled { opacity: 0.4; cursor: default; }
.lib-page .lib-d-log { margin-left: auto; font-size: 15px; font-weight: 750; text-decoration: none; }
.lib-page .lib-d-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--ink); cursor: pointer; }
.lib-page .lib-d-close:hover { border-color: var(--accent-line); color: var(--accent-deep); }

/* ── The closing band: the phone breaks out of the band, and the
   lift breaks out of the phone ─────────────────────────── */
.lib-page .lib-band { position: relative; isolation: isolate; margin-top: 150px; background: linear-gradient(170deg, var(--navy-2), var(--navy) 65%); color: #fff; }
.lib-page .lib-band-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.lib-page .lib-band-bg::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(ellipse 40% 50% at 18% 30%, rgba(59, 130, 246, 0.45), transparent 65%), radial-gradient(ellipse 35% 45% at 80% 20%, rgba(139, 92, 246, 0.4), transparent 60%); filter: blur(30px); }
.lib-page .lib-band-inner { max-width: var(--shell); margin: 0 auto; padding: 96px 28px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; align-items: center; }
.lib-page .lib-band h2 { margin: 0 0 14px; padding: 0; font-size: clamp(32px, 3.8vw, 44px); line-height: 1.08; letter-spacing: -1.6px; font-weight: 850; color: #fff; text-wrap: balance; }
.lib-page .lib-band-text > p { max-width: 520px; margin: 0 0 24px; font-size: 18px; line-height: 1.6; color: #cbd5e1; }
.lib-page .lib-band .cta-note { margin: 16px 0 0; font-size: 14px; color: #94a3b8; }
.lib-page .lib-band-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 540px; }
.lib-page .lib-band-form[hidden] { display: none; }
.lib-page .lib-band-input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 22px; font: inherit; font-size: 16px; color: #fff; background: rgba(255, 255, 255, 0.08); border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 999px; outline: none; }
.lib-page .lib-band-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.lib-page .lib-band-input:focus { border-color: #93c5fd; background: rgba(255, 255, 255, 0.12); }
.lib-page .lib-band-form .btn { min-height: 52px; padding: 0 26px; border: 0; font-family: inherit; cursor: pointer; }
.lib-page .lib-band-form .btn:disabled { opacity: 0.6; cursor: default; }
.lib-page .lib-band-done { margin: 14px 0 0; font-size: 16px; font-weight: 650; color: #bfdbfe; }
.lib-page .lib-band-done[hidden] { display: none; }

.lib-page .lib-band-art { position: relative; height: 420px; }
.lib-page .lib-phone { position: absolute; top: -170px; right: 26px; width: 260px; height: 532px; transform: rotate(4deg); }
.lib-page .lib-phone-screen { position: absolute; top: 13px; left: 14px; z-index: 1; width: 232px; height: 506px; border-radius: 34px; overflow: hidden; background: #06080f url(/img/status-bar.png) no-repeat center top / 100% auto; }
.lib-page .lib-phone-shot { position: absolute; top: 31px; left: 0; display: block; width: 100%; height: auto; }
.lib-page .lib-phone-frame { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.45)); }
.lib-page .lib-pop { position: absolute; top: 70px; left: 6px; z-index: 3; width: 212px; margin: 0; padding: 10px 10px 12px; border-radius: 22px; background: #fff; box-shadow: 0 44px 70px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.4); transform: perspective(1000px) rotateY(11deg) rotateZ(-4deg) translateZ(30px); transform-origin: 30% 50%; transition: transform 0.4s ease, opacity 0.4s ease; }
.js .lib-page .lib-band:not(.is-in) .lib-pop { opacity: 0; transform: perspective(1000px) rotateY(11deg) rotateZ(-4deg) translate3d(70px, 10px, 0); }
.lib-page .lib-pop img { display: block; width: 100%; height: auto; border-radius: 14px; }
.lib-page .lib-pop figcaption { display: flex; flex-direction: column; gap: 2px; padding: 9px 6px 0; }
.lib-page .lib-pop-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.lib-page .lib-pop-muscles { font-size: 12.5px; color: var(--muted); }

/* The photographer's credit sits on a dark chip so it stays readable over any photo. */

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .lib-page .lib-tiles,
  .lib-page .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lib-page .lib-band-inner { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; }
  .lib-page .lib-phone { right: 0; }
}
@media (max-width: 900px) {
  .lib-page .lib-band { margin-top: 64px; }
  .lib-page .lib-band-inner { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 56px 18px 0; }
  /* Stacked, the phone rises out of the band's bottom edge, so the art box
     clips the phone's lower half; the pop-out must stay whole inside it. The
     phone hangs from its top right corner so a narrow screen never cuts its
     right edge. */
  .lib-page .lib-band-art { height: 400px; margin-top: 28px; overflow: hidden; }
  .lib-page .lib-phone { top: 22px; right: calc(50% - 175px); transform: rotate(3deg); transform-origin: top right; }
  .lib-page .lib-pop { top: 104px; left: max(10px, calc(50% - 200px)); width: 170px; }
}
@media (max-width: 760px) {
  .lib-page .page-hero.lib-hero .page-hero-inner { padding: 44px 18px 30px; }
  .lib-page .page-hero.lib-hero.has-image { min-height: 380px; }
  .lib-page .page-hero.lib-hero.has-image .page-hero-inner { padding-top: 110px; }
  .lib-page .page-hero.lib-hero h1 { font-size: 34px; letter-spacing: -1.2px; }
  .lib-page .lib-shell { padding: 28px 18px 8px; }
  .lib-page .lib-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .lib-page .lib-chips::-webkit-scrollbar { display: none; }
  .lib-page .lib-chip { flex: none; }
  .lib-page .lib-tabs { margin-left: -18px; margin-right: -18px; padding: 0 12px; }
  .lib-page .lib-tiles,
  .lib-page .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .lib-page .lib-section { margin-top: 38px; }
  .lib-page .lib-section-head h2 { font-size: 25px; }
  .lib-page .lib-part-title { font-size: 22px; }
  .lib-page .lib-tile-body { padding: 12px 12px 14px; }
  .lib-page .lib-tile-name { font-size: 16px; }
  .lib-page .lib-tile-parts { font-size: 12.5px; }
  .lib-page .lib-card { padding-bottom: 12px; }
  .lib-page .lib-card-name { padding: 11px 12px 2px; font-size: 15.5px; }
  .lib-page .lib-card-kit { margin: 6px 12px 0; }
  .lib-page .lib-card-kit span { font-size: 12px; padding: 2px 8px; }
  .lib-page .lib-card-more { margin: 10px 12px 0; }
  .lib-page .lib-also summary { padding: 18px 52px 18px 18px; }
  .lib-page .lib-also-title { font-size: 20px; }
  .lib-page .lib-also > p { margin: 0 18px 10px; }
  .lib-page .lib-also-list { padding: 0 18px 16px; }
  .lib-page .lib-about h2,
  .lib-page .lib-others h2 { font-size: 21px; }
  .lib-page .lib-about p { font-size: 16.5px; }

  .lib-page .lib-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; }
  .lib-page .lib-d-card { grid-template-columns: minmax(0, 1fr); height: 100%; max-height: none; }
  .lib-page .lib-d-media { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 64px 16px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lib-page .lib-d-legend { grid-column: 1 / -1; }
  .lib-page .lib-d-text { padding: 20px 18px 28px; }
  .lib-page .lib-d-kicker { padding-right: 0; }
  .lib-page .lib-d-text h2 { padding-right: 0; font-size: 26px; }
  .lib-page .lib-d-close { top: 10px; right: 10px; }

  .lib-page .lib-band-text > p { font-size: 16.5px; }
}
@media (max-width: 440px) {
  .lib-page .lib-band-art { height: 360px; }
  .lib-page .lib-phone { right: max(16px, calc(50% - 150px)); transform: rotate(3deg) scale(0.85); }
  .lib-page .lib-pop { top: 96px; left: max(6px, calc(50% - 165px)); width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .lib-page .lib-tile,
  .lib-page .lib-card,
  .lib-page .lib-tile-pic img,
  .lib-page .lib-pop { transition: none; }
  .lib-page .lib-tile:hover,
  .js .lib-page .lib-card:hover,
  .lib-page .lib-tile:hover .lib-tile-pic.is-photo img { transform: none; }
  .js .lib-page .lib-band:not(.is-in) .lib-pop { opacity: 1; transform: perspective(1000px) rotateY(11deg) rotateZ(-4deg) translateZ(30px); }
}
