/* Lumin Reader: collections (the Library strip, the explorer's deck and wall, the index, one collection's page) and the
   motif kit with its ten showpieces. Build-plan 6.12, design-spec 17.
   Motion follows the budget in build-plan 5.12: rich on entry and touch; idle loops only under .idle-on (motion.idle puts
   it on the one card in front and takes it off after a minute), at least 3 s a cycle, at most 18 px of travel (rotors
   turn once a minute or slower), never more than 3 flashes a second, never more than 4 at once. Nothing idles under
   reduced motion, Calmer motion (html.calm) or the explorer's Still (html.still).
   Copyright (C) 2026 B7 Collective LLC. Licensed under AGPL-3.0-only.
   Owner: PB-U8. Uses the tokens in app.css :root. */


/* The deck's per-card numbers are not inherited, so moving a card never restyles the art inside it */
@property --off { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --aoff { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --drag { syntax: "<length>"; inherits: false; initial-value: 0px; }

/* ==== A collection's art direction: palette, card, art layers ======================================================= */
.cx {
  --c-bg: #1A2229; --c-bg2: #2A3640; --c-ink: #F4F1EA; --c-mut: #C9CCCF; --c-acc: #F2B544; --c-btn: #F2B544; --c-btn-ink: #18212B;
  --c-deep: #1F2633; --c-m1: #4F5D75; --c-m2: #E4E7EC; --pt: #FFFFFF; --stripe: color-mix(in srgb, var(--c-m2) 8%, transparent);
  position: relative; isolation: isolate; overflow: hidden; color: var(--c-ink);
  background: radial-gradient(130% 110% at 88% 0%, var(--c-bg2), var(--c-bg) 72%);
}
.cx > :not(.cx-art) { position: relative; z-index: 1; }
.cx-art { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; border-radius: inherit; }
.cx-art > * { position: absolute; pointer-events: none; display: block; }
.cx-art svg { overflow: visible; }
/* every single object starts here; each kit and showpiece below sets its own place and size */
.m-obj { right: 7%; top: 7%; width: 30cqw; max-width: 160px; }
/* svg colors from the palette */
.cx .s-acc { stroke: var(--c-acc); fill: var(--c-acc); } .cx .k-acc { stroke: var(--c-acc); } .cx .f-acc { fill: var(--c-acc); }
.cx .k-light { stroke: var(--c-m2); } .cx .f-light { fill: var(--c-m2); stroke: var(--c-m2); } .cx .f-m1 { fill: var(--c-m1); } .cx .f-bg { fill: var(--c-bg); }
.cx .f-moon { fill: #ECE6FF; } .cx .f-leaf { fill: #7C8F5E; } .cx .k-leaf { stroke: #7C8F5E; } .cx .f-lamp { fill: color-mix(in srgb, var(--c-acc) 55%, #FFE9B8); }

/* ---- fog: two soft layers drifting ---- */
.m-fog { left: -30%; width: 160%; height: 58%; border-radius: 50%; filter: blur(22px); background: radial-gradient(closest-side, color-mix(in srgb, var(--c-m2) 26%, transparent), transparent); }
.m-fog.f1 { bottom: -16%; } .m-fog.f2 { bottom: 18%; height: 42%; opacity: .55; }
.cx[data-v="storm"] .m-fog { background: radial-gradient(closest-side, color-mix(in srgb, var(--c-m2) 18%, transparent), transparent); }
.cx[data-v="mist"] .m-fog { background: radial-gradient(closest-side, color-mix(in srgb, var(--c-m2) 22%, transparent), transparent); }
/* ---- glow: a flame's flicker or a slow pulse ---- */
.m-glow { right: -6%; top: -4%; width: 62cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c-acc) 34%, transparent), transparent); }
.m-glow.g-candle, .m-glow.g-lamplight { right: 0; top: 14%; width: 56cqw; }
.m-glow.g-pulse { right: auto; left: 50%; top: -12%; width: 90cqw; margin-left: -45cqw; background: radial-gradient(closest-side, color-mix(in srgb, var(--c-acc) 22%, transparent), transparent); }
.m-glow.g-soft { background: radial-gradient(closest-side, color-mix(in srgb, var(--c-acc) 16%, transparent), transparent); }
.m-glow.g-north-star { right: 2%; top: 0; width: 46cqw; }
.m-flame { right: 12%; top: auto; bottom: 42%; width: 8cqw; max-width: 44px; filter: drop-shadow(0 0 10px rgba(255, 200, 107, .7)); }
.m-star4 { right: 12%; top: 9%; width: 16cqw; max-width: 90px; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c-acc) 70%, transparent)); }
/* ---- particles: snow, stars, dust, sparks (two depths) ---- */
/* particles and petals fade out of the top-left corner, where the words sit */
.m-pt, .m-petal { -webkit-mask-image: radial-gradient(130% 75% at 0% 0%, transparent 42%, #000 68%); mask-image: radial-gradient(130% 75% at 0% 0%, transparent 42%, #000 68%); }
.m-pt { inset: -14px 0 0; background-repeat: repeat; }
.pt-snow.p1 { background-image: radial-gradient(2px 2px at 20px 30px, var(--pt) 60%, transparent), radial-gradient(3px 3px at 80px 110px, var(--pt) 60%, transparent), radial-gradient(2px 2px at 150px 60px, var(--pt) 60%, transparent), radial-gradient(2.5px 2.5px at 196px 150px, var(--pt) 60%, transparent); background-size: 220px 180px; opacity: .9; }
.pt-snow.p2 { background-image: radial-gradient(1.6px 1.6px at 30px 40px, var(--pt) 60%, transparent), radial-gradient(2px 2px at 100px 20px, var(--pt) 60%, transparent), radial-gradient(1.4px 1.4px at 60px 110px, var(--pt) 60%, transparent); background-size: 140px 130px; opacity: .6; }
.pt-stars.p1 { background-image: radial-gradient(1.5px 1.5px at 24px 18px, var(--pt) 60%, transparent), radial-gradient(2px 2px at 120px 70px, var(--pt) 60%, transparent), radial-gradient(1.2px 1.2px at 200px 30px, var(--pt) 60%, transparent), radial-gradient(1.8px 1.8px at 70px 140px, var(--pt) 60%, transparent); background-size: 240px 190px; opacity: .85; }
.pt-stars.p2 { background-image: radial-gradient(1px 1px at 50px 60px, var(--pt) 60%, transparent), radial-gradient(1.4px 1.4px at 160px 120px, var(--pt) 60%, transparent), radial-gradient(1px 1px at 100px 10px, var(--pt) 60%, transparent); background-size: 190px 160px; opacity: .6; }
.pt-stars.pt-few { bottom: 50%; }
.pt-dust.p1 { background-image: radial-gradient(3px 3px at 30px 40px, color-mix(in srgb, var(--c-acc) 50%, transparent) 50%, transparent), radial-gradient(2px 2px at 140px 90px, color-mix(in srgb, var(--c-acc) 45%, transparent) 50%, transparent); background-size: 200px 160px; }
.pt-dust.p2 { background-image: radial-gradient(2.5px 2.5px at 80px 30px, color-mix(in srgb, var(--c-m1) 50%, transparent) 50%, transparent), radial-gradient(1.6px 1.6px at 20px 120px, color-mix(in srgb, var(--c-m1) 45%, transparent) 50%, transparent); background-size: 150px 150px; }
.pt-sparks.p1 { background-image: radial-gradient(2px 2px at 40px 50px, var(--c-acc) 60%, transparent), radial-gradient(1.6px 1.6px at 150px 120px, var(--c-acc) 60%, transparent), radial-gradient(2.2px 2.2px at 210px 40px, color-mix(in srgb, var(--c-acc) 70%, #fff) 60%, transparent); background-size: 240px 170px; opacity: .8; }
.pt-sparks.p2 { background-image: radial-gradient(1.4px 1.4px at 20px 90px, #fff 60%, transparent), radial-gradient(1.8px 1.8px at 110px 20px, var(--c-acc) 60%, transparent); background-size: 170px 140px; opacity: .6; }
/* ---- waves ---- */
.m-waves { left: -8%; width: 116%; bottom: 0; height: 36cqh; }
.m-waves .w1 { fill: color-mix(in srgb, var(--c-m2) 12%, transparent); } .m-waves .w2 { fill: color-mix(in srgb, var(--c-m2) 20%, transparent); }
.cx[data-v="sea"] .m-waves .w2 { fill: color-mix(in srgb, var(--c-m1) 60%, transparent); }
/* ---- rotor: rays, rosette, gear (60 s a turn or slower) ---- */
.m-rays { right: -24%; top: -30%; width: 96cqw; aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--c-acc) 22%, transparent) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(closest-side, #000 40%, transparent); mask: radial-gradient(closest-side, #000 40%, transparent); }
.m-gear { right: 6%; top: 6%; width: 32cqw; max-width: 170px; opacity: .8; }
/* ---- curtain: a stage at night ---- */
.m-curtain { top: 0; bottom: 0; width: 22%; background: repeating-linear-gradient(90deg, var(--c-deep) 0 10px, var(--c-m1) 18px, var(--c-deep) 28px); box-shadow: inset -20px 0 30px rgba(0, 0, 0, .45); transform-origin: top; }
.m-curtain.l { left: -8%; border-bottom-right-radius: 60% 26%; } .m-curtain.r { right: -4%; width: 26%; border-bottom-left-radius: 60% 26%; transform: scaleX(-1); }
.m-valance { left: 0; right: 0; top: 0; height: 18px; background: radial-gradient(circle at 12px -4px, var(--c-m1) 13px, transparent 14px) 0 0 / 24px 18px repeat-x, linear-gradient(var(--c-acc), color-mix(in srgb, var(--c-acc) 70%, #000)) 0 0 / 100% 4px no-repeat; }
.m-spot { left: 50%; top: -10%; width: 76%; height: 120%; transform: translateX(-50%); background: radial-gradient(50% 60% at 50% 30%, color-mix(in srgb, var(--c-acc) 20%, transparent), transparent 70%); }
/* ---- pattern: tilings (still; a soft sheen, or a slow glow on calm collections) ---- */
.m-pattern { inset: 0; }
.pa-stripes { background: repeating-linear-gradient(90deg, var(--stripe) 0 14px, transparent 14px 34px); }
.pa-eight-point-star, .pa-lattice, .pa-art-deco { background: var(--c-acc); opacity: .2; -webkit-mask-repeat: repeat; mask-repeat: repeat; }
.pa-eight-point-star { -webkit-mask-image: url("/art/motifs/star8.svg"); mask-image: url("/art/motifs/star8.svg"); -webkit-mask-size: 60px; mask-size: 60px; }
.pa-lattice { -webkit-mask-image: url("/art/motifs/lattice.svg"); mask-image: url("/art/motifs/lattice.svg"); -webkit-mask-size: 40px; mask-size: 40px; opacity: .16; }
.pa-art-deco { -webkit-mask-image: url("/art/motifs/deco.svg"); mask-image: url("/art/motifs/deco.svg"); -webkit-mask-size: 48px 24px; mask-size: 48px 24px; }
.m-sheen { inset: 0; background: radial-gradient(70% 50% at 85% 10%, color-mix(in srgb, #fff 16%, transparent), transparent 70%); }
/* ---- sway: one object ---- */
.m-lens { right: 5%; top: 7%; width: 32cqw; transform: rotate(-12deg); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); transform-origin: 40% 40%; }
.m-cameo { right: 8%; top: 7%; width: 27cqw; max-width: 130px; filter: drop-shadow(0 10px 18px rgba(120, 40, 60, .3)); transform-origin: 50% 0; }
.m-laurel { right: 2%; top: 4%; width: 40cqw; max-width: 190px; opacity: .9; transform-origin: 50% 80%; }
.m-quill { right: 14%; top: 18%; width: 12cqw; max-width: 60px; transform: rotate(26deg); transform-origin: 50% 100%; }
.m-pendulum { right: 14%; top: 0; width: 12cqw; max-width: 64px; transform-origin: 50% 0; }
.m-lantern { right: 9%; top: -2%; width: 13cqw; max-width: 70px; transform-origin: 50% 0; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c-acc) 60%, transparent)); }
.m-lantern.l2 { right: 26%; top: -6%; width: 10cqw; }
/* ---- route: a dashed path that draws itself once ---- */
.m-route { right: 0; bottom: 30%; width: 82cqw; height: 46%; }
.m-path { fill: none; stroke: var(--c-acc); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1.6 2.4; opacity: .85; }
.m-path.m-bricks { stroke-width: 9; stroke-dasharray: 3 .8; stroke-linecap: butt; opacity: .7; }
.m-path.m-feet { stroke-width: 6; stroke-dasharray: .1 4.5; }
.cx[data-v="diagram"] .m-path { stroke-dasharray: none; stroke-width: 2; }
/* ---- paper: marble or parchment (still) ---- */
.m-marble { inset: 0; width: 100%; height: 100%; opacity: .55; }
.m-parch { inset: 0; background: radial-gradient(120% 80% at 18% 0%, rgba(255, 255, 255, .28), transparent 60%), radial-gradient(90% 70% at 92% 100%, color-mix(in srgb, var(--c-m1) 26%, transparent), transparent 70%), radial-gradient(140% 120% at 50% 50%, transparent 60%, color-mix(in srgb, var(--c-deep) 14%, transparent)); }
/* ---- horizon: two or three layers drifting ---- */
.m-layer { left: -6%; width: 112%; bottom: 0; height: 40%; }
.m-layer.h1 path { fill: color-mix(in srgb, var(--c-m1) 55%, var(--c-bg)); } .m-layer.h2 path { fill: color-mix(in srgb, var(--c-m1) 75%, var(--c-deep)); } .m-layer.h3 path { fill: color-mix(in srgb, var(--c-deep) 80%, #000); }
.m-layer.h1 { opacity: .55; } .m-layer.h2 { opacity: .75; }
.m-sail path { fill: color-mix(in srgb, var(--c-m2) 70%, transparent); }
/* ---- petals: leaves and petals drifting down ---- */
.m-petal { inset: -14px 0 0; background-repeat: repeat; }
.pe-petals.p1, .pe-poppies.p1, .pe-meadow.p1 { background-image: radial-gradient(4px 7px at 30px 40px, var(--pc, #F28482) 60%, transparent), radial-gradient(3.5px 6px at 150px 110px, var(--pc, #F28482) 60%, transparent), radial-gradient(4px 6px at 210px 30px, var(--pc2, #FFD6D4) 60%, transparent); background-size: 240px 170px; opacity: .8; }
.pe-petals.p2, .pe-poppies.p2, .pe-meadow.p2 { background-image: radial-gradient(3px 5px at 60px 90px, var(--pc2, #FFD6D4) 60%, transparent), radial-gradient(3px 5px at 120px 20px, var(--pc, #F28482) 60%, transparent); background-size: 170px 150px; opacity: .6; }
.cx[data-v="poppies"] { --pc: #C8323A; --pc2: #E05A4F; }
.cx[data-v="meadow"] { --pc: #8AB17D; --pc2: #F6C66B; }
.m-meadow { left: -6%; width: 112%; bottom: 0; height: 36%; } .m-meadow path { fill: color-mix(in srgb, var(--c-acc) 55%, var(--c-bg)); }

/* ==== Showpieces ================================================================================================== */
.cx[data-show="holmes"] .m-glow { right: 2%; top: 2%; width: 54cqw; }
.m-key { left: 0; right: 0; top: 0; height: 14px; background: var(--c-acc); opacity: .75; -webkit-mask: url("/art/motifs/key.svg") 0 0 / 28px 14px repeat-x; mask: url("/art/motifs/key.svg") 0 0 / 28px 14px repeat-x; }
.cx[data-show="greek"] .m-laurel { top: 9%; }
.cx[data-show="poe"] .m-moon { right: 10%; top: 6%; width: 22cqw; max-width: 110px; filter: drop-shadow(0 0 18px rgba(236, 230, 255, .45)); }
.cx[data-show="poe"] .m-quill { right: 30%; top: 22%; }
.cx[data-show="poe"] .m-glow.g-candle { right: auto; left: -16%; top: 30%; width: 70cqw; }
.cx[data-show="poe"] .m-flame { right: auto; left: 6%; top: auto; bottom: 34%; display: none; }
.m-rosette { right: 5%; top: 5%; width: 26cqw; max-width: 140px; opacity: .85; }
.m-hills { left: -12%; right: -12%; bottom: -26%; height: 64%; border-radius: 50% 50% 0 0; background: radial-gradient(60% 80% at 30% 10%, #FFFFFF, #E6EEF4 60%); opacity: .8; }
.cx[data-show="russian"] { --pt: #FFFFFF; }
.cx[data-show="silk-road"] .m-layer.h1 path { fill: color-mix(in srgb, var(--c-acc) 50%, var(--c-bg)); }
.cx[data-show="silk-road"] .m-layer.h2 path { fill: color-mix(in srgb, var(--c-acc) 30%, var(--c-m1)); }
.m-honey { right: 6%; top: 8%; width: 24cqw; max-width: 120px; filter: drop-shadow(0 8px 12px rgba(90, 54, 18, .3)); }
.m-peek { right: -7%; top: 40%; width: 24cqw; max-width: 120px; transform: rotate(-90deg); }
.cx[data-show="bedtime"] .m-moon { right: 10%; top: 6%; width: 24cqw; max-width: 120px; filter: drop-shadow(0 0 22px rgba(255, 236, 170, .5)); }
.cx[data-show="bedtime"] .f-moon { fill: #FFF1C1; }
.m-nightlight { right: 30%; top: 30%; width: 10cqw; max-width: 50px; filter: drop-shadow(0 0 16px rgba(255, 220, 140, .9)); }

/* ==== Idle loops (motion.idle adds .idle-on to the card in front) =================================================== */
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm):not(.still) .idle-on .m-fog.f1 { animation: cx-drift 18s ease-in-out infinite alternate; }
  html:not(.calm):not(.still) .idle-on .m-fog.f2 { animation: cx-drift 24s ease-in-out infinite alternate-reverse; }
  html:not(.calm):not(.still) .idle-on .g-gas, html:not(.calm):not(.still) .idle-on .g-candle, html:not(.calm):not(.still) .idle-on .g-lamplight { animation: cx-flicker 3.2s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .g-pulse, html:not(.calm):not(.still) .idle-on .g-north-star { animation: cx-pulse 7s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-flame { animation: cx-flame 3.6s ease-in-out infinite; transform-origin: 50% 70%; }
  html:not(.calm):not(.still) .idle-on .m-star4 { animation: cx-pulse 6s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .pt-snow.p1 { animation: cx-fall 14s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .pt-snow.p2 { animation: cx-fall 22s ease-in-out -9s infinite; }
  html:not(.calm):not(.still) .idle-on .pt-stars.p1 { animation: cx-twinkle 4.2s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .pt-stars.p2 { animation: cx-twinkle 5.6s ease-in-out -2s infinite; }
  html:not(.calm):not(.still) .idle-on .pt-dust.p1 { animation: cx-mote 9s ease-in-out infinite alternate; }
  html:not(.calm):not(.still) .idle-on .pt-dust.p2 { animation: cx-mote 12s ease-in-out infinite alternate-reverse; }
  html:not(.calm):not(.still) .idle-on .pt-sparks.p1 { animation: cx-rise 5s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .pt-sparks.p2 { animation: cx-rise 7s ease-in-out -3s infinite; }
  html:not(.calm):not(.still) .idle-on .m-waves { animation: cx-roll 9s ease-in-out infinite alternate; }
  html:not(.calm):not(.still) .idle-on .m-rotor { animation: cx-spin 60s linear infinite; }
  html:not(.calm):not(.still) .idle-on .m-rays { animation-duration: 90s; }
  html:not(.calm):not(.still) .idle-on .m-gear { animation-duration: 72s; }
  html:not(.calm):not(.still) .idle-on .m-curtain.l { animation: cx-breathe 7s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-curtain.r { animation: cx-breathe-r 7s ease-in-out -2s infinite; }
  html:not(.calm):not(.still) .idle-on .m-spot, html:not(.calm):not(.still) .idle-on .m-sheen { animation: cx-pulse 6s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-lens { animation: cx-lens 9s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-cameo { animation: cx-bob 6s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-laurel { animation: cx-sway 8s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-quill { animation: cx-quill 7s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-pendulum, html:not(.calm):not(.still) .idle-on .m-lantern.l1 { animation: cx-swing 6s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-lantern.l2 { animation: cx-swing 8s ease-in-out -3s infinite; }
  html:not(.calm):not(.still) .idle-on .m-pin { animation: cx-pulse 4s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-layer.h1 { animation: cx-drift 22s ease-in-out infinite alternate; }
  html:not(.calm):not(.still) .idle-on .m-layer.h2 { animation: cx-drift-s 30s ease-in-out infinite alternate-reverse; }
  html:not(.calm):not(.still) .idle-on .m-petal.p1 { animation: cx-fall 10s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-petal.p2 { animation: cx-fall 13s ease-in-out -5s infinite; }
  html:not(.calm):not(.still) .idle-on .m-peek { animation: cx-peek 8s ease-in-out infinite; }
  html:not(.calm):not(.still) .idle-on .m-nightlight { animation: cx-pulse 6s ease-in-out infinite; }
  /* calm collections: still art and at most a slow glow (never particles, sway or rotor) */
  html:not(.calm):not(.still) .cx[data-calm] .idle-on .m-pt, html:not(.calm):not(.still) .cx[data-calm].idle-on .m-pt,
  html:not(.calm):not(.still) .cx[data-calm].idle-on .m-obj, html:not(.calm):not(.still) .cx[data-calm].idle-on .m-rotor,
  html:not(.calm):not(.still) .cx[data-calm].idle-on .m-petal, html:not(.calm):not(.still) .cx[data-calm].idle-on .m-waves { animation: none; }
  html:not(.calm):not(.still) .cx[data-calm].idle-on .m-glow { animation: cx-pulse 8s ease-in-out infinite; }
  /* a route draws itself once, when its card arrives */
  html:not(.calm):not(.still) .m-route { animation: cx-draw 1.4s var(--ease) .2s both; }
}
@keyframes cx-drift { from { transform: translateX(-9px); } to { transform: translateX(9px); } }
@keyframes cx-drift-s { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@keyframes cx-flicker { 0%, 100% { opacity: .82; } 40% { opacity: 1; } 55% { opacity: .72; } 72% { opacity: .95; } }
@keyframes cx-flame { 0%, 100% { transform: scale(1, 1); } 45% { transform: scale(.94, 1.06); } 70% { transform: scale(1.03, .97); } }
@keyframes cx-pulse { 0%, 100% { opacity: .62; } 50% { opacity: 1; } }
@keyframes cx-fall { 0% { transform: translateY(-9px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@keyframes cx-twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes cx-mote { from { transform: translate(-6px, 4px); } to { transform: translate(6px, -4px); } }
@keyframes cx-rise { 0% { transform: translateY(9px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-9px); opacity: 0; } }
@keyframes cx-roll { from { transform: translate(-12px, 0); } to { transform: translate(5px, 3px); } }
@keyframes cx-spin { to { transform: rotate(360deg); } }
@keyframes cx-breathe { 0%, 100% { transform: skewX(0deg); } 50% { transform: skewX(1.4deg); } }
@keyframes cx-breathe-r { 0%, 100% { transform: scaleX(-1) skewX(0deg); } 50% { transform: scaleX(-1) skewX(1.4deg); } }
@keyframes cx-lens { 0%, 100% { transform: rotate(-12deg) translate(0, 0); } 50% { transform: rotate(-5deg) translate(-8px, 6px); } }
@keyframes cx-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes cx-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes cx-quill { 0%, 100% { transform: rotate(26deg) translateY(0); } 50% { transform: rotate(22deg) translateY(5px); } }
@keyframes cx-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes cx-peek { 0%, 30%, 100% { transform: rotate(-90deg) translateY(0); } 45%, 80% { transform: rotate(-90deg) translateY(-14px); } }
@keyframes cx-draw { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

/* ==== The card ===================================================================================================== */
.ccd {
  display: flex; flex-direction: column; text-decoration: none; border-radius: 26px; padding: 20px 20px 0; container-type: size;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 34px 60px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ccd:focus-visible { outline: 3px solid var(--accent, #F2B544); outline-offset: 3px; }
.ccd .ck, .ccd .cn, .ccd .ct { align-self: flex-start; }
.ccd .ck { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-mut); line-height: 1.3; }
.ccd .cn { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 11.5cqw, 40px); line-height: 1.04; margin-top: 8px; letter-spacing: -.01em; max-width: 76%; text-wrap: balance; }
.ccd .ct { font-size: clamp(14px, 5.2cqw, 17px); line-height: 1.42; color: var(--c-mut); margin-top: 10px; max-width: 30ch; text-wrap: pretty; }
.ccd .cm { margin-top: 12px; align-self: flex-start; font-size: 13px; font-weight: 700; line-height: 1.3; padding: 5px 10px; border-radius: 10px; color: var(--c-ink); background: color-mix(in srgb, var(--c-bg) 72%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 16%, transparent); white-space: nowrap; }
/* small cards say less: the hook goes first, then "Collection" from the kicker, then the title wraps to three lines */
@container (max-height: 340px) { .ccd .ct { display: none; } }
@container (max-width: 230px) { .ccd .ck2 { display: none; } }
@container (max-height: 260px) { .ccd .cn { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }
@container (max-height: 260px) and (max-width: 230px) { .ccd .cn { -webkit-line-clamp: 2; } }
.cx > .cfan { position: absolute; left: 0; right: 0; bottom: 0; height: 40cqh; z-index: 1; pointer-events: none; }
.fcv { position: absolute; left: 50%; bottom: -9cqh; width: 29cqw; max-width: 116px; transform-origin: 50% 120%; z-index: calc(3 - var(--a)); transform: translateX(-50%) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 8px)); transition: transform 600ms var(--spring); }
.cx-cv { display: block; position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, hsl(var(--hue) 34% 34%), hsl(calc(var(--hue) + 30) 30% 18%)); box-shadow: 0 18px 28px -12px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08); }
.cx-cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==== Palettes ===================================================================================================== */
/* PALETTES (generated by review/scripts/phase-b/pb-u8/palettes.py from tools/catalog/make_collections.py; one per
   collection, reusable by any new collection). --c-bg/--c-bg2 are the card's gradient stops; --c-ink and --c-mut meet
   4.5:1 against both (worst pair noted); --c-m1/--c-m2 color the motif; --c-acc is the art accent, --c-btn the button. */
.cx[data-pal="night-green"] { --c-bg: #131F19; --c-bg2: #324A3C; --c-ink: #D8DFD5; --c-mut: #C1C8BF; --c-acc: #E0A84B; --c-btn: #E0A84B; --c-btn-ink: #18212B; --c-deep: #16231C; --c-m1: #3E5B4A; --c-m2: #A9B8A2; } /* 5.6 */
.cx[data-pal="blush"] { --c-bg: #F6E9E4; --c-bg2: #E7D4D0; --c-ink: #462C2F; --c-mut: #634A4C; --c-acc: #B5525C; --c-btn: #B5525C; --c-btn-ink: #FFFFFF; --c-deep: #5E3B3F; --c-m1: #C9A9A6; --c-m2: #F6E9E4; } /* light, 5.6 */
.cx[data-pal="marble"] { --c-bg: #F4EFE4; --c-bg2: #F0EADB; --c-ink: #443F34; --c-mut: #605B51; --c-acc: #B5562F; --c-btn: #B5562F; --c-btn-ink: #FFFFFF; --c-deep: #5B5446; --c-m1: #D8C7A0; --c-m2: #F4EFE4; } /* light, 5.6 */
.cx[data-pal="crimson"] { --c-bg: #250A0E; --c-bg2: #782831; --c-ink: #F5E7D4; --c-mut: #DCCCBC; --c-acc: #D9A441; --c-btn: #D9A441; --c-btn-ink: #18212B; --c-deep: #2A0B10; --c-m1: #8C2F39; --c-m2: #E8C9A0; } /* 6.2 */
.cx[data-pal="violet-night"] { --c-bg: #121226; --c-bg2: #26283D; --c-ink: #E0DDEE; --c-mut: #C7C5D6; --c-acc: #E8C66A; --c-btn: #E8C66A; --c-btn-ink: #18212B; --c-deep: #14152B; --c-m1: #2B2D42; --c-m2: #B9B3D9; } /* 8.5 */
.cx[data-pal="lapis-gold"] { --c-bg: #0C293C; --c-bg2: #17585D; --c-ink: #F4EFE4; --c-mut: #D8D8D0; --c-acc: #C9A23A; --c-btn: #C9A23A; --c-btn-ink: #18212B; --c-deep: #0E2F44; --c-m1: #1C6E6A; --c-m2: #E6DCC3; } /* 5.6 */
.cx[data-pal="winter"] { --c-bg: #EEF1F4; --c-bg2: #C8D3DD; --c-ink: #2C0A10; --c-mut: #4B2F34; --c-acc: #C8D3DD; --c-btn: #7A1F2B; --c-btn-ink: #FFFFFF; --c-deep: #3A0E15; --c-m1: #7A1F2B; --c-m2: #EEF1F4; } /* light, 7.9 */
.cx[data-pal="dusk-sand"] { --c-bg: #410C10; --c-bg2: #9D111B; --c-ink: #FAEED6; --c-mut: #E3D3BE; --c-acc: #F2A541; --c-btn: #F2A541; --c-btn-ink: #18212B; --c-deep: #4A0E12; --c-m1: #C1121F; --c-m2: #F3D9A4; } /* 5.7 */
.cx[data-pal="meadow"] { --c-bg: #FBF3D5; --c-bg2: #F6E7B9; --c-ink: #2E4416; --c-mut: #4F6035; --c-acc: #8AB17D; --c-btn: #E9C46A; --c-btn-ink: #18212B; --c-deep: #3D5A1E; --c-m1: #E9C46A; --c-m2: #FBF3D5; } /* light, 5.6 */
.cx[data-pal="midnight-blue"] { --c-bg: #0D1A26; --c-bg2: #213E4B; --c-ink: #F5F7F9; --c-mut: #D9DDE0; --c-acc: #F4D35E; --c-btn: #F4D35E; --c-btn-ink: #18212B; --c-deep: #0F1D2B; --c-m1: #264653; --c-m2: #E9EEF2; } /* 8.3 */
.cx[data-pal="sepia"] { --c-bg: #281E16; --c-bg2: #5F4633; --c-ink: #F6EFE6; --c-mut: #DDD6CD; --c-acc: #B23A3A; --c-btn: #B23A3A; --c-btn-ink: #FFFFFF; --c-deep: #2E2219; --c-m1: #6B4F3A; --c-m2: #EADBC8; } /* 6.0 */
.cx[data-pal="brass-ocean"] { --c-bg: #0B2937; --c-bg2: #1B536C; --c-ink: #F2EBDB; --c-mut: #D7D4C8; --c-acc: #B08D57; --c-btn: #B08D57; --c-btn-ink: #18212B; --c-deep: #0D2F3F; --c-m1: #1F5F7A; --c-m2: #E3D2B0; } /* 5.6 */
.cx[data-pal="emerald"] { --c-bg: #103620; --c-bg2: #236138; --c-ink: #F5FAF2; --c-mut: #DAE3D8; --c-acc: #F2C94C; --c-btn: #F2C94C; --c-btn-ink: #18212B; --c-deep: #123D24; --c-m1: #3F9D5B; --c-m2: #E9F5E1; } /* 5.7 */
.cx[data-pal="ember"] { --c-bg: #34130A; --c-bg2: #7F381F; --c-ink: #F9EADE; --c-mut: #E1D0C4; --c-acc: #7FA35B; --c-btn: #7FA35B; --c-btn-ink: #18212B; --c-deep: #3B160B; --c-m1: #B5532E; --c-m2: #F2D0B5; } /* 5.6 */
.cx[data-pal="sunshine"] { --c-bg: #FFF5D6; --c-bg2: #F4D99E; --c-ink: #44320F; --c-mut: #62512F; --c-acc: #3F7CAC; --c-btn: #3E7AA9; --c-btn-ink: #FFFFFF; --c-deep: #5A4214; --c-m1: #E3B04B; --c-m2: #FFF5D6; } /* light, 5.6 */
.cx[data-pal="slate"] { --c-bg: #262B34; --c-bg2: #4C5461; --c-ink: #F4F6F8; --c-mut: #DBDDE1; --c-acc: #C9A66B; --c-btn: #C9A66B; --c-btn-ink: #18212B; --c-deep: #2B313B; --c-m1: #8E9AAF; --c-m2: #E7EAF0; } /* 5.7 */
.cx[data-pal="deep-blue"] { --c-bg: #111E29; --c-bg2: #294258; --c-ink: #F4F1E9; --c-mut: #D9D7D2; --c-acc: #C9A23A; --c-btn: #C9A23A; --c-btn-ink: #18212B; --c-deep: #13222F; --c-m1: #2E4A62; --c-m2: #E6DFCF; } /* 7.3 */
.cx[data-pal="night-violet"] { --c-bg: #1A152D; --c-bg2: #4F4179; --c-ink: #F5F3FA; --c-mut: #DBD8E2; --c-acc: #E8C66A; --c-btn: #E8C66A; --c-btn-ink: #18212B; --c-deep: #1E1833; --c-m1: #5B4B8A; --c-m2: #E9E4F5; } /* 6.3 */
.cx[data-pal="candle"] { --c-bg: #34281A; --c-bg2: #645139; --c-ink: #FAF6EF; --c-mut: #E2DDD5; --c-acc: #E8B04B; --c-btn: #E8B04B; --c-btn-ink: #18212B; --c-deep: #3B2E1E; --c-m1: #A68A64; --c-m2: #F4EADB; } /* 5.6 */
.cx[data-pal="sand"] { --c-bg: #F6F0DC; --c-bg2: #EEE6CD; --c-ink: #443C24; --c-mut: #605941; --c-acc: #8C6E3C; --c-btn: #8C6E3C; --c-btn-ink: #FFFFFF; --c-deep: #5A5030; --c-m1: #C2B280; --c-m2: #F6F0DC; } /* light, 5.6 */
.cx[data-pal="dusk-blue"] { --c-bg: #E4E7EC; --c-bg2: #D0B78D; --c-ink: #171C26; --c-mut: #383D46; --c-acc: #C9A66B; --c-btn: #4F5D75; --c-btn-ink: #FFFFFF; --c-deep: #1F2633; --c-m1: #4F5D75; --c-m2: #E4E7EC; } /* light, 5.6 */
.cx[data-pal="ink-blue"] { --c-bg: #172538; --c-bg2: #365073; --c-ink: #F5F7FA; --c-mut: #DADEE2; --c-acc: #B5562F; --c-btn: #B5562F; --c-btn-ink: #FFFFFF; --c-deep: #1A2A40; --c-m1: #3D5A80; --c-m2: #E8EDF3; } /* 6.0 */
.cx[data-pal="charter"] { --c-bg: #EFE6D2; --c-bg2: #EFE6D2; --c-ink: #142026; --c-mut: #373F42; --c-acc: #9B2226; --c-btn: #9B2226; --c-btn-ink: #FFFFFF; --c-deep: #1A2A33; --c-m1: #2F4858; --c-m2: #EFE6D2; } /* light, 8.7 */
.cx[data-pal="graphite"] { --c-bg: #1A1F23; --c-bg2: #3B434B; --c-ink: #F3F4F5; --c-mut: #D9DADC; --c-acc: #E0A84B; --c-btn: #E0A84B; --c-btn-ink: #18212B; --c-deep: #1E2328; --c-m1: #424B54; --c-m2: #E4E6E8; } /* 7.2 */
.cx[data-pal="deco-plum"] { --c-bg: #251E2F; --c-bg2: #5B4D6B; --c-ink: #F8F5FA; --c-mut: #DEDBE1; --c-acc: #D4AF37; --c-btn: #D4AF37; --c-btn-ink: #18212B; --c-deep: #2A2235; --c-m1: #7D6B91; --c-m2: #EFE8F3; } /* 5.6 */
.cx[data-pal="night-indigo"] { --c-bg: #0F0F25; --c-bg2: #27274C; --c-ink: #EEEEF7; --c-mut: #D3D3DE; --c-acc: #C0C0D8; --c-btn: #C0C0D8; --c-btn-ink: #18212B; --c-deep: #11112A; --c-m1: #2C2C54; --c-m2: #D9D9EE; } /* 9.6 */
.cx[data-pal="storm"] { --c-bg: #170C12; --c-bg2: #341C26; --c-ink: #EDE8EB; --c-mut: #D4CED1; --c-acc: #8E7D86; --c-btn: #95858D; --c-btn-ink: #18212B; --c-deep: #1A0E14; --c-m1: #3B1F2B; --c-m2: #D8CCD2; } /* 10.1 */
.cx[data-pal="chart"] { --c-bg: #103146; --c-bg2: #1F5777; --c-ink: #F8F2E6; --c-mut: #DCDBD3; --c-acc: #9C6644; --c-btn: #9C6644; --c-btn-ink: #FFFFFF; --c-deep: #12384F; --c-m1: #2A6F97; --c-m2: #EFE3C8; } /* 5.6 */
.cx[data-pal="jungle"] { --c-bg: #253300; --c-bg2: #425C00; --c-ink: #F5F8EA; --c-mut: #DCE1CE; --c-acc: #C49A3A; --c-btn: #C49A3A; --c-btn-ink: #18212B; --c-deep: #2A3A00; --c-m1: #5C8001; --c-m2: #E8F0D0; } /* 5.6 */
.cx[data-pal="garden-green"] { --c-bg: #213218; --c-bg2: #3F5D2E; --c-ink: #F7FAF4; --c-mut: #DEE2D9; --c-acc: #A7C957; --c-btn: #A7C957; --c-btn-ink: #18212B; --c-deep: #25391B; --c-m1: #6A994E; --c-m2: #EEF4E6; } /* 5.6 */
.cx[data-pal="violet-dusk"] { --c-bg: #1E1A2D; --c-bg2: #52497C; --c-ink: #F4F2F9; --c-mut: #DAD8E1; --c-acc: #E0A84B; --c-btn: #E0A84B; --c-btn-ink: #18212B; --c-deep: #221E33; --c-m1: #5E548E; --c-m2: #E6E2F2; } /* 5.7 */
.cx[data-pal="khaki"] { --c-bg: #292A24; --c-bg2: #525448; --c-ink: #F5F4EE; --c-mut: #DCDCD6; --c-acc: #B3262E; --c-btn: #B3262E; --c-btn-ink: #FFFFFF; --c-deep: #2F3029; --c-m1: #6C6F5F; --c-m2: #E8E6DA; } /* 5.6 */
.cx[data-pal="garnet"] { --c-bg: #330B0D; --c-bg2: #881E21; --c-ink: #F9F4F3; --c-mut: #E1D8D7; --c-acc: #E9D8A6; --c-btn: #E9D8A6; --c-btn-ink: #18212B; --c-deep: #3A0D0F; --c-m1: #9B2226; --c-m2: #F2E6E4; } /* 6.7 */
.cx[data-pal="river-teal"] { --c-bg: #122A29; --c-bg2: #305A5C; --c-ink: #F2F7F7; --c-mut: #D8DFDF; --c-acc: #F4D35E; --c-btn: #F4D35E; --c-btn-ink: #18212B; --c-deep: #15302F; --c-m1: #3C6E71; --c-m2: #E3EEEE; } /* 5.6 */
.cx[data-pal="rose"] { --c-bg: #41212A; --c-bg2: #7B4250; --c-ink: #FBF4F6; --c-mut: #E5DADD; --c-acc: #6D597A; --c-btn: #6D597A; --c-btn-ink: #FFFFFF; --c-deep: #4A2530; --c-m1: #B56576; --c-m2: #F6E6EA; } /* 5.6 */
.cx[data-pal="forest"] { --c-bg: #172B1C; --c-bg2: #325B3A; --c-ink: #F4F8F2; --c-mut: #DAE0D8; --c-acc: #BC4749; --c-btn: #BC4749; --c-btn-ink: #FFFFFF; --c-deep: #1A3120; --c-m1: #386641; --c-m2: #E7F0E2; } /* 5.8 */
.cx[data-pal="bronze"] { --c-bg: #332112; --c-bg2: #6F492E; --c-ink: #F8F2EA; --c-mut: #E1D9D0; --c-acc: #3D5A80; --c-btn: #3D5A80; --c-btn-ink: #FFFFFF; --c-deep: #3A2614; --c-m1: #9C6644; --c-m2: #F0E2D0; } /* 5.7 */
.cx[data-pal="heraldry"] { --c-bg: #281A0E; --c-bg2: #6D4930; --c-ink: #F8F2EB; --c-mut: #DFD8D1; --c-acc: #9B2226; --c-btn: #9B2226; --c-btn-ink: #FFFFFF; --c-deep: #2E1D10; --c-m1: #7F5539; --c-m2: #EFE3D3; } /* 5.6 */
.cx[data-pal="sea-night"] { --c-bg: #051926; --c-bg2: #0A334C; --c-ink: #EFF5F8; --c-mut: #D3DADF; --c-acc: #E0A84B; --c-btn: #E0A84B; --c-btn-ink: #18212B; --c-deep: #061C2B; --c-m1: #0B3954; --c-m2: #DCE8EF; } /* 9.3 */
.cx[data-pal="plum"] { --c-bg: #26061C; --c-bg2: #550D3A; --c-ink: #F9F2F6; --c-mut: #E0D6DC; --c-acc: #FB8B24; --c-btn: #FB8B24; --c-btn-ink: #18212B; --c-deep: #2B0720; --c-m1: #5F0F40; --c-m2: #F2E3EC; } /* 9.9 */
.cx[data-pal="apricot"] { --c-bg: #FFF1E3; --c-bg2: #F9C89F; --c-ink: #442610; --c-mut: #624732; --c-acc: #2A9D8F; --c-btn: #2A9D8F; --c-btn-ink: #18212B; --c-deep: #5A3315; --c-m1: #F4A261; --c-m2: #FFF1E3; } /* light, 5.6 */
.cx[data-pal="sage"] { --c-bg: #F1F4EA; --c-bg2: #C7D0B6; --c-ink: #232C1D; --c-mut: #444C3E; --c-acc: #B5838D; --c-btn: #B5838D; --c-btn-ink: #18212B; --c-deep: #2F3A27; --c-m1: #A3B18A; --c-m2: #F1F4EA; } /* light, 5.6 */
.cx[data-pal="storybook"] { --c-bg: #26113A; --c-bg2: #6F369F; --c-ink: #FAF5FE; --c-mut: #E0D9E6; --c-acc: #FFD166; --c-btn: #FFD166; --c-btn-ink: #18212B; --c-deep: #2B1342; --c-m1: #9D4EDD; --c-m2: #F3E8FC; } /* 5.6 */
.cx[data-pal="coral"] { --c-bg: #FFF0EE; --c-bg2: #F9BEBC; --c-ink: #442020; --c-mut: #624141; --c-acc: #84A59D; --c-btn: #84A59D; --c-btn-ink: #18212B; --c-deep: #5A2A2A; --c-m1: #F28482; --c-m2: #FFF0EE; } /* light, 5.6 */
.cx[data-pal="lagoon"] { --c-bg: #0C332F; --c-bg2: #196057; --c-ink: #F4FAF9; --c-mut: #D8E3E1; --c-acc: #E9C46A; --c-btn: #E9C46A; --c-btn-ink: #18212B; --c-deep: #0E3A35; --c-m1: #2A9D8F; --c-m2: #E6F5F2; } /* 5.6 */
.cx[data-pal="dawn"] { --c-bg: #FFF6E5; --c-bg2: #F9D18F; --c-ink: #442C0E; --c-mut: #624C30; --c-acc: #84A59D; --c-btn: #84A59D; --c-btn-ink: #18212B; --c-deep: #5A3A12; --c-m1: #F6BD60; --c-m2: #FFF6E5; } /* light, 5.6 */
/* Light cards (dark ink): darker particles, stripes in the accent */
.cx[data-pal="blush"],
.cx[data-pal="marble"],
.cx[data-pal="winter"],
.cx[data-pal="meadow"],
.cx[data-pal="sunshine"],
.cx[data-pal="sand"],
.cx[data-pal="dusk-blue"],
.cx[data-pal="charter"],
.cx[data-pal="apricot"],
.cx[data-pal="sage"],
.cx[data-pal="coral"],
.cx[data-pal="dawn"] { --pt: color-mix(in srgb, var(--c-deep) 35%, #fff); --stripe: color-mix(in srgb, var(--c-acc) 13%, transparent); }

/* ==== The explorer: a room that fits the screen above the tab bar ================================================== */
.cxpage { display: flex; flex-direction: column; width: 100%; padding: 0 clamp(6px, 1.6vw, 20px); }
.xp {
  position: relative; width: 100%; max-width: 1440px; margin: 0 auto; height: var(--xp-h, calc(100dvh - 170px)); min-height: 200px;
  border-radius: 30px; overflow: hidden; isolation: isolate; color: #F4F1EA; background: #10151A;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "head" "stage" "bar" "foot";
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .6);
}
.xp-amb { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #0D1116; }
.xp-amb i { position: absolute; inset: 0; opacity: 0; background: radial-gradient(95% 70% at 50% 38%, color-mix(in srgb, var(--amb, #2A3640) 78%, #10151A), #0D1116 80%); transition: opacity 600ms var(--ease); will-change: opacity; }
.xp-amb i.on { opacity: 1; }
.xp-wait, .xp-empty { grid-area: stage; align-self: center; justify-self: center; text-align: center; color: rgba(244, 241, 234, .82); padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.xp-empty h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 40px; }
.xp-head { grid-area: head; display: flex; flex-direction: column; gap: 6px; padding: 12px 18px 4px; min-width: 0; }
.xp-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xp-sp { flex: 1 1 auto; }
.xp-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 6px; color: rgba(244, 241, 234, .82); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.xp-back .icon { width: 18px; height: 18px; }
.xp-pill { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: rgba(255, 255, 255, .1); color: #F4F1EA; font: inherit; font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); cursor: pointer; transition: background-color var(--d2) var(--ease), transform var(--d2) var(--spring); -webkit-tap-highlight-color: transparent; }
.xp-pill::after, .xp-mood::after { content: ""; position: absolute; inset: -3px -2px; }
.xp-pill .icon { width: 18px; height: 18px; }
.xp-pill:active, .xp-mood:active, .xp-round:active { transform: scale(.95); }
.xp-pill:focus-visible, .xp-mood:focus-visible, .xp-round:focus-visible, .xp-back:focus-visible, .xp-viewseg button:focus-visible { outline: 3px solid #F2B544; outline-offset: 2px; }
.xp-still .xp-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }
.xp-still[aria-pressed="true"] { background: #F4F1EA; color: #18212B; }
.xp-still[aria-pressed="true"] .xp-dot { background: currentColor; }
.xp-titles { min-width: 0; }
.xp-h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 7.4vw, 54px); line-height: 1.02; letter-spacing: -.015em; }
.xp-sub { margin: 6px 0 0; color: rgba(244, 241, 234, .76); font-size: 15px; line-height: 1.4; max-width: 46ch; }
.xp-sub-wall { display: none; }
.xp-moods { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px -18px 0; padding: 4px 18px; scroll-padding: 18px; }
.xp-moods::-webkit-scrollbar { display: none; }
.xp-mood { position: relative; flex: 0 0 auto; min-height: 38px; padding: 0 15px; border-radius: 19px; border: 0; background: rgba(255, 255, 255, .08); color: rgba(244, 241, 234, .88); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease), transform var(--d2) var(--spring); }
.xp-mood[aria-pressed="true"] { background: #F4F1EA; color: #18212B; }
.xp-viewseg { display: none; gap: 2px; padding: 3px; border-radius: 22px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.xp-viewseg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 19px; border: 0; background: none; color: rgba(244, 241, 234, .8); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.xp-viewseg button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
.xp.wide .xp-viewseg { display: inline-flex; }
.xp-pager { display: none; align-items: center; gap: 8px; color: rgba(244, 241, 234, .82); font-size: 15px; white-space: nowrap; }
.xp-pager[hidden] { display: none !important; }
.xp-round { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #F4F1EA; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: background-color var(--d2) var(--ease), transform var(--d2) var(--spring); }
.xp-round:disabled { opacity: .4; cursor: default; }
@media (hover: hover) { .xp-pill:hover, .xp-round:not(:disabled):hover, .xp-mood:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .17); } }

/* ---- The deck ---- */
.xp-stage { grid-area: stage; position: relative; perspective: 1200px; touch-action: pinch-zoom; container-type: size; min-height: 0; margin-top: 10px; }
.xp-stage .ccd {
  --cw: min(300px, 74cqw, 63cqh);
  position: absolute; top: 1%; left: 50%; width: var(--cw); height: min(480px, 98cqh); margin-left: calc(var(--cw) / -2);
  transform: translateX(calc(var(--off) * 72% + var(--drag, 0px))) translateZ(calc(var(--aoff) * -140px)) rotateY(calc(var(--off) * -16deg));
  opacity: calc(1 - max(var(--aoff) - 1, 0));
  --dim: calc(min(var(--aoff), 1) * .3); /* computed here (an ordinary inherited property), read by the shade below */
  transition: transform 560ms var(--spring), opacity 400ms var(--ease);
  will-change: transform;
}
/* neighbors dim under a shade (opacity only: cheap to animate) */
.xp-stage .ccd::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: #05080B; opacity: var(--dim); transition: opacity 400ms var(--ease); pointer-events: none; }
.xp-stage .ccd:not(.front) { cursor: pointer; }
.xp-stage .ccd.leaving { pointer-events: none; }
.xp-stage.dragging .ccd { transition: none; }
.xp-stage .ccd:not(.front) .fcv { transform: translateX(-50%) rotate(calc(var(--i) * 3deg)) translateY(26px); }
.xp-stage .ccd .fcv { width: 33cqw; max-width: 132px; }
.xp-stage .ccd.front .fcv { transform: translateX(calc(-50% + var(--i) * 23cqw)) rotate(calc(var(--i) * 10deg)) translateY(calc(var(--a) * 10px)); }
.xp.wide .xp-stage .ccd { --cw: min(340px, 30cqw, 64cqh); height: min(520px, 98cqh); opacity: calc(1 - max(var(--aoff) - 2, 0)); --dim: calc(min(var(--aoff), 2) * .26); }
.xp-stage.flyout .ccd { opacity: 0; translate: 0 40px; scale: .94; transition: opacity 200ms var(--ease), translate 200ms var(--ease), scale 200ms var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm):not(.still) .xp-stage .ccd.dealt { animation: cx-deal 600ms var(--spring) both; animation-delay: calc(var(--k) * 70ms); }
  html:not(.calm):not(.still) .ccd.surprised { animation: cx-pop 520ms var(--spring); }
}
@keyframes cx-deal { from { opacity: 0; translate: 0 48px; rotate: calc(var(--sp, 1) * 1.4deg); } }
@keyframes cx-pop { from { scale: .9; } 60% { scale: 1.03; } }
/* One card under 320 px, and whenever motion is calm: no 3D neighbors, a soft crossfade */
.xp.one .xp-stage .ccd:not(.front), html.calm .xp-stage .ccd:not(.front), html.still .xp-stage .ccd:not(.front) { opacity: 0; pointer-events: none; }
html.calm .xp-stage .ccd, html.still .xp-stage .ccd { transform: translateX(var(--drag, 0px)); transition: opacity 120ms linear; }
@media (prefers-reduced-motion: reduce) {
  .xp-stage .ccd { transform: translateX(var(--drag, 0px)); transition: opacity 120ms linear !important; }
  .xp-stage .ccd:not(.front) { opacity: 0; pointer-events: none; }
}
.xp-bar { grid-area: bar; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 14px 4px; }
.xp-count { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 64px; font-weight: 700; font-size: 15px; color: rgba(244, 241, 234, .9); font-variant-numeric: tabular-nums; }
.xp-count.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .32); transition: width 300ms var(--ease), background-color 300ms var(--ease); }
.xp-count.dots i.on { width: 22px; background: #F2B544; }
.xp-foot { grid-area: foot; display: flex; justify-content: center; padding: 4px 14px 14px; }
.xp-index.icon-only { padding: 0; width: 48px; min-height: 48px; border-radius: 50%; }
.xp-index.icon-only .lbl-full { display: none; }
.xp-bar .xp-index:not(.icon-only) { min-height: 48px; border-radius: 24px; margin-left: 8px; }

/* Narrow (under 360 px): the short subtitle goes; Surprise me keeps its icon */
@media (max-width: 359px) {
  .xp-head { padding: 8px 12px 2px; }
  .xp-sub { display: none; }
  .xp-surprise { width: 44px; padding: 0; font-size: 0; gap: 0; }
  .xp-moods { margin-inline: -12px; padding-inline: 12px; }
  .xp-bar { gap: 8px; padding-inline: 8px; }
}
/* Tiny (a phone at 200% zoom, under 240 px): the title is read aloud but not drawn, and the controls keep their icons
   (each has its name for screen readers) so all of them fit one row */
@media (max-width: 239px) {
  .xp-titles { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .xp-head { padding: 6px 8px 0; gap: 4px; }
  .xp-top { gap: 2px; }
  .xp-back { font-size: 0; width: 40px; justify-content: center; padding: 0; }
  .xp-back .icon { width: 22px; height: 22px; }
  .xp-still, .xp-top .xp-index { width: 44px; min-height: 40px; padding: 0; font-size: 0; gap: 0; }
  .xp-moods { margin-inline: -8px; padding-inline: 8px; }
  .xp-bar { gap: 6px; padding: 6px 6px 2px; }
  .xp-count { min-width: 0; font-size: 14px; }
  .chp-pill { width: 44px; padding: 0; justify-content: center; }
  .chp-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .chp-st { grid-template-columns: 36px 44px minmax(0, 1fr); gap: 8px; }
  .chp-num { width: 36px; height: 36px; font-size: 16px; }
  .chp-path::before { left: 17px; }
}
/* A short stage (200% zoom, a foldable's wide band): the card turns landscape, its covers to the right */
@container (max-height: 220px), (max-height: 340px) and (min-aspect-ratio: 2/1) {
  .xp-stage .ccd { --cw: min(440px, 96cqw); top: 0; height: 100cqh; padding: 12px 14px 0; border-radius: 20px; }
  .xp-stage .ccd .ct { display: none; }
  .xp-stage .ccd .cn { max-width: 58%; font-size: clamp(17px, 9cqw, 26px); margin-top: 4px; }
  .xp-stage .ccd .cm { margin-top: 6px; }
  .xp-stage .ccd .cfan { left: 46%; height: 92cqh; }
  .xp-stage .ccd .fcv { width: 20cqw; bottom: -18cqh; }
  .xp-stage .ccd.front .fcv { transform: translateX(calc(-50% + var(--i) * 12cqw)) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 6px)); }
}
@container (max-height: 130px) { .xp-stage .ccd .cm { display: none; } .xp-stage .ccd .cn { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; } }
/* Short screens (a phone or foldable held sideways): the stage on the left, the title, moods and arrows on the right */
.xp.short { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "stage head" "stage gap" "stage bar"; }
.xp.short .xp-head { padding: 8px 14px 0 4px; gap: 2px; }
.xp.short .xp-h1 { font-size: 28px; }
.xp.short .xp-sub { display: none; }
.xp.short .xp-moods { margin: 2px -14px 0 -4px; padding: 3px 14px 3px 4px; }
.xp.short .xp-stage { margin: 8px 0 8px 8px; overflow: hidden; border-radius: 24px; }
.xp.short .xp-stage .ccd { --cw: min(440px, 96cqw, 170cqh); top: 0; height: 100cqh; }
.xp.short .xp-stage .ccd .ct { display: none; }
.xp.short .xp-stage .ccd .cn { max-width: 52%; font-size: clamp(20px, 7cqw, 30px); }
.xp.short .xp-stage .ccd .cfan { left: 44%; height: 86cqh; }
.xp.short .xp-stage .ccd .fcv { width: 17cqw; bottom: -14cqh; }
.xp.short .xp-stage .ccd.front .fcv { transform: translateX(calc(-50% + var(--i) * 11cqw)) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 8px)); }
.xp.short .xp-bar { justify-content: flex-start; padding: 4px 14px 10px 4px; }
.xp.short .xp-foot { display: none; }

/* ---- The wall (large screens): one screen, a page flip for more ---- */
.xp-wall { grid-area: wall; display: none; min-height: 0; padding: 4px 26px 26px; gap: 14px; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr)); grid-auto-flow: dense; perspective: 1600px; }
.xp.wall { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "head" "wall"; }
.xp.wall .xp-wall { display: grid; }
.xp.wall .xp-stage, .xp.wall .xp-bar, .xp.wall .xp-foot { display: none; }
.xp.wall .xp-pager { display: inline-flex; }
.xp.wide .xp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "top top top" "titles moods pager"; align-items: end; column-gap: 22px; row-gap: 4px; padding: 14px 26px 12px; }
.xp.wide .xp-top { grid-area: top; } .xp.wide .xp-titles { grid-area: titles; } .xp.wide .xp-moods { grid-area: moods; margin: 0; padding: 4px 2px; flex-wrap: wrap; overflow: visible; }
.xp.wide .xp-pager { grid-area: pager; padding-bottom: 2px; }
.xp.wide .xp-sub-deck { display: none; } .xp.wide .xp-sub-wall { display: inline; }
.xp.wide.deck .xp-sub-deck { display: inline; } .xp.wide.deck .xp-sub-wall { display: none; }
.xp-wall .ccd { position: relative; min-height: 0; transition: transform 400ms var(--spring), box-shadow 400ms var(--ease); }
.xp-wall .ccd.big { grid-column: span 2; grid-row: span 2; padding: 28px 28px 0; }
.xp-wall .ccd.wide { grid-column: span 2; }
.xp-wall .ccd .cn { font-size: clamp(19px, 11cqw, 30px); max-width: 82%; }
.xp-wall .ccd.big .cn { font-size: clamp(30px, 11cqw, 60px); max-width: 74%; }
.xp-wall .ccd.wide .cn { font-size: clamp(20px, 6.4cqw, 32px); max-width: 56%; }
.xp-wall .ccd.big .ct { font-size: 18px; max-width: min(34ch, 62%); }
.xp-wall .ccd.one1 .ct, .xp-wall .ccd.wide .ct { display: none; }
.xp-wall .ccd .cm { margin-top: 8px; }
.xp-wall .ccd .fcv { width: 26cqw; max-width: 140px; transform: translateX(calc(-50% + var(--i) * 15cqw)) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 10px + 8px)); }
.xp-wall .ccd.wide .cfan { left: 46%; height: 70cqh; }
.xp-wall .ccd.wide .fcv { width: 15cqw; transform: translateX(calc(-50% + var(--i) * 9cqw)) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 8px + 8px)); }
.xp-wall .ccd.big .fcv { width: 24cqw; bottom: -12cqh; transform: translateX(calc(-50% + var(--i) * 20cqw)) rotate(calc(var(--i) * 8deg)) translateY(calc(var(--a) * 16px)); }
@media (hover: hover) { .xp-wall .ccd:hover { transform: translateY(-6px) rotate(-.4deg); } }
.xp-wall .ccd:focus-visible, .xp-wall .ccd.surprised { transform: translateY(-6px) rotate(-.4deg); }
@media (hover: hover) { .xp-wall .ccd:hover .fcv { transform: translateX(calc(-50% + var(--i) * 20cqw)) rotate(calc(var(--i) * 14deg)) translateY(calc(var(--a) * 12px - 4px)); } }
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm):not(.still) .xp-wall.dealing .ccd { animation: cx-deal 700ms var(--spring) both; animation-delay: calc(var(--k) * 70ms); }
  html:not(.calm):not(.still) .xp-wall.flip-out-l { animation: cx-flip-l 260ms var(--ease) forwards; }
  html:not(.calm):not(.still) .xp-wall.flip-out-r { animation: cx-flip-r 260ms var(--ease) forwards; }
}
.xp-wall .ccd:nth-child(even) { --sp: -1; }
@keyframes cx-flip-l { to { opacity: 0; transform: translateX(-40px) rotateY(10deg); } }
@keyframes cx-flip-r { to { opacity: 0; transform: translateX(40px) rotateY(-10deg); } }

/* ---- All collections (the index sheet) ---- */
.xpi .xpi-q { margin: 4px 0 8px; }
.xpi-list { display: flex; flex-direction: column; gap: 16px; }
.xpi-mood { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.xpi-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.xpi-a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .xpi-a:hover { background: var(--soft); } }
.xpi-sw { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.xpi-t { flex: 1 1 auto; min-width: 0; font-family: var(--serif); font-size: 18px; line-height: 1.25; }
.xpi-n { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ==== The Library strip ============================================================================================= */
.cxs { margin-top: 8px; }
.cxs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.cxs-sub { margin: -6px 0 0; }
.cxs-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px var(--gutter) 24px; margin: 0 calc(-1 * var(--gutter)); scroll-padding-inline: var(--gutter); }
.cxs-row::-webkit-scrollbar { display: none; }
.cxs-row .ccd { flex: 0 0 auto; width: 210px; height: 290px; scroll-snap-align: start; padding: 18px 18px 0; transition: transform 400ms var(--spring); }
.cxs-row .ccd .cn { font-size: 25px; }
.cxs-row .ccd .ct { display: none; }
.cxs-row .ccd .fcv { width: 31cqw; transform: translateX(calc(-50% + var(--i) * 19cqw)) rotate(calc(var(--i) * 9deg)) translateY(calc(var(--a) * 8px)); }
.cxs-all { flex: 0 0 auto; width: 170px; height: 290px; scroll-snap-align: start; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; text-decoration: none; color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.cxs-allt { font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.cxs-all .icon { width: 26px; height: 26px; color: var(--link); }
.cxs-all:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { .cxs-row .ccd:hover { transform: translateY(-6px) rotate(-.4deg); } }
.cxs-row.dealing .ccd, .cxs-row.dealing .cxs-all { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm):not(.still) .cxs-row.in .ccd, html:not(.calm):not(.still) .cxs-row.in .cxs-all { animation: cx-deal 700ms var(--spring) both; animation-delay: calc(var(--k, 10) * 70ms); }
}

/* ==== One collection ================================================================================================= */
.chp { padding: 0; }
.chp-hero { container-type: inline-size; display: flex; flex-direction: column; padding: 14px var(--gutter) 0; border-radius: 0 0 36px 36px; margin: 0 clamp(0px, 1.6vw, 20px); }
.chp-top { display: flex; align-items: center; gap: 8px; }
.chp-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--c-mut); text-decoration: none; font-weight: 700; font-size: 15px; }
.chp-back .icon { width: 18px; height: 18px; }
.chp-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 0; background: color-mix(in srgb, var(--c-bg) 70%, transparent); color: var(--c-ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 22%, transparent); }
.chp-pill .icon { width: 18px; height: 18px; }
.chp-back:focus-visible, .chp-pill:focus-visible, .chp-acts .btn:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.chp-txt { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; max-width: 760px; }
.chp-txt .ck { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-mut); }
.chp-h1 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 11cqw, 96px); line-height: 1; letter-spacing: -.02em; max-width: 13ch; text-wrap: balance; }
.chp-hook { margin: 0; font-size: 18px; line-height: 1.45; color: var(--c-mut); max-width: 36ch; }
.chp-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 2px; }
.chp-stats div { display: flex; flex-direction: column; }
.chp-stats b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.chp-stats small { font-size: 13px; font-weight: 700; color: var(--c-mut); }
.chp-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chp-acts .btn { white-space: normal; text-align: left; }
.chp-go { background: var(--c-btn); color: var(--c-btn-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 4px 0 color-mix(in srgb, var(--c-btn) 60%, #000), 0 16px 26px -12px rgba(0, 0, 0, .6); }
.chp-add { background: color-mix(in srgb, var(--c-bg) 70%, transparent); color: var(--c-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 26%, transparent); margin-bottom: 0; }
.chp-fan { position: relative; z-index: 2; margin-top: 28px; height: clamp(180px, 44cqw, 240px); pointer-events: none; }
.chp-fan .fcv { width: clamp(96px, 26cqw, 132px); max-width: none; bottom: -42px; z-index: calc(5 - var(--a)); transform: translateX(calc(-50% + var(--i) * min(64px, 17cqw))) rotate(calc(var(--i) * 7deg)) translateY(calc(var(--a) * 14px)); }
.cx-big .m-obj { width: 24cqw; max-width: 220px; top: 10%; }
.cx-big .m-lens { width: 22cqw; max-width: 200px; }
.cx-big .m-quill { width: 8cqw; max-width: 64px; }
.cx-big .m-laurel { width: 28cqw; max-width: 260px; opacity: .65; }
.cx-big .m-glow { width: 52cqw; max-width: 640px; }
.cx-big .m-route { width: 60cqw; height: 50%; }
@media (min-width: 900px) {
  .chp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 46%); grid-template-rows: auto 1fr; min-height: 560px; padding: 22px max(var(--gutter), calc(50vw - 600px)) 0; }
  .chp-top { grid-column: 1 / -1; }
  .chp-txt { margin-top: 26px; padding-bottom: 40px; }
  .chp-fan { height: auto; min-height: 380px; margin-top: 0; align-self: end; }
  .chp-fan .fcv { width: clamp(130px, 13cqw, 170px); bottom: -30px; transform: translateX(calc(-50% + var(--i) * min(96px, 7.4cqw))) rotate(calc(var(--i) * 7deg)) translateY(calc(var(--a) * 18px)); }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm):not(.still) .chp-txt > * { animation: cx-rise-in 700ms var(--ease) both; animation-delay: calc(var(--k, 0) * 90ms + 100ms); }
  html:not(.calm):not(.still) .chp-fan .fcv { animation: cx-deal-fan 900ms var(--spring) both; animation-delay: calc(var(--k) * 110ms + 300ms); }
  html:not(.calm):not(.still) .chp-st { animation: cx-rise-in 600ms var(--ease) both; animation-delay: calc(var(--k) * 80ms + 450ms); }
  html:not(.calm):not(.still) .chp-path::before { animation: cx-grow 1400ms var(--ease) .5s both; }
}
@keyframes cx-rise-in { from { opacity: 0; translate: 0 14px; } }
@keyframes cx-deal-fan { from { opacity: 0; translate: 0 120px; scale: .9; } }
@keyframes cx-grow { from { transform: scaleY(0); } }

.chp-body { width: 100%; max-width: 1160px; margin: 0 auto; padding: 40px var(--gutter) 24px; display: flex; flex-direction: column; gap: 36px; }
.chp-sec h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.chp-sec > p { margin: 4px 0 0; max-width: 60ch; }
@media (min-width: 1024px) {
  .chp-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .chp-pathsec { grid-row: span 3; }
}
.chp-path { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.chp-path::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 30px; width: 3px; border-radius: 2px; transform-origin: top; background: repeating-linear-gradient(color-mix(in srgb, var(--muted) 55%, transparent) 0 6px, transparent 6px 14px); }
.chp-st { position: relative; display: grid; grid-template-columns: 44px 62px minmax(0, 1fr); gap: 14px; align-items: start; padding: 0 0 22px; }
.chp-num { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 19px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line), 0 3px 0 4px var(--lip); position: relative; z-index: 1; }
.chp-num .icon { width: 20px; height: 20px; }
.chp-st.done .chp-num { background: var(--teal); color: #fff; }
.chp-st.cur .chp-num { background: var(--accent); color: var(--accent-ink); }
.chp-cv { display: block; }
.chp-cv .cx-cv { border-radius: 5px; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .06); }
.chp-info { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; min-width: 0; }
.chp-bt { font-family: var(--serif); font-size: 20px; line-height: 1.2; color: var(--ink); text-decoration: none; }
.chp-bt:hover { text-decoration: underline; text-underline-offset: 3px; }
.chp-info small { color: var(--muted); font-size: 14px; font-weight: 700; }
.chp-why { font-size: 16px; line-height: 1.45; }
.chp-start { align-self: flex-start; max-width: 100%; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 36px; font-weight: 700; color: var(--link); text-decoration: none; }
.chp-start .icon { width: 16px; height: 16px; }
.chp-badge { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 9px; background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); }
.chp-badge.reading { background: color-mix(in srgb, var(--accent) 26%, transparent); color: var(--ink); }
.chp-ways { display: grid; gap: 12px; margin-top: 14px; }
.chp-way { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform var(--d2) var(--spring); }
@media (hover: hover) { .chp-way:hover { transform: translateY(-2px); } }
.chp-wi { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--link) 13%, var(--card)); color: var(--link); flex-shrink: 0; }
.chp-way b { display: block; font-size: 17px; } .chp-way small { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; }
.chp-near { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 14px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x mandatory; }
.chp-near::-webkit-scrollbar { display: none; }
.chp-near .ccd { flex: 0 0 auto; width: 236px; height: 150px; padding: 16px 16px 0; border-radius: 22px; scroll-snap-align: start; }
.chp-near .ccd .cn { font-size: 23px; max-width: 70%; }
@media (min-width: 1024px) { .chp-near { flex-wrap: wrap; overflow: visible; margin: 0; padding: 14px 0 0; } .chp-near .ccd { width: calc(50% - 6px); } }
.chp-addsheet .chp-lists { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.chp-addsheet .btn { justify-content: flex-start; white-space: normal; text-align: left; }
